Skip to content

Commit

Permalink
Split into 4 specs and add RFC-style build process.
Browse files Browse the repository at this point in the history
  • Loading branch information
neilj committed Oct 4, 2016
1 parent f349314 commit 12f352c
Show file tree
Hide file tree
Showing 35 changed files with 729 additions and 385 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

MMARK := /Users/neil/Code/Go/src/github.com/miekg/mmark/mmark/mmark -xml2 -page

rfc/build/%.xml: rfc/src/%.mdown spec/%/*
mkdir -p $(@D)
cat $< | $(MMARK) > $@

rfc/build/%.txt: rfc/build/%.xml
tclsh ~/xml2rfc-dev/xml2rfc.tcl --text `pwd`/$^ `pwd`/$@

rfc/build/%.html: rfc/build/%.xml
tclsh ~/xml2rfc-dev/xml2rfc.tcl --html `pwd`/$^ `pwd`/$@

.PHONY: build

build: rfc/build/jmap.txt rfc/build/jmap.html rfc/build/mail.txt rfc/build/mail.html rfc/build/contacts.txt rfc/build/contacts.html rfc/build/calendars.txt rfc/build/calendars.html

xml: rfc/build/jmap.xml rfc/build/mail.xml rfc/build/contacts.xml rfc/build/calendars.xml
File renamed without changes.
File renamed without changes.
38 changes: 38 additions & 0 deletions rfc/src/calendars.mdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
%%%
title = "JMAP for Calendars"
abbrev = "JMAP Calendars"
category = "std"
docName = "draft-jenkins-jmapcalendars-00"
ipr= "trust200902"
area = "Applications"
workgroup = "JMAP"
keyword = ["JMAP", "JSON", "calendars"]

date = 2016-10-04T00:00:00Z

[[author]]
initials="N.M."
surname="Jenkins"
fullname="Neil Jenkins"
role="editor"
organization = "FastMail"
[author.address]
email = "[email protected]"
uri = "https://www.fastmail.com"
[author.address.postal]
street = "Level 1, 91 William St"
city = "Melbourne"
code = "VIC 3000"
country = "Australia"
%%%

.# Abstract

This document specifies a data model for synchronising calendar data with a server using JMAP.

{mainmatter}

{{spec/calendars/intro.mdown}}
{{spec/calendars/calendar.mdown}}
{{spec/calendars/calendareventlist.mdown}}
{{spec/calendars/calendarevent.mdown}}
38 changes: 38 additions & 0 deletions rfc/src/contacts.mdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
%%%
title = "JMAP for Contacts"
abbrev = "JMAP Contacts"
category = "std"
docName = "draft-jenkins-jmapcontacts-00"
ipr= "trust200902"
area = "Applications"
workgroup = "JMAP"
keyword = ["JMAP", "JSON", "contacts"]

date = 2016-10-04T00:00:00Z

[[author]]
initials="N.M."
surname="Jenkins"
fullname="Neil Jenkins"
role="editor"
organization = "FastMail"
[author.address]
email = "[email protected]"
uri = "https://www.fastmail.com"
[author.address.postal]
street = "Level 1, 91 William St"
city = "Melbourne"
code = "VIC 3000"
country = "Australia"
%%%

.# Abstract

This document specifies a data model for synchronising address book data with a server using JMAP.

{mainmatter}

{{spec/contacts/intro.mdown}}
{{spec/contacts/contactgroup.mdown}}
{{spec/contacts/contactlist.mdown}}
{{spec/contacts/contact.mdown}}
41 changes: 41 additions & 0 deletions rfc/src/jmap.mdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
%%%
title = "JSON Meta Application Protocol"
abbrev = "JMAP"
category = "std"
docName = "draft-jenkins-jmap-00"
ipr= "trust200902"
area = "Applications"
workgroup = "JMAP"
keyword = ["JMAP", "JSON"]

date = 2016-10-04T00:00:00Z

[[author]]
initials="N.M."
surname="Jenkins"
fullname="Neil Jenkins"
role="editor"
organization = "FastMail"
[author.address]
email = "[email protected]"
uri = "https://www.fastmail.com"
[author.address.postal]
street = "Level 1, 91 William St"
city = "Melbourne"
code = "VIC 3000"
country = "Australia"
%%%

.# Abstract

This document specifies a protocol for synchronising JSON-based data objects efficiently, with support for push and out-of-band binary data upload/download.

{mainmatter}

{{spec/model/intro.mdown}}
{{spec/model/authentication.mdown}}
{{spec/model/api.mdown}}
{{spec/model/download.mdown}}
{{spec/model/upload.mdown}}
{{spec/model/push.mdown}}
{{spec/model/account.mdown}}
42 changes: 42 additions & 0 deletions rfc/src/mail.mdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
%%%
title = "JMAP for Mail"
abbrev = "JMAP Mail"
category = "std"
docName = "draft-jenkins-jmapmail-00"
ipr= "trust200902"
area = "Applications"
workgroup = "JMAP"
keyword = ["JMAP", "JSON", "email"]

date = 2016-10-04T00:00:00Z

[[author]]
initials="N.M."
surname="Jenkins"
fullname="Neil Jenkins"
role="editor"
organization = "FastMail"
[author.address]
email = "[email protected]"
uri = "https://www.fastmail.com"
[author.address.postal]
street = "Level 1, 91 William St"
city = "Melbourne"
code = "VIC 3000"
country = "Australia"
%%%

.# Abstract

This document specifies a data model for synchronising email data with a server using JMAP.

{mainmatter}

{{spec/mail/intro.mdown}}
{{spec/mail/mailbox.mdown}}
{{spec/mail/messagelist.mdown}}
{{spec/mail/thread.mdown}}
{{spec/mail/message.mdown}}
{{spec/mail/identity.mdown}}
{{spec/mail/searchsnippet.mdown}}
{{spec/mail/vacationresponse.mdown}}
File renamed without changes.
File renamed without changes.
108 changes: 0 additions & 108 deletions spec/account.mdwn

This file was deleted.

File renamed without changes.
23 changes: 15 additions & 8 deletions spec/calendarevent.mdwn → spec/calendars/calendarevent.mdown
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Calendar Events

A CalendarEvent contains information about an event, or recurring series of events, that takes place at a particular time. The object is designed to be easily convertible to/from iCalendar format ([RFC 5545](https://tools.ietf.org/html/rfc5545)) for compatibility with existing calendaring systems.
A CalendarEvent contains information about an event, or recurring series of events, that takes place at a particular time. The object is designed to be easily convertible to/from iCalendar format ([@!RFC5545]) for compatibility with existing calendaring systems.

A **CalendarEvent** object has the following properties:

Expand All @@ -13,8 +13,15 @@ A **CalendarEvent** object has the following properties:
- **uid**: `String`
The UID from iCalendar. Used to associate the event as the same across different systems, calendars and views.

- **relatedTo**: `String[]|null`
A list of UIDs that are part of the same series as this event. For example, if an event is split to make a "this and future" change to a recurrence, each new event should include the other's uid in its *relatedTo* property. Clients can then follow these UIDs to get the complete set of events if the user wishes to modify them all at once. Maps to the RELATED-TO field in iCalendar.
- **relatedTo**: `String[String]|null`
A map of relation-type to UID of the related event. Specified relation types are:

- `first`: The first event in a series.
- `next`: The next event in a series.

If an event is split to make a "this and future" change to a recurrence, the original event should be truncated to end at the previous occurrence before this split, and a new event created to represent all the events after the split.

A `next` *relatedTo* property SHOULD be set on the original event with the UID of the new event. A `first` *relatedTo* property with the UID of the first event in the series SHOULD be set on the new event. Clients can then follow these UIDs to get the complete set of events if the user wishes to modify them all at once. Maps to the RELATED-TO field in iCalendar.

- **prodId**: `String|null`
The identifier for the product that created the Event object. The vendor of the implementation SHOULD ensure that this is a globally unique identifier.
Expand Down Expand Up @@ -57,10 +64,10 @@ A **CalendarEvent** object has the following properties:
Extra metadata stored by a client about a link. The keys are URIs, which should be owned by the client author to avoid conflicts, and the values are strings or `null`.

- **locale**: `String|null`
The [RFC5646](https://tools.ietf.org/html/rfc5646) language tag that best describes the locale used for the event, if known.
The [@!RFC5646] language tag that best describes the locale used for the event, if known.

- **localizations**: `String[PatchObject]|null`
A map of [RFC5646](https://tools.ietf.org/html/rfc5646) language tag to a patch object which localises the event into that locale.
A map of [@!RFC5646] language tag to a patch object which localises the event into that locale.

See the description of *recurrenceOverrides* for the structure of the PatchObject. The patches are applied to the top-level object. In **addition** to all the restrictions on patches specified there, the pointer also MUST NOT start with one of the following prefixes; any patch with a such a key MUST be ignored:

Expand Down Expand Up @@ -109,7 +116,7 @@ A **CalendarEvent** object has the following properties:
The country name.

- **coordinates**: `String`
An [RFC 5870](https://tools.ietf.org/html/rfc5870) `geo:` URI for the location.
An [@!RFC5870] `geo:` URI for the location.
- **uri**: `String`
A URI that represents how to connect to the event from this location. This may be a telephone number (represented as `tel:+1-555-555-555`) for a teleconference, a web address for online chat, or a custom URI for something like Skype (e.g. `skype:username`).

Expand Down Expand Up @@ -198,7 +205,7 @@ If *isAllDay* is `true`, then the following restrictions apply:

A **PatchObject** is of type `String[*|null]`, and represents an unordered set of patches to apply to the generated occurrence Event object.

The keys are a path in a subset of [RFC 6901](https://tools.ietf.org/html/rfc6901) JSON pointer format, with an implicit leading `/` (i.e. prefix each key with `/` before applying the JSON pointer evaluation algorithm).
The keys are a path in a subset of [@!RFC6901] JSON pointer format, with an implicit leading `/` (i.e. prefix each key with `/` before applying the JSON pointer evaluation algorithm).

A pointer MUST NOT start with one of the following prefixes; any patch with a such a key MUST be ignored:

Expand Down Expand Up @@ -240,7 +247,7 @@ If *isAllDay* is `true`, then the following restrictions apply:

The following methods are defined:

- `imip`: The organizer accepts an iMIP ([RFC 6047](https://tools.ietf.org/html/rfc6047)) response. The value MUST be a `mailto:` uri. This maps to the email address of the ORGANIZER in iCalendar.
- `imip`: The organizer accepts an iMIP ([@!RFC6047]) response. The value MUST be a `mailto:` uri. This maps to the email address of the ORGANIZER in iCalendar.
- `web`: There is a web page where the user may submit an RSVP using their browser. The value MUST be an `http:` or `https:` uri.

- **participants**: `String[Participant]|null`
Expand Down
File renamed without changes.
40 changes: 40 additions & 0 deletions spec/calendars/intro.mdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Introduction

JMAP is a generic protocol for synchronising data, such as mail, calendars or contacts, between a client and a server. It is optimised for mobile and web environments, and aims to provide a consistent interface to different data types.

This specification defines a data model for synchronising calendar data between a client and a server using JMAP.

## 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].

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 [@!RFC7159].

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.

Types signatures are given for all JSON objects in this document. The following conventions are used:

* `Boolean|String` – The value is either a JSON `Boolean` value, or a JSON `String` value.
* `Foo` – Any name that is not a native JSON type means an object for which the properties (and their types) are defined elsewhere within this document.
* `Foo[]` – An array of objects of type `Foo`.
* `String[Foo]` – A JSON `Object` being used as a map (associative array), where all the values are of type `Foo`.

## LocalDate

Where the API specifies `LocalDate` as a type, it means a string in the same format as `Date`, but with the `Z` 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).

## Terminology

The same terminology is used in this document as in the core JMAP specification.

## Extensions to the Account capabilities object

The following extra property is defined for the *capabilities* object available on each Account object:

- **calendars**: `CalendarsCapabilities|null`
If `null`, this account does not support calendars, and any use of the calendar-related methods with this account will result in an `accountNotSupportedByMethod` error. Otherwise, it will be an object describing certain capabilities of the calendars system.

A **CalendarsCapabilities** object has the following properties:

- **isReadOnly**: `Boolean`
True if the user has read-only access to the calendars in this account. The user may not use the `set`-type calendar methods with this account.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 12f352c

Please sign in to comment.