@notionhq/apps 0.0.12 → 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 (137) hide show
  1. package/README.md +32 -0
  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.d.ts.map +1 -1
  9. package/dist/cli/build.js +41 -10
  10. package/dist/cli/codegen.d.ts +2 -0
  11. package/dist/cli/codegen.d.ts.map +1 -1
  12. package/dist/cli/codegen.js +13 -2
  13. package/dist/cli/discover.d.ts +2 -0
  14. package/dist/cli/discover.d.ts.map +1 -1
  15. package/dist/cli/discover.js +4 -2
  16. package/dist/cli/emit-manifest.d.ts +3 -1
  17. package/dist/cli/emit-manifest.d.ts.map +1 -1
  18. package/dist/cli/emit-manifest.js +10 -4
  19. package/dist/cli/index.js +33 -1
  20. package/dist/confluence.generated.d.ts +98 -0
  21. package/dist/confluence.generated.d.ts.map +1 -0
  22. package/dist/confluence.generated.js +18 -0
  23. package/dist/connection-actions.d.ts +2 -0
  24. package/dist/connection-actions.d.ts.map +1 -0
  25. package/dist/connection-actions.js +0 -0
  26. package/dist/connection-trigger-definitions.generated.d.ts +34 -0
  27. package/dist/connection-trigger-definitions.generated.d.ts.map +1 -0
  28. package/dist/connection-trigger-definitions.generated.js +45 -0
  29. package/dist/connections.d.ts +15 -0
  30. package/dist/connections.d.ts.map +1 -0
  31. package/dist/connections.js +79 -0
  32. package/dist/connections.test.d.ts +2 -0
  33. package/dist/connections.test.d.ts.map +1 -0
  34. package/dist/cursor.generated.d.ts +154 -0
  35. package/dist/cursor.generated.d.ts.map +1 -0
  36. package/dist/cursor.generated.js +18 -0
  37. package/dist/custom-block.d.ts +54 -0
  38. package/dist/custom-block.d.ts.map +1 -0
  39. package/dist/custom-block.js +30 -0
  40. package/dist/custom-block.test.d.ts +2 -0
  41. package/dist/custom-block.test.d.ts.map +1 -0
  42. package/dist/custom-blocks.d.ts +2 -0
  43. package/dist/custom-blocks.d.ts.map +1 -0
  44. package/dist/custom-blocks.js +1 -0
  45. package/dist/discord.generated.d.ts +279 -0
  46. package/dist/discord.generated.d.ts.map +1 -0
  47. package/dist/discord.generated.js +33 -0
  48. package/dist/gmail.generated.d.ts +184 -0
  49. package/dist/gmail.generated.d.ts.map +1 -0
  50. package/dist/gmail.generated.js +21 -0
  51. package/dist/googleCalendar.generated.d.ts +83 -0
  52. package/dist/googleCalendar.generated.d.ts.map +1 -0
  53. package/dist/googleCalendar.generated.js +15 -0
  54. package/dist/googleDrive.generated.d.ts +210 -0
  55. package/dist/googleDrive.generated.d.ts.map +1 -0
  56. package/dist/googleDrive.generated.js +27 -0
  57. package/dist/googleDriveOauth.generated.d.ts +851 -0
  58. package/dist/googleDriveOauth.generated.d.ts.map +1 -0
  59. package/dist/googleDriveOauth.generated.js +84 -0
  60. package/dist/manifest.d.ts +1 -1
  61. package/dist/manifest.d.ts.map +1 -1
  62. package/dist/nds.css +1 -0
  63. package/dist/notion-as-code/database.d.ts +4 -3
  64. package/dist/notion-as-code/database.d.ts.map +1 -1
  65. package/dist/notion-as-code/database.js +11 -2
  66. package/dist/notion-as-code/intents.d.ts +4 -1
  67. package/dist/notion-as-code/intents.d.ts.map +1 -1
  68. package/dist/notion-as-code/page.d.ts +4 -4
  69. package/dist/notion-as-code/page.d.ts.map +1 -1
  70. package/dist/notion-as-code/page.js +11 -2
  71. package/dist/outlook.generated.d.ts +224 -0
  72. package/dist/outlook.generated.d.ts.map +1 -0
  73. package/dist/outlook.generated.js +24 -0
  74. package/dist/providers.generated.d.ts +117 -0
  75. package/dist/providers.generated.d.ts.map +1 -0
  76. package/dist/providers.generated.js +108 -0
  77. package/dist/react.d.ts +2 -0
  78. package/dist/react.d.ts.map +1 -0
  79. package/dist/react.js +1 -0
  80. package/dist/salesforce.generated.d.ts +151 -0
  81. package/dist/salesforce.generated.d.ts.map +1 -0
  82. package/dist/salesforce.generated.js +24 -0
  83. package/dist/slack.generated.d.ts +290 -0
  84. package/dist/slack.generated.d.ts.map +1 -0
  85. package/dist/slack.generated.js +30 -0
  86. package/dist/triggers.generated.d.ts +107 -32
  87. package/dist/triggers.generated.d.ts.map +1 -1
  88. package/dist/triggers.generated.js +36 -24
  89. package/dist/workflow-connections-types.test.d.ts +2 -0
  90. package/dist/workflow-connections-types.test.d.ts.map +1 -0
  91. package/dist/workflow-types.test.d.ts +2 -0
  92. package/dist/workflow-types.test.d.ts.map +1 -0
  93. package/dist/workflow.d.ts +20 -16
  94. package/dist/workflow.d.ts.map +1 -1
  95. package/dist/workflow.js +14 -17
  96. package/docs/BUILD.md +83 -14
  97. package/docs/CONNECTIONS.md +129 -0
  98. package/package.json +16 -2
  99. package/src/box.generated.ts +187 -0
  100. package/src/calendar.generated.ts +1117 -0
  101. package/src/cli/build.test.ts +87 -0
  102. package/src/cli/build.ts +47 -9
  103. package/src/cli/codegen.test.ts +2 -0
  104. package/src/cli/codegen.ts +25 -7
  105. package/src/cli/discover.test.ts +12 -0
  106. package/src/cli/discover.ts +6 -2
  107. package/src/cli/emit-manifest.ts +13 -3
  108. package/src/cli/index.ts +33 -1
  109. package/src/confluence.generated.ts +109 -0
  110. package/src/connection-actions.ts +2 -0
  111. package/src/connection-trigger-definitions.generated.ts +48 -0
  112. package/src/connections.test.ts +157 -0
  113. package/src/connections.ts +126 -0
  114. package/src/cursor.generated.ts +167 -0
  115. package/src/custom-block.test.ts +19 -0
  116. package/src/custom-block.ts +41 -0
  117. package/src/custom-blocks.ts +1 -0
  118. package/src/discord.generated.ts +318 -0
  119. package/src/gmail.generated.ts +205 -0
  120. package/src/googleCalendar.generated.ts +95 -0
  121. package/src/googleDrive.generated.ts +235 -0
  122. package/src/googleDriveOauth.generated.ts +980 -0
  123. package/src/manifest.ts +1 -1
  124. package/src/nds.css +1 -0
  125. package/src/notion-as-code/database.ts +19 -11
  126. package/src/notion-as-code/intents.ts +2 -1
  127. package/src/notion-as-code/page.ts +17 -11
  128. package/src/outlook.generated.ts +249 -0
  129. package/src/providers.generated.ts +207 -0
  130. package/src/react.ts +1 -0
  131. package/src/salesforce.generated.ts +170 -0
  132. package/src/slack.generated.ts +330 -0
  133. package/src/triggers.generated.ts +112 -32
  134. package/src/workflow-connections-types.test.ts +59 -0
  135. package/src/workflow-types.test.ts +144 -0
  136. package/src/workflow.test.ts +112 -2
  137. package/src/workflow.ts +58 -29
@@ -0,0 +1,851 @@
1
+ import type { ConnectionActionInvoker } from "./connection-actions.js";
2
+ /**
3
+ * Script input for the "Append Google Sheet rows" effect (`googleDriveOauth.appendSheetRows`),
4
+ * derived from its Tool Core definition's call_function input projection.
5
+ *
6
+ * Append rows to a Google Sheet via OAuth.
7
+ */
8
+ export type AppendSheetRowsScriptInput = {
9
+ /**
10
+ * The Google Sheet file ID.
11
+ */
12
+ fileId: string;
13
+ /**
14
+ * Sheet (tab) title to append to, e.g. 'Sheet1'.
15
+ */
16
+ sheet: string;
17
+ /**
18
+ * 2D array of new rows to append (rows × columns). Each inner array is one row.
19
+ */
20
+ values: Array<Array<string>>;
21
+ /**
22
+ * USER_ENTERED (default) parses formulas, dates, and numbers as if a user typed them. RAW stores each value exactly as provided.
23
+ */
24
+ valueInputOption?: "RAW" | "USER_ENTERED";
25
+ };
26
+ /**
27
+ * Canonical Tool Core output for the "Append Google Sheet rows" effect (`googleDriveOauth.appendSheetRows`).
28
+ * This is the definition's output schema; the effect's script surface may
29
+ * re-encode it before returning.
30
+ */
31
+ export type AppendSheetRowsScriptOutput = {
32
+ updatedRange?: string;
33
+ updatedRows?: number;
34
+ };
35
+ /**
36
+ * Script input for the "Batch update Google Doc" effect (`googleDriveOauth.batchUpdateDocument`),
37
+ * derived from its Tool Core definition's call_function input projection.
38
+ *
39
+ * Apply low-level Google Docs batchUpdate requests to a document via OAuth.
40
+ */
41
+ export type BatchUpdateDocumentScriptInput = {
42
+ /**
43
+ * The Google Doc file ID.
44
+ */
45
+ fileId: string;
46
+ /**
47
+ * A list of updates to apply to the document. Each request should be a valid documents.batchUpdate Request object, using the schema documented in: https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request Requests will be applied in the order they are specified. If any request is not valid, no requests will be applied.
48
+ */
49
+ requests: Array<Record<string, unknown>>;
50
+ /**
51
+ * Require the document revision returned by readDocument.
52
+ */
53
+ writeControl?: {
54
+ requiredRevisionId: string;
55
+ };
56
+ };
57
+ /**
58
+ * Canonical Tool Core output for the "Batch update Google Doc" effect (`googleDriveOauth.batchUpdateDocument`).
59
+ * This is the definition's output schema; the effect's script surface may
60
+ * re-encode it before returning.
61
+ */
62
+ export type BatchUpdateDocumentScriptOutput = {
63
+ replies: Array<Record<string, unknown>>;
64
+ documentId: string;
65
+ writeControl?: {
66
+ requiredRevisionId?: string;
67
+ };
68
+ };
69
+ /**
70
+ * Script input for the "Batch update Google Slides presentation" effect (`googleDriveOauth.batchUpdatePresentation`),
71
+ * derived from its Tool Core definition's call_function input projection.
72
+ *
73
+ * Apply low-level Google Slides batchUpdate requests to a presentation via OAuth.
74
+ */
75
+ export type BatchUpdatePresentationScriptInput = {
76
+ /**
77
+ * The Google Slides presentation file ID.
78
+ */
79
+ fileId: string;
80
+ /**
81
+ * A list of updates to apply to the presentation. Each request should be a valid presentations.batchUpdate Request object, using the schema documented in: https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/request Requests will be applied in the order they are specified. If any request is not valid, no requests will be applied.
82
+ */
83
+ requests: Array<Record<string, unknown>>;
84
+ /**
85
+ * Require the presentation revision returned by readPresentation.
86
+ */
87
+ writeControl?: {
88
+ requiredRevisionId: string;
89
+ };
90
+ };
91
+ /**
92
+ * Canonical Tool Core output for the "Batch update Google Slides presentation" effect (`googleDriveOauth.batchUpdatePresentation`).
93
+ * This is the definition's output schema; the effect's script surface may
94
+ * re-encode it before returning.
95
+ */
96
+ export type BatchUpdatePresentationScriptOutput = {
97
+ replies: Array<Record<string, unknown>>;
98
+ presentationId: string;
99
+ writeControl?: {
100
+ requiredRevisionId?: string;
101
+ };
102
+ };
103
+ /**
104
+ * Script input for the "Batch update Google Sheet" effect (`googleDriveOauth.batchUpdateSpreadsheet`),
105
+ * derived from its Tool Core definition's call_function input projection.
106
+ *
107
+ * Apply low-level Google Sheets batchUpdate requests to a spreadsheet via OAuth.
108
+ */
109
+ export type BatchUpdateSpreadsheetScriptInput = {
110
+ /**
111
+ * The Google Sheet file ID.
112
+ */
113
+ fileId: string;
114
+ /**
115
+ * A list of updates to apply to the spreadsheet. Each request should be a valid spreadsheets.batchUpdate Request object, using the schema documented in: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request Requests will be applied in the order they are specified. If any request is not valid, no requests will be applied.
116
+ */
117
+ requests: Array<Record<string, unknown>>;
118
+ /**
119
+ * Whether to include the updated spreadsheet resource in the response.
120
+ */
121
+ includeSpreadsheetInResponse?: boolean;
122
+ /**
123
+ * A1 ranges to include when includeSpreadsheetInResponse is true.
124
+ */
125
+ responseRanges?: Array<string>;
126
+ /**
127
+ * Whether the updated spreadsheet response should include grid data.
128
+ */
129
+ responseIncludeGridData?: boolean;
130
+ };
131
+ /**
132
+ * Canonical Tool Core output for the "Batch update Google Sheet" effect (`googleDriveOauth.batchUpdateSpreadsheet`).
133
+ * This is the definition's output schema; the effect's script surface may
134
+ * re-encode it before returning.
135
+ */
136
+ export type BatchUpdateSpreadsheetScriptOutput = {
137
+ replies: Array<Record<string, unknown>>;
138
+ spreadsheetId: string;
139
+ updatedSpreadsheet?: Record<string, unknown>;
140
+ };
141
+ /**
142
+ * Script input for the "Copy Google Drive file" effect (`googleDriveOauth.copyFile`),
143
+ * derived from its Tool Core definition's call_function input projection.
144
+ *
145
+ * Copy a Google Drive file via OAuth.
146
+ */
147
+ export type CopyFileScriptInput = {
148
+ /**
149
+ * The ID of the file to copy.
150
+ */
151
+ fileId: string;
152
+ /**
153
+ * Optional name for the copy. Defaults to 'Copy of <original name>'.
154
+ */
155
+ name?: string;
156
+ /**
157
+ * Optional folder or shared drive ID to place the copy in.
158
+ */
159
+ destinationParentId?: string;
160
+ };
161
+ /**
162
+ * Canonical Tool Core output for the "Copy Google Drive file" effect (`googleDriveOauth.copyFile`).
163
+ * This is the definition's output schema; the effect's script surface may
164
+ * re-encode it before returning.
165
+ */
166
+ export type CopyFileScriptOutput = {
167
+ id: string;
168
+ name: string;
169
+ mimeType: string;
170
+ webViewLink?: string;
171
+ };
172
+ /**
173
+ * Script input for the "Create Google Doc" effect (`googleDriveOauth.createDocument`),
174
+ * derived from its Tool Core definition's call_function input projection.
175
+ *
176
+ * Create a new Google Doc with content via OAuth.
177
+ */
178
+ export type CreateDocumentScriptInput = {
179
+ /**
180
+ * The name for the new document.
181
+ */
182
+ name: string;
183
+ /**
184
+ * HTML content for the document. Supports headings, paragraphs, lists, tables, bold, italic, links, etc. Google converts the HTML into native Doc formatting.
185
+ */
186
+ content: string;
187
+ /**
188
+ * Optional folder or shared drive ID to create the document in.
189
+ */
190
+ parentId?: string;
191
+ /**
192
+ * Optional description for the document.
193
+ */
194
+ description?: string;
195
+ };
196
+ /**
197
+ * Canonical Tool Core output for the "Create Google Doc" effect (`googleDriveOauth.createDocument`).
198
+ * This is the definition's output schema; the effect's script surface may
199
+ * re-encode it before returning.
200
+ */
201
+ export type CreateDocumentScriptOutput = {
202
+ id: string;
203
+ name: string;
204
+ mimeType: string;
205
+ webViewLink?: string;
206
+ };
207
+ /**
208
+ * Script input for the "Create Google Drive folder" effect (`googleDriveOauth.createFolder`),
209
+ * derived from its Tool Core definition's call_function input projection.
210
+ *
211
+ * Create a new folder in Google Drive via OAuth.
212
+ */
213
+ export type CreateFolderScriptInput = {
214
+ /**
215
+ * The name for the new folder.
216
+ */
217
+ name: string;
218
+ /**
219
+ * Optional folder or shared drive ID to create the folder in.
220
+ */
221
+ parentId?: string;
222
+ /**
223
+ * Optional description for the folder.
224
+ */
225
+ description?: string;
226
+ };
227
+ /**
228
+ * Canonical Tool Core output for the "Create Google Drive folder" effect (`googleDriveOauth.createFolder`).
229
+ * This is the definition's output schema; the effect's script surface may
230
+ * re-encode it before returning.
231
+ */
232
+ export type CreateFolderScriptOutput = {
233
+ id: string;
234
+ name: string;
235
+ webViewLink?: string;
236
+ };
237
+ /**
238
+ * Script input for the "Create Google Slides presentation" effect (`googleDriveOauth.createPresentation`),
239
+ * derived from its Tool Core definition's call_function input projection.
240
+ *
241
+ * Create a new Google Slides presentation via OAuth.
242
+ */
243
+ export type CreatePresentationScriptInput = {
244
+ /**
245
+ * The name for the new presentation.
246
+ */
247
+ name: string;
248
+ /**
249
+ * Optional title-slide title. Defaults to the name when omitted.
250
+ */
251
+ title?: string;
252
+ /**
253
+ * Optional title-slide subtitle.
254
+ */
255
+ subtitle?: string;
256
+ /**
257
+ * Optional folder or shared drive ID to create the presentation in.
258
+ */
259
+ parentId?: string;
260
+ /**
261
+ * Optional description for the presentation.
262
+ */
263
+ description?: string;
264
+ };
265
+ /**
266
+ * Canonical Tool Core output for the "Create Google Slides presentation" effect (`googleDriveOauth.createPresentation`).
267
+ * This is the definition's output schema; the effect's script surface may
268
+ * re-encode it before returning.
269
+ */
270
+ export type CreatePresentationScriptOutput = {
271
+ id: string;
272
+ name: string;
273
+ mimeType: string;
274
+ webViewLink?: string;
275
+ };
276
+ /**
277
+ * Script input for the "Create Google Sheet" effect (`googleDriveOauth.createSpreadsheet`),
278
+ * derived from its Tool Core definition's call_function input projection.
279
+ *
280
+ * Create a new Google Sheet with data via OAuth.
281
+ */
282
+ export type CreateSpreadsheetScriptInput = {
283
+ /**
284
+ * The name for the new spreadsheet.
285
+ */
286
+ name: string;
287
+ /**
288
+ * CSV-formatted data: rows separated by newlines, columns by commas. Example: "Name,Age\nAlice,30\nBob,25"
289
+ */
290
+ content: string;
291
+ /**
292
+ * Optional folder or shared drive ID to create the spreadsheet in.
293
+ */
294
+ parentId?: string;
295
+ /**
296
+ * Optional description for the spreadsheet.
297
+ */
298
+ description?: string;
299
+ };
300
+ /**
301
+ * Canonical Tool Core output for the "Create Google Sheet" effect (`googleDriveOauth.createSpreadsheet`).
302
+ * This is the definition's output schema; the effect's script surface may
303
+ * re-encode it before returning.
304
+ */
305
+ export type CreateSpreadsheetScriptOutput = {
306
+ id: string;
307
+ name: string;
308
+ mimeType: string;
309
+ webViewLink?: string;
310
+ };
311
+ /**
312
+ * Script input for the "Download Google Drive file" effect (`googleDriveOauth.downloadFile`),
313
+ * derived from its Tool Core definition's call_function input projection.
314
+ *
315
+ * Download a Google Drive file into the current thread.
316
+ */
317
+ export type DownloadFileScriptInput = {
318
+ /**
319
+ * The Google Drive file ID to download.
320
+ */
321
+ fileId: string;
322
+ /**
323
+ * Optional Google Drive export MIME type for a native Google Workspace file, such as application/pdf.
324
+ */
325
+ exportMimeType?: string;
326
+ };
327
+ /**
328
+ * Canonical Tool Core output for the "Download Google Drive file" effect (`googleDriveOauth.downloadFile`).
329
+ * This is the definition's output schema; the effect's script surface may
330
+ * re-encode it before returning.
331
+ */
332
+ export type DownloadFileScriptOutput = {
333
+ id: string;
334
+ name: string;
335
+ mimeType: string;
336
+ sourceMimeType: string;
337
+ modifiedTime?: string;
338
+ };
339
+ /**
340
+ * Script input for the "List Google Drive changes" effect (`googleDriveOauth.listChanges`),
341
+ * derived from its Tool Core definition's call_function input projection.
342
+ *
343
+ * List Google Drive files modified since the trigger's previous poll.
344
+ */
345
+ export type ListChangesScriptInput = {
346
+ /**
347
+ * ISO 8601 timestamp from the trigger's `changeToken` variable.
348
+ */
349
+ pageToken: string;
350
+ /**
351
+ * Override the auto-applied scope to query a specific shared drive.
352
+ */
353
+ driveId?: string;
354
+ /**
355
+ * Override the auto-applied scope to filter to a folder's direct children.
356
+ */
357
+ folderId?: string;
358
+ };
359
+ /**
360
+ * Canonical Tool Core output for the "List Google Drive changes" effect (`googleDriveOauth.listChanges`).
361
+ * This is the definition's output schema; the effect's script surface may
362
+ * re-encode it before returning.
363
+ */
364
+ export type ListChangesScriptOutput = {
365
+ changes: Array<{
366
+ fileId: string;
367
+ removed: boolean;
368
+ changeType?: string;
369
+ time?: string;
370
+ file?: {
371
+ id: string;
372
+ name: string;
373
+ mimeType: string;
374
+ webViewLink?: string;
375
+ modifiedTime?: string;
376
+ createdTime?: string;
377
+ };
378
+ }>;
379
+ truncated?: boolean;
380
+ nextModifiedAfter?: string;
381
+ };
382
+ /**
383
+ * Script input for the "List Google Drive files" effect (`googleDriveOauth.listFiles`),
384
+ * derived from its Tool Core definition's call_function input projection.
385
+ *
386
+ * List Google Drive files via OAuth.
387
+ */
388
+ export type ListFilesScriptInput = {
389
+ /**
390
+ * Google Drive folder ID to list files from.
391
+ */
392
+ folderId?: string;
393
+ /**
394
+ * Shared drive ID to list files from.
395
+ */
396
+ driveId?: string;
397
+ /**
398
+ * Optional MIME type filters (e.g. 'application/vnd.google-apps.document', 'application/vnd.google-apps.folder').
399
+ */
400
+ mimeTypes?: Array<string>;
401
+ /**
402
+ * Optional file or folder name prefix. This searches names only, not file content.
403
+ */
404
+ nameContains?: string;
405
+ /**
406
+ * Optional most-recent-first sort order; it ranks results but does not filter to a time range. Use 'recency desc' for generic recent files, 'modifiedByMeTime desc' for files the connected user recently updated, and 'viewedByMeTime desc' for files they recently viewed.
407
+ */
408
+ orderBy?: "modifiedTime desc" | "modifiedByMeTime desc" | "viewedByMeTime desc" | "recency desc";
409
+ /**
410
+ * Maximum number of files to return (default: 50, max: 100).
411
+ */
412
+ pageSize?: number;
413
+ /**
414
+ * Token from a previous response to fetch the next page of results.
415
+ */
416
+ pageToken?: string;
417
+ };
418
+ /**
419
+ * Canonical Tool Core output for the "List Google Drive files" effect (`googleDriveOauth.listFiles`).
420
+ * This is the definition's output schema; the effect's script surface may
421
+ * re-encode it before returning.
422
+ */
423
+ export type ListFilesScriptOutput = {
424
+ files: Array<{
425
+ id: string;
426
+ name: string;
427
+ mimeType: string;
428
+ webViewLink?: string;
429
+ modifiedTime?: string;
430
+ createdTime?: string;
431
+ modifiedByMeTime?: string;
432
+ viewedByMeTime?: string;
433
+ sharedWithMeTime?: string;
434
+ }>;
435
+ /**
436
+ * Pass this opaque token as pageToken for the next page.
437
+ */
438
+ nextPageToken?: string;
439
+ /**
440
+ * True when an unscoped listing may have omitted shared-drive results.
441
+ */
442
+ incompleteSearch?: boolean;
443
+ };
444
+ /**
445
+ * Script input for the "Move or rename Google Drive file" effect (`googleDriveOauth.moveFile`),
446
+ * derived from its Tool Core definition's call_function input projection.
447
+ *
448
+ * Move and/or rename a Google Drive file via OAuth.
449
+ */
450
+ export type MoveFileScriptInput = {
451
+ /**
452
+ * The ID of the file to move or rename.
453
+ */
454
+ fileId: string;
455
+ /**
456
+ * New name for the file. Omit to keep the current name.
457
+ */
458
+ name?: string;
459
+ /**
460
+ * Folder or shared drive ID to move the file into. Omit to keep the file in its current location.
461
+ */
462
+ destinationParentId?: string;
463
+ };
464
+ /**
465
+ * Canonical Tool Core output for the "Move or rename Google Drive file" effect (`googleDriveOauth.moveFile`).
466
+ * This is the definition's output schema; the effect's script surface may
467
+ * re-encode it before returning.
468
+ */
469
+ export type MoveFileScriptOutput = {
470
+ id: string;
471
+ name: string;
472
+ mimeType: string;
473
+ webViewLink?: string;
474
+ };
475
+ /**
476
+ * Script input for the "Read Google Doc structure" effect (`googleDriveOauth.readDocument`),
477
+ * derived from its Tool Core definition's call_function input projection.
478
+ *
479
+ * Read a Google Doc's outline and optionally a section body via OAuth.
480
+ */
481
+ export type ReadDocumentScriptInput = {
482
+ /**
483
+ * The Google Doc file ID.
484
+ */
485
+ fileId: string;
486
+ /**
487
+ * Optional tab ID from the overview. With no indices, returns the whole tab if it fits.
488
+ */
489
+ tabId?: string;
490
+ /**
491
+ * Optional inclusive character index. Must be provided with tabId and endIndex.
492
+ */
493
+ startIndex?: number;
494
+ /**
495
+ * Optional exclusive character index. Must be provided with tabId and startIndex.
496
+ */
497
+ endIndex?: number;
498
+ };
499
+ /**
500
+ * Canonical Tool Core output for the "Read Google Doc structure" effect (`googleDriveOauth.readDocument`).
501
+ * This is the definition's output schema; the effect's script surface may
502
+ * re-encode it before returning.
503
+ */
504
+ export type ReadDocumentScriptOutput = {
505
+ id: string;
506
+ title: string;
507
+ type: "overview";
508
+ webViewLink?: string;
509
+ revisionId?: string;
510
+ tabs: Array<{
511
+ tabId: string;
512
+ title: string;
513
+ index?: number;
514
+ nestingLevel?: number;
515
+ parentTabId?: string;
516
+ startIndex: number;
517
+ endIndex: number;
518
+ characterCount: number;
519
+ headings: Array<{
520
+ heading: string;
521
+ level: number;
522
+ order: number;
523
+ startIndex: number;
524
+ contentStartIndex: number;
525
+ endIndex: number;
526
+ preview?: string;
527
+ }>;
528
+ }>;
529
+ } | {
530
+ id: string;
531
+ title: string;
532
+ type: "content";
533
+ webViewLink?: string;
534
+ revisionId?: string;
535
+ tabId: string;
536
+ range: {
537
+ startIndex: number;
538
+ endIndex: number;
539
+ };
540
+ documentTab: Record<string, unknown>;
541
+ };
542
+ /**
543
+ * Script input for the "Read Google Drive file" effect (`googleDriveOauth.readFile`),
544
+ * derived from its Tool Core definition's call_function input projection.
545
+ *
546
+ * Read a Google Drive file's content or metadata via OAuth.
547
+ */
548
+ export type ReadFileScriptInput = {
549
+ /**
550
+ * The Google Drive file ID to read.
551
+ */
552
+ fileId: string;
553
+ /**
554
+ * When true, returns only file metadata without downloading content. Useful for checking file info without the cost of a full read.
555
+ */
556
+ metadataOnly?: boolean;
557
+ };
558
+ /**
559
+ * Canonical Tool Core output for the "Read Google Drive file" effect (`googleDriveOauth.readFile`).
560
+ * This is the definition's output schema; the effect's script surface may
561
+ * re-encode it before returning.
562
+ */
563
+ export type ReadFileScriptOutput = {
564
+ id: string;
565
+ name: string;
566
+ mimeType: string;
567
+ content?: string;
568
+ webViewLink?: string;
569
+ modifiedTime?: string;
570
+ };
571
+ /**
572
+ * Script input for the "Read Google Slides structure" effect (`googleDriveOauth.readPresentation`),
573
+ * derived from its Tool Core definition's call_function input projection.
574
+ *
575
+ * Read a Google Slides presentation's structure via OAuth.
576
+ */
577
+ export type ReadPresentationScriptInput = {
578
+ /**
579
+ * The Google Slides file ID to read.
580
+ */
581
+ fileId: string;
582
+ /**
583
+ * Optional. One to 20 slide, layout, or master page object IDs from the overview. Returns raw Page details. Omit to get the page map.
584
+ */
585
+ pageIds?: Array<string>;
586
+ };
587
+ /**
588
+ * Canonical Tool Core output for the "Read Google Slides structure" effect (`googleDriveOauth.readPresentation`).
589
+ * This is the definition's output schema; the effect's script surface may
590
+ * re-encode it before returning.
591
+ */
592
+ export type ReadPresentationScriptOutput = {
593
+ id: string;
594
+ title: string;
595
+ type: "overview";
596
+ webViewLink?: string;
597
+ revisionId?: string;
598
+ slides: Array<{
599
+ pageId: string;
600
+ index: number;
601
+ title?: string;
602
+ textPreview?: string;
603
+ layoutId?: string;
604
+ masterId?: string;
605
+ }>;
606
+ layouts: Array<{
607
+ pageId: string;
608
+ name?: string;
609
+ displayName?: string;
610
+ masterId?: string;
611
+ }>;
612
+ masters: Array<{
613
+ pageId: string;
614
+ }>;
615
+ } | {
616
+ id: string;
617
+ title: string;
618
+ type: "pages";
619
+ webViewLink?: string;
620
+ revisionId?: string;
621
+ pages: Array<Record<string, unknown>>;
622
+ };
623
+ /**
624
+ * Script input for the "Read Google Sheet structure" effect (`googleDriveOauth.readSpreadsheet`),
625
+ * derived from its Tool Core definition's call_function input projection.
626
+ *
627
+ * Read a Google Sheet's structure and optionally one sheet's values via OAuth.
628
+ */
629
+ export type ReadSpreadsheetScriptInput = {
630
+ /**
631
+ * The Google Sheet file ID to read.
632
+ */
633
+ fileId: string;
634
+ /**
635
+ * Optional explicit A1 range, including the tab name, such as "Sales!A1:H200". Omit for metadata only. Reads are limited to 10,000 requested cells and oversized requests fail with a narrower example.
636
+ */
637
+ range?: string;
638
+ };
639
+ /**
640
+ * Canonical Tool Core output for the "Read Google Sheet structure" effect (`googleDriveOauth.readSpreadsheet`).
641
+ * This is the definition's output schema; the effect's script surface may
642
+ * re-encode it before returning.
643
+ */
644
+ export type ReadSpreadsheetScriptOutput = {
645
+ id: string;
646
+ title: string;
647
+ webViewLink?: string;
648
+ sheets: Array<{
649
+ sheetId: number;
650
+ title: string;
651
+ index: number;
652
+ rowCount?: number;
653
+ columnCount?: number;
654
+ }>;
655
+ sheetValues?: {
656
+ requestedRange: string;
657
+ returnedRange: string;
658
+ majorDimension: string;
659
+ values: Array<Array<string>>;
660
+ };
661
+ };
662
+ /**
663
+ * Script input for the "Search Google Drive files" effect (`googleDriveOauth.searchFiles`),
664
+ * derived from its Tool Core definition's call_function input projection.
665
+ *
666
+ * Search Google Drive files via OAuth.
667
+ */
668
+ export type SearchFilesScriptInput = {
669
+ /**
670
+ * Plain-text search query for finding files by name or content. Do NOT put Drive query syntax here (e.g. mimeType=, modifiedTime>, name contains) — use the dedicated parameters instead.
671
+ */
672
+ query: string;
673
+ /**
674
+ * Optional folder ID to scope the search within.
675
+ */
676
+ folderId?: string;
677
+ /**
678
+ * Optional shared drive ID to scope the search within.
679
+ */
680
+ driveId?: string;
681
+ /**
682
+ * Optional MIME type filters (e.g. 'application/vnd.google-apps.document', 'application/vnd.google-apps.folder').
683
+ */
684
+ mimeTypes?: Array<string>;
685
+ /**
686
+ * Optional ISO date string to filter files modified after this date (e.g. '2024-01-01T00:00:00Z').
687
+ */
688
+ modifiedAfter?: string;
689
+ /**
690
+ * Optional ISO date string to filter files created after this date. Use for finding new files.
691
+ */
692
+ createdAfter?: string;
693
+ /**
694
+ * Maximum number of results per page (default: 20, max: 100).
695
+ */
696
+ pageSize?: number;
697
+ /**
698
+ * Continuation cursor. Pass a prior result's `nextPageToken` to fetch the next page.
699
+ */
700
+ pageToken?: string;
701
+ };
702
+ /**
703
+ * Canonical Tool Core output for the "Search Google Drive files" effect (`googleDriveOauth.searchFiles`).
704
+ * This is the definition's output schema; the effect's script surface may
705
+ * re-encode it before returning.
706
+ */
707
+ export type SearchFilesScriptOutput = {
708
+ files: Array<{
709
+ id: string;
710
+ name: string;
711
+ mimeType: string;
712
+ webViewLink?: string;
713
+ modifiedTime?: string;
714
+ createdTime?: string;
715
+ modifiedByMeTime?: string;
716
+ viewedByMeTime?: string;
717
+ sharedWithMeTime?: string;
718
+ }>;
719
+ /**
720
+ * Pass this opaque token as pageToken for the next page.
721
+ */
722
+ nextPageToken?: string;
723
+ /**
724
+ * True when an unscoped search may have omitted shared-drive results.
725
+ */
726
+ incompleteSearch?: boolean;
727
+ };
728
+ /**
729
+ * Script input for the "Trash Google Drive file" effect (`googleDriveOauth.trashFile`),
730
+ * derived from its Tool Core definition's call_function input projection.
731
+ *
732
+ * Move a Google Drive file to trash via OAuth.
733
+ */
734
+ export type TrashFileScriptInput = {
735
+ /**
736
+ * The ID of the file to trash.
737
+ */
738
+ fileId: string;
739
+ };
740
+ /**
741
+ * Canonical Tool Core output for the "Trash Google Drive file" effect (`googleDriveOauth.trashFile`).
742
+ * This is the definition's output schema; the effect's script surface may
743
+ * re-encode it before returning.
744
+ */
745
+ export type TrashFileScriptOutput = {
746
+ id: string;
747
+ name: string;
748
+ trashed: boolean;
749
+ };
750
+ /**
751
+ * Script input for the "Upload Google Drive file" effect (`googleDriveOauth.uploadFile`),
752
+ * derived from its Tool Core definition's call_function input projection.
753
+ *
754
+ * Create a new Google Drive file from a thread file.
755
+ */
756
+ export type UploadFileScriptInput = {
757
+ /**
758
+ * Authenticated thread file URI returned by computer.downloadFile, or session-file://<file-id> for a file attached to the Agent Service session.
759
+ */
760
+ fileUri: string;
761
+ /**
762
+ * Source filename including extension, used to infer its media type.
763
+ */
764
+ sourceFileName: string;
765
+ /**
766
+ * Optional name for the newly created Drive file. Defaults to sourceFileName.
767
+ */
768
+ name?: string;
769
+ /**
770
+ * Optional destination folder or shared drive ID.
771
+ */
772
+ parentId?: string;
773
+ /**
774
+ * Optional Drive file description.
775
+ */
776
+ description?: string;
777
+ /**
778
+ * Optionally convert a compatible file to a native Google Workspace format.
779
+ */
780
+ convertTo?: "document" | "spreadsheet" | "presentation";
781
+ };
782
+ /**
783
+ * Canonical Tool Core output for the "Upload Google Drive file" effect (`googleDriveOauth.uploadFile`).
784
+ * This is the definition's output schema; the effect's script surface may
785
+ * re-encode it before returning.
786
+ */
787
+ export type UploadFileScriptOutput = {
788
+ id: string;
789
+ name: string;
790
+ mimeType: string;
791
+ webViewLink?: string;
792
+ };
793
+ /**
794
+ * Script input for the "Write Google Sheet range" effect (`googleDriveOauth.writeSheetRange`),
795
+ * derived from its Tool Core definition's call_function input projection.
796
+ *
797
+ * Write values to a range in a Google Sheet via OAuth.
798
+ */
799
+ export type WriteSheetRangeScriptInput = {
800
+ /**
801
+ * The Google Sheet file ID.
802
+ */
803
+ fileId: string;
804
+ /**
805
+ * A1-notation range to write to, e.g. 'Sheet1!A1:C10'. Include the sheet name to avoid ambiguity.
806
+ */
807
+ range: string;
808
+ /**
809
+ * 2D array of cell values (rows × columns). All cells are written as strings; Google parses formulas and numbers when valueInputOption is USER_ENTERED (default).
810
+ */
811
+ values: Array<Array<string>>;
812
+ /**
813
+ * USER_ENTERED (default) parses formulas, dates, and numbers as if a user typed them. RAW stores each value exactly as provided.
814
+ */
815
+ valueInputOption?: "RAW" | "USER_ENTERED";
816
+ };
817
+ /**
818
+ * Canonical Tool Core output for the "Write Google Sheet range" effect (`googleDriveOauth.writeSheetRange`).
819
+ * This is the definition's output schema; the effect's script surface may
820
+ * re-encode it before returning.
821
+ */
822
+ export type WriteSheetRangeScriptOutput = {
823
+ updatedRange?: string;
824
+ updatedCells?: number;
825
+ };
826
+ export declare class GoogleDriveOauthConnectionClient {
827
+ private readonly invoke;
828
+ constructor(invoke: ConnectionActionInvoker);
829
+ appendSheetRows(args: AppendSheetRowsScriptInput): Promise<AppendSheetRowsScriptOutput>;
830
+ batchUpdateDocument(args: BatchUpdateDocumentScriptInput): Promise<BatchUpdateDocumentScriptOutput>;
831
+ batchUpdatePresentation(args: BatchUpdatePresentationScriptInput): Promise<BatchUpdatePresentationScriptOutput>;
832
+ batchUpdateSpreadsheet(args: BatchUpdateSpreadsheetScriptInput): Promise<BatchUpdateSpreadsheetScriptOutput>;
833
+ copyFile(args: CopyFileScriptInput): Promise<CopyFileScriptOutput>;
834
+ createDocument(args: CreateDocumentScriptInput): Promise<CreateDocumentScriptOutput>;
835
+ createFolder(args: CreateFolderScriptInput): Promise<CreateFolderScriptOutput>;
836
+ createPresentation(args: CreatePresentationScriptInput): Promise<CreatePresentationScriptOutput>;
837
+ createSpreadsheet(args: CreateSpreadsheetScriptInput): Promise<CreateSpreadsheetScriptOutput>;
838
+ downloadFile(args: DownloadFileScriptInput): Promise<DownloadFileScriptOutput>;
839
+ listChanges(args: ListChangesScriptInput): Promise<ListChangesScriptOutput>;
840
+ listFiles(args: ListFilesScriptInput): Promise<ListFilesScriptOutput>;
841
+ moveFile(args: MoveFileScriptInput): Promise<MoveFileScriptOutput>;
842
+ readDocument(args: ReadDocumentScriptInput): Promise<ReadDocumentScriptOutput>;
843
+ readFile(args: ReadFileScriptInput): Promise<ReadFileScriptOutput>;
844
+ readPresentation(args: ReadPresentationScriptInput): Promise<ReadPresentationScriptOutput>;
845
+ readSpreadsheet(args: ReadSpreadsheetScriptInput): Promise<ReadSpreadsheetScriptOutput>;
846
+ searchFiles(args: SearchFilesScriptInput): Promise<SearchFilesScriptOutput>;
847
+ trashFile(args: TrashFileScriptInput): Promise<TrashFileScriptOutput>;
848
+ uploadFile(args: UploadFileScriptInput): Promise<UploadFileScriptOutput>;
849
+ writeSheetRange(args: WriteSheetRangeScriptInput): Promise<WriteSheetRangeScriptOutput>;
850
+ }
851
+ //# sourceMappingURL=googleDriveOauth.generated.d.ts.map