Merge pull request 'fix(graphql): Remove and replace deprecated mutations' (#423) from actualizing-graphql into master
continuous-integration/drone/push Build is passing Details

Reviewed-on: #423
Reviewed-by: Inex Code <inex.code@selfprivacy.org>
pull/422/head
NaiJi ✨ 2024-01-15 19:08:28 +02:00
commit 9e095a6808
16 changed files with 6748 additions and 2069 deletions

View File

@ -26,28 +26,36 @@ query GetServerDiskVolumes {
} }
mutation MountVolume($name: String!) { mutation MountVolume($name: String!) {
mountVolume(name: $name) { storage {
...basicMutationReturnFields mountVolume(name: $name) {
...basicMutationReturnFields
}
} }
} }
mutation ResizeVolume($name: String!) { mutation ResizeVolume($name: String!) {
resizeVolume(name: $name) { storage {
...basicMutationReturnFields resizeVolume(name: $name) {
...basicMutationReturnFields
}
} }
} }
mutation UnmountVolume($name: String!) { mutation UnmountVolume($name: String!) {
unmountVolume(name: $name) { storage {
...basicMutationReturnFields unmountVolume(name: $name) {
...basicMutationReturnFields
}
} }
} }
mutation MigrateToBinds($input: MigrateToBindsInput!) { mutation MigrateToBinds($input: MigrateToBindsInput!) {
migrateToBinds(input: $input) { storage {
...basicMutationReturnFields migrateToBinds(input: $input) {
job { ...basicMutationReturnFields
...basicApiJobsFields job {
...basicApiJobsFields
}
} }
} }
} }

View File

@ -34,38 +34,50 @@ query GetApiJobs {
} }
mutation RemoveJob($jobId: String!) { mutation RemoveJob($jobId: String!) {
removeJob(jobId: $jobId) { jobs {
...basicMutationReturnFields removeJob(jobId: $jobId) {
...basicMutationReturnFields
}
} }
} }
mutation RunSystemRebuild { mutation RunSystemRebuild {
runSystemRebuild { system {
...basicMutationReturnFields runSystemRebuild {
...basicMutationReturnFields
}
} }
} }
mutation RunSystemRollback { mutation RunSystemRollback {
runSystemRollback { system {
...basicMutationReturnFields runSystemRollback {
...basicMutationReturnFields
}
} }
} }
mutation RunSystemUpgrade { mutation RunSystemUpgrade {
runSystemUpgrade { system {
...basicMutationReturnFields runSystemUpgrade {
...basicMutationReturnFields
}
} }
} }
mutation PullRepositoryChanges { mutation PullRepositoryChanges {
pullRepositoryChanges { system {
...basicMutationReturnFields pullRepositoryChanges {
...basicMutationReturnFields
}
} }
} }
mutation RebootSystem { mutation RebootSystem {
rebootSystem { system {
...basicMutationReturnFields rebootSystem {
...basicMutationReturnFields
}
} }
} }
@ -108,48 +120,62 @@ query RecoveryKey {
} }
mutation GetNewRecoveryApiKey($limits: RecoveryKeyLimitsInput) { mutation GetNewRecoveryApiKey($limits: RecoveryKeyLimitsInput) {
getNewRecoveryApiKey(limits: $limits) { api {
...basicMutationReturnFields getNewRecoveryApiKey(limits: $limits) {
key ...basicMutationReturnFields
key
}
} }
} }
mutation UseRecoveryApiKey($input: UseRecoveryKeyInput!) { mutation UseRecoveryApiKey($input: UseRecoveryKeyInput!) {
useRecoveryApiKey(input: $input) { api {
...basicMutationReturnFields useRecoveryApiKey(input: $input) {
token ...basicMutationReturnFields
token
}
} }
} }
mutation RefreshDeviceApiToken { mutation RefreshDeviceApiToken {
refreshDeviceApiToken { api {
...basicMutationReturnFields refreshDeviceApiToken {
token ...basicMutationReturnFields
token
}
} }
} }
mutation DeleteDeviceApiToken($device: String!) { mutation DeleteDeviceApiToken($device: String!) {
deleteDeviceApiToken(device: $device) { api {
...basicMutationReturnFields deleteDeviceApiToken(device: $device) {
...basicMutationReturnFields
}
} }
} }
mutation GetNewDeviceApiKey { mutation GetNewDeviceApiKey {
getNewDeviceApiKey { api {
...basicMutationReturnFields getNewDeviceApiKey {
key ...basicMutationReturnFields
key
}
} }
} }
mutation InvalidateNewDeviceApiKey { mutation InvalidateNewDeviceApiKey {
invalidateNewDeviceApiKey { api {
...basicMutationReturnFields invalidateNewDeviceApiKey {
...basicMutationReturnFields
}
} }
} }
mutation AuthorizeWithNewDeviceApiKey($input: UseNewDeviceKeyInput!) { mutation AuthorizeWithNewDeviceApiKey($input: UseNewDeviceKeyInput!) {
authorizeWithNewDeviceApiKey(input: $input) { api {
...basicMutationReturnFields authorizeWithNewDeviceApiKey(input: $input) {
token ...basicMutationReturnFields
token
}
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -45,16 +45,20 @@ query GetDnsRecords {
} }
mutation ChangeTimezone($timezone: String!) { mutation ChangeTimezone($timezone: String!) {
changeTimezone(timezone: $timezone) { system {
...basicMutationReturnFields changeTimezone(timezone: $timezone) {
timezone ...basicMutationReturnFields
timezone
}
} }
} }
mutation ChangeAutoUpgradeSettings($settings: AutoUpgradeSettingsInput!) { mutation ChangeAutoUpgradeSettings($settings: AutoUpgradeSettingsInput!) {
changeAutoUpgradeSettings(settings: $settings) { system {
...basicMutationReturnFields changeAutoUpgradeSettings(settings: $settings) {
allowReboot ...basicMutationReturnFields
enableAutoUpgrade allowReboot
enableAutoUpgrade
}
} }
} }

View File

@ -2692,29 +2692,28 @@ class _CopyWithStubImpl$Variables$Mutation$ChangeTimezone<TRes>
class Mutation$ChangeTimezone { class Mutation$ChangeTimezone {
Mutation$ChangeTimezone({ Mutation$ChangeTimezone({
required this.changeTimezone, required this.system,
this.$__typename = 'Mutation', this.$__typename = 'Mutation',
}); });
factory Mutation$ChangeTimezone.fromJson(Map<String, dynamic> json) { factory Mutation$ChangeTimezone.fromJson(Map<String, dynamic> json) {
final l$changeTimezone = json['changeTimezone']; final l$system = json['system'];
final l$$__typename = json['__typename']; final l$$__typename = json['__typename'];
return Mutation$ChangeTimezone( return Mutation$ChangeTimezone(
changeTimezone: Mutation$ChangeTimezone$changeTimezone.fromJson( system: Mutation$ChangeTimezone$system.fromJson(
(l$changeTimezone as Map<String, dynamic>)), (l$system as Map<String, dynamic>)),
$__typename: (l$$__typename as String), $__typename: (l$$__typename as String),
); );
} }
@Deprecated('Use `system.change_timezone` instead') final Mutation$ChangeTimezone$system system;
final Mutation$ChangeTimezone$changeTimezone changeTimezone;
final String $__typename; final String $__typename;
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final _resultData = <String, dynamic>{}; final _resultData = <String, dynamic>{};
final l$changeTimezone = changeTimezone; final l$system = system;
_resultData['changeTimezone'] = l$changeTimezone.toJson(); _resultData['system'] = l$system.toJson();
final l$$__typename = $__typename; final l$$__typename = $__typename;
_resultData['__typename'] = l$$__typename; _resultData['__typename'] = l$$__typename;
return _resultData; return _resultData;
@ -2722,10 +2721,10 @@ class Mutation$ChangeTimezone {
@override @override
int get hashCode { int get hashCode {
final l$changeTimezone = changeTimezone; final l$system = system;
final l$$__typename = $__typename; final l$$__typename = $__typename;
return Object.hashAll([ return Object.hashAll([
l$changeTimezone, l$system,
l$$__typename, l$$__typename,
]); ]);
} }
@ -2739,9 +2738,9 @@ class Mutation$ChangeTimezone {
runtimeType != other.runtimeType) { runtimeType != other.runtimeType) {
return false; return false;
} }
final l$changeTimezone = changeTimezone; final l$system = system;
final lOther$changeTimezone = other.changeTimezone; final lOther$system = other.system;
if (l$changeTimezone != lOther$changeTimezone) { if (l$system != lOther$system) {
return false; return false;
} }
final l$$__typename = $__typename; final l$$__typename = $__typename;
@ -2771,10 +2770,10 @@ abstract class CopyWith$Mutation$ChangeTimezone<TRes> {
_CopyWithStubImpl$Mutation$ChangeTimezone; _CopyWithStubImpl$Mutation$ChangeTimezone;
TRes call({ TRes call({
Mutation$ChangeTimezone$changeTimezone? changeTimezone, Mutation$ChangeTimezone$system? system,
String? $__typename, String? $__typename,
}); });
CopyWith$Mutation$ChangeTimezone$changeTimezone<TRes> get changeTimezone; CopyWith$Mutation$ChangeTimezone$system<TRes> get system;
} }
class _CopyWithImpl$Mutation$ChangeTimezone<TRes> class _CopyWithImpl$Mutation$ChangeTimezone<TRes>
@ -2791,22 +2790,22 @@ class _CopyWithImpl$Mutation$ChangeTimezone<TRes>
static const _undefined = <dynamic, dynamic>{}; static const _undefined = <dynamic, dynamic>{};
TRes call({ TRes call({
Object? changeTimezone = _undefined, Object? system = _undefined,
Object? $__typename = _undefined, Object? $__typename = _undefined,
}) => }) =>
_then(Mutation$ChangeTimezone( _then(Mutation$ChangeTimezone(
changeTimezone: changeTimezone == _undefined || changeTimezone == null system: system == _undefined || system == null
? _instance.changeTimezone ? _instance.system
: (changeTimezone as Mutation$ChangeTimezone$changeTimezone), : (system as Mutation$ChangeTimezone$system),
$__typename: $__typename == _undefined || $__typename == null $__typename: $__typename == _undefined || $__typename == null
? _instance.$__typename ? _instance.$__typename
: ($__typename as String), : ($__typename as String),
)); ));
CopyWith$Mutation$ChangeTimezone$changeTimezone<TRes> get changeTimezone { CopyWith$Mutation$ChangeTimezone$system<TRes> get system {
final local$changeTimezone = _instance.changeTimezone; final local$system = _instance.system;
return CopyWith$Mutation$ChangeTimezone$changeTimezone( return CopyWith$Mutation$ChangeTimezone$system(
local$changeTimezone, (e) => call(changeTimezone: e)); local$system, (e) => call(system: e));
} }
} }
@ -2817,13 +2816,13 @@ class _CopyWithStubImpl$Mutation$ChangeTimezone<TRes>
TRes _res; TRes _res;
call({ call({
Mutation$ChangeTimezone$changeTimezone? changeTimezone, Mutation$ChangeTimezone$system? system,
String? $__typename, String? $__typename,
}) => }) =>
_res; _res;
CopyWith$Mutation$ChangeTimezone$changeTimezone<TRes> get changeTimezone => CopyWith$Mutation$ChangeTimezone$system<TRes> get system =>
CopyWith$Mutation$ChangeTimezone$changeTimezone.stub(_res); CopyWith$Mutation$ChangeTimezone$system.stub(_res);
} }
const documentNodeMutationChangeTimezone = DocumentNode(definitions: [ const documentNodeMutationChangeTimezone = DocumentNode(definitions: [
@ -2844,26 +2843,41 @@ const documentNodeMutationChangeTimezone = DocumentNode(definitions: [
directives: [], directives: [],
selectionSet: SelectionSetNode(selections: [ selectionSet: SelectionSetNode(selections: [
FieldNode( FieldNode(
name: NameNode(value: 'changeTimezone'), name: NameNode(value: 'system'),
alias: null, alias: null,
arguments: [ arguments: [],
ArgumentNode(
name: NameNode(value: 'timezone'),
value: VariableNode(name: NameNode(value: 'timezone')),
)
],
directives: [], directives: [],
selectionSet: SelectionSetNode(selections: [ selectionSet: SelectionSetNode(selections: [
FragmentSpreadNode(
name: NameNode(value: 'basicMutationReturnFields'),
directives: [],
),
FieldNode( FieldNode(
name: NameNode(value: 'timezone'), name: NameNode(value: 'changeTimezone'),
alias: null, alias: null,
arguments: [], arguments: [
ArgumentNode(
name: NameNode(value: 'timezone'),
value: VariableNode(name: NameNode(value: 'timezone')),
)
],
directives: [], directives: [],
selectionSet: null, selectionSet: SelectionSetNode(selections: [
FragmentSpreadNode(
name: NameNode(value: 'basicMutationReturnFields'),
directives: [],
),
FieldNode(
name: NameNode(value: 'timezone'),
alias: null,
arguments: [],
directives: [],
selectionSet: null,
),
FieldNode(
name: NameNode(value: '__typename'),
alias: null,
arguments: [],
directives: [],
selectionSet: null,
),
]),
), ),
FieldNode( FieldNode(
name: NameNode(value: '__typename'), name: NameNode(value: '__typename'),
@ -2982,9 +2996,148 @@ extension ClientExtension$Mutation$ChangeTimezone on graphql.GraphQLClient {
this.watchMutation(options); this.watchMutation(options);
} }
class Mutation$ChangeTimezone$changeTimezone class Mutation$ChangeTimezone$system {
Mutation$ChangeTimezone$system({
required this.changeTimezone,
this.$__typename = 'SystemMutations',
});
factory Mutation$ChangeTimezone$system.fromJson(Map<String, dynamic> json) {
final l$changeTimezone = json['changeTimezone'];
final l$$__typename = json['__typename'];
return Mutation$ChangeTimezone$system(
changeTimezone: Mutation$ChangeTimezone$system$changeTimezone.fromJson(
(l$changeTimezone as Map<String, dynamic>)),
$__typename: (l$$__typename as String),
);
}
final Mutation$ChangeTimezone$system$changeTimezone changeTimezone;
final String $__typename;
Map<String, dynamic> toJson() {
final _resultData = <String, dynamic>{};
final l$changeTimezone = changeTimezone;
_resultData['changeTimezone'] = l$changeTimezone.toJson();
final l$$__typename = $__typename;
_resultData['__typename'] = l$$__typename;
return _resultData;
}
@override
int get hashCode {
final l$changeTimezone = changeTimezone;
final l$$__typename = $__typename;
return Object.hashAll([
l$changeTimezone,
l$$__typename,
]);
}
@override
bool operator ==(Object other) {
if (identical(this, other)) {
return true;
}
if (!(other is Mutation$ChangeTimezone$system) ||
runtimeType != other.runtimeType) {
return false;
}
final l$changeTimezone = changeTimezone;
final lOther$changeTimezone = other.changeTimezone;
if (l$changeTimezone != lOther$changeTimezone) {
return false;
}
final l$$__typename = $__typename;
final lOther$$__typename = other.$__typename;
if (l$$__typename != lOther$$__typename) {
return false;
}
return true;
}
}
extension UtilityExtension$Mutation$ChangeTimezone$system
on Mutation$ChangeTimezone$system {
CopyWith$Mutation$ChangeTimezone$system<Mutation$ChangeTimezone$system>
get copyWith => CopyWith$Mutation$ChangeTimezone$system(
this,
(i) => i,
);
}
abstract class CopyWith$Mutation$ChangeTimezone$system<TRes> {
factory CopyWith$Mutation$ChangeTimezone$system(
Mutation$ChangeTimezone$system instance,
TRes Function(Mutation$ChangeTimezone$system) then,
) = _CopyWithImpl$Mutation$ChangeTimezone$system;
factory CopyWith$Mutation$ChangeTimezone$system.stub(TRes res) =
_CopyWithStubImpl$Mutation$ChangeTimezone$system;
TRes call({
Mutation$ChangeTimezone$system$changeTimezone? changeTimezone,
String? $__typename,
});
CopyWith$Mutation$ChangeTimezone$system$changeTimezone<TRes>
get changeTimezone;
}
class _CopyWithImpl$Mutation$ChangeTimezone$system<TRes>
implements CopyWith$Mutation$ChangeTimezone$system<TRes> {
_CopyWithImpl$Mutation$ChangeTimezone$system(
this._instance,
this._then,
);
final Mutation$ChangeTimezone$system _instance;
final TRes Function(Mutation$ChangeTimezone$system) _then;
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? changeTimezone = _undefined,
Object? $__typename = _undefined,
}) =>
_then(Mutation$ChangeTimezone$system(
changeTimezone: changeTimezone == _undefined || changeTimezone == null
? _instance.changeTimezone
: (changeTimezone as Mutation$ChangeTimezone$system$changeTimezone),
$__typename: $__typename == _undefined || $__typename == null
? _instance.$__typename
: ($__typename as String),
));
CopyWith$Mutation$ChangeTimezone$system$changeTimezone<TRes>
get changeTimezone {
final local$changeTimezone = _instance.changeTimezone;
return CopyWith$Mutation$ChangeTimezone$system$changeTimezone(
local$changeTimezone, (e) => call(changeTimezone: e));
}
}
class _CopyWithStubImpl$Mutation$ChangeTimezone$system<TRes>
implements CopyWith$Mutation$ChangeTimezone$system<TRes> {
_CopyWithStubImpl$Mutation$ChangeTimezone$system(this._res);
TRes _res;
call({
Mutation$ChangeTimezone$system$changeTimezone? changeTimezone,
String? $__typename,
}) =>
_res;
CopyWith$Mutation$ChangeTimezone$system$changeTimezone<TRes>
get changeTimezone =>
CopyWith$Mutation$ChangeTimezone$system$changeTimezone.stub(_res);
}
class Mutation$ChangeTimezone$system$changeTimezone
implements Fragment$basicMutationReturnFields$$TimezoneMutationReturn { implements Fragment$basicMutationReturnFields$$TimezoneMutationReturn {
Mutation$ChangeTimezone$changeTimezone({ Mutation$ChangeTimezone$system$changeTimezone({
required this.code, required this.code,
required this.message, required this.message,
required this.success, required this.success,
@ -2992,14 +3145,14 @@ class Mutation$ChangeTimezone$changeTimezone
this.timezone, this.timezone,
}); });
factory Mutation$ChangeTimezone$changeTimezone.fromJson( factory Mutation$ChangeTimezone$system$changeTimezone.fromJson(
Map<String, dynamic> json) { Map<String, dynamic> json) {
final l$code = json['code']; final l$code = json['code'];
final l$message = json['message']; final l$message = json['message'];
final l$success = json['success']; final l$success = json['success'];
final l$$__typename = json['__typename']; final l$$__typename = json['__typename'];
final l$timezone = json['timezone']; final l$timezone = json['timezone'];
return Mutation$ChangeTimezone$changeTimezone( return Mutation$ChangeTimezone$system$changeTimezone(
code: (l$code as int), code: (l$code as int),
message: (l$message as String), message: (l$message as String),
success: (l$success as bool), success: (l$success as bool),
@ -3054,7 +3207,7 @@ class Mutation$ChangeTimezone$changeTimezone
if (identical(this, other)) { if (identical(this, other)) {
return true; return true;
} }
if (!(other is Mutation$ChangeTimezone$changeTimezone) || if (!(other is Mutation$ChangeTimezone$system$changeTimezone) ||
runtimeType != other.runtimeType) { runtimeType != other.runtimeType) {
return false; return false;
} }
@ -3087,24 +3240,25 @@ class Mutation$ChangeTimezone$changeTimezone
} }
} }
extension UtilityExtension$Mutation$ChangeTimezone$changeTimezone extension UtilityExtension$Mutation$ChangeTimezone$system$changeTimezone
on Mutation$ChangeTimezone$changeTimezone { on Mutation$ChangeTimezone$system$changeTimezone {
CopyWith$Mutation$ChangeTimezone$changeTimezone< CopyWith$Mutation$ChangeTimezone$system$changeTimezone<
Mutation$ChangeTimezone$changeTimezone> Mutation$ChangeTimezone$system$changeTimezone>
get copyWith => CopyWith$Mutation$ChangeTimezone$changeTimezone( get copyWith => CopyWith$Mutation$ChangeTimezone$system$changeTimezone(
this, this,
(i) => i, (i) => i,
); );
} }
abstract class CopyWith$Mutation$ChangeTimezone$changeTimezone<TRes> { abstract class CopyWith$Mutation$ChangeTimezone$system$changeTimezone<TRes> {
factory CopyWith$Mutation$ChangeTimezone$changeTimezone( factory CopyWith$Mutation$ChangeTimezone$system$changeTimezone(
Mutation$ChangeTimezone$changeTimezone instance, Mutation$ChangeTimezone$system$changeTimezone instance,
TRes Function(Mutation$ChangeTimezone$changeTimezone) then, TRes Function(Mutation$ChangeTimezone$system$changeTimezone) then,
) = _CopyWithImpl$Mutation$ChangeTimezone$changeTimezone; ) = _CopyWithImpl$Mutation$ChangeTimezone$system$changeTimezone;
factory CopyWith$Mutation$ChangeTimezone$changeTimezone.stub(TRes res) = factory CopyWith$Mutation$ChangeTimezone$system$changeTimezone.stub(
_CopyWithStubImpl$Mutation$ChangeTimezone$changeTimezone; TRes res) =
_CopyWithStubImpl$Mutation$ChangeTimezone$system$changeTimezone;
TRes call({ TRes call({
int? code, int? code,
@ -3115,16 +3269,16 @@ abstract class CopyWith$Mutation$ChangeTimezone$changeTimezone<TRes> {
}); });
} }
class _CopyWithImpl$Mutation$ChangeTimezone$changeTimezone<TRes> class _CopyWithImpl$Mutation$ChangeTimezone$system$changeTimezone<TRes>
implements CopyWith$Mutation$ChangeTimezone$changeTimezone<TRes> { implements CopyWith$Mutation$ChangeTimezone$system$changeTimezone<TRes> {
_CopyWithImpl$Mutation$ChangeTimezone$changeTimezone( _CopyWithImpl$Mutation$ChangeTimezone$system$changeTimezone(
this._instance, this._instance,
this._then, this._then,
); );
final Mutation$ChangeTimezone$changeTimezone _instance; final Mutation$ChangeTimezone$system$changeTimezone _instance;
final TRes Function(Mutation$ChangeTimezone$changeTimezone) _then; final TRes Function(Mutation$ChangeTimezone$system$changeTimezone) _then;
static const _undefined = <dynamic, dynamic>{}; static const _undefined = <dynamic, dynamic>{};
@ -3135,7 +3289,7 @@ class _CopyWithImpl$Mutation$ChangeTimezone$changeTimezone<TRes>
Object? $__typename = _undefined, Object? $__typename = _undefined,
Object? timezone = _undefined, Object? timezone = _undefined,
}) => }) =>
_then(Mutation$ChangeTimezone$changeTimezone( _then(Mutation$ChangeTimezone$system$changeTimezone(
code: code:
code == _undefined || code == null ? _instance.code : (code as int), code == _undefined || code == null ? _instance.code : (code as int),
message: message == _undefined || message == null message: message == _undefined || message == null
@ -3152,9 +3306,9 @@ class _CopyWithImpl$Mutation$ChangeTimezone$changeTimezone<TRes>
)); ));
} }
class _CopyWithStubImpl$Mutation$ChangeTimezone$changeTimezone<TRes> class _CopyWithStubImpl$Mutation$ChangeTimezone$system$changeTimezone<TRes>
implements CopyWith$Mutation$ChangeTimezone$changeTimezone<TRes> { implements CopyWith$Mutation$ChangeTimezone$system$changeTimezone<TRes> {
_CopyWithStubImpl$Mutation$ChangeTimezone$changeTimezone(this._res); _CopyWithStubImpl$Mutation$ChangeTimezone$system$changeTimezone(this._res);
TRes _res; TRes _res;
@ -3273,33 +3427,29 @@ class _CopyWithStubImpl$Variables$Mutation$ChangeAutoUpgradeSettings<TRes>
class Mutation$ChangeAutoUpgradeSettings { class Mutation$ChangeAutoUpgradeSettings {
Mutation$ChangeAutoUpgradeSettings({ Mutation$ChangeAutoUpgradeSettings({
required this.changeAutoUpgradeSettings, required this.system,
this.$__typename = 'Mutation', this.$__typename = 'Mutation',
}); });
factory Mutation$ChangeAutoUpgradeSettings.fromJson( factory Mutation$ChangeAutoUpgradeSettings.fromJson(
Map<String, dynamic> json) { Map<String, dynamic> json) {
final l$changeAutoUpgradeSettings = json['changeAutoUpgradeSettings']; final l$system = json['system'];
final l$$__typename = json['__typename']; final l$$__typename = json['__typename'];
return Mutation$ChangeAutoUpgradeSettings( return Mutation$ChangeAutoUpgradeSettings(
changeAutoUpgradeSettings: system: Mutation$ChangeAutoUpgradeSettings$system.fromJson(
Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings.fromJson( (l$system as Map<String, dynamic>)),
(l$changeAutoUpgradeSettings as Map<String, dynamic>)),
$__typename: (l$$__typename as String), $__typename: (l$$__typename as String),
); );
} }
@Deprecated('Use `system.change_auto_upgrade_settings` instead') final Mutation$ChangeAutoUpgradeSettings$system system;
final Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings
changeAutoUpgradeSettings;
final String $__typename; final String $__typename;
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final _resultData = <String, dynamic>{}; final _resultData = <String, dynamic>{};
final l$changeAutoUpgradeSettings = changeAutoUpgradeSettings; final l$system = system;
_resultData['changeAutoUpgradeSettings'] = _resultData['system'] = l$system.toJson();
l$changeAutoUpgradeSettings.toJson();
final l$$__typename = $__typename; final l$$__typename = $__typename;
_resultData['__typename'] = l$$__typename; _resultData['__typename'] = l$$__typename;
return _resultData; return _resultData;
@ -3307,10 +3457,10 @@ class Mutation$ChangeAutoUpgradeSettings {
@override @override
int get hashCode { int get hashCode {
final l$changeAutoUpgradeSettings = changeAutoUpgradeSettings; final l$system = system;
final l$$__typename = $__typename; final l$$__typename = $__typename;
return Object.hashAll([ return Object.hashAll([
l$changeAutoUpgradeSettings, l$system,
l$$__typename, l$$__typename,
]); ]);
} }
@ -3324,9 +3474,9 @@ class Mutation$ChangeAutoUpgradeSettings {
runtimeType != other.runtimeType) { runtimeType != other.runtimeType) {
return false; return false;
} }
final l$changeAutoUpgradeSettings = changeAutoUpgradeSettings; final l$system = system;
final lOther$changeAutoUpgradeSettings = other.changeAutoUpgradeSettings; final lOther$system = other.system;
if (l$changeAutoUpgradeSettings != lOther$changeAutoUpgradeSettings) { if (l$system != lOther$system) {
return false; return false;
} }
final l$$__typename = $__typename; final l$$__typename = $__typename;
@ -3358,12 +3508,10 @@ abstract class CopyWith$Mutation$ChangeAutoUpgradeSettings<TRes> {
_CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings; _CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings;
TRes call({ TRes call({
Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings? Mutation$ChangeAutoUpgradeSettings$system? system,
changeAutoUpgradeSettings,
String? $__typename, String? $__typename,
}); });
CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings<TRes> CopyWith$Mutation$ChangeAutoUpgradeSettings$system<TRes> get system;
get changeAutoUpgradeSettings;
} }
class _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings<TRes> class _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings<TRes>
@ -3380,26 +3528,22 @@ class _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings<TRes>
static const _undefined = <dynamic, dynamic>{}; static const _undefined = <dynamic, dynamic>{};
TRes call({ TRes call({
Object? changeAutoUpgradeSettings = _undefined, Object? system = _undefined,
Object? $__typename = _undefined, Object? $__typename = _undefined,
}) => }) =>
_then(Mutation$ChangeAutoUpgradeSettings( _then(Mutation$ChangeAutoUpgradeSettings(
changeAutoUpgradeSettings: changeAutoUpgradeSettings == _undefined || system: system == _undefined || system == null
changeAutoUpgradeSettings == null ? _instance.system
? _instance.changeAutoUpgradeSettings : (system as Mutation$ChangeAutoUpgradeSettings$system),
: (changeAutoUpgradeSettings
as Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings),
$__typename: $__typename == _undefined || $__typename == null $__typename: $__typename == _undefined || $__typename == null
? _instance.$__typename ? _instance.$__typename
: ($__typename as String), : ($__typename as String),
)); ));
CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings<TRes> CopyWith$Mutation$ChangeAutoUpgradeSettings$system<TRes> get system {
get changeAutoUpgradeSettings { final local$system = _instance.system;
final local$changeAutoUpgradeSettings = _instance.changeAutoUpgradeSettings; return CopyWith$Mutation$ChangeAutoUpgradeSettings$system(
return CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( local$system, (e) => call(system: e));
local$changeAutoUpgradeSettings,
(e) => call(changeAutoUpgradeSettings: e));
} }
} }
@ -3410,16 +3554,13 @@ class _CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings<TRes>
TRes _res; TRes _res;
call({ call({
Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings? Mutation$ChangeAutoUpgradeSettings$system? system,
changeAutoUpgradeSettings,
String? $__typename, String? $__typename,
}) => }) =>
_res; _res;
CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings<TRes> CopyWith$Mutation$ChangeAutoUpgradeSettings$system<TRes> get system =>
get changeAutoUpgradeSettings => CopyWith$Mutation$ChangeAutoUpgradeSettings$system.stub(_res);
CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings
.stub(_res);
} }
const documentNodeMutationChangeAutoUpgradeSettings = const documentNodeMutationChangeAutoUpgradeSettings =
@ -3441,33 +3582,48 @@ const documentNodeMutationChangeAutoUpgradeSettings =
directives: [], directives: [],
selectionSet: SelectionSetNode(selections: [ selectionSet: SelectionSetNode(selections: [
FieldNode( FieldNode(
name: NameNode(value: 'changeAutoUpgradeSettings'), name: NameNode(value: 'system'),
alias: null, alias: null,
arguments: [ arguments: [],
ArgumentNode(
name: NameNode(value: 'settings'),
value: VariableNode(name: NameNode(value: 'settings')),
)
],
directives: [], directives: [],
selectionSet: SelectionSetNode(selections: [ selectionSet: SelectionSetNode(selections: [
FragmentSpreadNode(
name: NameNode(value: 'basicMutationReturnFields'),
directives: [],
),
FieldNode( FieldNode(
name: NameNode(value: 'allowReboot'), name: NameNode(value: 'changeAutoUpgradeSettings'),
alias: null, alias: null,
arguments: [], arguments: [
ArgumentNode(
name: NameNode(value: 'settings'),
value: VariableNode(name: NameNode(value: 'settings')),
)
],
directives: [], directives: [],
selectionSet: null, selectionSet: SelectionSetNode(selections: [
), FragmentSpreadNode(
FieldNode( name: NameNode(value: 'basicMutationReturnFields'),
name: NameNode(value: 'enableAutoUpgrade'), directives: [],
alias: null, ),
arguments: [], FieldNode(
directives: [], name: NameNode(value: 'allowReboot'),
selectionSet: null, alias: null,
arguments: [],
directives: [],
selectionSet: null,
),
FieldNode(
name: NameNode(value: 'enableAutoUpgrade'),
alias: null,
arguments: [],
directives: [],
selectionSet: null,
),
FieldNode(
name: NameNode(value: '__typename'),
alias: null,
arguments: [],
directives: [],
selectionSet: null,
),
]),
), ),
FieldNode( FieldNode(
name: NameNode(value: '__typename'), name: NameNode(value: '__typename'),
@ -3591,10 +3747,161 @@ extension ClientExtension$Mutation$ChangeAutoUpgradeSettings
this.watchMutation(options); this.watchMutation(options);
} }
class Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings class Mutation$ChangeAutoUpgradeSettings$system {
Mutation$ChangeAutoUpgradeSettings$system({
required this.changeAutoUpgradeSettings,
this.$__typename = 'SystemMutations',
});
factory Mutation$ChangeAutoUpgradeSettings$system.fromJson(
Map<String, dynamic> json) {
final l$changeAutoUpgradeSettings = json['changeAutoUpgradeSettings'];
final l$$__typename = json['__typename'];
return Mutation$ChangeAutoUpgradeSettings$system(
changeAutoUpgradeSettings:
Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings
.fromJson((l$changeAutoUpgradeSettings as Map<String, dynamic>)),
$__typename: (l$$__typename as String),
);
}
final Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings
changeAutoUpgradeSettings;
final String $__typename;
Map<String, dynamic> toJson() {
final _resultData = <String, dynamic>{};
final l$changeAutoUpgradeSettings = changeAutoUpgradeSettings;
_resultData['changeAutoUpgradeSettings'] =
l$changeAutoUpgradeSettings.toJson();
final l$$__typename = $__typename;
_resultData['__typename'] = l$$__typename;
return _resultData;
}
@override
int get hashCode {
final l$changeAutoUpgradeSettings = changeAutoUpgradeSettings;
final l$$__typename = $__typename;
return Object.hashAll([
l$changeAutoUpgradeSettings,
l$$__typename,
]);
}
@override
bool operator ==(Object other) {
if (identical(this, other)) {
return true;
}
if (!(other is Mutation$ChangeAutoUpgradeSettings$system) ||
runtimeType != other.runtimeType) {
return false;
}
final l$changeAutoUpgradeSettings = changeAutoUpgradeSettings;
final lOther$changeAutoUpgradeSettings = other.changeAutoUpgradeSettings;
if (l$changeAutoUpgradeSettings != lOther$changeAutoUpgradeSettings) {
return false;
}
final l$$__typename = $__typename;
final lOther$$__typename = other.$__typename;
if (l$$__typename != lOther$$__typename) {
return false;
}
return true;
}
}
extension UtilityExtension$Mutation$ChangeAutoUpgradeSettings$system
on Mutation$ChangeAutoUpgradeSettings$system {
CopyWith$Mutation$ChangeAutoUpgradeSettings$system<
Mutation$ChangeAutoUpgradeSettings$system>
get copyWith => CopyWith$Mutation$ChangeAutoUpgradeSettings$system(
this,
(i) => i,
);
}
abstract class CopyWith$Mutation$ChangeAutoUpgradeSettings$system<TRes> {
factory CopyWith$Mutation$ChangeAutoUpgradeSettings$system(
Mutation$ChangeAutoUpgradeSettings$system instance,
TRes Function(Mutation$ChangeAutoUpgradeSettings$system) then,
) = _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings$system;
factory CopyWith$Mutation$ChangeAutoUpgradeSettings$system.stub(TRes res) =
_CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings$system;
TRes call({
Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings?
changeAutoUpgradeSettings,
String? $__typename,
});
CopyWith$Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings<
TRes> get changeAutoUpgradeSettings;
}
class _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings$system<TRes>
implements CopyWith$Mutation$ChangeAutoUpgradeSettings$system<TRes> {
_CopyWithImpl$Mutation$ChangeAutoUpgradeSettings$system(
this._instance,
this._then,
);
final Mutation$ChangeAutoUpgradeSettings$system _instance;
final TRes Function(Mutation$ChangeAutoUpgradeSettings$system) _then;
static const _undefined = <dynamic, dynamic>{};
TRes call({
Object? changeAutoUpgradeSettings = _undefined,
Object? $__typename = _undefined,
}) =>
_then(Mutation$ChangeAutoUpgradeSettings$system(
changeAutoUpgradeSettings: changeAutoUpgradeSettings == _undefined ||
changeAutoUpgradeSettings == null
? _instance.changeAutoUpgradeSettings
: (changeAutoUpgradeSettings
as Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings),
$__typename: $__typename == _undefined || $__typename == null
? _instance.$__typename
: ($__typename as String),
));
CopyWith$Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings<
TRes> get changeAutoUpgradeSettings {
final local$changeAutoUpgradeSettings = _instance.changeAutoUpgradeSettings;
return CopyWith$Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings(
local$changeAutoUpgradeSettings,
(e) => call(changeAutoUpgradeSettings: e));
}
}
class _CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings$system<TRes>
implements CopyWith$Mutation$ChangeAutoUpgradeSettings$system<TRes> {
_CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings$system(this._res);
TRes _res;
call({
Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings?
changeAutoUpgradeSettings,
String? $__typename,
}) =>
_res;
CopyWith$Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings<
TRes>
get changeAutoUpgradeSettings =>
CopyWith$Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings
.stub(_res);
}
class Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings
implements implements
Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn { Fragment$basicMutationReturnFields$$AutoUpgradeSettingsMutationReturn {
Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings({ Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings({
required this.code, required this.code,
required this.message, required this.message,
required this.success, required this.success,
@ -3603,7 +3910,7 @@ class Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings
required this.enableAutoUpgrade, required this.enableAutoUpgrade,
}); });
factory Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings.fromJson( factory Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings.fromJson(
Map<String, dynamic> json) { Map<String, dynamic> json) {
final l$code = json['code']; final l$code = json['code'];
final l$message = json['message']; final l$message = json['message'];
@ -3611,7 +3918,7 @@ class Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings
final l$$__typename = json['__typename']; final l$$__typename = json['__typename'];
final l$allowReboot = json['allowReboot']; final l$allowReboot = json['allowReboot'];
final l$enableAutoUpgrade = json['enableAutoUpgrade']; final l$enableAutoUpgrade = json['enableAutoUpgrade'];
return Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( return Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings(
code: (l$code as int), code: (l$code as int),
message: (l$message as String), message: (l$message as String),
success: (l$success as bool), success: (l$success as bool),
@ -3674,7 +3981,7 @@ class Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings
return true; return true;
} }
if (!(other if (!(other
is Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings) || is Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings) ||
runtimeType != other.runtimeType) { runtimeType != other.runtimeType) {
return false; return false;
} }
@ -3712,28 +4019,30 @@ class Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings
} }
} }
extension UtilityExtension$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings extension UtilityExtension$Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings
on Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings { on Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings {
CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings< CopyWith$Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings<
Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings> Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings>
get copyWith => get copyWith =>
CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( CopyWith$Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings(
this, this,
(i) => i, (i) => i,
); );
} }
abstract class CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings< abstract class CopyWith$Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings<
TRes> { TRes> {
factory CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( factory CopyWith$Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings(
Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings instance, Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings
TRes Function(Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings) instance,
TRes Function(
Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings)
then, then,
) = _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings; ) = _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings;
factory CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings.stub( factory CopyWith$Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings.stub(
TRes res) = TRes res) =
_CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings; _CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings;
TRes call({ TRes call({
int? code, int? code,
@ -3745,20 +4054,22 @@ abstract class CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSett
}); });
} }
class _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings< class _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings<
TRes> TRes>
implements implements
CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings< CopyWith$Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings<
TRes> { TRes> {
_CopyWithImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings(
this._instance, this._instance,
this._then, this._then,
); );
final Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings _instance; final Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings
_instance;
final TRes Function( final TRes Function(
Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings) _then; Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings)
_then;
static const _undefined = <dynamic, dynamic>{}; static const _undefined = <dynamic, dynamic>{};
@ -3770,7 +4081,7 @@ class _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings
Object? allowReboot = _undefined, Object? allowReboot = _undefined,
Object? enableAutoUpgrade = _undefined, Object? enableAutoUpgrade = _undefined,
}) => }) =>
_then(Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( _then(Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings(
code: code:
code == _undefined || code == null ? _instance.code : (code as int), code == _undefined || code == null ? _instance.code : (code as int),
message: message == _undefined || message == null message: message == _undefined || message == null
@ -3792,12 +4103,12 @@ class _CopyWithImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings
)); ));
} }
class _CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings< class _CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings<
TRes> TRes>
implements implements
CopyWith$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings< CopyWith$Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings<
TRes> { TRes> {
_CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings$changeAutoUpgradeSettings( _CopyWithStubImpl$Mutation$ChangeAutoUpgradeSettings$system$changeAutoUpgradeSettings(
this._res); this._res);
TRes _res; TRes _res;

View File

@ -27,40 +27,53 @@ query AllServices {
} }
mutation EnableService($serviceId: String!) { mutation EnableService($serviceId: String!) {
enableService(serviceId: $serviceId) { services {
...basicMutationReturnFields enableService(serviceId: $serviceId) {
...basicMutationReturnFields
}
} }
} }
mutation DisableService($serviceId: String!) { mutation DisableService($serviceId: String!) {
disableService(serviceId: $serviceId) { services {
...basicMutationReturnFields disableService(serviceId: $serviceId) {
...basicMutationReturnFields
}
} }
} }
mutation StopService($serviceId: String!) { mutation StopService($serviceId: String!) {
stopService(serviceId: $serviceId) { services {
...basicMutationReturnFields stopService(serviceId: $serviceId) {
...basicMutationReturnFields
}
} }
} }
mutation StartService($serviceId: String!) { mutation StartService($serviceId: String!) {
startService(serviceId: $serviceId) { services {
...basicMutationReturnFields startService(serviceId: $serviceId) {
...basicMutationReturnFields
}
} }
} }
mutation RestartService($serviceId: String!) { mutation RestartService($serviceId: String!) {
restartService(serviceId: $serviceId) { services {
...basicMutationReturnFields restartService(serviceId: $serviceId) {
...basicMutationReturnFields
}
} }
} }
mutation MoveService($input: MoveServiceInput!) { mutation MoveService($input: MoveServiceInput!) {
moveService(input: $input) { services {
...basicMutationReturnFields moveService(input: $input) {
job { ...basicMutationReturnFields
...basicApiJobsFields job {
...basicApiJobsFields
}
} }
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -24,43 +24,53 @@ query GetUser($username: String!) {
} }
mutation CreateUser($user: UserMutationInput!) { mutation CreateUser($user: UserMutationInput!) {
createUser(user: $user) { users {
...basicMutationReturnFields createUser(user: $user) {
user { ...basicMutationReturnFields
...userFields user {
...userFields
}
} }
} }
} }
mutation DeleteUser($username: String!) { mutation DeleteUser($username: String!) {
deleteUser(username: $username) { users {
...basicMutationReturnFields deleteUser(username: $username) {
...basicMutationReturnFields
}
} }
} }
mutation UpdateUser($user: UserMutationInput!) { mutation UpdateUser($user: UserMutationInput!) {
updateUser(user: $user) { users {
...basicMutationReturnFields updateUser(user: $user) {
user { ...basicMutationReturnFields
...userFields user {
...userFields
}
} }
} }
} }
mutation AddSshKey($sshInput: SshMutationInput!) { mutation AddSshKey($sshInput: SshMutationInput!) {
addSshKey(sshInput: $sshInput) { users {
...basicMutationReturnFields addSshKey(sshInput: $sshInput) {
user { ...basicMutationReturnFields
...userFields user {
...userFields
}
} }
} }
} }
mutation RemoveSshKey($sshInput: SshMutationInput!) { mutation RemoveSshKey($sshInput: SshMutationInput!) {
removeSshKey(sshInput: $sshInput) { users {
...basicMutationReturnFields removeSshKey(sshInput: $sshInput) {
user { ...basicMutationReturnFields
...userFields user {
...userFields
}
} }
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -29,10 +29,10 @@ mixin JobsApi on GraphQLApiMap {
final mutation = Options$Mutation$RemoveJob(variables: variables); final mutation = Options$Mutation$RemoveJob(variables: variables);
final response = await client.mutate$RemoveJob(mutation); final response = await client.mutate$RemoveJob(mutation);
return GenericResult( return GenericResult(
data: response.parsedData?.removeJob.success ?? false, data: response.parsedData?.jobs.removeJob.success ?? false,
success: true, success: true,
code: response.parsedData?.removeJob.code ?? 0, code: response.parsedData?.jobs.removeJob.code ?? 0,
message: response.parsedData?.removeJob.message, message: response.parsedData?.jobs.removeJob.message,
); );
} catch (e) { } catch (e) {
print(e); print(e);

View File

@ -28,7 +28,7 @@ mixin ServerActionsApi on GraphQLApiMap {
if (response.hasException) { if (response.hasException) {
print(response.exception.toString()); print(response.exception.toString());
} }
if (response.parsedData!.rebootSystem.success) { if (response.parsedData!.system.rebootSystem.success) {
time = DateTime.now().toUtc(); time = DateTime.now().toUtc();
} }
} catch (e) { } catch (e) {

View File

@ -270,7 +270,7 @@ class ServerApi extends GraphQLApiMap
} }
key = GenericResult<String>( key = GenericResult<String>(
success: true, success: true,
data: response.parsedData!.getNewRecoveryApiKey.key!, data: response.parsedData!.api.getNewRecoveryApiKey.key!,
); );
} catch (e) { } catch (e) {
print(e); print(e);
@ -410,7 +410,7 @@ class ServerApi extends GraphQLApiMap
} }
token = GenericResult<String>( token = GenericResult<String>(
success: true, success: true,
data: response.parsedData!.getNewDeviceApiKey.key!, data: response.parsedData!.api.getNewDeviceApiKey.key!,
); );
} catch (e) { } catch (e) {
print(e); print(e);
@ -459,7 +459,7 @@ class ServerApi extends GraphQLApiMap
} }
token = GenericResult<String>( token = GenericResult<String>(
success: true, success: true,
data: response.parsedData!.authorizeWithNewDeviceApiKey.token!, data: response.parsedData!.api.authorizeWithNewDeviceApiKey.token!,
); );
} catch (e) { } catch (e) {
print(e); print(e);
@ -506,7 +506,7 @@ class ServerApi extends GraphQLApiMap
} }
token = GenericResult<String>( token = GenericResult<String>(
success: true, success: true,
data: response.parsedData!.useRecoveryApiKey.token!, data: response.parsedData!.api.useRecoveryApiKey.token!,
); );
} catch (e) { } catch (e) {
print(e); print(e);

View File

@ -29,10 +29,10 @@ mixin ServicesApi on GraphQLApiMap {
final mutation = Options$Mutation$EnableService(variables: variables); final mutation = Options$Mutation$EnableService(variables: variables);
final response = await client.mutate$EnableService(mutation); final response = await client.mutate$EnableService(mutation);
return GenericResult( return GenericResult(
data: response.parsedData?.enableService.success ?? false, data: response.parsedData?.services.enableService.success ?? false,
success: true, success: true,
code: response.parsedData?.enableService.code ?? 0, code: response.parsedData?.services.enableService.code ?? 0,
message: response.parsedData?.enableService.message, message: response.parsedData?.services.enableService.message,
); );
} catch (e) { } catch (e) {
print(e); print(e);
@ -55,9 +55,9 @@ mixin ServicesApi on GraphQLApiMap {
final response = await client.mutate$DisableService(mutation); final response = await client.mutate$DisableService(mutation);
return GenericResult( return GenericResult(
data: null, data: null,
success: response.parsedData?.disableService.success ?? false, success: response.parsedData?.services.disableService.success ?? false,
code: response.parsedData?.disableService.code ?? 0, code: response.parsedData?.services.disableService.code ?? 0,
message: response.parsedData?.disableService.message, message: response.parsedData?.services.disableService.message,
); );
} catch (e) { } catch (e) {
print(e); print(e);
@ -79,10 +79,10 @@ mixin ServicesApi on GraphQLApiMap {
final mutation = Options$Mutation$StopService(variables: variables); final mutation = Options$Mutation$StopService(variables: variables);
final response = await client.mutate$StopService(mutation); final response = await client.mutate$StopService(mutation);
return GenericResult( return GenericResult(
data: response.parsedData?.stopService.success ?? false, data: response.parsedData?.services.stopService.success ?? false,
success: true, success: true,
code: response.parsedData?.stopService.code ?? 0, code: response.parsedData?.services.stopService.code ?? 0,
message: response.parsedData?.stopService.message, message: response.parsedData?.services.stopService.message,
); );
} catch (e) { } catch (e) {
print(e); print(e);
@ -103,9 +103,9 @@ mixin ServicesApi on GraphQLApiMap {
final response = await client.mutate$StartService(mutation); final response = await client.mutate$StartService(mutation);
return GenericResult( return GenericResult(
data: null, data: null,
success: response.parsedData?.startService.success ?? false, success: response.parsedData?.services.startService.success ?? false,
code: response.parsedData?.startService.code ?? 0, code: response.parsedData?.services.startService.code ?? 0,
message: response.parsedData?.startService.message, message: response.parsedData?.services.startService.message,
); );
} catch (e) { } catch (e) {
print(e); print(e);
@ -127,10 +127,10 @@ mixin ServicesApi on GraphQLApiMap {
final mutation = Options$Mutation$RestartService(variables: variables); final mutation = Options$Mutation$RestartService(variables: variables);
final response = await client.mutate$RestartService(mutation); final response = await client.mutate$RestartService(mutation);
return GenericResult( return GenericResult(
data: response.parsedData?.restartService.success ?? false, data: response.parsedData?.services.restartService.success ?? false,
success: true, success: true,
code: response.parsedData?.restartService.code ?? 0, code: response.parsedData?.services.restartService.code ?? 0,
message: response.parsedData?.restartService.message, message: response.parsedData?.services.restartService.message,
); );
} catch (e) { } catch (e) {
print(e); print(e);
@ -157,11 +157,11 @@ mixin ServicesApi on GraphQLApiMap {
); );
final mutation = Options$Mutation$MoveService(variables: variables); final mutation = Options$Mutation$MoveService(variables: variables);
final response = await client.mutate$MoveService(mutation); final response = await client.mutate$MoveService(mutation);
final jobJson = response.parsedData?.moveService.job?.toJson(); final jobJson = response.parsedData?.services.moveService.job?.toJson();
return GenericResult( return GenericResult(
success: true, success: true,
code: response.parsedData?.moveService.code ?? 0, code: response.parsedData?.services.moveService.code ?? 0,
message: response.parsedData?.moveService.message, message: response.parsedData?.services.moveService.message,
data: jobJson != null ? ServerJob.fromJson(jobJson) : null, data: jobJson != null ? ServerJob.fromJson(jobJson) : null,
); );
} catch (e) { } catch (e) {

View File

@ -58,10 +58,10 @@ mixin UsersApi on GraphQLApiMap {
final response = await client.mutate$CreateUser(mutation); final response = await client.mutate$CreateUser(mutation);
return GenericResult( return GenericResult(
success: true, success: true,
code: response.parsedData?.createUser.code ?? 500, code: response.parsedData?.users.createUser.code ?? 500,
message: response.parsedData?.createUser.message, message: response.parsedData?.users.createUser.message,
data: response.parsedData?.createUser.user != null data: response.parsedData?.users.createUser.user != null
? User.fromGraphQL(response.parsedData!.createUser.user!) ? User.fromGraphQL(response.parsedData!.users.createUser.user!)
: null, : null,
); );
} catch (e) { } catch (e) {
@ -84,10 +84,10 @@ mixin UsersApi on GraphQLApiMap {
final mutation = Options$Mutation$DeleteUser(variables: variables); final mutation = Options$Mutation$DeleteUser(variables: variables);
final response = await client.mutate$DeleteUser(mutation); final response = await client.mutate$DeleteUser(mutation);
return GenericResult( return GenericResult(
data: response.parsedData?.deleteUser.success ?? false, data: response.parsedData?.users.deleteUser.success ?? false,
success: true, success: true,
code: response.parsedData?.deleteUser.code ?? 500, code: response.parsedData?.users.deleteUser.code ?? 500,
message: response.parsedData?.deleteUser.message, message: response.parsedData?.users.deleteUser.message,
); );
} catch (e) { } catch (e) {
print(e); print(e);
@ -113,10 +113,10 @@ mixin UsersApi on GraphQLApiMap {
final response = await client.mutate$UpdateUser(mutation); final response = await client.mutate$UpdateUser(mutation);
return GenericResult( return GenericResult(
success: true, success: true,
code: response.parsedData?.updateUser.code ?? 500, code: response.parsedData?.users.updateUser.code ?? 500,
message: response.parsedData?.updateUser.message, message: response.parsedData?.users.updateUser.message,
data: response.parsedData?.updateUser.user != null data: response.parsedData?.users.updateUser.user != null
? User.fromGraphQL(response.parsedData!.updateUser.user!) ? User.fromGraphQL(response.parsedData!.users.updateUser.user!)
: null, : null,
); );
} catch (e) { } catch (e) {
@ -146,10 +146,10 @@ mixin UsersApi on GraphQLApiMap {
final response = await client.mutate$AddSshKey(mutation); final response = await client.mutate$AddSshKey(mutation);
return GenericResult( return GenericResult(
success: true, success: true,
code: response.parsedData?.addSshKey.code ?? 500, code: response.parsedData?.users.addSshKey.code ?? 500,
message: response.parsedData?.addSshKey.message, message: response.parsedData?.users.addSshKey.message,
data: response.parsedData?.addSshKey.user != null data: response.parsedData?.users.addSshKey.user != null
? User.fromGraphQL(response.parsedData!.addSshKey.user!) ? User.fromGraphQL(response.parsedData!.users.addSshKey.user!)
: null, : null,
); );
} catch (e) { } catch (e) {
@ -178,11 +178,11 @@ mixin UsersApi on GraphQLApiMap {
final mutation = Options$Mutation$RemoveSshKey(variables: variables); final mutation = Options$Mutation$RemoveSshKey(variables: variables);
final response = await client.mutate$RemoveSshKey(mutation); final response = await client.mutate$RemoveSshKey(mutation);
return GenericResult( return GenericResult(
success: response.parsedData?.removeSshKey.success ?? false, success: response.parsedData?.users.removeSshKey.success ?? false,
code: response.parsedData?.removeSshKey.code ?? 500, code: response.parsedData?.users.removeSshKey.code ?? 500,
message: response.parsedData?.removeSshKey.message, message: response.parsedData?.users.removeSshKey.message,
data: response.parsedData?.removeSshKey.user != null data: response.parsedData?.users.removeSshKey.user != null
? User.fromGraphQL(response.parsedData!.removeSshKey.user!) ? User.fromGraphQL(response.parsedData!.users.removeSshKey.user!)
: null, : null,
); );
} catch (e) { } catch (e) {

View File

@ -80,9 +80,9 @@ mixin VolumeApi on GraphQLApiMap {
); );
mutation = mutation = GenericResult( mutation = mutation = GenericResult(
success: true, success: true,
code: result.parsedData!.migrateToBinds.code, code: result.parsedData!.storage.migrateToBinds.code,
message: result.parsedData!.migrateToBinds.message, message: result.parsedData!.storage.migrateToBinds.message,
data: result.parsedData!.migrateToBinds.job?.uid, data: result.parsedData!.storage.migrateToBinds.job?.uid,
); );
} catch (e) { } catch (e) {
print(e); print(e);