TF-816: get list email forward
This commit is contained in:
@@ -14,8 +14,8 @@ part 'get_forward_response.g.dart';
|
||||
@AccountIdConverter()
|
||||
@IdConverter()
|
||||
@JsonSerializable()
|
||||
class GetForwardResponse extends GetResponse<TmailForward> {
|
||||
GetForwardResponse(AccountId accountId, State state, List<TmailForward> list, List<Id>? notFound) : super(accountId, state, list, notFound);
|
||||
class GetForwardResponse extends GetResponse<TMailForward> {
|
||||
GetForwardResponse(AccountId accountId, State state, List<TMailForward> list, List<Id>? notFound) : super(accountId, state, list, notFound);
|
||||
|
||||
factory GetForwardResponse.fromJson(Map<String, dynamic> json) => _$GetForwardResponseFromJson(json);
|
||||
|
||||
|
||||
@@ -1,27 +1,26 @@
|
||||
import 'package:forward/forward/converter/forward_id_coverter.dart';
|
||||
import 'package:forward/forward/forward.dart';
|
||||
import 'package:forward/forward/forward_id.dart';
|
||||
import 'package:jmap_dart_client/jmap/mail/email/email_address.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'tmail_forward.g.dart';
|
||||
|
||||
@ForwardIdConverter()
|
||||
@JsonSerializable()
|
||||
class TmailForward extends Forward {
|
||||
class TMailForward extends Forward {
|
||||
final ForwardId id;
|
||||
final bool localCopy;
|
||||
final Set<String> forwards;
|
||||
TmailForward({
|
||||
TMailForward({
|
||||
required this.id,
|
||||
required this.localCopy,
|
||||
required this.forwards,
|
||||
});
|
||||
|
||||
factory TmailForward.fromJson(Map<String, dynamic> json) =>
|
||||
_$TmailForwardFromJson(json);
|
||||
factory TMailForward.fromJson(Map<String, dynamic> json) =>
|
||||
_$TMailForwardFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$TmailForwardToJson(this);
|
||||
Map<String, dynamic> toJson() => _$TMailForwardToJson(this);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
|
||||
@@ -12,7 +12,7 @@ import 'package:jmap_dart_client/jmap/jmap_request.dart';
|
||||
|
||||
void main() {
|
||||
group('test to json get forward method', () {
|
||||
final expectRuleFilter1 = TmailForward(
|
||||
final expectRuleFilter1 = TMailForward(
|
||||
id: ForwardIdSingleton.forwardIdSingleton,
|
||||
localCopy: true,
|
||||
forwards: {"bob@domain.org", "alice@domain.org"},
|
||||
|
||||
Reference in New Issue
Block a user