mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-08 00:51:20 +00:00
chore: Implement fragments for ServerJob type on backup requests
This commit is contained in:
parent
7f5488c76b
commit
b3b7c83461
|
@ -50,6 +50,9 @@ mutation StartBackup($serviceId: String!) {
|
|||
backup {
|
||||
startBackup(serviceId: $serviceId) {
|
||||
...basicMutationReturnFields
|
||||
job {
|
||||
...basicApiJobsFields
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -77,3 +80,14 @@ mutation InitializeRepository($repository: InitializeRepositoryInput!) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
mutation RestoreBackup($snapshotId: String!) {
|
||||
backup {
|
||||
restoreBackup(snapshotId: $snapshotId) {
|
||||
...basicMutationReturnFields
|
||||
job {
|
||||
...basicApiJobsFields
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,9 +1,10 @@
|
|||
import 'dart:async';
|
||||
import 'disk_volumes.graphql.dart';
|
||||
import 'package:gql/ast.dart';
|
||||
import 'package:graphql/client.dart' as graphql;
|
||||
import 'package:selfprivacy/utils/scalars.dart';
|
||||
import 'schema.graphql.dart';
|
||||
import 'server_api.graphql.dart';
|
||||
import 'services.graphql.dart';
|
||||
|
||||
class Fragment$genericBackupConfigReturn {
|
||||
Fragment$genericBackupConfigReturn({
|
||||
|
@ -3003,6 +3004,25 @@ const documentNodeMutationStartBackup = DocumentNode(definitions: [
|
|||
name: NameNode(value: 'basicMutationReturnFields'),
|
||||
directives: [],
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: 'job'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: SelectionSetNode(selections: [
|
||||
FragmentSpreadNode(
|
||||
name: NameNode(value: 'basicApiJobsFields'),
|
||||
directives: [],
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: '__typename'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: null,
|
||||
),
|
||||
]),
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: '__typename'),
|
||||
alias: null,
|
||||
|
@ -3031,6 +3051,7 @@ const documentNodeMutationStartBackup = DocumentNode(definitions: [
|
|||
]),
|
||||
),
|
||||
fragmentDefinitionbasicMutationReturnFields,
|
||||
fragmentDefinitionbasicApiJobsFields,
|
||||
]);
|
||||
Mutation$StartBackup _parserFn$Mutation$StartBackup(
|
||||
Map<String, dynamic> data) =>
|
||||
|
@ -3268,6 +3289,7 @@ class Mutation$StartBackup$backup$startBackup
|
|||
required this.message,
|
||||
required this.success,
|
||||
this.$__typename = 'GenericJobMutationReturn',
|
||||
this.job,
|
||||
});
|
||||
|
||||
factory Mutation$StartBackup$backup$startBackup.fromJson(
|
||||
|
@ -3276,11 +3298,16 @@ class Mutation$StartBackup$backup$startBackup
|
|||
final l$message = json['message'];
|
||||
final l$success = json['success'];
|
||||
final l$$__typename = json['__typename'];
|
||||
final l$job = json['job'];
|
||||
return Mutation$StartBackup$backup$startBackup(
|
||||
code: (l$code as int),
|
||||
message: (l$message as String),
|
||||
success: (l$success as bool),
|
||||
$__typename: (l$$__typename as String),
|
||||
job: l$job == null
|
||||
? null
|
||||
: Fragment$basicApiJobsFields.fromJson(
|
||||
(l$job as Map<String, dynamic>)),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -3292,6 +3319,8 @@ class Mutation$StartBackup$backup$startBackup
|
|||
|
||||
final String $__typename;
|
||||
|
||||
final Fragment$basicApiJobsFields? job;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final _resultData = <String, dynamic>{};
|
||||
final l$code = code;
|
||||
|
@ -3302,6 +3331,8 @@ class Mutation$StartBackup$backup$startBackup
|
|||
_resultData['success'] = l$success;
|
||||
final l$$__typename = $__typename;
|
||||
_resultData['__typename'] = l$$__typename;
|
||||
final l$job = job;
|
||||
_resultData['job'] = l$job?.toJson();
|
||||
return _resultData;
|
||||
}
|
||||
|
||||
|
@ -3311,11 +3342,13 @@ class Mutation$StartBackup$backup$startBackup
|
|||
final l$message = message;
|
||||
final l$success = success;
|
||||
final l$$__typename = $__typename;
|
||||
final l$job = job;
|
||||
return Object.hashAll([
|
||||
l$code,
|
||||
l$message,
|
||||
l$success,
|
||||
l$$__typename,
|
||||
l$job,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -3348,6 +3381,11 @@ class Mutation$StartBackup$backup$startBackup
|
|||
if (l$$__typename != lOther$$__typename) {
|
||||
return false;
|
||||
}
|
||||
final l$job = job;
|
||||
final lOther$job = other.job;
|
||||
if (l$job != lOther$job) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -3376,7 +3414,9 @@ abstract class CopyWith$Mutation$StartBackup$backup$startBackup<TRes> {
|
|||
String? message,
|
||||
bool? success,
|
||||
String? $__typename,
|
||||
Fragment$basicApiJobsFields? job,
|
||||
});
|
||||
CopyWith$Fragment$basicApiJobsFields<TRes> get job;
|
||||
}
|
||||
|
||||
class _CopyWithImpl$Mutation$StartBackup$backup$startBackup<TRes>
|
||||
|
@ -3397,6 +3437,7 @@ class _CopyWithImpl$Mutation$StartBackup$backup$startBackup<TRes>
|
|||
Object? message = _undefined,
|
||||
Object? success = _undefined,
|
||||
Object? $__typename = _undefined,
|
||||
Object? job = _undefined,
|
||||
}) =>
|
||||
_then(Mutation$StartBackup$backup$startBackup(
|
||||
code:
|
||||
|
@ -3410,7 +3451,16 @@ class _CopyWithImpl$Mutation$StartBackup$backup$startBackup<TRes>
|
|||
$__typename: $__typename == _undefined || $__typename == null
|
||||
? _instance.$__typename
|
||||
: ($__typename as String),
|
||||
job: job == _undefined
|
||||
? _instance.job
|
||||
: (job as Fragment$basicApiJobsFields?),
|
||||
));
|
||||
CopyWith$Fragment$basicApiJobsFields<TRes> get job {
|
||||
final local$job = _instance.job;
|
||||
return local$job == null
|
||||
? CopyWith$Fragment$basicApiJobsFields.stub(_then(_instance))
|
||||
: CopyWith$Fragment$basicApiJobsFields(local$job, (e) => call(job: e));
|
||||
}
|
||||
}
|
||||
|
||||
class _CopyWithStubImpl$Mutation$StartBackup$backup$startBackup<TRes>
|
||||
|
@ -3424,8 +3474,11 @@ class _CopyWithStubImpl$Mutation$StartBackup$backup$startBackup<TRes>
|
|||
String? message,
|
||||
bool? success,
|
||||
String? $__typename,
|
||||
Fragment$basicApiJobsFields? job,
|
||||
}) =>
|
||||
_res;
|
||||
CopyWith$Fragment$basicApiJobsFields<TRes> get job =>
|
||||
CopyWith$Fragment$basicApiJobsFields.stub(_res);
|
||||
}
|
||||
|
||||
class Variables$Mutation$SetAutobackupPeriod {
|
||||
|
@ -4928,3 +4981,750 @@ class _CopyWithStubImpl$Mutation$InitializeRepository$backup<TRes>
|
|||
CopyWith$Fragment$genericBackupConfigReturn<TRes> get initializeRepository =>
|
||||
CopyWith$Fragment$genericBackupConfigReturn.stub(_res);
|
||||
}
|
||||
|
||||
class Variables$Mutation$RestoreBackup {
|
||||
factory Variables$Mutation$RestoreBackup({required String snapshotId}) =>
|
||||
Variables$Mutation$RestoreBackup._({
|
||||
r'snapshotId': snapshotId,
|
||||
});
|
||||
|
||||
Variables$Mutation$RestoreBackup._(this._$data);
|
||||
|
||||
factory Variables$Mutation$RestoreBackup.fromJson(Map<String, dynamic> data) {
|
||||
final result$data = <String, dynamic>{};
|
||||
final l$snapshotId = data['snapshotId'];
|
||||
result$data['snapshotId'] = (l$snapshotId as String);
|
||||
return Variables$Mutation$RestoreBackup._(result$data);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$data;
|
||||
|
||||
String get snapshotId => (_$data['snapshotId'] as String);
|
||||
Map<String, dynamic> toJson() {
|
||||
final result$data = <String, dynamic>{};
|
||||
final l$snapshotId = snapshotId;
|
||||
result$data['snapshotId'] = l$snapshotId;
|
||||
return result$data;
|
||||
}
|
||||
|
||||
CopyWith$Variables$Mutation$RestoreBackup<Variables$Mutation$RestoreBackup>
|
||||
get copyWith => CopyWith$Variables$Mutation$RestoreBackup(
|
||||
this,
|
||||
(i) => i,
|
||||
);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if (identical(this, other)) {
|
||||
return true;
|
||||
}
|
||||
if (!(other is Variables$Mutation$RestoreBackup) ||
|
||||
runtimeType != other.runtimeType) {
|
||||
return false;
|
||||
}
|
||||
final l$snapshotId = snapshotId;
|
||||
final lOther$snapshotId = other.snapshotId;
|
||||
if (l$snapshotId != lOther$snapshotId) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
final l$snapshotId = snapshotId;
|
||||
return Object.hashAll([l$snapshotId]);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class CopyWith$Variables$Mutation$RestoreBackup<TRes> {
|
||||
factory CopyWith$Variables$Mutation$RestoreBackup(
|
||||
Variables$Mutation$RestoreBackup instance,
|
||||
TRes Function(Variables$Mutation$RestoreBackup) then,
|
||||
) = _CopyWithImpl$Variables$Mutation$RestoreBackup;
|
||||
|
||||
factory CopyWith$Variables$Mutation$RestoreBackup.stub(TRes res) =
|
||||
_CopyWithStubImpl$Variables$Mutation$RestoreBackup;
|
||||
|
||||
TRes call({String? snapshotId});
|
||||
}
|
||||
|
||||
class _CopyWithImpl$Variables$Mutation$RestoreBackup<TRes>
|
||||
implements CopyWith$Variables$Mutation$RestoreBackup<TRes> {
|
||||
_CopyWithImpl$Variables$Mutation$RestoreBackup(
|
||||
this._instance,
|
||||
this._then,
|
||||
);
|
||||
|
||||
final Variables$Mutation$RestoreBackup _instance;
|
||||
|
||||
final TRes Function(Variables$Mutation$RestoreBackup) _then;
|
||||
|
||||
static const _undefined = <dynamic, dynamic>{};
|
||||
|
||||
TRes call({Object? snapshotId = _undefined}) =>
|
||||
_then(Variables$Mutation$RestoreBackup._({
|
||||
..._instance._$data,
|
||||
if (snapshotId != _undefined && snapshotId != null)
|
||||
'snapshotId': (snapshotId as String),
|
||||
}));
|
||||
}
|
||||
|
||||
class _CopyWithStubImpl$Variables$Mutation$RestoreBackup<TRes>
|
||||
implements CopyWith$Variables$Mutation$RestoreBackup<TRes> {
|
||||
_CopyWithStubImpl$Variables$Mutation$RestoreBackup(this._res);
|
||||
|
||||
TRes _res;
|
||||
|
||||
call({String? snapshotId}) => _res;
|
||||
}
|
||||
|
||||
class Mutation$RestoreBackup {
|
||||
Mutation$RestoreBackup({
|
||||
required this.backup,
|
||||
this.$__typename = 'Mutation',
|
||||
});
|
||||
|
||||
factory Mutation$RestoreBackup.fromJson(Map<String, dynamic> json) {
|
||||
final l$backup = json['backup'];
|
||||
final l$$__typename = json['__typename'];
|
||||
return Mutation$RestoreBackup(
|
||||
backup: Mutation$RestoreBackup$backup.fromJson(
|
||||
(l$backup as Map<String, dynamic>)),
|
||||
$__typename: (l$$__typename as String),
|
||||
);
|
||||
}
|
||||
|
||||
final Mutation$RestoreBackup$backup backup;
|
||||
|
||||
final String $__typename;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final _resultData = <String, dynamic>{};
|
||||
final l$backup = backup;
|
||||
_resultData['backup'] = l$backup.toJson();
|
||||
final l$$__typename = $__typename;
|
||||
_resultData['__typename'] = l$$__typename;
|
||||
return _resultData;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
final l$backup = backup;
|
||||
final l$$__typename = $__typename;
|
||||
return Object.hashAll([
|
||||
l$backup,
|
||||
l$$__typename,
|
||||
]);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if (identical(this, other)) {
|
||||
return true;
|
||||
}
|
||||
if (!(other is Mutation$RestoreBackup) ||
|
||||
runtimeType != other.runtimeType) {
|
||||
return false;
|
||||
}
|
||||
final l$backup = backup;
|
||||
final lOther$backup = other.backup;
|
||||
if (l$backup != lOther$backup) {
|
||||
return false;
|
||||
}
|
||||
final l$$__typename = $__typename;
|
||||
final lOther$$__typename = other.$__typename;
|
||||
if (l$$__typename != lOther$$__typename) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
extension UtilityExtension$Mutation$RestoreBackup on Mutation$RestoreBackup {
|
||||
CopyWith$Mutation$RestoreBackup<Mutation$RestoreBackup> get copyWith =>
|
||||
CopyWith$Mutation$RestoreBackup(
|
||||
this,
|
||||
(i) => i,
|
||||
);
|
||||
}
|
||||
|
||||
abstract class CopyWith$Mutation$RestoreBackup<TRes> {
|
||||
factory CopyWith$Mutation$RestoreBackup(
|
||||
Mutation$RestoreBackup instance,
|
||||
TRes Function(Mutation$RestoreBackup) then,
|
||||
) = _CopyWithImpl$Mutation$RestoreBackup;
|
||||
|
||||
factory CopyWith$Mutation$RestoreBackup.stub(TRes res) =
|
||||
_CopyWithStubImpl$Mutation$RestoreBackup;
|
||||
|
||||
TRes call({
|
||||
Mutation$RestoreBackup$backup? backup,
|
||||
String? $__typename,
|
||||
});
|
||||
CopyWith$Mutation$RestoreBackup$backup<TRes> get backup;
|
||||
}
|
||||
|
||||
class _CopyWithImpl$Mutation$RestoreBackup<TRes>
|
||||
implements CopyWith$Mutation$RestoreBackup<TRes> {
|
||||
_CopyWithImpl$Mutation$RestoreBackup(
|
||||
this._instance,
|
||||
this._then,
|
||||
);
|
||||
|
||||
final Mutation$RestoreBackup _instance;
|
||||
|
||||
final TRes Function(Mutation$RestoreBackup) _then;
|
||||
|
||||
static const _undefined = <dynamic, dynamic>{};
|
||||
|
||||
TRes call({
|
||||
Object? backup = _undefined,
|
||||
Object? $__typename = _undefined,
|
||||
}) =>
|
||||
_then(Mutation$RestoreBackup(
|
||||
backup: backup == _undefined || backup == null
|
||||
? _instance.backup
|
||||
: (backup as Mutation$RestoreBackup$backup),
|
||||
$__typename: $__typename == _undefined || $__typename == null
|
||||
? _instance.$__typename
|
||||
: ($__typename as String),
|
||||
));
|
||||
CopyWith$Mutation$RestoreBackup$backup<TRes> get backup {
|
||||
final local$backup = _instance.backup;
|
||||
return CopyWith$Mutation$RestoreBackup$backup(
|
||||
local$backup, (e) => call(backup: e));
|
||||
}
|
||||
}
|
||||
|
||||
class _CopyWithStubImpl$Mutation$RestoreBackup<TRes>
|
||||
implements CopyWith$Mutation$RestoreBackup<TRes> {
|
||||
_CopyWithStubImpl$Mutation$RestoreBackup(this._res);
|
||||
|
||||
TRes _res;
|
||||
|
||||
call({
|
||||
Mutation$RestoreBackup$backup? backup,
|
||||
String? $__typename,
|
||||
}) =>
|
||||
_res;
|
||||
CopyWith$Mutation$RestoreBackup$backup<TRes> get backup =>
|
||||
CopyWith$Mutation$RestoreBackup$backup.stub(_res);
|
||||
}
|
||||
|
||||
const documentNodeMutationRestoreBackup = DocumentNode(definitions: [
|
||||
OperationDefinitionNode(
|
||||
type: OperationType.mutation,
|
||||
name: NameNode(value: 'RestoreBackup'),
|
||||
variableDefinitions: [
|
||||
VariableDefinitionNode(
|
||||
variable: VariableNode(name: NameNode(value: 'snapshotId')),
|
||||
type: NamedTypeNode(
|
||||
name: NameNode(value: 'String'),
|
||||
isNonNull: true,
|
||||
),
|
||||
defaultValue: DefaultValueNode(value: null),
|
||||
directives: [],
|
||||
)
|
||||
],
|
||||
directives: [],
|
||||
selectionSet: SelectionSetNode(selections: [
|
||||
FieldNode(
|
||||
name: NameNode(value: 'backup'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: SelectionSetNode(selections: [
|
||||
FieldNode(
|
||||
name: NameNode(value: 'restoreBackup'),
|
||||
alias: null,
|
||||
arguments: [
|
||||
ArgumentNode(
|
||||
name: NameNode(value: 'snapshotId'),
|
||||
value: VariableNode(name: NameNode(value: 'snapshotId')),
|
||||
)
|
||||
],
|
||||
directives: [],
|
||||
selectionSet: SelectionSetNode(selections: [
|
||||
FragmentSpreadNode(
|
||||
name: NameNode(value: 'basicMutationReturnFields'),
|
||||
directives: [],
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: 'job'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: SelectionSetNode(selections: [
|
||||
FragmentSpreadNode(
|
||||
name: NameNode(value: 'basicApiJobsFields'),
|
||||
directives: [],
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: '__typename'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: null,
|
||||
),
|
||||
]),
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: '__typename'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: null,
|
||||
),
|
||||
]),
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: '__typename'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: null,
|
||||
),
|
||||
]),
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: '__typename'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: null,
|
||||
),
|
||||
]),
|
||||
),
|
||||
fragmentDefinitionbasicMutationReturnFields,
|
||||
fragmentDefinitionbasicApiJobsFields,
|
||||
]);
|
||||
Mutation$RestoreBackup _parserFn$Mutation$RestoreBackup(
|
||||
Map<String, dynamic> data) =>
|
||||
Mutation$RestoreBackup.fromJson(data);
|
||||
typedef OnMutationCompleted$Mutation$RestoreBackup = FutureOr<void> Function(
|
||||
Map<String, dynamic>?,
|
||||
Mutation$RestoreBackup?,
|
||||
);
|
||||
|
||||
class Options$Mutation$RestoreBackup
|
||||
extends graphql.MutationOptions<Mutation$RestoreBackup> {
|
||||
Options$Mutation$RestoreBackup({
|
||||
String? operationName,
|
||||
required Variables$Mutation$RestoreBackup variables,
|
||||
graphql.FetchPolicy? fetchPolicy,
|
||||
graphql.ErrorPolicy? errorPolicy,
|
||||
graphql.CacheRereadPolicy? cacheRereadPolicy,
|
||||
Object? optimisticResult,
|
||||
Mutation$RestoreBackup? typedOptimisticResult,
|
||||
graphql.Context? context,
|
||||
OnMutationCompleted$Mutation$RestoreBackup? onCompleted,
|
||||
graphql.OnMutationUpdate<Mutation$RestoreBackup>? update,
|
||||
graphql.OnError? onError,
|
||||
}) : onCompletedWithParsed = onCompleted,
|
||||
super(
|
||||
variables: variables.toJson(),
|
||||
operationName: operationName,
|
||||
fetchPolicy: fetchPolicy,
|
||||
errorPolicy: errorPolicy,
|
||||
cacheRereadPolicy: cacheRereadPolicy,
|
||||
optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(),
|
||||
context: context,
|
||||
onCompleted: onCompleted == null
|
||||
? null
|
||||
: (data) => onCompleted(
|
||||
data,
|
||||
data == null
|
||||
? null
|
||||
: _parserFn$Mutation$RestoreBackup(data),
|
||||
),
|
||||
update: update,
|
||||
onError: onError,
|
||||
document: documentNodeMutationRestoreBackup,
|
||||
parserFn: _parserFn$Mutation$RestoreBackup,
|
||||
);
|
||||
|
||||
final OnMutationCompleted$Mutation$RestoreBackup? onCompletedWithParsed;
|
||||
|
||||
@override
|
||||
List<Object?> get properties => [
|
||||
...super.onCompleted == null
|
||||
? super.properties
|
||||
: super.properties.where((property) => property != onCompleted),
|
||||
onCompletedWithParsed,
|
||||
];
|
||||
}
|
||||
|
||||
class WatchOptions$Mutation$RestoreBackup
|
||||
extends graphql.WatchQueryOptions<Mutation$RestoreBackup> {
|
||||
WatchOptions$Mutation$RestoreBackup({
|
||||
String? operationName,
|
||||
required Variables$Mutation$RestoreBackup variables,
|
||||
graphql.FetchPolicy? fetchPolicy,
|
||||
graphql.ErrorPolicy? errorPolicy,
|
||||
graphql.CacheRereadPolicy? cacheRereadPolicy,
|
||||
Object? optimisticResult,
|
||||
Mutation$RestoreBackup? typedOptimisticResult,
|
||||
graphql.Context? context,
|
||||
Duration? pollInterval,
|
||||
bool? eagerlyFetchResults,
|
||||
bool carryForwardDataOnException = true,
|
||||
bool fetchResults = false,
|
||||
}) : super(
|
||||
variables: variables.toJson(),
|
||||
operationName: operationName,
|
||||
fetchPolicy: fetchPolicy,
|
||||
errorPolicy: errorPolicy,
|
||||
cacheRereadPolicy: cacheRereadPolicy,
|
||||
optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(),
|
||||
context: context,
|
||||
document: documentNodeMutationRestoreBackup,
|
||||
pollInterval: pollInterval,
|
||||
eagerlyFetchResults: eagerlyFetchResults,
|
||||
carryForwardDataOnException: carryForwardDataOnException,
|
||||
fetchResults: fetchResults,
|
||||
parserFn: _parserFn$Mutation$RestoreBackup,
|
||||
);
|
||||
}
|
||||
|
||||
extension ClientExtension$Mutation$RestoreBackup on graphql.GraphQLClient {
|
||||
Future<graphql.QueryResult<Mutation$RestoreBackup>> mutate$RestoreBackup(
|
||||
Options$Mutation$RestoreBackup options) async =>
|
||||
await this.mutate(options);
|
||||
graphql.ObservableQuery<Mutation$RestoreBackup> watchMutation$RestoreBackup(
|
||||
WatchOptions$Mutation$RestoreBackup options) =>
|
||||
this.watchMutation(options);
|
||||
}
|
||||
|
||||
class Mutation$RestoreBackup$backup {
|
||||
Mutation$RestoreBackup$backup({
|
||||
required this.restoreBackup,
|
||||
this.$__typename = 'BackupMutations',
|
||||
});
|
||||
|
||||
factory Mutation$RestoreBackup$backup.fromJson(Map<String, dynamic> json) {
|
||||
final l$restoreBackup = json['restoreBackup'];
|
||||
final l$$__typename = json['__typename'];
|
||||
return Mutation$RestoreBackup$backup(
|
||||
restoreBackup: Mutation$RestoreBackup$backup$restoreBackup.fromJson(
|
||||
(l$restoreBackup as Map<String, dynamic>)),
|
||||
$__typename: (l$$__typename as String),
|
||||
);
|
||||
}
|
||||
|
||||
final Mutation$RestoreBackup$backup$restoreBackup restoreBackup;
|
||||
|
||||
final String $__typename;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final _resultData = <String, dynamic>{};
|
||||
final l$restoreBackup = restoreBackup;
|
||||
_resultData['restoreBackup'] = l$restoreBackup.toJson();
|
||||
final l$$__typename = $__typename;
|
||||
_resultData['__typename'] = l$$__typename;
|
||||
return _resultData;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
final l$restoreBackup = restoreBackup;
|
||||
final l$$__typename = $__typename;
|
||||
return Object.hashAll([
|
||||
l$restoreBackup,
|
||||
l$$__typename,
|
||||
]);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if (identical(this, other)) {
|
||||
return true;
|
||||
}
|
||||
if (!(other is Mutation$RestoreBackup$backup) ||
|
||||
runtimeType != other.runtimeType) {
|
||||
return false;
|
||||
}
|
||||
final l$restoreBackup = restoreBackup;
|
||||
final lOther$restoreBackup = other.restoreBackup;
|
||||
if (l$restoreBackup != lOther$restoreBackup) {
|
||||
return false;
|
||||
}
|
||||
final l$$__typename = $__typename;
|
||||
final lOther$$__typename = other.$__typename;
|
||||
if (l$$__typename != lOther$$__typename) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
extension UtilityExtension$Mutation$RestoreBackup$backup
|
||||
on Mutation$RestoreBackup$backup {
|
||||
CopyWith$Mutation$RestoreBackup$backup<Mutation$RestoreBackup$backup>
|
||||
get copyWith => CopyWith$Mutation$RestoreBackup$backup(
|
||||
this,
|
||||
(i) => i,
|
||||
);
|
||||
}
|
||||
|
||||
abstract class CopyWith$Mutation$RestoreBackup$backup<TRes> {
|
||||
factory CopyWith$Mutation$RestoreBackup$backup(
|
||||
Mutation$RestoreBackup$backup instance,
|
||||
TRes Function(Mutation$RestoreBackup$backup) then,
|
||||
) = _CopyWithImpl$Mutation$RestoreBackup$backup;
|
||||
|
||||
factory CopyWith$Mutation$RestoreBackup$backup.stub(TRes res) =
|
||||
_CopyWithStubImpl$Mutation$RestoreBackup$backup;
|
||||
|
||||
TRes call({
|
||||
Mutation$RestoreBackup$backup$restoreBackup? restoreBackup,
|
||||
String? $__typename,
|
||||
});
|
||||
CopyWith$Mutation$RestoreBackup$backup$restoreBackup<TRes> get restoreBackup;
|
||||
}
|
||||
|
||||
class _CopyWithImpl$Mutation$RestoreBackup$backup<TRes>
|
||||
implements CopyWith$Mutation$RestoreBackup$backup<TRes> {
|
||||
_CopyWithImpl$Mutation$RestoreBackup$backup(
|
||||
this._instance,
|
||||
this._then,
|
||||
);
|
||||
|
||||
final Mutation$RestoreBackup$backup _instance;
|
||||
|
||||
final TRes Function(Mutation$RestoreBackup$backup) _then;
|
||||
|
||||
static const _undefined = <dynamic, dynamic>{};
|
||||
|
||||
TRes call({
|
||||
Object? restoreBackup = _undefined,
|
||||
Object? $__typename = _undefined,
|
||||
}) =>
|
||||
_then(Mutation$RestoreBackup$backup(
|
||||
restoreBackup: restoreBackup == _undefined || restoreBackup == null
|
||||
? _instance.restoreBackup
|
||||
: (restoreBackup as Mutation$RestoreBackup$backup$restoreBackup),
|
||||
$__typename: $__typename == _undefined || $__typename == null
|
||||
? _instance.$__typename
|
||||
: ($__typename as String),
|
||||
));
|
||||
CopyWith$Mutation$RestoreBackup$backup$restoreBackup<TRes> get restoreBackup {
|
||||
final local$restoreBackup = _instance.restoreBackup;
|
||||
return CopyWith$Mutation$RestoreBackup$backup$restoreBackup(
|
||||
local$restoreBackup, (e) => call(restoreBackup: e));
|
||||
}
|
||||
}
|
||||
|
||||
class _CopyWithStubImpl$Mutation$RestoreBackup$backup<TRes>
|
||||
implements CopyWith$Mutation$RestoreBackup$backup<TRes> {
|
||||
_CopyWithStubImpl$Mutation$RestoreBackup$backup(this._res);
|
||||
|
||||
TRes _res;
|
||||
|
||||
call({
|
||||
Mutation$RestoreBackup$backup$restoreBackup? restoreBackup,
|
||||
String? $__typename,
|
||||
}) =>
|
||||
_res;
|
||||
CopyWith$Mutation$RestoreBackup$backup$restoreBackup<TRes>
|
||||
get restoreBackup =>
|
||||
CopyWith$Mutation$RestoreBackup$backup$restoreBackup.stub(_res);
|
||||
}
|
||||
|
||||
class Mutation$RestoreBackup$backup$restoreBackup
|
||||
implements Fragment$basicMutationReturnFields$$GenericJobMutationReturn {
|
||||
Mutation$RestoreBackup$backup$restoreBackup({
|
||||
required this.code,
|
||||
required this.message,
|
||||
required this.success,
|
||||
this.$__typename = 'GenericJobMutationReturn',
|
||||
this.job,
|
||||
});
|
||||
|
||||
factory Mutation$RestoreBackup$backup$restoreBackup.fromJson(
|
||||
Map<String, dynamic> json) {
|
||||
final l$code = json['code'];
|
||||
final l$message = json['message'];
|
||||
final l$success = json['success'];
|
||||
final l$$__typename = json['__typename'];
|
||||
final l$job = json['job'];
|
||||
return Mutation$RestoreBackup$backup$restoreBackup(
|
||||
code: (l$code as int),
|
||||
message: (l$message as String),
|
||||
success: (l$success as bool),
|
||||
$__typename: (l$$__typename as String),
|
||||
job: l$job == null
|
||||
? null
|
||||
: Fragment$basicApiJobsFields.fromJson(
|
||||
(l$job as Map<String, dynamic>)),
|
||||
);
|
||||
}
|
||||
|
||||
final int code;
|
||||
|
||||
final String message;
|
||||
|
||||
final bool success;
|
||||
|
||||
final String $__typename;
|
||||
|
||||
final Fragment$basicApiJobsFields? job;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final _resultData = <String, dynamic>{};
|
||||
final l$code = code;
|
||||
_resultData['code'] = l$code;
|
||||
final l$message = message;
|
||||
_resultData['message'] = l$message;
|
||||
final l$success = success;
|
||||
_resultData['success'] = l$success;
|
||||
final l$$__typename = $__typename;
|
||||
_resultData['__typename'] = l$$__typename;
|
||||
final l$job = job;
|
||||
_resultData['job'] = l$job?.toJson();
|
||||
return _resultData;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
final l$code = code;
|
||||
final l$message = message;
|
||||
final l$success = success;
|
||||
final l$$__typename = $__typename;
|
||||
final l$job = job;
|
||||
return Object.hashAll([
|
||||
l$code,
|
||||
l$message,
|
||||
l$success,
|
||||
l$$__typename,
|
||||
l$job,
|
||||
]);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if (identical(this, other)) {
|
||||
return true;
|
||||
}
|
||||
if (!(other is Mutation$RestoreBackup$backup$restoreBackup) ||
|
||||
runtimeType != other.runtimeType) {
|
||||
return false;
|
||||
}
|
||||
final l$code = code;
|
||||
final lOther$code = other.code;
|
||||
if (l$code != lOther$code) {
|
||||
return false;
|
||||
}
|
||||
final l$message = message;
|
||||
final lOther$message = other.message;
|
||||
if (l$message != lOther$message) {
|
||||
return false;
|
||||
}
|
||||
final l$success = success;
|
||||
final lOther$success = other.success;
|
||||
if (l$success != lOther$success) {
|
||||
return false;
|
||||
}
|
||||
final l$$__typename = $__typename;
|
||||
final lOther$$__typename = other.$__typename;
|
||||
if (l$$__typename != lOther$$__typename) {
|
||||
return false;
|
||||
}
|
||||
final l$job = job;
|
||||
final lOther$job = other.job;
|
||||
if (l$job != lOther$job) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
extension UtilityExtension$Mutation$RestoreBackup$backup$restoreBackup
|
||||
on Mutation$RestoreBackup$backup$restoreBackup {
|
||||
CopyWith$Mutation$RestoreBackup$backup$restoreBackup<
|
||||
Mutation$RestoreBackup$backup$restoreBackup>
|
||||
get copyWith => CopyWith$Mutation$RestoreBackup$backup$restoreBackup(
|
||||
this,
|
||||
(i) => i,
|
||||
);
|
||||
}
|
||||
|
||||
abstract class CopyWith$Mutation$RestoreBackup$backup$restoreBackup<TRes> {
|
||||
factory CopyWith$Mutation$RestoreBackup$backup$restoreBackup(
|
||||
Mutation$RestoreBackup$backup$restoreBackup instance,
|
||||
TRes Function(Mutation$RestoreBackup$backup$restoreBackup) then,
|
||||
) = _CopyWithImpl$Mutation$RestoreBackup$backup$restoreBackup;
|
||||
|
||||
factory CopyWith$Mutation$RestoreBackup$backup$restoreBackup.stub(TRes res) =
|
||||
_CopyWithStubImpl$Mutation$RestoreBackup$backup$restoreBackup;
|
||||
|
||||
TRes call({
|
||||
int? code,
|
||||
String? message,
|
||||
bool? success,
|
||||
String? $__typename,
|
||||
Fragment$basicApiJobsFields? job,
|
||||
});
|
||||
CopyWith$Fragment$basicApiJobsFields<TRes> get job;
|
||||
}
|
||||
|
||||
class _CopyWithImpl$Mutation$RestoreBackup$backup$restoreBackup<TRes>
|
||||
implements CopyWith$Mutation$RestoreBackup$backup$restoreBackup<TRes> {
|
||||
_CopyWithImpl$Mutation$RestoreBackup$backup$restoreBackup(
|
||||
this._instance,
|
||||
this._then,
|
||||
);
|
||||
|
||||
final Mutation$RestoreBackup$backup$restoreBackup _instance;
|
||||
|
||||
final TRes Function(Mutation$RestoreBackup$backup$restoreBackup) _then;
|
||||
|
||||
static const _undefined = <dynamic, dynamic>{};
|
||||
|
||||
TRes call({
|
||||
Object? code = _undefined,
|
||||
Object? message = _undefined,
|
||||
Object? success = _undefined,
|
||||
Object? $__typename = _undefined,
|
||||
Object? job = _undefined,
|
||||
}) =>
|
||||
_then(Mutation$RestoreBackup$backup$restoreBackup(
|
||||
code:
|
||||
code == _undefined || code == null ? _instance.code : (code as int),
|
||||
message: message == _undefined || message == null
|
||||
? _instance.message
|
||||
: (message as String),
|
||||
success: success == _undefined || success == null
|
||||
? _instance.success
|
||||
: (success as bool),
|
||||
$__typename: $__typename == _undefined || $__typename == null
|
||||
? _instance.$__typename
|
||||
: ($__typename as String),
|
||||
job: job == _undefined
|
||||
? _instance.job
|
||||
: (job as Fragment$basicApiJobsFields?),
|
||||
));
|
||||
CopyWith$Fragment$basicApiJobsFields<TRes> get job {
|
||||
final local$job = _instance.job;
|
||||
return local$job == null
|
||||
? CopyWith$Fragment$basicApiJobsFields.stub(_then(_instance))
|
||||
: CopyWith$Fragment$basicApiJobsFields(local$job, (e) => call(job: e));
|
||||
}
|
||||
}
|
||||
|
||||
class _CopyWithStubImpl$Mutation$RestoreBackup$backup$restoreBackup<TRes>
|
||||
implements CopyWith$Mutation$RestoreBackup$backup$restoreBackup<TRes> {
|
||||
_CopyWithStubImpl$Mutation$RestoreBackup$backup$restoreBackup(this._res);
|
||||
|
||||
TRes _res;
|
||||
|
||||
call({
|
||||
int? code,
|
||||
String? message,
|
||||
bool? success,
|
||||
String? $__typename,
|
||||
Fragment$basicApiJobsFields? job,
|
||||
}) =>
|
||||
_res;
|
||||
CopyWith$Fragment$basicApiJobsFields<TRes> get job =>
|
||||
CopyWith$Fragment$basicApiJobsFields.stub(_res);
|
||||
}
|
||||
|
|
|
@ -53,17 +53,7 @@ mutation MigrateToBinds($input: MigrateToBindsInput!) {
|
|||
migrateToBinds(input: $input) {
|
||||
...basicMutationReturnFields
|
||||
job {
|
||||
createdAt
|
||||
description
|
||||
error
|
||||
finishedAt
|
||||
name
|
||||
progress
|
||||
result
|
||||
status
|
||||
statusText
|
||||
uid
|
||||
updatedAt
|
||||
...basicApiJobsFields
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import 'dart:async';
|
||||
import 'package:gql/ast.dart';
|
||||
import 'package:graphql/client.dart' as graphql;
|
||||
import 'package:selfprivacy/utils/scalars.dart';
|
||||
import 'schema.graphql.dart';
|
||||
import 'server_api.graphql.dart';
|
||||
import 'services.graphql.dart';
|
||||
|
||||
class Fragment$basicMutationReturnFields {
|
||||
Fragment$basicMutationReturnFields({
|
||||
|
@ -5679,82 +5680,9 @@ const documentNodeMutationMigrateToBinds = DocumentNode(definitions: [
|
|||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: SelectionSetNode(selections: [
|
||||
FieldNode(
|
||||
name: NameNode(value: 'createdAt'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
FragmentSpreadNode(
|
||||
name: NameNode(value: 'basicApiJobsFields'),
|
||||
directives: [],
|
||||
selectionSet: null,
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: 'description'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: null,
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: 'error'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: null,
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: 'finishedAt'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: null,
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: 'name'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: null,
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: 'progress'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: null,
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: 'result'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: null,
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: 'status'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: null,
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: 'statusText'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: null,
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: 'uid'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: null,
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: 'updatedAt'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: null,
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: '__typename'),
|
||||
|
@ -5784,6 +5712,7 @@ const documentNodeMutationMigrateToBinds = DocumentNode(definitions: [
|
|||
]),
|
||||
),
|
||||
fragmentDefinitionbasicMutationReturnFields,
|
||||
fragmentDefinitionbasicApiJobsFields,
|
||||
]);
|
||||
Mutation$MigrateToBinds _parserFn$Mutation$MigrateToBinds(
|
||||
Map<String, dynamic> data) =>
|
||||
|
@ -5906,7 +5835,7 @@ class Mutation$MigrateToBinds$migrateToBinds
|
|||
$__typename: (l$$__typename as String),
|
||||
job: l$job == null
|
||||
? null
|
||||
: Mutation$MigrateToBinds$migrateToBinds$job.fromJson(
|
||||
: Fragment$basicApiJobsFields.fromJson(
|
||||
(l$job as Map<String, dynamic>)),
|
||||
);
|
||||
}
|
||||
|
@ -5919,7 +5848,7 @@ class Mutation$MigrateToBinds$migrateToBinds
|
|||
|
||||
final String $__typename;
|
||||
|
||||
final Mutation$MigrateToBinds$migrateToBinds$job? job;
|
||||
final Fragment$basicApiJobsFields? job;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final _resultData = <String, dynamic>{};
|
||||
|
@ -6014,9 +5943,9 @@ abstract class CopyWith$Mutation$MigrateToBinds$migrateToBinds<TRes> {
|
|||
String? message,
|
||||
bool? success,
|
||||
String? $__typename,
|
||||
Mutation$MigrateToBinds$migrateToBinds$job? job,
|
||||
Fragment$basicApiJobsFields? job,
|
||||
});
|
||||
CopyWith$Mutation$MigrateToBinds$migrateToBinds$job<TRes> get job;
|
||||
CopyWith$Fragment$basicApiJobsFields<TRes> get job;
|
||||
}
|
||||
|
||||
class _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds<TRes>
|
||||
|
@ -6053,15 +5982,13 @@ class _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds<TRes>
|
|||
: ($__typename as String),
|
||||
job: job == _undefined
|
||||
? _instance.job
|
||||
: (job as Mutation$MigrateToBinds$migrateToBinds$job?),
|
||||
: (job as Fragment$basicApiJobsFields?),
|
||||
));
|
||||
CopyWith$Mutation$MigrateToBinds$migrateToBinds$job<TRes> get job {
|
||||
CopyWith$Fragment$basicApiJobsFields<TRes> get job {
|
||||
final local$job = _instance.job;
|
||||
return local$job == null
|
||||
? CopyWith$Mutation$MigrateToBinds$migrateToBinds$job.stub(
|
||||
_then(_instance))
|
||||
: CopyWith$Mutation$MigrateToBinds$migrateToBinds$job(
|
||||
local$job, (e) => call(job: e));
|
||||
? CopyWith$Fragment$basicApiJobsFields.stub(_then(_instance))
|
||||
: CopyWith$Fragment$basicApiJobsFields(local$job, (e) => call(job: e));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6076,330 +6003,9 @@ class _CopyWithStubImpl$Mutation$MigrateToBinds$migrateToBinds<TRes>
|
|||
String? message,
|
||||
bool? success,
|
||||
String? $__typename,
|
||||
Mutation$MigrateToBinds$migrateToBinds$job? job,
|
||||
}) =>
|
||||
_res;
|
||||
CopyWith$Mutation$MigrateToBinds$migrateToBinds$job<TRes> get job =>
|
||||
CopyWith$Mutation$MigrateToBinds$migrateToBinds$job.stub(_res);
|
||||
}
|
||||
|
||||
class Mutation$MigrateToBinds$migrateToBinds$job {
|
||||
Mutation$MigrateToBinds$migrateToBinds$job({
|
||||
required this.createdAt,
|
||||
required this.description,
|
||||
this.error,
|
||||
this.finishedAt,
|
||||
required this.name,
|
||||
this.progress,
|
||||
this.result,
|
||||
required this.status,
|
||||
this.statusText,
|
||||
required this.uid,
|
||||
required this.updatedAt,
|
||||
this.$__typename = 'ApiJob',
|
||||
});
|
||||
|
||||
factory Mutation$MigrateToBinds$migrateToBinds$job.fromJson(
|
||||
Map<String, dynamic> json) {
|
||||
final l$createdAt = json['createdAt'];
|
||||
final l$description = json['description'];
|
||||
final l$error = json['error'];
|
||||
final l$finishedAt = json['finishedAt'];
|
||||
final l$name = json['name'];
|
||||
final l$progress = json['progress'];
|
||||
final l$result = json['result'];
|
||||
final l$status = json['status'];
|
||||
final l$statusText = json['statusText'];
|
||||
final l$uid = json['uid'];
|
||||
final l$updatedAt = json['updatedAt'];
|
||||
final l$$__typename = json['__typename'];
|
||||
return Mutation$MigrateToBinds$migrateToBinds$job(
|
||||
createdAt: dateTimeFromJson(l$createdAt),
|
||||
description: (l$description as String),
|
||||
error: (l$error as String?),
|
||||
finishedAt: l$finishedAt == null ? null : dateTimeFromJson(l$finishedAt),
|
||||
name: (l$name as String),
|
||||
progress: (l$progress as int?),
|
||||
result: (l$result as String?),
|
||||
status: (l$status as String),
|
||||
statusText: (l$statusText as String?),
|
||||
uid: (l$uid as String),
|
||||
updatedAt: dateTimeFromJson(l$updatedAt),
|
||||
$__typename: (l$$__typename as String),
|
||||
);
|
||||
}
|
||||
|
||||
final DateTime createdAt;
|
||||
|
||||
final String description;
|
||||
|
||||
final String? error;
|
||||
|
||||
final DateTime? finishedAt;
|
||||
|
||||
final String name;
|
||||
|
||||
final int? progress;
|
||||
|
||||
final String? result;
|
||||
|
||||
final String status;
|
||||
|
||||
final String? statusText;
|
||||
|
||||
final String uid;
|
||||
|
||||
final DateTime updatedAt;
|
||||
|
||||
final String $__typename;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final _resultData = <String, dynamic>{};
|
||||
final l$createdAt = createdAt;
|
||||
_resultData['createdAt'] = dateTimeToJson(l$createdAt);
|
||||
final l$description = description;
|
||||
_resultData['description'] = l$description;
|
||||
final l$error = error;
|
||||
_resultData['error'] = l$error;
|
||||
final l$finishedAt = finishedAt;
|
||||
_resultData['finishedAt'] =
|
||||
l$finishedAt == null ? null : dateTimeToJson(l$finishedAt);
|
||||
final l$name = name;
|
||||
_resultData['name'] = l$name;
|
||||
final l$progress = progress;
|
||||
_resultData['progress'] = l$progress;
|
||||
final l$result = result;
|
||||
_resultData['result'] = l$result;
|
||||
final l$status = status;
|
||||
_resultData['status'] = l$status;
|
||||
final l$statusText = statusText;
|
||||
_resultData['statusText'] = l$statusText;
|
||||
final l$uid = uid;
|
||||
_resultData['uid'] = l$uid;
|
||||
final l$updatedAt = updatedAt;
|
||||
_resultData['updatedAt'] = dateTimeToJson(l$updatedAt);
|
||||
final l$$__typename = $__typename;
|
||||
_resultData['__typename'] = l$$__typename;
|
||||
return _resultData;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
final l$createdAt = createdAt;
|
||||
final l$description = description;
|
||||
final l$error = error;
|
||||
final l$finishedAt = finishedAt;
|
||||
final l$name = name;
|
||||
final l$progress = progress;
|
||||
final l$result = result;
|
||||
final l$status = status;
|
||||
final l$statusText = statusText;
|
||||
final l$uid = uid;
|
||||
final l$updatedAt = updatedAt;
|
||||
final l$$__typename = $__typename;
|
||||
return Object.hashAll([
|
||||
l$createdAt,
|
||||
l$description,
|
||||
l$error,
|
||||
l$finishedAt,
|
||||
l$name,
|
||||
l$progress,
|
||||
l$result,
|
||||
l$status,
|
||||
l$statusText,
|
||||
l$uid,
|
||||
l$updatedAt,
|
||||
l$$__typename,
|
||||
]);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if (identical(this, other)) {
|
||||
return true;
|
||||
}
|
||||
if (!(other is Mutation$MigrateToBinds$migrateToBinds$job) ||
|
||||
runtimeType != other.runtimeType) {
|
||||
return false;
|
||||
}
|
||||
final l$createdAt = createdAt;
|
||||
final lOther$createdAt = other.createdAt;
|
||||
if (l$createdAt != lOther$createdAt) {
|
||||
return false;
|
||||
}
|
||||
final l$description = description;
|
||||
final lOther$description = other.description;
|
||||
if (l$description != lOther$description) {
|
||||
return false;
|
||||
}
|
||||
final l$error = error;
|
||||
final lOther$error = other.error;
|
||||
if (l$error != lOther$error) {
|
||||
return false;
|
||||
}
|
||||
final l$finishedAt = finishedAt;
|
||||
final lOther$finishedAt = other.finishedAt;
|
||||
if (l$finishedAt != lOther$finishedAt) {
|
||||
return false;
|
||||
}
|
||||
final l$name = name;
|
||||
final lOther$name = other.name;
|
||||
if (l$name != lOther$name) {
|
||||
return false;
|
||||
}
|
||||
final l$progress = progress;
|
||||
final lOther$progress = other.progress;
|
||||
if (l$progress != lOther$progress) {
|
||||
return false;
|
||||
}
|
||||
final l$result = result;
|
||||
final lOther$result = other.result;
|
||||
if (l$result != lOther$result) {
|
||||
return false;
|
||||
}
|
||||
final l$status = status;
|
||||
final lOther$status = other.status;
|
||||
if (l$status != lOther$status) {
|
||||
return false;
|
||||
}
|
||||
final l$statusText = statusText;
|
||||
final lOther$statusText = other.statusText;
|
||||
if (l$statusText != lOther$statusText) {
|
||||
return false;
|
||||
}
|
||||
final l$uid = uid;
|
||||
final lOther$uid = other.uid;
|
||||
if (l$uid != lOther$uid) {
|
||||
return false;
|
||||
}
|
||||
final l$updatedAt = updatedAt;
|
||||
final lOther$updatedAt = other.updatedAt;
|
||||
if (l$updatedAt != lOther$updatedAt) {
|
||||
return false;
|
||||
}
|
||||
final l$$__typename = $__typename;
|
||||
final lOther$$__typename = other.$__typename;
|
||||
if (l$$__typename != lOther$$__typename) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
extension UtilityExtension$Mutation$MigrateToBinds$migrateToBinds$job
|
||||
on Mutation$MigrateToBinds$migrateToBinds$job {
|
||||
CopyWith$Mutation$MigrateToBinds$migrateToBinds$job<
|
||||
Mutation$MigrateToBinds$migrateToBinds$job>
|
||||
get copyWith => CopyWith$Mutation$MigrateToBinds$migrateToBinds$job(
|
||||
this,
|
||||
(i) => i,
|
||||
);
|
||||
}
|
||||
|
||||
abstract class CopyWith$Mutation$MigrateToBinds$migrateToBinds$job<TRes> {
|
||||
factory CopyWith$Mutation$MigrateToBinds$migrateToBinds$job(
|
||||
Mutation$MigrateToBinds$migrateToBinds$job instance,
|
||||
TRes Function(Mutation$MigrateToBinds$migrateToBinds$job) then,
|
||||
) = _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds$job;
|
||||
|
||||
factory CopyWith$Mutation$MigrateToBinds$migrateToBinds$job.stub(TRes res) =
|
||||
_CopyWithStubImpl$Mutation$MigrateToBinds$migrateToBinds$job;
|
||||
|
||||
TRes call({
|
||||
DateTime? createdAt,
|
||||
String? description,
|
||||
String? error,
|
||||
DateTime? finishedAt,
|
||||
String? name,
|
||||
int? progress,
|
||||
String? result,
|
||||
String? status,
|
||||
String? statusText,
|
||||
String? uid,
|
||||
DateTime? updatedAt,
|
||||
String? $__typename,
|
||||
});
|
||||
}
|
||||
|
||||
class _CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds$job<TRes>
|
||||
implements CopyWith$Mutation$MigrateToBinds$migrateToBinds$job<TRes> {
|
||||
_CopyWithImpl$Mutation$MigrateToBinds$migrateToBinds$job(
|
||||
this._instance,
|
||||
this._then,
|
||||
);
|
||||
|
||||
final Mutation$MigrateToBinds$migrateToBinds$job _instance;
|
||||
|
||||
final TRes Function(Mutation$MigrateToBinds$migrateToBinds$job) _then;
|
||||
|
||||
static const _undefined = <dynamic, dynamic>{};
|
||||
|
||||
TRes call({
|
||||
Object? createdAt = _undefined,
|
||||
Object? description = _undefined,
|
||||
Object? error = _undefined,
|
||||
Object? finishedAt = _undefined,
|
||||
Object? name = _undefined,
|
||||
Object? progress = _undefined,
|
||||
Object? result = _undefined,
|
||||
Object? status = _undefined,
|
||||
Object? statusText = _undefined,
|
||||
Object? uid = _undefined,
|
||||
Object? updatedAt = _undefined,
|
||||
Object? $__typename = _undefined,
|
||||
}) =>
|
||||
_then(Mutation$MigrateToBinds$migrateToBinds$job(
|
||||
createdAt: createdAt == _undefined || createdAt == null
|
||||
? _instance.createdAt
|
||||
: (createdAt as DateTime),
|
||||
description: description == _undefined || description == null
|
||||
? _instance.description
|
||||
: (description as String),
|
||||
error: error == _undefined ? _instance.error : (error as String?),
|
||||
finishedAt: finishedAt == _undefined
|
||||
? _instance.finishedAt
|
||||
: (finishedAt as DateTime?),
|
||||
name: name == _undefined || name == null
|
||||
? _instance.name
|
||||
: (name as String),
|
||||
progress:
|
||||
progress == _undefined ? _instance.progress : (progress as int?),
|
||||
result: result == _undefined ? _instance.result : (result as String?),
|
||||
status: status == _undefined || status == null
|
||||
? _instance.status
|
||||
: (status as String),
|
||||
statusText: statusText == _undefined
|
||||
? _instance.statusText
|
||||
: (statusText as String?),
|
||||
uid: uid == _undefined || uid == null ? _instance.uid : (uid as String),
|
||||
updatedAt: updatedAt == _undefined || updatedAt == null
|
||||
? _instance.updatedAt
|
||||
: (updatedAt as DateTime),
|
||||
$__typename: $__typename == _undefined || $__typename == null
|
||||
? _instance.$__typename
|
||||
: ($__typename as String),
|
||||
));
|
||||
}
|
||||
|
||||
class _CopyWithStubImpl$Mutation$MigrateToBinds$migrateToBinds$job<TRes>
|
||||
implements CopyWith$Mutation$MigrateToBinds$migrateToBinds$job<TRes> {
|
||||
_CopyWithStubImpl$Mutation$MigrateToBinds$migrateToBinds$job(this._res);
|
||||
|
||||
TRes _res;
|
||||
|
||||
call({
|
||||
DateTime? createdAt,
|
||||
String? description,
|
||||
String? error,
|
||||
DateTime? finishedAt,
|
||||
String? name,
|
||||
int? progress,
|
||||
String? result,
|
||||
String? status,
|
||||
String? statusText,
|
||||
String? uid,
|
||||
DateTime? updatedAt,
|
||||
String? $__typename,
|
||||
Fragment$basicApiJobsFields? job,
|
||||
}) =>
|
||||
_res;
|
||||
CopyWith$Fragment$basicApiJobsFields<TRes> get job =>
|
||||
CopyWith$Fragment$basicApiJobsFields.stub(_res);
|
||||
}
|
||||
|
|
|
@ -4,6 +4,21 @@ fragment basicMutationReturnFields on MutationReturnInterface{
|
|||
success
|
||||
}
|
||||
|
||||
fragment basicApiJobsFields on ApiJob{
|
||||
createdAt
|
||||
description
|
||||
error
|
||||
finishedAt
|
||||
name
|
||||
progress
|
||||
result
|
||||
status
|
||||
statusText
|
||||
uid
|
||||
typeId
|
||||
updatedAt
|
||||
}
|
||||
|
||||
query GetApiVersion {
|
||||
api {
|
||||
version
|
||||
|
@ -13,18 +28,7 @@ query GetApiVersion {
|
|||
query GetApiJobs {
|
||||
jobs {
|
||||
getJobs {
|
||||
createdAt
|
||||
description
|
||||
error
|
||||
finishedAt
|
||||
name
|
||||
progress
|
||||
result
|
||||
status
|
||||
statusText
|
||||
uid
|
||||
typeId
|
||||
updatedAt
|
||||
...basicApiJobsFields
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,8 +1,8 @@
|
|||
import 'dart:async';
|
||||
import 'disk_volumes.graphql.dart';
|
||||
import 'package:gql/ast.dart';
|
||||
import 'package:graphql/client.dart' as graphql;
|
||||
import 'schema.graphql.dart';
|
||||
import 'services.graphql.dart';
|
||||
|
||||
class Fragment$basicMutationReturnFields {
|
||||
Fragment$basicMutationReturnFields({
|
||||
|
|
|
@ -65,17 +65,7 @@ mutation MoveService($input: MoveServiceInput!) {
|
|||
moveService(input: $input) {
|
||||
...basicMutationReturnFields
|
||||
job {
|
||||
createdAt
|
||||
description
|
||||
error
|
||||
finishedAt
|
||||
name
|
||||
progress
|
||||
result
|
||||
status
|
||||
statusText
|
||||
uid
|
||||
updatedAt
|
||||
...basicApiJobsFields
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
import 'dart:async';
|
||||
import 'disk_volumes.graphql.dart';
|
||||
import 'package:gql/ast.dart';
|
||||
import 'package:graphql/client.dart' as graphql;
|
||||
import 'package:selfprivacy/utils/scalars.dart';
|
||||
import 'schema.graphql.dart';
|
||||
import 'server_api.graphql.dart';
|
||||
import 'server_settings.graphql.dart';
|
||||
|
||||
class Fragment$basicMutationReturnFields {
|
||||
|
@ -2496,6 +2495,13 @@ const documentNodeQueryAllServices = DocumentNode(definitions: [
|
|||
directives: [],
|
||||
selectionSet: null,
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: 'canBeBackedUp'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: null,
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: 'status'),
|
||||
alias: null,
|
||||
|
@ -2877,6 +2883,7 @@ class Query$AllServices$services$allServices {
|
|||
required this.isEnabled,
|
||||
required this.isMovable,
|
||||
required this.isRequired,
|
||||
required this.canBeBackedUp,
|
||||
required this.status,
|
||||
required this.storageUsage,
|
||||
required this.svgIcon,
|
||||
|
@ -2893,6 +2900,7 @@ class Query$AllServices$services$allServices {
|
|||
final l$isEnabled = json['isEnabled'];
|
||||
final l$isMovable = json['isMovable'];
|
||||
final l$isRequired = json['isRequired'];
|
||||
final l$canBeBackedUp = json['canBeBackedUp'];
|
||||
final l$status = json['status'];
|
||||
final l$storageUsage = json['storageUsage'];
|
||||
final l$svgIcon = json['svgIcon'];
|
||||
|
@ -2909,6 +2917,7 @@ class Query$AllServices$services$allServices {
|
|||
isEnabled: (l$isEnabled as bool),
|
||||
isMovable: (l$isMovable as bool),
|
||||
isRequired: (l$isRequired as bool),
|
||||
canBeBackedUp: (l$canBeBackedUp as bool),
|
||||
status: fromJson$Enum$ServiceStatusEnum((l$status as String)),
|
||||
storageUsage:
|
||||
Query$AllServices$services$allServices$storageUsage.fromJson(
|
||||
|
@ -2933,6 +2942,8 @@ class Query$AllServices$services$allServices {
|
|||
|
||||
final bool isRequired;
|
||||
|
||||
final bool canBeBackedUp;
|
||||
|
||||
final Enum$ServiceStatusEnum status;
|
||||
|
||||
final Query$AllServices$services$allServices$storageUsage storageUsage;
|
||||
|
@ -2959,6 +2970,8 @@ class Query$AllServices$services$allServices {
|
|||
_resultData['isMovable'] = l$isMovable;
|
||||
final l$isRequired = isRequired;
|
||||
_resultData['isRequired'] = l$isRequired;
|
||||
final l$canBeBackedUp = canBeBackedUp;
|
||||
_resultData['canBeBackedUp'] = l$canBeBackedUp;
|
||||
final l$status = status;
|
||||
_resultData['status'] = toJson$Enum$ServiceStatusEnum(l$status);
|
||||
final l$storageUsage = storageUsage;
|
||||
|
@ -2981,6 +2994,7 @@ class Query$AllServices$services$allServices {
|
|||
final l$isEnabled = isEnabled;
|
||||
final l$isMovable = isMovable;
|
||||
final l$isRequired = isRequired;
|
||||
final l$canBeBackedUp = canBeBackedUp;
|
||||
final l$status = status;
|
||||
final l$storageUsage = storageUsage;
|
||||
final l$svgIcon = svgIcon;
|
||||
|
@ -2994,6 +3008,7 @@ class Query$AllServices$services$allServices {
|
|||
l$isEnabled,
|
||||
l$isMovable,
|
||||
l$isRequired,
|
||||
l$canBeBackedUp,
|
||||
l$status,
|
||||
l$storageUsage,
|
||||
l$svgIcon,
|
||||
|
@ -3057,6 +3072,11 @@ class Query$AllServices$services$allServices {
|
|||
if (l$isRequired != lOther$isRequired) {
|
||||
return false;
|
||||
}
|
||||
final l$canBeBackedUp = canBeBackedUp;
|
||||
final lOther$canBeBackedUp = other.canBeBackedUp;
|
||||
if (l$canBeBackedUp != lOther$canBeBackedUp) {
|
||||
return false;
|
||||
}
|
||||
final l$status = status;
|
||||
final lOther$status = other.status;
|
||||
if (l$status != lOther$status) {
|
||||
|
@ -3113,6 +3133,7 @@ abstract class CopyWith$Query$AllServices$services$allServices<TRes> {
|
|||
bool? isEnabled,
|
||||
bool? isMovable,
|
||||
bool? isRequired,
|
||||
bool? canBeBackedUp,
|
||||
Enum$ServiceStatusEnum? status,
|
||||
Query$AllServices$services$allServices$storageUsage? storageUsage,
|
||||
String? svgIcon,
|
||||
|
@ -3150,6 +3171,7 @@ class _CopyWithImpl$Query$AllServices$services$allServices<TRes>
|
|||
Object? isEnabled = _undefined,
|
||||
Object? isMovable = _undefined,
|
||||
Object? isRequired = _undefined,
|
||||
Object? canBeBackedUp = _undefined,
|
||||
Object? status = _undefined,
|
||||
Object? storageUsage = _undefined,
|
||||
Object? svgIcon = _undefined,
|
||||
|
@ -3176,6 +3198,9 @@ class _CopyWithImpl$Query$AllServices$services$allServices<TRes>
|
|||
isRequired: isRequired == _undefined || isRequired == null
|
||||
? _instance.isRequired
|
||||
: (isRequired as bool),
|
||||
canBeBackedUp: canBeBackedUp == _undefined || canBeBackedUp == null
|
||||
? _instance.canBeBackedUp
|
||||
: (canBeBackedUp as bool),
|
||||
status: status == _undefined || status == null
|
||||
? _instance.status
|
||||
: (status as Enum$ServiceStatusEnum),
|
||||
|
@ -3225,6 +3250,7 @@ class _CopyWithStubImpl$Query$AllServices$services$allServices<TRes>
|
|||
bool? isEnabled,
|
||||
bool? isMovable,
|
||||
bool? isRequired,
|
||||
bool? canBeBackedUp,
|
||||
Enum$ServiceStatusEnum? status,
|
||||
Query$AllServices$services$allServices$storageUsage? storageUsage,
|
||||
String? svgIcon,
|
||||
|
@ -6561,82 +6587,9 @@ const documentNodeMutationMoveService = DocumentNode(definitions: [
|
|||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: SelectionSetNode(selections: [
|
||||
FieldNode(
|
||||
name: NameNode(value: 'createdAt'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
FragmentSpreadNode(
|
||||
name: NameNode(value: 'basicApiJobsFields'),
|
||||
directives: [],
|
||||
selectionSet: null,
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: 'description'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: null,
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: 'error'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: null,
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: 'finishedAt'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: null,
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: 'name'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: null,
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: 'progress'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: null,
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: 'result'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: null,
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: 'status'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: null,
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: 'statusText'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: null,
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: 'uid'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: null,
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: 'updatedAt'),
|
||||
alias: null,
|
||||
arguments: [],
|
||||
directives: [],
|
||||
selectionSet: null,
|
||||
),
|
||||
FieldNode(
|
||||
name: NameNode(value: '__typename'),
|
||||
|
@ -6666,6 +6619,7 @@ const documentNodeMutationMoveService = DocumentNode(definitions: [
|
|||
]),
|
||||
),
|
||||
fragmentDefinitionbasicMutationReturnFields,
|
||||
fragmentDefinitionbasicApiJobsFields,
|
||||
]);
|
||||
Mutation$MoveService _parserFn$Mutation$MoveService(
|
||||
Map<String, dynamic> data) =>
|
||||
|
@ -6785,7 +6739,7 @@ class Mutation$MoveService$moveService
|
|||
$__typename: (l$$__typename as String),
|
||||
job: l$job == null
|
||||
? null
|
||||
: Mutation$MoveService$moveService$job.fromJson(
|
||||
: Fragment$basicApiJobsFields.fromJson(
|
||||
(l$job as Map<String, dynamic>)),
|
||||
);
|
||||
}
|
||||
|
@ -6798,7 +6752,7 @@ class Mutation$MoveService$moveService
|
|||
|
||||
final String $__typename;
|
||||
|
||||
final Mutation$MoveService$moveService$job? job;
|
||||
final Fragment$basicApiJobsFields? job;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final _resultData = <String, dynamic>{};
|
||||
|
@ -6892,9 +6846,9 @@ abstract class CopyWith$Mutation$MoveService$moveService<TRes> {
|
|||
String? message,
|
||||
bool? success,
|
||||
String? $__typename,
|
||||
Mutation$MoveService$moveService$job? job,
|
||||
Fragment$basicApiJobsFields? job,
|
||||
});
|
||||
CopyWith$Mutation$MoveService$moveService$job<TRes> get job;
|
||||
CopyWith$Fragment$basicApiJobsFields<TRes> get job;
|
||||
}
|
||||
|
||||
class _CopyWithImpl$Mutation$MoveService$moveService<TRes>
|
||||
|
@ -6931,14 +6885,13 @@ class _CopyWithImpl$Mutation$MoveService$moveService<TRes>
|
|||
: ($__typename as String),
|
||||
job: job == _undefined
|
||||
? _instance.job
|
||||
: (job as Mutation$MoveService$moveService$job?),
|
||||
: (job as Fragment$basicApiJobsFields?),
|
||||
));
|
||||
CopyWith$Mutation$MoveService$moveService$job<TRes> get job {
|
||||
CopyWith$Fragment$basicApiJobsFields<TRes> get job {
|
||||
final local$job = _instance.job;
|
||||
return local$job == null
|
||||
? CopyWith$Mutation$MoveService$moveService$job.stub(_then(_instance))
|
||||
: CopyWith$Mutation$MoveService$moveService$job(
|
||||
local$job, (e) => call(job: e));
|
||||
? CopyWith$Fragment$basicApiJobsFields.stub(_then(_instance))
|
||||
: CopyWith$Fragment$basicApiJobsFields(local$job, (e) => call(job: e));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6953,330 +6906,9 @@ class _CopyWithStubImpl$Mutation$MoveService$moveService<TRes>
|
|||
String? message,
|
||||
bool? success,
|
||||
String? $__typename,
|
||||
Mutation$MoveService$moveService$job? job,
|
||||
}) =>
|
||||
_res;
|
||||
CopyWith$Mutation$MoveService$moveService$job<TRes> get job =>
|
||||
CopyWith$Mutation$MoveService$moveService$job.stub(_res);
|
||||
}
|
||||
|
||||
class Mutation$MoveService$moveService$job {
|
||||
Mutation$MoveService$moveService$job({
|
||||
required this.createdAt,
|
||||
required this.description,
|
||||
this.error,
|
||||
this.finishedAt,
|
||||
required this.name,
|
||||
this.progress,
|
||||
this.result,
|
||||
required this.status,
|
||||
this.statusText,
|
||||
required this.uid,
|
||||
required this.updatedAt,
|
||||
this.$__typename = 'ApiJob',
|
||||
});
|
||||
|
||||
factory Mutation$MoveService$moveService$job.fromJson(
|
||||
Map<String, dynamic> json) {
|
||||
final l$createdAt = json['createdAt'];
|
||||
final l$description = json['description'];
|
||||
final l$error = json['error'];
|
||||
final l$finishedAt = json['finishedAt'];
|
||||
final l$name = json['name'];
|
||||
final l$progress = json['progress'];
|
||||
final l$result = json['result'];
|
||||
final l$status = json['status'];
|
||||
final l$statusText = json['statusText'];
|
||||
final l$uid = json['uid'];
|
||||
final l$updatedAt = json['updatedAt'];
|
||||
final l$$__typename = json['__typename'];
|
||||
return Mutation$MoveService$moveService$job(
|
||||
createdAt: dateTimeFromJson(l$createdAt),
|
||||
description: (l$description as String),
|
||||
error: (l$error as String?),
|
||||
finishedAt: l$finishedAt == null ? null : dateTimeFromJson(l$finishedAt),
|
||||
name: (l$name as String),
|
||||
progress: (l$progress as int?),
|
||||
result: (l$result as String?),
|
||||
status: (l$status as String),
|
||||
statusText: (l$statusText as String?),
|
||||
uid: (l$uid as String),
|
||||
updatedAt: dateTimeFromJson(l$updatedAt),
|
||||
$__typename: (l$$__typename as String),
|
||||
);
|
||||
}
|
||||
|
||||
final DateTime createdAt;
|
||||
|
||||
final String description;
|
||||
|
||||
final String? error;
|
||||
|
||||
final DateTime? finishedAt;
|
||||
|
||||
final String name;
|
||||
|
||||
final int? progress;
|
||||
|
||||
final String? result;
|
||||
|
||||
final String status;
|
||||
|
||||
final String? statusText;
|
||||
|
||||
final String uid;
|
||||
|
||||
final DateTime updatedAt;
|
||||
|
||||
final String $__typename;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final _resultData = <String, dynamic>{};
|
||||
final l$createdAt = createdAt;
|
||||
_resultData['createdAt'] = dateTimeToJson(l$createdAt);
|
||||
final l$description = description;
|
||||
_resultData['description'] = l$description;
|
||||
final l$error = error;
|
||||
_resultData['error'] = l$error;
|
||||
final l$finishedAt = finishedAt;
|
||||
_resultData['finishedAt'] =
|
||||
l$finishedAt == null ? null : dateTimeToJson(l$finishedAt);
|
||||
final l$name = name;
|
||||
_resultData['name'] = l$name;
|
||||
final l$progress = progress;
|
||||
_resultData['progress'] = l$progress;
|
||||
final l$result = result;
|
||||
_resultData['result'] = l$result;
|
||||
final l$status = status;
|
||||
_resultData['status'] = l$status;
|
||||
final l$statusText = statusText;
|
||||
_resultData['statusText'] = l$statusText;
|
||||
final l$uid = uid;
|
||||
_resultData['uid'] = l$uid;
|
||||
final l$updatedAt = updatedAt;
|
||||
_resultData['updatedAt'] = dateTimeToJson(l$updatedAt);
|
||||
final l$$__typename = $__typename;
|
||||
_resultData['__typename'] = l$$__typename;
|
||||
return _resultData;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
final l$createdAt = createdAt;
|
||||
final l$description = description;
|
||||
final l$error = error;
|
||||
final l$finishedAt = finishedAt;
|
||||
final l$name = name;
|
||||
final l$progress = progress;
|
||||
final l$result = result;
|
||||
final l$status = status;
|
||||
final l$statusText = statusText;
|
||||
final l$uid = uid;
|
||||
final l$updatedAt = updatedAt;
|
||||
final l$$__typename = $__typename;
|
||||
return Object.hashAll([
|
||||
l$createdAt,
|
||||
l$description,
|
||||
l$error,
|
||||
l$finishedAt,
|
||||
l$name,
|
||||
l$progress,
|
||||
l$result,
|
||||
l$status,
|
||||
l$statusText,
|
||||
l$uid,
|
||||
l$updatedAt,
|
||||
l$$__typename,
|
||||
]);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if (identical(this, other)) {
|
||||
return true;
|
||||
}
|
||||
if (!(other is Mutation$MoveService$moveService$job) ||
|
||||
runtimeType != other.runtimeType) {
|
||||
return false;
|
||||
}
|
||||
final l$createdAt = createdAt;
|
||||
final lOther$createdAt = other.createdAt;
|
||||
if (l$createdAt != lOther$createdAt) {
|
||||
return false;
|
||||
}
|
||||
final l$description = description;
|
||||
final lOther$description = other.description;
|
||||
if (l$description != lOther$description) {
|
||||
return false;
|
||||
}
|
||||
final l$error = error;
|
||||
final lOther$error = other.error;
|
||||
if (l$error != lOther$error) {
|
||||
return false;
|
||||
}
|
||||
final l$finishedAt = finishedAt;
|
||||
final lOther$finishedAt = other.finishedAt;
|
||||
if (l$finishedAt != lOther$finishedAt) {
|
||||
return false;
|
||||
}
|
||||
final l$name = name;
|
||||
final lOther$name = other.name;
|
||||
if (l$name != lOther$name) {
|
||||
return false;
|
||||
}
|
||||
final l$progress = progress;
|
||||
final lOther$progress = other.progress;
|
||||
if (l$progress != lOther$progress) {
|
||||
return false;
|
||||
}
|
||||
final l$result = result;
|
||||
final lOther$result = other.result;
|
||||
if (l$result != lOther$result) {
|
||||
return false;
|
||||
}
|
||||
final l$status = status;
|
||||
final lOther$status = other.status;
|
||||
if (l$status != lOther$status) {
|
||||
return false;
|
||||
}
|
||||
final l$statusText = statusText;
|
||||
final lOther$statusText = other.statusText;
|
||||
if (l$statusText != lOther$statusText) {
|
||||
return false;
|
||||
}
|
||||
final l$uid = uid;
|
||||
final lOther$uid = other.uid;
|
||||
if (l$uid != lOther$uid) {
|
||||
return false;
|
||||
}
|
||||
final l$updatedAt = updatedAt;
|
||||
final lOther$updatedAt = other.updatedAt;
|
||||
if (l$updatedAt != lOther$updatedAt) {
|
||||
return false;
|
||||
}
|
||||
final l$$__typename = $__typename;
|
||||
final lOther$$__typename = other.$__typename;
|
||||
if (l$$__typename != lOther$$__typename) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
extension UtilityExtension$Mutation$MoveService$moveService$job
|
||||
on Mutation$MoveService$moveService$job {
|
||||
CopyWith$Mutation$MoveService$moveService$job<
|
||||
Mutation$MoveService$moveService$job>
|
||||
get copyWith => CopyWith$Mutation$MoveService$moveService$job(
|
||||
this,
|
||||
(i) => i,
|
||||
);
|
||||
}
|
||||
|
||||
abstract class CopyWith$Mutation$MoveService$moveService$job<TRes> {
|
||||
factory CopyWith$Mutation$MoveService$moveService$job(
|
||||
Mutation$MoveService$moveService$job instance,
|
||||
TRes Function(Mutation$MoveService$moveService$job) then,
|
||||
) = _CopyWithImpl$Mutation$MoveService$moveService$job;
|
||||
|
||||
factory CopyWith$Mutation$MoveService$moveService$job.stub(TRes res) =
|
||||
_CopyWithStubImpl$Mutation$MoveService$moveService$job;
|
||||
|
||||
TRes call({
|
||||
DateTime? createdAt,
|
||||
String? description,
|
||||
String? error,
|
||||
DateTime? finishedAt,
|
||||
String? name,
|
||||
int? progress,
|
||||
String? result,
|
||||
String? status,
|
||||
String? statusText,
|
||||
String? uid,
|
||||
DateTime? updatedAt,
|
||||
String? $__typename,
|
||||
});
|
||||
}
|
||||
|
||||
class _CopyWithImpl$Mutation$MoveService$moveService$job<TRes>
|
||||
implements CopyWith$Mutation$MoveService$moveService$job<TRes> {
|
||||
_CopyWithImpl$Mutation$MoveService$moveService$job(
|
||||
this._instance,
|
||||
this._then,
|
||||
);
|
||||
|
||||
final Mutation$MoveService$moveService$job _instance;
|
||||
|
||||
final TRes Function(Mutation$MoveService$moveService$job) _then;
|
||||
|
||||
static const _undefined = <dynamic, dynamic>{};
|
||||
|
||||
TRes call({
|
||||
Object? createdAt = _undefined,
|
||||
Object? description = _undefined,
|
||||
Object? error = _undefined,
|
||||
Object? finishedAt = _undefined,
|
||||
Object? name = _undefined,
|
||||
Object? progress = _undefined,
|
||||
Object? result = _undefined,
|
||||
Object? status = _undefined,
|
||||
Object? statusText = _undefined,
|
||||
Object? uid = _undefined,
|
||||
Object? updatedAt = _undefined,
|
||||
Object? $__typename = _undefined,
|
||||
}) =>
|
||||
_then(Mutation$MoveService$moveService$job(
|
||||
createdAt: createdAt == _undefined || createdAt == null
|
||||
? _instance.createdAt
|
||||
: (createdAt as DateTime),
|
||||
description: description == _undefined || description == null
|
||||
? _instance.description
|
||||
: (description as String),
|
||||
error: error == _undefined ? _instance.error : (error as String?),
|
||||
finishedAt: finishedAt == _undefined
|
||||
? _instance.finishedAt
|
||||
: (finishedAt as DateTime?),
|
||||
name: name == _undefined || name == null
|
||||
? _instance.name
|
||||
: (name as String),
|
||||
progress:
|
||||
progress == _undefined ? _instance.progress : (progress as int?),
|
||||
result: result == _undefined ? _instance.result : (result as String?),
|
||||
status: status == _undefined || status == null
|
||||
? _instance.status
|
||||
: (status as String),
|
||||
statusText: statusText == _undefined
|
||||
? _instance.statusText
|
||||
: (statusText as String?),
|
||||
uid: uid == _undefined || uid == null ? _instance.uid : (uid as String),
|
||||
updatedAt: updatedAt == _undefined || updatedAt == null
|
||||
? _instance.updatedAt
|
||||
: (updatedAt as DateTime),
|
||||
$__typename: $__typename == _undefined || $__typename == null
|
||||
? _instance.$__typename
|
||||
: ($__typename as String),
|
||||
));
|
||||
}
|
||||
|
||||
class _CopyWithStubImpl$Mutation$MoveService$moveService$job<TRes>
|
||||
implements CopyWith$Mutation$MoveService$moveService$job<TRes> {
|
||||
_CopyWithStubImpl$Mutation$MoveService$moveService$job(this._res);
|
||||
|
||||
TRes _res;
|
||||
|
||||
call({
|
||||
DateTime? createdAt,
|
||||
String? description,
|
||||
String? error,
|
||||
DateTime? finishedAt,
|
||||
String? name,
|
||||
int? progress,
|
||||
String? result,
|
||||
String? status,
|
||||
String? statusText,
|
||||
String? uid,
|
||||
DateTime? updatedAt,
|
||||
String? $__typename,
|
||||
Fragment$basicApiJobsFields? job,
|
||||
}) =>
|
||||
_res;
|
||||
CopyWith$Fragment$basicApiJobsFields<TRes> get job =>
|
||||
CopyWith$Fragment$basicApiJobsFields.stub(_res);
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import 'dart:async';
|
||||
import 'disk_volumes.graphql.dart';
|
||||
import 'package:gql/ast.dart';
|
||||
import 'package:graphql/client.dart' as graphql;
|
||||
import 'schema.graphql.dart';
|
||||
import 'services.graphql.dart';
|
||||
|
||||
class Fragment$basicMutationReturnFields {
|
||||
Fragment$basicMutationReturnFields({
|
||||
|
|
|
@ -72,9 +72,9 @@ mixin BackupsApi on GraphQLApiMap {
|
|||
);
|
||||
}
|
||||
|
||||
Future<GenericResult> startBackup(final String serviceId) async {
|
||||
Future<GenericResult<ServerJob?>> startBackup(final String serviceId) async {
|
||||
QueryResult<Mutation$StartBackup> response;
|
||||
GenericResult? result;
|
||||
GenericResult<ServerJob?>? result;
|
||||
|
||||
try {
|
||||
final GraphQLClient client = await getClient();
|
||||
|
@ -92,7 +92,9 @@ mixin BackupsApi on GraphQLApiMap {
|
|||
}
|
||||
result = GenericResult(
|
||||
success: true,
|
||||
data: null,
|
||||
data: ServerJob.fromGraphQL(
|
||||
response.parsedData!.backup.startBackup.job!,
|
||||
),
|
||||
);
|
||||
} catch (e) {
|
||||
print(e);
|
||||
|
@ -204,4 +206,43 @@ mixin BackupsApi on GraphQLApiMap {
|
|||
|
||||
return result;
|
||||
}
|
||||
|
||||
Future<GenericResult<ServerJob?>> restoreBackup(
|
||||
final String snapshotId,
|
||||
) async {
|
||||
QueryResult<Mutation$RestoreBackup> response;
|
||||
GenericResult<ServerJob?>? result;
|
||||
|
||||
try {
|
||||
final GraphQLClient client = await getClient();
|
||||
final variables =
|
||||
Variables$Mutation$RestoreBackup(snapshotId: snapshotId);
|
||||
final options = Options$Mutation$RestoreBackup(variables: variables);
|
||||
response = await client.mutate$RestoreBackup(options);
|
||||
if (response.hasException) {
|
||||
final message = response.exception.toString();
|
||||
print(message);
|
||||
result = GenericResult(
|
||||
success: false,
|
||||
data: null,
|
||||
message: message,
|
||||
);
|
||||
}
|
||||
result = GenericResult(
|
||||
success: true,
|
||||
data: ServerJob.fromGraphQL(
|
||||
response.parsedData!.backup.restoreBackup.job!,
|
||||
),
|
||||
);
|
||||
} catch (e) {
|
||||
print(e);
|
||||
result = GenericResult(
|
||||
success: false,
|
||||
data: null,
|
||||
message: e.toString(),
|
||||
);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ class ServerJob {
|
|||
this.finishedAt,
|
||||
});
|
||||
|
||||
ServerJob.fromGraphQL(final Query$GetApiJobs$jobs$getJobs serverJob)
|
||||
ServerJob.fromGraphQL(final Fragment$basicApiJobsFields serverJob)
|
||||
: this(
|
||||
createdAt: serverJob.createdAt,
|
||||
description: serverJob.description,
|
||||
|
|
|
@ -5,7 +5,16 @@ import 'package:selfprivacy/logic/models/json/dns_records.dart';
|
|||
export 'package:selfprivacy/logic/api_maps/generic_result.dart';
|
||||
|
||||
abstract class DnsProvider {
|
||||
/// Returns an assigned enum value, respectively to which
|
||||
/// provider implements [DnsProvider] interface.
|
||||
DnsProviderType get type;
|
||||
|
||||
/// Tries to access an account linked to the provided token.
|
||||
///
|
||||
/// To generate a token for your account follow instructions of your
|
||||
/// DNS provider respectfully.
|
||||
///
|
||||
/// If success, saves it for future usage.
|
||||
Future<GenericResult<bool>> tryInitApiByToken(final String token);
|
||||
Future<GenericResult<String?>> getZoneId(final String domain);
|
||||
Future<GenericResult<void>> removeDomainRecords({
|
||||
|
|
Loading…
Reference in a new issue