import type { CalendarTriggerTarget, WorkflowConnectionDeclarations, WorkflowConnectionKeys } from "./connections.js"; import { type SchemaBuilder } from "./schema-builder.js"; import { scheduled, notionPageCreated, notionPageUpdated } from "./configured-events.js"; import type { NotionPageCreatedTrigger, NotionPageUpdatedTrigger, PageUpdatedOptions, RecurrenceTrigger } from "./configured-events.js"; import type { DataSourceHandle } from "./notion-as-code/database.js"; import type { NotionAsCodeSchema } from "./notion-as-code/intents.js"; import type { RecurrenceSchedule } from "./notion-as-code/recurrence.js"; import type { CalendarEventCanceledEvent, CalendarEventCreatedEvent, CalendarEventUpdatedEvent, DiscordInteractionEvent, GoogleDriveOauthFilesChangedEvent, MailEmailReceivedEvent, MailEmailSentEvent, MailLabelAppliedEvent, NotionAgentMentionedEvent, NotionButtonPressedEvent, NotionCommentAddedEvent, NotionDatabaseAgentUpdatedEvent, NotionMeetingNoteSummaryCompletedEvent, NotionPageCreatedEvent, NotionPageDeletedEvent, NotionPageUpdatedEvent, RecurrenceEvent, SlackAppMentionEvent, SlackMessageEvent, SlackReactionAddedEvent, WebhookEvent } from "./events.js"; export type { Actor, ActorLike, CalendarEventCanceledEvent, CalendarEventCreatedEvent, CalendarEventLike, CalendarEventUpdatedEvent, ChatMessageLike, ChatThreadMessage, DiscordChatThreadMessage, DiscordInteractionEvent, EmailMessageLike, EmailThreadLike, EmailTriggerMessage, GoogleDriveOauthFilesChangedEvent, LinkLike, MailEmailReceivedEvent, MailEmailSentEvent, MailLabelAppliedEvent, MessageLike, NotionAgentMentionedEvent, NotionButtonPressedEvent, NotionCommentAddedEvent, NotionDatabaseAgentUpdatedEvent, NotionMeetingNoteSummaryCompletedEvent, NotionPageCreatedEvent, NotionPageDeletedEvent, NotionPageEdit, NotionPageUpdatedEvent, RecurrenceEvent, RecurrenceFrequency, SlackAppMentionEvent, SlackChatThreadMessage, SlackMessageEvent, SlackReactionAddedEvent, ThreadLike, ThreadMessage, TimestampLike, TriggerEvent, TriggerEventBase, TriggerEventMap, TriggerType, VendorActor, VendorExtensions, WebhookEvent, } from "./events.js"; export type { NotionPageCreatedTrigger, NotionPageUpdatedTrigger, PageUpdatedOptions, RecurrenceTrigger } from "./configured-events.js"; export type { RecurrenceSchedule } from "./notion-as-code/recurrence.js"; declare const manualWorkflowInputSchema: unique symbol; export type ManualWorkflowTrigger = Record> = { type: "workflow.manual"; inputJsonSchema: Record; readonly [manualWorkflowInputSchema]?: TInput; }; /** Triggers immediately after a new message is posted in Slack (includes new threads and replies) */ export type SlackMessageTrigger = { type: "slack.message"; /** Key of the declared slack connection. */ connectionKey?: TKey; }; /** Triggers immediately after a reaction is added to a message in Slack */ export type SlackReactionAddedTrigger = { type: "slack.reaction.added"; /** Key of the declared slack connection. */ connectionKey?: TKey; }; /** Triggers when the agent is mentioned in a Slack channel or direct message */ export type SlackAppMentionTrigger = { type: "slack.app.mention"; /** Key of the declared slack connection. */ connectionKey?: TKey; }; /** Triggers when a user invokes the /ai slash command in a configured Discord channel */ export type DiscordInteractionTrigger = { type: "discord.interaction"; /** Key of the declared discord connection. */ connectionKey?: TKey; }; /** Triggers immediately when a new email is received in Notion Mail */ export type MailEmailReceivedTrigger = { type: "mail.email.received"; /** Key of the declared mail connection. */ connectionKey?: TKey; }; /** Triggers immediately when a new email is sent from Notion Mail */ export type MailEmailSentTrigger = { type: "mail.email.sent"; /** Key of the declared mail connection. */ connectionKey?: TKey; }; /** Triggers immediately when a label is applied to an email in Notion Mail */ export type MailLabelAppliedTrigger = { type: "mail.label.applied"; /** Key of the declared mail connection. */ connectionKey?: TKey; }; /** Triggers immediately when a calendar event is created */ export type CalendarEventCreatedTrigger = { type: "calendar.event.created"; /** Key of the declared calendar connection. */ connectionKey: TKey; /** Named target from this Calendar connection; resolved from saved setup. */ calendarTarget: string; }; /** Triggers immediately when a calendar event is updated */ export type CalendarEventUpdatedTrigger = { type: "calendar.event.updated"; /** Key of the declared calendar connection. */ connectionKey: TKey; /** Named target from this Calendar connection; resolved from saved setup. */ calendarTarget: string; }; /** Triggers immediately when a calendar event is canceled */ export type CalendarEventCanceledTrigger = { type: "calendar.event.canceled"; /** Key of the declared calendar connection. */ connectionKey: TKey; /** Named target from this Calendar connection; resolved from saved setup. */ calendarTarget: string; }; /** A page was deleted. */ export type NotionPageDeletedTrigger = { type: "notion.page.deleted"; }; /** A meeting note's AI summary finished generating. */ export type NotionMeetingNoteSummaryCompletedTrigger = { type: "notion.meetingNote.summary.completed"; }; /** A comment was added to a page discussion. */ export type NotionCommentAddedTrigger = { type: "notion.page.discussion.comment.added"; }; /** An agent was mentioned in page content or a person property. */ export type NotionAgentMentionedTrigger = { type: "notion.agent.mentioned"; }; /** A button block was pressed. */ export type NotionButtonPressedTrigger = { type: "notion.button.pressed"; }; /** A database agent's configuration was updated. */ export type NotionDatabaseAgentUpdatedTrigger = { type: "notion.database.agent.updated"; }; /** An incoming webhook request was received. */ export type WebhookTrigger = { type: "webhooks.webhook"; }; /** Watches for file changes in a specific Google Drive folder (direct children only) or shared drive. The My Drive root is not supported. Fires on a schedule and provides change tokens for fetching the list of changes. */ export type GoogleDriveOauthFilesChangedTrigger = { type: "googleDriveOauth.filesChanged"; /** Key of the declared googleDriveOauth connection. */ connectionKey?: TKey; }; declare function manual(): ManualWorkflowTrigger>; declare function manual>(options: { inputSchema: SchemaBuilder; }): ManualWorkflowTrigger; /** Creators for each event that can trigger a workflow. */ export declare const events: { readonly manual: typeof manual; /** * Declare that a workflow can run on `slack.message` events. * * Triggers immediately after a new message is posted in Slack (includes new threads and replies) */ readonly slackMessage: (options?: { connectionKey: TKey; } | undefined) => SlackMessageTrigger; /** * Declare that a workflow can run on `slack.reaction.added` events. * * Triggers immediately after a reaction is added to a message in Slack */ readonly slackReactionAdded: (options?: { connectionKey: TKey; } | undefined) => SlackReactionAddedTrigger; /** * Declare that a workflow can run on `slack.app.mention` events. * * Triggers when the agent is mentioned in a Slack channel or direct message */ readonly slackAppMention: (options?: { connectionKey: TKey; } | undefined) => SlackAppMentionTrigger; /** * Declare that a workflow can run on `discord.interaction` events. * * Triggers when a user invokes the /ai slash command in a configured Discord channel */ readonly discordInteraction: (options?: { connectionKey: TKey; } | undefined) => DiscordInteractionTrigger; /** * Declare that a workflow can run on `mail.email.received` events. * * Triggers immediately when a new email is received in Notion Mail */ readonly mailEmailReceived: (options?: { connectionKey: TKey; } | undefined) => MailEmailReceivedTrigger; /** * Declare that a workflow can run on `mail.email.sent` events. * * Triggers immediately when a new email is sent from Notion Mail */ readonly mailEmailSent: (options?: { connectionKey: TKey; } | undefined) => MailEmailSentTrigger; /** * Declare that a workflow can run on `mail.label.applied` events. * * Triggers immediately when a label is applied to an email in Notion Mail */ readonly mailLabelApplied: (options?: { connectionKey: TKey; } | undefined) => MailLabelAppliedTrigger; /** * Declare that a workflow can run on `calendar.event.created` events. * * Triggers immediately when a calendar event is created */ readonly calendarEventCreated: (options: { calendars: CalendarTriggerTarget; }) => CalendarEventCreatedTrigger; /** * Declare that a workflow can run on `calendar.event.updated` events. * * Triggers immediately when a calendar event is updated */ readonly calendarEventUpdated: (options: { calendars: CalendarTriggerTarget; }) => CalendarEventUpdatedTrigger; /** * Declare that a workflow can run on `calendar.event.canceled` events. * * Triggers immediately when a calendar event is canceled */ readonly calendarEventCanceled: (options: { calendars: CalendarTriggerTarget; }) => CalendarEventCanceledTrigger; readonly notionPageCreated: typeof notionPageCreated; readonly notionPageUpdated: typeof notionPageUpdated; /** * Declare that a workflow can run on `notion.page.deleted` events. * * A page was deleted. */ readonly notionPageDeleted: () => NotionPageDeletedTrigger; /** * Declare that a workflow can run on `notion.meetingNote.summary.completed` events. * * A meeting note's AI summary finished generating. */ readonly notionMeetingNoteSummaryCompleted: () => NotionMeetingNoteSummaryCompletedTrigger; /** * Declare that a workflow can run on `notion.page.discussion.comment.added` events. * * A comment was added to a page discussion. */ readonly notionCommentAdded: () => NotionCommentAddedTrigger; /** * Declare that a workflow can run on `notion.agent.mentioned` events. * * An agent was mentioned in page content or a person property. */ readonly notionAgentMentioned: () => NotionAgentMentionedTrigger; /** * Declare that a workflow can run on `notion.button.pressed` events. * * A button block was pressed. */ readonly notionButtonPressed: () => NotionButtonPressedTrigger; /** * Declare that a workflow can run on `notion.database.agent.updated` events. * * A database agent's configuration was updated. */ readonly notionDatabaseAgentUpdated: () => NotionDatabaseAgentUpdatedTrigger; /** * Declare that a workflow can run on `webhooks.webhook` events. * * An incoming webhook request was received. */ readonly webhook: () => WebhookTrigger; /** * Declare that a workflow can run on `googleDriveOauth.filesChanged` events. * * Watches for file changes in a specific Google Drive folder (direct children only) or shared drive. The My Drive root is not supported. Fires on a schedule and provides change tokens for fetching the list of changes. */ readonly googleDriveOauthFilesChanged: (options?: { connectionKey: TKey; } | undefined) => GoogleDriveOauthFilesChangedTrigger; readonly scheduled: typeof scheduled; }; /** Trigger creators restricted to the workflow's declared provider keys. */ export type WorkflowEventCreators = { manual(): ManualWorkflowTrigger>; manual>(options: { inputSchema: SchemaBuilder; }): ManualWorkflowTrigger; slackMessage(options?: { connectionKey: WorkflowConnectionKeys; }): SlackMessageTrigger>; slackReactionAdded(options?: { connectionKey: WorkflowConnectionKeys; }): SlackReactionAddedTrigger>; slackAppMention(options?: { connectionKey: WorkflowConnectionKeys; }): SlackAppMentionTrigger>; discordInteraction(options?: { connectionKey: WorkflowConnectionKeys; }): DiscordInteractionTrigger>; mailEmailReceived(options?: { connectionKey: WorkflowConnectionKeys; }): MailEmailReceivedTrigger>; mailEmailSent(options?: { connectionKey: WorkflowConnectionKeys; }): MailEmailSentTrigger>; mailLabelApplied(options?: { connectionKey: WorkflowConnectionKeys; }): MailLabelAppliedTrigger>; calendarEventCreated(options: { calendars: CalendarTriggerTarget>; }): CalendarEventCreatedTrigger>; calendarEventUpdated(options: { calendars: CalendarTriggerTarget>; }): CalendarEventUpdatedTrigger>; calendarEventCanceled(options: { calendars: CalendarTriggerTarget>; }): CalendarEventCanceledTrigger>; notionPageCreated(options?: { dataSource: DataSourceHandle; }): NotionPageCreatedTrigger; notionPageUpdated(options?: PageUpdatedOptions): NotionPageUpdatedTrigger; notionPageDeleted(): NotionPageDeletedTrigger; notionMeetingNoteSummaryCompleted(): NotionMeetingNoteSummaryCompletedTrigger; notionCommentAdded(): NotionCommentAddedTrigger; notionAgentMentioned(): NotionAgentMentionedTrigger; notionButtonPressed(): NotionButtonPressedTrigger; notionDatabaseAgentUpdated(): NotionDatabaseAgentUpdatedTrigger; webhook(): WebhookTrigger; googleDriveOauthFilesChanged(options?: { connectionKey: WorkflowConnectionKeys; }): GoogleDriveOauthFilesChangedTrigger>; scheduled(options?: RecurrenceSchedule): RecurrenceTrigger; }; /** Triggers whose connection keys belong to the declared provider. */ export type WorkflowTriggerForConnections = ManualWorkflowTrigger | SlackMessageTrigger> | SlackReactionAddedTrigger> | SlackAppMentionTrigger> | DiscordInteractionTrigger> | MailEmailReceivedTrigger> | MailEmailSentTrigger> | MailLabelAppliedTrigger> | CalendarEventCreatedTrigger> | CalendarEventUpdatedTrigger> | CalendarEventCanceledTrigger> | NotionPageCreatedTrigger | NotionPageUpdatedTrigger | NotionPageDeletedTrigger | NotionMeetingNoteSummaryCompletedTrigger | NotionCommentAddedTrigger | NotionAgentMentionedTrigger | NotionButtonPressedTrigger | NotionDatabaseAgentUpdatedTrigger | WebhookTrigger | GoogleDriveOauthFilesChangedTrigger> | RecurrenceTrigger; /** Event that can trigger a workflow. */ export type WorkflowTrigger = ManualWorkflowTrigger | SlackMessageTrigger | SlackReactionAddedTrigger | SlackAppMentionTrigger | DiscordInteractionTrigger | MailEmailReceivedTrigger | MailEmailSentTrigger | MailLabelAppliedTrigger | CalendarEventCreatedTrigger | CalendarEventUpdatedTrigger | CalendarEventCanceledTrigger | NotionPageCreatedTrigger | NotionPageUpdatedTrigger | NotionPageDeletedTrigger | NotionMeetingNoteSummaryCompletedTrigger | NotionCommentAddedTrigger | NotionAgentMentionedTrigger | NotionButtonPressedTrigger | NotionDatabaseAgentUpdatedTrigger | WebhookTrigger | GoogleDriveOauthFilesChangedTrigger | RecurrenceTrigger; /** All workflow trigger type strings. */ export declare const WORKFLOW_TRIGGER_TYPES: readonly ["workflow.manual", "slack.message", "slack.reaction.added", "slack.app.mention", "discord.interaction", "mail.email.received", "mail.email.sent", "mail.label.applied", "calendar.event.created", "calendar.event.updated", "calendar.event.canceled", "notion.page.created", "notion.page.updated", "notion.page.deleted", "notion.meetingNote.summary.completed", "notion.page.discussion.comment.added", "notion.agent.mentioned", "notion.button.pressed", "notion.database.agent.updated", "webhooks.webhook", "googleDriveOauth.filesChanged", "recurrence"]; /** A workflow trigger type string. */ export type WorkflowTriggerType = (typeof WORKFLOW_TRIGGER_TYPES)[number]; /** Maps each supported workflow trigger to the event its handler receives. */ export type WorkflowEventMap = { "slack.message": SlackMessageEvent; "slack.reaction.added": SlackReactionAddedEvent; "slack.app.mention": SlackAppMentionEvent; "discord.interaction": DiscordInteractionEvent; "mail.email.received": MailEmailReceivedEvent; "mail.email.sent": MailEmailSentEvent; "mail.label.applied": MailLabelAppliedEvent; "calendar.event.created": CalendarEventCreatedEvent; "calendar.event.updated": CalendarEventUpdatedEvent; "calendar.event.canceled": CalendarEventCanceledEvent; "notion.page.created": NotionPageCreatedEvent; "notion.page.updated": NotionPageUpdatedEvent; "notion.page.deleted": NotionPageDeletedEvent; "notion.meetingNote.summary.completed": NotionMeetingNoteSummaryCompletedEvent; "notion.page.discussion.comment.added": NotionCommentAddedEvent; "notion.agent.mentioned": NotionAgentMentionedEvent; "notion.button.pressed": NotionButtonPressedEvent; "notion.database.agent.updated": NotionDatabaseAgentUpdatedEvent; "webhooks.webhook": WebhookEvent; "googleDriveOauth.filesChanged": GoogleDriveOauthFilesChangedEvent; recurrence: RecurrenceEvent; }; //# sourceMappingURL=events.generated.d.ts.map