LICENSE.md

This commit is contained in:
2021-02-11 15:35:47 -05:00
parent 5291d6bfe2
commit 4b5bf7ecae
7 changed files with 613 additions and 11 deletions

View File

@@ -114,6 +114,62 @@ 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);
}
enum AuthResult {
@JsonValue('Success')
success,
@@ -122,6 +178,22 @@ enum AuthResult {
@JsonValue('ARTEMIS_UNKNOWN')
artemisUnknown,
}
enum Role {
@JsonValue('Admin')
admin,
@JsonValue('User')
user,
@JsonValue('ARTEMIS_UNKNOWN')
artemisUnknown,
}
enum AuthType {
@JsonValue('Local')
local,
@JsonValue('LDAP')
ldap,
@JsonValue('ARTEMIS_UNKNOWN')
artemisUnknown,
}
@JsonSerializable(explicitToJson: true)
class LoginArguments extends JsonSerializable with EquatableMixin {
@@ -352,3 +424,87 @@ class CreateMediaItemMutation
CreateMediaItem$Mutation parse(Map<String, dynamic> json) =>
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);
}

View File

@@ -137,6 +137,61 @@ 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(),
};
LoginArguments _$LoginArgumentsFromJson(Map<String, dynamic> json) {
return LoginArguments(
user: json['user'] as String,