Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions lib/jmap/mail/calendar/calendar_event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import 'package:jmap_dart_client/http/converter/calendar/calendar_extension_fiel
import 'package:jmap_dart_client/http/converter/calendar/calendar_priority_nullable_converter.dart';
import 'package:jmap_dart_client/http/converter/calendar/calendar_sequence_nullable_converter.dart';
import 'package:jmap_dart_client/http/converter/calendar/event_id_nullable_converter.dart';
import 'package:jmap_dart_client/http/converter/utc_date_nullable_converter.dart';
import 'package:jmap_dart_client/jmap/core/utc_date.dart';
import 'package:jmap_dart_client/jmap/mail/calendar/properties/attendee/calendar_attendee.dart';
import 'package:jmap_dart_client/jmap/mail/calendar/properties/calendar_duration.dart';
import 'package:jmap_dart_client/jmap/mail/calendar/properties/calendar_event_status.dart';
Expand All @@ -21,6 +23,7 @@ import 'package:json_annotation/json_annotation.dart';

part 'calendar_event.g.dart';

@UTCDateNullableConverter()
@CalendarPriorityNullableConverter()
@CalendarSequenceNullableConverter()
@CalendarDurationNullableConverter()
Expand All @@ -41,6 +44,12 @@ class CalendarEvent with EquatableMixin {
@JsonKey(name: 'end')
final DateTime? endDate;

@JsonKey(name: 'utcStart')
final UTCDate? startUtcDate;

@JsonKey(name: 'utcEnd')
final UTCDate? endUtcDate;

final CalendarDuration? duration;
final String? timeZone;
final String? location;
Expand All @@ -62,6 +71,8 @@ class CalendarEvent with EquatableMixin {
this.description,
this.startDate,
this.endDate,
this.startUtcDate,
this.endUtcDate,
this.duration,
this.timeZone,
this.location,
Expand Down Expand Up @@ -89,6 +100,8 @@ class CalendarEvent with EquatableMixin {
description,
startDate,
endDate,
startUtcDate,
endUtcDate,
duration,
timeZone,
location,
Expand Down
8 changes: 8 additions & 0 deletions lib/jmap/mail/calendar/calendar_event.g.dart

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

24 changes: 12 additions & 12 deletions lib/jmap/mail/email/get/get_email_response.g.dart

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

10 changes: 10 additions & 0 deletions test/jmap/calendar/calendar_event_parse_method_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ void main() {
startDate: DateTime.parse('2023-02-09T10:00:00'),
duration: CalendarDuration('PT2H0M0S'),
endDate: DateTime.parse('2023-02-09T12:00:00'),
startUtcDate: UTCDate(DateTime.parse('2023-07-26T08:45:00Z')),
endUtcDate: UTCDate(DateTime.parse('2023-07-26T09:45:00Z')),
timeZone: 'Asia/Ho_Chi_Minh',
location: '5 Dien Bien Phu, Ha Noi',
method: EventMethod.request,
Expand Down Expand Up @@ -92,6 +94,8 @@ void main() {
startDate: DateTime.parse('2023-02-09T10:00:00'),
duration: CalendarDuration('PT2H0M0S'),
endDate: DateTime.parse('2023-02-09T12:00:00'),
startUtcDate: UTCDate(DateTime.parse('2023-07-26T08:45:00Z')),
endUtcDate: UTCDate(DateTime.parse('2023-07-26T09:45:00Z')),
timeZone: 'Asia/Ho_Chi_Minh',
location: '5 Dien Bien Phu, Ha Noi',
method: EventMethod.request,
Expand Down Expand Up @@ -166,6 +170,8 @@ void main() {
"start": "2023-02-09T10:00:00",
"duration": "PT2H0M0S",
"end": "2023-02-09T12:00:00",
"utcStart": "2023-07-26T08:45:00Z",
"utcEnd": "2023-07-26T09:45:00Z",
"timeZone": "Asia/Ho_Chi_Minh",
"location": "5 Dien Bien Phu, Ha Noi",
"method": "REQUEST",
Expand Down Expand Up @@ -281,6 +287,8 @@ void main() {
"start": "2023-02-09T10:00:00",
"duration": "PT2H0M0S",
"end": "2023-02-09T12:00:00",
"utcStart": "2023-07-26T08:45:00Z",
"utcEnd": "2023-07-26T09:45:00Z",
"timeZone": "Asia/Ho_Chi_Minh",
"location": "5 Dien Bien Phu, Ha Noi",
"method": "REQUEST",
Expand Down Expand Up @@ -336,6 +344,8 @@ void main() {
"start": "2023-02-09T10:00:00",
"duration": "PT2H0M0S",
"end": "2023-02-09T12:00:00",
"utcStart": "2023-07-26T08:45:00Z",
"utcEnd": "2023-07-26T09:45:00Z",
"timeZone": "Asia/Ho_Chi_Minh",
"location": "5 Dien Bien Phu, Ha Noi",
"method": "REQUEST",
Expand Down