@miguelarios/cal-mcp 0.20.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 +51 -0
- package/LICENSE +21 -0
- package/README.md +8 -3
- package/dist/main.d.ts +2 -2
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/providers/CalendarBackend.d.ts +94 -0
- package/dist/providers/CalendarBackend.d.ts.map +1 -0
- package/dist/providers/CalendarBackend.js +2 -0
- package/dist/providers/CalendarBackend.js.map +1 -0
- package/dist/providers/types.d.ts +98 -0
- package/dist/providers/types.d.ts.map +1 -0
- package/dist/providers/types.js +2 -0
- package/dist/providers/types.js.map +1 -0
- package/dist/services/CalDavService.d.ts +40 -92
- package/dist/services/CalDavService.d.ts.map +1 -1
- package/dist/services/CalDavService.js +210 -64
- package/dist/services/CalDavService.js.map +1 -1
- package/dist/services/sharing.d.ts +39 -0
- package/dist/services/sharing.d.ts.map +1 -0
- package/dist/services/sharing.js +253 -0
- package/dist/services/sharing.js.map +1 -0
- 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 +3 -3
- package/dist/tools/calendarManagementTools.d.ts.map +1 -1
- package/dist/tools/calendarManagementTools.js +108 -33
- package/dist/tools/calendarManagementTools.js.map +1 -1
- package/dist/tools/calendarSchemas.d.ts +67 -45
- package/dist/tools/calendarSchemas.d.ts.map +1 -1
- package/dist/tools/calendarSchemas.js +35 -14
- package/dist/tools/calendarSchemas.js.map +1 -1
- package/dist/tools/calendarTools.d.ts +2 -2
- package/dist/tools/calendarTools.d.ts.map +1 -1
- package/dist/tools/calendarTools.js +160 -112
- package/dist/tools/calendarTools.js.map +1 -1
- package/package.json +8 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendarManagementTools.d.ts","sourceRoot":"","sources":["../../src/tools/calendarManagementTools.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,KAAK,OAAO,EAKb,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"calendarManagementTools.d.ts","sourceRoot":"","sources":["../../src/tools/calendarManagementTools.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,KAAK,OAAO,EAKb,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AA6EvE,eAAO,MAAM,yBAAyB,EAAE,aAAa,CAAC,OAAO,CAAC,eAAe,CAAC,CA2P7E,CAAC"}
|
|
@@ -1,34 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Calendar collection lifecycle: create, update metadata, delete.
|
|
2
|
+
* Calendar collection lifecycle: create, update metadata, delete, and sharing.
|
|
3
3
|
*
|
|
4
4
|
* Events live in `calendarTools.ts`; this file is about the collections that
|
|
5
5
|
* hold them. `list_calendars` is deliberately not here — it already exists on
|
|
6
6
|
* the event side, and reads belong with the rest of the read surface.
|
|
7
7
|
*/
|
|
8
8
|
import { confirmDestructive, structured, toolError, } from "@miguelarios/pim-core/mcp";
|
|
9
|
-
import { calendarWriteResultSchema } from "./calendarSchemas.js";
|
|
10
|
-
/**
|
|
11
|
-
* Maps to this server's external error vocabulary, as `calendarTools` does —
|
|
12
|
-
* plus `validation_error`, which these tools actually raise: bad colours, empty
|
|
13
|
-
* names, unresolvable providers and empty updates are all caller-fixable, and
|
|
14
|
-
* reporting them as `backend_error` would send a caller looking at the server.
|
|
15
|
-
*/
|
|
16
|
-
function mapError(err) {
|
|
17
|
-
if (err && typeof err === "object" && "code" in err) {
|
|
18
|
-
const code = err.code;
|
|
19
|
-
if (code === "CALENDAR_NOT_FOUND")
|
|
20
|
-
return toolError(err, () => "not_found");
|
|
21
|
-
if (code === "VALIDATION_FAILED")
|
|
22
|
-
return toolError(err, () => "validation_error");
|
|
23
|
-
}
|
|
24
|
-
return toolError(err, () => "backend_error");
|
|
25
|
-
}
|
|
9
|
+
import { calendarSharingSchema, calendarWriteResultSchema } from "./calendarSchemas.js";
|
|
26
10
|
async function run(body) {
|
|
27
11
|
try {
|
|
28
12
|
return await body();
|
|
29
13
|
}
|
|
30
14
|
catch (err) {
|
|
31
|
-
return
|
|
15
|
+
return toolError(err);
|
|
32
16
|
}
|
|
33
17
|
}
|
|
34
18
|
/**
|
|
@@ -53,6 +37,16 @@ const ORDER_PROP = {
|
|
|
53
37
|
minimum: 0,
|
|
54
38
|
description: "Sort position among the account's calendars (0 first). Apple's calendar-order property, honoured by Apple, SabreDAV and Radicale-based servers; others may ignore it.",
|
|
55
39
|
};
|
|
40
|
+
const SHAREE_PROP = {
|
|
41
|
+
type: "string",
|
|
42
|
+
description: "Who to share with: an email address (mailbox.org/Open-Xchange, Apple), or a Nextcloud principal such as principals/users/bob or principals/groups/family.",
|
|
43
|
+
};
|
|
44
|
+
const READ_ONLY_ANNOTATIONS = {
|
|
45
|
+
readOnlyHint: true,
|
|
46
|
+
destructiveHint: false,
|
|
47
|
+
idempotentHint: true,
|
|
48
|
+
openWorldHint: true,
|
|
49
|
+
};
|
|
56
50
|
export const CALENDAR_MANAGEMENT_TOOLS = [
|
|
57
51
|
{
|
|
58
52
|
name: "create_calendar",
|
|
@@ -71,23 +65,23 @@ export const CALENDAR_MANAGEMENT_TOOLS = [
|
|
|
71
65
|
type: "string",
|
|
72
66
|
description: "Provider/account to create on — the prefix half of a calendar ID (e.g. 'mailbox' in mailbox/Work). Optional when only one account is configured; required otherwise. Call list_calendars to see the configured providers.",
|
|
73
67
|
},
|
|
74
|
-
|
|
68
|
+
displayName: { type: "string", description: "Display name for the new calendar" },
|
|
75
69
|
description: { type: "string", description: "Optional calendar description" },
|
|
76
70
|
color: COLOR_PROP,
|
|
77
71
|
timezone: TIMEZONE_PROP,
|
|
78
72
|
order: ORDER_PROP,
|
|
79
73
|
slug: {
|
|
80
74
|
type: "string",
|
|
81
|
-
description: "Optional URL path segment (lowercase letters, digits, hyphens). Derived from
|
|
75
|
+
description: "Optional URL path segment (lowercase letters, digits, hyphens). Derived from displayName when omitted.",
|
|
82
76
|
},
|
|
83
77
|
},
|
|
84
|
-
required: ["
|
|
78
|
+
required: ["displayName"],
|
|
85
79
|
},
|
|
86
80
|
outputSchema: calendarWriteResultSchema,
|
|
87
81
|
handler: (args, service) => run(async () => {
|
|
88
82
|
const created = await service.createCalendar({
|
|
89
83
|
provider: args.provider,
|
|
90
|
-
displayName: args.
|
|
84
|
+
displayName: args.displayName,
|
|
91
85
|
description: args.description,
|
|
92
86
|
color: args.color,
|
|
93
87
|
timezone: args.timezone,
|
|
@@ -96,9 +90,9 @@ export const CALENDAR_MANAGEMENT_TOOLS = [
|
|
|
96
90
|
});
|
|
97
91
|
return structured({
|
|
98
92
|
status: "created",
|
|
99
|
-
|
|
93
|
+
calendarId: created.calendarId,
|
|
100
94
|
url: created.url,
|
|
101
|
-
|
|
95
|
+
displayName: created.displayName,
|
|
102
96
|
});
|
|
103
97
|
}),
|
|
104
98
|
},
|
|
@@ -116,7 +110,7 @@ export const CALENDAR_MANAGEMENT_TOOLS = [
|
|
|
116
110
|
type: "object",
|
|
117
111
|
properties: {
|
|
118
112
|
calendar: TARGET_CALENDAR_PROP,
|
|
119
|
-
|
|
113
|
+
displayName: {
|
|
120
114
|
type: "string",
|
|
121
115
|
description: "New display name. Changes the calendar's ID.",
|
|
122
116
|
},
|
|
@@ -130,7 +124,7 @@ export const CALENDAR_MANAGEMENT_TOOLS = [
|
|
|
130
124
|
outputSchema: calendarWriteResultSchema,
|
|
131
125
|
handler: (args, service) => run(async () => {
|
|
132
126
|
const updated = await service.updateCalendarMeta(args.calendar, {
|
|
133
|
-
displayName: args.
|
|
127
|
+
displayName: args.displayName,
|
|
134
128
|
description: args.description,
|
|
135
129
|
color: args.color,
|
|
136
130
|
timezone: args.timezone,
|
|
@@ -138,9 +132,9 @@ export const CALENDAR_MANAGEMENT_TOOLS = [
|
|
|
138
132
|
});
|
|
139
133
|
return structured({
|
|
140
134
|
status: "updated",
|
|
141
|
-
|
|
135
|
+
calendarId: updated.calendarId,
|
|
142
136
|
url: updated.url,
|
|
143
|
-
|
|
137
|
+
displayName: updated.displayName,
|
|
144
138
|
});
|
|
145
139
|
}),
|
|
146
140
|
},
|
|
@@ -174,22 +168,103 @@ export const CALENDAR_MANAGEMENT_TOOLS = [
|
|
|
174
168
|
count = await service.countCalendarObjects(args.calendar);
|
|
175
169
|
}
|
|
176
170
|
catch (err) {
|
|
177
|
-
return
|
|
171
|
+
return toolError(err);
|
|
178
172
|
}
|
|
179
173
|
const eventsClause = count !== undefined ? `all ${count} events in it` : "every event in it";
|
|
180
|
-
const gate = confirmDestructive(ctx, "confirm_delete_calendar", `Permanently delete calendar "${entry.
|
|
174
|
+
const gate = confirmDestructive(ctx, "confirm_delete_calendar", `Permanently delete calendar "${entry.displayName}" on provider "${entry.provider}" (${entry.url}) and ${eventsClause}? This cannot be undone.`);
|
|
181
175
|
if (gate.status === "interrupt")
|
|
182
176
|
return gate.result;
|
|
183
177
|
return run(async () => {
|
|
184
178
|
const deleted = await service.deleteCalendar(args.calendar);
|
|
185
179
|
return structured({
|
|
186
180
|
status: "deleted",
|
|
187
|
-
|
|
181
|
+
calendarId: deleted.calendarId,
|
|
188
182
|
url: deleted.url,
|
|
189
|
-
|
|
183
|
+
displayName: deleted.displayName,
|
|
190
184
|
});
|
|
191
185
|
});
|
|
192
186
|
},
|
|
193
187
|
},
|
|
188
|
+
{
|
|
189
|
+
name: "get_calendar_sharing",
|
|
190
|
+
title: "Get Calendar Sharing",
|
|
191
|
+
description: "Who a calendar is shared with and at what access (read or read-write), and whether each person has accepted. Also says whether the calendar can be shared at all. Reads CalendarServer sharing (mailbox.org/Open-Xchange, Apple), Nextcloud sharing, or WebDAV resource sharing, whichever the server reports.",
|
|
192
|
+
annotations: READ_ONLY_ANNOTATIONS,
|
|
193
|
+
inputSchema: {
|
|
194
|
+
type: "object",
|
|
195
|
+
properties: { calendar: TARGET_CALENDAR_PROP },
|
|
196
|
+
required: ["calendar"],
|
|
197
|
+
},
|
|
198
|
+
outputSchema: calendarSharingSchema,
|
|
199
|
+
handler: (args, service) => run(async () => structured({
|
|
200
|
+
calendarId: args.calendar,
|
|
201
|
+
...(await service.getCalendarSharing(args.calendar)),
|
|
202
|
+
})),
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
name: "share_calendar",
|
|
206
|
+
title: "Share Calendar",
|
|
207
|
+
description: "Share a calendar with someone, or change their access. The server usually sends them an invitation, so this asks the user to confirm first. On CalendarServer servers (mailbox.org/Open-Xchange, Apple) the sharee is an email address; on Nextcloud it is a user or group principal such as principals/users/bob. Returns the calendar's sharing afterwards.",
|
|
208
|
+
annotations: {
|
|
209
|
+
readOnlyHint: false,
|
|
210
|
+
destructiveHint: false,
|
|
211
|
+
// Repeating it can send the sharee another invitation.
|
|
212
|
+
idempotentHint: false,
|
|
213
|
+
openWorldHint: true,
|
|
214
|
+
},
|
|
215
|
+
inputSchema: {
|
|
216
|
+
type: "object",
|
|
217
|
+
properties: {
|
|
218
|
+
calendar: TARGET_CALENDAR_PROP,
|
|
219
|
+
sharee: SHAREE_PROP,
|
|
220
|
+
access: {
|
|
221
|
+
type: "string",
|
|
222
|
+
enum: ["read", "read-write"],
|
|
223
|
+
description: "'read' lets them see events; 'read-write' also lets them change them.",
|
|
224
|
+
},
|
|
225
|
+
summary: {
|
|
226
|
+
type: "string",
|
|
227
|
+
description: "Optional note included in the invitation, where the server sends one.",
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
required: ["calendar", "sharee", "access"],
|
|
231
|
+
},
|
|
232
|
+
outputSchema: calendarSharingSchema,
|
|
233
|
+
handler: async (args, service, ctx) => {
|
|
234
|
+
const gate = confirmDestructive(ctx, "confirm_share_calendar", `Give ${args.sharee} ${args.access === "read-write" ? "read-write" : "read-only"} access to calendar "${args.calendar}"? The server may send them an invitation.`);
|
|
235
|
+
if (gate.status === "interrupt")
|
|
236
|
+
return gate.result;
|
|
237
|
+
return run(async () => structured({
|
|
238
|
+
calendarId: args.calendar,
|
|
239
|
+
...(await service.changeCalendarShare(args.calendar, args.sharee, args.access, args.summary)),
|
|
240
|
+
}));
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
name: "unshare_calendar",
|
|
245
|
+
title: "Unshare Calendar",
|
|
246
|
+
description: "Remove someone's access to a calendar. Asks the user to confirm first. Pass the sharee as get_calendar_sharing reports it: an email address, or on Nextcloud a principal such as principals/users/bob. Returns the calendar's sharing afterwards.",
|
|
247
|
+
annotations: {
|
|
248
|
+
readOnlyHint: false,
|
|
249
|
+
destructiveHint: true,
|
|
250
|
+
idempotentHint: true,
|
|
251
|
+
openWorldHint: true,
|
|
252
|
+
},
|
|
253
|
+
inputSchema: {
|
|
254
|
+
type: "object",
|
|
255
|
+
properties: { calendar: TARGET_CALENDAR_PROP, sharee: SHAREE_PROP },
|
|
256
|
+
required: ["calendar", "sharee"],
|
|
257
|
+
},
|
|
258
|
+
outputSchema: calendarSharingSchema,
|
|
259
|
+
handler: async (args, service, ctx) => {
|
|
260
|
+
const gate = confirmDestructive(ctx, "confirm_unshare_calendar", `Remove ${args.sharee}'s access to calendar "${args.calendar}"?`);
|
|
261
|
+
if (gate.status === "interrupt")
|
|
262
|
+
return gate.result;
|
|
263
|
+
return run(async () => structured({
|
|
264
|
+
calendarId: args.calendar,
|
|
265
|
+
...(await service.changeCalendarShare(args.calendar, args.sharee, null)),
|
|
266
|
+
}));
|
|
267
|
+
},
|
|
268
|
+
},
|
|
194
269
|
];
|
|
195
270
|
//# sourceMappingURL=calendarManagementTools.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendarManagementTools.js","sourceRoot":"","sources":["../../src/tools/calendarManagementTools.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAGL,kBAAkB,EAClB,UAAU,EACV,SAAS,GACV,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"calendarManagementTools.js","sourceRoot":"","sources":["../../src/tools/calendarManagementTools.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAGL,kBAAkB,EAClB,UAAU,EACV,SAAS,GACV,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAExF,KAAK,UAAU,GAAG,CAAC,IAA+B;IAChD,IAAI,CAAC;QACH,OAAO,MAAM,IAAI,EAAE,CAAC;IACtB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;IACxB,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,oBAAoB,GAAG;IAC3B,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,8DAA8D;CACnE,CAAC;AAEX,MAAM,UAAU,GAAG;IACjB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,yDAAyD;CAC9D,CAAC;AAEX,MAAM,aAAa,GAAG;IACpB,IAAI,EAAE,QAAQ;IACd,WAAW,EACT,+JAA+J;CACzJ,CAAC;AAEX,MAAM,UAAU,GAAG;IACjB,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,CAAC;IACV,WAAW,EACT,uKAAuK;CACjK,CAAC;AA2BX,MAAM,WAAW,GAAG;IAClB,IAAI,EAAE,QAAQ;IACd,WAAW,EACT,2JAA2J;CACrJ,CAAC;AAEX,MAAM,qBAAqB,GAAG;IAC5B,YAAY,EAAE,IAAI;IAClB,eAAe,EAAE,KAAK;IACtB,cAAc,EAAE,IAAI;IACpB,aAAa,EAAE,IAAI;CACX,CAAC;AAEX,MAAM,CAAC,MAAM,yBAAyB,GAA4C;IAChF;QACE,IAAI,EAAE,iBAAiB;QACvB,KA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E,MAAM,EAAE,WAAW,EAAE;YACnE,QAAQ,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC;SACjC;QACD,YAAY,EAAE,qBAAqB;QACnC,OAAO,EAAE,KAAK,EAAE,IAA0C,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE;YAC1E,MAAM,IAAI,GAAG,kBAAkB,CAC7B,GAAG,EACH,0BAA0B,EAC1B,UAAU,IAAI,CAAC,MAAM,0BAA0B,IAAI,CAAC,QAAQ,IAAI,CACjE,CAAC;YACF,IAAI,IAAI,CAAC,MAAM,KAAK,WAAW;gBAAE,OAAO,IAAI,CAAC,MAAM,CAAC;YACpD,OAAO,GAAG,CAAC,KAAK,IAAI,EAAE,CACpB,UAAU,CAAC;gBACT,UAAU,EAAE,IAAI,CAAC,QAAQ;gBACzB,GAAG,CAAC,MAAM,OAAO,CAAC,mBAAmB,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;aACzE,CAAC,CACH,CAAC;QACJ,CAAC;KACF;CACF,CAAC"}
|
|
@@ -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,30 +63,34 @@ 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 unavailableProviders: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
78
|
+
readonly provider: v.StringSchema<undefined>;
|
|
79
|
+
readonly error: v.StringSchema<undefined>;
|
|
80
|
+
}, undefined>, undefined>, undefined>;
|
|
77
81
|
}, undefined>;
|
|
78
82
|
export declare const eventListSchema: v.ObjectSchema<{
|
|
79
83
|
readonly events: v.ArraySchema<v.ObjectSchema<{
|
|
80
84
|
readonly uid: v.StringSchema<undefined>;
|
|
81
|
-
readonly
|
|
85
|
+
readonly calendarId: v.StringSchema<undefined>;
|
|
82
86
|
readonly title: v.StringSchema<undefined>;
|
|
83
87
|
readonly start: v.StringSchema<undefined>;
|
|
84
88
|
readonly end: v.StringSchema<undefined>;
|
|
85
|
-
readonly
|
|
89
|
+
readonly allDay: v.BooleanSchema<undefined>;
|
|
86
90
|
readonly location: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
87
91
|
readonly status: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
88
|
-
readonly
|
|
89
|
-
readonly
|
|
92
|
+
readonly isRecurring: v.BooleanSchema<undefined>;
|
|
93
|
+
readonly occurrenceDate: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
90
94
|
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
91
95
|
readonly url: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
92
96
|
readonly availability: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
@@ -101,13 +105,13 @@ export declare const eventListSchema: v.ObjectSchema<{
|
|
|
101
105
|
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
102
106
|
readonly email: v.StringSchema<undefined>;
|
|
103
107
|
}, undefined>, undefined>, undefined>;
|
|
104
|
-
readonly
|
|
108
|
+
readonly recurrenceRule: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
105
109
|
readonly created: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
106
|
-
readonly
|
|
110
|
+
readonly lastModified: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
107
111
|
readonly alarms: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
108
112
|
readonly type: v.PicklistSchema<["relative", "absolute"], undefined>;
|
|
109
113
|
readonly trigger: v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>], undefined>;
|
|
110
|
-
readonly
|
|
114
|
+
readonly triggerHuman: v.StringSchema<undefined>;
|
|
111
115
|
}, undefined>, undefined>, undefined>;
|
|
112
116
|
readonly categories: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
113
117
|
readonly geo: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
@@ -115,19 +119,23 @@ export declare const eventListSchema: v.ObjectSchema<{
|
|
|
115
119
|
readonly longitude: v.NumberSchema<undefined>;
|
|
116
120
|
}, undefined>, undefined>, undefined>;
|
|
117
121
|
}, undefined>, undefined>;
|
|
122
|
+
readonly unavailableProviders: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
123
|
+
readonly provider: v.StringSchema<undefined>;
|
|
124
|
+
readonly error: v.StringSchema<undefined>;
|
|
125
|
+
}, undefined>, undefined>, undefined>;
|
|
118
126
|
}, undefined>;
|
|
119
127
|
export declare const singleEventSchema: v.ObjectSchema<{
|
|
120
128
|
readonly event: v.ObjectSchema<{
|
|
121
129
|
readonly uid: v.StringSchema<undefined>;
|
|
122
|
-
readonly
|
|
130
|
+
readonly calendarId: v.StringSchema<undefined>;
|
|
123
131
|
readonly title: v.StringSchema<undefined>;
|
|
124
132
|
readonly start: v.StringSchema<undefined>;
|
|
125
133
|
readonly end: v.StringSchema<undefined>;
|
|
126
|
-
readonly
|
|
134
|
+
readonly allDay: v.BooleanSchema<undefined>;
|
|
127
135
|
readonly location: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
128
136
|
readonly status: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
129
|
-
readonly
|
|
130
|
-
readonly
|
|
137
|
+
readonly isRecurring: v.BooleanSchema<undefined>;
|
|
138
|
+
readonly occurrenceDate: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
131
139
|
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
132
140
|
readonly url: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
133
141
|
readonly availability: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
@@ -142,13 +150,13 @@ export declare const singleEventSchema: v.ObjectSchema<{
|
|
|
142
150
|
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
143
151
|
readonly email: v.StringSchema<undefined>;
|
|
144
152
|
}, undefined>, undefined>, undefined>;
|
|
145
|
-
readonly
|
|
153
|
+
readonly recurrenceRule: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
146
154
|
readonly created: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
147
|
-
readonly
|
|
155
|
+
readonly lastModified: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
148
156
|
readonly alarms: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
149
157
|
readonly type: v.PicklistSchema<["relative", "absolute"], undefined>;
|
|
150
158
|
readonly trigger: v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>], undefined>;
|
|
151
|
-
readonly
|
|
159
|
+
readonly triggerHuman: v.StringSchema<undefined>;
|
|
152
160
|
}, undefined>, undefined>, undefined>;
|
|
153
161
|
readonly categories: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
154
162
|
readonly geo: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
@@ -165,15 +173,15 @@ export declare const batchCreateSchema: v.ObjectSchema<{
|
|
|
165
173
|
readonly created: v.NumberSchema<undefined>;
|
|
166
174
|
readonly events: v.ArraySchema<v.ObjectSchema<{
|
|
167
175
|
readonly uid: v.StringSchema<undefined>;
|
|
168
|
-
readonly
|
|
176
|
+
readonly calendarId: v.StringSchema<undefined>;
|
|
169
177
|
readonly title: v.StringSchema<undefined>;
|
|
170
178
|
readonly start: v.StringSchema<undefined>;
|
|
171
179
|
readonly end: v.StringSchema<undefined>;
|
|
172
|
-
readonly
|
|
180
|
+
readonly allDay: v.BooleanSchema<undefined>;
|
|
173
181
|
readonly location: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
174
182
|
readonly status: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
175
|
-
readonly
|
|
176
|
-
readonly
|
|
183
|
+
readonly isRecurring: v.BooleanSchema<undefined>;
|
|
184
|
+
readonly occurrenceDate: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
177
185
|
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
178
186
|
readonly url: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
179
187
|
readonly availability: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
@@ -188,13 +196,13 @@ export declare const batchCreateSchema: v.ObjectSchema<{
|
|
|
188
196
|
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
189
197
|
readonly email: v.StringSchema<undefined>;
|
|
190
198
|
}, undefined>, undefined>, undefined>;
|
|
191
|
-
readonly
|
|
199
|
+
readonly recurrenceRule: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
192
200
|
readonly created: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
193
|
-
readonly
|
|
201
|
+
readonly lastModified: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
194
202
|
readonly alarms: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
195
203
|
readonly type: v.PicklistSchema<["relative", "absolute"], undefined>;
|
|
196
204
|
readonly trigger: v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>], undefined>;
|
|
197
|
-
readonly
|
|
205
|
+
readonly triggerHuman: v.StringSchema<undefined>;
|
|
198
206
|
}, undefined>, undefined>, undefined>;
|
|
199
207
|
readonly categories: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
200
208
|
readonly geo: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
@@ -212,15 +220,15 @@ export declare const importResultSchema: v.ObjectSchema<{
|
|
|
212
220
|
}, undefined>, undefined>, undefined>;
|
|
213
221
|
readonly events: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
|
|
214
222
|
readonly uid: v.StringSchema<undefined>;
|
|
215
|
-
readonly
|
|
223
|
+
readonly calendarId: v.StringSchema<undefined>;
|
|
216
224
|
readonly title: v.StringSchema<undefined>;
|
|
217
225
|
readonly start: v.StringSchema<undefined>;
|
|
218
226
|
readonly end: v.StringSchema<undefined>;
|
|
219
|
-
readonly
|
|
227
|
+
readonly allDay: v.BooleanSchema<undefined>;
|
|
220
228
|
readonly location: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
221
229
|
readonly status: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
222
|
-
readonly
|
|
223
|
-
readonly
|
|
230
|
+
readonly isRecurring: v.BooleanSchema<undefined>;
|
|
231
|
+
readonly occurrenceDate: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
224
232
|
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
225
233
|
readonly url: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
226
234
|
readonly availability: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
@@ -235,13 +243,13 @@ export declare const importResultSchema: v.ObjectSchema<{
|
|
|
235
243
|
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
236
244
|
readonly email: v.StringSchema<undefined>;
|
|
237
245
|
}, undefined>, undefined>, undefined>;
|
|
238
|
-
readonly
|
|
246
|
+
readonly recurrenceRule: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
239
247
|
readonly created: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
240
|
-
readonly
|
|
248
|
+
readonly lastModified: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
241
249
|
readonly alarms: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
242
250
|
readonly type: v.PicklistSchema<["relative", "absolute"], undefined>;
|
|
243
251
|
readonly trigger: v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>], undefined>;
|
|
244
|
-
readonly
|
|
252
|
+
readonly triggerHuman: v.StringSchema<undefined>;
|
|
245
253
|
}, undefined>, undefined>, undefined>;
|
|
246
254
|
readonly categories: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
247
255
|
readonly geo: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
@@ -273,14 +281,28 @@ export declare const freeBusySchema: v.ObjectSchema<{
|
|
|
273
281
|
readonly sources: v.RecordSchema<v.StringSchema<undefined>, v.PicklistSchema<["server", "computed"], undefined>, undefined>;
|
|
274
282
|
}, undefined>;
|
|
275
283
|
/**
|
|
276
|
-
* Result of the three collection-management tools. `
|
|
284
|
+
* Result of the three collection-management tools. `calendarId` is always the
|
|
277
285
|
* post-operation ID, so a rename hands back the ID that resolves from now on
|
|
278
286
|
* rather than the one the caller passed in.
|
|
279
287
|
*/
|
|
280
288
|
export declare const calendarWriteResultSchema: v.ObjectSchema<{
|
|
281
289
|
readonly status: v.PicklistSchema<["created", "updated", "deleted"], undefined>;
|
|
282
|
-
readonly
|
|
290
|
+
readonly calendarId: v.StringSchema<undefined>;
|
|
283
291
|
readonly url: v.StringSchema<undefined>;
|
|
284
|
-
readonly
|
|
292
|
+
readonly displayName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
293
|
+
}, undefined>;
|
|
294
|
+
/** get_calendar_sharing, share_calendar and unshare_calendar (#47). */
|
|
295
|
+
export declare const calendarSharingSchema: v.ObjectSchema<{
|
|
296
|
+
readonly calendarId: v.StringSchema<undefined>;
|
|
297
|
+
readonly canBeShared: v.BooleanSchema<undefined>;
|
|
298
|
+
readonly canBePublished: v.BooleanSchema<undefined>;
|
|
299
|
+
readonly protocol: v.NullableSchema<v.PicklistSchema<["calendarserver", "owncloud", "webdav"], undefined>, undefined>;
|
|
300
|
+
readonly shares: v.ArraySchema<v.ObjectSchema<{
|
|
301
|
+
readonly email: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
302
|
+
readonly principal: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
303
|
+
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
304
|
+
readonly access: v.PicklistSchema<["read", "read-write"], undefined>;
|
|
305
|
+
readonly status: v.PicklistSchema<["accepted", "pending", "declined", "invalid"], undefined>;
|
|
306
|
+
}, undefined>, undefined>;
|
|
285
307
|
}, undefined>;
|
|
286
308
|
//# sourceMappingURL=calendarSchemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendarSchemas.d.ts","sourceRoot":"","sources":["../../src/tools/calendarSchemas.ts"],"names":[],"mapp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