JMAP J.M. Baum, Ed. Internet-Draft H.J. Happel, Ed. Intended status: Standards Track audriga Expires: 2 August 2021 29 January 2021

JMAP for Tasks draft-baum-jmap-tasks-00

Abstract

This document specifies a data model for synchronizing task data with a server using JMAP.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six and may be updated, replaced, or obsoleted by other documents at any . It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on 2 August 2021.

Copyright Notice

Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/ license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

Table of Contents

1. Introduction ...... 3

Baum & Happel Expires 2 August 2021 [Page 1] Internet-Draft JMAP Tasks January 2021

1.1. Notational Conventions ...... 3 1.2. Terminology ...... 3 1.3. Data Model Overview ...... 4 1.4. Addition to the Capabilities Object ...... 4 1.4.1. urn:ietf:params:jmap:tasks ...... 4 2. Principals ...... 5 2.1. Principal Capability urn:ietf:params:jmap:tasks . . . . . 5 3. Assignee Identities ...... 6 3.1. AssigneeIdentity/get ...... 6 3.2. AssigneeIdentity/changes ...... 6 3.3. AssigneeIdentity/set ...... 6 4. TaskLists ...... 6 4.1. TaskList/get ...... 9 4.2. TaskList/changes ...... 9 4.3. TaskList/set ...... 9 5. Tasks ...... 9 5.1. Additional JSCalendar properties ...... 10 5.1.1. mayInviteSelf ...... 10 5.1.2. mayInviteOthers ...... 11 5.1.3. hideAttendees ...... 11 5.1.4. relatedTo ...... 11 5.2. Properties similar in JMAP for ...... 11 5.3. Task/get ...... 11 5.4. Task/changes ...... 12 5.5. Task/set ...... 12 5.6. Task/copy ...... 12 5.7. Task/query ...... 12 5.8. Task/queryChanges ...... 12 6. Task Notifications ...... 12 6.1. Object Properties ...... 12 6.2. TaskNotification/get ...... 13 6.3. TaskNotification/changes ...... 14 6.4. TaskNotification/set ...... 14 6.5. TaskNotification/query ...... 14 6.5.1. Filtering ...... 14 6.5.2. Sorting ...... 14 6.6. TaskNotification/queryChanges ...... 14 7. Security Considerations ...... 14 8. IANA Considerations ...... 15 8.1. JMAP Capability Registration for "tasks" ...... 15 8.2. JSCalendar Property Registrations ...... 15 9. Normative References ...... 15 10. Informative References ...... 16 Authors’ Addresses ...... 16

Baum & Happel Expires 2 August 2021 [Page 2] Internet-Draft JMAP Tasks January 2021

1. Introduction

JMAP ([RFC8620] - JSON Meta Application Protocol) is a generic protocol for synchronizing data, such as mail, or contacts, between a client and a server. It is optimized for mobile and web environments, and aims to provide a consistent interface to different data types.

JMAP for Calendars ([I-D.ietf-jmap-calendars]) defines a data model for synchronizing calendar data between a client and a server using JMAP. The data model is designed to allow a server to provide consistent access to the same data via CalDAV [RFC4791] as well as JMAP.

While CalDAV defines access to tasks, JMAP for Calendars does not. This specification fills this gap and defines a data model for synchronizing task data between a client and a server using JMAP. It is built upon JMAP for Calendars and reuses most of its definitions. For better readability this document only outlines differences between this specification and JMAP for Calendars. If not stated otherwise, the same specifics that apply to Calendar, CalendarEvent and CalendarEventNotification objects as defined in the aforemetioned specification also apply to similar data types introduced in this specification.

1.1. Notational Conventions

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

Type signatures, examples, and property descriptions in this document follow the conventions established in Section 1.1 of [RFC8620]. Data types defined in the core specification are also used in this document.

1.2. Terminology

The same terminology is used in this document as in the core JMAP specification, see [RFC8620], Section 1.6.

The terms ParticipantIdentity, TaskList, Task and TaskNotification are used to refer to the data types defined in this document and instances of those data types.

Baum & Happel Expires 2 August 2021 [Page 3] Internet-Draft JMAP Tasks January 2021

1.3. Data Model Overview

Similar to JMAP for Calendar, an Account (see [RFC8620], Section 1.6.2) contains zero or more TaskList objects, which is a named collection of Tasks belonging to a Principal (see [I-D.jenkins-jmap-sharing] Section XXX). Task lists can also provide defaults, such as alerts and a color to apply to tasks in the calendar. Clients commonly let users toggle visibility of tasks belonging to a particular task list on/off. Servers may allow a task to belong to multiple TaskLists within an account.

A Task is a representation of a single task or recurring series of Tasks in JSTask [I-D.ietf-calext-jscalendar] format. Recurrence rules and alerts as defined in JMAP for Calendars (see [I-D.ietf-jmap-calendars] Section XXX) apply.

Just like the CalendarEventNotification objects (see [I-D.ietf-jmap-calendars] Section XXX), TaskNotification objects keep track of the of changes made to a task by other users. Similarly, the ShareNotification type (see [I-D.jenkins-jmap-sharing] Section XXX) notifies the user when their access to another user’s calendar is granted or revoked.

1.4. Addition to the Capabilities Object

The capabilities object is returned as part of the JMAP Session object; see [RFC8620], Section 2. This document defines one additional capability URI.

1.4.1. urn:ietf:params:jmap:tasks

This represents support for the TaskList, Task and TaskNotification data types and associated API methods. The value of this property in the JMAP Session capabilities property is an empty object.

The value of this property in an account’s accountCapabilities property is an object that MUST contain the following information on server capabilities and permissions for that account:

* *shareesActAs*: "String" This MUST be one of:

- "self" - sharees act as themselves when using tasks in this account.

- "secretary"- sharees act as the principal to which this account belongs.

Baum & Happel Expires 2 August 2021 [Page 4] Internet-Draft JMAP Tasks January 2021

* *maxTaskListsPerTask*: "UnsignedInt|null" The maximum number of TaskLists (see Section XXX) that can be can assigned to a single Task object (see Section XXX). This MUST be an integer >= 1, or null for no limit (or rather, the limit is always the number of TaskLists in the account).

* *minDateTime*: "LocalDate" The earliest date-time the server is willing to accept for any date stored in a Task.

* *maxDateTime*: "LocalDate" The latest date-time the server is willing to accept for any date stored in a Task.

* *maxExpandedQueryDuration*: "Duration" The maximum duration the user may query over when asking the server to expand recurrences.

* *maxAssigneesPerTask*: "Number|null" The maximum number of assignees a single task may have, or null for no limit.

* *mayCreateTaskList*: "Boolean" If true, the user may create a task list in this account.

2. Principals

For systems that also support JMAP Sharing [RFC XXX], the tasks capability is used to indicate that this principal may be used with tasks.

2.1. Principal Capability urn:ietf:params:jmap:tasks

A "urn:ietf:params:jmap:tasks" property is added to the Principal "capabilities" object, the value of which is an object with the following properties:

* *accountId*: "Id|null" Id of Account with the "urn:ietf:params:jmap:tasks" capability that contains the task data for this principal, or null if none (e.g. the Principal is a group just used for permissions management), or the user does not have access to any data in the account.

* *account*: "Account|null" The JMAP Account object corresponding to the accountId, null if none.

* *sendTo*: "String[String]|null" If this principal may be added as a participant to an , this is the map of methods for adding it, in the same format as Participant#sendTo in JSTask (see [I-D.ietf-calext-jscalendar], Section 4.4.5).

Baum & Happel Expires 2 August 2021 [Page 5] Internet-Draft JMAP Tasks January 2021

3. Assignee Identities

An AssigneeIdentity stores information about a URI that represents the user within that account in an event’s assignees. It has the following properties:

* *id*: "Id" (immutable; server-set) The id of the AssigneeIdentity.

* *name*: "String" (default: "") The display name of the assignee to use when adding this assignee to a task, e.g. "Jane Bloggs".

* *sendTo*: "String[String]" Represents methods by which the participant may receive invitations and updates to an event.

The keys in the property value are the available methods and MUST only contain ASCII alphanumeric characters (A-Za-z0-9). The value is a URI for the method specified in the key.

An assignee in an task corresponds to an AssigneeIdentity if any of the method/uri pairs in the sendTo property of the participant are identical to a method/uri pair in the sendTo property of the identity.

The following JMAP methods are supported.

3.1. AssigneeIdentity/get

This is a standard "/get" method as described in [RFC8620], Section 5.1. The _ids_ argument may be "null" to fetch all at once.

3.2. AssigneeIdentity/changes

This is a standard "/changes" method as described in [RFC8620], Section 5.2.

3.3. AssigneeIdentity/set

This is a standard "/set" method as described in [RFC8620], Section 5.3. The server MAY restrict the uri values the user may claim, for example only allowing "mailto:" URIs with email addresses that belong to the user. A standard "forbidden" error is returned to reject non-permissible changes.

4. TaskLists

A TaskList is a named collection of tasks. All tasks are associated with at least one TaskList.

Baum & Happel Expires 2 August 2021 [Page 6] Internet-Draft JMAP Tasks January 2021

A *TaskList* object has the following properties:

* *id*: "Id" (immutable; server-set) The id of the task list.

* *role*: "String|null" (default: null) Denotes the task list has a special purpose. This MUST be one of the following:

- "inbox": This is the principal’s default task list;

- "trash": This task list holds messages the user has discarded;

* *name*: "String" The user-visible name of the task list. This may be any UTF-8 string of at least 1 character in length and maximum 255 octets in size.

* *description*: "String|null" (default: null) An optional longer- form description of the task list, to provide context in shared environments where users need more than just the name.

* *color*: "String|null" (default: null) A color to be used when displaying events associated with the task list.

If not null, the value MUST be a case-insensitive color name taken from the set of names defined in Section 4.3 of CSS Color Module Level 3 COLORS (https://www.w3.org/TR/css-color-3/), or an RGB value in hexadecimal notation, as defined in Section 4.2.1 of CSS Color Module Level 3.

The color SHOULD have sufficient contrast to be used as text on a white background.

* *sortOrder*: "UnsignedInt" (default: 0) Defines the sort order of task lists when presented in the client’s UI, so it is consistent between devices. The number MUST be an integer in the range 0 <= sortOrder < 2^(31.)

A task list with a lower order should be displayed before a list with a higher order in any list of task lists in the client’s UI. Task lists with equal order SHOULD be sorted in alphabetical order by name. The sorting should take into account locale-specific character order convention.

* *isSubscribed*: "Boolean" Has the user indicated they wish to see this task list in their client? This SHOULD default to false for task lists in shared accounts the user has access to and true for any new task list created by the user themself.

Baum & Happel Expires 2 August 2021 [Page 7] Internet-Draft JMAP Tasks January 2021

If false, the task list should only be displayed when the user explicitly requests it or to offer it for the user to subscribe to.

* *isVisible*: "Boolean" (default: true) Should the task list’s events be displayed to the user at the moment? Clients MUST ignore this property if isSubscribed is false. If an event is in multiple task lists, it should be displayed if isVisible is true for any of those task lists.

* *defaultAlertsWithTime*: "Id[Alert]|null" (default: null) A map of alert ids to Alert objects (see [I-D.ietf-calext-jscalendar], Section 4.5.2) to apply for events where "showWithoutTime" is false and "useDefaultAlerts" is true. Ids MUST be unique across all default alerts in the account, including those in other task lists; a UUID is recommended.

* *defaultAlertsWithoutTime*: "Id[Alert]|null" (default: null) A map of alert ids to Alert objects (see [I-D.ietf-calext-jscalendar], Section 4.5.2) to apply for events where "showWithoutTime" is true and "useDefaultAlerts" is true. Ids MUST be unique across all default alerts in the account, including those in other task lists; a UUID is recommended.

* *timeZone*: "String|null" (default: null) The to use for events without a time zone when the server needs to resolve them into absolute time, e.g., for alerts or availability calculation. The value MUST be a time zone id from the IANA Time Zone Database TZDB (https://www.iana.org/time-zones). If "null", the timeZone of the account’s associated Principal will be used. Clients SHOULD use this as the default for new events in this task list if set.

* *shareWith*: "Id[CalendarRights]|null" (default: null) A map of Principal id to rights for principals this calendar is shared with. The principal to which this task list belongs MUST NOT be in this set. This is null if the user requesting the object does not have the mayAdmin right, or if the task list is not shared with anyone. May be modified only if the user has the mayAdmin right. The account id for the principals may be found in the "urn:ietf:params:jmap:principals:owner" capability of the Account to which the calendar belongs.

The user is an *owner* for a task if the Task object has an "assignee" property, and one of the Participant objects both:

1. Has the "chair" role.

Baum & Happel Expires 2 August 2021 [Page 8] Internet-Draft JMAP Tasks January 2021

2. Corresponds to one of the user’s AssigneeIdentity objects in the account.

A task has no owner if its assignee property is null or omitted.

TODO currently disregarding "myRights"

4.1. TaskList/get

This is a standard "/get" method as described in [RFC8620], Section 5.1. The _ids_ argument may be "null" to fetch all at once.

TODO add part about rights properties.

4.2. TaskList/changes

This is a standard "/changes" method as described in [RFC8620], Section 5.2.

4.3. TaskList/set

This is the "Calendar/set" method as described in [I-D.ietf-jmap-calendars], Section XXX.

TODO copy+paste from "Calendar/set" and replace "onDestroyRemoveEvents" by "onDestroyRemoveTasks" (and "calendarHasEvent").

5. Tasks

A *Task* object contains information about a task, or recurring series of tasks. It is a JSTask object, as defined in [I-D.ietf-calext-jscalendar], with the following additional properties:

* *id*: "Id" The id of the Task. This property is immutable. The id uniquely identifies a JSTask with a particular "uid" and "recurrenceId" within a particular account.

* *taskListIds*: "Id[Boolean]" The set of TaskList ids this task belongs to. An task MUST belong to one or more TaskLists at all (until it is destroyed). The set is represented as an object, with each key being a _TaskList id_. The value for each key in the object MUST be "true".

Baum & Happel Expires 2 August 2021 [Page 9] Internet-Draft JMAP Tasks January 2021

* *isDraft*: "Boolean" If true, this task is to be considered a draft. The server will not send any push notifications for alerts. This may only be set to true upon creation. Once set to false, the value cannot be updated to true. This property MUST NOT appear in "recurrenceOverrides".

* *utcStart*: "UTCDate" For simple clients that do not or cannot implement time zone support. Clients should only use this if also asking the server to expand recurrences, as you cannot accurately expand a recurrence without the original time zone.

This property is calculated at fetch time by the server. Time zones are political and they can and do change at any time. Fetching exactly the same property again may return a different results if the time zone data has been updated on the server. Time zone data changes are not considered "updates" to the task.

If set, server will convert to the task’s current time zone using its current time zone data and store the local time.

This is not included by default and must be requested explicitly.

Floating tasks (tasks without a time zone) will be interpreted as per the time zone given as a Task/get argument.

Note that it is not possible to accurately calculate the expansion of recurrence rules or recurrence overrides with the utcStart property rather than the local start time. Even simple recurrences such as "repeat weekly" may cross a daylight-savings boundary and end up at a different UTC time. Clients that wish to use "utcStart" are RECOMMENDED to request the server expand recurrences (see Section XXX).

* *utcEnd*: "UTCDate" The server calculates the end time in UTC from the start/timeZone/duration properties of the task. This is not included by default and must be requested explicitly. Like utcStart, this is calculated at fetch time if requested and may change due to time zone data changes. Floating tasks will be interpreted as per the time zone given as a Task/get argument.

5.1. Additional JSCalendar properties

This document defines four new JSCalendar properties.

5.1.1. mayInviteSelf

Type: "Boolean" (default: false)

Baum & Happel Expires 2 August 2021 [Page 10] Internet-Draft JMAP Tasks January 2021

If "true", any user that has access to the event may add themselves to it as a participant with the "attendee" role. This property MUST NOT be altered in the recurrenceOverrides; it may only be set on the master object.

5.1.2. mayInviteOthers

Type: "Boolean" (default: false)

If "true", any current participant with the "attendee" role may add new participants with the "attendee" role to the event. This property MUST NOT be altered in the recurrenceOverrides; it may only be set on the master object.

5.1.3. 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. This property MUST NOT be altered in the recurrenceOverrides; it may only be set on the master object.

5.1.4. relatedTo

Type: "Id[String]|null" (default: null)

A map of task ids to relations. Relation SHOULD be one of: - "blockedBy": Blocked by task with id. - "clonedBy": Task with id was cloned from this issue. - "duplicatedBy": Task with id is a duplicate of this issue. - "causedBy": Task with id was the cause for this task. - "relatesTo": Task with id is related. - "childOf": Task with id is parent.

5.2. Properties similar in JMAP for Calendar

Attachments, per-user properties, recurrences and updates to recurrences are described in [I-D.ietf-jmap-calendars], Section XXX.

5.3. Task/get

This is the "CalendarEvent/get" method as described in [I-D.ietf-jmap-calendars], Section XXX.

TODO redefine this here. Similar to "TaskList/get" we only need to replace a few definitions. For example, replace "reduceParticipants" with "reduceAssignees". Copy+Paste most of the stuff.

Baum & Happel Expires 2 August 2021 [Page 11] Internet-Draft JMAP Tasks January 2021

5.4. Task/changes

This is a standard "/changes" method as described in [RFC8620], Section 5.2.

5.5. Task/set

This is the "CalendarEvent/set" method as described in [I-D.ietf-jmap-calendars], Section XXX.

TODO copy+paste most stuff from "CalendarEvent/set". It should be fine to just reference patching.

5.6. Task/copy

This is a standard "/copy" method as described in [RFC8620], Section 5.4.

5.7. Task/query

This is the "CalendarEvent/query" method as described in [I-D.ietf-jmap-calendars], Section XXX.

TODO copy+paste most stuff from "CalendarEvent/query". Mainly filtering should be different.

5.8. Task/queryChanges

This is a standard "/queryChanges" method as described in [RFC8620], Section 5.6.

6. Task Notifications

The TaskNotification data type records changes made by external entities to tasks in calendars the user is subscribed to. Notifications are stored in the same Account as the Task that was changed.

This is the same specification as the CalendarEventNotification object from [I-D.ietf-jmap-calendars], Section XXX. Only the object properties differ slightly and are therefore fully described in this document.

6.1. Object Properties

The *TaskNotification* object has the following properties:

* *id*: "String" The id of the TaskNotification.

Baum & Happel Expires 2 August 2021 [Page 12] Internet-Draft JMAP Tasks January 2021

* *created*: "UTCDate" The time this notification was created.

* *changedBy*: "Person" Who made the change.

- *name*: "String" The name of the person who made the change.

- *email*: "String" The email of the person who made the change, or null if no email is available.

- *principalId*: "String|null" The id of the principal corresponding to the person who made the change, if any. This will be null if the change was due to receving an iTIP message.

* *comment*: "String|null" Comment sent along with the change by the user that made it. (e.g. COMMENT property in an iTIP message).

* *type*: "String" This MUST be one of

- created

- updated

- destroyed

* *TaskId*: "String" The id of the Task that this notification is about.

* *isDraft*: "Boolean" (created/updated only) Is this event a draft?

* *event*: "JSTask" The data before the change (if updated or destroyed), or the data after creation (if created).

* *eventPatch*: "PatchObject" (updated only) A patch encoding the change between the data in the event property, and the data after the update.

To reduce data, if the change only affects a single instance of a recurring event, the server MAY set the event and eventPatch properties for the instance; the calendarEventId MUST still be for the master event.

6.2. TaskNotification/get

This is a standard "/get" method as described in [RFC8620], Section 5.1.

Baum & Happel Expires 2 August 2021 [Page 13] Internet-Draft JMAP Tasks January 2021

6.3. TaskNotification/changes

This is a standard "/changes" method as described in [RFC8620], Section 5.2.

6.4. TaskNotification/set

This is a standard "/changes" method as described in [RFC8620], Section 5.3.

Only destroy is supported; any attempt to create/update MUST be rejected with a "forbidden" SetError.

6.5. TaskNotification/query

This is a standard "/query" method as described in [RFC8620], Section 5.5.

6.5.1. Filtering

A *FilterCondition* object has the following properties:

* *after*: "UTCDate|null" The creation date must be on or after this date to match the condition.

* *before*: "UTCDate|null" The creation date must be before this date to match the condition.

* *type*: "String" The type property must be the same to match the condition.

* *taskIds*: "Id[]|null" A list of task ids. The taskId property of the notification must be in this list to match the condition.

6.5.2. Sorting

The "created" property MUST be supported for sorting.

6.6. TaskNotification/queryChanges

This is a standard "/queryChanges" method as described in [RFC8620], Section 5.6.

7. Security Considerations

All security considerations of JMAP for Calendars [I-D.ietf-jmap-calendars] apply to this specification.

Baum & Happel Expires 2 August 2021 [Page 14] Internet-Draft JMAP Tasks January 2021

8. IANA Considerations

8.1. JMAP Capability Registration for "tasks"

TODO Actually register

IANA will register the "tasks" JMAP Capability as follows:

Capability Name: "urn:ietf:params:jmap:tasks"

Specification document: this document

Intended use: common

Change Controller: IETF

Security and privacy considerations: this document, Section XXX

8.2. JSCalendar Property Registrations

All IANA registrations for JSTask are described in JMAP for Calendars [I-D.ietf-jmap-calendars].

9. Normative References

[I-D.ietf-calext-jscalendar] Jenkins, N. and R. Stepanek, "JSCalendar: A JSON representation of calendar data", Work in Progress, Internet-Draft, draft-ietf-calext-jscalendar-32, 15 October 2020, .

[I-D.ietf-jmap-calendars] Jenkins, N. and M. Douglass, "JMAP for Calendars", Work in Progress, Internet-Draft, draft-ietf-jmap-calendars-05, 24 January 2021, .

[I-D.jenkins-jmap-sharing] Jenkins, N., "JMAP Sharing", Work in Progress, Internet- Draft, draft-jenkins-jmap-sharing-00, 15 December 2020, .

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, .

Baum & Happel Expires 2 August 2021 [Page 15] Internet-Draft JMAP Tasks January 2021

[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, .

[RFC8620] Jenkins, N. and C. Newman, "The JSON Meta Application Protocol (JMAP)", RFC 8620, DOI 10.17487/RFC8620, July 2019, .

10. Informative References

[RFC4791] Daboo, C., Desruisseaux, B., and L. Dusseault, "Calendaring Extensions to WebDAV (CalDAV)", RFC 4791, DOI 10.17487/RFC4791, March 2007, .

Authors’ Addresses

Joris Baum (editor) audriga Durlacher Allee 47 76131 Karlsruhe Germany

Email: [email protected] URI: https://www.audriga.com

Hans-Joerg (editor) audriga Durlacher Allee 47 76131 Karlsruhe Germany

Email: [email protected] URI: https://www.audriga.com

Baum & Happel Expires 2 August 2021 [Page 16] Network Working Group M. Douglass Internet-Draft Bedework Updates: 5545 (if approved) March 26, 2021 Intended status: Standards Track Expires: September 27, 2021

Event Publishing Extensions to iCalendar draft-ietf-calext-eventpub-extensions-19

Abstract

This specification updates RFC5545 by introducing a number of new iCalendar properties and components which are of particular use for event publishers and in social networking.

This specification also defines a new STRUCTURED-DATA property for iCalendar RFC5545 to allow for data that is directly pertinent to an event or task to be included with the calendar data.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on September 27, 2021.

Copyright Notice

Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must

Douglass Expires September 27, 2021 [Page 1] Internet-Draft Event Publishing Extensions to iCalendar March 2021

include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

Table of Contents

1. Introduction ...... 3 1.1. Conventions Used in This Document ...... 3 1.2. Terms Used in This Document ...... 3 2. Components and properties ...... 4 3. Typed References ...... 4 3.1. Use Cases ...... 5 3.1.1. Piano Concert Performance ...... 5 3.1.2. Itineraries ...... 5 3.1.2.1. Reserving facilities ...... 6 4. Modifications to Calendar Components ...... 6 5. New Property Parameters ...... 7 5.1. Order ...... 7 5.2. Schema ...... 8 5.3. Derived ...... 9 6. New Properties ...... 10 6.1. Location Type ...... 10 6.2. Participant Type ...... 11 6.3. Resource Type ...... 13 6.4. Calendar Address ...... 14 6.5. Styled-Description ...... 14 6.6. Structured-Data ...... 16 7. New Components ...... 19 7.1. Participant ...... 19 7.1.1. Schedulable Participant ...... 21 7.2. Location ...... 22 7.3. Resource ...... 23 8. Extended examples ...... 25 8.1. Example 1 ...... 25 8.2. Example 2 ...... 26 9. Security Considerations ...... 26 9.1. URIs ...... 26 9.2. Malicious Content ...... 27 9.3. HTML Content ...... 27 10. Privacy Considerations ...... 27 10.1. Tracking ...... 27 10.2. Revealing Locations ...... 27 11. IANA Considerations ...... 28 11.1. Additional iCalendar Registrations ...... 28 11.1.1. Properties ...... 28 11.1.2. Parameters ...... 28 11.1.3. Components ...... 29 11.2. New Registration Tables ...... 29

Douglass Expires September 27, 2021 [Page 2] Internet-Draft Event Publishing Extensions to iCalendar March 2021

11.2.1. Participant Types ...... 29 11.2.2. Resource Types ...... 30 12. Acknowledgements ...... 30 13. Normative References ...... 30 Appendix A. Open issues ...... 32 Appendix B. Change log ...... 32 Author’s Address ...... 35

1. Introduction

The currently existing iCalendar standard [RFC5545] lacks useful methods for referencing additional, external information relating to calendar components. Additionally there is no standard way to provide rich text descriptions or meta-data associated with the event.

Current practice is to embed this information as links in the description or to add non-standard properties as defined in [RFC5545] section 3.8.8.2.

This document updates [RFC5545] to define a number of properties and components referencing such external information that can provide additional information about an iCalendar component. The intent is to allow interchange of such information between applications or systems (e.g., between clients, between client and server, and between servers). Formats such as vCard [RFC2426] are likely to be most useful to the receivers of such events as they may be used in other applications - such as address books.

1.1. Conventions Used in This Document

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY" and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

1.2. Terms Used in This Document

Event: When the (perhaps with a capitalised ’E’) word ’event’ is used we are referring to gatherings, formal or informal. For example a sports event, a party or a concert.

Social Calendaring: Historically, calendar data and scheduling has been heavily biased towards meetings in a corporate environment. Some of the features defined in this document are to support a more informal, i.e. social, model. For example, we may want to record who is participating in a public event.

Douglass Expires September 27, 2021 [Page 3] Internet-Draft Event Publishing Extensions to iCalendar March 2021

2. Components and properties

Previous extensions to the calendaring standards have been largely restricted to the addition of properties or parameters. This is partly because iCalendar libraries had trouble handling components nested deeper than those defined in [RFC5545].

In a break with this ’tradition’ this specification defines a number of components rather than properties. This is a better match for the way [W3C.REC-xml-20081126] and JSON [RFC8259] handle such structures and allows richer definitions.

It also allows for the addition of extra properties inside the components and resolves some of the problems of trying to add detailed information as a parameter.

3. Typed References

The properties and components defined here can all reference external meta-data which may be used by applications to provide further information to users. By providing type information, clients and servers are able to discover interesting references and make use of them, perhaps for indexing or the presenting of additional related information for the user.

As always, clients should exercise caution in following references to external data.

The [RFC5545] LOCATION property provides only an unstructured single text value for specifying the location where an event (or task) will occur. This is inadequate for use cases where structured location information (e.g. address, region, country, postal code) is required or preferred, and limits widespread adoption of iCalendar in those settings.

Using the VLOCATION component, rich information about multiple locations can be communicated in a STRUCTURED-DATA property, for example, address, region, country, postal code as well as other information such as parking availability, nearby restaurants and the venue. Servers and clients can retrieve the objects when storing the event and use them to index by geographic location.

When a calendar client receives a calendar component it can search the set of locations looking for those of particular interest. The LOCATION-TYPE property and STRUCTURED-DATA FMTTYPE parameter, if supplied, can be used to help the selection.

Douglass Expires September 27, 2021 [Page 4] Internet-Draft Event Publishing Extensions to iCalendar March 2021

The PARTICIPANT component is designed to handle common use cases in event publication. It is generally important to provide information about the organizers of such events. Sponsors wish to be referenced in a prominent manner. In social calendaring it is often important to identify the active participants in the event, for example a school sports team, and the inactive participants, for example the parents.

The PARTICIPANT component can be used to provide useful extra data about an attendee. For example a location inside the PARTICIPANT gives the actual location of a remote attendee. (But see the note about privacy.)

Alternatively the PARTICIPANT component can be used to provide a reference - perhaps the address for mailing lists.

3.1. Use Cases

The main motivation for these changes has been event publication but there are opportunities for use elsewhere. The following use cases will describe some possible scenarios.

3.1.1. Piano Concert Performance

In putting together a concert there are many participants: piano tuner, performer, stage hands etc. In addition there are sponsors and various contacts to be provided. There will also be a number of related locations. A number of events can be created, all of which relate to the performance in different ways.

There may be an iTIP [RFC5546] meeting request for the piano tuner who will arrive before the performance. Other members of staff may also receive meeting requests.

An event can also be created for publication which will have a PARTICIPANT component for the pianist providing a reference to vCard [RFC2426] information about the performer. This event would also hold information about parking, local subway stations and the venue itself. In addition, there may be sponsorship information for sponsors of the event and perhaps paid sponsorship properties essentially advertising local establishments.

3.1.2. Itineraries

These additions also provide opportunities for the travel industry. When booking a flight the PARTICIPANT component can be used to provide references to businesses at the airports and to car hire businesses at the destination.

Douglass Expires September 27, 2021 [Page 5] Internet-Draft Event Publishing Extensions to iCalendar March 2021

The embedded location information can guide the traveler at the airport or to their final destination. The contact information can provide detailed information about the booking agent, the airlines, car hire companies and the hotel.

3.1.2.1. Reserving facilities

For a meeting, the size of a room and the equipment needed depends to some extent on the number of attendees actually in the room.

A meeting may have many attendees none of which are co-located. The current ATTENDEE property does not allow for the addition of such meta-data. The PARTICIPANT component allows attendees to specify their location.

4. Modifications to Calendar Components

The following changes to the syntax defined in iCalendar [RFC5545] are made here. New elements are defined in subsequent sections.

Douglass Expires September 27, 2021 [Page 6] Internet-Draft Event Publishing Extensions to iCalendar March 2021

; Addition of PARTICIPANT, VLOCATION and VRESOURCE ; as valid components eventc = "BEGIN" ":" "VEVENT" CRLF eventprop *alarmc *participantc *locationc *resourcec "END" ":" "VEVENT" CRLF

; Addition of properties STYLED-DESCRIPTION and STRUCTURED-DATA eventprop =/ *styleddescription *sdataprop

; Addition of PARTICIPANT, VLOCATION and VRESOURCE ; as valid components todoc = "BEGIN" ":" "VTODO" CRLF todoprop *alarmc *participantc *locationc *resourcec "END" ":" "VTODO" CRLF

; Addition of properties STYLED-DESCRIPTION, STRUCTURED-DATA todoprop =/ *styleddescription *sdataprop

; Addition of PARTICIPANT, VLOCATION and VRESOURCE ; as valid components journalc = "BEGIN" ":" "VJOURNAL" CRLF jourprop *participantc *locationc *resourcec "END" ":" "VJOURNAL" CRLF

; Addition of properties STYLED-DESCRIPTION, STRUCTURED-DATA jourprop =/ *styleddescription *sdataprop

; Addition of PARTICIPANT, VLOCATION and VRESOURCE ; as valid components freebusyc = "BEGIN" ":" "VFREEBUSY" CRLF fbprop *participantc *locationc *resourcec "END" ":" "VFREEBUSY" CRLF

; Addition of property STYLED-DESCRIPTION fbprop =/ *styleddescription

5. New Property Parameters

5.1. Order

Parameter name: ORDER

Purpose: To define ordering for the associated property.

Douglass Expires September 27, 2021 [Page 7] Internet-Draft Event Publishing Extensions to iCalendar March 2021

Format Definition:

This parameter is defined by the following notation:

orderparam = "ORDER" "=" integer ; Must be greater than or equal to 1

Description: The ORDER parameter is OPTIONAL and is used to indicate the relative ordering of the corresponding instance of a property. Its value MUST be an integer greater than or equal to 1 that specifies the order with 1 being the first in the ordering.

When the parameter is absent, the default MUST be to interpret the property instance as being ordered last, that is, the property will appear after any other instances of the same property with any value of ORDER.

When any ORDER parameters have the same value all the associated properties appear as a group within which there is no defined order.

Note that the value of this parameter is to be interpreted only in relation to values assigned to other corresponding instances of the same property in the same entity.

This parameter MUST NOT be applied to a property that does not allow multiple instances.

Example uses: The ORDER may be applied to the PARTICIPANT-TYPE property to indicate the relative importance of the participant, for example as a sponsor or a performer. For example, ORDER=1 could define the principal performer or soloist.

5.2. Schema

Parameter Name: SCHEMA

Purpose: To specify the schema used for the content of a "STRUCTURED-DATA" property value.

Format Definition:

This parameter is defined by the following notation:

schemaparam = "SCHEMA" "=" DQUOTE uri DQUOTE

Description: This property parameter SHOULD be specified on "STRUCTURED-DATA" properties. When it provides

Douglass Expires September 27, 2021 [Page 8] Internet-Draft Event Publishing Extensions to iCalendar March 2021

identifying information about the nature of the content of the corresponding "STRUCTURED-DATA" property value. This can be used to supplement the media type information provided by the "FMTTYPE" parameter on the corresponding property.

Example:

STRUCTURED-DATA;FMTTYPE=application/ld+json; SCHEMA="https://schema.org/FlightReservation"; ENCODING=BASE64;VALUE=BINARY:ICAgIDxzY3JpcHQgdHlwZT0iYXBwb GljYXRpb24vbGQranNvbiI+CiAgICB7CiAgICAgICJAY29 udGV4dCI6ICJodHRwOi8vc2NoZW1hLm9yZyIsCiAgICAgICJAdHlwZSI 6ICJGbGlnaHRSZXNlcnZhdGlvbiIsCiAgICAgICJyZXNlcnZhdGlvbkl kIjogIlJYSjM0UCIsCiAgICAgICJyZXNlcnZhdGlvblN0YXR1cyI6ICJ odHRwOi8vc2NoZW1hLm9yZy9SZXNlcnZhdGlvbkNvbmZpcm1lZCIsCiA gICAgICJwYXNzZW5nZXJQcmlvcml0eVN0YXR1cyI6ICJGYXN0IFRyYWN rIiwKICAgICAgInBhc3NlbmdlclNlcXVlbmNlTnVtYmVyIjogIkFCQzE yMyIsCiAgICAgICJzZWN1cml0eVNjcmVlbmluZyI6ICJUU0EgUHJlQ2h lY2siLAogICAgICAidW5kZXJOYW1lIjogewogICAgICAgICJAdHlwZSI 6ICJQZXJzb24iLAogICAgICAgICJuYW1lIjogIkV2YSBHcmVlbiIKICA gICAgfSwKICAgICAgInJlc2VydmF0aW9uRm9yIjogewogICAgICAgICJ AdHlwZSI6ICJGbGlnaHQiLAogICAgICAgICJmbGlnaHROdW1iZXIiOiA iVUExMTAiLAogICAgICAgICJwcm92aWRlciI6IHsKICAgICAgICAgICJ AdHlwZSI6ICJBaXJsaW5lIiwKICAgICAgICAgICJuYW1lIjogIkNvbnR pbmVudGFsIiwKICAgICAgICAgICJpYXRhQ29kZSI6ICJDTyIsCiAgICA gICAgICAiYm9hcmRpbmdQb2xpY3kiOiAiaHR0cDovL3NjaGVtYS5vcmc vWm9uZUJvYXJkaW5nUG9saWN5IgogICAgICAgIH0sCiAgICAgICAgInN lbGxlciI6IHsKICAgICAgICAgICJAdHlwZSI6ICJBaXJsaW5lIiwKICA gICAgICAgICJuYW1lIjogIlVuaXRlZCIsCiAgICAgICAgICAiaWF0YUN vZGUiOiAiVUEiCiAgICAgICAgfSwKICAgICAgICAiZGVwYXJ0dXJlQWl ycG9ydCI6IHsKICAgICAgICAgICJAdHlwZSI6ICJBaXJwb3J0IiwKICA gICAgICAgICJuYW1lIjogIlNhbiBGcmFuY2lzY28gQWlycG9ydCIsCiA gICAgICAgICAiaWF0YUNvZGUiOiAiU0ZPIgogICAgICAgIH0sCiAgICA gICAgImRlcGFydHVyZVRpbWUiOiAiMjAxNy0wMy0wNFQyMDoxNTowMC0 wODowMCIsCiAgICAgICAgImFycml2YWxBaXJwb3J0IjogewogICAgICA gICAgIkB0eXBlIjogIkFpcnBvcnQiLAogICAgICAgICAgIm5hbWUiOiA iSm9obiBGLiBLZW5uZWR5IEludGVybmF0aW9uYWwgQWlycG9ydCIsCiA gICAgICAgICAiaWF0YUNvZGUiOiAiSkZLIgogICAgICAgIH0sCiAgICA gICAgImFycml2YWxUaW1lIjogIjIwMTctMDMtMDVUMDY6MzA6MDAtMDU 6MDAiCiAgICAgIH0KICAgIH0KICAgIDwvc2NyaXB0Pg==

5.3. Derived

Parameter Name: DERIVED

Purpose: To specify that the value of the associated property is derived from some other property value or values.

Douglass Expires September 27, 2021 [Page 9] Internet-Draft Event Publishing Extensions to iCalendar March 2021

Format Definition:

This parameter is defined by the following notation:

derivedparam = "DERIVED" "=" ("TRUE" / "FALSE") ; Default is FALSE

Description: This property parameter MAY be specified on any property when the value is derived from some other property or properties. When present with a value of TRUE clients MUST NOT update the property.

As an example, if a STYLED-DESCRIPTION property is present with FMTTYPE="application/rtf" then there may be an additional STYLED- DESCRIPTION property with FMTTYPE="text/html" and DERIVED=TRUE and a value created from the rtf value.

Example:

STYLED-DESCRIPTION;FMTTYPE=text/html; DERIVED=TRUE:...

6. New Properties

This specification makes use of the NAME property which is defined in [RFC7986]

6.1. Location Type

Property name: LOCATION-TYPE

Purpose: To specify the type(s) of a location.

Value type: The value type for this property is TEXT. The allowable values are defined below.

Description: This property MAY be specified in VLOCATION components and provides a way to differentiate multiple locations. For example, it allows event producers to provide location information for the venue and the parking.

Format Definition:

Douglass Expires September 27, 2021 [Page 10] Internet-Draft Event Publishing Extensions to iCalendar March 2021

This property is defined by the following notation:

loctype = "LOCATION-TYPE" loctypeparam ":" text *("," text) CRLF

loctypeparam = *(";" other-param)

Multiple values may be used if the location has multiple purposes, for example a hotel and a restaurant.

Values for this parameter are taken from the values defined in [RFC4589] section 3. New location types SHOULD be registered in the manner laid down in section 5 of that specification.

6.2. Participant Type

Property name: PARTICIPANT-TYPE

Purpose: To specify the type of participant.

Value type: The value type for this property is TEXT. The allowable values are defined below.

Property Parameters: Non-standard parameters can be specified on this property.

Conformance: This property MUST be specified once within a PARTICIPANT component.

Description: This property defines the type of participation in events or tasks. Participants can be individuals or organizations, for example a soccer team, the spectators, or the musicians.

Format Definition:

Douglass Expires September 27, 2021 [Page 11] Internet-Draft Event Publishing Extensions to iCalendar March 2021

This property is defined by the following notation:

participanttype = "PARTICIPANT-TYPE" partvalueparam ":" partvalue CRLF

partvalue = ("ACTIVE" / "INACTIVE" / "SPONSOR" / "CONTACT" / "BOOKING-CONTACT" / "EMERGENCY-CONTACT" / "PUBLICITY-CONTACT" / "PLANNER-CONTACT" / "PERFORMER" / "SPEAKER" / iana-token) ; Other IANA-registered ; values

partvalueparam = *(";" other-param)

Example:

The following is an example of this property:

PARTICIPANT-TYPE:SPEAKER

The registered values for the PARTICIPANT-TYPE property have the meanings described here:

ACTIVE: A participant taking an active role - for example a team member.

INACTIVE: A participant taking an inactive role - for example an audience member.

SPONSOR: A sponsor of the event. The ORDER parameter may be used with this participant type to define the relative order of multiple sponsors.

CONTACT: Contact information for the event. The ORDER parameter may be used with this participant type to define the relative order of multiple contacts.

BOOKING-CONTACT: Contact information for reservations or payment

EMERGENCY-CONTACT: Contact in case of emergency

PUBLICITY-CONTACT: Contact for publicity

Douglass Expires September 27, 2021 [Page 12] Internet-Draft Event Publishing Extensions to iCalendar March 2021

PLANNER-CONTACT: Contact for the event planner or organizer

PERFORMER: A performer - for example the soloist or the accompanist. The ORDER parameter may be used with this participant type to define the relative order of multiple performers. For example, ORDER=1 could define the principal performer or soloist.

SPEAKER: Speaker at an event

6.3. Resource Type

Property name: RESOURCE-TYPE

Purpose: To specify the type of resource.

Value type: The value type for this property is TEXT. The allowable values are defined below.

Format Definition:

This property is defined by the following notation:

restypeprop = "RESOURCE-TYPE" restypeparam ":" restypevalue CRLF

restypevalue = ("ROOM" / "PROJECTOR" / "REMOTE-CONFERENCE-AUDIO" / "REMOTE-CONFERENCE-VIDEO" / iana-token) ; Other IANA-registered ; values

restypeparam = *(";" other-param)

Description: This property MAY be specified in VRESOURCE components and provides a way to differentiate multiple resources.

The registered values are described below. New resource types SHOULD be registered in the manner laid down in this specification.

ROOM: A room for the event/meeting.

PROJECTOR: Projection equipment.

REMOTE-CONFERENCE-AUDIO: Audio remote conferencing facilities.

REMOTE-CONFERENCE-VIDEO: Video remote conferencing facilities.

Douglass Expires September 27, 2021 [Page 13] Internet-Draft Event Publishing Extensions to iCalendar March 2021

6.4. Calendar Address

Property name: CALENDAR-ADDRESS

Purpose: To specify the calendar address for a participant.

Value type: CAL-ADDRESS

Property Parameters: IANA-registered, or non-standard property parameters can be specified on this property.

Conformance: This property MAY be specified once within a PARTICIPANT component.

Description: This property provides a calendar user address for the participant. If there is an ATTENDEE property with the same value then the participant is schedulable.

Format Definition:

This property is defined by the following notation:

calendaraddress = "CALENDAR-ADDRESS" caladdressparam ":" cal-address CRLF

caladdressparam = *(";" other-param)

6.5. Styled-Description

Property name: STYLED-DESCRIPTION

Purpose: This property provides for one or more rich-text descriptions to replace that provided by the DESCRIPTION property.

Value type: There is no default value type for this property. The value type can be set to URI or TEXT. Other text-based value types can be used when defined in the . Clients MUST ignore any properties with value types they do not understand.

Property Parameters: IANA-registered, non-standard, id, alternate text representation, format type, derived and language property parameters can be specified on this property.

Conformance: The property can be specified multiple times in the "VEVENT", "VTODO", "VJOURNAL", "VFREEBUSY", "PARTICIPANT", or "VALARM" calendar components.

Douglass Expires September 27, 2021 [Page 14] Internet-Draft Event Publishing Extensions to iCalendar March 2021

If it does appear more than once there MUST be exactly one instance of the property with no DERIVED parameter or DERIVED=FALSE. All others MUST have DERIVED=TRUE.

Additionally, if there is one or more STYLED-DESCRIPTION property then the DESCRIPTION property should be either absent or have the parameter DERIVED=TRUE.

Description: This property supports rich-text descriptions, for example HTML. Event publishers typically wish to provide more and better formatted information about the event.

This property is used in the "VEVENT" and "VTODO" to capture lengthy textual descriptions associated with the activity. This property is used in the "VJOURNAL" calendar component to capture one or more textual journal entries. This property is used in the "VALARM" calendar component to capture the display text for a DISPLAY category of alarm, and to capture the body text for an EMAIL category of alarm. In the PARTICIPANT component it provides a detailed description of the participant.

VALUE=TEXT is used to provide rich-text inline as the property value.

VALUE=URI is used to provide a link to rich-text content which is expected to be displayed inline as part of the event.

In either case the DESCRIPTION property should be absent or contain a plain text rendering of the styled text.

Applications MAY attempt to guess the media type of the resource via inspection of its content if and only if the media type of the resource is not given by the "FMTTYPE" parameter. If the media type remains unknown, calendar applications SHOULD treat it as type "text/html" and process the content as defined in [W3C.REC-html51-20171003]

Multiple STYLED-DESCRIPTION properties may be used to provide different formats or different language variants. However all but one MUST have DERIVED=TRUE.

Format Definition:

Douglass Expires September 27, 2021 [Page 15] Internet-Draft Event Publishing Extensions to iCalendar March 2021

This property is defined by the following notation:

styleddescription = "STYLED-DESCRIPTION" styleddescparam ":" styleddescval CRLF

styleddescparam = *( ; The following is REQUIRED, ; but MUST NOT occur more than once. ; (";" "VALUE" "=" ("URI" / "TEXT")) / ; ; The following are OPTIONAL, ; but MUST NOT occur more than once. ; (";" altrepparam) / (";" languageparam) / (";" fmttypeparam) / (";" derivedparam) / ; ; the following is OPTIONAL ; and MAY occur more than once ; (";" other-param) )

styleddescval = ( uri / text ) ;Value MUST match value type

Example:

The following is an example of this property. It points to an html description.

STYLED-DESCRIPTION;VALUE=URI:http://example.org/desc001.html

6.6. Structured-Data

Property Name: STRUCTURED-DATA

Purpose: This property specifies ancillary data associated with the calendar component.

Value Type: There is no default value type for this property. The value type can be set to TEXT, BINARY or URI

Property Parameters: IANA-registered, non-standard, inline encoding and value data type property parameters can be specified on this property. The format type and schema parameters can be specified on this property and MUST be present for text or inline binary encoded content information.

Douglass Expires September 27, 2021 [Page 16] Internet-Draft Event Publishing Extensions to iCalendar March 2021

Conformance: This property can be specified multiple times in an iCalendar object. Typically it would be used in "VEVENT", "VTODO" or "VJOURNAL" calendar components.

Description: The existing properties in iCalendar cover key elements of events and tasks such as start time, end time, location, summary, etc. However, different types of events often have other specific "fields" that it is useful to include in the calendar data. For example, an event representing an airline flight could include the airline, flight number, departure and arrival airport codes, check-in and gate-closing times etc. As another example, a sporting event might contain information about the type of sport, the home and away teams, the league the teams are in, information about nearby parking, etc.

This property is used to specify ancillary data in some structured format either directly (inline) as a "TEXT" or "BINARY" value or as a link via a "URI" value.

Rather than define new iCalendar properties for the variety of event types that might occur, it would be better to leverage existing schemas for such data. For example, schemas available at https://schema.org include different event types. By using standard schemas, interoperability can be improved between calendar clients and non-calendaring systems that wish to generate or process the data.

This property allows the direct inclusion of ancillary data whose schema is defined elsewhere. This property also includes parameters to clearly identify the type of the schema being used so that clients can quickly and easily spot what is relevant within the calendar data and present that to users or process it within the calendaring system.

iCalendar does support an "ATTACH" property which can be used to include documents or links to documents within the calendar data. However, that property does not allow data to be included as a "TEXT" value (a feature that "STRUCTURED-DATA" does allow), plus attachments are often treated as "opaque" data to be processed by some other system rather than the calendar client. Thus the existing "ATTACH" property is not sufficient to cover the specific needs of inclusion of schema data. Extending the "ATTACH" property to support a new value type would likely cause interoperability problems. Additionally some implementations manage attachments by stripping them out and replacing with a link to the resource. Thus a new property to support inclusion of schema data is warranted.

Douglass Expires September 27, 2021 [Page 17] Internet-Draft Event Publishing Extensions to iCalendar March 2021

Format Definition:

This property is defined by the following notation:

sdataprop = "STRUCTURED-DATA" sdataparam ( ";" "VALUE" "=" "TEXT" ":" text ) / ( ";" "ENCODING" "=" "BASE64" ";" "VALUE" "=" "BINARY" ":" binary ) / ( ";" "VALUE" "=" "URI" ":" uri ) CRLF

sdataparam = *( ; ; The following is OPTIONAL for a URI value, ; REQUIRED for a TEXT or BINARY value, ; and MUST NOT occur more than once. ; (";" fmttypeparam) / (";" schemaparam) / ; ; The following is OPTIONAL, ; and MAY occur more than once. ; (";" other-param) ; )

Example: The following is an example of this property:

STRUCTURED-DATA;FMTTYPE=application/ld+json; SCHEMA="https://schema.org/SportsEvent"; VALUE=TEXT:{\n "@context": "http://schema.org"\,\n "@type": "SportsEvent"\,\n "homeTeam": "Pittsburgh Pirates"\,\n "awayTeam": "San Francisco Giants"\n }\n

Douglass Expires September 27, 2021 [Page 18] Internet-Draft Event Publishing Extensions to iCalendar March 2021

7. New Components

7.1. Participant

Component name: PARTICIPANT

Purpose: This component provides information about a participant in an event or task.

Conformance: This component can be specified multiple times in a "VEVENT", "VTODO", "VJOURNAL" or "VFREEBUSY" calendar component.

Description: This component provides information about a participant in a calendar component. A participant may be an attendee in a scheduling sense and the ATTENDEE property may be specified in addition. Participants can be individuals or organizations, for example a soccer team, the spectators or the musicians.

STRUCTURED-DATA properties if present may refer to definitions of the participant - such as a vCard.

The CALENDAR-ADDRESS property if present will provide a cal- address. If an ATTENDEE property has the same value the participant is considered schedulable. The PARTICIPANT component can be used to contain additional meta-data related to the attendee.

Format Definition:

Douglass Expires September 27, 2021 [Page 19] Internet-Draft Event Publishing Extensions to iCalendar March 2021

This component is defined by the following notation:

participantc = "BEGIN" ":" "PARTICIPANT" CRLF partprop *locationc *resourcec "END" ":" "PARTICIPANT" CRLF

partprop = *( ; ; The following are REQUIRED, ; but MUST NOT occur more than once. ; participanttype / uid / ; ; The following are OPTIONAL, ; but MUST NOT occur more than once. ; calendaraddress / created / description / dtstamp / geo / last-mod / priority / seq / status / summary / url / ; ; The following are OPTIONAL, ; and MAY occur more than once. ; attach / categories / comment / contact / location / rstatus / related / resources / strucloc / strucres / styleddescription / sdataprop / iana-prop ; )

Note: When the PRIORITY is supplied it defines the ordering of PARTICIPANT components with the same value for the PARTICIPANT- TYPE property.

Privacy Issues: When a LOCATION is supplied it provides information about the location of a participant at a given time or times. This may represent an unacceptable privacy risk for some participants. User agents MUST NOT broadcast this information without the express permission of the participants whose location would be exposed. For further comments see Section 10

Example:

Douglass Expires September 27, 2021 [Page 20] Internet-Draft Event Publishing Extensions to iCalendar March 2021

The following is an example of this component. It contains a STRUCTURED-DATA property which points to a vCard providing information about the event participant.

BEGIN:PARTICIPANT UID: em9lQGZvb2GFtcGxlLmNvbQ PARTICIPANT-TYPE:PERFORMER STRUCTURED-DATA;VALUE=URI: http://dir.example.com/vcard/aviolinist.vcf END:PARTICIPANT

Example:

The following is an example for the primary contact.

BEGIN:PARTICIPANT UID: em9lQGZvb2GFtcGxlLmNvbQ STRUCTURED-DATA;VALUE=URI; http://dir.example.com/vcard/contacts/contact1.vcf PARTICIPANT-TYPE:CONTACT DESCRIPTION:A contact END:PARTICIPANT

Example:

The following is an example for a participant with contact and location.

BEGIN:PARTICIPANT UID: em9lQGZvb2GFtcGxlLmNdrt STRUCTURED-DATA;VALUE=URI; http://dir.example.com/vcard/contacts/my-card.vcf PARTICIPANT-TYPE:SPEAKER DESCRIPTION:A participant BEGIN:VLOCATION UID:123456-abcdef-98765432 NAME:My home location STRUCTURED-DATA;VALUE=URI: http://dir.example.com/addresses/my-home.vcf END:VLOCATION END:PARTICIPANT

7.1.1. Schedulable Participant

A PARTICIPANT component may represent someone or something that needs to be scheduled as defined for ATTENDEE in [RFC5545] and [RFC5546]. The PARTICIPANT component may also represent someone or something that is NOT to receive scheduling messages.

Douglass Expires September 27, 2021 [Page 21] Internet-Draft Event Publishing Extensions to iCalendar March 2021

For backwards compatibility with existing clients and servers when used to schedule events and tasks the ATTENDEE property MUST be used to specify the sheduling parameters as defined for that property.

For other, future uses the CALENDAR-ADDRESS property MUST be used to specify those parameters.

A PARTICIPANT component is defined to be schedulable if

o It contains a CALENDAR-ADDRESS property

o That property value is the same as the value for an ATTENDEE property.

If both of these conditions apply then the participant defined by the value of the URL property will take part in scheduling operations as defined in [RFC5546].

An appropriate use for the PARTICIPANT component in scheduling would be to store SEQUENCE and DTSTAMP properties associated with replies from each ATTENDEE. A LOCATION property within the PARTICIPANT component might allow better selection of meeting times when participants are in different timezones.

7.2. Location

Component name: VLOCATION

Purpose: This component provides rich information about the location of an event using the structured data property or optionally a plain text typed value.

Conformance: This component can be specified multiple times in a "VEVENT", "VTODO", "VJOURNAL", "VFREEBUSY" or "PARTICIPANT" calendar component.

Description: There may be a number of locations associated with an event. This component provides detailed information about a location.

When used in a component the value of this property provides information about the event venue or of related services such as parking, dining, stations etc..

STRUCTURED-DATA properties if present may refer to representations of the location - such as a vCard.

Format Definition:

Douglass Expires September 27, 2021 [Page 22] Internet-Draft Event Publishing Extensions to iCalendar March 2021

This component is defined by the following notation:

locationc = "BEGIN" ":" "VLOCATION" CRLF locprop "END" ":" "VLOCATION" CRLF

locprop = *( ; ; The following are REQUIRED, ; but MUST NOT occur more than once. ; uid / ; ; The following are OPTIONAL, ; but MUST NOT occur more than once. ; description / geo / loctype / name / ; ; The following are OPTIONAL, ; and MAY occur more than once. ; sdataprop / iana-prop

The NAME property is defined in [RFC7986]

Example:

The following is an example of this component. It points to a venue.

BEGIN:VLOCATION UID:123456-abcdef-98765432 NAME:The venue STRUCTURED-DATA;VALUE=URI: http://dir.example.com/venues/big-hall.vcf END:VLOCATION

7.3. Resource

Component name: VRESOURCE

Purpose: This component provides a typed reference to external information about a resource or optionally a plain text typed value. Typically a resource is anything that might be required or used by a calendar entity and possibly has a directory entry.

Conformance: This component can be specified multiple times in a "VEVENT", "VTODO", "VJOURNAL", "VFREEBUSY" or "PARTICIPANT" calendar component.

Douglass Expires September 27, 2021 [Page 23] Internet-Draft Event Publishing Extensions to iCalendar March 2021

Description: When used in a component this component provides information about resources used for the event such as rooms, projectors, conferencing capabilities.

The RESOURCE-TYPE value registry provides a place in which resource types may be registered.

STRUCTURED-DATA properties if present may refer to representations of the resource - such as a vCard.

Format Definition:

This component is defined by the following notation:

resourcec = "BEGIN" ":" "VRESOURCE" CRLF resprop "END" ":" "VRESOURCE" CRLF

resprop = *( ; ; The following are REQUIRED, ; but MUST NOT occur more than once. ; uid / ; ; The following are OPTIONAL, ; but MUST NOT occur more than once. ; description / geo / name / restype / ; ; The following are OPTIONAL, ; and MAY occur more than once. ; sdataprop / iana-prop

The NAME property is defined in [RFC7986]

Example:

The following is an example of this component. It refers to a projector.

BEGIN:VRESOURCE UID:456789-abcdef-98765432 NAME:The projector RESOURCE-TYPE:projector STRUCTURED-DATA;VALUE=URI:http://dir.example.com/projectors/3d.vcf END:VRESOURCE

Douglass Expires September 27, 2021 [Page 24] Internet-Draft Event Publishing Extensions to iCalendar March 2021

8. Extended examples

The following are some examples of the use of the properties defined in this specification. They include additional properties defined in [RFC7986] which includes IMAGE.

8.1. Example 1

The following is an example of a VEVENT describing a concert. It includes location information for the venue itself as well as references to parking and restaurants.

BEGIN:VEVENT CREATED:20200215T145739Z DESCRIPTION: Piano Sonata No 3\n Piano Sonata No 30 DTSTAMP:20200215T145739Z DTSTART;TZID=America/New_York:20200315T150000Z DTEND;TZID=America/New_York:20200315T163000Z LAST-MODIFIED:20200216T145739Z SUMMARY:Beethoven Piano Sonatas UID:123456 IMAGE;VALUE=URI;DISPLAY=BADGE;FMTTYPE=image/png:h ttp://example.com/images/concert.png BEGIN:PARTICIPANT PARTICIPANT-TYPE:SPONSOR UID:dG9tQGZvb2Jhci5xlLmNvbQ STRUCTURED-DATA;VALUE=URI:http://example.com/sponsor.vcf END:PARTICIPANT BEGIN:PARTICIPANT PARTICIPANT-TYPE:PERFORMER: UID:em9lQGZvb2GFtcGxlLmNvbQ STRUCTURED-DATA;VALUE=URI:http://www.example.com/people/johndoe.vcf END:PARTICIPANT BEGIN:VLOCATION UID:123456-abcdef-98765432 NAME:The venue STRUCTURED-DATA;VALUE=URI:http://dir.example.com/venues/big-hall.vcf END:VLOCATION BEGIN:VLOCATION UID:123456-abcdef-87654321 NAME:Parking for the venue STRUCTURED-DATA;VALUE=URI:http://dir.example.com/venues/parking.vcf END:VLOCATION END:VEVENT

Douglass Expires September 27, 2021 [Page 25] Internet-Draft Event Publishing Extensions to iCalendar March 2021

8.2. Example 2

The following is an example of a VEVENT describing a meeting. One of the attendees is a remote participant.

BEGIN:VEVENT CREATED:20200215T145739Z DTSTAMP:20200215T145739Z DTSTART;TZID=America/New_York:20200315T150000Z DTEND;TZID=America/New_York:20200315T163000Z LAST-MODIFIED:20200216T145739Z SUMMARY:Conference planning UID:123456 ORGANIZER:mailto:[email protected] ATTENDEE;PARTSTAT=ACCEPTED;CN=A:mailto:[email protected] ATTENDEE;RSVP=TRUE;CN=B:mailto:[email protected] BEGIN:PARTICIPANT PARTICIPANT-TYPE:ACTIVE: UID:v39lQGZvb2GFtcGxlLmNvbQ STRUCTURED-DATA;VALUE=URI:http://www.example.com/people/b.vcf LOCATION:At home END:PARTICIPANT END:VEVENT

9. Security Considerations

This specification extends [RFC5545] and makes further use of possibly linked data. While calendar data is not unique in this regard it is worth reminding implementors of some of the dangers and safeguards.

9.1. URIs

See [RFC3986] for a discussion of the security considerations relating to URIs. Because of the issues discussed there and below, clients SHOULD NOT follow URIs and fetch content automatically, and should only do so at the explicit request of the user.

Fetching remote resources carries inherent risks. Connections must only be allowed on well known ports, using allowed protocols (generally just HTTP/HTTPS on their default ports). The URL must be resolved externally and not allowed to access internal resources. Connecting to an external source reveals IP (and therefore generally location) information.

A maliciously constructed iCalendar object may contain a very large number of URIs. In the case of published calendars with a large

Douglass Expires September 27, 2021 [Page 26] Internet-Draft Event Publishing Extensions to iCalendar March 2021

number of subscribers, such objects could be widely distributed. Implementations should be careful to limit the automatic fetching of linked resources to reduce the risk of this being an amplification vector for a denial-of-service attack.

9.2. Malicious Content

For the "STRUCTURED-DATA" property, agents need to be aware that a client could attack underlying storage by sending extremely large values and could attack processing time by uploading a recurring event with a large number of overrides and then repeatedly adding, updating and deleting structured data.

Agents should set reasonable limits on storage size and number of instances and apply those constraints. Calendar protocols should ensure there is a way to report on such limits being exceeded.

Malicious content could be introduced into the calendar server by way of the "STRUCTURED-DATA" property and propagated to many end users via scheduling. Servers SHOULD check this property for malicious or inappropriate content. Upon detecting such content, servers SHOULD remove the property,

9.3. HTML Content

When processing HTML content, applications need to be aware of the many security and privacy issues, as described in the IANA considerations section of [W3C.REC-html51-20171003]

10. Privacy Considerations

10.1. Tracking

Properties with a "URI" value type can expose their users to privacy leaks as any network access of the URI data can be tracked both by a network observer and by the entity hosting the remote resource. Clients SHOULD NOT automatically download data referenced by the URI without explicit instruction from users.

To help alleviate some of the concerns protocols and services could provide proxy services for downloading referenced data.

10.2. Revealing Locations

The addition of location information to the new participant component provides information about the location of participants at a given time. This information MUST NOT be distributed to other participants without those participant’s express permission. Note that there may

Douglass Expires September 27, 2021 [Page 27] Internet-Draft Event Publishing Extensions to iCalendar March 2021

be a number of participants who may be unaware of their inclusion in the data.

Agents processing and distributing calendar data must be aware that it has the property of providing information about a future time when a given individual may be at a particular location, which could enable targeted attacks against that individual.

The same may be true of other information contained in the participant component. In general, revealing only as much as is absolutely necessary should be the approach taken.

For example, there may be some privacy considerations relating to the ORDER parameter, as it provides an indication of the organizer’s perception of the relative importance of other participants.

11. IANA Considerations

11.1. Additional iCalendar Registrations

11.1.1. Properties

This document defines the following new iCalendar properties to be added to the registry defined in Section 8.2.3 of [RFC5545]:

+------+------+------+ | Property | Status | Reference | +------+------+------+ | CALENDAR-ADDRESS | Current | RFCXXXX, Section 6.4 | | LOCATION-TYPE | Current | RFCXXXX, Section 6.1 | | PARTICIPANT-TYPE | Current | RFCXXXX, Section 6.2 | | RESOURCE-TYPE | Current | RFCXXXX, Section 6.3 | | STRUCTURED-DATA | Current | RFCXXXX, Section 6.6 | | STYLED-DESCRIPTION | Current | RFCXXXX, Section 6.5 | +------+------+------+

11.1.2. Parameters

This document defines the following new iCalendar property parameters to be added to the registry defined in Section 8.2.4 of [RFC5545]:

+------+------+------+ | Property Parameter | Status | Reference | +------+------+------+ | ORDER | Current | RFCXXXX, Section 5.1 | | SCHEMA | Current | RFCXXXX, Section 5.2 | | DERIVED | Current | RFCXXXX, Section 5.3 | +------+------+------+

Douglass Expires September 27, 2021 [Page 28] Internet-Draft Event Publishing Extensions to iCalendar March 2021

11.1.3. Components

This document defines the following new iCalendar components to be added to the registry defined in Section 8.3.1 of [RFC5545]:

+------+------+------+ | Component | Status | Reference | +------+------+------+ | PARTICIPANT | Current | RFCXXXX, Section 7.1 | | VLOCATION | Current | RFCXXXX, Section 7.2 | | VRESOURCE | Current | RFCXXXX, Section 7.3 | +------+------+------+

11.2. New Registration Tables

This section defines new registration tables for PARTICIPANT-TYPE and RESOURCE-TYPE values. These tables are updated using the same approaches laid down in Section 8.2.1 of [RFC5545]

This document creates new IANA registries for participant and resource types. IANA will maintain these registries and, following the policies outlined in [RFC8126], new tokens are assigned after Expert Review. The Expert Reviewer will generally consult the IETF GeoPRIV working group mailing list or its designated successor. Updates or deletions of tokens from the registration follow the same procedures. The expert review should be guided by a few common sense considerations. For example, tokens should not be specific to a country, region, organization, or company; they should be well- defined and widely recognized. The expert’s support of IANA will include providing IANA with the new token(s) when the update is provided only in the form of a schema, and providing IANA with the new schema element(s) when the update is provided only in the form of a token. To ensure widespread usability across protocols, tokens MUST follow the character set restrictions for XML Names [3]. Each registration must include the name of the token and a brief description similar to the ones offered herein for the initial registrations contained this document:

11.2.1. Participant Types

The following table has been used to initialize the participant types registry.

Douglass Expires September 27, 2021 [Page 29] Internet-Draft Event Publishing Extensions to iCalendar March 2021

+------+------+------+ | Participant Type | Status | Reference | +------+------+------+ | ACTIVE | Current | RFCXXXX, Section 6.2 | | INACTIVE | Current | RFCXXXX, Section 6.2 | | SPONSOR | Current | RFCXXXX, Section 6.2 | | CONTACT | Current | RFCXXXX, Section 6.2 | | BOOKING-CONTACT | Current | RFCXXXX, Section 6.2 | | EMERGENCY-CONTACT | Current | RFCXXXX, Section 6.2 | | PUBLICITY-CONTACT | Current | RFCXXXX, Section 6.2 | | PLANNER-CONTACT | Current | RFCXXXX, Section 6.2 | | PERFORMER | Current | RFCXXXX, Section 6.2 | | SPEAKER | Current | RFCXXXX, Section 6.2 | +------+------+------+

11.2.2. Resource Types

The following table has been used to initialize the resource types registry.

+------+------+------+ | Resource Type | Status | Reference | +------+------+------+ | PROJECTOR | Current | RFCXXXX, Section 6.3 | | ROOM | Current | RFCXXXX, Section 6.3 | | REMOTE-CONFERENCE-AUDIO | Current | RFCXXXX, Section 6.3 | | REMOTE-CONFERENCE-VIDEO | Current | RFCXXXX, Section 6.3 | +------+------+------+

12. Acknowledgements

The author would like to thank Chuck Norris of eventful.com for his work which led to the development of this RFC.

The author would also like to thank the members of CalConnect, The Calendaring and Scheduling Consortium, the Event Publication technical committee and the following individuals for contributing their ideas and support:

Cyrus Daboo, John Haug, Dan Mendell, Ken Murchison, Scott Otis.

13. Normative References

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, .

Douglass Expires September 27, 2021 [Page 30] Internet-Draft Event Publishing Extensions to iCalendar March 2021

[RFC2426] Dawson, F. and T. Howes, "vCard MIME Directory Profile", RFC 2426, DOI 10.17487/RFC2426, September 1998, .

[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, DOI 10.17487/RFC3986, January 2005, .

[RFC4589] Schulzrinne, H. and H. Tschofenig, "Location Types Registry", RFC 4589, DOI 10.17487/RFC4589, July 2006, .

[RFC5545] Desruisseaux, B., Ed., "Internet Calendaring and Scheduling Core Object Specification (iCalendar)", RFC 5545, DOI 10.17487/RFC5545, September 2009, .

[RFC5546] Daboo, C., Ed., "iCalendar Transport-Independent Interoperability Protocol (iTIP)", RFC 5546, DOI 10.17487/RFC5546, December 2009, .

[RFC7986] Daboo, C., "New Properties for iCalendar", RFC 7986, DOI 10.17487/RFC7986, October 2016, .

[RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 8126, DOI 10.17487/RFC8126, June 2017, .

[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, .

[RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data Interchange Format", STD 90, RFC 8259, DOI 10.17487/RFC8259, December 2017, .

[W3C.REC-html51-20171003] Faulkner, S., Eicholz, A., Leithead, T., and A. Danilo, "HTML 5.1 2nd Edition", World Wide Web Consortium Recommendation REC-html51-20171003, October 2017, .

Douglass Expires September 27, 2021 [Page 31] Internet-Draft Event Publishing Extensions to iCalendar March 2021

[W3C.REC-xml-20081126] Bray, T., Paoli, J., Sperberg-McQueen, M., Maler, E., and F. Yergeau, "Extensible Markup Language (XML) 1.0 (Fifth Edition)", World Wide Web Consortium Recommendation REC- xml-20081126, November 2008, .

Appendix A. Open issues

None at the moment

Appendix B. Change log

To be deleted on publication

calext-v19 2021-03-25 MD

o Revert ABNF to RFC5545 format.

o Add missing DERIVED parameter registration.

o Fix small error in an example (missing space at start).

calext-v18 2021-??-?? MD

o Fix incorrect participant type property name in PARTICIPANT.

o Allow parameters on LOCATION-TYPE.

calext-v17 2021-01-03 MD

o Remove STRUCTURED-LOCATION property, add VLOCATION component.

o Remove STRUCTURED-RESOURCE property, add VRESOURCE component.

o Make LOCATION-TYPE multi-valued property for location.

o Make RESOURCE-TYPE multi-valued property for resource.

o Tidy up abnf.

calext-v16 2019-10-09 MD

o Make LOCTYPE multi-valued.

o Add all ATTENDEE scheduling parameters to CALENDAR-ADDRESS.

calext-v15 2019-10-08 MD

Douglass Expires September 27, 2021 [Page 32] Internet-Draft Event Publishing Extensions to iCalendar March 2021

o Address various DICUSS points.

calext-v14 2019-06-11 MD

o Definition of event and social calendaring.

o Remove redefinition of SOURCE - use STRUCTURED-DATA.

calext-v13 2019-05-26 MD

o Respond to various issues.

calext-v12 2019-02-28 MD

o Fix styled-description example. Respond to various AD issues. Some typos.

calext-v11 2019-02-27 MD

o Add DERIVED parameter for styled-description, RELATED parameter for structured-location

calext-v09 2018-08-30 MD

o Sorted out inconsistencies in refs to 5546

calext-v08 2018-07-06 MD

o Add some text for equal ORDER values

o Switched scheduleaddress to calendaraddress in participant abnf. Also added more properties

o Fixed PARTICIPANT abnf

calext-v04 2017-10-11 MD

o Change SCHEDULE-ADDRESS to CALENDAR-ADDRESS

o Explicitly broaden scope of SOURCE

o Add initial registry for RESTYPE and move new tables into separate section.

o Fix PARTTYPE/PARTICIPANT-TYPE inconsistency

calext-v03 2017-10-09 MD

Douglass Expires September 27, 2021 [Page 33] Internet-Draft Event Publishing Extensions to iCalendar March 2021

o Mostly typographical and other minor changes

calext-v02 2017-04-20 MD

o Add SCHEDULE-ADDRESS property

o PARTICIPANT becomes a component rather than a property. Turn many of the former parameters into properties.

o Use existing ATTENDEE property for scheduling.

calext-v01 2017-02-18 MD

o Change ASSOCIATE back to PARTICIPANT

o PARTICIPANT becomes a component rather than a property. Turn many of the former parameters into properties.

calext-v00 2016-08-?? MD

o Name changed - taken up by calext working group

v06 2016-06-26 MD

o Fix up abnf

o change ref to ietf from daboo

o take out label spec - use Cyrus spec

v05 2016-06-14 MD

o Remove GROUP and HASH. they can be dealt with elsewhere if desired

o Change ORDER to integer >= 1.

o Incorporate Structured-Data into this specification.

v04 2014-02-01 MD

o Added updates attribute.

o Minor typos.

o Resubmitted mostly to refresh the draft.

v03 2013-03-06 MD

Douglass Expires September 27, 2021 [Page 34] Internet-Draft Event Publishing Extensions to iCalendar March 2021

o Replace PARTICIPANT with ASSOCIATE plus related changes.

o Added section showing modifications to components.

o Replace ID with GROUP and modify HASH.

o Replace TITLE param with LABEL.

o Fixed STYLED-DESCRIPTION in various ways, correct example.

v02 2012-11-02 MD

o Collapse sections with description of properties and the use cases into a section with sub-sections.

o New section to describe relating properties.

o Remove idref and upgrade hash to have the reference

o No default value types on properties..

v01 2012-10-18 MD Many changes.

o SPONSOR and STRUCTURED-CONTACT are now in PARTICIPANT

o Add a STRUCTURED-RESOURCE property

o STYLED-DESCRIPTION to handle rich text

o Much more...

2011-01-07

o Remove MEDIA - it’s going in the Cyrus RFC

o Rename EXTENDED-... to STRUCTURED-...

o Add TYPE parameter to SPONSOR

v00 2007-10-19 MD Initial version

Author’s Address

Douglass Expires September 27, 2021 [Page 35] Internet-Draft Event Publishing Extensions to iCalendar March 2021

Michael Douglass Bedework 226 3rd Street Troy, NY 12180 USA

Email: [email protected] URI: http://bedework.com

Douglass Expires September 27, 2021 [Page 36] Network Working Group M. Douglass Internet-Draft Bedework Updates: 5545 (if approved) July 30, 2021 Intended status: Standards Track Expires: January 31, 2022

Support for iCalendar Relationships draft-ietf-calext-ical-relations-07

Abstract

This specification updates RELATED-TO defined in iCalendar (RFC5545) and introduces new iCalendar properties LINK, CONCEPT and REFID to allow better linking and grouping of iCalendar components and related data.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on January 31, 2022.

Copyright Notice

Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

Douglass Expires January 31, 2022 [Page 1] Internet-Draft iCalendar Relationships July 2021

Table of Contents

1. Introduction ...... 2 1.1. Structured iCalendar relationships ...... 3 1.2. Grouped iCalendar relationships ...... 3 1.3. Concept relationships ...... 3 1.4. Linked relationships ...... 4 1.5. Caching and offline use ...... 5 1.6. Conventions Used in This Document ...... 5 2. Reference Types ...... 5 3. Link Relation Types ...... 5 4. New temporal RELTYPE Parameter values ...... 6 5. Additional New RELTYPE Parameter Values ...... 7 6. New Property Parameters ...... 8 6.1. Link Relation ...... 8 6.2. Gap ...... 8 7. New Value Data Types ...... 9 8. New Properties ...... 9 8.1. Concept ...... 9 8.2. Link ...... 10 8.3. Refid ...... 12 9. Redefined RELATED-TO Property ...... 12 9.1. RELATED-TO ...... 12 10. Security Considerations ...... 14 11. IANA Considerations ...... 14 11.1. iCalendar Property Registrations ...... 14 11.2. iCalendar Property Parameter Registrations ...... 15 11.3. iCalendar Value Data Type Registrations ...... 15 11.4. iCalendar RELTYPE Value Registrations ...... 15 11.5. New Reference Type Registration ...... 16 12. Acknowledgements ...... 16 13. Normative References ...... 16 Author’s Address ...... 17

1. Introduction

iCalendar entities often need to be related to each other or to associated meta-data. The specifications below support relationships of the following forms:

Structured iCalendar: iCalendar entities can be related to each other in some structured way, for example as parent, sibling, before, after.

Grouped iCalendar: iCalendar entities can be related to each other as a group. CATEGORIES are often used for this purpose but are problematic for application developers due to their lack of consistency and use as a free-form tag.

Douglass Expires January 31, 2022 [Page 2] Internet-Draft iCalendar Relationships July 2021

Linked: Entities can be linked to other entities such as vcards through a URI and associated REL and FMTTYPE parameters.

1.1. Structured iCalendar relationships

The currently existing iCalendar [RFC5545] RELATED-TO property has no support for temporal relationships as used by standard project management tools.

The RELTYPE parameter is extended to take new values defining temporal relationships, a GAP parameter is defined to provide lead and lag values, and RELATED-TO is extended to allow URI values. These changes allow the RELATED-TO property to define a richer set of relationships useful for project management.

1.2. Grouped iCalendar relationships

This specification defines a new REFID property which allows arbitrary groups of entities to be associated with the same key value.

REFID is used to identify a key allowing the association of components that are related to the same object and retrieval of a component based on this key. Two examples of how this may be used are to identify the tasks associated with a given project without having to communicate the task structure of the project, and to group all tasks associated to a specific package in a package delivery system.

As such, the presence of a REFID property imparts no meaning to the component. It is merely a key to allow retrieval. This is distinct from categorisation which, while allowing grouping also adds meaning to the component to which it is attached.

1.3. Concept relationships

The name CONCEPT is used by the Simple Knowledge Organization System defined in [W3C.CR-skos-reference-20090317]. The "concept" more accurately defines what we often mean by a category. It’s not the text string that is important but the meaning attached to it. For example, the term "football" can mean very different sports.

The introduction of CONCEPT allows a more structured approach to categorization, with the possibility of namespaced and path-like values. Unlike REFID the CONCEPT property imparts some meaning. It is assumed that the value of this property will reference a well defined category.

Douglass Expires January 31, 2022 [Page 3] Internet-Draft iCalendar Relationships July 2021

The current [RFC5545] CATEGORY property is used as a free form ’tagging’ field. As such it is difficult to establish formal relationships between components based on their category.

Rather than attempt to add semantics to the CATEGORY property it seems best to continue its usage as an informal tag and establish a new CONCEPT property with more constraints.

1.4. Linked relationships

The currently existing iCalendar standard [RFC5545] lacks a general purpose method for referencing additional, external information relating to calendar components.

This document proposes a method for referencing typed external information that can provide additional information about an iCalendar component. This new LINK property is closely aligned to the LINK header defined in [RFC8288]

The LINK property defines a typed reference or relation to external meta-data or related resources. By providing type and format information as parameters, clients and servers are able to discover interesting references and make use of them, perhaps for indexing or the presentation of interesting links for the user.

It is also often necessary to reference calendar components in other collections. For example, a VEVENT might refer to a VTODO from which it was derived. The PARENT, SIBLING and CHILD relationships defined for the RELATED-TO property only allow for a UID which is inadequate for many purposes. Allowing other value types for those relationships may help but would cause backward compatibility issues. The link property can link components in different collections or even on different servers.

When publishing events it is useful to be able to refer back to the source of that information. The actual event may have been consumed from a feed or an ics file on a web site. A LINK property can provide a reference to the originator of the event.

Beyond the need to relate elements temporally, project management tools often need to be able to specify the relationships between the various events and tasks which make up a project. The LINK property provides such a mechanism.

The LINK property SHOULD NOT be treated as just another attachment. The ATTACH property is being extended to handle server-side management and stripping of inline data. Clients may choose to

Douglass Expires January 31, 2022 [Page 4] Internet-Draft iCalendar Relationships July 2021

handle attachments differently as they are often an integral part of the message - for example, the agenda. See [RFC8607]

1.5. Caching and offline use

To facilitate offline display the link type may identify important pieces of data which should be downloaded in advance.

In general, the calendar entity should be self explanatory without the need to download referenced meta-data such as a web page.

1.6. Conventions Used in This Document

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY" and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

2. Reference Types

The actual reference value can take three forms specified by the type parameter

URI: The default type. This is a URI referring to the target.

UID: This allows for linking within a single collection and the value MUST be another component within that collection.

REFERENCE: An XPointer. In an XML environment it may be necessary to refer to an external XML artifact. The XPointer is defined in [W3C.WD-xptr-xpointer-20021219] and allows addressing portions of XML documents.

3. Link Relation Types

[RFC8288] defines two forms of relation type: registered and extension. Registered relation types are added to the Link Relations registry as specified in Section 2.1.1 of [RFC8288]. Extension relation types, defined in Section 2.1.2 of [RFC8288], are specified as unique URIs that are not registered in the registry.

The relation types defined in Section 6.1 will be registered with IANA in accordance with the specifications in [RFC8288].

Douglass Expires January 31, 2022 [Page 5] Internet-Draft iCalendar Relationships July 2021

4. New temporal RELTYPE Parameter values

This section defines the usual temporal relationships for use with the RELTYPE parameter redefined in Section 3.2.15 of [RFC5545]: FINISHTOSTART, FINISHTOFINISH, STARTTOFINISH or STARTTOSTART.

The [RFC5545] RELATED-TO property with one or more of these temporal relationships will be present in the predecessor entity and will refer to the successor entity.

The GAP parameter (see Section 6.2) specifies the lead or lag time between the predecessor and the successor. In the description of each temporal relationship below we refer to Task-A, which contains and controls the relationship, and Task-B the target of the relationship.

RELTYPE=FINISHTOSTART: Task-B cannot start until Task-A finishes. For example, when sanding is complete, painting can begin.

======| Task-A |--+ ======| | V ======| Task-B | ======

Figure 1: Finish to start relationship

RELTYPE=FINISHTOFINISH: Task-B cannot finish before Task-A is finished, that is the end of Task-A defines the end of Task-B. For example, we start the potatoes, then the meat then the peas but they should all be cooked at the same time.

======| Task-A |--+ ======| | ======| | Task-B |<-+ ======

Figure 2: Finish to finish relationship

Douglass Expires January 31, 2022 [Page 6] Internet-Draft iCalendar Relationships July 2021

RELTYPE=STARTTOFINISH: The start of Task-A (which occurs after Task- B) controls the finish of Task-B. For example, ticket sales (Task-B) end when the game starts (Task-A).

======+--| Task-A | | ======| ======| | Task-B |<-+ ======

Figure 3: Start to finish relationship

RELTYPE=STARTTOSTART: The start of Task-A triggers the start of Task-B, that is Task-B can start anytime after Task-A starts.

======+--| Task-A | | ======| | ======+->| Task-B | ======

Figure 4: Start to start relationship

5. Additional New RELTYPE Parameter Values

This section defines the additional relationships below:

RELTYPE=FIRST: Indicates that the referenced calendar component is the first in a series the referenced calendar component is part of.

RELTYPE=DEPENDS-ON: Indicates that the current calendar component depends on the referenced calendar component in some manner. For example a task may be blocked waiting on the other, referenced, task.

RELTYPE=REFID: Establishes a reference from the current component to components with a REFID property which matches the value given in the associated RELATED-TO property.

Douglass Expires January 31, 2022 [Page 7] Internet-Draft iCalendar Relationships July 2021

RELTYPE=CONCEPT: Establishes a reference from the current component to components with a CONCEPT property which matches the value given in the associated RELATED-TO property.

6. New Property Parameters

6.1. Link Relation

Parameter name: LINKREL

Purpose: To specify the relationship of data referenced by a LINK property.

Format Definition:

This parameter is defined by the following notation:

linkrelparam = "REL" "=" ("SOURCE" ; Link to source of this component / DQUOTE uri DQUOTE / iana-token) ; Other IANA registered type

Description: This parameter MUST be specified on all LINK properties, and defines the type of reference. This allows programs consuming this data to automatically scan for references they support. In addition to the values defined here any value defined in [RFC8288] may be used. There is no default relation type.

REL=SOURCE: identifies the source of the event information.

Registration: These relation types are registered in [RFC8288]

6.2. Gap

Parameter name: GAP

Purpose: To specify the length of the gap, positive or negative, between two temporaly related components.

Format Definition:

This parameter is defined by the following notation:

gapparam = "GAP" "=" dur-value

Description: This parameter MAY be specified on the RELATED-TO property, and defines the duration of time between the predecessor

Douglass Expires January 31, 2022 [Page 8] Internet-Draft iCalendar Relationships July 2021

and successor in an interval. When positive it defines the lag time between a task and its logical successor. When negative it defines the lead time.

An example of lag time might be if task A is "paint the room" and task B is "hang the drapes" then task A may be related to task B with RELTYPE=FINISHTOSTART with a gap long enough for the paint to dry.

An example of lead time might be to relate a 1 task A to the end of task B with RELTYPE=STARTTOFINISH and a negative gap of 1 week so they finish at the same time.

7. New Value Data Types

This specification defines the following new value types to be used with the VALUE property parameter:

UID VALUE=UID indicates that the associated value is the UID for a component.

REFERENCE VALUE=REFERENCE indicates that the associated value is an XPointer referencing an associated XML artifact.

8. New Properties

8.1. Concept

Property name: CONCEPT

Purpose: This property defines the formal categories for a calendar component.

Value type: URI

Property Parameters: IANA, and non-standard parameters can be specified on this property.

Conformance: This property can be specified zero or more times in any iCalendar component.

Description: This property is used to specify formal categories or classifications of the calendar component. The values are useful in searching for a calendar component of a particular type and category.

Douglass Expires January 31, 2022 [Page 9] Internet-Draft iCalendar Relationships July 2021

Within the "VEVENT", "VTODO", or "VJOURNAL" calendar components, more than one formal category can be specified by using multiple CONCEPT properties.

This categorization is distinct from the more informal "tagging" of components provided by the existing CATEGORIES property. It is expected that the value of the CONCEPT property will reference an external resource which provides information about the categorization.

In addition, a structured URI value allows for hierarchical categorization of events.

Possible category resources are the various proprietary systems, for example Library of Congress, or an open source of categorisation data.

Format Definition:

This property is defined by the following notation:

concept = "CONCEPT" conceptparam ":" uri CRLF

conceptparam = *(";" other-param)

Example:

The following is an example of this property. It points to a server acting as the source for the calendar object.

CONCEPT:http://example.com/event-types/arts/music

8.2. Link

Property name: LINK

Purpose: This property provides a reference to external information about a component.

Value type: URI, TEXT or REFERENCE

Property Parameters: The VALUE parameter is required. Non-standard, reference type or format type parameters can also be specified on this property. The LABEL parameter is defined in [RFC7986]

Douglass Expires January 31, 2022 [Page 10] Internet-Draft iCalendar Relationships July 2021

Conformance: This property MAY be specified in any iCalendar component.

Description: When used in a component the value of this property points to additional information related to the component. For example, it may reference the originating web server.

Format Definition:

This property is defined by the following notation:

link = "LINK" linkparam ":" ( text / ; for VALUE=REFERENCE uri / ; for VALUE=URI text ) ; for VALUE=TEXT CRLF

linkparam = ; the elements herein may appear in any order, ; and the order is not significant.

(";" "VALUE" "=" ("UID" / "URI" / "TEXT")) 1*(";" linkrelparam) (";" fmttypeparam) (";" labelparam) *(";" other-param)

Example:

The following is an example of this property which provides a reference to the source for the calendar object.

LINK;LINKREL=SOURCE;LABEL=Venue;VALUE=URI:http://example.com/events

Example:

The following is an example of this property which provides a reference to an entity from which this one was derived. The link relation is a vendor defined value

LINK;LINKREL="https://example.com/linkrel/derivedFrom";VALUE=URI: http://example.com/tasks/01234567-abcd1234.ics

Douglass Expires January 31, 2022 [Page 11] Internet-Draft iCalendar Relationships July 2021

8.3. Refid

Property name: REFID

Purpose: This property value acts as a key for associated iCalendar entities.

Value type: TEXT

Property Parameters: Non-standard parameters can be specified on this property.

Conformance: This property MAY be specified multiple times in any iCalendar component.

Description: The value of this property is free-form text that creates an identifier for associated components. All components that use the same REFID value are associated through that value and can be located or retrieved as a group. For example, all of the events in a travel itinerary would have the same REFID value, so as to be grouped together.

Format Definition:

This property is defined by the following notation:

refid = "REFID" refidparam ":" text CRLF

refidparam = *(";" other-param)

Example:

The following is an example of this property.

REFID:itinerary-2014-11-17

9. Redefined RELATED-TO Property

9.1. RELATED-TO

Property name: RELATED-TO

Purpose: This property is used to represent a relationship or reference between one calendar component and another. The definition here extends the definition in Section 3.8.4.5 of [RFC5545] by allowing URI or UID values and a GAP parameter.

Douglass Expires January 31, 2022 [Page 12] Internet-Draft iCalendar Relationships July 2021

Value type: URI, UID or TEXT

Property Parameters: Relationship type, IANA and non-standard property parameters can be specified on this property.

Conformance: This property MAY be specified in any iCalendar component.

Description: By default or when VALUE=UID is specified, the property value consists of the persistent, globally unique identifier of another calendar component. This value would be represented in a calendar component by the "UID" property.

By default, the property value points to another calendar component that has a PARENT relationship to the referencing object. The "RELTYPE" property parameter is used to either explicitly state the default PARENT relationship type to the referenced calendar component or to override the default PARENT relationship type and specify either a CHILD or SIBLING relationship or a temporal relationship.

The PARENT relationship indicates that the calendar component is a subordinate of the referenced calendar component. The CHILD relationship indicates that the calendar component is a superior of the referenced calendar component. The SIBLING relationship indicates that the calendar component is a peer of the referenced calendar component.

To preserve backwards compatibility the value type MUST be UID when the PARENT, SIBLING or CHILD relationships are specified.

The FINISHTOSTART, FINISHTOFINISH, STARTTOFINISH or STARTTOSTART relationships define temporal relationships as specified in the reltype parameter definition.

Changes to a calendar component referenced by this property can have an implicit impact on the related calendar component. For example, if a group event changes its start or end date or time, then the related, dependent events will need to have their start and end dates changed in a corresponding way. Similarly, if a PARENT calendar component is cancelled or deleted, then there is an implied impact to the related CHILD calendar components. This property is intended only to provide information on the relationship of calendar components. It is up to the target calendar system to maintain any property implications of this relationship.

Format Definition:

Douglass Expires January 31, 2022 [Page 13] Internet-Draft iCalendar Relationships July 2021

This property is defined by the following notation:

related = "RELATED-TO" relparam ":" ( uid / ; for VALUE=UID uri / ; for VALUE=URI text ) ; for VALUE=TEXT or default CRLF

relparam = ; the elements herein may appear in any order, ; and the order is not significant. [";" "VALUE" "=" ("UID" / "URI" / "TEXT")] [";" reltypeparam] [";" gapparam] *(";" other-param)

Example:

The following are examples of this property.

RELATED-TO:[email protected]

RELATED-TO:[email protected]

RELATED-TO;VALUE=URI;RELTYPE=STARTTOFINISH: http://example.com/caldav/user/jb/cal/ 19960401-080045-4000F192713.ics

10. Security Considerations

Applications using the LINK property need to be aware of the risks entailed in using the URIs provided as values. See [RFC3986] for a discussion of the security considerations relating to URIs.

The CONCEPT and redefined RELATED-TO property have the same issues in that values may be URIs.

11. IANA Considerations

11.1. iCalendar Property Registrations

The following iCalendar property names have been added to the iCalendar Properties Registry defined in Section 8.3.2 of [RFC5545]

Douglass Expires January 31, 2022 [Page 14] Internet-Draft iCalendar Relationships July 2021

+------+------+------+ | Property | Status | Reference | +------+------+------+ | CONCEPT | Current | Section 8.1 | | LINK | Current | Section 8.2 | | REFID | Current | Section 8.3 | +------+------+------+

11.2. iCalendar Property Parameter Registrations

The following iCalendar property parameter names have been added to the iCalendar Parameters Registry defined in Section 8.3.3 of [RFC5545]

+------+------+------+ | Parameter | Status | Reference | +------+------+------+ | GAP | Current | Section 6.2 | | REL | Current | Section 6.1 | +------+------+------+

11.3. iCalendar Value Data Type Registrations

The following iCalendar property parameter names have been added to the iCalendar Value Data Types Registry defined in Section 8.3.4 of [RFC5545]

+------+------+------+ | Value Data Type | Status | Reference | +------+------+------+ | REFERENCE | Current | Section 7 | | UID | Current | Section 7 | +------+------+------+

11.4. iCalendar RELTYPE Value Registrations

The following iCalendar "RELTYPE" values have been added to the iCalendar Relationship Types Registry defined in Section 8.3.8 of [RFC5545]

Douglass Expires January 31, 2022 [Page 15] Internet-Draft iCalendar Relationships July 2021

+------+------+------+ | Relationship Type | Status | Reference | +------+------+------+ | CONCEPT | Current | Section 5 | | DEPENDS-ON | Current | Section 5 | | FINISHTOFINISH | Current | Section 4 | | FINISHTOSTART | Current | Section 4 | | FIRST | Current | Section 5 | | REFID | Current | Section 5 | | STARTTOFINISH | Current | Section 4 | | STARTTOSTART | Current | Section 4 | +------+------+------+

11.5. New Reference Type Registration

The following link relation values have been added to the Reference Types Registry defined in Section 6.2.2 of [RFC8288]

+------+------+------+ | Name | Status | Reference | +------+------+------+ | SOURCE | Current | Section 6.1 | +------+------+------+

12. Acknowledgements

The author would like to thank the members of the Calendaring and Scheduling Consortium technical committees and the following individuals for contributing their ideas, support and comments:

Adrian Apthorp, Cyrus Daboo, Marten Gajda, Ken Murchison

The author would also like to thank CalConnect, the Calendaring and Scheduling Consortium for advice with this specification.

13. Normative References

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, .

[RFC5545] Desruisseaux, B., Ed., "Internet Calendaring and Scheduling Core Object Specification (iCalendar)", RFC 5545, DOI 10.17487/RFC5545, September 2009, .

Douglass Expires January 31, 2022 [Page 16] Internet-Draft iCalendar Relationships July 2021

[RFC7986] Daboo, C., "New Properties for iCalendar", RFC 7986, DOI 10.17487/RFC7986, October 2016, .

[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, .

[RFC8288] Nottingham, M., "Web Linking", RFC 8288, DOI 10.17487/RFC8288, October 2017, .

[RFC8607] Daboo, C., Quillaud, A., and K. Murchison, Ed., "Calendaring Extensions to WebDAV (CalDAV): Managed Attachments", RFC 8607, DOI 10.17487/RFC8607, June 2019, .

[W3C.CR-skos-reference-20090317] Bechhofer, S. and A. Miles, "SKOS Simple Knowledge Organization System Reference", World Wide Web Consortium CR CR-skos-reference-20090317, March 2009, .

[W3C.WD-xptr-xpointer-20021219] DeRose, S., Daniel, R., and E. Maler, "XPointer xpointer() Scheme", World Wide Web Consortium WD WD-xptr-xpointer- 20021219, December 2002, .

Author’s Address

Michael Douglass Bedework 226 3rd Street Troy, NY 12180 USA

Email: [email protected] URI: http://bedework.com

Douglass Expires January 31, 2022 [Page 17] Network Working Group M. Douglass Internet-Draft 12 April 2021 Intended status: Standards Track Expires: 14 October 2021

Support for Series in iCalendar draft-ietf-calext-icalendar-series-03

Abstract

This document updates [RFC5545] by defining a new repeating set of events known as a series. This differs from recurrences in that each instance is a separate entity with a parent relationship to a specified template entity.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on 14 October 2021.

Copyright Notice

Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/ license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

Douglass Expires 14 October 2021 [Page 1] Internet-Draft iCalendar series April 2021

Table of Contents

1. Acknowledgements ...... 2 2. Introduction ...... 3 3. Terms and definitions ...... 3 4. Overrides and iCalendar recurrences ...... 3 4.1. Changing the master start or the recurrence rules . . . . 3 4.2. Splitting recurrences ...... 4 5. Series ...... 4 5.1. Modifying series patterns and splitting ...... 5 5.2. The series master ...... 6 5.3. The series instances ...... 6 6. Redefined Relation Type Value ...... 6 7. New Property Parameters ...... 9 7.1. Split ...... 9 7.2. Lookahead count ...... 10 7.3. Lookahead period ...... 10 8. New Properties ...... 11 8.1. General ...... 11 8.2. Generating Series members ...... 11 8.3. Series UID ...... 13 8.4. Series-exception-date ...... 13 8.5. Series-date ...... 15 8.6. Series-id ...... 16 8.7. Last series ID ...... 18 8.8. Series Rule ...... 21 9. Redefined RELATED-TO Property ...... 22 9.1. RELATED-TO ...... 22 10. Backwards compatibility ...... 24 11. IANA Considerations ...... 25 11.1. iCalendar Property Registrations ...... 25 11.2. iCalendar Property Parameter Registrations ...... 25 11.3. iCalendar RELTYPE Value Registrations ...... 26 12. Normative References ...... 26 13. Informative References ...... 27 Author’s Address ...... 27

1. Acknowledgements

The author would like to thank the members of the Calendaring and Scheduling Consortium technical committees and the following individuals for contributing their ideas, support and comments:

The author would also like to thank the Calendaring and Scheduling Consortium for advice with this specification.

Douglass Expires 14 October 2021 [Page 2] Internet-Draft iCalendar series April 2021

2. Introduction

Since iCalendar was first defined there has been only one way to express a repeating set of events - the recurrence. This defined a master event, a set of rules for computing the instances and a way of overriding certain instances.

This approach works well enough in certain situations but has many problems which need to be addressed.

This specification introduces a new approach to repeating patterns of entities which avoids some of the problems.

3. Terms and definitions

4. Overrides and iCalendar recurrences

The recurrence rules specify how instances are to be computed. These rules provide a set of keys - the RECURRENCE-ID - and an instance can be created with the calculated start date/time and a copy of the duration (or calculated end date/time).

The [RFC5545] specification allows for overrides. These are handled by supplying a complete replacement for the instance with a RECURRENCE- ID property matching that of the instance being overridden. This may change any of the properties (except the UID) - including start, end or duration.

If a long lived recurrence is heavily overridden it becomes very cumbersome. The master plus overrides is considered a single resource in most circumstances (iTip allows the delivery of a single instance in certain situations).

Simple meetings can become heavily modified recurrences through adding the agenda to the description, changing of attendees etc.

There are approaches being considered to mitigate some of these issues which mostly involve only storing changes. This can help if the changes are minor but heavily modified instances are still a problem.

4.1. Changing the master start or the recurrence rules

This can lead to some very difficult problems to resolve. In the case of a heavily modified meeting it may be difficult to impossible to determine which override applies to the newly modified event.

Douglass Expires 14 October 2021 [Page 3] Internet-Draft iCalendar series April 2021

For example, a weekly book-reading is moved from Monday to Friday. There are weeks of scheduled events in the future. Do we move them all forward to the next instance or skip one and move them back? If it becomes bi-weekly rather than weekly do we drop every other or just space them out more?

While these problems are not totally resolved by a series approach, they become more tractable.

4.2. Splitting recurrences

The [RFC5545] THISANDFUTURE range is poorly supported. Splitting is the approach a number of implementations use to avoid changing overrides in the .

The recurring event is split into 2, one being the truncated original the other being a new recurring event starting at the time of the THISANDFUTURE override.

There is left the problem of relating the two, this can be accomplished by use of the RELATED-TO property but that is not standardized.

5. Series

A series is a, generally regularly, repeating sets of events or tasks each instance of which is usually, but not always, different in some respect. Examples may be a library running an after-school reading program which usually, takes place at the same time each week but always differs in the book or author being studied.

In recurrences an instances is a calculated ’virtual’ object, unless overridden. It has the same UID as the master and a RECURRENCE-ID which is always one of the calculated set.

In a series, a specified number of instances are created ahead of time each with their own unique UID. They are all related to the master using a SERIES-MASTER relation type defined in this specification. Each instance acts as an individual component as far as retrieval and searching is concerned.

Each instance and master is identified as a member of the full series by the SERIES-UID property. The value of this property is the same in all members of the series even when splits have occurred.

Douglass Expires 14 October 2021 [Page 4] Internet-Draft iCalendar series April 2021

As instances are created a LAST-SERIES-ID property is added or updated in the master to indicate which instance was last created. When there are SXDATE properties this property value may represent an instance which cannot be created. It merely represents the latest calculated date.

This property allows generated instances to be deleted without the addition of SXDATE properties to the master. The SXDATE only indicates future instances which MUST NOT be created.

As time goes on more instances are created either by the server or by a client when it inspects the current state of the series. The number of instances may be based on time or a count.

For example, an organization may allow rooms to be booked only 4 weeks ahead. Thus a series may be set up which has that 4 week set of events in the future. Each will have the room as an attendee ensuring that at least the room is booked at the regular time.

5.1. Modifying series patterns and splitting

If it becomes necessary to modify the series rules or the master start then the series is always split at the point of the modification.

When a series is split the previous master is modifed to truncate the current series at the last generated instance and a parameter SPLIT=YES is added to the series rule to indicate that this master is now split.

The split may result in a number of instances related to the old series but overlapping the new. It is up to the implementation to decide what should be done with these but this usually requires a degree of interaction with a human (or very intelligent robot). The application may offer to copy them into the corresponding new instances - if these can be easily determined, offer to delete all of them or let the user manually copy information and delete.

The new series master is related to the old master by the new series master having a RELATED-TO property with RELTYPE=SERIES-MASTER pointing at the previous master. In that way a backwards chain of series masters may be created

Douglass Expires 14 October 2021 [Page 5] Internet-Draft iCalendar series April 2021

5.2. The series master

A series master is identified in much the same way as a recurrence master. It will contain an SRULE and 0 or more SDATE properties or 1 or more SDATE properties. Additionally it may contain 0 or more SXDATE properties to exclude instances.

As noted above, if the series was split it may contain a RELATED-TO property with RELTYPE=SERIES-MASTER and a value of the previous series master.

The master will also contain a LAST-SERIES-ID if any instances have been calculated and perhaps generated.

It is important to note that the series master is the first member of the series. Thus the first instance always occurs AFTER the series master.

5.3. The series instances

A series instance is identified by having a SERIES-ID property which is calculated in the same manner as a RECURRENCE-ID. It MUST also contain a RELATED-TO property with RELTYPE=SERIES-MASTER and a value being the UID of the series master.

As noted above, if the series was split it may contain a RELATED-TO property with RELTYPE=SERIES-MASTER and a value being the UID of the previous series master.

6. Redefined Relation Type Value

Relationship parameter type values are defined in [RFC5545]. This specification augments that parameter to include the new relationship values SERIES-MASTER.

Format Definition

This property parameter is respecified as follows:

Douglass Expires 14 October 2021 [Page 6] Internet-Draft iCalendar series April 2021

reltypeparam = "RELTYPE" "=" ("PARENT" ; Parent relationship - Default / "CHILD" ; Child relationship / "SIBLING" ; Sibling relationship / "DEPENDS-ON" ; refers to previous task / "REFID" ; Relationship based on REFID / "STRUCTURED-CATEGORY" ; Relationship based on STRUCTURED-CATEGORY / "FINISHTOSTART" ; Temporal relationship / "FINISHTOFINISH" ; Temporal relationship / "STARTTOFINISH" ; Temporal relationship / "STARTTOSTART" ; Temporal relationship / "SERIES-MASTER" ; link to the master component / iana-token ; Some other IANA-registered ; iCalendar relationship type / x-name) ; A non-standard, experimental ; relationship type

Figure 1

Description

This parameter can be specified on a property that references another related calendar component. The parameter may specify the hierarchical relationship type of the calendar component referenced by the property when the value is PARENT, CHILD or SIBLING. If this parameter is not specified on an allowable property, the default relationship type is PARENT. Applications MUST treat x-name and iana-token values they don’t recognize the same way as they would the PARENT value.

This parameter defines the temporal relationship when the value is one of the project management standard relationships FINISHTOSTART, FINISHTOFINISH, STARTTOFINISH or STARTTOSTART. This property will be present in the predecessor entity and will refer to the successor entity. The GAP parameter specifies the lead or lag time between the predecessor and the successor. In the description of each temporal relationship below we refer toTask-A which contains and controls the relationship and Task-B the target of the relationship.

RELTYPE=PARENT See [RFC5545].

RELTYPE=CHILD See [RFC5545].

RELTYPE=SIBLING See [RFC5545].

RELTYPE=DEPENDS-ON Indicates that the current calendar component

Douglass Expires 14 October 2021 [Page 7] Internet-Draft iCalendar series April 2021

depends on the referenced calendar component in some manner. For example a task may be blocked waiting on the other, referenced, task.

RELTYPE=REFID Establishes a reference from the current component to components with a REFID property which matches the value given in the associated RELATED-TO property.

RELTYPE=SERIES-MASTER Indicates that the current calendar component is based on the referenced calendar component. The value is a UID.

RELTYPE=STRUCTURED-CATEGORY Establishes a reference from the current component to components with a STRUCTURED-CATEGORY property which matches the value given in the associated RELATED- TO property.

RELTYPE=FINISHTOSTART

Task-B cannot start until Task-A finishes. For example, when sanding is complete, painting can begin.

======| Task-A |--+ ======| | V ======| Task-B | ======

Figure 2: Finish to start relationship

RELTYPE=FINISHTOFINISH

Task-B cannot finish before Task-A is finished, that is the end of Task-A defines the end of Task-B. For example, we start the potatoes, then the meat then the peas but they should all be cooked at the same time.

======| Task-A |--+ ======| | ======| | Task-B |<-+ ======

Figure 3: Finish to finish relationship

Douglass Expires 14 October 2021 [Page 8] Internet-Draft iCalendar series April 2021

RELTYPE=STARTTOFINISH

The start of Task-A (which occurs after Task-B) controls the finish of Task-B. For example, ticket sales (Task-B) end when the game starts (Task-A).

======+--| Task-A | | ======| ======| | Task-B |<-+ ======

Figure 4: Start to finish relationship

RELTYPE=STARTTOSTART

The start of Task-A triggers the start of Task-B, that is Task-B can start anytime after Task-A starts.

======+--| Task-A | | ======| | ======+->| Task-B | ======

Figure 5: Start to start relationship

7. New Property Parameters

7.1. Split

Parameter name SPLIT

Purpose To indicate a series has been split.

Format Definition

This parameter is defined by the following notation:

splitparam = "SPLIT" "=" ("YES" ; The series is split / "NO" ; The series is not split (default) / x-name ; Experimental reference type / iana-token) ; Other IANA registered type

Douglass Expires 14 October 2021 [Page 9] Internet-Draft iCalendar series April 2021

Figure 6

Description This parameter MAY be specified on the SRULE property to indicate that the series has been split with SPLIT=YES. Once split is is probably inappropriate to modify the series further.

7.2. Lookahead count

Parameter name LOOKAHEAD-COUNT

Purpose To specify the number of series instances that should be generated in advance.

Format Definition

This parameter is defined by the following notation:

lookahead-countparam = "LOOKAHEAD-COUNT" "=" 1*DIGIT

Figure 7

Description

This parameter MAY be specified on the SRULE property to indicate how many series instances should be generated in advance.

An implementation is free to apply its own limts but MUST NOT generate more than those defined by this parameter and/or the LOOKAHEAD-PERIOD parameter.

If both the LOOKAHEAD-PERIOD and LOOKAHEAD-COUNT arameters are supplied the result should be limited by both.

For example, if the LOOKAHEAD-PERIOD parameter would cause 8 instances to be generated but LOOKAHEAD-COUNT specifies 4 then only 4 instances will be generated.

7.3. Lookahead period

Parameter name LOOKAHEAD-PERIOD

Purpose To specify a maximum period for which series instances should be generated in advance.

Format Definition

This parameter is defined by the following notation:

Douglass Expires 14 October 2021 [Page 10] Internet-Draft iCalendar series April 2021

lookahead-periodparam = "LOOKAHEAD-PERIOD" "=" DQUOTE dur-value DQUOTE

Figure 8

Description

This parameter MAY be specified on the SRULE property to indicate how far in advance series instances should be generated.

An implementation is free to apply its own limts but MUST NOT generate more than those defined by this parameter and/or the LOOKAHEAD-COUNT parameter.

If both the LOOKAHEAD-PERIOD and LOOKAHEAD-COUNT arameters are supplied the result should be limited by both.

For example, if the LOOKAHEAD-PERIOD parameter would cause 8 instances to be generated but LOOKAHEAD-COUNT specifies 4 then only 4 instances will be generated.

The value is a quoted duration.

8. New Properties

8.1. General

The SERIES-ID, LAST-SERIES-ID, SDATE and SXDATE properties are identical in form and in the parameters they take.

All must conform in form to the DTSTART property of the master component. Only the SDATE may specify a time which is not part of the calculated series.

The SRULE property value is identical in form to the RRULE property defined in [RFC5545]. The LOOKAHEAD-COUNT and LOOKAHEAD-PERIOD parameters indicate how many instances should be generated in advance.

8.2. Generating Series members

An agent, either the server or a client, will periodically extend the set of instances. The number of such generated instances is limited by:

Elements of the rule The UNTIL or COUNT parts of the rule define when the series terminates. Thus a COUNT=100 specifies a maximum of 100 series members.

Douglass Expires 14 October 2021 [Page 11] Internet-Draft iCalendar series April 2021

Lookahead count This specifies how many series members can exist from the current date/time. Thus a LOOKAHEAD-COUNT=4 means a maximum of 4 generated instances.

Lookahead period This specifies how far into the future series members can be generated. Thus a LOOKAHEAD-PERIOD="PT2M" means a maximum period of 2 months.

System limits This client or server SHOULD also apply limits to prevent a series from generating an overlarge set of members.

The starting point for the calculation is the DTSTART of the master component or the LAST-SERIES-ID if it exists in the master. In both cases the instance represented by that date is NOT generated as part of the instance set and the actual instance may have been excluded by an SXDATE property but the starting date is still valid.

The starting date/time property defines the first instance in the next batch of series members. Note that the starting property value MUST match the pattern of the series rule, if specified. For example, if the rule specifies every Wednesday the starting date MUST be a Wednesday.

The end date/time of the set will be provided by the UNTIL part of the rule, the LOOKAHEAD-PERIOD or by a system maxima.

A set of date/time values can be generated within those contraints. As each date/time value is generated it can be ignored if it is one of the SXDATE values.

Generation of values can terminate when the size of the result exceeds that given by the COUNT rule element, the LOOKAHEAD-COUNT value or any system limit.

Any SDATE values that fall within the current range and are not in the set of SXDATE values can be added and the result truncated again to match the size limits.

Finally, any date/time values that have already been generated and are present as SERIES-ID values should be removed from the set. What remains is the new set of members to extend the current series.

The last of those values becomes the new value for the LAST-SERIES-ID property in the series master.

Douglass Expires 14 October 2021 [Page 12] Internet-Draft iCalendar series April 2021

As noted above the "SXDATE" property can be used to exclude the value specified in the master. This leads to a as the master needs to be preserved as a container for the values which define the series. This is flagged by adding a DELETED-MASTER element to the SERIES-STATUS property.

8.3. Series UID

Property name SERIES-UID

Purpose This property defines the persistent, globally unique identifier for the full series.

Value Type TEXT

Property Parameters IANA and non-standard property parameters can be specified on this property.

Conformance This property MUST be specified in any "VEVENT", "VTODO", and "VJOURNAL" calendar components acting as a series master or series instance.

Description The SERIES-UID MUST be globally unique. This value SHOULD be generated by following the recommendations in [RFC7986].

Format Definition

This property is defined by the following notation:

seruid = "SERIES-UID" seruidparam ":" text CRLF

seruidparam = *(";" other-param)

Figure 9

EXAMPLE

The following is an example of this property:

SERIES-UID:123e4567-e89b-12d3-a456-426655440000

Figure 10

8.4. Series-exception-date

Property name SXDATE

Purpose This property defines the list of DATE-TIME exceptions for

Douglass Expires 14 October 2021 [Page 13] Internet-Draft iCalendar series April 2021

series of events, to-dos or journal entries.

Value Type The default value type for this property is DATE-TIME. The value type can be set to DATE.

Property Parameters IANA, non-standard, value data type, and time zone identifier property parameters can be specified on this property.

Conformance This property can be specified in "VEVENT", "VTODO", and "VJOURNAL" calendar components acting as the series master.

Description The exception dates, if specified, are used when computing the instances of the series. They specify date/time values which are to be removed from the set of possible series instances.

Format Definition

This property is defined by the following notation:

sxdate = "SXDATE" sxdtparam ":" sxdtval *("," sxdtval) CRLF

sxdtparam = *( ; ; The following are OPTIONAL, ; but MUST NOT occur more than once. ; (";" "VALUE" "=" ("DATE-TIME" / "DATE")) / ; (";" tzidparam) / ; ; The following is OPTIONAL, ; and MAY occur more than once. ; (";" other-param) ; )

sxdtval = date-time / date ;Value MUST match value type

Figure 11

EXAMPLE

The following is an example of this property:

Douglass Expires 14 October 2021 [Page 14] Internet-Draft iCalendar series April 2021

SXDATE:19960402T010000Z,19960403T010000Z,19960404T010000Z

Figure 12

8.5. Series-date

Property name SDATE

Purpose This property defines the list of DATE-TIME values for series of events, to-dos or journal entries.

Value Type The default value type for this property is DATE-TIME. The value type can be set to DATE.

Property Parameters IANA, non-standard, value data type, and time zone identifier property parameters can be specified on this property.

Conformance This property can be specified in "VEVENT", "VTODO", and "VJOURNAL" calendar components acting as the series master.

Description This property can appear along with the "SRULE" property to define a extra series occurrences. When they both appear in a series master component, the instances are defined by the union of occurrences defined by both the "SDATE" and "SRULE".

Format Definition

This property is defined by the following notation:

Douglass Expires 14 October 2021 [Page 15] Internet-Draft iCalendar series April 2021

sdate = "SDATE" sdtparam ":" sdtval *("," sdtval) CRLF

sdtparam = *( ; ; The following are OPTIONAL, ; but MUST NOT occur more than once. ; (";" "VALUE" "=" ("DATE-TIME" / "DATE" / "PERIOD")) / (";" tzidparam) / ; ; The following is OPTIONAL, ; and MAY occur more than once. ; (";" other-param) ; )

sdtval = date-time / date ;Value MUST match value type

Figure 13

EXAMPLE

The following are examples of this property:

SDATE:19970714T123000Z SDATE;TZID=America/New_York:19970714T083000

SDATE;VALUE=PERIOD:19960403T020000Z/19960403T040000Z, 19960404T010000Z/PT3H

SDATE;VALUE=DATE:19970101,19970120,19970217,19970421 19970526,19970704,19970901,19971014,19971128,19971129,19971225

Figure 14

8.6. Series-id

Property name SERIES-ID

Purpose This property is used in conjunction with the "UID" and "SEQUENCE" properties to identify a specific instance of a "VEVENT", "VTODO", or "VJOURNAL" calendar component in a series. The property value is the original value of the "DTSTART" property of the series instance before any changes occur.

Value type The default value type is DATE-TIME. The value type can

Douglass Expires 14 October 2021 [Page 16] Internet-Draft iCalendar series April 2021

be set to a DATE value type. This property MUST have the same value type as the "DTSTART" property contained within the series component. Furthermore, this property MUST be specified as a date with local time if and only if the "DTSTART" property contained within the series component is specified as a date with local time.

Property Parameters IANA, non-standard, value data type and time zone identifier parameters can be specified on this property.

Conformance This property can be specified zero or more times in any iCalendar component.

Description

The SERIES-ID is the originally calculated value of the DTSTART property based on the master identified by the RELATED-TO property with a RELTYPE=SERIES-MASTER parameter.

The full series of components can only be retrieved by searching for all components with a matching RELATED-TO property.

Figure 15

If the value of the "DTSTART" property is a DATE type value, then the value MUST be the for the series instance.

Figure 16

The DATE-TIME value is set to the time when the original series instance would occur; meaning that if the intent is to change a Friday meeting to Thursday, the DATE-TIME is still set to the original Friday meeting.

Figure 17

The "SERIES-ID" property is used in conjunction with the "UID" and "SEQUENCE" properties to identify a particular instance of an event, to-do, or journal in the series. For a given pair of "UID" and "SEQUENCE" property values, the "SERIES-ID" value for a series instance is fixed.

Figure 18

Format Definition

This property is defined by the following notation:

Douglass Expires 14 October 2021 [Page 17] Internet-Draft iCalendar series April 2021

serid = "SERIES-ID" sidparam ":" sidval CRLF

sidparam = *( ; ; The following are OPTIONAL, ; but MUST NOT occur more than once. ; (";" "VALUE" "=" ("DATE-TIME" / "DATE")) / (";" tzidparam) / ; ; The following is OPTIONAL, ; and MAY occur more than once. ; (";" other-param) ; )

sidval = date-time / date ;Value MUST match value type

Figure 19

EXAMPLE

The following are examples of this property:

SERIES-ID;VALUE=DATE:19960401

SERIES-ID;TZID=America/New_York:20170120T120000

Figure 20

8.7. Last series ID

Property name LAST-SERIES-ID

Purpose

To specify the last calculated instance of the series. When new instances are created they MUST have a SERIES-ID after the value of this property.

In all respects this property is identical to SERIES-ID and is in fact a copy of the SERIES-ID which would be present in the last created instance (assuming it is not suppressed by an SXDATE).

Value type DATE or DATE_TIME (the default). This has the same requirements as SERIES-ID.

Douglass Expires 14 October 2021 [Page 18] Internet-Draft iCalendar series April 2021

Property Parameters IANA, non-standard, value data type and time zone identifier parameters can be specified on this property.

Conformance This property MAY be specified in any iCalendar component.

Description When used in a component the value of this property points to additional information related to the component. For example, it may reference the originating web server.

Format Definition

This property is defined by the following notation:

Douglass Expires 14 October 2021 [Page 19] Internet-Draft iCalendar series April 2021

last-series-i = "LAST-SERIES-ID" lastseriesidparam / ( ";" "VALUE" "=" "TEXT" ":" text ) ( ";" "VALUE" "=" "REFERENCE" ":" text ) ( ";" "VALUE" "=" "URI" ":" uri ) CRLF

lastseriesidparam = *(

; the following is MANDATORY ; and MAY occur more than once

(";" relparam) /

; the following are MANDATORY ; but MUST NOT occur more than once

(";" fmttypeparam) / (";" labelparam) / ; labelparam is defined in ...

; the following is OPTIONAL ; and MAY occur more than once

(";" xparam)

)

Figure 21

EXAMPLE

The following is an example of this property. It points to a server acting as the source for the calendar object.

LINK;REL=SOURCE;LABEL=The Egg:http://example.com/events

Figure 22

Douglass Expires 14 October 2021 [Page 20] Internet-Draft iCalendar series April 2021

8.8. Series Rule

Property name SRULE

Purpose This property defines a rule or repeating pattern for a series of events, to-dos or journal entries.

Value Type RECUR

Property Parameters IANA, non-standard, look-ahead count or date property parameters can be specified on this property.

Conformance This property can be specified in any "VEVENT", "VTODO", and "VJOURNAL" calendar component, but it SHOULD NOT be specified more than once.

Description

The series rule, if specified, is used in computing the instances to be generated for the series. These are generated by considering the master "DTSTART" property along with the "SRULE", "SDATE", and "SXDATE" properties contained within the series master. The "DTSTART" property defines the first instance in the recurrence set which is represented by that master event.

Unlike the RRULE the "DTSTART" property MUST be synchronized with the series rule, if specified. For example, if the DTSTARTS species a date on Wednesday but the SRULE specifies every Tuesday then a server or client MUSt reject the component.

The final series is represented by gathering all of the start DATE- TIME values generated by any of the specified "SRULE" and "SDATE" properties, and then excluding any start DATE-TIME values specified by "SXDATE" properties. This implies that start DATE- TIME values specified by "SXDATE" properties take precedence over those specified by inclusion properties (i.e., "SDATE" and "SRULE"). Where duplicate instances are generated by the "SRULE" and "SDATE" properties, only one instance is considered. Duplicate instances are ignored.

The "DTSTART" property specified within the master iCalendar object defines the first instance of the recurrence. In most cases, a "DTSTART" property of DATE-TIME value type used with a series rule, should be specified as a date with local time and time zone reference to make sure all the recurrence instances start at the same local time regardless of time zone changes.

Douglass Expires 14 October 2021 [Page 21] Internet-Draft iCalendar series April 2021

If the duration of the series component is specified with the "DTEND" or "DUE" property, then the same exact duration will apply to all the members of the generated series. Else, if the duration of the series master component is specified with the "DURATION" property, then the same nominal duration will apply to all the members of the generated series and the exact duration of each instance will depend on its specific start time. For example, series instances of a nominal duration of one will have an exact duration of more or less than 24 on a day where a time zone shift occurs. The duration of a specific instance may be modified in an exception component or simply by using an "SDATE" property of PERIOD value type.

Format Definition

This property is defined by the following notation:

srule = "SRULE" srulparam ":" recur CRLF

sruleparam = *( ; the following are OPTIONAL ; but MUST NOT occur more than once

(";" lookahead-countparam) / (";" lookahead-periodparam) /

; the following is OPTIONAL ; and MAY occur more than once

(";" xparam)

)

Figure 23

EXAMPLE

TODO - Say they are pretty much the same as RRULE but extra params

9. Redefined RELATED-TO Property

9.1. RELATED-TO

Property name RELATED-TO

Purpose This property is used to represent a relationship or reference between one calendar component and another. The definition here extends the definition in [RFC5545] by including a section on RELTYPE=SERIES-MASTER.

Douglass Expires 14 October 2021 [Page 22] Internet-Draft iCalendar series April 2021

Value type URI, UID or TEXT

Conformance This property MAY be specified in any iCalendar component.

Description By default or when VALUE=UID is specified, the property value consists of the persistent, globally unique identifier of another calendar component. This value would be represented in a calendar component by the "UID" property.

By default, the property value points to another calendar component that has a PARENT relationship to the referencing object. The "RELTYPE" property parameter is used to either explicitly state the default PARENT relationship type to the referenced calendar component or to override the default PARENT relationship type and specify either a CHILD or SIBLING relationship or a temporal relationship.

The PARENT relationship indicates that the calendar component is a subordinate of the referenced calendar component. The CHILD relationship indicates that the calendar component is a superior of the referenced calendar component. The SIBLING relationship indicates that the calendar component is a peer of the referenced calendar component.

The FINISHTOSTART, FINISHTOFINISH, STARTTOFINISH or STARTTOSTART relationships define temporal relationships as specified in the reltype parameter definition.

The SERIES-MASTER relationship when included in a series instance refers to the master of that series. When included in a series master it refers to a previous master in a chain of spilt series.

Changes to a calendar component referenced by this property can have an implicit impact on the related calendar component. For example, if a group event changes its start or end date or time, then the related, dependent events will need to have their start and end dates changed in a corresponding way. Similarly, if a PARENT calendar component is cancelled or deleted, then there is an implied impact to the related CHILD calendar components. This property is intended only to provide information on the relationship of calendar components. It is up to the target calendar system to maintain any property implications of this relationship.

Format Definition This property is defined by the following notation:

Douglass Expires 14 October 2021 [Page 23] Internet-Draft iCalendar series April 2021

related = "RELATED-TO" relparam ( ":" text ) / ( ";" "VALUE" "=" "UID" ":" uid ) ( ";" "VALUE" "=" "URI" ":" uri ) CRLF

relparam = *( ; ; The following are OPTIONAL, ; but MUST NOT occur more than once. ; (";" reltypeparam) / (";" gapparam) / ; ; The following is OPTIONAL, ; and MAY occur more than once. ; (";" other-param) ; )

Figure 24

EXAMPLE

The following are examples of this property.

RELATED-TO;RELTYPE=SERIES-MASTER:19960401-080045-4000F192713

Figure 25

10. Backwards compatibility

Any clients following the approach specified in [RFC5545] are expected to ignore any properties or parameters they don’t recognize.

For such clients the series appears to be an unconnected set of components. They all have their own unique UIDS. If the client updates an instance this should be identical in effect to an update carried out by a client aware of the new properties.

Douglass Expires 14 October 2021 [Page 24] Internet-Draft iCalendar series April 2021

Updates MUST preserve the SERIES-ID, LAST-SERIES-ID, SRULE, SDATE and SXDATE properties. A client which does not do so is in violation of [RFC5545].

TODO - More text needed here... == CalDAV extensions

This specification may extend Caldav by adding reports to return all members of a series given the series master UID. This could be handled by the current query mechanism but it is likely to be sufficiently frequently used that a special query is appropriate.

It is also likely we will want a CalDAV operation to split a series and generate the additional members of the series as a single atomic operation. == Security Considerations

Clients and servers should take care to limit the number of generated instances to a reasonable value. This can be a relatively small value.

11. IANA Considerations

11.1. iCalendar Property Registrations

The following iCalendar property names have been added to the iCalendar Properties Registry defined in [RFC5545].

+======+======+======+ | Property | Status | Reference | +======+======+======+ | LAST-SERIES-ID | Current | Section 8.7 | +------+------+------+ | SERIES-ID | Current | Section 8.6 | +------+------+------+ | SERIES-UID | Current | Section 8.3 | +------+------+------+ | SDATE | Current | Section 8.5 | +------+------+------+ | SRULE | Current | Section 8.8 | +------+------+------+ | SXDATE | Current | Section 8.4 | +------+------+------+

Table 1

11.2. iCalendar Property Parameter Registrations

The following iCalendar property parameter names have been added to the iCalendar Parameters Registry defined in [RFC5545].

Douglass Expires 14 October 2021 [Page 25] Internet-Draft iCalendar series April 2021

+======+======+======+ | Parameter | Status | Reference | +======+======+======+ | LOOKAHEAD-COUNT | Current | Section 7.2 | +------+------+------+ | LOOKAHEAD-PERIOD | Current | Section 7.3 | +------+------+------+ | SPLIT | Current | Section 7.1 | +------+------+------+

Table 2

11.3. iCalendar RELTYPE Value Registrations

The following iCalendar "RELTYPE" values have been added to the iCalendar Relationship Types Registry defined in [RFC5545].

+======+======+======+ | Relationship Type | Status | Reference | +======+======+======+ | SERIES-ID | Current | Section 5 | +------+------+------+

Table 3

12. Normative References

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", RFC 2119, IETF RFC 2119, DOI 10.17487/RFC2119, March 1997, .

[RFC2518] Goland, Y., Whitehead, E., Faizi, A., Carter, S., and D. Jensen, "HTTP Extensions for Distributed AuthoringWEBDAV", RFC 2518, IETF RFC 2518, DOI 10.17487/RFC2518, February 1999, .

[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", RFC 3986, IETF RFC 3986, DOI 10.17487/RFC3986, January 2005, .

[RFC4791] Daboo, C., Desruisseaux, B., and L. Dusseault, "Calendaring Extensions to WebDAV (CalDAV)", RFC 4791, IETF RFC 4791, DOI 10.17487/RFC4791, March 2007, .

Douglass Expires 14 October 2021 [Page 26] Internet-Draft iCalendar series April 2021

[RFC5545] Desruisseaux, B., Ed., "Internet Calendaring and Scheduling Core Object Specification (iCalendar)", RFC 5545, IETF RFC 5545, DOI 10.17487/RFC5545, September 2009, .

[RFC5546] Daboo, C., Ed., "iCalendar Transport-Independent Interoperability Protocol (iTIP)", RFC 5546, IETF RFC 5546, DOI 10.17487/RFC5546, December 2009, .

[RFC6047] Melnikov, A., Ed., "iCalendar Message-Based Interoperability Protocol (iMIP)", RFC 6047, IETF RFC 6047, DOI 10.17487/RFC6047, December 2010, .

[RFC6638] Daboo, C. and B. Desruisseaux, "Scheduling Extensions to CalDAV", RFC 6638, IETF RFC 6638, DOI 10.17487/RFC6638, June 2012, .

[RFC7986] Daboo, C., "New Properties for iCalendar", RFC 7986, IETF RFC 7986, DOI 10.17487/RFC7986, October 2016, .

[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", RFC 8174, IETF RFC 8174, DOI 10.17487/RFC8174, May 2017, .

13. Informative References

[RFC3552] Rescorla, E. and B. Korver, "Guidelines for Writing RFC Text on Security Considerations", RFC 3552, IETF RFC 3552, DOI 10.17487/RFC3552, July 2003, .

[RFC4918] Dusseault, L., Ed., "HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)", RFC 4918, IETF RFC 4918, DOI 10.17487/RFC4918, June 2007, .

[RFC5378] Bradner, S., Ed. and J. Contreras, Ed., "Rights Contributors Provide to the IETF Trust", RFC 5378, IETF RFC 5378, DOI 10.17487/RFC5378, November 2008, .

Author’s Address

Douglass Expires 14 October 2021 [Page 27] Internet-Draft iCalendar series April 2021

Michael Douglass

Email: [email protected]

Douglass Expires 14 October 2021 [Page 28] Calendaring extensions N. Jenkins Internet-Draft R. Stepanek Intended status: Standards Track Fastmail Expires: April 19, 2021 October 16, 2020

JSCalendar: A JSON representation of calendar data draft-ietf-calext-jscalendar-32

Abstract

This specification defines a data model and JSON representation of calendar data that can be used for storage and data exchange in a calendaring and scheduling environment. It aims to be an alternative and, over time, successor to the widely deployed iCalendar data format, and to be unambiguous, extendable, and simple to process. In contrast to the jCal format, which is also JSON-based, JSCalendar is not a direct mapping from iCalendar, but defines the data model independently and expands semantics where appropriate.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on April 19, 2021.

Copyright Notice

Copyright (c) 2020 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must

Jenkins & Stepanek Expires April 19, 2021 [Page 1] Internet-Draft JSCalendar October 2020

include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

Table of Contents

1. Introduction ...... 4 1.1. Motivation and Relation to iCalendar and jCal ...... 5 1.2. Notational Conventions ...... 6 1.3. Type Signatures ...... 6 1.4. Data Types ...... 7 1.4.1. Id ...... 7 1.4.2. Int ...... 7 1.4.3. UnsignedInt ...... 8 1.4.4. UTCDateTime ...... 8 1.4.5. LocalDateTime ...... 8 1.4.6. Duration ...... 9 1.4.7. SignedDuration ...... 10 1.4.8. TimeZoneId ...... 10 1.4.9. PatchObject ...... 11 1.4.10. Relation ...... 12 1.4.11. Link ...... 12 2. JSCalendar Objects ...... 14 2.1. JSEvent ...... 14 2.2. JSTask ...... 14 2.3. JSGroup ...... 14 3. Structure of JSCalendar Objects ...... 15 3.1. Object Type ...... 15 3.2. Normalization and Equivalence ...... 15 3.3. Vendor-specific Property Extensions, Values and Types . . 15 4. Common JSCalendar Properties ...... 16 4.1. Metadata Properties ...... 16 4.1.1. @type ...... 16 4.1.2. uid ...... 16 4.1.3. relatedTo ...... 17 4.1.4. prodId ...... 17 4.1.5. created ...... 17 4.1.6. updated ...... 18 4.1.7. sequence ...... 18 4.1.8. method ...... 18 4.2. What and Where Properties ...... 18 4.2.1. title ...... 18 4.2.2. description ...... 18 4.2.3. descriptionContentType ...... 18 4.2.4. showWithoutTime ...... 19 4.2.5. locations ...... 19 4.2.6. virtualLocations ...... 20 4.2.7. links ...... 21

Jenkins & Stepanek Expires April 19, 2021 [Page 2] Internet-Draft JSCalendar October 2020

4.2.8. locale ...... 21 4.2.9. keywords ...... 22 4.2.10. categories ...... 22 4.2.11. color ...... 22 4.3. Recurrence Properties ...... 22 4.3.1. recurrenceId ...... 23 4.3.2. recurrenceRules ...... 23 4.3.3. excludedRecurrenceRules ...... 31 4.3.4. recurrenceOverrides ...... 32 4.3.5. excluded ...... 33 4.4. Sharing and Scheduling Properties ...... 33 4.4.1. priority ...... 33 4.4.2. freeBusyStatus ...... 33 4.4.3. privacy ...... 34 4.4.4. replyTo ...... 35 4.4.5. participants ...... 35 4.5. Alerts Properties ...... 41 4.5.1. useDefaultAlerts ...... 41 4.5.2. alerts ...... 41 4.6. Multilingual Properties ...... 43 4.6.1. localizations ...... 43 4.7. Time Zone Properties ...... 44 4.7.1. timeZone ...... 44 4.7.2. timeZones ...... 44 5. Type-specific JSCalendar Properties ...... 47 5.1. JSEvent Properties ...... 47 5.1.1. start ...... 47 5.1.2. duration ...... 47 5.1.3. status ...... 47 5.2. JSTask Properties ...... 48 5.2.1. due ...... 48 5.2.2. start ...... 48 5.2.3. estimatedDuration ...... 48 5.2.4. percentComplete ...... 48 5.2.5. progress ...... 48 5.2.6. progressUpdated ...... 49 5.3. JSGroup Properties ...... 49 5.3.1. entries ...... 50 5.3.2. source ...... 50 6. Examples ...... 50 6.1. Simple event ...... 51 6.2. Simple task ...... 51 6.3. Simple group ...... 51 6.4. All-day event ...... 52 6.5. Task with a due date ...... 52 6.6. Event with end time zone ...... 53 6.7. Floating-time event (with recurrence) ...... 53 6.8. Event with multiple locations and localization . . . . . 54

Jenkins & Stepanek Expires April 19, 2021 [Page 3] Internet-Draft JSCalendar October 2020

6.9. Recurring event with overrides ...... 55 6.10. Recurring event with participants ...... 56 7. Security Considerations ...... 58 7.1. Expanding Recurrences ...... 58 7.2. JSON Parsing ...... 59 7.3. URI Values ...... 59 7.4. Spam ...... 60 7.5. Duplication ...... 60 7.6. Time Zones ...... 60 8. IANA Considerations ...... 61 8.1. Media Type Registration ...... 61 8.2. Creation of "JSCalendar Properties" Registry ...... 62 8.2.1. Preliminary Community Review ...... 63 8.2.2. Submit Request to IANA ...... 63 8.2.3. Designated Expert Review ...... 63 8.2.4. Change Procedures ...... 63 8.2.5. JSCalendar Properties Registry Template ...... 64 8.2.6. Initial Contents for the JSCalendar Properties Registry ...... 64 8.3. Creation of "JSCalendar Types" Registry ...... 73 8.3.1. JSCalendar Types Registry Template ...... 73 8.3.2. Initial Contents for the JSCalendar Types Registry . 73 8.4. Creation of "JSCalendar Enum Values" Registry ...... 74 8.4.1. JSCalendar Enum Property Template ...... 74 8.4.2. JSCalendar Enum Value Template ...... 75 8.4.3. Initial Contents for the JSCalendar Enum Values registry ...... 75 9. Acknowledgments ...... 81 10. References ...... 81 10.1. Normative References ...... 82 10.2. Informative References ...... 84 Authors’ Addresses ...... 85

1. Introduction

This document defines a data model for calendar event and task objects, or groups of such objects, in electronic calendar applications and systems. The format aims to be unambiguous, extendable and simple to process.

The key design considerations for this data model are as follows:

o The attributes of the calendar entry represented must be described as simple key-value pairs. Simple events are simple to represent; complex events can be modelled accurately.

o Wherever possible, there should be only one way to express the desired semantics, reducing complexity.

Jenkins & Stepanek Expires April 19, 2021 [Page 4] Internet-Draft JSCalendar October 2020

o The data model should avoid ambiguities, which often lead to interoperability issues between implementations.

o The data model should be generally compatible with the iCalendar data format [RFC5545] [RFC7986] and extensions, but the specification should add new attributes where the iCalendar format currently lacks expressivity, and drop seldom-used, obsolete, or redundant properties. This means translation with no loss of semantics should be easy with most common iCalendar files.

o Extensions, such as new properties and components, should not require updates to this document.

The representation of this data model is defined in the I-JSON format [RFC7493], which is a strict subset of the JavaScript Object Notation (JSON) Data Interchange Format [RFC8259]. Using JSON is mostly a pragmatic choice: its widespread use makes JSCalendar easier to adopt, and the ready availability of production-ready JSON implementations eliminates a whole category of parser-related interoperability issues, which iCalendar has often suffered from.

1.1. Motivation and Relation to iCalendar and jCal

The iCalendar data format [RFC5545], a widely deployed interchange format for calendaring and scheduling data, has served calendaring vendors for a long while, but contains some ambiguities and pitfalls that can not be overcome without backward-incompatible changes.

Sources of implementation errors include the following:

o iCalendar defines various formats for local times, UTC time, and dates.

o iCalendar requires custom time zone definitions within a single calendar component.

o iCalendar’s definition of recurrence rules is ambiguous and has resulted in differing understandings even between experienced calendar developers.

o The iCalendar format itself causes interoperability issues due to misuse of CRLF-terminated strings, line continuations, and subtle differences among iCalendar parsers.

In recent , many new products and services have appeared that wish to use a JSON representation of calendar data within their APIs. The JSON format for iCalendar data, jCal [RFC7265], is a direct mapping between iCalendar and JSON. In its effort to represent full

Jenkins & Stepanek Expires April 19, 2021 [Page 5] Internet-Draft JSCalendar October 2020

iCalendar semantics, it inherits all the same pitfalls and uses a complicated JSON structure.

As a consequence, since the standardization of jCal, the majority of implementations and service providers either kept using iCalendar, or came up with their own proprietary JSON representations, which are incompatible with each other and often suffer from common pitfalls, such as storing event start times in UTC (which become incorrect if the timezone’s rules change in the future). JSCalendar meets the demand for JSON-formatted calendar data that is free of such known problems and provides a standard representation as an alternative to the proprietary formats.

1.2. Notational Conventions

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

The underlying format used for this specification is JSON. Consequently, the terms "object" and "array" as well as the four primitive types (strings, numbers, booleans, and null) are to be interpreted as described in Section 1 of [RFC8259].

Some examples in this document contain "partial" JSON documents used for illustrative purposes. In these examples, three periods "..." are used to indicate a portion of the document that has been removed for compactness.

1.3. Type Signatures

Type signatures are given for all JSON values in this document. The following conventions are used:

o "*" - The type is undefined (the value could be any type, although permitted values may be constrained by the context of this value).

o "String" - The JSON string type.

o "Number" - The JSON number type.

o "Boolean" - The JSON boolean type.

o "A[B]" - A JSON object where the keys are all of type "A", and the values are all of type "B".

Jenkins & Stepanek Expires April 19, 2021 [Page 6] Internet-Draft JSCalendar October 2020

o "A[]" - An array of values of type "A".

o "A|B" - The value is either of type "A" or of type "B".

Other types may also be given, with their representations defined elsewhere in this document.

1.4. Data Types

In addition to the standard JSON data types, the following data types are used in this specification:

1.4.1. Id

Where "Id" is given as a data type, it means a "String" of at least 1 and a maximum of 255 octets in size, and it MUST only contain characters from the "URL and Filename Safe" base64url alphabet, as defined in Section 5 of [RFC4648], excluding the pad character ("="). This means the allowed characters are the ASCII alphanumeric characters ("A-Za-z0-9"), hyphen ("-"), and underscore ("_").

In many places in JSCalendar a JSON map is used where the map keys are of type Id and the map values are all the same type of object. This construction represents an unordered set of objects, with the added advantage that each entry has a name (the corresponding map key). This allows for more concise patching of objects, and, when applicable, for the objects in question to be referenced from other objects within the JSCalendar object.

Unless otherwise specified for a particular property, there are no uniqueness constraints on an Id value (other than, of course, the requirement that you cannot have two values with the same key within a single JSON map). For example, two JSEvent objects might use the same Ids in their respective "links" properties. Or within the same JSEvent object the same Id could appear in the "participants" and "alerts" properties. These situations do not imply any semantic connections among the objects.

Nevertheless, a UUID [RFC4122] is typically a good choice.

1.4.2. Int

Where "Int" is given as a data type, it means an integer in the range -2^53+1 <= value <= 2^53-1, the safe range for integers stored in a floating-point double, represented as a JSON "Number".

Jenkins & Stepanek Expires April 19, 2021 [Page 7] Internet-Draft JSCalendar October 2020

1.4.3. UnsignedInt

Where "UnsignedInt" is given as a data type, it means an integer in the range 0 <= value <= 2^53-1, represented as a JSON "Number".

1.4.4. UTCDateTime

This is a string in [RFC3339] "date-time" format, with the further restrictions that any letters MUST be in uppercase, and the time offset MUST be the character "Z". Fractional values MUST NOT be included unless non-zero and MUST NOT have trailing zeros, to ensure there is only a single representation for each date-time.

For example "2010-10-10T10:10:10.003Z" is conformant, but "2010-10-10T10:10:10.000Z" is invalid and is correctly encoded as "2010-10-10T10:10:10Z".

1.4.5. LocalDateTime

This is a date-time string with no time zone/offset information. It is otherwise in the same format as UTCDateTime, including fractional . For example "2006-01-02T15:04:05" and "2006-01-02T15:04:05.003" are both valid. The time zone to associate with the LocalDateTime comes from the "timeZone" property of the JSCalendar object (see Section 4.7.1). If no time zone is specified, the LocalDateTime is "floating". Floating date-times are not tied to any specific time zone. Instead, they occur in each time zone at the given wall- time (as opposed to the same instant point in time).

A time zone may have a period of discontinuity, for example a change from standard time to daylight-savings time. When converting local date-times that fall in the discontinuity to UTC, the offset before the transition MUST be used.

For example, in the America/Los_Angeles time zone, the date-time 2020-11-01T01:30:00 occurs twice: before the DST transition with a UTC offset of -07:00, and again after the transition with an offset of -08:00. When converting to UTC, we therefore use the offset before the transition (-07:00) and so it becomes 2020-11-01T08:30:00Z.

Similarly, in the Australia/Melbourne time zone, the date-time 2020-10-04T02:30:00 does not exist: the are moved forward one for DST on that day at 02:00. However, such a value may appear during calculations (see duration semantics in Section 1.4.6), or due to a change in time zone rules (so it was valid when the event was first created). Again, it is interpreted as though the offset before

Jenkins & Stepanek Expires April 19, 2021 [Page 8] Internet-Draft JSCalendar October 2020

the transition is in effect (+10:00), therefore when converted to UTC we get 2020-10-03T16:30:00Z.

1.4.6. Duration

Where Duration is given as a type, it means a length of time represented by a subset of ISO8601 duration format, as specified by the following ABNF [RFC5234]:

dur-secfrac = "." 1*DIGIT dur-second = 1*DIGIT [dur-secfrac] "S" dur- = 1*DIGIT "M" [dur-second] dur-hour = 1*DIGIT "H" [dur-minute] dur-time = "T" (dur-hour / dur-minute / dur-second) dur-day = 1*DIGIT "D" dur-week = 1*DIGIT "W" dur-cal = (dur-week [dur-day] / dur-day)

duration = "P" (dur-cal [dur-time] / dur-time)

In addition, the duration MUST NOT include fractional second values unless the fraction is non-zero. Fractional second values MUST NOT have trailing zeros, to ensure there is only a single representation for each duration.

A duration specifies an abstract number of weeks, days, hours, , and/or seconds. A duration specified using weeks or days does not always correspond to an exact multiple of 24 hours. The number of hours/minutes/seconds may vary if it overlaps a period of discontinuity in the event’s time zone, for example a change from standard time to daylight-savings time. Leap seconds MUST NOT be considered when adding or subtracting a duration to/from a LocalDateTime.

To add a duration to a LocalDateTime:

1. Add any week or day components of the duration to the date. A week is always the same as 7 days.

2. If a time zone applies to the LocalDateTime, convert it to a UTCDateTime following the semantics in Section 1.4.5.

3. Add any hour, minute or second components of the duration (in absolute time).

4. Convert the resulting UTCDateTime back to a LocalDateTime in the time zone that applies.

Jenkins & Stepanek Expires April 19, 2021 [Page 9] Internet-Draft JSCalendar October 2020

To subtract a duration from a LocalDateTime, the steps apply in reverse:

1. If a time zone applies to the LocalDateTime, convert it to UTC following the semantics in Section 1.4.5.

2. Subtract any hour, minute or second components of the duration (in absolute time).

3. Convert the resulting UTCDateTime back to LocalDateTime in the time zone that applies.

4. Subtract any week or day components of the duration from the date.

5. If the resulting time does not exist on the date due to a discontinuity in the time zone, use the semantics in Section 1.4.5 to convert to UTC and back to get a valid LocalDateTime.

These semantics match the iCalendar DURATION value type ([RFC5545], Section 3.3.6).

1.4.7. SignedDuration

A SignedDuration represents a length of time that may be positive or negative and is typically used to express the offset of a point in time relative to an associated time. It is represented as a Duration, optionally preceded by a sign character. It is specified by the following ABNF:

signed-duration = ["+" / "-"] duration

A negative sign indicates a point in time at or before the associated time, a positive or no sign a time at or after the associated time.

1.4.8. TimeZoneId

Where "TimeZoneId" is given as a data type, it means a "String" that is either a time zone name in the IANA Time Zone Database [TZDB] or a custom time zone identifier defined in the "timeZones" property (see Section 4.7.2).

Where an IANA time zone is specified, the zone rules of the respective zone records apply. Custom time zones are interpreted as described in Section 4.7.2.

Jenkins & Stepanek Expires April 19, 2021 [Page 10] Internet-Draft JSCalendar October 2020

1.4.9. PatchObject

A PatchObject is of type "String[*]", and represents an unordered set of patches on a JSON object. Each key is a path represented in a subset of JSON pointer format [RFC6901]. The paths have an implicit leading "/", so each key is prefixed with "/" before applying the JSON pointer evaluation algorithm.

A patch within a PatchObject is only valid if all of the following conditions apply:

1. The pointer MUST NOT reference inside an array (i.e., you MUST NOT insert/delete from an array; the array MUST be replaced in its entirety instead).

2. All parts prior to the last (i.e., the value after the final slash) MUST already exist on the object being patched.

3. There MUST NOT be two patches in the PatchObject where the pointer of one is the prefix of the pointer of the other, e.g., "alerts/1/offset" and "alerts".

4. The value for the patch MUST be valid for the property being set (of the correct type and obeying any other applicable restrictions), or if null the property MUST be optional.

The value associated with each pointer determines how to apply that patch:

o If null, remove the property from the patched object. If the key is not present in the parent, this a no-op.

o Anything else: The value to set for this property (this may be a replacement or addition to the object being patched).

A PatchObject does not define its own "@type" property (see Section 4.1.1). A "@type" property in a patch MUST be handled as any other patched property value.

Implementations MUST reject in its entirety a PatchObject if any of its patches is invalid. Implementations MUST NOT apply partial patches.

The PatchObject format is used to significantly reduce file size and duplicated content when specifying variations to a common object, such as with recurring events or when translating the data into multiple languages. It can also better preserve semantic intent if only the properties that should differ between the two objects are

Jenkins & Stepanek Expires April 19, 2021 [Page 11] Internet-Draft JSCalendar October 2020

patched. For example, if one person is not going to a particular instance of a regularly scheduled event, in iCalendar you would have to duplicate the entire event in the override. In JSCalendar this is a small patch to show the difference. As only this property is patched, if the location of the event is changed, the occurrence will automatically still inherit this.

1.4.10. Relation

A Relation object defines the relation to other objects, using a possibly empty set of relation types. The object that defines this relation is the linking object, while the other object is the linked object. A Relation object has the following properties:

o @type: "String" (mandatory)

Specifies the type of this object. This MUST be "Relation".

o relation: "String[Boolean]" (optional, default: empty Object)

Describes how the linked object is related to the linking object. The relation is defined as a set of relation types. If empty, the relationship between the two objects is unspecified.

Keys in the set MUST be one of the following values, or specified in the property definition where the Relation object is used, or a value registered in the IANA JSCalendar Enum Values registry, or a vendor-specific value (see Section 3.3):

* "first": The linked object is the first in a series the linking object is part of.

* "next": The linked object is the next in a series the linking object is part of.

* "child": The linked object is a subpart of the linking object.

* "parent": The linking object is a subpart of the linked object.

The value for each key in the map MUST be true.

1.4.11. Link

A Link object represents an external resource associated with the linking object. It has the following properties:

o @type: "String" (mandatory)

Jenkins & Stepanek Expires April 19, 2021 [Page 12] Internet-Draft JSCalendar October 2020

Specifies the type of this object. This MUST be "Link".

o href: "String" (mandatory)

A URI [RFC3986] from which the resource may be fetched.

This MAY be a "data:" URL [RFC2397], but it is recommended that the file be hosted on a server to avoid embedding arbitrarily large data in JSCalendar object instances.

o cid: "String" (optional)

This MUST be a valid "content-id" value according to the definition of Section 2 in [RFC2392]. The value MUST be unique within this Link object but has no meaning beyond that. It MAY be different from the link id for this Link object.

o contentType: "String" (optional)

The media type [RFC6838] of the resource, if known.

o size: "UnsignedInt" (optional)

The size, in octets, of the resource when fully decoded (i.e., the number of octets in the file the user would download), if known. Note that this is an informational estimate, and implementations must be prepared to handle the actual size being quite different when the resource is fetched.

o rel: "String" (optional)

Identifies the relation of the linked resource to the object. If set, the value MUST be a relation type from the IANA registry [LINKRELS], as established in [RFC8288].

o display: "String" (optional)

Describes the intended purpose of a link to an image. If set, the "rel" property MUST be set to "icon". The value MUST be one of the following values, another value registered in the IANA JSCalendar Enum Values registry, or a vendor-specific value (see Section 3.3):

* "badge": an image meant to be displayed alongside the title of the object.

* "graphic": a full image replacement for the object itself.

Jenkins & Stepanek Expires April 19, 2021 [Page 13] Internet-Draft JSCalendar October 2020

* "fullsize": an image that is used to enhance the object.

* "thumbnail": a smaller variant of "fullsize" to be used when space for the image is constrained.

o title: "String" (optional)

A human-readable plain-text description of the resource.

2. JSCalendar Objects

This section describes the calendar object types specified by JSCalendar.

2.1. JSEvent

Media type: "application/jscalendar+json;type=jsevent"

A JSEvent represents a scheduled amount of time on a calendar, typically a meeting, appointment, reminder or anniversary. It is required to start at a certain point in time and typically has a non- zero duration. Multiple participants may partake in the event at multiple locations.

The @type (Section 4.1.1) property value MUST be "jsevent".

2.2. JSTask

Media type: "application/jscalendar+json;type=jstask"

A JSTask represents an action-item, assignment, to-do or work item. It may start and be due at certain points in time, may take some estimated time to complete, and may recur, none of which is required.

The @type (Section 4.1.1) property value MUST be "jstask".

2.3. JSGroup

Media type: "application/jscalendar+json;type=jsgroup"

A JSGroup is a collection of JSEvent (Section 2.1) and/or JSTask (Section 2.2) objects. Typically, objects are grouped by topic (e.g., by keywords) or calendar membership.

The @type (Section 4.1.1) property value MUST be "jsgroup".

Jenkins & Stepanek Expires April 19, 2021 [Page 14] Internet-Draft JSCalendar October 2020

3. Structure of JSCalendar Objects

A JSCalendar object is a JSON object [RFC8259], which MUST be valid I-JSON (a stricter subset of JSON) [RFC7493]. Property names and values are case-sensitive.

The object has a collection of properties, as specified in the following sections. Properties are specified as being either mandatory or optional. Optional properties may have a default value, if explicitly specified in the property definition.

3.1. Object Type

JSCalendar objects MUST name their type in the "@type" property, if not explicitly specified otherwise for the respective object type. A notable exception to this rule is the PatchObject (Section 1.4.9).

3.2. Normalization and Equivalence

JSCalendar aims to provide unambiguous definitions for value types and properties, but does not define a general normalization or equivalence method for JSCalendar objects and types. This is because the notion of equivalence might range from byte-level equivalence to semantic equivalence, depending on the respective use case.

Normalization of JSCalendar objects is hindered because of the following reasons:

o Custom JSCalendar properties may contain arbitrary JSON values, including arrays. However, equivalence of arrays might or might not depend on the order of elements, depending on the respective property definition.

o Several JSCalendar property values are defined as URIs and media types, but normalization of these types is inherently protocol- and scheme-specific, depending on the use-case of the equivalence definition (see Section 6 of [RFC3986]).

Considering this, the definition of equivalence and normalization is left to client and server implementations and to be negotiated by a calendar exchange protocol or defined elsewhere.

3.3. Vendor-specific Property Extensions, Values and Types

Vendors MAY add additional properties to the calendar object to support their custom features. To avoid conflict, the names of these properties MUST be prefixed by a domain name controlled by the vendor followed by a colon, e.g., "example.com:customprop". If the value is

Jenkins & Stepanek Expires April 19, 2021 [Page 15] Internet-Draft JSCalendar October 2020

a new JSCalendar object, it either MUST include a "@type" property or it MUST explicitly be specified to not require a type designator. The type name MUST be prefixed with a domain name controlled by the vendor.

Some JSCalendar properties allow vendor-specific value extensions. Such vendor-specific values MUST be prefixed by a domain name controlled by the vendor followed by a colon, e.g., "example.com:customrel".

Vendors are strongly encouraged to register any new property values or extensions that are useful to other systems as well, rather than use a vendor-specific prefix.

4. Common JSCalendar Properties

This section describes the properties that are common to the various JSCalendar object types. Specific JSCalendar object types may only support a subset of these properties. The object type definitions in Section 5 describe the set of supported properties per type.

4.1. Metadata Properties

4.1.1. @type

Type: "String" (mandatory).

Specifies the type which this object represents. This MUST be one of the following values:

o "jsevent": a JSCalendar event (Section 2.1).

o "jstask": a JSCalendar task (Section 2.2).

o "jsgroup": a JSCalendar group (Section 2.3).

4.1.2. uid

Type: "String" (mandatory).

A globally unique identifier, used to associate the object as the same across different systems, calendars and views. The value of this property MUST be unique across all JSCalendar objects, even if they are of different type. [RFC4122] describes a range of established algorithms to generate universally unique identifiers (UUID). UUID version 4, described in Section 4.4 of [RFC4122], is RECOMMENDED.

Jenkins & Stepanek Expires April 19, 2021 [Page 16] Internet-Draft JSCalendar October 2020

For compatibility with [RFC5545] UIDs, implementations MUST be able to receive and persist values of at least 255 octets for this property, but they MUST NOT truncate values in the middle of a UTF-8 multi-octet sequence.

4.1.3. relatedTo

Type: "String[Relation]" (optional).

Relates the object to other JSCalendar objects. This is represented as a map of the UIDs of the related objects to information about the relation.

If an object is split to make a "this and future" change to a recurrence, the original object MUST be truncated to end at the previous occurrence before this split, and a new object created to represent all the occurrences after the split. A "next" relation MUST be set on the original object’s relatedTo property for the UID of the new object. A "first" relation for the UID of the first object in the series MUST be set on the new object. Clients can then follow these UIDs to get the complete set of objects if the user wishes to modify them all at once.

4.1.4. prodId

Type: "String" (optional).

The identifier for the product that last updated the JSCalendar object. This should be set whenever the data in the object is modified (i.e., whenever the "updated" property is set).

The vendor of the implementation MUST ensure that this is a globally unique identifier, using some technique such as an FPI value, as defined in [ISO.9070.1991].

This property SHOULD NOT be used to alter the interpretation of a JSCalendar object beyond the semantics specified in this document. For example, it is not to be used to further the understanding of non-standard properties, a practice that is known to cause long-term interoperability problems.

4.1.5. created

Type: "UTCDateTime" (optional).

The date and time this object was initially created.

Jenkins & Stepanek Expires April 19, 2021 [Page 17] Internet-Draft JSCalendar October 2020

4.1.6. updated

Type: "UTCDateTime" (mandatory).

The date and time the data in this object was last modified (or its creation date/time if not modified since).

4.1.7. sequence

Type: "UnsignedInt" (optional, default: 0).

Initially zero, this MUST be incremented by one every time a change is made to the object, except if the change only modifies the "participants" property (see Section 4.4.5).

This is used as part of iTIP [RFC5546] to know which version of the object a scheduling message relates to.

4.1.8. method

Type: "String" (optional).

The iTIP [RFC5546] method, in lowercase. This MUST only be present if the JSCalendar object represents an iTIP scheduling message.

4.2. What and Where Properties

4.2.1. title

Type: "String" (optional, default: empty String).

A short summary of the object.

4.2.2. description

Type: "String" (optional, default: empty String).

A longer-form text description of the object. The content is formatted according to the "descriptionContentType" property.

4.2.3. descriptionContentType

Type: "String" (optional, default: "text/plain").

Describes the media type [RFC6838] of the contents of the "description" property. Media types MUST be sub-types of type "text", and SHOULD be "text/plain" or "text/html" [MEDIATYPES]. They MAY include parameters and the "charset" parameter value MUST be

Jenkins & Stepanek Expires April 19, 2021 [Page 18] Internet-Draft JSCalendar October 2020

"utf-8", if specified. Descriptions of type "text/html" MAY contain "cid" URLs [RFC2392] to reference links in the calendar object by use of the "cid" property of the Link object.

4.2.4. showWithoutTime

Type: "Boolean" (optional, default: false).

Indicates that the time is not important to display to the user when rendering this calendar object. An example of this is an event that conceptually occurs all day or across multiple days, such as "New ’s Day" or "Italy Vacation". While the time component is important for free-busy calculations and checking for scheduling clashes, calendars may choose to omit displaying it and/or display the object separately to other objects to enhance the user’s view of their schedule.

Such events are also commonly known as "all-day" events.

4.2.5. locations

Type: "Id[Location]" (optional).

A map of location ids to Location objects, representing locations associated with the object.

A Location object has the following properties. It MUST have at least one property other than the "relativeTo" property.

o @type: "String" (mandatory)

Specifies the type of this object. This MUST be "Location".

o name: "String" (optional)

The human-readable name of the location.

o description: "String" (optional)

Human-readable, plain-text instructions for accessing this location. This may be an address, set of directions, door access code, etc.

o locationTypes: "String[Boolean]" (optional)

A set of one or more location types that describe this location. All types MUST be from the Location Types Registry [LOCATIONTYPES] as defined in [RFC4589]. The set is represented as a map, with

Jenkins & Stepanek Expires April 19, 2021 [Page 19] Internet-Draft JSCalendar October 2020

the keys being the location types. The value for each key in the map MUST be true.

o relativeTo: "String" (optional)

Specifies the relation between this location and the time of the JSCalendar object. This is primarily to allow events representing travel to specify the location of departure (at the start of the event) and location of arrival (at the end); this is particularly important if these locations are in different time zones, as a client may wish to highlight this information for the user.

This MUST be one of the following values, another value registered in the IANA JSCalendar Enum Values registry, or a vendor-specific value (see Section 3.3). Any value the client or server doesn’t understand should be treated the same as if this property is omitted.

* "start": The event/task described by this JSCalendar object occurs at this location at the time the event/task starts.

* "end": The event/task described by this JSCalendar object occurs at this location at the time the event/task ends.

o timeZone: "TimeZoneId" (optional)

A time zone for this location.

o coordinates: "String" (optional)

A "geo:" URI [RFC5870] for the location.

o links: "Id[Link]" (optional)

A map of link ids to Link objects, representing external resources associated with this location, for example a vCard or image. If there are no links, this MUST be omitted (rather than specified as an empty set).

4.2.6. virtualLocations

Type: "Id[VirtualLocation]" (optional).

A map of virtual location ids to VirtualLocation objects, representing virtual locations, such as video conferences or chat rooms, associated with the object.

A VirtualLocation object has the following properties.

Jenkins & Stepanek Expires April 19, 2021 [Page 20] Internet-Draft JSCalendar October 2020

o @type: "String" (mandatory)

Specifies the type of this object. This MUST be "VirtualLocation".

o name: "String" (optional, default: empty String)

The human-readable name of the virtual location.

o description: "String" (optional)

Human-readable plain-text instructions for accessing this virtual location. This may be a conference access code, etc.

o uri: "String" (mandatory)

A URI [RFC3986] that represents how to connect to this virtual location.

This may be a telephone number (represented using the "tel:" scheme, e.g., "tel:+1-555-555-5555") for a teleconference, a web address for online chat, or any custom URI.

4.2.7. links

Type: "Id[Link]" (optional).

A map of link ids to Link objects, representing external resources associated with the object.

Links with a rel of "enclosure" MUST be considered by the client as attachments for download.

Links with a rel of "describedby" MUST be considered by the client to be an alternative representation of the description.

Links with a rel of "icon" MUST be considered by the client to be an image that it may use when presenting the calendar data to a user. The "display" property may be set to indicate the purpose of this image.

4.2.8. locale

Type: "String" (optional).

The language tag as defined in [RFC5646] that best describes the locale used for the text in the calendar object, if known.

Jenkins & Stepanek Expires April 19, 2021 [Page 21] Internet-Draft JSCalendar October 2020

4.2.9. keywords

Type: "String[Boolean]" (optional).

A set of keywords or tags that relate to the object. The set is represented as a map, with the keys being the keywords. The value for each key in the map MUST be true.

4.2.10. categories

Type: "String[Boolean]" (optional).

A set of categories that relate to the calendar object. The set is represented as a map, with the keys being the categories specified as URIs. The value for each key in the map MUST be true.

In contrast to keywords, categories typically are structured. For example, a vendor owning the domain "example.com" might define the categories "http://example.com/categories/sports/american-football" and "http://example.com/categories/music/r-b".

4.2.11. color

Type: "String" (optional).

A color clients MAY use when displaying this calendar object. The value is a color name taken from the set of names defined in Section 4.3 of CSS Color Module Level 3 [COLORS], or an RGB value in hexadecimal notation, as defined in Section 4.2.1 of CSS Color Module Level 3.

4.3. Recurrence Properties

Some events and tasks occur at regular or irregular intervals. Rather than having to copy the data for every occurrence there can be a master event with rules to generate recurrences, and/or overrides that add extra dates or exceptions to the rules.

The recurrence set is the complete set of instances for an object. It is generated by considering the following properties in order, all of which are optional:

1. The recurrenceRules property (Section 4.3.2) generates a set of extra date-times on which the object occurs.

2. The excludedRecurrenceRules property (Section 4.3.3) generates a set of date-times that are to be removed from the previously generated set of date-times on which the object occurs.

Jenkins & Stepanek Expires April 19, 2021 [Page 22] Internet-Draft JSCalendar October 2020

3. The recurrenceOverrides property (Section 4.3.4) defines date- times which are added or excluded to form the final set. (This property may also contain changes to the object to apply to particular instances.)

4.3.1. recurrenceId

Type: "LocalDateTime" (optional).

If present, this JSCalendar object represents one occurrence of a recurring JSCalendar object. If present the "recurrenceRules" and "recurrenceOverrides" properties MUST NOT be present.

The value is a date-time either produced by the "recurrenceRules" of the master event, or added as a key to the "recurrenceOverrides" property of the master event.

4.3.2. recurrenceRules

Type: "RecurrenceRule[]" (optional).

Defines a set of recurrence rules (repeating patterns) for recurring calendar objects.

A JSEvent recurs by applying the recurrence rules to the "start" date-time.

A JSTask recurs by applying the recurrence rules to the "start" date- time, if defined, otherwise it recurs by the "due" date-time, if defined. If the task defines neither a "start" nor "due" date-time, it MUST NOT define a "recurrenceRules" property.

If multiple recurrence rules are given, each rule is to be applied and then the union of the results used, ignoring any duplicates.

A RecurrenceRule object is a JSON object mapping of a RECUR value type in iCalendar [RFC5545] [RFC7529] and has the same semantics. It has the following properties:

o @type: "String" (mandatory)

Specifies the type of this object. This MUST be "RecurrenceRule".

o frequency: "String" (mandatory)

The time span covered by each iteration of this recurrence rule (see Section 4.3.2.1 for full semantics). This MUST be one of the following values:

Jenkins & Stepanek Expires April 19, 2021 [Page 23] Internet-Draft JSCalendar October 2020

* "yearly"

* "monthly"

* "weekly"

* "daily"

* "hourly"

* "minutely"

* "secondly"

This is the FREQ part from iCalendar, converted to lowercase.

o interval: "UnsignedInt" (optional, default: 1)

The interval of iteration periods at which the recurrence repeats. If included, it MUST be an integer >= 1.

This is the INTERVAL part from iCalendar.

o rscale: "String" (optional, default: "gregorian")

The calendar system in which this recurrence rule operates, in lowercase. This MUST be either a CLDR-registered calendar system name [CLDR], or a vendor-specific value (see Section 3.3).

This is the RSCALE part from iCalendar RSCALE [RFC7529], converted to lowercase.

o skip: "String" (optional, default: "omit")

The behaviour to use when the expansion of the recurrence produces invalid dates. This property only has an effect if the frequency is "yearly" or "monthly". It MUST be one of the following values:

* "omit"

* "backward"

* "forward"

This is the SKIP part from iCalendar RSCALE [RFC7529], converted to lowercase.

o firstDayOfWeek: "String" (optional, default: "mo")

Jenkins & Stepanek Expires April 19, 2021 [Page 24] Internet-Draft JSCalendar October 2020

The day on which the week is considered to start, represented as a lowercase abbreviated two-letter English day of the week. If included, it MUST be one of the following values:

* "mo"

* "tu"

* "we"

* "th"

* "fr"

* "sa"

* "su"

This is the WKST part from iCalendar.

o byDay: "NDay[]" (optional)

Days of the week on which to repeat. An "NDay" object has the following properties:

* @type: "String" (mandatory)

Specifies the type of this object. This MUST be "NDay".

* day: "String" (mandatory)

A day of the week on which to repeat; the allowed values are the same as for the "firstDayOfWeek" RecurrenceRule property.

This is the day-of-the-week of the BYDAY part in iCalendar, converted to lowercase.

* nthOfPeriod: "Int" (optional)

If present, rather than representing every occurrence of the weekday defined in the "day" property, it represents only a specific instance within the recurrence period. The value can be positive or negative, but MUST NOT be zero. A negative integer means nth-last of period.

This is the ordinal part of the BYDAY value in iCalendar (e.g., 1 or -3).

Jenkins & Stepanek Expires April 19, 2021 [Page 25] Internet-Draft JSCalendar October 2020

o byMonthDay: "Int[]" (optional)

Days of the on which to repeat. Valid values are between 1 and the maximum number of days any month may have in the calendar given by the "rscale" property, and the negative values of these numbers. For example, in the valid values are 1 to 31 and -31 to -1. Negative values offset from the end of the month. The array MUST have at least one entry if included.

This is the BYMONTHDAY part in iCalendar.

o byMonth: "String[]" (optional)

The months in which to repeat. Each entry is a string representation of a number, starting from "1" for the first month in the calendar (e.g., "1" means January with the Gregorian calendar), with an optional "L" suffix (see [RFC7529]) for leap months (this MUST be uppercase, e.g., "3L"). The array MUST have at least one entry if included.

This is the BYMONTH part from iCalendar.

o byYearDay: "Int[]" (optional)

The days of the year on which to repeat. Valid values are between 1 and the maximum number of days any year may have in the calendar given by the "rscale" property, and the negative values of these numbers. For example, in the Gregorian calendar valid values are 1 to 366 and -366 to -1. Negative values offset from the end of the year. The array MUST have at least one entry if included.

This is the BYYEARDAY part from iCalendar.

o byWeekNo: "Int[]" (optional)

Weeks of the year in which to repeat. Valid values are between 1 and the maximum number of weeks any year may have in the calendar given by the "rscale" property, and the negative values of these numbers. For example, in the Gregorian calendar valid values are 1 to 53 and -53 to -1. The array MUST have at least one entry if included.

This is the BYWEEKNO part from iCalendar.

o byHour: "UnsignedInt[]" (optional)

Jenkins & Stepanek Expires April 19, 2021 [Page 26] Internet-Draft JSCalendar October 2020

The hours of the day in which to repeat. Valid values are 0 to 23. The array MUST have at least one entry if included. This is the BYHOUR part from iCalendar.

o byMinute: "UnsignedInt[]" (optional)

The minutes of the hour in which to repeat. Valid values are 0 to 59. The array MUST have at least one entry if included.

This is the BYMINUTE part from iCalendar.

o bySecond: "UnsignedInt[]" (optional)

The seconds of the minute in which to repeat. Valid values are 0 to 60. The array MUST have at least one entry if included.

This is the BYSECOND part from iCalendar.

o bySetPosition: "Int[]" (optional)

The occurrences within the recurrence interval to include in the final results. Negative values offset from the end of the list of occurrences. The array MUST have at least one entry if included. This is the BYSETPOS part from iCalendar.

o count: "UnsignedInt" (optional)

The number of occurrences at which to range-bound the recurrence. This MUST NOT be included if an "until" property is specified.

This is the COUNT part from iCalendar.

o until: "LocalDateTime" (optional)

The date-time at which to finish recurring. The last occurrence is on or before this date-time. This MUST NOT be included if a "count" property is specified. Note: if not specified otherwise for a specific JSCalendar object, this date is to be interpreted in the time zone specified in the JSCalendar object’s "timeZone" property.

This is the UNTIL part from iCalendar.

4.3.2.1. Interpreting recurrence rules

A recurrence rule specifies a set of date-times for recurring calendar objects. A recurrence rule has the following semantics. Note, wherever "year", "month" or "day of month" is used, this is

Jenkins & Stepanek Expires April 19, 2021 [Page 27] Internet-Draft JSCalendar October 2020

within the calendar system given by the "rscale" property, which defaults to "gregorian" if omitted.

1. A set of candidates is generated. This is every second within a period defined by the frequency property value:

* "yearly": every second from midnight on the 1st day of a year (inclusive) to midnight the 1st day of the following year (exclusive).

If skip is not "omit", the calendar system has leap months and there is a byMonth property, generate candidates for the leap months even if they don’t occur in this year.

If skip is not "omit" and there is a byMonthDay property, presume each month has the maximum number of days any month may have in this calendar system when generating candidates, even if it’s more than this month actually has.

* "monthly": every second from midnight on the 1st day of a month (inclusive) to midnight on the 1st of the following month (exclusive).

If skip is not "omit" and there is a byMonthDay property, presume the month has the maximum number of days any month may have in this calendar system when generating candidates, even if it’s more than this month actually has.

* "weekly": every second from midnight (inclusive) on the first day of the week (as defined by the firstDayOfWeek property, or Monday if omitted), to midnight 7 days later (exclusive).

* "daily": every second from midnight at the start of the day (inclusive) to midnight at the end of the day (exclusive).

* "hourly": every second from the beginning of the hour (inclusive) to the beginning of the next hour (exclusive).

* "minutely": every second from the beginning of the minute (inclusive) to the beginning of the next minute (exclusive).

* "secondly": the second itself, only.

2. Each date-time candidate is compared against all of the byX properties of the rule except bySetPosition. If any property in the rule does not match the date-time, the date-time is eliminated. Each byX property is an array; the date-time matches

Jenkins & Stepanek Expires April 19, 2021 [Page 28] Internet-Draft JSCalendar October 2020

the property if it matches any of the values in the array. The properties have the following semantics:

* byMonth: the date-time is in the given month.

* byWeekNo: the date-time is in the nth week of the year. Negative numbers mean the nth last week of the year. This corresponds to weeks according to week numbering as defined in ISO.8601.2004, with a week defined as a seven day period, starting on the firstDayOfWeek property value or Monday if omitted. Week number one of the calendar year is the first week that contains at least four days in that calendar year.

If the date-time is not valid (this may happen when generating candidates with a skip property in effect), it is always eliminated by this property.

* byYearDay: the date-time is on the nth day of year. Negative numbers mean the nth last day of the year.

If the date-time is not valid (this may happen when generating candidates with a skip property in effect), it is always eliminated by this property.

* byMonthDay: the date-time is on the given day of the month. Negative numbers mean the nth last day of the month.

* byDay: the date-time is on the given day of the week. If the day is prefixed by a number, it is the nth occurrence of that day of the week within the month (if frequency is monthly) or year (if frequency is yearly). Negative numbers means nth last occurrence within that period.

* byHour: the date-time has the given hour value.

* byMinute: the date-time has the given minute value.

* bySecond: the date-time has the given second value.

If a skip property is defined and is not "omit", there may be candidates that do not correspond to valid dates (e.g., 31st February in the Gregorian calendar). In this case, the properties MUST be considered in the order above and:

1. After applying the byMonth filter, if the candidate’s month is invalid for the given year, increment it (if skip is "forward") or decrement it (if skip is "backward") until a valid month is found, incrementing/decrementing the year as

Jenkins & Stepanek Expires April 19, 2021 [Page 29] Internet-Draft JSCalendar October 2020

well if passing through the beginning/end of the year. This only applies to calendar systems with leap months.

2. After applying the byMonthDay filter, if the day of the month is invalid for the given month and year, change the date to the first day of the next month (if skip is "forward") or the last day of the current month (if skip is "backward").

3. If any valid date produced after applying the skip is already a candidate, eliminate the duplicate. (For example after adjusting, 30th February and 31st February would both become the same "real" date, so one is eliminated as a duplicate.)

3. If a bySetPosition property is included, this is now applied to the ordered list of remaining dates. This property specifies the indexes of date-times to keep; all others should be eliminated. Negative numbers are indexes from the end of the list, with -1 being the last item.

4. Any date-times before the start date of the event are eliminated (see below for why this might be needed).

5. If a skip property is included and is not "omit", eliminate any date-times that have already been produced by previous iterations of the algorithm. (This is not possible if skip is "omit".)

6. If further dates are required (we have not reached the until date, or count limit) skip the next (interval - 1) sets of candidates, then continue from step 1.

When determining the set of occurrence dates for an event or task, the following extra rules must be applied:

1. The initial date-time to which the rule is applied (the "start" date-time for events; the "start" or "due" date-time for tasks) is always the first occurrence in the expansion (and is counted if the recurrence is limited by a "count" property), even if it would normally not match the rule.

2. The first set of candidates to consider is that which would contain the initial date-time. This means the first set may include candidates before the initial date-time; such candidates are eliminated from the results in step (4) as outlined before.

3. The following properties MUST be implicitly added to the rule under the given conditions:

Jenkins & Stepanek Expires April 19, 2021 [Page 30] Internet-Draft JSCalendar October 2020

* If frequency is not "secondly" and no bySecond property: Add a bySecond property with the sole value being the seconds value of the initial date-time.

* If frequency is not "secondly" or "minutely", and no byMinute property: Add a byMinute property with the sole value being the minutes value of the initial date-time.

* If frequency is not "secondly", "minutely" or "hourly" and no byHour property: Add a byHour property with the sole value being the hours value of the initial date-time.

* If frequency is "weekly" and no byDay property: Add a byDay property with the sole value being the day-of-the-week of the initial date-time.

* If frequency is "monthly" and no byDay property and no byMonthDay property: Add a byMonthDay property with the sole value being the day-of-the-month of the initial date-time.

* If frequency is "yearly" and no byYearDay property:

+ If there are no byMonth or byWeekNo properties, and either there is a byMonthDay property or there is no byDay property: Add a byMonth property with the sole value being the month of the initial date-time.

+ If there is no byMonthDay, byWeekNo or byDay properties: Add a byMonthDay property with the sole value being the day-of-the-month of the initial date-time.

+ If there is a byWeekNo property and no byMonthDay or byDay properties: Add a byDay property with the sole value being the day-of-the-week of the initial date-time.

4.3.3. excludedRecurrenceRules

Type: "RecurrenceRule[]" (optional).

Defines a set of recurrence rules (repeating patterns) for date-times on which the object will not occur. The rules are interpreted the same as for the "recurrenceRules" property (see Section 4.3.2), with the exception that the initial date-time to which the rule is applied (the "start" date-time for events; the "start" or "due" date-time for tasks) is only considered part of the expansion if it matches the rule. The resulting set of date-times are then removed from those generated by the recurrenceRules property, as described in Section 4.3.

Jenkins & Stepanek Expires April 19, 2021 [Page 31] Internet-Draft JSCalendar October 2020

4.3.4. recurrenceOverrides

Type: "LocalDateTime[PatchObject]" (optional).

A map of the recurrence ids (the date-time produced by the recurrence rule) to an object of patches to apply to the generated occurrence object.

If the recurrence id does not match a date-time from the recurrence rule (or no rule is specified), it is to be treated as an additional occurrence (like an RDATE from iCalendar). The patch object may often be empty in this case.

If the patch object defines the "excluded" property of an occurrence to be true, this occurrence is omitted from the final set of recurrences for the calendar object (like an EXDATE from iCalendar). Such a patch object MUST NOT patch any other property.

By default, an occurrence inherits all properties from the main object except the start (or due) date-time, which is shifted to match the recurrence id LocalDateTime. However, individual properties of the occurrence can be modified by a patch, or multiple patches. It is valid to patch the "start" property value, and this patch takes precedence over the value generated from the recurrence id. Both the recurrence id as well as the patched "start" date-time may occur before the original JSCalendar object’s "start" or "due" date.

A pointer in the PatchObject MUST be ignored if it starts with one of the following prefixes:

o @type

o excludedRecurrenceRules

o method

o privacy

o prodId

o recurrenceId

o recurrenceOverrides

o recurrenceRules

o relatedTo

Jenkins & Stepanek Expires April 19, 2021 [Page 32] Internet-Draft JSCalendar October 2020

o replyTo

o uid

4.3.5. excluded

Type: "Boolean" (optional, default: false).

Defines if this object is an overridden, excluded instance of a recurring JSCalendar object (see Section 4.3.4). If this property value is true, this calendar object instance MUST be removed from the occurrence expansion. The absence of this property, or the presence of its default value false, indicates that this instance MUST be included in the occurrence expansion.

4.4. Sharing and Scheduling Properties

4.4.1. priority

Type: "Int" (optional, default: 0).

Specifies a priority for the calendar object. This may be used as part of scheduling systems to help resolve conflicts for a time period.

The priority is specified as an integer in the range 0 to 9. A value of 0 specifies an undefined priority, for which the treatment will vary by situation. A value of 1 is the highest priority. A value of 2 is the second highest priority. Subsequent numbers specify a decreasing ordinal priority. A value of 9 is the lowest priority. Other integer values are reserved for future use.

4.4.2. freeBusyStatus

Type: "String" (optional, default: "busy").

Specifies how this calendar object should be treated when calculating free-busy state. This MUST be one of the following values, another value registered in the IANA JSCalendar Enum Values registry, or a vendor-specific value (see Section 3.3):

o "free": The object should be ignored when calculating whether the user is busy.

o "busy": The object should be included when calculating whether the user is busy.

Jenkins & Stepanek Expires April 19, 2021 [Page 33] Internet-Draft JSCalendar October 2020

4.4.3. privacy

Type: "String" (optional, default: "public").

Calendar objects are normally collected together and may be shared with other users. The privacy property allows the object owner to indicate that it should not be shared, or should only have the time information shared but the details withheld. Enforcement of the restrictions indicated by this property are up to the API via which this object is accessed.

This property MUST NOT affect the information sent to scheduled participants; it is only interpreted by protocols that share the calendar objects belonging to one user with other users.

The value MUST be one of the following values, another value registered in the IANA JSCalendar Enum Values registry, or a vendor- specific value (see Section 3.3). Any value the client or server doesn’t understand should be preserved but treated as equivalent to "private".

o "public": The full details of the object are visible to those whom the object’s calendar is shared with.

o "private": The details of the object are hidden; only the basic time and metadata is shared. The following properties MAY be shared, any other properties MUST NOT be shared:

* @type

* created

* due

* duration

* estimatedDuration

* freeBusyStatus

* privacy

* recurrenceOverrides. Only patches which apply to another permissible property are allowed to be shared.

* sequence

* showWithoutTime

Jenkins & Stepanek Expires April 19, 2021 [Page 34] Internet-Draft JSCalendar October 2020

* start

* timeZone

* timeZones

* uid

* updated

o "secret": The object is hidden completely (as though it did not exist) when the calendar this object is in is shared.

4.4.4. replyTo

Type: "String[String]" (optional).

Represents methods by which participants may submit their response to the organizer of the calendar object. The keys in the property value are the available methods and MUST only contain ASCII alphanumeric characters (A-Za-z0-9). The value is a URI for the method specified in the key. Future methods may be defined in future specifications and registered with IANA; a calendar client MUST ignore any method it does not understand, but MUST preserve the method key and URI. This property MUST be omitted if no method is defined (rather than being specified as an empty object).

The following methods are defined:

o "imip": The organizer accepts an iMIP [RFC6047] response at this email address. The value MUST be a "mailto:" URI.

o "web": Opening this URI in a web browser will provide the user with a page where they can submit a reply to the organizer. The value MUST be a URL using the "https:" scheme.

o "other": The organizer is identified by this URI but the method for submitting the response is undefined.

4.4.5. participants

Type: "Id[Participant]" (optional).

A map of participant ids to participants, describing their participation in the calendar object.

Jenkins & Stepanek Expires April 19, 2021 [Page 35] Internet-Draft JSCalendar October 2020

If this property is set and any participant has a sendTo property, then the "replyTo" property of this calendar object MUST define at least one reply method.

A Participant object has the following properties:

o @type: "String" (mandatory)

Specifies the type of this object. This MUST be "Participant".

o name: "String" (optional)

The display name of the participant (e.g., "Joe Bloggs").

o email: "String" (optional)

The email address for the participant.

o description: "String" (optional).

A plain text description of this participant. For example, this may include more information about their role in the event or how best to contact them.

o sendTo: "String[String]" (optional)

Represents methods by which the participant may receive the invitation and updates to the calendar object.

The keys in the property value are the available methods and MUST only contain ASCII alphanumeric characters (A-Za-z0-9). The value is a URI for the method specified in the key. Future methods may be defined in future specifications and registered with IANA; a calendar client MUST ignore any method it does not understand, but MUST preserve the method key and URI. This property MUST be omitted if no method is defined (rather than being specified as an empty object).

The following methods are defined:

* "imip": The participant accepts an iMIP [RFC6047] request at this email address. The value MUST be a "mailto:" URI. It MAY be different from the value of the participant’s "email" property.

* "other": The participant is identified by this URI but the method for submitting the invitation is undefined.

Jenkins & Stepanek Expires April 19, 2021 [Page 36] Internet-Draft JSCalendar October 2020

o kind: "String" (optional)

What kind of entity this participant is, if known.

This MUST be one of the following values, another value registered in the IANA JSCalendar Enum Values registry, or a vendor-specific value (see Section 3.3). Any value the client or server doesn’t understand should be treated the same as if this property is omitted.

* "individual": a single person

* "group": a collection of people invited as a whole

* "location": a physical location that needs to be scheduled, e.g., a conference room

* "resource": a non-human resource other than a location, such as a projector

o roles: "String[Boolean]" (mandatory)

A set of roles that this participant fulfills.

At least one role MUST be specified for the participant. The keys in the set MUST be one of the following values, another value registered in the IANA JSCalendar Enum Values registry, or a vendor-specific value (see Section 3.3):

* "owner": The participant is an owner of the object. This signifies they have permission to make changes to it that affect the other participants. Non-owner participants may only change properties that just affect themselves (for example setting their own alerts or changing their rsvp status).

* "attendee": The participant is expected to be present at the event.

* "optional": The participant’s involvement with the event is optional. This is expected to be primarily combined with the "attendee" role.

* "informational": The participant is copied for informational reasons, and is not expected to attend.

* "chair": The participant is in charge of the event/task when it occurs.

Jenkins & Stepanek Expires April 19, 2021 [Page 37] Internet-Draft JSCalendar October 2020

* "contact": The participant is someone that may be contacted for information about the event.

The value for each key in the map MUST be true. It is expected that no more than one of the roles "attendee" and "informational" be present; if more than one are given, "attendee" takes precedence over "informational". Roles that are unknown to the implementation MUST be preserved.

o locationId: "String" (optional)

The location at which this participant is expected to be attending.

If the value does not correspond to any location id in the "locations" property of the JSCalendar object, this MUST be treated the same as if the participant’s locationId were omitted.

o language: "String" (optional)

The language tag as defined in [RFC5646] that best describes the participant’s preferred language, if known.

o participationStatus: "String" (optional, default: "needs-action")

The participation status, if any, of this participant.

The value MUST be one of the following values, another value registered in the IANA JSCalendar Enum Values registry, or a vendor-specific value (see Section 3.3):

* "needs-action": No status yet set by the participant.

* "accepted": The invited participant will participate.

* "declined": The invited participant will not participate.

* "tentative": The invited participant may participate.

* "delegated": The invited participant has delegated their attendance to another participant, as specified in the delegatedTo property.

o participationComment: "String" (optional)

A note from the participant to explain their participation status.

o expectReply: "Boolean" (optional, default: false)

Jenkins & Stepanek Expires April 19, 2021 [Page 38] Internet-Draft JSCalendar October 2020

If true, the organizer is expecting the participant to notify them of their participation status.

o scheduleAgent: "String" (optional, default: "server")

Who is responsible for sending scheduling messages with this calendar object to the participant.

The value MUST be one of the following values, another value registered in the IANA JSCalendar Enum Values registry, or a vendor-specific value (see Section 3.3):

* "server": The calendar server will send the scheduling messages.

* "client": The calendar client will send the scheduling messages.

* "none": No scheduling messages are to be sent to this participant.

o scheduleForceSend: "Boolean" (optional, default: false)

A client may set the property on a participant to true to request that the server send a scheduling message to the participant when it would not normally do so (e.g. if no significant change is made the object or the scheduleAgent is set to client). The property MUST NOT be stored in the JSCalendar object on the server or appear in a scheduling message.

o scheduleSequence: "UnsignedInt" (optional, default: 0)

The sequence number of the last response from the participant. If defined, this MUST be a non-negative integer.

This can be used to determine whether the participant has sent a new response following significant changes to the calendar object, and to determine if future responses are responding to a current or older view of the data.

o scheduleStatus: "String[]" (optional)

A list of status codes, as defined in Section 3.8.8.3 of [RFC5545], returned from the processing of the most recent scheduling message sent to this participant.

Servers MUST only add or change this property when they send a scheduling message to the participant. Clients SHOULD NOT change

Jenkins & Stepanek Expires April 19, 2021 [Page 39] Internet-Draft JSCalendar October 2020

or remove this property if it was provided by the server. Clients MAY add, change, or remove the property for participants where the client is handling the scheduling.

This property MUST NOT be included in scheduling messages.

o scheduleUpdated: "UTCDateTime" (optional)

The timestamp for the most recent response from this participant.

This is the "updated" property of the last response when using iTIP. It can be compared to the "updated" property in future responses to detect and discard older responses delivered out of order.

o invitedBy: "String" (optional)

The participant id of the participant who invited this one, if known.

o delegatedTo: "String[Boolean]" (optional)

A set of participant ids that this participant has delegated their participation to. Each key in the set MUST be the id of a participant. The value for each key in the map MUST be true. If there are no delegates, this MUST be omitted (rather than specified as an empty set).

o delegatedFrom: "String[Boolean]" (optional)

A set of participant ids that this participant is acting as a delegate for. Each key in the set MUST be the id of a participant. The value for each key in the map MUST be true. If there are no delegators, this MUST be omitted (rather than specified as an empty set).

o memberOf: "String[Boolean]" (optional)

A set of group participants that were invited to this calendar object, which caused this participant to be invited due to their membership in the group(s). Each key in the set MUST be the id of a participant. The value for each key in the map MUST be true. If there are no groups, this MUST be omitted (rather than specified as an empty set).

o links: "Id[Link]" (optional)

Jenkins & Stepanek Expires April 19, 2021 [Page 40] Internet-Draft JSCalendar October 2020

A map of link ids to Link objects, representing external resources associated with this participant, for example a vCard or image. If there are no links, this MUST be omitted (rather than specified as an empty set).

o progress: "String" (optional; only allowed for participants of a JSTask). Represents the progress of the participant for this task. It MUST NOT be set if the "participationStatus" of this participant is any value other than "accepted". See Section 5.2.5 for allowed values and semantics.

o progressUpdated: "UTCDateTime" (optional; only allowed for participants of a JSTask). Specifies the date-time the progress property was last set on this participant. See Section 5.2.6 for allowed values and semantics.

o percentComplete: "UnsignedInt" (optional; only allowed for participants of a JSTask). Represents the percent completion of the participant for this task. The property value MUST be a positive integer between 0 and 100.

4.5. Alerts Properties

4.5.1. useDefaultAlerts

Type: "Boolean" (optional, default: false).

If true, use the user’s default alerts and ignore the value of the "alerts" property. Fetching user defaults is dependent on the API from which this JSCalendar object is being fetched, and is not defined in this specification. If an implementation cannot determine the user’s default alerts, or none are set, it MUST process the alerts property as if "useDefaultAlerts" is set to false.

4.5.2. alerts

Type: "Id[Alert]" (optional).

A map of alert ids to Alert objects, representing alerts/reminders to display or send to the user for this calendar object.

An Alert Object has the following properties:

o @type: "String" (mandatory)

Specifies the type of this object. This MUST be "Alert".

Jenkins & Stepanek Expires April 19, 2021 [Page 41] Internet-Draft JSCalendar October 2020

o trigger: "OffsetTrigger|AbsoluteTrigger|UnknownTrigger" (mandatory)

Defines when to trigger the alert. New types may be defined in future documents.

An "OffsetTrigger" object has the following properties:

* @type: "String" (mandatory)

Specifies the type of this object. This MUST be "OffsetTrigger".

* offset: "SignedDuration" (mandatory).

Defines the offset at which to trigger the alert relative to the time property defined in the "relativeTo" property of the alert. Negative durations signify alerts before the time property, positive durations signify alerts after.

* relativeTo: "String" (optional, default: "start")

Specifies the time property that the alert offset is relative to. The value MUST be one of:

+ "start": triggers the alert relative to the start of the calendar object

+ "end": triggers the alert relative to the end/due time of the calendar object

An "AbsoluteTrigger" object has the following properties:

* @type: "String" (mandatory)

Specifies the type of this object. This MUST be "AbsoluteTrigger".

* when: "UTCDateTime" (mandatory).

Defines a specific UTC date-time when the alert is triggered.

An "UnknownTrigger" object is an object that contains a "@type" property whose value is not recognized (i.e., not "OffsetTrigger" or "AbsoluteTrigger"), plus zero or more other properties. This is for compatibility with client extensions and future specifications. Implementations SHOULD NOT trigger for trigger types they do not understand, but MUST preserve them.

Jenkins & Stepanek Expires April 19, 2021 [Page 42] Internet-Draft JSCalendar October 2020

o acknowledged: "UTCDateTime" (optional)

This records when an alert was last acknowledged. This is set when the user has dismissed the alert; other clients that sync this property SHOULD automatically dismiss or suppress duplicate alerts (alerts with the same alert id that triggered on or before this date-time).

For a recurring calendar object, setting the "acknowledged" property MUST NOT add a new override to the "recurrenceOverrides" property. If the alert is not already overridden, the acknowledged property MUST be set on the alert in the master event/task.

Certain kinds of alert action may not provide feedback as to when the user sees them, for example email based alerts. For those kinds of alerts, this property MUST be set immediately when the alert is triggered and the action successfully carried out.

o relatedTo: "String[Relation]" (optional)

Relates this alert to other alerts in the same JSCalendar object. If the user wishes to snooze an alert, the application MUST create an alert to trigger after snoozing. This new snooze alert MUST set a parent relation to the identifier of the original alert.

o action: "String" (optional, default: "display")

Describes how to alert the user.

The value MUST be at most one of the following values, a value registered in the IANA JSCalendar Enum Values registry, or a vendor-specific value (see Section 3.3):

* "display": The alert should be displayed as appropriate for the current device and user context.

* "email": The alert should trigger an email sent out to the user, notifying about the alert. This action is typically only appropriate for server implementations.

4.6. Multilingual Properties

4.6.1. localizations

Type: "String[PatchObject]" (optional).

Jenkins & Stepanek Expires April 19, 2021 [Page 43] Internet-Draft JSCalendar October 2020

A map of language tags [RFC5646] to patch objects, which localize the calendar object into the locale of the respective language tag.

See the description of PatchObject (Section 1.4.9) for the structure of the PatchObject. The patches are applied to the top-level calendar object. In addition, the "locale" property of the patched object is set to the language tag. All pointers for patches MUST end with one of the following suffixes; any patch that does not follow this MUST be ignored unless otherwise specified in a future RFC:

o title

o description

o name

A patch MUST NOT have the prefix "recurrenceOverrides"; any localization of the override MUST be a patch to the localizations property inside the override instead. For example, a patch to "locations/abcd1234/title" is permissible, but a patch to "uid" or "recurrenceOverrides/2020-01-05T14:00:00/title" is not.

Note that this specification does not define how to maintain validity of localized content. For example, a client application changing a JSCalendar object’s title property might also need to update any localizations of this property. Client implementations SHOULD provide the means to manage localizations, but how to achieve this is specific to the application’s workflow and requirements.

4.7. Time Zone Properties

4.7.1. timeZone

Type: "TimeZoneId|null" (optional, default: null).

Identifies the time zone the object is scheduled in, or null for floating time. This is either a name from the IANA Time Zone Database [TZDB] or the TimeZoneId of a custom time zone from the "timeZones" property (Section 4.7.2). If omitted, this MUST be presumed to be null (i.e., floating time).

4.7.2. timeZones

Type: "TimeZoneId[TimeZone]" (optional).

Maps identifiers of custom time zones to their time zone definitions. The following restrictions apply for each key in the map:

Jenkins & Stepanek Expires April 19, 2021 [Page 44] Internet-Draft JSCalendar October 2020

o To avoid conflict with names in the IANA Time Zone Database [TZDB], it MUST start with the "/" character.

o It MUST be a valid "paramtext" value as specified in Section 3.1. of [RFC5545].

o At least one other property in the same JSCalendar object MUST reference a time zone using this identifier (i.e., orphaned time zones are not allowed).

An identifier need only be unique to this JSCalendar object. A JSCalendar object may be part in a hierarchy of other JSCalendar objects (say, a JSEvent is an entry in a JSGroup). In this case, the set of time zones is the sum of the time zone definitions of this object and its parent objects. If multiple time zones with the same identifier exist, then the definition closest to the calendar object in relation to its parents MUST be used. (In context of JSEvent, a time zone definition in its timeZones property has precedence over a definition of the same id in the JSGroup). Time zone definitions in any children of the calendar object MUST be ignored.

A TimeZone object maps a VTIMEZONE component from iCalendar [RFC5545] and the semantics are as defined there. A valid time zone MUST define at least one transition rule in the "standard" or "daylight" property. Its properties are:

o @type: "String" (mandatory)

Specifies the type of this object. This MUST be "TimeZone".

o tzId: "String" (mandatory).

The TZID property from iCalendar.

o updated: "UTCDateTime" (optional)

The LAST-MODIFIED property from iCalendar.

o url: "String" (optional)

The TZURL property from iCalendar.

o validUntil: "UTCDateTime" (optional)

The TZUNTIL property from iCalendar specified in [RFC7808].

o aliases: "String[Boolean]" (optional)

Jenkins & Stepanek Expires April 19, 2021 [Page 45] Internet-Draft JSCalendar October 2020

Maps the TZID-ALIAS-OF properties from iCalendar specified in [RFC7808] to a JSON set of aliases. The set is represented as an object, with the keys being the aliases. The value for each key in the map MUST be true.

o standard: "TimeZoneRule[]" (optional)

The STANDARD sub-components from iCalendar. The order MUST be preserved during conversion.

o daylight: "TimeZoneRule[]" (optional).

The DAYLIGHT sub-components from iCalendar. The order MUST be preserved during conversion.

A TimeZoneRule object maps a STANDARD or DAYLIGHT sub-component from iCalendar, with the restriction that at most one recurrence rule is allowed per rule. It has the following properties:

o @type: "String" (mandatory)

Specifies the type of this object. This MUST be "TimeZoneRule".

o start: "LocalDateTime" (mandatory)

The DTSTART property from iCalendar.

o offsetFrom: "String" (mandatory)

The TZOFFSETFROM property from iCalendar.

o offsetTo: "String" (mandatory)

The TZOFFSETTO property from iCalendar.

o recurrenceRules: "RecurrenceRule[]" (optional)

The RRULE property mapped as specified in Section 4.3.2. During recurrence rule evaluation, the "until" property value MUST be interpreted as a local time in the UTC time zone.

o recurrenceOverrides: "LocalDateTime[PatchObject]" (optional)

Maps the RDATE properties from iCalendar. The set is represented as an object, with the keys being the recurrence dates. The patch object MUST be the empty JSON object ({}).

o names: "String[Boolean]" (optional)

Jenkins & Stepanek Expires April 19, 2021 [Page 46] Internet-Draft JSCalendar October 2020

Maps the TZNAME properties from iCalendar to a JSON set. The set is represented as an object, with the keys being the names, excluding any "tznparam" component from iCalendar. The value for each key in the map MUST be true.

o comments: "String[]" (optional). Maps the COMMENT properties from iCalendar. The order MUST be preserved during conversion.

5. Type-specific JSCalendar Properties

5.1. JSEvent Properties

In addition to the common JSCalendar object properties (Section 4) a JSEvent has the following properties:

5.1.1. start

Type: "LocalDateTime" (mandatory).

The date/time the event starts in the event’s time zone (as specified in the "timeZone" property, see Section 4.7.1).

5.1.2. duration

Type: "Duration" (optional, default: "PT0S").

The zero or positive duration of the event in the event’s start time zone. The end time of an event can be found by adding the duration to the event’s start time.

A JSEvent MAY involve start and end locations that are in different time zones (e.g., a trans-continental flight). This can be expressed using the "relativeTo" and "timeZone" properties of the JSEvent’s Location objects (see Section 4.2.5).

5.1.3. status

Type: "String" (optional, default: "confirmed").

The scheduling status (Section 4.4) of a JSEvent. If set, it MUST be one of the following values, another value registered in the IANA JSCalendar Enum Values registry, or a vendor-specific value (see Section 3.3):

o "confirmed": Indicates the event is definitely happening.

o "cancelled": Indicates the event has been cancelled.

Jenkins & Stepanek Expires April 19, 2021 [Page 47] Internet-Draft JSCalendar October 2020

o "tentative": Indicates the event may happen.

5.2. JSTask Properties

In addition to the common JSCalendar object properties (Section 4) a JSTask has the following properties:

5.2.1. due

Type: "LocalDateTime" (optional).

The date/time the task is due in the task’s time zone.

5.2.2. start

Type: "LocalDateTime" (optional).

The date/time the task should start in the task’s time zone.

5.2.3. estimatedDuration

Type: "Duration" (optional).

Specifies the estimated positive duration of time the task takes to complete.

5.2.4. percentComplete

Type: "UnsignedInt" (optional).

Represents the percent completion of the task overall. The property value MUST be a positive integer between 0 and 100.

5.2.5. progress

Type: "String" (optional).

Defines the progress of this task. If omitted, the default progress (Section 4.4) of a JSTask is defined as follows (in order of evaluation):

o "completed": if the "progress" property value of all participants is "completed".

o "failed": if at least one "progress" property value of a participant is "failed".

Jenkins & Stepanek Expires April 19, 2021 [Page 48] Internet-Draft JSCalendar October 2020

o "in-process": if at least one "progress" property value of a participant is "in-process".

o "needs-action": If none of the other criteria match.

If set, it MUST be one of the following values, another value registered in the IANA JSCalendar Enum Values registry, or a vendor- specific value (see Section 3.3):

o "needs-action": Indicates the task needs action.

o "in-process": Indicates the task is in process.

o "completed": Indicates the task is completed.

o "failed": Indicates the task failed.

o "cancelled": Indicates the task was cancelled.

5.2.6. progressUpdated

Type: "UTCDateTime" (optional).

Specifies the date/time the "progress" property of either the task overall (Section 5.2.5) or a specific participant (Section 4.4.5) was last updated.

If the task is recurring and has future instances, a client may want to keep track of the last progress update timestamp of a specific task recurrence, but leave other instances unchanged. One way to achieve this is by overriding the progressUpdated property in the task "recurrenceOverrides" property. However, this could produce a long list of timestamps for regularly recurring tasks. An alternative approach is to split the JSTask into a current, single instance of JSTask with this instance progress update time and a future recurring instance. See also Section 4.1.3 on splitting.

5.3. JSGroup Properties

JSGroup supports the following common JSCalendar properties (Section 4):

o @type

o uid

o prodId

Jenkins & Stepanek Expires April 19, 2021 [Page 49] Internet-Draft JSCalendar October 2020

o created

o updated

o title

o description

o descriptionContentType

o links

o locale

o keywords

o categories

o color

o timeZones

In addition, the following JSGroup-specific properties are supported:

5.3.1. entries

Type: "(JSTask|JSEvent)[]" (mandatory).

A collection of group members. Implementations MUST ignore entries of unknown type.

5.3.2. source

Type: "String" (optional).

The source from which updated versions of this group may be retrieved from. The value MUST be a URI.

6. Examples

The following examples illustrate several aspects of the JSCalendar data model and format. The examples may omit mandatory or additional properties, which is indicated by a placeholder property with key "...". While most of the examples use calendar event objects, they are also illustrative for tasks.

Jenkins & Stepanek Expires April 19, 2021 [Page 50] Internet-Draft JSCalendar October 2020

6.1. Simple event

This example illustrates a simple one-time event. It specifies a one-time event that begins on January 15, 2020 at 1pm New York local time and ends after 1 hour.

{ "@type": "jsevent", "uid": "a8df6573-0474-496d-8496-033ad45d7fea", "updated": "2020-01-02T18:23:04Z", "title": "Some event", "start": "2020-01-15T13:00:00", "timeZone": "America/New_York", "duration": "PT1H" }

6.2. Simple task

This example illustrates a simple task for a plain to-do item.

{ "@type": "jstask", "uid": "2a358cee-6489-4f14-a57f-c104db4dc2f2", "updated": "2020-01-09T14:32:01Z", "title": "Do something" }

6.3. Simple group

This example illustrates a simple calendar object group that contains an event and a task.

Jenkins & Stepanek Expires April 19, 2021 [Page 51] Internet-Draft JSCalendar October 2020

{ "@type": "jsgroup", "uid": "bf0ac22b-4989-4caf-9ebd-54301b4ee51a", "updated": "2020-01-15T18:00:00Z", "name": "A simple group", "entries": [{ "@type": "jsevent", "uid": "a8df6573-0474-496d-8496-033ad45d7fea", "updated": "2020-01-02T18:23:04Z", "title": "Some event", "start": "2020-01-15T13:00:00", "timeZone": "America/New_York", "duration": "PT1H" }, { "@type": "jstask", "uid": "2a358cee-6489-4f14-a57f-c104db4dc2f2", "updated": "2020-01-09T14:32:01Z", "title": "Do something" }] }

6.4. All-day event

This example illustrates an event for an international holiday. It specifies an all-day event on April 1 that occurs every year since the year 1900.

{ "...": "", "title": "April Fool’s Day", "showWithoutTime": true, "start": "1900-04-01T00:00:00", "duration": "P1D", "recurrenceRules": [{ "@type": "RecurrenceRule", "frequency": "yearly" }] }

6.5. Task with a due date

This example illustrates a task with a due date. It is a reminder to buy groceries before 6pm Vienna local time on January 19, 2020. The calendar user expects to need 1 hour for shopping.

Jenkins & Stepanek Expires April 19, 2021 [Page 52] Internet-Draft JSCalendar October 2020

{ "...": "", "title": "Buy groceries", "due": "2020-01-19T18:00:00", "timeZone": "Europe/Vienna", "estimatedDuration": "PT1H" }

6.6. Event with end time zone

This example illustrates the use of end time zones by use of an international flight. The flight starts on April 1, 2020 at 9am in Berlin local time. The duration of the flight is scheduled at 10 hours 30 minutes. The time at the flight’s destination is in the same time zone as Tokyo. Calendar clients could use the end time zone to display the arrival time in Tokyo local time and highlight the time zone difference of the flight. The location names can serve as input for navigation systems.

{ "...": "", "title": "Flight XY51 to Tokyo", "start": "2020-04-01T09:00:00", "timeZone": "Europe/Berlin", "duration": "PT10H30M", "locations": { "418d0b9b-b656-4b3c-909f-5b149ca779c9": { "@type": "Location", "rel": "start", "name": "Frankfurt Airport (FRA)" }, "c2c7ac67-dc13-411e-a7d4-0780fb61fb08": { "@type": "Location", "rel": "end", "name": "Narita International Airport (NRT)", "timeZone": "Asia/Tokyo" } } }

6.7. Floating-time event (with recurrence)

This example illustrates the use of floating time. Since January 1, 2020, a calendar user blocks 30 minutes every day to practice Yoga at 7am local time, in whatever time zone the user is located on that date.

Jenkins & Stepanek Expires April 19, 2021 [Page 53] Internet-Draft JSCalendar October 2020

{ "...": "", "title": "Yoga", "start": "2020-01-01T07:00:00", "duration": "PT30M", "recurrenceRules": [{ "@type": "RecurrenceRule", "frequency": "daily" }] }

6.8. Event with multiple locations and localization

This example illustrates an event that happens at both a physical and a virtual location. Fans can see a live concert on premises or online. The event title and descriptions are localized.

{ "...": "", "title": "Live from Music Bowl: The Band", "description": "Go see the biggest music event ever!", "locale": "en", "start": "2020-07-04T17:00:00", "timeZone": "America/New_York", "duration": "PT3H", "locations": { "c0503d30-8c50-4372-87b5-7657e8e0fedd": { "@type": "Location", "name": "The Music Bowl", "description": "Music Bowl, Central Park, New York", "coordinates": "geo:40.7829,-73.9654" } }, "virtualLocations": { "1": { "@type": "VirtualLocation", "name": "Free live Stream from Music Bowl", "uri": "https://stream.example.com/the_band_2020" } }, "localizations": { "de": { "title": "Live von der Music Bowl: The Band!", "description": "Schau dir das groesste Musikereignis an!", "virtualLocations/1/name": "Gratis Live-Stream aus der Music Bowl" } } }

Jenkins & Stepanek Expires April 19, 2021 [Page 54] Internet-Draft JSCalendar October 2020

6.9. Recurring event with overrides

This example illustrates the use of recurrence overrides. A math course at a University is held for the first time on January 8, 2020 at 9am London time and occurs every week until June 24, 2020. Each lecture lasts for one hour and 30 minutes and is located at the Mathematics department. This event has exceptional occurrences: at the last occurrence of the course is an exam, which lasts for 2 hours and starts at 10am. Also, the location of the exam differs from the usual location. On April 1 no course is held. On January 7 at 2pm is an optional introduction course, that occurs before the first regular lecture.

Jenkins & Stepanek Expires April 19, 2021 [Page 55] Internet-Draft JSCalendar October 2020

{ "...": "", "title": "Calculus I", "start": "2020-01-08T09:00:00", "timeZone": "Europe/London", "duration": "PT1H30M", "locations": { "0dfb8ace-aad1-4734-b3b4-a2fe3d6ae1c5": { "@type": "Location", "title": "Math lab room 1", "description": "Math Lab I, Department of Mathematics" } }, "recurrenceRules": [{ "@type": "RecurrenceRule", "frequency": "weekly", "until": "2020-06-24T09:00:00" }], "recurrenceOverrides": { "2020-01-07T14:00:00": { "title": "Introduction to Calculus I (optional)" }, "2020-04-01T09:00:00": { "excluded": true }, "2020-06-25T09:00:00": { "title": "Calculus I Exam", "start": "2020-06-25T10:00:00", "duration": "PT2H", "locations": { "84d639ca-37ac-4a86-81e5-9bbba8eb4053": { "@type": "Location", "title": "Big Auditorium", "description": "Big Auditorium, Other Road" } } } } }

6.10. Recurring event with participants

This example illustrates scheduled events. A team meeting occurs every week since January 8, 2020 at 9am Johannesburg time. The event owner also chairs the event. Participants meet in a virtual meeting room. An attendee has accepted the invitation, but on March 4, 2020 he is unavailable and declined participation for this occurrence.

Jenkins & Stepanek Expires April 19, 2021 [Page 56] Internet-Draft JSCalendar October 2020

{ "...": "", "title": "FooBar team meeting", "start": "2020-01-08T09:00:00", "timeZone": "Africa/Johannesburg", "duration": "PT1H", "virtualLocations": { "3f41b47b-a5eb-494f-90eb-19d279486d84": { "@type": "VirtualLocation", "name": "ChatMe meeting room", "uri": "https://chatme.example.com?id=1234567&pw=a8a24627b63d396e" } }, "recurrenceRules": [{ "@type": "RecurrenceRule", "frequency": "weekly" }], "replyTo": { "imip": "mailto:[email protected]" }, "participants": { "dG9tQGZvb2Jhci5xlLmNvbQ": { "@type": "Participant", "name": "Tom Tool", "email": "[email protected]", "sendTo": { "imip": "mailto:[email protected]" }, "participationStatus": "accepted", "roles": { "attendee": true } }, "em9lQGZvb2GFtcGxlLmNvbQ": { "@type": "Participant", "name": "Zoe Zelda", "email": "[email protected]", "sendTo": { "imip": "mailto:[email protected]" }, "participationStatus": "accepted", "roles": { "owner": true, "attendee": true, "chair": true } } },

Jenkins & Stepanek Expires April 19, 2021 [Page 57] Internet-Draft JSCalendar October 2020

"recurrenceOverrides": { "2020-03-04T09:00:00": { "participants/dG9tQGZvb2Jhci5xlLmNvbQ/participationStatus": "declined" } } }

7. Security Considerations

Calendaring and scheduling information is very privacy-sensitive. It can reveal the social network of a user; location information of this user and those in their social network; identity and credentials information; and the patterns of behavior of the user in both the physical and cyber realm. Additionally, calendar events and tasks can could influence the physical location of a user or their cyber behavior within a known time window. Its transmission and storage must be done carefully to protect it from possible threats, such as eavesdropping, replay, message insertion, deletion, modification, and on-path attacks.

The data being stored and transmitted may be used in systems with real world consequences. For example, a home automation system may turn an alarm on and off. Or a coworking space may charge money to the organiser of an event that books one of their meeting rooms. Such systems must be careful to authenticate all data they receive to prevent them from being subverted, and ensure the change comes from an authorized entity.

This document just defines the data format; such considerations are primarily the concern of the API or method of storage and transmission of such files.

7.1. Expanding Recurrences

A recurrence rule may produce infinite occurrences of an event. Implementations MUST handle expansions carefully to prevent accidental or deliberate resource exhaustion.

Conversely, a recurrence rule may be specified that does not expand to anything. It is not always possible to tell this through static analysis of the rule, so implementations MUST be careful to avoid getting stuck in infinite loops, or otherwise exhausting resources while searching for the next occurrence.

Events recur in the event’s time zone. If the user is in a different time zone, daylight saving transitions may cause an event that normally occurs at, for example, 9am to suddenly shift an hour

Jenkins & Stepanek Expires April 19, 2021 [Page 58] Internet-Draft JSCalendar October 2020

earlier. This may be used in an attempt to cause a participant to miss an important meeting. User agents must be careful to translate date-times correctly between time zones and may wish to call out unexpected changes in the time of a recurring event.

7.2. JSON Parsing

The Security Considerations of [RFC8259] apply to the use of JSON as the data interchange format.

As for any serialization format, parsers need to thoroughly check the syntax of the supplied data. JSON uses opening and closing tags for several types and structures, and it is possible that the end of the supplied data will be reached when scanning for a matching closing tag; this is an error condition, and implementations need to stop scanning at the end of the supplied data.

JSON also uses a string encoding with some escape sequences to encode special characters within a string. Care is needed when processing these escape sequences to ensure that they are fully formed before the special processing is triggered, with special care taken when the escape sequences appear adjacent to other (non-escaped) special characters or adjacent to the end of data (as in the previous paragraph).

If parsing JSON into a non-textual structured data format, implementations may need to allocate storage to hold JSON string elements. Since JSON does not use explicit string lengths, the risk of denial of service due to resource exhaustion is small, but implementations may still wish to place limits on the size of allocations they are willing to make in any given context, to avoid untrusted data causing excessive memory allocation.

7.3. URI Values

Several JSCalendar properties contain URIs as values, and processing these properties requires extra care. Section 7 of [RFC3986] discusses security risks related to URIs.

Fetching remote resources carries inherent risks. Connections must only be allowed on well known ports, using allowed protocols (generally just HTTP/HTTPS on their default ports). The URL must be resolved externally and not allowed to access internal resources. Connecting to an external source reveals IP (and therefore generally location) information.

A maliciously constructed JSCalendar object may contain a very large number of URIs. In the case of published calendars with a large

Jenkins & Stepanek Expires April 19, 2021 [Page 59] Internet-Draft JSCalendar October 2020

number of subscribers, such objects could be widely distributed. Implementations should be careful to limit the automatic fetching of linked resources to reduce the risk of this being an amplification vector for a denial-of-service attack.

7.4. Spam

Calendar systems may receive JSCalendar files from untrusted sources, in particular as attachments to emails. This can be a vector for an attacker to inject spam into a user’s calendar. This may confuse, annoy, and mislead users, or overwhelm their calendar with bogus events, preventing them from seeing legitimate ones.

Heuristic, statistical or machine-learning-based filters can be effective in filtering out spam. Authentication mechanisms such as DKIM [RFC6376] can help establish the source of messages and associate the data with existing relationships (such as an address book contact). Misclassifications are always possible, however, and providing a mechanism for users to quickly correct this is advised.

Confusable unicode characters may be used to trick a user into trusting a JSCalendar file that appears to come from a known contact but is actually from a similar-looking source controlled by an attacker.

7.5. Duplication

It is important for calendar systems to maintain the UID of an event when updating it to avoid unexpected duplication of events. Consumers of the data may not remove the previous version of the event if it has a different UID. This can lead to a confusing situation for the user, with many variations of the event and no indication of which one is correct. Care must be taken by consumers of the data to remove old events where possible to avoid an accidental denial-of-service attack due to the volume of data.

7.6. Time Zones

Events recur in a particular time zone. When this differs from the user’s current time zone, it may unexpectedly cause an occurrence to shift in time for that user due to a daylight savings change in the event’s time zone. A maliciously crafted event could attempt to confuse users with such an event to ensure a meeting is missed.

Jenkins & Stepanek Expires April 19, 2021 [Page 60] Internet-Draft JSCalendar October 2020

8. IANA Considerations

8.1. Media Type Registration

This document defines a media type for use with JSCalendar data formatted in JSON.

Type name: application

Subtype name: jscalendar+json

Required parameters: type

The "type" parameter conveys the type of the JSCalendar data in the body part, with the value being one of "jsevent", "jstask", or "jsgroup". The parameter MUST NOT occur more than once. It MUST match the value of the "@type" property of the JSON-formatted JSCalendar object in the body.

Optional parameters: none

Encoding considerations: Same as encoding considerations of application/json as specified in RFC8529, Section 11 [RFC8259].

Security considerations: See Section 7 of this document.

Interoperability considerations: While JSCalendar is designed to avoid ambiguities as much as possible, when converting objects from other calendar formats to/from JSCalendar it is possible that differing representations for the same logical data might arise, or ambiguities in interpretation. The semantic equivalence of two JSCalendar objects may be determined differently by different applications, for example where URL values differ in case between the two objects.

Published specification: This specification.

Applications that use this media type: Applications that currently make use of the text/calendar and application/calendar+json media types can use this as an alternative. Similarly, applications that use the application/json media type to transfer calendaring data can use this to further specify the content.

Fragment identifier considerations: A JSON Pointer fragment identifier may be used, as defined in [RFC6901], Section 6.

Additional information:

Jenkins & Stepanek Expires April 19, 2021 [Page 61] Internet-Draft JSCalendar October 2020

Magic number(s): N/A

File extensions(s): N/A

Macintosh file type code(s): N/A

Person & email address to contact for further information: [email protected]

Intended usage: COMMON

Restrictions on usage: N/A

Author: See the "Author’s Address" section of this document.

Change controller: IETF

8.2. Creation of "JSCalendar Properties" Registry

The IANA will create the "JSCalendar Properties" registry to allow interoperability of extensions to JSCalendar objects.

This registry follows the Expert Review process ([RFC8126], Section 4.5). If the "intended use" field is "common", sufficient documentation is required to enable interoperability. Preliminary community review for this registry is optional but strongly encouraged.

A registration can have an intended use of "common", "reserved", or "obsolete". The IANA will list common-use registrations prominently and separately from those with other intended use values.

A "reserved" registration reserves a property name without assigning semantics to avoid name collisions with future extensions or protocol use.

An "obsolete" registration denotes a property that is no longer expected to be added by up-to-date systems. A new property has probably been defined covering the obsolete property’s semantics.

The JSCalendar property registration procedure is not a formal standards process but rather an administrative procedure intended to allow community comment and sanity checking without excessive time delay. It is designed to encourage vendors to document and register new properties they add for use cases not covered by the original specification, leading to increased interoperability.

Jenkins & Stepanek Expires April 19, 2021 [Page 62] Internet-Draft JSCalendar October 2020

8.2.1. Preliminary Community Review

Notice of a potential new registration SHOULD be sent to the Calext mailing list for review. This mailing list is appropriate to solicit community feedback on a proposed new property.

Properties registrations must be marked with their intended use: "common", "reserved" or "obsolete".

The intent of the public posting to this list is to solicit comments and feedback on the choice of the property name, the unambiguity of the specification document, and a review of any interoperability or security considerations. The submitter may submit a revised registration proposal or abandon the registration completely at any time.

8.2.2. Submit Request to IANA

Registration requests can be sent to .

8.2.3. Designated Expert Review

The primary concern of the designated expert (DE) is preventing name collisions and encouraging the submitter to document security and privacy considerations. For a common-use registration, the DE is expected to confirm that suitable documentation, as described in Section 4.6 of [RFC8126], is available to ensure interoperability. That documentation will usually be in an RFC, but simple definitions are likely to use a web/wiki page, and if a sentence or two is deemed sufficient it could be described in the registry itself. The DE should also verify that the property name does not conflict with work that is active or already published within the IETF. A published specification is not required for reserved or obsolete registrations.

The DE will either approve or deny the registration request and publish a notice of the decision to the Calext WG mailing list or its successor, as well as inform IANA. A denial notice must be justified by an explanation, and, in the cases where it is possible, concrete suggestions on how the request can be modified so as to become acceptable should be provided.

8.2.4. Change Procedures

Once a JSCalendar property has been published by the IANA, the change controller may request a change to its definition. The same procedure that would be appropriate for the original registration request is used to process a change request.

Jenkins & Stepanek Expires April 19, 2021 [Page 63] Internet-Draft JSCalendar October 2020

JSCalendar property registrations may not be deleted; properties that are no longer believed appropriate for use can be declared obsolete by a change to their "intended use" field; such properties will be clearly marked in the lists published by the IANA.

Significant changes to a JSCalendar property’s definition should be requested only when there are serious omissions or errors in the published specification, as such changes may cause interoperability issues. When review is required, a change request may be denied if it renders entities that were valid under the previous definition invalid under the new definition.

The owner of a JSCalendar property may pass responsibility to another person or agency by informing the IANA; this can be done without discussion or review.

8.2.5. JSCalendar Properties Registry Template

o Property Name: The name of the property. The property name MUST NOT already be registered for any of the object types listed in the "Property Context" field of this registration. Other object types MAY already have registered a different property with the same name, however the same name SHOULD only be used when the semantics are analogous.

o Property Type: The type of this property, using type signatures as specified in Section 1.3. The property type MUST be registed in the Type Registry.

o Property Context: A comma-separated list of JSCalendar object types this property is allowed on.

o Reference or Description: A brief description or RFC number and section reference where the property is specified (omitted for "reserved" property names).

o Intended Use: Common, reserved, or obsolete.

o Change Controller: Who may request a change to this entry’s definition ("IETF" for IETF-stream RFCs).

8.2.6. Initial Contents for the JSCalendar Properties Registry

The following table lists the initial entries of the JSCalendar Properties registry. All properties are for common-use. All RFC section references are for this document. The change controller for all these properties is "IETF".

Jenkins & Stepanek Expires April 19, 2021 [Page 64] Internet-Draft JSCalendar October 2020

+------+------+------+------+ | Property Name | Property Type | Property | Referen | | | | Context | ce or D | | | | | escript | | | | | ion | +------+------+------+------+ | @type | String | JSEvent, | Section | | | | JSTask, | 4.1.1, | | | | JSGroup, A | Section | | | | bsoluteTri | 4.5.2, | | | | gger, | Section | | | | Alert, | 1.4.11 | | | | Link, | , Secti | | | | Location, | on 4.2. | | | | NDay, Offs | 5, Sect | | | | etTrigger, | ion 4.4 | | | | Participan | .5, Sec | | | | t, Recurre | tion 4. | | | | nceRule, | 3.2, Se | | | | Relation, | ction 4 | | | | TimeZone, | .1.3, S | | | | TimeZoneRu | ection | | | | le, Virtua | 4.7.2, | | | | lLocation | Section | | | | | 4.7.2, | | | | | Section | | | | | 4.2.6 | | | | | | | acknowledged | UTCDateTime | Alert | Section | | | | | 4.5.2 | | | | | | | action | String | Alert | Section | | | | | 4.5.2 | | | | | | | alerts | Id[Alert] | JSEvent, | Section | | | | JSTask | 4.5.2 | | | | | | | aliases | String[Boolean] | TimeZone | Section | | | | | 4.7.2 | | | | | | | byDay | NDay[] | Recurrence | Section | | | | Rule | 4.3.2 | | | | | | | byHour | UnsignedInt[] | Recurrence | Section | | | | Rule | 4.3.2 | | | | | | | byMinute | UnsignedInt[] | Recurrence | Section | | | | Rule | 4.3.2 |

Jenkins & Stepanek Expires April 19, 2021 [Page 65] Internet-Draft JSCalendar October 2020

| | | | | | byMonth | String[] | Recurrence | Section | | | | Rule | 4.3.2 | | | | | | | byMonthDay | Int[] | Recurrence | Section | | | | Rule | 4.3.2 | | | | | | | bySecond | UnsignedInt[] | Recurrence | Section | | | | Rule | 4.3.2 | | | | | | | bySetPosition | Int[] | Recurrence | Section | | | | Rule | 4.3.2 | | | | | | | byWeekNo | Int[] | Recurrence | Section | | | | Rule | 4.3.2 | | | | | | | byYearDay | Int[] | Recurrence | Section | | | | Rule | 4.3.2 | | | | | | | categories | String[Boolean] | JSEvent, | Section | | | | JSTask, | 4.2.10 | | | | JSGroup | | | | | | | | cid | String | Link | Section | | | | | 1.4.11 | | | | | | | color | String | JSEvent, | Section | | | | JSTask, | 4.2.11 | | | | JSGroup | | | | | | | | comments | String[] | TimeZoneRu | Section | | | | le | 4.7.2 | | | | | | | contentType | String | Link | Section | | | | | 1.4.11 | | | | | | | coordinates | String | Location | Section | | | | | 4.2.5 | | | | | | | count | UnsignedInt | Recurrence | Section | | | | Rule | 4.3.2 | | | | | | | created | UTCDateTime | JSEvent, | Section | | | | JSTask, | 4.1.5 | | | | JSGroup | | | | | | | | day | String | NDay | Section | | | | | 4.3.2 |

Jenkins & Stepanek Expires April 19, 2021 [Page 66] Internet-Draft JSCalendar October 2020

| | | | | | daylight | TimeZoneRule | TimeZone | Section | | | | | 4.7.2 | | | | | | | delegatedFrom | String[Boolean] | Participan | Section | | | | t | 4.4.5 | | | | | | | delegatedTo | String[Boolean] | Participan | Section | | | | t | 4.4.5 | | | | | | | description | String | JSEvent, | Section | | | | JSTask, | 4.2.2, | | | | Location, | Section | | | | Participan | 4.2.5, | | | | t, Virtual | Section | | | | Location | 4.4.5, | | | | | Section | | | | | 4.2.6 | | | | | | | descriptionCo | String | JSEvent, | Section | | ntentType | | JSTask | 4.2.3 | | | | | | | display | String | Link | Section | | | | | 1.4.11 | | | | | | | due | LocalDateTime | JSTask | Section | | | | | 5.2.1 | | | | | | | duration | Duration | JSEvent | Section | | | | | 5.1.2 | | | | | | | email | String | Participan | Section | | | | t | 4.4.5 | | | | | | | entries | (JSTask|JSEvent)[] | JSGroup | Section | | | | | 5.3.1 | | | | | | | estimatedDura | Duration | JSTask | Section | | tion | | | 5.2.3 | | | | | | | excluded | Boolean | JSEvent, | Section | | | | JSTask | 4.3.5 | | | | | | | excludedRecur | RecurrenceRule[] | JSEvent, | Section | | renceRules | | JSTask | 4.3.3 | | | | | | | expectReply | Boolean | Participan | Section | | | | t | 4.4.5 |

Jenkins & Stepanek Expires April 19, 2021 [Page 67] Internet-Draft JSCalendar October 2020

| | | | | | firstDayOfWee | String | Recurrence | Section | | k | | Rule | 4.3.2 | | | | | | | freeBusyStatu | String | JSEvent, | Section | | s | | JSTask | 4.4.2 | | | | | | | frequency | String | Recurrence | Section | | | | Rule | 4.3.2 | | | | | | | href | String | Link | Section | | | | | 1.4.11 | | | | | | | interval | UnsignedInt | Recurrence | Section | | | | Rule | 4.3.2 | | | | | | | invitedBy | String | Participan | Section | | | | t | 4.4.5 | | | | | | | keywords | String[Boolean] | JSEvent, | Section | | | | JSTask, | 4.2.9 | | | | JSGroup | | | | | | | | kind | String | Participan | Section | | | | t | 4.4.5 | | | | | | | language | String | Participan | Section | | | | t | 4.4.5 | | | | | | | links | Id[Link] | JSGroup, | Section | | | | JSEvent, | 4.2.7, | | | | JSTask, | Section | | | | Location, | 4.2.5, | | | | Participan | Section | | | | t | 4.4.5 | | | | | | | locale | String | JSGroup, | Section | | | | JSEvent, | 4.2.8 | | | | JSTask | | | | | | | | localizations | String[PatchObject] | JSEvent, | Section | | | | JSTask | 4.6.1 | | | | | | | locationId | String | Participan | Section | | | | t | 4.4.5 | | | | | | | locations | Id[Location] | JSEvent, | Section | | | | JSTask | 4.2.5 |

Jenkins & Stepanek Expires April 19, 2021 [Page 68] Internet-Draft JSCalendar October 2020

| | | | | | locationTypes | String[Boolean] | Location | Section | | | | | 4.2.5 | | | | | | | memberOf | String[Boolean] | Participan | Section | | | | t | 4.4.5 | | | | | | | method | String | JSEvent, | Section | | | | JSTask | 4.1.8 | | | | | | | name | String | Location, | Section | | | | VirtualLoc | 4.2.5, | | | | ation, Par | Section | | | | ticipant | 4.2.6, | | | | | Section | | | | | 4.4.5 | | | | | | | names | String[Boolean] | TimeZoneRu | Section | | | | le | 4.7.2 | | | | | | | nthOfPeriod | Int | NDay | Section | | | | | 4.3.2 | | | | | | | offset | SignedDuration | OffsetTrig | Section | | | | ger | 4.5.2 | | | | | | | offsetFrom | UTCDateTime | TimeZoneRu | Section | | | | le | 4.7.2 | | | | | | | offsetTo | UTCDateTime | TimeZoneRu | Section | | | | le | 4.7.2 | | | | | | | participants | Id[Participant] | JSEvent, | Section | | | | JSTask | 4.4.5 | | | | | | | participation | String | Participan | Section | | Comment | | t | 4.4.5 | | | | | | | participation | String | Participan | Section | | Status | | t | 4.4.5 | | | | | | | percentComple | UnsignedInt | JSTask, Pa | Section | | te | | rticipant | 5.2.4 | | | | | | | priority | Int | JSEvent, | Section | | | | JSTask | 4.4.1 | | | | | | | privacy | String | JSEvent, | Section |

Jenkins & Stepanek Expires April 19, 2021 [Page 69] Internet-Draft JSCalendar October 2020

| | | JSTask | 4.4.3 | | | | | | | prodId | String | JSEvent, | Section | | | | JSTask, | 4.1.4 | | | | JSGroup | | | | | | | | progress | String | JSTask, Pa | Section | | | | rticipant | 5.2.5 | | | | | | | progressUpdat | UTCDateTime | JSTask, Pa | Section | | ed | | rticipant | 5.2.6 | | | | | | | recurrenceId | LocalDateTime | JSEvent, | Section | | | | JSTask | 4.3.1 | | | | | | | recurrenceOve | LocalDateTime[PatchObject] | JSEvent, | Section | | rrides | | JSTask, Ti | 4.3.4, | | | | meZoneRule | Section | | | | | 4.7.2 | | | | | | | recurrenceRul | RecurrenceRule[] | JSEvent, | Section | | es | | JSTask, Ti | 4.3.2, | | | | meZoneRule | Section | | | | | 4.7.2 | | | | | | | rel | String | Link | Section | | | | | 1.4.11 | | | | | | | relatedTo | String[Relation] | JSEvent, | Section | | | | JSTask, | 4.1.3, | | | | Alert | Section | | | | | 4.5.2 | | | | | | | relation | String[Boolean] | Relation | Section | | | | | 1.4.10 | | | | | | | relativeTo | String | OffsetTrig | Section | | | | ger, | 4.5.2, | | | | Location | Section | | | | | 4.2.5 | | | | | | | replyTo | String[String] | JSEvent, | Section | | | | JSTask | 4.4.4 | | | | | | | roles | String[Boolean] | Participan | Section | | | | t | 4.4.5 | | | | | | | rscale | String | Recurrence | Section |

Jenkins & Stepanek Expires April 19, 2021 [Page 70] Internet-Draft JSCalendar October 2020

| | | Rule | 4.3.2 | | | | | | | standard | TimeZoneRule | TimeZone | Section | | | | | 4.7.2 | | | | | | | start | LocalDateTime | TimeZoneRu | Section | | | | le | 4.7.2 | | | | | | | scheduleAgent | String | Participan | Section | | | | t | 4.4.5 | | | | | | | scheduleForce | Boolean | Participan | Section | | Send | | t | 4.4.5 | | | | | | | scheduleSeque | UnsignedInt | Participan | Section | | nce | | t | 4.4.5 | | | | | | | scheduleStatu | String[] | Participan | Section | | s | | t | 4.4.5 | | | | | | | scheduleUpdat | UTCDateTime | Participan | Section | | ed | | t | 4.4.5 | | | | | | | sendTo | String[String] | Participan | Section | | | | t | 4.4.5 | | | | | | | sequence | UnsignedInt | JSEvent, | Section | | | | JSTask | 4.1.7 | | | | | | | showWithoutTi | Boolean | JSEvent, | Section | | me | | JSTask | 4.2.4 | | | | | | | size | UnsignedInt | Link | Section | | | | | 1.4.11 | | | | | | | skip | String | Recurrence | Section | | | | Rule | 4.3.2 | | | | | | | source | String | JSGroup | Section | | | | | 5.3.2 | | | | | | | start | LocalDateTime | JSEvent, | Section | | | | JSTask | 5.1.1, | | | | | Section | | | | | 5.2.2 | | | | | | | status | String | JSEvent | Section | | | | | 5.1.3 |

Jenkins & Stepanek Expires April 19, 2021 [Page 71] Internet-Draft JSCalendar October 2020

| | | | | | timeZone | TimeZoneId|null | JSEvent, | Section | | | | JSTask, | 4.7.1, | | | | Location | Section | | | | | 4.2.5 | | | | | | | timeZones | TimeZoneId[TimeZone] | JSEvent, | Section | | | | JSTask | 4.7.2 | | | | | | | title | String | JSEvent, | Section | | | | JSTask, | 4.2.1 | | | | JSGroup, | | | | | Link | | | | | | | | trigger | OffsetTrigger|AbsoluteTrig | Alert | Section | | | ger|UnknownTrigger | | 4.5.2 | | | | | | | tzId | String | TimeZone | Section | | | | | 4.7.2 | | | | | | | uid | String | JSEvent, | Section | | | | JSTask, | 4.1.2 | | | | JSGroup | | | | | | | | until | LocalDateTime | Recurrence | Section | | | | Rule | 4.3.2 | | | | | | | updated | UTCDateTime | JSEvent, | Section | | | | JSTask, | 4.1.6 | | | | JSGroup | | | | | | | | uri | String | VirtualLoc | Section | | | | ation | 4.2.6 | | | | | | | url | String | TimeZone | Section | | | | | 4.7.2 | | | | | | | useDefaultAle | Boolean | JSEvent, | Section | | rts | | JSTask | 4.5.1 | | | | | | | validUntil | UTCDateTime | TimeZone | Section | | | | | 4.7.2 | | | | | | | virtualLocati | Id[VirtualLocation] | JSEvent, | Section | | ons | | JSTask | 4.2.6 | | | | | | | when | UTCDateTime | AbsoluteTr | Section | | | | igger | 4.5.2 |

Jenkins & Stepanek Expires April 19, 2021 [Page 72] Internet-Draft JSCalendar October 2020

+------+------+------+------+

Table 1

8.3. Creation of "JSCalendar Types" Registry

The IANA will create the "JSCalendar Types" registry to avoid name collisions and provide a complete reference for all data types used for JSCalendar property values. The registration process is the same as for the JSCalendar Properties registry, as defined in Section 8.2.

8.3.1. JSCalendar Types Registry Template

o Type Name: The name of the type.

o Reference or Description: A brief description or RFC number and section reference where the Type is specified (may be omitted for "reserved" type names).

o Intended Use: Common, reserved, or obsolete.

o Change Controller: Who may request a change to this entry’s definition ("IETF" for IETF-stream RFCs).

8.3.2. Initial Contents for the JSCalendar Types Registry

The following table lists the initial entries of the JSCalendar Types registry. All properties are for common-use. All RFC section references are for this document. The change controller for all these properties is "IETF".

+------+------+ | Type Name | Reference or Description | +------+------+ | Alert | Section 4.5.2 | | | | | Boolean | Section 1.3 | | | | | Duration | Section 1.4.6 | | | | | Id | Section 1.4.1 | | | | | Int | Section 1.4.2 | | | | | LocalDateTime | Section 1.4.5 | | | | | Link | Section 1.4.11 | | | |

Jenkins & Stepanek Expires April 19, 2021 [Page 73] Internet-Draft JSCalendar October 2020

| Location | Section 4.2.5 | | | | | NDay | Section 4.3.2 | | | | | Number | Section 1.3 | | | | | Participant | Section 4.4.5 | | | | | PatchObject | Section 1.4.9 | | | | | RecurrenceRule | Section 4.3.2 | | | | | Relation | Section 1.4.10 | | | | | SignedDuration | Section 1.4.7 | | | | | String | Section 1.3 | | | | | TimeZone | Section 4.7.2 | | | | | TimeZoneId | Section 1.4.8 | | | | | TimeZoneRule | Section 4.7.2 | | | | | UnsignedInt | Section 1.4.3 | | | | | UTCDateTime | Section 1.4.4 | | | | | VirtualLocation | Section 4.2.6 | +------+------+

Table 2

8.4. Creation of "JSCalendar Enum Values" Registry

The IANA will create the "JSCalendar Enum Values" registry to allow interoperable extension of semantics for properties with enumerable values. Each such property will have a subregistry of allowed values. The registration process for a new enum value or adding a new enumerable property is the same as for the JSCalendar Properties registry, as defined in Section 8.2.

8.4.1. JSCalendar Enum Property Template

This template is for adding a subregistry for a new enumerable property to the JSCalendar Enum registry.

Jenkins & Stepanek Expires April 19, 2021 [Page 74] Internet-Draft JSCalendar October 2020

o Property Name: the name(s) of the property or properties where these values may be used. This MUST be registered in the JSCalendar Properties registry.

o Context: the list of allowed object types where the property or properties may appear, as registered in the JSCalendar Properties registry. This disambiguates where there may be two distinct properties with the same name in different contexts.

o Change Controller: ("IETF" for properties defined in IETF-stream RFCs).

o Initial Contents: The initial list of defined values for this enum, using the template defined in Section 8.4.2. A subregistry will be created with these values for this property name/context tuple.

8.4.2. JSCalendar Enum Value Template

This template is for adding a new enum value to a subregistry in the JSCalendar Enum registry.

o Enum Value: The verbatim value of the enum.

o Reference or Description: A brief description or RFC number and section reference for the semantics of this value.

8.4.3. Initial Contents for the JSCalendar Enum Values registry

For each subregistry created in this section, all RFC section references are for this document.

------

Property Name: action

Context: Alert

Change Controller: IETF

Initial Contents:

Jenkins & Stepanek Expires April 19, 2021 [Page 75] Internet-Draft JSCalendar October 2020

+------+------+ | Enum Value | Reference or Description | +------+------+ | display | Section 4.5.2 | | | | | email | Section 4.5.2 | +------+------+

Table 3

------

Property Name: display

Context: Link

Change Controller: IETF

Initial Contents:

+------+------+ | Enum Value | Reference or Description | +------+------+ | badge | Section 1.4.11 | | | | | graphic | Section 1.4.11 | | | | | fullsize | Section 1.4.11 | | | | | thumbnail | Section 1.4.11 | +------+------+

Table 4

------

Property Name: freeBusyStatus

Context: JSEvent, JSTask

Change Controller: IETF

Initial Contents:

Jenkins & Stepanek Expires April 19, 2021 [Page 76] Internet-Draft JSCalendar October 2020

+------+------+ | Enum Value | Reference or Description | +------+------+ | free | Section 4.4.2 | | | | | busy | Section 4.4.2 | +------+------+

Table 5

------

Property Name: kind

Context: Participant

Change Controller: IETF

Initial Contents:

+------+------+ | Enum Value | Reference or Description | +------+------+ | individual | Section 4.4.5 | | | | | group | Section 4.4.5 | | | | | resource | Section 4.4.5 | | | | | location | Section 4.4.5 | +------+------+

Table 6

------

Property Name: participationStatus

Context: Participant

Change Controller: IETF

Initial Contents:

Jenkins & Stepanek Expires April 19, 2021 [Page 77] Internet-Draft JSCalendar October 2020

+------+------+ | Enum Value | Reference or Description | +------+------+ | needs-action | Section 4.4.5 | | | | | accepted | Section 4.4.5 | | | | | declined | Section 4.4.5 | | | | | tenative | Section 4.4.5 | | | | | delegated | Section 4.4.5 | +------+------+

Table 7

------

Property Name: privacy

Context: JSEvent, JSTask

Change Controller: IETF

Initial Contents:

+------+------+ | Enum Value | Reference or Description | +------+------+ | public | Section 4.4.3 | | | | | private | Section 4.4.3 | | | | | secret | Section 4.4.3 | +------+------+

Table 8

------

Property Name: progress

Context: JSTask, Participant

Change Controller: IETF

Initial Contents:

Jenkins & Stepanek Expires April 19, 2021 [Page 78] Internet-Draft JSCalendar October 2020

+------+------+ | Enum Value | Reference or Description | +------+------+ | needs-action | Section 5.2.5 | | | | | in-process | Section 5.2.5 | | | | | completed | Section 5.2.5 | | | | | failed | Section 5.2.5 | | | | | cancelled | Section 5.2.5 | +------+------+

Table 9

------

Property Name: relation

Context: Relation

Change Controller: IETF

Initial Contents:

+------+------+ | Enum Value | Reference or Description | +------+------+ | first | Section 1.4.10 | | | | | next | Section 1.4.10 | | | | | child | Section 1.4.10 | | | | | parent | Section 1.4.10 | +------+------+

Table 10

------

Property Name: relativeTo

Context: OffsetTrigger, Location

Change Controller: IETF

Jenkins & Stepanek Expires April 19, 2021 [Page 79] Internet-Draft JSCalendar October 2020

Initial Contents:

+------+------+ | Enum Value | Reference or Description | +------+------+ | start | Section 4.5.2 | | | | | end | Section 4.5.2 | +------+------+

Table 11

------

Property Name: roles

Context: Participant

Change Controller: IETF

Initial Contents:

+------+------+ | Enum Value | Reference or Description | +------+------+ | owner | Section 4.4.5 | | | | | attendee | Section 4.4.5 | | | | | optional | Section 4.4.5 | | | | | informational | Section 4.4.5 | | | | | chair | Section 4.4.5 | | | | | contact | Section 4.4.5 | +------+------+

Table 12

------

Property Name: scheduleAgent

Context: Participant

Change Controller: IETF

Jenkins & Stepanek Expires April 19, 2021 [Page 80] Internet-Draft JSCalendar October 2020

Initial Contents:

+------+------+ | Enum Value | Reference or Description | +------+------+ | server | Section 4.4.5 | | | | | client | Section 4.4.5 | | | | | none | Section 4.4.5 | +------+------+

Table 13

------

Property Name: status

Context: JSEvent

Change Controller: IETF

Initial Contents:

+------+------+ | Enum Value | Reference or Description | +------+------+ | confirmed | Section 5.1.3 | | | | | cancelled | Section 5.1.3 | | | | | tentative | Section 5.1.3 | +------+------+

Table 14

9. Acknowledgments

The authors would like to thank the members of CalConnect for their valuable contributions. This specification originated from the work of the API technical committee of CalConnect, the Calendaring and Scheduling Consortium.

10. References

Jenkins & Stepanek Expires April 19, 2021 [Page 81] Internet-Draft JSCalendar October 2020

10.1. Normative References

[CLDR] "Unicode Common Locale Data Repository", .

[COLORS] "CSS Color Module", .

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, .

[RFC2392] Levinson, E., "Content-ID and Message-ID Uniform Resource Locators", RFC 2392, DOI 10.17487/RFC2392, August 1998, .

[RFC2397] Masinter, L., "The "data" URL scheme", RFC 2397, DOI 10.17487/RFC2397, August 1998, .

[RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002, .

[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, DOI 10.17487/RFC3986, January 2005, .

[RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally Unique IDentifier (UUID) URN Namespace", RFC 4122, DOI 10.17487/RFC4122, July 2005, .

[RFC4589] Schulzrinne, H. and H. Tschofenig, "Location Types Registry", RFC 4589, DOI 10.17487/RFC4589, July 2006, .

[RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, .

[RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, DOI 10.17487/RFC5234, January 2008, .

Jenkins & Stepanek Expires April 19, 2021 [Page 82] Internet-Draft JSCalendar October 2020

[RFC5545] Desruisseaux, B., Ed., "Internet Calendaring and Scheduling Core Object Specification (iCalendar)", RFC 5545, DOI 10.17487/RFC5545, September 2009, .

[RFC5546] Daboo, C., Ed., "iCalendar Transport-Independent Interoperability Protocol (iTIP)", RFC 5546, DOI 10.17487/RFC5546, December 2009, .

[RFC5646] Phillips, A., Ed. and M. Davis, Ed., "Tags for Identifying Languages", BCP 47, RFC 5646, DOI 10.17487/RFC5646, September 2009, .

[RFC5870] Mayrhofer, A. and C. Spanring, "A Uniform Resource Identifier for Geographic Locations (’geo’ URI)", RFC 5870, DOI 10.17487/RFC5870, June 2010, .

[RFC6047] Melnikov, A., Ed., "iCalendar Message-Based Interoperability Protocol (iMIP)", RFC 6047, DOI 10.17487/RFC6047, December 2010, .

[RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type Specifications and Registration Procedures", BCP 13, RFC 6838, DOI 10.17487/RFC6838, January 2013, .

[RFC6901] Bryan, P., Ed., Zyp, K., and M. Nottingham, Ed., "JavaScript Object Notation (JSON) Pointer", RFC 6901, DOI 10.17487/RFC6901, April 2013, .

[RFC7493] Bray, T., Ed., "The I-JSON Message Format", RFC 7493, DOI 10.17487/RFC7493, March 2015, .

[RFC7529] Daboo, C. and G. Yakushev, "Non-Gregorian Recurrence Rules in the Internet Calendaring and Scheduling Core Object Specification (iCalendar)", RFC 7529, DOI 10.17487/RFC7529, May 2015, .

[RFC7808] Douglass, M. and C. Daboo, "Time Zone Data Distribution Service", RFC 7808, DOI 10.17487/RFC7808, March 2016, .

Jenkins & Stepanek Expires April 19, 2021 [Page 83] Internet-Draft JSCalendar October 2020

[RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 8126, DOI 10.17487/RFC8126, June 2017, .

[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, .

[RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data Interchange Format", STD 90, RFC 8259, DOI 10.17487/RFC8259, December 2017, .

[RFC8288] Nottingham, M., "Web Linking", RFC 8288, DOI 10.17487/RFC8288, October 2017, .

[TZDB] "IANA Time Zone Database", .

10.2. Informative References

[LINKRELS] "IANA Link Relation Types", .

[LOCATIONTYPES] "IANA Location Types Registry", .

[MEDIATYPES] "IANA Media Types", .

[RFC6376] Crocker, D., Ed., Hansen, T., Ed., and M. Kucherawy, Ed., "DomainKeys Identified Mail (DKIM) Signatures", STD 76, RFC 6376, DOI 10.17487/RFC6376, September 2011, .

[RFC7265] Kewisch, P., Daboo, C., and M. Douglass, "jCal: The JSON Format for iCalendar", RFC 7265, DOI 10.17487/RFC7265, May 2014, .

Jenkins & Stepanek Expires April 19, 2021 [Page 84] Internet-Draft JSCalendar October 2020

[RFC7986] Daboo, C., "New Properties for iCalendar", RFC 7986, DOI 10.17487/RFC7986, October 2016, .

Authors’ Addresses

Neil Jenkins Fastmail PO Box 234 Collins St West Melbourne VIC 8007 Australia

Email: [email protected] URI: https://www.fastmail.com

Robert Stepanek Fastmail PO Box 234 Collins St West Melbourne VIC 8007 Australia

Email: [email protected] URI: https://www.fastmail.com

Jenkins & Stepanek Expires April 19, 2021 [Page 85] Calendaring extensions N. Jenkins Internet-Draft R. Stepanek Intended status: Standards Track FastMail Expires: January 10, 2022 M. Douglass BCS July 9, 2021

JSCalendar: Converting from and to iCalendar draft-ietf-calext-jscalendar-icalendar-05

Abstract

This document provides the required methods for converting JSCalendar from and to iCalendar.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on January 10, 2022.

Copyright Notice

Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

Jenkins, et al. Expires January 10, 2022 [Page 1] Internet-Draft JSCalendar July 2021

Table of Contents

1. Introduction ...... 4 1.1. Note (to be deleted later) ...... 4 1.2. Motivation ...... 4 1.3. Scope and caveats ...... 4 1.4. Notational Conventions ...... 5 2. iCalendar pre-processing ...... 5 3. Translating iCalendar components to JSCalendar ...... 6 3.1. VALARM ...... 7 3.2. VCALENDAR ...... 9 3.3. VEVENT ...... 10 3.4. VLOCATION ...... 10 3.5. VTIMEZONE, STANDARD, DAYLIGHT ...... 11 3.6. VTODO ...... 12 4. Translating iCalendar properties to JSCalendar ...... 13 4.1. ATTACH ...... 13 4.2. ATTENDEE ...... 13 4.3. CALSCALE ...... 16 4.4. CATEGORIES ...... 16 4.5. CLASS ...... 16 4.6. COLOR ...... 17 4.7. COMMENT ...... 17 4.8. COMPLETED ...... 17 4.9. CONCEPT ...... 17 4.10. CONFERENCE ...... 18 4.11. CONTACT ...... 18 4.12. CREATED ...... 19 4.13. DESCRIPTION ...... 19 4.14. DTEND, DTSTART, DUE, DURATION ...... 20 4.15. ESTIMATED-DURATION ...... 23 4.16. EXDATE ...... 23 4.17. EXRULE ...... 23 4.18. DTSTAMP and LAST-MODIFIED ...... 23 4.19. GEO ...... 24 4.20. IMAGE ...... 24 4.21. LOCATION ...... 24 4.22. METHOD ...... 24 4.23. ORGANIZER ...... 25 4.24. PERCENT-COMPLETE ...... 25 4.25. PRIORITY ...... 27 4.26. PRODID ...... 28 4.27. RECURRENCE-ID ...... 28 4.28. RELATED-TO ...... 28 4.29. REQUEST-STATUS ...... 29 4.30. RESOURCES ...... 29 4.31. RDATE ...... 30 4.32. RRULE ...... 30

Jenkins, et al. Expires January 10, 2022 [Page 2] Internet-Draft JSCalendar July 2021

4.33. SEQUENCE ...... 34 4.34. STATUS ...... 34 4.35. STRUCTURED-DATA ...... 34 4.36. SUMMARY ...... 35 4.37. TRANSP ...... 35 4.38. UID ...... 36 4.39. URL ...... 36 5. Translating iCalendar Recurrences ...... 36 5.1. Translating iCalendar Recurrences: Simple objects with overrides ...... 36 5.2. Translating iCalendar Recurrences: Overrides with no master ...... 36 6. Translating iCalendar: Further examples ...... 36 6.1. Recurring event with ATTACH ...... 37 6.2. Simple event with CONTACT ...... 39 6.3. Simple event with RESOURCES ...... 40 6.4. Recurring event. Attendees only in overrides ...... 40 7. Translating JSCalendar properties to iCalendar components . . 43 7.1. jsevent ...... 43 7.2. jsgroup ...... 44 7.3. jstask ...... 45 7.4. timezones ...... 46 7.5. alerts ...... 47 7.5.1. action ...... 47 7.5.2. trigger ...... 48 7.5.3. todo ...... 49 8. Translating JSCalendar properties to iCalendar properties . . 49 8.1. categories ...... 49 8.2. created ...... 50 8.3. duration ...... 50 8.4. estimatedDuration ...... 51 8.5. keywords ...... 51 8.6. locations ...... 52 8.7. participants ...... 52 9. Security Considerations ...... 53 10. IANA Considerations ...... 53 11. Acknowledgments ...... 53 12. References ...... 53 12.1. Normative References ...... 53 12.2. Informative References ...... 54 Appendix A. Outdated document sections ...... 55 A.1. Note ...... 55 A.2. JSTask ...... 55 A.3. JSGroup ...... 55 A.4. Common properties ...... 56 A.4.1. Time properties and types ...... 58 A.4.2. Locations ...... 59 A.4.3. Participants ...... 60

Jenkins, et al. Expires January 10, 2022 [Page 3] Internet-Draft JSCalendar July 2021

A.5. Custom properties ...... 61 Authors’ Addresses ...... 62

1. Introduction

1.1. Note (to be deleted later)

This is still very much a work in progress. There are implementations of the mapping but there may be changes over the coming weeks.

1.2. Motivation

The JSCalendar [draft-ietf-calext-jscalendar] data format is used to represent calendar data, and is meant as an alternative to the widely deployed iCalendar [RFC5545] data format.

While new calendaring services and applications might use JSCalendar as their main data format to exchange calendaring data, they are likely to interoperate with services and clients that just support iCalendar. Similarly, existing calendaring data is stored in iCalendar format in databases and other calendar stores, and providers and users might want to represent this data also in JSCalendar. Lastly, there is a requirement to preserve custom iCalendar properties that have no equivalent in JSCalendar when converting between these formats.

To support these use cases, this document provides the required approach when converting JSCalendar data from and to iCalendar.

1.3. Scope and caveats

JSCalendar and iCalendar have a lot of semantics in common, but they are not interchangeable formats:

o JSCalendar contains a richer data model to express calendar information such as event locations and participants. while future iCalendar extensions may allow a direct mapping, for now there may be no representation directly in iCalendar of some properties. These values may have to be extracted from a full copy of the iCalendar format provided as a property in the JSCalendar data.

o iCalendar may contain arbitrary, non-standardised data with custom properties/attributes. These will be translated using the same approach as jCal.

Jenkins, et al. Expires January 10, 2022 [Page 4] Internet-Draft JSCalendar July 2021

o iCalendar has some obsolete features that have been removed from JSCalendar due to not being useful and/or supported in the real world (e.g. custom email alerts to send to random people). Translating these may lose some of the original fidelity.

o Implementations may use a custom property to store data that could not be mapped directly in either direction in the original or a custom format, however this is not interoperable.

o JSCalendar supports fractional seconds in time values whereas iCalendar does not. A subsequent specification will define how fractional seconds can be represented in iCalendar.

Accordingly, this document defines a canonical translation between iCalendar and JSCalendar, and implementations MUST follow the approaches specified here when iCalendar data is represented in JSCalendar and vice-versa.

This document defines mappings for the following specifications.

o Internet Calendaring and Scheduling Core Object Specification (iCalendar)

o iCalendar Transport-Independent Interoperability Protocol (iTIP)

o New Properties for iCalendar

o Event Publishing Extensions to iCalendar

o Support for iCalendar Relationships

o VALARM Extensions for iCalendar

Therefore all of these specifications MUST be implemented to follow this specification.

1.4. Notational Conventions

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].

2. iCalendar pre-processing

iCalendar uses a line-folding mechanism to limit lines of data to a maximum line length (typically 75 octets) to ensure the maximum likelihood of preserving data integrity as it is transported via various means (e.g., email) -- see Section 3.1 of [RFC5545].

Jenkins, et al. Expires January 10, 2022 [Page 5] Internet-Draft JSCalendar July 2021

iCalendar data uses an "escape" character sequence for text values and property parameter values. See Sections 3.1 and 3.3 of [RFC5545] as well as [RFC6868].

There is a subtle difference in the number representations between JSON and iCalendar. While in iCalendar, a number may have leading zeros, as well as a leading plus sign; this is not the case in JSON. Numbers should be represented in whatever way needed for the underlying format.

When converting from iCalendar to JSCalendar: First, iCalendar lines MUST be unfolded. Afterwards, any iCalendar escaping MUST be unescaped. Finally, JSON escaping, as described in Section 7 of [RFC7159], MUST be applied. The reverse order applies when converting from JSCalendar to iCalendar, which is further described in Section ?.

iCalendar uses a base64 encoding for binary data. However, it does not restrict the encoding from being applied to non-binary value types. So, the following rules are applied when processing a property with the "ENCODING" property parameter set to "BASE64":

o If the property value type is "BINARY", the base64 encoding MUST be preserved.

o If the value type is not "BINARY", the "ENCODING" property parameter MUST be removed, and the value MUST be base64 decoded.

When base64 encoding is used, it MUST conform to Section 4 of [RFC4648], which is the base64 method used in [RFC5545].

One key difference in the formatting of values used in iCalendar and JSCalendar is that, in JSCalendar, the specification uses date/time values aligned with the extended format of [ISO.8601.2004], which is more commonly used in Internet applications that make use of the JSON format. The sections of this document describing the various date and time formats contain more information on the use of the complete representation, reduced accuracy, or truncated representation.

3. Translating iCalendar components to JSCalendar

This section is an alphabetic list of [RFC5545] components and how they are mapped to JSCalendar.

At present VFREEBUSY and VJOURNAL are not mapped in jscalendar.

Jenkins, et al. Expires January 10, 2022 [Page 6] Internet-Draft JSCalendar July 2021

3.1. VALARM

An [RFC5545] VALARM component is mapped to a member of a JSCalendar "alerts" object with a type of "Alert" and a small id.

BEGIN: VEVENT ... BEGIN: VALARM ... END: VALARM BEGIN: VALARM ... END: VALARM END: VEVENT

maps to

{ "@type": "Event", ... "alerts": { "1": { "@type": "Alert", ... }, "2": { "@type": "Alert", ... } } }

The [RFC5545] VALARM has a number of problems which are not carried over into JSCalendar. Clients tend to choose how, and in some cases when to notify the user.

For example, if the user has a smart- they may get tapped on the wrist. The method of notification may depend on which device is being used and the context, for example a meeting or driving.

Also, many clients are taking into consideration the travel time and notifying the user earlier if it seems necessary.

Specifying that a client should send emails to all attendees is both annoying and dangerous. Attendees have their own preferences for how and when they should be notified.

Jenkins, et al. Expires January 10, 2022 [Page 7] Internet-Draft JSCalendar July 2021

Accordingly, the specification only allows for "display" and "email" actions and - other than specifying when - does not allow much else. Clients and/or servers will generally use the associated event or task title as identification. User preferences generally indicate what actions they prefer.

An [RFC5545] ACTION property can take the defined values "AUDIO" / "DISPLAY" / "EMAIL" whereas the JSCalendar "action" property only supports "display" and "email".

An "AUDIO" alarm SHOULD be mapped to a "display" alert. Any attachment MUST be ignored.

The [RFC5545] example VALARMs will be mapped as follows, assuming they are all in the same event:

BEGIN:VEVENT ... BEGIN:VALARM TRIGGER;VALUE=DATE-TIME:19970317T133000Z REPEAT:4 DURATION:PT15M ACTION:AUDIO ATTACH;FMTTYPE=audio/basic:ftp://example.com/pub/ sounds/bell-01.aud END:VALARM BEGIN:VALARM TRIGGER:-PT30M REPEAT:2 DURATION:PT15M ACTION:DISPLAY DESCRIPTION:Breakfast meeting with executive\n team at 8:30 AM EST. END:VALARM BEGIN:VALARM TRIGGER;RELATED=END:-P2D ACTION:EMAIL ATTENDEE:mailto:[email protected] SUMMARY:*** REMINDER: SEND AGENDA FOR WEEKLY STAFF MEETING *** DESCRIPTION:A draft agenda needs to be sent out to the attendees to the weekly managers meeting (MGR-LIST). Attached is a pointer the document template for the agenda file. ATTACH;FMTTYPE=application/msword:http://example.com/ templates/agenda.doc END:VALARM END:VEVENT

maps to

Jenkins, et al. Expires January 10, 2022 [Page 8] Internet-Draft JSCalendar July 2021

{ "@type": "Event", ... "alerts": { "1": { "@type": "Alert", "action": "display", "trigger": { "@type": "AbsoluteTrigger", "when": "19970317T133000Z" } }, "2": { "@type": "Alert", "action": "display", "trigger": { "@type": "OffsetTrigger", "offset": "-PT30M" } } "3": { "@type": "Alert", "action": "email", "trigger": { "@type": "OffsetTrigger", "offset": "-P2D", "relativeTo": "end" } } } }

Note that the ATTACH, ATTENDEE, DESCRIPTION, DURATION, REPEAT and SUMMARY properties have been dropped.

3.2. VCALENDAR

A [RFC5545] VCALENDAR component may be mapped to a JSCalendar object with a type of "jsgroup".

Jenkins, et al. Expires January 10, 2022 [Page 9] Internet-Draft JSCalendar July 2021

BEGIN: VCALENDAR PRODID:-//ABC Corporation//NONSGML My Product//EN ... END: VCALENDAR

maps to

{ "@type": "jsgroup", "prodid": "-//ABC Corporation//NONSGML My Product//EN", ... }

Note that a single Event or Task MAY be converted without a surrounding JSGroup if the VCALENDAR component only contains PRODID and CALSCALE properties. In this case the prodid can go in the Event or Task. The CALSCALE property is dropped - there is no equivalence in JSCalendar.

3.3. VEVENT

A [RFC5545] VEVENT component is mapped to a JSCalendar object with a type of "Event".

BEGIN: VEVENT ... END: VEVENT

maps to

{ "@type": "Event", ... }

3.4. VLOCATION

A [draft-ietf-calext-eventpub-extensions] VLOCATION component is mapped to a JSCalendar object with a type of "Location". Any properties within the VLOCATION must be mapped as described below.

Jenkins, et al. Expires January 10, 2022 [Page 10] Internet-Draft JSCalendar July 2021

BEGIN: VEVENT ... BEGIN: VLOCATION ... END: VLOCATION END: VEVENT

maps to

{ "@type": "jsevent", ... "locations": { "1": { "@type": "Location", ... } } }

3.5. VTIMEZONE, STANDARD, DAYLIGHT

A [RFC5545] VTIMEZONE component is mapped to a member of a JSCalendar "timezones" object with a type of "TimeZone" and an id which follows the restrictions specified.

The STANDARD and DAYLIGHT components map to JSCalendar TimeZoneRule objects as members of the

Note that

o There is no current approach for defining standalone sets of timezones.

o Timezones defined in the IANA timezone database SHOULD NOT be redefined in the object. Only custom timezones will be defined.

Jenkins, et al. Expires January 10, 2022 [Page 11] Internet-Draft JSCalendar July 2021

BEGIN: VTIMEZONE TZID: Example/Somewhere ... END: VTIMEZONE BEGIN: VTIMEZONE TZID: Example/Somewhere-else ... END: VTIMEZONE BEGIN: VEVENT ... END: VEVENT

maps to

{ "@type": "jsevent", ... "timezones": { "/Example/Somewhere: { "@type": "TimeZone", ... }, "/Example/Somewhere-else": { "@type": "TimeZone", ... } } }

3.6. VTODO

A [RFC5545] VTODO component is mapped to a JSCalendar object with a type of "jstask".

BEGIN: VTODO ... END: VTODO

maps to

{ "@type": "jstask", ... }

Jenkins, et al. Expires January 10, 2022 [Page 12] Internet-Draft JSCalendar July 2021

4. Translating iCalendar properties to JSCalendar

This section is an alphabetic list of [RFC5545] and [RFC7986] properties and how they are mapped to JSCalendar.

4.1. ATTACH

A [RFC5545] ATTACH allows for two types of attachment:

o A uri value

o A binary value

Both map to a JSCalendar "link" object with a "rel" of "enclosure" and the "href" set to the value of the property.

If the FMTTYPE parameter is set then add a JSCalendar "contentType" property to the link object.

For a binary value use a base64 data uri.

For an example of a recurring event with ATTACH see Section 6.1

4.2. ATTENDEE

An [RFC5545] ATTENDEE maps to the JSCalendar "participant" property with a JSCalendar "role" of "attendee". The value for role should always be set.

In the simplest case a JSCalendar "participant" property will be created and added to the JSCalendar "participants" property.

The value of the ATTENDEE property is used to add an "imip" method to the JSCalendar "sendTo" property. The value of the entry will be the ATTENDEE property value.

For example:

Jenkins, et al. Expires January 10, 2022 [Page 13] Internet-Draft JSCalendar July 2021

... ATTENDEE:mailto:[email protected] ...

maps to

{ ... "participants": { "be450b70-9bf7-4f6e-8f65-971ede566ce3": { "@type": "Participant", "sendTo": { "imip": "[email protected]" }, ... }

The attendee parameters are mapped to JSCalendar "participant" properties as follows:

CN: The value of the CN parameter is used to set the JSCalendar "name" property.

CUTYPE: This maps on to the JSCalendar "kind" property as follows:

INDIVIDUAL "individual"

GROUP "group"

RESOURCE "resource"

ROOM "location"

UNKNOWN No value

Any other value should be converted to lower case and assigned to the JSCalendar "kind" property.

DELEGATED-FROM: Split the value at any commas and add each resulting element to the JSCalendar "delegatedFrom" property

DELEGATED-TO: Split the value at any commas and add each resulting element to the JSCalendar "delegatedFrom" property

DIR: If non-null look in the participant "links" property for a JSCalendar "link" property with an href with the same value as the

Jenkins, et al. Expires January 10, 2022 [Page 14] Internet-Draft JSCalendar July 2021

DIR parameter. You may need to search the current override and the master.

If none is found create a new one with the JSCalendar "href" property set to the value of the DIR parameter and the JSCalendar "rel" property set to "alternate"

LANG: set the JSCalendar "language" property to the value of the LANG parameter.

MEMBER: If this is set there should be a corresponding ATTENDEE object with a value equal to the value of the member parameter. If not it is appropriate to skip this parameter.

If there is a corresponding ATTENDEE then there should be a corresponding JSCalendar "participant" property. This suggests that CUTYPE=GROUP ATTENDEE properties should be processed ahead of the others.

Locate the JSCalendar "participant" property for the group. This may be in the current override or in the master. Add the id to the current participants JSCalendar "memberOf" property.

PARTSTAT: If the PARTSTAT parameter is set and is not "NEEDS-ACTION" then set the JSCalendar "participationStatus" property to the lower-cased value of the PARTSTAT.

ROLE: This is mapped to the JSCalendar "roles" property as follows:

CHAIR "attendee" and "chair"

REQ-PARTICIPANT "attendee"

OPT-PARTICIPANT "attendee" and "optional"

NON-PARTICIPANT "informational"

Any other value should be converted to lower case and added to the JSCalendar "roles" property.

RSVP: If the value of the RSVP parameter is TRUE set the JSCalendar "expectReply" property to "true" otherwise omit it.

SCHEDULE-AGENT: If the value is "CLIENT" (ignoring case) set the JSCalendar "scheduleAgent" property to "client" otherwise omit it.

Jenkins, et al. Expires January 10, 2022 [Page 15] Internet-Draft JSCalendar July 2021

SCHEDULE-FORCE-SEND: Set the JSCalendar "scheduleForceSend" property to the lower-cased value of the [RFC6638] SCHEDULE-FORCE-SEND parameter.

SCHEDULE-STATUS: Split the value at any commas and add each resulting element to the JSCalendar "scheduleStatus" property.

SENT-BY: The value of the SENT-BY parameter is used to set the JSCalendar "invitedBy" property.

4.3. CALSCALE

A [RFC5545] CALSCALE has no equivalence in JSCalendar. It is ignored.

4.4. CATEGORIES

These map on to the JSCalendar "keywords" property with each category being the key to an entry.

... CATEGORIES:APPOINTMENT,EDUCATION CATEGORIES:MEETING ...

maps to

... "keywords": { "APPOINTMENT": true, "EDUCATION": true, "MEETING": true }, ...

4.5. CLASS

Maps to the "privacy" property. The iCalendar property value maps to the JSCalendar value as follows:

CONFIDENTIAL "secret"

PRIVATE "private"

PUBLIC "public"

iana-token and x-name verbatim copy

Jenkins, et al. Expires January 10, 2022 [Page 16] Internet-Draft JSCalendar July 2021

4.6. COLOR

Maps to the "color" property. Copy the verbatim value.

4.7. COMMENT

There is no direct mapping for this property which may appear multiple times in [RFC5545].

For a scheduling reply it is presumably a message by the participant so the value or values should be used to set the JSCalendar "participantComment" property.

4.8. COMPLETED

Set the JSCalendar "progress" property to "completed" and the "progressUpdated" property to the reformatted date/time.

... COMPLETED: "20101010T101010Z" ...

maps to

... "progressUpdated": "2010-10-10T10:10:10Z", "progress": "completed", ...

4.9. CONCEPT

This [draft-ietf-calext-ical-relations] property may appear multiple times in components.

Each instance of the property is mapped on to a member of the JSCalendar "categories" property.

Jenkins, et al. Expires January 10, 2022 [Page 17] Internet-Draft JSCalendar July 2021

... CONCEPT:http://example.com/event-types/arts/music CONCEPT:http://example.com/performance-types/arts/live ...

maps to

... "categories": { "http://example.com/event-types/arts/music": true, "http://example.com/performance-types/arts/live": true } ...

4.10. CONFERENCE

Maps to a "VirtualLocation" object. The property value maps to the "uri" property of the virtual location.

Mapping parameters:

FEATURE: Maps to the "features" property of the virtual location.

LABEL: Maps to the "name" property of the virtual location.

LANGUAGE: No mapping.

4.11. CONTACT

The CONTACT property is mapped on to a participant object with a "roles" property of "contact" and an "order" property of 1 (one). This defines the participant as a primary contact.

Mapping parameters:

ALTREP Use the same process as for the ATTENDEE DIR parameter: create a link property with the "rel" property set to "alternate" and the "href" property set to the value of the ALTREP parameter. Then add the link to the participants "links" property.

LANG Set the participants "language" property.

For an example see Section 6.2

Jenkins, et al. Expires January 10, 2022 [Page 18] Internet-Draft JSCalendar July 2021

4.12. CREATED

The CREATED property is mapped on to a "created" property with a json formatted form of the date. Example:

BEGIN:VEVENT ... CREATED:19960329T133000Z ... END:VEVENT

maps to

{ "@type": "jsevent", ... "created": "1996-03-29T13:30"00Z", ... }

4.13. DESCRIPTION

Copy the value, preprocessed according to Section 2 into the "description" property.

Mapping parameters:

ALTREP No mapping.

LANG Use the "locale" property.

Example:

Jenkins, et al. Expires January 10, 2022 [Page 19] Internet-Draft JSCalendar July 2021

BEGIN:VEVENT ... DESCRIPTION:We are having a meeting all this week at 12 pm fo r one hour\, with an additional meeting on the first day 2 h ours long.\nPlease bring your own lunch for the 12 pm meetin gs. ... END:VEVENT

maps to

{ "@type": "jsevent", ... "description": // Note: comments and string concatenation are not // allowed per the JSON specification and is used here // to avoid long lines. "We are having a meeting all this week at 12 pm for one " + "hour, with an additional meeting on the first day 2 " + "hours long.\nPlease bring your own lunch for the 12 pm " + "meetings.", ... }

4.14. DTEND, DTSTART, DUE, DURATION

If the DTSTART is a DATE only property then add the JSCalendar showWithoutTime property with the value set to "true". The JSCalendar "start" property is set with zero time values.

If the DTSTART has a TZID parameter then set the JSCalendar "timeZone" property to the value of TZID.

If the DTSTART has a UTC value then set the JSCalendar "timeZone" property to the value "Etc/UTC". The JSCalendar "start" property is set without any UTC indicator.

JSCalendar has no equivalent to DTEND. If the component has a DTEND then calculate a value for "DURATION" from that property and DTSTART and proceed as below.

If the DTEND has a TZID parameter with a value that differs from the DTSTART TZID parameter then a "location" object should be created with a "relativeTo" property set to "end" and a "timezone" property set to the value of the "TZID" parameter.

Note that a task is not required to have a DTSTART so the JSCalendar "timezone" property needs to be set from the DUE property.

Jenkins, et al. Expires January 10, 2022 [Page 20] Internet-Draft JSCalendar July 2021

Convert a DURATION property to the JSCalendar duration.

Example - DTSTART and DTEND in same timezone:

BEGIN:VEVENT ... DTSTART;TZID=America/New_York:20170315T150000 DTEND;TZID=America/New_York:20170315T160000

... END:VEVENT

maps to

{ "@type": "jsevent", ... "start": "2017-03-15T15:00:00", "timeZone": "America/New_York", "duration": "PT1H" ... }

Example - DTSTART and DTEND in different timezone:

Jenkins, et al. Expires January 10, 2022 [Page 21] Internet-Draft JSCalendar July 2021

BEGIN:VEVENT ... DTSTART;TZID=America/New_York:20170315T150000 DTEND;TZID=America/LosAngeles:20170315T190000

... END:VEVENT

maps to

{ "@type": "jsevent", ... "start": "2017-03-15T15:00:00", "timeZone": "America/New_York", "duration": "PT7H" ... "locations": { "1": { "@type": "location", "relatedTo": "end", "timeZone": "America/Los_Angeles" } } }

Example - 3 day event:

BEGIN:VEVENT ... DTSTART;VALUE=DATE:20210315 DTEND;VALUE=DATE:20210318

... END:VEVENT

maps to

{ "@type": "jsevent", ... "start": "2017-03-15T00:00:00", "duration": "P3D", "showWithoutTime": true, ... }

Jenkins, et al. Expires January 10, 2022 [Page 22] Internet-Draft JSCalendar July 2021

4.15. ESTIMATED-DURATION

Copy the ESTIMATED-DURATION value into the JSCalendar "estimatedDuration" property.

For example:

... ESTIMATED-DURATION:PT18H ...

maps to

... "estimatedDuration": "PT18H" ...

4.16. EXDATE

Create a patch object with the recurrence id set from the EXDATE value. Add a single JSCalendar "excluded" property with the value set to true. There MUST NOT be any other properties set - other than "@type".

4.17. EXRULE

Maps to the "excludedRecurrenceRules" property. Also see Section 4.32.

4.18. DTSTAMP and LAST-MODIFIED

The mapping depends on whether or not the component is a scheduling entity.

Not a scheduling entity: The [RFC5545] DTSTAMP and LAST-MODIFIED properties have essentially the same meaning. If both are present use the value of the latest for the "updated" property. Otherwise set from whichever is present.

Is a scheduling entity: DTSTAMP should be used to set the "ScheduleUpdated" property in the "participant" object for the attendee.

If present LAST-MODIFIED should be used to set the "updated" property - otherwise set it from the DTSTAMP.

Jenkins, et al. Expires January 10, 2022 [Page 23] Internet-Draft JSCalendar July 2021

4.19. GEO

Maps to a Location object, with only the "coordinates" property set. Note that the JSCalendar coordinates property value MUST be a valid "geo" URI, so replace the ";" character in the iCalendar value with "," and prepend the resulting string with "geo:".

4.20. IMAGE

Maps to a Link object with the iCalendar property value mapped to the location "href" property, and the "rel" property set to "icon".

For a binary value use a base64 data uri in the "href" property.

Mapping parameters:

ALTREP No mapping.

FMTTYPE Maps to the "contentType" property of the Link object.

DISPLAY Maps to the "display" property of the Link object. The property values "BADGE", "GRAPHIC", "FULLSIZE" and "THUMBNAIL" map to their lower-case equivalent in JSCalendar.

4.21. LOCATION

If any [draft-ietf-calext-eventpub-extensions] "VLOCATION" components are present, then the [RFC5545]"LOCATION" property should be ignored.

To map the property create a "locations" property with a single "location" and set the "description" property to the value of the [RFC5545]"LOCATION" property.

Mapping parameters:

ALTREP Maps to a Link object in the Location "links" property, with the "href" property set to the parameter value.

4.22. METHOD

Maps to the "method" property of the JSCalendar object. The JSCalendar property value is the lowercase equivalent of the iCalendar property value.

Jenkins, et al. Expires January 10, 2022 [Page 24] Internet-Draft JSCalendar July 2021

4.23. ORGANIZER

Maps to the "replyTo" property of the JSCalendar object. An iCalendar property value in the "mailto:" URI scheme, maps to the "imip" method, any other value maps to the "other" method.

If the iCalendar component also contains an ATTENDEE with the same calendar user address then map that ATTENDEE as defined in Section 4.2 and add the "owner" role to the Participant "roles" property. Otherwise, use the ORGANIZER property to map to a Participant object. The "roles" property of the Participant MUST only contain the "owner" role and the "expectReply" property value MUST be "false". Any iCalendar parameters map as defined for ATTENDEE.

TBD: SENT-BY parameter. Example.

4.24. PERCENT-COMPLETE

For all methods other than REPLY (or no method), the PERCENT-COMPLETE applies to the VTODO as a whole. In this case it the value is used to set the JSCalendar "percentComplete" property in the task object.

BEGIN: VCALENDAR PRODID:-//ABC Corporation//NONSGML My Product//EN METHOD:PUBLISH BEGIN:VTODO ... PERCENT-COMPLETE:39 END:VTODO END: VCALENDAR

maps to

{ "@type": "jstask", "prodid": "-//ABC Corporation//NONSGML My Product//EN", ... "percentComplete": 39 }

PERCENT-COMPLETE in a REPLY is used to indicate the level of completeness of the ATTENDEE. There should only be a single ATTENDEE in the VTODO object.

As ever recurrences complicate matters. For a non-recurring event or an override that contains the single participant, set the JSCalendar

Jenkins, et al. Expires January 10, 2022 [Page 25] Internet-Draft JSCalendar July 2021

"percentComplete" property in the JSCalendar "participant" object representing the attendee.

BEGIN: VCALENDAR PRODID:-//ABC Corporation//NONSGML My Product//EN METHOD:REPLY BEGIN:VTODO ... ATTENDEE:mailto:[email protected] PERCENT-COMPLETE:39 END:VTODO END: VCALENDAR

maps to

{ "@type": "jstask", "prodid": "-//ABC Corporation//NONSGML My Product//EN", ... "participants": { "be450b70-9bf7-4f6e-8f65-971ede566ce3": { "@type": "Participant", "sendTo": { "imip": "mailto:[email protected]" }, "percentComplete": 39, "roles": { "attendee": true } }, ... }

In the case of an override with the participant appearing in the master then add a patch to the override.

Jenkins, et al. Expires January 10, 2022 [Page 26] Internet-Draft JSCalendar July 2021

BEGIN: VCALENDAR PRODID:-//ABC Corporation//NONSGML My Product//EN METHOD:REPLY BEGIN:VTODO ... ATTENDEE:mailto:[email protected] END:VTODO BEGIN:VTODO ... RECURRENCE-ID:20200523T120000 ... ATTENDEE:mailto:[email protected] PERCENT-COMPLETE:39 END:VTODO END: VCALENDAR

maps to

{ "@type": "jstask", "prodid": "-//ABC Corporation//NONSGML My Product//EN", ... "participants": { "be450b70-9bf7-4f6e-8f65-971ede566ce3": { "@type": "Participant", "sendTo": { "imip": "mailto:[email protected]" }, "roles": { "attendee": true } }, "recurrenceOverrides": { "2020-05-23T12:00:00": { "participants/be4...6ce3/percentComplete": 39 }, ... } }

4.25. PRIORITY

Simply copy value into the JSCalendar "priority" property.

Jenkins, et al. Expires January 10, 2022 [Page 27] Internet-Draft JSCalendar July 2021

4.26. PRODID

For a vcalendar JSGroup object with multiple JSEvent and/or JSTask object the [RFC5545] VCALENDAR PRODID is mapped to a JSCalendar "prodid" property in the group.

When mapping to a single JSEvent and/or JSTask object the [RFC5545] VCALENDAR PRODID is mapped to a JSCalendar "prodid" property in the group

BEGIN: VCALENDAR PRODID:-//ABC Corporation//NONSGML My Product//EN BEGIN:VEVENT ... END:VEVENT END: VCALENDAR

maps to

{ "@type": "jsevent", "prodid": "-//ABC Corporation//NONSGML My Product//EN", ... }

4.27. RECURRENCE-ID

Refer to Section 5 for information on mapping recurrence ids.

4.28. RELATED-TO

This is mapped to the JSCalendar "relatedTo" property which is a map of relations with the target UID as the keys. The iCalendar relation is by default a PARENT relationship. There is no default for JSCalendar so the relationship must be explicitly specified.

The RELTYPE parameter values map to their lowercase equivalents in the "relation" property.

Also note that the iCalendar relationship types are not identical. CHILD and PARENT map to JSCalendar "child" and "parent" but the best match for iCalendar SIBLING is "next"

Jenkins, et al. Expires January 10, 2022 [Page 28] Internet-Draft JSCalendar July 2021

... RELATED-TO:[email protected] RELATED-TO;RELTYPE=SIBLING: [email protected] ...

maps to

"relatedTo" : { "[email protected]" : { "@type" : "Relation", "relation" : { "parent" : true } }, "[email protected]" : { "@type" : "Relation", "relation" : { "next" : true } }, }, { "@type": "jsevent", "prodid": "-//ABC Corporation//NONSGML My Product//EN", ... }

4.29. REQUEST-STATUS

Copy the value into the JSCalendar "requestStatus" property.

4.30. RESOURCES

The RESOURCES property value is a comma-separated list of resources. First split this into the separate resource names and then each resource is mapped on a participant object with a "kind" property of "resource" and the "name" property set to the resource name.

Mapping parameters:

ALTREP Use the same process as for the ATTENDEE DIR parameter: create a link property with the "rel" property set to "alternate" and the "href" property set to the value of the ALTREP parameter. Then add the link to the participants "links" property.

LANG Set the participants "language" property.

Jenkins, et al. Expires January 10, 2022 [Page 29] Internet-Draft JSCalendar July 2021

For an example see Section 6.3

4.31. RDATE

If the RDATE has a RANGE=THISANDFUTURE parameter then the recurrence MUST be split at this RDATE.

Truncate the original object before this RDATE, create a new master representing the object and link them by setting the jscalendar "relatedTo" property in both.

Otherwise create a patch object with the recurrence id set from the RDATE value. If the instance has overrides the differences will also be set in the object.

4.32. RRULE

Each RRULE is converted to an object in the JSCalendar "recurrenceRules" property. Each entry has the type "RecurrenceRule".

... RRULE:......

maps to

... "recurrenceRules" : [{ "@type" : "RecurrenceRule", ... }], ...

The recurrence rule object has one property for each element of the recurrence rule. The iCalendar rule has to be parsed out and the individual jscalendar property values set. Most take the same type but there are exceptions.

FREQ (mandatory) Copy into the jscalendar "frequency" property converted to lowercase.

INTERVAL If present and not 1 copy into the jscalendar "interval" property.

RSCALE If present copy into the jscalendar "rscale" property converted to lowercase.

Jenkins, et al. Expires January 10, 2022 [Page 30] Internet-Draft JSCalendar July 2021

SKIP If present copy into the jscalendar "skip" property converted to lowercase.

WKST If present copy into the jscalendar "firstDayOfWeek" property converted to lowercase.

BYDAY If present each element becomes an entry in the jsCalendar "byDay" propety. This is an array of NDay objects which may have 2 properties:

day The two character weekday abbreviation.

nthOfPeriod If the weekday abbreviation is preceded by a signed integer value set the jscalendar "nthOfPeriod" property.

... RRULE:...,BYDAY=-1MO ...

maps to

... "recurrenceRules" : [{ "@type" : "RecurrenceRule", ... "byday": [{ "day": "mo", "nthOfPeriod": -1 }] ... }], ...

BYMONTHDAY If present each element will be an element in the jscalendar "byMonthDay" property.

BYMONTH If present each element will be an element in the jscalendar "byMonth" property.

Note that the iCalendar values are numeric but the JSCalendar values are strings. This is because of the possible "L" suffix for leap months.

BYYEARDAY If present each element will be an element in the jscalendar "byYearDay" property.

BYWEEKNO If present each element will be an element in the jscalendar "byWeekNo" property.

Jenkins, et al. Expires January 10, 2022 [Page 31] Internet-Draft JSCalendar July 2021

BYHOUR If present each element will be an element in the jscalendar "byHour" property.

BYMINUTE If present each element will be an element in the jscalendar "byMinute" property.

BYSECOND If present each element will be an element in the jscalendar "bySecond" property.

BYSETPOS If present each element will be an element in the jscalendar "bySetPosition" property.

COUNT If present set in the jscalendar "count" property.

UNTIL If present set the jscalendar "until" property with the appropriately reformatted value. If the is no time part append a 0 time and reformat as a jscalendar local date/time.

Some examples:

... RRULE:FREQ=DAILY;COUNT=10 ...

maps to

... "recurrenceRules" : [{ "@type" : "RecurrenceRule", "frequency": "daily", "count": 10 }], ...

Jenkins, et al. Expires January 10, 2022 [Page 32] Internet-Draft JSCalendar July 2021

... RRULE:FREQ=YEARLY;UNTIL=20220512T140000Z; BYMONTH=1;BYDAY=SU,MO,TU,WE,TH,FR,SA ...

maps to

... "recurrenceRules" : [{ "@type" : "RecurrenceRule", "frequency": "yearly", "byMonth": ["1"], "byDay": [{ "day": "su" }, } "day": "mo" }, } "day": "tu" }, } "day": "we" }, } "day": "th" }, } "day": "fr" }, } "day": "sa" }], "until": "2022-05-12T10:00:00" }], ...

Jenkins, et al. Expires January 10, 2022 [Page 33] Internet-Draft JSCalendar July 2021

... RRULE:FREQ=MONTHLY;COUNT=6;BYDAY=-2MO ...

maps to

... "recurrenceRules" : [{ "@type" : "RecurrenceRule", "frequency": "monthly", "byDay": [{ "day": "mo", "nthOfPeriod": -2 }], "count": 6 }], ...

4.33. SEQUENCE

Copy the value into the JSCalendar "sequence" property.

4.34. STATUS

For a VEVENT copy the lower-cased value into the JSCalendar "status" property.

For a VTODO copy the lower-cased value into the JSCalendar "progress" property.

4.35. STRUCTURED-DATA

This property is mapped on to a JSCalendar "link" object with the value mapped on to the JSCalendar "href" property in a manner depending on the "STRUCTURED-DATA" "VALUE" parameter:

VALUE=TEXT Copy the value as a [RFC2397] data uri either as plain text or by encoding as a base64 value. If plain text the value may need escaping as per [RFC2397].

VALUE=BINARY Copy the value as a [RFC2397] data uri speifying base64 encoding.

VALUE=URI Copy the value as-is into the href.

The "STRUCTURED-DATA" "SCHEMA" parameter is mapped on to a JSCalendar "schema" property within the link object.

Jenkins, et al. Expires January 10, 2022 [Page 34] Internet-Draft JSCalendar July 2021

The "STRUCTURED-DATA" "FMTTYPE" parameter is mapped on to a JSCalendar "contentType" property within the link object.

For example:

... STRUCTURED-DATA;FMTTYPE=application/ld+json; SCHEMA="https://schema.org/SportsEvent"; VALUE=TEXT:{\n "@context": "http://schema.org"\,\n "@type": "SportsEvent"\,\n "homeTeam": "Pittsburgh Pirates"\,\n "awayTeam": "San Francisco Giants"\n }\n ...

maps to (with data truncated)

... "links": { "1": { "@type" : "Link", "contentType": "application/ld+json", "schema": "https://schema.org/SportsEvent", "href": "data:base64;ewogICAgICAgICJAY29udGV4dCI6IC..." } } ...

4.36. SUMMARY

Copy the value into the JSCalendar "title" property.

Mapping parameters:

ALTREP No mapping.

LANG Use the "locale" property.

4.37. TRANSP

If the value of the TRANSP property (ignoring case) is "opaque" set the JSCalendar "freeBusyStatus" property to the value "busy".

Otherwise set the JSCalendar "freeBusyStatus" property to the value "free".

Jenkins, et al. Expires January 10, 2022 [Page 35] Internet-Draft JSCalendar July 2021

4.38. UID

Copy the value into the JSCalendar "uid" property.

4.39. URL

Maps to a Link object in the JSCalendar object’s "links" property, with the URL property value mapped to the Link "href" property.

5. Translating iCalendar Recurrences

5.1. Translating iCalendar Recurrences: Simple objects with overrides

A simple object with overrides will be converted to a jsCalendar master event with the rules, recurrence dates and exclusion dates translated appropriately.

Overrides MUST be mapped on to a jsCalendar patch object and added to the "recurrenceOverrides" property of the master event with the key being the value of the iCalendar RECURRENCE-ID translated to a json format.

Any override property with the same value as the master SHOULD be ommitted. Remaining properties MAY be added in full. Where appropriate, differences SHOULD be expressed as a patch.

This can result in a significant reduction in size for objects with small changes to overrides, for example changing the participation status of an attendee.

5.2. Translating iCalendar Recurrences: Overrides with no master

When inviting an attendee to a single instance of a recurring event, only that override should be sent to the attendee. In this case the override should be a complete jsCalendar object with the type set to the type of the master.

Additionally, there MUST be a recurrenceId property set to the value of the recurrence id for that override. If the timezone of the start of the instance is different from the master value, then there must also be a "recurrenceIdTimeZone" property set to the start timezone of the master.

6. Translating iCalendar: Further examples

This section provides more complete examples of translating from [RFC5545] to JSCalendar.

Jenkins, et al. Expires January 10, 2022 [Page 36] Internet-Draft JSCalendar July 2021

As usual note that json string values may be split because of line width limits. This is not legal json.

6.1. Recurring event with ATTACH

This is an example of a recurring event with overrides. The first override removes an ATTACH property and adds an ATTACH property. The second override removes all ATTACH properties.

BEGIN:VCALENDAR CALSCALE:GREGORIAN PRODID:-//example.org//EN VERSION:2.0 BEGIN:VEVENT DTSTAMP:20200522T142047Z DTSTART;TZID=America/New_York:20200522T120000 DURATION:PT1H RRULE:FREQ=DAILY;COUNT=8 SUMMARY:recurring daily 8 times UID:6252D6C40A8308BFE25BBDErecur-1 ATTACH;FMTTYPE=text/plain:http://example.org/doc1.txt ATTACH;FMTTYPE=text/plain:http://example.org/doc2.txt ATTACH;FMTTYPE=text/plain:http://example.org/doc3.txt END:VEVENT BEGIN:VEVENT DTSTAMP:20200522T142047Z DTSTART;TZID=America/New_York:20200523T120000 DURATION:PT1H RECURRENCE-ID;TZID=America/New_York:20200523T120000 SUMMARY:recurring daily 8 times UID:6252D6C40A8308BFE25BBDErecur-1 ATTACH;FMTTYPE=text/plain:http://example.org/doc2.txt ATTACH;FMTTYPE=text/plain:http://example.org/doc3.txt ATTACH;FMTTYPE=text/plain:http://example.org/doc4.txt END:VEVENT BEGIN:VEVENT DTSTAMP:20200522T142047Z DTSTART;TZID=America/New_York:20200524T120000 DURATION:PT1H RECURRENCE-ID;TZID=America/New_York:20200524T120000 SUMMARY:recurring daily 8 times UID:6252D6C40A8308BFE25BBDErecur-1 END:VEVENT END:VCALENDAR

maps to

{

Jenkins, et al. Expires January 10, 2022 [Page 37] Internet-Draft JSCalendar July 2021

"prodId": "//example.org//EN", "entries": [ { "links": { "1": { "@type": "Link", "rel": "enclosure", "contentType": "text/plain", "href": "http://example.org/doc1.txt" }, "2": { "@type": "Link", "rel": "enclosure", "contentType": "text/plain", "href": "http://example.org/doc2.txt" }, "3": { "@type": "Link", "rel": "enclosure", "contentType": "text/plain", "href": "http://example.org/doc3.txt" } }, "created ": "2020-05-23T17:04:50Z", "start": "2020-05-22T12:00:00", "timeZone": "America/New_York", "duration": "PT1H", "title": "recurring daily 8 times", "uid": "6252D6C40A8308BFE25BBDErecur-1", "recurrenceRules": [ { "@type": "RecurrenceRule", "frequency": "daily", "count": 8 } ], "recurrenceOverrides": { "2020-05-23T12:00:00": { "recurrenceId": "2020-05-23T12:00:00", "links/d4a618d4-929c-4c81-ae5b-322afe407a00": null, "links/fb75b76a-a159-4a86-bd3d-7ace6b39c6c3": { "@type": "Link", "rel": "enclosure", "contentType": "text/plain", "href": "http://example.org/doc4.txt" } }, "2020-05-24T12:00:00": {

Jenkins, et al. Expires January 10, 2022 [Page 38] Internet-Draft JSCalendar July 2021

"recurrenceId": "2020-05-24T12:00:00", "links/d4a618d4-929c-4c81-ae5b-322afe407a00": null, "links/6c54e72e-3413-487c-ae14-fb318a90db43": null, "links/44087e9a-132c-4a5d-b25d-4ce580edb004": null } } } ] }

6.2. Simple event with CONTACT

This example shows the conversion of a simple event with a single CONTACT property in JSCalendar.

BEGIN:VCALENDAR CALSCALE:GREGORIAN PRODID:-//Example//EN VERSION:2.0 BEGIN:VEVENT DTSTAMP:20200522T142047Z DTSTART;TZID=America/New_York:20200622T120000 DURATION:PT1H SUMMARY:event with contact UID:6252D6C40A8308BFE25BBEFcontact-1 CONTACT;ALTREP="ldap://example.com:6666/o=ABC%20Industries\, c=US???(cn=Jim%20Dolittle)":Jim Dolittle\, ABC Industries\, +1-919-555-1234 END:VEVENT END:VCALENDAR

translates to

{ "@type": "jsgroup", "prodId": "//Example.org//Example V3.13.2//EN", "entries": [ { "@type": "jsevent", "participants": { "40288108-733187c1-0173-3188007b-00000001": { "@type": "Participant", "roles": { "contact": true }, "description": "Jim Dolittle, ABC Industries,\ +1-919-555-1234", "links": {

Jenkins, et al. Expires January 10, 2022 [Page 39] Internet-Draft JSCalendar July 2021

"1": { "@type": "Link", "href": "ldap://example.com:6666/o=ABC%20Industries,\ c=US???(cn=Jim%20Dolittle)", "rel": "alternate" } } } }, "created ": "2020-07-09T03:04:23Z", "start": "2020-06-22T12:00:00", "timeZone": "America/New_York", "duration": "PT1H", "title": "event with contact", "uid": "6252D6C40A8308BFE25BBEFcontact-1" } ] }

6.3. Simple event with RESOURCES

TBD

6.4. Recurring event. Attendees only in overrides

In this more complex example there is no ORGANIZER or ATTENDEEs in the master event. There are overrides which invite one or more attendees.

For one overrride the ORGANIZER is also an ATTENDEE. In the other that is not the case. This is reflected in the "roles" property for the organizer.

Note that each override has its own "participants" property and the first has a links property to handle the DIR parameter on one attendee.

BEGIN:VCALENDAR PRODID://Example.org//Example V3.13.2//EN VERSION:2.0 BEGIN:VEVENT CREATED:20200704T035515Z DURATION:PT1H DTSTAMP:20200704T035706Z DTSTART;TZID=America/New_York:20200522T120000 LAST-MODIFIED:20200704T035706Z SUMMARY:recurring daily 8 times UID:6252D6C40A8308BFE25BBEFrecur1-1

Jenkins, et al. Expires January 10, 2022 [Page 40] Internet-Draft JSCalendar July 2021

RRULE:FREQ=DAILY;COUNT=8 END:VEVENT BEGIN:VEVENT RECURRENCE-ID;TZID=America/New_York:20200523T120000 ATTENDEE:mailto:[email protected] ATTENDEE;RSVP=TRUE;SCHEDULE-STATUS=1.2;DIR="http://example.org/ vcards/vbede.vcf":mailto:[email protected] CREATED:20200704T035515Z DURATION:PT1H DTSTAMP:20200704T035706Z DTSTART;TZID=America/New_York:20200523T120000 LAST-MODIFIED:20200704T035706Z ORGANIZER:mailto:[email protected] SUMMARY:recurring daily 8 times UID:6252D6C40A8308BFE25BBEFrecur1-1 END:VEVENT BEGIN:VEVENT RECURRENCE-ID;TZID=America/New_York:20200524T120000 ATTENDEE;RSVP=TRUE;SCHEDULE-STATUS=1.2:mailto:[email protected] ATTENDEE;RSVP=TRUE;SCHEDULE-STATUS=1.2:mailto:[email protected] CREATED:20200704T035515Z DURATION:PT1H DTSTAMP:20200704T035706Z DTSTART;TZID=America/New_York:20200524T120000 LAST-MODIFIED:20200704T035706Z ORGANIZER:mailto:[email protected] SUMMARY:recurring daily 8 times UID:6252D6C40A8308BFE25BBEFrecur1-1 END:VEVENT END:VCALENDAR

translates to

{ "@type": "jsgroup", "prodId": "//Example.org//Example V3.13.2//EN", "entries": [ { "@type": "jsevent", "created ": "2020-07-04T03:57:06Z", "start": "2020-05-22T12:00:00", "timeZone": "America/New_York", "duration": "PT1H", "title": "recurring daily 8 times", "uid": "6252D6C40A8308BFE25BBEFrecur1-1", "recurrenceRules": [ { "@type": "RecurrenceRule",

Jenkins, et al. Expires January 10, 2022 [Page 41] Internet-Draft JSCalendar July 2021

"frequency": "daily", "count": 8 } ], "recurrenceOverrides": { "2020-05-23T12:00:00": { "participants": { "be450b70-9bf7-4f6e-8f65-971ede566ce3": { "@type": "Participant", "sendTo": { "imip": "mailto:[email protected]" }, "roles": { "attendee": true, "owner": true } }, "a539dfe3-4463-4f28-b9de-17d3a0e99faf": { "@type": "Participant", "sendTo": { "imip": "mailto:[email protected]" }, "expectReply": true, "links": { "1": { "@type": "Link", "href": "http://example.org/vcards/vbede.vcf", "rel": "alternate" } }, "roles": { "attendee": true }, "scheduleStatus": "1.2" } }, "replyTo": { "imip": "mailto:[email protected]" } }, "2020-05-24T12:00:00": { "participants": { "daeae4cf-6f6a-4ce3-9f4d-6bd884650d3d": { "@type": "Participant", "sendTo": { "imip": "mailto:[email protected]" }, "expectReply": true,

Jenkins, et al. Expires January 10, 2022 [Page 42] Internet-Draft JSCalendar July 2021

"roles": { "attendee": true }, "scheduleStatus": "1.2" }, "a6de6de3-271f-4679-9241-1b3bca6b602d": { "@type": "Participant", "sendTo": { "imip": "mailto:[email protected]" }, "expectReply": true, "roles": { "attendee": true }, "scheduleStatus": "1.2" }, "aaa8483b-b18b-4dbd-b218-77d8db027d35": { "@type": "Participant", "sendTo": { "imip": "mailto:[email protected]" }, "roles": { "owner": true } } }, "replyTo": { "imip": "mailto:[email protected]" } } } } ] }

7. Translating JSCalendar properties to iCalendar components

This section lists JSCalendar property types that map on to [RFC5545] components.

7.1. jsevent

A JSCalendar object with a type of "jsevent" is mapped on to a [RFC5545] VEVENT component.

If it is a single VEVENT then a [RFC5545] VCALENDAR component must surround it and the JSCalendar "prodid" property will be converted to a [RFC5545] PRODID.

Jenkins, et al. Expires January 10, 2022 [Page 43] Internet-Draft JSCalendar July 2021

{ "@type": "jsevent", "prodid": "-//ABC Corporation//NONSGML My Product//EN", ... }

maps to

BEGIN: VCALENDAR PRODID:-//ABC Corporation//NONSGML My Product//EN BEGIN:VEVENT ... END:VEVENT END: VCALENDAR

When converting multiple JSEvent or JSTask objects the surrounding [RFC5545] VCALENDAR object must have a [RFC5545] PRODID set from either the JSGroup "prodid" or generated.

7.2. jsgroup

A JSCalendar object with a type of "jsgroup" is mapped on to a [RFC5545] VCALENDAR component.

Jenkins, et al. Expires January 10, 2022 [Page 44] Internet-Draft JSCalendar July 2021

{ "@type": "jsgroup", "prodid": "-//ABC Corporation//NONSGML My Product//EN", ... { "@type": "jsevent", ... } { "@type": "jsevent", ... } }

maps to

BEGIN: VCALENDAR PRODID:-//ABC Corporation//NONSGML My Product//EN BEGIN:VEVENT ... END:VEVENT BEGIN:VEVENT ... END:VEVENT END: VCALENDAR

7.3. jstask

A JSCalendar object with a type of "jstask" is mapped on to a [RFC5545] VTODO component.

If it is a single VTODO then a [RFC5545] VCALENDAR component must surround it and the JSCalendar "prodid" property will be converted to a [RFC5545] PRODID.

Jenkins, et al. Expires January 10, 2022 [Page 45] Internet-Draft JSCalendar July 2021

{ "@type": "jstask", "prodid": "-//ABC Corporation//NONSGML My Product//EN", ... }

maps to

BEGIN: VCALENDAR PRODID:-//ABC Corporation//NONSGML My Product//EN BEGIN:VTODO ... END:VTODO END: VCALENDAR

When converting multiple JSEvent or JSTask objects the surrounding [RFC5545] VCALENDAR object must have a [RFC5545] PRODID set from either the JSGroup "prodid" or generated.

7.4. timezones

The JSCalendar TimeZone objects within a "timezones" property are mapped on to [RFC5545] VTIMEZONE components within the surrounding VCALENDAR component. Each mapped TimeZone MUST only appear once.

Jenkins, et al. Expires January 10, 2022 [Page 46] Internet-Draft JSCalendar July 2021

{ "@type": "jsevent", ... "timezones": { "/Example/Somewhere: { "@type": "TimeZone", ... }, "/Example/Somewhere-else": { "@type": "TimeZone", ... } } }

maps to

BEGIN: VTIMEZONE TZID: /Example/Somewhere ... END: VTIMEZONE BEGIN: VTIMEZONE TZID: /Example/Somewhere-else ... END: VTIMEZONE BEGIN: VEVENT ... END: VEVENT

When converting multiple JSEvent or JSTask objects the surrounding [RFC5545] VCALENDAR object must have a [RFC5545] PRODID set from either the JSGroup "prodid" or generated.

7.5. alerts

Each member of a JSCalendar alerts property maps to a [RFC5545] VALARM component. Only display and email alarms are allowed in JSCalendar.

7.5.1. action

The JSCalendar "alert" property maps to the [RFC5545] ACTION property. The value SHOULD be the uppercased version if the JSCalendar "alert" property.

For example:

Jenkins, et al. Expires January 10, 2022 [Page 47] Internet-Draft JSCalendar July 2021

... "action": "display", ...

maps to

ACTION:DISPLAY

and

... "action": "email", ...

maps to

ACTION:EMAIL

7.5.2. trigger

A JSCalendar trigger with a type of "AbsoluteTrigger" maps on to a [RFC5545] TRIGGER property with a "VALUE" parameter of "DATE-TIME" and a value taken from the JSCalendar "when" property.

For example:

"trigger": { "@type": "AbsoluteTrigger", "when": "20210315T133000Z" }

maps to

TRIGGER;VALUE=DATE-TIME:20210315T133000Z

A JSCalendar trigger with a type of "OffsetTrigger" maps on to a [RFC5545] TRIGGER property with a duration value taken from the JSCalendar "offset" property.

If the JSCalendar trigger has a "relativeTo" property with the value "end" then the [RFC5545] TRIGGER property will have a RELATED=END parameter.

For example:

Jenkins, et al. Expires January 10, 2022 [Page 48] Internet-Draft JSCalendar July 2021

"trigger": { "@type": "OffsetTrigger", "offset": "-P2D", "relativeTo": "end" }

maps to

TRIGGER;RELATED=END:-P2D

and

"trigger": { "@type": "OffsetTrigger", "offset": "-PT30M" }

maps to

TRIGGER:-PT30M

7.5.3. todo

Need to deal with "acknowledged" and "relatedTo". Also in the icalendar to jscalendar.

8. Translating JSCalendar properties to iCalendar properties

This section is an alphabetic list of all JSCalendar property types that map on to [RFC5545] properties.

8.1. categories

Each member of the JSCalendar "categories" property maps on to a [draft-ietf-calext-eventpub-extensions] CONCEPT property with the value being the key of each member.

For example:

Jenkins, et al. Expires January 10, 2022 [Page 49] Internet-Draft JSCalendar July 2021

... "categories": { "http://example.com/event-types/arts/music": true, "http://example.com/performance-types/arts/live": true } ...

maps to

... CONCEPT:http://example.com/event-types/arts/music CONCEPT:http://example.com/performance-types/arts/live ...

8.2. created

The JSCalendar "created" property maps on to a [RFC5545] CREATED property with the value being the [RFC5545] UTC date-time derived from the value of the property.

For example:

... "created": "2021-03-15T13:30"00Z" ...

maps to

... CREATED:20210315T133000Z ...

8.3. duration

The JSCalendar "duration" property is only valid for event objects. Copy the JSCalendar "duration" property in to the [RFC5545] DURATION property.

For example:

Jenkins, et al. Expires January 10, 2022 [Page 50] Internet-Draft JSCalendar July 2021

... "duration": "PT1H" ...

maps to

... DURATION:PT1H ...

8.4. estimatedDuration

The JSCalendar "estimatedDuration" property is only valid for task objects. Copy the JSCalendar "estimatedDuration" property in to the [RFC5545] ESTIMATED-DURATION property.

For example:

... "estimatedDuration": "PT18H" ...

maps to

... ESTIMATED-DURATION:PT18H ...

8.5. keywords

Each member of the JSCalendar "categories" property maps on to a [RFC5545] CATEGORIES property with the value being the key of each member.

For example:

Jenkins, et al. Expires January 10, 2022 [Page 51] Internet-Draft JSCalendar July 2021

... "keywords": { "APPOINTMENT": true, "EDUCATION": true, "MEETING": true }, ...

maps to

... CATEGORIES:APPOINTMENT CATEGORIES:EDUCATION CATEGORIES:MEETING ...

or alternatively

... CATEGORIES:APPOINTMENT,EDUCATION,MEETING ...

8.6. locations

JSCalendar locations should be mapped on to [draft-ietf-calext-eventpub-extensions]VLOCATION components. Additionally, for backwards compatibility, a location should be mapped on to a [RFC5545] LOCATION property. This property should be mapped from the only location or the one related to the start.

8.7. participants

JSCalendar participants will be mapped on to different iCalendar properties and components depending on their jsCalendar role values.

A participant with a role containing "contact" MUST be mapped on to an iCalendar CONTACT property and SHOULD also be mapped on to a [draft-ietf-calext-eventpub-extensions]PARTICIPANT component which provides a better mapping.

A participant with a role containing "owner" MUST be mapped on to an iCalendar ORGANIZER property and SHOULD also be mapped on to a [draft-ietf-calext-eventpub-extensions]PARTICIPANT component which provides a better mapping.

A participant with a role containing any of "attendee", "optional" or "informational" MUST be mapped on to an iCalendar ATTENDEE property and SHOULD also be mapped on to a

Jenkins, et al. Expires January 10, 2022 [Page 52] Internet-Draft JSCalendar July 2021

[draft-ietf-calext-eventpub-extensions]PARTICIPANT component which provides a better mapping.

A more complete mapping may be achieved by creating a [draft-ietf-calext-eventpub-extensions]PARTICIPANT component.

For all properties the participants jsCalendar "language" property, if present, is mapped on to the iCalendar "LANG" property parameter.

For all properties if the participant contains a jsCalendar "link" with a "rel" of "alternate" then the value of the link is used for the iCalendar "ALTREP" property parameter.

Where do we get the cua?

9. Security Considerations

The same security considerations as for [draft-ietf-calext-jscalendar] apply.

10. IANA Considerations

None.

11. Acknowledgments

The authors would like to thank the members of CalConnect for their valuable contributions. This specification originated from the work of the API technical committee of CalConnect, the Calendaring and Scheduling Consortium.

12. References

12.1. Normative References

[draft-ietf-calext-eventpub-extensions] "Event Publishing Extensions to iCalendar", .

[draft-ietf-calext-ical-relations] "Support for iCalendar Relationships", .

Jenkins, et al. Expires January 10, 2022 [Page 53] Internet-Draft JSCalendar July 2021

[draft-ietf-calext-valarm-extensions] "VALARM Extensions for iCalendar", .

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, .

[RFC2397] Masinter, L., "The "data" URL scheme", RFC 2397, DOI 10.17487/RFC2397, August 1998, .

[RFC5545] Desruisseaux, B., Ed., "Internet Calendaring and Scheduling Core Object Specification (iCalendar)", RFC 5545, DOI 10.17487/RFC5545, September 2009, .

[RFC5546] Daboo, C., Ed., "iCalendar Transport-Independent Interoperability Protocol (iTIP)", RFC 5546, DOI 10.17487/RFC5546, December 2009, .

[RFC6638] Daboo, C. and B. Desruisseaux, "Scheduling Extensions to CalDAV", RFC 6638, DOI 10.17487/RFC6638, June 2012, .

[RFC7159] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March 2014, .

[RFC7265] Kewisch, P., Daboo, C., and M. Douglass, "jCal: The JSON Format for iCalendar", RFC 7265, DOI 10.17487/RFC7265, May 2014, .

[RFC7986] Daboo, C., "New Properties for iCalendar", RFC 7986, DOI 10.17487/RFC7986, October 2016, .

12.2. Informative References

[draft-apthorp-ical-tasks] "Task Extensions to iCalendar", .

Jenkins, et al. Expires January 10, 2022 [Page 54] Internet-Draft JSCalendar July 2021

[draft-ietf-calext-jscalendar] "Task Extensions to iCalendar", .

Appendix A. Outdated document sections

A.1. Note

The sections following this one are all the original ones from draft 1 writen by Robert/Neil - there for reference.

A.2. JSTask

A JSTask object maps to the iCalendar VTODO component type [RFC5545]. The following tables maps the JSTask-specific properties to iCalendar:

+------+------+ | Property | iCalendar counterpart | +------+------+ | due | Maps to the DUE property. See Appendix A.4.1. | | | | | statusUpdatedAt | COMPLETED property. The JSTask status property | | | MUST have value "completed". | | | | | progress | PARTSTAT and COMPLETED properties, including | | | the definitions in the RFC draft | | | [draft-apthorp-ical-tasks]. | | | | | status | STATUS property, including the definitions in | | | the RFC draft [draft-apthorp-ical-tasks]. | +------+------+

Table 1: Mapping JSTask properties

A.3. JSGroup

A JSGroup maps to a iCalendar VCALENDAR containing VEVENT or VTODO components.

Jenkins, et al. Expires January 10, 2022 [Page 55] Internet-Draft JSCalendar July 2021

+------+------+ | Property | iCalendar counterpart | +------+------+ | entries | VEVENT and VTODO components embedded in a VCALENDAR | | | component. | | | | | source | SOURCE property. | +------+------+

Table 2: Mapping JSGroup properties

A.4. Common properties

This section contains recommendations how to map JSCalendar from and to iCalendar. It lists all common JSCalendar object properties in alphabetical order.

+------+------+ | Property | iCalendar counterpart | +------+------+ | @type | Determined by the iCalendar component | | | type: "jsevent" for VEVENT, "jstask" for | | | VTODO, "jsgroup" for VCALENDAR. | | | | | alerts | Each entry maps to a VALARM component. | | | The action property maps to iCalendar | | | ACTION, where both iCalendar "DISPLAY" | | | and "AUDIO" values map to the "display" | | | action. An EMAIL value maps to a | | | JSCalendar "email" action. _relativeTo_ | | | and _offset_ map to the TRIGGER | | | property. | | | | | color | COLOR property, as specified in | | | [RFC7986]. | | | | | created | CREATED property. | | | | | description | DESCRIPTION property. | | | | | descriptionContentType | Implementation-specific. | | | | | excluded | EXDATE property. | | | | | freeBusyStatus | TRANSP property. | | | | | invitedBy | Implementation-specific. | | | |

Jenkins, et al. Expires January 10, 2022 [Page 56] Internet-Draft JSCalendar July 2021

| keywords | CATEGORIES property, as specified in | | | [RFC7986]. | | | | | links | ATTACH ([RFC5545]), URL or IMAGE | | | ([RFC7986]) properties with URI value | | | types map to the the Link _href_. The | | | FMTTYPE parameter maps to _type_, the | | | SIZE parameter to _size_. Mapping other | | | properties is implementation-specific. | | | | | locale | LANGUAGE parameter of the SUMMARY or | | | DESCRIPTION property. | | | | | localizations | Implementation-specific. | | | | | locations | See Appendix A.4.2. | | | | | method | METHOD property of the embedding | | | VCALENDAR. | | | | | participants | See Appendix A.4.3. | | | | | priority | PRIORITY property. | | | | | privacy | CLASS property. | | | | | prodId | PRODID property. | | | | | recurrenceOverrides | RDATE and EXDATE properties, and any | | | VEVENT or VTODO instances with a | | | recurrence-id and same UID as the mapped | | | main object. | | | | | recurrenceRule | RRULE property. For all-day calendar | | | objects, map the _until_ property value | | | to an iCalendar DATE (effectively | | | removing the time component). To convert | | | a DATE-typed UNTIL from iCalendar, set | | | the time components of the LocalDateTime | | | value to "23:59:59". If the iCalendar | | | UNTIL value is a UTC date time, convert | | | it to the local time in the JSCalendar | | | calendar object time zone. To convert to | | | iCalendar where the DTSTART or DUE | | | property is of type DATE, omit the time | | | component of the LocalDateTime value. | | | | | relatedTo | RELATED-TO property. |

Jenkins, et al. Expires January 10, 2022 [Page 57] Internet-Draft JSCalendar July 2021

| | | | replyTo | An iCalendar ORGANIZER with a mailto: | | | URI mapped to the "imip" method, or any | | | other URI mapped to the "other" method. | | | Mapping multiple methods is | | | implementation-specific. | | | | | sequence | SEQUENCE property. | | | | | showWithoutTime | Implementation-specific. | | | | | start | Maps to the DTSTART property. See | | | Appendix A.4.1. | | | | | status | STATUS property. | | | | | timeZone | Maps to the TZID parameter. See | | | Appendix A.4.1. | | | | | timeZones | Each entry in the property maps to a | | | VTIMEZONE in the embedding VCALENDAR | | | component. | | | | | title | SUMMARY property. | | | | | uid | UID property. | | | | | updated | DTSTAMP and LAST-MODIFIED properties. | | | | | useDefaultAlerts | Implementation-specific. | | | | | virtualLocations | See Appendix A.4.2. | +------+------+

Table 3: Translation between JSCalendar and iCalendar

A.4.1. Time properties and types

iCalendar defines two different time types, DATE and DATE-TIME, where the latter may occur in three forms (with local time, with UTC time, with local time and time zone reference). In contrast, JSCalendar does not define a distinct type for dates, and date times are defined with the LocalDateTime type only.

A JSCalendar time maps to the iCalendar DATE type if all of the following criteria apply:

o The "start" ("due") property value has zero time, or is not set.

Jenkins, et al. Expires January 10, 2022 [Page 58] Internet-Draft JSCalendar July 2021

o The "duration" ("estimatedDuration") property value has zero time, or is a multiple of days or weeks, or is not set.

o The "timeZone" property value is null, or is not set.

o The "showWithoutTime" property value is not set or "true".

o The recurrenceRule.frequency is at most daily.

o All recurrenceOverrides recurrence ids have zero time

For all other cases, the time maps to an iCalendar DATE-TIME:

o With local time and time zone reference, if the "timeZone" property value is set and does not equal "Etc/UTC".

o With UTC time, if the "timeZone" property value equals "Etc/UTC".

o With local time, if the "timeZone" property value is null or not set.

A.4.2. Locations

The iCalendar counterpart for JSCalendar Location objects is the iCalendar [RFC5545] LOCATION property, or implementation-specific.

+------+------+ | Property | iCalendar counterpart | +------+------+ | coordinates | GEO property. | | | | | description | Implementation-specific. | | | | | name | LOCATION property value. | | | | | rel | Implementation-specific. | | | | | timeZone | Implementation-specific. | | | | | uri | The LOCATION ALTREP parameter. | +------+------+

Table 4: Mapping Location properties

The iCalendar counterpart for JSCalendar VirtualLocation objects is the iCalendar [RFC7986] CONFERENCE property.

Jenkins, et al. Expires January 10, 2022 [Page 59] Internet-Draft JSCalendar July 2021

+------+------+ | Property | iCalendar counterpart | +------+------+ | description | Implementation-specific. | | | | | name | LABEL parameter. | | | | | uri | CONFERENCE property value. | +------+------+

Table 5: Mapping virtualLocation properties

A.4.3. Participants

The following table outlines translation of JSCalendar participants. An iCalendar ORGANIZER maps to both the replyTo property and a participant with role "owner". If an ATTENDEE with the same CAL- ADDRESS value exists, then it maps to the same participant as the ORGANIZER participant. Other participants map to ATTENDEEs.

Jenkins, et al. Expires January 10, 2022 [Page 60] Internet-Draft JSCalendar July 2021

+------+------+ | Property | iCalendar counterpart | +------+------+ | attendance | ROLE parameter values REQ-PARTICIPANT, OPT- | | | PARTICIPANT and NON-PARTICIPANT. | | | | | delegatedFrom | DELEGATED-FROM parameter | | | | | delegatedTo | DELEGATED-TO parameter | | | | | email | EMAIL parameter, if defined. Otherwise the | | | CAL-ADDRESS property value, if it is a | | | mailto: URI. | | | | | expectReply | RSVP parameter | | | | | kind | CUTYPE parameter | | | | | locationId | Implementation-specific. | | | | | memberOf | MEMBER parameter | | | | | name | CN parameter | | | | | participationStatus | PARTSTAT parameter | | | | | roles | ROLE parameter. | | | | | scheduleSequence | SEQUENCE property of the participant’s | | | latest iMIP message | | | | | scheduleUpdated | DTSTAMP property of the participant’s | | | latest iMIP message | | | | | sendTo | A CAL-ADDRESS with a mailto: URI maps to | | | the JSCalendar "imip" method, any other URI | | | to the "other" method. Mapping multiple | | | methods is implementation-specific. | +------+------+

Table 6: Mapping Participant properties

A.5. Custom properties

Mapping custom or unknown properties between JSCalendar and iCalendar is implementation-specific. Implementations might use vendor- extension properties, which could also serve as basis for discussion for a JSCalendar standard extension. Alternatively, an

Jenkins, et al. Expires January 10, 2022 [Page 61] Internet-Draft JSCalendar July 2021

implementation could preserve iCalendar properties and components in JSCalendar by use of a vendor-extension property formatted as jCal [RFC7265] data.

Authors’ Addresses

Neil Jenkins FastMail PO Box 234 Collins St West Melbourne VIC 8007 Australia

Email: [email protected] URI: https://www.fastmail.com

Robert Stepanek FastMail PO Box 234 Collins St West Melbourne VIC 8007 Australia

Email: [email protected] URI: https://www.fastmail.com

Michael Douglass Bedework Commercial Services 226 3rd Street Troy, NY 12180 United States of America

Email: [email protected] URI: http://bedework.com

Jenkins, et al. Expires January 10, 2022 [Page 62] Network Working Group M. Douglass Internet-Draft Bedework Updates: 2518 (if approved) February 1, 2021 Intended status: Standards Track Expires: August 5, 2021

Serverside Subscriptions draft-ietf-calext-serverside-subscriptions-01

Abstract

This specification provides a mechanism whereby subscriptions to external resources can be handled by the server.

This specification updates [RFC4791] to add new properties for the MKCOL request.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on August 5, 2021.

Copyright Notice

Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of

Douglass Expires August 5, 2021 [Page 1] Internet-Draft Serverside Subscriptions February 2021

the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

Table of Contents

1. Introduction ...... 2 1.1. Conventions Used in This Document ...... 3 2. CalDAV Subscriptions ...... 3 2.1. Request ...... 3 3. New DAV and CALDAV properties ...... 4 3.1. DAV:subscription ...... 4 3.2. DAV:subscription-href ...... 4 3.3. DAV:subscription-deletions-suppressed ...... 5 3.4. DAV:subscription-disabled ...... 5 3.5. DAV:subscription-next-refresh-interval ...... 6 4. DAV:subscription-suggested-refresh-interval ...... 6 5. Refreshing and Reenabling the subscription ...... 7 6. Response Delays ...... 7 7. CalDAV service Considerations ...... 8 7.1. Deleted events ...... 8 7.2. CalDAV restrictions ...... 8 7.3. Invitations in Subscriptions ...... 8 8. Security Considerations ...... 8 9. Privacy Considerations ...... 8 10. IANA Considerations ...... 9 11. Acknowledgements ...... 9 12. Normative References ...... 9 Appendix A. Open issues ...... 10 Appendix B. Change log ...... 10 Author’s Address ...... 11

1. Introduction

The motivation for this specification was initially to handle external subscriptions to calendar data. However, any resource which allows subscriptions might make use of this specification.

Currently subscriptions to calendar feeds are handled by calendar clients. There are a number of disadvantages to this approach: users have to subscribe from multiple devices and the subscription cannot affect scheduling handled by the server.

This specification defines a mechanism whereby the server will subscribe to the feed and make it visible in the user’s home.

The advantages are popular feeds can be cached by the server and the user only has to make a single subscription.

Douglass Expires August 5, 2021 [Page 2] Internet-Draft Serverside Subscriptions February 2021

1.1. Conventions Used in This Document

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].

2. CalDAV Subscriptions

2.1. Request

A client will subscribe to a URL by performing a MKCOL request with resource type elements of at least DAV:collection and DAV:subscription. For a calendar subscription there will also be a caldav calendar element.

This is an example of the MKCOL request and response from a server that supports extended MKCOL.

>> Request <<

POST /caldav/user/mike/calendars/parrots HTTP/1.1 Host: example.com Content-Type: text/calendar; component=VEVENT; method=REQUEST Content-Length: xxxx

Parrot Events http://example.org/parrot-events.ics true PT1H

>> Response <<

HTTP/1.1 200 OK

Douglass Expires August 5, 2021 [Page 3] Internet-Draft Serverside Subscriptions February 2021

3. New DAV and CALDAV properties

3.1. DAV:subscription

Name: subscription

Namespace: DAV

Purpose: To indicate that the resource is a subscription to an external resource which is managed by the server.

Conformance: When this is specified the request MUST also contain at least a DAV:subscription-href element as defined in this specification.

Description: The DAV:specification resource type element is used to indicate a collection that is a subscription. A subscription MUST report the DAV:subscription XML element in the value of the DAV: resourcetype property.

Definition:

3.2. DAV:subscription-href

Name: subscription-href

Namespace: DAV

Purpose: Provides the url for the external subscription.

Conformance: This property MUST be defined on any collection which has a resource-type containing a DAV:subscription element.

Definition:

PCDATA value: a url

Example:

https://example.com/events.ics

Douglass Expires August 5, 2021 [Page 4] Internet-Draft Serverside Subscriptions February 2021

3.3. DAV:subscription-deletions-suppressed

Name: subscription-deletions-suppressed

Namespace: DAV

Purpose: To indicate that resources that no longer appear in the feed should be retained by the server.

Conformance: This property MAY be defined on any subscription.

Description: Many feeds provide only the current active set of resources. For example, a calendar feed may only contain events from the current date onwards - while many subscribers would like to retain a copy of all events received over time.

This property indicates that the server SHOULD retain resources that disappear from the feed. Services MAY define some mechanism to indicate that a particular resource SHOULD be removed. For example this specification suggests setting a status of DELETED on a calendar event.

Definition:

3.4. DAV:subscription-disabled

Name: subscription-disabled

Namespace: DAV

Purpose: To indicate that subscription has been disabled.

Conformance: This property MUST be reported for any disabled subscription.

Description: A server MAY choose to disable a subscription if there is an excessive number of errors when attempting to synchronize with the target This property indicates to the client that the subscription has been disabled.

There is no explicit action that can be taken to reenable a subscription. However, on subsequent requests a client may indicate a refresh is desired which MAY have the effect of reenabling the subscription.

Definition:

Douglass Expires August 5, 2021 [Page 5] Internet-Draft Serverside Subscriptions February 2021

3.5. DAV:subscription-next-refresh-interval

Name: subscription-next-refresh-interval

Namespace: DAV

Purpose: To indicate the time interval till the next refresh of a subscription.

Conformance: This property MUST be reported for any active subscription.

Description: This provides a time period to the next refresh. It uses the period format defined in [RFC3339].

Definition:

PCDATA value: a duration value

Example:

PT30M

4. DAV:subscription-suggested-refresh-interval

Name: subscription-suggested-refresh-interval

Namespace: DAV

Purpose: To indicate the desired time interval between refreshes of a subscription.

Conformance: This property MUST be reported for any active subscription.

Description: This provides a suggested time period between refresh. It uses the period format defined in [RFC3339].

Definition:

Douglass Expires August 5, 2021 [Page 6] Internet-Draft Serverside Subscriptions February 2021

PCDATA value: a duration value

Example:

PT30M

5. Refreshing and Reenabling the subscription

When creating the subscription the client may indicate to the server a desired refresh interval using the a refresh of the data is desired by using the PROPPATCH method to set the subscription-next-refresh- interval to 0, e.g. "PT0S".

The client may indicate to the server that a refresh of the data is desired by using the PROPPATCH method to set the subscription-next- refresh-interval to 0, e.g. "PT0S".

A server MAY choose to always ignore the attempted refresh or to ignore the patch if it appears too often.

If the server decides to initiate a refresh it MAY choose to respond with a 102 HTTP status indicating that it is still waiting for the data or a 202 HTTP status to indicate the request was accepted.

6. Response Delays

Implementations of this feature may have an outboard or background process handling the actaul synchronization of the data. The target may be hosted on a slow service or the data may be very large

All these factors may lead to a significant delay in having data ready for delivery to the client.

The following approaches are more or less appropriate for handling requests:

Return with available data: This is the normal behavior. The subscription looks like a regular collection so the server can respond to the normal requests with whatever data is available.

Wait for completion: If the synchronization process is active the server may just choose to wait. This risks a request timeout if the data synchronization takes a significant amount of time.

Douglass Expires August 5, 2021 [Page 7] Internet-Draft Serverside Subscriptions February 2021

Return 102 status(es): The server may choose to wait but periodically send a 102 response to keep the connection alive.

Return 202 status: This is probably the best response. There is no need to indicate where the client should go to retrieve the data. All it needs to do is retry the operation after an appropriate delay.

7. CalDAV service Considerations

As mentioned above, this feature is particularly useful for CalDAV servers and clients. There are some specific considerations.

7.1. Deleted events

If subscription-deletions-suppressed is specified then the server SHOULD retain all events. However, the server MAY choose to remove old events once they become older than the CALDAV:min-date-time property as specified in [RFC4791] section 5.2.6.

7.2. CalDAV restrictions

A server SHOULD apply all appropriate restrictions on events obtained from a subscription. In particular the CALDAV:min-date-time and CALDAV:max-date-time properties as specified in [RFC4791] sections 5.2.6 and 5.2.7 SHOULD be applied.

Additionally the CALDAV:max-resource-size property restricts the size of events and the CALDAV:max-instances property the number of instances.

7.3. Invitations in Subscriptions

Any reason not to allow them?

8. Security Considerations

Servers implementing this feature need to be aware of the risks entailed in using the URIs provided as values to subscription-href. See [RFC3986] for a discussion of the security considerations relating to URIs.

9. Privacy Considerations

Properties with a "URI" value type can expose their users to privacy leaks as any network access of the URI data can be tracked. Clients SHOULD NOT automatically download data referenced by the URI without explicit instruction from users. This specification does not

Douglass Expires August 5, 2021 [Page 8] Internet-Draft Serverside Subscriptions February 2021

introduce any additional privacy concerns beyond those described in [RFC5545].

10. IANA Considerations

11. Acknowledgements

The author would also like to thank the members of the Calendaring and Scheduling Consortium Calendar Sharing technical committee and the following individuals for contributing their ideas and support:

...

The authors would also like to thank CalConnect, the Calendaring and Scheduling Consortium, for advice with this specification.

12. Normative References

[I-D.ietf-calext-extensions] Daboo, C., "New Properties for iCalendar", draft-ietf- calext-extensions-05 (work in progress), August 2016.

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, .

[RFC2434] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", RFC 2434, DOI 10.17487/RFC2434, October 1998, .

[RFC2518] Goland, Y., Whitehead, E., Faizi, A., Carter, S., and D. Jensen, "HTTP Extensions for Distributed Authoring -- WEBDAV", RFC 2518, DOI 10.17487/RFC2518, February 1999, .

[RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002, .

[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, DOI 10.17487/RFC3688, January 2004, .

Douglass Expires August 5, 2021 [Page 9] Internet-Draft Serverside Subscriptions February 2021

[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, DOI 10.17487/RFC3986, January 2005, .

[RFC4791] Daboo, C., Desruisseaux, B., and L. Dusseault, "Calendaring Extensions to WebDAV (CalDAV)", RFC 4791, DOI 10.17487/RFC4791, March 2007, .

[RFC5545] Desruisseaux, B., Ed., "Internet Calendaring and Scheduling Core Object Specification (iCalendar)", RFC 5545, DOI 10.17487/RFC5545, September 2009, .

[RFC5546] Daboo, C., Ed., "iCalendar Transport-Independent Interoperability Protocol (iTIP)", RFC 5546, DOI 10.17487/RFC5546, December 2009, .

[RFC5988] Nottingham, M., "Web Linking", RFC 5988, DOI 10.17487/RFC5988, October 2010, .

[RFC7240] Snell, J., "Prefer Header for HTTP", RFC 7240, DOI 10.17487/RFC7240, June 2014, .

[W3C.REC-xml-20060816] Bray, T., Paoli, J., Sperberg-McQueen, M., Maler, E., and F. Yergeau, "Extensible Markup Language (XML) 1.0 (Fourth Edition)", World Wide Web Consortium Recommendation REC- xml-20060816, August 2006, .

Appendix A. Open issues

invitations: Any reason not to allow them?

Appendix B. Change log

v00 2018-06-26 MD

o First pass

Douglass Expires August 5, 2021 [Page 10] Internet-Draft Serverside Subscriptions February 2021

Author’s Address

Michael Douglass Bedework 226 3rd Street Troy, NY 12180 USA

Email: [email protected] URI: http://bedework.com

Douglass Expires August 5, 2021 [Page 11] Network Working Group M. Douglass Internet-Draft 26 July 2021 Updates: 5988 (if approved) Intended status: Standards Track Expires: 27 January 2022

Calendar subscription upgrades draft-ietf-calext-subscription-upgrade-04

Abstract

This specification updates [RFC5545] to add the value DELETED to the STATUS property.

This specification also updates [RFC7240] to add the subscribe- enhanced-get and limit preferences.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on 27 January 2022.

Copyright Notice

Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/ license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

Douglass Expires 27 January 2022 [Page 1] Internet-Draft Calendar subscription upgrades July 2021

Table of Contents

1. Acknowledgements ...... 2 2. Introduction ...... 3 2.1. Terms and Definitions ...... 3 3. Discovering alternative access methods ...... 3 4. Enhanced GET ...... 4 4.1. General ...... 4 4.2. Deletions ...... 5 4.3. Handling of invalid sync tokens ...... 5 4.4. Paging the response ...... 5 4.5. Caching of responses ...... 6 4.6. Examples ...... 6 5. Changes to the iCalendar specifications ...... 8 5.1. Redefined Status property ...... 8 6. Header Field: Sync-Token ...... 10 7. New Prefer header field preferences ...... 10 7.1. Preference subscribe-enhanced-get ...... 10 7.2. Preference limit ...... 10 8. Link relations ...... 10 8.1. General ...... 10 8.2. subscribe-caldav ...... 11 8.3. subscribe-caldav-auth ...... 11 8.4. subscribe-webdav-sync ...... 11 8.5. subscribe-enhanced-get ...... 11 9. Security Considerations ...... 11 10. IANA Considerations ...... 12 10.1. Sync-Token HTTP Header Field Registration ...... 12 10.2. Preference Registrations ...... 12 10.3. Link Relation Registrations ...... 12 11. Normative References ...... 13 Appendix A. Open issues ...... 14 Appendix B. Change log ...... 14 Author’s Address ...... 14

1. Acknowledgements

The author would also like to thank the members of the CalConnect Calendar Sharing technical committee and the following individuals for contributing their ideas and support:

Marten Gajda, Ken Murchison, Garry Shutler

The authors would also like to thank CalConnect, the Calendaring and Scheduling Consortium, for advice with this specification.

Douglass Expires 27 January 2022 [Page 2] Internet-Draft Calendar subscription upgrades July 2021

2. Introduction

Currently clients subscribe to calendar feeds as an iCalendar file which is often published as a resource accessible using the unofficial ’webcal’ scheme.

The only available option for updating that resource is the usual HTTP polling of cached resources using Etags or Last-Modified.

There is the usual tension between clients wishing to see a timely response to changes and servers not wishing to be overloaded by frequent requests for possibly large amounts of data.

This specification introduces an approach whereby clients can discover a more performant access method. Given the location of the resource as an iCalendar file, the client can perfom a HEAD request on the resource and inspect the returned headers which will offer a number of alternative access methods.

Given that many clients and servers already support CalDAV this provides an easy upgrade path for those clients. Additionally an enhanced GET protocol is specified here to allow a light weight implementation.

The use of subscription upgrade may help reduce load on servers, but perhaps more importantly it allows mobile devices to use a more efficient update mechanism reducing data transferred and presumably improving battery life.

2.1. Terms and Definitions

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

Additionally, the rule for URI is included from [RFC3986].

3. Discovering alternative access methods

The advertising of other access points is achieved through the use of the LINK header as defined in [RFC5988]. New link relation types are defined in this specification - each being associated with a protocol or protocol subset.

These LINK headers will be delivered when a client carries out a HEAD request targeting the URL of the resource.

Douglass Expires 27 January 2022 [Page 3] Internet-Draft Calendar subscription upgrades July 2021

EXAMPLE

This is an example of a HEAD request and the response from a server that supports the enhanced GET method.

>> Request <<

HEAD /caldata/events.ics HTTP/1.1 Host: example.com Accept: text/calendar

>> Response <<

HTTP/1.1 200 OK Content-Length: xxxx Link: ; rel="subscribe-enhanced-get"

Note that the target for an upgraded service may be the same as for the initial resource.

4. Enhanced GET

4.1. General

This is a lightweight protocol which allows simple clients to efficiently discover and download changes in the targeted resource.

It has many similarities to WebDAV sync and for a server could be implemented as an extension of the specification.

In this protocol the client MUST include the Prefer header field preference "subscribe-enhanced-get". If a sync token is available it is passed as a Sync-Token header field.

The resource is treated as a set of individual events each of which may be updated or deleted separately. The client will first fetch the entire iCalendar file. On subsequent requests it uses the Prefer header field and a Sync-Token header field to indicate that it wants a set of changes since the last fetch.

If no Sync-Token header field is supplied the server SHOULD respond with a full set of data. Otherwise, if the token is valid, it SHOULD return with a set of changed entities.

In both cases the server should set the Preference-Applied header field and a new Sync-Token header field value.

Douglass Expires 27 January 2022 [Page 4] Internet-Draft Calendar subscription upgrades July 2021

4.2. Deletions

When an entity (VEVENT, VTODO or other valid top-level component) is deleted from the source data the server needs to be able to inform a client of the deletion. This specification introduces a new value for the STATUS property of DELETED.

On the first enhanced GET after the entity has been deleted a skeleton, but valid, entity will be returned with STATUS: DELETED. The receiving client is free to remove the entity or update its STATUS property.

On subsequent fetches the entity will not be returned.

4.3. Handling of invalid sync tokens

When a server receives an invalid token it MUST return a 409 status (Conflict). The server MAY choose to return an error message in the body.

The client SHOULD respond to this error by restarting the interaction from scratch, i.e. retrieve the full set of data then poll for updates.

4.4. Paging the response

A client may explicitly request a limit on the size of the response by specifying the Prefer header field preference "limit=n" where n is the number of components.

When a server receives a request specifying such a limit it SHOULD limit the response to that number of components. If the limit causes a truncation in the response the server should respond with a Preference-Applied header specifying the limit that was applied and return a sync token which may be used to retrieve the next batch of data.

This allows the client to immediately resubmit a request for the next batch using the updated token.

A server MAY choose to limit the response size. The behavior SHOULD be as if the client had provided a preference for that size - allowing the client to retrieve the full set of data in batches.

Douglass Expires 27 January 2022 [Page 5] Internet-Draft Calendar subscription upgrades July 2021

4.5. Caching of responses

To enable proper caching of responses the server SHOULD provide a VARY header field in responses that names the Prefer and Sync-Token header fields along with any other that are appropriate.

Clients should order the preferences as following so that identical responses can be identified:

* subscribe-enhanced-get

* limit

4.6. Examples

EXAMPLE 1

This is an example of the initial request and response from a server that supports the enhanced GET method. Note the use of the Vary header so a caching proxy can key off the client’s Sync-Token and preference.

>> Request <<

GET /events.ics HTTP/1.1 Host: example.com Accept: text/calendar Prefer: subscribe-enhanced-get

>> Response <<

HTTP/1.1 200 OK Content-Length: xxxx Sync-Token: "data:,1234567" Preference-Applied: subscribe-enhanced-get Vary: Prefer, Sync-Token

BEGIN:VCALENDAR: ? /* full feed */ END:VCALENDAR

EXAMPLE 2

This is an example of the subsequent request and response when no changes have occurred.

Douglass Expires 27 January 2022 [Page 6] Internet-Draft Calendar subscription upgrades July 2021

>> Request <<

GET /events.ics HTTP/1.1 Host: example.com Accept: text/calendar Prefer: subscribe-enhanced-get Sync-Token: "data:,1234567"

>> Response <<

HTTP/1.1 304 Not Modified Content-Length: 0 Sync-Token: "data:,1234567" Preference-Applied: subscribe-enhanced-get Vary: Prefer, Sync-Token

EXAMPLE 3

This is an example of the subsequent request and response for an old or invalid token.

>> Request <<

GET /events.ics HTTP/1.1 Host: example.com Accept: text/calendar Sync-Token: "data:,1234567" Prefer: subscribe-enhanced-get

>> Response <<

HTTP/1.1 409 Conflict Content-Length: xxxx Preference-Applied: subscribe-enhanced-get

EXAMPLE 4

This is an example of the subsequent request and response when changes have occurred.

Douglass Expires 27 January 2022 [Page 7] Internet-Draft Calendar subscription upgrades July 2021

>> Request <<

GET /events.ics HTTP/1.1 Host: example.com Accept: text/calendar Sync-Token: "data:,1234567" Prefer: subscribe-enhanced-get

>> Response <<

HTTP/1.1 200 OK Content-Type: text/calendar Vary: Prefer, Sync-Token Sync-Token: "data:,4567890" Preference-Applied: subscribe-enhanced-get

BEGIN:VCALENDAR: ... only new/changed events ... deleted events have STATUS:DELETED END:VCALENDAR

5. Changes to the iCalendar specifications

This specification updates [RFC5545] to add the value DELETED to the STATUS property.

5.1. Redefined Status property

Property name STATUS

Purpose This property defines the overall status or confirmation for the calendar component.

Value Type TEXT

Property Parameters IANA and non-standard property parameters can be specified on this property.

Conformance This property can be specified once in "VEVENT", "VTODO", or "VJOURNAL" calendar components.

Description In a group-scheduled calendar component, the property is used by the "Organizer" to provide a confirmation of the event to the "Attendees". For example in a "VEVENT" calendar component, the "Organizer" can indicate that a meeting is tentative, confirmed, or cancelled. In a "VTODO" calendar component, the "Organizer" can indicate that an action item needs action, is completed, is in process or being worked on, or has been

Douglass Expires 27 January 2022 [Page 8] Internet-Draft Calendar subscription upgrades July 2021

cancelled. In a "VJOURNAL" calendar component, the "Organizer" can indicate that a journal entry is draft, final, or has been cancelled or removed.

Format Definition

This property is defined by the following notation:

status = "STATUS" statparam ":" statvalue CRLF

statparam = *(";" other-param)

statvalue = (statvalue-event / statvalue-todo / statvalue-jour)

statvalue-event = "TENTATIVE" ;Indicates event is tentative. / "CONFIRMED" ;Indicates event is definite. / "CANCELLED" ;Indicates event was cancelled. / "DELETED" ;Indicates event was deleted. ;Status values for a "VEVENT"

statvalue-todo = "NEEDS-ACTION" ;Indicates to-do needs action. / "COMPLETED" ;Indicates to-do completed. / "IN-PROCESS" ;Indicates to-do in process of. / "CANCELLED" ;Indicates to-do was cancelled. / "DELETED" ;Indicates to-do was deleted. ;Status values for "VTODO".

statvalue-jour = "DRAFT" ;Indicates journal is draft. / "FINAL" ;Indicates journal is final. / "CANCELLED" ;Indicates journal is removed. / "DELETED" ;Indicates journal was deleted. ;Status values for "VJOURNAL".

Example

EXAMPLE 1

The following is an example of this property for a "VEVENT" calendar component:

STATUS:TENTATIVE

EXAMPLE 2

The following is an example of this property for a "VTODO" calendar component:

Douglass Expires 27 January 2022 [Page 9] Internet-Draft Calendar subscription upgrades July 2021

STATUS:NEEDS-ACTION

EXAMPLE 3

The following is an example of this property for a "VJOURNAL" calendar component:

STATUS:DRAFT

6. Header Field: Sync-Token

This specification defines a new header field Sync-Token for use by the enhanced GET method.

Accept = DQUOTE URI DQUOTE

The value MUST be a URI. This will generally be a data URI representing an opaque token. Client MUST not attempt to interpret the data URI value.

EXAMPLE

This is an example of the Sync-Token header field:

Sync-Token: "data:,1234567"

7. New Prefer header field preferences

7.1. Preference subscribe-enhanced-get

This indicates that the client expects the server to handle the GET method according to the specifications for enhanced get.

pref-subscribe-enhanced-get = "subscribe-enhanced-get"

7.2. Preference limit

This preference parameter provides a limit on the number of components returned for enhanced get.

pref-limit = "limit" BWS "=" BWS 1*DIGIT

8. Link relations

8.1. General

This clause defines a number of new link relations required to facilitate subscription upgrades.

Douglass Expires 27 January 2022 [Page 10] Internet-Draft Calendar subscription upgrades July 2021

8.2. subscribe-caldav

This specifies an access point which is a full implementation of caldav but requires no authentication. The end point allows the full range of reports as defined by the CalDAV specification.

The client MUST follow the specification to determine exactly what operations are allowed on the access point - for example to determine if DAV:sync-collection is supported.

The URL MAY include some form of token to allow write access to the targeted collection. The client must check its permissions to determine whether or not it has been granted write access.

8.3. subscribe-caldav-auth

This specifies an access point which is a full implementation of caldav and requires authentication. This may allow read-write access to the resource.

The client MUST follow the specification to determine exactly what operations are allowed on the access point - for example to determine if DAV:sync-collection is supported.

8.4. subscribe-webdav-sync

This specifies an access point which supports only webdav sync.

This allows the client to issue a DAV:sync-collection report on the resource to obtain updates.

The client MUST follow that specification.

8.5. subscribe-enhanced-get

This specifies an access point which supports something new.

The client MUST follow that specification.

9. Security Considerations

Applications using these properties need to be aware of the risks entailed in using the URIs provided as values. See [RFC3986] for a discussion of the security considerations relating to URIs. == Privacy Considerations

Douglass Expires 27 January 2022 [Page 11] Internet-Draft Calendar subscription upgrades July 2021

Properties with a "URI" value type can expose their users to privacy leaks as any network access of the URI data can be tracked. Clients SHOULD NOT automatically download data referenced by the URI without explicit instruction from users. This specification does not introduce any additional privacy concerns beyond those described in [RFC5545].

10. IANA Considerations

10.1. Sync-Token HTTP Header Field Registration

This specification updates the "Message Headers" registry entry for "Sync-Token" in [RFC3864] to refer to this document.

Header Field Name: Sync-Token Protocol: http Status: standard Reference:

Figure 1

10.2. Preference Registrations

The following preferences have been added to the HTTP Preferences Registry defined in [RFC7240]

Preference subscribe-enhanced-get

Value None.

Description Marks the interaction as enhanced get and provides the optional sync-token and page size.

Reference this document

Preference limit

Value An integer page size.

Description Provide a limit on the number of components in the response.

Reference this document

10.3. Link Relation Registrations

This document defines the following new iCalendar properties to be added to the registry defined in [RFC5545]:

Douglass Expires 27 January 2022 [Page 12] Internet-Draft Calendar subscription upgrades July 2021

+======+======+======+ | Relation Name | Description | Reference | +======+======+======+ | subscribe-caldav | Current | Section 8.2 | +------+------+------+ | subscribe-caldav_auth | Current | Section 8.3 | +------+------+------+ | subscribe-webdav-sync | Current | Section 8.4 | +------+------+------+ | subscribe-enhanced_get | Current | Section 8.5 | +------+------+------+

Table 1

11. Normative References

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", RFC 2119, IETF RFC 2119, DOI 10.17487/RFC2119, March 1997, .

[RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration Procedures for Message Header Fields", RFC 3864, IETF RFC 3864, DOI 10.17487/RFC3864, September 2004, .

[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", RFC 3986, IETF RFC 3986, DOI 10.17487/RFC3986, January 2005, .

[RFC5545] Desruisseaux, B., Ed., "Internet Calendaring and Scheduling Core Object Specification (iCalendar)", RFC 5545, IETF RFC 5545, DOI 10.17487/RFC5545, September 2009, .

[RFC5988] Nottingham, M., "Web Linking", RFC 5988, IETF RFC 5988, DOI 10.17487/RFC5988, October 2010, .

[RFC7240] Snell, J., "Prefer Header for HTTP", RFC 7240, IETF RFC 7240, DOI 10.17487/RFC7240, June 2014, .

[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", RFC 8174, IETF RFC 8174, DOI 10.17487/RFC8174, May 2017, .

Douglass Expires 27 January 2022 [Page 13] Internet-Draft Calendar subscription upgrades July 2021

Appendix A. Open issues

Vary Ensure we get that right.

Appendix B. Change log

calext00 2019-06-05 MD

* First calext version

* Use Sync-Token header rather than parameter

v04 2019-03-07 MD

* Reference to RFC 6538 - WebDAV sync and RFC 7240 Prefer

* Go back to HEAD

* New Preference and parameters.

* Examples

* More text for extended get. Talk about deletions.

v01 2017-02-17 MD

* Add text about OPTIONS

* Add text abut read/write CalDAV

v00 2017-02-15 MD

* First pass

Author’s Address

Michael Douglass

Email: [email protected]

Douglass Expires 27 January 2022 [Page 14] Network Working Group C. Daboo Internet-Draft Apple Updates: 5545 (if approved) K. Murchison, Ed. Intended status: Standards Track Fastmail Expires: September 4, 2021 March 3, 2021

VALARM Extensions for iCalendar draft-ietf-calext-valarm-extensions-07

Abstract

This document defines a set of extensions to the iCalendar VALARM component to enhance use of alarms and improve interoperability between clients and servers.

This document updates RFC5545.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on September 4, 2021.

Copyright Notice

Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of

Daboo & Murchison Expires September 4, 2021 [Page 1] Internet-Draft VALARM Extensions March 2021

the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

Table of Contents

1. Introduction ...... 2 2. Conventions Used in This Document ...... 3 3. Extensible syntax for VALARM ...... 3 4. Alarm Unique Identifier ...... 5 5. Alarm Related To ...... 6 6. Alarm Acknowledgement ...... 6 6.1. Acknowledged Property ...... 7 7. Snoozing Alarms ...... 8 7.1. Relationship Type Property Parameter ...... 9 7.2. Example ...... 9 8. Alarm Proximity Trigger ...... 13 8.1. Proximity Property ...... 14 8.2. Example ...... 15 9. Security Considerations ...... 16 10. Privacy Considerations ...... 16 11. IANA Considerations ...... 17 11.1. Property Registrations ...... 17 11.2. Relationship Types Registry ...... 17 11.3. Proximity Value Registry ...... 17 12. Acknowledgments ...... 18 13. References ...... 18 13.1. Normative References ...... 18 13.2. Informative References ...... 19 Appendix A. Change History (To be removed by RFC Editor before publication) ...... 19 Authors’ Addresses ...... 22

1. Introduction

The iCalendar [RFC5545] specification defines a set of components used to describe calendar data. One of those is the "VALARM" component which appears as a sub-component of "VEVENT" and "VTODO" components. The "VALARM" component is used to specify a reminder for an event or task. Different alarm actions are possible, as are different ways to specify how the alarm is triggered.

As iCalendar has become more widely used and as client-server protocols such as CalDAV [RFC4791] have become more prevalent, several issues with "VALARM" components have arisen. Most of these relate to the need to extend the existing "VALARM" component with new properties and behaviors to allow clients and servers to accomplish specific tasks in an interoperable manner. For example, clients typically need a way to specify that an alarm has been dismissed by a

Daboo & Murchison Expires September 4, 2021 [Page 2] Internet-Draft VALARM Extensions March 2021

calendar user, or has been "snoozed" by a set amount of time. To date, this has been done through the use of custom "X-" properties specific to each client implementation, leading to poor interoperability.

This specification defines a set of extensions to "VALARM" components to cover common requirements for alarms not currently addressed in iCalendar. Each extension is defined in a separate section below. For the most part, each extension can be supported independently of the others, though in some cases one extension will require another. In addition, this specification describes mechanisms by which clients can interoperably implement common features such as "snoozing".

2. Conventions Used in This Document

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

When XML element types in the namespaces "DAV:" and "urn:ietf:params:xml:ns:caldav" are referenced in this document outside of the context of an XML fragment, the string "DAV:" and "CALDAV:" will be prefixed to the element type names respectively.

3. Extensible syntax for VALARM

Section 3.6.6 of [RFC5545] defines the syntax for "VALARM" components and properties within them. However, as written, it is hard to extend this by adding, e.g., a new property common to all types of alarm. Since many of the extensions defined in this document need to extend the base syntax, an alternative form for the base syntax is defined here, with the goal of simplifying specification of the extensions while augmenting the existing functionality defined in [RFC5545] to allow for nested sub-components (as required by proximity alarm triggers (Section 8)).

A "VALARM" calendar component is re-defined by the following notation:

alarmcext = "BEGIN" ":" "VALARM" CRLF *alarmprop *alarm-subcomp "END" ":" "VALARM" CRLF

alarmprop = (

; the following are REQUIRED,

Daboo & Murchison Expires September 4, 2021 [Page 3] Internet-Draft VALARM Extensions March 2021

; but MUST NOT occur more than once

action / trigger /

; one set of action properties MUST be ; present and MUST match the action specified ; in the ACTION property

actionprops /

; the following are OPTIONAL, ; and MAY occur more than once

x-prop / iana-prop

)

actionprops = *audiopropext / *disppropext / *emailpropext

audiopropext = (

; ’duration’ and ’repeat’ are both OPTIONAL, ; and MUST NOT occur more than once each, ; but if one occurs, so MUST the other

duration / repeat /

; the following is OPTIONAL, ; but MUST NOT occur more than once

attach

)

disppropext = (

; the following are REQUIRED, ; but MUST NOT occur more than once

description /

; ’duration’ and ’repeat’ are both OPTIONAL, ; and MUST NOT occur more than once each, ; but if one occurs, so MUST the other

duration / repeat

)

Daboo & Murchison Expires September 4, 2021 [Page 4] Internet-Draft VALARM Extensions March 2021

emailpropext = (

; the following are all REQUIRED, ; but MUST NOT occur more than once

description / summary /

; the following is REQUIRED, ; and MAY occur more than once

attendee /

; ’duration’ and ’repeat’ are both OPTIONAL, ; and MUST NOT occur more than once each, ; but if one occurs, so MUST the other

duration / repeat

; the following is OPTIONAL, ; and MAY occur more than once

attach

)

alarm-subcomp = (

; the following are OPTIONAL, ; and MAY occur more than once

x-comp / iana-comp

)

4. Alarm Unique Identifier

This extension adds a "UID" property to "VALARM" components to allow a unique identifier to be specified. The value of this property can then be used to refer uniquely to the "VALARM" component.

The "UID" property defined here follows the definition in Section 3.8.4.7 of [RFC5545] with the security and privacy updates in Section 5.3 of [RFC7986]. In particular it MUST be a globally unique identifier that does not contain any security- or privacy-sensitive information.

The "VALARM" component defined in Section 3 is extended here as:

Daboo & Murchison Expires September 4, 2021 [Page 5] Internet-Draft VALARM Extensions March 2021

alarmprop =/ (

; the following is OPTIONAL, ; but MUST NOT occur more than once

uid

)

5. Alarm Related To

It is often convenient to relate one or more "VALARM" components to other "VALARM" components (e.g., see Section 7). This can be accomplished if the "VALARM" components each have their own "UID" property (as per Section 4).

This specification updates the usage of the "RELATED-TO" property defined in Section 3.8.4.5 of [RFC5545] to enable its use with "VALARM" components. Specific types of relationships between "VALARM" components can be identified by registering new values for the "RELTYPE" property parameter defined in Section 3.2.15 of [RFC5545].

The "VALARM" component defined in Section 3 is extended here as:

alarmprop =/ (

; the following is OPTIONAL, ; and MAY occur more than once

related

)

6. Alarm Acknowledgement

There is currently no way for a "VALARM" component to indicate whether it has been triggered and acknowledged. With the advent of a standard client/server protocol for calendaring and scheduling data ([RFC4791]) it is quite possible for an event with an alarm to exist on multiple clients in addition to the server. If each of those is responsible for performing the action when an alarm triggers, then multiple "alerts" are generated by different devices. In such a situation, a calendar user would like to be able to "dismiss" the alarm on one device and have it automatically dismissed on the others too.

Daboo & Murchison Expires September 4, 2021 [Page 6] Internet-Draft VALARM Extensions March 2021

Also, with recurring events that have alarms, it is important to know when the last alarm in the recurring set was acknowledged, so that the client can determine whether past alarms have been missed.

To address these needs, this specification adds an "ACKNOWLEDGED" property to "VALARM" components to indicate when the alarm was last acknowledged (or sent, if acknowledgement is not possible). This is defined by the syntax below.

alarmprop =/ (

; the following is OPTIONAL, ; but MUST NOT occur more than once

acknowledged

)

6.1. Acknowledged Property

Property Name: ACKNOWLEDGED

Purpose: This property specifies the UTC date and time at which the corresponding alarm was last sent or acknowledged.

Value Type: DATE-TIME

Property Parameters: IANA and non-standard property parameters can be specified on this property.

Conformance: This property can be specified within "VALARM" calendar components.

Description: This property is used to specify when an alarm was last sent or acknowledged. This allows clients to determine when a pending alarm has been acknowledged by a calendar user so that any alerts can be dismissed across multiple devices. It also allows clients to track repeating alarms or alarms on recurring events or to-dos to ensure that the right number of missed alarms can be tracked.

Clients SHOULD set this property to the current date-time value in UTC when a calendar user acknowledges a pending alarm. Certain kinds of alarms, such as email-based alerts, might not provide feedback as to when the calendar user sees them. For those kinds of alarms, the client SHOULD set this property when the alarm is triggered and the action successfully carried out.

Daboo & Murchison Expires September 4, 2021 [Page 7] Internet-Draft VALARM Extensions March 2021

When an alarm is triggered on a client, clients can check to see if an "ACKNOWLEDGED" property is present. If it is, and the value of that property is greater than or equal to the computed trigger time for the alarm, then the client SHOULD NOT trigger the alarm. Similarly, if an alarm has been triggered and an "alert" presented to a calendar user, clients can monitor the iCalendar data to determine whether an "ACKNOWLEDGED" property is added or changed in the alarm component. If the value of any "ACKNOWLEDGED" property in the alarm changes and is greater than or equal to the trigger time of the alarm, then clients SHOULD dismiss or cancel any "alert" presented to the calendar user.

Format Definition: This property is defined by the following notation:

acknowledged = "ACKNOWLEDGED" *acknowledgedparam ":" datetime CRLF

acknowledgedparam = (

; the following is OPTIONAL, ; and MAY occur more than once

(";" other-param)

)

Example: The following is an example of this property:

ACKNOWLEDGED:20090604T084500Z

7. Snoozing Alarms

Users often want to "snooze" an alarm, and this specification defines a standard approach to accomplish that.

To "snooze" an alarm that has been triggered, clients MUST do the following:

1. Set the "ACKNOWLEDGED" property (see Section 6.1) on the triggered alarm.

2. Create a new "VALARM" component (the "snooze" alarm) within the parent component of the triggered alarm (i.e., as a "sibling" component of the triggered alarm).

Daboo & Murchison Expires September 4, 2021 [Page 8] Internet-Draft VALARM Extensions March 2021

A. The new "snooze" alarm MUST be set to trigger at the user’s chosen "snooze" interval after the original alarm triggered. Clients SHOULD use an absolute "TRIGGER" property with a "DATE-TIME" value specified in UTC.

B. The new "snooze" alarm MUST have a "RELATED-TO" property (see Section 5) with a value set to the "UID" property value of the original "VALARM" component that was triggered. If the triggered "VALARM" component does not already have a "UID" property, the client MUST add one. The "RELATED-TO" property added to the new "snooze" alarm MUST include a "RELTYPE" property parameter with a value set to "SNOOZE" (see Section 7.1).

3. When the "snooze" alarm is triggered, the client MUST do the following:

A. Update the "ACKNOWLEDGED" property on the original related alarm.

B. If the "snooze" alarm is itself "snoozed", the client MUST remove the "snooze" alarm component, and return to step 2.

Otherwise, if the "snooze" alarm is dismissed, the client MUST do one of the following:

+ Set the "ACKNOWLEDGED" property on the "snooze" alarm.

+ Remove the "snooze" alarm component.

Note that regardless of the final disposition of the "snooze" alarm when triggered, the original "VALARM" component is left unchanged other than updating its "ACKNOWLEDGED" property.

7.1. Relationship Type Property Parameter

This specification adds the "SNOOZE" relationship type for use with the "RELTYPE" property defined in Section 3.2.15 of [RFC5545]. This is used when relating a "snoozed" "VALARM" component to the original alarm that the "snooze" was generated for.

7.2. Example

The following example shows the snoozing, re-snoozing, and dismissal of an alarm. Note that the encompassing VCALENDAR component has been omitted for brevity and that the line-breaks surrounding the VALARM components are for clarity only and would not be present in the actual iCalendar data.

Daboo & Murchison Expires September 4, 2021 [Page 9] Internet-Draft VALARM Extensions March 2021

Assume that we have the following event with an alarm set to trigger 15 minutes before the meeting:

BEGIN:VEVENT CREATED:20210302T151004Z UID:AC67C078-CED3-4BF5-9726-832C3749F627 DTSTAMP:20210302T151004Z DTSTART;TZID=America/New_York:20210302T103000 DTEND;TZID=America/New_York:20210302T113000 SUMMARY:Meeting

BEGIN:VALARM UID:8297C37D-BA2D-4476-91AE-C1EAA364F8E1 TRIGGER:-PT15M DESCRIPTION:Event reminder ACTION:DISPLAY END:VALARM

END:VEVENT

When the alarm is triggered, the user decides to snooze it for 5 minutes. The client acknowledges the original alarm and creates a new "snooze" alarm as a sibling of, and relates it to, the original alarm (note that both VALARMs reside within the same "parent" VEVENT):

Daboo & Murchison Expires September 4, 2021 [Page 10] Internet-Draft VALARM Extensions March 2021

BEGIN:VEVENT CREATED:20210302T151004Z UID:AC67C078-CED3-4BF5-9726-832C3749F627 DTSTAMP:20210302T151516Z DTSTART;TZID=America/New_York:20210302T103000 DTEND;TZID=America/New_York:20210302T113000 SUMMARY:Meeting

BEGIN:VALARM UID:8297C37D-BA2D-4476-91AE-C1EAA364F8E1 TRIGGER:-PT15M DESCRIPTION:Event reminder ACTION:DISPLAY ACKNOWLEDGED:20210302T151514Z END:VALARM

BEGIN:VALARM UID:DE7B5C34-83FF-47FE-BE9E-FF41AE6DD097 TRIGGER;VALUE=DATE-TIME:20210302T152000Z RELATED-TO;RELTYPE=SNOOZE:8297C37D-BA2D-4476-91AE-C1EAA364F8E1 DESCRIPTION:Event reminder ACTION:DISPLAY END:VALARM

END:VEVENT

When the "snooze" alarm is triggered, the user decides to snooze it again for an additional 5 minutes. The client once again acknowledges the original alarm, removes the triggered "snooze" alarm, and creates another new "snooze" alarm as a sibling of, and relates it to, the original alarm (note the different UID for the new snooze alarm):

Daboo & Murchison Expires September 4, 2021 [Page 11] Internet-Draft VALARM Extensions March 2021

BEGIN:VEVENT CREATED:20210302T151004Z UID:AC67C078-CED3-4BF5-9726-832C3749F627 DTSTAMP:20210302T152026Z DTSTART;TZID=America/New_York:20210302T103000 DTEND;TZID=America/New_York:20210302T113000 SUMMARY:Meeting

BEGIN:VALARM UID:8297C37D-BA2D-4476-91AE-C1EAA364F8E1 TRIGGER:-PT15M DESCRIPTION:Event reminder ACTION:DISPLAY ACKNOWLEDGED:20210302T152024Z END:VALARM

BEGIN:VALARM UID:87D690A7-B5E8-4EB4-8500-491F50AFE394 TRIGGER;VALUE=DATE-TIME:20210302T152500Z RELATED-TO;RELTYPE=SNOOZE:8297C37D-BA2D-4476-91AE-C1EAA364F8E1 DESCRIPTION:Event reminder ACTION:DISPLAY END:VALARM

END:VEVENT

When the second "snooze" alarm is triggered, the user decides to dismiss it. The client acknowledges both the original alarm and the second "snooze" alarm:

Daboo & Murchison Expires September 4, 2021 [Page 12] Internet-Draft VALARM Extensions March 2021

BEGIN:VEVENT CREATED:20210302T151004Z UID:AC67C078-CED3-4BF5-9726-832C3749F627 DTSTAMP:20210302T152508Z DTSTART;TZID=America/New_York:20210302T103000 DTEND;TZID=America/New_York:20210302T113000 SUMMARY:Meeting

BEGIN:VALARM UID:8297C37D-BA2D-4476-91AE-C1EAA364F8E1 TRIGGER:-PT15M DESCRIPTION:Event reminder ACTION:DISPLAY ACKNOWLEDGED:20210302T152507Z END:VALARM

BEGIN:VALARM UID:87D690A7-B5E8-4EB4-8500-491F50AFE394 TRIGGER;VALUE=DATE-TIME:20210302T152500Z RELATED-TO;RELTYPE=SNOOZE:8297C37D-BA2D-4476-91AE-C1EAA364F8E1 DESCRIPTION:Event reminder ACTION:DISPLAY ACKNOWLEDGED:20210302T152507Z END:VALARM

END:VEVENT

8. Alarm Proximity Trigger

VALARMs are currently triggered when a specific date-time is reached. It is also desirable to be able to trigger alarms based on location, e.g. when arriving at or departing from a particular location.

This specification adds the following elements to "VALARM" components to indicate when an alarm can be triggered based on location.

"PROXIMITY" property - indicates that a location based trigger is to be used and which action is used for the trigger

"VLOCATION" component(s) [I-D.ietf-calext-eventpub-extensions] - used to indicate the actual location(s) to trigger off of, specified with a URL property containing a geo: URI [RFC5870] which allows for two or three coordinate values with an optional uncertainty

Daboo & Murchison Expires September 4, 2021 [Page 13] Internet-Draft VALARM Extensions March 2021

alarmprop =/ (

; the following is OPTIONAL, ; but MUST NOT occur more than once

proximity /

)

alarm-subcomp =/ (

; the following is OPTIONAL, ; and MAY occur more than once, but only ; when a PROXIMITY property is also present

locationc

)

Typically, when a "PROXIMITY" property is used there is no need to specify a time-based trigger using the "TRIGGER" property. However, since "TRIGGER" is defined as a required property for a "VALARM" component, for backwards compatibility it has to be present, but ignored. To indicate a "TRIGGER" that is to be ignored, clients SHOULD use a value a long time in the past. A value of "19760401T005545Z" has been commonly used for this purpose.

8.1. Proximity Property

Property Name: PROXIMITY

Purpose: This property indicates that a location based trigger is applied to an alarm.

Value Type: TEXT

Property Parameters: IANA and non-standard property parameters can be specified on this property.

Conformance: This property can be specified within "VALARM" calendar components.

Description: This property is used to indicate that an alarm has a location-based trigger. Its value identifies the action that will trigger the alarm.

When the property value is set to "ARRIVE", the alarm is triggered when the calendar user agent arrives in the vicinity of one or

Daboo & Murchison Expires September 4, 2021 [Page 14] Internet-Draft VALARM Extensions March 2021

more locations. When set to "DEPART", the alarm is triggered when the calendar user agent departs from the vicinity of one or more locations. Each location which MUST be specified with a "VLOCATION" component. Note that the meaning of "vicinity" in this context is implementation defined.

When the property value is set to "CONNECT", the alarm is triggered when the calendar user agent connects to a automobile to which is has been paired via Bluetooth(R) [BTcore]. When set to "DISCONNECT", the alarm is triggered when the calendar user agent disconnects from a automobile to which it has been paired via Bluetooth(R). Note that neither current implementations of proximty alarms nor this document have a mechanism to target a particular automobile. Such a mechanism may be specified in a future extension.

Format Definition: This property is defined by the following notation:

proximity = "PROXIMITY" *proximityparam ":" proximityvalue CRLF

proximityparam = (

; the following is OPTIONAL, ; and MAY occur more than once

(";" other-param)

)

proximityvalue = "ARRIVE" / "DEPART" / "CONNECT" / "DISCONNECT" / iana-token / x-name

8.2. Example

The following example shows a VALARM component with a proximity trigger set to trigger when the device running the calendar user agent leaves the vicinity defined by the URL property in the VLOCATION component. Note use of the "u=" parameter with the "geo" URI to define the uncertainty of the location determination.

Daboo & Murchison Expires September 4, 2021 [Page 15] Internet-Draft VALARM Extensions March 2021

BEGIN:VALARM UID:77D80D14-906B-4257-963F-85B1E734DBB6 ACTION:DISPLAY TRIGGER;VALUE=DATE-TIME:19760401T005545Z DESCRIPTION:Remember to buy milk PROXIMITY:DEPART BEGIN:VLOCATION UID:123456-abcdef-98765432 NAME:Office URL:geo:40.443,-79.945;u=10 END:VLOCATION END:VALARM

9. Security Considerations

In addition to the security properties of iCalendar (see Section 7 of [RFC5545]), VALARMs, if not monitored properly, can be used to disturb users and/or leak personal information. For instance, an undesirable audio alert could cause embarassment. An unwanted display alert could be considered an annoyance. Or an email alert could be used to leak a user’s location to a third party or to send unsolicited email to multiple users. Therefore, CalDAV clients and servers that accept iCalendar data from a third party (e.g. via iTIP [RFC5546], a subscription feed, or a shared calendar) SHOULD remove all VALARMs from the data prior to storing in their calendar system.

Security considerations related to unique identifiers for VALARMs are discussed in Section 4.

10. Privacy Considerations

Proximity VALARMs, if not used carefully, can leak a user’s past, present, or future location. For instance, storing an iCalendar resource containing proxmity VALARMs to a shared calendar on CalDAV server can expose to anyone that has access to that calendar the user’s intent to leave from or arrive at a particular location at some future time. Furthermore, if a CalDAV client updates the shared iCalendar resource with an ACKNOWLEDGED property when the alarm is triggered, will leak the exact date and time that the user left from or arrived at the location. Therefore, CalDAV clients that implement proximity alarms SHOULD give users the option of storing and/or acknowledging the alarms on the local device only and not storing the alarm and/or acknowledgment on a remote server.

Privacy considerations related to unique identifiers for VALARMs are discussed in Section 4.

Daboo & Murchison Expires September 4, 2021 [Page 16] Internet-Draft VALARM Extensions March 2021

11. IANA Considerations

11.1. Property Registrations

This document defines the following new iCalendar properties to be added to the registry defined in Section 8.2.3 of [RFC5545] and located here:

+------+------+------+ | Property | Status | Reference | +------+------+------+ | ACKNOWLEDGED | Current | RFCXXXX, Section 6.1 | | PROXIMITY | Current | RFCXXXX, Section 8.1 | +------+------+------+

11.2. Relationship Types Registry

This document defines the following new iCalendar relationship type to be added to the registry defined in Section 8.3.8 of [RFC5545] and located here:

+------+------+------+ | Relationship Type | Status | Reference | +------+------+------+ | SNOOZE | Current | RFCXXXX, Section 7.1 | +------+------+------+

11.3. Proximity Value Registry

This document creates a new iCalendar registry for values of the "PROXIMITY" property located here:

Additional values MAY be used, provided the process described in Section 8.2.1 of [RFC5545] is used to register them, using the template in Section 8.2.6 of [RFC5545].

The following table has been used to initialize the Proximity Value Registry.

Daboo & Murchison Expires September 4, 2021 [Page 17] Internet-Draft VALARM Extensions March 2021

+------+------+------+ | Value | Status | Reference | +------+------+------+ | ARRIVE | Current | RFCXXXX, Section 8.1 | | DEPART | Current | RFCXXXX, Section 8.1 | | CONNECT | Current | RFCXXXX, Section 8.1 | | DISCONNECT | Current | RFCXXXX, Section 8.1 | +------+------+------+

12. Acknowledgments

This specification came about via discussions at the Calendaring and Scheduling Consortium. Also, thanks to the following for providing feedback: Bernard Desruisseaux, Mike Douglass, Jacob Farkas, Jeffrey Harris, Ciny Joy, Barry Leiba, and Daniel Migault.

13. References

13.1. Normative References

[I-D.ietf-calext-eventpub-extensions] Douglass, M., "Event Publishing Extensions to iCalendar", draft-ietf-calext-eventpub-extensions-18 (work in progress), January 2021.

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, .

[RFC5545] Desruisseaux, B., Ed., "Internet Calendaring and Scheduling Core Object Specification (iCalendar)", RFC 5545, DOI 10.17487/RFC5545, September 2009, .

[RFC5870] Mayrhofer, A. and C. Spanring, "A Uniform Resource Identifier for Geographic Locations (’geo’ URI)", RFC 5870, DOI 10.17487/RFC5870, June 2010, .

[RFC7986] Daboo, C., "New Properties for iCalendar", RFC 7986, DOI 10.17487/RFC7986, October 2016, .

[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, .

Daboo & Murchison Expires September 4, 2021 [Page 18] Internet-Draft VALARM Extensions March 2021

13.2. Informative References

[BTcore] Bluetooth Special Interest Group, "Bluetooth Core Specification Version 5.0", December 2016, .

[RFC4791] Daboo, C., Desruisseaux, B., and L. Dusseault, "Calendaring Extensions to WebDAV (CalDAV)", RFC 4791, DOI 10.17487/RFC4791, March 2007, .

[RFC5546] Daboo, C., Ed., "iCalendar Transport-Independent Interoperability Protocol (iTIP)", RFC 5546, DOI 10.17487/RFC5546, December 2009, .

Appendix A. Change History (To be removed by RFC Editor before publication)

Changes in ietf-06:

1. Corrected timestamps in snooze example.

2. Editorial changes from Benjamim Kaduk.

Changes in ietf-05:

1. Updated to use VLOCATION components rather than (deprecated) STRUCTURED-LOCATION properties for proximity alarms.

2. Reorganized and clarified the process of snoozing an alarm and added an example.

3. Noted that there is currently no mechanism for specifying a particular automobile for CONNECT/DISCONNECT proximity alarms.

4. Replaced the term "spam" with new wording in Security Considerations.

5. Addressed IESG comments from Benjamim Kaduk.

6. Addressed IESG comments from Robert Wilton.

7. Addressed IESG comments Alissa Cooper.

Changes in ietf-04:

Daboo & Murchison Expires September 4, 2021 [Page 19] Internet-Draft VALARM Extensions March 2021

1. Addressed security review comments from Valery Smyslov.

2. Addressed Genart review comments from Roni Even.

3. Added text addressing management of Proximity Value Registry.

Changes in ietf-03:

1. Fixed ABNF to be properly extended.

2. Addressed AD review comments from Barry Leiba.

Changes in ietf-02:

1. Addressed some WGLC comments from Daniel Migault.

Changes in ietf-01:

1. Reintroduced the RELATED-TO property for VALARMs and the SNOOZE value for the RELTYPE property parameter.

2. Add Privacy Considerations section.

Changes in ietf-00:

1. Submitted as CALEXT draft.

Changes in daboo-05:

1. Added Murchison as editor.

2. Updated keywords boilerplate.

3. Added reference to UID security/privacy recommendations.

4. Removed default alarms.

5. Removed ALARM-AGENT property.

6. Added text about using TRIGGER value in the past in addition to ACTION:NONE to have a default alarm be ignored.

7. Removed text about related alarms.

8. Removed URL alarm action.

9. Added reference to draft-ietf-calext-eventpub-extensions for STRUCTURED-LOCATION.

Daboo & Murchison Expires September 4, 2021 [Page 20] Internet-Draft VALARM Extensions March 2021

10. Added CONNECT and DISCONNECT PROXIMITY property values.

11. Added Security Considerations.

12. Editorial fixes.

Changes in daboo-04:

1. Changed "ID" to "AGENT-ID".

2. Add more text on using "ACKNOWLEDGED" property.

3. Add "RELATED-TO" as a valid property for VALARMs.

4. Add "SNOOZE" relationship type for use with VALARMs.

5. State that "TRIGGER" is typically ignored in proximity alarms.

6. Added "PROXIMITY" value registry.

7. Added a lot more detail on default alarms including new action and property.

Changes in daboo-03: none - resubmission of -02

Changes in daboo-02:

1. Updated to 5545 reference.

2. Clarified use of absolute trigger in UTC in snooze alarms

3. Snooze alarms should be removed when completed

4. Removed status and replaced last-triggered by acknowledged property

5. Added location-based trigger

6. IANA registry tables added

Changes in daboo-01:

1. Removed DESCRIPTION as an allowed property in the URI alarm.

2. Added statement about what to do when ALARM-AGENT is not present.

3. Allow multiple ALARM-AGENT properties to be present.

Daboo & Murchison Expires September 4, 2021 [Page 21] Internet-Draft VALARM Extensions March 2021

4. Removed SNOOZE-UNTIL - snoozing now accomplished by creating a new VALARM.

5. Remove VALARM by reference section.

6. Added more detail to CalDAV default alarms.

Authors’ Addresses

Cyrus Daboo Apple Inc. 1 Infinite Loop Cupertino, CA 95014 USA

Email: [email protected] URI: http://www.apple.com/

Kenneth Murchison (editor) Fastmail US LLC 1429 Walnut St, Suite 1201 Philadephia, PA 19102 USA

Email: [email protected] URI: http://www.fastmail.com/

Daboo & Murchison Expires September 4, 2021 [Page 22] Network Working Group E. York Internet-Draft Intended status: Standards Track M. Douglass Expires: 27 January 2022 26 July 2021

VPOLL: Consensus Scheduling Component for iCalendar draft-ietf-calext-vpoll-02

Abstract

This specification introduces a new iCalendar component which allows for consensus scheduling, that is, voting on a number of alternative meeting or task alternatives.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on 27 January 2022.

Copyright Notice

Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/ license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

York & Douglass Expires 27 January 2022 [Page 1] Internet-Draft VPOLL July 2021

Table of Contents

1. Acknowledgements ...... 3 2. Introduction ...... 3 3. Terms and definitions ...... 4 3.1. consensus scheduling ...... 4 3.2. active Vpoll ...... 4 3.3. voter ...... 5 4. Simple Consensus Scheduling ...... 5 4.1. The VPOLL Component: An Overview ...... 5 4.2. The VPOLL Alternative Choices: An Overview ...... 7 4.3. VPOLL responses ...... 8 4.4. VPOLL updates ...... 9 4.5. VPOLL Completion ...... 11 4.6. Other Responses ...... 11 5. iCalendar Extensions ...... 12 5.1. Updated Participant Type Value ...... 12 5.2. Updated Relation Type Value ...... 12 5.3. Updated Status Value ...... 13 5.4. New Property Parameters ...... 13 5.4.1. Required ...... 13 5.4.2. Stay-Informed ...... 14 5.5. New Properties ...... 14 5.5.1. Accept-Response ...... 14 5.5.2. Poll-Completion ...... 15 5.5.3. Poll-Item-Id ...... 16 5.5.4. Poll-Mode ...... 16 5.5.5. Poll-properties ...... 17 5.5.6. Poll-Winner ...... 17 5.5.7. Reply-URL ...... 18 5.5.8. Response ...... 19 5.6. New Components ...... 19 5.6.1. VPOLL Component ...... 19 5.6.2. VOTE Component ...... 22 6. Poll Modes ...... 23 6.1. POLL-MODE:BASIC ...... 24 6.1.1. Property restrictions ...... 24 6.1.2. Outcome reporting ...... 24 7. iTIP Extensions ...... 24 7.1. Methods ...... 24 7.2. Interoperability Models ...... 26 7.2.1. Delegation ...... 26 7.2.2. Acting on Behalf of Other Calendar Users ...... 26 7.2.3. Component Revisions ...... 26 7.2.4. Message Sequencing ...... 26 7.3. Application Protocol Elements ...... 26 7.3.1. Methods for VPOLL Calendar Components ...... 26 7.3.2. Method: PUBLISH ...... 28

York & Douglass Expires 27 January 2022 [Page 2] Internet-Draft VPOLL July 2021

7.3.3. Method: REQUEST ...... 31 7.3.4. Method: REPLY ...... 37 7.3.5. Method: CANCEL ...... 40 7.3.6. Method: REFRESH ...... 43 7.3.7. Method: POLLSTATUS ...... 45 8. CalDAV Extensions ...... 47 8.1. Calendar Collection Properties ...... 47 8.1.1. CALDAV:supported-vpoll-component-sets ...... 47 8.1.2. CALDAV:vpoll-max-items ...... 49 8.1.3. CALDAV:vpoll-max-active ...... 50 8.1.4. CALDAV:vpoll-max-voters ...... 51 8.1.5. CalDAV:even-more-properties ...... 51 8.1.6. Extensions to CalDAV scheduling ...... 51 8.2. Additional Preconditions for PUT, COPY, and MOVE . . . . 52 8.3. CalDAV:calendar-query Report ...... 52 8.3.1. Example: Partial Retrieval of VPOLL ...... 53 8.4. CalDAV time ranges ...... 55 9. Security Considerations ...... 56 10. IANA Considerations ...... 56 10.1. Parameter Registrations ...... 56 10.2. Property Registrations ...... 57 10.3. POLL-MODE Registration Template ...... 57 10.4. POLL-MODE Registrations ...... 57 11. Normative References ...... 58 Appendix A. Open issues ...... 59 Appendix B. Change log ...... 60 Authors’ Addresses ...... 61

1. Acknowledgements

The authors would like to thank the members of the Calendaring and Scheduling Consortium (CalConnect) for contributing their ideas and support, in particular Cyrus Daboo for his help with the specification and implementations.

2. Introduction

The currently existing approach to agreeing on meeting times using iTip [RFC5546] and/or iMip [RFC6047] has some significant failings. There is no useful bargaining or suggestion mechanism in iTip, only the ability for a potential attendee to accept or refuse or to counter with a time of their own choosing.

York & Douglass Expires 27 January 2022 [Page 3] Internet-Draft VPOLL July 2021

Part of the problem is that for many potential attendees, their freebusy is not an accurate representation of their availability. In fact, when trying to schedule conference calls across different organizations, attendees may not be allowed to provide freebusy information or availability as this may reveal something of the organizations internal activities.

A number of studies have shown that large amounts of time are spent trying to come to an agreement - up to and beyond 20 working hours per meeting. Many organizers fall back on other approaches such as phone calls and email to determine a suitable time.

Online services have appeared as a result and these allow participants to vote on a number of alternatives without revealing or using freebusy or availability. When agreement is reached a conventional scheduling message may be sent to the attendees. This approach appears to reach consensus fairly rapidly. Peer pressure may have some bearing on this as all voters are usually able to see the current state of the voting and may adjust their own meeting schedules to make themselves available for a popular choice.

The component and properties defined in this specification provide a standardized structure for this process and allow calendar clients and servers and web based services to interact.

These structures also have uses beyond the relatively simple needs of most meeting organizers. The process of coming to consensus can also be viewed as a bidding process.

3. Terms and definitions

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].

Additionally the following terms are used:

3.1. consensus scheduling

The process whereby users come to some agreement on meeting or task alternatives and then book that meeting or task.

3.2. active Vpoll

A VPoll may have a DTSTART, DTEND and DURATION which may define the start and end of the active voting period

York & Douglass Expires 27 January 2022 [Page 4] Internet-Draft VPOLL July 2021

3.3. voter

A participant who votes on the alternatives. A voter need not be an attendee of any of the alternatives presented.

4. Simple Consensus Scheduling

This specification defines components and properties which can be used for simple consensus scheduling but also have the generality to handle more complex cases. To provide an easy (and for many a sufficient) introduction to consensus scheduling and VPOLL we will outline the flow of information for the simple case of voting on a number of meeting alternatives which differ only in time of the meeting. In addition the voters will all be potential attendees.

This specification not only defines data structures but adds new iTip methods, one used when consensus has been reached and one to distribute the current status of the poll.

This document will show how a VPOLL object is used to inform voters of the state of a simple vote on some alternatives.

4.1. The VPOLL Component: An Overview

The VPOLL component acts as a wrapper for a number of alternatives to be voted on, together with some properties and a new component used to maintain the state of the voting. For our simple example the following VPOLL properties and sub-components are either required or appropriate:

DTSTAMP The usual [RFC5545] property.

SEQUENCE The usual [RFC5545] property. See below for SEQUENCE behavior.

UID The usual [RFC5545] property.

ORGANIZER The usual [RFC5545] property. In general this need not be an organizer of any of the alternatives. In this simple outline we assume it is the same.

SUMMARY The usual [RFC5545] property. This optional but recommended property provides the a short title to the poll.

DESCRIPTION The usual [RFC5545] property. This optional property provides more details.

DTEND The usual [RFC5545] property. This optional property provides

York & Douglass Expires 27 January 2022 [Page 5] Internet-Draft VPOLL July 2021

a poll closing time and date after which the VPOLL is no longer active.

POLL-MODE A new property which defines how the votes are used to obtain a result. For our use case it will take the value "BASIC" meaning one event will be chosen from the alternatives.

POLL-COMPLETION A new property which defines who (server or client) chooses and/or submits the winning choice. In our example the value is "SERVER-SUBMIT" which means the client chooses the winner but the server will submit the winning choice.

POLL-PROPERTIES A new property which defines which icalendar properties are being voted on. For our use case it will take the value "DTSTART, LOCATION" meaning only those properties are significant for voting. Other properties in the events may differ but are not considered significant for the voting process.

PARTICIPANT There is one of these components for each voter with the PARTICIPANT-TYPE set to "VOTER". The CALENDAR-ADDRESS property identifies the voter and this component will contain one VOTE component for each item being voted on.

VOTE A new component. There is one of these for each voter and choice. It usually contains at least a POLL-ITEM-ID property to identify the choice and a RESPONSE property to provide a vote. For more complex poll modes it may contain other information such as cost or estimated duration.

VEVENT In our simple use case there will be multiple VEVENT sub- components defining the alternatives. Each will have a different date and or time for the meeting.

EXAMPLE

VPOLL with 3 voters and 3 alternative meetings:

York & Douglass Expires 27 January 2022 [Page 6] Internet-Draft VPOLL July 2021

BEGIN:VCALENDAR VERSION:2.0 PRODID:-//Example//Example METHOD:REQUEST BEGIN:VPOLL POLL-MODE:BASIC POLL-COMPLETION:SERVER-SUBMIT POLL-PROPERTIES:DTSTART,LOCATION ORGANIZER:mailto:[email protected] UID:sched01-1234567890 DTSTAMP:20120101T000000Z SUMMARY:What to do this week DTEND:20120101T000000Z BEGIN:PARTICIPANT PARTICIPANT-TYPE: VOTER CALENDAR-ADDRESS:mailto:[email protected] END:PARTICIPANT BEGIN:PARTICIPANT PARTICIPANT-TYPE: VOTER CALENDAR-ADDRESS:mailto:[email protected] END:PARTICIPANT BEGIN:PARTICIPANT PARTICIPANT-TYPE: VOTER CALENDAR-ADDRESS:mailto:[email protected] END:PARTICIPANT BEGIN:VEVENT...... (with a poll-item-id=1) END:VEVENT BEGIN:VEVENT...... (with a poll-item-id=2) END:VEVENT BEGIN:VEVENT...... (with a poll-item-id=3) END:VEVENT END:VPOLL END:VCALENDAR

As can be seen in the example above, there is an iTip METHOD property with the value REQUEST. The VPOLL object will be distributed to all the voters, either through iMip or through some VPOLL enabled service.

4.2. The VPOLL Alternative Choices: An Overview

Within the VPOLL component we have the alternatives to vote on. In many respects these are standard [RFC5545] components. For our simple use case they are all VEVENT components. In addition to the usual [RFC5545] properties some extra properties are used for a VPOLL.

POLL-ITEM-ID This provides a unique reference to the sub-component

York & Douglass Expires 27 January 2022 [Page 7] Internet-Draft VPOLL July 2021

within the VPOLL. It’s value SHOULD be a small integer.

4.3. VPOLL responses

Upon receipt of a VPOLL REQUEST the voter will reply with a VPOLL component containing their vote. In our simple case it will have the following properties and components:

DTSTAMP The usual [RFC5545] property.

SEQUENCE The usual [RFC5545] property. See below for SEQUENCE behavior.

UID Same as the request.

ORGANIZER Same as the request.

SUMMARY Same as the request.

PARTICIPANT One only with a CALENDAR-ADDRESS identifying the voter replying.

VOTE One per item being voted on.

POLL-ITEM-ID One inside each VOTE component to identify the choice.

RESPONSE One inside each VOTE component to specify the vote.

Note that a voter can send a number of REPLYs for each REQUEST sent by the organizer. Each REPLY completely replaces the voting record for that voter for all components being voted on. In our example, if Eric responds and votes for items 1 and 2 and then responds again with a vote for only item 3, the final outcome is one vote on item 3.

NOTE This is poll-mode specific behavior?

EXAMPLE

REPLY VPOLL from Cyrus:

York & Douglass Expires 27 January 2022 [Page 8] Internet-Draft VPOLL July 2021

BEGIN:VCALENDAR VERSION:2.0 PRODID:-//Example//Example METHOD: REPLY BEGIN:VPOLL ORGANIZER:mailto:[email protected] UID:sched01-1234567890 DTSTAMP:20120101T010000Z SUMMARY:What to do this week BEGIN:PARTICIPANT PARTICIPANT-TYPE: VOTER CALENDAR-ADDRESS:mailto:[email protected] BEGIN:VOTE POLL-ITEM-ID:1 RESPONSE:50 COMMENT:Work on iTIP END:VOTE BEGIN:VOTE POLL-ITEM-ID:2 RESPONSE:100 COMMENT:Work on WebDAV END:VOTE BEGIN:VOTE POLL-ITEM-ID:3 RESPONSE:0 END:VOTE END:PARTICIPANT END:VPOLL END:VCALENDAR

4.4. VPOLL updates

When the organizer receives a response from one or more voters the current state of the poll is sent to all voters. The new iTip method POLLSTATUS is used. The VPOLL can contain a reduced set of properties but MUST contain DTSTAMP, SEQUENCE (if not 0), UID, ORGANIZER and one or more PARTICIPANT components each populated with zero or more VOTE components.

EXAMPLE

York & Douglass Expires 27 January 2022 [Page 9] Internet-Draft VPOLL July 2021

BEGIN:VCALENDAR VERSION:2.0 PRODID:-//Example//Example METHOD: POLLSTATUS BEGIN:VPOLL ORGANIZER:mailto:[email protected] UID:sched01-1234567890 DTSTAMP:20120101T020000Z SEQUENCE:0 SUMMARY:What to do this week BEGIN:PARTICIPANT PARTICIPANT-TYPE: VOTER CALENDAR-ADDRESS:mailto:[email protected] BEGIN: VOTE POLL-ITEM-ID:1 RESPONSE:50 COMMENT:Work on iTIP END:VOTE BEGIN:VOTE POLL-ITEM-ID:2 RESPONSE:100 COMMENT:Work on WebDAV END:VOTE BEGIN:VOTE POLL-ITEM-ID:3 RESPONSE:0 END:VOTE END:PARTICIPANT BEGIN:PARTICIPANT PARTICIPANT-TYPE: VOTER CALENDAR-ADDRESS:mailto:[email protected] BEGIN:VOTE POLL-ITEM-ID:1 RESPONSE:100 END:VOTE BEGIN:VOTE POLL-ITEM-ID:2 RESPONSE:100 END:VOTE BEGIN:VOTE POLL-ITEM-ID:3 RESPONSE:0 END:VOTE END:PARTICIPANT END:VPOLL END:VCALENDAR

York & Douglass Expires 27 January 2022 [Page 10] Internet-Draft VPOLL July 2021

4.5. VPOLL Completion

After a number of REPLY messages have been received the poll will be considered complete. If there is a DTEND on the poll the system may automatically close the poll, or the organizer may, at any time, consider the poll complete. A VPOLL can be completed (and effectively closed for voting) by sending an iTip REQUEST message with the VPOLL STATUS property set to COMPLETED.

The poll winner is confirmed by sending a final iTip REQUEST message with the VPOLL STATUS property set to CONFIRMED. In this case the VPOLL component contains all the events being voted on along with a POLL-WINNER property to identify the winning event. As the POLL- COMPLETION property is set to SERVER-SUBMIT the server will submit the winning choice and when it has done so set the STATUS to "SUBMITTED".

EXAMPLE

VPOLL confirmation:

BEGIN:VCALENDAR VERSION:2.0 PRODID:-//Example//Example METHOD: REQUEST BEGIN:VPOLL ORGANIZER:mailto:[email protected] UID:sched01-1234567890 DTSTAMP:20120101T030000Z COMPLETED:20120101T030000Z POLL-COMPLETION:SERVER-SUBMIT SEQUENCE:0 SUMMARY:What to do this week STATUS:CONFIRMED POLL-WINNER:3 BEGIN:VEVENT...... (with a poll-item-id=1) END:VEVENT BEGIN:VEVENT...... (with a poll-item-id=2) END:VEVENT BEGIN:VEVENT...... (with a poll-item-id=3) END:VEVENT END:VPOLL END:VCALENDAR

4.6. Other Responses

A voter being asked to choose between a number of ORGANIZER supplied alternatives may find none of them acceptable or may simply not care.

York & Douglass Expires 27 January 2022 [Page 11] Internet-Draft VPOLL July 2021

An alternative response, which may be disallowed by the ORGANIZER, is to send back the respondees availability or freebusy or even one or more new, alternative choices.

This is accomplished by responding with a VOTE component which has no POLL-ITEM-ID property. In this case it MUST contain some alternative information. What form this takes depends on the poll mode in effect.

5. iCalendar Extensions

5.1. Updated Participant Type Value

Participant type property values are defined in section 11.2.1. of [I-D.ietf-calext-eventpub-extensions]. This specification updates that type to include the new participant type VOTER to provide information about the voter and to contain their votes.

Format Definition This property parameter is redefined by the following notation:

partvalue /= "VOTER"

Description The new property value indicates that the associated PARTICIPANT component identifies a voter in a VPOLL.

5.2. Updated Relation Type Value

Relationship parameter type values are defined in section 3.2.15. of [RFC5545]. This specification updates that type to include the new relationship value POLL to provide a link to the VPOLL component in which the current component appears.

Format Definition This property parameter is redefined by the following notation:

reltypeparam /= "RELTYPE" "=" "POLL" ; Property value is a VPOLL uid

Description This parameter can be specified on a property that references another related calendar component. The new parameter value indicates that the associated property references a VPOLL component which contains the current component.

York & Douglass Expires 27 January 2022 [Page 12] Internet-Draft VPOLL July 2021

5.3. Updated Status Value

Status property values are defined in section 3.8.1.11. of [RFC5545]. This specification updates that type to define valid VPOLL status values.

Format Definition This property parameter is redefined by the following notation:

statvalue /= statvalue-poll ; Status values for "VPOLL". statvalue-poll = "IN-PROCESS" / "COMPLETED" ; Poll has closed, ; nothing has been chosen yet / "CONFIRMED" ; Poll has closed and ; winning items confirmed / "SUBMITTED" ; The winning item has been ; submitted / "CANCELLED"

Description These values allow clients and servers to handle the choosing and submission of winning choices.

If the client is choosing and the server submitting then the client should set the POLL-WINNER property, set the status to CONFIRMED and save the poll. When the server submits the winning choice it will set the status to SUBMITTED.

Figure 1

5.4. New Property Parameters

5.4.1. Required

Parameter name REQUIRED

Purpose To specify whether the associated property is required in the current context.

Format Definition This parameter is defined by the following notation:

requirededparam = "REQUIRED" "=" ("TRUE" / "FALSE") ; Default is FALSE

Description This parameter MAY be specified on REPLY-URL and, if the value is TRUE, indicates the organizer requires all replies to be made via the specified service rather than iTip replies.

York & Douglass Expires 27 January 2022 [Page 13] Internet-Draft VPOLL July 2021

5.4.2. Stay-Informed

Parameter name STAY-INFORMED

Purpose To specify the voter also wants to be added as an ATTENDEE when the poll is confirmed.

Format Definition This parameter is defined by the following notation:

stayinformedparam = "STAY-INFORMED" "=" ("TRUE" / "FALSE") ; Default is FALSE

Description This parameter MAY be specified on the CALENDAR-ADDRESS property in the PARTICIPANT component and, if the value is TRUE, indicates the voter wishes to be added to the final choice as a non participant.

5.5. New Properties

5.5.1. Accept-Response

Property name ACCEPT-RESPONSE

Purpose This property is used in VPOLL to indicate the types of component that may be supplied in a response.

Property Parameters Non-standard or iana parameters can be specified on this property.

Conformance This property MAY be specified in a VPOLL component.

Description When used in a VPOLL this property indicates what allowable component types may be returned in a reply. Typically this would allow a voter to respond with their freebusy or availability rather than choosing one of the presented alternatives.

If this property is not present voters are only allowed to respond to the choices in the request.

Format Definition This property is defined by the following notation:

acceptresponse = "ACCEPT-RESPONSE" acceptresponseparams ":" iana-token ("," iana-token) CRLF

acceptresponseparams = *(";" other-param)

York & Douglass Expires 27 January 2022 [Page 14] Internet-Draft VPOLL July 2021

5.5.2. Poll-Completion

Property name POLL-COMPLETION

Purpose This property is used in VPOLL to indicate whether the client or server is responsible for choosing and/or submitting the winner(s).

Description When a VPOLL is stored on a server which is capable of handling choosing and submission of winning choices a value of SERVER indicates that the server should close the poll, choose the winner and submit whenever it is appropriate to do so.

For example, in BASIC poll-mode, reaching the DTEND of the poll could trigger this server side action.

Server initiated submission requires that the submitted choice MUST be a valid calendaring component.

POLL-COMPLETION=SERVER-SUBMIT allows the client to set the poll- winner, set the status to CONFIRMED and then store the poll on the server. The server will then submit the winning choice and set the status to SUBMITTED.

Format Definition This property is defined by the following notation:

poll-completion = "POLL-COMPLETION" pcparam ":" pcvalue CRLF

pcparam = *(";" other-param)

pcvalue = "SERVER" ; The server is responsible for both choosing and ; submitting the winner(s) / "SERVER-SUBMIT" ; The server is responsible for ; submitting the winner(s). The client chooses. / "SERVER-CHOICE" ; The server is responsible for ; choosing the winner(s). The client will submit. / "CLIENT" ; The client is responsible for both choosing and ; submitting the winner(s) / iana-token / x-name ;Default is CLIENT

Example The following is an example of this property:

POLL-COMPLETION: SERVER-SUBMIT

York & Douglass Expires 27 January 2022 [Page 15] Internet-Draft VPOLL July 2021

5.5.3. Poll-Item-Id

Property name POLL-ITEM-ID

Purpose This property is used in VPOLL child components as an identifier.

Value type INTEGER

Property Parameters Non-standard parameters can be specified on this property.

Conformance This property MUST be specified in a VOTE component and in VPOLL choice items.

Description In a METHOD:REQUEST each choice component MUST have a POLL-ITEM-ID property. Each set of components with the same POLL- ITEM-ID value represents one overall set of items to be voted on.

POLL-ITEM-ID SHOULD be a unique small integer for each component or set of components. If it remains the same between REQUESTs then the previous response for that component MAY be re-used. To force a re-vote on a component due to a significant change, the POLL-ITEM-ID MUST change.

Format Definition This property is defined by the following notation:

pollitemid = "POLL-ITEM-ID" pollitemdparams ":" integer CRLF

pollitemidparams = *( (";" other-param) )

5.5.4. Poll-Mode

Property name POLL-MODE

Purpose This property is used in VPOLL to indicate what voting mode is to be applied.

Property Parameters Non-standard or iana parameters can be specified on this property.

Conformance This property MAY be specified in a VPOLL component or its sub-components.

York & Douglass Expires 27 January 2022 [Page 16] Internet-Draft VPOLL July 2021

Description The poll mode defines how the votes are applied to obtain a result. BASIC mode, the default, means that the voters are selecting one component (or group of components) with a given POLL=ITEM-ID.

Other polling modes may be defined in updates to this specification. These may allow for such modes as ranking or task assignment.

Format Definition This property is defined by the following notation:

pollmode = "POLL-MODE" pollmodeparams ":" ("BASIC" / iana-token / other-token) CRLF

pollmodeparams = *(";" other-param)

5.5.5. Poll-properties

Property name POLL-PROPERTIES

Purpose This property is used in VPOLL to define which icalendar properties are being voted on.

Property Parameters Non-standard or iana parameters can be specified on this property.

Conformance This property MAY be specified in a VPOLL component.

Description This property defines which icalendar properties are significant in the voting process. It may not be clear to voters which properties are varying in a significant manner. Clients may use this property to highlight those listed properties.

Format Definition This property is defined by the following notation:

pollproperties = "POLL-PROPERTIES" pollpropparams ":" text *("," text) CRLF

pollpropparams = *(";" other-param)

5.5.6. Poll-Winner

Property name POLL-WINNER

Purpose This property is used in a basic mode VPOLL to indicate which of the VPOLL sub-components won.

York & Douglass Expires 27 January 2022 [Page 17] Internet-Draft VPOLL July 2021

Value type INTEGER

Property Parameters Non-standard parameters can be specified on this property.

Conformance This property MAY be specified in a VPOLL component.

Description For poll confirmation each child component MUST have a POLL-ITEM-ID property. For basic mode the VPOLL component SHOULD have a POLL-WINNER property which MUST correspond to one of the POLL-ITEM-ID properties and indicates which sub-component was the winner.

Format Definition This property is defined by the following notation:

pollwinner = "POLL-WINNER" pollwinnerparams ":" integer CRLF

pollwinnerparams = *(";" other-param)

; Used with a STATUS:CONFIRMED VPOLL to indicate which ; components have been confirmed

5.5.7. Reply-URL

Property name REPLY-URL

Purpose This property may be used in scheduling messages to indicate additional reply methods, for example a web-service.

Value type URI

Property Parameters Non-standard, required or iana parameters can be specified on this property.

Conformance This property MAY be specified in a VPOLL component.

Description When used in a scheduling message this property indicates additional or required services that can be used to reply. Typically this would be a web service of some form.

Format Definition This property is defined by the following notation:

York & Douglass Expires 27 January 2022 [Page 18] Internet-Draft VPOLL July 2021

reply-url = "REPLY-URL" reply-urlparams ":" uri CRLF

reply-urlparams = *( (";" requiredparam) / (";" other-param) )

5.5.8. Response

Property name RESPONSE

Purpose To specify a response vote.

Value type INTEGER

Format Definition This property is defined by the following notation:

response = "RESPONSE" response-params ":" integer CRLF ; integer value 0..100

responseparams = *(";" other-param)

Description This parameter can be specified on the POLL-ITEM-ID property to provide the value of the voters response. This parameter allows for fine grained responses which are appropriate to some applications. For the case of individuals voting for a choice of events, client applications SHOULD conform to the following convention:

* 0 - 39 A "NO vote"

* 40 - 79 A "MAYBE" vote

* 80 - 89 A "YES - but not preferred vote"

* 90-100 A "YES" vote.

Clients MUST preserve the response value when there is no change from the user even if they have a UI with fixed states (e.g. yes/no/maybe).

5.6. New Components

5.6.1. VPOLL Component

Component name VPOLL

York & Douglass Expires 27 January 2022 [Page 19] Internet-Draft VPOLL July 2021

Purpose This component provides a mechanism by which voters can vote on provided choices.

Format Definition This property is defined by the following notation:

York & Douglass Expires 27 January 2022 [Page 20] Internet-Draft VPOLL July 2021

pollc = "BEGIN" ":" "VPOLL" CRLF pollprop *participantc *eventc *todoc *journalc *freebusyc *availabilityc *alarmc *iana-comp *x-comp "END" ":" "VPOLL" CRLF

pollprop = *( ; ; The following are REQUIRED, ; but MUST NOT occur more than once. ; dtstamp / uid / organizer / ; ; The following are OPTIONAL, ; but MUST NOT occur more than once. ; acceptresponse / class / created / completed / description / dtstart / last-mod / pollmode / pollproperties / priority / seq / status / summary / url / ; ; Either ’dtend’ or ’duration’ MAY appear in ; a ’pollprop’, but ’dtend’ and ’duration’ ; MUST NOT occur in the same ’pollprop’. ; ’duration’ MUST only occur when ’dtstart’ ; is present ; dtend / duration / ; ; The following are OPTIONAL, ; and MAY occur more than once. ; attach / categories / comment / contact / rstatus / related / resources / x-prop / iana-prop ; ; The following is OPTIONAL, it SHOULD appear ; once for the confirmation of a BASIC mode ; VPOLL. Other modes may define differing ; requirements. ; pollwinner / ; )

Description This component provides a mechanism by which voters can vote on provided choices. The outcome depends upon the POLL-MODE in effect.

York & Douglass Expires 27 January 2022 [Page 21] Internet-Draft VPOLL July 2021

The PARTICIPANT components in VPOLL requests provide information on each recipient who will be voting - both their identity through the CALENDAR-ADDRESS property and their votes through the VOTE components.

If specified, the "DTSTART" property defines the start or opening of the poll active period. If absent the poll is presumed to have started when created.

If "DTSTART" is present "DURATION" MAY be specified and indicates the duration, and hence the ending, of the poll. The value of the property MUST be a positive duration.

"DTEND" MAY be specified with or without "DTSTART" and indicates the ending of the poll. If DTEND is specified it MUST be later than the DTSTART or CREATED property.

If one or more VALARM components are included in the VPOLL they are not components to be voted on and MUST NOT contain a POLL- ITEM-ID property. VALARM sub-components may be used to provide warnings to the user when polls are due to start or end.

5.6.2. VOTE Component

Component name VOTE

Purpose This component provides a mechanism by which voters can vote on provided choices.

Conformance This component may be specified zero or more times in a PARTICIPANT component which identifies the voter.

Format Definition This property is defined by the following notation:

York & Douglass Expires 27 January 2022 [Page 22] Internet-Draft VPOLL July 2021

votec = "BEGIN" ":" "VOTE" CRLF voteprop *eventc *todoc *journalc *freebusyc *availabilityc *alarmc *iana-comp *x-comp "END" ":" "VOTE" CRLF

voteprop = *( ; ; The following are REQUIRED, ; but MUST NOT occur more than once. ; pollitemid / response / ; ; The following are OPTIONAL, ; and MAY occur more than once. ; comment / x-prop / iana-prop ; )

Description This component appears inside the PARTICIPANT component with a PARTICIPANT-TYPE of VOTER to identify the voter. This component contains that participants responses.

The required and optional properties and their meanings will depend upon the POLL-MODE in effect.

For any POLL-MODE, POLL-ITEM-ID is used to associate the information to a choice supplied by the organizer. This means that each VOTE component only provides information about that choice.

If allowed by the POLL-MODE a VOTE component without a POLL-ITEM- ID may be provided in a REPLY to indicate a possible new choice or to provide information to the ORGANIZER - such as the respondees availability.

6. Poll Modes

The VPOLL component is intended to allow for various forms of polling. The particular form in efffect is indicated by the POLL- MODE property.

New poll modes can be registered by including a completed POLL-MODE Registration Template (see Section 10.3) in a published RFC.

York & Douglass Expires 27 January 2022 [Page 23] Internet-Draft VPOLL July 2021

6.1. POLL-MODE:BASIC

BASIC poll mode is the form of voting in which one possible outcome is chosen from a set of possibilities. Usually this will be represented as a number of possible event objects one of which will be selected.

6.1.1. Property restrictions

This poll mode has the following property requirements:

POLL-ITEM-ID Each contained sub-component that is being voted upon MUST contain a POLL-ITEM_ID property which is unique within the context of the POLL. The value MUST NOT be reused when events are removed and/or added to the poll.

POLL-WINNER On confirmation of the poll this property MUST be present and identifies the winning component.

6.1.2. Outcome reporting

To confirm the winner the POLL-WINNER property MUST be present and the STATUS MUST be set to CONFIRMED.

When the winning VEVENT or VTODO is not a scheduled entity, that is, it has no ORGANIZER or ATTENDEES it MUST be assigned an ORGANIZER property and a list of non-participating ATTENDEEs. This allows the winning entity to be distributed to the participants through iTip or some other protocol.

7. iTIP Extensions

This specification introduces a number of extensions to [RFC5546]. In group scheduling the parties involved are organizer and attendees. In VPOLL the parties are organizer and voters.

For many of the iTip processing rules the voters take the place of attendees.

7.1. Methods

There are some extensions to the behavior of iTip methods for a VPOLL object and two new methods are defined.

York & Douglass Expires 27 January 2022 [Page 24] Internet-Draft VPOLL July 2021

+======+======+ | Method | Description | +======+======+ | PUBLISH | No changes (yet) | +------+------+ | REQUEST | Each child component MUST have a POLL-ITEM-ID | | | property. Each set of components with the | | | same POLL-ITEM-ID value represents one overall | | | set of items to be voted on. | +------+------+ | REPLY | There MUST be a single VPOLL component which | | | MUST have: either one or more POLL-ITEM-ID | | | properties with a RESPONSE param matching that | | | from a REQUEST or a VFREEBUSY or VAVAILABILITY | | | child component showing overall busy/available | | | time. The VPOLL MUST have one voter only. | +------+------+ | ADD | Not supported for VPOLL. | +------+------+ | CANCEL | There MUST be a single VPOLL component with | | | UID | +------+------+ | | matching that of the poll being cancelled. | +------+------+ | REFRESH | The organizer returns a METHOD:REQUEST with | | | the current full state, or a METHOD:CANCEL or | | | an error if no matching poll is found. | +------+------+ | COUNTER | Not supported for VPOLL. | +------+------+ | DECLINECOUNTER | Not supported for VPOLL. | +------+------+ | POLLSTATUS | Used to send the current state of the poll to | | | all voters. The VPOLL can contain a reduced | | | set of properties but MUST contain DTSTAMP, | | | SEQUENCE (if not 0), UID, ORGANIZER and | | | PARTICIPANTS. | +------+------+

Table 1

The following table shows the above methods broken down by who can send them with VPOLL components.

York & Douglass Expires 27 January 2022 [Page 25] Internet-Draft VPOLL July 2021

+======+======+ | Originator | Methods | +======+======+ | Organizer | CANCEL, PUBLISH, REQUEST, POLLSTATUS | +------+------+ | Voter | REPLY, REFRESH, REQUEST (only when delegating) | +------+------+

Table 2

7.2. Interoperability Models

Most of the standard iTip specification applies with respect to organizer and voters.

7.2.1. Delegation

TBD

7.2.2. Acting on Behalf of Other Calendar Users

TBD

7.2.3. Component Revisions

* Need to talk about what a change in SEQUENCE means

* Sequence change forces a revote.

* New voter - no sequence change

* Add another poll set or change poll item ids or any change to a child

* component - bump sequence

7.2.4. Message Sequencing

TBD

7.3. Application Protocol Elements

7.3.1. Methods for VPOLL Calendar Components

This section defines the property set restrictions for the method types that are applicable to the "VPOLL" calendar component. Each method is defined using a table that clarifies the property constraints that define the particular method.

York & Douglass Expires 27 January 2022 [Page 26] Internet-Draft VPOLL July 2021

The presence column uses the following values to assert whether a property is required or optional, and the number of times it may appear in the iCalendar object.

+======+======+ | Presence Value | Description | +======+======+ | 1 | One instance MUST be present. | +------+------+ | 1+ | At least one instance MUST be present. | +------+------+ | 0 | Instances of this property MUST NOT be present. | +------+------+ | 0+ | Multiple instances MAY be present. | +------+------+ | 0 or 1 | Up to 1 instance of this property MAY be | | | present. | +------+------+

Table 3

The following summarizes the methods that are defined for the "VPOLL" calendar component.

York & Douglass Expires 27 January 2022 [Page 27] Internet-Draft VPOLL July 2021

+======+======+ | Method | Description | +======+======+ | PUBLISH | Post notification of an poll. Used primarily | | | as a method of advertising the existence of a | | | poll. | +------+------+ | REQUEST | To make a request for a poll. This is an | | | explicit invitation to one or more voters. | | | Poll requests are also used to update, change | | | or confirm an existing poll. Clients that | | | cannot handle REQUEST MAY degrade the poll to | | | view it as a PUBLISH. REQUEST SHOULD NOT be | | | used just to set the status of the poll - | | | POLLSTATUS provides a more compact approach. | +------+------+ | REPLY | Reply to a poll request. Voters may set | | | their RESPONSE parameter to supply the | | | current vote in the range 0 to 100. | +------+------+ | CANCEL | Cancel a poll. | +------+------+ | REFRESH | A request is sent to an Organizer by a Voter | | | asking for the latest version of a poll to be | | | resent to the requester. | +------+------+ | POLLSTATUS | Used to send the current state of the poll to | | | all voters. The VPOLL can contain a reduced | | | set of properties but MUST contain DTSTAMP, | | | SEQUENCE (if not 0), UID, ORGANIZER and | | | PARTICIPANT. | +------+------+

Table 4

7.3.2. Method: PUBLISH

The "PUBLISH" method in a "VPOLL" calendar component is an unsolicited posting of an iCalendar object. Any CU may add published components to their calendar. The "Organizer" MUST be present in a published iCalendar component. "Voters" MUST NOT be present. Its expected usage is for encapsulating an arbitrary poll as an iCalendar object. The "Organizer" may subsequently update (with another "PUBLISH" method) or cancel (with a "CANCEL" method) a previously published "VPOLL" calendar component.

Note Not clear how useful this is but needs some work on transmitting the current vote without any voter identification.

York & Douglass Expires 27 January 2022 [Page 28] Internet-Draft VPOLL July 2021

This method type is an iCalendar object that conforms to the following property constraints:

+======+======+======+ | Component/ | Presence | Comment | | Property | | | +======+======+======+ | METHOD | 1 | MUST equal PUBLISH. | +------+------+------+ | VPOLL | 1+ | | +------+------+------+ | DTSTAMP | 1 | | +------+------+------+ | DTSTART | 0 or 1 | If present defines the start of the | | | | poll. Otherwise the poll starts | | | | when it is created and distributed. | +------+------+------+ | ORGANIZER | 1 | | +------+------+------+ | SUMMARY | 1 | Can be null. | +------+------+------+ | UID | 1 | | +------+------+------+ | SEQUENCE | 0 or 1 | MUST be present if value is greater | | | | than 0; MAY be present if 0. | +------+------+------+ | ACCEPT-RESPONSE | 0 or 1 | | +------+------+------+ | ATTACH | 0+ | | +------+------+------+ | CATEGORIES | 0+ | | +------+------+------+ | CLASS | 0 or 1 | | +------+------+------+ | COMMENT | 0+ | | +------+------+------+ | COMPLETED | 0 or 1 | | +------+------+------+ | CONTACT | 0 or 1 | | +------+------+------+ | CREATED | 0 or 1 | | +------+------+------+ | DESCRIPTION | 0 or 1 | Can be null. | +------+------+------+ | DTEND | 0 or 1 | If present, DURATION MUST NOT be | | | | present. | +------+------+------+ | DURATION | 0 or 1 | If present, DTEND MUST NOT be |

York & Douglass Expires 27 January 2022 [Page 29] Internet-Draft VPOLL July 2021

| | | present. | +------+------+------+ | LAST-MODIFIED | 0 or 1 | | +------+------+------+ | POLL-ITEM-ID | 0 | | +------+------+------+ | POLL-MODE | 0 or 1 | | +------+------+------+ | POLL-PROPERTIES | 0 or 1 | | +------+------+------+ | PRIORITY | 0 or 1 | | +------+------+------+ | RELATED-TO | 0+ | | +------+------+------+ | RESOURCES | 0+ | | +------+------+------+ | STATUS | 0 or 1 | MAY be one of COMPLETED/CONFIRMED/ | | | | CANCELLED. | +------+------+------+ | URL | 0 or 1 | | +------+------+------+ | IANA-PROPERTY | 0+ | | +------+------+------+ | X-PROPERTY | 0+ | | +------+------+------+ | PARTICIPANT | 0+ | Only PARTICIPANT components with | | | | PARTICIPANT-TYPE not equal to | | | | "VOTER" - that is, no voters | +------+------+------+ | REQUEST-STATUS | 0 | | +------+------+------+ | VALARM | 0+ | | +------+------+------+ | VEVENT | 0+ | Depending upon the poll mode in | | | | effect there MAY be candidate | | | | components included in the poll | | | | component. | +------+------+------+ | VFREEBUSY | 0 | | +------+------+------+ | VJOURNAL | 0+ | Depending upon the poll mode in | | | | effect there MAY be candidate | | | | components included in the poll | | | | component. | +------+------+------+ | VTODO | 0+ | Depending upon the poll mode in | | | | effect there MAY be candidate | | | | components included in the poll |

York & Douglass Expires 27 January 2022 [Page 30] Internet-Draft VPOLL July 2021

| | | component. | +------+------+------+ | VTIMEZONE | 0+ | MUST be present if any date/time | | | | refers to a timezone. | +------+------+------+ | IANA-COMPONENT | 0+ | | +------+------+------+ | X-COMPONENT | 0+ | | +------+------+------+

Table 5: Constraints for a METHOD:PUBLISH of a VPOLL

7.3.3. Method: REQUEST

The "REQUEST" method in a "VPOLL" component provides the following scheduling functions:

* Invite "Voters" to respond to the poll.

* Change the items being voted upon.

* Complete or confirm the poll.

* Response to a "REFRESH" request.

* Update the details of an existing vpoll.

* Update the status of "Voters".

* Forward a "VPOLL" to another uninvited CU.

* For an existing "VPOLL" calendar component, delegate the role of "Voter" to another CU.

* For an existing "VPOLL" calendar component, change the role of "Organizer" to another CU.

The "Organizer" originates the "REQUEST". The recipients of the "REQUEST" method are the CUs voting in the poll, the "Voters". "Voters" use the "REPLY" method to convey votes to the "Organizer".

The "UID" and "SEQUENCE" properties are used to distinguish the various uses of the "REQUEST" method. If the "UID" property value in the "REQUEST" is not found on the recipient’s calendar, then the "REQUEST" is for a new "VPOLL" calendar component. If the "UID" property value is found on the recipient’s calendar, then the "REQUEST" is for an update, or a reconfirmation of the "VPOLL" calendar component.

York & Douglass Expires 27 January 2022 [Page 31] Internet-Draft VPOLL July 2021

For the "REQUEST" method only a single iCalendar object is permitted.

This method type is an iCalendar object that conforms to the following property constraints:

+======+======+======+ | Component/ | Presence | Comment | | Property | | | +======+======+======+ | METHOD | 1 | MUST be REQUEST. | +------+------+------+ | VPOLL | 1 | | +------+------+------+ | PARTICIPANT | 1+ | Identified as voters with the | | | | PARTICIPANT-TYPE=VOTER | +------+------+------+ | DTSTAMP | 1 | | +------+------+------+ | DTSTART | 0 or 1 | If present defines the start of the | | | | poll. Otherwise the poll starts | | | | when it is created and distributed. | +------+------+------+ | ORGANIZER | 1 | | +------+------+------+ | SEQUENCE | 0 or 1 | MUST be present if value is greater | | | | than 0; MAY be present if 0. | +------+------+------+ | SUMMARY | 1 | Can be null. | +------+------+------+ | UID | 1 | | +------+------+------+ | ACCEPT-RESPONSE | 0 or 1 | | +------+------+------+ | ATTACH | 0+ | | +------+------+------+ | CATEGORIES | 0+ | | +------+------+------+ | CLASS | 0 or 1 | | +------+------+------+ | COMMENT | 0+ | | +------+------+------+ | COMPLETED | 0 or 1 | | +------+------+------+ | CONTACT | 0+ | | +------+------+------+ | CREATED | 0 or 1 | | +------+------+------+ | DESCRIPTION | 0 or 1 | Can be null. |

York & Douglass Expires 27 January 2022 [Page 32] Internet-Draft VPOLL July 2021

+------+------+------+ | DTEND | 0 or 1 | If present, DURATION MUST NOT be | | | | present. | +------+------+------+ | DURATION | 0 or 1 | If present, DTEND MUST NOT be | | | | present. | +------+------+------+ | GEO | 0 or 1 | | +------+------+------+ | LAST-MODIFIED | 0 or 1 | | +------+------+------+ | LOCATION | 0 or 1 | | +------+------+------+ | POLL-ITEM-ID | 0 | | +------+------+------+ | POLL-MODE | 0 or 1 | | +------+------+------+ | POLL-PROPERTIES | 0 or 1 | | +------+------+------+ | PRIORITY | 0 or 1 | | +------+------+------+ | RELATED-TO | 0+ | | +------+------+------+ | REQUEST-STATUS | 0 | | +------+------+------+ | RESOURCES | 0+ | | +------+------+------+ | STATUS | 0 or 1 | MAY be one of COMPLETED/CONFIRMED/ | | | | CANCELLED. | +------+------+------+ | TRANSP | 0 or 1 | | +------+------+------+ | URL | 0 or 1 | | +------+------+------+ | IANA-PROPERTY | 0+ | | +------+------+------+ | X-PROPERTY | 0+ | | +------+------+------+ | VALARM | 0+ | | +------+------+------+ | VTIMEZONE | 0+ | MUST be present if any date/time | | | | refers to a timezone. | +------+------+------+ | IANA-COMPONENT | 0+ | | +------+------+------+ | X-COMPONENT | 0+ | | +------+------+------+ | VEVENT | 0+ | Depending upon the poll mode in |

York & Douglass Expires 27 January 2022 [Page 33] Internet-Draft VPOLL July 2021

| | | effect there MAY be candidate | | | | components included in the poll | | | | component. | +------+------+------+ | VFREEBUSY | 0 | | +------+------+------+ | VJOURNAL | 0+ | Depending upon the poll mode in | | | | effect there MAY be candidate | | | | components included in the poll | | | | component. | +------+------+------+ | VTODO | 0+ | Depending upon the poll mode in | | | | effect there MAY be candidate | | | | components included in the poll | | | | component. | +------+------+------+

Table 6: Constraints for a METHOD:REQUEST of a VPOLL

7.3.3.1. Rescheduling a poll

The "REQUEST" method may be used to reschedule a poll, that is force a revote. A rescheduled poll involves a change to the existing poll in terms of its time the components being voted on may have changed. If the recipient CUA of a "REQUEST" method finds that the "UID" property value already exists on the calendar but that the "SEQUENCE" (or "DTSTAMP") property value in the "REQUEST" method is greater than the value for the existing poll, then the "REQUEST" method describes a rescheduling of the poll.

7.3.3.2. Updating or Reconfirmation of a Poll

The "REQUEST" method may be used to update or reconfirm a poll. An update to an existing poll does not involve changes to the time or candidates, and might not involve a change to the location or description for the poll. If the recipient CUA of a "REQUEST" method finds that the "UID" property value already exists on the calendar and that the "SEQUENCE" property value in the "REQUEST" is the same as the value for the existing poll, then the "REQUEST" method

describes an update of the poll details, but not a rescheduling of the POLL.

The update "REQUEST" method is the appropriate response to a "REFRESH" method sent from a "Voter" to the "Organizer" of a poll.

York & Douglass Expires 27 January 2022 [Page 34] Internet-Draft VPOLL July 2021

The "Organizer" of a poll may also send unsolicited "REQUEST" methods. The unsolicited "REQUEST" methods may be used to update the details of the poll without rescheduling it, to update the "RESPONSE" parameter of "Voters", or to reconfirm the poll.

7.3.3.3. Confirmation of a Poll

The "REQUEST" method may be used to confirm a poll, that is announce the winner in BASIC mode. The STATUS MUST be set to CONFIRMED and for BASIC mode a VPOLL POLL-WINNER property must be provided with the poll-id of the winning component.

7.3.3.4. Closing a Poll

The "REQUEST" method may be used to close a poll, that is indicate voting is completed. The STATUS MUST be set to COMPLETED.

7.3.3.5. Delegating a Poll to Another CU

Some calendar and scheduling systems allow "Voters" to delegate the vote to another "Calendar User". iTIP supports this concept using the following workflow. Any "Voter" may delegate their right to vote in a poll to another CU. The implication is that the delegate participates in lieu of the original "Voter", NOT in addition to the "Voter". The delegator MUST notify the "Organizer" of this action using the steps outlined below. Implementations may support or restrict delegation as they see fit. For instance, some implementations may restrict a delegate from delegating a "REQUEST" to another CU.

The "Delegator" of a poll forwards the existing "REQUEST" to the "Delegate". The "REQUEST" method MUST include a "Voter" property with the calendar address of the "Delegate". The "Delegator" MUST also send a "REPLY" method to the "Organizer" with the "Delegator’s" "Voter" property "DELEGATED-TO" parameter set to the calendar address of the "Delegate". Also, a new "Voter" property for the "Delegate" MUST be included and must specify the calendar user address set in the "DELEGATED-TO" parameter, as above.

In response to the request, the "Delegate" MUST send a "REPLY" method to the "Organizer", and optionally to the "Delegator". The "REPLY"

method SHOULD include the "Voter" property with the "DELEGATED-FROM" parameter value of the "Delegator’s" calendar address.

York & Douglass Expires 27 January 2022 [Page 35] Internet-Draft VPOLL July 2021

The "Delegator" may continue to receive updates to the poll even though they will not be attending. This is accomplished by the "Delegator" setting their "role" attribute to "NON-PARTICIPANT" in the "REPLY" to the "Organizer".

7.3.3.6. Changing the Organizer

The situation may arise where the "Organizer" of a "VPOLL" is no longer able to perform the "Organizer" role and abdicates without passing on the "Organizer" role to someone else. When this occurs, the "Voters" of the "VPOLL" may use out-of-band mechanisms to communicate the situation and agree upon a new "Organizer". The new "Organizer" should then send out a new "REQUEST" with a modified version of the "VPOLL" in which the "SEQUENCE" number has been incremented and the "ORGANIZER" property has been changed to the new "Organizer".

7.3.3.7. Sending on Behalf of the Organizer

There are a number of scenarios that support the need for a "Calendar User" to act on behalf of the "Organizer" without explicit role changing. This might be the case if the CU designated as "Organizer" is sick or unable to perform duties associated with that function. In these cases, iTIP supports the notion of one CU acting on behalf of another. Using the "SENT-BY" parameter, a "Calendar User" could send an updated "VPOLL" "REQUEST". In the case where one CU sends on behalf of another CU, the "Voter" responses are still directed back towards the CU designated as "Organizer".

7.3.3.8. Forwarding to an Uninvited CU

A "Voter" invited to a "VPOLL" calendar component may send the "VPOLL" calendar component to another new CU not previously associated with the "VPOLL" calendar component. The current "Voter" participating in the "VPOLL" calendar component does this by forwarding the original "REQUEST" method to the new CU. The new CU can send a "REPLY" to the "Organizer" of the "VPOLL" calendar component. The reply contains a "Voter" property for the new CU.

The "Organizer" ultimately decides whether or not the new CU becomes part of the poll and is not obligated to do anything with a "REPLY" from a new (uninvited) CU. If the "Organizer" does not want the new CU to be part of the poll, the new "Voter" property is not added to the "VPOLL" calendar component. The "Organizer" MAY send the CU a "CANCEL" message to indicate that they will not be added to the poll.

York & Douglass Expires 27 January 2022 [Page 36] Internet-Draft VPOLL July 2021

If the "Organizer" decides to add the new CU, the new "Voter" property is added to the "VPOLL" calendar component. Furthermore, the "Organizer" is free to change any "Voter" property parameter from the values supplied by the new CU to something the "Organizer" considers appropriate. The "Organizer" SHOULD send the new CU a "REQUEST" message to inform them that they have been added.

When forwarding a "REQUEST" to another CU, the forwarding "Voter" MUST NOT make changes to the original message.

7.3.3.9. Updating Voter Status

The "Organizer" of an poll may also request updated status from one or more "Voters". The "Organizer" sends a "REQUEST" method to the "Voter" and sets the "RSVP=TRUE" property parameter on the PARTICIPANT CALENDAR-ADDRESS. The "SEQUENCE" property for the poll is not changed from its previous value. A recipient will determine that the only change in the "REQUEST" is that their "RSVP" property parameter indicates a request for updated status. The recipient SHOULD respond with a "REPLY" method indicating their current vote with respect to the "REQUEST".

7.3.4. Method: REPLY

The "REPLY" method in a "VPOLL" calendar component is used to respond (e.g., accept or decline) to a "REQUEST" or to reply to a delegation "REQUEST". When used to provide a delegation response, the "Delegator" SHOULD include the calendar address of the "Delegate" on the "DELEGATED-TO" property parameter of the "Delegator’s" "CALENDAR- ADDRESS" property. The "Delegate" SHOULD include the calendar address of the "Delegator" on the "DELEGATED-FROM" property parameter of the "Delegate’s" "CALENDAR-ADDRESS" property.

The "REPLY" method is also used when processing of a "REQUEST" fails. Depending on the value of the "REQUEST-STATUS" property, no action may have been performed.

The "Organizer" of a poll may receive the "REPLY" method from a CU not in the original "REQUEST". For example, a "REPLY" may be received from a "Delegate" to a poll. In addition, the "REPLY" method may be received from an unknown CU (a "Party Crasher"). This uninvited "Voter" may be accepted, or the "Organizer" may cancel the poll for the uninvited "Voter" by sending a "CANCEL" method to the uninvited "Voter".

York & Douglass Expires 27 January 2022 [Page 37] Internet-Draft VPOLL July 2021

A "Voter" MAY include a message to the "Organizer" using the "COMMENT" property. For example, if the user indicates a low interest and wants to let the "Organizer" know why, the reason can be expressed in the "COMMENT" property value.

The "Organizer" may also receive a "REPLY" from one CU on behalf of another. Like the scenario enumerated above for the "Organizer", "Voters" may have another CU respond on their behalf. This is done using the "SENT-BY" parameter.

The optional properties listed in the table below (those listed as "0+" or "0 or 1") MUST NOT be changed from those of the original request. (But see comments on VFREEBUSY and VAVAILABILITY)

This method type is an iCalendar object that conforms to the following property constraints:

+======+======+======+ | Component/ | Presence | Comment | | Property | | | +======+======+======+ | METHOD | 1 | MUST be REPLY. | +------+------+------+ | VPOLL | 1+ | All components MUST have the same | +------+------+------+ | | | UID. | +------+------+------+ | PARTICIPANT | 1 | Identifies the Voter replying. | +------+------+------+ | DTSTAMP | 1 | | +------+------+------+ | ORGANIZER | 1 | | +------+------+------+ | UID | 1 | MUST be the UID of the original | +------+------+------+ | | | REQUEST. | +------+------+------+ | SEQUENCE | 0 or 1 | If non-zero, MUST be the sequence | | | | number of the original REQUEST. | | | | MAY be present if 0. | +------+------+------+ | ACCEPT-RESPONSE | 0 or 1 | | +------+------+------+ | ATTACH | 0+ | | +------+------+------+ | CATEGORIES | 0+ | | +------+------+------+ | CLASS | 0 or 1 | |

York & Douglass Expires 27 January 2022 [Page 38] Internet-Draft VPOLL July 2021

+------+------+------+ | COMMENT | 0+ | | +------+------+------+ | COMPLETED | 0 or 1 | | +------+------+------+ | CONTACT | 0+ | | +------+------+------+ | CREATED | 0 or 1 | | +------+------+------+ | DESCRIPTION | 0 or 1 | | +------+------+------+ | DTEND | 0 or 1 | If present, DURATION MUST NOT be | | | | present. | +------+------+------+ | DTSTART | 0 or 1 | | +------+------+------+ | DURATION | 0 or 1 | If present, DTEND MUST NOT be | | | | present. | +------+------+------+ | GEO | 0 or 1 | | +------+------+------+ | LAST-MODIFIED | 0 or 1 | | +------+------+------+ | LOCATION | 0 or 1 | | +------+------+------+ | POLL-ITEM-ID | 1+ | One per item being voted on. | +------+------+------+ | POLL-MODE | 0 | | +------+------+------+ | POLL-PROPERTIES | 0 | | +------+------+------+ | PRIORITY | 0 or 1 | | +------+------+------+ | RELATED-TO | 0+ | | +------+------+------+ | RESOURCES | 0+ | | +------+------+------+ | REQUEST-STATUS | 0+ | | +------+------+------+ | STATUS | 0 or 1 | | +------+------+------+ | SUMMARY | 0 or 1 | | +------+------+------+ | TRANSP | 0 or 1 | | +------+------+------+ | URL | 0 or 1 | | +------+------+------+ | IANA-PROPERTY | 0+ | |

York & Douglass Expires 27 January 2022 [Page 39] Internet-Draft VPOLL July 2021

+------+------+------+ | X-PROPERTY | 0+ | | +------+------+------+ | VALARM | 0 | | +------+------+------+ | VTIMEZONE | 0 or 1 | MUST be present if any date/time | | | | refers to a timezone. | +------+------+------+ | IANA-COMPONENT | 0+ | | +------+------+------+ | X-COMPONENT | 0+ | | +------+------+------+ | VEVENT | 0 | | +------+------+------+ | VFREEBUSY | 0 or 1 | A voter may respond with a | | | | VFREEBUSY component indicating that | | | | the ORGANIZER may select some other | | | | time which is not marked as busy. | +------+------+------+ | VAVAILABILITY | 0 | A voter may respond with a | | | | VAVAILABILITY component indicating | | | | that the ORGANIZER may select some | | | | other time which is shown as | | | | available. | +------+------+------+ | VJOURNAL | 0 | | +------+------+------+ | VTODO | 0 | | +------+------+------+

Table 7: Constraints for a METHOD:REPLY of a VPOLL

7.3.5. Method: CANCEL

The "CANCEL" method in a "VPOLL" calendar component is used to send a cancellation notice of an existing poll request to the affected "Voters". The message is sent by the "Organizer" of the poll.

The "Organizer" MUST send a "CANCEL" message to each "Voter" affected by the cancellation. This can be done using a single "CANCEL" message for all "Voters" or by using multiple messages with different subsets of the affected "Voters" in each.

When a "VPOLL" is cancelled, the "SEQUENCE" property value MUST be incremented as described in Section 7.2.3.

Once a CANCEL message has been sent to all voters no further voting may take place. The poll is considered closed.

York & Douglass Expires 27 January 2022 [Page 40] Internet-Draft VPOLL July 2021

This method type is an iCalendar object that conforms to the following property constraints:

+======+======+======+ | Component/ | Presence | Comment | | Property | | | +======+======+======+ | METHOD | 1 | MUST be CANCEL. | +------+------+------+ | VPOLL | 1+ | All must have the same UID. | +------+------+------+ | PARTICIPANT | 0+ | MUST include some or all Voters | | | | being removed from the poll. | | | | MUST include some or all Voters | | | | if the entire poll is cancelled. | +------+------+------+ | UID | 1 | MUST be the UID of the original | | | | REQUEST. | +------+------+------+ | DTSTAMP | 1 | | +------+------+------+ | ORGANIZER | 1 | | +------+------+------+ | SEQUENCE | 1 | | +------+------+------+ | ATTACH | 0+ | | +------+------+------+ | ACCEPT-RESPONSE | 0 | | +------+------+------+ | COMMENT | 0+ | | +------+------+------+ | COMPLETED | 0 or 1 | | +------+------+------+ | CATEGORIES | 0+ | | +------+------+------+ | CLASS | 0 or 1 | | +------+------+------+ | CONTACT | 0+ | | +------+------+------+ | CREATED | 0 or 1 | | +------+------+------+ | DESCRIPTION | 0 or 1 | | +------+------+------+ | DTEND | 0 or 1 | If present, DURATION MUST NOT be | | | | present. | +------+------+------+ | DTSTART | 0 or 1 | | +------+------+------+

York & Douglass Expires 27 January 2022 [Page 41] Internet-Draft VPOLL July 2021

| DURATION | 0 or 1 | If present, DTEND MUST NOT be | | | | present. | +------+------+------+ | GEO | 0 or 1 | | +------+------+------+ | LAST-MODIFIED | 0 or 1 | | +------+------+------+ | LOCATION | 0 or 1 | | +------+------+------+ | POLL-ITEM-ID | 0 | | +------+------+------+ | POLL-MODE | 0 | | +------+------+------+ | POLL-PROPERTIES | 0 | | +------+------+------+ | PRIORITY | 0 or 1 | | +------+------+------+ | RELATED-TO | 0+ | | +------+------+------+ | RESOURCES | 0+ | | +------+------+------+ | STATUS | 0 or 1 | MUST be set to CANCELLED to | | | | cancel the entire event. If | | | | uninviting specific Attendees, | | | | then MUST NOT be included. | +------+------+------+ | SUMMARY | 0 or 1 | | +------+------+------+ | TRANSP | 0 or 1 | | +------+------+------+ | URL | 0 or 1 | | +------+------+------+ | IANA-PROPERTY | 0+ | | +------+------+------+ | X-PROPERTY | 0+ | | +------+------+------+ | REQUEST-STATUS | 0 | | +------+------+------+ | VALARM | 0 | | +------+------+------+ | VTIMEZONE | 0+ | MUST be present if any date/time | | | | refers to a timezone. | +------+------+------+ | IANA-COMPONENT | 0+ | | +------+------+------+ | X-COMPONENT | 0+ | | +------+------+------+ | VTODO | 0 | |

York & Douglass Expires 27 January 2022 [Page 42] Internet-Draft VPOLL July 2021

+------+------+------+ | VJOURNAL | 0 | | +------+------+------+ | VEVENT | 0 | | +------+------+------+ | VFREEBUSY | 0 | | +------+------+------+

Table 8: Constraints for a METHOD:CANCEL of a VPOLL

7.3.6. Method: REFRESH

The "REFRESH" method in a "VPOLL" calendar component is used by "Voters" of an existing event to request an updated description from the poll "Organizer". The "REFRESH" method must specify the "UID" property of the poll to update. The "Organizer" responds with the latest description and version of the poll.

This method type is an iCalendar object that conforms to the following property constraints:

+======+======+======+ | Component/Property | Presence | Comment | +======+======+======+ | METHOD | 1 | MUST be REFRESH. | +------+------+------+ | VPOLL | 1 | | +------+------+------+ | PARTICIPANT | 1 | MUST identify the | | | | requester as a voter. | +------+------+------+ | DTSTAMP | 1 | | +------+------+------+ | ORGANIZER | 1 | | +------+------+------+ | UID | 1 | MUST be the UID associated | | | | with original REQUEST. | +------+------+------+ | COMMENT | 0+ | | +------+------+------+ | COMPLETED | 0 | | +------+------+------+ | IANA-PROPERTY | 0+ | | +------+------+------+ | X-PROPERTY | 0+ | | +------+------+------+ | ACCEPT-RESPONSE | 0 | | +------+------+------+

York & Douglass Expires 27 January 2022 [Page 43] Internet-Draft VPOLL July 2021

| ATTACH | 0 | | +------+------+------+ | CATEGORIES | 0 | | +------+------+------+ | CLASS | 0 | | +------+------+------+ | CONTACT | 0 | | +------+------+------+ | CREATED | 0 | | +------+------+------+ | DESCRIPTION | 0 | | +------+------+------+ | DTEND | 0 | | +------+------+------+ | DTSTART | 0 | | +------+------+------+ | DURATION | 0 | | +------+------+------+ | GEO | 0 | | +------+------+------+ | LAST-MODIFIED | 0 | | +------+------+------+ | LOCATION | 0 | | +------+------+------+ | POLL-ITEM-ID | 0 | | +------+------+------+ | POLL-MODE | 0 | | +------+------+------+ | POLL-PROPERTIES | 0 | | +------+------+------+ | PRIORITY | 0 | | +------+------+------+ | RELATED-TO | 0 | | +------+------+------+ | REQUEST-STATUS | 0 | | +------+------+------+ | RESOURCES | 0 | | +------+------+------+ | SEQUENCE | 0 | | +------+------+------+ | STATUS | 0 | | +------+------+------+ | SUMMARY | 0 | | +------+------+------+ | URL | 0 | | +------+------+------+ | VALARM | 0 | | +------+------+------+

York & Douglass Expires 27 January 2022 [Page 44] Internet-Draft VPOLL July 2021

| VTIMEZONE | 0+ | | +------+------+------+ | IANA-COMPONENT | 0+ | | +------+------+------+ | X-COMPONENT | 0+ | | +------+------+------+ | VTODO | 0 | | +------+------+------+ | VJOURNAL | 0 | | +------+------+------+ | VEVENT | 0 | | +------+------+------+ | VFREEBUSY | 0 | | +------+------+------+

Table 9: Constraints for a METHOD:REFRESH of a VPOLL

7.3.7. Method: POLLSTATUS

The "POLLSTATUS" method in a "VPOLL" calendar component is used to inform recipients of the current status of the poll in a compact manner. The "Organizer" MUST be present in the confirmed poll component. All "Voters" MUST be present. The selected component(s) according to the poll mode SHOULD NOT be present in the poll component. Clients receiving this message may store the confirmed items in their calendars.

This method type is an iCalendar object that conforms to the following property constraints:

+======+======+======+ | Component/ | Presence | Comment | | Property | | | +======+======+======+ | METHOD | 1 | MUST equal POLLSTATUS. | +------+------+------+ | VPOLL | 1+ | | +------+------+------+ | PARTICIPANT | 1+ | The voters containing their current | | | | vote | +------+------+------+ | COMPLETED | 0 or 1 | Only present for a completed poll | +------+------+------+ | DTSTAMP | 1 | | +------+------+------+ | DTSTART | 0 or 1 | | +------+------+------+ | ORGANIZER | 1 | |

York & Douglass Expires 27 January 2022 [Page 45] Internet-Draft VPOLL July 2021

+------+------+------+ | SUMMARY | 1 | Can be null. | +------+------+------+ | UID | 1 | | +------+------+------+ | SEQUENCE | 0 or 1 | MUST be present if value is greater | | | | than 0; MAY be present if 0. | +------+------+------+ | ACCEPT-RESPONSE | 0 | | +------+------+------+ | ATTACH | 0 | | +------+------+------+ | CATEGORIES | 0 | | +------+------+------+ | CLASS | 0 | | +------+------+------+ | COMMENT | 0+ | | +------+------+------+ | CONTACT | 0 | | +------+------+------+ | CREATED | 0 or 1 | | +------+------+------+ | DESCRIPTION | 0 or 1 | Can be null. | +------+------+------+ | DTEND | 0 or 1 | If present, DURATION MUST NOT be | | | | present. | +------+------+------+ | DURATION | 0 or 1 | If present, DTEND MUST NOT be | | | | present. | +------+------+------+ | LAST-MODIFIED | 0 or 1 | | +------+------+------+ | POLL-ITEM-ID | 0 | | +------+------+------+ | POLL-MODE | 0 or 1 | | +------+------+------+ | POLL-PROPERTIES | 0 | | +------+------+------+ | PRIORITY | 0 or 1 | | +------+------+------+ | RELATED-TO | 0+ | | +------+------+------+ | RESOURCES | 0+ | | +------+------+------+ | STATUS | 0 or 1 | MAY be one of TENTATIVE/CONFIRMED/ | | | | CANCELLED. | +------+------+------+ | URL | 0 or 1 | |

York & Douglass Expires 27 January 2022 [Page 46] Internet-Draft VPOLL July 2021

+------+------+------+ | IANA-PROPERTY | 0+ | | +------+------+------+ | X-PROPERTY | 0+ | | +------+------+------+ | REQUEST-STATUS | 0 | | +------+------+------+ | VALARM | 0+ | | +------+------+------+ | VEVENT | 0 | All candidate components SHOULD NOT | | | | be present. | +------+------+------+ | VFREEBUSY | 0 | | +------+------+------+ | VJOURNAL | 0 | All candidate components SHOULD NOT | | | | be present. | +------+------+------+ | VTODO | 0 | All candidate components SHOULD NOT | | | | be present. | +------+------+------+ | VTIMEZONE | 0+ | MUST be present if any date/time | | | | refers to a timezone. | +------+------+------+ | IANA-COMPONENT | 0+ | | +------+------+------+ | X-COMPONENT | 0+ | | +------+------+------+

Table 10: Constraints for a METHOD:POLLSTATUS of a VPOLL

8. CalDAV Extensions

This specification extends [RFC4791] in that it defines a new component and new iCalendar properties to be supported and requires extra definitions related to time-ranges and reports.

Additionally, it extends [RFC6638] as it a VPOLL component is a schedulable entity.

8.1. Calendar Collection Properties

This section defines new CalDAV properties for calendar collections.

8.1.1. CALDAV:supported-vpoll-component-sets

Name supported-vpoll-component-sets

Namespace urn:ietf:params:xml:ns:caldav

York & Douglass Expires 27 January 2022 [Page 47] Internet-Draft VPOLL July 2021

Purpose Specifies the calendar component types (e.g., VEVENT, VTODO, etc.) and combination of types that may be included in a VPOLL component.

Conformance This property MAY be defined on any calendar collection. If defined, it MUST be protected and SHOULD NOT be returned by a PROPFIND DAV:allprop request (as defined in [RFC2518]).

Description The CALDAV:supported-vpoll-component-sets property is used to specify restrictions on the calendar component types that VPOLL components may contain in a calendar collection.

It also specifies the combination of allowed component types.

Any attempt by the client to store VPOLL components with component types or combinations of types not listed in this property, if it exists, MUST result in an error, with the "CALDAV:supported-vpoll- component-sets" precondition Section 8.2 being violated. Since this property is protected, it cannot be changed by clients using a PROPPATCH request. However, clients can initialize the value of this property when creating a new calendar collection with MKCALENDAR. In the absence of this property, the server MUST accept all component types, and the client can assume that all component types are accepted.

Definition

York & Douglass Expires 27 January 2022 [Page 48] Internet-Draft VPOLL July 2021

8.1.2. CALDAV:vpoll-max-items

Name vpoll-max-items

Namespace urn:ietf:params:xml:ns:caldav

Purpose Provides a numeric value indicating the maximum number of items that may be contained in any instance of a VPOLL calendar object resource stored in the calendar collection.

Conformance This property MAY be defined on any calendar collection. If defined, it MUST be protected and SHOULD NOT be returned by a PROPFIND DAV:allprop request (as defined in [RFC2518]).

Description The CALDAV:vpoll-max-items is used to specify a numeric

York & Douglass Expires 27 January 2022 [Page 49] Internet-Draft VPOLL July 2021

value that indicates the maximum number of iCalendar components in any one instance of a VPOLL calendar object resource stored in a calendar collection. Any attempt to store a calendar object resource with more components per instance than this value MUST result in an error, with the CALDAV: vpoll-max-items precondition Section 8.2 being violated. In the absence of this property, the client can assume that the server can handle any number of items in a VPOLL calendar component.

Definition

PCDATA value: a numeric value (integer greater than zero)

25

8.1.3. CALDAV:vpoll-max-active

Name vpoll-max-active

Namespace urn:ietf:params:xml:ns:caldav

Purpose Provides a numeric value indicating the maximum number of active vpolls at any one time.

Conformance This property MAY be defined on any calendar collection. If defined, it MUST be protected and SHOULD NOT be returned by a PROPFIND DAV:allprop request (as defined in [RFC2518]).

Description The CALDAV:vpoll-max-active is used to specify a numeric value that indicates the maximum number of active VPOLLs at any one time. Any attempt to store a new active VPOLL calendar object resource which results in exceeding this limit MUST result in an error, with the "CALDAV:vpoll-max-active" precondition Section 8.2 being violated. In the absence of this property, the client can assume that the server can handle any number of active VPOLLs.

Definition

PCDATA value: a numeric value (integer greater than zero)

25

York & Douglass Expires 27 January 2022 [Page 50] Internet-Draft VPOLL July 2021

8.1.4. CALDAV:vpoll-max-voters

Name "vpoll-max-voters"

Namespace "urn:ietf:params:xml:ns:caldav"

Purpose Provides a numeric value indicating the maximum number of voters for any instance of a VPOLL calendar object resource stored in the calendar collection.

Conformance This property MAY be defined on any calendar collection. If defined, it MUST be protected and SHOULD NOT be returned by a PROPFIND "DAV:allprop" request (as defined in [RFC2518]).

Description The "CALDAV:vpoll-max-voters" is used to specify a numeric value that indicates the maximum number of voters for any one instance of a VPOLL calendar object resource stored in a calendar collection. Any attempt to store a calendar object resource with more voters per instance than this value MUST result in an error, with the CALDAV: "vpoll-max-voters" precondition Section 8.2 being violated. In the absence of this property, the client can assume that the server can handle any number of voters in a VPOLL calendar component.

Definition

PCDATA value: a numeric value (integer greater than zero)

25

8.1.5. CalDAV:even-more-properties

8.1.6. Extensions to CalDAV scheduling

This specification extends [RFC6638].

Each section of Appendix A "Scheduling Privileges Summary" is extended to include VPOLL.

Any reference to the ATTENDEE property should be read to include the CALENDAR-ADDRESS property contained in the PARTICIPANT compoents. That is, for scheduling purposes the CALENDAR-ADDRESS property is handled in exactly the same manner as the ATTENDEE property.

York & Douglass Expires 27 January 2022 [Page 51] Internet-Draft VPOLL July 2021

8.2. Additional Preconditions for PUT, COPY, and MOVE

This specification creates additional Preconditions for PUT, COPY, and MOVE methods. These preconditions apply when a PUT operation of a VPOLL calendar object resource into a calendar collection occurs, or when a COPY or MOVE operation of a calendar object resource into a calendar collection occurs, or when a COPY or MOVE operation occurs on a calendar collection.

The new preconditions are:

(CALDAV:supported-vpoll-component-sets) The VPOLL resource submitted in the PUT request, or targeted by a COPY or MOVE request, MUST contain a type or combination of calendar component that is supported in the targeted calendar collection;

(CALDAV:vpoll-max-items) The VPOLL resource submitted in the PUT request, or targeted by a COPY or MOVE request, MUST have a number of sub-components (excluding VTIMEZONE) less than or equal to the value of the "CALDAV:vpoll-max-items" property value Section 8.1.2 on the calendar collection where the resource will be stored;

(CALDAV:vpoll-max-active) The PUT request, or COPY or MOVE request, MUST not result in the number of active VPOLLs being greater than the value of the "CALDAV:vpoll-max-active" property value Section 8.1.3 on the calendar collection where the resource will be stored;

(CALDAV:vpoll-max-voters) The VPOLL resource submitted in the PUT request, or targeted by a COPY or MOVE request, MUST have a number of voters represented by PARTICIPANT components less than or equal to the value of the "CALDAV:vpoll-max-voters" property value Section 8.1.4 on the calendar collection where the resource will be stored;

8.3. CalDAV:calendar-query Report

This allows the retrieval of VPOLLs and their included components. The query specification allows queries to be directed at the contained sub-components. For VPOLL queries this feature is disallowed. Time-range queries can only target the vpoll component itself.

York & Douglass Expires 27 January 2022 [Page 52] Internet-Draft VPOLL July 2021

8.3.1. Example: Partial Retrieval of VPOLL

In this example, the client requests the server to return specific components and properties of the VPOLL components that overlap the time range from December 4, 2012, at 00:00:00 A.M. UTC to December 5, 2012, at 00:00:00 A.M. UTC. In addition, the "DAV:getetag" property is also requested and returned as part of the response. Note that due to the CALDAV: calendar-data element restrictions, the DTSTAMP property in VPOLL components has not been returned, and the only property returned in the VCALENDAR object is VERSION.

>> Request <<

REPORT /cyrus/work/ HTTP/1.1 Host: cal.example.com Depth: 1 Content-Type: application/xml; charset="utf-8" Content-Length: xxxx

York & Douglass Expires 27 January 2022 [Page 53] Internet-Draft VPOLL July 2021

>> Response <<

HTTP/1.1 207 Multi-Status Date: Sat, 11 Nov 2012 09:32:12 GMT Content-Type: application/xml; charset="utf-8" Content-Length: xxxx

http://cal.example.com/cyrus/work/poll2.ics "fffff-abcd2" BEGIN:VCALENDAR VERSION:2.0 BEGIN:VPOLL DTSTART;TZID=US/Eastern:20121202T120000 DURATION:PT4D SUMMARY:Poll #2 UID:[email protected] END:VPOLL END:VCALENDAR HTTP/1.1 200 OK http://cal.example.com/cyrus/work/poll3.ics "fffff-abcd3" BEGIN:VCALENDAR

VERSION:2.0 PRODID:-//Example Corp.//CalDAV Client//EN BEGIN:VPOLL DTSTART;TZID=US/Eastern:20121204T100000 DURATION:PT4D SUMMARY:Poll #3 UID:[email protected] END:VPOLL END:VCALENDAR HTTP/1.1 200 OK

York & Douglass Expires 27 January 2022 [Page 54] Internet-Draft VPOLL July 2021

8.4. CalDAV time ranges

"CALDAV:time-range XML Element" in [RFC4791] describes how to specify time ranges to limit the set of calendar components returned by the server. This specification extends [RFC4791] to describe the meaning of time ranges for VPOLL

A VPOLL component is said to overlap a given time range if the condition for the corresponding component state specified in the table below is satisfied. The conditions depend on the presence of the DTSTART, DURATION, DTEND, COMPLETED and CREATED properties in the VPOLL component. Note that, as specified above, the DTEND value MUST be a DATE-TIME value equal to or after the DTSTART value if specified.

York & Douglass Expires 27 January 2022 [Page 55] Internet-Draft VPOLL July 2021

+------+ | VPOLL has the DTSTART property? | | +------+ | | VPOLL has the DURATION property? | | | +------+ | | | VPOLL has the DTEND property? | | | | +------+ | | | | VPOLL has the COMPLETED property? | | | | | +------+ | | | | | VPOLL has the CREATED property? | | | | | | +------+ | | | | | | Condition to evaluate | +---+---+---+---+---+------+ | Y | Y | N | * | * | (start <= DTSTART+DURATION) AND | | | | | | | ((end > DTSTART) OR | | | | | | | (end >= DTSTART+DURATION)) | +---+---+---+---+---+------+ | Y | N | Y | * | * | ((start < DTEND) OR (start <= DTSTART)) | | | | | | | AND | | | | | | | ((end > DTSTART) OR (end >= DTEND)) | +---+---+---+---+---+------+ | Y | N | N | * | * | (start <= DTSTART) AND (end > DTSTART) | +---+---+---+---+---+------+ | N | N | Y | * | * | (start < DTEND) AND (end >= DTEND) | +---+---+---+---+---+------+ | N | N | N | Y | Y | ((start <= CREATED) OR (start <= COMPLETED))| | | | | | | AND | | | | | | | ((end >= CREATED) OR (end >= COMPLETED))| +---+---+---+---+---+------+ | N | N | N | Y | N | (start <= COMPLETED) AND (end >= COMPLETED) | +---+---+---+---+---+------+ | N | N | N | N | Y | (end > CREATED) | +---+---+---+---+---+------+ | N | N | N | N | N | TRUE | +---+---+---+---+---+------+

9. Security Considerations

Applications using these property need to be aware of the risks entailed in using the URIs provided as values. See [RFC3986] for a discussion of the security considerations relating to URIs.

10. IANA Considerations

10.1. Parameter Registrations

This document defines the following new iCalendar property parameters to be added to the registry defined in [RFC5545]:

York & Douglass Expires 27 January 2022 [Page 56] Internet-Draft VPOLL July 2021

+======+======+======+ | Property Parameter | Status | Reference | +======+======+======+ | REQUIRED | Current | Section 5.4.1 | +------+------+------+ | STAY-INFORMED | Current | Section 5.4.2 | +------+------+------+

Table 11

10.2. Property Registrations

This document defines the following new iCalendar properties to be added to the registry defined in [RFC5545]:

+======+======+======+ | Property | Status | Reference | +======+======+======+ | ACCEPT-RESPONSE | Current | Section 5.5.7 | +------+------+------+ | POLL-ITEM-ID | Current | Section 5.5.3 | +------+------+------+ | POLL-MODE | Current | Section 5.5.4 | +------+------+------+ | POLL-PROPERTIES | Current | Section 5.5.5 | +------+------+------+ | POLL-WINNER | Current | Section 5.5.6 | +------+------+------+ | RESPONSE | Current | Section 5.5.8 | +------+------+------+

Table 12

10.3. POLL-MODE Registration Template

A poll mode is defined by completing the following template.

Poll mode name The name of the poll mode.

Purpose The purpose of the poll mode. Give a short but clear description.

Reference A reference to the RFC in which the poll mode is defined

10.4. POLL-MODE Registrations

This document defines the following registered poll modes.

York & Douglass Expires 27 January 2022 [Page 57] Internet-Draft VPOLL July 2021

+======+======+======+ | Poll mode | Purpose | Reference | | name | | | +======+======+======+ | BASIC | To provide simple voting for a single | Current | | | outcome from a number of candidates. | | +------+------+------+

Table 13

11. Normative References

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", RFC 2119, IETF RFC 2119, DOI 10.17487/RFC2119, March 1997, .

[RFC2518] Goland, Y., Whitehead, E., Faizi, A., Carter, S., and D. Jensen, "HTTP Extensions for Distributed AuthoringWEBDAV", RFC 2518, IETF RFC 2518, DOI 10.17487/RFC2518, February 1999, .

[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", RFC 3986, IETF RFC 3986, DOI 10.17487/RFC3986, January 2005, .

[RFC4791] Daboo, C., Desruisseaux, B., and L. Dusseault, "Calendaring Extensions to WebDAV (CalDAV)", RFC 4791, IETF RFC 4791, DOI 10.17487/RFC4791, March 2007, .

[RFC5545] Desruisseaux, B., Ed., "Internet Calendaring and Scheduling Core Object Specification (iCalendar)", RFC 5545, IETF RFC 5545, DOI 10.17487/RFC5545, September 2009, .

[RFC5546] Daboo, C., Ed., "iCalendar Transport-Independent Interoperability Protocol (iTIP)", RFC 5546, IETF RFC 5546, DOI 10.17487/RFC5546, December 2009, .

[RFC6047] Melnikov, A., Ed., "iCalendar Message-Based Interoperability Protocol (iMIP)", RFC 6047, IETF RFC 6047, DOI 10.17487/RFC6047, December 2010, .

York & Douglass Expires 27 January 2022 [Page 58] Internet-Draft VPOLL July 2021

[RFC6638] Daboo, C. and B. Desruisseaux, "Scheduling Extensions to CalDAV", RFC 6638, IETF RFC 6638, DOI 10.17487/RFC6638, June 2012, .

[I-D.ietf-calext-eventpub-extensions] Douglass, M., "Event Publishing Extensions to iCalendar", I-D.ietf-calext-eventpub-extensions, IETF I-D.ietf-calext- eventpub-extensions, March 2021.

Appendix A. Open issues

public-comment: Not documented and was a parameter on something. Really sounds like a PARTICIPANT or VOTE property

Notifications: Need to do a section on what Notifications to support. A. VPOLL is about to end and you haven’t voted on it yet. Instead reuse VALARMS to notify the user?

Future: Restarting a confirmed/completed VPOLL What to do with changes to STATUS:CONFIRMED? Allow them or not? What do to that poll had a winning event or todo. Stress VPOLL UID MUST be unique Changing status back from CONFIRMED MUST adjust status of any events booked as a result of confirmation. MUST winning event be cancelled for POLL-MODE basic? No - voter has indicated now unable to attend - want to revote

Future: Voting on a confirmed/completed VPOLL Can a voter vote after completion? May be unable to attend and wants to indicate. Requires retention of VPOLL retention period Removed status

ORGANIZER/ATTENDEE validity Can a user create a poll with scheduled events where that user’s isn’t the organizer of the poll? So is there a requirement that the account that poll is on is able to create each one of the resources in the poll? i.e. I can’t create a poll with a set of events where I am just the attendee of the events. Are there any other restrictions for components in a VPOLL? Add to security consideration

Update to existing event after poll confirm When voting on existing event - winning properties ONLY are merged in to the real event.

Need to write down what isn’t valid in a VPOLL a. Can’t change POLL- MODE

Guide for ATTENDEE roles chair, NON-PARTICIPANT etc

York & Douglass Expires 27 January 2022 [Page 59] Internet-Draft VPOLL July 2021

? - some iTip notes On confirm - send itip if appropriate (PUBLISH) - all non-participating - shared - feeds Organizer can specify where result is? Confirm can specify that itip is sent - ITIP / NONE - parameter ? on POLL-WINNER

Need to add example of freebusy in response

BEGIN:VCALENDAR VERSION:2.0 PRODID:-//BedeworkCaldavTest//BedeworkCaldavTest METHOD: REPLY BEGIN:VPOLL ORGANIZER:mailto:[email protected] BEGIN:PARTICIPANT PARTICIPANT-TYPE: VOTER CALENDAR-ADDRESS:mailto:[email protected] UID:sched01-1234567890 DTSTAMP:20120101T010000Z SEQUENCE:0 SUMMARY:What to do this week BEGIN:VFREEBUSY ...... END:VFREEBUSY END:PARTICIPANT END:VPOLL END:VCALENDAR

Appendix B. Change log

Calext V01: 2019-10-17 MD Replace VVOTER and VOTER with PARTICIPANT.

Calext V00: 2019-05-17 MD First calext version. Moved source to metanorma. No changes to specification.

V03: 2014-10-28 MD * Add VVOTER and VOTE components.

* Add RESPONSE property.

* Remove RESPONSE parameter from VOTER.

V03: 2014-05-12 MD * Add reply-url property and required parameter.

* Fix ACCEPT-RESPONSE definition.

V02: 2014-05-12 MD * Typos fixed, clarifications made.

York & Douglass Expires 27 January 2022 [Page 60] Internet-Draft VPOLL July 2021

* Removed spurious COMMENT param. Switched some to PUBLIC- COMMENT

* Changed STAY-INFORMED to remove boolean value type and state explicit TRUE/FALSE values.

* iTip: Allow VPOLL DTSTART to be optional and allow VAVAILABILITY as subcomponent

* iTip: fix broken table cells

* Add POLL-PROPERTIES, POLL-WINNER to 5545 extensions table

* Added Caldav scheduling section

V01: 2013-08-07 MD * Removed method CONFIRM

* Removed pollitemid from VPOLL abnf. Added text for pollwinner

* Added POLL-WINNER and verbiage

* Added STATUS values

* Added RELTYPE=POLL

* Added supported-vpoll-component-sets

* Added CalDAV related parameters to VOTER

* Removed bad CalDAV query example. State that queries cannot target the sub-components.

Initial version: 2012-11-02 MD

Authors’ Addresses

Eric York

Email: [email protected]

Michael Douglass

Email: [email protected]

York & Douglass Expires 27 January 2022 [Page 61] JMAP N.M. Jenkins, Ed. Internet-Draft Fastmail Intended status: Standards Track M. Douglass, Ed. Expires: 28 January 2022 Spherical Cow Group 27 July 2021

JMAP for Calendars draft-ietf-jmap-calendars-06

Abstract

This document specifies a data model for synchronizing calendar data with a server using JMAP.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on 28 January 2022.

Copyright Notice

Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/ license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

Jenkins & Douglass Expires 28 January 2022 [Page 1] Internet-Draft JMAP Calendars July 2021

Table of Contents

1. Introduction ...... 3 1.1. Notational Conventions ...... 4 1.2. The LocalDate Data Type ...... 4 1.3. Terminology ...... 4 1.4. Data Model Overview ...... 4 1.4.1. UIDs and CalendarEvent Ids ...... 5 1.5. Addition to the Capabilities Object ...... 6 1.5.1. urn:ietf:params:jmap:calendars ...... 6 1.5.2. urn:ietf:params:jmap:principals:availability . . . . 7 2. Principals and Sharing ...... 7 2.1. Principal Capability urn:ietf:params:jmap:calendars . . . 7 2.2. Principal/getAvailability ...... 8 3. Participant Identities ...... 10 3.1. ParticipantIdentity/get ...... 11 3.2. ParticipantIdentity/changes ...... 11 3.3. ParticipantIdentity/set ...... 11 4. Calendars ...... 11 4.1. Calendar/get ...... 16 4.2. Calendar/changes ...... 16 4.3. Calendar/set ...... 16 5. Calendar Events ...... 17 5.1. Additional JSCalendar properties ...... 19 5.1.1. mayInviteSelf ...... 19 5.1.2. mayInviteOthers ...... 19 5.1.3. hideAttendees ...... 19 5.2. Attachments ...... 19 5.3. Per-user properties ...... 19 5.4. Recurring events ...... 20 5.5. Updating for "this-and-future" ...... 20 5.5.1. Splitting an event ...... 21 5.5.2. Updating the base event and overriding previous . . . 21 5.6. CalendarEvent/get ...... 21 5.7. CalendarEvent/changes ...... 23 5.8. CalendarEvent/set ...... 23 5.8.1. Patching ...... 25 5.8.2. Sending invitations and responses ...... 28 5.9. CalendarEvent/copy ...... 31 5.10. CalendarEvent/query ...... 31 5.10.1. Filtering ...... 32 5.10.2. Sorting ...... 33 5.11. CalendarEvent/queryChanges ...... 34 5.12. Examples ...... 34 6. Alerts ...... 34 6.1. Default alerts ...... 34 6.2. Acknowledging an alert ...... 35 6.3. Snoozing an alert ...... 35

Jenkins & Douglass Expires 28 January 2022 [Page 2] Internet-Draft JMAP Calendars July 2021

6.4. Push events ...... 35 7. Calendar Event Notifications ...... 36 7.1. Auto-deletion of Notifications ...... 37 7.2. Object Properties ...... 37 7.3. CalendarEventNotification/get ...... 38 7.4. CalendarEventNotification/changes ...... 38 7.5. CalendarEventNotification/set ...... 38 7.6. CalendarEventNotification/query ...... 38 7.6.1. Filtering ...... 38 7.6.2. Sorting ...... 39 7.7. CalendarEventNotification/queryChanges ...... 39 8. Security Considerations ...... 39 8.1. Denial-of-service Expanding Recurrences ...... 39 8.2. Privacy ...... 39 9. IANA Considerations ...... 39 9.1. JMAP Capability Registration for "calendars" ...... 39 9.2. JSCalendar Property Registrations ...... 40 9.2.1. id ...... 40 9.2.2. calendarIds ...... 40 9.2.3. isDraft ...... 40 9.2.4. utcStart ...... 40 9.2.5. utcEnd ...... 41 9.2.6. mayInviteSelf ...... 41 9.2.7. mayInviteOthers ...... 41 9.2.8. hideAttendees ...... 41 10. Normative References ...... 41 11. Informative References ...... 42 Authors’ Addresses ...... 42

1. Introduction

JMAP ([RFC8620] - JSON Meta Application Protocol) is a generic protocol for synchronizing data, such as mail, calendars or contacts, between a client and a server. It is optimized for mobile and web environments, and aims to provide a consistent interface to different data types.

This specification defines a data model for synchronizing calendar data between a client and a server using JMAP. The data model is designed to allow a server to provide consistent access to the same data via CalDAV [RFC4791] as well as JMAP, however the functionality offered over the two protocols may differ. Unlike CalDAV, this specification does not define access to tasks or journal entries (VTODO or VJOURNAL iCalendar components in CalDAV).

Jenkins & Douglass Expires 28 January 2022 [Page 3] Internet-Draft JMAP Calendars July 2021

1.1. Notational Conventions

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

Type signatures, examples, and property descriptions in this document follow the conventions established in Section 1.1 of [RFC8620]. Data types defined in the core specification are also used in this document.

1.2. The LocalDate Data Type

Where "LocalDate" is given as a type, it means a string in the same format as "Date" (see [RFC8620], Section 1.4), but with the "time- offset" omitted from the end. The interpretation in absolute time depends upon the time zone for the event, which may not be a fixed offset (for example when daylight saving time occurs). For example, "2014-10-30T14:12:00".

1.3. Terminology

The same terminology is used in this document as in the core JMAP specification, see [RFC8620], Section 1.6.

The terms ParticipantIdentity, Calendar, CalendarEvent, and CalendarEventNotification (with these specific capitalizations) are used to refer to the data types defined in this document and instances of those data types.

1.4. Data Model Overview

An Account (see [RFC8620], Section 1.6.2) with support for the calendar data model contains zero or more Calendar objects, which is a named collection of CalendarEvents. Calendars can also provide defaults, such as alerts and a color to apply to events in the calendar. Clients commonly let users toggle visibility of events belonging to a particular calendar on/off. Servers may allow an event to belong to multiple Calendars within an account.

Jenkins & Douglass Expires 28 January 2022 [Page 4] Internet-Draft JMAP Calendars July 2021

A CalendarEvent is a representation of an event or recurring series of events in JSEvent [I-D.ietf-calext-jscalendar] format. Simple clients may ask the server to expand recurrences for them within a specific time period, and optionally convert times into UTC so they do not have to handle time zone conversion. More full-featured clients will want to access the full event information and handle recurrence expansion and time zone conversion locally.

CalendarEventNotification objects keep track of the history of changes made to a calendar by other users, allowing calendar clients to notify the user of changes to their schedule.

The ParticipantIdentity data type represents the identities of the current user within an Account, which determines which events the user is a participant of and possibly their permissions related to that event.

In servers with support for JMAP Sharing [RFC XXX], data may be shared with other users. Sharing permissions are managed per calendar. For example, an individual may have separate calendars for personal and work activities, with both contributing to their free- busy availability, but only the work calendar shared in its entirety with colleagues. Principals may also represent schedulable entities, such as a meeting room.

Users can normally subscribe to any calendar to which they have access. This indicates the user wants this calendar to appear in their regular list of calendars. The separate "isVisible" property stores whether the user would currently like to view the events in a subscribed calendar.

1.4.1. UIDs and CalendarEvent Ids

Each CalendarEvent has a "uid" property ([I-D.ietf-calext-jscalendar], Section 4.1.2), which is a globally unique identifier that identifies the same event in different Accounts, or different instances of the same recurring event within an Account.

An Account MUST NOT contain more than one CalendarEvent with the same uid unless all of the CalendarEvent objects have distinct, non-null values for their "recurrenceId" property. (This situation occurs if the principal is added to one or more specific instances of a recurring event without being invited to the whole series.)

Jenkins & Douglass Expires 28 January 2022 [Page 5] Internet-Draft JMAP Calendars July 2021

Each CalendarEvent also has an id, which is scoped to the JMAP Account and used for referencing it in JMAP methods. There is no necessary link between the uid property and the CalendarEvent’s id. CalendarEvents with the same uid in different Accounts MAY have different ids.

1.5. Addition to the Capabilities Object

The capabilities object is returned as part of the JMAP Session object; see [RFC8620], Section 2. This document defines two additional capability URIs.

1.5.1. urn:ietf:params:jmap:calendars

This represents support for the Calendar, CalendarEvent, CalendarEventNotification, and ParticipantIdentity data types and associated API methods. The value of this property in the JMAP Session capabilities property is an empty object.

The value of this property in an account’s accountCapabilities property is an object that MUST contain the following information on server capabilities and permissions for that account:

* *shareesActAs*: "String" This MUST be one of:

- "self" - sharees act as themselves when using calendars in this account.

- "secretary"- sharees act as the principal to which this account belongs.

* *maxCalendarsPerEvent*: "UnsignedInt|null" The maximum number of Calendars (see Section XXX) that can be can assigned to a single CalendarEvent object (see Section XXX). This MUST be an integer >= 1, or null for no limit (or rather, the limit is always the number of Calendars in the account).

* *minDateTime*: "LocalDate" The earliest date-time the server is willing to accept for any date stored in a CalendarEvent.

* *maxDateTime*: "LocalDate" The latest date-time the server is willing to accept for any date stored in a CalendarEvent.

* *maxExpandedQueryDuration*: "Duration" The maximum duration the user may query over when asking the server to expand recurrences.

* *maxParticipantsPerEvent*: "Number|null" The maximum number of participants a single event may have, or null for no limit.

Jenkins & Douglass Expires 28 January 2022 [Page 6] Internet-Draft JMAP Calendars July 2021

* *mayCreateCalendar*: "Boolean" If true, the user may create a calendar in this account.

1.5.2. urn:ietf:params:jmap:principals:availability

Represents support for the Principal/getAvailability method. Any account with this capability MUST also have the "urn:ietf:params:jmap:principals" capability (see [RFC XXX]).

The value of this property in the JMAP Session capabilities property is an empty object.

The value of this property in an account’s accountCapabilities property is an object that MUST contain the following information on server capabilities and permissions for that account:

* *maxAvailabilityDuration*: The maximum duration over which the server is prepared to calculate availability in a single call (see Section XXX).

2. Principals and Sharing

For systems that also support JMAP Sharing [RFC XXX], the calendars capability is used to indicate that this principal may be used with calendaring. A new method is defined to allow users to query availability when scehduling events.

2.1. Principal Capability urn:ietf:params:jmap:calendars

A "urn:ietf:params:jmap:calendars" property is added to the Principal "capabilities" object, the value of which is an object with the following properties:

* *accountId*: "Id|null" Id of Account with the "urn:ietf:params:jmap:calendars" capability that contains the calendar data for this principal, or null if none (e.g. the Principal is a group just used for permissions management), or the user does not have access to any data in the account (with the exception of free/busy, which is governed by the mayGetAvailability property).

* *account*: "Account|null" The JMAP Account object corresponding to the accountId, null if none.

* *mayGetAvailability*: "Boolean" May the user call the "Principal/ getAvailability" method with this Principal?

Jenkins & Douglass Expires 28 January 2022 [Page 7] Internet-Draft JMAP Calendars July 2021

* *sendTo*: "String[String]|null" If this principal may be added as a participant to an event, this is the map of methods for adding it, in the same format as Participant#sendTo in JSEvent (see [I-D.ietf-calext-jscalendar], Section 4.4.5).

2.2. Principal/getAvailability

This method calculates the availability of the principal for scheduling within a requested time period. It takes the following arguments:

* *accountId*: "Id" The id of the account to use.

* *id*: "Id" The id of the Principal to calculate availability for.

* *utcStart*: "UTCDate" The start time (inclusive) of the period for which to return availability.

* *utcEnd*: "UTCDate" The end time (exclusive) of the period for which to return availability.

* *showDetails*: "Boolean" If true, event details will be returned if the user has permission to view them.

* *eventProperties*: "String[]|null" A list of properties to include in any JSEvent object returned. If "null", all properties of the event will be returned. Otherwise, only properties with names in the given list will be returned.

The server will first find all relevant events, expanding any recurring events. Relevant events are ones where all of the following is true:

* The principal is subscribed to the calendar.

* Either the calendar belongs to the principal or the calendar account’s "shareesActAs" property is "self".

* The "includeInAvailability" property of the calendar for the principal is "all" or "attending".

* The user has the "mayReadFreeBusy" permission for the calendar.

* The event finishes after the "utcStart" argument and starts before the "utcEnd" argument.

* The event’s "privacy" property is not "secret".

Jenkins & Douglass Expires 28 January 2022 [Page 8] Internet-Draft JMAP Calendars July 2021

* The "freeBusyStatus" property of the event is "busy" (or omitted, as this is the default).

* The "status" property of the event is not "cancelled".

* If the "includeInAvailability" property of the calendar is "attending", then the principal is a participant of the event, and has a "participationStatus" of "accepted" or "tentative".

If an event is in more than one calendar, it is relevant if all of the above are true for any one calendar that it is in.

The server then generates a BusyPeriod object for each of these events. A *BusyPeriod* object has the following properties:

* *utcStart*: "UTCDate" The start time (inclusive) of the period this represents.

* *utcEnd*: "UTCDate" The end time (exclusive) of the period this represents.

* *busyStatus*: "String" (optional, default "unavailable") This MUST be one of

- "confirmed": The event status is "confirmed".

- "tentative": The event status is "tentative".

- "unavailable": The principal is not available for scheduling at this time for any other reason.

* *event*: "JSEvent|null" The JSEvent representation of the event, or null if any of the following are true:

- The "showDetails" argument is false.

- The "privacy" property of the event is "private".

- The user does not have the "mayReadItems" permission for any of the calendars the event is in.

If an eventProperties argument was given, any properties in the JSEvent that are not in the eventProperties list are removed from the returned representation.

The server MAY also generate BusyPeriod objects based on other information it has about the principal’s availability, such as office hours.

Jenkins & Douglass Expires 28 January 2022 [Page 9] Internet-Draft JMAP Calendars July 2021

Finally, the server MUST merge and split BusyPeriod objects where the "event" property is null, such that none of them overlap and either there is a gap in time between any two objects (the utcEnd of one does not equal the utcStart of another) or those objects have a different busyStatus property. If there are overlapping BusyPeriod time ranges with different "busyStatus" properties the server MUST choose the value in the following order: confirmed > unavailable > tentative.

The response has the following argument:

* *list*: "BusyPeriod[]" The list of BusyPeriod objects calculated as described above.

The following additional errors may be returned instead of the "Principal/getAvailability" response:

"notFound": No principal with this id exists, or the user does not have permission to see that this principal exists.

"forbidden": The user does not have permission to query this principal’s availability.

"tooLarge": The duration between utcStart an utcEnd is longer than the server is willing to calculate availability for.

"rateLimit": Too many availability requests have been made recently and the user is being rate limited. It may work to try again later.

3. Participant Identities

A ParticipantIdentity stores information about a URI that represents the user within that account in an event’s participants. It has the following properties:

* *id*: "Id" (immutable; server-set) The id of the ParticipantIdentity.

* *name*: "String" (default: "") The display name of the participant to use when adding this participant to an event, e.g. "Joe Bloggs".

* *sendTo*: "String[String]" Represents methods by which the participant may receive invitations and updates to an event.

The keys in the property value are the available methods and MUST only contain ASCII alphanumeric characters (A-Za-z0-9). The value is a URI for the method specified in the key.

Jenkins & Douglass Expires 28 January 2022 [Page 10] Internet-Draft JMAP Calendars July 2021

A participant in an event corresponds to a ParticipantIdentity if any of the method/uri pairs in the sendTo property of the participant are identical to a method/uri pair in the sendTo property of the identity.

The following JMAP methods are supported.

3.1. ParticipantIdentity/get

This is a standard "/get" method as described in [RFC8620], Section 5.1. The _ids_ argument may be "null" to fetch all at once.

3.2. ParticipantIdentity/changes

This is a standard "/changes" method as described in [RFC8620], Section 5.2.

3.3. ParticipantIdentity/set

This is a standard "/set" method as described in [RFC8620], Section 5.3. The server MAY restrict the uri values the user may claim, for example only allowing "mailto:" URIs with email addresses that belong to the user. A standard "forbidden" error is returned to reject non-permissible changes.

4. Calendars

A Calendar is a named collection of events. All events are associated with at least one calendar.

A *Calendar* object has the following properties:

* *id*: "Id" (immutable; server-set) The id of the calendar.

* *role*: "String|null" (default: null) Denotes the calendar has a special purpose. This MUST be one of the following:

- "inbox": This is the principal’s default calendar; when the principal is invited to an event, this is the calendar to which it will be added by the server. There MUST NOT be more than one calendar with this role in an account.

- "templates": This calendar holds templates for creating new events. All events in this calendar MUST have the "isDraft" property set to true. Clients should not show this as a regular calendar to users, but may offer users to create new events by copying one of the events in here.

Jenkins & Douglass Expires 28 January 2022 [Page 11] Internet-Draft JMAP Calendars July 2021

* *name*: "String" The user-visible name of the calendar. This may be any UTF-8 string of at least 1 character in length and maximum 255 octets in size.

* *description*: "String|null" (default: null) An optional longer- form description of the calendar, to provide context in shared environments where users need more than just the name.

* *color*: "String|null" (default: null) A color to be used when displaying events associated with the calendar.

If not null, the value MUST be a case-insensitive color name taken from the set of names defined in Section 4.3 of CSS Color Module Level 3 COLORS (https://www.w3.org/TR/css-color-3/), or an RGB value in hexadecimal notation, as defined in Section 4.2.1 of CSS Color Module Level 3.

The color SHOULD have sufficient contrast to be used as text on a white backgroun d.

* *sortOrder*: "UnsignedInt" (default: 0) Defines the sort order of calendars when presented in the client’s UI, so it is consistent between devices. The number MUST be an integer in the range 0 <= sortOrder < 2^(31.)

A calendar with a lower order should be displayed before a calendar with a higher order in any list of calendars in the client’s UI. Calendars with equal order SHOULD be sorted in alphabetical order by name. The sorting should take into account locale-specific character order convention.

* *isSubscribed*: "Boolean" Has the user indicated they wish to see this Calendar in their client? This SHOULD default to false for Calendars in shared accounts the user has access to and true for any new Calendars created by the user themself.

If false, the calendar should only be displayed when the user explicitly requests it or to offer it for the user to subscribe to.

* *isVisible*: "Boolean" (default: true) Should the calendar’s events be displayed to the user at the moment? Clients MUST ignore this property if isSubscribed is false. If an event is in multiple calendars, it should be displayed if isVisible is true for any of those calendars.

* *includeInAvailability*: "String" (default: all) Should the calendar’s events be used as part of availability calculation? This MUST be one of:

Jenkins & Douglass Expires 28 January 2022 [Page 12] Internet-Draft JMAP Calendars July 2021

- "all": all events are considered.

- "attending": events the user is a confirmed or tentative participant of are considered.

- "none": all events are ignored (but may be considered if also in another calendar).

* *defaultAlertsWithTime*: "Id[Alert]|null" (default: null) A map of alert ids to Alert objects (see [I-D.ietf-calext-jscalendar], Section 4.5.2) to apply for events where "showWithoutTime" is false and "useDefaultAlerts" is true. Ids MUST be unique across all default alerts in the account, including those in other calendars; a UUID is recommended.

* *defaultAlertsWithoutTime*: "Id[Alert]|null" (default: null) A map of alert ids to Alert objects (see [I-D.ietf-calext-jscalendar], Section 4.5.2) to apply for events where "showWithoutTime" is true and "useDefaultAlerts" is true. Ids MUST be unique across all default alerts in the account, including those in other calendars; a UUID is recommended.

* *timeZone*: "String|null" (default: null) The time zone to use for events without a time zone when the server needs to resolve them into absolute time, e.g., for alerts or availability calculation. The value MUST be a time zone id from the IANA Time Zone Database TZDB (https://www.iana.org/time-zones). If "null", the timeZone of the account’s associated Principal will be used. Clients SHOULD use this as the default for new events in this calendar if set.

* *shareWith*: "Id[CalendarRights]|null" (default: null) A map of Principal id to rights for principals this calendar is shared with. The principal to which this calendar belongs MUST NOT be in this set. This is null if the user requesting the object does not have the mayAdmin right, or if the calendar is not shared with anyone. May be modified only if the user has the mayAdmin right. The account id for the principals may be found in the "urn:ietf:params:jmap:principals:owner" capability of the Account to which the calendar belongs.

* *myRights*: "CalendarRights" (server-set) The set of access rights the user has in relation to this Calendar. If any event is in multiple calendars, the user has the following rights:

- The user may fetch the event if they have the mayReadItems right on any calendar the event is in.

Jenkins & Douglass Expires 28 January 2022 [Page 13] Internet-Draft JMAP Calendars July 2021

- The user may remove an event from a calendar (by modifying the event’s "calendarIds" property) if the user has the appropriate permission for that calendar.

- The user may make other changes to the event if they have the right to do so in _all_ calendars to which the event belongs.

A *CalendarRights* object has the following properties:

* *mayReadFreeBusy*: "Boolean" The user may read the free-busy information for this calendar as part of a call to Principal/ getAvailability (see Section XXX).

* *mayReadItems*: "Boolean" The user may fetch the events in this calendar.

* *mayAddItems*: "Boolean" The user may create new events on this calendar or move events to this calendar. For recurring events, they may add an override to add an occurrence, or remove an existing override that is excluding an occurrence.

* *mayUpdatePrivate*: "Boolean" The user may modify the following properties on all events in the calendar. If the shareesActAs account capability is "self", these properties MUST all be stored per-user, and changes do not affect any other user of the calendar. If shareesActAs is "secretary", the values are shared between all users.

- keywords

- color

- freeBusyStatus

- useDefaultAlerts

- alerts

The user may also modify the above on a per-occurrence basis for recurring events.

* *mayRSVP*: "Boolean" The user may modify the "participationStatus", "participationComment", "expectReply", "scheduleAgent", "scheduleSequence", and "scheduleUpdated" properties of any Participant object that corresponds to one of the user’s ParticipantIdentity objects in the account.

Jenkins & Douglass Expires 28 January 2022 [Page 14] Internet-Draft JMAP Calendars July 2021

If the event has its "mayInviteSelf" property set to true (see Section XXX), then the user may also add a new Participant to the event with a sendTo property that is the same as the sendTo property of one of the user’s ParticipantIdentity objects in the account. The roles property of the participant MUST only contain "attendee".

If the event has its "mayInviteOthers" property set to true (see Section XXX) and there is an existing Participant in the event corresponding to one of the user’s ParticipantIdentity objects in the account, then the user may also add new participants. The roles property of any new participant MUST only contain "attendee".

The user may also do all of the above on a per-occurrence basis for recurring events.

* *mayUpdateOwn*: "Boolean" The user may modify an existing event on this calendar if either they are the owner of the event or the event has no owner.

* *mayUpdateAll*: "Boolean" The user may modify all existing events on this calendar.

* *mayRemoveOwn*: "Boolean" The user may delete an event or remove it from this calendar if either they are the owner of the event or the event has no owner. For recurring events, they may add an override to remove an occurrence.

* *mayRemoveAll*: "Boolean" The user may delete any event or remove it from this calendar. For recurring events, they may add an override to remove an occurrence.

* *mayAdmin*: "Boolean" The user may modify sharing for this calendar.

* *mayDelete*: "Boolean" (server-set) The user may delete the calendar itself. This property MUST be false if the account to which this calendar belongs has the _isReadOnly_ property set to true.

The user is an *owner* for an event if the CalendarEvent object has a "participants" property, and one of the Participant objects both: a) Has the "owner" role. b) Corresponds to one of the user’s ParticipantIdentity objects in the account.

Jenkins & Douglass Expires 28 January 2022 [Page 15] Internet-Draft JMAP Calendars July 2021

An event has no owner if its participants property is null or omitted, or if none of the Participant objects have the "owner" role.

4.1. Calendar/get

This is a standard "/get" method as described in [RFC8620], Section 5.1. The _ids_ argument may be "null" to fetch all at once.

If mayReadFreeBusy is the only permission the user has, the calendar MUST NOT be returned in Calendar/get and Calendar/query; it must behave as though it did not exist. The data is just used as part of Principal/getAvailability.

4.2. Calendar/changes

This is a standard "/changes" method as described in [RFC8620], Section 5.2.

4.3. Calendar/set

This is a standard "/set" method as described in [RFC8620], Section 5.3 but with the following additional request argument:

* *onDestroyRemoveEvents*: "Boolean" (default: false)

If false, any attempt to destroy a Calendar that still has CalendarEvents in it will be rejected with a "calendarHasEvent" SetError. If true, any CalendarEvents that were in the Calendar will be removed from it, and if in no other Calendars they will be destroyed. This SHOULD NOT send scheduling messages to participants or create CalendarEventNotification objects.

The "role" and "shareWith" properties may only be set by users that have the mayAdmin right. The value is shared across all users, although users without the mayAdmin right cannot see the value.

When modifying the shareWith property, the user cannot give a right to a principal if the principal did not already have that right and the user making the change also does not have that right. Any attempt to do so must be rejected with a "forbidden" SetError.

Users can subscribe or unsubscribe to a calendar by setting the "isSubscribed" property. The server MAY forbid users from subscribing to certain calendars even though they have permission to see them, rejecting the update with a "forbidden" SetError.

Jenkins & Douglass Expires 28 January 2022 [Page 16] Internet-Draft JMAP Calendars July 2021

The "timeZone", "includeInAvailability", "defaultAlertsWithoutTime" and "defaultAlertsWithTime" properties are stored per-user if the calendar account’s "shareesActAs" capability is "self", and may be set by any user who is subscribed to the calendar. Otherwise, these properties are shared, and may only be set by users that have the mayAdmin right.

The following properties may be set by anyone who is subscribed to the calendar and are all stored per-user:

* name

* color

* sortOrder

* isVisible

These properties are initially inherited from the owner’s copy of the calendar, but if set by a sharee that user gets their own copy of the property; it does not change for any other principals. If the value of the property in the owner’s calendar changes after this, it does not overwrite the sharee’s value.

The following extra SetError types are defined:

For "destroy":

* *calendarHasEvent*: The Calendar has at least one CalendarEvent assigned to it, and the "onDestroyRemoveEvents" argument was false.

5. Calendar Events

A *CalendarEvent* object contains information about an event, or recurring series of events, that takes place at a particular time. It is a JSEvent object, as defined in [I-D.ietf-calext-jscalendar], with the following additional properties:

* *id*: "Id" The id of the CalendarEvent. This property is immutable. The id uniquely identifies a JSEvent with a particular "uid" and "recurrenceId" within a particular account.

* *calendarIds*: "Id[Boolean]" The set of Calendar ids this event belongs to. An event MUST belong to one or more Calendars at all times (until it is destroyed). The set is represented as an object, with each key being a _Calendar id_. The value for each key in the object MUST be "true".

Jenkins & Douglass Expires 28 January 2022 [Page 17] Internet-Draft JMAP Calendars July 2021

* *isDraft*: "Boolean" If true, this event is to be considered a draft. The server will not send any scheduling messages to participants or send push notifications for alerts. This may only be set to true upon creation. Once set to false, the value cannot be updated to true. This property MUST NOT appear in "recurrenceOverrides".

* *utcStart*: "UTCDate" For simple clients that do not or cannot implement time zone support. Clients should only use this if also asking the server to expand recurrences, as you cannot accurately expand a recurrence without the original time zone.

This property is calculated at fetch time by the server. Time zones are political and they can and do change at any time. Fetching exactly the same property again may return a different results if the time zone data has been updated on the server. Time zone data changes are not considered "updates" to the event.

If set, server will convert to the event’s current time zone using its current time zone data and store the local time.

This is not included by default and must be requested explicitly.

Floating events (events without a time zone) will be interpreted as per the time zone given as a CalendarEvent/get argument.

Note that it is not possible to accurately calculate the expansion of recurrence rules or recurrence overrides with the utcStart property rather than the local start time. Even simple recurrences such as "repeat weekly" may cross a daylight-savings boundary and end up at a different UTC time. Clients that wish to use "utcStart" are RECOMMENDED to request the server expand recurrences (see Section XXX).

* *utcEnd*: "UTCDate" The server calculates the end time in UTC from the start/timeZone/duration properties of the event. This is not included by default and must be requested explicitly. Like utcStart, this is calculated at fetch time if requested and may change due to time zone data changes. Floating events will be interpreted as per the time zone given as a CalendarEvent/get argument.

CalendarEvent objects MUST NOT have a "method" property as this is only used when representing iTIP [RFC5546] scheduling messages, not events in a data store.

Jenkins & Douglass Expires 28 January 2022 [Page 18] Internet-Draft JMAP Calendars July 2021

5.1. Additional JSCalendar properties

This document defines three new JSCalendar properties.

5.1.1. mayInviteSelf

Type: "Boolean" (default: false)

If "true", any user that has access to the event may add themselves to it as a participant with the "attendee" role. This property MUST NOT be altered in the recurrenceOverrides; it may only be set on the base object.

5.1.2. mayInviteOthers

Type: "Boolean" (default: false)

If "true", any current participant with the "attendee" role may add new participants with the "attendee" role to the event. This property MUST NOT be altered in the recurrenceOverrides; it may only be set on the base object.

5.1.3. 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. This property MUST NOT be altered in the recurrenceOverrides; it may only be set on the base object.

5.2. Attachments

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 represent attachments. Instead of mandating an "href" property, clients may set a "blobId" property instead to reference a blob of binary data in the account, as per [RFC8620] Section 6.

The server MUST translate this to an embedded "data:" URL [RFC2397] when sending the event to a system that cannot access the blob. Servers that support CalDAV access to the same data are recommended to expose these files as managed attachments [?@RFC8607].

5.3. Per-user properties

In shared calendars where the account’s "shareesActAs" capability is "self", the following properties MUST be stored per-user:

Jenkins & Douglass Expires 28 January 2022 [Page 19] Internet-Draft JMAP Calendars July 2021

* keywords

* color

* freeBusyStatus

* useDefaultAlerts

* alerts

The user may also modify these properties on a per-occurrence basis for recurring events; again, these MUST be stored per-user.

When writing only per-user properties, the "updated" property MUST also be 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 the updated time of the base event.

5.4. Recurring events

Events may recur, in which case they represent multiple occurrences or instances. The data store will either contain a single base event, containing a recurrence rule and/or recurrence overrides; or, a set of individual instances (when invited to specific occurrences only).

The client may ask the server to expand recurrences within a specific time range in "CalendarEvent/query". This will generate synthetic ids representing individual instances in the requested time range. The client can fetch and update the objects using these ids and the server will make the appropriate changes to the base event. Synthetic ids do not appear in "CalendarEvent/changes" responses; only the ids of events as actually stored on the server.

If the user is invited to specific instances then later added to the base event, "CalendarEvent/changes" will show the ids of all the individual instances being destroyed and the id for the base event being created.

5.5. Updating for "this-and-future"

When editing a recurring event, you can either update the base event (affecting all instances unless overriden) or update an override for a specific occurrence. To update all occurrences from a specific point onwards, there are therefore two options: split the event, or update the base event and override all occurrences before the split point back to their original values.

Jenkins & Douglass Expires 28 January 2022 [Page 20] Internet-Draft JMAP Calendars July 2021

5.5.1. Splitting an event

If the event is not scheduled (has no participants), the simplest thing to do is to duplicate the event, modifying the recurrence rules of the original so it finishes before the split point, and the duplicate so it starts at the split point. As per JSCalendar [I-D.ietf-calext-jscalendar] Section 4.1.3, a "next" and "first" relation MUST be set on the new objects respectively.

Splitting an event however is problematic in the case of a scheduled event, because the iTIP messages generated make it appear like two unrelated changes, which can be confusing.

5.5.2. Updating the base event and overriding previous

For scheduled events, a better approach is to avoid splitting and instead update the base event with the new property value for "this and future", then create overrides for all occurrences before the 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 owner of the event.

Clients may choose to skip creating the overrides if the old data is not important, for example if the "alerts" property is being updated, it is probably not important to create overrides for events in the past with the alerts that have already fired.

5.6. CalendarEvent/get

This is a standard "/get" method as described in [RFC8620], Section 5.1, with three extra arguments:

* *recurrenceOverridesBefore*: "UTCDate|null" If given, only recurrence overrides with a recurrence id before this date (when translated into UTC) will be returned.

* *recurrenceOverridesAfter*: "UTCDate|null" If given, only recurrence overrides with a recurrence id on or after this date (when translated into UTC) will be returned.

* *reduceParticipants*: "Boolean" (default: false) If true, only participants with the "owner" role or corresponding to the user’s participant identities will be returned in the "participants" property of the base event and any recurrence overrides. If false, all participants will be returned.

Jenkins & Douglass Expires 28 January 2022 [Page 21] Internet-Draft JMAP Calendars July 2021

* *timeZone*: "String" (default "Etc/UTC") The time zone to use when calculating the utcStart/utcEnd property of floating events. This argument has no effect if those properties are not requested.

A CalendarEvent object is a JSEvent object so may have arbitrary properties. If the client makes a "CalendarEvent/get" call with a null or omitted "properties" argument, all properties defined on the JSEvent object in the store are returned, along with the "id", "calendarIds", and "isDraft" properties. The "utcStart" and "utcEnd" computed properties are only returned if explicitly requested. If either are requested, the "recurrenceOverrides" property MUST NOT be requested (recurrence overrides cannot be interpreted accurately with just the UTC times).

If specific properties are requested from the JSEvent and the property is not present on the object in the server’s store, the server SHOULD return the default value if known for that property.

A requested id may represent a single instance of a recurring event if the client asked the server to expand recurrences in "CalendarEvent/query". In such a case, the server will resolve any overrides and set the appropriate "start" and "recurrenceId" properties on the CalendarEvent object returned to the client. The "recurrenceRule" and "recurrenceOverrides" properties MUST be returned as null if requested for such an event.

An event with the same uid/recurrenceId may appear in different accounts. Clients may coalesce the view of such events, but must be aware that the data may be different in the different accounts due to per-user properties, difference in permissions etc.

The "privacy" property of a JSEvent object allows the owner to 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 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 to "secret", the server MUST behave as though the event does not exist for all users other than the owner.

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.

Jenkins & Douglass Expires 28 January 2022 [Page 22] Internet-Draft JMAP Calendars July 2021

5.7. CalendarEvent/changes

This is a standard "/changes" method as described in [RFC8620], Section 5.2.

5.8. CalendarEvent/set

This is a standard "/set" method as described in [RFC8620], Section 5.3, with the following extra argument:

* *sendSchedulingMessages*: "Boolean" (default: false) If true then 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 owners (otherwise). If false, the changes only affect this account and no scheduling messages will be sent.

For recurring events, an id may represent the base event or a specific instance. When the id for a specific instance is given, the server MUST process an update as an update to the recurrence override for that instance on the base event, and a destroy as removing just that instance.

Clients MUST NOT send an update/destroy to both the base event and a specific instance in a single "/set" request; the result of this is undefined.

Servers MUST enforce the user’s permissions as returned in the "myRights" property of the Calendar objects and reject changes with a "forbidden" SetError if not allowed.

The "privacy" property MUST NOT be set to anything other than "public" (the default) for events in a calendar that does not belong to the user (e.g. a shared team calendar). The server MUST reject this with an "invalidProperties" SetError.

The server MUST reject attempts to add events with a "participants" property where none of the participants correspond to one of the calendar’s participant identities with a "forbidden" SetError.

If omitted on create, the server MUST set the following properties to an appropriate value:

* @type

* uid

* created

Jenkins & Douglass Expires 28 January 2022 [Page 23] Internet-Draft JMAP Calendars July 2021

The "updated" property MUST be set to the current time by the server whenever an event is created or updated. If the client tries to set a value for this property it is not an error, but it MUST be overridden and replaced with the server’s time.

When updating an event, if all of: * a non per-user property has been changed; and * the server is the source of the event (see Section XXX); and * the "sequence" property is not explicitly set in the update, or the given value is less than or equal to the current "sequence" value on the server; then the server MUST increment the "sequence" value by one.

The "created" property MUST NOT be updated after creation. The "method" property MUST NOT be set. Any attempt to do these is rejected with a standard "invalidProperties" SetError.

If "utcStart" is set, this is translated into a "start" property 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 "recurrenceOverrides"; this MUST be rejected with an "invalidProperties" SetError.

Similarly, the "utcEnd" property is translated into 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 be rejected with an "invalidProperties" SetError.

The server does not automatically reset the "partipationStatus" or "expectReply" properties of a Participant when changing other event details. Clients should either be intelligent about whether the change necessitates resending RSVP requests, or ask the user whether to send them.

The server MAY enforce that all events have an owner, for example in team calendars. If the user tries to create an event without participants in such a calendar, the server MUST automatically add a participant with the "owner" role corresponding to one of the user’s ParticipantIdentities (see Section XXX).

When creating an event with participants, or adding participants to an event that previously did not have participants, the server MUST set the "replyTo" property of the event if not present. Clients SHOULD NOT set the replyTo property for events when the user adds participants; the server is better positioned to add all the methods it supports to receive replies.

Jenkins & Douglass Expires 28 January 2022 [Page 24] Internet-Draft JMAP Calendars July 2021

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:

Jenkins & Douglass Expires 28 January 2022 [Page 25] Internet-Draft JMAP Calendars July 2021

{ "id": "123", "title": "FooBar team meeting", "start": "2018-01-08T09:00:00", "recurrenceRules": [{ "@type": "RecurrenceRule", "frequency": "weekly" }], "replyTo": { "imip": "mailto:[email protected]" }, "participants": { "dG9tQGZvb2Jhci5xlLmNvbQ": { "@type": "Participant", "name": "Tom", "email": "[email protected]", "sendTo": { "imip": "mailto:[email protected]" }, "participationStatus": "accepted", "roles": { "attendee": true } }, "em9lQGZvb2GFtcGxlLmNvbQ": { "@type": "Participant", "name": "Zoe", "email": "[email protected]", "sendTo": { "imip": "mailto:[email protected]" }, "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" } } } }

Jenkins & Douglass Expires 28 January 2022 [Page 26] Internet-Draft JMAP Calendars July 2021

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:

Jenkins & Douglass Expires 28 January 2022 [Page 27] Internet-Draft JMAP Calendars July 2021

[[ "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

If "sendSchedulingMessages" is true, the server MUST send appropriate iTIP [RFC5546] scheduling messages after successfuly creating, updating or destroying a calendar event.

When determining which scheduling messages to send, the server must 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 specified in the "replyTo" property of the event.

Messages are only sent to participants with a "scheduleAgent" property set to "server" or omitted. If the effective "scheduleAgent" property is changed:

* to "server" from something else: send messages to this participant as though the event had just been created.

Jenkins & Douglass Expires 28 January 2022 [Page 28] Internet-Draft JMAP Calendars July 2021

* from "server" to something else: send messages to this participant as though the event had just been destroyed.

* any other change: do not send any messages to this participant.

The server may send the scheduling message via any of the methods defined on the sendTo property of a participant (if the server is the source) or the replyTo property of the event (otherwise) that it supports. If no supported methods are available, the server MUST reject the change with a "noSupportedScheduleMethods" SetError.

If the server is the source of the event it MUST NOT send messages to any participant corresponding to a ParticipantIdentitity in that account (see Section XXX).

If sending via iMIP [RFC6047], the server MAY choose to only send updates it deems "essential" to avoid flooding the recipient’s email with changes they do not care about. For example, changes to the participationStatus of another participant, or changes to events solely in the past may be omitted.

5.8.2.1. REQUEST

When the server is the source for the event, a REQUEST message ([RFC5546], Section 3.2.2) is sent to all current participants if either:

* The event is being created; or

* Any non per-user property (see Section XXX) is updated on the event (including adding/removing participants), except if just modifying the recurrenceOverrides such that CANCEL messages are generated (see the next section).

Note, if the only change is adding an additional instance (not generated by the event’s recurrence rule) to the recurrenceOverrides, this MAY be handled via sending an ADD message ([RFC5546], Section 3.2.4) for the single instance rather than a REQUEST message for the base event. However, for interoperability reasons this is not recommended due to poor support in the wild for this type of message.

The server MUST ensure participants are only sent information about recurrence instances they are added to when sending scheduling messages for recurring events. If the participant is not invited to the full recurring event but only individual instances, scheduling messages MUST be sent for just those expanded occurrences individually. If a participant is invited to a recurring event, but

Jenkins & Douglass Expires 28 January 2022 [Page 29] Internet-Draft JMAP Calendars July 2021

removed via a recurrence override from a particular instance, any scheduling messages to this participant MUST return the instance as "excluded" (if it matches a recurrence rule for the event) or omit the instance entirely (otherwise).

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 ([RFC5546], Section 3.2.5) is sent if any of:

* A participant is removed from either the base event or a single instance (the message is only sent to this participant; remaining participants will get a REQUEST, as described above).

* The event is destroyed.

* An exclusion is added to recurrenceOverrides to remove an instance generated by the event’s recurrence rule.

* An additional instance (not generated by the event’s recurrence rule) is removed from the recurrenceOverrides.

In each of the latter 3 cases, the message is sent to all participants.

5.8.2.3. REPLY

When the server is _not_ the source for the event, a REPLY message ([RFC5546], Section 3.2.3) is sent for any participant corresponding to one of the user’s ParticipantIdentitities in the account if any of the following changes are made by the user (_not_ by automatic processing of an iTIP message):

* The "participationStatus" property of the participant is changed.

* The event is destroyed and the participationStatus was not "needs- action".

* The event is created and the participationStatus is not "needs- action".

* An exclusion is added to recurrenceOverrides to remove an instance generated by the event’s recurrence rule, and the participationStatus for this instance was not "needs-action".

Jenkins & Douglass Expires 28 January 2022 [Page 30] Internet-Draft JMAP Calendars July 2021

* An exclusion is removed from recurrenceOverrides (this is presumed to be the client undoing the deletion of a single instance), and the participationStatus for this instance is not "needs-action".

* An instance not generated by the event’s recurrence rule is removed from the recurrenceOverrides.

* An instance not generated by the event’s recurrence rule is added to the recurrenceOverrides (this is presumed to be the client undoing the deletion of a single instance).

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 automated system, the user MUST be able to delete the event without sending a reply.

5.9. CalendarEvent/copy

This is a standard "/copy" method as described in [RFC8620], Section 5.4.

5.10. CalendarEvent/query

This is a standard "/query" method as described in [RFC8620], Section 5.5, with two extra arguments:

* *expandRecurrences*: "Boolean" (default: false) If true, the server will expand any recurring event. If true, the filter MUST be just a FilterCondition (not a FilterOperator) and MUST include both a before and after property. This ensures the server is not asked to return an infinite number of results.

* *timeZone*: "String" The time zone for before/after filter conditions (default: "Etc/UTC")

If expandRecurrences is true, a separate id will be returned for each instance of a recurring event that matches the query. This synthetic id is opaque to the client, but allows the server to resolve the id + recurrence id for "/get" and "/set" operations. Otherwise, a single id will be returned for matching recurring events that represents the entire event.

There is no necessary correspondence between the ids of different instances of the same expanded event.

The following additional error may be returned instead of the "CalendarEvent/query" response:

Jenkins & Douglass Expires 28 January 2022 [Page 31] Internet-Draft JMAP Calendars July 2021

"cannotCalculateOccurrences": the server cannot expand a recurrence required to return the results for this query.

5.10.1. Filtering

A *FilterCondition* object has the following properties:

* *inCalendars*: "Id[]|null" A list of calendar ids. An event must be in ANY of these calendars to match the condition.

* *after*: "LocalDate|null" The end of the event, or any recurrence of the event, in the time zone given as the timeZone argument, must be after this date to match the condition.

* *before*: "LocalDate|null" The start of the event, or any recurrence of the event, in the time zone given as the timeZone argument, must be before this date to match the condition.

* *text*: "String|null" Looks for the text in the _title_, _description_, _locations_ (matching name/description), _participants_ (matching name/email) and any other textual properties of the event or any recurrence of the event.

* *title*: "String|null" Looks for the text in the _title_ property of the event, or the overridden _title_ property of a recurrence.

* *description*: "String|null" Looks for the text in the _description_ property of the event, or the overridden _description_ property of a recurrence.

* *location*: "String|null" Looks for the text in the _locations_ property of the event (matching name/description of a location), or the overridden _locations_ property of a recurrence.

* *owner*: "String|null" Looks for the text in the name or email fields of a participant in the _participants_ property of the event, or the overridden _participants_ property of a recurrence, where the participant has a role of "owner".

* *attendee*: "String|null" Looks for the text in the name or email fields of a participant in the _participants_ property of the event, or the overridden _participants_ property of a recurrence, where the participant has a role of "attendee".

* *participationStatus*: Must match. If owner/attendee condition, status must be of that participant. Otherwise any.

* *uid*: "String" The uid of the event is exactly the given string.

Jenkins & Douglass Expires 28 January 2022 [Page 32] Internet-Draft JMAP Calendars July 2021

If expandRecurrences is true, all conditions must match against the same instance of a recurring event for the instance to match. If expandRecurrences is false, all conditions must match, but they may each match any instance of the event.

If zero properties are specified on the FilterCondition, the condition MUST always evaluate to "true". If multiple properties are specified, ALL must apply for the condition to be "true" (it is equivalent to splitting the object into one-property conditions and making them all the child of an AND filter operator).

The exact semantics for matching "String" fields is *deliberately not defined* to allow for flexibility in indexing implementation, subject to the following:

* Text SHOULD be matched in a case-insensitive manner.

* Text contained in either (but matched) single or double quotes SHOULD be treated as a *phrase search*, that is a match is required for that exact sequence of words, excluding the surrounding quotation marks. Use "\"", "\’" and "\\" to match a literal """, "’" and "\" respectively in a phrase.

* Outside of a phrase, white-space SHOULD be treated as dividing separate tokens that may be searched for separately in the event, but MUST all be present for the event to match the filter.

* Tokens MAY be matched on a whole-word basis using stemming (so for example a text search for "bus" would match "buses" but not "business").

5.10.2. Sorting

The following properties MUST be supported for sorting:

* start

* uid

* recurrenceId

The following properties SHOULD be supported for sorting:

* created

* updated

Jenkins & Douglass Expires 28 January 2022 [Page 33] Internet-Draft JMAP Calendars July 2021

5.11. CalendarEvent/queryChanges

This is a standard "/queryChanges" method as described in [RFC8620], Section 5.6.

5.12. Examples

TODO: Add example of how to get event by uid: query uid=foo and backref. Return multiple with recurrenceId set (user invited to specific instances of recurring event).

6. Alerts

Alerts may be specified on events as described in [I-D.ietf-calext-jscalendar], Section 4.5.

Alerts MUST only be triggered for events in calendars where the user is subscribed and either the user owns the calendar or the calendar account’s "shareesActAs" capability is "self".

When an alert with an "email" action is triggered, the server MUST send an email to the user to notify them of the event. The contents of the email is implementation specific. Clients MUST NOT perform an action for these alerts.

When an alert with a "display" action is triggered, clients SHOULD display an alert in a platform-appropriate manner to the user to remind them of the event. Clients with a full offline cache of events may choose to calculate when alerts should trigger locally. Alternatively, they can subscribe to push events from the server.

6.1. Default alerts

If the "useDefaultAlerts" property of an event is true, the alerts are taken from the "defaultAlertsWithTime" or "defaultAlertsWithoutTime" property of all Calendars the event is in, as described in Section XXX, rather than the "alerts" property of the CalendarEvent.

When using default alerts, the "alerts" property of the event is ignored except for the following:

* The "acknowledged" time for an alert is stored here when a default alert for the event is dismissed. The id of the alert MUST be the same as the id of the default alert in the calendar. See Section XXX on acknowledging alerts.

Jenkins & Douglass Expires 28 January 2022 [Page 34] Internet-Draft JMAP Calendars July 2021

* If an alert has a relatedTo property where the parent is the id of one of the calendar default alerts, it is processed as normal and not ignored. This is to support snoozing default alerts; see Section XXX.

6.2. Acknowledging an alert

To dismiss an alert, clients set the "acknowledged" property of the Alert object to the current date-time. If the alert was a calendar default, it may need to be added to the event at this point in order to acknowledge it. When other clients fetch the updated CalendarEvent they SHOULD automatically dismiss or suppress duplicate alerts (alerts with the same alert id that triggered on or before the "acknowledged" date-time) and alerts that have been removed from the event.

Setting the "acknowledged" property MUST NOT create a new recurrence override. For a recurring calendar object, the "acknowledged" property of the parent object MUST be updated, unless the alert is already overridden in the "recurrenceOverrides" property.

6.3. Snoozing an alert

Users may wish to dismiss an alert temporarily and have it come back after a specific period of time. To do this, clients MUST:

1. Acknowledge the alert as described in Section XXX.

2. Add a new alert to the event with an "AbsoluteTrigger" for the date-time the alert has been snoozed until. Add a "relatedTo" property to the new alert, setting the "parent" relation to point to the original alert. This MUST NOT create a new recurrence override; it is added to the same "alerts" property that contains the alert that was acknowledged in step 1.

When acknowledging a snoozed alert (i.e. one with a parent relatedTo pointing to the original alert), the client SHOULD delete the alert rather than setting the "acknowledged" property.

6.4. Push events

Servers that support the "urn:ietf:params:jmap:calendars" capability MUST support registering for the pseudo-type "CalendarAlert" in push subscriptions and event source connections, as described in [RFC8620], Sections 7.2 and 7.3.

Jenkins & Douglass Expires 28 January 2022 [Page 35] Internet-Draft JMAP Calendars July 2021

If requested, a CalendarAlert notification will be pushed whenever an alert is triggered for the user. For Event Source connections, this notification is pushed as an event called "calendarAlert".

A *CalendarAlert* object has the following properties:

* *@type*: "String" This MUST be the string "CalendarAlert".

* *accountId*: "String" The account id for the calendar in which the alert triggered.

* *calendarEventId*: "String" The CalendarEvent id for the alert that triggered.

* *uid*: "String" The uid property of the CalendarEvent for the alert that triggered.

* *recurrenceId*: "String|null" The recurrenceId for the instance of the event for which this alert is being triggered, or "null" if the event is not recurring.

* *alertId*: "String" The id for the alert that triggered.

7. Calendar Event Notifications

The CalendarEventNotification data type records changes made by external entities to events in calendars the user is subscribed to. Notifications are stored in the same Account as the CalendarEvent that was changed.

Notifications are only created by the server; users cannot create them directly. Clients SHOULD present the list of notifications to the user and allow them to dismiss them. To dismiss a notification you use a standard "/set" call to destroy it.

The server SHOULD create a CalendarEventNotification whenever an event is added, updated or destroyed by another user or due to receiving an iTIP [RFC5546] or other scheduling message in a calendar this user is subscribed to. The server SHOULD NOT create notifications for events implicitly deleted due to the containing calendar being deleted.

The CalendarEventNotification does not have any per-user data. A single instance may therefore be maintained on the server for all sharees of the notification. The server need only keep track of which users have yet to destroy the notification.

Jenkins & Douglass Expires 28 January 2022 [Page 36] Internet-Draft JMAP Calendars July 2021

7.1. Auto-deletion of Notifications

The server MAY limit the maximum number of notifications it will store for a user. When the limit is reached, any new notification will cause the previously oldest notification to be automatically deleted.

The server MAY coalesce events if appropriate, or remove events that it deems are no longer relevant or after a certain period of time. The server SHOULD automatically destroy a notification about an event if the user updates or destroys that event (e.g. if the user sends an RSVP for the event).

7.2. Object Properties

The *CalendarEventNotification* object has the following properties:

* *id*: "String" The id of the CalendarEventNotification.

* *created*: "UTCDate" The time this notification was created.

* *changedBy*: "Person" Who made the change.

- *name*: "String" The name of the person who made the change.

- *email*: "String" The email of the person who made the change, or null if no email is available.

- *principalId*: "String|null" The id of the calendar principal corresponding to the person who made the change, if any. This will be null if the change was due to receving an iTIP message.

* *comment*: "String|null" Comment sent along with the change by the user that made it. (e.g. COMMENT property in an iTIP message).

* *type*: "String" This MUST be one of

- created

- updated

- destroyed

* *calendarEventId*: "String" The id of the CalendarEvent that this notification is about.

* *isDraft*: "Boolean" (created/updated only) Is this event a draft?

Jenkins & Douglass Expires 28 January 2022 [Page 37] Internet-Draft JMAP Calendars July 2021

* *event*: "JSEvent" The data before the change (if updated or destroyed), or the data after creation (if created).

* *eventPatch*: "PatchObject" (updated only) A patch encoding the change between the data in the event property, and the data after the update.

To reduce data, if the change only affects a single instance of a recurring event, the server MAY set the event and eventPatch properties for the instance; the calendarEventId MUST still be for the base event.

7.3. CalendarEventNotification/get

This is a standard "/get" method as described in [RFC8620], Section 5.1.

7.4. CalendarEventNotification/changes

This is a standard "/changes" method as described in [RFC8620], Section 5.2.

7.5. CalendarEventNotification/set

This is a standard "/changes" method as described in [RFC8620], Section 5.3.

Only destroy is supported; any attempt to create/update MUST be rejected with a "forbidden" SetError.

7.6. CalendarEventNotification/query

This is a standard "/query" method as described in [RFC8620], Section 5.5.

7.6.1. Filtering

A *FilterCondition* object has the following properties:

* *after*: "UTCDate|null" The creation date must be on or after this date to match the condition.

* *before*: "UTCDate|null" The creation date must be before this date to match the condition.

* *type*: "String" The type property must be the same to match the condition.

Jenkins & Douglass Expires 28 January 2022 [Page 38] Internet-Draft JMAP Calendars July 2021

* *calendarEventIds*: "Id[]|null" A list of event ids. The calendarEventId property of the notification must be in this list to match the condition.

7.6.2. Sorting

The "created" property MUST be supported for sorting.

7.7. CalendarEventNotification/queryChanges

This is a standard "/queryChanges" method as described in [RFC8620], Section 5.6.

8. Security Considerations

All security considerations of JMAP [RFC8620] and JSCalendar [I-D.ietf-calext-jscalendar] apply to this specification. Additional considerations specific to the data types and functionality introduced by this document are described in the following subsections.

8.1. Denial-of-service Expanding Recurrences

Recurrence rules can be crafted to occur as frequently as every second. Servers MUST be careful to not allow resources to be exhausted when expanding. Equally, rules can be generated that never create any occurrences at all. Servers MUST be careful to limit the work spent iterating in search of the next occurrence.

8.2. Privacy

TODO.

9. IANA Considerations

9.1. JMAP Capability Registration for "calendars"

IANA will register the "calendars" JMAP Capability as follows:

Capability Name: "urn:ietf:params:jmap:calendars"

Specification document: this document

Intended use: common

Change Controller: IETF

Security and privacy considerations: this document, Section XXX

Jenkins & Douglass Expires 28 January 2022 [Page 39] Internet-Draft JMAP Calendars July 2021

9.2. JSCalendar Property Registrations

IANA will register the following additional properties in the JSCalendar Properties Registry.

9.2.1. id

Property Name: id

Property Type: "Id"

Property Context: JSEvent, JSTask

Intended Use: Reserved

9.2.2. calendarIds

Property Name: calendarIds

Property Type: "Id[Boolean]"

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

Jenkins & Douglass Expires 28 January 2022 [Page 40] Internet-Draft JMAP Calendars July 2021

9.2.5. utcEnd

Property Name: utcEnd

Property Type: "UTCDateTime"

Property Context: JSEvent, JSTask

Intended Use: Reserved

9.2.6. mayInviteSelf

Property Name: mayInviteSelf

Property Type: "Boolean" (default: false)

Property Context: JSEvent, JSTask

Reference: This document, Section XXX.

Intended Use: Common

9.2.7. mayInviteOthers

Property Name: mayInviteOthers

Property Type: "Boolean" (default: false)

Property Context: JSEvent, JSTask

Reference: This document, Section XXX.

Intended Use: Common

9.2.8. hideAttendees

Property Name: hideAttendees

Property Type: "Boolean" (default: false)

Property Context: JSEvent, JSTask

Reference: This document, Section XXX.

Intended Use: Common

10. Normative References

Jenkins & Douglass Expires 28 January 2022 [Page 41] Internet-Draft JMAP Calendars July 2021

[I-D.ietf-calext-jscalendar] Jenkins, N. and R. Stepanek, "JSCalendar: A JSON Representation of Calendar Data", Work in Progress, Internet-Draft, draft-ietf-calext-jscalendar-32, 15 October 2020, .

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, .

[RFC2397] Masinter, L., "The "data" URL scheme", RFC 2397, DOI 10.17487/RFC2397, August 1998, .

[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, .

[RFC8620] Jenkins, N. and C. Newman, "The JSON Meta Application Protocol (JMAP)", RFC 8620, DOI 10.17487/RFC8620, July 2019, .

11. Informative References

[RFC4791] Daboo, C., Desruisseaux, B., and L. Dusseault, "Calendaring Extensions to WebDAV (CalDAV)", RFC 4791, DOI 10.17487/RFC4791, March 2007, .

[RFC5546] Daboo, C., Ed., "iCalendar Transport-Independent Interoperability Protocol (iTIP)", RFC 5546, DOI 10.17487/RFC5546, December 2009, .

[RFC6047] Melnikov, A., Ed., "iCalendar Message-Based Interoperability Protocol (iMIP)", RFC 6047, DOI 10.17487/RFC6047, December 2010, .

Authors’ Addresses

Jenkins & Douglass Expires 28 January 2022 [Page 42] Internet-Draft JMAP Calendars July 2021

Neil Jenkins (editor) Fastmail PO Box 234, Collins St West Melbourne VIC 8007 Australia

Email: [email protected] URI: https://www.fastmail.com

Michael Douglass (editor) Spherical Cow Group 226 3rd Street Troy, NY 12180 United States of America

Email: [email protected] URI: http://sphericalcowgroup.com

Jenkins & Douglass Expires 28 January 2022 [Page 43] JMAP R. Stepanek Internet-Draft FastMail Intended status: Standards Track M. Loffredo Expires: 13 January 2022 IIT-CNR 12 July 2021

JSContact: A JSON representation of contact data draft-ietf-jmap-jscontact-07

Abstract

This specification defines a data model and JSON representation of contact card information that can be used for data storage and exchange in address book or directory applications. It aims to be an alternative to the vCard data format and to be unambiguous, extendable and simple to process. In contrast to the JSON-based jCard format, it is not a direct mapping from the vCard data model and expands semantics where appropriate.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on 13 January 2022.

Copyright Notice

Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved.

Stepanek & Loffredo Expires 13 January 2022 [Page 1] Internet-Draft JSContact July 2021

This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/ license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

Table of Contents

1. Introduction ...... 3 1.1. Relation to the xCard and jCard formats ...... 4 1.2. Terminology ...... 4 1.3. Vendor-specific Property Extensions and Values . . . . . 4 1.4. Type Signatures ...... 4 1.5. Data types ...... 5 1.5.1. Context ...... 5 1.5.2. Id ...... 5 1.5.3. LocalizedString ...... 6 1.5.4. Preference ...... 6 1.5.5. UTCDateTime ...... 7 2. Card ...... 7 2.1. Metadata properties ...... 7 2.1.1. uid ...... 7 2.1.2. prodId ...... 7 2.1.3. created ...... 7 2.1.4. updated ...... 8 2.1.5. kind ...... 8 2.1.6. relatedTo ...... 8 2.2. Name and Organization properties ...... 9 2.2.1. name ...... 9 2.2.2. fullName ...... 9 2.2.3. nickNames ...... 10 2.2.4. organizations ...... 10 2.2.5. titles ...... 10 2.3. Contact and Resource properties ...... 10 2.3.1. emails ...... 10 2.3.2. phones ...... 11 2.3.3. online ...... 12 2.3.4. photos ...... 13 2.3.5. preferredContactMethod ...... 13 2.3.6. preferredContactLanguages ...... 14 2.4. Address and Location properties ...... 14 2.4.1. addresses ...... 14 2.5. Additional properties ...... 16 2.5.1. anniversaries ...... 16 2.5.2. personalInfo ...... 17

Stepanek & Loffredo Expires 13 January 2022 [Page 2] Internet-Draft JSContact July 2021

2.5.3. notes ...... 17 2.5.4. categories ...... 17 2.5.5. timeZones ...... 17 3. CardGroup ...... 18 3.1. Group properties ...... 18 3.1.1. uid ...... 18 3.1.2. members ...... 18 3.1.3. name ...... 18 3.1.4. card ...... 18 4. Implementation Status ...... 18 4.1. IIT-CNR/Registro.it ...... 19 5. IANA Considerations ...... 19 6. Security Considerations ...... 19 7. References ...... 19 7.1. Normative References ...... 19 7.2. Informative References ...... 21 Authors’ Addresses ...... 22

1. Introduction

This document defines a data model for contact card data normally used in address book or directory applications and services. It aims to be an alternative to the vCard data format [RFC6350] and to provide a JSON-based standard representation of contact card data.

The key design considerations for this data model are as follows:

* Most of the initial set of attributes should be taken from the vCard data format [RFC6350] and extensions ([RFC6473], [RFC6474], [RFC6715], [RFC6869], [RFC8605]). The specification should add new attributes or value types, or not support existing ones, where appropriate. Conversion between the data formats need not fully preserve semantic meaning.

* The attributes of the cards data represented must be described as a simple key-value pair, reducing complexity of its representation.

* The data model should avoid all ambiguities and make it difficult to make mistakes during implementation.

* Extensions, such as new properties and components, MUST NOT lead to requiring an update to this document.

Stepanek & Loffredo Expires 13 January 2022 [Page 3] Internet-Draft JSContact July 2021

The representation of this data model is defined in the I-JSON format [RFC7493], which is a strict subset of the JavaScript Object Notation (JSON) Data Interchange Format [RFC8259]. Using JSON is mostly a pragmatic choice: its widespread use makes Card easier to adopt, and the availability of production-ready JSON implementations eliminates a whole category of parser-related interoperability issues.

1.1. Relation to the xCard and jCard formats

The xCard [RFC6351] and jCard [RFC7095] specifications define alternative representations for vCard data, in XML and JSON format respectively. Both explicitly aim to not change the underlying data model. Accordingly, they are regarded as equal to vCard in the context of this document.

1.2. Terminology

The key words MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, NOT RECOMMENDED, MAY, and OPTIONAL in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

1.3. Vendor-specific Property Extensions and Values

Vendors MAY add additional properties to JSContact objects to support their custom features. The names of these properties MUST be prefixed with a domain name controlled by the vendor to avoid conflict, e.g. "example.com/customprop".

Some JSContact properties allow vendor-specific value extensions. If so, vendor-specific values MUST be prefixed with a domain name controlled by the vendor, e.g. "example.com/customrel".

Vendors are strongly encouraged to register any new property values or extensions that are useful to other systems as well, rather than using a vendor-specific prefix.

1.4. Type Signatures

Type signatures are given for all JSON values in this document. The following conventions are used:

* "*" - The type is undefined (the value could be any type, although permitted values may be constrained by the context of this value).

* "String" - The JSON string type.

Stepanek & Loffredo Expires 13 January 2022 [Page 4] Internet-Draft JSContact July 2021

* "Number" - The JSON number type.

* "Boolean" - The JSON boolean type.

* "A[B]" - A JSON object where the keys are all of type "A", and the values are all of type "B".

* "A[]" - An array of values of type "A".

* "A|B" - The value is either of type "A" or of type "B".

1.5. Data types

In addition to the standard JSON data types, a couple of additional data types are common to the definitions of JSContact objects and properties.

1.5.1. Context

Contact information typically is associated with a context in which it should be used. For example, someone might have distinct phone numbers for work and private contexts. The Context data type enumerates common contexts.

Common context values are:

* "private": The contact information may be used to contact the card holder in a private context.

* "work": The contact information may be used to contact the card holder in a professional context.

* "other": The contact information may be used to contact the card holder in some other context. A label property MAY be defined to identify its purpose.

Additional allowed values may be defined in the properties or data types that make use of the Context data type, registered in a future RFC, or a vendor-specific value.

1.5.2. Id

Where "Id" is given as a data type, it means a "String" of at least 1 and a maximum of 255 octets in size, and it MUST only contain characters from the "URL and Filename Safe" base64url alphabet, as defined in Section 5 of [RFC4648], excluding the pad character ("="). This means the allowed characters are the ASCII alphanumeric characters ("A-Za-z0-9"), hyphen ("-"), and underscore ("_").

Stepanek & Loffredo Expires 13 January 2022 [Page 5] Internet-Draft JSContact July 2021

In many places in JSContact a JSON map is used where the map keys are of type Id and the map values are all the same type of object. This construction represents an unordered set of objects, with the added advantage that each entry has a name (the corresponding map key). This allows for more concise patching of objects, and, when applicable, for the objects in question to be referenced from other objects within the JSContact object.

Unless otherwise specified for a particular property, there are no uniqueness constraints on an Id value (other than, of course, the requirement that you cannot have two values with the same key within a single JSON map). For example, two Card objects might use the same Ids in their respective "photos" properties. Or within the same Card object the same Id could appear in the "emails" and "phones" properties. These situations do not imply any semantic connections among the objects.

1.5.3. LocalizedString

The purpose of LocalizedString is to allow for internationalisation of string values. In its simplest form it is just a string value. Optionally, the human language of this value may be specified, as well as localized variants in additional languages. A LocalizedString has the following properties:

* value: "String" (mandatory). The property value.

* language: "String" (optional). The [RFC5646] language tag of this value, if any.

* localizations: "String[String]" (optional). A map from [RFC5646] language tags to the value localized in that language.

1.5.4. Preference

This data type allows to define a preference order on same-typed contact information. For example, a card holder may have two email addresses and prefer to be contacted with one of them.

A preference value MUST be an integer number in the range 1 and 100. Lower values correspond to a higher level of preference, with 1 being most preferred. If no preference is set, then the contact information MUST be interpreted as being least preferred.

Stepanek & Loffredo Expires 13 January 2022 [Page 6] Internet-Draft JSContact July 2021

Note that the preference only is defined in relation to contact information of the same type. For example, the preference orders within emails and phone numbers are indendepent of each other. Also note that the _preferredContactMethod_ property allows to define a preferred contact method across method types.

1.5.5. UTCDateTime

This is a string in [RFC3339] "date-time" format, with the further restrictions that any letters MUST be in uppercase, and the time offset MUST be the character "Z". Fractional second values MUST NOT be included unless non-zero and MUST NOT have trailing zeros, to ensure there is only a single representation for each date-time.

For example, "2010-10-10T10:10:10.003Z" is conformant, but "2010-10-10T10:10:10.000Z" is invalid and is correctly encoded as "2010-10-10T10:10:10Z".

2. Card

MIME type: "application/jscontact+json;type=card"

A Card object stores information about a person, organization or company.

2.1. Metadata properties

2.1.1. uid

Type: "String" (mandatory).

An identifier, used to associate the object as the same across different systems, addressbooks and views. [RFC4122] describes a range of established algorithms to generate universally unique identifiers (UUID), and the random or pseudo-random version is recommended. For compatibility with [RFC6350] UIDs, implementations MUST accept both URI and free-form text.

2.1.2. prodId

Type: "String" (optional).

The identifier for the product that created the Card object.

2.1.3. created

Type: "UTCDateTime" (optional).

Stepanek & Loffredo Expires 13 January 2022 [Page 7] Internet-Draft JSContact July 2021

The date and time when this Card object was created.

2.1.4. updated

Type: "UTCDateTime" (optional).

The date and time when the data in this Card object was last modified.

2.1.5. kind

Type: "String" (optional). The kind of the entity the Card represents.

The value MUST be either one of the following values, registered in a future RFC, or a vendor-specific value:

* "individual": a single person

* "org": an organization

* "location": a named location

* "device": a device, such as appliances, computers, or network elements

* "application": a software application

2.1.6. relatedTo

Type: "String[Relation]" (optional).

Relates the object to other Card objects. This is represented as a map of the URI (or single text value) of the related objects to a possibly empty set of relation types. The Relation object has the following properties:

* relation: "String[Boolean]" (optional, default: empty Object) Describes how the linked object is related to the linking object. The relation is defined as a set of relation types. If empty, the relationship between the two objects is unspecified. Keys in the set MUST be one of the RELATED property [RFC6350] type parameter values, or an IANA-registered value, or a vendor-specific value. The value for each key in the set MUST be true.

Note, the Relation object only has one property; it is specified as an object with a single property to allow for extension in the future.

Stepanek & Loffredo Expires 13 January 2022 [Page 8] Internet-Draft JSContact July 2021

2.2. Name and Organization properties

2.2.1. name

Type: "NameComponent[]" (optional).

The name components of the name of the entity represented by this Card. Name components SHOULD be ordered such that their values joined by whitespace produce a valid full name of this entity. Doing so, implementations MAY ignore any "separator" components.

A NameComponent has the following properties:

* value: "String" (mandatory). The value of this name component.

* type: "String" (mandatory). The type of this name component. The value MUST be either one of the following values, registered in a future RFC, or a vendor-specific value:

- "prefix". The value is a honorific title(s), e.g. "Mr", "Ms", "Dr".

- "personal". The value is a personal name(s), also known as "first name", "given name".

- "surname". The value is a surname, also known as "last name", "family name".

- "additional". The value is an additional name, also known as "middle name".

- "suffix". The value is a honorific suffix, e.g. "B.A.", "Esq.".

- "separator". A separator for two name components. The "value" property of the component includes the verbatim separator, for example a newline character.

2.2.2. fullName

Type: "LocalizedString" (optional).

Stepanek & Loffredo Expires 13 January 2022 [Page 9] Internet-Draft JSContact July 2021

The full name (e.g. the personal name and surname of an individual, the name of an organization) of the entity represented by this card. The purpose of this property is to define a name, even if the individual name components are not known. In addition, it is meant to provide alternative versions of the name for internationalisation. Implementations SHOULD prefer using the _name_ property over this one and SHOULD NOT store the concatenated name component values in this property.

2.2.3. nickNames

Type: "LocalizedString[]" (optional).

The nick names of the entity represented by this card.

2.2.4. organizations

Type: "Id[Organization]" (optional).

The companies or organization names and units associated with this card. An Organization object has the following properties:

* name: "LocalizedString" (mandatory). The name of this organization.

* units: "LocalizedString[]" (optional). Additional levels of organizational unit names.

2.2.5. titles

Type : "Id[Title]" (optional).

The job titles or functional positions of the entity represented by this card. A Title has object the following properties:

* title: "LocalizedString" (mandatory). The title of the entity represented by this card.

* organization: "Id" (optional). The id of the organization in which this title is held.

2.3. Contact and Resource properties

2.3.1. emails

Type: "Id[EmailAddress]" (optional).

Stepanek & Loffredo Expires 13 January 2022 [Page 10] Internet-Draft JSContact July 2021

The email addresses to contact the entity represented by this card. An EmailAddress object has the following properties:

* email: "String" (mandatory). The email address. This MUST be an _addr-spec_ value as defined in Section 3.4.1 of [RFC5322].

* contexts: "Context[Boolean]" (optional) The contexts in which to use this email address. The value for each key in the object MUST be "true".

* pref: "Preference" (optional) The preference of this email address in relation to other email addresses.

2.3.2. phones

Type: "Id[Phone]" (optional).

The phone numbers to contact the entity represented by this card. A phone object has the following properties:

* phone: "String" (mandatory). The phone value, as either a URI or a free-text phone number. Typical URI schemes are the [RFC3966] "tel" or [RFC3261] "sip" schemes, but any URI scheme is allowed.

* features: "String[Boolean]" (optional). The set of contact features that this phone number may be used for. The set is represented as an object, with each key being a method type. The value for each key in the object MUST be "true". The method type MUST be either one of the following values, registered in a future RFC, or a vendor-specific value:

- "voice" The number is for calling by voice.

- "fax" The number is for sending faxes.

- "pager" The number is for a pager or beeper.

- "text" The number supports text messages (SMS).

- "cell" The number is for a cell phone.

- "textphone" The number is for a device for people with hearing or speech difficulties.

- "video" The number supports video conferencing.

Stepanek & Loffredo Expires 13 January 2022 [Page 11] Internet-Draft JSContact July 2021

- "other" The number is for some other purpose. The label property MAY be included to display next to the number to help the user identify its purpose.

* contexts: "Context[Boolean]" (optional) The contexts in which to use this number. The value for each key in the object MUST be "true".

* label: "String" (optional). A label describing the value in more detail, especially if the type property has value "other" (but MAY be included with any type).

* pref: "Preference" (optional) The preference of this number in relation to other numbers.

2.3.3. online

Type: "Id[Resource]" (optional).

The online resources and services that are associated with the entity represented by this card. A Resource object has the following properties:

* resource: "String" (mandatory). The resource value, where the allowed value form is defined by the the _type_ property. In any case the value MUST NOT be empty.

* type: "String" (optional, default: "other"). The type of the resource value. Allowed values are:

- "uri" The resource value is a URI, e.g. a website link. This MUST be a valid _URI_ as defined in Section 3 of [RFC3986] and updates.

- "username" The resource value is a username associated with the entity represented by this card (e.g. for social media, or an IM client). The _label_ property SHOULD be included to identify what service this is for. For compatibility between clients, this label SHOULD be the canonical service name, including capitalisation. e.g. "Twitter", "Facebook", "Skype", "GitHub", "XMPP". The resource value may be any non-empty free text.

- "other" The resource value is something else not covered by the above categories. A label property MAY be included to display next to the number to help the user identify its purpose. The resource value may be any non-empty free text.

Stepanek & Loffredo Expires 13 January 2022 [Page 12] Internet-Draft JSContact July 2021

* mediaType: "String" (optional). Used for URI resource values. Provides the media type [RFC2046] of the resource identified by the URI.

* contexts: "Context[Boolean]" (optional) The contexts in which to use this resource. The value for each key in the object MUST be "true".

* label: "String" (optional). A label describing the value in more detail, especially if the type property has value "other" (but MAY be included with any type).

* pref: "Preference" (optional) The preference of this resource in relation to other resources.

2.3.4. photos

Type: "Id[File]" (optional).

A map of photo ids to File objects that contain photographs or images associated with this card. A typical use case is to include an avatar for display along the contact name.

A File object has the following properties:

* href: "String" (mandatory). A URI where to fetch the data of this file.

* mediaType: "String" (optional). The content-type of the file, if known.

* size: "UnsignedInt" (optional). The size, in octets, of the file when fully decoded (i.e., the number of octets in the file the user would download), if known.

* pref: "Preference" (optional) The preference of this photo in relation to other photos.

2.3.5. preferredContactMethod

Type : "String" (optional)

Defines the preferred method to contact the holder of this card. The value MUST be the property names: "emails", "phones", "online".

Stepanek & Loffredo Expires 13 January 2022 [Page 13] Internet-Draft JSContact July 2021

2.3.6. preferredContactLanguages

Type : "String[ContactLanguage[]]" (optional)

Defines the preferred languages for contacting the entity associated with this card. The keys in the object MUST be [RFC5646] language tags. The values are a (possibly empty) list of contact language preferences for this language. A valid ContactLanguage object MUST have at least one of its properties set.

A ContactLanguage object has the following properties:

* context: "Context" (optional). Defines the context in which to use this language.

* pref: "Preference" (optional). Defines the preference of this language in relation to other languages of the same context.

Also see the definition of the VCARD LANG property (Section 6.4.4., [RFC6350]).

2.4. Address and Location properties

2.4.1. addresses

Type: "Id[Address]" (optional).

A map of address ids to Address objects, containing physical locations. An Address object has the following properties:

* fullAddress: "LocalizedString" (optional). The complete address, excluding type and label. This property is mainly useful to represent addresses of which the individual address components are unknown, or to provide localized representations.

* street: "StreetComponent[]" (optional). The street address. The concatenation of the component values, separated by whitespace, SHOULD result in a valid street address for the address locale. Doing so, implementations MAY ignore any "separator" components. The StreetComponent object type is defined in the paragraph below.

* locality: "String" (optional). The city, town, village, post town, or other locality within which the street address may be found.

* region: "String" (optional). The province, such as a state, county, or canton within which the locality may be found.

Stepanek & Loffredo Expires 13 January 2022 [Page 14] Internet-Draft JSContact July 2021

* country: "String" (optional). The country name.

* postcode: "String" (optional). The postal code, post code, ZIP code or other short code associated with the address by the relevant country’s postal system.

* countryCode: "String" (optional). The ISO-3166-1 country code.

* coordinates: "String" (optional) A [RFC5870] "geo:" URI for the address.

* timeZone: "String" (optional) Identifies the time zone this address is located in. This either MUST be a time zone name registered in the IANA Time Zone Database (https://www.iana.org/ time-zones), or it MUST be a valid TimeZoneId as defined in [jscalendar]. For the latter, a corresponding time zone MUST be defined in the "timeZones" property.

* contexts: "Context[Boolean]" (optional). The contexts of the address information. In addition to the common contexts, allowed values are:

- "billing" An address to be used for billing.

- "postal" An address to be used for delivering physical items. The value for each key in the object MUST be "true".

* label: "String" (optional). A label describing the value in more detail.

* pref: "Preference" (optional) The preference of this address in relation to other addresses.

A StreetComponent object has the following properties:

* type: "String" (mandatory). The type of this street component. The value MUST be either one of the following values, registered in a future RFC, or a vendor-specific value:

- "name". The street name.

- "number". The street number.

- "apartment". The apartment number or identifier.

- "room". The room number or identifier.

- "extension". The extension designation or box number.

Stepanek & Loffredo Expires 13 January 2022 [Page 15] Internet-Draft JSContact July 2021

- "direction". The cardinal direction, e.g. "North".

- "building". The building or building part this address is located in.

- "floor". The floor this address is located on.

- "postOfficeBox". The post office box number or identifier.

- "separator". A separator for two street components. The "value" property of the component includes the verbatim separator, for example a newline character.

- "unknown". A name component value for which no type is known.

* value: "String" (mandatory). The value of this street component.

2.5. Additional properties

2.5.1. anniversaries

Type : Id[Anniversary] (optional).

These are memorable dates and events for the entity represented by this card. An Anniversary object has the following properties:

* type: "String" (mandatory). Specifies the type of the anniversary. This RFC predefines the following types, but implementations MAY use additional values:

- "birth": a birth day anniversary

- "death": a death day anniversary

- "other": an anniversary not covered by any of the known types.

* label: "String" (optional). A label describing the value in more detail, especially if the type property has value "other" (but MAY be included with any type).

* date: "String" (mandatory). The date of this anniversary, in the form "YYYY-MM-DD" (any part may be all 0s for unknown) or a [RFC3339] timestamp.

* place: Address (optional). An address associated with this anniversary, e.g. the place of birth or death.

Stepanek & Loffredo Expires 13 January 2022 [Page 16] Internet-Draft JSContact July 2021

2.5.2. personalInfo

Type: "Id[PersonalInformation]" (optional).

Defines personal information about the entity represented by this card. A PersonalInformation object has the following properties:

* type: "String" (mandatory). Specifies the type for this personal information. Allowed values are:

- "expertise": a field of expertise or credential

- "hobby": a hobby

- "interest": an interest

- "other": an information not covered by the above categories

* value: "String" (mandatory). The actual information. This generally is free-text, but future specifications MAY restrict allowed values depending on the type of this PersonalInformation.

* level: "String" (optional) Indicates the level of expertise, or engagement in hobby or interest. Allowed values are: "high", "medium" and "low".

2.5.3. notes

Type: "LocalizedString" (optional).

Arbitrary notes about the entity represented by this card.

2.5.4. categories

Type: "String[Boolean]" (optional). The set of free-text or URI categories that relate to the card. The set is represented as an object, with each key being a category. The value for each key in the object MUST be "true".

2.5.5. timeZones

Type: "String[TimeZone]" (optional). Maps identifiers of custom time zones to their time zone definitions. For a description of this property see the "timeZones" property definition in [jscalendar].

Stepanek & Loffredo Expires 13 January 2022 [Page 17] Internet-Draft JSContact July 2021

3. CardGroup

MIME type: "application/jscontact+json;type=cardgroup"

A CardGroup object represents a group of cards. Its members may be Cards or CardGroups.

3.1. Group properties

3.1.1. uid

Type: "String" (mandatory). The uid of this group. Both CardGroup and Card share the same namespace for the "uid" property.

3.1.2. members

Type: "String[Boolean]" (mandatory). The members of this group.

The set is represented as an object, with each key being the uid of another Card or CardGroup. The value for each key in the object MUST be "true".

3.1.3. name

Type: "String" (optional). The user-visible name for the group, e.g. "Friends". This may be any UTF-8 string of at least 1 character in length and maximum 255 octets in size. The same name may be used by two different groups.

3.1.4. card

Type: "Card" (optional). The card that represents this group.

4. Implementation Status

NOTE: Please remove this section and the reference to [RFC7942] prior to publication as an RFC. This section records the status of known implementations of the protocol defined by this specification at the time of posting of this Internet-Draft, and is based on a proposal described in [RFC7942]. The description of implementations in this section is intended to assist the IETF in its decision processes in progressing drafts to RFCs. Please note that the listing of any individual implementation here does not imply endorsement by the IETF. Furthermore, no effort has been spent to verify the information presented here that was supplied by IETF contributors. This is not intended as, and must not be construed to be, a catalog of available implementations or their features. Readers are advised to note that other implementations may exist. According to

Stepanek & Loffredo Expires 13 January 2022 [Page 18] Internet-Draft JSContact July 2021

[RFC7942], "this will allow reviewers and working groups to assign due consideration to documents that have the benefit of running code, which may serve as evidence of valuable experimentation and feedback that have made the implemented protocols more mature. It is up to the individual working groups to use this information as they see fit".

4.1. IIT-CNR/Registro.it

* Responsible Organization: Institute of Informatics and Telematics of National Research Council (IIT-CNR)/Registro.it

* Location: https://rdap.pubtest.nic.it/ (https://rdap.pubtest.nic.it/)

* Description: This implementation includes support for RDAP queries using data from the public test environment of .it ccTLD. The RDAP server does not implement any security policy because data returned by this server are only for experimental testing purposes. The RDAP server returns responses including Card in place of jCard when queries contain the parameter jscard=1.

* Level of Maturity: This is a "proof of concept" research implementation.

* Coverage: This implementation includes all of the features described in this specification.

* Contact Information: Mario Loffredo, [email protected]

5. IANA Considerations

TBD

6. Security Considerations

TBD

7. References

7.1. Normative References

[jscalendar] "JSCalendar: A JSON Representation of Calendar Data", .

Stepanek & Loffredo Expires 13 January 2022 [Page 19] Internet-Draft JSContact July 2021

[RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types", RFC 2046, DOI 10.17487/RFC2046, November 1996, .

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, .

[RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally Unique IDentifier (UUID) URN Namespace", RFC 4122, DOI 10.17487/RFC4122, July 2005, .

[RFC5646] Phillips, A., Ed. and M. Davis, Ed., "Tags for Identifying Languages", BCP 47, RFC 5646, DOI 10.17487/RFC5646, September 2009, .

[RFC5870] Mayrhofer, A. and C. Spanring, "A Uniform Resource Identifier for Geographic Locations (’geo’ URI)", RFC 5870, DOI 10.17487/RFC5870, June 2010, .

[RFC6350] Perreault, S., "vCard Format Specification", RFC 6350, DOI 10.17487/RFC6350, August 2011, .

[RFC6351] Perreault, S., "xCard: vCard XML Representation", RFC 6351, DOI 10.17487/RFC6351, August 2011, .

[RFC7095] Kewisch, P., "jCard: The JSON Format for vCard", RFC 7095, DOI 10.17487/RFC7095, January 2014, .

[RFC7493] Bray, T., Ed., "The I-JSON Message Format", RFC 7493, DOI 10.17487/RFC7493, March 2015, .

[RFC7942] Sheffer, Y. and A. Farrel, "Improving Awareness of Running Code: The Implementation Status Section", BCP 205, RFC 7942, DOI 10.17487/RFC7942, July 2016, .

[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, .

Stepanek & Loffredo Expires 13 January 2022 [Page 20] Internet-Draft JSContact July 2021

[RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data Interchange Format", STD 90, RFC 8259, DOI 10.17487/RFC8259, December 2017, .

7.2. Informative References

[RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A., Peterson, J., Sparks, R., Handley, M., and E. Schooler, "SIP: Session Initiation Protocol", RFC 3261, DOI 10.17487/RFC3261, June 2002, .

[RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002, .

[RFC3966] Schulzrinne, H., "The tel URI for Telephone Numbers", RFC 3966, DOI 10.17487/RFC3966, December 2004, .

[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, DOI 10.17487/RFC3986, January 2005, .

[RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, .

[RFC5322] Resnick, P., Ed., "Internet Message Format", RFC 5322, DOI 10.17487/RFC5322, October 2008, .

[RFC6473] Saint-Andre, P., "vCard KIND:application", RFC 6473, DOI 10.17487/RFC6473, December 2011, .

[RFC6474] Li, K. and B. Leiba, "vCard Format Extensions: Place of Birth, Place and Date of Death", RFC 6474, DOI 10.17487/RFC6474, December 2011, .

[RFC6715] Cauchie, D., Leiba, B., and K. Li, "vCard Format Extensions: Representing vCard Extensions Defined by the Open Mobile Alliance (OMA) Converged Address Book (CAB) Group", RFC 6715, DOI 10.17487/RFC6715, August 2012, .

Stepanek & Loffredo Expires 13 January 2022 [Page 21] Internet-Draft JSContact July 2021

[RFC6869] Salgueiro, G., Clarke, J., and P. Saint-Andre, "vCard KIND:device", RFC 6869, DOI 10.17487/RFC6869, February 2013, .

[RFC8605] Hollenbeck, S. and R. Carney, "vCard Format Extensions: ICANN Extensions for the Registration Data Access Protocol (RDAP)", RFC 8605, DOI 10.17487/RFC8605, May 2019, .

Authors’ Addresses

Robert Stepanek FastMail PO Box 234, Collins St West Melbourne VIC 8007 Australia

Email: [email protected]

Mario Loffredo IIT-CNR Via Moruzzi,1 56124 Pisa Italy

Email: [email protected]

Stepanek & Loffredo Expires 13 January 2022 [Page 22] jmap M. Loffredo Internet-Draft IIT-CNR/Registro.it Intended status: Standards Track R. Stepanek Expires: January 13, 2022 FastMail July 12, 2021

JSContact: Converting from and to vCard draft-ietf-jmap-jscontact-vcard-06

Abstract

This document defines how to convert contact information as defined in the JSContact [draft-ietf-jmap-jscontact] specification from and to vCard.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on January 13, 2022.

Copyright Notice

Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

Loffredo & Stepanek Expires January 13, 2022 [Page 1] Internet-Draft jscontact-vcard July 2021

Table of Contents

1. Introduction ...... 3 1.1. Motivation ...... 3 1.2. Scope and Caveats ...... 4 1.2.1. Extensions ...... 4 1.3. Conventions Used in This Document ...... 4 2. Translating vCard properties to JSContact ...... 5 2.1. Common Parameters ...... 5 2.2. JSContact Id ...... 5 2.3. General Properties ...... 6 2.3.1. BEGIN and END ...... 6 2.3.2. SOURCE ...... 6 2.3.3. KIND ...... 6 2.3.4. XML ...... 7 2.4. Identification Properties ...... 7 2.4.1. FN ...... 7 2.4.2. N and NICKNAME ...... 7 2.4.3. PHOTO ...... 8 2.4.4. BDAY, BIRTHPLACE, DEATHDATE, DEATHPLACE, ANNIVERSARY 9 2.4.5. GENDER ...... 11 2.5. Delivery Addressing Properties ...... 11 2.5.1. ADR ...... 11 2.6. Communications Properties ...... 14 2.6.1. TEL ...... 14 2.6.2. EMAIL ...... 14 2.6.3. IMPP ...... 15 2.6.4. LANG ...... 16 2.7. Geographical Properties ...... 17 2.7.1. Time Zone Representation ...... 18 2.8. Organizational Properties ...... 19 2.8.1. TITLE and ROLE ...... 19 2.8.2. LOGO ...... 20 2.8.3. ORG ...... 21 2.8.4. MEMBER ...... 22 2.8.5. RELATED ...... 24 2.8.6. CONTACT-URI ...... 25 2.9. Personal Information Properties ...... 25 2.9.1. EXPERTISE ...... 26 2.9.2. HOBBY ...... 26 2.9.3. INTEREST ...... 27 2.9.4. ORG-DIRECTORY ...... 28 2.10. Explanatory Properties ...... 29 2.10.1. CATEGORIES ...... 29 2.10.2. NOTE ...... 30 2.10.3. PRODID ...... 31 2.10.4. REV ...... 31 2.10.5. SOUND ...... 31

Loffredo & Stepanek Expires January 13, 2022 [Page 2] Internet-Draft jscontact-vcard July 2021

2.10.6. UID ...... 32 2.10.7. CLIENTPIDMAP and PID Parameter ...... 33 2.10.8. URL ...... 33 2.10.9. VERSION ...... 33 2.11. Security Properties ...... 33 2.11.1. KEY ...... 34 2.12. Calendar Properties ...... 34 2.12.1. FBURL ...... 34 2.12.2. CALADRURI ...... 35 2.12.3. CALURI ...... 36 2.13. vCard Unmatched Properties ...... 37 2.14. Card Required Properties ...... 37 3. Translating JSContact properties to vCard ...... 38 3.1. Id ...... 38 3.2. Localizations ...... 38 3.3. Date and Time Representations ...... 38 3.4. Time Zone ...... 38 3.5. JSContact Types Matching Multiple vCard Properties . . . 39 3.5.1. Title ...... 39 3.5.2. Resource ...... 39 3.6. CardGroup ...... 39 3.7. Card Unmatched Properties ...... 39 3.8. vCard Required Properties ...... 39 4. IANA Considerations ...... 39 5. Implementation Status ...... 40 5.1. CNR ...... 40 6. Security Considerations ...... 40 7. References ...... 40 7.1. Normative References ...... 41 7.2. Informative References ...... 42 Authors’ Addresses ...... 42

1. Introduction

1.1. Motivation

The JSContact specification [draft-ietf-jmap-jscontact] has been defined to represent contact card information as a more efficient alternative to vCard [RFC6350] and its JSON-based version named jCard [RFC7095].

While new applications might adopt JSContact as their main format to exchange contact card data, they are likely to interoperate with services and clients that just support vCard/jCard. Similarly, existing contact data providers and consumers already using vCard/ jCard might want to represent their data also according to the JSContact specification.

Loffredo & Stepanek Expires January 13, 2022 [Page 3] Internet-Draft jscontact-vcard July 2021

To facilitate this, this document defines how to convert contact information as defined in the JSContact [draft-ietf-jmap-jscontact] specification from and to vCard.

1.2. Scope and Caveats

JSContact and vCard have a lot of semantics in common, however some differences must be outlined:

o The JSContact data model defines some contact information that doesn’t have a direct mapping with vCard properties. In particular, unlike vCard, JSContact distinguishes between a single contact card, named Card, and a group of contact cards, named CardGroup.

o The properties that can be present multiple times in a vCard are represented through different collections in JSContact; mainly as maps, sometimes as lists, in some cases condensed in a single value.

1.2.1. Extensions

While translating vCard properties to JSContact, any vCard property that doesn’t have a direct counterpart in JSContact MUST be converted into a property whose name is prefixed by "ietf.org//".

Any custom extension MAY be added and its name MUST be prefixed with a specific domain name to avoid conflict, e.g. "example.com/ customprop".

Similarly, the reversed rules are applied while translating JSContact properties to vCard.

1.3. Conventions Used in This Document

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].

In the following of this document, the vCard features, namely properties and parameters, are written in uppercase while the Card/ CardGroup features are written in camel case wrapped in double quotes.

Loffredo & Stepanek Expires January 13, 2022 [Page 4] Internet-Draft jscontact-vcard July 2021

2. Translating vCard properties to JSContact

This section contains the translation rules from vCard to Card/ CardGroup. The vCard properties are grouped according to the categories as defined in [RFC6350].

If a vCard represents a group of contacts, those vCard properties which don’t have a counterpart in CardGroup are converted into related properties of the "CardGroup.card" object. In this case, the "uid" member of both the resulting CardGroup object and its "card" member MUST have the same value.

2.1. Common Parameters

The following mapping rules apply to parameters that are common to most of the vCard properties:

o The generic values of the TYPE parameter are mapped to the values of the "Context" type as defined in Section 1.5.1 of [draft-ietf-jmap-jscontact]. The "home" value corresponds to the "private" key. The mapping of those specific TYPE values used in the TEL and RELATED properties are defined in Section 2.6.1 and Section 2.8.5.

o The PREF parameter is mapped to the "pref" property.

o The MEDIATYPE parameter is mapped to the "mediaType" property. As described in Section 5.7 of [RFC6350], the media type of a resource can be identified by its URI. For example, "image/gif" can be derived from the ".gif" extension of a GIF image URI. JSContact producers MAY provide the media type information even when it is not specified in the vCard.

o The ALTID and LANGUAGE parameters are used in combination for associating the language-dependent alternatives with a given property. Such alternatives are represented by using the "localizations" map of a "LocalizedString" member inside the matching JSContact object.

2.2. JSContact Id

The rules to generate a map key of type Id are out of the scope of this document.

Loffredo & Stepanek Expires January 13, 2022 [Page 5] Internet-Draft jscontact-vcard July 2021

2.3. General Properties

2.3.1. BEGIN and END

The BEGIN and END properties don’t have a direct match with a JSContact feature.

2.3.2. SOURCE

A SOURCE property is represented as an entry of the "online" map (Figure 1). The entry value is a "Resource" object whose "type" member is set to "uri", the "label" member is set to "source" and the "resource" member is the SOURCE value.

The PREF and MEDIATYPE parameters are mapped according to the rules as defined in (Section 2.1).

BEGIN:VCARD VERSION:4.0 ... SOURCE:http://directory.example.com/addressbooks/jdoe/Jean%20Dupont.vcf ... END:VCARD

{ ... "online":{ ... "a-source":{ "type": "uri", "label": "source", "resource": "http://directory.example.com/addressbooks/jdoe/Jean%20Dupon t.vcf" }, ... }, ... }

Figure 1: SOURCE mapping example

2.3.3. KIND

The KIND property is mapped to the "kind" member (Figure 2). Allowed values are those described in Section 6.1.4 of [RFC6350] and extended with the values declared in [RFC6473] and [RFC6869]. The value "group" is reserved for a CardGroup instance.

Loffredo & Stepanek Expires January 13, 2022 [Page 6] Internet-Draft jscontact-vcard July 2021

BEGIN:VCARD VERSION:4.0 ... KIND:individual ... END:VCARD

{ ... "kind": "individual", ... }

Figure 2: KIND mapping example

2.3.4. XML

The XML property doesn’t have a direct match with a JSContact feature.

2.4. Identification Properties

2.4.1. FN

All the FN instances are represented through the "fullName" member. The presence of multiple instances is implicitly associated with the full name translations in various languages regardless of the presence of the ALTID parameter. Each translation corresponds to a different entry of the "localizations" map (Figure 3).

If the vCard represents a group of contacts, implementers MAY convert the FN property into either "CardGroup.card.fullName" or "CardGroup.name" or both properties.

2.4.2. N and NICKNAME

The N instances are converted into equivalent items of the "name" array (Figure 3): the N components are transformed into related "NameComponent" objects as presented in Table 1. Name components SHOULD be ordered such that their values joined by whitespace produce a valid full name of this entity.

Each NICKNAME instance is mapped to an item of "nickNames" array.

Loffredo & Stepanek Expires January 13, 2022 [Page 7] Internet-Draft jscontact-vcard July 2021

+------+------+ | N component | "type" value | +------+------+ | Honorific Prefixes | prefix | | Given Names | personal | | Family Names | surname | | Additional Names | additional | | Honorific Suffixes | suffix | +------+------+

Table 1: N components mapping

BEGIN:VCARD VERSION:4.0 ... FN:Mr. John Q. Public\, Esq. N:Public;John;Quinlan;Mr.;Esq. NICKNAME:Johnny ... END:VCARD

{ ... "fullName":{ "value": "Mr. John Q. Public, Esq." }, "name":[ { "value":"Mr.", "type": "prefix" }, { "value":"John", "type": "personal" }, { "value":"Public", "type": "surname" }, { "value":"Quinlan", "type": "additional" }, { "value":"Esq.", "type": "suffix" } ], "nickNames":[ { "value": "Johnny" } ], ... }

Figure 3: FN, N, NICKNAME mapping example

2.4.3. PHOTO

A PHOTO property is represented as an entry of the "photos" map (Figure 4). The entry value is a "File" object whose "href" member is the PHOTO value.

The PREF and MEDIATYPE parameters are mapped according to the rules as defined in (Section 2.1).

Loffredo & Stepanek Expires January 13, 2022 [Page 8] Internet-Draft jscontact-vcard July 2021

BEGIN:VCARD VERSION:4.0 ... PHOTO:http://www.example.com/pub/photos/jqpublic.gif ... END:VCARD

{ ... "photos":{ ... "a-photo":{ "href": "http://www.example.com/pub/photos/jqpublic.gif" }, ... }, ... }

Figure 4: PHOTO mapping example

2.4.4. BDAY, BIRTHPLACE, DEATHDATE, DEATHPLACE, ANNIVERSARY

The BDAY and ANNIVERSARY properties and the extensions BIRTHPLACE, DEATHDATE, DEATHPLACE described in [RFC6350] are represented as "Anniversary" objects included in the "anniversaries" map (Figure 5):

o BDAY and BIRTHPLACE are mapped to "date" and "place" where "type" is set to "birth";

o DEATHDATE and DEATHPLACE are mapped to "date" and "place" where "type" is set to "death";

o ANNIVERSARY is mapped to "date" where "type" is set to "other" and "label" is set to a value describing in detail the kind of anniversary (e.g. "marriage date" for the wedding anniversary).

Both birth and death places are represented as instances of the "Address" object.

The BIRTHPLACE and DEATHPLACE properties that are represented as geo URIs are converted into "Address" instances including only the "coordinates" member. If the URI value is not a geo URI, the place is ignored.

The ALTID and LANGUAGE parameters of both BIRTHPLACE and DEATHPLACE properties are mapped according to the rules as defined in

Loffredo & Stepanek Expires January 13, 2022 [Page 9] Internet-Draft jscontact-vcard July 2021

(Section 2.1). The "fullAddress.localizations" includes possible language-dependent alternatives.

BEGIN:VCARD VERSION:4.0 ... BDAY:19531015T231000Z BIRTHPLACE:Mail Drop: TNE QB\n123 Main Street\nAny Town, CA 91921-1234\nU.S.A . DEATHDATE:19960415 DEATHPLACE:4445 Courtright Street\nNew England, ND 58647\nU.S.A. ANNIVERSARY:19860201 ... END:VCARD

{ ... "anniversaries": { "ANNIVERSARY-1" : { "type": "birth", "date": "1953-10-15T23:10:00Z", "place":{ "fullAddress":{ "value": "Mail Drop: TNE QB\n123 Main Street\nAny Town, CA 91921-1234 \nU.S.A." } } }, "ANNIVERSARY-2" : { "type": "birth", "date": "1953-10-15T23:10:00Z", "place":{ "fullAddress":{ "value": "4445 Courtright Street\nNew England, ND 58647\nU.S.A." } } }, "ANNIVERSARY-3" : { "type": "other", "label": "marriage date", "date": "1986-02-01" } }, ... }

Figure 5: BDAY, BIRTHPLACE, DEATHDATE, DEATHPLACE, ANNIVERSARY mapping example

Loffredo & Stepanek Expires January 13, 2022 [Page 10] Internet-Draft jscontact-vcard July 2021

2.4.5. GENDER

The GENDER property doesn’t have a direct match with a JSContact feature.

2.5. Delivery Addressing Properties

2.5.1. ADR

An ADR property is represented as an entry of the "addresses" map (Figure 6). The entry value is an "Address" object.

The ADR components are transformed into the "Address" members as presented in Table 2 and Table 3.

The "street address" and "extended address" ADR components MAY be converted into either a single StreetComponent item or a combination of StreetComponent items.

+------+------+ | ADR component | Address member | +------+------+ | locality | locality | | region | region | | postal code | postcode | | country name | country | +------+------+

Table 2: ADR components vs. Address members mapping

+------+------+------+ | ADR | Single | Combination of | | component | StreetComponent | StreetComponent items | | | item | | +------+------+------+ | post office | postOfficeBox | | | box | | | | extended | extension | extension, building, floor, | | address | | room, apartment | | street | name | name, number, direction | | address | | | +------+------+------+

Table 3: ADR components vs. StreetComponent items mapping

The LABEL parameter is converted into the "fullAddress" member.

The GEO parameter is converted into the "coordinates" member.

Loffredo & Stepanek Expires January 13, 2022 [Page 11] Internet-Draft jscontact-vcard July 2021

The TZ parameter is converted into the "timeZone" member.

The CC parameter as defined in [RFC8605] is converted into the "countryCode" member.

The PREF and TYPE parameters are mapped according to the rules as defined in (Section 2.1).

The ALTID and LANGUAGE parameters are mapped according to the rules as defined in (Section 2.1). The "fullAddress.localizations" includes possible language-dependent alternatives.

Loffredo & Stepanek Expires January 13, 2022 [Page 12] Internet-Draft jscontact-vcard July 2021

BEGIN:VCARD VERSION:4.0 ... ADR;TYPE=work;CC=US:;;54321 Oak St;Reston;VA;20190;USA ADR;TYPE=home;CC=US:;;12345 Elm St;Reston;VA;20190;USA ... END:VCARD

{ ... "addresses":{ "work-address" :{ "contexts":{ "work": true }, "fullAddress":{ "value": "54321 Oak St\nReston\nVA\n20190\nUSA" }, "street": [ { "name": "Oak St" }, { "number" : "54321" } ], "locality": "Reston", "region": "VA", "country": "USA", "postcode": "20190", "countryCode": "US" }, "private-address":{ "contexts":{ "private": true }, "fullAddress":{ "value": "12345 Elm St\nReston\nVA\n20190\nUSA" }, "street": [ { "name": "Elm St" }, { "number" : "12345" } ], "locality": "Reston", "region": "VA", "country": "USA", "postcode": "20190", "countryCode": "US" } }, ... }

Figure 6: ADR mapping example

Loffredo & Stepanek Expires January 13, 2022 [Page 13] Internet-Draft jscontact-vcard July 2021

2.6. Communications Properties

2.6.1. TEL

A TEL property is represented as an entry of the "phones" map (Figure 7). The entry value is a "Phone" object. The TEL-specific values of the TYPE parameter are mapped to the "features" map keys. The values that don’t match a key are represented as comma-separated values of the "label" member. If the "features" map is empty and the "label" member is not empty, the "other" feature is added. The "phone" member is set to the TEL value.

The PREF and TYPE parameters are mapped according to the rules as defined in (Section 2.1).

BEGIN:VCARD VERSION:4.0 ... TEL;VALUE=uri;PREF=1;TYPE="voice,home":tel:+1-555-555-5555;ext=5555 TEL;VALUE=uri;TYPE=home:tel:+33-01-23-45-67 ... END:VCARD

{ ... "phones":{ "a-phone":{ "contexts":{ "private": true }, "features":{ "voice": true }, "phone": "tel:+1-555-555-5555;ext=5555", "pref": 1 }, "another-phone":{ "contexts":{ "private": true }, "phone": "tel:+33-01-23-45-67" } ], ... }

Figure 7: TEL mapping example

2.6.2. EMAIL

An EMAIL property is represented as an entry of the "emails" map (Figure 8). The entry value is an "EmailAddress" object. The "email" member is set to the EMAIL value.

Loffredo & Stepanek Expires January 13, 2022 [Page 14] Internet-Draft jscontact-vcard July 2021

The PREF and TYPE parameters are mapped according to the rules as defined in (Section 2.1).

BEGIN:VCARD VERSION:4.0 ... EMAIL;TYPE=work:[email protected] EMAIL;PREF=1:[email protected] ... END:VCARD

{ ... "emails":{ "work-email":{ "contexts":{ "work": true }, "email": "[email protected]" }, "private-email":{ "contexts":{ "private", true }, "email": "[email protected]", "pref": 1 } }, ... }

Figure 8: EMAIL mapping example

2.6.3. IMPP

An IMPP property is represented as an entry of the "online" map (Figure 9). The entry value is a "Resource" object whose "type" member is set to "username", the "label" member is set to "XMPP" and the "resource" member is the IMPP value.

The PREF and TYPE parameters are mapped according to the rules as defined in (Section 2.1).

Loffredo & Stepanek Expires January 13, 2022 [Page 15] Internet-Draft jscontact-vcard July 2021

BEGIN:VCARD VERSION:4.0 ... IMPP;PREF=1:xmpp:[email protected] ... END:VCARD

{ ... "online":{ ... { "type": "username", "label": "XMPP", "value": "[email protected]" }, ... }, ... }

Figure 9: IMPP mapping example

2.6.4. LANG

A LANG property is represented as an entry of the "preferredContactLanguages" map (Figure 10). The entry keys correspond to the language tags, the corresponding entry values are arrays of "ContactLanguage" objects.

The PREF and TYPE parameters are mapped according to the rules as defined in (Section 2.1).

If both PREF and TYPE parameters are missing, the array of "ContactLanguage" objects MUST be empty.

Loffredo & Stepanek Expires January 13, 2022 [Page 16] Internet-Draft jscontact-vcard July 2021

BEGIN:VCARD VERSION:4.0 ... LANG;TYPE=work;PREF=1:en LANG;TYPE=work;PREF=2:fr LANG;TYPE=home:fr ... END:VCARD

{ ... "preferredContactLanguages":{ "en":[ { "context": "work", "pref": 1 } ], "fr":[ { "context": "work", "pref": 2 }, { "context": "private" } ] }, ... }

Figure 10: LANG mapping example

2.7. Geographical Properties

The GEO and TZ properties are not directly mapped to topmost Card members because the same information is represented through equivalent "Address" members.

The ALTID parameter is used for associating both GEO and TZ properties with the related address information. When the ALTID parameter is missing, the matched members SHOULD be included in the first "Address" object.

Loffredo & Stepanek Expires January 13, 2022 [Page 17] Internet-Draft jscontact-vcard July 2021

2.7.1. Time Zone Representation

As specified in Section 6.5.1 of [RFC6350], the time zone information can be represented in three ways: as a time zone name, as a UTC offset or as a URI.

o If the TZ value is defined in the IANA timezone database, it is directly matched by the "timeZone" member in JSContact.

o An UTC offset with zero minutes MUST be converted into one its equivalent IANA "Etc/GMT" time zone to set in the "timeZone" property. For example, the value "-0500" converts to "Etc/GMT+5". Implementations MUST make sure that such IANA timezone exists.

o An UTC offset with non-zero minutes MAY be converted to a custom "TimeZone" object in the JSContact "timeZones" property (see example below).

o A non-IANA timezone name or URI MAY be converted to a custom "TimeZone" object in the JSContact "timeZones" property. It is up to the implementation to determine the time zone definition.

Loffredo & Stepanek Expires January 13, 2022 [Page 18] Internet-Draft jscontact-vcard July 2021

BEGIN:VCARD VERSION:4.0 ... ADR;TZ=-0530:;;123 Main Street;Any Town;CA;91921-1234;U.S.A. ... END:VCARD

{ ... "addresses": { "addr1" : { "timeZone": "/tz1" ... } }, "timeZones": { "/tz1": { "@type": "TimeZone", "tzId": "TZ-0530", "updated": "2021-06-07T14:24:45Z", "standard": [{ "@type": "TimeZoneRule", "offsetFrom": "-0530", "offsetTo": "-0530", "start": "1601-01-01T00:00:00" }] } } ... }

Figure 11: Mapping a TZ UTC offset value with non-zero minutes

2.8. Organizational Properties

2.8.1. TITLE and ROLE

Both TITLE and ROLE properties are represented as entries of the "titles" map (Figure 12). The entry value is a "Title" object whose "title" member includes information about the language.

The ALTID and LANGUAGE parameters are mapped according to the rules as defined in (Section 2.1). The "title.localizations" includes possible language-dependent alternatives.

Loffredo & Stepanek Expires January 13, 2022 [Page 19] Internet-Draft jscontact-vcard July 2021

BEGIN:VCARD VERSION:4.0 ... TITLE:Research Scientist ROLE:Project Leader ... END:VCARD

{ ... "titles":{ "a-title":{ "title":{ "value" : "Project Leader" } }, "another-title":{ "title":{ "value" : "Research Scientist" } } }, ... }

Figure 12: TITLE and ROLE mapping example

2.8.2. LOGO

A LOGO property is represented as an entry of the "online" map (Figure 13). The entry value is a "Resource" object whose "type" member is set to "uri", the "label" member is set to "logo" and the "resource" member is the LOGO value.

The PREF and TYPE parameters are mapped according to the rules as defined in (Section 2.1).

Loffredo & Stepanek Expires January 13, 2022 [Page 20] Internet-Draft jscontact-vcard July 2021

BEGIN:VCARD VERSION:4.0 ... LOGO:http://www.example.com/pub/logos/abccorp.jpg ... END:VCARD

{ ... "online":{ ... "a-logo":{ "type": "uri", "label": "logo", "resource": "http://www.example.com/pub/logos/abccorp.jpg" }, ... }, ... }

Figure 13: LOGO mapping example

2.8.3. ORG

An ORG property is represented as an entry of the "organizations" map (Figure 14). The entry value is an "Organization" object whose "name" member contains the organizational name and the "units" member contains the organizational units.

The ALTID and LANGUAGE parameters are mapped according to the rules as defined in (Section 2.1). The "localizations" maps for both "name" and "units" include possible language-dependent alternatives.

Loffredo & Stepanek Expires January 13, 2022 [Page 21] Internet-Draft jscontact-vcard July 2021

BEGIN:VCARD VERSION:4.0 ... ORG:ABC\, Inc.;North American Division;Marketing ... END:VCARD

{ ... "organizations":{ "an-organization":{ "name":{ "value": "ABC, Inc." }, "units":[ { "value": "North American Division" }, { "value": "Marketing" } ] } }, ... }

Figure 14: ORG mapping example

2.8.4. MEMBER

According to the JSContact specification, a group of contact cards is represented through a CardGroup (Figure 15). The uids of the contact cards composing the group are included in the "members" map.

In this case, the PREF parameter has not a JSContact counterpart; however, the implementers MAY insert the map entries by order of preference.

Loffredo & Stepanek Expires January 13, 2022 [Page 22] Internet-Draft jscontact-vcard July 2021

BEGIN:VCARD VERSION:4.0 KIND:group FN:The Doe family MEMBER:urn:uuid:03a0e51f-d1aa-4385-8a53-e29025acd8af MEMBER:urn:uuid:b8767877-b4a1-4c70-9acc-505d3819e519 END:VCARD

{ "kind": "group", "fullName":{ "value": "The Doe family" }, "uid": "urn:uuid:ab4310aa-fa43-11e9-8f0b-362b9e155667", "members":{ "urn:uuid:03a0e51f-d1aa-4385-8a53-e29025acd8af": true, "urn:uuid:b8767877-b4a1-4c70-9acc-505d3819e519": true } }

Figure 15: Group example

Only if the GROUP contains properties that don’t have a mapping to CardGroup properties, then the CardGroup.card property MAY contain the optional Card object of this group.

{ "name": "The Doe family", "uid": "urn:uuid:ab4310aa-fa43-11e9-8f0b-362b9e155667", "members":{ "urn:uuid:03a0e51f-d1aa-4385-8a53-e29025acd8af": true, "urn:uuid:b8767877-b4a1-4c70-9acc-505d3819e519": true }, "card": { "fullName":{ "value": "The Doe family" }, "uid": "urn:uuid:ab4310aa-fa43-11e9-8f0b-362b9e155667", "photos":{ "a-photo":{ "href": "http://www.example.com/pub/photos/jqpublic.gif" } } } }

Figure 16: card member of CardGroup object

Loffredo & Stepanek Expires January 13, 2022 [Page 23] Internet-Draft jscontact-vcard July 2021

2.8.5. RELATED

All the RELATED instances are converted into the "relatedTo" map (Figure 17): an entry for each entity the entity described by the Card is associated with. The map keys are the "uid" values of the associated cards.

Each map value is a "Relation" object including only the "relation" member represented as a set of the RELATED-specific values of the TYPE parameter as defined in Section 6.6.6 of [RFC6350].

If the relation type is unspecified, the "relation" member MUST be empty.

BEGIN:VCARD VERSION:4.0 ... RELATED;TYPE=friend:urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6 RELATED;TYPE=contact:http://example.com/directory/jdoe.vcf RELATED;VALUE=text:Please contact my assistant Jane Doe for any inquiries. ... END:VCARD

{ ... "relatedTo":{ { "urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6":{ "relation":{ "friend": true } } }, { "http://example.com/directory/jdoe.vcf":{ "relation":{ "contact": true } } }, { "Please contact my assistant Jane Doe for any inquiries.":{ "relation":{ } } } }, ... }

Figure 17: RELATED mapping example

Loffredo & Stepanek Expires January 13, 2022 [Page 24] Internet-Draft jscontact-vcard July 2021

2.8.6. CONTACT-URI

A CONTACT-URI property as defined in [RFC8605] is represented as an entry of the "online" map (Figure 18). The entry value is a "Resource" object whose "type" member is set to "uri", the "label" member is set to "contact-uri" and the "resource" member is the CONTACT-URI value.

The PREF and TYPE parameters are mapped according to the rules as defined in (Section 2.1).

BEGIN:VCARD VERSION:4.0 ... CONTACT-URI;PREF=1:mailto:[email protected] ... END:VCARD

{ ... "online":{ ... "a-contact-uri":{ "type": "uri", "label": "contact-uri", "resource": "mailto:[email protected]", "pref": 1 }, ... }, ... }

Figure 18: CONTACT-URI mapping example

2.9. Personal Information Properties

The LEVEL parameter as defined in [RFC6715] is directly mapped to the "level" property of the "PersonalInformation" type apart from when LEVEL is used in the EXPERTISE property; in this case, the values are converted as in the following:

o "beginner" is converted into "low"; o "average" is converted into "medium"; o "expert" is converted into "high".

Loffredo & Stepanek Expires January 13, 2022 [Page 25] Internet-Draft jscontact-vcard July 2021

2.9.1. EXPERTISE

An EXPERTISE property as defined in [RFC6715] is represented as a "PersonalInformation" object in the "personalInfo" map (Figure 19). The "type" member is set to "expertise".

The INDEX parameter is represented as the index of the expertise among the declared expertises.

BEGIN:VCARD VERSION:4.0 ... EXPERTISE;LEVEL=beginner;INDEX=2:chinese literature EXPERTISE;INDEX=1;LEVEL=expert:chemistry ... END:VCARD

{ ... "personalInfo":{ ... "PERSINFO-1" : { "type": "expertise", "value": "chemistry", "level": "high" }, "PERSINFO-2" : { "type": "expertise", "value": "chinese literature", "level": "low" }, ... }, ... }

Figure 19: EXPERTISE mapping example

2.9.2. HOBBY

A HOBBY property as defined in [RFC6715] is represented as a "PersonalInformation" object in the "personalInfo" map (Figure 20). The "type" member is set to "hobby".

The INDEX parameter is represented as the index of the hobby among the declared hobbies.

Loffredo & Stepanek Expires January 13, 2022 [Page 26] Internet-Draft jscontact-vcard July 2021

BEGIN:VCARD VERSION:4.0 ... HOBBY;INDEX=1;LEVEL=high:reading HOBBY;INDEX=2;LEVEL=high:sewing ... END:VCARD

{ ... "personalInfo":{ ... "PERSINFO-1" : { "type": "hobby", "value": "reading", "level": "high" }, "PERSINFO-2" : { "type": "hobby", "value": "sewing", "level": "high" }, ... }, ... }

Figure 20: HOBBY mapping example

2.9.3. INTEREST

An INTEREST property as defined in [RFC6715] is represented as a "PersonalInformation" object in the "personalInfo" map (Figure 21). The "type" member is set to "interest".

The INDEX parameter is represented as the index of the interest among the declared interests.

Loffredo & Stepanek Expires January 13, 2022 [Page 27] Internet-Draft jscontact-vcard July 2021

BEGIN:VCARD VERSION:4.0 ... INTEREST;INDEX=1;LEVEL=medium:r&b music INTEREST;INDEX=2;LEVEL=high:rock ’n’ roll music ... END:VCARD

{ ... "personalInfo":{ ... "PERSINFO-1" : { "type": "interest", "value": "r&b music", "level": "medium" }, "PERSINFO-2" : { "type": "interest", "value": "rock ’n’ roll music", "level": "high" }, ... }, ... }

Figure 21: INTEREST mapping example

2.9.4. ORG-DIRECTORY

An ORG-DIRECTORY property is represented as an entry of the "online" map (Figure 22). The entry value is a "Resource" object whose "type" member is set to "uri", the "label" member is set to "org-directory" and the "resource" member is the ORG-DIRECTORY value.

The PREF and TYPE parameters are mapped according to the rules as defined in (Section 2.1).

The INDEX parameter is represented as the index of the directory among the online resources with the "org-directory" label.

Loffredo & Stepanek Expires January 13, 2022 [Page 28] Internet-Draft jscontact-vcard July 2021

BEGIN:VCARD VERSION:4.0 ... ORG-DIRECTORY;INDEX=1:http://directory.mycompany.example.com ORG-DIRECTORY;PREF=1:ldap://ldap.tech.example/o=Example%20Tech,ou=Engineering ... END:VCARD

{ ... "online":{ ... "an-org-directory":{ "type": "uri", "label": "org-directory", "resource": "http://directory.mycompany.example.com" }, "another-org-directory":{ "type": "uri", "label": "org-directory", "resource": "ldap://ldap.tech.example/o=Example%20Tech,ou=Engineering", "pref": 1 }, ... }, ... }

Figure 22: ORG-DIRECTORY mapping example

2.10. Explanatory Properties

2.10.1. CATEGORIES

A CATEGORIES property is converted into a set of entries of the "categories" map (Figure 23). The keys are the comma-separated text values of the CATEGORIES property.

In this case, the PREF parameter has not a JSContact counterpart; however, implementers MAY use a map preserving the order of insertion and the map entries can be inserted by order of preference.

Loffredo & Stepanek Expires January 13, 2022 [Page 29] Internet-Draft jscontact-vcard July 2021

BEGIN:VCARD VERSION:4.0 ... CATEGORIES:INTERNET,IETF,INDUSTRY,INFORMATION TECHNOLOGY ... END:VCARD

{ ... "categories":{ "INTERNET": true, "IETF": true, "INDUSTRY": true, "INFORMATION TECHNOLOGY": true }, ... }

Figure 23: CATEGORIES mapping example

2.10.2. NOTE

A NOTE property is mapped to the "notes" property (Figure 24). All the NOTE instances are condensed into a single note and separated by newline.

The ALTID and LANGUAGE parameters are mapped according to the rules as defined in (Section 2.1). The "localizations" map includes possible language-dependent alternatives.

BEGIN:VCARD VERSION:4.0 ... NOTE:This fax number is operational 0800 to 1715 EST\, Mon-Fri. ... END:VCARD

{ ... "notes": { "value": "This fax number is operational 0800 to 1715 EST, Mon-Fri." }, ... }

Figure 24: NOTE mapping example

Loffredo & Stepanek Expires January 13, 2022 [Page 30] Internet-Draft jscontact-vcard July 2021

2.10.3. PRODID

The PRODID property is converted into the "prodId" member (Figure 25).

BEGIN:VCARD VERSION:4.0 ... PRODID:-//ONLINE DIRECTORY//NONSGML Version 1//EN ... END:VCARD

{ ... "prodId": "-//ONLINE DIRECTORY//NONSGML Version 1//EN", ... }

Figure 25: PRODID mapping example

2.10.4. REV

The REV property is transformed into the "updated" member (Figure 26).

BEGIN:VCARD VERSION:4.0 ... REV:19951031T222710Z ... END:VCARD

{ ... "updated": "1995-10-31T22:27:10Z", ... }

Figure 26: REV mapping example

2.10.5. SOUND

A SOUND property is represented as an entry of the "online" map (Figure 27). The entry value is a "Resource" object whose "type" member is set to "uri", the "label" member is set to "sound" and the "resource" member is the SOUND value.

Loffredo & Stepanek Expires January 13, 2022 [Page 31] Internet-Draft jscontact-vcard July 2021

The PREF and TYPE parameters are mapped according to the rules as defined in (Section 2.1).

BEGIN:VCARD VERSION:4.0 ... SOUND:CID:[email protected] ... END:VCARD

{ ... "online":{ ... "a-sound":{ "type": "uri", "label": "sound", "resource": "CID:[email protected]" }, ... }, ... }

Figure 27: SOUND mapping example

2.10.6. UID

The UID property corresponds to the "uid" property (Figure 28) in both Card and CardGroup.

BEGIN:VCARD VERSION:4.0 ... UID:urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6 ... END:VCARD

{ ... "uid": "urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6", ... }

Figure 28: UID mapping example

Loffredo & Stepanek Expires January 13, 2022 [Page 32] Internet-Draft jscontact-vcard July 2021

2.10.7. CLIENTPIDMAP and PID Parameter

The CLIENTPIDMAP property and the PDI parameter don’t have a direct match with a Card feature.

2.10.8. URL

An URL property is represented as an entry of the "online" map (Figure 29). The entry value is a "Resource" object whose "type" member is set to "uri", the "label" member is set to "url" and the "resource" member is the URL value.

The PREF and TYPE parameters are mapped according to the rules as defined in (Section 2.1).

BEGIN:VCARD VERSION:4.0 ... URL:http://example.org/restaurant.french/˜chezchic.html ... END:VCARD

{ ... "online":{ ... "an-url":{ "type": "uri", "label": "url", "resource": "http://example.org/restaurant.french/˜chezchic.html" }, ... }, ... }

Figure 29: URL mapping example

2.10.9. VERSION

The VERSION property doesn’t have a direct match with a JSContact feature.

2.11. Security Properties

Loffredo & Stepanek Expires January 13, 2022 [Page 33] Internet-Draft jscontact-vcard July 2021

2.11.1. KEY

A KEY property is represented as an entry of the "online" map (Figure 30). The entry value is a "Resource" object whose "type" member is set to "uri", the "label" member is set to "key" and the "resource" member is the KEY value.

The PREF and TYPE parameters are mapped according to the rules as defined in (Section 2.1).

BEGIN:VCARD VERSION:4.0 ... KEY:http://www.example.com/keys/jdoe.cer ... END:VCARD

{ ... "online":{ ... "a-key":{ "type": "uri", "label": "key", "resource": "http://www.example.com/keys/jdoe.cer" }, ... }, ... }

Figure 30: KEY mapping example

2.12. Calendar Properties

2.12.1. FBURL

An FBURL property is represented as an entry of the "online" map (Figure 31). The entry value is a "Resource" object whose "type" member is set to "uri", the "label" member is set to "fburl" and the "resource" member is the FBURL value.

The PREF and TYPE parameters are mapped according to the rules as defined in (Section 2.1).

Loffredo & Stepanek Expires January 13, 2022 [Page 34] Internet-Draft jscontact-vcard July 2021

BEGIN:VCARD VERSION:4.0 ... FBURL;PREF=1:http://www.example.com/busy/janedoe FBURL;MEDIATYPE=text/calendar:ftp://example.com/busy/project-a.ifb ... END:VCARD

{ ... "online":{ ... "an-fburl":{ "type": "uri", "label": "fburl", "resource": "http://www.example.com/busy/janedoe", "pref": 1 }, "another-fburl":{ "type": "uri", "label": "fburl", "resource": "ftp://example.com/busy/project-a.ifb", "mediaType": "text/calendar" }, ... }, ... }

Figure 31: FBURL mapping example

2.12.2. CALADRURI

A CALADRURI property is represented as an entry of the "online" map (Figure 32). The entry value is a "Resource" object whose "type" member is set to "uri", the "label" member is set to "caladruri" and the "resource" member is the CALADRURI value.

The PREF and TYPE parameters are mapped according to the rules as defined in (Section 2.1).

Loffredo & Stepanek Expires January 13, 2022 [Page 35] Internet-Draft jscontact-vcard July 2021

BEGIN:VCARD VERSION:4.0 ... CALADRURI;PREF=1:mailto:[email protected] CALADRURI:http://example.com/calendar/jdoe ... END:VCARD

{ ... "online":{ ... "a-caladruri":{ "type": "uri", "label": "caladruri", "resource": "mailto:[email protected]", "pref": 1 }, "another-caladruri":{ "type": "uri", "label": "caladruri", "resource": "http://example.com/calendar/jdoe" }, ... }, ... }

Figure 32: CALADRURI mapping example

2.12.3. CALURI

A CALURI property is represented as an entry of the "online" map (Figure 33). The entry value is a "Resource" object whose "type" member is set to "uri", the "label" member is set to "caluri" and the "resource" member is the CALURI value.

The PREF and TYPE parameters are mapped according to the rules as defined in (Section 2.1).

Loffredo & Stepanek Expires January 13, 2022 [Page 36] Internet-Draft jscontact-vcard July 2021

BEGIN:VCARD VERSION:4.0 ... CALURI;PREF=1:http://cal.example.com/calA CALURI;MEDIATYPE=text/calendar:ftp://ftp.example.com/calA.ics ... END:VCARD

{ ... "online":{ ... "a-caluri":{ "type": "uri", "label": "caluri", "resource": "http://cal.example.com/calA", "pref": 1 }, "another-caluri":{ "type": "uri", "label": "caluri", "resource": "ftp://ftp.example.com/calA.ics", "mediaType": "text/calendar" }, ... }, ... }

Figure 33: CALURI mapping example

2.13. vCard Unmatched Properties

The unmatched vCard properties MAY be converted into JSContact properties whose name contains the prefix "ietf.org/RFC6350/" followed by property name in uppercase (i.e. ietf.org/RFC6350/ GENDER").

2.14. Card Required Properties

While converting a vCard into a Card/CardGroup, only the topmost "uid" member is mandatory. Implementers are REQUIRED to set it when it is missing.

Loffredo & Stepanek Expires January 13, 2022 [Page 37] Internet-Draft jscontact-vcard July 2021

3. Translating JSContact properties to vCard

In most of the cases, the rules about the translation from Card/ CardGroup to vCard can be derived by reversing the rules presented in Section 2. The remaining cases are treated in the following of this section.

3.1. Id

Where a map key is of type Id, implementers are free to either ignore it or preserve it as a vCard information (e.g. a vCard parameter).

3.2. Localizations

A LocalizedString object is converted in multiple instances of the same vCard property having different values of the LANGUAGE parameter. Implementers MAY set the ALTID parameter to couple language-based alternatives of the same value.

Note also that the components of some vCard values and their related alternatives are split into different JSContact values. For example, the "name" and "units" values for a given language must be grouped to make a single ORG value where components are separated by ";".

3.3. Date and Time Representations

The JSContact spec defines the "UTCDateTime" type to represent [RFC3339] "date-time" format with further restrictions. This means that the matched vCard format for a "UTCDateTime" value MUST be one of the formats shown in Section 4.3.5 of [RFC6350] (i.e. "19961022T140000Z").

In addition to such format, the "date" member of the "Anniversary" type allows specifying both a date without the time and a partial date. In this case, the corresponding vCard format is that defined in Section 4.3.1.

3.4. Time Zone

The time zone name as represented by the "timeZone" property is mapped to the TZ parameter.

Implementers MAY map an "Etc/GMT" time zone either preserving the time zone name or converting it into a UTC offset.

Loffredo & Stepanek Expires January 13, 2022 [Page 38] Internet-Draft jscontact-vcard July 2021

3.5. JSContact Types Matching Multiple vCard Properties

3.5.1. Title

The "titles" property contains information about the job, the position or the role of the entity the card represents. In vCard, such information is split into the TITLE and ROLE properties. This specification defines TITLE as the default target property when converting the "titles" property.

3.5.2. Resource

The "online" property includes resources that are usually represented through different vCard properties. The matched vCard property of a "Resource" object can be derived from the value of its "label" member.

Any resource included in the "online" map that doesn’t match a vCard property MAY be converted into vCard extended properties.

3.6. CardGroup

A CardGroup object is converted into a vCard by merging its properties with the properties of "CardGroup.card" object. If the "CardGroup.card.fullName" property exists, it MUST be used to set the FN value.

3.7. Card Unmatched Properties

Both the "preferredContactMethod" and "created" members don’t match any vCard property. Implementers MAY represent them as vCard extended properties.

3.8. vCard Required Properties

While converting a Card/CardGroup into a vCard, only the FN property is required. Since both the "Card.fullName" and "CardGroup.name" properties are optional, implementers are REQUIRED to generate an FN value when it is missing.

4. IANA Considerations

This document has no actions for IANA.

Loffredo & Stepanek Expires January 13, 2022 [Page 39] Internet-Draft jscontact-vcard July 2021

5. Implementation Status

NOTE: Please remove this section and the reference to RFC 7942 prior to publication as an RFC.

This section records the status of known implementations of the protocol as defined in this specification at the time of posting of this Internet-Draft, and is based on a proposal described in [RFC7942]. The description of implementations in this section is intended to assist the IETF in its decision processes in progressing drafts to RFCs. Please note that the listing of any individual implementation here does not imply endorsement by the IETF. Furthermore, no effort has been spent to verify the information presented here that was supplied by IETF contributors. This is not intended as, and must not be construed to be, a catalog of available implementations or their features. Readers are advised to note that other implementations may exist.

According to RFC 7942, "this will allow reviewers and working groups to assign due considerationto documents that have the benefit of running code, which may serve as evidence of valuable experimentation and feedback that have made the implemented protocols more mature. It is up to the individual working groups to use this information as they see fit".

5.1. CNR

Responsible Organization: National Research Council (CNR) of Italy Location: https://github.com/consiglionazionaledellericerche/ jscontact-tools Description: This implementation includes tools for JSContact creation, validation, serialization/deserialization, and conversion from vCard, xCard and jCard. Level of Maturity: This is an "alpha" test implementation. Coverage: This implementation includes all of the features described in this specification. Contact Information: Mario Loffredo, [email protected]

6. Security Considerations

This document doesn’t present any security consideration.

7. References

Loffredo & Stepanek Expires January 13, 2022 [Page 40] Internet-Draft jscontact-vcard July 2021

7.1. Normative References

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, .

[RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002, .

[RFC6350] Perreault, S., "vCard Format Specification", RFC 6350, DOI 10.17487/RFC6350, August 2011, .

[RFC6473] Saint-Andre, P., "vCard KIND:application", RFC 6473, DOI 10.17487/RFC6473, December 2011, .

[RFC6474] Li, K. and B. Leiba, "vCard Format Extensions: Place of Birth, Place and Date of Death", RFC 6474, DOI 10.17487/RFC6474, December 2011, .

[RFC6715] Cauchie, D., Leiba, B., and K. Li, "vCard Format Extensions: Representing vCard Extensions Defined by the Open Mobile Alliance (OMA) Converged Address Book (CAB) Group", RFC 6715, DOI 10.17487/RFC6715, August 2012, .

[RFC6869] Salgueiro, G., Clarke, J., and P. Saint-Andre, "vCard KIND:device", RFC 6869, DOI 10.17487/RFC6869, February 2013, .

[RFC7095] Kewisch, P., "jCard: The JSON Format for vCard", RFC 7095, DOI 10.17487/RFC7095, January 2014, .

[RFC7942] Sheffer, Y. and A. Farrel, "Improving Awareness of Running Code: The Implementation Status Section", BCP 205, RFC 7942, DOI 10.17487/RFC7942, July 2016, .

[RFC8605] Hollenbeck, S. and R. Carney, "vCard Format Extensions: ICANN Extensions for the Registration Data Access Protocol (RDAP)", RFC 8605, DOI 10.17487/RFC8605, May 2019, .

Loffredo & Stepanek Expires January 13, 2022 [Page 41] Internet-Draft jscontact-vcard July 2021

7.2. Informative References

[draft-ietf-jmap-jscontact] "JSContact: A JSON representation of contact data", .

[time-zones] "Time Zone Database", .

[uri-schemes] "Uniform Resource Identifier (URI) Schemes", .

Authors’ Addresses

Mario Loffredo IIT-CNR/Registro.it Via Moruzzi,1 Pisa 56124 IT

Email: [email protected] URI: http://www.iit.cnr.it

Robert Stepanek FastMail PO Box 234, Collins St West Melbourne VIC 8007 AU

Email: [email protected] URI: https://www.fastmail.com

Loffredo & Stepanek Expires January 13, 2022 [Page 42] JMAP N.M. Jenkins, Ed. Internet-Draft Fastmail Intended status: Standards Track 16 December 2020 Expires: 19 June 2021

JMAP Sharing draft-jenkins-jmap-sharing-00

Abstract

This document specifies a data model for sharing data between users using JMAP.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on 19 June 2021.

Copyright Notice

Copyright (c) 2020 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/ license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

Table of Contents

1. Introduction ...... 2

Jenkins Expires 19 June 2021 [Page 1] Internet-Draft JMAP Sharing December 2020

1.1. Notational Conventions ...... 3 1.2. Terminology ...... 3 1.3. Data Model Overview ...... 3 1.4. Subscriptions ...... 3 1.5. Addition to the Capabilities Object ...... 4 1.5.1. urn:ietf:params:jmap:principals ...... 4 1.5.2. urn:ietf:params:jmap:principals:owner ...... 5 2. Principals ...... 5 2.1. Principal/get ...... 6 2.2. Principal/changes ...... 6 2.3. Principal/set ...... 6 2.4. Principal/query ...... 7 2.4.1. Filtering ...... 7 2.5. Principal/queryChanges ...... 7 3. Share Notifications ...... 7 3.1. Auto-deletion of Notifications ...... 8 3.2. Object Properties ...... 8 3.3. ShareNotification/get ...... 9 3.4. ShareNotification/changes ...... 9 3.5. ShareNotification/set ...... 9 3.6. ShareNotification/query ...... 9 3.6.1. Filtering ...... 9 3.6.2. Sorting ...... 9 3.7. ShareNotification/queryChanges ...... 9 3.8. Framework for shared data ...... 10 4. Security Considerations ...... 10 5. IANA Considerations ...... 10 5.1. JMAP Capability Registration for "principals" ...... 10 5.2. JMAP Capability Registration for "principals:owner" . . . 10 6. Normative References ...... 11 Author’s Address ...... 11

1. Introduction

JMAP ([RFC8620] - JSON Meta Application Protocol) is a generic protocol for synchronizing data, such as mail, calendars or contacts, between a client and a server. It is optimized for mobile and web environments, and aims to provide a consistent interface to different data types.

This specification defines a data model to represent entities in a collaborative environment and a framework for sharing data between them that can be used to provide a consistent sharing model for different data types. It does not define _what_ may be shared, or the granularity of permissions, as this will depend on the data in question.

Jenkins Expires 19 June 2021 [Page 2] Internet-Draft JMAP Sharing December 2020

1.1. Notational Conventions

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

Type signatures, examples, and property descriptions in this document follow the conventions established in Section 1.1 of [RFC8620]. Data types defined in the core specification are also used in this document.

1.2. Terminology

The same terminology is used in this document as in the core JMAP specification, see [RFC8620], Section 1.6.

The terms Principal, and ShareNotification (with these specific capitalizations) are used to refer to the data types defined in this document and instances of those data types.

1.3. Data Model Overview

A Principal (see Section XXX) represents an individual, team or resource (e.g., a room or projector). The object contains information about the entity being represented, such as a name, description and time zone. It may also hold domain-specific information. A Principal may be associated with zero or more Accounts (see [RFC8620], Section 1.6.2) containing data belonging to the principal. Managing the set of principals within a system is out of scope for this specification, as it is highly domain specific.

Data types may allow users to share data with others by assigning permissions to principals. When a user’s permissions are changed, a ShareNotification object is created for them so a client can inform the user of the changes.

1.4. Subscriptions

Permissions determine whether a user _may_ access data, but not whether they _want_ to. Some shared data is of equal importance as the user’s own, while other data is just there should the user wish to explicitly go find it. Clients will often want to differentiate the two; for example, a company may share mailing list archives for all departments with all employees, but a user may only generally be interested in the few they belong to. They would have _permission_ to access many mailboxes, but can _subscribe_ to just the ones they

Jenkins Expires 19 June 2021 [Page 3] Internet-Draft JMAP Sharing December 2020

care about. The client would provide separate interfaces for reading mail in subscribed mailboxes and browsing all mailboxes they have permission to access in order to manage their subscriptions.

The JMAP Session object (see [RFC8620], Section 2) typically includes an object in the "accounts" property for every account that the user has access to. Collaborative systems may share data between a very large number of Principals, most of which the user does not care about day-to-day. The Session object MUST only include Accounts where either the user is subscribed to at least one record (see [RFC8620], Section 1.6.3) in the account, or the account belongs to the user. StateChange events for changes to data SHOULD only be sent for data the user has subscribed to and MUST NOT be sent for any Account where the user is not subscribed to any records in the account, except where that account belongs to the user.

The server MAY reject the user’s attempt to subscribe to some resources even if they have permission to access them, e.g., a calendar representing a location.

A user may query the set of Principals they have access to with "Principal/query" (see Section XXX). The Principal object may then provide Account objects if the user has permission to access data for that principal, even if they are not yet subscribed.

1.5. Addition to the Capabilities Object

The capabilities object is returned as part of the JMAP Session object; see [RFC8620], Section 2. This document defines two additional capability URIs.

1.5.1. urn:ietf:params:jmap:principals

Represents support for the Principal and ShareNotification data types and associated API methods.

The value of this property in the JMAP Session capabilities property is an empty object.

The value of this property in an account’s accountCapabilities property is an object that MUST contain the following information on server capabilities and permissions for that account:

* *currentUserPrincipalId*: "Id|null" The id of the principal in this account that corresponds to the user fetching this object, if any.

Jenkins Expires 19 June 2021 [Page 4] Internet-Draft JMAP Sharing December 2020

1.5.2. urn:ietf:params:jmap:principals:owner

This URI is solely used as a key in an account’s accountCapabilities property; it does not appear in the JMAP Session capabilities. Support is implied by the "urn:ietf:params:jmap:principals" session capability.

If present, the account (and data therein) is owned by a principal. Some accounts may not be owned by a principal (e.g., the account that contains the data for the principals themselves), in which case this property is omitted.

The value of this property is an object with the following properties:

* *accountIdForPrincipal*: "Id" The id of an account with the "urn:ietf:params:jmap:principals" capability that contains the corresponding Principal object.

* *principalId*: "Id" The id of the principal that owns this account.

2. Principals

A Principal represents an individual, group, location (e.g. a room), resource (e.g. a projector) or other entity in a collaborative environment. Sharing in JMAP is generally configured by assigning rights to certain data within an account to other principals, for example a user may assign permission to read their calendar to a principal representing another user, or their team.

In a shared environment such as a workplace, a user may have access to a large number of principals.

In most systems the user will have access to a single Account containing Principal objects, but they may have access to multiple if, for example, aggregating data from different places.

A *Principal* object has the following properties:

* *id*: "Id" The id of the principal.

* *type*: "String" This MUST be one of the following values:

- "individual": This represents a single person.

- "group": This represents a group of people.

Jenkins Expires 19 June 2021 [Page 5] Internet-Draft JMAP Sharing December 2020

- "resource": This represents some resource, e.g. a projector.

- "location": This represents a location.

- "other": This represents some other undefined principal.

* *name*: "String" The name of the principal, e.g. "Jane Doe", or "Room 4B".

* *description*: "String|null" A longer description of the principal, for example details about the facilities of a resource, or null if no description available.

* *email*: "String|null" An email address for the principal, or null if no email is available.

* *timeZone*: "String|null" The time zone for this principal, if known. If not null, the value MUST be a time zone id from the IANA Time Zone Database TZDB (https://www.iana.org/time-zones).

* *capabilities*: "String[Object]" A map of JMAP capability URIs to domain specific information about the principal in relation to that capability, as defined in the document that registered the capability.

2.1. Principal/get

This is a standard "/get" method as described in [RFC8620], Section 5.1.

2.2. Principal/changes

This is a standard "/changes" method as described in [RFC8620], Section 5.2.

2.3. Principal/set

This is a standard "/set" method as described in [RFC8620], Section 5.3.

Users SHOULD be allowed to update the "name", "description" and "timeZone" properties of the Principal with the same id as the "currentUserPrincipalId" in the Account capabilities.

However, the server may, and probably will, reject any change with a "forbidden" SetError. Managing principals is likely tied to a directory service or some other vendor-specific solution, and may occur out-of-band, or via an additional capability defined elsewhere.

Jenkins Expires 19 June 2021 [Page 6] Internet-Draft JMAP Sharing December 2020

2.4. Principal/query

This is a standard "/query" method as described in [RFC8620], Section 5.5

2.4.1. Filtering

A *FilterCondition* object has the following properties:

* *accountIds*: "String[]" A list of account ids. The Principal matches if the value for its accountId property is in this list.

* *email*: "String" Looks for the text in the email property.

* *name*: "String" Looks for the text in the name property.

* *text* "String" Looks for the text in the name, email, and description properties.

* *type*: "String" The type must be exactly as given to match the condition.

* *timeZone*: "String" The timeZone must be exactly as given to match the condition.

All conditions in the FilterCondition object must match for the Principal to match.

2.5. Principal/queryChanges

This is a standard "/queryChanges" method as described in [RFC8620], Section 5.6.

3. Share Notifications

The ShareNotification data type records when the user’s permissions to access a shared object changes. ShareNotification are only created by the server; users cannot create them explicitly. Notifications are stored in the same Account as the Principals.

Clients SHOULD present the list of notifications to the user and allow them to dismiss them. To dismiss a notification you use a standard "/set" call to destroy it.

The server SHOULD create a ShareNotification whenever the user’s permissions change on an object. It SHOULD NOT create a notification for permission changes to a group principal, even if the user is in the group.

Jenkins Expires 19 June 2021 [Page 7] Internet-Draft JMAP Sharing December 2020

3.1. Auto-deletion of Notifications

The server MAY limit the maximum number of notifications it will store for a user. When the limit is reached, any new notification will cause the previously oldest notification to be automatically deleted.

The server MAY coalesce notifications if appropriate, or remove notifications that it deems are no longer relevant or after a certain period of time. The server SHOULD automatically destroy a notification about an object if the user subscribes to that object.

3.2. Object Properties

The *ShareNotification* object has the following properties:

* *id*: "String" The id of the ShareNotification.

* *created*: "UTCDate" The time this notification was created.

* *changedBy*: "Person" Who made the change.

- *name*: "String" The name of the person who made the change.

- *email*: "String|null" The email of the person who made the change, or null if no email is available.

- *principalId*: "String|null" The id of the Principal corresponding to the person who made the change, or null if no associated principal.

* *objectType*: "String" The name of the data type for the object whose permissions have changed, e.g. "Calendar" or "Mailbox".

* *objectAccountId*: "String" The id of the account where this object exists.

* *objectId*: "String" The id of the object that this notification is about.

* *name*: "String" The name of the object at the time the notification was made.

* *oldRights*: "Object|null" The "myRights" property of the object for the user before the change.

* *newRights*: "Object|null" The "myRights" property of the object for the user after the change.

Jenkins Expires 19 June 2021 [Page 8] Internet-Draft JMAP Sharing December 2020

3.3. ShareNotification/get

This is a standard "/get" method as described in [RFC8620], Section 5.1.

3.4. ShareNotification/changes

This is a standard "/changes" method as described in [RFC8620], Section 5.2.

3.5. ShareNotification/set

This is a standard "/set" method as described in [RFC8620], Section 5.3.

Only destroy is supported; any attempt to create/update MUST be rejected with a "forbidden" SetError.

3.6. ShareNotification/query

This is a standard "/query" method as described in [RFC8620], Section 5.5.

3.6.1. Filtering

A *FilterCondition* object has the following properties:

* *after*: "UTCDate|null" The creation date must be on or after this date to match the condition.

* *before*: "UTCDate|null" The creation date must be before this date to match the condition.

* *objectType*: "String" The objectType value must be identical to the given value to match the condition.

* *objectAccountId*: "String" The objectAccountId value must be identical to the given value to match the condition.

3.6.2. Sorting

The "created" property MUST be supported for sorting.

3.7. ShareNotification/queryChanges

This is a standard "/queryChanges" method as described in [RFC8620], Section 5.6.

Jenkins Expires 19 June 2021 [Page 9] Internet-Draft JMAP Sharing December 2020

3.8. Framework for shared data

Shareable data types SHOULD define the following three properties:

* *isSubscribed*: "Boolean" Has the user indicated they wish to see this data? The initial value for this when data is shared by another user is implementation dependent, although data types may give advice on appropriate defaults.

* *myRights*: "Rights" The set of permissions the user currently has. Appropriate permissions are domain specific and must be defined per data type.

* *shareWith*: "Id[Rights]" A map of principal id to rights to give that principal. The account id for the principal id can be found in the capabilities of the Account this object is in (see Section XXX). Users with appropriate permission may set this property to modify who the data is shared with. The principal that owns the account this data is in MUST NOT be in the set of sharees; their rights are implicit.

4. Security Considerations

All security considerations of JMAP [RFC8620] apply to this specification.

TODO.

5. IANA Considerations

5.1. JMAP Capability Registration for "principals"

IANA will register the "principals" JMAP Capability as follows:

Capability Name: "urn:ietf:params:jmap:principals"

Specification document: this document

Intended use: common

Change Controller: IETF

Security and privacy considerations: this document, Section XXX

5.2. JMAP Capability Registration for "principals:owner"

IANA will register the "principals:owner" JMAP Capability as follows:

Jenkins Expires 19 June 2021 [Page 10] Internet-Draft JMAP Sharing December 2020

Capability Name: "urn:ietf:params:jmap:principals:owner"

Specification document: this document

Intended use: common

Change Controller: IETF

Security and privacy considerations: this document, Section XXX

6. Normative References

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, .

[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, .

[RFC8620] Jenkins, N. and C. Newman, "The JSON Meta Application Protocol (JMAP)", RFC 8620, DOI 10.17487/RFC8620, July 2019, .

Author’s Address

Neil Jenkins (editor) Fastmail PO Box 234, Collins St West Melbourne VIC 8007 Australia

Email: [email protected] URI: https://www.fastmail.com

Jenkins Expires 19 June 2021 [Page 11]