Remove LoginAPI, because it does not belongs to JMAP server

This commit is contained in:
Dat PHAM HOANG
2021-09-16 16:21:51 +07:00
committed by Dat H. Pham
parent 5fd305d102
commit afe6095c7e
20 changed files with 22 additions and 345 deletions
-9
View File
@@ -1,9 +0,0 @@
class Attribute {
static const id = '_id';
static const firstname = 'firstname';
static const lastname = 'lastname';
static const job_title = 'job_title';
static const building_location = 'building_location';
static const office_location = 'office_location';
static const main_phone = 'main_phone';
}
@@ -1,15 +0,0 @@
import 'package:equatable/equatable.dart';
import 'package:model/account/account_type.dart';
import 'package:model/email/presentation_email_address.dart';
class PresentationAccount with EquatableMixin {
final List<PresentationEmailAddress> emails;
final int preferredEmailIndex;
final AccountType type;
PresentationAccount(this.emails, this.preferredEmailIndex, this.type);
@override
List<Object?> get props => [emails];
}
@@ -1,29 +0,0 @@
import 'package:equatable/equatable.dart';
import 'package:json_annotation/json_annotation.dart';
import 'package:model/model.dart';
part 'presentation_account_response.g.dart';
@PresentationEmailAddressConverter()
@JsonSerializable()
class PresentationAccountResponse with EquatableMixin {
final List<PresentationEmailAddress>? emails;
final int preferredEmailIndex;
final AccountType type;
PresentationAccountResponse(this.emails, this.preferredEmailIndex, this.type);
factory PresentationAccountResponse.fromJson(Map<String, dynamic> json) => _$PresentationAccountResponseFromJson(json);
Map<String, dynamic> toJson() => _$PresentationAccountResponseToJson(this);
@override
List<Object?> get props => [emails, preferredEmailIndex, type];
}
extension PresentationAccountResponseExtension on PresentationAccountResponse {
PresentationAccount toPresentationAccount() {
return PresentationAccount(emails ?? [], preferredEmailIndex, type);
}
}