355 lines
11 KiB
Dart
355 lines
11 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
import 'package:meta/meta.dart';
|
|
import 'package:artemis/artemis.dart';
|
|
import 'package:json_annotation/json_annotation.dart';
|
|
import 'package:equatable/equatable.dart';
|
|
import 'package:gql/ast.dart';
|
|
import 'package:http/http.dart';
|
|
import 'package:imagini/helpers/upload_serializer.dart';
|
|
part 'imgagini_graphql.graphql.g.dart';
|
|
|
|
@JsonSerializable(explicitToJson: true)
|
|
class Login$Query$AuthResponse$Device with EquatableMixin {
|
|
Login$Query$AuthResponse$Device();
|
|
|
|
factory Login$Query$AuthResponse$Device.fromJson(Map<String, dynamic> json) =>
|
|
_$Login$Query$AuthResponse$DeviceFromJson(json);
|
|
|
|
String id;
|
|
|
|
@override
|
|
List<Object> get props => [id];
|
|
Map<String, dynamic> toJson() =>
|
|
_$Login$Query$AuthResponse$DeviceToJson(this);
|
|
}
|
|
|
|
@JsonSerializable(explicitToJson: true)
|
|
class Login$Query$AuthResponse with EquatableMixin {
|
|
Login$Query$AuthResponse();
|
|
|
|
factory Login$Query$AuthResponse.fromJson(Map<String, dynamic> json) =>
|
|
_$Login$Query$AuthResponseFromJson(json);
|
|
|
|
@JsonKey(unknownEnumValue: AuthResult.artemisUnknown)
|
|
AuthResult result;
|
|
|
|
Login$Query$AuthResponse$Device device;
|
|
|
|
@override
|
|
List<Object> get props => [result, device];
|
|
Map<String, dynamic> toJson() => _$Login$Query$AuthResponseToJson(this);
|
|
}
|
|
|
|
@JsonSerializable(explicitToJson: true)
|
|
class Login$Query with EquatableMixin {
|
|
Login$Query();
|
|
|
|
factory Login$Query.fromJson(Map<String, dynamic> json) =>
|
|
_$Login$QueryFromJson(json);
|
|
|
|
Login$Query$AuthResponse login;
|
|
|
|
@override
|
|
List<Object> get props => [login];
|
|
Map<String, dynamic> toJson() => _$Login$QueryToJson(this);
|
|
}
|
|
|
|
@JsonSerializable(explicitToJson: true)
|
|
class CreateMediaItem$Mutation$MediaItem with EquatableMixin {
|
|
CreateMediaItem$Mutation$MediaItem();
|
|
|
|
factory CreateMediaItem$Mutation$MediaItem.fromJson(
|
|
Map<String, dynamic> json) =>
|
|
_$CreateMediaItem$Mutation$MediaItemFromJson(json);
|
|
|
|
String id;
|
|
|
|
DateTime createdAt;
|
|
|
|
DateTime updatedAt;
|
|
|
|
DateTime exifDate;
|
|
|
|
double latitude;
|
|
|
|
double longitude;
|
|
|
|
bool isVideo;
|
|
|
|
String fileName;
|
|
|
|
String origName;
|
|
|
|
String userID;
|
|
|
|
@override
|
|
List<Object> get props => [
|
|
id,
|
|
createdAt,
|
|
updatedAt,
|
|
exifDate,
|
|
latitude,
|
|
longitude,
|
|
isVideo,
|
|
fileName,
|
|
origName,
|
|
userID
|
|
];
|
|
Map<String, dynamic> toJson() =>
|
|
_$CreateMediaItem$Mutation$MediaItemToJson(this);
|
|
}
|
|
|
|
@JsonSerializable(explicitToJson: true)
|
|
class CreateMediaItem$Mutation with EquatableMixin {
|
|
CreateMediaItem$Mutation();
|
|
|
|
factory CreateMediaItem$Mutation.fromJson(Map<String, dynamic> json) =>
|
|
_$CreateMediaItem$MutationFromJson(json);
|
|
|
|
CreateMediaItem$Mutation$MediaItem createMediaItem;
|
|
|
|
@override
|
|
List<Object> get props => [createMediaItem];
|
|
Map<String, dynamic> toJson() => _$CreateMediaItem$MutationToJson(this);
|
|
}
|
|
|
|
enum AuthResult {
|
|
@JsonValue('Success')
|
|
success,
|
|
@JsonValue('Failure')
|
|
failure,
|
|
@JsonValue('ARTEMIS_UNKNOWN')
|
|
artemisUnknown,
|
|
}
|
|
|
|
@JsonSerializable(explicitToJson: true)
|
|
class LoginArguments extends JsonSerializable with EquatableMixin {
|
|
LoginArguments({@required this.user, @required this.password, this.deviceID});
|
|
|
|
@override
|
|
factory LoginArguments.fromJson(Map<String, dynamic> json) =>
|
|
_$LoginArgumentsFromJson(json);
|
|
|
|
final String user;
|
|
|
|
final String password;
|
|
|
|
final String deviceID;
|
|
|
|
@override
|
|
List<Object> get props => [user, password, deviceID];
|
|
@override
|
|
Map<String, dynamic> toJson() => _$LoginArgumentsToJson(this);
|
|
}
|
|
|
|
class LoginQuery extends GraphQLQuery<Login$Query, LoginArguments> {
|
|
LoginQuery({this.variables});
|
|
|
|
@override
|
|
final DocumentNode document = DocumentNode(definitions: [
|
|
OperationDefinitionNode(
|
|
type: OperationType.query,
|
|
name: NameNode(value: 'login'),
|
|
variableDefinitions: [
|
|
VariableDefinitionNode(
|
|
variable: VariableNode(name: NameNode(value: 'user')),
|
|
type: NamedTypeNode(
|
|
name: NameNode(value: 'String'), isNonNull: true),
|
|
defaultValue: DefaultValueNode(value: null),
|
|
directives: []),
|
|
VariableDefinitionNode(
|
|
variable: VariableNode(name: NameNode(value: 'password')),
|
|
type: NamedTypeNode(
|
|
name: NameNode(value: 'String'), isNonNull: true),
|
|
defaultValue: DefaultValueNode(value: null),
|
|
directives: []),
|
|
VariableDefinitionNode(
|
|
variable: VariableNode(name: NameNode(value: 'deviceID')),
|
|
type:
|
|
NamedTypeNode(name: NameNode(value: 'ID'), isNonNull: false),
|
|
defaultValue: DefaultValueNode(value: null),
|
|
directives: [])
|
|
],
|
|
directives: [],
|
|
selectionSet: SelectionSetNode(selections: [
|
|
FieldNode(
|
|
name: NameNode(value: 'login'),
|
|
alias: null,
|
|
arguments: [
|
|
ArgumentNode(
|
|
name: NameNode(value: 'user'),
|
|
value: VariableNode(name: NameNode(value: 'user'))),
|
|
ArgumentNode(
|
|
name: NameNode(value: 'password'),
|
|
value: VariableNode(name: NameNode(value: 'password'))),
|
|
ArgumentNode(
|
|
name: NameNode(value: 'deviceID'),
|
|
value: VariableNode(name: NameNode(value: 'deviceID')))
|
|
],
|
|
directives: [],
|
|
selectionSet: SelectionSetNode(selections: [
|
|
FieldNode(
|
|
name: NameNode(value: 'result'),
|
|
alias: null,
|
|
arguments: [],
|
|
directives: [],
|
|
selectionSet: null),
|
|
FieldNode(
|
|
name: NameNode(value: 'device'),
|
|
alias: null,
|
|
arguments: [],
|
|
directives: [],
|
|
selectionSet: SelectionSetNode(selections: [
|
|
FieldNode(
|
|
name: NameNode(value: 'id'),
|
|
alias: null,
|
|
arguments: [],
|
|
directives: [],
|
|
selectionSet: null)
|
|
]))
|
|
]))
|
|
]))
|
|
]);
|
|
|
|
@override
|
|
final String operationName = 'login';
|
|
|
|
@override
|
|
final LoginArguments variables;
|
|
|
|
@override
|
|
List<Object> get props => [document, operationName, variables];
|
|
@override
|
|
Login$Query parse(Map<String, dynamic> json) => Login$Query.fromJson(json);
|
|
}
|
|
|
|
@JsonSerializable(explicitToJson: true)
|
|
class CreateMediaItemArguments extends JsonSerializable with EquatableMixin {
|
|
CreateMediaItemArguments({@required this.file});
|
|
|
|
@override
|
|
factory CreateMediaItemArguments.fromJson(Map<String, dynamic> json) =>
|
|
_$CreateMediaItemArgumentsFromJson(json);
|
|
|
|
@JsonKey(
|
|
fromJson: fromGraphQLUploadToDartMultipartFile,
|
|
toJson: fromDartMultipartFileToGraphQLUpload)
|
|
final MultipartFile file;
|
|
|
|
@override
|
|
List<Object> get props => [file];
|
|
@override
|
|
Map<String, dynamic> toJson() => _$CreateMediaItemArgumentsToJson(this);
|
|
}
|
|
|
|
class CreateMediaItemMutation
|
|
extends GraphQLQuery<CreateMediaItem$Mutation, CreateMediaItemArguments> {
|
|
CreateMediaItemMutation({this.variables});
|
|
|
|
@override
|
|
final DocumentNode document = DocumentNode(definitions: [
|
|
OperationDefinitionNode(
|
|
type: OperationType.mutation,
|
|
name: NameNode(value: 'createMediaItem'),
|
|
variableDefinitions: [
|
|
VariableDefinitionNode(
|
|
variable: VariableNode(name: NameNode(value: 'file')),
|
|
type: NamedTypeNode(
|
|
name: NameNode(value: 'Upload'), isNonNull: true),
|
|
defaultValue: DefaultValueNode(value: null),
|
|
directives: [])
|
|
],
|
|
directives: [],
|
|
selectionSet: SelectionSetNode(selections: [
|
|
FieldNode(
|
|
name: NameNode(value: 'createMediaItem'),
|
|
alias: null,
|
|
arguments: [
|
|
ArgumentNode(
|
|
name: NameNode(value: 'input'),
|
|
value: ObjectValueNode(fields: [
|
|
ObjectFieldNode(
|
|
name: NameNode(value: 'file'),
|
|
value: VariableNode(name: NameNode(value: 'file')))
|
|
]))
|
|
],
|
|
directives: [],
|
|
selectionSet: SelectionSetNode(selections: [
|
|
FieldNode(
|
|
name: NameNode(value: 'id'),
|
|
alias: null,
|
|
arguments: [],
|
|
directives: [],
|
|
selectionSet: null),
|
|
FieldNode(
|
|
name: NameNode(value: 'createdAt'),
|
|
alias: null,
|
|
arguments: [],
|
|
directives: [],
|
|
selectionSet: null),
|
|
FieldNode(
|
|
name: NameNode(value: 'updatedAt'),
|
|
alias: null,
|
|
arguments: [],
|
|
directives: [],
|
|
selectionSet: null),
|
|
FieldNode(
|
|
name: NameNode(value: 'exifDate'),
|
|
alias: null,
|
|
arguments: [],
|
|
directives: [],
|
|
selectionSet: null),
|
|
FieldNode(
|
|
name: NameNode(value: 'latitude'),
|
|
alias: null,
|
|
arguments: [],
|
|
directives: [],
|
|
selectionSet: null),
|
|
FieldNode(
|
|
name: NameNode(value: 'longitude'),
|
|
alias: null,
|
|
arguments: [],
|
|
directives: [],
|
|
selectionSet: null),
|
|
FieldNode(
|
|
name: NameNode(value: 'isVideo'),
|
|
alias: null,
|
|
arguments: [],
|
|
directives: [],
|
|
selectionSet: null),
|
|
FieldNode(
|
|
name: NameNode(value: 'fileName'),
|
|
alias: null,
|
|
arguments: [],
|
|
directives: [],
|
|
selectionSet: null),
|
|
FieldNode(
|
|
name: NameNode(value: 'origName'),
|
|
alias: null,
|
|
arguments: [],
|
|
directives: [],
|
|
selectionSet: null),
|
|
FieldNode(
|
|
name: NameNode(value: 'userID'),
|
|
alias: null,
|
|
arguments: [],
|
|
directives: [],
|
|
selectionSet: null)
|
|
]))
|
|
]))
|
|
]);
|
|
|
|
@override
|
|
final String operationName = 'createMediaItem';
|
|
|
|
@override
|
|
final CreateMediaItemArguments variables;
|
|
|
|
@override
|
|
List<Object> get props => [document, operationName, variables];
|
|
@override
|
|
CreateMediaItem$Mutation parse(Map<String, dynamic> json) =>
|
|
CreateMediaItem$Mutation.fromJson(json);
|
|
}
|