@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,279 @@
1
+ import type { ConnectionActionInvoker } from "./connection-actions.js";
2
+ /**
3
+ * Script input for the "Add Discord reaction" effect (`discord.addReaction`),
4
+ * derived from its Tool Core definition's call_function input projection.
5
+ *
6
+ * Add a reaction to a Discord message
7
+ */
8
+ export type AddReactionScriptInput = {
9
+ /**
10
+ * The Discord channel ID containing the message.
11
+ */
12
+ channelId: string;
13
+ /**
14
+ * The Discord message ID to react to.
15
+ */
16
+ messageId: string;
17
+ /**
18
+ * The emoji to react with. Use Unicode emoji (e.g. "👍") or custom emoji in the format "name:id" (e.g. "notionlogo:123456789").
19
+ */
20
+ emoji: string;
21
+ };
22
+ /**
23
+ * Canonical Tool Core output for the "Add Discord reaction" effect (`discord.addReaction`).
24
+ * This is the definition's output schema; the effect's script surface may
25
+ * re-encode it before returning.
26
+ */
27
+ export type AddReactionScriptOutput = Record<string, never>;
28
+ /**
29
+ * Script input for the "Get recent Discord channel messages" effect (`discord.getRecentChannelMessages`),
30
+ * derived from its Tool Core definition's call_function input projection.
31
+ *
32
+ * Get recent messages from a Discord channel
33
+ */
34
+ export type GetRecentChannelMessagesScriptInput = {
35
+ /**
36
+ * The Discord channel ID to read messages from.
37
+ */
38
+ channelId: string;
39
+ /**
40
+ * Number of messages to retrieve (1-50, default 25).
41
+ */
42
+ limit?: number;
43
+ };
44
+ /**
45
+ * Canonical Tool Core output for the "Get recent Discord channel messages" effect (`discord.getRecentChannelMessages`).
46
+ * This is the definition's output schema; the effect's script surface may
47
+ * re-encode it before returning.
48
+ */
49
+ export type GetRecentChannelMessagesScriptOutput = Array<{
50
+ /**
51
+ * The Discord message ID (snowflake).
52
+ */
53
+ id: string;
54
+ /**
55
+ * The Discord channel ID containing the message.
56
+ */
57
+ channelId: string;
58
+ /**
59
+ * The Discord guild (server) ID.
60
+ */
61
+ guildId: string;
62
+ /**
63
+ * The Discord markdown message content.
64
+ */
65
+ content: string;
66
+ /**
67
+ * Whether the message was sent by the bot.
68
+ */
69
+ fromBot: boolean;
70
+ /**
71
+ * The message timestamp in ISO 8601 format.
72
+ */
73
+ timestamp: string;
74
+ /**
75
+ * A user-navigable URL to the message.
76
+ */
77
+ url: string;
78
+ /**
79
+ * The channel name, when available.
80
+ */
81
+ channelName?: string;
82
+ }>;
83
+ /**
84
+ * Script input for the "List Discord channels" effect (`discord.listChannels`),
85
+ * derived from its Tool Core definition's call_function input projection.
86
+ *
87
+ * List text channels in the Discord server
88
+ */
89
+ export type ListChannelsScriptInput = Record<string, never>;
90
+ /**
91
+ * Canonical Tool Core output for the "List Discord channels" effect (`discord.listChannels`).
92
+ * This is the definition's output schema; the effect's script surface may
93
+ * re-encode it before returning.
94
+ */
95
+ export type ListChannelsScriptOutput = Array<{
96
+ /**
97
+ * The Discord channel ID (snowflake).
98
+ */
99
+ id: string;
100
+ /**
101
+ * The channel name.
102
+ */
103
+ name: string;
104
+ /**
105
+ * The channel type: "text", "announcement", "forum", or "media".
106
+ */
107
+ type: string;
108
+ }>;
109
+ /**
110
+ * Script input for the "Remove Discord reaction" effect (`discord.removeReaction`),
111
+ * derived from its Tool Core definition's call_function input projection.
112
+ *
113
+ * Remove a reaction from a Discord message
114
+ */
115
+ export type RemoveReactionScriptInput = {
116
+ /**
117
+ * The Discord channel ID containing the message.
118
+ */
119
+ channelId: string;
120
+ /**
121
+ * The Discord message ID to remove the reaction from.
122
+ */
123
+ messageId: string;
124
+ /**
125
+ * The emoji to remove. Use Unicode emoji (e.g. "👍") or custom emoji in the format "name:id" (e.g. "notionlogo:123456789").
126
+ */
127
+ emoji: string;
128
+ };
129
+ /**
130
+ * Canonical Tool Core output for the "Remove Discord reaction" effect (`discord.removeReaction`).
131
+ * This is the definition's output schema; the effect's script surface may
132
+ * re-encode it before returning.
133
+ */
134
+ export type RemoveReactionScriptOutput = Record<string, never>;
135
+ /**
136
+ * Script input for the "Send Discord channel message" effect (`discord.sendMessageToChannel`),
137
+ * derived from its Tool Core definition's call_function input projection.
138
+ *
139
+ * Send a new message to a Discord channel
140
+ */
141
+ export type SendMessageToChannelScriptInput = {
142
+ /**
143
+ * The Discord channel ID (snowflake) to send the message to.
144
+ */
145
+ channelId: string;
146
+ /**
147
+ * ## Follow these guidelines when sending Discord messages:
148
+ * **Response Length:**
149
+ * - Keep responses to 1-2 short sentences maximum
150
+ * - No long paragraphs or blocks of text
151
+ * - Break longer content into bullets or line breaks
152
+ * - Every response must be instantly scannable
153
+ *
154
+ * **Tone:**
155
+ * - Write like a friendly human co-worker
156
+ * - Be concise and direct
157
+ *
158
+ * **Formatting:**
159
+ * - Use standard Discord markdown
160
+ * - Use bullets for lists
161
+ * - Use **bold** for emphasis
162
+ * - Use line breaks for clarity
163
+ * - Emojis allowed sparingly for clarity or tone
164
+ *
165
+ * **Links:**
166
+ * - Always use markdown link syntax: [link text](url)
167
+ * - Never use raw URLs
168
+ */
169
+ content: string;
170
+ };
171
+ /**
172
+ * Canonical Tool Core output for the "Send Discord channel message" effect (`discord.sendMessageToChannel`).
173
+ * This is the definition's output schema; the effect's script surface may
174
+ * re-encode it before returning.
175
+ */
176
+ export type SendMessageToChannelScriptOutput = {
177
+ /**
178
+ * The Discord message ID (snowflake).
179
+ */
180
+ id: string;
181
+ /**
182
+ * The Discord channel ID containing the message.
183
+ */
184
+ channelId: string;
185
+ /**
186
+ * The Discord guild (server) ID.
187
+ */
188
+ guildId: string;
189
+ /**
190
+ * The Discord markdown message content.
191
+ */
192
+ content: string;
193
+ /**
194
+ * Whether the message was sent by the bot.
195
+ */
196
+ fromBot: boolean;
197
+ /**
198
+ * The message timestamp in ISO 8601 format.
199
+ */
200
+ timestamp: string;
201
+ /**
202
+ * A user-navigable URL to the message.
203
+ */
204
+ url: string;
205
+ /**
206
+ * The channel name, when available.
207
+ */
208
+ channelName?: string;
209
+ };
210
+ /**
211
+ * Script input for the "Update Discord message" effect (`discord.updateMessage`),
212
+ * derived from its Tool Core definition's call_function input projection.
213
+ *
214
+ * Update an existing Discord message
215
+ */
216
+ export type UpdateMessageScriptInput = {
217
+ /**
218
+ * The Discord channel ID containing the message.
219
+ */
220
+ channelId: string;
221
+ /**
222
+ * The Discord message ID to update.
223
+ */
224
+ messageId: string;
225
+ /**
226
+ * The new content for the message (Discord markdown).
227
+ */
228
+ content: string;
229
+ };
230
+ /**
231
+ * Canonical Tool Core output for the "Update Discord message" effect (`discord.updateMessage`).
232
+ * This is the definition's output schema; the effect's script surface may
233
+ * re-encode it before returning.
234
+ */
235
+ export type UpdateMessageScriptOutput = {
236
+ /**
237
+ * The Discord message ID (snowflake).
238
+ */
239
+ id: string;
240
+ /**
241
+ * The Discord channel ID containing the message.
242
+ */
243
+ channelId: string;
244
+ /**
245
+ * The Discord guild (server) ID.
246
+ */
247
+ guildId: string;
248
+ /**
249
+ * The Discord markdown message content.
250
+ */
251
+ content: string;
252
+ /**
253
+ * Whether the message was sent by the bot.
254
+ */
255
+ fromBot: boolean;
256
+ /**
257
+ * The message timestamp in ISO 8601 format.
258
+ */
259
+ timestamp: string;
260
+ /**
261
+ * A user-navigable URL to the message.
262
+ */
263
+ url: string;
264
+ /**
265
+ * The channel name, when available.
266
+ */
267
+ channelName?: string;
268
+ };
269
+ export declare class DiscordConnectionClient {
270
+ private readonly invoke;
271
+ constructor(invoke: ConnectionActionInvoker);
272
+ addReaction(args: AddReactionScriptInput): Promise<AddReactionScriptOutput>;
273
+ getRecentChannelMessages(args: GetRecentChannelMessagesScriptInput): Promise<GetRecentChannelMessagesScriptOutput>;
274
+ listChannels(args: ListChannelsScriptInput): Promise<ListChannelsScriptOutput>;
275
+ removeReaction(args: RemoveReactionScriptInput): Promise<RemoveReactionScriptOutput>;
276
+ sendMessageToChannel(args: SendMessageToChannelScriptInput): Promise<SendMessageToChannelScriptOutput>;
277
+ updateMessage(args: UpdateMessageScriptInput): Promise<UpdateMessageScriptOutput>;
278
+ }
279
+ //# sourceMappingURL=discord.generated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discord.generated.d.ts","sourceRoot":"","sources":["../src/discord.generated.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AACtE;;;;;GAKG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACpC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;CACb,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AAE3D;;;;;GAKG;AACH,MAAM,MAAM,mCAAmC,GAAG;IACjD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,oCAAoC,GAAG,KAAK,CAAC;IACxD;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,OAAO,EAAE,OAAO,CAAA;IAChB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;CACpB,CAAC,CAAA;AAEF;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,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AA;AAED;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACvC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,OAAO,EAAE,OAAO,CAAA;IAChB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,qBAAa,uBAAuB;IACvB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,uBAAuB;IAC5D,WAAW,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAG3E,wBAAwB,CACvB,IAAI,EAAE,mCAAmC,GACvC,OAAO,CAAC,oCAAoC,CAAC;IAMhD,YAAY,CACX,IAAI,EAAE,uBAAuB,GAC3B,OAAO,CAAC,wBAAwB,CAAC;IAGpC,cAAc,CACb,IAAI,EAAE,yBAAyB,GAC7B,OAAO,CAAC,0BAA0B,CAAC;IAGtC,oBAAoB,CACnB,IAAI,EAAE,+BAA+B,GACnC,OAAO,CAAC,gCAAgC,CAAC;IAM5C,aAAa,CACZ,IAAI,EAAE,wBAAwB,GAC5B,OAAO,CAAC,yBAAyB,CAAC;CAGrC"}
@@ -0,0 +1,33 @@
1
+ class DiscordConnectionClient {
2
+ constructor(invoke) {
3
+ this.invoke = invoke;
4
+ }
5
+ invoke;
6
+ addReaction(args) {
7
+ return this.invoke("addReaction", args);
8
+ }
9
+ getRecentChannelMessages(args) {
10
+ return this.invoke(
11
+ "getRecentChannelMessages",
12
+ args
13
+ );
14
+ }
15
+ listChannels(args) {
16
+ return this.invoke("listChannels", args);
17
+ }
18
+ removeReaction(args) {
19
+ return this.invoke("removeReaction", args);
20
+ }
21
+ sendMessageToChannel(args) {
22
+ return this.invoke(
23
+ "sendMessageToChannel",
24
+ args
25
+ );
26
+ }
27
+ updateMessage(args) {
28
+ return this.invoke("updateMessage", args);
29
+ }
30
+ }
31
+ export {
32
+ DiscordConnectionClient
33
+ };
@@ -0,0 +1,184 @@
1
+ import type { ConnectionActionInvoker } from "./connection-actions.js";
2
+ /**
3
+ * Script input for the "Load Gmail thread" effect (`gmail.loadThread`),
4
+ * derived from its Tool Core definition's call_function input projection.
5
+ *
6
+ * Load a Gmail thread.
7
+ */
8
+ export type LoadThreadScriptInput = {
9
+ /**
10
+ * Gmail thread ID.
11
+ */
12
+ threadId?: string;
13
+ /**
14
+ * Gmail thread URL or gmail:// connector href.
15
+ */
16
+ url?: string;
17
+ };
18
+ /**
19
+ * Canonical Tool Core output for the "Load Gmail thread" effect (`gmail.loadThread`).
20
+ * This is the definition's output schema; the effect's script surface may
21
+ * re-encode it before returning.
22
+ */
23
+ export type LoadThreadScriptOutput = {
24
+ type: "gmail";
25
+ threadId: string;
26
+ subject: string;
27
+ messages: Array<{
28
+ messageId: string;
29
+ user: {
30
+ name: string;
31
+ notionUserId?: string;
32
+ notionUserName?: string;
33
+ };
34
+ text: string;
35
+ subject?: string;
36
+ timestamp: number;
37
+ attachments?: Array<{
38
+ attachmentId?: string;
39
+ filename: string;
40
+ mimeType: string;
41
+ sizeBytes: number;
42
+ inline: boolean;
43
+ }>;
44
+ }>;
45
+ timestamp: number;
46
+ };
47
+ /**
48
+ * Script input for the "Query Gmail" effect (`gmail.query`),
49
+ * derived from its Tool Core definition's call_function input projection.
50
+ *
51
+ * Query Gmail threads with structured parameters.
52
+ */
53
+ export type QueryScriptInput = {
54
+ /**
55
+ * Gmail search query string (from:, to:, subject:, after:, before:, has:attachment, is:unread, etc.).
56
+ */
57
+ q?: string;
58
+ /**
59
+ * Maximum number of threads to return (default: 20, max: 100).
60
+ */
61
+ maxResults?: number;
62
+ };
63
+ /**
64
+ * Canonical Tool Core output for the "Query Gmail" effect (`gmail.query`).
65
+ * This is the definition's output schema; the effect's script surface may
66
+ * re-encode it before returning.
67
+ */
68
+ export type QueryScriptOutput = {
69
+ threads: Array<{
70
+ type: "gmail";
71
+ threadId: string;
72
+ subject: string;
73
+ messages: Array<{
74
+ messageId: string;
75
+ user: {
76
+ name: string;
77
+ notionUserId?: string;
78
+ notionUserName?: string;
79
+ };
80
+ text: string;
81
+ subject?: string;
82
+ timestamp: number;
83
+ attachments?: Array<{
84
+ attachmentId?: string;
85
+ filename: string;
86
+ mimeType: string;
87
+ sizeBytes: number;
88
+ inline: boolean;
89
+ }>;
90
+ }>;
91
+ timestamp: number;
92
+ }>;
93
+ };
94
+ /**
95
+ * Script input for the "Read Gmail attachment" effect (`gmail.readAttachment`),
96
+ * derived from its Tool Core definition's call_function input projection.
97
+ *
98
+ * Read a Gmail attachment.
99
+ */
100
+ export type ReadAttachmentScriptInput = {
101
+ /**
102
+ * Gmail message ID from loadThread.
103
+ */
104
+ messageId: string;
105
+ /**
106
+ * Optional attachment filename from loadThread. Useful as a fallback when an attachmentId is unavailable.
107
+ */
108
+ filename?: string;
109
+ /**
110
+ * Optional Gmail attachment ID from loadThread. Use it when present to target a specific attachment.
111
+ */
112
+ attachmentId?: string;
113
+ };
114
+ /**
115
+ * Canonical Tool Core output for the "Read Gmail attachment" effect (`gmail.readAttachment`).
116
+ * This is the definition's output schema; the effect's script surface may
117
+ * re-encode it before returning.
118
+ */
119
+ export type ReadAttachmentScriptOutput = {
120
+ type: "gmail";
121
+ items: Array<{
122
+ attachmentId?: string;
123
+ filename: string;
124
+ mimeType: string;
125
+ sizeBytes: number;
126
+ inline: boolean;
127
+ contentType: "attachment";
128
+ message: string;
129
+ } | {
130
+ attachmentId?: string;
131
+ filename: string;
132
+ mimeType: string;
133
+ sizeBytes: number;
134
+ inline: boolean;
135
+ contentType: "text";
136
+ text: string;
137
+ } | {
138
+ attachmentId?: string;
139
+ filename: string;
140
+ mimeType: string;
141
+ sizeBytes: number;
142
+ inline: boolean;
143
+ contentType: "unsupported";
144
+ message: string;
145
+ }>;
146
+ };
147
+ /**
148
+ * Script input for the "Search Gmail" effect (`gmail.search`),
149
+ * derived from its Tool Core definition's call_function input projection.
150
+ *
151
+ * Search Gmail via the configured connector.
152
+ */
153
+ export type SearchScriptInput = {
154
+ /**
155
+ * Search query for Gmail.
156
+ */
157
+ query: string;
158
+ };
159
+ /**
160
+ * Canonical Tool Core output for the "Search Gmail" effect (`gmail.search`).
161
+ * This is the definition's output schema; the effect's script surface may
162
+ * re-encode it before returning.
163
+ */
164
+ export type SearchScriptOutput = {
165
+ results: Array<{
166
+ id: string;
167
+ title: string;
168
+ path: string;
169
+ text: string;
170
+ lastEdited: string;
171
+ isPrivate: boolean;
172
+ pageId: string;
173
+ emailAddress: string;
174
+ }>;
175
+ };
176
+ export declare class GmailConnectionClient {
177
+ private readonly invoke;
178
+ constructor(invoke: ConnectionActionInvoker);
179
+ loadThread(args: LoadThreadScriptInput): Promise<LoadThreadScriptOutput>;
180
+ query(args: QueryScriptInput): Promise<QueryScriptOutput>;
181
+ readAttachment(args: ReadAttachmentScriptInput): Promise<ReadAttachmentScriptOutput>;
182
+ search(args: SearchScriptInput): Promise<SearchScriptOutput>;
183
+ }
184
+ //# sourceMappingURL=gmail.generated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gmail.generated.d.ts","sourceRoot":"","sources":["../src/gmail.generated.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AACtE;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAAG;IACnC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;CACZ,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACpC,IAAI,EAAE,OAAO,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA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,CACH,CAAA;CACD,CAAA;AAED;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC/B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;CACb,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAChC,OAAO,EAAE,KAAK,CAAC;QACd,EAAE,EAAE,MAAM,CAAA;QACV,KAAK,EAAE,MAAM,CAAA;QACb,IAAI,EAAE,MAAM,CAAA;QACZ,IAAI,EAAE,MAAM,CAAA;QACZ,UAAU,EAAE,MAAM,CAAA;QAClB,SAAS,EAAE,OAAO,CAAA;QAClB,MAAM,EAAE,MAAM,CAAA;QACd,YAAY,EAAE,MAAM,CAAA;KACpB,CAAC,CAAA;CACF,CAAA;AAED,qBAAa,qBAAqB;IACrB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,uBAAuB;IAC5D,UAAU,CAAC,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAGxE,KAAK,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAGzD,cAAc,CACb,IAAI,EAAE,yBAAyB,GAC7B,OAAO,CAAC,0BAA0B,CAAC;IAGtC,MAAM,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAG5D"}
@@ -0,0 +1,21 @@
1
+ class GmailConnectionClient {
2
+ constructor(invoke) {
3
+ this.invoke = invoke;
4
+ }
5
+ invoke;
6
+ loadThread(args) {
7
+ return this.invoke("loadThread", args);
8
+ }
9
+ query(args) {
10
+ return this.invoke("query", args);
11
+ }
12
+ readAttachment(args) {
13
+ return this.invoke("readAttachment", args);
14
+ }
15
+ search(args) {
16
+ return this.invoke("search", args);
17
+ }
18
+ }
19
+ export {
20
+ GmailConnectionClient
21
+ };
@@ -0,0 +1,83 @@
1
+ import type { ConnectionActionInvoker } from "./connection-actions.js";
2
+ /**
3
+ * Script input for the "Query Google Calendar connector" effect (`googleCalendar.query`),
4
+ * derived from its Tool Core definition's call_function input projection.
5
+ *
6
+ * Query Google Calendar events.
7
+ */
8
+ export type QueryScriptInput = {
9
+ /**
10
+ * Search query to filter events by text (title, description, location, attendees).
11
+ */
12
+ q?: string;
13
+ /**
14
+ * Lower bound (inclusive) for event start time in ISO 8601 format.
15
+ */
16
+ timeMin?: string;
17
+ /**
18
+ * Upper bound (exclusive) for event start time in ISO 8601 format.
19
+ */
20
+ timeMax?: string;
21
+ /**
22
+ * Maximum number of events to return (default: 50, max: 250).
23
+ */
24
+ maxResults?: number;
25
+ };
26
+ /**
27
+ * Canonical Tool Core output for the "Query Google Calendar connector" effect (`googleCalendar.query`).
28
+ * This is the definition's output schema; the effect's script surface may
29
+ * re-encode it before returning.
30
+ */
31
+ export type QueryScriptOutput = {
32
+ events: Array<{
33
+ id: string;
34
+ title: string;
35
+ text: string;
36
+ start?: string;
37
+ end?: string;
38
+ location?: string;
39
+ url?: string;
40
+ isRecurring: boolean;
41
+ attendees?: Array<{
42
+ name?: string;
43
+ email?: string;
44
+ responseStatus?: "accepted" | "declined" | "tentative" | "noResponse" | "unknown";
45
+ }>;
46
+ }>;
47
+ };
48
+ /**
49
+ * Script input for the "Search Google Calendar connector" effect (`googleCalendar.search`),
50
+ * derived from its Tool Core definition's call_function input projection.
51
+ *
52
+ * Search Google Calendar via the configured connector.
53
+ */
54
+ export type SearchScriptInput = {
55
+ /**
56
+ * Search query for Google Calendar.
57
+ */
58
+ query: string;
59
+ };
60
+ /**
61
+ * Canonical Tool Core output for the "Search Google Calendar connector" effect (`googleCalendar.search`).
62
+ * This is the definition's output schema; the effect's script surface may
63
+ * re-encode it before returning.
64
+ */
65
+ export type SearchScriptOutput = {
66
+ results: Array<{
67
+ id: string;
68
+ title: string;
69
+ path: string;
70
+ text: string;
71
+ lastEdited: string;
72
+ pageId: string;
73
+ emailAddress: string;
74
+ isPrivate: boolean;
75
+ }>;
76
+ };
77
+ export declare class GoogleCalendarConnectionClient {
78
+ private readonly invoke;
79
+ constructor(invoke: ConnectionActionInvoker);
80
+ query(args: QueryScriptInput): Promise<QueryScriptOutput>;
81
+ search(args: SearchScriptInput): Promise<SearchScriptOutput>;
82
+ }
83
+ //# sourceMappingURL=googleCalendar.generated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"googleCalendar.generated.d.ts","sourceRoot":"","sources":["../src/googleCalendar.generated.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AACtE;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC9B;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,CAAA;IACV;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC/B,MAAM,EAAE,KAAK,CAAC;QACb,EAAE,EAAE,MAAM,CAAA;QACV,KAAK,EAAE,MAAM,CAAA;QACb,IAAI,EAAE,MAAM,CAAA;QACZ,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,GAAG,CAAC,EAAE,MAAM,CAAA;QACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,GAAG,CAAC,EAAE,MAAM,CAAA;QACZ,WAAW,EAAE,OAAO,CAAA;QACpB,SAAS,CAAC,EAAE,KAAK,CAAC;YACjB,IAAI,CAAC,EAAE,MAAM,CAAA;YACb,KAAK,CAAC,EAAE,MAAM,CAAA;YACd,cAAc,CAAC,EACZ,UAAU,GACV,UAAU,GACV,WAAW,GACX,YAAY,GACZ,SAAS,CAAA;SACZ,CAAC,CAAA;KACF,CAAC,CAAA;CACF,CAAA;AAED;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC/B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;CACb,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAChC,OAAO,EAAE,KAAK,CAAC;QACd,EAAE,EAAE,MAAM,CAAA;QACV,KAAK,EAAE,MAAM,CAAA;QACb,IAAI,EAAE,MAAM,CAAA;QACZ,IAAI,EAAE,MAAM,CAAA;QACZ,UAAU,EAAE,MAAM,CAAA;QAClB,MAAM,EAAE,MAAM,CAAA;QACd,YAAY,EAAE,MAAM,CAAA;QACpB,SAAS,EAAE,OAAO,CAAA;KAClB,CAAC,CAAA;CACF,CAAA;AAED,qBAAa,8BAA8B;IAC9B,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,uBAAuB;IAC5D,KAAK,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAGzD,MAAM,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAG5D"}
@@ -0,0 +1,15 @@
1
+ class GoogleCalendarConnectionClient {
2
+ constructor(invoke) {
3
+ this.invoke = invoke;
4
+ }
5
+ invoke;
6
+ query(args) {
7
+ return this.invoke("query", args);
8
+ }
9
+ search(args) {
10
+ return this.invoke("search", args);
11
+ }
12
+ }
13
+ export {
14
+ GoogleCalendarConnectionClient
15
+ };