draft-ietf-jmap-calendars-02.txt   draft-ietf-jmap-calendars-03.txt 
JMAP N. Jenkins JMAP N. Jenkins
Internet-Draft Fastmail Internet-Draft Fastmail
Intended status: Standards Track M. Douglass Intended status: Standards Track M. Douglass
Expires: September 11, 2020 Spherical Cow Group Expires: December 17, 2020 Spherical Cow Group
March 10, 2020 June 15, 2020
JMAP for Calendars JMAP for Calendars
draft-ietf-jmap-calendars-02 draft-ietf-jmap-calendars-03
Abstract Abstract
This document specifies a data model for synchronizing calendar data This document specifies a data model for synchronizing calendar data
with a server using JMAP. with a server using JMAP.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
skipping to change at page 1, line 32 skipping to change at page 1, line 32
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on September 11, 2020. This Internet-Draft will expire on December 17, 2020.
Copyright Notice Copyright Notice
Copyright (c) 2020 IETF Trust and the persons identified as the Copyright (c) 2020 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 27 skipping to change at page 2, line 27
2. Calendar Principals . . . . . . . . . . . . . . . . . . . . . 7 2. Calendar Principals . . . . . . . . . . . . . . . . . . . . . 7
2.1. CalendarPrincipal/get . . . . . . . . . . . . . . . . . . 9 2.1. CalendarPrincipal/get . . . . . . . . . . . . . . . . . . 9
2.2. CalendarPrincipal/changes . . . . . . . . . . . . . . . . 9 2.2. CalendarPrincipal/changes . . . . . . . . . . . . . . . . 9
2.3. CalendarPrincipal/set . . . . . . . . . . . . . . . . . . 9 2.3. CalendarPrincipal/set . . . . . . . . . . . . . . . . . . 9
2.4. CalendarPrincipal/query . . . . . . . . . . . . . . . . . 9 2.4. CalendarPrincipal/query . . . . . . . . . . . . . . . . . 9
2.4.1. Filtering . . . . . . . . . . . . . . . . . . . . . . 9 2.4.1. Filtering . . . . . . . . . . . . . . . . . . . . . . 9
2.5. CalendarPrincipal/queryChanges . . . . . . . . . . . . . 10 2.5. CalendarPrincipal/queryChanges . . . . . . . . . . . . . 10
2.6. CalendarPrincipal/getAvailability . . . . . . . . . . . . 10 2.6. CalendarPrincipal/getAvailability . . . . . . . . . . . . 10
3. Calendars . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3. Calendars . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.1. Per-user properties . . . . . . . . . . . . . . . . . . . 16 3.1. Per-user properties . . . . . . . . . . . . . . . . . . . 16
3.2. Calendar/get . . . . . . . . . . . . . . . . . . . . . . 16 3.2. Calendar/get . . . . . . . . . . . . . . . . . . . . . . 17
3.3. Calendar/changes . . . . . . . . . . . . . . . . . . . . 17 3.3. Calendar/changes . . . . . . . . . . . . . . . . . . . . 17
3.4. Calendar/set . . . . . . . . . . . . . . . . . . . . . . 17 3.4. Calendar/set . . . . . . . . . . . . . . . . . . . . . . 17
4. Calendar Share Notifications . . . . . . . . . . . . . . . . 18 4. Calendar Share Notifications . . . . . . . . . . . . . . . . 18
4.1. Auto-deletion of Notifications . . . . . . . . . . . . . 18 4.1. Auto-deletion of Notifications . . . . . . . . . . . . . 18
4.2. Object Properties . . . . . . . . . . . . . . . . . . . . 18 4.2. Object Properties . . . . . . . . . . . . . . . . . . . . 19
4.3. CalendarShareNotification/get . . . . . . . . . . . . . . 19 4.3. CalendarShareNotification/get . . . . . . . . . . . . . . 19
4.4. CalendarShareNotification/changes . . . . . . . . . . . . 19 4.4. CalendarShareNotification/changes . . . . . . . . . . . . 19
4.5. CalendarShareNotification/set . . . . . . . . . . . . . . 19 4.5. CalendarShareNotification/set . . . . . . . . . . . . . . 20
4.6. CalendarShareNotification/query . . . . . . . . . . . . . 20 4.6. CalendarShareNotification/query . . . . . . . . . . . . . 20
4.6.1. Filtering . . . . . . . . . . . . . . . . . . . . . . 20 4.6.1. Filtering . . . . . . . . . . . . . . . . . . . . . . 20
4.6.2. Sorting . . . . . . . . . . . . . . . . . . . . . . . 20 4.6.2. Sorting . . . . . . . . . . . . . . . . . . . . . . . 20
4.7. CalendarShareNotification/queryChanges . . . . . . . . . 20 4.7. CalendarShareNotification/queryChanges . . . . . . . . . 20
5. Calendar Events . . . . . . . . . . . . . . . . . . . . . . . 20 5. Calendar Events . . . . . . . . . . . . . . . . . . . . . . . 20
5.1. Attachments . . . . . . . . . . . . . . . . . . . . . . . 21 5.1. Additional JSCalendar properties . . . . . . . . . . . . 21
5.2. Per-user properties . . . . . . . . . . . . . . . . . . . 21 5.1.1. hideAttendees . . . . . . . . . . . . . . . . . . . . 21
5.3. Recurring events . . . . . . . . . . . . . . . . . . . . 22 5.2. Attachments . . . . . . . . . . . . . . . . . . . . . . . 22
5.4. Updating for "this-and-future" . . . . . . . . . . . . . 22 5.3. Per-user properties . . . . . . . . . . . . . . . . . . . 22
5.4.1. Splitting an event . . . . . . . . . . . . . . . . . 23 5.4. Recurring events . . . . . . . . . . . . . . . . . . . . 22
5.4.2. Updating the master and overriding previous . . . . . 23 5.5. Updating for "this-and-future" . . . . . . . . . . . . . 23
5.5. CalendarEvent/get . . . . . . . . . . . . . . . . . . . . 23 5.5.1. Splitting an event . . . . . . . . . . . . . . . . . 23
5.6. CalendarEvent/changes . . . . . . . . . . . . . . . . . . 24 5.5.2. Updating the master and overriding previous . . . . . 23
5.7. CalendarEvent/set . . . . . . . . . . . . . . . . . . . . 24 5.6. CalendarEvent/get . . . . . . . . . . . . . . . . . . . . 24
5.7.1. Sending invitations and responses . . . . . . . . . . 26 5.7. CalendarEvent/changes . . . . . . . . . . . . . . . . . . 25
5.8. CalendarEvent/copy . . . . . . . . . . . . . . . . . . . 29 5.8. CalendarEvent/set . . . . . . . . . . . . . . . . . . . . 25
5.9. CalendarEvent/query . . . . . . . . . . . . . . . . . . . 29 5.8.1. Patching . . . . . . . . . . . . . . . . . . . . . . 27
5.9.1. Filtering . . . . . . . . . . . . . . . . . . . . . . 30 5.8.2. Sending invitations and responses . . . . . . . . . . 30
5.9.2. Sorting . . . . . . . . . . . . . . . . . . . . . . . 31 5.9. CalendarEvent/copy . . . . . . . . . . . . . . . . . . . 33
5.10. CalendarEvent/queryChanges . . . . . . . . . . . . . . . 32 5.10. CalendarEvent/query . . . . . . . . . . . . . . . . . . . 33
5.11. Examples . . . . . . . . . . . . . . . . . . . . . . . . 32 5.10.1. Filtering . . . . . . . . . . . . . . . . . . . . . 34
6. Alerts . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 5.10.2. Sorting . . . . . . . . . . . . . . . . . . . . . . 35
6.1. Push events . . . . . . . . . . . . . . . . . . . . . . . 32 5.11. CalendarEvent/queryChanges . . . . . . . . . . . . . . . 36
6.2. Acknowledging an alert . . . . . . . . . . . . . . . . . 33 5.12. Examples . . . . . . . . . . . . . . . . . . . . . . . . 36
6.3. Snoozing an alert . . . . . . . . . . . . . . . . . . . . 33 6. Alerts . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
7. Calendar Event Notifications . . . . . . . . . . . . . . . . 34 6.1. Push events . . . . . . . . . . . . . . . . . . . . . . . 36
7.1. Auto-deletion of Notifications . . . . . . . . . . . . . 34 6.2. Acknowledging an alert . . . . . . . . . . . . . . . . . 37
7.2. Object Properties . . . . . . . . . . . . . . . . . . . . 34 6.3. Snoozing an alert . . . . . . . . . . . . . . . . . . . . 37
7.3. CalendarEventNotification/get . . . . . . . . . . . . . . 35 7. Calendar Event Notifications . . . . . . . . . . . . . . . . 38
7.4. CalendarEventNotification/changes . . . . . . . . . . . . 35 7.1. Auto-deletion of Notifications . . . . . . . . . . . . . 38
7.5. CalendarEventNotification/set . . . . . . . . . . . . . . 35 7.2. Object Properties . . . . . . . . . . . . . . . . . . . . 38
7.6. CalendarEventNotification/query . . . . . . . . . . . . . 36 7.3. CalendarEventNotification/get . . . . . . . . . . . . . . 39
7.6.1. Filtering . . . . . . . . . . . . . . . . . . . . . . 36 7.4. CalendarEventNotification/changes . . . . . . . . . . . . 39
7.6.2. Sorting . . . . . . . . . . . . . . . . . . . . . . . 36 7.5. CalendarEventNotification/set . . . . . . . . . . . . . . 39
7.7. CalendarEventNotification/queryChanges . . . . . . . . . 36 7.6. CalendarEventNotification/query . . . . . . . . . . . . . 40
8. Security Considerations . . . . . . . . . . . . . . . . . . . 36 7.6.1. Filtering . . . . . . . . . . . . . . . . . . . . . . 40
8.1. Denial-of-service Expanding Recurrences . . . . . . . . . 36 7.6.2. Sorting . . . . . . . . . . . . . . . . . . . . . . . 40
8.2. Privacy . . . . . . . . . . . . . . . . . . . . . . . . . 37 7.7. CalendarEventNotification/queryChanges . . . . . . . . . 40
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 37 8. Security Considerations . . . . . . . . . . . . . . . . . . . 40
9.1. JMAP Capability Registration for "calendars" . . . . . . 37 8.1. Denial-of-service Expanding Recurrences . . . . . . . . . 40
9.2. Reservation of JMAP attributes in JSCalendar Property 8.2. Privacy . . . . . . . . . . . . . . . . . . . . . . . . . 41
registry . . . . . . . . . . . . . . . . . . . . . . . . 37 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 41
10. References . . . . . . . . . . . . . . . . . . . . . . . . . 37 9.1. JMAP Capability Registration for "calendars" . . . . . . 41
10.1. Normative References . . . . . . . . . . . . . . . . . . 37 9.2. JSCalendar Property Registrations . . . . . . . . . . . . 41
10.2. Informative References . . . . . . . . . . . . . . . . . 38 9.2.1. id . . . . . . . . . . . . . . . . . . . . . . . . . 41
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 38 9.2.2. calendarId . . . . . . . . . . . . . . . . . . . . . 41
9.2.3. isDraft . . . . . . . . . . . . . . . . . . . . . . . 42
9.2.4. utcStart . . . . . . . . . . . . . . . . . . . . . . 42
9.2.5. utcEnd . . . . . . . . . . . . . . . . . . . . . . . 42
9.2.6. hideAttendees . . . . . . . . . . . . . . . . . . . . 42
10. References . . . . . . . . . . . . . . . . . . . . . . . . . 42
10.1. Normative References . . . . . . . . . . . . . . . . . . 43
10.2. Informative References . . . . . . . . . . . . . . . . . 43
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 43
1. Introduction 1. Introduction
JMAP ([RFC8620] - JSON Meta Application Protocol) is a generic JMAP ([RFC8620] - JSON Meta Application Protocol) is a generic
protocol for synchronizing data, such as mail, calendars or contacts, protocol for synchronizing data, such as mail, calendars or contacts,
between a client and a server. It is optimized for mobile and web between a client and a server. It is optimized for mobile and web
environments, and aims to provide a consistent interface to different environments, and aims to provide a consistent interface to different
data types. data types.
This specification defines a data model for synchronizing calendar This specification defines a data model for synchronizing calendar
skipping to change at page 15, line 45 skipping to change at page 16, line 4
* keywords * keywords
* color * color
* freeBusyStatus * freeBusyStatus
* useDefaultAlerts * useDefaultAlerts
* alerts * alerts
The user may also modify the above on a per-occurrence basis for The user may also modify the above on a per-occurrence basis for
recurring events. recurring events.
o *mayRSVP*: "Boolean" The user may modify the o *mayRSVP*: "Boolean" The user may modify the
"participationStatus", "participationComment", "expectReply" and "participationStatus", "participationComment", "expectReply",
"scheduleAgent" properties of any Participant object that is "scheduleAgent", "scheduleSequence", and "scheduleUpdated"
represented in the "participantIdentities" property of the properties of any Participant object that is represented in the
calendar. The user may also modify the above on a per-occurrence "participantIdentities" property of the calendar. The user may
basis for recurring events. also modify the above on a per-occurrence basis for recurring
events.
o *mayUpdateOwn*: "Boolean" The user may modify an existing event on o *mayUpdateOwn*: "Boolean" The user may modify an existing event on
this calendar if either they are the owner of the event or the this calendar if either they are the owner of the event or the
event has no owner. event has no owner.
o *mayUpdateAll*: "Boolean" The user may modify all existing events o *mayUpdateAll*: "Boolean" The user may modify all existing events
on this calendar. on this calendar.
o *mayRemoveOwn*: "Boolean" The user may delete an event or move it o *mayRemoveOwn*: "Boolean" The user may delete an event or move it
to a different calendar if either they are the owner of the event to a different calendar if either they are the owner of the event
skipping to change at page 17, line 20 skipping to change at page 17, line 28
Section 5.2. Section 5.2.
3.4. Calendar/set 3.4. Calendar/set
This is a standard "/set" method as described in [RFC8620], This is a standard "/set" method as described in [RFC8620],
Section 5.3 but with the following additional request argument: Section 5.3 but with the following additional request argument:
o *onDestroyRemoveEvents*: "Boolean" (default: false) o *onDestroyRemoveEvents*: "Boolean" (default: false)
If false, any attempt to destroy a Calendar that still has If false, any attempt to destroy a Calendar that still has
CalendarEvents in it will be rejected with a "calendarHasEvents" CalendarEvents in it will be rejected with a "calendarHasEvent"
SetError. If true, any CalendarEvents that were in the Calendar will SetError. If true, any CalendarEvents that were in the Calendar will
be destroyed. This SHOULD NOT send scheduling messages to be destroyed. This SHOULD NOT send scheduling messages to
participants or create CalendarEventNotification objects. participants or create CalendarEventNotification objects.
The "role" and "shareWith" properties may only be set by users that The "role" and "shareWith" properties may only be set by users that
have the mayAdmin right. The value is shared across all users, have the mayAdmin right. The value is shared across all users,
although users without the mayAdmin right cannot see the value. although users without the mayAdmin right cannot see the value.
Users can subscribe or unsubscribe to a calendar by setting the Users can subscribe or unsubscribe to a calendar by setting the
"isSubscribed" property. The server MAY forbid users from "isSubscribed" property. The server MAY forbid users from
skipping to change at page 21, line 31 skipping to change at page 21, line 39
o *utcEnd*: "UTCDate" The server calculates the end time in UTC from o *utcEnd*: "UTCDate" The server calculates the end time in UTC from
the start/timeZone/duration properties of the event. This is not the start/timeZone/duration properties of the event. This is not
included by default and must be requested explicitly. Like included by default and must be requested explicitly. Like
utcStart, this is calculated at fetch time if requested and may utcStart, this is calculated at fetch time if requested and may
change due to time zone data changes. change due to time zone data changes.
CalendarEvent objects MUST NOT have a "method" property as this is CalendarEvent objects MUST NOT have a "method" property as this is
only used when representing iTIP [RFC5546] scheduling messages, not only used when representing iTIP [RFC5546] scheduling messages, not
events in a data store. events in a data store.
5.1. Attachments 5.1. Additional JSCalendar properties
This document defines a new JSCalendar property.
5.1.1. hideAttendees
Type: "Boolean" (default: false)
If "true", only the owners of the event may see the full set of
participants. Other sharees of the event may only see the owners and
themselves.
5.2. Attachments
The Link object, as defined in [I-D.ietf-calext-jscalendar] The Link object, as defined in [I-D.ietf-calext-jscalendar]
Section 4.2.7, with a "rel" property equal to "enclosure" is used to Section 4.2.7, with a "rel" property equal to "enclosure" is used to
represent attachments. Instead of mandating an "href" property, represent attachments. Instead of mandating an "href" property,
clients may set a "blobId" property instead to reference a blob of clients may set a "blobId" property instead to reference a blob of
binary data in the account, as per [RFC8620] Section 6. binary data in the account, as per [RFC8620] Section 6.
The server MUST translate this to an embedded "data:" URL [RFC2397] The server MUST translate this to an embedded "data:" URL [RFC2397]
when sending the event to a system that cannot access the blob. when sending the event to a system that cannot access the blob.
Servers that support CalDAV access to the same data are recommended Servers that support CalDAV access to the same data are recommended
to expose these files as managed attachments [?@RFC8607]. to expose these files as managed attachments [?@RFC8607].
5.2. Per-user properties 5.3. Per-user properties
In shared calendars where "shareesActAs" is "self", the following In shared calendars where "shareesActAs" is "self", the following
properties MUST be stored per-user: properties MUST be stored per-user:
o keywords o keywords
o color o color
o freeBusyStatus o freeBusyStatus
o useDefaultAlerts o useDefaultAlerts
o alerts o alerts
The user may also modify these properties on a per-occurrence basis The user may also modify these properties on a per-occurrence basis
for recurring events; again, these MUST be stored per-user. for recurring events; again, these MUST be stored per-user.
When writing per-user properties, the "updated" property MUST also be When writing per-user properties, the "updated" property MUST also be
skipping to change at page 22, line 18 skipping to change at page 22, line 41
o alerts o alerts
The user may also modify these properties on a per-occurrence basis The user may also modify these properties on a per-occurrence basis
for recurring events; again, these MUST be stored per-user. for recurring events; again, these MUST be stored per-user.
When writing per-user properties, the "updated" property MUST also be When writing per-user properties, the "updated" property MUST also be
stored just for that user. When fetching the "updated" property, the stored just for that user. When fetching the "updated" property, the
value to return is whichever is later of the per-user updated time or value to return is whichever is later of the per-user updated time or
the updated time of the master event. the updated time of the master event.
5.3. Recurring events 5.4. Recurring events
Events may recur, in which case they represent multiple occurrences Events may recur, in which case they represent multiple occurrences
or instances. The data store will either contain a single master or instances. The data store will either contain a single master
event, containing a recurrence rule and/or recurrence overrides; or, event, containing a recurrence rule and/or recurrence overrides; or,
a set of individual instances (when invited to specific occurrences a set of individual instances (when invited to specific occurrences
only). only).
The client may ask the server to expand recurrences within a specific The client may ask the server to expand recurrences within a specific
time range in "CalendarEvent/query". This will generate synthetic time range in "CalendarEvent/query". This will generate synthetic
ids representing individual instances in the requested time range. ids representing individual instances in the requested time range.
The client can fetch and update the objects using these ids and the The client can fetch and update the objects using these ids and the
server will make the appropriate changes to the master event. server will make the appropriate changes to the master event.
Synthetic ids do not appear in "CalendarEvent/changes" responses; Synthetic ids do not appear in "CalendarEvent/changes" responses;
only the ids of events as actually stored on the server. only the ids of events as actually stored on the server.
If the user is invited to specific instances then later added to the If the user is invited to specific instances then later added to the
master event, "CalendarEvent/changes" will show the ids of all the master event, "CalendarEvent/changes" will show the ids of all the
individual instances being destroyed and the id for the master event individual instances being destroyed and the id for the master event
being created. being created.
5.4. Updating for "this-and-future" 5.5. Updating for "this-and-future"
When editing a recurring event, you can either update the master When editing a recurring event, you can either update the master
event (affecting all instances unless overriden) or update an event (affecting all instances unless overriden) or update an
override for a specific occurrence. To update all occurrences from a override for a specific occurrence. To update all occurrences from a
specific point onwards, there are therefore two options: split the specific point onwards, there are therefore two options: split the
event, or update the master and override all occurrences before the event, or update the master and override all occurrences before the
split point back to their original values. split point back to their original values.
5.4.1. Splitting an event 5.5.1. Splitting an event
If the event is not scheduled (has no participants), the simplest If the event is not scheduled (has no participants), the simplest
thing to do is to duplicate the event, modifying the recurrence rules thing to do is to duplicate the event, modifying the recurrence rules
of the original so it finishes before the split point, and the of the original so it finishes before the split point, and the
duplicate so it starts at the split point. As per JSCalendar duplicate so it starts at the split point. As per JSCalendar
{TODO:ref} Section 4.1.3, a "next" and "first" relation MUST be set [I-D.ietf-calext-jscalendar] Section 4.1.3, a "next" and "first"
on the new objects respectively. relation MUST be set on the new objects respectively.
Splitting an event however is problematic in the case of a scheduled Splitting an event however is problematic in the case of a scheduled
event, because the iTIP messages generated make it appear like two event, because the iTIP messages generated make it appear like two
unrelated changes, which can be confusing. unrelated changes, which can be confusing.
5.4.2. Updating the master and overriding previous 5.5.2. Updating the master and overriding previous
For scheduled events, a better approach is to avoid splitting and For scheduled events, a better approach is to avoid splitting and
instead update the master event with the new property value for "this instead update the master event with the new property value for "this
and future", then create overrides for all occurrences before the and future", then create overrides for all occurrences before the
split point to restore the property to its previous value. Indeed, split point to restore the property to its previous value. Indeed,
this may be the only option the user has permission to do if not an this may be the only option the user has permission to do if not an
owner of the event. owner of the event.
Clients may choose to skip creating the overrides if the old data is Clients may choose to skip creating the overrides if the old data is
not important, for example if the "alerts" property is being updated, not important, for example if the "alerts" property is being updated,
it is probably not important to create overrides for events in the it is probably not important to create overrides for events in the
past with the alerts that have already fired. past with the alerts that have already fired.
5.5. CalendarEvent/get 5.6. CalendarEvent/get
This is a standard "/get" method as described in [RFC8620], This is a standard "/get" method as described in [RFC8620],
Section 5.1, with three extra arguments: Section 5.1, with three extra arguments:
o *recurrenceOverridesBefore*: "UTCDate|null" If given, only o *recurrenceOverridesBefore*: "UTCDate|null" If given, only
recurrence overrides with a recurrence id on or after this date
(when translated into UTC) will be returned.
o *recurrenceOverridesAfter*: "UTCDate|null" If given, only
recurrence overrides with a recurrence id before this date (when recurrence overrides with a recurrence id before this date (when
translated into UTC) will be returned. translated into UTC) will be returned.
o *recurrenceOverridesAfter*: "UTCDate|null" If given, only
recurrence overrides with a recurrence id on or after this date
(when translated into UTC) will be returned.
o *reduceParticipants*: "Boolean" (default: false) If true, only o *reduceParticipants*: "Boolean" (default: false) If true, only
participants with the "owner" role or corresponding to the user's participants with the "owner" role or corresponding to the user's
participant identities will be returned in the "participants" participant identities will be returned in the "participants"
property of the master event and any recurrence overrides. If property of the master event and any recurrence overrides. If
false, all participants will be returned. false, all participants will be returned.
A CalendarEvent object is a JSEvent object so may have arbitrary A CalendarEvent object is a JSEvent object so may have arbitrary
properties. If the client makes a "CalendarEvent/get" call with a properties. If the client makes a "CalendarEvent/get" call with a
null or omitted "properties" argument, all properties defined on the null or omitted "properties" argument, all properties defined on the
JSEvent object in the store are returned, along with the "id", JSEvent object in the store are returned, along with the "id",
skipping to change at page 24, line 37 skipping to change at page 25, line 10
per-user properties, difference in permissions etc. per-user properties, difference in permissions etc.
The "privacy" property of a JSEvent object allows the owner to The "privacy" property of a JSEvent object allows the owner to
override how sharees of the calendar see the event. If this is set override how sharees of the calendar see the event. If this is set
to "private", when a sharee fetches the event the server MUST only to "private", when a sharee fetches the event the server MUST only
return the basic time and metadata properties of the JSEvent object return the basic time and metadata properties of the JSEvent object
as specified in [I-D.ietf-calext-jscalendar], Section 4.4.3. If set as specified in [I-D.ietf-calext-jscalendar], Section 4.4.3. If set
to "secret", the server MUST behave as though the event does not to "secret", the server MUST behave as though the event does not
exist for all users other than the owner. exist for all users other than the owner.
5.6. CalendarEvent/changes This "hideAttendees" property of a JSEvent object allows the owner to
reduce the visibility of sharees into the set of participants. If
this is "true", when a non-owner sharee fetches the event, the server
MUST only return participants with the "owner" role or corresponding
to the user's participant identities.
5.7. CalendarEvent/changes
This is a standard "/changes" method as described in [RFC8620], This is a standard "/changes" method as described in [RFC8620],
Section 5.2. Section 5.2.
5.7. CalendarEvent/set 5.8. CalendarEvent/set
This is a standard "/set" method as described in [RFC8620], This is a standard "/set" method as described in [RFC8620],
Section 5.3, with the following extra argument: Section 5.3, with the following extra argument:
o *sendSchedulingMessages*: "Boolean" (default: true) If true then o *sendSchedulingMessages*: "Boolean" (default: true) If true then
any changes to scheduled events will be sent to all the any changes to scheduled events will be sent to all the
participants (if the user is an owner of the event) or back to the participants (if the user is an owner of the event) or back to the
owners (otherwise). If false, the changes only affect this owners (otherwise). If false, the changes only affect this
calendar and no scheduling messages will be sent. calendar and no scheduling messages will be sent.
skipping to change at page 25, line 40 skipping to change at page 26, line 21
o @type o @type
o uid o uid
o created o created
o updated o updated
When modifying the event, the server MUST set the following When modifying the event, the server MUST set the following
properties if the server is the source of the event and the property properties if the server is the source of the event (see Section XXX)
is not explicitly set in the update: and the property is not explicitly set in the update:
o updated: set to the current time. o updated: set to the current time.
o sequence: increment by one, unless only per-user properties (see o sequence: increment by one, unless only per-user properties (see
Section XXX) were changed. Section XXX) were changed, in which case do not modify.
The "created" property MUST NOT be updated after creation. The The "created" property MUST NOT be updated after creation. The
"sequence" property MUST NOT be set to a lower number than its "sequence" property MUST NOT be set to a lower number than its
current value. The "method" property MUST NOT be set. Any attempt current value. The "method" property MUST NOT be set. Any attempt
to do these is rejected with a standard "invalidProperties" SetError. to do these is rejected with a standard "invalidProperties" SetError.
If "utcStart" is set, this is translated into a "start" property If "utcStart" is set, this is translated into a "start" property
using the server's current time zone information. It MUST NOT be set using the server's current time zone information. It MUST NOT be set
in addition to a "start" property and it cannot be set inside in addition to a "start" property and it cannot be set inside
"recurrenceOverrides"; this MUST be rejected with an "recurrenceOverrides"; this MUST be rejected with an
"invalidProperties" SetError. "invalidProperties" SetError.
Similarly, the "utcEnd" property is translated into a "duration" Similarly, the "utcEnd" property is translated into a "duration"
property if set. It MUST NOT be set in addition to a "duration" property if set. It MUST NOT be set in addition to a "duration"
property and it cannot be set inside "recurrenceOverrides"; this MUST property and it cannot be set inside "recurrenceOverrides"; this MUST
be rejected with an "invalidProperties" SetError. be rejected with an "invalidProperties" SetError.
The server does not automatically reset the "partipationStatus" or The server does not automatically reset the "partipationStatus" or
"expectReply" properties of a Participant if the event details "expectReply" properties of a Participant when changing other event
change. Clients should either be intelligent about whether the details. Clients should either be intelligent about whether the
change necessitates resending RSVP requests, or ask the user whether change necessitates resending RSVP requests, or ask the user whether
to send them. to send them.
The server MAY enforce that all events have an owner, for example in The server MAY enforce that all events have an owner, for example in
team calendars. If the user tries to create an event without team calendars. If the user tries to create an event without
participants in such a calendar, the server MUST automatically add a participants in such a calendar, the server MUST automatically add a
participant with the "owner" role corresponding to one of the user's participant with the "owner" role corresponding to one of the user's
"participantIdentities" for the calendar. "participantIdentities" for the calendar.
When creating an event with participants, or adding participants to When creating an event with participants, or adding participants to
an event that previously did not have participants, the server MUST an event that previously did not have participants, the server MUST
set the "replyTo" property of the event if not present. Clients set the "replyTo" property of the event if not present. Clients
SHOULD NOT set the replyTo property for events when the user adds SHOULD NOT set the replyTo property for events when the user adds
participants; the server is better positioned to add all the methods participants; the server is better positioned to add all the methods
it supports to receive replies. it supports to receive replies.
5.7.1. Sending invitations and responses 5.8.1. Patching
The JMAP "/set" method allows you to update an object by sending a
patch, rather than having to supply the whole object. When doing so,
care must be taken if updating a property of a CalendarEvent where
the value is itself a PatchObject, e.g. inside "localizations" or
"recurrenceOverrides". In particular, you cannot add a property with
value "null" to the CalendarEvent using a direct patch on that
property, as this is interpreted instead as a patch to remove the
property. This is more easily understood with an example. Suppose
you have a CalendarEvent object like so:
{
"id": "123",
"title": "FooBar team meeting",
"start": "2018-01-08T09:00:00",
"recurrenceRules": [{
"@type": "RecurrenceRule",
"frequency": "weekly"
}],
"replyTo": {
"imip": "mailto:6489-4f14-a57f-c1@schedule.example.com"
},
"participants": {
"dG9tQGZvb2Jhci5xlLmNvbQ": {
"@type": "Participant",
"name": "Tom",
"email": "tom@foobar.example.com",
"sendTo": {
"imip": "mailto:6489-4f14-a57f-c1@calendar.example.com"
},
"participationStatus": "accepted",
"roles": {
"attendee": true
}
},
"em9lQGZvb2GFtcGxlLmNvbQ": {
"@type": "Participant",
"name": "Zoe",
"email": "zoe@foobar.example.com",
"sendTo": {
"imip": "mailto:zoe@foobar.example.com"
},
"participationStatus": "accepted",
"roles": {
"owner": true,
"attendee": true,
"chair": true
}
},
"recurrenceOverrides": {
"2018-03-08T09:00:00": {
"start": "2018-03-08T10:00:00",
"participants/dG9tQGZvb2Jhci5xlLmNvbQ/participationStatus":
"declined"
}
}
}
}
In this example, Tom is normally going to the weekly meeting but has
declined the occurrence on 2018-03-08, which starts an hour later
than normal. Now, if Zoe too were to decline that meeting, she could
update the event by just sending a patch like so:
[[ "CalendarEvent/set", {
"accountId": "ue150411c",
"update": {
"123": {
"recurrenceOverrides/2018-03-08T09:00:00/
participants~1em9lQGZvb2GFtcGxlLmNvbQ~1participationStatus":
"declined"
}
}
}, "0" ]]
This patches the "2018-03-08T09:00:00" PatchObject in
recurrenceOverrides so that it ends up like this:
"recurrenceOverrides": {
"2018-03-08T09:00:00": {
"start": "2018-03-08T10:00:00",
"participants/dG9tQGZvb2Jhci5xlLmNvbQ/participationStatus":
"declined",
"participants/em9lQGZvb2GFtcGxlLmNvbQ/participationStatus":
"declined"
}
}
Now if Tom were to change his mind and remove his declined status
override (thus meaning he is attending, as inherited from the top-
level event), he might remove his patch from the overrides like so:
[[ "CalendarEvent/set", {
"accountId": "ue150411c",
"update": {
"123": {
"recurrenceOverrides/2018-03-08T09:00:00/
participants~1dG9tQGZvb2Jhci5xlLmNvbQ~1participationStatus": null
}
}
}, "0" ]]
However, if you instead want to remove Tom from this instance
altogether, you could not send this patch:
[[ "CalendarEvent/set", {
"accountId": "ue150411c",
"update": {
"123": {
"recurrenceOverrides/2018-03-08T09:00:00/
participants~1dG9tQGZvb2Jhci5xlLmNvbQ": null
}
}
}, "0" ]]
This would mean remove the "participants/dG9tQGZvb2Jhci5xlLmNvbQ"
property at path "recurrenceOverrides" -> "2018-03-08T09:00:00"
inside the object; but this doesn't exist. We actually we want to
add this property and make it map to "null". The client must instead
send the full object that contains the property mapping to "null",
like so:
[[ "CalendarEvent/set", {
"accountId": "ue150411c",
"update": {
"123": {
"recurrenceOverrides/2018-03-08T09:00:00": {
"start": "2018-03-08T10:00:00",
"participants/em9lQGZvb2GFtcGxlLmNvbQ/participationStatus":
"declined"
"participants/dG9tQGZvb2Jhci5xlLmNvbQ": null
}
}
}
}, "0" ]]
5.8.2. Sending invitations and responses
Unless "sendSchedulingMessages" is false, the server MUST send Unless "sendSchedulingMessages" is false, the server MUST send
appropriate iTIP [RFC5546] scheduling messages after successfuly appropriate iTIP [RFC5546] scheduling messages after successfuly
creating, updating or destroying a calendar event. creating, updating or destroying a calendar event.
When determining which scheduling messages to send, the server must When determining which scheduling messages to send, the server must
first establish whether it is the _source_ of the event. The server first establish whether it is the _source_ of the event. The server
is the source if it will receive messages sent to any of the methods is the source if it will receive messages sent to any of the methods
specified in the "replyTo" property of the event. specified in the "replyTo" property of the event.
skipping to change at page 27, line 26 skipping to change at page 31, line 26
If the server is the source of the event it MUST NOT send messages to If the server is the source of the event it MUST NOT send messages to
any participant corresponding to the participantIdentities of the any participant corresponding to the participantIdentities of the
calendar it is in. calendar it is in.
If sending via iMIP [RFC6047], the server MAY choose to only send If sending via iMIP [RFC6047], the server MAY choose to only send
updates it deems "essential" to avoid flooding the recipient's email updates it deems "essential" to avoid flooding the recipient's email
with changes they do not care about. For example, changes to the with changes they do not care about. For example, changes to the
participationStatus of another participant, or changes to events participationStatus of another participant, or changes to events
solely in the past may be omitted. solely in the past may be omitted.
5.7.1.1. REQUEST 5.8.2.1. REQUEST
When the server is the source for the event, a REQUEST message When the server is the source for the event, a REQUEST message
([RFC5546], Section 3.2.2) is sent to all current participants if: ([RFC5546], Section 3.2.2) is sent to all current participants if:
o The event is being created. o The event is being created.
o Any non per-user property (see Section XXX) is updated on the o Any non per-user property (see Section XXX) is updated on the
event (including adding/removing participants), except if just event (including adding/removing participants), except if just
modifying the recurrenceOverrides such that CANCEL messages are modifying the recurrenceOverrides such that CANCEL messages are
generated (see the next section). generated (see the next section).
skipping to change at page 28, line 7 skipping to change at page 32, line 7
recurrence instances they are added to when sending scheduling recurrence instances they are added to when sending scheduling
messages for recurring events. If the participant is not invited to messages for recurring events. If the participant is not invited to
the master recurring event but only individual instances, scheduling the master recurring event but only individual instances, scheduling
messages MUST be sent for just those expanded occurrences messages MUST be sent for just those expanded occurrences
individually. If a participant is invited to a recurring event, but individually. If a participant is invited to a recurring event, but
removed via a recurrence override from a particular instance, any removed via a recurrence override from a particular instance, any
scheduling messages to this participant MUST return the instance as scheduling messages to this participant MUST return the instance as
"excluded" (if it matches a recurrence rule for the event) or omit "excluded" (if it matches a recurrence rule for the event) or omit
the instance entirely (otherwise). the instance entirely (otherwise).
5.7.1.2. CANCEL If the event's "hideAttendees" property is set to "true", the
recipient MUST be the only attendee in the message; all others are
omitted.
5.8.2.2. CANCEL
When the server is the source for the event, a CANCEL message When the server is the source for the event, a CANCEL message
([RFC5546], Section 3.2.5) is sent if: ([RFC5546], Section 3.2.5) is sent if:
o A participant is removed from either the master event or a single o A participant is removed from either the master event or a single
instance (the message is only sent to this participant; remaining instance (the message is only sent to this participant; remaining
participants will get a REQUEST, as described above). participants will get a REQUEST, as described above).
o The event is destroyed. o The event is destroyed.
o An exclusion is added to recurrenceOverrides to remove an instance o An exclusion is added to recurrenceOverrides to remove an instance
generated by the event's recurrence rule. generated by the event's recurrence rule.
o An additional instance (not generated by the event's recurrence o An additional instance (not generated by the event's recurrence
rule) is removed from the recurrenceOverrides. rule) is removed from the recurrenceOverrides.
In each of the latter 3 cases, the message is sent to all In each of the latter 3 cases, the message is sent to all
participants. participants.
5.7.1.3. REPLY 5.8.2.3. REPLY
When the server is _not_ the source for the event, a REPLY message When the server is _not_ the source for the event, a REPLY message
([RFC5546], Section 3.2.3) is sent for any participant corresponding ([RFC5546], Section 3.2.3) is sent for any participant corresponding
to the participantIdentities of the calendar it is in if: to the participantIdentities of the calendar it is in if:
o The "participationStatus" property of the participant is changed. o The "participationStatus" property of the participant is changed.
o The event is destroyed and the participationStatus was not "needs- o The event is destroyed and the participationStatus was not "needs-
action". action".
skipping to change at page 29, line 14 skipping to change at page 33, line 17
o An instance not generated by the event's recurrence rule is added o An instance not generated by the event's recurrence rule is added
to the recurrenceOverrides (this is presumed to be the client to the recurrenceOverrides (this is presumed to be the client
undoing the deletion of a single instance). undoing the deletion of a single instance).
A reply is not sent when deleting an event where the current status A reply is not sent when deleting an event where the current status
is "needs-action" as if a junk calendar event gets added by an is "needs-action" as if a junk calendar event gets added by an
automated system, the user MUST be able to delete the event without automated system, the user MUST be able to delete the event without
sending a reply. sending a reply.
5.8. CalendarEvent/copy 5.9. CalendarEvent/copy
This is a standard "/copy" method as described in [RFC8620], This is a standard "/copy" method as described in [RFC8620],
Section 5.4. Section 5.4.
5.9. CalendarEvent/query 5.10. CalendarEvent/query
This is a standard "/query" method as described in [RFC8620], This is a standard "/query" method as described in [RFC8620],
Section 5.5, with two extra arguments: Section 5.5, with two extra arguments:
o *expandRecurrences*: "Boolean" (default: false) If true, the o *expandRecurrences*: "Boolean" (default: false) If true, the
server will expand any recurring event. If true, the filter MUST server will expand any recurring event. If true, the filter MUST
be just a FilterCondition (not a FilterOperator) and MUST include be just a FilterCondition (not a FilterOperator) and MUST include
both a before and after property. This ensures the server is not both a before and after property. This ensures the server is not
asked to return an infinite number of results. asked to return an infinite number of results.
skipping to change at page 30, line 5 skipping to change at page 34, line 5
There is no necessary correspondence between the ids of different There is no necessary correspondence between the ids of different
instances of the same expanded event. instances of the same expanded event.
The following additional error may be returned instead of the The following additional error may be returned instead of the
"CalendarEvent/query" response: "CalendarEvent/query" response:
"cannotCalculateOccurrences": the server cannot expand a recurrence "cannotCalculateOccurrences": the server cannot expand a recurrence
required to return the results for this query. required to return the results for this query.
5.9.1. Filtering 5.10.1. Filtering
A *FilterCondition* object has the following properties: A *FilterCondition* object has the following properties:
o *inCalendars*: "Id[]|null" A list of calendar ids. An event must o *inCalendars*: "Id[]|null" A list of calendar ids. An event must
be in ANY of these calendars to match the condition. be in ANY of these calendars to match the condition.
o *after*: "LocalDate|null" The end of the event, or any recurrence o *after*: "LocalDate|null" The end of the event, or any recurrence
of the event, in the time zone given as the timeZone argument, of the event, in the time zone given as the timeZone argument,
must be after this date to match the condition. must be after this date to match the condition.
skipping to change at page 31, line 33 skipping to change at page 35, line 33
literal """, "'" and "\" respectively in a phrase. literal """, "'" and "\" respectively in a phrase.
o Outside of a phrase, white-space SHOULD be treated as dividing o Outside of a phrase, white-space SHOULD be treated as dividing
separate tokens that may be searched for separately in the event, separate tokens that may be searched for separately in the event,
but MUST all be present for the event to match the filter. but MUST all be present for the event to match the filter.
o Tokens MAY be matched on a whole-word basis using stemming (so for o Tokens MAY be matched on a whole-word basis using stemming (so for
example a text search for "bus" would match "buses" but not example a text search for "bus" would match "buses" but not
"business"). "business").
5.9.2. Sorting 5.10.2. Sorting
The following properties MUST be supported for sorting: The following properties MUST be supported for sorting:
o start o start
o uid o uid
o recurrenceId o recurrenceId
The following properties SHOULD be supported for sorting: The following properties SHOULD be supported for sorting:
o created o created
o updated o updated
5.10. CalendarEvent/queryChanges 5.11. CalendarEvent/queryChanges
This is a standard "/queryChanges" method as described in [RFC8620], This is a standard "/queryChanges" method as described in [RFC8620],
Section 5.6. Section 5.6.
5.11. Examples 5.12. Examples
TODO: Add example of how to get event by uid: query uid=foo and TODO: Add example of how to get event by uid: query uid=foo and
backref. Return multiple with recurrenceId set (user invited to backref. Return multiple with recurrenceId set (user invited to
specific instances of recurring event). specific instances of recurring event).
6. Alerts 6. Alerts
Alerts may be specified on events as described in Alerts may be specified on events as described in
[I-D.ietf-calext-jscalendar], Section 4.5. If the "useDefaultAlerts" [I-D.ietf-calext-jscalendar], Section 4.5. If the "useDefaultAlerts"
property is true, the alerts are taken from the Calendar property is true, the alerts are taken from the Calendar
skipping to change at page 37, line 27 skipping to change at page 41, line 27
Capability Name: "urn:ietf:params:jmap:calendars" Capability Name: "urn:ietf:params:jmap:calendars"
Specification document: this document Specification document: this document
Intended use: common Intended use: common
Change Controller: IETF Change Controller: IETF
Security and privacy considerations: this document, Section XXX Security and privacy considerations: this document, Section XXX
9.2. Reservation of JMAP attributes in JSCalendar Property registry 9.2. JSCalendar Property Registrations
TODO. IANA will register the following additional properties in the
JSCalendar Properties Registry.
10. References 9.2.1. id
Property Name: id
Property Type: "Id"
Property Context: JSEvent, JSTask
Intended Use: Reserved
9.2.2. calendarId
Property Name: calendarId
Property Type: "Id"
Property Context: JSEvent, JSTask
Intended Use: Reserved
9.2.3. isDraft
Property Name: isDraft
Property Type: "Boolean"
Property Context: JSEvent, JSTask
Intended Use: Reserved
9.2.4. utcStart
Property Name: utcStart
Property Type: "UTCDateTime"
Property Context: JSEvent, JSTask
Intended Use: Reserved
9.2.5. utcEnd
Property Name: utcEnd
Property Type: "UTCDateTime"
Property Context: JSEvent, JSTask
Intended Use: Reserved
9.2.6. hideAttendees
Property Name: hideAttendees
Property Type: "Boolean" (default: false)
Property Context: JSEvent, JSTask
Reference: This document, Section XXX.
Intended Use: Common
10. References
10.1. Normative References 10.1. Normative References
[I-D.ietf-calext-jscalendar] [I-D.ietf-calext-jscalendar]
Jenkins, N. and R. Stepanek, "JSCalendar: A JSON Jenkins, N. and R. Stepanek, "JSCalendar: A JSON
representation of calendar data", draft-ietf-calext- representation of calendar data", draft-ietf-calext-
jscalendar-26 (work in progress), March 2020. jscalendar-26 (work in progress), March 2020.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
 End of changes. 40 change blocks. 
88 lines changed or deleted 317 lines changed or added

This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/