// Generated by notion tool-core codegen-script-types --connections. Do not edit. import type { ConnectionActionInvoker } from "./connection-actions.js" /** * Script input for the "Cancel calendar events." effect (`calendar.cancelEvents`), * derived from its Tool Core definition's call_function input projection. * * Uses named Calendar targets configured during workflow setup. Existing-event references retain their original calendar identity. */ export type CancelEventsScriptInput = { calendar: | { calendarKey: string isHidden: boolean isPrimary: boolean isReadOnly: boolean isSelected: boolean name: string target: string colors?: { background?: string foreground?: string } description?: string ownerEmail?: string } | { target: string calendarKey?: string } events: Array<{ calendar: { accountId: string calendarId: string } eventId: string eventSummary?: string }> } /** * Canonical Tool Core output for the "Cancel calendar events." effect (`calendar.cancelEvents`). * This is the definition's output schema; the effect's script surface may * re-encode it before returning. */ export type CancelEventsScriptOutput = { canceledEvents: Array<{ calendar: { accountId: string calendarId: string } eventId: string /** * Optional summary of the event, used by agent UI. */ eventSummary?: string }> errors?: Array<{ /** * An identifier for the item that failed (e.g., event summary for creation, event ID for updates/cancellations) */ identifier: string /** * Description of the error that occurred */ errorMessage: string }> } /** * Script input for the "Create calendar events." effect (`calendar.createEvents`), * derived from its Tool Core definition's call_function input projection. * * Uses named Calendar targets configured during workflow setup. Existing-event references retain their original calendar identity. */ export type CreateEventsScriptInput = { events: Array<{ calendar: | { calendarKey: string isHidden: boolean isPrimary: boolean isReadOnly: boolean isSelected: boolean name: string target: string colors?: { background?: string foreground?: string } description?: string ownerEmail?: string } | { target: string calendarKey?: string } period: | { end: { date: string } start: { date: string } type: "DATE" } | { end: { dateTime: string timeZone?: string } start: { dateTime: string timeZone?: string } type: "DATE_TIME" } summary: string attendees?: Array<{ email: string displayName?: string isOptional?: boolean }> description?: string disableConferencing?: boolean location?: string recurrenceRules?: Array resources?: Array<{ isOptional: boolean displayName?: string email?: string }> }> timeZone: string } /** * Canonical Tool Core output for the "Create calendar events." effect (`calendar.createEvents`). * This is the definition's output schema; the effect's script surface may * re-encode it before returning. */ export type CreateEventsScriptOutput = { accounts: Array<{ accountId: string /** * Google, Apple iCloud, Outlook, etc. */ providerName: string /** * The user email associated with this account. Useful to know if this account and its data should be used depending on context. */ email?: string /** * Whether this account is work-related or a personal account, if we know this information. */ category?: "work" | "personal" capabilities: { /** * Does this account expose any calendars? */ readCalendars: boolean /** * Can we read calendar events from calendars of this account? */ readEvents: boolean /** * Can we write events in some calendars of this account? Calendars themselves might have their own set of restrictions. */ writeEvents: boolean /** * Can we use a text search query to find events in the calendars of this account? */ searchEvents: boolean /** * Does this account expose contacts? */ readContacts: boolean } /** * User can access the events of co-workers having an email address with one of these domains */ coworkersEmailDomains?: Array calendars: Array<{ accountId: string calendarId: string name: string description?: string colors?: { foreground?: string background?: string } isPrimary: boolean /** * Is this calendar read-only or can the user create/edit/delete events? */ isReadOnly: boolean /** * The contents of a calendar appear in the user calendar app only if that calendar is selected. * 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. */ isSelected: boolean /** * A hidden calendar is a calendar the user has access to but decided to hide completely from their calendar app. * 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. */ isHidden: boolean /** * The email address of the owner of this calendar. */ ownerEmail?: string createdEvents: Array<{ calendar: { accountId: string calendarId: string } eventId: string summary: string description?: string /** * Physical location where the event takes place, or remote conference link/info. */ location?: string /** * 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']). */ recurrenceRules?: Array /** * The data provider this event belongs to */ provider?: "google" | "notion" | "icloud" | "outlook" /** * The URL to view the event in the Calendar app. */ webUrl: string /** * When the event is happening */ period: | { type: "DATE" start: { /** * Date in ISO 8601 format (no time) */ date: string } end: { /** * Date in ISO 8601 format (no time) */ date: string } } | { type: "DATE_TIME" start: { /** * Date-time in ISO 8601 format, in UTC (ending with Z), or with TZ offset */ dateTime: string timeZone?: string } end: { /** * Date-time in ISO 8601 format, in UTC (ending with Z), or with TZ offset */ dateTime: string timeZone?: string } } /** * Whether it's part of a recurring event series */ isRecurring: boolean /** * 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. */ isTransparent: boolean /** * 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. */ isAutoBlock: boolean /** * What kind of event is it? Standard, out of office, birthday... */ eventType?: | "fromGmail" | "default" | "focusTime" | "outOfOffice" | "birthday" | "availability" /** * Is an event confirmed, tentative or cancelled? This is different from the user's RSVP */ eventStatus?: "confirmed" | "tentative" | "cancelled" /** * Whether it's a meeting, aka an event with attendees listed */ isMeeting: boolean conferencingEntryPoints?: Array<{ uri: string accessCode?: string entryPointType?: "video" | "phone" | "sip" | "more" label?: string meetingCode?: string passcode?: string password?: string pin?: string notes?: string signature?: string }> /** * The URL to join the video conference, if available */ conferencingUrl?: string /** * The calendar user's RSVP status */ responseStatus?: "needsAction" | "accepted" | "declined" | "tentative" creator?: { /** * Whether this entry represents the calendar user */ isSelf: boolean displayName?: string email?: string } organizer?: { /** * Whether this entry represents the calendar user */ isSelf: boolean displayName?: string email?: string } attendees?: Array<{ /** * Whether this entry represents the calendar user */ isSelf: boolean displayName?: string email?: string isOptional: boolean isOrganizer?: boolean /** * The calendar user's RSVP status */ responseStatus?: "needsAction" | "accepted" | "declined" | "tentative" }> resources?: Array<{ displayName?: string email?: string isOptional: boolean /** * The calendar user's RSVP status */ responseStatus?: "needsAction" | "accepted" | "declined" | "tentative" }> colors?: { foreground?: string background?: string } attachments?: Array<{ url: string mimeType?: string title?: string notionWorkspaceId?: string }> }> }> }> errors?: Array<{ /** * An identifier for the item that failed (e.g., event summary for creation, event ID for updates/cancellations) */ identifier: string /** * Description of the error that occurred */ errorMessage: string }> } /** * Script input for the "Create a scheduling link" effect (`calendar.createSchedulingLink`), * derived from its Tool Core definition's call_function input projection. * * Uses named Calendar targets configured during workflow setup. Existing-event references retain their original calendar identity. */ export type CreateSchedulingLinkScriptInput = { bookingCalendar: | { calendarKey: string isHidden: boolean isPrimary: boolean isReadOnly: boolean isSelected: boolean name: string target: string colors?: { background?: string foreground?: string } description?: string ownerEmail?: string } | { target: string calendarKey?: string } conflictCalendars: | { calendarKey: string isHidden: boolean isPrimary: boolean isReadOnly: boolean isSelected: boolean name: string target: string colors?: { background?: string foreground?: string } description?: string ownerEmail?: string } | { target: string calendarKey?: string } duration: number timeRanges: Array<{ endDate: string startDate: string recurrence?: Array }> alias?: string description?: string expirationDate?: string maxLeadTime?: number minLeadTime?: number title?: string type?: "multiUse" | "recurring" | "singleUse" useDefaultConferencing?: boolean } /** * Canonical Tool Core output for the "Create a scheduling link" effect (`calendar.createSchedulingLink`). * This is the definition's output schema; the effect's script surface may * re-encode it before returning. */ export type CreateSchedulingLinkScriptOutput = { /** * The created scheduling link */ schedulingLink?: { /** * Unique ID of the created scheduling link */ id: string /** * Short ID used in the scheduling link URL */ shortId: string /** * Current booking calendar for this scheduling link */ bookingCalendarRef: { accountId: string calendarId: string } /** * Custom URL slug for the scheduling link */ alias?: string /** * The resolved type of the link */ type?: "singleUse" | "multiUse" | "recurring" /** * Status of the scheduling link */ status: string title?: string description?: string duration?: number /** * Full URL where invitees can book a meeting */ schedulingLinkUrl?: string timeRanges: Array<{ /** * Start of availability window in ISO 8601 format with timezone offset, e.g. '2024-08-22T09:00:00-04:00' */ startDate: string /** * End of availability window in ISO 8601 format with timezone offset, e.g. '2024-08-22T17:00:00-04:00' */ endDate: string /** * 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']). */ recurrence?: Array /** * Unique identifier for this time range */ id: string }> } errors?: Array<{ /** * An identifier for the item that failed (e.g., event summary for creation, event ID for updates/cancellations) */ identifier: string /** * Description of the error that occurred */ errorMessage: string }> } /** * Script input for the "Delete scheduling links." effect (`calendar.deleteSchedulingLinks`), * derived from its Tool Core definition's call_function input projection. * * Uses named Calendar targets configured during workflow setup. Existing-event references retain their original calendar identity. */ export type DeleteSchedulingLinksScriptInput = { calendar: | { calendarKey: string isHidden: boolean isPrimary: boolean isReadOnly: boolean isSelected: boolean name: string target: string colors?: { background?: string foreground?: string } description?: string ownerEmail?: string } | { target: string calendarKey?: string } schedulingLinks: Array<{ bookingCalendarRef: { accountId: string calendarId: string } schedulingLinkId: string }> } /** * Canonical Tool Core output for the "Delete scheduling links." effect (`calendar.deleteSchedulingLinks`). * This is the definition's output schema; the effect's script surface may * re-encode it before returning. */ export type DeleteSchedulingLinksScriptOutput = { /** * IDs of the scheduling links that were deleted */ deletedSchedulingLinkIds: Array errors?: Array<{ /** * An identifier for the item that failed (e.g., event summary for creation, event ID for updates/cancellations) */ identifier: string /** * Description of the error that occurred */ errorMessage: string }> } /** * Script input for the "Fetch list of calendars of the user." effect (`calendar.listCalendars`), * derived from its Tool Core definition's call_function input projection. * * Uses named Calendar targets configured during workflow setup. Existing-event references retain their original calendar identity. */ export type ListCalendarsScriptInput = { calendars: | { calendarKey: string isHidden: boolean isPrimary: boolean isReadOnly: boolean isSelected: boolean name: string target: string colors?: { background?: string foreground?: string } description?: string ownerEmail?: string } | { target: string calendarKey?: string } } /** * Script output for the "Fetch list of calendars of the user." effect (`calendar.listCalendars`), * using its declared script-emission schema. */ export type ListCalendarsScriptOutput = Array<{ calendarKey: string isHidden: boolean isPrimary: boolean isReadOnly: boolean isSelected: boolean name: string target: string colors?: { background?: string foreground?: string } description?: string ownerEmail?: string }> /** * Script input for the "List contacts" effect (`calendar.listContacts`), * derived from its Tool Core definition's call_function input projection. * * Uses named Calendar targets configured during workflow setup. Existing-event references retain their original calendar identity. */ export type ListContactsScriptInput = { calendars: | { calendarKey: string isHidden: boolean isPrimary: boolean isReadOnly: boolean isSelected: boolean name: string target: string colors?: { background?: string foreground?: string } description?: string ownerEmail?: string } | { target: string calendarKey?: string } queries?: Array } /** * Canonical Tool Core output for the "List contacts" effect (`calendar.listContacts`). * This is the definition's output schema; the effect's script surface may * re-encode it before returning. */ export type ListContactsScriptOutput = { accounts: Array<{ accountId: string /** * Google, Apple iCloud, Outlook, etc. */ providerName: string /** * The user email associated with this account. Useful to know if this account and its data should be used depending on context. */ email?: string /** * Whether this account is work-related or a personal account, if we know this information. */ category?: "work" | "personal" capabilities: { /** * Does this account expose any calendars? */ readCalendars: boolean /** * Can we read calendar events from calendars of this account? */ readEvents: boolean /** * Can we write events in some calendars of this account? Calendars themselves might have their own set of restrictions. */ writeEvents: boolean /** * Can we use a text search query to find events in the calendars of this account? */ searchEvents: boolean /** * Does this account expose contacts? */ readContacts: boolean } /** * User can access the events of co-workers having an email address with one of these domains */ coworkersEmailDomains?: Array contacts: Array<{ /** * Unique identifier for the contact */ id: string /** * Primary email address of the contact */ email: string /** * Additional email addresses for this contact */ alternateEmails?: Array /** * Display name of the contact */ displayName?: string /** * Phone numbers associated with this contact */ phoneNumbers?: Array<{ /** * The type of phone number (e.g., home, work, mobile) */ type?: string /** * The phone number value */ value: string }> /** * URL to the contact's profile photo */ photoUrl?: string }> }> } /** * Script input for the "List the user's events from different calendars." effect (`calendar.listEvents`), * derived from its Tool Core definition's call_function input projection. * * Uses named Calendar targets configured during workflow setup. Existing-event references retain their original calendar identity. */ export type ListEventsScriptInput = { calendars: | { calendarKey: string isHidden: boolean isPrimary: boolean isReadOnly: boolean isSelected: boolean name: string target: string colors?: { background?: string foreground?: string } description?: string ownerEmail?: string } | { target: string calendarKey?: string } timeMax: string timeMin: string timeZone: string includeDeclinedInvites?: boolean | null } /** * Canonical Tool Core output for the "List the user's events from different calendars." effect (`calendar.listEvents`). * This is the definition's output schema; the effect's script surface may * re-encode it before returning. */ export type ListEventsScriptOutput = { accounts: Array<{ accountId: string /** * Google, Apple iCloud, Outlook, etc. */ providerName: string /** * The user email associated with this account. Useful to know if this account and its data should be used depending on context. */ email?: string /** * Whether this account is work-related or a personal account, if we know this information. */ category?: "work" | "personal" capabilities: { /** * Does this account expose any calendars? */ readCalendars: boolean /** * Can we read calendar events from calendars of this account? */ readEvents: boolean /** * Can we write events in some calendars of this account? Calendars themselves might have their own set of restrictions. */ writeEvents: boolean /** * Can we use a text search query to find events in the calendars of this account? */ searchEvents: boolean /** * Does this account expose contacts? */ readContacts: boolean } /** * User can access the events of co-workers having an email address with one of these domains */ coworkersEmailDomains?: Array calendars: Array<{ accountId: string calendarId: string name: string description?: string colors?: { foreground?: string background?: string } isPrimary: boolean /** * Is this calendar read-only or can the user create/edit/delete events? */ isReadOnly: boolean /** * The contents of a calendar appear in the user calendar app only if that calendar is selected. * 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. */ isSelected: boolean /** * A hidden calendar is a calendar the user has access to but decided to hide completely from their calendar app. * 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. */ isHidden: boolean /** * The email address of the owner of this calendar. */ ownerEmail?: string events: Array<{ calendar: { accountId: string calendarId: string } eventId: string summary: string description?: string /** * Physical location where the event takes place, or remote conference link/info. */ location?: string /** * 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']). */ recurrenceRules?: Array /** * The data provider this event belongs to */ provider?: "google" | "notion" | "icloud" | "outlook" /** * The URL to view the event in the Calendar app. */ webUrl: string /** * When the event is happening */ period: | { type: "DATE" start: { /** * Date in ISO 8601 format (no time) */ date: string } end: { /** * Date in ISO 8601 format (no time) */ date: string } } | { type: "DATE_TIME" start: { /** * Date-time in ISO 8601 format, in UTC (ending with Z), or with TZ offset */ dateTime: string timeZone?: string } end: { /** * Date-time in ISO 8601 format, in UTC (ending with Z), or with TZ offset */ dateTime: string timeZone?: string } } /** * Whether it's part of a recurring event series */ isRecurring: boolean /** * 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. */ isTransparent: boolean /** * 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. */ isAutoBlock: boolean /** * What kind of event is it? Standard, out of office, birthday... */ eventType?: | "fromGmail" | "default" | "focusTime" | "outOfOffice" | "birthday" | "availability" /** * Is an event confirmed, tentative or cancelled? This is different from the user's RSVP */ eventStatus?: "confirmed" | "tentative" | "cancelled" /** * Whether it's a meeting, aka an event with attendees listed */ isMeeting: boolean conferencingEntryPoints?: Array<{ uri: string accessCode?: string entryPointType?: "video" | "phone" | "sip" | "more" label?: string meetingCode?: string passcode?: string password?: string pin?: string notes?: string signature?: string }> /** * The URL to join the video conference, if available */ conferencingUrl?: string /** * The calendar user's RSVP status */ responseStatus?: "needsAction" | "accepted" | "declined" | "tentative" creator?: { /** * Whether this entry represents the calendar user */ isSelf: boolean displayName?: string email?: string } organizer?: { /** * Whether this entry represents the calendar user */ isSelf: boolean displayName?: string email?: string } attendees?: Array<{ /** * Whether this entry represents the calendar user */ isSelf: boolean displayName?: string email?: string isOptional: boolean isOrganizer?: boolean /** * The calendar user's RSVP status */ responseStatus?: "needsAction" | "accepted" | "declined" | "tentative" }> resources?: Array<{ displayName?: string email?: string isOptional: boolean /** * The calendar user's RSVP status */ responseStatus?: "needsAction" | "accepted" | "declined" | "tentative" }> colors?: { foreground?: string background?: string } attachments?: Array<{ url: string mimeType?: string title?: string notionWorkspaceId?: string }> }> }> }> /** * User preferences for calendar data */ userPreferences: { /** * Whether the user prefers to display time in 12-hour (AM/PM) or 24-hour format */ timeFormat?: "12_HOUR" | "24_HOUR" } errors: Array<{ accountId: string calendarId: string error: string }> } /** * Script input for the "List the user's scheduling links." effect (`calendar.listSchedulingLinks`), * derived from its Tool Core definition's call_function input projection. * * Uses named Calendar targets configured during workflow setup. Existing-event references retain their original calendar identity. */ export type ListSchedulingLinksScriptInput = { calendars: | { calendarKey: string isHidden: boolean isPrimary: boolean isReadOnly: boolean isSelected: boolean name: string target: string colors?: { background?: string foreground?: string } description?: string ownerEmail?: string } | { target: string calendarKey?: string } type?: "multiUse" | "recurring" | "singleUse" } /** * Canonical Tool Core output for the "List the user's scheduling links." effect (`calendar.listSchedulingLinks`). * This is the definition's output schema; the effect's script surface may * re-encode it before returning. */ export type ListSchedulingLinksScriptOutput = { schedulingLinks: Array<{ /** * Unique ID of the created scheduling link */ id: string /** * Short ID used in the scheduling link URL */ shortId: string /** * Current booking calendar for this scheduling link */ bookingCalendarRef: { accountId: string calendarId: string } /** * Custom URL slug for the scheduling link */ alias?: string /** * The resolved type of the link */ type?: "singleUse" | "multiUse" | "recurring" /** * Status of the scheduling link */ status: string title?: string description?: string duration?: number /** * Full URL where invitees can book a meeting */ schedulingLinkUrl?: string timeRanges: Array<{ /** * Start of availability window in ISO 8601 format with timezone offset, e.g. '2024-08-22T09:00:00-04:00' */ startDate: string /** * End of availability window in ISO 8601 format with timezone offset, e.g. '2024-08-22T17:00:00-04:00' */ endDate: string /** * 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']). */ recurrence?: Array /** * Unique identifier for this time range */ id: string }> }> } /** * Script input for the "Update calendar events." effect (`calendar.updateEvents`), * derived from its Tool Core definition's call_function input projection. * * Uses named Calendar targets configured during workflow setup. Existing-event references retain their original calendar identity. */ export type UpdateEventsScriptInput = { calendar: | { calendarKey: string isHidden: boolean isPrimary: boolean isReadOnly: boolean isSelected: boolean name: string target: string colors?: { background?: string foreground?: string } description?: string ownerEmail?: string } | { target: string calendarKey?: string } timeZone: string updates: Array< | { event: { calendar: { accountId: string calendarId: string } eventId: string eventSummary?: string } rsvp: { responseStatus: "accepted" | "declined" | "needsAction" | "tentative" comment?: string } updateType: "RSVP" } | { event: { calendar: { accountId: string calendarId: string } eventId: string eventSummary?: string } update: { addConferencing?: boolean attendees?: Array<{ email: string displayName?: string isOptional?: boolean }> description?: string location?: string period?: | { end: { date: string } start: { date: string } type: "DATE" } | { end: { dateTime: string timeZone?: string } start: { dateTime: string timeZone?: string } type: "DATE_TIME" } recurrenceRules?: Array resources?: Array<{ isOptional: boolean displayName?: string email?: string }> summary?: string } updateType: "UPDATE" } > } /** * Canonical Tool Core output for the "Update calendar events." effect (`calendar.updateEvents`). * This is the definition's output schema; the effect's script surface may * re-encode it before returning. */ export type UpdateEventsScriptOutput = { updatedEvents: Array<{ calendar: { accountId: string calendarId: string } eventId: string summary: string description?: string /** * Physical location where the event takes place, or remote conference link/info. */ location?: string /** * 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']). */ recurrenceRules?: Array /** * The data provider this event belongs to */ provider?: "google" | "notion" | "icloud" | "outlook" /** * The URL to view the event in the Calendar app. */ webUrl: string /** * When the event is happening */ period: | { type: "DATE" start: { /** * Date in ISO 8601 format (no time) */ date: string } end: { /** * Date in ISO 8601 format (no time) */ date: string } } | { type: "DATE_TIME" start: { /** * Date-time in ISO 8601 format, in UTC (ending with Z), or with TZ offset */ dateTime: string timeZone?: string } end: { /** * Date-time in ISO 8601 format, in UTC (ending with Z), or with TZ offset */ dateTime: string timeZone?: string } } /** * Whether it's part of a recurring event series */ isRecurring: boolean /** * 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. */ isTransparent: boolean /** * 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. */ isAutoBlock: boolean /** * What kind of event is it? Standard, out of office, birthday... */ eventType?: | "fromGmail" | "default" | "focusTime" | "outOfOffice" | "birthday" | "availability" /** * Is an event confirmed, tentative or cancelled? This is different from the user's RSVP */ eventStatus?: "confirmed" | "tentative" | "cancelled" /** * Whether it's a meeting, aka an event with attendees listed */ isMeeting: boolean conferencingEntryPoints?: Array<{ uri: string accessCode?: string entryPointType?: "video" | "phone" | "sip" | "more" label?: string meetingCode?: string passcode?: string password?: string pin?: string notes?: string signature?: string }> /** * The URL to join the video conference, if available */ conferencingUrl?: string /** * The calendar user's RSVP status */ responseStatus?: "needsAction" | "accepted" | "declined" | "tentative" creator?: { /** * Whether this entry represents the calendar user */ isSelf: boolean displayName?: string email?: string } organizer?: { /** * Whether this entry represents the calendar user */ isSelf: boolean displayName?: string email?: string } attendees?: Array<{ /** * Whether this entry represents the calendar user */ isSelf: boolean displayName?: string email?: string isOptional: boolean isOrganizer?: boolean /** * The calendar user's RSVP status */ responseStatus?: "needsAction" | "accepted" | "declined" | "tentative" }> resources?: Array<{ displayName?: string email?: string isOptional: boolean /** * The calendar user's RSVP status */ responseStatus?: "needsAction" | "accepted" | "declined" | "tentative" }> colors?: { foreground?: string background?: string } attachments?: Array<{ url: string mimeType?: string title?: string notionWorkspaceId?: string }> }> errors?: Array<{ /** * An identifier for the item that failed (e.g., event summary for creation, event ID for updates/cancellations) */ identifier: string /** * Description of the error that occurred */ errorMessage: string }> } /** * Script input for the "Update a scheduling link." effect (`calendar.updateSchedulingLink`), * derived from its Tool Core definition's call_function input projection. * * Uses named Calendar targets configured during workflow setup. Existing-event references retain their original calendar identity. */ export type UpdateSchedulingLinkScriptInput = { calendar: | { calendarKey: string isHidden: boolean isPrimary: boolean isReadOnly: boolean isSelected: boolean name: string target: string colors?: { background?: string foreground?: string } description?: string ownerEmail?: string } | { target: string calendarKey?: string } identity: { bookingCalendarRef: { accountId: string calendarId: string } schedulingLinkId: string } patch?: { alias?: string bookingCalendar?: | { calendarKey: string isHidden: boolean isPrimary: boolean isReadOnly: boolean isSelected: boolean name: string target: string colors?: { background?: string foreground?: string } description?: string ownerEmail?: string } | { target: string calendarKey?: string } conflictCalendars?: | { calendarKey: string isHidden: boolean isPrimary: boolean isReadOnly: boolean isSelected: boolean name: string target: string colors?: { background?: string foreground?: string } description?: string ownerEmail?: string } | { target: string calendarKey?: string } description?: string | null duration?: number expirationDate?: string | null maxLeadTime?: number | null minLeadTime?: number | null timeRanges?: Array<{ endDate: string startDate: string recurrence?: Array }> title?: string | null type?: "multiUse" | "recurring" | "singleUse" useDefaultConferencing?: boolean } } /** * Canonical Tool Core output for the "Update a scheduling link." effect (`calendar.updateSchedulingLink`). * This is the definition's output schema; the effect's script surface may * re-encode it before returning. */ export type UpdateSchedulingLinkScriptOutput = { /** * The updated scheduling link */ schedulingLink?: { /** * Unique ID of the created scheduling link */ id: string /** * Short ID used in the scheduling link URL */ shortId: string /** * Current booking calendar for this scheduling link */ bookingCalendarRef: { accountId: string calendarId: string } /** * Custom URL slug for the scheduling link */ alias?: string /** * The resolved type of the link */ type?: "singleUse" | "multiUse" | "recurring" /** * Status of the scheduling link */ status: string title?: string description?: string duration?: number /** * Full URL where invitees can book a meeting */ schedulingLinkUrl?: string timeRanges: Array<{ /** * Start of availability window in ISO 8601 format with timezone offset, e.g. '2024-08-22T09:00:00-04:00' */ startDate: string /** * End of availability window in ISO 8601 format with timezone offset, e.g. '2024-08-22T17:00:00-04:00' */ endDate: string /** * 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']). */ recurrence?: Array /** * Unique identifier for this time range */ id: string }> } errors?: Array<{ /** * An identifier for the item that failed (e.g., event summary for creation, event ID for updates/cancellations) */ identifier: string /** * Description of the error that occurred */ errorMessage: string }> } export class CalendarConnectionClient { constructor(private readonly invoke: ConnectionActionInvoker) {} cancelEvents( args: CancelEventsScriptInput, ): Promise { return this.invoke("cancelEvents", args) } createEvents( args: CreateEventsScriptInput, ): Promise { return this.invoke("createEvents", args) } createSchedulingLink( args: CreateSchedulingLinkScriptInput, ): Promise { return this.invoke( "createSchedulingLink", args, ) } deleteSchedulingLinks( args: DeleteSchedulingLinksScriptInput, ): Promise { return this.invoke( "deleteSchedulingLinks", args, ) } listCalendars( args: ListCalendarsScriptInput, ): Promise { return this.invoke("listCalendars", args) } listContacts( args: ListContactsScriptInput, ): Promise { return this.invoke("listContacts", args) } listEvents(args: ListEventsScriptInput): Promise { return this.invoke("listEvents", args) } listSchedulingLinks( args: ListSchedulingLinksScriptInput, ): Promise { return this.invoke( "listSchedulingLinks", args, ) } updateEvents( args: UpdateEventsScriptInput, ): Promise { return this.invoke("updateEvents", args) } updateSchedulingLink( args: UpdateSchedulingLinkScriptInput, ): Promise { return this.invoke( "updateSchedulingLink", args, ) } }