Merge pull request 'feat: Add DeSEC as a DNS provider' (#211) from desec into master

Reviewed-on: kherel/selfprivacy.org.app#211
pull/212/head
Inex Code 2023-06-01 15:16:15 +03:00
commit 7a80590fc8
52 changed files with 3867 additions and 1027 deletions

View File

@ -39,6 +39,6 @@ subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}

View File

@ -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

View File

@ -0,0 +1 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 209.51 94.74"><defs><style>.cls-1{fill:#fff;}</style></defs><path class="cls-1" d="M143.05,93.42l1.07-3.71c1.27-4.41.8-8.48-1.34-11.48-2-2.76-5.26-4.38-9.25-4.57L58,72.7a1.47,1.47,0,0,1-1.35-2,2,2,0,0,1,1.75-1.34l76.26-1c9-.41,18.84-7.75,22.27-16.71l4.34-11.36a2.68,2.68,0,0,0,.18-1,3.31,3.31,0,0,0-.06-.54,49.67,49.67,0,0,0-95.49-5.14,22.35,22.35,0,0,0-35,23.42A31.73,31.73,0,0,0,.34,93.45a1.47,1.47,0,0,0,1.45,1.27l139.49,0h0A1.83,1.83,0,0,0,143.05,93.42Z"/><path class="cls-1" d="M168.22,41.15q-1,0-2.1.06a.88.88,0,0,0-.32.07,1.17,1.17,0,0,0-.76.8l-3,10.26c-1.28,4.41-.81,8.48,1.34,11.48a11.65,11.65,0,0,0,9.24,4.57l16.11,1a1.44,1.44,0,0,1,1.14.62,1.5,1.5,0,0,1,.17,1.37,2,2,0,0,1-1.75,1.34l-16.73,1c-9.09.42-18.88,7.75-22.31,16.7l-1.21,3.16a.9.9,0,0,0,.79,1.22h57.63A1.55,1.55,0,0,0,208,93.63a41.34,41.34,0,0,0-39.76-52.48Z"/></svg>

After

Width:  |  Height:  |  Size: 922 B

View File

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="7.4053912mm"
height="7.5173831mm"
viewBox="0 0 7.4053913 7.5173831"
version="1.1"
id="svg1262"
sodipodi:docname="logo.notext.svg"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
<defs
id="defs1256" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="5.6"
inkscape:cx="101.86078"
inkscape:cy="8.9271745"
inkscape:document-units="mm"
inkscape:current-layer="g3885"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="2560"
inkscape:window-height="1365"
inkscape:window-x="0"
inkscape:window-y="38"
inkscape:window-maximized="1" />
<metadata
id="metadata1259">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-254.94057,-266.78298)">
<g
id="g3885"
transform="matrix(0.26519825,0,0,0.26519825,228.89366,215.69135)"
style="fill:#000000">
<g
style="fill:#000000;stroke:#ffffff;stroke-opacity:1"
id="layer1-9"
transform="matrix(0.22901929,0,0,0.22901929,26.296508,84.906304)"
inkscape:export-filename="/home/nils/git/desec-stack/webapp/src/assets/logo.png"
inkscape:export-xdpi="567.52002"
inkscape:export-ydpi="567.52002">
<g
style="fill:#000000;stroke:#ffffff;stroke-opacity:1"
transform="translate(-194.13584,150.8067)"
id="g3933">
<path
inkscape:connector-curvature="0"
d="m 509.13584,366.2239 c 8.87906,-33.13708 42.93987,-52.8021 76.07695,-43.92304 21.43594,5.74374 38.17931,22.48711 43.92305,43.92304 0,0 -6.09923,-6.07815 -10,-6.07815 -3.90077,0 -10,6.07815 -10,6.07815 0,0 -6.09923,-6.07815 -10,-6.07815 -3.90077,0 -10,6.07815 -10,6.07815 0,0 -6.09923,-6.07815 -10,-6.07815 -3.90077,0 -10,6.07815 -10,6.07815 0,0 -6.09923,-6.07815 -10,-6.07815 -3.90077,0 -10,6.07815 -10,6.07815 0,0 -6.09923,-6.07815 -10,-6.07815 -3.90077,0 -10,6.07815 -10,6.07815 0,0 -6.09923,-6.07815 -10,-6.07815 -3.90077,0 -10,6.07815 -10,6.07815 z"
id="path2985-6-3"
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:0.99999994;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker:none;enable-background:accumulate" />
<path
inkscape:connector-curvature="0"
d="m 567.42674,364.89583 v 61.87321 c 0,9.34738 5.48085,16.17306 12.23879,16.17306 6.75795,0 12.23635,-6.83606 12.23635,-16.18344 0,0 -1.07806,-1.02674 -1.75904,-1.03964 -0.64261,-0.0122 -1.69589,0.91753 -1.69589,0.91753 0,6.70817 -3.93157,13.01592 -8.78142,13.01592 -4.84984,0 -8.78142,-6.30775 -8.78142,-13.01592 l -7.6e-4,-61.74072 z"
id="path3775-7-4-6"
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:117.14173126;stroke-opacity:1;marker:none;enable-background:accumulate" />
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -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.

View File

@ -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**.

View File

@ -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 ",
@ -311,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",
@ -388,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:"
},
@ -506,4 +508,4 @@
"reset_onboarding_description": "Reset onboarding switch to show onboarding screen again",
"cubit_statuses": "Cubit loading statuses"
}
}
}

View File

@ -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": "Посетить сайт",
@ -305,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": "Загружаем список доменов",
@ -366,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": "Подключение к вашему серверному провайдеру",
@ -473,4 +475,4 @@
"length_not_equal": "Длина строки [], должна быть равна {}",
"length_longer": "Длина строки [], должна быть меньше либо равна {}"
}
}
}

View File

@ -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';

View File

@ -56,7 +56,7 @@ class ResponseLoggingParser extends ResponseParser {
abstract class ApiMap {
Future<GraphQLClient> getClient() async {
IOClient? ioClient;
if (StagingOptions.stagingAcme) {
if (StagingOptions.stagingAcme || !StagingOptions.verifyCertificate) {
final HttpClient httpClient = HttpClient();
httpClient.badCertificateCallback = (
final cert,

View File

@ -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<TRes> {
@ -171,7 +342,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields<TRes>
final TRes Function(Fragment$basicMutationReturnFields) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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<TRes>
final TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn)
_then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? code = _undefined,
@ -1913,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<String, dynamic> json) {
@ -2008,7 +2179,7 @@ class _CopyWithImpl$Query$GetServerDiskVolumes<TRes>
final TRes Function(Query$GetServerDiskVolumes) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? storage = _undefined,
@ -2232,6 +2403,10 @@ const documentNodeQueryGetServerDiskVolumes = DocumentNode(definitions: [
Query$GetServerDiskVolumes _parserFn$Query$GetServerDiskVolumes(
Map<String, dynamic> data) =>
Query$GetServerDiskVolumes.fromJson(data);
typedef OnQueryComplete$Query$GetServerDiskVolumes = FutureOr<void> Function(
Map<String, dynamic>?,
Query$GetServerDiskVolumes?,
);
class Options$Query$GetServerDiskVolumes
extends graphql.QueryOptions<Query$GetServerDiskVolumes> {
@ -2241,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<Object?> get properties => [
...super.onComplete == null
? super.properties
: super.properties.where((property) => property != onComplete),
onCompleteWithParsed,
];
}
class WatchOptions$Query$GetServerDiskVolumes
@ -2264,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,
@ -2274,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,
@ -2330,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(
@ -2441,7 +2640,7 @@ class _CopyWithImpl$Query$GetServerDiskVolumes$storage<TRes>
final TRes Function(Query$GetServerDiskVolumes$storage) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? volumes = _undefined,
@ -2494,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(
@ -2718,7 +2917,7 @@ class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes<TRes>
final TRes Function(Query$GetServerDiskVolumes$storage$volumes) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? freeSpace = _undefined,
@ -2889,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<
@ -2921,7 +3155,7 @@ class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages<TRes>
final TRes Function(Query$GetServerDiskVolumes$storage$volumes$usages) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? title = _undefined,
@ -2961,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,
});
@ -3106,7 +3340,7 @@ class _CopyWithImpl$Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceSt
Query$GetServerDiskVolumes$storage$volumes$usages$$ServiceStorageUsage)
_then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? service = _undefined,
@ -3171,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(
@ -3307,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 = <dynamic, dynamic>{};
TRes call({
Object? id = _undefined,
@ -3426,7 +3660,7 @@ class _CopyWithImpl$Variables$Mutation$MountVolume<TRes>
final TRes Function(Variables$Mutation$MountVolume) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({Object? name = _undefined}) =>
_then(Variables$Mutation$MountVolume._({
@ -3447,7 +3681,7 @@ class _CopyWithStubImpl$Variables$Mutation$MountVolume<TRes>
class Mutation$MountVolume {
Mutation$MountVolume({
required this.mountVolume,
required this.$__typename,
this.$__typename = 'Mutation',
});
factory Mutation$MountVolume.fromJson(Map<String, dynamic> json) {
@ -3540,7 +3774,7 @@ class _CopyWithImpl$Mutation$MountVolume<TRes>
final TRes Function(Mutation$MountVolume) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? mountVolume = _undefined,
@ -3632,7 +3866,7 @@ Mutation$MountVolume _parserFn$Mutation$MountVolume(
Map<String, dynamic> data) =>
Mutation$MountVolume.fromJson(data);
typedef OnMutationCompleted$Mutation$MountVolume = FutureOr<void> Function(
dynamic,
Map<String, dynamic>?,
Mutation$MountVolume?,
);
@ -3645,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<Mutation$MountVolume>? update,
@ -3656,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
@ -3690,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,
@ -3701,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,
@ -3727,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<String, dynamic> json) {
@ -3848,7 +4084,7 @@ class _CopyWithImpl$Mutation$MountVolume$mountVolume<TRes>
final TRes Function(Mutation$MountVolume$mountVolume) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? code = _undefined,
@ -3963,7 +4199,7 @@ class _CopyWithImpl$Variables$Mutation$ResizeVolume<TRes>
final TRes Function(Variables$Mutation$ResizeVolume) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({Object? name = _undefined}) =>
_then(Variables$Mutation$ResizeVolume._({
@ -3984,7 +4220,7 @@ class _CopyWithStubImpl$Variables$Mutation$ResizeVolume<TRes>
class Mutation$ResizeVolume {
Mutation$ResizeVolume({
required this.resizeVolume,
required this.$__typename,
this.$__typename = 'Mutation',
});
factory Mutation$ResizeVolume.fromJson(Map<String, dynamic> json) {
@ -4077,7 +4313,7 @@ class _CopyWithImpl$Mutation$ResizeVolume<TRes>
final TRes Function(Mutation$ResizeVolume) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? resizeVolume = _undefined,
@ -4169,7 +4405,7 @@ Mutation$ResizeVolume _parserFn$Mutation$ResizeVolume(
Map<String, dynamic> data) =>
Mutation$ResizeVolume.fromJson(data);
typedef OnMutationCompleted$Mutation$ResizeVolume = FutureOr<void> Function(
dynamic,
Map<String, dynamic>?,
Mutation$ResizeVolume?,
);
@ -4182,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<Mutation$ResizeVolume>? update,
@ -4193,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
@ -4227,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,
@ -4238,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,
@ -4264,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(
@ -4387,7 +4625,7 @@ class _CopyWithImpl$Mutation$ResizeVolume$resizeVolume<TRes>
final TRes Function(Mutation$ResizeVolume$resizeVolume) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? code = _undefined,
@ -4502,7 +4740,7 @@ class _CopyWithImpl$Variables$Mutation$UnmountVolume<TRes>
final TRes Function(Variables$Mutation$UnmountVolume) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({Object? name = _undefined}) =>
_then(Variables$Mutation$UnmountVolume._({
@ -4523,7 +4761,7 @@ class _CopyWithStubImpl$Variables$Mutation$UnmountVolume<TRes>
class Mutation$UnmountVolume {
Mutation$UnmountVolume({
required this.unmountVolume,
required this.$__typename,
this.$__typename = 'Mutation',
});
factory Mutation$UnmountVolume.fromJson(Map<String, dynamic> json) {
@ -4617,7 +4855,7 @@ class _CopyWithImpl$Mutation$UnmountVolume<TRes>
final TRes Function(Mutation$UnmountVolume) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? unmountVolume = _undefined,
@ -4709,7 +4947,7 @@ Mutation$UnmountVolume _parserFn$Mutation$UnmountVolume(
Map<String, dynamic> data) =>
Mutation$UnmountVolume.fromJson(data);
typedef OnMutationCompleted$Mutation$UnmountVolume = FutureOr<void> Function(
dynamic,
Map<String, dynamic>?,
Mutation$UnmountVolume?,
);
@ -4722,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<Mutation$UnmountVolume>? update,
@ -4733,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
@ -4769,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,
@ -4780,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,
@ -4806,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(
@ -4929,7 +5169,7 @@ class _CopyWithImpl$Mutation$UnmountVolume$unmountVolume<TRes>
final TRes Function(Mutation$UnmountVolume$unmountVolume) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? code = _undefined,
@ -5048,7 +5288,7 @@ class _CopyWithImpl$Variables$Mutation$MigrateToBinds<TRes>
final TRes Function(Variables$Mutation$MigrateToBinds) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({Object? input = _undefined}) =>
_then(Variables$Mutation$MigrateToBinds._({
@ -5070,7 +5310,7 @@ class _CopyWithStubImpl$Variables$Mutation$MigrateToBinds<TRes>
class Mutation$MigrateToBinds {
Mutation$MigrateToBinds({
required this.migrateToBinds,
required this.$__typename,
this.$__typename = 'Mutation',
});
factory Mutation$MigrateToBinds.fromJson(Map<String, dynamic> json) {
@ -5164,7 +5404,7 @@ class _CopyWithImpl$Mutation$MigrateToBinds<TRes>
final TRes Function(Mutation$MigrateToBinds) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? migrateToBinds = _undefined,
@ -5348,7 +5588,7 @@ Mutation$MigrateToBinds _parserFn$Mutation$MigrateToBinds(
Map<String, dynamic> data) =>
Mutation$MigrateToBinds.fromJson(data);
typedef OnMutationCompleted$Mutation$MigrateToBinds = FutureOr<void> Function(
dynamic,
Map<String, dynamic>?,
Mutation$MigrateToBinds?,
);
@ -5361,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<Mutation$MigrateToBinds>? update,
@ -5372,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
@ -5408,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,
@ -5419,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,
@ -5445,7 +5687,7 @@ class Mutation$MigrateToBinds$migrateToBinds
required this.code,
required this.message,
required this.success,
required this.$__typename,
this.$__typename = 'GenericJobButationReturn',
this.job,
});
@ -5587,7 +5829,7 @@ class _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds<TRes>
final TRes Function(Mutation$MigrateToBinds$migrateToBinds) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? code = _undefined,
@ -5653,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(
@ -5889,7 +6131,7 @@ class _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds$job<TRes>
final TRes Function(Mutation$MigrateToBinds$migrateToBinds$job) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? createdAt = _undefined,

View File

@ -75,7 +75,8 @@ type DeviceApiTokenMutationReturn implements MutationReturnInterface {
}
enum DnsProvider {
CLOUDFLARE
CLOUDFLARE,
DESEC
}
type DnsRecord {

View File

@ -116,7 +116,7 @@ class _CopyWithImpl$Input$AutoUpgradeSettingsInput<TRes>
final TRes Function(Input$AutoUpgradeSettingsInput) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? enableAutoUpgrade = _undefined,
@ -286,7 +286,7 @@ class _CopyWithImpl$Input$MigrateToBindsInput<TRes>
final TRes Function(Input$MigrateToBindsInput) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? emailBlockDevice = _undefined,
@ -424,7 +424,7 @@ class _CopyWithImpl$Input$MoveServiceInput<TRes>
final TRes Function(Input$MoveServiceInput) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? serviceId = _undefined,
@ -567,7 +567,7 @@ class _CopyWithImpl$Input$RecoveryKeyLimitsInput<TRes>
final TRes Function(Input$RecoveryKeyLimitsInput) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? expirationDate = _undefined,
@ -692,7 +692,7 @@ class _CopyWithImpl$Input$SshMutationInput<TRes>
final TRes Function(Input$SshMutationInput) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? username = _undefined,
@ -818,7 +818,7 @@ class _CopyWithImpl$Input$UseNewDeviceKeyInput<TRes>
final TRes Function(Input$UseNewDeviceKeyInput) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? key = _undefined,
@ -943,7 +943,7 @@ class _CopyWithImpl$Input$UseRecoveryKeyInput<TRes>
final TRes Function(Input$UseRecoveryKeyInput) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? key = _undefined,
@ -1068,7 +1068,7 @@ class _CopyWithImpl$Input$UserMutationInput<TRes>
final TRes Function(Input$UserMutationInput) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? username = _undefined,
@ -1096,12 +1096,14 @@ class _CopyWithStubImpl$Input$UserMutationInput<TRes>
_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;
}
@ -1264,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<String, dynamic> json) {
@ -1413,7 +1417,7 @@ class _CopyWithImpl$Fragment$dnsRecordFields<TRes>
final TRes Function(Fragment$dnsRecordFields) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? content = _undefined,
@ -1551,7 +1555,7 @@ extension ClientExtension$Fragment$dnsRecordFields on graphql.GraphQLClient {
}
}
const possibleTypesMap = {
const possibleTypesMap = <String, Set<String>>{
'MutationReturnInterface': {
'ApiKeyMutationReturn',
'AutoUpgradeSettingsMutationReturn',

View File

@ -72,6 +72,15 @@ query SystemServerProvider {
}
}
query SystemDnsProvider {
system {
domainInfo {
provider
}
}
}
query GetApiTokens {
api {
devices {

File diff suppressed because it is too large Load Diff

View File

@ -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<TRes> {
@ -171,7 +342,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields<TRes>
final TRes Function(Fragment$basicMutationReturnFields) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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<TRes>
final TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn)
_then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
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<String, dynamic> json) {
@ -2006,7 +2177,7 @@ class _CopyWithImpl$Query$SystemSettings<TRes>
final TRes Function(Query$SystemSettings) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? system = _undefined,
@ -2157,6 +2328,10 @@ const documentNodeQuerySystemSettings = DocumentNode(definitions: [
Query$SystemSettings _parserFn$Query$SystemSettings(
Map<String, dynamic> data) =>
Query$SystemSettings.fromJson(data);
typedef OnQueryComplete$Query$SystemSettings = FutureOr<void> Function(
Map<String, dynamic>?,
Query$SystemSettings?,
);
class Options$Query$SystemSettings
extends graphql.QueryOptions<Query$SystemSettings> {
@ -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<Object?> 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<String, dynamic> json) {
@ -2346,7 +2543,7 @@ class _CopyWithImpl$Query$SystemSettings$system<TRes>
final TRes Function(Query$SystemSettings$system) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
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<TRes>
final TRes Function(Query$SystemSettings$system$settings) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
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<TRes>
final TRes Function(Query$SystemSettings$system$settings$autoUpgrade) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
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<TRes>
final TRes Function(Query$SystemSettings$system$settings$ssh) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? enable = _undefined,
@ -2870,7 +3067,7 @@ class _CopyWithStubImpl$Query$SystemSettings$system$settings$ssh<TRes>
class Query$SystemIsUsingBinds {
Query$SystemIsUsingBinds({
required this.system,
required this.$__typename,
this.$__typename = 'Query',
});
factory Query$SystemIsUsingBinds.fromJson(Map<String, dynamic> json) {
@ -2965,7 +3162,7 @@ class _CopyWithImpl$Query$SystemIsUsingBinds<TRes>
final TRes Function(Query$SystemIsUsingBinds) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? system = _undefined,
@ -3058,6 +3255,10 @@ const documentNodeQuerySystemIsUsingBinds = DocumentNode(definitions: [
Query$SystemIsUsingBinds _parserFn$Query$SystemIsUsingBinds(
Map<String, dynamic> data) =>
Query$SystemIsUsingBinds.fromJson(data);
typedef OnQueryComplete$Query$SystemIsUsingBinds = FutureOr<void> Function(
Map<String, dynamic>?,
Query$SystemIsUsingBinds?,
);
class Options$Query$SystemIsUsingBinds
extends graphql.QueryOptions<Query$SystemIsUsingBinds> {
@ -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<Object?> 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<String, dynamic> json) {
@ -3251,7 +3476,7 @@ class _CopyWithImpl$Query$SystemIsUsingBinds$system<TRes>
final TRes Function(Query$SystemIsUsingBinds$system) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? info = _undefined,
@ -3290,7 +3515,7 @@ class _CopyWithStubImpl$Query$SystemIsUsingBinds$system<TRes>
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<TRes>
final TRes Function(Query$SystemIsUsingBinds$system$info) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? usingBinds = _undefined,
@ -3417,7 +3642,7 @@ class _CopyWithStubImpl$Query$SystemIsUsingBinds$system$info<TRes>
class Query$DomainInfo {
Query$DomainInfo({
required this.system,
required this.$__typename,
this.$__typename = 'Query',
});
factory Query$DomainInfo.fromJson(Map<String, dynamic> json) {
@ -3510,7 +3735,7 @@ class _CopyWithImpl$Query$DomainInfo<TRes>
final TRes Function(Query$DomainInfo) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? system = _undefined,
@ -3636,6 +3861,10 @@ const documentNodeQueryDomainInfo = DocumentNode(definitions: [
]);
Query$DomainInfo _parserFn$Query$DomainInfo(Map<String, dynamic> data) =>
Query$DomainInfo.fromJson(data);
typedef OnQueryComplete$Query$DomainInfo = FutureOr<void> Function(
Map<String, dynamic>?,
Query$DomainInfo?,
);
class Options$Query$DomainInfo extends graphql.QueryOptions<Query$DomainInfo> {
Options$Query$DomainInfo({
@ -3644,19 +3873,40 @@ class Options$Query$DomainInfo extends graphql.QueryOptions<Query$DomainInfo> {
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<Object?> 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<String, dynamic> json) {
@ -3821,7 +4072,7 @@ class _CopyWithImpl$Query$DomainInfo$system<TRes>
final TRes Function(Query$DomainInfo$system) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
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<TRes>
final TRes Function(Query$DomainInfo$system$domainInfo) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? domain = _undefined,
@ -4152,7 +4403,7 @@ class _CopyWithImpl$Variables$Mutation$ChangeTimezone<TRes>
final TRes Function(Variables$Mutation$ChangeTimezone) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({Object? timezone = _undefined}) =>
_then(Variables$Mutation$ChangeTimezone._({
@ -4174,7 +4425,7 @@ class _CopyWithStubImpl$Variables$Mutation$ChangeTimezone<TRes>
class Mutation$ChangeTimezone {
Mutation$ChangeTimezone({
required this.changeTimezone,
required this.$__typename,
this.$__typename = 'Mutation',
});
factory Mutation$ChangeTimezone.fromJson(Map<String, dynamic> json) {
@ -4268,7 +4519,7 @@ class _CopyWithImpl$Mutation$ChangeTimezone<TRes>
final TRes Function(Mutation$ChangeTimezone) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? changeTimezone = _undefined,
@ -4367,7 +4618,7 @@ Mutation$ChangeTimezone _parserFn$Mutation$ChangeTimezone(
Map<String, dynamic> data) =>
Mutation$ChangeTimezone.fromJson(data);
typedef OnMutationCompleted$Mutation$ChangeTimezone = FutureOr<void> Function(
dynamic,
Map<String, dynamic>?,
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<Mutation$ChangeTimezone>? 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<TRes>
final TRes Function(Mutation$ChangeTimezone$changeTimezone) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? code = _undefined,
@ -4726,7 +4979,7 @@ class _CopyWithImpl$Variables$Mutation$ChangeAutoUpgradeSettings<TRes>
final TRes Function(Variables$Mutation$ChangeAutoUpgradeSettings) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({Object? settings = _undefined}) =>
_then(Variables$Mutation$ChangeAutoUpgradeSettings._({
@ -4748,7 +5001,7 @@ class _CopyWithStubImpl$Variables$Mutation$ChangeAutoUpgradeSettings<TRes>
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<TRes>
final TRes Function(Mutation$ChangeAutoUpgradeSettings) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? changeAutoUpgradeSettings = _undefined,
@ -4965,7 +5218,7 @@ Mutation$ChangeAutoUpgradeSettings _parserFn$Mutation$ChangeAutoUpgradeSettings(
Mutation$ChangeAutoUpgradeSettings.fromJson(data);
typedef OnMutationCompleted$Mutation$ChangeAutoUpgradeSettings = FutureOr<void>
Function(
dynamic,
Map<String, dynamic>?,
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<Mutation$ChangeAutoUpgradeSettings>? 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 = <dynamic, dynamic>{};
TRes call({
Object? code = _undefined,

View File

@ -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<TRes> {
@ -172,7 +343,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields<TRes>
final TRes Function(Fragment$basicMutationReturnFields) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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<TRes>
final TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn)
_then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? code = _undefined,
@ -1914,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<String, dynamic> json) {
@ -2007,7 +2178,7 @@ class _CopyWithImpl$Query$AllServices<TRes>
final TRes Function(Query$AllServices) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? services = _undefined,
@ -2226,6 +2397,10 @@ const documentNodeQueryAllServices = DocumentNode(definitions: [
]);
Query$AllServices _parserFn$Query$AllServices(Map<String, dynamic> data) =>
Query$AllServices.fromJson(data);
typedef OnQueryComplete$Query$AllServices = FutureOr<void> Function(
Map<String, dynamic>?,
Query$AllServices?,
);
class Options$Query$AllServices
extends graphql.QueryOptions<Query$AllServices> {
@ -2235,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<Object?> get properties => [
...super.onComplete == null
? super.properties
: super.properties.where((property) => property != onComplete),
onCompleteWithParsed,
];
}
class WatchOptions$Query$AllServices
@ -2258,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,
@ -2268,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,
@ -2318,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<String, dynamic> json) {
@ -2427,7 +2624,7 @@ class _CopyWithImpl$Query$AllServices$services<TRes>
final TRes Function(Query$AllServices$services) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? allServices = _undefined,
@ -2482,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(
@ -2740,7 +2937,7 @@ class _CopyWithImpl$Query$AllServices$services$allServices<TRes>
final TRes Function(Query$AllServices$services$allServices) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? description = _undefined,
@ -2844,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(
@ -2977,7 +3174,7 @@ class _CopyWithImpl$Query$AllServices$services$allServices$storageUsage<TRes>
final TRes Function(Query$AllServices$services$allServices$storageUsage)
_then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? title = _undefined,
@ -3036,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(
@ -3140,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 = <dynamic, dynamic>{};
TRes call({
Object? name = _undefined,
@ -3250,7 +3447,7 @@ class _CopyWithImpl$Variables$Mutation$EnableService<TRes>
final TRes Function(Variables$Mutation$EnableService) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({Object? serviceId = _undefined}) =>
_then(Variables$Mutation$EnableService._({
@ -3272,7 +3469,7 @@ class _CopyWithStubImpl$Variables$Mutation$EnableService<TRes>
class Mutation$EnableService {
Mutation$EnableService({
required this.enableService,
required this.$__typename,
this.$__typename = 'Mutation',
});
factory Mutation$EnableService.fromJson(Map<String, dynamic> json) {
@ -3366,7 +3563,7 @@ class _CopyWithImpl$Mutation$EnableService<TRes>
final TRes Function(Mutation$EnableService) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? enableService = _undefined,
@ -3458,7 +3655,7 @@ Mutation$EnableService _parserFn$Mutation$EnableService(
Map<String, dynamic> data) =>
Mutation$EnableService.fromJson(data);
typedef OnMutationCompleted$Mutation$EnableService = FutureOr<void> Function(
dynamic,
Map<String, dynamic>?,
Mutation$EnableService?,
);
@ -3471,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<Mutation$EnableService>? update,
@ -3482,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
@ -3518,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,
@ -3529,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,
@ -3555,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(
@ -3678,7 +3877,7 @@ class _CopyWithImpl$Mutation$EnableService$enableService<TRes>
final TRes Function(Mutation$EnableService$enableService) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? code = _undefined,
@ -3794,7 +3993,7 @@ class _CopyWithImpl$Variables$Mutation$DisableService<TRes>
final TRes Function(Variables$Mutation$DisableService) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({Object? serviceId = _undefined}) =>
_then(Variables$Mutation$DisableService._({
@ -3816,7 +4015,7 @@ class _CopyWithStubImpl$Variables$Mutation$DisableService<TRes>
class Mutation$DisableService {
Mutation$DisableService({
required this.disableService,
required this.$__typename,
this.$__typename = 'Mutation',
});
factory Mutation$DisableService.fromJson(Map<String, dynamic> json) {
@ -3910,7 +4109,7 @@ class _CopyWithImpl$Mutation$DisableService<TRes>
final TRes Function(Mutation$DisableService) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? disableService = _undefined,
@ -4002,7 +4201,7 @@ Mutation$DisableService _parserFn$Mutation$DisableService(
Map<String, dynamic> data) =>
Mutation$DisableService.fromJson(data);
typedef OnMutationCompleted$Mutation$DisableService = FutureOr<void> Function(
dynamic,
Map<String, dynamic>?,
Mutation$DisableService?,
);
@ -4015,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<Mutation$DisableService>? update,
@ -4026,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
@ -4062,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,
@ -4073,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,
@ -4099,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(
@ -4222,7 +4423,7 @@ class _CopyWithImpl$Mutation$DisableService$disableService<TRes>
final TRes Function(Mutation$DisableService$disableService) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? code = _undefined,
@ -4337,7 +4538,7 @@ class _CopyWithImpl$Variables$Mutation$StopService<TRes>
final TRes Function(Variables$Mutation$StopService) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({Object? serviceId = _undefined}) =>
_then(Variables$Mutation$StopService._({
@ -4359,7 +4560,7 @@ class _CopyWithStubImpl$Variables$Mutation$StopService<TRes>
class Mutation$StopService {
Mutation$StopService({
required this.stopService,
required this.$__typename,
this.$__typename = 'Mutation',
});
factory Mutation$StopService.fromJson(Map<String, dynamic> json) {
@ -4452,7 +4653,7 @@ class _CopyWithImpl$Mutation$StopService<TRes>
final TRes Function(Mutation$StopService) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? stopService = _undefined,
@ -4544,7 +4745,7 @@ Mutation$StopService _parserFn$Mutation$StopService(
Map<String, dynamic> data) =>
Mutation$StopService.fromJson(data);
typedef OnMutationCompleted$Mutation$StopService = FutureOr<void> Function(
dynamic,
Map<String, dynamic>?,
Mutation$StopService?,
);
@ -4557,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<Mutation$StopService>? update,
@ -4568,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
@ -4602,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,
@ -4613,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,
@ -4639,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<String, dynamic> json) {
@ -4760,7 +4963,7 @@ class _CopyWithImpl$Mutation$StopService$stopService<TRes>
final TRes Function(Mutation$StopService$stopService) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? code = _undefined,
@ -4875,7 +5078,7 @@ class _CopyWithImpl$Variables$Mutation$StartService<TRes>
final TRes Function(Variables$Mutation$StartService) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({Object? serviceId = _undefined}) =>
_then(Variables$Mutation$StartService._({
@ -4897,7 +5100,7 @@ class _CopyWithStubImpl$Variables$Mutation$StartService<TRes>
class Mutation$StartService {
Mutation$StartService({
required this.startService,
required this.$__typename,
this.$__typename = 'Mutation',
});
factory Mutation$StartService.fromJson(Map<String, dynamic> json) {
@ -4990,7 +5193,7 @@ class _CopyWithImpl$Mutation$StartService<TRes>
final TRes Function(Mutation$StartService) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? startService = _undefined,
@ -5082,7 +5285,7 @@ Mutation$StartService _parserFn$Mutation$StartService(
Map<String, dynamic> data) =>
Mutation$StartService.fromJson(data);
typedef OnMutationCompleted$Mutation$StartService = FutureOr<void> Function(
dynamic,
Map<String, dynamic>?,
Mutation$StartService?,
);
@ -5095,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<Mutation$StartService>? update,
@ -5106,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
@ -5140,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,
@ -5151,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,
@ -5177,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(
@ -5300,7 +5505,7 @@ class _CopyWithImpl$Mutation$StartService$startService<TRes>
final TRes Function(Mutation$StartService$startService) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? code = _undefined,
@ -5416,7 +5621,7 @@ class _CopyWithImpl$Variables$Mutation$RestartService<TRes>
final TRes Function(Variables$Mutation$RestartService) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({Object? serviceId = _undefined}) =>
_then(Variables$Mutation$RestartService._({
@ -5438,7 +5643,7 @@ class _CopyWithStubImpl$Variables$Mutation$RestartService<TRes>
class Mutation$RestartService {
Mutation$RestartService({
required this.restartService,
required this.$__typename,
this.$__typename = 'Mutation',
});
factory Mutation$RestartService.fromJson(Map<String, dynamic> json) {
@ -5532,7 +5737,7 @@ class _CopyWithImpl$Mutation$RestartService<TRes>
final TRes Function(Mutation$RestartService) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? restartService = _undefined,
@ -5624,7 +5829,7 @@ Mutation$RestartService _parserFn$Mutation$RestartService(
Map<String, dynamic> data) =>
Mutation$RestartService.fromJson(data);
typedef OnMutationCompleted$Mutation$RestartService = FutureOr<void> Function(
dynamic,
Map<String, dynamic>?,
Mutation$RestartService?,
);
@ -5637,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<Mutation$RestartService>? update,
@ -5648,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
@ -5684,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,
@ -5695,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,
@ -5721,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(
@ -5844,7 +6051,7 @@ class _CopyWithImpl$Mutation$RestartService$restartService<TRes>
final TRes Function(Mutation$RestartService$restartService) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? code = _undefined,
@ -5962,7 +6169,7 @@ class _CopyWithImpl$Variables$Mutation$MoveService<TRes>
final TRes Function(Variables$Mutation$MoveService) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({Object? input = _undefined}) =>
_then(Variables$Mutation$MoveService._({
@ -5984,7 +6191,7 @@ class _CopyWithStubImpl$Variables$Mutation$MoveService<TRes>
class Mutation$MoveService {
Mutation$MoveService({
required this.moveService,
required this.$__typename,
this.$__typename = 'Mutation',
});
factory Mutation$MoveService.fromJson(Map<String, dynamic> json) {
@ -6077,7 +6284,7 @@ class _CopyWithImpl$Mutation$MoveService<TRes>
final TRes Function(Mutation$MoveService) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? moveService = _undefined,
@ -6261,7 +6468,7 @@ Mutation$MoveService _parserFn$Mutation$MoveService(
Map<String, dynamic> data) =>
Mutation$MoveService.fromJson(data);
typedef OnMutationCompleted$Mutation$MoveService = FutureOr<void> Function(
dynamic,
Map<String, dynamic>?,
Mutation$MoveService?,
);
@ -6274,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<Mutation$MoveService>? update,
@ -6285,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
@ -6319,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,
@ -6330,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,
@ -6356,7 +6565,7 @@ class Mutation$MoveService$moveService
required this.code,
required this.message,
required this.success,
required this.$__typename,
this.$__typename = 'ServiceJobMutationReturn',
this.job,
});
@ -6496,7 +6705,7 @@ class _CopyWithImpl$Mutation$MoveService$moveService<TRes>
final TRes Function(Mutation$MoveService$moveService) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? code = _undefined,
@ -6561,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(
@ -6797,7 +7006,7 @@ class _CopyWithImpl$Mutation$MoveService$moveService$job<TRes>
final TRes Function(Mutation$MoveService$moveService$job) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? createdAt = _undefined,

View File

@ -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<TRes> {
@ -171,7 +342,7 @@ class _CopyWithImpl$Fragment$basicMutationReturnFields<TRes>
final TRes Function(Fragment$basicMutationReturnFields) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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 = <dynamic, dynamic>{};
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<TRes>
final TRes Function(Fragment$basicMutationReturnFields$$UserMutationReturn)
_then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
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<String, dynamic> json) {
@ -2041,7 +2212,7 @@ class _CopyWithImpl$Fragment$userFields<TRes>
final TRes Function(Fragment$userFields) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
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<String, dynamic> json) {
@ -2253,7 +2424,7 @@ class _CopyWithImpl$Query$AllUsers<TRes>
final TRes Function(Query$AllUsers) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? users = _undefined,
@ -2369,6 +2540,10 @@ const documentNodeQueryAllUsers = DocumentNode(definitions: [
]);
Query$AllUsers _parserFn$Query$AllUsers(Map<String, dynamic> data) =>
Query$AllUsers.fromJson(data);
typedef OnQueryComplete$Query$AllUsers = FutureOr<void> Function(
Map<String, dynamic>?,
Query$AllUsers?,
);
class Options$Query$AllUsers extends graphql.QueryOptions<Query$AllUsers> {
Options$Query$AllUsers({
@ -2377,19 +2552,40 @@ class Options$Query$AllUsers extends graphql.QueryOptions<Query$AllUsers> {
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<Object?> 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<String, dynamic> json) {
@ -2581,7 +2778,7 @@ class _CopyWithImpl$Query$AllUsers$users<TRes>
final TRes Function(Query$AllUsers$users) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? allUsers = _undefined,
@ -2712,7 +2909,7 @@ class _CopyWithImpl$Variables$Query$GetUser<TRes>
final TRes Function(Variables$Query$GetUser) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({Object? username = _undefined}) =>
_then(Variables$Query$GetUser._({
@ -2734,7 +2931,7 @@ class _CopyWithStubImpl$Variables$Query$GetUser<TRes>
class Query$GetUser {
Query$GetUser({
required this.users,
required this.$__typename,
this.$__typename = 'Query',
});
factory Query$GetUser.fromJson(Map<String, dynamic> json) {
@ -2825,7 +3022,7 @@ class _CopyWithImpl$Query$GetUser<TRes>
final TRes Function(Query$GetUser) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? users = _undefined,
@ -2929,6 +3126,10 @@ const documentNodeQueryGetUser = DocumentNode(definitions: [
]);
Query$GetUser _parserFn$Query$GetUser(Map<String, dynamic> data) =>
Query$GetUser.fromJson(data);
typedef OnQueryComplete$Query$GetUser = FutureOr<void> Function(
Map<String, dynamic>?,
Query$GetUser?,
);
class Options$Query$GetUser extends graphql.QueryOptions<Query$GetUser> {
Options$Query$GetUser({
@ -2938,20 +3139,41 @@ class Options$Query$GetUser extends graphql.QueryOptions<Query$GetUser> {
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<Object?> 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<String, dynamic> json) {
@ -3128,7 +3351,7 @@ class _CopyWithImpl$Query$GetUser$users<TRes>
final TRes Function(Query$GetUser$users) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? getUser = _undefined,
@ -3245,7 +3468,7 @@ class _CopyWithImpl$Variables$Mutation$CreateUser<TRes>
final TRes Function(Variables$Mutation$CreateUser) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({Object? user = _undefined}) =>
_then(Variables$Mutation$CreateUser._({
@ -3267,7 +3490,7 @@ class _CopyWithStubImpl$Variables$Mutation$CreateUser<TRes>
class Mutation$CreateUser {
Mutation$CreateUser({
required this.createUser,
required this.$__typename,
this.$__typename = 'Mutation',
});
factory Mutation$CreateUser.fromJson(Map<String, dynamic> json) {
@ -3360,7 +3583,7 @@ class _CopyWithImpl$Mutation$CreateUser<TRes>
final TRes Function(Mutation$CreateUser) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? createUser = _undefined,
@ -3471,7 +3694,7 @@ const documentNodeMutationCreateUser = DocumentNode(definitions: [
Mutation$CreateUser _parserFn$Mutation$CreateUser(Map<String, dynamic> data) =>
Mutation$CreateUser.fromJson(data);
typedef OnMutationCompleted$Mutation$CreateUser = FutureOr<void> Function(
dynamic,
Map<String, dynamic>?,
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<Mutation$CreateUser>? 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<TRes>
final TRes Function(Mutation$CreateUser$createUser) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? code = _undefined,
@ -3833,7 +4058,7 @@ class _CopyWithImpl$Variables$Mutation$DeleteUser<TRes>
final TRes Function(Variables$Mutation$DeleteUser) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({Object? username = _undefined}) =>
_then(Variables$Mutation$DeleteUser._({
@ -3855,7 +4080,7 @@ class _CopyWithStubImpl$Variables$Mutation$DeleteUser<TRes>
class Mutation$DeleteUser {
Mutation$DeleteUser({
required this.deleteUser,
required this.$__typename,
this.$__typename = 'Mutation',
});
factory Mutation$DeleteUser.fromJson(Map<String, dynamic> json) {
@ -3948,7 +4173,7 @@ class _CopyWithImpl$Mutation$DeleteUser<TRes>
final TRes Function(Mutation$DeleteUser) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? deleteUser = _undefined,
@ -4039,7 +4264,7 @@ const documentNodeMutationDeleteUser = DocumentNode(definitions: [
Mutation$DeleteUser _parserFn$Mutation$DeleteUser(Map<String, dynamic> data) =>
Mutation$DeleteUser.fromJson(data);
typedef OnMutationCompleted$Mutation$DeleteUser = FutureOr<void> Function(
dynamic,
Map<String, dynamic>?,
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<Mutation$DeleteUser>? 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<String, dynamic> json) {
@ -4255,7 +4482,7 @@ class _CopyWithImpl$Mutation$DeleteUser$deleteUser<TRes>
final TRes Function(Mutation$DeleteUser$deleteUser) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? code = _undefined,
@ -4373,7 +4600,7 @@ class _CopyWithImpl$Variables$Mutation$UpdateUser<TRes>
final TRes Function(Variables$Mutation$UpdateUser) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({Object? user = _undefined}) =>
_then(Variables$Mutation$UpdateUser._({
@ -4395,7 +4622,7 @@ class _CopyWithStubImpl$Variables$Mutation$UpdateUser<TRes>
class Mutation$UpdateUser {
Mutation$UpdateUser({
required this.updateUser,
required this.$__typename,
this.$__typename = 'Mutation',
});
factory Mutation$UpdateUser.fromJson(Map<String, dynamic> json) {
@ -4488,7 +4715,7 @@ class _CopyWithImpl$Mutation$UpdateUser<TRes>
final TRes Function(Mutation$UpdateUser) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? updateUser = _undefined,
@ -4599,7 +4826,7 @@ const documentNodeMutationUpdateUser = DocumentNode(definitions: [
Mutation$UpdateUser _parserFn$Mutation$UpdateUser(Map<String, dynamic> data) =>
Mutation$UpdateUser.fromJson(data);
typedef OnMutationCompleted$Mutation$UpdateUser = FutureOr<void> Function(
dynamic,
Map<String, dynamic>?,
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<Mutation$UpdateUser>? 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<TRes>
final TRes Function(Mutation$UpdateUser$updateUser) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? code = _undefined,
@ -4964,7 +5193,7 @@ class _CopyWithImpl$Variables$Mutation$AddSshKey<TRes>
final TRes Function(Variables$Mutation$AddSshKey) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({Object? sshInput = _undefined}) =>
_then(Variables$Mutation$AddSshKey._({
@ -4986,7 +5215,7 @@ class _CopyWithStubImpl$Variables$Mutation$AddSshKey<TRes>
class Mutation$AddSshKey {
Mutation$AddSshKey({
required this.addSshKey,
required this.$__typename,
this.$__typename = 'Mutation',
});
factory Mutation$AddSshKey.fromJson(Map<String, dynamic> json) {
@ -5079,7 +5308,7 @@ class _CopyWithImpl$Mutation$AddSshKey<TRes>
final TRes Function(Mutation$AddSshKey) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? addSshKey = _undefined,
@ -5190,7 +5419,7 @@ const documentNodeMutationAddSshKey = DocumentNode(definitions: [
Mutation$AddSshKey _parserFn$Mutation$AddSshKey(Map<String, dynamic> data) =>
Mutation$AddSshKey.fromJson(data);
typedef OnMutationCompleted$Mutation$AddSshKey = FutureOr<void> Function(
dynamic,
Map<String, dynamic>?,
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<Mutation$AddSshKey>? 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<TRes>
final TRes Function(Mutation$AddSshKey$addSshKey) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? code = _undefined,
@ -5555,7 +5786,7 @@ class _CopyWithImpl$Variables$Mutation$RemoveSshKey<TRes>
final TRes Function(Variables$Mutation$RemoveSshKey) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({Object? sshInput = _undefined}) =>
_then(Variables$Mutation$RemoveSshKey._({
@ -5577,7 +5808,7 @@ class _CopyWithStubImpl$Variables$Mutation$RemoveSshKey<TRes>
class Mutation$RemoveSshKey {
Mutation$RemoveSshKey({
required this.removeSshKey,
required this.$__typename,
this.$__typename = 'Mutation',
});
factory Mutation$RemoveSshKey.fromJson(Map<String, dynamic> json) {
@ -5670,7 +5901,7 @@ class _CopyWithImpl$Mutation$RemoveSshKey<TRes>
final TRes Function(Mutation$RemoveSshKey) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? removeSshKey = _undefined,
@ -5782,7 +6013,7 @@ Mutation$RemoveSshKey _parserFn$Mutation$RemoveSshKey(
Map<String, dynamic> data) =>
Mutation$RemoveSshKey.fromJson(data);
typedef OnMutationCompleted$Mutation$RemoveSshKey = FutureOr<void> Function(
dynamic,
Map<String, dynamic>?,
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<Mutation$RemoveSshKey>? 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<TRes>
final TRes Function(Mutation$RemoveSshKey$removeSshKey) _then;
static const _undefined = {};
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? code = _undefined,

View File

@ -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<DnsProvider> getDnsProviderType() async {
QueryResult<Query$SystemDnsProvider> 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<bool> isUsingBinds() async {
QueryResult response;
bool usesBinds = false;

View File

@ -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:

View File

@ -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) =>

View File

@ -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({
@ -27,7 +28,7 @@ class CloudflareApi extends DnsProviderApi {
BaseOptions get options {
final BaseOptions options = BaseOptions(baseUrl: rootAddress);
if (isWithToken) {
final String? token = getIt<ApiConfigModel>().cloudFlareKey;
final String? token = getIt<ApiConfigModel>().dnsProviderKey;
assert(token != null);
options.headers = {'Authorization': 'Bearer $token'};
}
@ -317,4 +318,147 @@ class CloudflareApi extends DnsProviderApi {
return domains;
}
@override
Future<APIGenericResult<List<DesiredDnsRecord>>> validateDnsRecords(
final ServerDomain domain,
final String ip4,
final String dkimPublicKey,
) async {
final List<DnsRecord> records = await getDnsRecords(domain: domain);
final List<DesiredDnsRecord> foundRecords = [];
try {
final List<DesiredDnsRecord> 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<DesiredDnsRecord> 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,
),
];
}
}

View File

@ -0,0 +1,476 @@
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';
import 'package:selfprivacy/utils/network_utils.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<ApiConfigModel>().dnsProviderKey;
assert(token != null);
options.headers = {'Authorization': 'Token $token'};
}
if (customToken != null) {
options.headers = {'Authorization': 'Token $customToken'};
}
if (validateStatus != null) {
options.validateStatus = validateStatus!;
}
return options;
}
@override
String rootAddress = 'https://desec.io/api/v1/domains/';
@override
Future<APIGenericResult<bool>> 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'},
),
);
await Future.delayed(const Duration(seconds: 1));
} 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<String?> getZoneId(final String domain) async => domain;
@override
Future<APIGenericResult<void>> removeSimilarRecords({
required final ServerDomain domain,
final String? ip4,
}) async {
final String domainName = domain.domainName;
final String url = '/$domainName/rrsets/';
final List<DnsRecord> listDnsRecords = projectDnsRecords(domainName, ip4);
final Dio client = await getClient();
try {
final List<dynamic> 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 Future.delayed(const Duration(seconds: 1));
} catch (e) {
print(e);
return APIGenericResult(
success: false,
data: null,
message: e.toString(),
);
} finally {
close(client);
}
return APIGenericResult(success: true, data: null);
}
@override
Future<List<DnsRecord>> getDnsRecords({
required final ServerDomain domain,
}) async {
Response response;
final String domainName = domain.domainName;
final List<DnsRecord> allRecords = <DnsRecord>[];
final String url = '/$domainName/rrsets/';
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<dynamic>)
? record['records'][0]
: record['records'];
allRecords.add(
DnsRecord(
name: record['subname'],
type: record['type'],
content: content,
ttl: record['ttl'],
),
);
}
} catch (e) {
print(e);
} finally {
close(client);
}
return allRecords;
}
@override
Future<APIGenericResult<void>> createMultipleDnsRecords({
required final ServerDomain domain,
final String? ip4,
}) async {
final String domainName = domain.domainName;
final List<DnsRecord> listDnsRecords = projectDnsRecords(domainName, ip4);
final Dio client = await getClient();
try {
final List<dynamic> 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 Future.delayed(const Duration(seconds: 1));
} 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<DnsRecord> 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 <DnsRecord>[
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('"')) {
content = '"$content"';
}
return content;
}
@override
Future<void> 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<List<String>> domainList() async {
List<String> domains = [];
final Dio client = await getClient();
try {
final Response response = await client.get(
'',
);
await Future.delayed(const Duration(seconds: 1));
domains = response.data
.map<String>((final el) => el['name'] as String)
.toList();
} catch (e) {
print(e);
} finally {
close(client);
}
return domains;
}
@override
Future<APIGenericResult<List<DesiredDnsRecord>>> validateDnsRecords(
final ServerDomain domain,
final String ip4,
final String dkimPublicKey,
) async {
final List<DnsRecord> records = await getDnsRecords(domain: domain);
final List<DesiredDnsRecord> foundRecords = [];
try {
final List<DesiredDnsRecord> 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 APIGenericResult(
data: [],
success: false,
message: e.toString(),
);
}
return APIGenericResult(
data: foundRecords,
success: true,
);
}
@override
List<DesiredDnsRecord> 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,
),
];
}
}

View File

@ -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,
);
}

View File

@ -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<APIGenericResult<List<DesiredDnsRecord>>> validateDnsRecords(
final ServerDomain domain,
final String ip4,
final String dkimPublicKey,
);
List<DesiredDnsRecord> getDesiredDnsRecords(
final String? domainName,
final String? ip4,
final String? dkimPublicKey,
);
Future<String?> getZoneId(final String domain);
Future<List<String>> domainList();
Future<APIGenericResult<bool>> isApiTokenValid(final String token);
RegExp getApiTokenValidation();
}

View File

@ -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;

View File

@ -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<ServerVolume?> 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;

View File

@ -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<APIGenericResult<void>> 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;

View File

@ -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;
}

View File

@ -25,11 +25,14 @@ class DnsRecordsCubit
emit(
DnsRecordsState(
dnsState: DnsRecordsStatus.refreshing,
dnsRecords: getDesiredDnsRecords(
serverInstallationCubit.state.serverDomain?.domainName,
'',
'',
),
dnsRecords: ApiController.currentDnsProviderApiFactory
?.getDnsProvider()
.getDesiredDnsRecords(
serverInstallationCubit.state.serverDomain?.domainName,
'',
'',
) ??
[],
),
);
@ -37,64 +40,32 @@ class DnsRecordsCubit
final ServerDomain? domain = serverInstallationCubit.state.serverDomain;
final String? ipAddress =
serverInstallationCubit.state.serverDetails?.ip4;
if (domain != null && ipAddress != null) {
final List<DnsRecord> records = await ApiController
.currentDnsProviderApiFactory!
.getDnsProvider()
.getDnsRecords(domain: domain);
final String? dkimPublicKey =
extractDkimRecord(await api.getDnsRecords())?.content;
final List<DesiredDnsRecord> desiredRecords =
getDesiredDnsRecords(domain.domainName, ipAddress, dkimPublicKey);
final List<DesiredDnsRecord> 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,
),
);
}
}

View File

@ -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<void> onSubmit() async {
initializingCubit.setCloudflareKey(apiKey.state.value);
initializingCubit.setDnsApiToken(apiKey.state.value);
}
final ServerInstallationCubit initializingCubit;

View File

@ -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';
@ -66,6 +67,15 @@ class ServerInstallationCubit extends Cubit<ServerInstallationState> {
);
}
void setDnsProviderType(final DnsProvider providerType) async {
await repository.saveDnsProviderType(providerType);
ApiController.initDnsProviderApiFactory(
DnsProviderApiFactorySettings(
provider: providerType,
),
);
}
ProviderApiTokenValidation serverProviderApiTokenValidation() =>
ApiController.currentServerProviderApiFactory!
.getServerProvider()
@ -101,16 +111,6 @@ class ServerInstallationCubit extends Cubit<ServerInstallationState> {
Future<bool?> 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<bool> apiResponse =
await ApiController.currentDnsProviderApiFactory!
.getDnsProvider(
@ -214,16 +214,16 @@ class ServerInstallationCubit extends Cubit<ServerInstallationState> {
);
}
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),
);
}
@ -284,7 +284,7 @@ class ServerInstallationCubit extends Cubit<ServerInstallationState> {
await repository.createServer(
state.rootUser!,
state.serverDomain!.domainName,
state.cloudFlareKey!,
state.dnsApiToken!,
state.backblazeCredential!,
onCancel: onCancel,
onSuccess: onSuccess,
@ -437,6 +437,7 @@ class ServerInstallationCubit extends Cubit<ServerInstallationState> {
emit(TimerState(dataState: dataState, isLoading: true));
final bool isServerWorking = await repository.isHttpServerWorking();
StagingOptions.verifyCertificate = true;
if (isServerWorking) {
bool dkimCreated = true;
@ -542,13 +543,20 @@ class ServerInstallationCubit extends Cubit<ServerInstallationState> {
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<NavigationService>()
.showSnackBar('recovering.generic_error'.tr());
return;
}
await repository.saveServerDetails(serverDetails);
await repository.saveDnsProviderType(dnsProvider);
setServerProviderType(provider);
setDnsProviderType(dnsProvider);
emit(
dataState.copyWith(
serverDetails: serverDetails,
@ -586,7 +594,7 @@ class ServerInstallationCubit extends Cubit<ServerInstallationState> {
),
);
break;
case RecoveryStep.cloudflareToken:
case RecoveryStep.dnsProviderToken:
repository.deleteServerDetails();
emit(
dataState.copyWith(
@ -682,12 +690,12 @@ class ServerInstallationCubit extends Cubit<ServerInstallationState> {
emit(
dataState.copyWith(
serverDetails: serverDetails,
currentStep: RecoveryStep.cloudflareToken,
currentStep: RecoveryStep.dnsProviderToken,
),
);
}
Future<void> setAndValidateCloudflareToken(final String token) async {
Future<void> setAndValidateDnsApiToken(final String token) async {
final ServerInstallationRecovery dataState =
state as ServerInstallationRecovery;
final ServerDomain? serverDomain = dataState.serverDomain;
@ -701,14 +709,18 @@ class ServerInstallationCubit extends Cubit<ServerInstallationState> {
.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: DnsProvider.cloudflare,
provider: dnsProviderType,
),
);
await repository.saveCloudFlareKey(token);
await repository.saveDnsProviderKey(token);
emit(
dataState.copyWith(
serverDomain: ServerDomain(
@ -716,7 +728,7 @@ class ServerInstallationCubit extends Cubit<ServerInstallationState> {
zoneId: zoneId,
provider: DnsProvider.cloudflare,
),
cloudFlareKey: token,
dnsApiToken: token,
currentStep: RecoveryStep.backblazeToken,
),
);
@ -748,6 +760,7 @@ class ServerInstallationCubit extends Cubit<ServerInstallationState> {
void clearAppConfig() {
closeTimer();
ApiController.clearProviderApiFactories();
StagingOptions.verifyCertificate = false;
repository.clearAppConfig();
emit(const ServerInstallationEmpty());
}
@ -767,7 +780,7 @@ class ServerInstallationCubit extends Cubit<ServerInstallationState> {
ServerInstallationNotFinished(
providerApiToken: state.providerApiToken,
serverDomain: state.serverDomain,
cloudFlareKey: state.cloudFlareKey,
dnsApiToken: state.dnsApiToken,
backblazeCredential: state.backblazeCredential,
rootUser: state.rootUser,
serverDetails: null,

View File

@ -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';
@ -45,7 +46,7 @@ class ServerInstallationRepository {
Future<ServerInstallationState> load() async {
final String? providerApiToken = getIt<ApiConfigModel>().serverProviderKey;
final String? location = getIt<ApiConfigModel>().serverLocation;
final String? cloudflareToken = getIt<ApiConfigModel>().cloudFlareKey;
final String? dnsApiToken = getIt<ApiConfigModel>().dnsProviderKey;
final String? serverTypeIdentificator = getIt<ApiConfigModel>().serverType;
final ServerDomain? serverDomain = getIt<ApiConfigModel>().serverDomain;
final ServerProvider? serverProvider =
@ -54,6 +55,7 @@ class ServerInstallationRepository {
getIt<ApiConfigModel>().backblazeCredential;
final ServerHostingDetails? serverDetails =
getIt<ApiConfigModel>().serverDetails;
final DnsProvider? dnsProvider = getIt<ApiConfigModel>().dnsProvider;
if (serverProvider != null ||
(serverDetails != null &&
@ -75,18 +77,24 @@ class ServerInstallationRepository {
);
}
// No other DNS provider is supported for now, so it's fine.
ApiController.initDnsProviderApiFactory(
DnsProviderApiFactorySettings(
provider: DnsProvider.cloudflare,
),
);
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 ?? '',
cloudFlareKey: cloudflareToken!,
dnsApiToken: dnsApiToken!,
serverDomain: serverDomain!,
backblazeCredential: backblazeCredential!,
serverDetails: serverDetails!,
@ -103,14 +111,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 +128,7 @@ class ServerInstallationRepository {
return ServerInstallationNotFinished(
providerApiToken: providerApiToken,
cloudFlareKey: cloudflareToken,
dnsApiToken: dnsApiToken,
serverDomain: serverDomain,
backblazeCredential: backblazeCredential,
serverDetails: serverDetails,
@ -147,7 +155,7 @@ class ServerInstallationRepository {
if (serverDomain.provider != DnsProvider.unknown) {
return RecoveryStep.backblazeToken;
}
return RecoveryStep.cloudflareToken;
return RecoveryStep.dnsProviderToken;
}
return RecoveryStep.serverSelection;
}
@ -182,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<bool> apiResponse =
await dnsProviderApi.isApiTokenValid(token);
String? domainId;
if (apiResponse.success && apiResponse.data) {
domainId = await dnsProviderApi.getZoneId(domain);
}
return domainId;
}
@ -238,7 +255,7 @@ class ServerInstallationRepository {
Future<void> createServer(
final User rootUser,
final String domainName,
final String cloudFlareKey,
final String dnsApiToken,
final BackblazeCredential backblazeCredential, {
required final void Function() onCancel,
required final Future<void> Function(ServerHostingDetails serverDetails)
@ -256,7 +273,8 @@ class ServerInstallationRepository {
ServerHostingDetails? serverDetails;
try {
final APIGenericResult createResult = await api.createServer(
dnsApiToken: cloudFlareKey,
dnsProvider: getIt<ApiConfigModel>().dnsProvider!,
dnsApiToken: dnsApiToken,
rootUser: rootUser,
domainName: domainName,
serverType: getIt<ApiConfigModel>().serverType!,
@ -280,7 +298,8 @@ class ServerInstallationRepository {
try {
final APIGenericResult<ServerHostingDetails?> createServerResult =
await api.createServer(
dnsApiToken: cloudFlareKey,
dnsProvider: getIt<ApiConfigModel>().dnsProvider!,
dnsApiToken: dnsApiToken,
rootUser: rootUser,
domainName: domainName,
serverType: getIt<ApiConfigModel>().serverType!,
@ -304,7 +323,8 @@ class ServerInstallationRepository {
ServerHostingDetails? serverDetails;
try {
final APIGenericResult createResult = await api.createServer(
dnsApiToken: cloudFlareKey,
dnsProvider: getIt<ApiConfigModel>().dnsProvider!,
dnsApiToken: dnsApiToken,
rootUser: rootUser,
domainName: domainName,
serverType: getIt<ApiConfigModel>().serverType!,
@ -706,6 +726,10 @@ class ServerInstallationRepository {
getIt<ApiConfigModel>().init();
}
Future<void> saveDnsProviderType(final DnsProvider type) async {
await getIt<ApiConfigModel>().storeDnsProviderType(type);
}
Future<void> saveBackblazeKey(
final BackblazeCredential backblazeCredential,
) async {
@ -717,11 +741,11 @@ class ServerInstallationRepository {
getIt<ApiConfigModel>().init();
}
Future<void> saveCloudFlareKey(final String key) async {
await getIt<ApiConfigModel>().storeCloudFlareKey(key);
Future<void> saveDnsProviderKey(final String key) async {
await getIt<ApiConfigModel>().storeDnsProviderKey(key);
}
Future<void> deleteCloudFlareKey() async {
Future<void> deleteDnsProviderKey() async {
await box.delete(BNames.cloudFlareKey);
getIt<ApiConfigModel>().init();
}

View File

@ -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<Object?> 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<Object?> 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<Object?> 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<Object?> 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!,

View File

@ -12,17 +12,20 @@ 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;
BackblazeCredential? get backblazeCredential => _backblazeCredential;
ServerDomain? get serverDomain => _serverDomain;
BackblazeBucket? get backblazeBucket => _backblazeBucket;
String? _serverProviderKey;
String? _serverLocation;
String? _cloudFlareKey;
String? _dnsProviderKey;
String? _serverType;
ServerProvider? _serverProvider;
DnsProvider? _dnsProvider;
ServerHostingDetails? _serverDetails;
BackblazeCredential? _backblazeCredential;
ServerDomain? _serverDomain;
@ -33,14 +36,19 @@ class ApiConfigModel {
_serverProvider = value;
}
Future<void> storeDnsProviderType(final DnsProvider value) async {
await _box.put(BNames.dnsProvider, value);
_dnsProvider = value;
}
Future<void> storeServerProviderKey(final String value) async {
await _box.put(BNames.hetznerKey, value);
_serverProviderKey = value;
}
Future<void> storeCloudFlareKey(final String value) async {
Future<void> storeDnsProviderKey(final String value) async {
await _box.put(BNames.cloudFlareKey, value);
_cloudFlareKey = value;
_dnsProviderKey = value;
}
Future<void> storeServerTypeIdentifier(final String typeIdentifier) async {
@ -75,8 +83,9 @@ class ApiConfigModel {
void clear() {
_serverProviderKey = null;
_dnsProvider = null;
_serverLocation = null;
_cloudFlareKey = null;
_dnsProviderKey = null;
_backblazeCredential = null;
_serverDomain = null;
_serverDetails = null;
@ -88,12 +97,13 @@ 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);
_backblazeBucket = _box.get(BNames.backblazeBucket);
_serverType = _box.get(BNames.serverTypeIdentifier);
_serverProvider = _box.get(BNames.serverProvider);
_dnsProvider = _box.get(BNames.dnsProvider);
}
}

View File

@ -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';
@ -29,4 +30,17 @@ enum DnsProvider {
unknown,
@HiveField(1)
cloudflare,
@HiveField(2)
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;
}
}
}

View File

@ -58,6 +58,8 @@ class DnsProviderAdapter extends TypeAdapter<DnsProvider> {
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<DnsProvider> {
case DnsProvider.cloudflare:
writer.writeByte(1);
break;
case DnsProvider.desec:
writer.writeByte(2);
break;
}
}

View File

@ -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();

View File

@ -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 ?? ''),
),
);

View File

@ -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 ?? '',

View File

@ -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()),

View File

@ -0,0 +1,277 @@
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/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/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<DnsProviderPicker> createState() => _DnsProviderPickerState();
}
class _DnsProviderPickerState extends State<DnsProviderPicker> {
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.svg',
width: 150,
),
),
);
case DnsProvider.desec:
return ProviderInputDataPage(
providerCubit: widget.formCubit,
providerInfo: ProviderPageInfo(
providerType: DnsProvider.desec,
pathToHow: 'how_desec',
image: Image.asset(
'assets/images/logos/desec.svg',
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.cloudflare_api_token'.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: () {
context.read<SupportSystemCubit>().showArticle(
article: providerInfo.pathToHow,
context: context,
);
},
),
],
);
}
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, 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),
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(),
),
],
),
),
),
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(),
),
],
),
),
),
],
),
);
}

View File

@ -11,12 +11,13 @@ 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/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';
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),
@ -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();
},
),
],
),
@ -238,56 +235,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<DnsProviderFormCubit>().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<DnsProviderFormCubit>().trySubmit(),
text: 'basis.connect'.tr(),
),
const SizedBox(height: 10),
BrandOutlinedButton(
onPressed: () {
context.read<SupportSystemCubit>().showArticle(
article: 'how_cloudflare',
context: context,
);
Scaffold.of(context).openEndDrawer();
},
title: 'initializing.how'.tr(),
),
],
),
),
builder: (final context) {
final providerCubit = context.watch<DnsProviderFormCubit>();
return DnsProviderPicker(
formCubit: providerCubit,
serverInstallationCubit: initializingCubit,
);
},
),
);

View File

@ -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) {

View File

@ -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();

View File

@ -45,9 +45,7 @@ class RecoveryServerProviderConnected extends StatelessWidget {
),
const SizedBox(height: 16),
BrandButton.filled(
onPressed: formCubitState.isSubmitting
? null
: () => context.read<ProviderFormCubit>().trySubmit(),
onPressed: () => context.read<ProviderFormCubit>().trySubmit(),
child: Text('basis.continue'.tr()),
),
const SizedBox(height: 16),

View File

@ -46,7 +46,8 @@ Widget fadeThroughTransition(
replaceInRouteName: 'Page|Screen|Routing,Route',
)
class RootRouter extends _$RootRouter {
RootRouter(GlobalKey<NavigatorState> super.navigatorKey);
RootRouter(final GlobalKey<NavigatorState> navigatorKey)
: super(navigatorKey: navigatorKey);
@override
RouteType get defaultRouteType => const RouteType.material();

View File

@ -10,16 +10,11 @@
part of 'router.dart';
abstract class _$RootRouter extends RootStackRouter {
_$RootRouter([GlobalKey<NavigatorState>? navigatorKey]) : super(navigatorKey);
// ignore: unused_element
_$RootRouter({super.navigatorKey});
@override
final Map<String, PageFactory> pagesMap = {
AboutApplicationRoute.name: (routeData) {
return AutoRoutePage<dynamic>(
routeData: routeData,
child: const AboutApplicationPage(),
);
},
AppSettingsRoute.name: (routeData) {
return AutoRoutePage<dynamic>(
routeData: routeData,
@ -44,6 +39,12 @@ abstract class _$RootRouter extends RootStackRouter {
child: const MorePage(),
);
},
AboutApplicationRoute.name: (routeData) {
return AutoRoutePage<dynamic>(
routeData: routeData,
child: const AboutApplicationPage(),
);
},
OnboardingRoute.name: (routeData) {
return AutoRoutePage<dynamic>(
routeData: routeData,
@ -178,20 +179,6 @@ abstract class _$RootRouter extends RootStackRouter {
};
}
/// generated route for
/// [AboutApplicationPage]
class AboutApplicationRoute extends PageRouteInfo<void> {
const AboutApplicationRoute({List<PageRouteInfo>? children})
: super(
AboutApplicationRoute.name,
initialChildren: children,
);
static const String name = 'AboutApplicationRoute';
static const PageInfo<void> page = PageInfo<void>(name);
}
/// generated route for
/// [AppSettingsPage]
class AppSettingsRoute extends PageRouteInfo<void> {
@ -248,6 +235,20 @@ class MoreRoute extends PageRouteInfo<void> {
static const PageInfo<void> page = PageInfo<void>(name);
}
/// generated route for
/// [AboutApplicationPage]
class AboutApplicationRoute extends PageRouteInfo<void> {
const AboutApplicationRoute({List<PageRouteInfo>? children})
: super(
AboutApplicationRoute.name,
initialChildren: children,
);
static const String name = 'AboutApplicationRoute';
static const PageInfo<void> page = PageInfo<void>(name);
}
/// generated route for
/// [OnboardingPage]
class OnboardingRoute extends PageRouteInfo<void> {

View File

@ -41,87 +41,6 @@ class DesiredDnsRecord {
);
}
List<DesiredDnsRecord> 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<DnsRecord> records) {
DnsRecord? dkimRecord;

View File

@ -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"))
}

View File

@ -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"

View File

@ -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: