@notionhq/workers 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/block.d.ts +1 -1
  2. package/dist/block.d.ts.map +1 -1
  3. package/dist/builder.d.ts +7 -1
  4. package/dist/builder.d.ts.map +1 -1
  5. package/dist/builder.js +13 -0
  6. package/dist/capabilities/context.js +1 -1
  7. package/dist/capabilities/stateful-capability.js +1 -1
  8. package/dist/capabilities/sync.d.ts +11 -1
  9. package/dist/capabilities/sync.d.ts.map +1 -1
  10. package/dist/capabilities/workflow.d.ts +50 -0
  11. package/dist/capabilities/workflow.d.ts.map +1 -0
  12. package/dist/capabilities/workflow.js +40 -0
  13. package/dist/capabilities/workflow.test.d.ts +2 -0
  14. package/dist/capabilities/workflow.test.d.ts.map +1 -0
  15. package/dist/index.d.ts +3 -2
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +8 -1
  18. package/dist/schema-builder.d.ts.map +1 -1
  19. package/dist/triggers.d.ts +365 -0
  20. package/dist/triggers.d.ts.map +1 -0
  21. package/dist/triggers.generated.d.ts +246 -0
  22. package/dist/triggers.generated.d.ts.map +1 -0
  23. package/dist/triggers.generated.js +239 -0
  24. package/dist/triggers.js +0 -0
  25. package/dist/types.d.ts +18 -0
  26. package/dist/types.d.ts.map +1 -1
  27. package/dist/worker.d.ts +32 -2
  28. package/dist/worker.d.ts.map +1 -1
  29. package/dist/worker.js +34 -0
  30. package/package.json +8 -1
  31. package/src/block.ts +40 -40
  32. package/src/builder.ts +20 -0
  33. package/src/capabilities/context.ts +2 -2
  34. package/src/capabilities/stateful-capability.ts +1 -1
  35. package/src/capabilities/sync.test.ts +64 -0
  36. package/src/capabilities/sync.ts +6 -0
  37. package/src/capabilities/workflow.test.ts +184 -0
  38. package/src/capabilities/workflow.ts +119 -0
  39. package/src/index.ts +16 -1
  40. package/src/schema-builder.ts +1 -0
  41. package/src/triggers.generated.ts +489 -0
  42. package/src/triggers.ts +504 -0
  43. package/src/types.ts +20 -0
  44. package/src/worker.ts +99 -8
@@ -0,0 +1,365 @@
1
+ /**
2
+ * Agent Trigger Types — Public API
3
+ *
4
+ * Shared type definitions for agent triggers between @notionhq/workers and the Notion repository.
5
+ * This file MUST be kept identical in both repositories.
6
+ *
7
+ * Conventions:
8
+ * - Protocols define the standard fields every consumer can rely on.
9
+ * - Vendor-specific fields use `x-<vendor>-` prefix (e.g., "x-slack-threadId").
10
+ * - Only public URLs — no internal URIs.
11
+ * - No `data` sub-object — vendor fields live at the top level with `x-<vendor>-`.
12
+ * - Types only — no runtime values.
13
+ * - All fields are required. Nullable fields use `T | null` (no `?:`) so they
14
+ * map directly to required + nullable in JSON Schema for LLM structured output.
15
+ * - Conversions must always provide explicit values (use `null` when absent).
16
+ */
17
+ /** Allows arbitrary vendor-specific fields prefixed with `x-<vendor>-`. */
18
+ export type VendorExtensions = {
19
+ [key: `x-${string}`]: unknown;
20
+ };
21
+ /** Has a human-readable message / summary. */
22
+ export type MessageLike = {
23
+ message: string;
24
+ };
25
+ /** Has an actor who performed the action. */
26
+ export type ActorLike = {
27
+ actor: Actor | null;
28
+ };
29
+ /** Has a navigable URL. */
30
+ export type LinkLike = {
31
+ url: string | null;
32
+ };
33
+ /** Has a timestamp. */
34
+ export type TimestampLike = {
35
+ /** ISO 8601 */
36
+ timestamp: string | null;
37
+ };
38
+ /** Has a conversation thread. */
39
+ export type ThreadLike<M = ThreadMessage> = {
40
+ thread: Array<M>;
41
+ /** Whether this event is a follow-up in a previously subscribed thread. */
42
+ isFollowUpMessage: boolean | null;
43
+ };
44
+ /**
45
+ * A chat message. Any chat platform (Slack, Discord, MS Teams, etc.) implements this.
46
+ * Composes MessageLike, ActorLike, LinkLike, TimestampLike.
47
+ */
48
+ export type ChatMessageLike = MessageLike & ActorLike & LinkLike & TimestampLike & {
49
+ id: string;
50
+ channelId: string;
51
+ channelName: string | null;
52
+ };
53
+ /** An email message. Any mail provider (Gmail, Outlook, etc.) implements this. */
54
+ export type EmailMessageLike = MessageLike & LinkLike & TimestampLike & {
55
+ id: string;
56
+ subject: string;
57
+ from: string;
58
+ fromName: string | null;
59
+ to: Array<string>;
60
+ cc: Array<string> | null;
61
+ bcc: Array<string> | null;
62
+ /** Plain-text or HTML body content. */
63
+ body: string;
64
+ isRead: boolean | null;
65
+ hasAttachments: boolean | null;
66
+ labels: Array<string> | null;
67
+ };
68
+ /** An email thread. Any mail provider implements this. */
69
+ export type EmailThreadLike = {
70
+ id: string;
71
+ subject: string;
72
+ participants: Array<string>;
73
+ messageCount: number;
74
+ /** ISO 8601 */
75
+ lastMessageAt: string;
76
+ hasUnread: boolean;
77
+ };
78
+ /** A calendar event. Any calendar provider (Google, Outlook, iCal, etc.) implements this. */
79
+ export type CalendarEventLike = LinkLike & TimestampLike & {
80
+ eventId: string;
81
+ summary: string;
82
+ description: string | null;
83
+ location: string | null;
84
+ /** ISO 8601 */
85
+ startTime: string;
86
+ /** ISO 8601 */
87
+ endTime: string | null;
88
+ isAllDay: boolean | null;
89
+ isRecurring: boolean | null;
90
+ attendees: Array<Actor> | null;
91
+ calendarId: string;
92
+ accountId: string;
93
+ };
94
+ /**
95
+ * An actor who performed an action.
96
+ *
97
+ * `id` / `displayName` / `email` are the Notion-resolved identity.
98
+ * `vendorActor` carries the identity in the originating system.
99
+ */
100
+ export type Actor = {
101
+ /** Notion user ID (when resolved). */
102
+ id: string | null;
103
+ displayName: string | null;
104
+ email: string | null;
105
+ /** The actor's identity in the vendor system. */
106
+ vendorActor: VendorActor | null;
107
+ };
108
+ /** Vendor-specific actor identity. */
109
+ export type VendorActor = {
110
+ /** Vendor name: "slack", "gmail", "discord", "notion", etc. */
111
+ vendor: string;
112
+ /** Vendor-specific ID. */
113
+ id: string;
114
+ displayName: string | null;
115
+ /** Handle / username (e.g., Slack @handle). */
116
+ handle: string | null;
117
+ /** "user", "bot", or a vendor-specific string. */
118
+ type: "user" | "bot" | string | null;
119
+ /** URL to the actor's profile in the vendor system. */
120
+ url: string | null;
121
+ };
122
+ /**
123
+ * A single message inside a thread.
124
+ * Implements MessageLike, ActorLike, LinkLike, TimestampLike.
125
+ * Vendor-specific fields use `x-<vendor>-` prefix.
126
+ */
127
+ export type ThreadMessage = MessageLike & ActorLike & LinkLike & TimestampLike & VendorExtensions & {
128
+ id: string;
129
+ };
130
+ /** A chat thread message. Extends ChatMessageLike with VendorExtensions. */
131
+ export type ChatThreadMessage = ChatMessageLike & VendorExtensions;
132
+ /** An email message in a trigger. Extends EmailMessageLike with VendorExtensions. */
133
+ export type EmailTriggerMessage = EmailMessageLike & VendorExtensions;
134
+ /**
135
+ * Every trigger event has at least these fields.
136
+ * `message` is a human-readable summary of what happened.
137
+ */
138
+ export type TriggerEventBase = MessageLike & ActorLike & VendorExtensions & {
139
+ type: string;
140
+ vendor: string;
141
+ };
142
+ /**
143
+ * Base shape for chat trigger events (Slack, Discord, MS Teams, etc.).
144
+ * Parameterized on the message type so each platform can narrow
145
+ * `triggerMessage` and `thread` to its vendor-specific message shape.
146
+ */
147
+ type ChatEventBase<M extends ChatThreadMessage = ChatThreadMessage> = TriggerEventBase & LinkLike & TimestampLike & ThreadLike<M> & {
148
+ /** The message that fired the trigger. */
149
+ triggerMessage: M;
150
+ channelId: string;
151
+ channelName: string | null;
152
+ threadId: string | null;
153
+ };
154
+ export type SlackChatThreadMessage = ChatThreadMessage & {
155
+ "x-slack-fileUrls": Array<string> | null;
156
+ /** URLs extracted from the message text. */
157
+ "x-slack-urls": Array<string> | null;
158
+ };
159
+ export type SlackMessageEvent = ChatEventBase<SlackChatThreadMessage> & {
160
+ type: "slack.message";
161
+ vendor: "slack";
162
+ };
163
+ export type SlackReactionAddedEvent = ChatEventBase<SlackChatThreadMessage> & {
164
+ type: "slack.reaction.added";
165
+ vendor: "slack";
166
+ /** The emoji name (without colons), e.g. "thumbsup". */
167
+ "x-slack-reaction": string | null;
168
+ };
169
+ export type SlackAppMentionEvent = ChatEventBase<SlackChatThreadMessage> & {
170
+ type: "slack.app.mention";
171
+ vendor: "slack";
172
+ };
173
+ /** Base shape for all mail trigger events. */
174
+ type MailEventBase = TriggerEventBase & LinkLike & TimestampLike & {
175
+ vendor: "notionmail" | "gmail" | string;
176
+ /** The triggering email. */
177
+ email: EmailTriggerMessage;
178
+ /** The email thread this message belongs to. */
179
+ emailThread: EmailThreadLike;
180
+ /** The email address of the mailbox owner. */
181
+ userEmail: string;
182
+ };
183
+ export type MailEmailReceivedEvent = MailEventBase & {
184
+ type: "mail.email.received";
185
+ };
186
+ export type MailEmailSentEvent = MailEventBase & {
187
+ type: "mail.email.sent";
188
+ };
189
+ export type MailLabelAppliedEvent = MailEventBase & {
190
+ type: "mail.label.applied";
191
+ /** The label that was applied. */
192
+ appliedLabel: string;
193
+ };
194
+ /** Base shape for all calendar trigger events. */
195
+ type CalendarEventBase = TriggerEventBase & CalendarEventLike & {
196
+ vendor: "notion-calendar" | "google" | string;
197
+ };
198
+ export type CalendarEventCreatedEvent = CalendarEventBase & {
199
+ type: "calendar.event.created";
200
+ };
201
+ export type CalendarEventUpdatedEvent = CalendarEventBase & {
202
+ type: "calendar.event.updated";
203
+ /** Which fields changed. */
204
+ updatedFields: Array<string> | null;
205
+ };
206
+ export type CalendarEventCanceledEvent = CalendarEventBase & {
207
+ type: "calendar.event.canceled";
208
+ };
209
+ export type DiscordChatThreadMessage = ChatThreadMessage & {
210
+ "x-discord-guildId": string | null;
211
+ };
212
+ export type DiscordInteractionEvent = ChatEventBase<DiscordChatThreadMessage> & {
213
+ type: "discord.interaction";
214
+ vendor: "discord";
215
+ "x-discord-guildId": string | null;
216
+ };
217
+ /** A property edit with before/after snapshots. */
218
+ export type NotionPageEdit = {
219
+ before: Record<string, unknown> | null;
220
+ after: Record<string, unknown> | null;
221
+ afterContent: string | null;
222
+ contentChanged: boolean | null;
223
+ timestamp: number;
224
+ editedBy: Actor | null;
225
+ };
226
+ export type NotionPageCreatedEvent = TriggerEventBase & LinkLike & TimestampLike & {
227
+ type: "notion.page.created";
228
+ vendor: "notion";
229
+ /** Page properties as key-value pairs. */
230
+ page: Record<string, unknown>;
231
+ /** Rendered markdown content of the page. */
232
+ content: string;
233
+ edits: Array<NotionPageEdit> | null;
234
+ };
235
+ export type NotionPageUpdatedEvent = TriggerEventBase & LinkLike & TimestampLike & {
236
+ type: "notion.page.updated";
237
+ vendor: "notion";
238
+ /** Chronological array of edits (accumulated during debounce). */
239
+ edits: Array<NotionPageEdit>;
240
+ };
241
+ export type NotionPageDeletedEvent = TriggerEventBase & LinkLike & TimestampLike & {
242
+ type: "notion.page.deleted";
243
+ vendor: "notion";
244
+ page: Record<string, unknown>;
245
+ content: string;
246
+ };
247
+ export type NotionMeetingNoteSummaryCompletedEvent = TriggerEventBase & LinkLike & TimestampLike & {
248
+ type: "notion.meetingNote.summary.completed";
249
+ vendor: "notion";
250
+ page: Record<string, unknown>;
251
+ content: string;
252
+ meetingNoteBlockId: string;
253
+ };
254
+ export type NotionCommentAddedEvent = TriggerEventBase & LinkLike & TimestampLike & {
255
+ type: "notion.page.discussion.comment.added";
256
+ vendor: "notion";
257
+ /** The full discussion context. */
258
+ discussion: {
259
+ id: string;
260
+ pageId: string;
261
+ resolved: boolean;
262
+ context: "inline" | "block" | "page" | "databaseProperty" | null;
263
+ parentBlockId: string | null;
264
+ propertyId: string | null;
265
+ propertyName: string | null;
266
+ };
267
+ /** The new comment. */
268
+ comment: {
269
+ id: string;
270
+ text: string;
271
+ url: string;
272
+ timestamp: string;
273
+ actor: Actor | null;
274
+ };
275
+ };
276
+ export type NotionAgentMentionedEvent = TriggerEventBase & LinkLike & TimestampLike & {
277
+ type: "notion.agent.mentioned";
278
+ vendor: "notion";
279
+ page: Record<string, unknown>;
280
+ content: string;
281
+ mentionLocation: "page_content" | "person_property";
282
+ mentionBlockContent: string | null;
283
+ propertyId: string | null;
284
+ propertyName: string | null;
285
+ };
286
+ export type NotionButtonPressedEvent = TriggerEventBase & LinkLike & TimestampLike & {
287
+ type: "notion.button.pressed";
288
+ vendor: "notion";
289
+ blockUrl: string;
290
+ };
291
+ export type NotionDatabaseAgentUpdatedEvent = TriggerEventBase & TimestampLike & {
292
+ type: "notion.database.agent.updated";
293
+ vendor: "notion";
294
+ agentId: string;
295
+ runtimeInstructions: string;
296
+ shouldRunOverDatabase: boolean;
297
+ viewId: string | null;
298
+ };
299
+ export type WebhookEvent = TriggerEventBase & TimestampLike & {
300
+ type: "webhooks.webhook";
301
+ vendor: "webhooks";
302
+ triggerId: string;
303
+ verificationSchema: string;
304
+ eventType: string | null;
305
+ deliveryId: string | null;
306
+ payload: unknown;
307
+ };
308
+ export type GoogleDriveOauthFilesChangedEvent = TriggerEventBase & TimestampLike & {
309
+ type: "googleDriveOauth.filesChanged";
310
+ vendor: "google-drive";
311
+ /** The page token from before this poll. */
312
+ changeToken: string;
313
+ /** The page token after this poll. */
314
+ newChangeToken: string;
315
+ /** Number of changes detected. */
316
+ changeCount: number;
317
+ /** The folder or drive being watched. */
318
+ scope: {
319
+ type: "folder";
320
+ folderId: string;
321
+ } | {
322
+ type: "drive";
323
+ driveId: string;
324
+ };
325
+ /** Upper time bound for this poll window (ISO 8601). */
326
+ lastEventTimestamp: string;
327
+ };
328
+ export type RecurrenceFrequency = "hour" | "day" | "week" | "month" | "year";
329
+ export type RecurrenceEvent = TriggerEventBase & TimestampLike & {
330
+ type: "recurrence";
331
+ vendor: "notion";
332
+ frequency: RecurrenceFrequency;
333
+ interval: number;
334
+ timezone: string;
335
+ };
336
+ /** Map from trigger type string to its event shape. Single source of truth. */
337
+ export type TriggerEventMap = {
338
+ "slack.message": SlackMessageEvent;
339
+ "slack.reaction.added": SlackReactionAddedEvent;
340
+ "slack.app.mention": SlackAppMentionEvent;
341
+ "discord.interaction": DiscordInteractionEvent;
342
+ "mail.email.received": MailEmailReceivedEvent;
343
+ "mail.email.sent": MailEmailSentEvent;
344
+ "mail.label.applied": MailLabelAppliedEvent;
345
+ "calendar.event.created": CalendarEventCreatedEvent;
346
+ "calendar.event.updated": CalendarEventUpdatedEvent;
347
+ "calendar.event.canceled": CalendarEventCanceledEvent;
348
+ "notion.page.created": NotionPageCreatedEvent;
349
+ "notion.page.updated": NotionPageUpdatedEvent;
350
+ "notion.page.deleted": NotionPageDeletedEvent;
351
+ "notion.meetingNote.summary.completed": NotionMeetingNoteSummaryCompletedEvent;
352
+ "notion.page.discussion.comment.added": NotionCommentAddedEvent;
353
+ "notion.agent.mentioned": NotionAgentMentionedEvent;
354
+ "notion.button.pressed": NotionButtonPressedEvent;
355
+ "notion.database.agent.updated": NotionDatabaseAgentUpdatedEvent;
356
+ "webhooks.webhook": WebhookEvent;
357
+ "googleDriveOauth.filesChanged": GoogleDriveOauthFilesChangedEvent;
358
+ recurrence: RecurrenceEvent;
359
+ };
360
+ /** All trigger type strings. Derived from TriggerEventMap. */
361
+ export type TriggerType = keyof TriggerEventMap;
362
+ /** Discriminated union of all trigger events. Derived from TriggerEventMap. */
363
+ export type TriggerEvent = TriggerEventMap[TriggerType];
364
+ export {};
365
+ //# sourceMappingURL=triggers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"triggers.d.ts","sourceRoot":"","sources":["../src/triggers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAMH,2EAA2E;AAC3E,MAAM,MAAM,gBAAgB,GAAG;IAC9B,CAAC,GAAG,EAAE,KAAK,MAAM,EAAE,GAAG,OAAO,CAAA;CAC7B,CAAA;AAMD,8CAA8C;AAC9C,MAAM,MAAM,WAAW,GAAG;IACzB,OAAO,EAAE,MAAM,CAAA;CACf,CAAA;AAED,6CAA6C;AAC7C,MAAM,MAAM,SAAS,GAAG;IACvB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;CACnB,CAAA;AAED,2BAA2B;AAC3B,MAAM,MAAM,QAAQ,GAAG;IACtB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;CAClB,CAAA;AAED,uBAAuB;AACvB,MAAM,MA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AsB,CAAA;IAC7C,qBAAqB,EAAE,sBAAsB,CAAA;IAC7C,sCAAsC,EAAE,sCAAsC,CAAA;IAC9E,sCAAsC,EAAE,uBAAuB,CAAA;IAC/D,wBAAwB,EAAE,yBAAyB,CAAA;IACnD,uBAAuB,EAAE,wBAAwB,CAAA;IACjD,+BAA+B,EAAE,+BAA+B,CAAA;IAChE,kBAAkB,EAAE,YAAY,CAAA;IAChC,+BAA+B,EAAE,iCAAiC,CAAA;IAClE,UAAU,EAAE,eAAe,CAAA;CAC3B,CAAA;AAED,8DAA8D;AAC9D,MAAM,MAAM,WAAW,GAAG,MAAM,eAAe,CAAA;AAE/C,+EAA+E;AAC/E,MAAM,MAAM,YAAY,GAAG,eAAe,CAAC,WAAW,CAAC,CAAA"}
@@ -0,0 +1,246 @@
1
+ import type { CalendarEventCanceledEvent, CalendarEventCreatedEvent, CalendarEventUpdatedEvent, DiscordInteractionEvent, GoogleDriveOauthFilesChangedEvent, MailEmailReceivedEvent, MailEmailSentEvent, MailLabelAppliedEvent, NotionAgentMentionedEvent, NotionButtonPressedEvent, NotionCommentAddedEvent, NotionDatabaseAgentUpdatedEvent, NotionMeetingNoteSummaryCompletedEvent, NotionPageCreatedEvent, NotionPageDeletedEvent, NotionPageUpdatedEvent, RecurrenceEvent, SlackAppMentionEvent, SlackMessageEvent, SlackReactionAddedEvent, WebhookEvent } from "./triggers.js";
2
+ 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 "./triggers.js";
3
+ /** A message was posted in a subscribed Slack channel. */
4
+ export type SlackMessageTrigger = {
5
+ type: "slack.message";
6
+ };
7
+ /** A reaction was added to a Slack message. */
8
+ export type SlackReactionAddedTrigger = {
9
+ type: "slack.reaction.added";
10
+ };
11
+ /** The Notion app was mentioned in a Slack message. */
12
+ export type SlackAppMentionTrigger = {
13
+ type: "slack.app.mention";
14
+ };
15
+ /** A Discord interaction was received. */
16
+ export type DiscordInteractionTrigger = {
17
+ type: "discord.interaction";
18
+ };
19
+ /** An email was received. */
20
+ export type MailEmailReceivedTrigger = {
21
+ type: "mail.email.received";
22
+ };
23
+ /** An email was sent. */
24
+ export type MailEmailSentTrigger = {
25
+ type: "mail.email.sent";
26
+ };
27
+ /** A label was applied to an email. */
28
+ export type MailLabelAppliedTrigger = {
29
+ type: "mail.label.applied";
30
+ };
31
+ /** A calendar event was created. */
32
+ export type CalendarEventCreatedTrigger = {
33
+ type: "calendar.event.created";
34
+ };
35
+ /** A calendar event was updated. */
36
+ export type CalendarEventUpdatedTrigger = {
37
+ type: "calendar.event.updated";
38
+ };
39
+ /** A calendar event was canceled. */
40
+ export type CalendarEventCanceledTrigger = {
41
+ type: "calendar.event.canceled";
42
+ };
43
+ /** A page has been added to a database. */
44
+ export type NotionPageCreatedTrigger = {
45
+ type: "notion.page.created";
46
+ };
47
+ /** A page was updated. */
48
+ export type NotionPageUpdatedTrigger = {
49
+ type: "notion.page.updated";
50
+ };
51
+ /** A page was deleted. */
52
+ export type NotionPageDeletedTrigger = {
53
+ type: "notion.page.deleted";
54
+ };
55
+ /** A meeting note's AI summary finished generating. */
56
+ export type NotionMeetingNoteSummaryCompletedTrigger = {
57
+ type: "notion.meetingNote.summary.completed";
58
+ };
59
+ /** A comment was added to a page discussion. */
60
+ export type NotionCommentAddedTrigger = {
61
+ type: "notion.page.discussion.comment.added";
62
+ };
63
+ /** An agent was mentioned in page content or a person property. */
64
+ export type NotionAgentMentionedTrigger = {
65
+ type: "notion.agent.mentioned";
66
+ };
67
+ /** A button block was pressed. */
68
+ export type NotionButtonPressedTrigger = {
69
+ type: "notion.button.pressed";
70
+ };
71
+ /** A database agent's configuration was updated. */
72
+ export type NotionDatabaseAgentUpdatedTrigger = {
73
+ type: "notion.database.agent.updated";
74
+ };
75
+ /** An incoming webhook request was received. */
76
+ export type WebhookTrigger = {
77
+ type: "webhooks.webhook";
78
+ };
79
+ /** Files changed in a watched Google Drive folder or drive. */
80
+ export type GoogleDriveOauthFilesChangedTrigger = {
81
+ type: "googleDriveOauth.filesChanged";
82
+ };
83
+ /** A recurring schedule fired. */
84
+ export type RecurrenceTrigger = {
85
+ type: "recurrence";
86
+ };
87
+ /** Creators for each event that can trigger a workflow. */
88
+ export declare const triggers: {
89
+ /**
90
+ * Declare that a workflow can run on `slack.message` events.
91
+ *
92
+ * A message was posted in a subscribed Slack channel.
93
+ */
94
+ readonly slackMessage: () => SlackMessageTrigger;
95
+ /**
96
+ * Declare that a workflow can run on `slack.reaction.added` events.
97
+ *
98
+ * A reaction was added to a Slack message.
99
+ */
100
+ readonly slackReactionAdded: () => SlackReactionAddedTrigger;
101
+ /**
102
+ * Declare that a workflow can run on `slack.app.mention` events.
103
+ *
104
+ * The Notion app was mentioned in a Slack message.
105
+ */
106
+ readonly slackAppMention: () => SlackAppMentionTrigger;
107
+ /**
108
+ * Declare that a workflow can run on `discord.interaction` events.
109
+ *
110
+ * A Discord interaction was received.
111
+ */
112
+ readonly discordInteraction: () => DiscordInteractionTrigger;
113
+ /**
114
+ * Declare that a workflow can run on `mail.email.received` events.
115
+ *
116
+ * An email was received.
117
+ */
118
+ readonly mailEmailReceived: () => MailEmailReceivedTrigger;
119
+ /**
120
+ * Declare that a workflow can run on `mail.email.sent` events.
121
+ *
122
+ * An email was sent.
123
+ */
124
+ readonly mailEmailSent: () => MailEmailSentTrigger;
125
+ /**
126
+ * Declare that a workflow can run on `mail.label.applied` events.
127
+ *
128
+ * A label was applied to an email.
129
+ */
130
+ readonly mailLabelApplied: () => MailLabelAppliedTrigger;
131
+ /**
132
+ * Declare that a workflow can run on `calendar.event.created` events.
133
+ *
134
+ * A calendar event was created.
135
+ */
136
+ readonly calendarEventCreated: () => CalendarEventCreatedTrigger;
137
+ /**
138
+ * Declare that a workflow can run on `calendar.event.updated` events.
139
+ *
140
+ * A calendar event was updated.
141
+ */
142
+ readonly calendarEventUpdated: () => CalendarEventUpdatedTrigger;
143
+ /**
144
+ * Declare that a workflow can run on `calendar.event.canceled` events.
145
+ *
146
+ * A calendar event was canceled.
147
+ */
148
+ readonly calendarEventCanceled: () => CalendarEventCanceledTrigger;
149
+ /**
150
+ * Declare that a workflow can run on `notion.page.created` events.
151
+ *
152
+ * A page has been added to a database.
153
+ */
154
+ readonly notionPageCreated: () => NotionPageCreatedTrigger;
155
+ /**
156
+ * Declare that a workflow can run on `notion.page.updated` events.
157
+ *
158
+ * A page was updated.
159
+ */
160
+ readonly notionPageUpdated: () => NotionPageUpdatedTrigger;
161
+ /**
162
+ * Declare that a workflow can run on `notion.page.deleted` events.
163
+ *
164
+ * A page was deleted.
165
+ */
166
+ readonly notionPageDeleted: () => NotionPageDeletedTrigger;
167
+ /**
168
+ * Declare that a workflow can run on `notion.meetingNote.summary.completed` events.
169
+ *
170
+ * A meeting note's AI summary finished generating.
171
+ */
172
+ readonly notionMeetingNoteSummaryCompleted: () => NotionMeetingNoteSummaryCompletedTrigger;
173
+ /**
174
+ * Declare that a workflow can run on `notion.page.discussion.comment.added` events.
175
+ *
176
+ * A comment was added to a page discussion.
177
+ */
178
+ readonly notionCommentAdded: () => NotionCommentAddedTrigger;
179
+ /**
180
+ * Declare that a workflow can run on `notion.agent.mentioned` events.
181
+ *
182
+ * An agent was mentioned in page content or a person property.
183
+ */
184
+ readonly notionAgentMentioned: () => NotionAgentMentionedTrigger;
185
+ /**
186
+ * Declare that a workflow can run on `notion.button.pressed` events.
187
+ *
188
+ * A button block was pressed.
189
+ */
190
+ readonly notionButtonPressed: () => NotionButtonPressedTrigger;
191
+ /**
192
+ * Declare that a workflow can run on `notion.database.agent.updated` events.
193
+ *
194
+ * A database agent's configuration was updated.
195
+ */
196
+ readonly notionDatabaseAgentUpdated: () => NotionDatabaseAgentUpdatedTrigger;
197
+ /**
198
+ * Declare that a workflow can run on `webhooks.webhook` events.
199
+ *
200
+ * An incoming webhook request was received.
201
+ */
202
+ readonly webhook: () => WebhookTrigger;
203
+ /**
204
+ * Declare that a workflow can run on `googleDriveOauth.filesChanged` events.
205
+ *
206
+ * Files changed in a watched Google Drive folder or drive.
207
+ */
208
+ readonly googleDriveOauthFilesChanged: () => GoogleDriveOauthFilesChangedTrigger;
209
+ /**
210
+ * Declare that a workflow can run on `recurrence` events.
211
+ *
212
+ * A recurring schedule fired.
213
+ */
214
+ readonly recurrence: () => RecurrenceTrigger;
215
+ };
216
+ /** Event that can trigger a workflow. */
217
+ export type WorkflowTrigger = SlackMessageTrigger | SlackReactionAddedTrigger | SlackAppMentionTrigger | DiscordInteractionTrigger | MailEmailReceivedTrigger | MailEmailSentTrigger | MailLabelAppliedTrigger | CalendarEventCreatedTrigger | CalendarEventUpdatedTrigger | CalendarEventCanceledTrigger | NotionPageCreatedTrigger | NotionPageUpdatedTrigger | NotionPageDeletedTrigger | NotionMeetingNoteSummaryCompletedTrigger | NotionCommentAddedTrigger | NotionAgentMentionedTrigger | NotionButtonPressedTrigger | NotionDatabaseAgentUpdatedTrigger | WebhookTrigger | GoogleDriveOauthFilesChangedTrigger | RecurrenceTrigger;
218
+ /** All workflow trigger type strings. */
219
+ export declare const WORKFLOW_TRIGGER_TYPES: readonly ["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"];
220
+ /** A workflow trigger type string. */
221
+ export type WorkflowTriggerType = (typeof WORKFLOW_TRIGGER_TYPES)[number];
222
+ /** Maps each supported workflow trigger to the event its handler receives. */
223
+ export type WorkflowEventMap = {
224
+ "slack.message": SlackMessageEvent;
225
+ "slack.reaction.added": SlackReactionAddedEvent;
226
+ "slack.app.mention": SlackAppMentionEvent;
227
+ "discord.interaction": DiscordInteractionEvent;
228
+ "mail.email.received": MailEmailReceivedEvent;
229
+ "mail.email.sent": MailEmailSentEvent;
230
+ "mail.label.applied": MailLabelAppliedEvent;
231
+ "calendar.event.created": CalendarEventCreatedEvent;
232
+ "calendar.event.updated": CalendarEventUpdatedEvent;
233
+ "calendar.event.canceled": CalendarEventCanceledEvent;
234
+ "notion.page.created": NotionPageCreatedEvent;
235
+ "notion.page.updated": NotionPageUpdatedEvent;
236
+ "notion.page.deleted": NotionPageDeletedEvent;
237
+ "notion.meetingNote.summary.completed": NotionMeetingNoteSummaryCompletedEvent;
238
+ "notion.page.discussion.comment.added": NotionCommentAddedEvent;
239
+ "notion.agent.mentioned": NotionAgentMentionedEvent;
240
+ "notion.button.pressed": NotionButtonPressedEvent;
241
+ "notion.database.agent.updated": NotionDatabaseAgentUpdatedEvent;
242
+ "webhooks.webhook": WebhookEvent;
243
+ "googleDriveOauth.filesChanged": GoogleDriveOauthFilesChangedEvent;
244
+ recurrence: RecurrenceEvent;
245
+ };
246
+ //# sourceMappingURL=triggers.generated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"triggers.generated.d.ts","sourceRoot":"","sources":["../src/triggers.generated.ts"],"names":[],"mappings":"AAGA,OAAO,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