@notionhq/apps 0.0.38 → 0.0.40

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.
@@ -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
- }