@notionhq/apps 0.0.37 → 0.0.39

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.
@@ -25,8 +25,6 @@ export declare const connections: {
25
25
  cursor: () => WorkflowConnection<"cursor">;
26
26
  box: () => WorkflowConnection<"box">;
27
27
  confluence: () => WorkflowConnection<"confluence">;
28
- gmail: () => WorkflowConnection<"gmail">;
29
- googleCalendar: () => WorkflowConnection<"googleCalendar">;
30
28
  googleDrive: () => WorkflowConnection<"googleDrive">;
31
29
  outlook: () => WorkflowConnection<"outlook">;
32
30
  salesforce: () => WorkflowConnection<"salesforce">;
@@ -1 +1 @@
1
- {"version":3,"file":"connections.d.ts","sourceRoot":"","sources":["../src/connections.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAIjF,OAAO,EAGN,KAAK,iBAAiB,EACtB,MAAM,0BAA0B,CAAC;AAGlC,6EAA6E;AAC7E,MAAM,MAAM,kBAAkB,CAAC,SAAS,SAAS,MAAM,GAAG,MAAM,IAAI;IACnE,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,CAAC,EAAE,kBAAkB,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC;AAE1F,uEAAuE;AACvE,MAAM,MAAM,6BAA6B,GAAG,kBAAkB,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjF,yDAAyD;AACzD,MAAM,MAAM,sBAAsB,CACjC,YAAY,SAAS,8BAA8B,EACnD,SAAS,SAAS,MAAM,IACrB,OAAO,CACV;KACE,IAAI,IAAI,MAAM,YAAY,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,SAAS,GAAG,IAAI,GAAG,KAAK;CACzF,CAAC,MAAM,YAAY,CAAC,EACrB,M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AS,MAAM,IACrB,OAAO,CACV;KACE,IAAI,IAAI,MAAM,YAAY,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,SAAS,GAAG,IAAI,GAAG,KAAK;CACzF,CAAC,MAAM,YAAY,CAAC,EACrB,MAAM,CACN,CAAC;AAIF,2EAA2E;AAC3E,eAAO,MAAM,WAAW;mBAER,kBAAkB,GAAG,kBAAkB,CAAC,OAAO,CAAC;;;;;;;;;;;;CAI/D,CAAC;AACF,YAAY,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrD,MAAM,MAAM,eAAe,GAAG;IAAE,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;CAAE,CAAC;AAEjE,KAAK,yBAAyB,GAAG,iBAAiB,GAAG;IAAE,KAAK,EAAE,eAAe,CAAA;CAAE,CAAC;AAIhF,MAAM,MAAM,mBAAmB,CAC9B,YAAY,SAAS,8BAA8B,GAAG,8BAA8B,IACjF;IACH,QAAQ,EAAE,IAAI,IAAI,MAAM,YAAY,GAAG,yBAAyB,CAAC,OAAO,CACvE,MAAM,yBAAyB,EAC/B,YAAY,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAC1B,CAAC;CACF,CAAC"}
@@ -8,8 +8,6 @@ import { DiscordConnectionClient } from "./discord.generated.js";
8
8
  import { CursorConnectionClient } from "./cursor.generated.js";
9
9
  import { BoxConnectionClient } from "./box.generated.js";
10
10
  import { ConfluenceConnectionClient } from "./confluence.generated.js";
11
- import { GmailConnectionClient } from "./gmail.generated.js";
12
- import { GoogleCalendarConnectionClient } from "./googleCalendar.generated.js";
13
11
  import { GoogleDriveConnectionClient } from "./googleDrive.generated.js";
14
12
  import { OutlookConnectionClient } from "./outlook.generated.js";
15
13
  import { SalesforceConnectionClient } from "./salesforce.generated.js";
@@ -22,8 +20,6 @@ export declare const connections: {
22
20
  cursor: typeof cursor;
23
21
  box: typeof box;
24
22
  confluence: typeof confluence;
25
- gmail: typeof gmail;
26
- googleCalendar: typeof googleCalendar;
27
23
  googleDrive: typeof googleDrive;
28
24
  outlook: typeof outlook;
29
25
  salesforce: typeof salesforce;
@@ -37,8 +33,6 @@ export type ConnectionClients = {
37
33
  cursor: CursorConnectionClient;
38
34
  box: BoxConnectionClient;
39
35
  confluence: ConfluenceConnectionClient;
40
- gmail: GmailConnectionClient;
41
- googleCalendar: GoogleCalendarConnectionClient;
42
36
  googleDrive: GoogleDriveConnectionClient;
43
37
  outlook: OutlookConnectionClient;
44
38
  salesforce: SalesforceConnectionClient;
@@ -52,8 +46,6 @@ declare function discord(): WorkflowConnection<"discord">;
52
46
  declare function cursor(): WorkflowConnection<"cursor">;
53
47
  declare function box(): WorkflowConnection<"box">;
54
48
  declare function confluence(): WorkflowConnection<"confluence">;
55
- declare function gmail(): WorkflowConnection<"gmail">;
56
- declare function googleCalendar(): WorkflowConnection<"googleCalendar">;
57
49
  declare function googleDrive(): WorkflowConnection<"googleDrive">;
58
50
  declare function outlook(): WorkflowConnection<"outlook">;
59
51
  declare function salesforce(): WorkflowConnection<"salesforce">;
@@ -1 +1 @@
1
- {"version":3,"file":"providers.generated.d.ts","sourceRoot":"","sources":["../src/providers.generated.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AACtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAA;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,EAAE,gCAAgC,EAAE,MAAM,iCAAiC,CAAA;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAA;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,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AS,UAAU,IAAI,kBAAkB,CAAC,YAAY,CAAC,CAEtD"}
@@ -6,8 +6,6 @@ import { DiscordConnectionClient } from "./discord.generated.js";
6
6
  import { CursorConnectionClient } from "./cursor.generated.js";
7
7
  import { BoxConnectionClient } from "./box.generated.js";
8
8
  import { ConfluenceConnectionClient } from "./confluence.generated.js";
9
- import { GmailConnectionClient } from "./gmail.generated.js";
10
- import { GoogleCalendarConnectionClient } from "./googleCalendar.generated.js";
11
9
  import { GoogleDriveConnectionClient } from "./googleDrive.generated.js";
12
10
  import { OutlookConnectionClient } from "./outlook.generated.js";
13
11
  import { SalesforceConnectionClient } from "./salesforce.generated.js";
@@ -20,8 +18,6 @@ const connections = {
20
18
  cursor,
21
19
  box,
22
20
  confluence,
23
- gmail,
24
- googleCalendar,
25
21
  googleDrive,
26
22
  outlook,
27
23
  salesforce
@@ -44,10 +40,6 @@ function createConnectionClient(provider, invoker) {
44
40
  return new BoxConnectionClient(invoker);
45
41
  case "confluence":
46
42
  return new ConfluenceConnectionClient(invoker);
47
- case "gmail":
48
- return new GmailConnectionClient(invoker);
49
- case "googleCalendar":
50
- return new GoogleCalendarConnectionClient(invoker);
51
43
  case "googleDrive":
52
44
  return new GoogleDriveConnectionClient(invoker);
53
45
  case "outlook":
@@ -82,12 +74,6 @@ function box() {
82
74
  function confluence() {
83
75
  return { type: "confluence" };
84
76
  }
85
- function gmail() {
86
- return { type: "gmail" };
87
- }
88
- function googleCalendar() {
89
- return { type: "googleCalendar" };
90
- }
91
77
  function googleDrive() {
92
78
  return { type: "googleDrive" };
93
79
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@notionhq/apps",
3
- "version": "0.0.37",
3
+ "version": "0.0.39",
4
4
  "description": "An SDK for building workflow apps for Notion",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -8,6 +8,17 @@ user-invocable: false
8
8
 
9
9
  For calendar functionality, use only `connections.calendar`. Do not use another
10
10
  connection provider or connection as a calendar integration.
11
+ For Gmail mailboxes, use `connections.mail`.
12
+
13
+ Mail `searchEmails` takes the mailbox email and Gmail query syntax, not a
14
+ natural-language question. Check `isError` before reading the tool result and
15
+ use `pageToken` for pagination. Use `viewThreadContent` with
16
+ `mostRecentMessageOnly: false` when the whole thread is needed.
17
+
18
+ Calendar `listEvents` requires start and end times and a timezone; each range
19
+ must not exceed one month. The Calendar workflow client does not expose event
20
+ text search. Report that limit instead of inventing a method or scanning the
21
+ whole calendar.
11
22
 
12
23
  Import `{ workflow }` from `@notionhq/apps` and
13
24
  `connections` from `@notionhq/apps/workflow`. Connections are not root exports.
@@ -57,6 +57,20 @@ describe("connection requirements", () => {
57
57
  });
58
58
 
59
59
  describe("workflow connection runtime", () => {
60
+ it.each(["gmail", "googleCalendar"])(
61
+ "rejects a removed %s provider even with an existing binding",
62
+ (type) => {
63
+ vi.stubEnv(
64
+ "NOTION_CONNECTION_BINDINGS",
65
+ JSON.stringify([{ key: "legacy", type, id: "legacy-id" }]),
66
+ );
67
+ const runtime = createWorkflowConnections(new Client(), {
68
+ legacy: { type },
69
+ });
70
+ expect(() => runtime.legacy).toThrow(`Unsupported connection provider: ${type}`);
71
+ },
72
+ );
73
+
60
74
  it("uses the configured Mail binding and preserves pagination and tool results", async () => {
61
75
  vi.stubEnv(
62
76
  "NOTION_CONNECTION_BINDINGS",
@@ -9,8 +9,6 @@ import { DiscordConnectionClient } from "./discord.generated.js"
9
9
  import { CursorConnectionClient } from "./cursor.generated.js"
10
10
  import { BoxConnectionClient } from "./box.generated.js"
11
11
  import { ConfluenceConnectionClient } from "./confluence.generated.js"
12
- import { GmailConnectionClient } from "./gmail.generated.js"
13
- import { GoogleCalendarConnectionClient } from "./googleCalendar.generated.js"
14
12
  import { GoogleDriveConnectionClient } from "./googleDrive.generated.js"
15
13
  import { OutlookConnectionClient } from "./outlook.generated.js"
16
14
  import { SalesforceConnectionClient } from "./salesforce.generated.js"
@@ -23,8 +21,6 @@ export const connections = {
23
21
  cursor,
24
22
  box,
25
23
  confluence,
26
- gmail,
27
- googleCalendar,
28
24
  googleDrive,
29
25
  outlook,
30
26
  salesforce,
@@ -38,8 +34,6 @@ export type ConnectionClients = {
38
34
  cursor: CursorConnectionClient
39
35
  box: BoxConnectionClient
40
36
  confluence: ConfluenceConnectionClient
41
- gmail: GmailConnectionClient
42
- googleCalendar: GoogleCalendarConnectionClient
43
37
  googleDrive: GoogleDriveConnectionClient
44
38
  outlook: OutlookConnectionClient
45
39
  salesforce: SalesforceConnectionClient
@@ -65,10 +59,6 @@ export function createConnectionClient(
65
59
  return new BoxConnectionClient(invoker)
66
60
  case "confluence":
67
61
  return new ConfluenceConnectionClient(invoker)
68
- case "gmail":
69
- return new GmailConnectionClient(invoker)
70
- case "googleCalendar":
71
- return new GoogleCalendarConnectionClient(invoker)
72
62
  case "googleDrive":
73
63
  return new GoogleDriveConnectionClient(invoker)
74
64
  case "outlook":
@@ -103,12 +93,6 @@ function box(): WorkflowConnection<"box"> {
103
93
  function confluence(): WorkflowConnection<"confluence"> {
104
94
  return { type: "confluence" }
105
95
  }
106
- function gmail(): WorkflowConnection<"gmail"> {
107
- return { type: "gmail" }
108
- }
109
- function googleCalendar(): WorkflowConnection<"googleCalendar"> {
110
- return { type: "googleCalendar" }
111
- }
112
96
  function googleDrive(): WorkflowConnection<"googleDrive"> {
113
97
  return { type: "googleDrive" }
114
98
  }
@@ -1,184 +0,0 @@
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
@@ -1 +0,0 @@
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;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,KAAK,CAAC;QACf,SAAS,EAAE,MAAM,CAAA;QACjB,IAAI,EAAE;YACL,IAAI,EAAE,MAAM,CAAA;YACZ,YAAY,CAAC,EAAE,MAAM,CAAA;YACrB,cAAc,CAAC,EAAE,MAAM,CAAA;SACvB,CAAA;QACD,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,SAAS,EAAE,MAAM,CAAA;QACjB,WAAW,CAAC,EAAE,KAAK,CAAC;YACnB,YAAY,CAAC,EAAE,MAAM,CAAA;YACrB,QAAQ,EAAE,MAAM,CAAA;YAChB,QAAQ,EAAE,MAAM,CAAA;YAChB,SAAS,EAAE,MAAM,CAAA;YACjB,MAAM,EAAE,OAAO,CAAA;SACf,CAAC,CAAA;KACF,CAAC,CAAA;IACF,SAAS,EAAE,MAAM,CAAA;CACjB,CAAA;AAED;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC9B;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,CAAA;IACV;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,iBAAi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,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAG5D"}
@@ -1,21 +0,0 @@
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
- };
@@ -1,83 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,15 +0,0 @@
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
- };
@@ -1,205 +0,0 @@
1
- // Generated by notion tool-core codegen-script-types --connections. Do not edit.
2
- import type { ConnectionActionInvoker } from "./connection-actions.js"
3
- /**
4
- * Script input for the "Load Gmail thread" effect (`gmail.loadThread`),
5
- * derived from its Tool Core definition's call_function input projection.
6
- *
7
- * Load a Gmail thread.
8
- */
9
- export type LoadThreadScriptInput = {
10
- /**
11
- * Gmail thread ID.
12
- */
13
- threadId?: string
14
- /**
15
- * Gmail thread URL or gmail:// connector href.
16
- */
17
- url?: string
18
- }
19
-
20
- /**
21
- * Canonical Tool Core output for the "Load Gmail thread" effect (`gmail.loadThread`).
22
- * This is the definition's output schema; the effect's script surface may
23
- * re-encode it before returning.
24
- */
25
- export type LoadThreadScriptOutput = {
26
- type: "gmail"
27
- threadId: string
28
- subject: string
29
- messages: Array<{
30
- messageId: string
31
- user: {
32
- name: string
33
- notionUserId?: string
34
- notionUserName?: string
35
- }
36
- text: string
37
- subject?: string
38
- timestamp: number
39
- attachments?: Array<{
40
- attachmentId?: string
41
- filename: string
42
- mimeType: string
43
- sizeBytes: number
44
- inline: boolean
45
- }>
46
- }>
47
- timestamp: number
48
- }
49
-
50
- /**
51
- * Script input for the "Query Gmail" effect (`gmail.query`),
52
- * derived from its Tool Core definition's call_function input projection.
53
- *
54
- * Query Gmail threads with structured parameters.
55
- */
56
- export type QueryScriptInput = {
57
- /**
58
- * Gmail search query string (from:, to:, subject:, after:, before:, has:attachment, is:unread, etc.).
59
- */
60
- q?: string
61
- /**
62
- * Maximum number of threads to return (default: 20, max: 100).
63
- */
64
- maxResults?: number
65
- }
66
-
67
- /**
68
- * Canonical Tool Core output for the "Query Gmail" effect (`gmail.query`).
69
- * This is the definition's output schema; the effect's script surface may
70
- * re-encode it before returning.
71
- */
72
- export type QueryScriptOutput = {
73
- threads: Array<{
74
- type: "gmail"
75
- threadId: string
76
- subject: string
77
- messages: Array<{
78
- messageId: string
79
- user: {
80
- name: string
81
- notionUserId?: string
82
- notionUserName?: string
83
- }
84
- text: string
85
- subject?: string
86
- timestamp: number
87
- attachments?: Array<{
88
- attachmentId?: string
89
- filename: string
90
- mimeType: string
91
- sizeBytes: number
92
- inline: boolean
93
- }>
94
- }>
95
- timestamp: number
96
- }>
97
- }
98
-
99
- /**
100
- * Script input for the "Read Gmail attachment" effect (`gmail.readAttachment`),
101
- * derived from its Tool Core definition's call_function input projection.
102
- *
103
- * Read a Gmail attachment.
104
- */
105
- export type ReadAttachmentScriptInput = {
106
- /**
107
- * Gmail message ID from loadThread.
108
- */
109
- messageId: string
110
- /**
111
- * Optional attachment filename from loadThread. Useful as a fallback when an attachmentId is unavailable.
112
- */
113
- filename?: string
114
- /**
115
- * Optional Gmail attachment ID from loadThread. Use it when present to target a specific attachment.
116
- */
117
- attachmentId?: string
118
- }
119
-
120
- /**
121
- * Canonical Tool Core output for the "Read Gmail attachment" effect (`gmail.readAttachment`).
122
- * This is the definition's output schema; the effect's script surface may
123
- * re-encode it before returning.
124
- */
125
- export type ReadAttachmentScriptOutput = {
126
- type: "gmail"
127
- items: Array<
128
- | {
129
- attachmentId?: string
130
- filename: string
131
- mimeType: string
132
- sizeBytes: number
133
- inline: boolean
134
- contentType: "attachment"
135
- message: string
136
- }
137
- | {
138
- attachmentId?: string
139
- filename: string
140
- mimeType: string
141
- sizeBytes: number
142
- inline: boolean
143
- contentType: "text"
144
- text: string
145
- }
146
- | {
147
- attachmentId?: string
148
- filename: string
149
- mimeType: string
150
- sizeBytes: number
151
- inline: boolean
152
- contentType: "unsupported"
153
- message: string
154
- }
155
- >
156
- }
157
-
158
- /**
159
- * Script input for the "Search Gmail" effect (`gmail.search`),
160
- * derived from its Tool Core definition's call_function input projection.
161
- *
162
- * Search Gmail via the configured connector.
163
- */
164
- export type SearchScriptInput = {
165
- /**
166
- * Search query for Gmail.
167
- */
168
- query: string
169
- }
170
-
171
- /**
172
- * Canonical Tool Core output for the "Search Gmail" effect (`gmail.search`).
173
- * This is the definition's output schema; the effect's script surface may
174
- * re-encode it before returning.
175
- */
176
- export type SearchScriptOutput = {
177
- results: Array<{
178
- id: string
179
- title: string
180
- path: string
181
- text: string
182
- lastEdited: string
183
- isPrivate: boolean
184
- pageId: string
185
- emailAddress: string
186
- }>
187
- }
188
-
189
- export class GmailConnectionClient {
190
- constructor(private readonly invoke: ConnectionActionInvoker) {}
191
- loadThread(args: LoadThreadScriptInput): Promise<LoadThreadScriptOutput> {
192
- return this.invoke<LoadThreadScriptOutput>("loadThread", args)
193
- }
194
- query(args: QueryScriptInput): Promise<QueryScriptOutput> {
195
- return this.invoke<QueryScriptOutput>("query", args)
196
- }
197
- readAttachment(
198
- args: ReadAttachmentScriptInput,
199
- ): Promise<ReadAttachmentScriptOutput> {
200
- return this.invoke<ReadAttachmentScriptOutput>("readAttachment", args)
201
- }
202
- search(args: SearchScriptInput): Promise<SearchScriptOutput> {
203
- return this.invoke<SearchScriptOutput>("search", args)
204
- }
205
- }
@@ -1,95 +0,0 @@
1
- // Generated by notion tool-core codegen-script-types --connections. Do not edit.
2
- import type { ConnectionActionInvoker } from "./connection-actions.js"
3
- /**
4
- * Script input for the "Query Google Calendar connector" effect (`googleCalendar.query`),
5
- * derived from its Tool Core definition's call_function input projection.
6
- *
7
- * Query Google Calendar events.
8
- */
9
- export type QueryScriptInput = {
10
- /**
11
- * Search query to filter events by text (title, description, location, attendees).
12
- */
13
- q?: string
14
- /**
15
- * Lower bound (inclusive) for event start time in ISO 8601 format.
16
- */
17
- timeMin?: string
18
- /**
19
- * Upper bound (exclusive) for event start time in ISO 8601 format.
20
- */
21
- timeMax?: string
22
- /**
23
- * Maximum number of events to return (default: 50, max: 250).
24
- */
25
- maxResults?: number
26
- }
27
-
28
- /**
29
- * Canonical Tool Core output for the "Query Google Calendar connector" effect (`googleCalendar.query`).
30
- * This is the definition's output schema; the effect's script surface may
31
- * re-encode it before returning.
32
- */
33
- export type QueryScriptOutput = {
34
- events: Array<{
35
- id: string
36
- title: string
37
- text: string
38
- start?: string
39
- end?: string
40
- location?: string
41
- url?: string
42
- isRecurring: boolean
43
- attendees?: Array<{
44
- name?: string
45
- email?: string
46
- responseStatus?:
47
- | "accepted"
48
- | "declined"
49
- | "tentative"
50
- | "noResponse"
51
- | "unknown"
52
- }>
53
- }>
54
- }
55
-
56
- /**
57
- * Script input for the "Search Google Calendar connector" effect (`googleCalendar.search`),
58
- * derived from its Tool Core definition's call_function input projection.
59
- *
60
- * Search Google Calendar via the configured connector.
61
- */
62
- export type SearchScriptInput = {
63
- /**
64
- * Search query for Google Calendar.
65
- */
66
- query: string
67
- }
68
-
69
- /**
70
- * Canonical Tool Core output for the "Search Google Calendar connector" effect (`googleCalendar.search`).
71
- * This is the definition's output schema; the effect's script surface may
72
- * re-encode it before returning.
73
- */
74
- export type SearchScriptOutput = {
75
- results: Array<{
76
- id: string
77
- title: string
78
- path: string
79
- text: string
80
- lastEdited: string
81
- pageId: string
82
- emailAddress: string
83
- isPrivate: boolean
84
- }>
85
- }
86
-
87
- export class GoogleCalendarConnectionClient {
88
- constructor(private readonly invoke: ConnectionActionInvoker) {}
89
- query(args: QueryScriptInput): Promise<QueryScriptOutput> {
90
- return this.invoke<QueryScriptOutput>("query", args)
91
- }
92
- search(args: SearchScriptInput): Promise<SearchScriptOutput> {
93
- return this.invoke<SearchScriptOutput>("search", args)
94
- }
95
- }