@notionhq/apps 0.0.27 → 0.0.29
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/AGENTS.md +106 -9
- package/dist/calendar.generated.d.ts +1908 -680
- package/dist/calendar.generated.d.ts.map +1 -1
- package/dist/calendar.generated.js +27 -0
- package/dist/connection-trigger-definitions.generated.d.ts +12 -0
- package/dist/connection-trigger-definitions.generated.d.ts.map +1 -1
- package/dist/connection-trigger-definitions.generated.js +15 -0
- package/dist/connections.d.ts +1 -0
- package/dist/connections.d.ts.map +1 -1
- package/dist/mail.generated.d.ts +4590 -0
- package/dist/mail.generated.d.ts.map +1 -0
- package/dist/mail.generated.js +252 -0
- package/dist/providers.generated.d.ts +4 -0
- package/dist/providers.generated.d.ts.map +1 -1
- package/dist/providers.generated.js +7 -0
- package/dist/triggers.generated.d.ts +34 -16
- package/dist/triggers.generated.d.ts.map +1 -1
- package/dist/triggers.generated.js +12 -9
- package/docs/CONNECTIONS.md +38 -3
- package/package.json +1 -1
- package/skills/connections/SKILL.md +3 -0
- package/src/calendar.generated.ts +2033 -737
- package/src/connection-trigger-definitions.generated.ts +18 -0
- package/src/connections.test.ts +35 -0
- package/src/mail.generated.ts +5095 -0
- package/src/providers.generated.ts +8 -0
- package/src/triggers.generated.ts +27 -18
- package/src/workflow-connections-types.test.ts +16 -0
|
@@ -1,131 +1,221 @@
|
|
|
1
1
|
// Generated by notion tool-core codegen-script-types --connections. Do not edit.
|
|
2
2
|
import type { ConnectionActionInvoker } from "./connection-actions.js"
|
|
3
3
|
/**
|
|
4
|
-
* Script input for the "
|
|
4
|
+
* Script input for the "Cancel calendar events." effect (`calendar.cancelEvents`),
|
|
5
5
|
* derived from its Tool Core definition's call_function input projection.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* Only works with Google Workspace accounts that have admin permissions to view calendar resources.
|
|
10
|
-
* Use this tool to find rooms when creating in-person meetings.
|
|
11
|
-
* Pass multiple meeting times in timeSlots to get available rooms for each time slot independently.
|
|
7
|
+
* If the event has an organizer and it's not the user, then it cannot be canceled but we can update the user's response with another tool.
|
|
8
|
+
* If the event has attendees, they will receive a notification of the cancellation.
|
|
12
9
|
*/
|
|
13
|
-
export type
|
|
10
|
+
export type CancelEventsScriptInput = {
|
|
14
11
|
/**
|
|
15
|
-
*
|
|
12
|
+
* Events to cancel.
|
|
16
13
|
*/
|
|
17
|
-
|
|
14
|
+
events: Array<{
|
|
18
15
|
/**
|
|
19
|
-
*
|
|
16
|
+
* Calendar containing the event.
|
|
20
17
|
*/
|
|
21
|
-
|
|
18
|
+
calendar: {
|
|
19
|
+
/**
|
|
20
|
+
* Account that owns the event calendar.
|
|
21
|
+
*/
|
|
22
|
+
accountId: string
|
|
23
|
+
/**
|
|
24
|
+
* Event calendar identifier within the account.
|
|
25
|
+
*/
|
|
26
|
+
calendarId: string
|
|
27
|
+
}
|
|
22
28
|
/**
|
|
23
|
-
*
|
|
29
|
+
* Identifier of the event to cancel.
|
|
24
30
|
*/
|
|
25
|
-
|
|
31
|
+
eventId: string
|
|
32
|
+
/**
|
|
33
|
+
* Optional summary of the event, used by agent UI.
|
|
34
|
+
*/
|
|
35
|
+
eventSummary?: string
|
|
26
36
|
}>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
*/
|
|
42
|
-
timeZone: string
|
|
43
|
-
/**
|
|
44
|
-
* Calendar of the event the rooms will be attached to. Rooms are scoped to a single account.
|
|
45
|
-
*/
|
|
46
|
-
calendar?: {
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Canonical Tool Core output for the "Cancel calendar events." effect (`calendar.cancelEvents`).
|
|
41
|
+
* This is the definition's output schema; the effect's script surface may
|
|
42
|
+
* re-encode it before returning.
|
|
43
|
+
*/
|
|
44
|
+
export type CancelEventsScriptOutput = {
|
|
45
|
+
canceledEvents: Array<{
|
|
46
|
+
calendar: {
|
|
47
|
+
accountId: string
|
|
48
|
+
calendarId: string
|
|
49
|
+
}
|
|
50
|
+
eventId: string
|
|
47
51
|
/**
|
|
48
|
-
*
|
|
52
|
+
* Optional summary of the event, used by agent UI.
|
|
49
53
|
*/
|
|
50
|
-
|
|
54
|
+
eventSummary?: string
|
|
55
|
+
}>
|
|
56
|
+
errors?: Array<{
|
|
51
57
|
/**
|
|
52
|
-
*
|
|
58
|
+
* An identifier for the item that failed (e.g., event summary for creation, event ID for updates/cancellations)
|
|
53
59
|
*/
|
|
54
|
-
|
|
55
|
-
|
|
60
|
+
identifier: string
|
|
61
|
+
/**
|
|
62
|
+
* Description of the error that occurred
|
|
63
|
+
*/
|
|
64
|
+
errorMessage: string
|
|
65
|
+
}>
|
|
56
66
|
}
|
|
57
67
|
|
|
58
68
|
/**
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
69
|
+
* Script input for the "Create calendar events." effect (`calendar.createEvents`),
|
|
70
|
+
* derived from its Tool Core definition's call_function input projection.
|
|
71
|
+
*
|
|
72
|
+
* Events can be created on different calendars.
|
|
62
73
|
*/
|
|
63
|
-
export type
|
|
74
|
+
export type CreateEventsScriptInput = {
|
|
64
75
|
/**
|
|
65
|
-
*
|
|
76
|
+
* Date-times of returned events will be expressed in this time-zone
|
|
66
77
|
*/
|
|
67
|
-
|
|
78
|
+
timeZone: string
|
|
79
|
+
/**
|
|
80
|
+
* Events to create.
|
|
81
|
+
*/
|
|
82
|
+
events: Array<{
|
|
68
83
|
/**
|
|
69
|
-
*
|
|
84
|
+
* Title of the event.
|
|
70
85
|
*/
|
|
71
|
-
|
|
72
|
-
startAt: string
|
|
73
|
-
endAt: string
|
|
74
|
-
}
|
|
86
|
+
summary: string
|
|
75
87
|
/**
|
|
76
|
-
*
|
|
88
|
+
* Description of the event.
|
|
77
89
|
*/
|
|
78
|
-
|
|
90
|
+
description?: string
|
|
91
|
+
/**
|
|
92
|
+
* Physical location where the event takes place, or remote conference link/info.
|
|
93
|
+
*/
|
|
94
|
+
location?: string
|
|
95
|
+
/**
|
|
96
|
+
* Recurrence rules in RRULE format (e.g., ['RRULE:FREQ=WEEKLY;COUNT=10']). Can also include EXDATE for exception dates (e.g., ['RRULE:FREQ=WEEKLY;COUNT=10', 'EXDATE:2026-03-24T13:00:00']).
|
|
97
|
+
*/
|
|
98
|
+
recurrenceRules?: Array<string>
|
|
99
|
+
/**
|
|
100
|
+
* When the event is happening
|
|
101
|
+
*/
|
|
102
|
+
period:
|
|
103
|
+
| {
|
|
104
|
+
/**
|
|
105
|
+
* Whether the event period uses all-day dates or date-times.
|
|
106
|
+
*/
|
|
107
|
+
type: "DATE"
|
|
108
|
+
/**
|
|
109
|
+
* Start of the event.
|
|
110
|
+
*/
|
|
111
|
+
start: {
|
|
112
|
+
/**
|
|
113
|
+
* Date in ISO 8601 format (no time)
|
|
114
|
+
*/
|
|
115
|
+
date: string
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* End of the event.
|
|
119
|
+
*/
|
|
120
|
+
end: {
|
|
121
|
+
/**
|
|
122
|
+
* Date in ISO 8601 format (no time)
|
|
123
|
+
*/
|
|
124
|
+
date: string
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
| {
|
|
128
|
+
/**
|
|
129
|
+
* Whether the event period uses all-day dates or date-times.
|
|
130
|
+
*/
|
|
131
|
+
type: "DATE_TIME"
|
|
132
|
+
/**
|
|
133
|
+
* Start of the event.
|
|
134
|
+
*/
|
|
135
|
+
start: {
|
|
136
|
+
/**
|
|
137
|
+
* Date-time in ISO 8601 format, in UTC (ending with Z), or with TZ offset, or without TZ offset if `timeZone` is specified in which case will be interpreted as local time in that timeZone
|
|
138
|
+
*/
|
|
139
|
+
dateTime: string
|
|
140
|
+
/**
|
|
141
|
+
* IANA time zone for the event start date-time.
|
|
142
|
+
*/
|
|
143
|
+
timeZone?: string
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* End of the event.
|
|
147
|
+
*/
|
|
148
|
+
end: {
|
|
149
|
+
/**
|
|
150
|
+
* Date-time in ISO 8601 format, in UTC (ending with Z), or with TZ offset, or without TZ offset if `timeZone` is specified in which case will be interpreted as local time in that timeZone
|
|
151
|
+
*/
|
|
152
|
+
dateTime: string
|
|
153
|
+
/**
|
|
154
|
+
* IANA time zone for the event end date-time.
|
|
155
|
+
*/
|
|
156
|
+
timeZone?: string
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Attendees to invite to the event
|
|
161
|
+
*/
|
|
162
|
+
attendees?: Array<{
|
|
79
163
|
/**
|
|
80
|
-
*
|
|
164
|
+
* Email address of the attendee.
|
|
81
165
|
*/
|
|
82
|
-
|
|
166
|
+
email: string
|
|
83
167
|
/**
|
|
84
|
-
*
|
|
168
|
+
* Totally optional, provide only if you are sure of the attendee's name
|
|
85
169
|
*/
|
|
86
|
-
|
|
170
|
+
displayName?: string
|
|
87
171
|
/**
|
|
88
|
-
*
|
|
172
|
+
* Set only if the user was explicit about an attendee not being required
|
|
89
173
|
*/
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
174
|
+
isOptional?: boolean
|
|
175
|
+
}>
|
|
176
|
+
/**
|
|
177
|
+
* Resources (such as rooms) to invite to the event. Must be from the same account as `event.calendar`.
|
|
178
|
+
*/
|
|
179
|
+
resources?: Array<{
|
|
94
180
|
/**
|
|
95
|
-
*
|
|
181
|
+
* Email address of the resource.
|
|
96
182
|
*/
|
|
97
|
-
|
|
183
|
+
email?: string
|
|
98
184
|
/**
|
|
99
|
-
*
|
|
185
|
+
* Display name of the resource.
|
|
100
186
|
*/
|
|
101
|
-
|
|
187
|
+
displayName?: string
|
|
102
188
|
/**
|
|
103
|
-
*
|
|
189
|
+
* Set only if the user was explicit about a resource not being required
|
|
104
190
|
*/
|
|
105
|
-
|
|
191
|
+
isOptional: boolean
|
|
106
192
|
}>
|
|
193
|
+
/**
|
|
194
|
+
* Will create the event on the primary, default calendar if not specified.
|
|
195
|
+
*/
|
|
196
|
+
calendar?: {
|
|
197
|
+
/**
|
|
198
|
+
* Account that owns the target calendar.
|
|
199
|
+
*/
|
|
200
|
+
accountId: string
|
|
201
|
+
/**
|
|
202
|
+
* Target calendar identifier within the account.
|
|
203
|
+
*/
|
|
204
|
+
calendarId: string
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Whether to disable conferencing for this event.
|
|
208
|
+
*/
|
|
209
|
+
disableConferencing?: boolean
|
|
107
210
|
}>
|
|
108
211
|
}
|
|
109
212
|
|
|
110
213
|
/**
|
|
111
|
-
*
|
|
112
|
-
* derived from its Tool Core definition's call_function input projection.
|
|
113
|
-
*
|
|
114
|
-
* List of calendars grouped by account.
|
|
115
|
-
*/
|
|
116
|
-
export type ListCalendarsScriptInput = {
|
|
117
|
-
/**
|
|
118
|
-
* Return only accounts linked to these email addresses. Useful to get calendars from a work account only for example. Do not specify if you are interested in getting the whole picture of someone's agenda across work and personal accounts.
|
|
119
|
-
*/
|
|
120
|
-
onlyAccountEmails?: Array<string>
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Canonical Tool Core output for the "Fetch list of calendars of the user." effect (`calendar.listCalendars`).
|
|
214
|
+
* Canonical Tool Core output for the "Create calendar events." effect (`calendar.createEvents`).
|
|
125
215
|
* This is the definition's output schema; the effect's script surface may
|
|
126
216
|
* re-encode it before returning.
|
|
127
217
|
*/
|
|
128
|
-
export type
|
|
218
|
+
export type CreateEventsScriptOutput = {
|
|
129
219
|
accounts: Array<{
|
|
130
220
|
accountId: string
|
|
131
221
|
/**
|
|
@@ -194,144 +284,1373 @@ export type ListCalendarsScriptOutput = {
|
|
|
194
284
|
* The email address of the owner of this calendar.
|
|
195
285
|
*/
|
|
196
286
|
ownerEmail?: string
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
* List the user's contacts from different accounts. Returns contact information including email addresses, names, phone numbers, and profile photos.
|
|
206
|
-
*/
|
|
207
|
-
export type ListContactsScriptInput = {
|
|
208
|
-
/**
|
|
209
|
-
* Optional search queries to filter contacts by name or email. Results matching any query are included.
|
|
210
|
-
*/
|
|
211
|
-
queries?: Array<string>
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* Canonical Tool Core output for the "List contacts" effect (`calendar.listContacts`).
|
|
216
|
-
* This is the definition's output schema; the effect's script surface may
|
|
217
|
-
* re-encode it before returning.
|
|
218
|
-
*/
|
|
219
|
-
export type ListContactsScriptOutput = {
|
|
220
|
-
accounts: Array<{
|
|
221
|
-
accountId: string
|
|
222
|
-
/**
|
|
223
|
-
* Google, Apple iCloud, Outlook, etc.
|
|
224
|
-
*/
|
|
225
|
-
providerName: string
|
|
226
|
-
/**
|
|
227
|
-
* The user email associated with this account. Useful to know if this account and its data should be used depending on context.
|
|
228
|
-
*/
|
|
229
|
-
email?: string
|
|
230
|
-
/**
|
|
231
|
-
* Whether this account is work-related or a personal account, if we know this information.
|
|
232
|
-
*/
|
|
233
|
-
category?: "work" | "personal"
|
|
234
|
-
capabilities: {
|
|
235
|
-
/**
|
|
236
|
-
* Does this account expose any calendars?
|
|
237
|
-
*/
|
|
238
|
-
readCalendars: boolean
|
|
239
|
-
/**
|
|
240
|
-
* Can we read calendar events from calendars of this account?
|
|
241
|
-
*/
|
|
242
|
-
readEvents: boolean
|
|
243
|
-
/**
|
|
244
|
-
* Can we write events in some calendars of this account? Calendars themselves might have their own set of restrictions.
|
|
245
|
-
*/
|
|
246
|
-
writeEvents: boolean
|
|
247
|
-
/**
|
|
248
|
-
* Can we use a text search query to find events in the calendars of this account?
|
|
249
|
-
*/
|
|
250
|
-
searchEvents: boolean
|
|
251
|
-
/**
|
|
252
|
-
* Does this account expose contacts?
|
|
253
|
-
*/
|
|
254
|
-
readContacts: boolean
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* User can access the events of co-workers having an email address with one of these domains
|
|
258
|
-
*/
|
|
259
|
-
coworkersEmailDomains?: Array<string>
|
|
260
|
-
contacts: Array<{
|
|
261
|
-
/**
|
|
262
|
-
* Unique identifier for the contact
|
|
263
|
-
*/
|
|
264
|
-
id: string
|
|
265
|
-
/**
|
|
266
|
-
* Primary email address of the contact
|
|
267
|
-
*/
|
|
268
|
-
email: string
|
|
269
|
-
/**
|
|
270
|
-
* Additional email addresses for this contact
|
|
271
|
-
*/
|
|
272
|
-
alternateEmails?: Array<string>
|
|
273
|
-
/**
|
|
274
|
-
* Display name of the contact
|
|
275
|
-
*/
|
|
276
|
-
displayName?: string
|
|
277
|
-
/**
|
|
278
|
-
* Phone numbers associated with this contact
|
|
279
|
-
*/
|
|
280
|
-
phoneNumbers?: Array<{
|
|
287
|
+
createdEvents: Array<{
|
|
288
|
+
calendar: {
|
|
289
|
+
accountId: string
|
|
290
|
+
calendarId: string
|
|
291
|
+
}
|
|
292
|
+
eventId: string
|
|
293
|
+
summary: string
|
|
294
|
+
description?: string
|
|
281
295
|
/**
|
|
282
|
-
*
|
|
296
|
+
* Physical location where the event takes place, or remote conference link/info.
|
|
283
297
|
*/
|
|
284
|
-
|
|
298
|
+
location?: string
|
|
285
299
|
/**
|
|
286
|
-
*
|
|
300
|
+
* Recurrence rules in RRULE format (e.g., ['RRULE:FREQ=WEEKLY;COUNT=10']). Can also include EXDATE for exception dates (e.g., ['RRULE:FREQ=WEEKLY;COUNT=10', 'EXDATE:2026-03-24T13:00:00']).
|
|
287
301
|
*/
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
302
|
+
recurrenceRules?: Array<string>
|
|
303
|
+
/**
|
|
304
|
+
* The data provider this event belongs to
|
|
305
|
+
*/
|
|
306
|
+
provider?: "google" | "notion" | "icloud" | "outlook"
|
|
307
|
+
/**
|
|
308
|
+
* The URL to view the event in the Calendar app.
|
|
309
|
+
*/
|
|
310
|
+
webUrl: string
|
|
311
|
+
/**
|
|
312
|
+
* When the event is happening
|
|
313
|
+
*/
|
|
314
|
+
period:
|
|
315
|
+
| {
|
|
316
|
+
type: "DATE"
|
|
317
|
+
start: {
|
|
318
|
+
/**
|
|
319
|
+
* Date in ISO 8601 format (no time)
|
|
320
|
+
*/
|
|
321
|
+
date: string
|
|
322
|
+
}
|
|
323
|
+
end: {
|
|
324
|
+
/**
|
|
325
|
+
* Date in ISO 8601 format (no time)
|
|
326
|
+
*/
|
|
327
|
+
date: string
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
| {
|
|
331
|
+
type: "DATE_TIME"
|
|
332
|
+
start: {
|
|
333
|
+
/**
|
|
334
|
+
* Date-time in ISO 8601 format, in UTC (ending with Z), or with TZ offset
|
|
335
|
+
*/
|
|
336
|
+
dateTime: string
|
|
337
|
+
timeZone?: string
|
|
338
|
+
}
|
|
339
|
+
end: {
|
|
340
|
+
/**
|
|
341
|
+
* Date-time in ISO 8601 format, in UTC (ending with Z), or with TZ offset
|
|
342
|
+
*/
|
|
343
|
+
dateTime: string
|
|
344
|
+
timeZone?: string
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Whether it's part of a recurring event series
|
|
349
|
+
*/
|
|
350
|
+
isRecurring: boolean
|
|
351
|
+
/**
|
|
352
|
+
* If true, the event does not block time on the calendar. This is equivalent to setting `Show me as to Available` in the Calendar UI.
|
|
353
|
+
*/
|
|
354
|
+
isTransparent: boolean
|
|
355
|
+
/**
|
|
356
|
+
* Is the event an auto-blocking event created from another event? Used to create blocked events on a calendar from events on another calendar. You can ignore auto-blocked events if there are events happening at the exact same time on other calendars.
|
|
357
|
+
*/
|
|
358
|
+
isAutoBlock: boolean
|
|
359
|
+
/**
|
|
360
|
+
* What kind of event is it? Standard, out of office, birthday...
|
|
361
|
+
*/
|
|
362
|
+
eventType?:
|
|
363
|
+
| "fromGmail"
|
|
364
|
+
| "default"
|
|
365
|
+
| "focusTime"
|
|
366
|
+
| "outOfOffice"
|
|
367
|
+
| "birthday"
|
|
368
|
+
| "availability"
|
|
369
|
+
/**
|
|
370
|
+
* Is an event confirmed, tentative or cancelled? This is different from the user's RSVP
|
|
371
|
+
*/
|
|
372
|
+
eventStatus?: "confirmed" | "tentative" | "cancelled"
|
|
373
|
+
/**
|
|
374
|
+
* Whether it's a meeting, aka an event with attendees listed
|
|
375
|
+
*/
|
|
376
|
+
isMeeting: boolean
|
|
377
|
+
conferencingEntryPoints?: Array<{
|
|
378
|
+
uri: string
|
|
379
|
+
accessCode?: string
|
|
380
|
+
entryPointType?: "video" | "phone" | "sip" | "more"
|
|
381
|
+
label?: string
|
|
382
|
+
meetingCode?: string
|
|
383
|
+
passcode?: string
|
|
384
|
+
password?: string
|
|
385
|
+
pin?: string
|
|
386
|
+
notes?: string
|
|
387
|
+
signature?: string
|
|
388
|
+
}>
|
|
389
|
+
/**
|
|
390
|
+
* The URL to join the video conference, if available
|
|
391
|
+
*/
|
|
392
|
+
conferencingUrl?: string
|
|
393
|
+
/**
|
|
394
|
+
* The calendar user's RSVP status
|
|
395
|
+
*/
|
|
396
|
+
responseStatus?: "needsAction" | "accepted" | "declined" | "tentative"
|
|
397
|
+
creator?: {
|
|
398
|
+
/**
|
|
399
|
+
* Whether this entry represents the calendar user
|
|
400
|
+
*/
|
|
401
|
+
isSelf: boolean
|
|
402
|
+
displayName?: string
|
|
403
|
+
email?: string
|
|
404
|
+
}
|
|
405
|
+
organizer?: {
|
|
406
|
+
/**
|
|
407
|
+
* Whether this entry represents the calendar user
|
|
408
|
+
*/
|
|
409
|
+
isSelf: boolean
|
|
410
|
+
displayName?: string
|
|
411
|
+
email?: string
|
|
412
|
+
}
|
|
413
|
+
attendees?: Array<{
|
|
414
|
+
/**
|
|
415
|
+
* Whether this entry represents the calendar user
|
|
416
|
+
*/
|
|
417
|
+
isSelf: boolean
|
|
418
|
+
displayName?: string
|
|
419
|
+
email?: string
|
|
420
|
+
isOptional: boolean
|
|
421
|
+
isOrganizer?: boolean
|
|
422
|
+
/**
|
|
423
|
+
* The calendar user's RSVP status
|
|
424
|
+
*/
|
|
425
|
+
responseStatus?: "needsAction" | "accepted" | "declined" | "tentative"
|
|
426
|
+
}>
|
|
427
|
+
resources?: Array<{
|
|
428
|
+
displayName?: string
|
|
429
|
+
email?: string
|
|
430
|
+
isOptional: boolean
|
|
431
|
+
/**
|
|
432
|
+
* The calendar user's RSVP status
|
|
433
|
+
*/
|
|
434
|
+
responseStatus?: "needsAction" | "accepted" | "declined" | "tentative"
|
|
435
|
+
}>
|
|
436
|
+
colors?: {
|
|
437
|
+
foreground?: string
|
|
438
|
+
background?: string
|
|
439
|
+
}
|
|
440
|
+
attachments?: Array<{
|
|
441
|
+
url: string
|
|
442
|
+
mimeType?: string
|
|
443
|
+
title?: string
|
|
444
|
+
notionWorkspaceId?: string
|
|
445
|
+
}>
|
|
446
|
+
}>
|
|
447
|
+
}>
|
|
448
|
+
}>
|
|
449
|
+
errors?: Array<{
|
|
450
|
+
/**
|
|
451
|
+
* An identifier for the item that failed (e.g., event summary for creation, event ID for updates/cancellations)
|
|
452
|
+
*/
|
|
453
|
+
identifier: string
|
|
454
|
+
/**
|
|
455
|
+
* Description of the error that occurred
|
|
456
|
+
*/
|
|
457
|
+
errorMessage: string
|
|
458
|
+
}>
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* Script input for the "Create a scheduling link" effect (`calendar.createSchedulingLink`),
|
|
463
|
+
* derived from its Tool Core definition's call_function input projection.
|
|
464
|
+
*
|
|
465
|
+
* Create a scheduling link (booking page) so others can book time on the user's calendar during specified availability windows.
|
|
466
|
+
*/
|
|
467
|
+
export type CreateSchedulingLinkScriptInput = {
|
|
468
|
+
/**
|
|
469
|
+
* Calendar where meetings booked through this scheduling link will be created
|
|
470
|
+
*/
|
|
471
|
+
bookingCalendar: {
|
|
472
|
+
/**
|
|
473
|
+
* Account that owns the booking calendar.
|
|
474
|
+
*/
|
|
475
|
+
accountId: string
|
|
476
|
+
/**
|
|
477
|
+
* Booking calendar identifier within the account.
|
|
478
|
+
*/
|
|
479
|
+
calendarId: string
|
|
480
|
+
}
|
|
481
|
+
/**
|
|
482
|
+
* Calendars to check for conflicts when determining available time slots. Events on these calendars will block booking availability.
|
|
483
|
+
*/
|
|
484
|
+
conflictCalendars?: Array<{
|
|
485
|
+
/**
|
|
486
|
+
* Account that owns the conflict calendar.
|
|
487
|
+
*/
|
|
488
|
+
accountId: string
|
|
489
|
+
/**
|
|
490
|
+
* Conflict calendar identifier within the account.
|
|
491
|
+
*/
|
|
492
|
+
calendarId: string
|
|
493
|
+
}>
|
|
494
|
+
/**
|
|
495
|
+
* Title of the scheduling link, shown on the booking page
|
|
496
|
+
*/
|
|
497
|
+
title?: string
|
|
498
|
+
/**
|
|
499
|
+
* Description shown to invitees on the booking page
|
|
500
|
+
*/
|
|
501
|
+
description?: string
|
|
502
|
+
/**
|
|
503
|
+
* Meeting duration in minutes
|
|
504
|
+
*/
|
|
505
|
+
duration: number
|
|
506
|
+
/**
|
|
507
|
+
* Time windows when the user is available for bookings
|
|
508
|
+
*/
|
|
509
|
+
timeRanges: Array<{
|
|
510
|
+
/**
|
|
511
|
+
* Start of availability window in ISO 8601 format with timezone offset, e.g. '2024-08-22T09:00:00-04:00'
|
|
512
|
+
*/
|
|
513
|
+
startDate: string
|
|
514
|
+
/**
|
|
515
|
+
* End of availability window in ISO 8601 format with timezone offset, e.g. '2024-08-22T17:00:00-04:00'
|
|
516
|
+
*/
|
|
517
|
+
endDate: string
|
|
518
|
+
/**
|
|
519
|
+
* Recurrence rules in RRULE format (e.g., ['RRULE:FREQ=WEEKLY;COUNT=10']). Can also include EXDATE for exception dates (e.g., ['RRULE:FREQ=WEEKLY;COUNT=10', 'EXDATE:2026-03-24T13:00:00']).
|
|
520
|
+
*/
|
|
521
|
+
recurrence?: Array<string>
|
|
522
|
+
}>
|
|
523
|
+
/**
|
|
524
|
+
* Type of scheduling link: 'singleUse' (one booking only), 'multiUse' (multiple bookings), 'recurring' (repeating weekly availability). Inferred from timeRanges if not provided.
|
|
525
|
+
*/
|
|
526
|
+
type?: "singleUse" | "multiUse" | "recurring"
|
|
527
|
+
/**
|
|
528
|
+
* Custom URL slug for the scheduling link (letters, numbers, hyphens, underscores only). Must be between 1 and 32 characters. Auto-generated if not provided.
|
|
529
|
+
*/
|
|
530
|
+
alias?: string
|
|
531
|
+
/**
|
|
532
|
+
* If true (default), uses the user's default video conferencing provider
|
|
533
|
+
*/
|
|
534
|
+
useDefaultConferencing?: boolean
|
|
535
|
+
/**
|
|
536
|
+
* Minimum notice period in minutes before a meeting can be booked
|
|
537
|
+
*/
|
|
538
|
+
minLeadTime?: number
|
|
539
|
+
/**
|
|
540
|
+
* Maximum advance booking window in minutes (how far into the future meetings can be booked)
|
|
541
|
+
*/
|
|
542
|
+
maxLeadTime?: number
|
|
543
|
+
/**
|
|
544
|
+
* ISO 8601 date-time when this scheduling link expires and can no longer accept bookings
|
|
545
|
+
*/
|
|
546
|
+
expirationDate?: string
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* Canonical Tool Core output for the "Create a scheduling link" effect (`calendar.createSchedulingLink`).
|
|
551
|
+
* This is the definition's output schema; the effect's script surface may
|
|
552
|
+
* re-encode it before returning.
|
|
553
|
+
*/
|
|
554
|
+
export type CreateSchedulingLinkScriptOutput = {
|
|
555
|
+
/**
|
|
556
|
+
* The created scheduling link
|
|
557
|
+
*/
|
|
558
|
+
schedulingLink?: {
|
|
559
|
+
/**
|
|
560
|
+
* Unique ID of the created scheduling link
|
|
561
|
+
*/
|
|
562
|
+
id: string
|
|
563
|
+
/**
|
|
564
|
+
* Short ID used in the scheduling link URL
|
|
565
|
+
*/
|
|
566
|
+
shortId: string
|
|
567
|
+
/**
|
|
568
|
+
* Current booking calendar for this scheduling link
|
|
569
|
+
*/
|
|
570
|
+
bookingCalendarRef: {
|
|
571
|
+
accountId: string
|
|
572
|
+
calendarId: string
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* Custom URL slug for the scheduling link
|
|
576
|
+
*/
|
|
577
|
+
alias?: string
|
|
578
|
+
/**
|
|
579
|
+
* The resolved type of the link
|
|
580
|
+
*/
|
|
581
|
+
type?: "singleUse" | "multiUse" | "recurring"
|
|
582
|
+
/**
|
|
583
|
+
* Status of the scheduling link
|
|
584
|
+
*/
|
|
585
|
+
status: string
|
|
586
|
+
title?: string
|
|
587
|
+
description?: string
|
|
588
|
+
duration?: number
|
|
589
|
+
/**
|
|
590
|
+
* Full URL where invitees can book a meeting
|
|
591
|
+
*/
|
|
592
|
+
schedulingLinkUrl?: string
|
|
593
|
+
timeRanges: Array<{
|
|
594
|
+
/**
|
|
595
|
+
* Start of availability window in ISO 8601 format with timezone offset, e.g. '2024-08-22T09:00:00-04:00'
|
|
596
|
+
*/
|
|
597
|
+
startDate: string
|
|
598
|
+
/**
|
|
599
|
+
* End of availability window in ISO 8601 format with timezone offset, e.g. '2024-08-22T17:00:00-04:00'
|
|
600
|
+
*/
|
|
601
|
+
endDate: string
|
|
602
|
+
/**
|
|
603
|
+
* Recurrence rules in RRULE format (e.g., ['RRULE:FREQ=WEEKLY;COUNT=10']). Can also include EXDATE for exception dates (e.g., ['RRULE:FREQ=WEEKLY;COUNT=10', 'EXDATE:2026-03-24T13:00:00']).
|
|
604
|
+
*/
|
|
605
|
+
recurrence?: Array<string>
|
|
606
|
+
/**
|
|
607
|
+
* Unique identifier for this time range
|
|
608
|
+
*/
|
|
609
|
+
id: string
|
|
610
|
+
}>
|
|
611
|
+
}
|
|
612
|
+
errors?: Array<{
|
|
613
|
+
/**
|
|
614
|
+
* An identifier for the item that failed (e.g., event summary for creation, event ID for updates/cancellations)
|
|
615
|
+
*/
|
|
616
|
+
identifier: string
|
|
617
|
+
/**
|
|
618
|
+
* Description of the error that occurred
|
|
619
|
+
*/
|
|
620
|
+
errorMessage: string
|
|
621
|
+
}>
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* Script input for the "Delete scheduling links." effect (`calendar.deleteSchedulingLinks`),
|
|
626
|
+
* derived from its Tool Core definition's call_function input projection.
|
|
627
|
+
*
|
|
628
|
+
* Delete scheduling links so they can no longer be booked. Existing meetings created from the links are not canceled.
|
|
629
|
+
*/
|
|
630
|
+
export type DeleteSchedulingLinksScriptInput = {
|
|
631
|
+
/**
|
|
632
|
+
* Scheduling links to delete
|
|
633
|
+
*/
|
|
634
|
+
schedulingLinks: Array<{
|
|
635
|
+
/**
|
|
636
|
+
* ID of the scheduling link to delete
|
|
637
|
+
*/
|
|
638
|
+
schedulingLinkId: string
|
|
639
|
+
/**
|
|
640
|
+
* Current booking calendar for this scheduling link. Used to verify the link's existing calendar before deleting it.
|
|
641
|
+
*/
|
|
642
|
+
bookingCalendarRef: {
|
|
643
|
+
/**
|
|
644
|
+
* Account that owns the current booking calendar.
|
|
645
|
+
*/
|
|
646
|
+
accountId: string
|
|
647
|
+
/**
|
|
648
|
+
* Current booking calendar identifier within the account.
|
|
649
|
+
*/
|
|
650
|
+
calendarId: string
|
|
651
|
+
}
|
|
652
|
+
}>
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
/**
|
|
656
|
+
* Canonical Tool Core output for the "Delete scheduling links." effect (`calendar.deleteSchedulingLinks`).
|
|
657
|
+
* This is the definition's output schema; the effect's script surface may
|
|
658
|
+
* re-encode it before returning.
|
|
659
|
+
*/
|
|
660
|
+
export type DeleteSchedulingLinksScriptOutput = {
|
|
661
|
+
/**
|
|
662
|
+
* IDs of the scheduling links that were deleted
|
|
663
|
+
*/
|
|
664
|
+
deletedSchedulingLinkIds: Array<string>
|
|
665
|
+
errors?: Array<{
|
|
666
|
+
/**
|
|
667
|
+
* An identifier for the item that failed (e.g., event summary for creation, event ID for updates/cancellations)
|
|
668
|
+
*/
|
|
669
|
+
identifier: string
|
|
670
|
+
/**
|
|
671
|
+
* Description of the error that occurred
|
|
672
|
+
*/
|
|
673
|
+
errorMessage: string
|
|
674
|
+
}>
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
/**
|
|
678
|
+
* Script input for the "List available calendar resources (such as conference rooms)." effect (`calendar.listCalendarResources`),
|
|
679
|
+
* derived from its Tool Core definition's call_function input projection.
|
|
680
|
+
*
|
|
681
|
+
* Search for resources (often conference rooms) and check their availability for specific time slots.
|
|
682
|
+
* Resources are scoped to a single account; pass `calendar` to target the account of the event you intend to attach the rooms to.
|
|
683
|
+
* Only works with Google Workspace accounts that have admin permissions to view calendar resources.
|
|
684
|
+
* Use this tool to find rooms when creating in-person meetings.
|
|
685
|
+
* Pass multiple meeting times in timeSlots to get available rooms for each time slot independently.
|
|
686
|
+
*/
|
|
687
|
+
export type ListCalendarResourcesScriptInput = {
|
|
688
|
+
/**
|
|
689
|
+
* Specific time slots to check. Returns available resources for each time slot independently.
|
|
690
|
+
*/
|
|
691
|
+
timeSlots: Array<{
|
|
692
|
+
/**
|
|
693
|
+
* Start of the time slot to check, as an ISO 8601 date-time.
|
|
694
|
+
*/
|
|
695
|
+
startAt: string
|
|
696
|
+
/**
|
|
697
|
+
* End of the time slot to check, as an ISO 8601 date-time.
|
|
698
|
+
*/
|
|
699
|
+
endAt: string
|
|
700
|
+
}>
|
|
701
|
+
/**
|
|
702
|
+
* Minimum room capacity (number of people). MUST include the meeting organizer/user themselves in the count. For a 1-on-1, pass 2. For a meeting with N invitees besides the user, pass N+1.
|
|
703
|
+
*/
|
|
704
|
+
minCapacity: number
|
|
705
|
+
/**
|
|
706
|
+
* Maximum number of resources to return per time slot (default: 20, max: 40)
|
|
707
|
+
*/
|
|
708
|
+
maxCount?: number
|
|
709
|
+
/**
|
|
710
|
+
* If true, do not narrow rooms to the user's working-location building for this day. Set this when the user is explicitly asking about rooms in a different office (e.g. for a visiting team).
|
|
711
|
+
*/
|
|
712
|
+
ignoreWorkingLocation?: boolean
|
|
713
|
+
/**
|
|
714
|
+
* Date-times of returned events will be expressed in this time-zone
|
|
715
|
+
*/
|
|
716
|
+
timeZone: string
|
|
717
|
+
/**
|
|
718
|
+
* Calendar of the event the rooms will be attached to. Rooms are scoped to a single account.
|
|
719
|
+
*/
|
|
720
|
+
calendar?: {
|
|
721
|
+
/**
|
|
722
|
+
* Account that owns the target calendar.
|
|
723
|
+
*/
|
|
724
|
+
accountId: string
|
|
725
|
+
/**
|
|
726
|
+
* Target calendar identifier within the account.
|
|
727
|
+
*/
|
|
728
|
+
calendarId: string
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* Canonical Tool Core output for the "List available calendar resources (such as conference rooms)." effect (`calendar.listCalendarResources`).
|
|
734
|
+
* This is the definition's output schema; the effect's script surface may
|
|
735
|
+
* re-encode it before returning.
|
|
736
|
+
*/
|
|
737
|
+
export type ListCalendarResourcesScriptOutput = {
|
|
738
|
+
/**
|
|
739
|
+
* Results for each requested time slot, with available rooms sorted by capacity
|
|
740
|
+
*/
|
|
741
|
+
resultsBySlot: Array<{
|
|
742
|
+
/**
|
|
743
|
+
* The time slot being checked
|
|
744
|
+
*/
|
|
745
|
+
timeSlot: {
|
|
746
|
+
startAt: string
|
|
747
|
+
endAt: string
|
|
748
|
+
}
|
|
749
|
+
/**
|
|
750
|
+
* Available conference rooms for this time slot, sorted by increasing capacity (smallest rooms first)
|
|
751
|
+
*/
|
|
752
|
+
availableResources: Array<{
|
|
753
|
+
/**
|
|
754
|
+
* Use this as the email when adding rooms to events
|
|
755
|
+
*/
|
|
756
|
+
resourceEmail: string
|
|
757
|
+
/**
|
|
758
|
+
* Display name of the conference room
|
|
759
|
+
*/
|
|
760
|
+
resourceName: string
|
|
761
|
+
/**
|
|
762
|
+
* Building information
|
|
763
|
+
*/
|
|
764
|
+
building?: {
|
|
765
|
+
buildingId: string
|
|
766
|
+
buildingName?: string
|
|
767
|
+
}
|
|
768
|
+
/**
|
|
769
|
+
* Maximum number of people the room can accommodate
|
|
770
|
+
*/
|
|
771
|
+
capacity?: number
|
|
772
|
+
/**
|
|
773
|
+
* Floor location
|
|
774
|
+
*/
|
|
775
|
+
floor?: string
|
|
776
|
+
/**
|
|
777
|
+
* Room description
|
|
778
|
+
*/
|
|
779
|
+
description?: string
|
|
780
|
+
}>
|
|
781
|
+
}>
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
/**
|
|
785
|
+
* Script input for the "Fetch list of calendars of the user." effect (`calendar.listCalendars`),
|
|
786
|
+
* derived from its Tool Core definition's call_function input projection.
|
|
787
|
+
*
|
|
788
|
+
* List of calendars grouped by account.
|
|
789
|
+
*/
|
|
790
|
+
export type ListCalendarsScriptInput = {
|
|
791
|
+
/**
|
|
792
|
+
* Return only accounts linked to these email addresses. Useful to get calendars from a work account only for example. Do not specify if you are interested in getting the whole picture of someone's agenda across work and personal accounts.
|
|
793
|
+
*/
|
|
794
|
+
onlyAccountEmails?: Array<string>
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
/**
|
|
798
|
+
* Canonical Tool Core output for the "Fetch list of calendars of the user." effect (`calendar.listCalendars`).
|
|
799
|
+
* This is the definition's output schema; the effect's script surface may
|
|
800
|
+
* re-encode it before returning.
|
|
801
|
+
*/
|
|
802
|
+
export type ListCalendarsScriptOutput = {
|
|
803
|
+
accounts: Array<{
|
|
804
|
+
accountId: string
|
|
805
|
+
/**
|
|
806
|
+
* Google, Apple iCloud, Outlook, etc.
|
|
807
|
+
*/
|
|
808
|
+
providerName: string
|
|
809
|
+
/**
|
|
810
|
+
* The user email associated with this account. Useful to know if this account and its data should be used depending on context.
|
|
811
|
+
*/
|
|
812
|
+
email?: string
|
|
813
|
+
/**
|
|
814
|
+
* Whether this account is work-related or a personal account, if we know this information.
|
|
815
|
+
*/
|
|
816
|
+
category?: "work" | "personal"
|
|
817
|
+
capabilities: {
|
|
818
|
+
/**
|
|
819
|
+
* Does this account expose any calendars?
|
|
820
|
+
*/
|
|
821
|
+
readCalendars: boolean
|
|
822
|
+
/**
|
|
823
|
+
* Can we read calendar events from calendars of this account?
|
|
824
|
+
*/
|
|
825
|
+
readEvents: boolean
|
|
826
|
+
/**
|
|
827
|
+
* Can we write events in some calendars of this account? Calendars themselves might have their own set of restrictions.
|
|
828
|
+
*/
|
|
829
|
+
writeEvents: boolean
|
|
830
|
+
/**
|
|
831
|
+
* Can we use a text search query to find events in the calendars of this account?
|
|
832
|
+
*/
|
|
833
|
+
searchEvents: boolean
|
|
834
|
+
/**
|
|
835
|
+
* Does this account expose contacts?
|
|
836
|
+
*/
|
|
837
|
+
readContacts: boolean
|
|
838
|
+
}
|
|
839
|
+
/**
|
|
840
|
+
* User can access the events of co-workers having an email address with one of these domains
|
|
841
|
+
*/
|
|
842
|
+
coworkersEmailDomains?: Array<string>
|
|
843
|
+
calendars: Array<{
|
|
844
|
+
accountId: string
|
|
845
|
+
calendarId: string
|
|
846
|
+
name: string
|
|
847
|
+
description?: string
|
|
848
|
+
colors?: {
|
|
849
|
+
foreground?: string
|
|
850
|
+
background?: string
|
|
851
|
+
}
|
|
852
|
+
isPrimary: boolean
|
|
853
|
+
/**
|
|
854
|
+
* Is this calendar read-only or can the user create/edit/delete events?
|
|
855
|
+
*/
|
|
856
|
+
isReadOnly: boolean
|
|
857
|
+
/**
|
|
858
|
+
* The contents of a calendar appear in the user calendar app only if that calendar is selected.
|
|
859
|
+
* Calendars that are not selected might be useful to get lower-signal events, but probably not to create events as it might not be visible to the user.
|
|
860
|
+
*/
|
|
861
|
+
isSelected: boolean
|
|
862
|
+
/**
|
|
863
|
+
* A hidden calendar is a calendar the user has access to but decided to hide completely from their calendar app.
|
|
864
|
+
* Hidden calendars might be useful to know what you might have access to, but keep in mind the user hid them and is most likely not aware of their content.
|
|
865
|
+
*/
|
|
866
|
+
isHidden: boolean
|
|
867
|
+
/**
|
|
868
|
+
* The email address of the owner of this calendar.
|
|
869
|
+
*/
|
|
870
|
+
ownerEmail?: string
|
|
871
|
+
}>
|
|
872
|
+
}>
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
/**
|
|
876
|
+
* Script input for the "List contacts" effect (`calendar.listContacts`),
|
|
877
|
+
* derived from its Tool Core definition's call_function input projection.
|
|
878
|
+
*
|
|
879
|
+
* List the user's contacts from different accounts. Returns contact information including email addresses, names, phone numbers, and profile photos.
|
|
880
|
+
*/
|
|
881
|
+
export type ListContactsScriptInput = {
|
|
882
|
+
/**
|
|
883
|
+
* Optional search queries to filter contacts by name or email. Results matching any query are included.
|
|
884
|
+
*/
|
|
885
|
+
queries?: Array<string>
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
/**
|
|
889
|
+
* Canonical Tool Core output for the "List contacts" effect (`calendar.listContacts`).
|
|
890
|
+
* This is the definition's output schema; the effect's script surface may
|
|
891
|
+
* re-encode it before returning.
|
|
892
|
+
*/
|
|
893
|
+
export type ListContactsScriptOutput = {
|
|
894
|
+
accounts: Array<{
|
|
895
|
+
accountId: string
|
|
896
|
+
/**
|
|
897
|
+
* Google, Apple iCloud, Outlook, etc.
|
|
898
|
+
*/
|
|
899
|
+
providerName: string
|
|
900
|
+
/**
|
|
901
|
+
* The user email associated with this account. Useful to know if this account and its data should be used depending on context.
|
|
902
|
+
*/
|
|
903
|
+
email?: string
|
|
904
|
+
/**
|
|
905
|
+
* Whether this account is work-related or a personal account, if we know this information.
|
|
906
|
+
*/
|
|
907
|
+
category?: "work" | "personal"
|
|
908
|
+
capabilities: {
|
|
909
|
+
/**
|
|
910
|
+
* Does this account expose any calendars?
|
|
911
|
+
*/
|
|
912
|
+
readCalendars: boolean
|
|
913
|
+
/**
|
|
914
|
+
* Can we read calendar events from calendars of this account?
|
|
915
|
+
*/
|
|
916
|
+
readEvents: boolean
|
|
917
|
+
/**
|
|
918
|
+
* Can we write events in some calendars of this account? Calendars themselves might have their own set of restrictions.
|
|
919
|
+
*/
|
|
920
|
+
writeEvents: boolean
|
|
921
|
+
/**
|
|
922
|
+
* Can we use a text search query to find events in the calendars of this account?
|
|
923
|
+
*/
|
|
924
|
+
searchEvents: boolean
|
|
925
|
+
/**
|
|
926
|
+
* Does this account expose contacts?
|
|
927
|
+
*/
|
|
928
|
+
readContacts: boolean
|
|
929
|
+
}
|
|
930
|
+
/**
|
|
931
|
+
* User can access the events of co-workers having an email address with one of these domains
|
|
932
|
+
*/
|
|
933
|
+
coworkersEmailDomains?: Array<string>
|
|
934
|
+
contacts: Array<{
|
|
935
|
+
/**
|
|
936
|
+
* Unique identifier for the contact
|
|
937
|
+
*/
|
|
938
|
+
id: string
|
|
939
|
+
/**
|
|
940
|
+
* Primary email address of the contact
|
|
941
|
+
*/
|
|
942
|
+
email: string
|
|
943
|
+
/**
|
|
944
|
+
* Additional email addresses for this contact
|
|
945
|
+
*/
|
|
946
|
+
alternateEmails?: Array<string>
|
|
947
|
+
/**
|
|
948
|
+
* Display name of the contact
|
|
949
|
+
*/
|
|
950
|
+
displayName?: string
|
|
951
|
+
/**
|
|
952
|
+
* Phone numbers associated with this contact
|
|
953
|
+
*/
|
|
954
|
+
phoneNumbers?: Array<{
|
|
955
|
+
/**
|
|
956
|
+
* The type of phone number (e.g., home, work, mobile)
|
|
957
|
+
*/
|
|
958
|
+
type?: string
|
|
959
|
+
/**
|
|
960
|
+
* The phone number value
|
|
961
|
+
*/
|
|
962
|
+
value: string
|
|
963
|
+
}>
|
|
964
|
+
/**
|
|
965
|
+
* URL to the contact's profile photo
|
|
966
|
+
*/
|
|
967
|
+
photoUrl?: string
|
|
968
|
+
}>
|
|
969
|
+
}>
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
/**
|
|
973
|
+
* Script input for the "View coworkers' scheduled events." effect (`calendar.listCoworkersEvents`),
|
|
974
|
+
* derived from its Tool Core definition's call_function input projection.
|
|
975
|
+
*
|
|
976
|
+
* Retrieves the detailed calendar events for specific coworkers within a time range.
|
|
977
|
+
* Use this to see what meetings or events people have scheduled, including event titles, times, and details.
|
|
978
|
+
* Only works for coworkers in the same organization domain.
|
|
979
|
+
*/
|
|
980
|
+
export type ListCoworkersEventsScriptInput = {
|
|
981
|
+
/**
|
|
982
|
+
* Emails of relevant coworkers
|
|
983
|
+
*/
|
|
984
|
+
coworkerEmails: Array<string>
|
|
985
|
+
/**
|
|
986
|
+
* Start of the time range, as an ISO 8601 date-time.
|
|
987
|
+
*/
|
|
988
|
+
timeMin: string
|
|
989
|
+
/**
|
|
990
|
+
* End of the time range, as an ISO 8601 date-time.
|
|
991
|
+
*/
|
|
992
|
+
timeMax: string
|
|
993
|
+
/**
|
|
994
|
+
* Date-times of returned events will be expressed in this time-zone
|
|
995
|
+
*/
|
|
996
|
+
timeZone: string
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
/**
|
|
1000
|
+
* Canonical Tool Core output for the "View coworkers' scheduled events." effect (`calendar.listCoworkersEvents`).
|
|
1001
|
+
* This is the definition's output schema; the effect's script surface may
|
|
1002
|
+
* re-encode it before returning.
|
|
1003
|
+
*/
|
|
1004
|
+
export type ListCoworkersEventsScriptOutput = {
|
|
1005
|
+
/**
|
|
1006
|
+
* List of coworkers with their scheduled calendar events. Some coworkers may be excluded if their calendar could not be accessed.
|
|
1007
|
+
*/
|
|
1008
|
+
coworkers: Array<{
|
|
1009
|
+
accountId: string
|
|
1010
|
+
coworkerEmail: string
|
|
1011
|
+
profile?: {
|
|
1012
|
+
displayName?: string
|
|
1013
|
+
email?: string
|
|
1014
|
+
photoUrl?: string
|
|
1015
|
+
}
|
|
1016
|
+
events: Array<{
|
|
1017
|
+
calendar: {
|
|
1018
|
+
accountId: string
|
|
1019
|
+
calendarId: string
|
|
1020
|
+
}
|
|
1021
|
+
eventId: string
|
|
1022
|
+
summary: string
|
|
1023
|
+
description?: string
|
|
1024
|
+
/**
|
|
1025
|
+
* Physical location where the event takes place, or remote conference link/info.
|
|
1026
|
+
*/
|
|
1027
|
+
location?: string
|
|
1028
|
+
/**
|
|
1029
|
+
* Recurrence rules in RRULE format (e.g., ['RRULE:FREQ=WEEKLY;COUNT=10']). Can also include EXDATE for exception dates (e.g., ['RRULE:FREQ=WEEKLY;COUNT=10', 'EXDATE:2026-03-24T13:00:00']).
|
|
1030
|
+
*/
|
|
1031
|
+
recurrenceRules?: Array<string>
|
|
1032
|
+
/**
|
|
1033
|
+
* The data provider this event belongs to
|
|
1034
|
+
*/
|
|
1035
|
+
provider?: "google" | "notion" | "icloud" | "outlook"
|
|
1036
|
+
/**
|
|
1037
|
+
* The URL to view the event in the Calendar app.
|
|
1038
|
+
*/
|
|
1039
|
+
webUrl: string
|
|
1040
|
+
/**
|
|
1041
|
+
* When the event is happening
|
|
1042
|
+
*/
|
|
1043
|
+
period:
|
|
1044
|
+
| {
|
|
1045
|
+
type: "DATE"
|
|
1046
|
+
start: {
|
|
1047
|
+
/**
|
|
1048
|
+
* Date in ISO 8601 format (no time)
|
|
1049
|
+
*/
|
|
1050
|
+
date: string
|
|
1051
|
+
}
|
|
1052
|
+
end: {
|
|
1053
|
+
/**
|
|
1054
|
+
* Date in ISO 8601 format (no time)
|
|
1055
|
+
*/
|
|
1056
|
+
date: string
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
| {
|
|
1060
|
+
type: "DATE_TIME"
|
|
1061
|
+
start: {
|
|
1062
|
+
/**
|
|
1063
|
+
* Date-time in ISO 8601 format, in UTC (ending with Z), or with TZ offset
|
|
1064
|
+
*/
|
|
1065
|
+
dateTime: string
|
|
1066
|
+
timeZone?: string
|
|
1067
|
+
}
|
|
1068
|
+
end: {
|
|
1069
|
+
/**
|
|
1070
|
+
* Date-time in ISO 8601 format, in UTC (ending with Z), or with TZ offset
|
|
1071
|
+
*/
|
|
1072
|
+
dateTime: string
|
|
1073
|
+
timeZone?: string
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
/**
|
|
1077
|
+
* Whether it's part of a recurring event series
|
|
1078
|
+
*/
|
|
1079
|
+
isRecurring: boolean
|
|
1080
|
+
/**
|
|
1081
|
+
* If true, the event does not block time on the calendar. This is equivalent to setting `Show me as to Available` in the Calendar UI.
|
|
1082
|
+
*/
|
|
1083
|
+
isTransparent: boolean
|
|
1084
|
+
/**
|
|
1085
|
+
* Is the event an auto-blocking event created from another event? Used to create blocked events on a calendar from events on another calendar. You can ignore auto-blocked events if there are events happening at the exact same time on other calendars.
|
|
1086
|
+
*/
|
|
1087
|
+
isAutoBlock: boolean
|
|
1088
|
+
/**
|
|
1089
|
+
* What kind of event is it? Standard, out of office, birthday...
|
|
1090
|
+
*/
|
|
1091
|
+
eventType?:
|
|
1092
|
+
| "fromGmail"
|
|
1093
|
+
| "default"
|
|
1094
|
+
| "focusTime"
|
|
1095
|
+
| "outOfOffice"
|
|
1096
|
+
| "birthday"
|
|
1097
|
+
| "availability"
|
|
1098
|
+
/**
|
|
1099
|
+
* Is an event confirmed, tentative or cancelled? This is different from the user's RSVP
|
|
1100
|
+
*/
|
|
1101
|
+
eventStatus?: "confirmed" | "tentative" | "cancelled"
|
|
1102
|
+
/**
|
|
1103
|
+
* Whether it's a meeting, aka an event with attendees listed
|
|
1104
|
+
*/
|
|
1105
|
+
isMeeting: boolean
|
|
1106
|
+
conferencingEntryPoints?: Array<{
|
|
1107
|
+
uri: string
|
|
1108
|
+
accessCode?: string
|
|
1109
|
+
entryPointType?: "video" | "phone" | "sip" | "more"
|
|
1110
|
+
label?: string
|
|
1111
|
+
meetingCode?: string
|
|
1112
|
+
passcode?: string
|
|
1113
|
+
password?: string
|
|
1114
|
+
pin?: string
|
|
1115
|
+
notes?: string
|
|
1116
|
+
signature?: string
|
|
1117
|
+
}>
|
|
1118
|
+
/**
|
|
1119
|
+
* The URL to join the video conference, if available
|
|
1120
|
+
*/
|
|
1121
|
+
conferencingUrl?: string
|
|
1122
|
+
/**
|
|
1123
|
+
* The calendar user's RSVP status
|
|
1124
|
+
*/
|
|
1125
|
+
responseStatus?: "needsAction" | "accepted" | "declined" | "tentative"
|
|
1126
|
+
creator?: {
|
|
1127
|
+
/**
|
|
1128
|
+
* Whether this entry represents the calendar user
|
|
1129
|
+
*/
|
|
1130
|
+
isSelf: boolean
|
|
1131
|
+
displayName?: string
|
|
1132
|
+
email?: string
|
|
1133
|
+
}
|
|
1134
|
+
organizer?: {
|
|
1135
|
+
/**
|
|
1136
|
+
* Whether this entry represents the calendar user
|
|
1137
|
+
*/
|
|
1138
|
+
isSelf: boolean
|
|
1139
|
+
displayName?: string
|
|
1140
|
+
email?: string
|
|
1141
|
+
}
|
|
1142
|
+
attendees?: Array<{
|
|
1143
|
+
/**
|
|
1144
|
+
* Whether this entry represents the calendar user
|
|
1145
|
+
*/
|
|
1146
|
+
isSelf: boolean
|
|
1147
|
+
displayName?: string
|
|
1148
|
+
email?: string
|
|
1149
|
+
isOptional: boolean
|
|
1150
|
+
isOrganizer?: boolean
|
|
1151
|
+
/**
|
|
1152
|
+
* The calendar user's RSVP status
|
|
1153
|
+
*/
|
|
1154
|
+
responseStatus?: "needsAction" | "accepted" | "declined" | "tentative"
|
|
1155
|
+
}>
|
|
1156
|
+
resources?: Array<{
|
|
1157
|
+
displayName?: string
|
|
1158
|
+
email?: string
|
|
1159
|
+
isOptional: boolean
|
|
1160
|
+
/**
|
|
1161
|
+
* The calendar user's RSVP status
|
|
1162
|
+
*/
|
|
1163
|
+
responseStatus?: "needsAction" | "accepted" | "declined" | "tentative"
|
|
1164
|
+
}>
|
|
1165
|
+
colors?: {
|
|
1166
|
+
foreground?: string
|
|
1167
|
+
background?: string
|
|
1168
|
+
}
|
|
1169
|
+
attachments?: Array<{
|
|
1170
|
+
url: string
|
|
1171
|
+
mimeType?: string
|
|
1172
|
+
title?: string
|
|
1173
|
+
notionWorkspaceId?: string
|
|
1174
|
+
}>
|
|
1175
|
+
}>
|
|
1176
|
+
}>
|
|
1177
|
+
errors?: Array<{
|
|
1178
|
+
/**
|
|
1179
|
+
* An identifier for the item that failed (e.g., event summary for creation, event ID for updates/cancellations)
|
|
1180
|
+
*/
|
|
1181
|
+
identifier: string
|
|
1182
|
+
/**
|
|
1183
|
+
* Description of the error that occurred
|
|
1184
|
+
*/
|
|
1185
|
+
errorMessage: string
|
|
1186
|
+
}>
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
/**
|
|
1190
|
+
* Script input for the "List the user's events from different calendars." effect (`calendar.listEvents`),
|
|
1191
|
+
* derived from its Tool Core definition's call_function input projection.
|
|
1192
|
+
*
|
|
1193
|
+
* Date-times will be expressed in the time-zone passed as parameter.
|
|
1194
|
+
*/
|
|
1195
|
+
export type ListEventsScriptInput = {
|
|
1196
|
+
/**
|
|
1197
|
+
* Start of the time range, as an ISO 8601 date-time.
|
|
1198
|
+
*/
|
|
1199
|
+
timeMin: string
|
|
1200
|
+
/**
|
|
1201
|
+
* End of the time range, as an ISO 8601 date-time.
|
|
1202
|
+
*/
|
|
1203
|
+
timeMax: string
|
|
1204
|
+
/**
|
|
1205
|
+
* Date-times of returned events will be expressed in this time-zone
|
|
1206
|
+
*/
|
|
1207
|
+
timeZone: string
|
|
1208
|
+
/**
|
|
1209
|
+
* Whether to include event invites the user has declined
|
|
1210
|
+
*/
|
|
1211
|
+
includeDeclinedInvites?: boolean | null
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
/**
|
|
1215
|
+
* Canonical Tool Core output for the "List the user's events from different calendars." effect (`calendar.listEvents`).
|
|
1216
|
+
* This is the definition's output schema; the effect's script surface may
|
|
1217
|
+
* re-encode it before returning.
|
|
1218
|
+
*/
|
|
1219
|
+
export type ListEventsScriptOutput = {
|
|
1220
|
+
accounts: Array<{
|
|
1221
|
+
accountId: string
|
|
1222
|
+
/**
|
|
1223
|
+
* Google, Apple iCloud, Outlook, etc.
|
|
1224
|
+
*/
|
|
1225
|
+
providerName: string
|
|
1226
|
+
/**
|
|
1227
|
+
* The user email associated with this account. Useful to know if this account and its data should be used depending on context.
|
|
1228
|
+
*/
|
|
1229
|
+
email?: string
|
|
1230
|
+
/**
|
|
1231
|
+
* Whether this account is work-related or a personal account, if we know this information.
|
|
1232
|
+
*/
|
|
1233
|
+
category?: "work" | "personal"
|
|
1234
|
+
capabilities: {
|
|
1235
|
+
/**
|
|
1236
|
+
* Does this account expose any calendars?
|
|
1237
|
+
*/
|
|
1238
|
+
readCalendars: boolean
|
|
1239
|
+
/**
|
|
1240
|
+
* Can we read calendar events from calendars of this account?
|
|
1241
|
+
*/
|
|
1242
|
+
readEvents: boolean
|
|
1243
|
+
/**
|
|
1244
|
+
* Can we write events in some calendars of this account? Calendars themselves might have their own set of restrictions.
|
|
1245
|
+
*/
|
|
1246
|
+
writeEvents: boolean
|
|
1247
|
+
/**
|
|
1248
|
+
* Can we use a text search query to find events in the calendars of this account?
|
|
1249
|
+
*/
|
|
1250
|
+
searchEvents: boolean
|
|
1251
|
+
/**
|
|
1252
|
+
* Does this account expose contacts?
|
|
1253
|
+
*/
|
|
1254
|
+
readContacts: boolean
|
|
1255
|
+
}
|
|
1256
|
+
/**
|
|
1257
|
+
* User can access the events of co-workers having an email address with one of these domains
|
|
1258
|
+
*/
|
|
1259
|
+
coworkersEmailDomains?: Array<string>
|
|
1260
|
+
calendars: Array<{
|
|
1261
|
+
accountId: string
|
|
1262
|
+
calendarId: string
|
|
1263
|
+
name: string
|
|
1264
|
+
description?: string
|
|
1265
|
+
colors?: {
|
|
1266
|
+
foreground?: string
|
|
1267
|
+
background?: string
|
|
1268
|
+
}
|
|
1269
|
+
isPrimary: boolean
|
|
1270
|
+
/**
|
|
1271
|
+
* Is this calendar read-only or can the user create/edit/delete events?
|
|
1272
|
+
*/
|
|
1273
|
+
isReadOnly: boolean
|
|
1274
|
+
/**
|
|
1275
|
+
* The contents of a calendar appear in the user calendar app only if that calendar is selected.
|
|
1276
|
+
* Calendars that are not selected might be useful to get lower-signal events, but probably not to create events as it might not be visible to the user.
|
|
1277
|
+
*/
|
|
1278
|
+
isSelected: boolean
|
|
1279
|
+
/**
|
|
1280
|
+
* A hidden calendar is a calendar the user has access to but decided to hide completely from their calendar app.
|
|
1281
|
+
* Hidden calendars might be useful to know what you might have access to, but keep in mind the user hid them and is most likely not aware of their content.
|
|
1282
|
+
*/
|
|
1283
|
+
isHidden: boolean
|
|
1284
|
+
/**
|
|
1285
|
+
* The email address of the owner of this calendar.
|
|
1286
|
+
*/
|
|
1287
|
+
ownerEmail?: string
|
|
1288
|
+
events: Array<{
|
|
1289
|
+
calendar: {
|
|
1290
|
+
accountId: string
|
|
1291
|
+
calendarId: string
|
|
1292
|
+
}
|
|
1293
|
+
eventId: string
|
|
1294
|
+
summary: string
|
|
1295
|
+
description?: string
|
|
1296
|
+
/**
|
|
1297
|
+
* Physical location where the event takes place, or remote conference link/info.
|
|
1298
|
+
*/
|
|
1299
|
+
location?: string
|
|
1300
|
+
/**
|
|
1301
|
+
* Recurrence rules in RRULE format (e.g., ['RRULE:FREQ=WEEKLY;COUNT=10']). Can also include EXDATE for exception dates (e.g., ['RRULE:FREQ=WEEKLY;COUNT=10', 'EXDATE:2026-03-24T13:00:00']).
|
|
1302
|
+
*/
|
|
1303
|
+
recurrenceRules?: Array<string>
|
|
1304
|
+
/**
|
|
1305
|
+
* The data provider this event belongs to
|
|
1306
|
+
*/
|
|
1307
|
+
provider?: "google" | "notion" | "icloud" | "outlook"
|
|
1308
|
+
/**
|
|
1309
|
+
* The URL to view the event in the Calendar app.
|
|
1310
|
+
*/
|
|
1311
|
+
webUrl: string
|
|
1312
|
+
/**
|
|
1313
|
+
* When the event is happening
|
|
1314
|
+
*/
|
|
1315
|
+
period:
|
|
1316
|
+
| {
|
|
1317
|
+
type: "DATE"
|
|
1318
|
+
start: {
|
|
1319
|
+
/**
|
|
1320
|
+
* Date in ISO 8601 format (no time)
|
|
1321
|
+
*/
|
|
1322
|
+
date: string
|
|
1323
|
+
}
|
|
1324
|
+
end: {
|
|
1325
|
+
/**
|
|
1326
|
+
* Date in ISO 8601 format (no time)
|
|
1327
|
+
*/
|
|
1328
|
+
date: string
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
| {
|
|
1332
|
+
type: "DATE_TIME"
|
|
1333
|
+
start: {
|
|
1334
|
+
/**
|
|
1335
|
+
* Date-time in ISO 8601 format, in UTC (ending with Z), or with TZ offset
|
|
1336
|
+
*/
|
|
1337
|
+
dateTime: string
|
|
1338
|
+
timeZone?: string
|
|
1339
|
+
}
|
|
1340
|
+
end: {
|
|
1341
|
+
/**
|
|
1342
|
+
* Date-time in ISO 8601 format, in UTC (ending with Z), or with TZ offset
|
|
1343
|
+
*/
|
|
1344
|
+
dateTime: string
|
|
1345
|
+
timeZone?: string
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
/**
|
|
1349
|
+
* Whether it's part of a recurring event series
|
|
1350
|
+
*/
|
|
1351
|
+
isRecurring: boolean
|
|
1352
|
+
/**
|
|
1353
|
+
* If true, the event does not block time on the calendar. This is equivalent to setting `Show me as to Available` in the Calendar UI.
|
|
1354
|
+
*/
|
|
1355
|
+
isTransparent: boolean
|
|
1356
|
+
/**
|
|
1357
|
+
* Is the event an auto-blocking event created from another event? Used to create blocked events on a calendar from events on another calendar. You can ignore auto-blocked events if there are events happening at the exact same time on other calendars.
|
|
1358
|
+
*/
|
|
1359
|
+
isAutoBlock: boolean
|
|
1360
|
+
/**
|
|
1361
|
+
* What kind of event is it? Standard, out of office, birthday...
|
|
1362
|
+
*/
|
|
1363
|
+
eventType?:
|
|
1364
|
+
| "fromGmail"
|
|
1365
|
+
| "default"
|
|
1366
|
+
| "focusTime"
|
|
1367
|
+
| "outOfOffice"
|
|
1368
|
+
| "birthday"
|
|
1369
|
+
| "availability"
|
|
1370
|
+
/**
|
|
1371
|
+
* Is an event confirmed, tentative or cancelled? This is different from the user's RSVP
|
|
1372
|
+
*/
|
|
1373
|
+
eventStatus?: "confirmed" | "tentative" | "cancelled"
|
|
1374
|
+
/**
|
|
1375
|
+
* Whether it's a meeting, aka an event with attendees listed
|
|
1376
|
+
*/
|
|
1377
|
+
isMeeting: boolean
|
|
1378
|
+
conferencingEntryPoints?: Array<{
|
|
1379
|
+
uri: string
|
|
1380
|
+
accessCode?: string
|
|
1381
|
+
entryPointType?: "video" | "phone" | "sip" | "more"
|
|
1382
|
+
label?: string
|
|
1383
|
+
meetingCode?: string
|
|
1384
|
+
passcode?: string
|
|
1385
|
+
password?: string
|
|
1386
|
+
pin?: string
|
|
1387
|
+
notes?: string
|
|
1388
|
+
signature?: string
|
|
1389
|
+
}>
|
|
1390
|
+
/**
|
|
1391
|
+
* The URL to join the video conference, if available
|
|
1392
|
+
*/
|
|
1393
|
+
conferencingUrl?: string
|
|
1394
|
+
/**
|
|
1395
|
+
* The calendar user's RSVP status
|
|
1396
|
+
*/
|
|
1397
|
+
responseStatus?: "needsAction" | "accepted" | "declined" | "tentative"
|
|
1398
|
+
creator?: {
|
|
1399
|
+
/**
|
|
1400
|
+
* Whether this entry represents the calendar user
|
|
1401
|
+
*/
|
|
1402
|
+
isSelf: boolean
|
|
1403
|
+
displayName?: string
|
|
1404
|
+
email?: string
|
|
1405
|
+
}
|
|
1406
|
+
organizer?: {
|
|
1407
|
+
/**
|
|
1408
|
+
* Whether this entry represents the calendar user
|
|
1409
|
+
*/
|
|
1410
|
+
isSelf: boolean
|
|
1411
|
+
displayName?: string
|
|
1412
|
+
email?: string
|
|
1413
|
+
}
|
|
1414
|
+
attendees?: Array<{
|
|
1415
|
+
/**
|
|
1416
|
+
* Whether this entry represents the calendar user
|
|
1417
|
+
*/
|
|
1418
|
+
isSelf: boolean
|
|
1419
|
+
displayName?: string
|
|
1420
|
+
email?: string
|
|
1421
|
+
isOptional: boolean
|
|
1422
|
+
isOrganizer?: boolean
|
|
1423
|
+
/**
|
|
1424
|
+
* The calendar user's RSVP status
|
|
1425
|
+
*/
|
|
1426
|
+
responseStatus?: "needsAction" | "accepted" | "declined" | "tentative"
|
|
1427
|
+
}>
|
|
1428
|
+
resources?: Array<{
|
|
1429
|
+
displayName?: string
|
|
1430
|
+
email?: string
|
|
1431
|
+
isOptional: boolean
|
|
1432
|
+
/**
|
|
1433
|
+
* The calendar user's RSVP status
|
|
1434
|
+
*/
|
|
1435
|
+
responseStatus?: "needsAction" | "accepted" | "declined" | "tentative"
|
|
1436
|
+
}>
|
|
1437
|
+
colors?: {
|
|
1438
|
+
foreground?: string
|
|
1439
|
+
background?: string
|
|
1440
|
+
}
|
|
1441
|
+
attachments?: Array<{
|
|
1442
|
+
url: string
|
|
1443
|
+
mimeType?: string
|
|
1444
|
+
title?: string
|
|
1445
|
+
notionWorkspaceId?: string
|
|
1446
|
+
}>
|
|
1447
|
+
}>
|
|
294
1448
|
}>
|
|
295
1449
|
}>
|
|
1450
|
+
/**
|
|
1451
|
+
* User preferences for calendar data
|
|
1452
|
+
*/
|
|
1453
|
+
userPreferences: {
|
|
1454
|
+
/**
|
|
1455
|
+
* Whether the user prefers to display time in 12-hour (AM/PM) or 24-hour format
|
|
1456
|
+
*/
|
|
1457
|
+
timeFormat?: "12_HOUR" | "24_HOUR"
|
|
1458
|
+
}
|
|
1459
|
+
errors: Array<{
|
|
1460
|
+
accountId: string
|
|
1461
|
+
calendarId: string
|
|
1462
|
+
error: string
|
|
1463
|
+
}>
|
|
296
1464
|
}
|
|
297
1465
|
|
|
298
1466
|
/**
|
|
299
|
-
* Script input for the "
|
|
1467
|
+
* Script input for the "List the user's scheduling links." effect (`calendar.listSchedulingLinks`),
|
|
300
1468
|
* derived from its Tool Core definition's call_function input projection.
|
|
301
1469
|
*
|
|
302
|
-
*
|
|
303
|
-
* Use this to see what meetings or events people have scheduled, including event titles, times, and details.
|
|
304
|
-
* Only works for coworkers in the same organization domain.
|
|
1470
|
+
* List active, unexpired scheduling links with upcoming time ranges, optionally filtered by link type.
|
|
305
1471
|
*/
|
|
306
|
-
export type
|
|
1472
|
+
export type ListSchedulingLinksScriptInput = {
|
|
307
1473
|
/**
|
|
308
|
-
*
|
|
1474
|
+
* Return only scheduling links of this type
|
|
309
1475
|
*/
|
|
310
|
-
|
|
1476
|
+
type?: "singleUse" | "multiUse" | "recurring"
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
/**
|
|
1480
|
+
* Canonical Tool Core output for the "List the user's scheduling links." effect (`calendar.listSchedulingLinks`).
|
|
1481
|
+
* This is the definition's output schema; the effect's script surface may
|
|
1482
|
+
* re-encode it before returning.
|
|
1483
|
+
*/
|
|
1484
|
+
export type ListSchedulingLinksScriptOutput = {
|
|
1485
|
+
schedulingLinks: Array<{
|
|
1486
|
+
/**
|
|
1487
|
+
* Unique ID of the created scheduling link
|
|
1488
|
+
*/
|
|
1489
|
+
id: string
|
|
1490
|
+
/**
|
|
1491
|
+
* Short ID used in the scheduling link URL
|
|
1492
|
+
*/
|
|
1493
|
+
shortId: string
|
|
1494
|
+
/**
|
|
1495
|
+
* Current booking calendar for this scheduling link
|
|
1496
|
+
*/
|
|
1497
|
+
bookingCalendarRef: {
|
|
1498
|
+
accountId: string
|
|
1499
|
+
calendarId: string
|
|
1500
|
+
}
|
|
1501
|
+
/**
|
|
1502
|
+
* Custom URL slug for the scheduling link
|
|
1503
|
+
*/
|
|
1504
|
+
alias?: string
|
|
1505
|
+
/**
|
|
1506
|
+
* The resolved type of the link
|
|
1507
|
+
*/
|
|
1508
|
+
type?: "singleUse" | "multiUse" | "recurring"
|
|
1509
|
+
/**
|
|
1510
|
+
* Status of the scheduling link
|
|
1511
|
+
*/
|
|
1512
|
+
status: string
|
|
1513
|
+
title?: string
|
|
1514
|
+
description?: string
|
|
1515
|
+
duration?: number
|
|
1516
|
+
/**
|
|
1517
|
+
* Full URL where invitees can book a meeting
|
|
1518
|
+
*/
|
|
1519
|
+
schedulingLinkUrl?: string
|
|
1520
|
+
timeRanges: Array<{
|
|
1521
|
+
/**
|
|
1522
|
+
* Start of availability window in ISO 8601 format with timezone offset, e.g. '2024-08-22T09:00:00-04:00'
|
|
1523
|
+
*/
|
|
1524
|
+
startDate: string
|
|
1525
|
+
/**
|
|
1526
|
+
* End of availability window in ISO 8601 format with timezone offset, e.g. '2024-08-22T17:00:00-04:00'
|
|
1527
|
+
*/
|
|
1528
|
+
endDate: string
|
|
1529
|
+
/**
|
|
1530
|
+
* Recurrence rules in RRULE format (e.g., ['RRULE:FREQ=WEEKLY;COUNT=10']). Can also include EXDATE for exception dates (e.g., ['RRULE:FREQ=WEEKLY;COUNT=10', 'EXDATE:2026-03-24T13:00:00']).
|
|
1531
|
+
*/
|
|
1532
|
+
recurrence?: Array<string>
|
|
1533
|
+
/**
|
|
1534
|
+
* Unique identifier for this time range
|
|
1535
|
+
*/
|
|
1536
|
+
id: string
|
|
1537
|
+
}>
|
|
1538
|
+
}>
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1541
|
+
/**
|
|
1542
|
+
* Script input for the "Find available meeting times." effect (`calendar.suggestMeetingTimes`),
|
|
1543
|
+
* derived from its Tool Core definition's call_function input projection.
|
|
1544
|
+
*
|
|
1545
|
+
* Analyzes calendar availability for multiple participants and returns ranked time slots when everyone is free.
|
|
1546
|
+
* Use this when scheduling meetings or finding times that work for a group of people.
|
|
1547
|
+
* Returns suggestions sorted by preference, showing which participants are available, softly conflicted by an unconfirmed RSVP, busy, or have unknown status for each slot.
|
|
1548
|
+
*/
|
|
1549
|
+
export type SuggestMeetingTimesScriptInput = {
|
|
311
1550
|
/**
|
|
312
|
-
*
|
|
1551
|
+
* Individual participant or group email addresses to find time with. Resolvable groups are expanded into their members.
|
|
1552
|
+
*/
|
|
1553
|
+
participantEmails: Array<string>
|
|
1554
|
+
/**
|
|
1555
|
+
* The duration of the meeting in minutes
|
|
1556
|
+
*/
|
|
1557
|
+
durationMinutes: number
|
|
1558
|
+
/**
|
|
1559
|
+
* Start of the time range to consider, as an ISO 8601 date-time.
|
|
313
1560
|
*/
|
|
314
1561
|
timeMin: string
|
|
315
1562
|
/**
|
|
316
|
-
* End of the time range, as an ISO 8601 date-time.
|
|
1563
|
+
* End of the time range to consider, as an ISO 8601 date-time.
|
|
317
1564
|
*/
|
|
318
1565
|
timeMax: string
|
|
1566
|
+
/**
|
|
1567
|
+
* Maximum number of suggestions to return (default: 10)
|
|
1568
|
+
*/
|
|
1569
|
+
maxCount?: number
|
|
319
1570
|
/**
|
|
320
1571
|
* Date-times of returned events will be expressed in this time-zone
|
|
321
1572
|
*/
|
|
322
1573
|
timeZone: string
|
|
1574
|
+
/**
|
|
1575
|
+
* Whether to include participant event schedules in the response
|
|
1576
|
+
*/
|
|
1577
|
+
includeParticipantSchedules?: boolean
|
|
323
1578
|
}
|
|
324
1579
|
|
|
325
1580
|
/**
|
|
326
|
-
* Canonical Tool Core output for the "
|
|
1581
|
+
* Canonical Tool Core output for the "Find available meeting times." effect (`calendar.suggestMeetingTimes`).
|
|
327
1582
|
* This is the definition's output schema; the effect's script surface may
|
|
328
1583
|
* re-encode it before returning.
|
|
329
1584
|
*/
|
|
330
|
-
export type
|
|
1585
|
+
export type SuggestMeetingTimesScriptOutput = {
|
|
331
1586
|
/**
|
|
332
|
-
*
|
|
1587
|
+
* Ranked list of available meeting time slots, sorted from most to least preferable. Each slot includes start/end times and categorizes participants by availability status.
|
|
1588
|
+
*/
|
|
1589
|
+
suggestions: Array<{
|
|
1590
|
+
/**
|
|
1591
|
+
* Start time in ISO 8601 format
|
|
1592
|
+
*/
|
|
1593
|
+
startAt: string
|
|
1594
|
+
/**
|
|
1595
|
+
* End time in ISO 8601 format
|
|
1596
|
+
*/
|
|
1597
|
+
endAt: string
|
|
1598
|
+
/**
|
|
1599
|
+
* Total number of hard event conflicts, including multiple events for one participant
|
|
1600
|
+
*/
|
|
1601
|
+
hardEventConflictCount: number
|
|
1602
|
+
/**
|
|
1603
|
+
* Total number of soft event conflicts, including multiple events for one participant
|
|
1604
|
+
*/
|
|
1605
|
+
softEventConflictCount: number
|
|
1606
|
+
/**
|
|
1607
|
+
* Participant emails for invitees with conflicts with this meeting time
|
|
1608
|
+
*/
|
|
1609
|
+
unavailableParticipants: Array<string>
|
|
1610
|
+
/**
|
|
1611
|
+
* Participant emails for invitees who are available for this meeting time
|
|
1612
|
+
*/
|
|
1613
|
+
availableParticipants: Array<string>
|
|
1614
|
+
/**
|
|
1615
|
+
* Participant emails for invitees with overlapping events whose RSVP is not firm yet
|
|
1616
|
+
*/
|
|
1617
|
+
softConflictParticipants: Array<string>
|
|
1618
|
+
/**
|
|
1619
|
+
* Participant emails for invitees with unknown status
|
|
1620
|
+
*/
|
|
1621
|
+
unknownStatus: Array<string>
|
|
1622
|
+
/**
|
|
1623
|
+
* Readable participant events that overlap this meeting time, including the participant and whether each event creates a hard or soft conflict
|
|
1624
|
+
*/
|
|
1625
|
+
conflictingEvents: Array<{
|
|
1626
|
+
participantEmail: string
|
|
1627
|
+
eventId: string
|
|
1628
|
+
summary?: string
|
|
1629
|
+
/**
|
|
1630
|
+
* What kind of event is it? Standard, out of office, birthday...
|
|
1631
|
+
*/
|
|
1632
|
+
eventType:
|
|
1633
|
+
| "fromGmail"
|
|
1634
|
+
| "default"
|
|
1635
|
+
| "focusTime"
|
|
1636
|
+
| "outOfOffice"
|
|
1637
|
+
| "birthday"
|
|
1638
|
+
| "availability"
|
|
1639
|
+
/**
|
|
1640
|
+
* The calendar user's RSVP status
|
|
1641
|
+
*/
|
|
1642
|
+
responseStatus?: "needsAction" | "accepted" | "declined" | "tentative"
|
|
1643
|
+
conflictType: "hard" | "soft"
|
|
1644
|
+
}>
|
|
1645
|
+
}>
|
|
1646
|
+
/**
|
|
1647
|
+
* Whether one or more suggestions use a shorter duration than requested because no sufficiently conflict-free times were available at the requested duration
|
|
1648
|
+
*/
|
|
1649
|
+
usedFlexibleDuration: boolean
|
|
1650
|
+
/**
|
|
1651
|
+
* List of participant schedules, one for each individual participant, including resolved group members. Each schedule includes basic participant information and a list of the participant's calendar events.
|
|
333
1652
|
*/
|
|
334
|
-
|
|
1653
|
+
participantSchedules?: Array<{
|
|
335
1654
|
accountId: string
|
|
336
1655
|
coworkerEmail: string
|
|
337
1656
|
profile?: {
|
|
@@ -340,29 +1659,22 @@ export type ListCoworkersEventsScriptOutput = {
|
|
|
340
1659
|
photoUrl?: string
|
|
341
1660
|
}
|
|
342
1661
|
events: Array<{
|
|
343
|
-
calendar: {
|
|
344
|
-
accountId: string
|
|
345
|
-
calendarId: string
|
|
346
|
-
}
|
|
347
1662
|
eventId: string
|
|
348
|
-
summary: string
|
|
349
|
-
description?: string
|
|
350
|
-
/**
|
|
351
|
-
* Physical location where the event takes place, or remote conference link/info.
|
|
352
|
-
*/
|
|
353
|
-
location?: string
|
|
354
|
-
/**
|
|
355
|
-
* Recurrence rules in RRULE format (e.g., ['RRULE:FREQ=WEEKLY;COUNT=10']). Can also include EXDATE for exception dates (e.g., ['RRULE:FREQ=WEEKLY;COUNT=10', 'EXDATE:2026-03-24T13:00:00']).
|
|
356
|
-
*/
|
|
357
|
-
recurrenceRules?: Array<string>
|
|
358
1663
|
/**
|
|
359
|
-
*
|
|
1664
|
+
* What kind of event is it? Standard, out of office, birthday...
|
|
360
1665
|
*/
|
|
361
|
-
|
|
1666
|
+
eventType?:
|
|
1667
|
+
| "fromGmail"
|
|
1668
|
+
| "default"
|
|
1669
|
+
| "focusTime"
|
|
1670
|
+
| "outOfOffice"
|
|
1671
|
+
| "birthday"
|
|
1672
|
+
| "availability"
|
|
362
1673
|
/**
|
|
363
|
-
*
|
|
1674
|
+
* Is an event confirmed, tentative or cancelled? This is different from the user's RSVP
|
|
364
1675
|
*/
|
|
365
|
-
|
|
1676
|
+
eventStatus?: "confirmed" | "tentative" | "cancelled"
|
|
1677
|
+
summary: string
|
|
366
1678
|
/**
|
|
367
1679
|
* When the event is happening
|
|
368
1680
|
*/
|
|
@@ -400,104 +1712,414 @@ export type ListCoworkersEventsScriptOutput = {
|
|
|
400
1712
|
}
|
|
401
1713
|
}
|
|
402
1714
|
/**
|
|
403
|
-
*
|
|
1715
|
+
* The calendar user's RSVP status
|
|
404
1716
|
*/
|
|
405
|
-
|
|
1717
|
+
responseStatus?: "needsAction" | "accepted" | "declined" | "tentative"
|
|
1718
|
+
colors?: {
|
|
1719
|
+
foreground?: string
|
|
1720
|
+
background?: string
|
|
1721
|
+
}
|
|
406
1722
|
/**
|
|
407
1723
|
* If true, the event does not block time on the calendar. This is equivalent to setting `Show me as to Available` in the Calendar UI.
|
|
408
1724
|
*/
|
|
409
1725
|
isTransparent: boolean
|
|
410
|
-
/**
|
|
411
|
-
* Is the event an auto-blocking event created from another event? Used to create blocked events on a calendar from events on another calendar. You can ignore auto-blocked events if there are events happening at the exact same time on other calendars.
|
|
412
|
-
*/
|
|
413
|
-
isAutoBlock: boolean
|
|
414
|
-
/**
|
|
415
|
-
* What kind of event is it? Standard, out of office, birthday...
|
|
416
|
-
*/
|
|
417
|
-
eventType?:
|
|
418
|
-
| "fromGmail"
|
|
419
|
-
| "default"
|
|
420
|
-
| "focusTime"
|
|
421
|
-
| "outOfOffice"
|
|
422
|
-
| "birthday"
|
|
423
|
-
| "availability"
|
|
424
|
-
/**
|
|
425
|
-
* Is an event confirmed, tentative or cancelled? This is different from the user's RSVP
|
|
426
|
-
*/
|
|
427
|
-
eventStatus?: "confirmed" | "tentative" | "cancelled"
|
|
428
1726
|
/**
|
|
429
1727
|
* Whether it's a meeting, aka an event with attendees listed
|
|
430
1728
|
*/
|
|
431
1729
|
isMeeting: boolean
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
1730
|
+
}>
|
|
1731
|
+
}>
|
|
1732
|
+
errors?: Array<{
|
|
1733
|
+
/**
|
|
1734
|
+
* An identifier for the item that failed (e.g., event summary for creation, event ID for updates/cancellations)
|
|
1735
|
+
*/
|
|
1736
|
+
identifier: string
|
|
1737
|
+
/**
|
|
1738
|
+
* Description of the error that occurred
|
|
1739
|
+
*/
|
|
1740
|
+
errorMessage: string
|
|
1741
|
+
}>
|
|
1742
|
+
}
|
|
1743
|
+
|
|
1744
|
+
/**
|
|
1745
|
+
* Script input for the "Update calendar events." effect (`calendar.updateEvents`),
|
|
1746
|
+
* derived from its Tool Core definition's call_function input projection.
|
|
1747
|
+
*
|
|
1748
|
+
* If the event has an organizer and it's not the user, then only RSVP changes are always allowed. Some participant events may also allow updates when guests can invite others.
|
|
1749
|
+
* If the event has attendees, they will receive a notification of the changes.
|
|
1750
|
+
*/
|
|
1751
|
+
export type UpdateEventsScriptInput = {
|
|
1752
|
+
/**
|
|
1753
|
+
* Date-times of returned events will be expressed in this time-zone
|
|
1754
|
+
*/
|
|
1755
|
+
timeZone: string
|
|
1756
|
+
/**
|
|
1757
|
+
* Event updates to apply.
|
|
1758
|
+
*/
|
|
1759
|
+
updates: Array<
|
|
1760
|
+
| {
|
|
453
1761
|
/**
|
|
454
|
-
*
|
|
1762
|
+
* Must be set to the exact string "RSVP" in upper case.
|
|
455
1763
|
*/
|
|
456
|
-
|
|
457
|
-
displayName?: string
|
|
458
|
-
email?: string
|
|
459
|
-
}
|
|
460
|
-
organizer?: {
|
|
1764
|
+
updateType: "RSVP"
|
|
461
1765
|
/**
|
|
462
|
-
*
|
|
1766
|
+
* Event to update.
|
|
463
1767
|
*/
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
1768
|
+
event: {
|
|
1769
|
+
/**
|
|
1770
|
+
* Calendar containing the event.
|
|
1771
|
+
*/
|
|
1772
|
+
calendar: {
|
|
1773
|
+
/**
|
|
1774
|
+
* Account that owns the event calendar.
|
|
1775
|
+
*/
|
|
1776
|
+
accountId: string
|
|
1777
|
+
/**
|
|
1778
|
+
* Event calendar identifier within the account.
|
|
1779
|
+
*/
|
|
1780
|
+
calendarId: string
|
|
1781
|
+
}
|
|
1782
|
+
/**
|
|
1783
|
+
* Identifier of the event to update.
|
|
1784
|
+
*/
|
|
1785
|
+
eventId: string
|
|
1786
|
+
/**
|
|
1787
|
+
* Optional summary of the event, used by agent UI.
|
|
1788
|
+
*/
|
|
1789
|
+
eventSummary?: string
|
|
1790
|
+
}
|
|
469
1791
|
/**
|
|
470
|
-
*
|
|
1792
|
+
* RSVP update to apply to the event.
|
|
471
1793
|
*/
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
1794
|
+
rsvp: {
|
|
1795
|
+
/**
|
|
1796
|
+
* The calendar user's RSVP status
|
|
1797
|
+
*/
|
|
1798
|
+
responseStatus: "needsAction" | "accepted" | "declined" | "tentative"
|
|
1799
|
+
/**
|
|
1800
|
+
* Optional comment accompanying the RSVP.
|
|
1801
|
+
*/
|
|
1802
|
+
comment?: string
|
|
1803
|
+
}
|
|
1804
|
+
}
|
|
1805
|
+
| {
|
|
477
1806
|
/**
|
|
478
|
-
*
|
|
1807
|
+
* Must be set to the exact string "UPDATE" in upper case.
|
|
479
1808
|
*/
|
|
480
|
-
|
|
481
|
-
}>
|
|
482
|
-
resources?: Array<{
|
|
483
|
-
displayName?: string
|
|
484
|
-
email?: string
|
|
485
|
-
isOptional: boolean
|
|
1809
|
+
updateType: "UPDATE"
|
|
486
1810
|
/**
|
|
487
|
-
*
|
|
1811
|
+
* Event to update.
|
|
488
1812
|
*/
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
1813
|
+
event: {
|
|
1814
|
+
/**
|
|
1815
|
+
* Calendar containing the event.
|
|
1816
|
+
*/
|
|
1817
|
+
calendar: {
|
|
1818
|
+
/**
|
|
1819
|
+
* Account that owns the event calendar.
|
|
1820
|
+
*/
|
|
1821
|
+
accountId: string
|
|
1822
|
+
/**
|
|
1823
|
+
* Event calendar identifier within the account.
|
|
1824
|
+
*/
|
|
1825
|
+
calendarId: string
|
|
1826
|
+
}
|
|
1827
|
+
/**
|
|
1828
|
+
* Identifier of the event to update.
|
|
1829
|
+
*/
|
|
1830
|
+
eventId: string
|
|
1831
|
+
/**
|
|
1832
|
+
* Optional summary of the event, used by agent UI.
|
|
1833
|
+
*/
|
|
1834
|
+
eventSummary?: string
|
|
1835
|
+
}
|
|
1836
|
+
/**
|
|
1837
|
+
* Changes to apply to the event.
|
|
1838
|
+
*/
|
|
1839
|
+
update: {
|
|
1840
|
+
/**
|
|
1841
|
+
* Updated title of the event.
|
|
1842
|
+
*/
|
|
1843
|
+
summary?: string
|
|
1844
|
+
/**
|
|
1845
|
+
* Updated description of the event.
|
|
1846
|
+
*/
|
|
1847
|
+
description?: string
|
|
1848
|
+
/**
|
|
1849
|
+
* Physical location where the event takes place, or remote conference link/info.
|
|
1850
|
+
*/
|
|
1851
|
+
location?: string
|
|
1852
|
+
/**
|
|
1853
|
+
* Recurrence rules in RRULE format (e.g., ['RRULE:FREQ=WEEKLY;COUNT=10']). Can also include EXDATE for exception dates (e.g., ['RRULE:FREQ=WEEKLY;COUNT=10', 'EXDATE:2026-03-24T13:00:00']).
|
|
1854
|
+
*/
|
|
1855
|
+
recurrenceRules?: Array<string>
|
|
1856
|
+
/**
|
|
1857
|
+
* When the event is happening
|
|
1858
|
+
*/
|
|
1859
|
+
period?:
|
|
1860
|
+
| {
|
|
1861
|
+
/**
|
|
1862
|
+
* Whether the updated event period uses all-day dates or date-times.
|
|
1863
|
+
*/
|
|
1864
|
+
type: "DATE"
|
|
1865
|
+
/**
|
|
1866
|
+
* Updated start of the event.
|
|
1867
|
+
*/
|
|
1868
|
+
start: {
|
|
1869
|
+
/**
|
|
1870
|
+
* Date in ISO 8601 format (no time)
|
|
1871
|
+
*/
|
|
1872
|
+
date: string
|
|
1873
|
+
}
|
|
1874
|
+
/**
|
|
1875
|
+
* Updated end of the event.
|
|
1876
|
+
*/
|
|
1877
|
+
end: {
|
|
1878
|
+
/**
|
|
1879
|
+
* Date in ISO 8601 format (no time)
|
|
1880
|
+
*/
|
|
1881
|
+
date: string
|
|
1882
|
+
}
|
|
1883
|
+
}
|
|
1884
|
+
| {
|
|
1885
|
+
/**
|
|
1886
|
+
* Whether the updated event period uses all-day dates or date-times.
|
|
1887
|
+
*/
|
|
1888
|
+
type: "DATE_TIME"
|
|
1889
|
+
/**
|
|
1890
|
+
* Updated start of the event.
|
|
1891
|
+
*/
|
|
1892
|
+
start: {
|
|
1893
|
+
/**
|
|
1894
|
+
* Date-time in ISO 8601 format, in UTC (ending with Z), or with TZ offset, or without TZ offset if `timeZone` is specified in which case will be interpreted as local time in that timeZone
|
|
1895
|
+
*/
|
|
1896
|
+
dateTime: string
|
|
1897
|
+
/**
|
|
1898
|
+
* IANA time zone for the updated event start date-time.
|
|
1899
|
+
*/
|
|
1900
|
+
timeZone?: string
|
|
1901
|
+
}
|
|
1902
|
+
/**
|
|
1903
|
+
* Updated end of the event.
|
|
1904
|
+
*/
|
|
1905
|
+
end: {
|
|
1906
|
+
/**
|
|
1907
|
+
* Date-time in ISO 8601 format, in UTC (ending with Z), or with TZ offset, or without TZ offset if `timeZone` is specified in which case will be interpreted as local time in that timeZone
|
|
1908
|
+
*/
|
|
1909
|
+
dateTime: string
|
|
1910
|
+
/**
|
|
1911
|
+
* IANA time zone for the updated event end date-time.
|
|
1912
|
+
*/
|
|
1913
|
+
timeZone?: string
|
|
1914
|
+
}
|
|
1915
|
+
}
|
|
1916
|
+
/**
|
|
1917
|
+
* Updated list of attendees for the event
|
|
1918
|
+
*/
|
|
1919
|
+
attendees?: Array<{
|
|
1920
|
+
/**
|
|
1921
|
+
* Email address of the attendee.
|
|
1922
|
+
*/
|
|
1923
|
+
email: string
|
|
1924
|
+
/**
|
|
1925
|
+
* Totally optional, provide only if you are sure of the attendee's name
|
|
1926
|
+
*/
|
|
1927
|
+
displayName?: string
|
|
1928
|
+
/**
|
|
1929
|
+
* Set only if the user was explicit about an attendee not being required
|
|
1930
|
+
*/
|
|
1931
|
+
isOptional?: boolean
|
|
1932
|
+
}>
|
|
1933
|
+
/**
|
|
1934
|
+
* Updated list of resources (such as rooms) for the event. Must be from the same account as `event.calendar`.
|
|
1935
|
+
*/
|
|
1936
|
+
resources?: Array<{
|
|
1937
|
+
/**
|
|
1938
|
+
* Email address of the resource.
|
|
1939
|
+
*/
|
|
1940
|
+
email?: string
|
|
1941
|
+
/**
|
|
1942
|
+
* Display name of the resource.
|
|
1943
|
+
*/
|
|
1944
|
+
displayName?: string
|
|
1945
|
+
/**
|
|
1946
|
+
* Set only if the user was explicit about a resource not being required
|
|
1947
|
+
*/
|
|
1948
|
+
isOptional: boolean
|
|
1949
|
+
}>
|
|
1950
|
+
/**
|
|
1951
|
+
* Whether to add conferencing to this event. Only adds conferencing if the event has attendees and doesn't already have conferencing.
|
|
1952
|
+
*/
|
|
1953
|
+
addConferencing?: boolean
|
|
1954
|
+
}
|
|
1955
|
+
}
|
|
1956
|
+
>
|
|
1957
|
+
}
|
|
1958
|
+
|
|
1959
|
+
/**
|
|
1960
|
+
* Canonical Tool Core output for the "Update calendar events." effect (`calendar.updateEvents`).
|
|
1961
|
+
* This is the definition's output schema; the effect's script surface may
|
|
1962
|
+
* re-encode it before returning.
|
|
1963
|
+
*/
|
|
1964
|
+
export type UpdateEventsScriptOutput = {
|
|
1965
|
+
updatedEvents: Array<{
|
|
1966
|
+
calendar: {
|
|
1967
|
+
accountId: string
|
|
1968
|
+
calendarId: string
|
|
1969
|
+
}
|
|
1970
|
+
eventId: string
|
|
1971
|
+
summary: string
|
|
1972
|
+
description?: string
|
|
1973
|
+
/**
|
|
1974
|
+
* Physical location where the event takes place, or remote conference link/info.
|
|
1975
|
+
*/
|
|
1976
|
+
location?: string
|
|
1977
|
+
/**
|
|
1978
|
+
* Recurrence rules in RRULE format (e.g., ['RRULE:FREQ=WEEKLY;COUNT=10']). Can also include EXDATE for exception dates (e.g., ['RRULE:FREQ=WEEKLY;COUNT=10', 'EXDATE:2026-03-24T13:00:00']).
|
|
1979
|
+
*/
|
|
1980
|
+
recurrenceRules?: Array<string>
|
|
1981
|
+
/**
|
|
1982
|
+
* The data provider this event belongs to
|
|
1983
|
+
*/
|
|
1984
|
+
provider?: "google" | "notion" | "icloud" | "outlook"
|
|
1985
|
+
/**
|
|
1986
|
+
* The URL to view the event in the Calendar app.
|
|
1987
|
+
*/
|
|
1988
|
+
webUrl: string
|
|
1989
|
+
/**
|
|
1990
|
+
* When the event is happening
|
|
1991
|
+
*/
|
|
1992
|
+
period:
|
|
1993
|
+
| {
|
|
1994
|
+
type: "DATE"
|
|
1995
|
+
start: {
|
|
1996
|
+
/**
|
|
1997
|
+
* Date in ISO 8601 format (no time)
|
|
1998
|
+
*/
|
|
1999
|
+
date: string
|
|
2000
|
+
}
|
|
2001
|
+
end: {
|
|
2002
|
+
/**
|
|
2003
|
+
* Date in ISO 8601 format (no time)
|
|
2004
|
+
*/
|
|
2005
|
+
date: string
|
|
2006
|
+
}
|
|
2007
|
+
}
|
|
2008
|
+
| {
|
|
2009
|
+
type: "DATE_TIME"
|
|
2010
|
+
start: {
|
|
2011
|
+
/**
|
|
2012
|
+
* Date-time in ISO 8601 format, in UTC (ending with Z), or with TZ offset
|
|
2013
|
+
*/
|
|
2014
|
+
dateTime: string
|
|
2015
|
+
timeZone?: string
|
|
2016
|
+
}
|
|
2017
|
+
end: {
|
|
2018
|
+
/**
|
|
2019
|
+
* Date-time in ISO 8601 format, in UTC (ending with Z), or with TZ offset
|
|
2020
|
+
*/
|
|
2021
|
+
dateTime: string
|
|
2022
|
+
timeZone?: string
|
|
2023
|
+
}
|
|
2024
|
+
}
|
|
2025
|
+
/**
|
|
2026
|
+
* Whether it's part of a recurring event series
|
|
2027
|
+
*/
|
|
2028
|
+
isRecurring: boolean
|
|
2029
|
+
/**
|
|
2030
|
+
* If true, the event does not block time on the calendar. This is equivalent to setting `Show me as to Available` in the Calendar UI.
|
|
2031
|
+
*/
|
|
2032
|
+
isTransparent: boolean
|
|
2033
|
+
/**
|
|
2034
|
+
* Is the event an auto-blocking event created from another event? Used to create blocked events on a calendar from events on another calendar. You can ignore auto-blocked events if there are events happening at the exact same time on other calendars.
|
|
2035
|
+
*/
|
|
2036
|
+
isAutoBlock: boolean
|
|
2037
|
+
/**
|
|
2038
|
+
* What kind of event is it? Standard, out of office, birthday...
|
|
2039
|
+
*/
|
|
2040
|
+
eventType?:
|
|
2041
|
+
| "fromGmail"
|
|
2042
|
+
| "default"
|
|
2043
|
+
| "focusTime"
|
|
2044
|
+
| "outOfOffice"
|
|
2045
|
+
| "birthday"
|
|
2046
|
+
| "availability"
|
|
2047
|
+
/**
|
|
2048
|
+
* Is an event confirmed, tentative or cancelled? This is different from the user's RSVP
|
|
2049
|
+
*/
|
|
2050
|
+
eventStatus?: "confirmed" | "tentative" | "cancelled"
|
|
2051
|
+
/**
|
|
2052
|
+
* Whether it's a meeting, aka an event with attendees listed
|
|
2053
|
+
*/
|
|
2054
|
+
isMeeting: boolean
|
|
2055
|
+
conferencingEntryPoints?: Array<{
|
|
2056
|
+
uri: string
|
|
2057
|
+
accessCode?: string
|
|
2058
|
+
entryPointType?: "video" | "phone" | "sip" | "more"
|
|
2059
|
+
label?: string
|
|
2060
|
+
meetingCode?: string
|
|
2061
|
+
passcode?: string
|
|
2062
|
+
password?: string
|
|
2063
|
+
pin?: string
|
|
2064
|
+
notes?: string
|
|
2065
|
+
signature?: string
|
|
2066
|
+
}>
|
|
2067
|
+
/**
|
|
2068
|
+
* The URL to join the video conference, if available
|
|
2069
|
+
*/
|
|
2070
|
+
conferencingUrl?: string
|
|
2071
|
+
/**
|
|
2072
|
+
* The calendar user's RSVP status
|
|
2073
|
+
*/
|
|
2074
|
+
responseStatus?: "needsAction" | "accepted" | "declined" | "tentative"
|
|
2075
|
+
creator?: {
|
|
2076
|
+
/**
|
|
2077
|
+
* Whether this entry represents the calendar user
|
|
2078
|
+
*/
|
|
2079
|
+
isSelf: boolean
|
|
2080
|
+
displayName?: string
|
|
2081
|
+
email?: string
|
|
2082
|
+
}
|
|
2083
|
+
organizer?: {
|
|
2084
|
+
/**
|
|
2085
|
+
* Whether this entry represents the calendar user
|
|
2086
|
+
*/
|
|
2087
|
+
isSelf: boolean
|
|
2088
|
+
displayName?: string
|
|
2089
|
+
email?: string
|
|
2090
|
+
}
|
|
2091
|
+
attendees?: Array<{
|
|
2092
|
+
/**
|
|
2093
|
+
* Whether this entry represents the calendar user
|
|
2094
|
+
*/
|
|
2095
|
+
isSelf: boolean
|
|
2096
|
+
displayName?: string
|
|
2097
|
+
email?: string
|
|
2098
|
+
isOptional: boolean
|
|
2099
|
+
isOrganizer?: boolean
|
|
2100
|
+
/**
|
|
2101
|
+
* The calendar user's RSVP status
|
|
2102
|
+
*/
|
|
2103
|
+
responseStatus?: "needsAction" | "accepted" | "declined" | "tentative"
|
|
2104
|
+
}>
|
|
2105
|
+
resources?: Array<{
|
|
2106
|
+
displayName?: string
|
|
2107
|
+
email?: string
|
|
2108
|
+
isOptional: boolean
|
|
2109
|
+
/**
|
|
2110
|
+
* The calendar user's RSVP status
|
|
2111
|
+
*/
|
|
2112
|
+
responseStatus?: "needsAction" | "accepted" | "declined" | "tentative"
|
|
2113
|
+
}>
|
|
2114
|
+
colors?: {
|
|
2115
|
+
foreground?: string
|
|
2116
|
+
background?: string
|
|
2117
|
+
}
|
|
2118
|
+
attachments?: Array<{
|
|
2119
|
+
url: string
|
|
2120
|
+
mimeType?: string
|
|
2121
|
+
title?: string
|
|
2122
|
+
notionWorkspaceId?: string
|
|
501
2123
|
}>
|
|
502
2124
|
}>
|
|
503
2125
|
errors?: Array<{
|
|
@@ -513,302 +2135,130 @@ export type ListCoworkersEventsScriptOutput = {
|
|
|
513
2135
|
}
|
|
514
2136
|
|
|
515
2137
|
/**
|
|
516
|
-
* Script input for the "
|
|
2138
|
+
* Script input for the "Update a scheduling link." effect (`calendar.updateSchedulingLink`),
|
|
517
2139
|
* derived from its Tool Core definition's call_function input projection.
|
|
518
2140
|
*
|
|
519
|
-
*
|
|
2141
|
+
* Update an existing active scheduling link by providing its current identity and a patch of requested changes. Omitted patch fields are left unchanged, and nullable patch fields can be cleared with null.
|
|
520
2142
|
*/
|
|
521
|
-
export type
|
|
522
|
-
/**
|
|
523
|
-
* Start of the time range, as an ISO 8601 date-time.
|
|
524
|
-
*/
|
|
525
|
-
timeMin: string
|
|
526
|
-
/**
|
|
527
|
-
* End of the time range, as an ISO 8601 date-time.
|
|
528
|
-
*/
|
|
529
|
-
timeMax: string
|
|
530
|
-
/**
|
|
531
|
-
* Date-times of returned events will be expressed in this time-zone
|
|
532
|
-
*/
|
|
533
|
-
timeZone: string
|
|
2143
|
+
export type UpdateSchedulingLinkScriptInput = {
|
|
534
2144
|
/**
|
|
535
|
-
*
|
|
2145
|
+
* Identity of the scheduling link to update. These fields are used only to select and guard the existing link.
|
|
536
2146
|
*/
|
|
537
|
-
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
/**
|
|
541
|
-
* Canonical Tool Core output for the "List the user's events from different calendars." effect (`calendar.listEvents`).
|
|
542
|
-
* This is the definition's output schema; the effect's script surface may
|
|
543
|
-
* re-encode it before returning.
|
|
544
|
-
*/
|
|
545
|
-
export type ListEventsScriptOutput = {
|
|
546
|
-
accounts: Array<{
|
|
547
|
-
accountId: string
|
|
548
|
-
/**
|
|
549
|
-
* Google, Apple iCloud, Outlook, etc.
|
|
550
|
-
*/
|
|
551
|
-
providerName: string
|
|
2147
|
+
identity: {
|
|
552
2148
|
/**
|
|
553
|
-
*
|
|
2149
|
+
* ID of the scheduling link to update
|
|
554
2150
|
*/
|
|
555
|
-
|
|
2151
|
+
schedulingLinkId: string
|
|
556
2152
|
/**
|
|
557
|
-
*
|
|
2153
|
+
* Current booking calendar for this scheduling link. Used to verify that the agent is updating the intended link.
|
|
558
2154
|
*/
|
|
559
|
-
|
|
560
|
-
capabilities: {
|
|
561
|
-
/**
|
|
562
|
-
* Does this account expose any calendars?
|
|
563
|
-
*/
|
|
564
|
-
readCalendars: boolean
|
|
2155
|
+
bookingCalendarRef: {
|
|
565
2156
|
/**
|
|
566
|
-
*
|
|
2157
|
+
* Account that owns the current booking calendar.
|
|
567
2158
|
*/
|
|
568
|
-
|
|
2159
|
+
accountId: string
|
|
569
2160
|
/**
|
|
570
|
-
*
|
|
2161
|
+
* Current booking calendar identifier within the account.
|
|
571
2162
|
*/
|
|
572
|
-
|
|
2163
|
+
calendarId: string
|
|
2164
|
+
}
|
|
2165
|
+
}
|
|
2166
|
+
/**
|
|
2167
|
+
* Patch of changes to apply to the scheduling link. Omitted fields are left unchanged, and nullable fields can be cleared with null.
|
|
2168
|
+
*/
|
|
2169
|
+
patch?: {
|
|
2170
|
+
/**
|
|
2171
|
+
* Replace the calendar where meetings booked through this scheduling link are created
|
|
2172
|
+
*/
|
|
2173
|
+
bookingCalendar?: {
|
|
573
2174
|
/**
|
|
574
|
-
*
|
|
2175
|
+
* Account that owns the replacement booking calendar.
|
|
575
2176
|
*/
|
|
576
|
-
|
|
2177
|
+
accountId: string
|
|
577
2178
|
/**
|
|
578
|
-
*
|
|
2179
|
+
* Replacement booking calendar identifier within the account.
|
|
579
2180
|
*/
|
|
580
|
-
|
|
2181
|
+
calendarId: string
|
|
581
2182
|
}
|
|
582
2183
|
/**
|
|
583
|
-
*
|
|
2184
|
+
* Replace the calendars checked for conflicts when determining availability
|
|
584
2185
|
*/
|
|
585
|
-
|
|
586
|
-
calendars: Array<{
|
|
587
|
-
accountId: string
|
|
588
|
-
calendarId: string
|
|
589
|
-
name: string
|
|
590
|
-
description?: string
|
|
591
|
-
colors?: {
|
|
592
|
-
foreground?: string
|
|
593
|
-
background?: string
|
|
594
|
-
}
|
|
595
|
-
isPrimary: boolean
|
|
2186
|
+
conflictCalendars?: Array<{
|
|
596
2187
|
/**
|
|
597
|
-
*
|
|
2188
|
+
* Account that owns the replacement conflict calendar.
|
|
598
2189
|
*/
|
|
599
|
-
|
|
2190
|
+
accountId: string
|
|
600
2191
|
/**
|
|
601
|
-
*
|
|
602
|
-
* Calendars that are not selected might be useful to get lower-signal events, but probably not to create events as it might not be visible to the user.
|
|
2192
|
+
* Replacement conflict calendar identifier within the account.
|
|
603
2193
|
*/
|
|
604
|
-
|
|
2194
|
+
calendarId: string
|
|
2195
|
+
}>
|
|
2196
|
+
/**
|
|
2197
|
+
* Update the scheduling link title. Use null to clear it.
|
|
2198
|
+
*/
|
|
2199
|
+
title?: string | null
|
|
2200
|
+
/**
|
|
2201
|
+
* Update the scheduling link description. Use null to clear it.
|
|
2202
|
+
*/
|
|
2203
|
+
description?: string | null
|
|
2204
|
+
/**
|
|
2205
|
+
* Update the meeting duration in minutes
|
|
2206
|
+
*/
|
|
2207
|
+
duration?: number
|
|
2208
|
+
/**
|
|
2209
|
+
* Replace the scheduling link availability windows
|
|
2210
|
+
*/
|
|
2211
|
+
timeRanges?: Array<{
|
|
605
2212
|
/**
|
|
606
|
-
*
|
|
607
|
-
* Hidden calendars might be useful to know what you might have access to, but keep in mind the user hid them and is most likely not aware of their content.
|
|
2213
|
+
* Start of availability window in ISO 8601 format with timezone offset, e.g. '2024-08-22T09:00:00-04:00'
|
|
608
2214
|
*/
|
|
609
|
-
|
|
2215
|
+
startDate: string
|
|
610
2216
|
/**
|
|
611
|
-
*
|
|
612
|
-
*/
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
}
|
|
619
|
-
eventId: string
|
|
620
|
-
summary: string
|
|
621
|
-
description?: string
|
|
622
|
-
/**
|
|
623
|
-
* Physical location where the event takes place, or remote conference link/info.
|
|
624
|
-
*/
|
|
625
|
-
location?: string
|
|
626
|
-
/**
|
|
627
|
-
* Recurrence rules in RRULE format (e.g., ['RRULE:FREQ=WEEKLY;COUNT=10']). Can also include EXDATE for exception dates (e.g., ['RRULE:FREQ=WEEKLY;COUNT=10', 'EXDATE:2026-03-24T13:00:00']).
|
|
628
|
-
*/
|
|
629
|
-
recurrenceRules?: Array<string>
|
|
630
|
-
/**
|
|
631
|
-
* The data provider this event belongs to
|
|
632
|
-
*/
|
|
633
|
-
provider?: "google" | "notion" | "icloud" | "outlook"
|
|
634
|
-
/**
|
|
635
|
-
* The URL to view the event in the Calendar app.
|
|
636
|
-
*/
|
|
637
|
-
webUrl: string
|
|
638
|
-
/**
|
|
639
|
-
* When the event is happening
|
|
640
|
-
*/
|
|
641
|
-
period:
|
|
642
|
-
| {
|
|
643
|
-
type: "DATE"
|
|
644
|
-
start: {
|
|
645
|
-
/**
|
|
646
|
-
* Date in ISO 8601 format (no time)
|
|
647
|
-
*/
|
|
648
|
-
date: string
|
|
649
|
-
}
|
|
650
|
-
end: {
|
|
651
|
-
/**
|
|
652
|
-
* Date in ISO 8601 format (no time)
|
|
653
|
-
*/
|
|
654
|
-
date: string
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
|
-
| {
|
|
658
|
-
type: "DATE_TIME"
|
|
659
|
-
start: {
|
|
660
|
-
/**
|
|
661
|
-
* Date-time in ISO 8601 format, in UTC (ending with Z), or with TZ offset
|
|
662
|
-
*/
|
|
663
|
-
dateTime: string
|
|
664
|
-
timeZone?: string
|
|
665
|
-
}
|
|
666
|
-
end: {
|
|
667
|
-
/**
|
|
668
|
-
* Date-time in ISO 8601 format, in UTC (ending with Z), or with TZ offset
|
|
669
|
-
*/
|
|
670
|
-
dateTime: string
|
|
671
|
-
timeZone?: string
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
/**
|
|
675
|
-
* Whether it's part of a recurring event series
|
|
676
|
-
*/
|
|
677
|
-
isRecurring: boolean
|
|
678
|
-
/**
|
|
679
|
-
* If true, the event does not block time on the calendar. This is equivalent to setting `Show me as to Available` in the Calendar UI.
|
|
680
|
-
*/
|
|
681
|
-
isTransparent: boolean
|
|
682
|
-
/**
|
|
683
|
-
* Is the event an auto-blocking event created from another event? Used to create blocked events on a calendar from events on another calendar. You can ignore auto-blocked events if there are events happening at the exact same time on other calendars.
|
|
684
|
-
*/
|
|
685
|
-
isAutoBlock: boolean
|
|
686
|
-
/**
|
|
687
|
-
* What kind of event is it? Standard, out of office, birthday...
|
|
688
|
-
*/
|
|
689
|
-
eventType?:
|
|
690
|
-
| "fromGmail"
|
|
691
|
-
| "default"
|
|
692
|
-
| "focusTime"
|
|
693
|
-
| "outOfOffice"
|
|
694
|
-
| "birthday"
|
|
695
|
-
| "availability"
|
|
696
|
-
/**
|
|
697
|
-
* Is an event confirmed, tentative or cancelled? This is different from the user's RSVP
|
|
698
|
-
*/
|
|
699
|
-
eventStatus?: "confirmed" | "tentative" | "cancelled"
|
|
700
|
-
/**
|
|
701
|
-
* Whether it's a meeting, aka an event with attendees listed
|
|
702
|
-
*/
|
|
703
|
-
isMeeting: boolean
|
|
704
|
-
conferencingEntryPoints?: Array<{
|
|
705
|
-
uri: string
|
|
706
|
-
accessCode?: string
|
|
707
|
-
entryPointType?: "video" | "phone" | "sip" | "more"
|
|
708
|
-
label?: string
|
|
709
|
-
meetingCode?: string
|
|
710
|
-
passcode?: string
|
|
711
|
-
password?: string
|
|
712
|
-
pin?: string
|
|
713
|
-
notes?: string
|
|
714
|
-
signature?: string
|
|
715
|
-
}>
|
|
716
|
-
/**
|
|
717
|
-
* The URL to join the video conference, if available
|
|
718
|
-
*/
|
|
719
|
-
conferencingUrl?: string
|
|
720
|
-
/**
|
|
721
|
-
* The calendar user's RSVP status
|
|
722
|
-
*/
|
|
723
|
-
responseStatus?: "needsAction" | "accepted" | "declined" | "tentative"
|
|
724
|
-
creator?: {
|
|
725
|
-
/**
|
|
726
|
-
* Whether this entry represents the calendar user
|
|
727
|
-
*/
|
|
728
|
-
isSelf: boolean
|
|
729
|
-
displayName?: string
|
|
730
|
-
email?: string
|
|
731
|
-
}
|
|
732
|
-
organizer?: {
|
|
733
|
-
/**
|
|
734
|
-
* Whether this entry represents the calendar user
|
|
735
|
-
*/
|
|
736
|
-
isSelf: boolean
|
|
737
|
-
displayName?: string
|
|
738
|
-
email?: string
|
|
739
|
-
}
|
|
740
|
-
attendees?: Array<{
|
|
741
|
-
/**
|
|
742
|
-
* Whether this entry represents the calendar user
|
|
743
|
-
*/
|
|
744
|
-
isSelf: boolean
|
|
745
|
-
displayName?: string
|
|
746
|
-
email?: string
|
|
747
|
-
isOptional: boolean
|
|
748
|
-
isOrganizer?: boolean
|
|
749
|
-
/**
|
|
750
|
-
* The calendar user's RSVP status
|
|
751
|
-
*/
|
|
752
|
-
responseStatus?: "needsAction" | "accepted" | "declined" | "tentative"
|
|
753
|
-
}>
|
|
754
|
-
resources?: Array<{
|
|
755
|
-
displayName?: string
|
|
756
|
-
email?: string
|
|
757
|
-
isOptional: boolean
|
|
758
|
-
/**
|
|
759
|
-
* The calendar user's RSVP status
|
|
760
|
-
*/
|
|
761
|
-
responseStatus?: "needsAction" | "accepted" | "declined" | "tentative"
|
|
762
|
-
}>
|
|
763
|
-
colors?: {
|
|
764
|
-
foreground?: string
|
|
765
|
-
background?: string
|
|
766
|
-
}
|
|
767
|
-
attachments?: Array<{
|
|
768
|
-
url: string
|
|
769
|
-
mimeType?: string
|
|
770
|
-
title?: string
|
|
771
|
-
notionWorkspaceId?: string
|
|
772
|
-
}>
|
|
773
|
-
}>
|
|
2217
|
+
* End of availability window in ISO 8601 format with timezone offset, e.g. '2024-08-22T17:00:00-04:00'
|
|
2218
|
+
*/
|
|
2219
|
+
endDate: string
|
|
2220
|
+
/**
|
|
2221
|
+
* Recurrence rules in RRULE format (e.g., ['RRULE:FREQ=WEEKLY;COUNT=10']). Can also include EXDATE for exception dates (e.g., ['RRULE:FREQ=WEEKLY;COUNT=10', 'EXDATE:2026-03-24T13:00:00']).
|
|
2222
|
+
*/
|
|
2223
|
+
recurrence?: Array<string>
|
|
774
2224
|
}>
|
|
775
|
-
}>
|
|
776
|
-
/**
|
|
777
|
-
* User preferences for calendar data
|
|
778
|
-
*/
|
|
779
|
-
userPreferences: {
|
|
780
2225
|
/**
|
|
781
|
-
*
|
|
2226
|
+
* Update the scheduling link type. If omitted while timeRanges are updated, the type is inferred from the new timeRanges.
|
|
782
2227
|
*/
|
|
783
|
-
|
|
2228
|
+
type?: "singleUse" | "multiUse" | "recurring"
|
|
2229
|
+
/**
|
|
2230
|
+
* Update the custom URL slug for the scheduling link. Must be between 1 and 32 characters.
|
|
2231
|
+
*/
|
|
2232
|
+
alias?: string
|
|
2233
|
+
/**
|
|
2234
|
+
* If true, apply the default conferencing for the effective booking calendar account. If false, clear conferencing.
|
|
2235
|
+
*/
|
|
2236
|
+
useDefaultConferencing?: boolean
|
|
2237
|
+
/**
|
|
2238
|
+
* Update the minimum lead time in minutes. Must be 0 or greater and less than maxLeadTime when both are set. Use null to clear it.
|
|
2239
|
+
*/
|
|
2240
|
+
minLeadTime?: number | null
|
|
2241
|
+
/**
|
|
2242
|
+
* Update the maximum lead time in minutes. Must be greater than 0 and greater than minLeadTime when both are set. Use null to clear it.
|
|
2243
|
+
*/
|
|
2244
|
+
maxLeadTime?: number | null
|
|
2245
|
+
/**
|
|
2246
|
+
* Update the expiration date for the scheduling link. Must be in the future when provided. Use null to clear it.
|
|
2247
|
+
*/
|
|
2248
|
+
expirationDate?: string | null
|
|
784
2249
|
}
|
|
785
|
-
errors: Array<{
|
|
786
|
-
accountId: string
|
|
787
|
-
calendarId: string
|
|
788
|
-
error: string
|
|
789
|
-
}>
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
/**
|
|
793
|
-
* Script input for the "List the user's scheduling links." effect (`calendar.listSchedulingLinks`),
|
|
794
|
-
* derived from its Tool Core definition's call_function input projection.
|
|
795
|
-
*
|
|
796
|
-
* List active, unexpired scheduling links with upcoming time ranges, optionally filtered by link type.
|
|
797
|
-
*/
|
|
798
|
-
export type ListSchedulingLinksScriptInput = {
|
|
799
|
-
/**
|
|
800
|
-
* Return only scheduling links of this type
|
|
801
|
-
*/
|
|
802
|
-
type?: "singleUse" | "multiUse" | "recurring"
|
|
803
2250
|
}
|
|
804
2251
|
|
|
805
2252
|
/**
|
|
806
|
-
* Canonical Tool Core output for the "
|
|
2253
|
+
* Canonical Tool Core output for the "Update a scheduling link." effect (`calendar.updateSchedulingLink`).
|
|
807
2254
|
* This is the definition's output schema; the effect's script surface may
|
|
808
2255
|
* re-encode it before returning.
|
|
809
2256
|
*/
|
|
810
|
-
export type
|
|
811
|
-
|
|
2257
|
+
export type UpdateSchedulingLinkScriptOutput = {
|
|
2258
|
+
/**
|
|
2259
|
+
* The updated scheduling link
|
|
2260
|
+
*/
|
|
2261
|
+
schedulingLink?: {
|
|
812
2262
|
/**
|
|
813
2263
|
* Unique ID of the created scheduling link
|
|
814
2264
|
*/
|
|
@@ -861,200 +2311,7 @@ export type ListSchedulingLinksScriptOutput = {
|
|
|
861
2311
|
*/
|
|
862
2312
|
id: string
|
|
863
2313
|
}>
|
|
864
|
-
}
|
|
865
|
-
}
|
|
866
|
-
|
|
867
|
-
/**
|
|
868
|
-
* Script input for the "Find available meeting times." effect (`calendar.suggestMeetingTimes`),
|
|
869
|
-
* derived from its Tool Core definition's call_function input projection.
|
|
870
|
-
*
|
|
871
|
-
* Analyzes calendar availability for multiple participants and returns ranked time slots when everyone is free.
|
|
872
|
-
* Use this when scheduling meetings or finding times that work for a group of people.
|
|
873
|
-
* Returns suggestions sorted by preference, showing which participants are available, softly conflicted by an unconfirmed RSVP, busy, or have unknown status for each slot.
|
|
874
|
-
*/
|
|
875
|
-
export type SuggestMeetingTimesScriptInput = {
|
|
876
|
-
/**
|
|
877
|
-
* Individual participant or group email addresses to find time with. Resolvable groups are expanded into their members.
|
|
878
|
-
*/
|
|
879
|
-
participantEmails: Array<string>
|
|
880
|
-
/**
|
|
881
|
-
* The duration of the meeting in minutes
|
|
882
|
-
*/
|
|
883
|
-
durationMinutes: number
|
|
884
|
-
/**
|
|
885
|
-
* Start of the time range to consider, as an ISO 8601 date-time.
|
|
886
|
-
*/
|
|
887
|
-
timeMin: string
|
|
888
|
-
/**
|
|
889
|
-
* End of the time range to consider, as an ISO 8601 date-time.
|
|
890
|
-
*/
|
|
891
|
-
timeMax: string
|
|
892
|
-
/**
|
|
893
|
-
* Maximum number of suggestions to return (default: 10)
|
|
894
|
-
*/
|
|
895
|
-
maxCount?: number
|
|
896
|
-
/**
|
|
897
|
-
* Date-times of returned events will be expressed in this time-zone
|
|
898
|
-
*/
|
|
899
|
-
timeZone: string
|
|
900
|
-
/**
|
|
901
|
-
* Whether to include participant event schedules in the response
|
|
902
|
-
*/
|
|
903
|
-
includeParticipantSchedules?: boolean
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
/**
|
|
907
|
-
* Canonical Tool Core output for the "Find available meeting times." effect (`calendar.suggestMeetingTimes`).
|
|
908
|
-
* This is the definition's output schema; the effect's script surface may
|
|
909
|
-
* re-encode it before returning.
|
|
910
|
-
*/
|
|
911
|
-
export type SuggestMeetingTimesScriptOutput = {
|
|
912
|
-
/**
|
|
913
|
-
* Ranked list of available meeting time slots, sorted from most to least preferable. Each slot includes start/end times and categorizes participants by availability status.
|
|
914
|
-
*/
|
|
915
|
-
suggestions: Array<{
|
|
916
|
-
/**
|
|
917
|
-
* Start time in ISO 8601 format
|
|
918
|
-
*/
|
|
919
|
-
startAt: string
|
|
920
|
-
/**
|
|
921
|
-
* End time in ISO 8601 format
|
|
922
|
-
*/
|
|
923
|
-
endAt: string
|
|
924
|
-
/**
|
|
925
|
-
* Total number of hard event conflicts, including multiple events for one participant
|
|
926
|
-
*/
|
|
927
|
-
hardEventConflictCount: number
|
|
928
|
-
/**
|
|
929
|
-
* Total number of soft event conflicts, including multiple events for one participant
|
|
930
|
-
*/
|
|
931
|
-
softEventConflictCount: number
|
|
932
|
-
/**
|
|
933
|
-
* Participant emails for invitees with conflicts with this meeting time
|
|
934
|
-
*/
|
|
935
|
-
unavailableParticipants: Array<string>
|
|
936
|
-
/**
|
|
937
|
-
* Participant emails for invitees who are available for this meeting time
|
|
938
|
-
*/
|
|
939
|
-
availableParticipants: Array<string>
|
|
940
|
-
/**
|
|
941
|
-
* Participant emails for invitees with overlapping events whose RSVP is not firm yet
|
|
942
|
-
*/
|
|
943
|
-
softConflictParticipants: Array<string>
|
|
944
|
-
/**
|
|
945
|
-
* Participant emails for invitees with unknown status
|
|
946
|
-
*/
|
|
947
|
-
unknownStatus: Array<string>
|
|
948
|
-
/**
|
|
949
|
-
* Readable participant events that overlap this meeting time, including the participant and whether each event creates a hard or soft conflict
|
|
950
|
-
*/
|
|
951
|
-
conflictingEvents: Array<{
|
|
952
|
-
participantEmail: string
|
|
953
|
-
eventId: string
|
|
954
|
-
summary?: string
|
|
955
|
-
/**
|
|
956
|
-
* What kind of event is it? Standard, out of office, birthday...
|
|
957
|
-
*/
|
|
958
|
-
eventType:
|
|
959
|
-
| "fromGmail"
|
|
960
|
-
| "default"
|
|
961
|
-
| "focusTime"
|
|
962
|
-
| "outOfOffice"
|
|
963
|
-
| "birthday"
|
|
964
|
-
| "availability"
|
|
965
|
-
/**
|
|
966
|
-
* The calendar user's RSVP status
|
|
967
|
-
*/
|
|
968
|
-
responseStatus?: "needsAction" | "accepted" | "declined" | "tentative"
|
|
969
|
-
conflictType: "hard" | "soft"
|
|
970
|
-
}>
|
|
971
|
-
}>
|
|
972
|
-
/**
|
|
973
|
-
* Whether one or more suggestions use a shorter duration than requested because no sufficiently conflict-free times were available at the requested duration
|
|
974
|
-
*/
|
|
975
|
-
usedFlexibleDuration: boolean
|
|
976
|
-
/**
|
|
977
|
-
* List of participant schedules, one for each individual participant, including resolved group members. Each schedule includes basic participant information and a list of the participant's calendar events.
|
|
978
|
-
*/
|
|
979
|
-
participantSchedules?: Array<{
|
|
980
|
-
accountId: string
|
|
981
|
-
coworkerEmail: string
|
|
982
|
-
profile?: {
|
|
983
|
-
displayName?: string
|
|
984
|
-
email?: string
|
|
985
|
-
photoUrl?: string
|
|
986
|
-
}
|
|
987
|
-
events: Array<{
|
|
988
|
-
eventId: string
|
|
989
|
-
/**
|
|
990
|
-
* What kind of event is it? Standard, out of office, birthday...
|
|
991
|
-
*/
|
|
992
|
-
eventType?:
|
|
993
|
-
| "fromGmail"
|
|
994
|
-
| "default"
|
|
995
|
-
| "focusTime"
|
|
996
|
-
| "outOfOffice"
|
|
997
|
-
| "birthday"
|
|
998
|
-
| "availability"
|
|
999
|
-
/**
|
|
1000
|
-
* Is an event confirmed, tentative or cancelled? This is different from the user's RSVP
|
|
1001
|
-
*/
|
|
1002
|
-
eventStatus?: "confirmed" | "tentative" | "cancelled"
|
|
1003
|
-
summary: string
|
|
1004
|
-
/**
|
|
1005
|
-
* When the event is happening
|
|
1006
|
-
*/
|
|
1007
|
-
period:
|
|
1008
|
-
| {
|
|
1009
|
-
type: "DATE"
|
|
1010
|
-
start: {
|
|
1011
|
-
/**
|
|
1012
|
-
* Date in ISO 8601 format (no time)
|
|
1013
|
-
*/
|
|
1014
|
-
date: string
|
|
1015
|
-
}
|
|
1016
|
-
end: {
|
|
1017
|
-
/**
|
|
1018
|
-
* Date in ISO 8601 format (no time)
|
|
1019
|
-
*/
|
|
1020
|
-
date: string
|
|
1021
|
-
}
|
|
1022
|
-
}
|
|
1023
|
-
| {
|
|
1024
|
-
type: "DATE_TIME"
|
|
1025
|
-
start: {
|
|
1026
|
-
/**
|
|
1027
|
-
* Date-time in ISO 8601 format, in UTC (ending with Z), or with TZ offset
|
|
1028
|
-
*/
|
|
1029
|
-
dateTime: string
|
|
1030
|
-
timeZone?: string
|
|
1031
|
-
}
|
|
1032
|
-
end: {
|
|
1033
|
-
/**
|
|
1034
|
-
* Date-time in ISO 8601 format, in UTC (ending with Z), or with TZ offset
|
|
1035
|
-
*/
|
|
1036
|
-
dateTime: string
|
|
1037
|
-
timeZone?: string
|
|
1038
|
-
}
|
|
1039
|
-
}
|
|
1040
|
-
/**
|
|
1041
|
-
* The calendar user's RSVP status
|
|
1042
|
-
*/
|
|
1043
|
-
responseStatus?: "needsAction" | "accepted" | "declined" | "tentative"
|
|
1044
|
-
colors?: {
|
|
1045
|
-
foreground?: string
|
|
1046
|
-
background?: string
|
|
1047
|
-
}
|
|
1048
|
-
/**
|
|
1049
|
-
* If true, the event does not block time on the calendar. This is equivalent to setting `Show me as to Available` in the Calendar UI.
|
|
1050
|
-
*/
|
|
1051
|
-
isTransparent: boolean
|
|
1052
|
-
/**
|
|
1053
|
-
* Whether it's a meeting, aka an event with attendees listed
|
|
1054
|
-
*/
|
|
1055
|
-
isMeeting: boolean
|
|
1056
|
-
}>
|
|
1057
|
-
}>
|
|
2314
|
+
}
|
|
1058
2315
|
errors?: Array<{
|
|
1059
2316
|
/**
|
|
1060
2317
|
* An identifier for the item that failed (e.g., event summary for creation, event ID for updates/cancellations)
|
|
@@ -1069,6 +2326,32 @@ export type SuggestMeetingTimesScriptOutput = {
|
|
|
1069
2326
|
|
|
1070
2327
|
export class CalendarConnectionClient {
|
|
1071
2328
|
constructor(private readonly invoke: ConnectionActionInvoker) {}
|
|
2329
|
+
cancelEvents(
|
|
2330
|
+
args: CancelEventsScriptInput,
|
|
2331
|
+
): Promise<CancelEventsScriptOutput> {
|
|
2332
|
+
return this.invoke<CancelEventsScriptOutput>("cancelEvents", args)
|
|
2333
|
+
}
|
|
2334
|
+
createEvents(
|
|
2335
|
+
args: CreateEventsScriptInput,
|
|
2336
|
+
): Promise<CreateEventsScriptOutput> {
|
|
2337
|
+
return this.invoke<CreateEventsScriptOutput>("createEvents", args)
|
|
2338
|
+
}
|
|
2339
|
+
createSchedulingLink(
|
|
2340
|
+
args: CreateSchedulingLinkScriptInput,
|
|
2341
|
+
): Promise<CreateSchedulingLinkScriptOutput> {
|
|
2342
|
+
return this.invoke<CreateSchedulingLinkScriptOutput>(
|
|
2343
|
+
"createSchedulingLink",
|
|
2344
|
+
args,
|
|
2345
|
+
)
|
|
2346
|
+
}
|
|
2347
|
+
deleteSchedulingLinks(
|
|
2348
|
+
args: DeleteSchedulingLinksScriptInput,
|
|
2349
|
+
): Promise<DeleteSchedulingLinksScriptOutput> {
|
|
2350
|
+
return this.invoke<DeleteSchedulingLinksScriptOutput>(
|
|
2351
|
+
"deleteSchedulingLinks",
|
|
2352
|
+
args,
|
|
2353
|
+
)
|
|
2354
|
+
}
|
|
1072
2355
|
listCalendarResources(
|
|
1073
2356
|
args: ListCalendarResourcesScriptInput,
|
|
1074
2357
|
): Promise<ListCalendarResourcesScriptOutput> {
|
|
@@ -1114,4 +2397,17 @@ export class CalendarConnectionClient {
|
|
|
1114
2397
|
args,
|
|
1115
2398
|
)
|
|
1116
2399
|
}
|
|
2400
|
+
updateEvents(
|
|
2401
|
+
args: UpdateEventsScriptInput,
|
|
2402
|
+
): Promise<UpdateEventsScriptOutput> {
|
|
2403
|
+
return this.invoke<UpdateEventsScriptOutput>("updateEvents", args)
|
|
2404
|
+
}
|
|
2405
|
+
updateSchedulingLink(
|
|
2406
|
+
args: UpdateSchedulingLinkScriptInput,
|
|
2407
|
+
): Promise<UpdateSchedulingLinkScriptOutput> {
|
|
2408
|
+
return this.invoke<UpdateSchedulingLinkScriptOutput>(
|
|
2409
|
+
"updateSchedulingLink",
|
|
2410
|
+
args,
|
|
2411
|
+
)
|
|
2412
|
+
}
|
|
1117
2413
|
}
|