@notionhq/apps 0.0.13 → 0.0.14

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.
Files changed (89) hide show
  1. package/README.md +32 -28
  2. package/dist/box.generated.d.ts +164 -0
  3. package/dist/box.generated.d.ts.map +1 -0
  4. package/dist/box.generated.js +24 -0
  5. package/dist/calendar.generated.d.ts +1036 -0
  6. package/dist/calendar.generated.d.ts.map +1 -0
  7. package/dist/calendar.generated.js +42 -0
  8. package/dist/cli/build.js +7 -6
  9. package/dist/confluence.generated.d.ts +98 -0
  10. package/dist/confluence.generated.d.ts.map +1 -0
  11. package/dist/confluence.generated.js +18 -0
  12. package/dist/connection-actions.d.ts +2 -0
  13. package/dist/connection-actions.d.ts.map +1 -0
  14. package/dist/connection-actions.js +0 -0
  15. package/dist/connection-trigger-definitions.generated.d.ts +34 -0
  16. package/dist/connection-trigger-definitions.generated.d.ts.map +1 -0
  17. package/dist/connection-trigger-definitions.generated.js +45 -0
  18. package/dist/connections.d.ts +15 -0
  19. package/dist/connections.d.ts.map +1 -0
  20. package/dist/connections.js +79 -0
  21. package/dist/connections.test.d.ts +2 -0
  22. package/dist/connections.test.d.ts.map +1 -0
  23. package/dist/cursor.generated.d.ts +154 -0
  24. package/dist/cursor.generated.d.ts.map +1 -0
  25. package/dist/cursor.generated.js +18 -0
  26. package/dist/discord.generated.d.ts +279 -0
  27. package/dist/discord.generated.d.ts.map +1 -0
  28. package/dist/discord.generated.js +33 -0
  29. package/dist/gmail.generated.d.ts +184 -0
  30. package/dist/gmail.generated.d.ts.map +1 -0
  31. package/dist/gmail.generated.js +21 -0
  32. package/dist/googleCalendar.generated.d.ts +83 -0
  33. package/dist/googleCalendar.generated.d.ts.map +1 -0
  34. package/dist/googleCalendar.generated.js +15 -0
  35. package/dist/googleDrive.generated.d.ts +210 -0
  36. package/dist/googleDrive.generated.d.ts.map +1 -0
  37. package/dist/googleDrive.generated.js +27 -0
  38. package/dist/googleDriveOauth.generated.d.ts +851 -0
  39. package/dist/googleDriveOauth.generated.d.ts.map +1 -0
  40. package/dist/googleDriveOauth.generated.js +84 -0
  41. package/dist/outlook.generated.d.ts +224 -0
  42. package/dist/outlook.generated.d.ts.map +1 -0
  43. package/dist/outlook.generated.js +24 -0
  44. package/dist/providers.generated.d.ts +117 -0
  45. package/dist/providers.generated.d.ts.map +1 -0
  46. package/dist/providers.generated.js +108 -0
  47. package/dist/salesforce.generated.d.ts +151 -0
  48. package/dist/salesforce.generated.d.ts.map +1 -0
  49. package/dist/salesforce.generated.js +24 -0
  50. package/dist/slack.generated.d.ts +290 -0
  51. package/dist/slack.generated.d.ts.map +1 -0
  52. package/dist/slack.generated.js +30 -0
  53. package/dist/triggers.generated.d.ts +107 -32
  54. package/dist/triggers.generated.d.ts.map +1 -1
  55. package/dist/triggers.generated.js +36 -24
  56. package/dist/workflow-connections-types.test.d.ts +2 -0
  57. package/dist/workflow-connections-types.test.d.ts.map +1 -0
  58. package/dist/workflow-types.test.d.ts +2 -0
  59. package/dist/workflow-types.test.d.ts.map +1 -0
  60. package/dist/workflow.d.ts +20 -16
  61. package/dist/workflow.d.ts.map +1 -1
  62. package/dist/workflow.js +14 -17
  63. package/docs/BUILD.md +83 -14
  64. package/docs/CONNECTIONS.md +129 -0
  65. package/package.json +1 -1
  66. package/src/box.generated.ts +187 -0
  67. package/src/calendar.generated.ts +1117 -0
  68. package/src/cli/build.test.ts +33 -0
  69. package/src/cli/build.ts +6 -5
  70. package/src/confluence.generated.ts +109 -0
  71. package/src/connection-actions.ts +2 -0
  72. package/src/connection-trigger-definitions.generated.ts +48 -0
  73. package/src/connections.test.ts +157 -0
  74. package/src/connections.ts +126 -0
  75. package/src/cursor.generated.ts +167 -0
  76. package/src/discord.generated.ts +318 -0
  77. package/src/gmail.generated.ts +205 -0
  78. package/src/googleCalendar.generated.ts +95 -0
  79. package/src/googleDrive.generated.ts +235 -0
  80. package/src/googleDriveOauth.generated.ts +980 -0
  81. package/src/outlook.generated.ts +249 -0
  82. package/src/providers.generated.ts +207 -0
  83. package/src/salesforce.generated.ts +170 -0
  84. package/src/slack.generated.ts +330 -0
  85. package/src/triggers.generated.ts +112 -32
  86. package/src/workflow-connections-types.test.ts +59 -0
  87. package/src/workflow-types.test.ts +144 -0
  88. package/src/workflow.test.ts +112 -2
  89. package/src/workflow.ts +58 -29
@@ -0,0 +1,1036 @@
1
+ import type { ConnectionActionInvoker } from "./connection-actions.js";
2
+ /**
3
+ * Script input for the "List available calendar resources (such as conference rooms)." effect (`calendar.listCalendarResources`),
4
+ * derived from its Tool Core definition's call_function input projection.
5
+ *
6
+ * Search for resources (often conference rooms) and check their availability for specific time slots.
7
+ * Resources are scoped to a single account; pass `calendar` to target the account of the event you intend to attach the rooms to.
8
+ * Only works with Google Workspace accounts that have admin permissions to view calendar resources.
9
+ * Use this tool to find rooms when creating in-person meetings.
10
+ * Pass multiple meeting times in timeSlots to get available rooms for each time slot independently.
11
+ */
12
+ export type ListCalendarResourcesScriptInput = {
13
+ /**
14
+ * Specific time slots to check. Returns available resources for each time slot independently.
15
+ */
16
+ timeSlots: Array<{
17
+ /**
18
+ * Start of the time slot to check, as an ISO 8601 date-time.
19
+ */
20
+ startAt: string;
21
+ /**
22
+ * End of the time slot to check, as an ISO 8601 date-time.
23
+ */
24
+ endAt: string;
25
+ }>;
26
+ /**
27
+ * 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.
28
+ */
29
+ minCapacity: number;
30
+ /**
31
+ * Maximum number of resources to return per time slot (default: 20, max: 40)
32
+ */
33
+ maxCount?: number;
34
+ /**
35
+ * 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).
36
+ */
37
+ ignoreWorkingLocation?: boolean;
38
+ /**
39
+ * Date-times of returned events will be expressed in this time-zone
40
+ */
41
+ timeZone: string;
42
+ /**
43
+ * Calendar of the event the rooms will be attached to. Rooms are scoped to a single account.
44
+ */
45
+ calendar?: {
46
+ /**
47
+ * Account that owns the target calendar.
48
+ */
49
+ accountId: string;
50
+ /**
51
+ * Target calendar identifier within the account.
52
+ */
53
+ calendarId: string;
54
+ };
55
+ };
56
+ /**
57
+ * Canonical Tool Core output for the "List available calendar resources (such as conference rooms)." effect (`calendar.listCalendarResources`).
58
+ * This is the definition's output schema; the effect's script surface may
59
+ * re-encode it before returning.
60
+ */
61
+ export type ListCalendarResourcesScriptOutput = {
62
+ /**
63
+ * Results for each requested time slot, with available rooms sorted by capacity
64
+ */
65
+ resultsBySlot: Array<{
66
+ /**
67
+ * The time slot being checked
68
+ */
69
+ timeSlot: {
70
+ startAt: string;
71
+ endAt: string;
72
+ };
73
+ /**
74
+ * Available conference rooms for this time slot, sorted by increasing capacity (smallest rooms first)
75
+ */
76
+ availableResources: Array<{
77
+ /**
78
+ * Use this as the email when adding rooms to events
79
+ */
80
+ resourceEmail: string;
81
+ /**
82
+ * Display name of the conference room
83
+ */
84
+ resourceName: string;
85
+ /**
86
+ * Building information
87
+ */
88
+ building?: {
89
+ buildingId: string;
90
+ buildingName?: string;
91
+ };
92
+ /**
93
+ * Maximum number of people the room can accommodate
94
+ */
95
+ capacity?: number;
96
+ /**
97
+ * Floor location
98
+ */
99
+ floor?: string;
100
+ /**
101
+ * Room description
102
+ */
103
+ description?: string;
104
+ }>;
105
+ }>;
106
+ };
107
+ /**
108
+ * Script input for the "Fetch list of calendars of the user." effect (`calendar.listCalendars`),
109
+ * derived from its Tool Core definition's call_function input projection.
110
+ *
111
+ * List of calendars grouped by account.
112
+ */
113
+ export type ListCalendarsScriptInput = {
114
+ /**
115
+ * 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.
116
+ */
117
+ onlyAccountEmails?: Array<string>;
118
+ };
119
+ /**
120
+ * Canonical Tool Core output for the "Fetch list of calendars of the user." effect (`calendar.listCalendars`).
121
+ * This is the definition's output schema; the effect's script surface may
122
+ * re-encode it before returning.
123
+ */
124
+ export type ListCalendarsScriptOutput = {
125
+ accounts: Array<{
126
+ accountId: string;
127
+ /**
128
+ * Google, Apple iCloud, Outlook, etc.
129
+ */
130
+ providerName: string;
131
+ /**
132
+ * The user email associated with this account. Useful to know if this account and its data should be used depending on context.
133
+ */
134
+ email?: string;
135
+ /**
136
+ * Whether this account is work-related or a personal account, if we know this information.
137
+ */
138
+ category?: "work" | "personal";
139
+ capabilities: {
140
+ /**
141
+ * Does this account expose any calendars?
142
+ */
143
+ readCalendars: boolean;
144
+ /**
145
+ * Can we read calendar events from calendars of this account?
146
+ */
147
+ readEvents: boolean;
148
+ /**
149
+ * Can we write events in some calendars of this account? Calendars themselves might have their own set of restrictions.
150
+ */
151
+ writeEvents: boolean;
152
+ /**
153
+ * Can we use a text search query to find events in the calendars of this account?
154
+ */
155
+ searchEvents: boolean;
156
+ /**
157
+ * Does this account expose contacts?
158
+ */
159
+ readContacts: boolean;
160
+ };
161
+ /**
162
+ * User can access the events of co-workers having an email address with one of these domains
163
+ */
164
+ coworkersEmailDomains?: Array<string>;
165
+ calendars: Array<{
166
+ accountId: string;
167
+ calendarId: string;
168
+ name: string;
169
+ description?: string;
170
+ colors?: {
171
+ foreground?: string;
172
+ background?: string;
173
+ };
174
+ isPrimary: boolean;
175
+ /**
176
+ * Is this calendar read-only or can the user create/edit/delete events?
177
+ */
178
+ isReadOnly: boolean;
179
+ /**
180
+ * The contents of a calendar appear in the user calendar app only if that calendar is selected.
181
+ * 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.
182
+ */
183
+ isSelected: boolean;
184
+ /**
185
+ * A hidden calendar is a calendar the user has access to but decided to hide completely from their calendar app.
186
+ * 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.
187
+ */
188
+ isHidden: boolean;
189
+ /**
190
+ * The email address of the owner of this calendar.
191
+ */
192
+ ownerEmail?: string;
193
+ }>;
194
+ }>;
195
+ };
196
+ /**
197
+ * Script input for the "List contacts" effect (`calendar.listContacts`),
198
+ * derived from its Tool Core definition's call_function input projection.
199
+ *
200
+ * List the user's contacts from different accounts. Returns contact information including email addresses, names, phone numbers, and profile photos.
201
+ */
202
+ export type ListContactsScriptInput = {
203
+ /**
204
+ * Optional search queries to filter contacts by name or email. Results matching any query are included.
205
+ */
206
+ queries?: Array<string>;
207
+ };
208
+ /**
209
+ * Canonical Tool Core output for the "List contacts" effect (`calendar.listContacts`).
210
+ * This is the definition's output schema; the effect's script surface may
211
+ * re-encode it before returning.
212
+ */
213
+ export type ListContactsScriptOutput = {
214
+ accounts: Array<{
215
+ accountId: string;
216
+ /**
217
+ * Google, Apple iCloud, Outlook, etc.
218
+ */
219
+ providerName: string;
220
+ /**
221
+ * The user email associated with this account. Useful to know if this account and its data should be used depending on context.
222
+ */
223
+ email?: string;
224
+ /**
225
+ * Whether this account is work-related or a personal account, if we know this information.
226
+ */
227
+ category?: "work" | "personal";
228
+ capabilities: {
229
+ /**
230
+ * Does this account expose any calendars?
231
+ */
232
+ readCalendars: boolean;
233
+ /**
234
+ * Can we read calendar events from calendars of this account?
235
+ */
236
+ readEvents: boolean;
237
+ /**
238
+ * Can we write events in some calendars of this account? Calendars themselves might have their own set of restrictions.
239
+ */
240
+ writeEvents: boolean;
241
+ /**
242
+ * Can we use a text search query to find events in the calendars of this account?
243
+ */
244
+ searchEvents: boolean;
245
+ /**
246
+ * Does this account expose contacts?
247
+ */
248
+ readContacts: boolean;
249
+ };
250
+ /**
251
+ * User can access the events of co-workers having an email address with one of these domains
252
+ */
253
+ coworkersEmailDomains?: Array<string>;
254
+ contacts: Array<{
255
+ /**
256
+ * Unique identifier for the contact
257
+ */
258
+ id: string;
259
+ /**
260
+ * Primary email address of the contact
261
+ */
262
+ email: string;
263
+ /**
264
+ * Additional email addresses for this contact
265
+ */
266
+ alternateEmails?: Array<string>;
267
+ /**
268
+ * Display name of the contact
269
+ */
270
+ displayName?: string;
271
+ /**
272
+ * Phone numbers associated with this contact
273
+ */
274
+ phoneNumbers?: Array<{
275
+ /**
276
+ * The type of phone number (e.g., home, work, mobile)
277
+ */
278
+ type?: string;
279
+ /**
280
+ * The phone number value
281
+ */
282
+ value: string;
283
+ }>;
284
+ /**
285
+ * URL to the contact's profile photo
286
+ */
287
+ photoUrl?: string;
288
+ }>;
289
+ }>;
290
+ };
291
+ /**
292
+ * Script input for the "View coworkers' scheduled events." effect (`calendar.listCoworkersEvents`),
293
+ * derived from its Tool Core definition's call_function input projection.
294
+ *
295
+ * Retrieves the detailed calendar events for specific coworkers within a time range.
296
+ * Use this to see what meetings or events people have scheduled, including event titles, times, and details.
297
+ * Only works for coworkers in the same organization domain.
298
+ */
299
+ export type ListCoworkersEventsScriptInput = {
300
+ /**
301
+ * Emails of relevant coworkers
302
+ */
303
+ coworkerEmails: Array<string>;
304
+ /**
305
+ * Start of the time range, as an ISO 8601 date-time.
306
+ */
307
+ timeMin: string;
308
+ /**
309
+ * End of the time range, as an ISO 8601 date-time.
310
+ */
311
+ timeMax: string;
312
+ /**
313
+ * Date-times of returned events will be expressed in this time-zone
314
+ */
315
+ timeZone: string;
316
+ };
317
+ /**
318
+ * Canonical Tool Core output for the "View coworkers' scheduled events." effect (`calendar.listCoworkersEvents`).
319
+ * This is the definition's output schema; the effect's script surface may
320
+ * re-encode it before returning.
321
+ */
322
+ export type ListCoworkersEventsScriptOutput = {
323
+ /**
324
+ * List of coworkers with their scheduled calendar events. Some coworkers may be excluded if their calendar could not be accessed.
325
+ */
326
+ coworkers: Array<{
327
+ accountId: string;
328
+ coworkerEmail: string;
329
+ profile?: {
330
+ displayName?: string;
331
+ email?: string;
332
+ photoUrl?: string;
333
+ };
334
+ events: Array<{
335
+ calendar: {
336
+ accountId: string;
337
+ calendarId: string;
338
+ };
339
+ eventId: string;
340
+ summary: string;
341
+ description?: string;
342
+ /**
343
+ * Physical location where the event takes place, or remote conference link/info.
344
+ */
345
+ location?: string;
346
+ /**
347
+ * 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']).
348
+ */
349
+ recurrenceRules?: Array<string>;
350
+ /**
351
+ * The data provider this event belongs to
352
+ */
353
+ provider?: "google" | "notion" | "icloud" | "outlook";
354
+ /**
355
+ * The URL to view the event in the Calendar app.
356
+ */
357
+ webUrl: string;
358
+ /**
359
+ * When the event is happening
360
+ */
361
+ period: {
362
+ type: "DATE";
363
+ start: {
364
+ /**
365
+ * Date in ISO 8601 format (no time)
366
+ */
367
+ date: string;
368
+ };
369
+ end: {
370
+ /**
371
+ * Date in ISO 8601 format (no time)
372
+ */
373
+ date: string;
374
+ };
375
+ } | {
376
+ type: "DATE_TIME";
377
+ start: {
378
+ /**
379
+ * Date-time in ISO 8601 format, in UTC (ending with Z), or with TZ offset
380
+ */
381
+ dateTime: string;
382
+ timeZone?: string;
383
+ };
384
+ end: {
385
+ /**
386
+ * Date-time in ISO 8601 format, in UTC (ending with Z), or with TZ offset
387
+ */
388
+ dateTime: string;
389
+ timeZone?: string;
390
+ };
391
+ };
392
+ /**
393
+ * Whether it's part of a recurring event series
394
+ */
395
+ isRecurring: boolean;
396
+ /**
397
+ * 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.
398
+ */
399
+ isTransparent: boolean;
400
+ /**
401
+ * 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.
402
+ */
403
+ isAutoBlock: boolean;
404
+ /**
405
+ * What kind of event is it? Standard, out of office, birthday...
406
+ */
407
+ eventType?: "fromGmail" | "default" | "focusTime" | "outOfOffice" | "birthday" | "availability";
408
+ /**
409
+ * Is an event confirmed, tentative or cancelled? This is different from the user's RSVP
410
+ */
411
+ eventStatus?: "confirmed" | "tentative" | "cancelled";
412
+ /**
413
+ * Whether it's a meeting, aka an event with attendees listed
414
+ */
415
+ isMeeting: boolean;
416
+ conferencingEntryPoints?: Array<{
417
+ uri: string;
418
+ accessCode?: string;
419
+ entryPointType?: "video" | "phone" | "sip" | "more";
420
+ label?: string;
421
+ meetingCode?: string;
422
+ passcode?: string;
423
+ password?: string;
424
+ pin?: string;
425
+ notes?: string;
426
+ signature?: string;
427
+ }>;
428
+ /**
429
+ * The URL to join the video conference, if available
430
+ */
431
+ conferencingUrl?: string;
432
+ /**
433
+ * The calendar user's RSVP status
434
+ */
435
+ responseStatus?: "needsAction" | "accepted" | "declined" | "tentative";
436
+ creator?: {
437
+ /**
438
+ * Whether this entry represents the calendar user
439
+ */
440
+ isSelf: boolean;
441
+ displayName?: string;
442
+ email?: string;
443
+ };
444
+ organizer?: {
445
+ /**
446
+ * Whether this entry represents the calendar user
447
+ */
448
+ isSelf: boolean;
449
+ displayName?: string;
450
+ email?: string;
451
+ };
452
+ attendees?: Array<{
453
+ /**
454
+ * Whether this entry represents the calendar user
455
+ */
456
+ isSelf: boolean;
457
+ displayName?: string;
458
+ email?: string;
459
+ isOptional: boolean;
460
+ isOrganizer?: boolean;
461
+ /**
462
+ * The calendar user's RSVP status
463
+ */
464
+ responseStatus?: "needsAction" | "accepted" | "declined" | "tentative";
465
+ }>;
466
+ resources?: Array<{
467
+ displayName?: string;
468
+ email?: string;
469
+ isOptional: boolean;
470
+ /**
471
+ * The calendar user's RSVP status
472
+ */
473
+ responseStatus?: "needsAction" | "accepted" | "declined" | "tentative";
474
+ }>;
475
+ colors?: {
476
+ foreground?: string;
477
+ background?: string;
478
+ };
479
+ attachments?: Array<{
480
+ url: string;
481
+ mimeType?: string;
482
+ title?: string;
483
+ notionWorkspaceId?: string;
484
+ }>;
485
+ }>;
486
+ }>;
487
+ errors?: Array<{
488
+ /**
489
+ * An identifier for the item that failed (e.g., event summary for creation, event ID for updates/cancellations)
490
+ */
491
+ identifier: string;
492
+ /**
493
+ * Description of the error that occurred
494
+ */
495
+ errorMessage: string;
496
+ }>;
497
+ };
498
+ /**
499
+ * Script input for the "List the user's events from different calendars." effect (`calendar.listEvents`),
500
+ * derived from its Tool Core definition's call_function input projection.
501
+ *
502
+ * Date-times will be expressed in the time-zone passed as parameter.
503
+ */
504
+ export type ListEventsScriptInput = {
505
+ /**
506
+ * Start of the time range, as an ISO 8601 date-time.
507
+ */
508
+ timeMin: string;
509
+ /**
510
+ * End of the time range, as an ISO 8601 date-time.
511
+ */
512
+ timeMax: string;
513
+ /**
514
+ * Date-times of returned events will be expressed in this time-zone
515
+ */
516
+ timeZone: string;
517
+ /**
518
+ * Whether to include event invites the user has declined
519
+ */
520
+ includeDeclinedInvites?: boolean | null;
521
+ };
522
+ /**
523
+ * Canonical Tool Core output for the "List the user's events from different calendars." effect (`calendar.listEvents`).
524
+ * This is the definition's output schema; the effect's script surface may
525
+ * re-encode it before returning.
526
+ */
527
+ export type ListEventsScriptOutput = {
528
+ accounts: Array<{
529
+ accountId: string;
530
+ /**
531
+ * Google, Apple iCloud, Outlook, etc.
532
+ */
533
+ providerName: string;
534
+ /**
535
+ * The user email associated with this account. Useful to know if this account and its data should be used depending on context.
536
+ */
537
+ email?: string;
538
+ /**
539
+ * Whether this account is work-related or a personal account, if we know this information.
540
+ */
541
+ category?: "work" | "personal";
542
+ capabilities: {
543
+ /**
544
+ * Does this account expose any calendars?
545
+ */
546
+ readCalendars: boolean;
547
+ /**
548
+ * Can we read calendar events from calendars of this account?
549
+ */
550
+ readEvents: boolean;
551
+ /**
552
+ * Can we write events in some calendars of this account? Calendars themselves might have their own set of restrictions.
553
+ */
554
+ writeEvents: boolean;
555
+ /**
556
+ * Can we use a text search query to find events in the calendars of this account?
557
+ */
558
+ searchEvents: boolean;
559
+ /**
560
+ * Does this account expose contacts?
561
+ */
562
+ readContacts: boolean;
563
+ };
564
+ /**
565
+ * User can access the events of co-workers having an email address with one of these domains
566
+ */
567
+ coworkersEmailDomains?: Array<string>;
568
+ calendars: Array<{
569
+ accountId: string;
570
+ calendarId: string;
571
+ name: string;
572
+ description?: string;
573
+ colors?: {
574
+ foreground?: string;
575
+ background?: string;
576
+ };
577
+ isPrimary: boolean;
578
+ /**
579
+ * Is this calendar read-only or can the user create/edit/delete events?
580
+ */
581
+ isReadOnly: boolean;
582
+ /**
583
+ * The contents of a calendar appear in the user calendar app only if that calendar is selected.
584
+ * 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.
585
+ */
586
+ isSelected: boolean;
587
+ /**
588
+ * A hidden calendar is a calendar the user has access to but decided to hide completely from their calendar app.
589
+ * 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.
590
+ */
591
+ isHidden: boolean;
592
+ /**
593
+ * The email address of the owner of this calendar.
594
+ */
595
+ ownerEmail?: string;
596
+ events: Array<{
597
+ calendar: {
598
+ accountId: string;
599
+ calendarId: string;
600
+ };
601
+ eventId: string;
602
+ summary: string;
603
+ description?: string;
604
+ /**
605
+ * Physical location where the event takes place, or remote conference link/info.
606
+ */
607
+ location?: string;
608
+ /**
609
+ * 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']).
610
+ */
611
+ recurrenceRules?: Array<string>;
612
+ /**
613
+ * The data provider this event belongs to
614
+ */
615
+ provider?: "google" | "notion" | "icloud" | "outlook";
616
+ /**
617
+ * The URL to view the event in the Calendar app.
618
+ */
619
+ webUrl: string;
620
+ /**
621
+ * When the event is happening
622
+ */
623
+ period: {
624
+ type: "DATE";
625
+ start: {
626
+ /**
627
+ * Date in ISO 8601 format (no time)
628
+ */
629
+ date: string;
630
+ };
631
+ end: {
632
+ /**
633
+ * Date in ISO 8601 format (no time)
634
+ */
635
+ date: string;
636
+ };
637
+ } | {
638
+ type: "DATE_TIME";
639
+ start: {
640
+ /**
641
+ * Date-time in ISO 8601 format, in UTC (ending with Z), or with TZ offset
642
+ */
643
+ dateTime: string;
644
+ timeZone?: string;
645
+ };
646
+ end: {
647
+ /**
648
+ * Date-time in ISO 8601 format, in UTC (ending with Z), or with TZ offset
649
+ */
650
+ dateTime: string;
651
+ timeZone?: string;
652
+ };
653
+ };
654
+ /**
655
+ * Whether it's part of a recurring event series
656
+ */
657
+ isRecurring: boolean;
658
+ /**
659
+ * 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.
660
+ */
661
+ isTransparent: boolean;
662
+ /**
663
+ * 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.
664
+ */
665
+ isAutoBlock: boolean;
666
+ /**
667
+ * What kind of event is it? Standard, out of office, birthday...
668
+ */
669
+ eventType?: "fromGmail" | "default" | "focusTime" | "outOfOffice" | "birthday" | "availability";
670
+ /**
671
+ * Is an event confirmed, tentative or cancelled? This is different from the user's RSVP
672
+ */
673
+ eventStatus?: "confirmed" | "tentative" | "cancelled";
674
+ /**
675
+ * Whether it's a meeting, aka an event with attendees listed
676
+ */
677
+ isMeeting: boolean;
678
+ conferencingEntryPoints?: Array<{
679
+ uri: string;
680
+ accessCode?: string;
681
+ entryPointType?: "video" | "phone" | "sip" | "more";
682
+ label?: string;
683
+ meetingCode?: string;
684
+ passcode?: string;
685
+ password?: string;
686
+ pin?: string;
687
+ notes?: string;
688
+ signature?: string;
689
+ }>;
690
+ /**
691
+ * The URL to join the video conference, if available
692
+ */
693
+ conferencingUrl?: string;
694
+ /**
695
+ * The calendar user's RSVP status
696
+ */
697
+ responseStatus?: "needsAction" | "accepted" | "declined" | "tentative";
698
+ creator?: {
699
+ /**
700
+ * Whether this entry represents the calendar user
701
+ */
702
+ isSelf: boolean;
703
+ displayName?: string;
704
+ email?: string;
705
+ };
706
+ organizer?: {
707
+ /**
708
+ * Whether this entry represents the calendar user
709
+ */
710
+ isSelf: boolean;
711
+ displayName?: string;
712
+ email?: string;
713
+ };
714
+ attendees?: Array<{
715
+ /**
716
+ * Whether this entry represents the calendar user
717
+ */
718
+ isSelf: boolean;
719
+ displayName?: string;
720
+ email?: string;
721
+ isOptional: boolean;
722
+ isOrganizer?: boolean;
723
+ /**
724
+ * The calendar user's RSVP status
725
+ */
726
+ responseStatus?: "needsAction" | "accepted" | "declined" | "tentative";
727
+ }>;
728
+ resources?: Array<{
729
+ displayName?: string;
730
+ email?: string;
731
+ isOptional: boolean;
732
+ /**
733
+ * The calendar user's RSVP status
734
+ */
735
+ responseStatus?: "needsAction" | "accepted" | "declined" | "tentative";
736
+ }>;
737
+ colors?: {
738
+ foreground?: string;
739
+ background?: string;
740
+ };
741
+ attachments?: Array<{
742
+ url: string;
743
+ mimeType?: string;
744
+ title?: string;
745
+ notionWorkspaceId?: string;
746
+ }>;
747
+ }>;
748
+ }>;
749
+ }>;
750
+ /**
751
+ * User preferences for calendar data
752
+ */
753
+ userPreferences: {
754
+ /**
755
+ * Whether the user prefers to display time in 12-hour (AM/PM) or 24-hour format
756
+ */
757
+ timeFormat?: "12_HOUR" | "24_HOUR";
758
+ };
759
+ errors: Array<{
760
+ accountId: string;
761
+ calendarId: string;
762
+ error: string;
763
+ }>;
764
+ };
765
+ /**
766
+ * Script input for the "List the user's scheduling links." effect (`calendar.listSchedulingLinks`),
767
+ * derived from its Tool Core definition's call_function input projection.
768
+ *
769
+ * List active, unexpired scheduling links with upcoming time ranges, optionally filtered by link type.
770
+ */
771
+ export type ListSchedulingLinksScriptInput = {
772
+ /**
773
+ * Return only scheduling links of this type
774
+ */
775
+ type?: "singleUse" | "multiUse" | "recurring";
776
+ };
777
+ /**
778
+ * Canonical Tool Core output for the "List the user's scheduling links." effect (`calendar.listSchedulingLinks`).
779
+ * This is the definition's output schema; the effect's script surface may
780
+ * re-encode it before returning.
781
+ */
782
+ export type ListSchedulingLinksScriptOutput = {
783
+ schedulingLinks: Array<{
784
+ /**
785
+ * Unique ID of the created scheduling link
786
+ */
787
+ id: string;
788
+ /**
789
+ * Short ID used in the scheduling link URL
790
+ */
791
+ shortId: string;
792
+ /**
793
+ * Current booking calendar for this scheduling link
794
+ */
795
+ bookingCalendarRef: {
796
+ accountId: string;
797
+ calendarId: string;
798
+ };
799
+ /**
800
+ * Custom URL slug for the scheduling link
801
+ */
802
+ alias?: string;
803
+ /**
804
+ * The resolved type of the link
805
+ */
806
+ type?: "singleUse" | "multiUse" | "recurring";
807
+ /**
808
+ * Status of the scheduling link
809
+ */
810
+ status: string;
811
+ title?: string;
812
+ description?: string;
813
+ duration?: number;
814
+ /**
815
+ * Full URL where invitees can book a meeting
816
+ */
817
+ schedulingLinkUrl?: string;
818
+ timeRanges: Array<{
819
+ /**
820
+ * Start of availability window in ISO 8601 format with timezone offset, e.g. '2024-08-22T09:00:00-04:00'
821
+ */
822
+ startDate: string;
823
+ /**
824
+ * End of availability window in ISO 8601 format with timezone offset, e.g. '2024-08-22T17:00:00-04:00'
825
+ */
826
+ endDate: string;
827
+ /**
828
+ * 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']).
829
+ */
830
+ recurrence?: Array<string>;
831
+ /**
832
+ * Unique identifier for this time range
833
+ */
834
+ id: string;
835
+ }>;
836
+ }>;
837
+ };
838
+ /**
839
+ * Script input for the "Find available meeting times." effect (`calendar.suggestMeetingTimes`),
840
+ * derived from its Tool Core definition's call_function input projection.
841
+ *
842
+ * Analyzes calendar availability for multiple participants and returns ranked time slots when everyone is free.
843
+ * Use this when scheduling meetings or finding times that work for a group of people.
844
+ * Returns suggestions sorted by preference, showing which participants are available, softly conflicted by an unconfirmed RSVP, busy, or have unknown status for each slot.
845
+ */
846
+ export type SuggestMeetingTimesScriptInput = {
847
+ /**
848
+ * Individual participant or group email addresses to find time with. Resolvable groups are expanded into their members.
849
+ */
850
+ participantEmails: Array<string>;
851
+ /**
852
+ * The duration of the meeting in minutes
853
+ */
854
+ durationMinutes: number;
855
+ /**
856
+ * Start of the time range to consider, as an ISO 8601 date-time.
857
+ */
858
+ timeMin: string;
859
+ /**
860
+ * End of the time range to consider, as an ISO 8601 date-time.
861
+ */
862
+ timeMax: string;
863
+ /**
864
+ * Maximum number of suggestions to return (default: 10)
865
+ */
866
+ maxCount?: number;
867
+ /**
868
+ * Date-times of returned events will be expressed in this time-zone
869
+ */
870
+ timeZone: string;
871
+ /**
872
+ * Whether to include participant event schedules in the response
873
+ */
874
+ includeParticipantSchedules?: boolean;
875
+ };
876
+ /**
877
+ * Canonical Tool Core output for the "Find available meeting times." effect (`calendar.suggestMeetingTimes`).
878
+ * This is the definition's output schema; the effect's script surface may
879
+ * re-encode it before returning.
880
+ */
881
+ export type SuggestMeetingTimesScriptOutput = {
882
+ /**
883
+ * 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.
884
+ */
885
+ suggestions: Array<{
886
+ /**
887
+ * Start time in ISO 8601 format
888
+ */
889
+ startAt: string;
890
+ /**
891
+ * End time in ISO 8601 format
892
+ */
893
+ endAt: string;
894
+ /**
895
+ * Total number of hard event conflicts, including multiple events for one participant
896
+ */
897
+ hardEventConflictCount: number;
898
+ /**
899
+ * Total number of soft event conflicts, including multiple events for one participant
900
+ */
901
+ softEventConflictCount: number;
902
+ /**
903
+ * Participant emails for invitees with conflicts with this meeting time
904
+ */
905
+ unavailableParticipants: Array<string>;
906
+ /**
907
+ * Participant emails for invitees who are available for this meeting time
908
+ */
909
+ availableParticipants: Array<string>;
910
+ /**
911
+ * Participant emails for invitees with overlapping events whose RSVP is not firm yet
912
+ */
913
+ softConflictParticipants: Array<string>;
914
+ /**
915
+ * Participant emails for invitees with unknown status
916
+ */
917
+ unknownStatus: Array<string>;
918
+ /**
919
+ * Readable participant events that overlap this meeting time, including the participant and whether each event creates a hard or soft conflict
920
+ */
921
+ conflictingEvents: Array<{
922
+ participantEmail: string;
923
+ eventId: string;
924
+ summary?: string;
925
+ /**
926
+ * What kind of event is it? Standard, out of office, birthday...
927
+ */
928
+ eventType: "fromGmail" | "default" | "focusTime" | "outOfOffice" | "birthday" | "availability";
929
+ /**
930
+ * The calendar user's RSVP status
931
+ */
932
+ responseStatus?: "needsAction" | "accepted" | "declined" | "tentative";
933
+ conflictType: "hard" | "soft";
934
+ }>;
935
+ }>;
936
+ /**
937
+ * Whether one or more suggestions use a shorter duration than requested because no sufficiently conflict-free times were available at the requested duration
938
+ */
939
+ usedFlexibleDuration: boolean;
940
+ /**
941
+ * 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.
942
+ */
943
+ participantSchedules?: Array<{
944
+ accountId: string;
945
+ coworkerEmail: string;
946
+ profile?: {
947
+ displayName?: string;
948
+ email?: string;
949
+ photoUrl?: string;
950
+ };
951
+ events: Array<{
952
+ eventId: string;
953
+ /**
954
+ * What kind of event is it? Standard, out of office, birthday...
955
+ */
956
+ eventType?: "fromGmail" | "default" | "focusTime" | "outOfOffice" | "birthday" | "availability";
957
+ /**
958
+ * Is an event confirmed, tentative or cancelled? This is different from the user's RSVP
959
+ */
960
+ eventStatus?: "confirmed" | "tentative" | "cancelled";
961
+ summary: string;
962
+ /**
963
+ * When the event is happening
964
+ */
965
+ period: {
966
+ type: "DATE";
967
+ start: {
968
+ /**
969
+ * Date in ISO 8601 format (no time)
970
+ */
971
+ date: string;
972
+ };
973
+ end: {
974
+ /**
975
+ * Date in ISO 8601 format (no time)
976
+ */
977
+ date: string;
978
+ };
979
+ } | {
980
+ type: "DATE_TIME";
981
+ start: {
982
+ /**
983
+ * Date-time in ISO 8601 format, in UTC (ending with Z), or with TZ offset
984
+ */
985
+ dateTime: string;
986
+ timeZone?: string;
987
+ };
988
+ end: {
989
+ /**
990
+ * Date-time in ISO 8601 format, in UTC (ending with Z), or with TZ offset
991
+ */
992
+ dateTime: string;
993
+ timeZone?: string;
994
+ };
995
+ };
996
+ /**
997
+ * The calendar user's RSVP status
998
+ */
999
+ responseStatus?: "needsAction" | "accepted" | "declined" | "tentative";
1000
+ colors?: {
1001
+ foreground?: string;
1002
+ background?: string;
1003
+ };
1004
+ /**
1005
+ * 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.
1006
+ */
1007
+ isTransparent: boolean;
1008
+ /**
1009
+ * Whether it's a meeting, aka an event with attendees listed
1010
+ */
1011
+ isMeeting: boolean;
1012
+ }>;
1013
+ }>;
1014
+ errors?: Array<{
1015
+ /**
1016
+ * An identifier for the item that failed (e.g., event summary for creation, event ID for updates/cancellations)
1017
+ */
1018
+ identifier: string;
1019
+ /**
1020
+ * Description of the error that occurred
1021
+ */
1022
+ errorMessage: string;
1023
+ }>;
1024
+ };
1025
+ export declare class CalendarConnectionClient {
1026
+ private readonly invoke;
1027
+ constructor(invoke: ConnectionActionInvoker);
1028
+ listCalendarResources(args: ListCalendarResourcesScriptInput): Promise<ListCalendarResourcesScriptOutput>;
1029
+ listCalendars(args: ListCalendarsScriptInput): Promise<ListCalendarsScriptOutput>;
1030
+ listContacts(args: ListContactsScriptInput): Promise<ListContactsScriptOutput>;
1031
+ listCoworkersEvents(args: ListCoworkersEventsScriptInput): Promise<ListCoworkersEventsScriptOutput>;
1032
+ listEvents(args: ListEventsScriptInput): Promise<ListEventsScriptOutput>;
1033
+ listSchedulingLinks(args: ListSchedulingLinksScriptInput): Promise<ListSchedulingLinksScriptOutput>;
1034
+ suggestMeetingTimes(args: SuggestMeetingTimesScriptInput): Promise<SuggestMeetingTimesScriptOutput>;
1035
+ }
1036
+ //# sourceMappingURL=calendar.generated.d.ts.map