@miguelarios/cal-mcp 0.21.0 → 1.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 +42 -0
- package/LICENSE +21 -0
- package/README.md +7 -4
- package/dist/providers/types.d.ts +11 -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 +44 -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 +50 -50
- package/dist/tools/calendarSchemas.js +19 -19
- package/dist/tools/calendarSchemas.js.map +1 -1
- package/dist/tools/calendarTools.d.ts.map +1 -1
- package/dist/tools/calendarTools.js +136 -104
- package/dist/tools/calendarTools.js.map +1 -1
- package/package.json +4 -4
|
@@ -5,34 +5,34 @@
|
|
|
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
32
|
readonly location: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
33
33
|
readonly status: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
34
|
-
readonly
|
|
35
|
-
readonly
|
|
34
|
+
readonly isRecurring: v.BooleanSchema<undefined>;
|
|
35
|
+
readonly occurrenceDate: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
36
36
|
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
37
37
|
readonly url: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
38
38
|
readonly availability: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
@@ -47,13 +47,13 @@ export declare const eventSchema: v.ObjectSchema<{
|
|
|
47
47
|
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
48
48
|
readonly email: v.StringSchema<undefined>;
|
|
49
49
|
}, undefined>, undefined>, undefined>;
|
|
50
|
-
readonly
|
|
50
|
+
readonly recurrenceRule: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
51
51
|
readonly created: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
52
|
-
readonly
|
|
52
|
+
readonly lastModified: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
53
53
|
readonly alarms: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
54
54
|
readonly type: v.PicklistSchema<["relative", "absolute"], undefined>;
|
|
55
55
|
readonly trigger: v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>], undefined>;
|
|
56
|
-
readonly
|
|
56
|
+
readonly triggerHuman: v.StringSchema<undefined>;
|
|
57
57
|
}, undefined>, undefined>, undefined>;
|
|
58
58
|
readonly categories: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
59
59
|
readonly geo: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
@@ -63,18 +63,18 @@ export declare const eventSchema: v.ObjectSchema<{
|
|
|
63
63
|
}, undefined>;
|
|
64
64
|
export declare const calendarListSchema: v.ObjectSchema<{
|
|
65
65
|
readonly calendars: v.ArraySchema<v.ObjectSchema<{
|
|
66
|
-
readonly
|
|
67
|
-
readonly
|
|
66
|
+
readonly calendarId: v.StringSchema<undefined>;
|
|
67
|
+
readonly displayName: v.StringSchema<undefined>;
|
|
68
68
|
readonly color: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
69
69
|
readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
70
70
|
readonly timezone: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
71
71
|
readonly order: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
72
72
|
readonly source: v.StringSchema<undefined>;
|
|
73
|
-
readonly
|
|
73
|
+
readonly readOnly: v.BooleanSchema<undefined>;
|
|
74
74
|
readonly url: v.StringSchema<undefined>;
|
|
75
75
|
readonly ctag: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
76
76
|
}, undefined>, undefined>;
|
|
77
|
-
readonly
|
|
77
|
+
readonly unavailableProviders: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
78
78
|
readonly provider: v.StringSchema<undefined>;
|
|
79
79
|
readonly error: v.StringSchema<undefined>;
|
|
80
80
|
}, undefined>, undefined>, undefined>;
|
|
@@ -82,15 +82,15 @@ export declare const calendarListSchema: v.ObjectSchema<{
|
|
|
82
82
|
export declare const eventListSchema: v.ObjectSchema<{
|
|
83
83
|
readonly events: v.ArraySchema<v.ObjectSchema<{
|
|
84
84
|
readonly uid: v.StringSchema<undefined>;
|
|
85
|
-
readonly
|
|
85
|
+
readonly calendarId: v.StringSchema<undefined>;
|
|
86
86
|
readonly title: v.StringSchema<undefined>;
|
|
87
87
|
readonly start: v.StringSchema<undefined>;
|
|
88
88
|
readonly end: v.StringSchema<undefined>;
|
|
89
|
-
readonly
|
|
89
|
+
readonly allDay: v.BooleanSchema<undefined>;
|
|
90
90
|
readonly location: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
91
91
|
readonly status: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
92
|
-
readonly
|
|
93
|
-
readonly
|
|
92
|
+
readonly isRecurring: v.BooleanSchema<undefined>;
|
|
93
|
+
readonly occurrenceDate: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
94
94
|
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
95
95
|
readonly url: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
96
96
|
readonly availability: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
@@ -105,13 +105,13 @@ export declare const eventListSchema: v.ObjectSchema<{
|
|
|
105
105
|
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
106
106
|
readonly email: v.StringSchema<undefined>;
|
|
107
107
|
}, undefined>, undefined>, undefined>;
|
|
108
|
-
readonly
|
|
108
|
+
readonly recurrenceRule: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
109
109
|
readonly created: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
110
|
-
readonly
|
|
110
|
+
readonly lastModified: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
111
111
|
readonly alarms: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
112
112
|
readonly type: v.PicklistSchema<["relative", "absolute"], undefined>;
|
|
113
113
|
readonly trigger: v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>], undefined>;
|
|
114
|
-
readonly
|
|
114
|
+
readonly triggerHuman: v.StringSchema<undefined>;
|
|
115
115
|
}, undefined>, undefined>, undefined>;
|
|
116
116
|
readonly categories: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
117
117
|
readonly geo: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
@@ -119,7 +119,7 @@ export declare const eventListSchema: v.ObjectSchema<{
|
|
|
119
119
|
readonly longitude: v.NumberSchema<undefined>;
|
|
120
120
|
}, undefined>, undefined>, undefined>;
|
|
121
121
|
}, undefined>, undefined>;
|
|
122
|
-
readonly
|
|
122
|
+
readonly unavailableProviders: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
123
123
|
readonly provider: v.StringSchema<undefined>;
|
|
124
124
|
readonly error: v.StringSchema<undefined>;
|
|
125
125
|
}, undefined>, undefined>, undefined>;
|
|
@@ -127,15 +127,15 @@ export declare const eventListSchema: v.ObjectSchema<{
|
|
|
127
127
|
export declare const singleEventSchema: v.ObjectSchema<{
|
|
128
128
|
readonly event: v.ObjectSchema<{
|
|
129
129
|
readonly uid: v.StringSchema<undefined>;
|
|
130
|
-
readonly
|
|
130
|
+
readonly calendarId: v.StringSchema<undefined>;
|
|
131
131
|
readonly title: v.StringSchema<undefined>;
|
|
132
132
|
readonly start: v.StringSchema<undefined>;
|
|
133
133
|
readonly end: v.StringSchema<undefined>;
|
|
134
|
-
readonly
|
|
134
|
+
readonly allDay: v.BooleanSchema<undefined>;
|
|
135
135
|
readonly location: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
136
136
|
readonly status: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
137
|
-
readonly
|
|
138
|
-
readonly
|
|
137
|
+
readonly isRecurring: v.BooleanSchema<undefined>;
|
|
138
|
+
readonly occurrenceDate: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
139
139
|
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
140
140
|
readonly url: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
141
141
|
readonly availability: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
@@ -150,13 +150,13 @@ export declare const singleEventSchema: v.ObjectSchema<{
|
|
|
150
150
|
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
151
151
|
readonly email: v.StringSchema<undefined>;
|
|
152
152
|
}, undefined>, undefined>, undefined>;
|
|
153
|
-
readonly
|
|
153
|
+
readonly recurrenceRule: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
154
154
|
readonly created: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
155
|
-
readonly
|
|
155
|
+
readonly lastModified: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
156
156
|
readonly alarms: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
157
157
|
readonly type: v.PicklistSchema<["relative", "absolute"], undefined>;
|
|
158
158
|
readonly trigger: v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>], undefined>;
|
|
159
|
-
readonly
|
|
159
|
+
readonly triggerHuman: v.StringSchema<undefined>;
|
|
160
160
|
}, undefined>, undefined>, undefined>;
|
|
161
161
|
readonly categories: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
162
162
|
readonly geo: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
@@ -173,15 +173,15 @@ export declare const batchCreateSchema: v.ObjectSchema<{
|
|
|
173
173
|
readonly created: v.NumberSchema<undefined>;
|
|
174
174
|
readonly events: v.ArraySchema<v.ObjectSchema<{
|
|
175
175
|
readonly uid: v.StringSchema<undefined>;
|
|
176
|
-
readonly
|
|
176
|
+
readonly calendarId: v.StringSchema<undefined>;
|
|
177
177
|
readonly title: v.StringSchema<undefined>;
|
|
178
178
|
readonly start: v.StringSchema<undefined>;
|
|
179
179
|
readonly end: v.StringSchema<undefined>;
|
|
180
|
-
readonly
|
|
180
|
+
readonly allDay: v.BooleanSchema<undefined>;
|
|
181
181
|
readonly location: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
182
182
|
readonly status: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
183
|
-
readonly
|
|
184
|
-
readonly
|
|
183
|
+
readonly isRecurring: v.BooleanSchema<undefined>;
|
|
184
|
+
readonly occurrenceDate: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
185
185
|
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
186
186
|
readonly url: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
187
187
|
readonly availability: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
@@ -196,13 +196,13 @@ export declare const batchCreateSchema: v.ObjectSchema<{
|
|
|
196
196
|
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
197
197
|
readonly email: v.StringSchema<undefined>;
|
|
198
198
|
}, undefined>, undefined>, undefined>;
|
|
199
|
-
readonly
|
|
199
|
+
readonly recurrenceRule: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
200
200
|
readonly created: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
201
|
-
readonly
|
|
201
|
+
readonly lastModified: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
202
202
|
readonly alarms: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
203
203
|
readonly type: v.PicklistSchema<["relative", "absolute"], undefined>;
|
|
204
204
|
readonly trigger: v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>], undefined>;
|
|
205
|
-
readonly
|
|
205
|
+
readonly triggerHuman: v.StringSchema<undefined>;
|
|
206
206
|
}, undefined>, undefined>, undefined>;
|
|
207
207
|
readonly categories: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
208
208
|
readonly geo: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
@@ -220,15 +220,15 @@ export declare const importResultSchema: v.ObjectSchema<{
|
|
|
220
220
|
}, undefined>, undefined>, undefined>;
|
|
221
221
|
readonly events: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
|
|
222
222
|
readonly uid: v.StringSchema<undefined>;
|
|
223
|
-
readonly
|
|
223
|
+
readonly calendarId: v.StringSchema<undefined>;
|
|
224
224
|
readonly title: v.StringSchema<undefined>;
|
|
225
225
|
readonly start: v.StringSchema<undefined>;
|
|
226
226
|
readonly end: v.StringSchema<undefined>;
|
|
227
|
-
readonly
|
|
227
|
+
readonly allDay: v.BooleanSchema<undefined>;
|
|
228
228
|
readonly location: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
229
229
|
readonly status: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
230
|
-
readonly
|
|
231
|
-
readonly
|
|
230
|
+
readonly isRecurring: v.BooleanSchema<undefined>;
|
|
231
|
+
readonly occurrenceDate: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
232
232
|
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
233
233
|
readonly url: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
234
234
|
readonly availability: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
@@ -243,13 +243,13 @@ export declare const importResultSchema: v.ObjectSchema<{
|
|
|
243
243
|
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
244
244
|
readonly email: v.StringSchema<undefined>;
|
|
245
245
|
}, undefined>, undefined>, undefined>;
|
|
246
|
-
readonly
|
|
246
|
+
readonly recurrenceRule: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
247
247
|
readonly created: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
248
|
-
readonly
|
|
248
|
+
readonly lastModified: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
249
249
|
readonly alarms: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
250
250
|
readonly type: v.PicklistSchema<["relative", "absolute"], undefined>;
|
|
251
251
|
readonly trigger: v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>], undefined>;
|
|
252
|
-
readonly
|
|
252
|
+
readonly triggerHuman: v.StringSchema<undefined>;
|
|
253
253
|
}, undefined>, undefined>, undefined>;
|
|
254
254
|
readonly categories: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
255
255
|
readonly geo: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
@@ -281,21 +281,21 @@ export declare const freeBusySchema: v.ObjectSchema<{
|
|
|
281
281
|
readonly sources: v.RecordSchema<v.StringSchema<undefined>, v.PicklistSchema<["server", "computed"], undefined>, undefined>;
|
|
282
282
|
}, undefined>;
|
|
283
283
|
/**
|
|
284
|
-
* Result of the three collection-management tools. `
|
|
284
|
+
* Result of the three collection-management tools. `calendarId` is always the
|
|
285
285
|
* post-operation ID, so a rename hands back the ID that resolves from now on
|
|
286
286
|
* rather than the one the caller passed in.
|
|
287
287
|
*/
|
|
288
288
|
export declare const calendarWriteResultSchema: v.ObjectSchema<{
|
|
289
289
|
readonly status: v.PicklistSchema<["created", "updated", "deleted"], undefined>;
|
|
290
|
-
readonly
|
|
290
|
+
readonly calendarId: v.StringSchema<undefined>;
|
|
291
291
|
readonly url: v.StringSchema<undefined>;
|
|
292
|
-
readonly
|
|
292
|
+
readonly displayName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
293
293
|
}, undefined>;
|
|
294
294
|
/** get_calendar_sharing, share_calendar and unshare_calendar (#47). */
|
|
295
295
|
export declare const calendarSharingSchema: v.ObjectSchema<{
|
|
296
|
-
readonly
|
|
297
|
-
readonly
|
|
298
|
-
readonly
|
|
296
|
+
readonly calendarId: v.StringSchema<undefined>;
|
|
297
|
+
readonly canBeShared: v.BooleanSchema<undefined>;
|
|
298
|
+
readonly canBePublished: v.BooleanSchema<undefined>;
|
|
299
299
|
readonly protocol: v.NullableSchema<v.PicklistSchema<["calendarserver", "owncloud", "webdav"], undefined>, undefined>;
|
|
300
300
|
readonly shares: v.ArraySchema<v.ObjectSchema<{
|
|
301
301
|
readonly email: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -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,28 @@ 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
45
|
location: nullableString,
|
|
46
46
|
status: nullableString,
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
isRecurring: v.boolean(),
|
|
48
|
+
occurrenceDate: nullableString,
|
|
49
49
|
description: v.optional(nullableString),
|
|
50
50
|
url: v.optional(nullableString),
|
|
51
51
|
availability: v.optional(nullableString),
|
|
52
52
|
attendees: v.optional(v.array(attendeeSchema)),
|
|
53
53
|
organizer: v.optional(v.nullable(v.object({ name: nullableString, email: v.string() }))),
|
|
54
|
-
|
|
54
|
+
recurrenceRule: v.optional(nullableString),
|
|
55
55
|
created: v.optional(nullableString),
|
|
56
|
-
|
|
56
|
+
lastModified: v.optional(nullableString),
|
|
57
57
|
alarms: v.optional(v.array(alarmSchema)),
|
|
58
58
|
categories: v.optional(v.array(v.string())),
|
|
59
59
|
geo: v.optional(v.nullable(v.object({ latitude: v.number(), longitude: v.number() }))),
|
|
@@ -65,11 +65,11 @@ export const eventSchema = v.object({
|
|
|
65
65
|
const unavailableProvidersSchema = v.optional(v.array(v.object({ provider: v.string(), error: v.string() })));
|
|
66
66
|
export const calendarListSchema = v.object({
|
|
67
67
|
calendars: v.array(calendarSchema),
|
|
68
|
-
|
|
68
|
+
unavailableProviders: unavailableProvidersSchema,
|
|
69
69
|
});
|
|
70
70
|
export const eventListSchema = v.object({
|
|
71
71
|
events: v.array(eventSchema),
|
|
72
|
-
|
|
72
|
+
unavailableProviders: unavailableProvidersSchema,
|
|
73
73
|
});
|
|
74
74
|
export const singleEventSchema = v.object({
|
|
75
75
|
event: eventSchema,
|
|
@@ -105,21 +105,21 @@ export const freeBusySchema = v.object({
|
|
|
105
105
|
sources: v.record(v.string(), v.picklist(["server", "computed"])),
|
|
106
106
|
});
|
|
107
107
|
/**
|
|
108
|
-
* Result of the three collection-management tools. `
|
|
108
|
+
* Result of the three collection-management tools. `calendarId` is always the
|
|
109
109
|
* post-operation ID, so a rename hands back the ID that resolves from now on
|
|
110
110
|
* rather than the one the caller passed in.
|
|
111
111
|
*/
|
|
112
112
|
export const calendarWriteResultSchema = v.object({
|
|
113
113
|
status: v.picklist(["created", "updated", "deleted"]),
|
|
114
|
-
|
|
114
|
+
calendarId: v.string(),
|
|
115
115
|
url: v.string(),
|
|
116
|
-
|
|
116
|
+
displayName: v.optional(v.string()),
|
|
117
117
|
});
|
|
118
118
|
/** get_calendar_sharing, share_calendar and unshare_calendar (#47). */
|
|
119
119
|
export const calendarSharingSchema = v.object({
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
120
|
+
calendarId: v.string(),
|
|
121
|
+
canBeShared: v.boolean(),
|
|
122
|
+
canBePublished: v.boolean(),
|
|
123
123
|
protocol: v.nullable(v.picklist(["calendarserver", "owncloud", "webdav"])),
|
|
124
124
|
shares: v.array(v.object({
|
|
125
125
|
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,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;AAE9C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,cAAc;IAC3B,QAAQ,EAAE,cAAc;IACxB,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC7B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;IACrB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,IAAI,EAAE,CAAC,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AAC,MAAM,CAAC;IAC5C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE;IACxB,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE;IAC3B,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,gBAAgB,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC1E,MAAM,EAAE,CAAC,CAAC,KAAK,CACb,CAAC,CAAC,MAAM,CAAC;QACP,KAAK,EAAE,cAAc;QACrB,SAAS,EAAE,cAAc;QACzB,IAAI,EAAE,cAAc;QACpB,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;QAC1C,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;KACnE,CAAC,CACH;CACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendarTools.d.ts","sourceRoot":"","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;AA+Q1E,eAAO,MAAM,cAAc,EAAE,aAAa,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAq6BrE,CAAC"}
|