diff options
Diffstat (limited to '52.md')
| -rw-r--r-- | 52.md | 50 |
1 files changed, 30 insertions, 20 deletions
| @@ -22,20 +22,23 @@ This kind of calendar event starts on a date and ends before a different date in | |||
| 22 | 22 | ||
| 23 | The format uses a parameterized replaceable event kind `31922`. | 23 | The format uses a parameterized replaceable event kind `31922`. |
| 24 | 24 | ||
| 25 | The `.content` of these events is optional and should be a detailed description of the calendar event. | 25 | The `.content` of these events should be a detailed description of the calendar event. It is required but can be an empty string. |
| 26 | 26 | ||
| 27 | The list of tags are as follows: | 27 | The list of tags are as follows: |
| 28 | * `d` (required) universally unique identifier (UUID). Generated by the client creating the calendar event. | 28 | * `d` (required) universally unique identifier (UUID). Generated by the client creating the calendar event. |
| 29 | * `name` (required) name of the calendar event | 29 | * `title` (required) title of the calendar event |
| 30 | * `start` (required) inclusive start date in ISO 8601 format (YYYY-MM-DD). Must be less than `end`, if it exists. | 30 | * `start` (required) inclusive start date in ISO 8601 format (YYYY-MM-DD). Must be less than `end`, if it exists. |
| 31 | * `end` (optional) exclusive end date in ISO 8601 format (YYYY-MM-DD). If omitted, the calendar event ends on the same date as `start`. | 31 | * `end` (optional) exclusive end date in ISO 8601 format (YYYY-MM-DD). If omitted, the calendar event ends on the same date as `start`. |
| 32 | * `location` (optional) location of the calendar event. e.g. address, GPS coordinates, meeting room name, link to video call | 32 | * `location` (optional, repeated) location of the calendar event. e.g. address, GPS coordinates, meeting room name, link to video call |
| 33 | * `g` (optional) [geohash](https://en.wikipedia.org/wiki/Geohash) to associate calendar event with a searchable physical location | 33 | * `g` (optional) [geohash](https://en.wikipedia.org/wiki/Geohash) to associate calendar event with a searchable physical location |
| 34 | * `p` (optional, repeated) 32-bytes hex pubkey of a participant, optional recommended relay URL, and participant's role in the meeting | 34 | * `p` (optional, repeated) 32-bytes hex pubkey of a participant, optional recommended relay URL, and participant's role in the meeting |
| 35 | * `t` (optional, repeated) hashtag to categorize calendar event | 35 | * `t` (optional, repeated) hashtag to categorize calendar event |
| 36 | * `r` (optional, repeated) references / links to web pages, documents, video calls, recorded videos, etc. | 36 | * `r` (optional, repeated) references / links to web pages, documents, video calls, recorded videos, etc. |
| 37 | 37 | ||
| 38 | ```json | 38 | The following tags are deprecated: |
| 39 | * `name` name of the calendar event. Use only if `title` is not available. | ||
| 40 | |||
| 41 | ```jsonc | ||
| 39 | { | 42 | { |
| 40 | "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>, | 43 | "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>, |
| 41 | "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>, | 44 | "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>, |
| @@ -45,7 +48,7 @@ The list of tags are as follows: | |||
| 45 | "tags": [ | 48 | "tags": [ |
| 46 | ["d", "<UUID>"], | 49 | ["d", "<UUID>"], |
| 47 | 50 | ||
| 48 | ["name", "<name of calendar event>"], | 51 | ["title", "<title of calendar event>"], |
| 49 | 52 | ||
| 50 | // Dates | 53 | // Dates |
| 51 | ["start", "<YYYY-MM-DD>"], | 54 | ["start", "<YYYY-MM-DD>"], |
| @@ -78,22 +81,25 @@ This kind of calendar event spans between a start time and end time. | |||
| 78 | 81 | ||
| 79 | The format uses a parameterized replaceable event kind `31923`. | 82 | The format uses a parameterized replaceable event kind `31923`. |
| 80 | 83 | ||
| 81 | The `.content` of these events is optional and should be a detailed description of the calendar event. | 84 | The `.content` of these events should be a detailed description of the calendar event. It is required but can be an empty string. |
| 82 | 85 | ||
| 83 | The list of tags are as follows: | 86 | The list of tags are as follows: |
| 84 | * `d` (required) universally unique identifier (UUID). Generated by the client creating the calendar event. | 87 | * `d` (required) universally unique identifier (UUID). Generated by the client creating the calendar event. |
| 85 | * `name` (required) name of the calendar event | 88 | * `title` (required) title of the calendar event |
| 86 | * `start` (required) inclusive start Unix timestamp in seconds. Must be less than `end`, if it exists. | 89 | * `start` (required) inclusive start Unix timestamp in seconds. Must be less than `end`, if it exists. |
| 87 | * `end` (optional) exclusive end Unix timestamp in seconds. If omitted, the calendar event ends instantaneously. | 90 | * `end` (optional) exclusive end Unix timestamp in seconds. If omitted, the calendar event ends instantaneously. |
| 88 | * `start_tzid` (optional) time zone of the start timestamp, as defined by the IANA Time Zone Database. e.g., `America/Costa_Rica` | 91 | * `start_tzid` (optional) time zone of the start timestamp, as defined by the IANA Time Zone Database. e.g., `America/Costa_Rica` |
| 89 | * `end_tzid` (optional) time zone of the end timestamp, as defined by the IANA Time Zone Database. e.g., `America/Costa_Rica`. If omitted and `start_tzid` is provided, the time zone of the end timestamp is the same as the start timestamp. | 92 | * `end_tzid` (optional) time zone of the end timestamp, as defined by the IANA Time Zone Database. e.g., `America/Costa_Rica`. If omitted and `start_tzid` is provided, the time zone of the end timestamp is the same as the start timestamp. |
| 90 | * `location` (optional) location of the calendar event. e.g. address, GPS coordinates, meeting room name, link to video call | 93 | * `location` (optional, repeated) location of the calendar event. e.g. address, GPS coordinates, meeting room name, link to video call |
| 91 | * `g` (optional) [geohash](https://en.wikipedia.org/wiki/Geohash) to associate calendar event with a searchable physical location | 94 | * `g` (optional) [geohash](https://en.wikipedia.org/wiki/Geohash) to associate calendar event with a searchable physical location |
| 92 | * `p` (optional, repeated) 32-bytes hex pubkey of a participant, optional recommended relay URL, and participant's role in the meeting | 95 | * `p` (optional, repeated) 32-bytes hex pubkey of a participant, optional recommended relay URL, and participant's role in the meeting |
| 93 | * `t` (optional, repeated) hashtag to categorize calendar event | 96 | * `t` (optional, repeated) hashtag to categorize calendar event |
| 94 | * `r` (optional, repeated) references / links to web pages, documents, video calls, recorded videos, etc. | 97 | * `r` (optional, repeated) references / links to web pages, documents, video calls, recorded videos, etc. |
| 95 | 98 | ||
| 96 | ```json | 99 | The following tags are deprecated: |
| 100 | * `name` name of the calendar event. Use only if `title` is not available. | ||
| 101 | |||
| 102 | ```jsonc | ||
| 97 | { | 103 | { |
| 98 | "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>, | 104 | "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>, |
| 99 | "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>, | 105 | "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>, |
| @@ -103,7 +109,7 @@ The list of tags are as follows: | |||
| 103 | "tags": [ | 109 | "tags": [ |
| 104 | ["d", "<UUID>"], | 110 | ["d", "<UUID>"], |
| 105 | 111 | ||
| 106 | ["name", "<name of calendar event>"], | 112 | ["title", "<title of calendar event>"], |
| 107 | 113 | ||
| 108 | // Timestamps | 114 | // Timestamps |
| 109 | ["start", "<Unix timestamp in seconds>"], | 115 | ["start", "<Unix timestamp in seconds>"], |
| @@ -137,15 +143,23 @@ A calendar is a collection of calendar events, represented as a custom replaceab | |||
| 137 | 143 | ||
| 138 | ### Format | 144 | ### Format |
| 139 | 145 | ||
| 146 | The `.content` of these events should be a detailed description of the calendar. It is required but can be an empty string. | ||
| 147 | |||
| 140 | The format uses a custom replaceable list of kind `31924` with a list of tags as described below: | 148 | The format uses a custom replaceable list of kind `31924` with a list of tags as described below: |
| 141 | * `d` (required) calendar name | 149 | * `d` (required) universally unique identifier. Generated by the client creating the calendar. |
| 150 | * `title` (required) calendar title | ||
| 142 | * `a` (repeated) reference tag to kind `31922` or `31923` calendar event being responded to | 151 | * `a` (repeated) reference tag to kind `31922` or `31923` calendar event being responded to |
| 143 | 152 | ||
| 144 | ```json | 153 | ```json |
| 145 | { | 154 | { |
| 155 | "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>, | ||
| 156 | "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>, | ||
| 157 | "created_at": <Unix timestamp in seconds>, | ||
| 146 | "kind": 31924, | 158 | "kind": 31924, |
| 159 | "content": "<description of calendar>", | ||
| 147 | "tags": [ | 160 | "tags": [ |
| 148 | ["d", "<calendar name>"], | 161 | ["d", "<UUID>"], |
| 162 | ["title", "<calendar title>"], | ||
| 149 | ["a", "<31922 or 31923>:<calendar event author pubkey>:<d-identifier of calendar event>", "<optional relay url>"], | 163 | ["a", "<31922 or 31923>:<calendar event author pubkey>:<d-identifier of calendar event>", "<optional relay url>"], |
| 150 | ["a", "<31922 or 31923>:<calendar event author pubkey>:<d-identifier of calendar event>", "<optional relay url>"] | 164 | ["a", "<31922 or 31923>:<calendar event author pubkey>:<d-identifier of calendar event>", "<optional relay url>"] |
| 151 | ] | 165 | ] |
| @@ -173,10 +187,8 @@ The `.content` of these events is optional and should be a free-form note that a | |||
| 173 | The list of tags are as follows: | 187 | The list of tags are as follows: |
| 174 | * `a` (required) reference tag to kind `31922` or `31923` calendar event being responded to. | 188 | * `a` (required) reference tag to kind `31922` or `31923` calendar event being responded to. |
| 175 | * `d` (required) universally unique identifier. Generated by the client creating the calendar event RSVP. | 189 | * `d` (required) universally unique identifier. Generated by the client creating the calendar event RSVP. |
| 176 | * `L` (required) label namespace of `status` per [NIP-32](32.md) | 190 | * `status` (required) `accepted`, `declined`, or `tentative`. Determines attendance status to the referenced calendar event. |
| 177 | * `l` (required) label of `accepted`, `declined`, or `tentative` under the label namespace of `status` per [NIP-32](32.md). Determines attendance status to the referenced calendar event. | 191 | * `fb` (optional) `free` or `busy`. Determines if the user would be free or busy for the duration of the calendar event. This tag must be omitted or ignored if the `status` label is set to `declined`. |
| 178 | * `L` (optional) label namespace of `freebusy` per [NIP-32](32.md). Exists if and only if corresponding `l` tag under the same label namespace exists. | ||
| 179 | * `l` (optional) label of `free` or `busy` under the label namespace of `freebusy` per [NIP-32](32.md). Determines if the user would be free or busy for the duration of the calendar event. This tag must be omitted or ignored if the `status` label is set to `declined`. Exists if and only if corresponding `l` tag under the same label namespace exists. | ||
| 180 | 192 | ||
| 181 | ```json | 193 | ```json |
| 182 | { | 194 | { |
| @@ -188,10 +200,8 @@ The list of tags are as follows: | |||
| 188 | "tags": [ | 200 | "tags": [ |
| 189 | ["a", "<31922 or 31923>:<calendar event author pubkey>:<d-identifier of calendar event>", "<optional relay url>"], | 201 | ["a", "<31922 or 31923>:<calendar event author pubkey>:<d-identifier of calendar event>", "<optional relay url>"], |
| 190 | ["d", "<UUID>"], | 202 | ["d", "<UUID>"], |
| 191 | ["L", "status"], | 203 | ["status", "<accepted/declined/tentative>"], |
| 192 | ["l", "<accepted/declined/tentative>", "status"], | 204 | ["fb", "<free/busy>"], |
| 193 | ["L", "freebusy"], | ||
| 194 | ["l", "<free/busy>", "freebusy"] | ||
| 195 | ] | 205 | ] |
| 196 | } | 206 | } |
| 197 | ``` | 207 | ``` |