1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
//! Capability types for the JMAP Calendars extension.
//!
//! Normative reference: draft-ietf-jmap-calendars-33 §1.5.
//!
//! The Calendars extension defines three capability URIs. Each has both a
//! session-level capability (value in the JMAP Session `capabilities` map)
//! and an account-level capability (value in the account's
//! `accountCapabilities` map). Session-level values are empty objects for
//! all Calendars capabilities.
use Duration;
use UTCDate;
use ;
/// Capability URI for core JMAP Calendars support
/// (draft-ietf-jmap-calendars-33 §1.5.1).
pub const JMAP_CALENDARS_URI: &str = "urn:ietf:params:jmap:calendars";
/// Capability URI for Principal availability queries
/// (draft-ietf-jmap-calendars-33 §1.5.2).
pub const JMAP_PRINCIPALS_AVAILABILITY_URI: &str = "urn:ietf:params:jmap:principals:availability";
/// Capability URI for the CalendarEvent/parse method
/// (draft-ietf-jmap-calendars-33 §1.5.3).
pub const JMAP_CALENDARS_PARSE_URI: &str = "urn:ietf:params:jmap:calendars:parse";
/// Session-level Calendars capability (draft-ietf-jmap-calendars-33 §1.5.1).
///
/// The value of `capabilities["urn:ietf:params:jmap:calendars"]` in the JMAP
/// Session object. The spec mandates that this is an empty object `{}`.
/// Account-level Calendars capability (draft-ietf-jmap-calendars-33 §1.5.1).
///
/// The value of `accountCapabilities["urn:ietf:params:jmap:calendars"]` for a
/// given account. Describes server capabilities and account-level permissions
/// for the Calendars extension.
/// Session-level capability for the Principal availability extension
/// (draft-ietf-jmap-calendars-33 §1.5.2).
///
/// Value is an empty object `{}` at the session level.
/// Account-level capability for the Principal availability extension
/// (draft-ietf-jmap-calendars-33 §1.5.2).
/// Session-level capability for the CalendarEvent/parse method
/// (draft-ietf-jmap-calendars-33 §1.5.3).
///
/// Value is an empty object `{}` at both session and account level.
/// The value of `Principal.capabilities["urn:ietf:params:jmap:calendars"]`
/// on a JMAP Principals object (draft-ietf-jmap-calendars-33 §2.1).
///
/// This is distinct from the session-level [`CalendarsCapability`]. Where
/// [`CalendarsCapability`] appears in the JMAP Session `capabilities` map,
/// `PrincipalCalendarsCapability` appears inside a *Principal* object's own
/// `capabilities` map and describes that principal's calendar presence.
///
/// ## Field semantics
///
/// - `account_id` — the JMAP account id that contains this principal's
/// calendar data, or `null` if the principal has no calendar account
/// accessible to the requesting user.
/// - `may_get_availability` — the requesting user may call
/// `Principal/getAvailability` for this principal.
/// - `may_share_with` — the requesting user may add this principal to the
/// `shareWith` of their own Calendar objects.
/// - `calendar_address` — the iTIP scheduling address for this principal
/// (e.g. `"mailto:alice@example.com"`), or `null` if the principal may
/// not be added as a participant to an event.