Skip to content

Commit

Permalink
fixup! Implement SearchSnippet/get
Browse files Browse the repository at this point in the history
  • Loading branch information
tddang-linagora committed Nov 1, 2024
1 parent 66bb9f3 commit 9aeb0cb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'package:jmap_dart_client/http/converter/account_id_converter.dart';
import 'package:jmap_dart_client/http/converter/email_id_converter.dart';
import 'package:jmap_dart_client/http/converter/id_converter.dart';
import 'package:jmap_dart_client/http/converter/state_converter.dart';
import 'package:jmap_dart_client/jmap/core/method/response/get_response.dart';
import 'package:jmap_dart_client/jmap/core/id.dart';
import 'package:jmap_dart_client/jmap/core/method/method_response.dart';
import 'package:jmap_dart_client/jmap/mail/email/search_snippet/search_snippet.dart';
import 'package:json_annotation/json_annotation.dart';

Expand All @@ -14,21 +14,22 @@ part 'search_snippet_get_response.g.dart';
converters: [
AccountIdConverter(),
EmailIdConverter(),
StateConverter(),
IdConverter(),
]
)
class SearchSnippetGetResponse extends GetResponse<SearchSnippet> {
class SearchSnippetGetResponse extends ResponseRequiringAccountId {
SearchSnippetGetResponse(
super.accountId,
super.state,
super.list,
super.notFound,
this.list,
this.notFound,
);

final List<SearchSnippet>? list;
final List<Id>? notFound;

factory SearchSnippetGetResponse.fromJson(Map<String, dynamic> json) => _$SearchSnippetGetResponseFromJson(json);
Map<String, dynamic> toJson() => _$SearchSnippetGetResponseToJson(this);

@override
List<Object?> get props => [accountId, state, list, notFound];
List<Object?> get props => [accountId, list, notFound];
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9aeb0cb

Please sign in to comment.