Clean up dependencies

This commit is contained in:
2021-02-21 23:18:34 -05:00
parent f4273ebfd6
commit 01f6509c99
5 changed files with 232 additions and 477 deletions

View File

@@ -9,6 +9,62 @@ import 'package:http/http.dart';
import 'package:imagini/helpers/upload_serializer.dart';
part 'imagini_graphql.graphql.g.dart';
@JsonSerializable(explicitToJson: true)
class Me$Query$User with EquatableMixin {
Me$Query$User();
factory Me$Query$User.fromJson(Map<String, dynamic> json) =>
_$Me$Query$UserFromJson(json);
String id;
DateTime createdAt;
DateTime updatedAt;
String email;
String username;
String firstName;
String lastName;
@JsonKey(unknownEnumValue: Role.artemisUnknown)
Role role;
@JsonKey(unknownEnumValue: AuthType.artemisUnknown)
AuthType authType;
@override
List<Object> get props => [
id,
createdAt,
updatedAt,
email,
username,
firstName,
lastName,
role,
authType
];
Map<String, dynamic> toJson() => _$Me$Query$UserToJson(this);
}
@JsonSerializable(explicitToJson: true)
class Me$Query with EquatableMixin {
Me$Query();
factory Me$Query.fromJson(Map<String, dynamic> json) =>
_$Me$QueryFromJson(json);
Me$Query$User me;
@override
List<Object> get props => [me];
Map<String, dynamic> toJson() => _$Me$QueryToJson(this);
}
@JsonSerializable(explicitToJson: true)
class Login$Query$AuthResponse$Device with EquatableMixin {
Login$Query$AuthResponse$Device();
@@ -114,62 +170,6 @@ class CreateMediaItem$Mutation with EquatableMixin {
Map<String, dynamic> toJson() => _$CreateMediaItem$MutationToJson(this);
}
@JsonSerializable(explicitToJson: true)
class Me$Query$User with EquatableMixin {
Me$Query$User();
factory Me$Query$User.fromJson(Map<String, dynamic> json) =>
_$Me$Query$UserFromJson(json);
String id;
DateTime createdAt;
DateTime updatedAt;
String email;
String username;
String firstName;
String lastName;
@JsonKey(unknownEnumValue: Role.artemisUnknown)
Role role;
@JsonKey(unknownEnumValue: AuthType.artemisUnknown)
AuthType authType;
@override
List<Object> get props => [
id,
createdAt,
updatedAt,
email,
username,
firstName,
lastName,
role,
authType
];
Map<String, dynamic> toJson() => _$Me$Query$UserToJson(this);
}
@JsonSerializable(explicitToJson: true)
class Me$Query with EquatableMixin {
Me$Query();
factory Me$Query.fromJson(Map<String, dynamic> json) =>
_$Me$QueryFromJson(json);
Me$Query$User me;
@override
List<Object> get props => [me];
Map<String, dynamic> toJson() => _$Me$QueryToJson(this);
}
@JsonSerializable(explicitToJson: true)
class MediaItems$Query$MediaItemResponse$MediaItem with EquatableMixin {
MediaItems$Query$MediaItemResponse$MediaItem();
@@ -526,14 +526,6 @@ class Order with EquatableMixin {
Map<String, dynamic> toJson() => _$OrderToJson(this);
}
enum AuthResult {
@JsonValue('Success')
success,
@JsonValue('Failure')
failure,
@JsonValue('ARTEMIS_UNKNOWN')
artemisUnknown,
}
enum Role {
@JsonValue('Admin')
admin,
@@ -550,6 +542,14 @@ enum AuthType {
@JsonValue('ARTEMIS_UNKNOWN')
artemisUnknown,
}
enum AuthResult {
@JsonValue('Success')
success,
@JsonValue('Failure')
failure,
@JsonValue('ARTEMIS_UNKNOWN')
artemisUnknown,
}
enum OrderDirection {
@JsonValue('ASC')
asc,
@@ -559,6 +559,90 @@ enum OrderDirection {
artemisUnknown,
}
class MeQuery extends GraphQLQuery<Me$Query, JsonSerializable> {
MeQuery();
@override
final DocumentNode document = DocumentNode(definitions: [
OperationDefinitionNode(
type: OperationType.query,
name: NameNode(value: 'me'),
variableDefinitions: [],
directives: [],
selectionSet: SelectionSetNode(selections: [
FieldNode(
name: NameNode(value: 'me'),
alias: null,
arguments: [],
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: 'email'),
alias: null,
arguments: [],
directives: [],
selectionSet: null),
FieldNode(
name: NameNode(value: 'username'),
alias: null,
arguments: [],
directives: [],
selectionSet: null),
FieldNode(
name: NameNode(value: 'firstName'),
alias: null,
arguments: [],
directives: [],
selectionSet: null),
FieldNode(
name: NameNode(value: 'lastName'),
alias: null,
arguments: [],
directives: [],
selectionSet: null),
FieldNode(
name: NameNode(value: 'role'),
alias: null,
arguments: [],
directives: [],
selectionSet: null),
FieldNode(
name: NameNode(value: 'authType'),
alias: null,
arguments: [],
directives: [],
selectionSet: null)
]))
]))
]);
@override
final String operationName = 'me';
@override
List<Object> get props => [document, operationName];
@override
Me$Query parse(Map<String, dynamic> json) => Me$Query.fromJson(json);
}
@JsonSerializable(explicitToJson: true)
class LoginArguments extends JsonSerializable with EquatableMixin {
LoginArguments({@required this.user, @required this.password, this.deviceID});
@@ -789,90 +873,6 @@ class CreateMediaItemMutation
CreateMediaItem$Mutation.fromJson(json);
}
class MeQuery extends GraphQLQuery<Me$Query, JsonSerializable> {
MeQuery();
@override
final DocumentNode document = DocumentNode(definitions: [
OperationDefinitionNode(
type: OperationType.query,
name: NameNode(value: 'me'),
variableDefinitions: [],
directives: [],
selectionSet: SelectionSetNode(selections: [
FieldNode(
name: NameNode(value: 'me'),
alias: null,
arguments: [],
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: 'email'),
alias: null,
arguments: [],
directives: [],
selectionSet: null),
FieldNode(
name: NameNode(value: 'username'),
alias: null,
arguments: [],
directives: [],
selectionSet: null),
FieldNode(
name: NameNode(value: 'firstName'),
alias: null,
arguments: [],
directives: [],
selectionSet: null),
FieldNode(
name: NameNode(value: 'lastName'),
alias: null,
arguments: [],
directives: [],
selectionSet: null),
FieldNode(
name: NameNode(value: 'role'),
alias: null,
arguments: [],
directives: [],
selectionSet: null),
FieldNode(
name: NameNode(value: 'authType'),
alias: null,
arguments: [],
directives: [],
selectionSet: null)
]))
]))
]);
@override
final String operationName = 'me';
@override
List<Object> get props => [document, operationName];
@override
Me$Query parse(Map<String, dynamic> json) => Me$Query.fromJson(json);
}
@JsonSerializable(explicitToJson: true)
class MediaItemsArguments extends JsonSerializable with EquatableMixin {
MediaItemsArguments({this.order, this.page, this.filter});

View File

@@ -6,33 +6,36 @@ part of 'imagini_graphql.graphql.dart';
// JsonSerializableGenerator
// **************************************************************************
Login$Query$AuthResponse$Device _$Login$Query$AuthResponse$DeviceFromJson(
Map<String, dynamic> json) {
return Login$Query$AuthResponse$Device()..id = json['id'] as String;
Me$Query$User _$Me$Query$UserFromJson(Map<String, dynamic> json) {
return Me$Query$User()
..id = json['id'] as String
..createdAt = json['createdAt'] == null
? null
: DateTime.parse(json['createdAt'] as String)
..updatedAt = json['updatedAt'] == null
? null
: DateTime.parse(json['updatedAt'] as String)
..email = json['email'] as String
..username = json['username'] as String
..firstName = json['firstName'] as String
..lastName = json['lastName'] as String
..role = _$enumDecodeNullable(_$RoleEnumMap, json['role'],
unknownValue: Role.artemisUnknown)
..authType = _$enumDecodeNullable(_$AuthTypeEnumMap, json['authType'],
unknownValue: AuthType.artemisUnknown);
}
Map<String, dynamic> _$Login$Query$AuthResponse$DeviceToJson(
Login$Query$AuthResponse$Device instance) =>
Map<String, dynamic> _$Me$Query$UserToJson(Me$Query$User instance) =>
<String, dynamic>{
'id': instance.id,
};
Login$Query$AuthResponse _$Login$Query$AuthResponseFromJson(
Map<String, dynamic> json) {
return Login$Query$AuthResponse()
..result = _$enumDecodeNullable(_$AuthResultEnumMap, json['result'],
unknownValue: AuthResult.artemisUnknown)
..device = json['device'] == null
? null
: Login$Query$AuthResponse$Device.fromJson(
json['device'] as Map<String, dynamic>);
}
Map<String, dynamic> _$Login$Query$AuthResponseToJson(
Login$Query$AuthResponse instance) =>
<String, dynamic>{
'result': _$AuthResultEnumMap[instance.result],
'device': instance.device?.toJson(),
'createdAt': instance.createdAt?.toIso8601String(),
'updatedAt': instance.updatedAt?.toIso8601String(),
'email': instance.email,
'username': instance.username,
'firstName': instance.firstName,
'lastName': instance.lastName,
'role': _$RoleEnumMap[instance.role],
'authType': _$AuthTypeEnumMap[instance.authType],
};
T _$enumDecode<T>(
@@ -67,6 +70,58 @@ T _$enumDecodeNullable<T>(
return _$enumDecode<T>(enumValues, source, unknownValue: unknownValue);
}
const _$RoleEnumMap = {
Role.admin: 'Admin',
Role.user: 'User',
Role.artemisUnknown: 'ARTEMIS_UNKNOWN',
};
const _$AuthTypeEnumMap = {
AuthType.local: 'Local',
AuthType.ldap: 'LDAP',
AuthType.artemisUnknown: 'ARTEMIS_UNKNOWN',
};
Me$Query _$Me$QueryFromJson(Map<String, dynamic> json) {
return Me$Query()
..me = json['me'] == null
? null
: Me$Query$User.fromJson(json['me'] as Map<String, dynamic>);
}
Map<String, dynamic> _$Me$QueryToJson(Me$Query instance) => <String, dynamic>{
'me': instance.me?.toJson(),
};
Login$Query$AuthResponse$Device _$Login$Query$AuthResponse$DeviceFromJson(
Map<String, dynamic> json) {
return Login$Query$AuthResponse$Device()..id = json['id'] as String;
}
Map<String, dynamic> _$Login$Query$AuthResponse$DeviceToJson(
Login$Query$AuthResponse$Device instance) =>
<String, dynamic>{
'id': instance.id,
};
Login$Query$AuthResponse _$Login$Query$AuthResponseFromJson(
Map<String, dynamic> json) {
return Login$Query$AuthResponse()
..result = _$enumDecodeNullable(_$AuthResultEnumMap, json['result'],
unknownValue: AuthResult.artemisUnknown)
..device = json['device'] == null
? null
: Login$Query$AuthResponse$Device.fromJson(
json['device'] as Map<String, dynamic>);
}
Map<String, dynamic> _$Login$Query$AuthResponseToJson(
Login$Query$AuthResponse instance) =>
<String, dynamic>{
'result': _$AuthResultEnumMap[instance.result],
'device': instance.device?.toJson(),
};
const _$AuthResultEnumMap = {
AuthResult.success: 'Success',
AuthResult.failure: 'Failure',
@@ -137,61 +192,6 @@ Map<String, dynamic> _$CreateMediaItem$MutationToJson(
'createMediaItem': instance.createMediaItem?.toJson(),
};
Me$Query$User _$Me$Query$UserFromJson(Map<String, dynamic> json) {
return Me$Query$User()
..id = json['id'] as String
..createdAt = json['createdAt'] == null
? null
: DateTime.parse(json['createdAt'] as String)
..updatedAt = json['updatedAt'] == null
? null
: DateTime.parse(json['updatedAt'] as String)
..email = json['email'] as String
..username = json['username'] as String
..firstName = json['firstName'] as String
..lastName = json['lastName'] as String
..role = _$enumDecodeNullable(_$RoleEnumMap, json['role'],
unknownValue: Role.artemisUnknown)
..authType = _$enumDecodeNullable(_$AuthTypeEnumMap, json['authType'],
unknownValue: AuthType.artemisUnknown);
}
Map<String, dynamic> _$Me$Query$UserToJson(Me$Query$User instance) =>
<String, dynamic>{
'id': instance.id,
'createdAt': instance.createdAt?.toIso8601String(),
'updatedAt': instance.updatedAt?.toIso8601String(),
'email': instance.email,
'username': instance.username,
'firstName': instance.firstName,
'lastName': instance.lastName,
'role': _$RoleEnumMap[instance.role],
'authType': _$AuthTypeEnumMap[instance.authType],
};
const _$RoleEnumMap = {
Role.admin: 'Admin',
Role.user: 'User',
Role.artemisUnknown: 'ARTEMIS_UNKNOWN',
};
const _$AuthTypeEnumMap = {
AuthType.local: 'Local',
AuthType.ldap: 'LDAP',
AuthType.artemisUnknown: 'ARTEMIS_UNKNOWN',
};
Me$Query _$Me$QueryFromJson(Map<String, dynamic> json) {
return Me$Query()
..me = json['me'] == null
? null
: Me$Query$User.fromJson(json['me'] as Map<String, dynamic>);
}
Map<String, dynamic> _$Me$QueryToJson(Me$Query instance) => <String, dynamic>{
'me': instance.me?.toJson(),
};
MediaItems$Query$MediaItemResponse$MediaItem
_$MediaItems$Query$MediaItemResponse$MediaItemFromJson(
Map<String, dynamic> json) {