@miguelarios/cal-mcp 0.21.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -0
- package/LICENSE +21 -0
- package/README.md +8 -5
- package/dist/providers/types.d.ts +18 -11
- package/dist/providers/types.d.ts.map +1 -1
- package/dist/services/CalDavService.d.ts +6 -6
- package/dist/services/CalDavService.d.ts.map +1 -1
- package/dist/services/CalDavService.js +48 -44
- package/dist/services/CalDavService.js.map +1 -1
- package/dist/services/sharing.d.ts +2 -2
- package/dist/services/sharing.d.ts.map +1 -1
- package/dist/services/sharing.js +3 -3
- package/dist/services/sharing.js.map +1 -1
- package/dist/services/urlCache.d.ts +1 -1
- package/dist/services/urlCache.js +2 -2
- package/dist/services/urlCache.js.map +1 -1
- package/dist/tools/calendarManagementTools.d.ts.map +1 -1
- package/dist/tools/calendarManagementTools.js +18 -34
- package/dist/tools/calendarManagementTools.js.map +1 -1
- package/dist/tools/calendarSchemas.d.ts +55 -50
- package/dist/tools/calendarSchemas.d.ts.map +1 -1
- package/dist/tools/calendarSchemas.js +20 -19
- package/dist/tools/calendarSchemas.js.map +1 -1
- package/dist/tools/calendarTools.d.ts.map +1 -1
- package/dist/tools/calendarTools.js +147 -106
- package/dist/tools/calendarTools.js.map +1 -1
- package/dist/tools/presentEvent.d.ts +13 -0
- package/dist/tools/presentEvent.d.ts.map +1 -0
- package/dist/tools/presentEvent.js +72 -0
- package/dist/tools/presentEvent.js.map +1 -0
- package/package.json +4 -4
|
@@ -5,34 +5,35 @@
|
|
|
5
5
|
*
|
|
6
6
|
* They mirror `CalendarInfo`, `EventSummary`, `EventFull` and `FreeSlot` from
|
|
7
7
|
* `../services/CalDavService.js`. `list_events` and friends can return either
|
|
8
|
-
* the summary or the full shape depending on `
|
|
8
|
+
* the summary or the full shape depending on `detailLevel`, so the event
|
|
9
9
|
* schema is the summary shape with every full-only field optional.
|
|
10
10
|
*/
|
|
11
11
|
import * as v from "valibot";
|
|
12
12
|
export declare const calendarSchema: v.ObjectSchema<{
|
|
13
|
-
readonly
|
|
14
|
-
readonly
|
|
13
|
+
readonly calendarId: v.StringSchema<undefined>;
|
|
14
|
+
readonly displayName: v.StringSchema<undefined>;
|
|
15
15
|
readonly color: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
16
16
|
readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
17
17
|
readonly timezone: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
18
18
|
readonly order: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
19
19
|
readonly source: v.StringSchema<undefined>;
|
|
20
|
-
readonly
|
|
20
|
+
readonly readOnly: v.BooleanSchema<undefined>;
|
|
21
21
|
readonly url: v.StringSchema<undefined>;
|
|
22
22
|
readonly ctag: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
23
23
|
}, undefined>;
|
|
24
24
|
/** Summary fields, plus the full-detail fields as optional. */
|
|
25
25
|
export declare const eventSchema: v.ObjectSchema<{
|
|
26
26
|
readonly uid: v.StringSchema<undefined>;
|
|
27
|
-
readonly
|
|
27
|
+
readonly calendarId: v.StringSchema<undefined>;
|
|
28
28
|
readonly title: v.StringSchema<undefined>;
|
|
29
29
|
readonly start: v.StringSchema<undefined>;
|
|
30
30
|
readonly end: v.StringSchema<undefined>;
|
|
31
|
-
readonly
|
|
31
|
+
readonly allDay: v.BooleanSchema<undefined>;
|
|
32
|
+
readonly timeZone: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
32
33
|
readonly location: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
33
34
|
readonly status: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
34
|
-
readonly
|
|
35
|
-
readonly
|
|
35
|
+
readonly isRecurring: v.BooleanSchema<undefined>;
|
|
36
|
+
readonly occurrenceDate: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
36
37
|
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
37
38
|
readonly url: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
38
39
|
readonly availability: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
@@ -47,13 +48,13 @@ export declare const eventSchema: v.ObjectSchema<{
|
|
|
47
48
|
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
48
49
|
readonly email: v.StringSchema<undefined>;
|
|
49
50
|
}, undefined>, undefined>, undefined>;
|
|
50
|
-
readonly
|
|
51
|
+
readonly recurrenceRule: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
51
52
|
readonly created: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
52
|
-
readonly
|
|
53
|
+
readonly lastModified: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
53
54
|
readonly alarms: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
54
55
|
readonly type: v.PicklistSchema<["relative", "absolute"], undefined>;
|
|
55
56
|
readonly trigger: v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>], undefined>;
|
|
56
|
-
readonly
|
|
57
|
+
readonly triggerHuman: v.StringSchema<undefined>;
|
|
57
58
|
}, undefined>, undefined>, undefined>;
|
|
58
59
|
readonly categories: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
59
60
|
readonly geo: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
@@ -63,18 +64,18 @@ export declare const eventSchema: v.ObjectSchema<{
|
|
|
63
64
|
}, undefined>;
|
|
64
65
|
export declare const calendarListSchema: v.ObjectSchema<{
|
|
65
66
|
readonly calendars: v.ArraySchema<v.ObjectSchema<{
|
|
66
|
-
readonly
|
|
67
|
-
readonly
|
|
67
|
+
readonly calendarId: v.StringSchema<undefined>;
|
|
68
|
+
readonly displayName: v.StringSchema<undefined>;
|
|
68
69
|
readonly color: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
69
70
|
readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
70
71
|
readonly timezone: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
71
72
|
readonly order: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
72
73
|
readonly source: v.StringSchema<undefined>;
|
|
73
|
-
readonly
|
|
74
|
+
readonly readOnly: v.BooleanSchema<undefined>;
|
|
74
75
|
readonly url: v.StringSchema<undefined>;
|
|
75
76
|
readonly ctag: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
76
77
|
}, undefined>, undefined>;
|
|
77
|
-
readonly
|
|
78
|
+
readonly unavailableProviders: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
78
79
|
readonly provider: v.StringSchema<undefined>;
|
|
79
80
|
readonly error: v.StringSchema<undefined>;
|
|
80
81
|
}, undefined>, undefined>, undefined>;
|
|
@@ -82,15 +83,16 @@ export declare const calendarListSchema: v.ObjectSchema<{
|
|
|
82
83
|
export declare const eventListSchema: v.ObjectSchema<{
|
|
83
84
|
readonly events: v.ArraySchema<v.ObjectSchema<{
|
|
84
85
|
readonly uid: v.StringSchema<undefined>;
|
|
85
|
-
readonly
|
|
86
|
+
readonly calendarId: v.StringSchema<undefined>;
|
|
86
87
|
readonly title: v.StringSchema<undefined>;
|
|
87
88
|
readonly start: v.StringSchema<undefined>;
|
|
88
89
|
readonly end: v.StringSchema<undefined>;
|
|
89
|
-
readonly
|
|
90
|
+
readonly allDay: v.BooleanSchema<undefined>;
|
|
91
|
+
readonly timeZone: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
90
92
|
readonly location: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
91
93
|
readonly status: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
92
|
-
readonly
|
|
93
|
-
readonly
|
|
94
|
+
readonly isRecurring: v.BooleanSchema<undefined>;
|
|
95
|
+
readonly occurrenceDate: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
94
96
|
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
95
97
|
readonly url: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
96
98
|
readonly availability: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
@@ -105,13 +107,13 @@ export declare const eventListSchema: v.ObjectSchema<{
|
|
|
105
107
|
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
106
108
|
readonly email: v.StringSchema<undefined>;
|
|
107
109
|
}, undefined>, undefined>, undefined>;
|
|
108
|
-
readonly
|
|
110
|
+
readonly recurrenceRule: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
109
111
|
readonly created: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
110
|
-
readonly
|
|
112
|
+
readonly lastModified: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
111
113
|
readonly alarms: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
112
114
|
readonly type: v.PicklistSchema<["relative", "absolute"], undefined>;
|
|
113
115
|
readonly trigger: v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>], undefined>;
|
|
114
|
-
readonly
|
|
116
|
+
readonly triggerHuman: v.StringSchema<undefined>;
|
|
115
117
|
}, undefined>, undefined>, undefined>;
|
|
116
118
|
readonly categories: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
117
119
|
readonly geo: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
@@ -119,7 +121,7 @@ export declare const eventListSchema: v.ObjectSchema<{
|
|
|
119
121
|
readonly longitude: v.NumberSchema<undefined>;
|
|
120
122
|
}, undefined>, undefined>, undefined>;
|
|
121
123
|
}, undefined>, undefined>;
|
|
122
|
-
readonly
|
|
124
|
+
readonly unavailableProviders: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
123
125
|
readonly provider: v.StringSchema<undefined>;
|
|
124
126
|
readonly error: v.StringSchema<undefined>;
|
|
125
127
|
}, undefined>, undefined>, undefined>;
|
|
@@ -127,15 +129,16 @@ export declare const eventListSchema: v.ObjectSchema<{
|
|
|
127
129
|
export declare const singleEventSchema: v.ObjectSchema<{
|
|
128
130
|
readonly event: v.ObjectSchema<{
|
|
129
131
|
readonly uid: v.StringSchema<undefined>;
|
|
130
|
-
readonly
|
|
132
|
+
readonly calendarId: v.StringSchema<undefined>;
|
|
131
133
|
readonly title: v.StringSchema<undefined>;
|
|
132
134
|
readonly start: v.StringSchema<undefined>;
|
|
133
135
|
readonly end: v.StringSchema<undefined>;
|
|
134
|
-
readonly
|
|
136
|
+
readonly allDay: v.BooleanSchema<undefined>;
|
|
137
|
+
readonly timeZone: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
135
138
|
readonly location: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
136
139
|
readonly status: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
137
|
-
readonly
|
|
138
|
-
readonly
|
|
140
|
+
readonly isRecurring: v.BooleanSchema<undefined>;
|
|
141
|
+
readonly occurrenceDate: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
139
142
|
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
140
143
|
readonly url: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
141
144
|
readonly availability: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
@@ -150,13 +153,13 @@ export declare const singleEventSchema: v.ObjectSchema<{
|
|
|
150
153
|
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
151
154
|
readonly email: v.StringSchema<undefined>;
|
|
152
155
|
}, undefined>, undefined>, undefined>;
|
|
153
|
-
readonly
|
|
156
|
+
readonly recurrenceRule: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
154
157
|
readonly created: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
155
|
-
readonly
|
|
158
|
+
readonly lastModified: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
156
159
|
readonly alarms: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
157
160
|
readonly type: v.PicklistSchema<["relative", "absolute"], undefined>;
|
|
158
161
|
readonly trigger: v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>], undefined>;
|
|
159
|
-
readonly
|
|
162
|
+
readonly triggerHuman: v.StringSchema<undefined>;
|
|
160
163
|
}, undefined>, undefined>, undefined>;
|
|
161
164
|
readonly categories: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
162
165
|
readonly geo: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
@@ -173,15 +176,16 @@ export declare const batchCreateSchema: v.ObjectSchema<{
|
|
|
173
176
|
readonly created: v.NumberSchema<undefined>;
|
|
174
177
|
readonly events: v.ArraySchema<v.ObjectSchema<{
|
|
175
178
|
readonly uid: v.StringSchema<undefined>;
|
|
176
|
-
readonly
|
|
179
|
+
readonly calendarId: v.StringSchema<undefined>;
|
|
177
180
|
readonly title: v.StringSchema<undefined>;
|
|
178
181
|
readonly start: v.StringSchema<undefined>;
|
|
179
182
|
readonly end: v.StringSchema<undefined>;
|
|
180
|
-
readonly
|
|
183
|
+
readonly allDay: v.BooleanSchema<undefined>;
|
|
184
|
+
readonly timeZone: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
181
185
|
readonly location: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
182
186
|
readonly status: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
183
|
-
readonly
|
|
184
|
-
readonly
|
|
187
|
+
readonly isRecurring: v.BooleanSchema<undefined>;
|
|
188
|
+
readonly occurrenceDate: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
185
189
|
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
186
190
|
readonly url: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
187
191
|
readonly availability: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
@@ -196,13 +200,13 @@ export declare const batchCreateSchema: v.ObjectSchema<{
|
|
|
196
200
|
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
197
201
|
readonly email: v.StringSchema<undefined>;
|
|
198
202
|
}, undefined>, undefined>, undefined>;
|
|
199
|
-
readonly
|
|
203
|
+
readonly recurrenceRule: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
200
204
|
readonly created: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
201
|
-
readonly
|
|
205
|
+
readonly lastModified: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
202
206
|
readonly alarms: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
203
207
|
readonly type: v.PicklistSchema<["relative", "absolute"], undefined>;
|
|
204
208
|
readonly trigger: v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>], undefined>;
|
|
205
|
-
readonly
|
|
209
|
+
readonly triggerHuman: v.StringSchema<undefined>;
|
|
206
210
|
}, undefined>, undefined>, undefined>;
|
|
207
211
|
readonly categories: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
208
212
|
readonly geo: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
@@ -220,15 +224,16 @@ export declare const importResultSchema: v.ObjectSchema<{
|
|
|
220
224
|
}, undefined>, undefined>, undefined>;
|
|
221
225
|
readonly events: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
|
|
222
226
|
readonly uid: v.StringSchema<undefined>;
|
|
223
|
-
readonly
|
|
227
|
+
readonly calendarId: v.StringSchema<undefined>;
|
|
224
228
|
readonly title: v.StringSchema<undefined>;
|
|
225
229
|
readonly start: v.StringSchema<undefined>;
|
|
226
230
|
readonly end: v.StringSchema<undefined>;
|
|
227
|
-
readonly
|
|
231
|
+
readonly allDay: v.BooleanSchema<undefined>;
|
|
232
|
+
readonly timeZone: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
228
233
|
readonly location: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
229
234
|
readonly status: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
230
|
-
readonly
|
|
231
|
-
readonly
|
|
235
|
+
readonly isRecurring: v.BooleanSchema<undefined>;
|
|
236
|
+
readonly occurrenceDate: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
232
237
|
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
233
238
|
readonly url: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
234
239
|
readonly availability: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
@@ -243,13 +248,13 @@ export declare const importResultSchema: v.ObjectSchema<{
|
|
|
243
248
|
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
244
249
|
readonly email: v.StringSchema<undefined>;
|
|
245
250
|
}, undefined>, undefined>, undefined>;
|
|
246
|
-
readonly
|
|
251
|
+
readonly recurrenceRule: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
247
252
|
readonly created: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
248
|
-
readonly
|
|
253
|
+
readonly lastModified: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
249
254
|
readonly alarms: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
250
255
|
readonly type: v.PicklistSchema<["relative", "absolute"], undefined>;
|
|
251
256
|
readonly trigger: v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>], undefined>;
|
|
252
|
-
readonly
|
|
257
|
+
readonly triggerHuman: v.StringSchema<undefined>;
|
|
253
258
|
}, undefined>, undefined>, undefined>;
|
|
254
259
|
readonly categories: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
255
260
|
readonly geo: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
@@ -281,21 +286,21 @@ export declare const freeBusySchema: v.ObjectSchema<{
|
|
|
281
286
|
readonly sources: v.RecordSchema<v.StringSchema<undefined>, v.PicklistSchema<["server", "computed"], undefined>, undefined>;
|
|
282
287
|
}, undefined>;
|
|
283
288
|
/**
|
|
284
|
-
* Result of the three collection-management tools. `
|
|
289
|
+
* Result of the three collection-management tools. `calendarId` is always the
|
|
285
290
|
* post-operation ID, so a rename hands back the ID that resolves from now on
|
|
286
291
|
* rather than the one the caller passed in.
|
|
287
292
|
*/
|
|
288
293
|
export declare const calendarWriteResultSchema: v.ObjectSchema<{
|
|
289
294
|
readonly status: v.PicklistSchema<["created", "updated", "deleted"], undefined>;
|
|
290
|
-
readonly
|
|
295
|
+
readonly calendarId: v.StringSchema<undefined>;
|
|
291
296
|
readonly url: v.StringSchema<undefined>;
|
|
292
|
-
readonly
|
|
297
|
+
readonly displayName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
293
298
|
}, undefined>;
|
|
294
299
|
/** get_calendar_sharing, share_calendar and unshare_calendar (#47). */
|
|
295
300
|
export declare const calendarSharingSchema: v.ObjectSchema<{
|
|
296
|
-
readonly
|
|
297
|
-
readonly
|
|
298
|
-
readonly
|
|
301
|
+
readonly calendarId: v.StringSchema<undefined>;
|
|
302
|
+
readonly canBeShared: v.BooleanSchema<undefined>;
|
|
303
|
+
readonly canBePublished: v.BooleanSchema<undefined>;
|
|
299
304
|
readonly protocol: v.NullableSchema<v.PicklistSchema<["calendarserver", "owncloud", "webdav"], undefined>, undefined>;
|
|
300
305
|
readonly shares: v.ArraySchema<v.ObjectSchema<{
|
|
301
306
|
readonly email: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendarSchemas.d.ts","sourceRoot":"","sources":["../../src/tools/calendarSchemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAI7B,eAAO,MAAM,cAAc;;;;;;;;;;;aAWzB,CAAC;AAgBH,+DAA+D;AAC/D,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"calendarSchemas.d.ts","sourceRoot":"","sources":["../../src/tools/calendarSchemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAI7B,eAAO,MAAM,cAAc;;;;;;;;;;;aAWzB,CAAC;AAgBH,+DAA+D;AAC/D,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAuBtB,CAAC;AAUH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;aAG7B,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAG1B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAE5B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;aAG7B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAG5B,CAAC;AAEH,0FAA0F;AAC1F,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAI7B,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;aAG1B,CAAC;AAEH,uFAAuF;AACvF,eAAO,MAAM,cAAc;;;;;;;;;;aAYzB,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,yBAAyB;;;;;aAKpC,CAAC;AAEH,uEAAuE;AACvE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;aAchC,CAAC"}
|
|
@@ -5,20 +5,20 @@
|
|
|
5
5
|
*
|
|
6
6
|
* They mirror `CalendarInfo`, `EventSummary`, `EventFull` and `FreeSlot` from
|
|
7
7
|
* `../services/CalDavService.js`. `list_events` and friends can return either
|
|
8
|
-
* the summary or the full shape depending on `
|
|
8
|
+
* the summary or the full shape depending on `detailLevel`, so the event
|
|
9
9
|
* schema is the summary shape with every full-only field optional.
|
|
10
10
|
*/
|
|
11
11
|
import * as v from "valibot";
|
|
12
12
|
const nullableString = v.nullable(v.string());
|
|
13
13
|
export const calendarSchema = v.object({
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
calendarId: v.string(),
|
|
15
|
+
displayName: v.string(),
|
|
16
16
|
color: nullableString,
|
|
17
17
|
description: nullableString,
|
|
18
18
|
timezone: nullableString,
|
|
19
19
|
order: v.nullable(v.number()),
|
|
20
20
|
source: v.string(),
|
|
21
|
-
|
|
21
|
+
readOnly: v.boolean(),
|
|
22
22
|
url: v.string(),
|
|
23
23
|
ctag: v.optional(v.string()),
|
|
24
24
|
});
|
|
@@ -32,28 +32,29 @@ const attendeeSchema = v.object({
|
|
|
32
32
|
const alarmSchema = v.object({
|
|
33
33
|
type: v.picklist(["relative", "absolute"]),
|
|
34
34
|
trigger: v.union([v.number(), v.string()]),
|
|
35
|
-
|
|
35
|
+
triggerHuman: v.string(),
|
|
36
36
|
});
|
|
37
37
|
/** Summary fields, plus the full-detail fields as optional. */
|
|
38
38
|
export const eventSchema = v.object({
|
|
39
39
|
uid: v.string(),
|
|
40
|
-
|
|
40
|
+
calendarId: v.string(),
|
|
41
41
|
title: v.string(),
|
|
42
42
|
start: v.string(),
|
|
43
43
|
end: v.string(),
|
|
44
|
-
|
|
44
|
+
allDay: v.boolean(),
|
|
45
|
+
timeZone: nullableString,
|
|
45
46
|
location: nullableString,
|
|
46
47
|
status: nullableString,
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
isRecurring: v.boolean(),
|
|
49
|
+
occurrenceDate: nullableString,
|
|
49
50
|
description: v.optional(nullableString),
|
|
50
51
|
url: v.optional(nullableString),
|
|
51
52
|
availability: v.optional(nullableString),
|
|
52
53
|
attendees: v.optional(v.array(attendeeSchema)),
|
|
53
54
|
organizer: v.optional(v.nullable(v.object({ name: nullableString, email: v.string() }))),
|
|
54
|
-
|
|
55
|
+
recurrenceRule: v.optional(nullableString),
|
|
55
56
|
created: v.optional(nullableString),
|
|
56
|
-
|
|
57
|
+
lastModified: v.optional(nullableString),
|
|
57
58
|
alarms: v.optional(v.array(alarmSchema)),
|
|
58
59
|
categories: v.optional(v.array(v.string())),
|
|
59
60
|
geo: v.optional(v.nullable(v.object({ latitude: v.number(), longitude: v.number() }))),
|
|
@@ -65,11 +66,11 @@ export const eventSchema = v.object({
|
|
|
65
66
|
const unavailableProvidersSchema = v.optional(v.array(v.object({ provider: v.string(), error: v.string() })));
|
|
66
67
|
export const calendarListSchema = v.object({
|
|
67
68
|
calendars: v.array(calendarSchema),
|
|
68
|
-
|
|
69
|
+
unavailableProviders: unavailableProvidersSchema,
|
|
69
70
|
});
|
|
70
71
|
export const eventListSchema = v.object({
|
|
71
72
|
events: v.array(eventSchema),
|
|
72
|
-
|
|
73
|
+
unavailableProviders: unavailableProvidersSchema,
|
|
73
74
|
});
|
|
74
75
|
export const singleEventSchema = v.object({
|
|
75
76
|
event: eventSchema,
|
|
@@ -105,21 +106,21 @@ export const freeBusySchema = v.object({
|
|
|
105
106
|
sources: v.record(v.string(), v.picklist(["server", "computed"])),
|
|
106
107
|
});
|
|
107
108
|
/**
|
|
108
|
-
* Result of the three collection-management tools. `
|
|
109
|
+
* Result of the three collection-management tools. `calendarId` is always the
|
|
109
110
|
* post-operation ID, so a rename hands back the ID that resolves from now on
|
|
110
111
|
* rather than the one the caller passed in.
|
|
111
112
|
*/
|
|
112
113
|
export const calendarWriteResultSchema = v.object({
|
|
113
114
|
status: v.picklist(["created", "updated", "deleted"]),
|
|
114
|
-
|
|
115
|
+
calendarId: v.string(),
|
|
115
116
|
url: v.string(),
|
|
116
|
-
|
|
117
|
+
displayName: v.optional(v.string()),
|
|
117
118
|
});
|
|
118
119
|
/** get_calendar_sharing, share_calendar and unshare_calendar (#47). */
|
|
119
120
|
export const calendarSharingSchema = v.object({
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
calendarId: v.string(),
|
|
122
|
+
canBeShared: v.boolean(),
|
|
123
|
+
canBePublished: v.boolean(),
|
|
123
124
|
protocol: v.nullable(v.picklist(["calendarserver", "owncloud", "webdav"])),
|
|
124
125
|
shares: v.array(v.object({
|
|
125
126
|
email: nullableString,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendarSchemas.js","sourceRoot":"","sources":["../../src/tools/calendarSchemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,MAAM,cAAc,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;AAE9C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,
|
|
1
|
+
{"version":3,"file":"calendarSchemas.js","sourceRoot":"","sources":["../../src/tools/calendarSchemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,MAAM,cAAc,GAAG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","sources":["../../src/tools/calendarTools.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"calendarTools.d.ts","sourceRoot":"","sources":["../../src/tools/calendarTools.ts"],"names":[],"mappings":"AAkBA,OAAO,EAEL,KAAK,OAAO,EAMb,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAqR1E,eAAO,MAAM,cAAc,EAAE,aAAa,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAw6BrE,CAAC"}
|