@notionhq/client 5.14.0 → 5.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/build/package.json +1 -1
  2. package/build/src/Client.d.ts +7 -1
  3. package/build/src/Client.d.ts.map +1 -1
  4. package/build/src/Client.js +15 -0
  5. package/build/src/Client.js.map +1 -1
  6. package/build/src/api-endpoints/blocks.d.ts +984 -0
  7. package/build/src/api-endpoints/blocks.d.ts.map +1 -0
  8. package/build/src/api-endpoints/blocks.js +89 -0
  9. package/build/src/api-endpoints/blocks.js.map +1 -0
  10. package/build/src/api-endpoints/comments.d.ts +112 -0
  11. package/build/src/api-endpoints/comments.d.ts.map +1 -0
  12. package/build/src/api-endpoints/comments.js +42 -0
  13. package/build/src/api-endpoints/comments.js.map +1 -0
  14. package/build/src/api-endpoints/common.d.ts +1939 -0
  15. package/build/src/api-endpoints/common.d.ts.map +1 -0
  16. package/build/src/api-endpoints/common.js +5 -0
  17. package/build/src/api-endpoints/common.js.map +1 -0
  18. package/build/src/api-endpoints/custom-emojis.d.ts +26 -0
  19. package/build/src/api-endpoints/custom-emojis.d.ts.map +1 -0
  20. package/build/src/api-endpoints/custom-emojis.js +16 -0
  21. package/build/src/api-endpoints/custom-emojis.js.map +1 -0
  22. package/build/src/api-endpoints/data-sources.d.ts +430 -0
  23. package/build/src/api-endpoints/data-sources.d.ts.map +1 -0
  24. package/build/src/api-endpoints/data-sources.js +64 -0
  25. package/build/src/api-endpoints/data-sources.js.map +1 -0
  26. package/build/src/api-endpoints/databases.d.ts +109 -0
  27. package/build/src/api-endpoints/databases.d.ts.map +1 -0
  28. package/build/src/api-endpoints/databases.js +53 -0
  29. package/build/src/api-endpoints/databases.js.map +1 -0
  30. package/build/src/api-endpoints/file-uploads.d.ts +138 -0
  31. package/build/src/api-endpoints/file-uploads.d.ts.map +1 -0
  32. package/build/src/api-endpoints/file-uploads.js +63 -0
  33. package/build/src/api-endpoints/file-uploads.js.map +1 -0
  34. package/build/src/api-endpoints/oauth.d.ts +90 -0
  35. package/build/src/api-endpoints/oauth.d.ts.map +1 -0
  36. package/build/src/api-endpoints/oauth.js +42 -0
  37. package/build/src/api-endpoints/oauth.js.map +1 -0
  38. package/build/src/api-endpoints/pages.d.ts +639 -0
  39. package/build/src/api-endpoints/pages.d.ts.map +1 -0
  40. package/build/src/api-endpoints/pages.js +102 -0
  41. package/build/src/api-endpoints/pages.js.map +1 -0
  42. package/build/src/api-endpoints/search.d.ts +36 -0
  43. package/build/src/api-endpoints/search.d.ts.map +1 -0
  44. package/build/src/api-endpoints/search.js +16 -0
  45. package/build/src/api-endpoints/search.js.map +1 -0
  46. package/build/src/api-endpoints/users.d.ts +53 -0
  47. package/build/src/api-endpoints/users.d.ts.map +1 -0
  48. package/build/src/api-endpoints/users.js +36 -0
  49. package/build/src/api-endpoints/users.js.map +1 -0
  50. package/build/src/api-endpoints/views.d.ts +504 -0
  51. package/build/src/api-endpoints/views.d.ts.map +1 -0
  52. package/build/src/api-endpoints/views.js +86 -0
  53. package/build/src/api-endpoints/views.js.map +1 -0
  54. package/build/src/api-endpoints/webhooks.d.ts +302 -0
  55. package/build/src/api-endpoints/webhooks.d.ts.map +1 -0
  56. package/build/src/api-endpoints/webhooks.js +5 -0
  57. package/build/src/api-endpoints/webhooks.js.map +1 -0
  58. package/build/src/api-endpoints.d.ts +13 -4916
  59. package/build/src/api-endpoints.d.ts.map +1 -1
  60. package/build/src/api-endpoints.js +31 -533
  61. package/build/src/api-endpoints.js.map +1 -1
  62. package/build/src/index.d.ts +1 -1
  63. package/build/src/index.d.ts.map +1 -1
  64. package/build/src/index.js.map +1 -1
  65. package/package.json +1 -1
@@ -0,0 +1,984 @@
1
+ import type { ApiColor, BlockObjectRequest, ContentPositionSchema, ContentWithExpressionRequest, ContentWithRichTextAndColorRequest, ContentWithRichTextRequest, ContentWithTableRowRequest, EmptyObject, HeaderContentWithRichTextAndColorRequest, IdRequest, InternalFileResponse, LanguageRequest, PageIconRequest, PageIconResponse, ParentForBlockBasedObjectResponse, PartialUserObjectResponse, RichTextItemRequest, RichTextItemResponse, TextRequest, UpdateMediaContentWithFileAndCaptionRequest, UpdateMediaContentWithFileNameAndCaptionRequest, UpdateMediaContentWithUrlAndCaptionRequest } from "./common";
2
+ type ApiTranscriptionStatus = "transcription_not_started" | "transcription_paused" | "transcription_in_progress" | "summary_in_progress" | "notes_ready";
3
+ export type AudioBlockObjectResponse = {
4
+ type: "audio";
5
+ audio: MediaContentWithFileAndCaptionResponse;
6
+ parent: ParentForBlockBasedObjectResponse;
7
+ object: "block";
8
+ id: string;
9
+ created_time: string;
10
+ created_by: PartialUserObjectResponse;
11
+ last_edited_time: string;
12
+ last_edited_by: PartialUserObjectResponse;
13
+ has_children: boolean;
14
+ in_trash: boolean;
15
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
16
+ archived: boolean;
17
+ };
18
+ export type BlockObjectResponse = ParagraphBlockObjectResponse | Heading1BlockObjectResponse | Heading2BlockObjectResponse | Heading3BlockObjectResponse | BulletedListItemBlockObjectResponse | NumberedListItemBlockObjectResponse | QuoteBlockObjectResponse | ToDoBlockObjectResponse | ToggleBlockObjectResponse | TemplateBlockObjectResponse | SyncedBlockBlockObjectResponse | ChildPageBlockObjectResponse | ChildDatabaseBlockObjectResponse | EquationBlockObjectResponse | CodeBlockObjectResponse | CalloutBlockObjectResponse | DividerBlockObjectResponse | BreadcrumbBlockObjectResponse | TableOfContentsBlockObjectResponse | TabBlockObjectResponse | ColumnListBlockObjectResponse | ColumnBlockObjectResponse | LinkToPageBlockObjectResponse | TableBlockObjectResponse | TableRowBlockObjectResponse | MeetingNotesBlockObjectResponse | TranscriptionBlockObjectResponse | EmbedBlockObjectResponse | BookmarkBlockObjectResponse | ImageBlockObjectResponse | VideoBlockObjectResponse | PdfBlockObjectResponse | FileBlockObjectResponse | AudioBlockObjectResponse | LinkPreviewBlockObjectResponse | UnsupportedBlockObjectResponse;
19
+ export type BookmarkBlockObjectResponse = {
20
+ type: "bookmark";
21
+ bookmark: MediaContentWithUrlAndCaptionResponse;
22
+ parent: ParentForBlockBasedObjectResponse;
23
+ object: "block";
24
+ id: string;
25
+ created_time: string;
26
+ created_by: PartialUserObjectResponse;
27
+ last_edited_time: string;
28
+ last_edited_by: PartialUserObjectResponse;
29
+ has_children: boolean;
30
+ in_trash: boolean;
31
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
32
+ archived: boolean;
33
+ };
34
+ export type BreadcrumbBlockObjectResponse = {
35
+ type: "breadcrumb";
36
+ breadcrumb: EmptyObject;
37
+ parent: ParentForBlockBasedObjectResponse;
38
+ object: "block";
39
+ id: string;
40
+ created_time: string;
41
+ created_by: PartialUserObjectResponse;
42
+ last_edited_time: string;
43
+ last_edited_by: PartialUserObjectResponse;
44
+ has_children: boolean;
45
+ in_trash: boolean;
46
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
47
+ archived: boolean;
48
+ };
49
+ export type BulletedListItemBlockObjectResponse = {
50
+ type: "bulleted_list_item";
51
+ bulleted_list_item: ContentWithRichTextAndColorResponse;
52
+ parent: ParentForBlockBasedObjectResponse;
53
+ object: "block";
54
+ id: string;
55
+ created_time: string;
56
+ created_by: PartialUserObjectResponse;
57
+ last_edited_time: string;
58
+ last_edited_by: PartialUserObjectResponse;
59
+ has_children: boolean;
60
+ in_trash: boolean;
61
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
62
+ archived: boolean;
63
+ };
64
+ export type CalloutBlockObjectResponse = {
65
+ type: "callout";
66
+ callout: {
67
+ rich_text: Array<RichTextItemResponse>;
68
+ color: ApiColor;
69
+ icon: PageIconResponse | null;
70
+ };
71
+ parent: ParentForBlockBasedObjectResponse;
72
+ object: "block";
73
+ id: string;
74
+ created_time: string;
75
+ created_by: PartialUserObjectResponse;
76
+ last_edited_time: string;
77
+ last_edited_by: PartialUserObjectResponse;
78
+ has_children: boolean;
79
+ in_trash: boolean;
80
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
81
+ archived: boolean;
82
+ };
83
+ export type ChildDatabaseBlockObjectResponse = {
84
+ type: "child_database";
85
+ child_database: TitleObjectResponse;
86
+ parent: ParentForBlockBasedObjectResponse;
87
+ object: "block";
88
+ id: string;
89
+ created_time: string;
90
+ created_by: PartialUserObjectResponse;
91
+ last_edited_time: string;
92
+ last_edited_by: PartialUserObjectResponse;
93
+ has_children: boolean;
94
+ in_trash: boolean;
95
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
96
+ archived: boolean;
97
+ };
98
+ export type ChildPageBlockObjectResponse = {
99
+ type: "child_page";
100
+ child_page: TitleObjectResponse;
101
+ parent: ParentForBlockBasedObjectResponse;
102
+ object: "block";
103
+ id: string;
104
+ created_time: string;
105
+ created_by: PartialUserObjectResponse;
106
+ last_edited_time: string;
107
+ last_edited_by: PartialUserObjectResponse;
108
+ has_children: boolean;
109
+ in_trash: boolean;
110
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
111
+ archived: boolean;
112
+ };
113
+ export type CodeBlockObjectResponse = {
114
+ type: "code";
115
+ code: {
116
+ rich_text: Array<RichTextItemResponse>;
117
+ caption: Array<RichTextItemResponse>;
118
+ language: LanguageRequest;
119
+ };
120
+ parent: ParentForBlockBasedObjectResponse;
121
+ object: "block";
122
+ id: string;
123
+ created_time: string;
124
+ created_by: PartialUserObjectResponse;
125
+ last_edited_time: string;
126
+ last_edited_by: PartialUserObjectResponse;
127
+ has_children: boolean;
128
+ in_trash: boolean;
129
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
130
+ archived: boolean;
131
+ };
132
+ export type ColumnBlockObjectResponse = {
133
+ type: "column";
134
+ column: ColumnResponse;
135
+ parent: ParentForBlockBasedObjectResponse;
136
+ object: "block";
137
+ id: string;
138
+ created_time: string;
139
+ created_by: PartialUserObjectResponse;
140
+ last_edited_time: string;
141
+ last_edited_by: PartialUserObjectResponse;
142
+ has_children: boolean;
143
+ in_trash: boolean;
144
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
145
+ archived: boolean;
146
+ };
147
+ export type ColumnListBlockObjectResponse = {
148
+ type: "column_list";
149
+ column_list: EmptyObject;
150
+ parent: ParentForBlockBasedObjectResponse;
151
+ object: "block";
152
+ id: string;
153
+ created_time: string;
154
+ created_by: PartialUserObjectResponse;
155
+ last_edited_time: string;
156
+ last_edited_by: PartialUserObjectResponse;
157
+ has_children: boolean;
158
+ in_trash: boolean;
159
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
160
+ archived: boolean;
161
+ };
162
+ type ColumnResponse = {
163
+ width_ratio?: number;
164
+ };
165
+ type ContentWithRichTextAndColorAndListResponse = {
166
+ rich_text: Array<RichTextItemResponse>;
167
+ color: ApiColor;
168
+ list_start_index?: number;
169
+ list_format?: NumberedListFormat;
170
+ };
171
+ type ContentWithRichTextAndColorResponse = {
172
+ rich_text: Array<RichTextItemResponse>;
173
+ color: ApiColor;
174
+ };
175
+ type ContentWithTableResponse = {
176
+ has_column_header: boolean;
177
+ has_row_header: boolean;
178
+ table_width: number;
179
+ };
180
+ type ContentWithTableRowResponse = {
181
+ cells: Array<Array<RichTextItemResponse>>;
182
+ };
183
+ export type DividerBlockObjectResponse = {
184
+ type: "divider";
185
+ divider: EmptyObject;
186
+ parent: ParentForBlockBasedObjectResponse;
187
+ object: "block";
188
+ id: string;
189
+ created_time: string;
190
+ created_by: PartialUserObjectResponse;
191
+ last_edited_time: string;
192
+ last_edited_by: PartialUserObjectResponse;
193
+ has_children: boolean;
194
+ in_trash: boolean;
195
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
196
+ archived: boolean;
197
+ };
198
+ export type EmbedBlockObjectResponse = {
199
+ type: "embed";
200
+ embed: MediaContentWithUrlAndCaptionResponse;
201
+ parent: ParentForBlockBasedObjectResponse;
202
+ object: "block";
203
+ id: string;
204
+ created_time: string;
205
+ created_by: PartialUserObjectResponse;
206
+ last_edited_time: string;
207
+ last_edited_by: PartialUserObjectResponse;
208
+ has_children: boolean;
209
+ in_trash: boolean;
210
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
211
+ archived: boolean;
212
+ };
213
+ export type EquationBlockObjectResponse = {
214
+ type: "equation";
215
+ equation: ExpressionObjectResponse;
216
+ parent: ParentForBlockBasedObjectResponse;
217
+ object: "block";
218
+ id: string;
219
+ created_time: string;
220
+ created_by: PartialUserObjectResponse;
221
+ last_edited_time: string;
222
+ last_edited_by: PartialUserObjectResponse;
223
+ has_children: boolean;
224
+ in_trash: boolean;
225
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
226
+ archived: boolean;
227
+ };
228
+ type ExpressionObjectResponse = {
229
+ expression: string;
230
+ };
231
+ type ExternalMediaContentWithFileAndCaptionResponse = {
232
+ type: "external";
233
+ external: {
234
+ url: TextRequest;
235
+ };
236
+ caption: Array<RichTextItemResponse>;
237
+ };
238
+ type ExternalMediaContentWithFileNameAndCaptionResponse = {
239
+ type: "external";
240
+ external: {
241
+ url: TextRequest;
242
+ };
243
+ caption: Array<RichTextItemResponse>;
244
+ name: string;
245
+ };
246
+ export type FileBlockObjectResponse = {
247
+ type: "file";
248
+ file: MediaContentWithFileNameAndCaptionResponse;
249
+ parent: ParentForBlockBasedObjectResponse;
250
+ object: "block";
251
+ id: string;
252
+ created_time: string;
253
+ created_by: PartialUserObjectResponse;
254
+ last_edited_time: string;
255
+ last_edited_by: PartialUserObjectResponse;
256
+ has_children: boolean;
257
+ in_trash: boolean;
258
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
259
+ archived: boolean;
260
+ };
261
+ type FileMediaContentWithFileAndCaptionResponse = {
262
+ type: "file";
263
+ file: InternalFileResponse;
264
+ caption: Array<RichTextItemResponse>;
265
+ };
266
+ type FileMediaContentWithFileNameAndCaptionResponse = {
267
+ type: "file";
268
+ file: InternalFileResponse;
269
+ caption: Array<RichTextItemResponse>;
270
+ name: string;
271
+ };
272
+ type HeaderContentWithRichTextAndColorResponse = {
273
+ rich_text: Array<RichTextItemResponse>;
274
+ color: ApiColor;
275
+ is_toggleable: boolean;
276
+ };
277
+ export type Heading1BlockObjectResponse = {
278
+ type: "heading_1";
279
+ heading_1: HeaderContentWithRichTextAndColorResponse;
280
+ parent: ParentForBlockBasedObjectResponse;
281
+ object: "block";
282
+ id: string;
283
+ created_time: string;
284
+ created_by: PartialUserObjectResponse;
285
+ last_edited_time: string;
286
+ last_edited_by: PartialUserObjectResponse;
287
+ has_children: boolean;
288
+ in_trash: boolean;
289
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
290
+ archived: boolean;
291
+ };
292
+ export type Heading2BlockObjectResponse = {
293
+ type: "heading_2";
294
+ heading_2: HeaderContentWithRichTextAndColorResponse;
295
+ parent: ParentForBlockBasedObjectResponse;
296
+ object: "block";
297
+ id: string;
298
+ created_time: string;
299
+ created_by: PartialUserObjectResponse;
300
+ last_edited_time: string;
301
+ last_edited_by: PartialUserObjectResponse;
302
+ has_children: boolean;
303
+ in_trash: boolean;
304
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
305
+ archived: boolean;
306
+ };
307
+ export type Heading3BlockObjectResponse = {
308
+ type: "heading_3";
309
+ heading_3: HeaderContentWithRichTextAndColorResponse;
310
+ parent: ParentForBlockBasedObjectResponse;
311
+ object: "block";
312
+ id: string;
313
+ created_time: string;
314
+ created_by: PartialUserObjectResponse;
315
+ last_edited_time: string;
316
+ last_edited_by: PartialUserObjectResponse;
317
+ has_children: boolean;
318
+ in_trash: boolean;
319
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
320
+ archived: boolean;
321
+ };
322
+ export type ImageBlockObjectResponse = {
323
+ type: "image";
324
+ image: MediaContentWithFileAndCaptionResponse;
325
+ parent: ParentForBlockBasedObjectResponse;
326
+ object: "block";
327
+ id: string;
328
+ created_time: string;
329
+ created_by: PartialUserObjectResponse;
330
+ last_edited_time: string;
331
+ last_edited_by: PartialUserObjectResponse;
332
+ has_children: boolean;
333
+ in_trash: boolean;
334
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
335
+ archived: boolean;
336
+ };
337
+ export type LinkPreviewBlockObjectResponse = {
338
+ type: "link_preview";
339
+ link_preview: MediaContentWithUrlResponse;
340
+ parent: ParentForBlockBasedObjectResponse;
341
+ object: "block";
342
+ id: string;
343
+ created_time: string;
344
+ created_by: PartialUserObjectResponse;
345
+ last_edited_time: string;
346
+ last_edited_by: PartialUserObjectResponse;
347
+ has_children: boolean;
348
+ in_trash: boolean;
349
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
350
+ archived: boolean;
351
+ };
352
+ export type LinkToPageBlockObjectResponse = {
353
+ type: "link_to_page";
354
+ link_to_page: {
355
+ type: "page_id";
356
+ page_id: IdRequest;
357
+ } | {
358
+ type: "database_id";
359
+ database_id: IdRequest;
360
+ } | {
361
+ type: "comment_id";
362
+ comment_id: IdRequest;
363
+ };
364
+ parent: ParentForBlockBasedObjectResponse;
365
+ object: "block";
366
+ id: string;
367
+ created_time: string;
368
+ created_by: PartialUserObjectResponse;
369
+ last_edited_time: string;
370
+ last_edited_by: PartialUserObjectResponse;
371
+ has_children: boolean;
372
+ in_trash: boolean;
373
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
374
+ archived: boolean;
375
+ };
376
+ type MediaContentWithFileAndCaptionResponse = ExternalMediaContentWithFileAndCaptionResponse | FileMediaContentWithFileAndCaptionResponse;
377
+ type MediaContentWithFileNameAndCaptionResponse = ExternalMediaContentWithFileNameAndCaptionResponse | FileMediaContentWithFileNameAndCaptionResponse;
378
+ type MediaContentWithUrlAndCaptionResponse = {
379
+ url: string;
380
+ caption: Array<RichTextItemResponse>;
381
+ };
382
+ type MediaContentWithUrlResponse = {
383
+ url: TextRequest;
384
+ };
385
+ /**
386
+ * @deprecated Use MeetingNotesBlockObjectResponse instead. Renamed in API version 2026-03-11.
387
+ */
388
+ export type TranscriptionBlockObjectResponse = {
389
+ type: "transcription";
390
+ transcription: TranscriptionBlockResponse;
391
+ parent: ParentForBlockBasedObjectResponse;
392
+ object: "block";
393
+ id: string;
394
+ created_time: string;
395
+ created_by: PartialUserObjectResponse;
396
+ last_edited_time: string;
397
+ last_edited_by: PartialUserObjectResponse;
398
+ has_children: boolean;
399
+ in_trash: boolean;
400
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
401
+ archived: boolean;
402
+ };
403
+ export type MeetingNotesBlockObjectResponse = {
404
+ type: "meeting_notes";
405
+ meeting_notes: TranscriptionBlockResponse;
406
+ parent: ParentForBlockBasedObjectResponse;
407
+ object: "block";
408
+ id: string;
409
+ created_time: string;
410
+ created_by: PartialUserObjectResponse;
411
+ last_edited_time: string;
412
+ last_edited_by: PartialUserObjectResponse;
413
+ has_children: boolean;
414
+ in_trash: boolean;
415
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
416
+ archived: boolean;
417
+ };
418
+ type NumberedListFormat = "numbers" | "letters" | "roman";
419
+ export type NumberedListItemBlockObjectResponse = {
420
+ type: "numbered_list_item";
421
+ numbered_list_item: ContentWithRichTextAndColorAndListResponse;
422
+ parent: ParentForBlockBasedObjectResponse;
423
+ object: "block";
424
+ id: string;
425
+ created_time: string;
426
+ created_by: PartialUserObjectResponse;
427
+ last_edited_time: string;
428
+ last_edited_by: PartialUserObjectResponse;
429
+ has_children: boolean;
430
+ in_trash: boolean;
431
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
432
+ archived: boolean;
433
+ };
434
+ export type ParagraphBlockObjectResponse = {
435
+ type: "paragraph";
436
+ paragraph: ContentWithRichTextAndColorResponse;
437
+ parent: ParentForBlockBasedObjectResponse;
438
+ object: "block";
439
+ id: string;
440
+ created_time: string;
441
+ created_by: PartialUserObjectResponse;
442
+ last_edited_time: string;
443
+ last_edited_by: PartialUserObjectResponse;
444
+ has_children: boolean;
445
+ in_trash: boolean;
446
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
447
+ archived: boolean;
448
+ };
449
+ export type PartialBlockObjectResponse = {
450
+ object: "block";
451
+ id: string;
452
+ };
453
+ export type PdfBlockObjectResponse = {
454
+ type: "pdf";
455
+ pdf: MediaContentWithFileAndCaptionResponse;
456
+ parent: ParentForBlockBasedObjectResponse;
457
+ object: "block";
458
+ id: string;
459
+ created_time: string;
460
+ created_by: PartialUserObjectResponse;
461
+ last_edited_time: string;
462
+ last_edited_by: PartialUserObjectResponse;
463
+ has_children: boolean;
464
+ in_trash: boolean;
465
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
466
+ archived: boolean;
467
+ };
468
+ export type QuoteBlockObjectResponse = {
469
+ type: "quote";
470
+ quote: ContentWithRichTextAndColorResponse;
471
+ parent: ParentForBlockBasedObjectResponse;
472
+ object: "block";
473
+ id: string;
474
+ created_time: string;
475
+ created_by: PartialUserObjectResponse;
476
+ last_edited_time: string;
477
+ last_edited_by: PartialUserObjectResponse;
478
+ has_children: boolean;
479
+ in_trash: boolean;
480
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
481
+ archived: boolean;
482
+ };
483
+ export type SyncedBlockBlockObjectResponse = {
484
+ type: "synced_block";
485
+ synced_block: {
486
+ synced_from: {
487
+ type: "block_id";
488
+ block_id: IdRequest;
489
+ } | null;
490
+ };
491
+ parent: ParentForBlockBasedObjectResponse;
492
+ object: "block";
493
+ id: string;
494
+ created_time: string;
495
+ created_by: PartialUserObjectResponse;
496
+ last_edited_time: string;
497
+ last_edited_by: PartialUserObjectResponse;
498
+ has_children: boolean;
499
+ in_trash: boolean;
500
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
501
+ archived: boolean;
502
+ };
503
+ export type TabBlockObjectResponse = {
504
+ type: "tab";
505
+ tab: EmptyObject;
506
+ parent: ParentForBlockBasedObjectResponse;
507
+ object: "block";
508
+ id: string;
509
+ created_time: string;
510
+ created_by: PartialUserObjectResponse;
511
+ last_edited_time: string;
512
+ last_edited_by: PartialUserObjectResponse;
513
+ has_children: boolean;
514
+ in_trash: boolean;
515
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
516
+ archived: boolean;
517
+ };
518
+ export type TableBlockObjectResponse = {
519
+ type: "table";
520
+ table: ContentWithTableResponse;
521
+ parent: ParentForBlockBasedObjectResponse;
522
+ object: "block";
523
+ id: string;
524
+ created_time: string;
525
+ created_by: PartialUserObjectResponse;
526
+ last_edited_time: string;
527
+ last_edited_by: PartialUserObjectResponse;
528
+ has_children: boolean;
529
+ in_trash: boolean;
530
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
531
+ archived: boolean;
532
+ };
533
+ export type TableOfContentsBlockObjectResponse = {
534
+ type: "table_of_contents";
535
+ table_of_contents: {
536
+ color: ApiColor;
537
+ };
538
+ parent: ParentForBlockBasedObjectResponse;
539
+ object: "block";
540
+ id: string;
541
+ created_time: string;
542
+ created_by: PartialUserObjectResponse;
543
+ last_edited_time: string;
544
+ last_edited_by: PartialUserObjectResponse;
545
+ has_children: boolean;
546
+ in_trash: boolean;
547
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
548
+ archived: boolean;
549
+ };
550
+ export type TableRowBlockObjectResponse = {
551
+ type: "table_row";
552
+ table_row: ContentWithTableRowResponse;
553
+ parent: ParentForBlockBasedObjectResponse;
554
+ object: "block";
555
+ id: string;
556
+ created_time: string;
557
+ created_by: PartialUserObjectResponse;
558
+ last_edited_time: string;
559
+ last_edited_by: PartialUserObjectResponse;
560
+ has_children: boolean;
561
+ in_trash: boolean;
562
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
563
+ archived: boolean;
564
+ };
565
+ export type TemplateBlockObjectResponse = {
566
+ type: "template";
567
+ template: {
568
+ rich_text: Array<RichTextItemResponse>;
569
+ };
570
+ parent: ParentForBlockBasedObjectResponse;
571
+ object: "block";
572
+ id: string;
573
+ created_time: string;
574
+ created_by: PartialUserObjectResponse;
575
+ last_edited_time: string;
576
+ last_edited_by: PartialUserObjectResponse;
577
+ has_children: boolean;
578
+ in_trash: boolean;
579
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
580
+ archived: boolean;
581
+ };
582
+ type TitleObjectResponse = {
583
+ title: string;
584
+ };
585
+ export type ToDoBlockObjectResponse = {
586
+ type: "to_do";
587
+ to_do: {
588
+ rich_text: Array<RichTextItemResponse>;
589
+ color: ApiColor;
590
+ checked: boolean;
591
+ };
592
+ parent: ParentForBlockBasedObjectResponse;
593
+ object: "block";
594
+ id: string;
595
+ created_time: string;
596
+ created_by: PartialUserObjectResponse;
597
+ last_edited_time: string;
598
+ last_edited_by: PartialUserObjectResponse;
599
+ has_children: boolean;
600
+ in_trash: boolean;
601
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
602
+ archived: boolean;
603
+ };
604
+ export type ToggleBlockObjectResponse = {
605
+ type: "toggle";
606
+ toggle: ContentWithRichTextAndColorResponse;
607
+ parent: ParentForBlockBasedObjectResponse;
608
+ object: "block";
609
+ id: string;
610
+ created_time: string;
611
+ created_by: PartialUserObjectResponse;
612
+ last_edited_time: string;
613
+ last_edited_by: PartialUserObjectResponse;
614
+ has_children: boolean;
615
+ in_trash: boolean;
616
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
617
+ archived: boolean;
618
+ };
619
+ type TranscriptionBlockResponse = {
620
+ title?: Array<RichTextItemResponse>;
621
+ status?: ApiTranscriptionStatus;
622
+ children?: TranscriptionChildrenResponse;
623
+ calendar_event?: TranscriptionCalendarEventResponse;
624
+ recording?: TranscriptionRecordingResponse;
625
+ };
626
+ type TranscriptionCalendarEventResponse = {
627
+ start_time: string;
628
+ end_time: string;
629
+ attendees?: Array<IdRequest>;
630
+ };
631
+ type TranscriptionChildrenResponse = {
632
+ summary_block_id?: IdRequest;
633
+ notes_block_id?: IdRequest;
634
+ transcript_block_id?: IdRequest;
635
+ };
636
+ type TranscriptionRecordingResponse = {
637
+ start_time?: string;
638
+ end_time?: string;
639
+ };
640
+ export type UnsupportedBlockObjectResponse = {
641
+ type: "unsupported";
642
+ unsupported: {
643
+ block_type: string;
644
+ };
645
+ parent: ParentForBlockBasedObjectResponse;
646
+ object: "block";
647
+ id: string;
648
+ created_time: string;
649
+ created_by: PartialUserObjectResponse;
650
+ last_edited_time: string;
651
+ last_edited_by: PartialUserObjectResponse;
652
+ has_children: boolean;
653
+ in_trash: boolean;
654
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
655
+ archived: boolean;
656
+ };
657
+ export type VideoBlockObjectResponse = {
658
+ type: "video";
659
+ video: MediaContentWithFileAndCaptionResponse;
660
+ parent: ParentForBlockBasedObjectResponse;
661
+ object: "block";
662
+ id: string;
663
+ created_time: string;
664
+ created_by: PartialUserObjectResponse;
665
+ last_edited_time: string;
666
+ last_edited_by: PartialUserObjectResponse;
667
+ has_children: boolean;
668
+ in_trash: boolean;
669
+ /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
670
+ archived: boolean;
671
+ };
672
+ type GetBlockPathParameters = {
673
+ block_id: IdRequest;
674
+ };
675
+ export type GetBlockParameters = GetBlockPathParameters;
676
+ export type GetBlockResponse = PartialBlockObjectResponse | BlockObjectResponse;
677
+ /**
678
+ * Retrieve a block
679
+ */
680
+ export declare const getBlock: {
681
+ readonly method: "get";
682
+ readonly pathParams: readonly ["block_id"];
683
+ readonly queryParams: readonly [];
684
+ readonly bodyParams: readonly [];
685
+ readonly path: (p: GetBlockPathParameters) => string;
686
+ };
687
+ type UpdateBlockPathParameters = {
688
+ block_id: IdRequest;
689
+ };
690
+ type UpdateBlockBodyParameters = {
691
+ embed: UpdateMediaContentWithUrlAndCaptionRequest;
692
+ type?: "embed";
693
+ in_trash?: boolean;
694
+ /** @deprecated Use `in_trash` instead. */
695
+ archived?: boolean;
696
+ } | {
697
+ bookmark: UpdateMediaContentWithUrlAndCaptionRequest;
698
+ type?: "bookmark";
699
+ in_trash?: boolean;
700
+ /** @deprecated Use `in_trash` instead. */
701
+ archived?: boolean;
702
+ } | {
703
+ image: UpdateMediaContentWithFileAndCaptionRequest;
704
+ type?: "image";
705
+ in_trash?: boolean;
706
+ /** @deprecated Use `in_trash` instead. */
707
+ archived?: boolean;
708
+ } | {
709
+ video: UpdateMediaContentWithFileAndCaptionRequest;
710
+ type?: "video";
711
+ in_trash?: boolean;
712
+ /** @deprecated Use `in_trash` instead. */
713
+ archived?: boolean;
714
+ } | {
715
+ pdf: UpdateMediaContentWithFileAndCaptionRequest;
716
+ type?: "pdf";
717
+ in_trash?: boolean;
718
+ /** @deprecated Use `in_trash` instead. */
719
+ archived?: boolean;
720
+ } | {
721
+ file: UpdateMediaContentWithFileNameAndCaptionRequest;
722
+ type?: "file";
723
+ in_trash?: boolean;
724
+ /** @deprecated Use `in_trash` instead. */
725
+ archived?: boolean;
726
+ } | {
727
+ audio: UpdateMediaContentWithFileAndCaptionRequest;
728
+ type?: "audio";
729
+ in_trash?: boolean;
730
+ /** @deprecated Use `in_trash` instead. */
731
+ archived?: boolean;
732
+ } | {
733
+ code: {
734
+ rich_text?: Array<RichTextItemRequest>;
735
+ language?: LanguageRequest;
736
+ caption?: Array<RichTextItemRequest>;
737
+ };
738
+ type?: "code";
739
+ in_trash?: boolean;
740
+ /** @deprecated Use `in_trash` instead. */
741
+ archived?: boolean;
742
+ } | {
743
+ equation: ContentWithExpressionRequest;
744
+ type?: "equation";
745
+ in_trash?: boolean;
746
+ /** @deprecated Use `in_trash` instead. */
747
+ archived?: boolean;
748
+ } | {
749
+ divider: EmptyObject;
750
+ type?: "divider";
751
+ in_trash?: boolean;
752
+ /** @deprecated Use `in_trash` instead. */
753
+ archived?: boolean;
754
+ } | {
755
+ breadcrumb: EmptyObject;
756
+ type?: "breadcrumb";
757
+ in_trash?: boolean;
758
+ /** @deprecated Use `in_trash` instead. */
759
+ archived?: boolean;
760
+ } | {
761
+ tab: EmptyObject;
762
+ type?: "tab";
763
+ in_trash?: boolean;
764
+ /** @deprecated Use `in_trash` instead. */
765
+ archived?: boolean;
766
+ } | {
767
+ table_of_contents: {
768
+ color?: ApiColor;
769
+ };
770
+ type?: "table_of_contents";
771
+ in_trash?: boolean;
772
+ /** @deprecated Use `in_trash` instead. */
773
+ archived?: boolean;
774
+ } | {
775
+ link_to_page: {
776
+ page_id: IdRequest;
777
+ type?: "page_id";
778
+ } | {
779
+ database_id: IdRequest;
780
+ type?: "database_id";
781
+ } | {
782
+ comment_id: IdRequest;
783
+ type?: "comment_id";
784
+ };
785
+ type?: "link_to_page";
786
+ in_trash?: boolean;
787
+ /** @deprecated Use `in_trash` instead. */
788
+ archived?: boolean;
789
+ } | {
790
+ table_row: ContentWithTableRowRequest;
791
+ type?: "table_row";
792
+ in_trash?: boolean;
793
+ /** @deprecated Use `in_trash` instead. */
794
+ archived?: boolean;
795
+ } | {
796
+ heading_1: HeaderContentWithRichTextAndColorRequest;
797
+ type?: "heading_1";
798
+ in_trash?: boolean;
799
+ /** @deprecated Use `in_trash` instead. */
800
+ archived?: boolean;
801
+ } | {
802
+ heading_2: HeaderContentWithRichTextAndColorRequest;
803
+ type?: "heading_2";
804
+ in_trash?: boolean;
805
+ /** @deprecated Use `in_trash` instead. */
806
+ archived?: boolean;
807
+ } | {
808
+ heading_3: HeaderContentWithRichTextAndColorRequest;
809
+ type?: "heading_3";
810
+ in_trash?: boolean;
811
+ /** @deprecated Use `in_trash` instead. */
812
+ archived?: boolean;
813
+ } | {
814
+ paragraph: ContentWithRichTextAndColorRequest;
815
+ type?: "paragraph";
816
+ in_trash?: boolean;
817
+ /** @deprecated Use `in_trash` instead. */
818
+ archived?: boolean;
819
+ } | {
820
+ bulleted_list_item: ContentWithRichTextAndColorRequest;
821
+ type?: "bulleted_list_item";
822
+ in_trash?: boolean;
823
+ /** @deprecated Use `in_trash` instead. */
824
+ archived?: boolean;
825
+ } | {
826
+ numbered_list_item: ContentWithRichTextAndColorRequest;
827
+ type?: "numbered_list_item";
828
+ in_trash?: boolean;
829
+ /** @deprecated Use `in_trash` instead. */
830
+ archived?: boolean;
831
+ } | {
832
+ quote: ContentWithRichTextAndColorRequest;
833
+ type?: "quote";
834
+ in_trash?: boolean;
835
+ /** @deprecated Use `in_trash` instead. */
836
+ archived?: boolean;
837
+ } | {
838
+ to_do: {
839
+ rich_text?: Array<RichTextItemRequest>;
840
+ checked?: boolean;
841
+ color?: ApiColor;
842
+ };
843
+ type?: "to_do";
844
+ in_trash?: boolean;
845
+ /** @deprecated Use `in_trash` instead. */
846
+ archived?: boolean;
847
+ } | {
848
+ toggle: ContentWithRichTextAndColorRequest;
849
+ type?: "toggle";
850
+ in_trash?: boolean;
851
+ /** @deprecated Use `in_trash` instead. */
852
+ archived?: boolean;
853
+ } | {
854
+ template: ContentWithRichTextRequest;
855
+ type?: "template";
856
+ in_trash?: boolean;
857
+ /** @deprecated Use `in_trash` instead. */
858
+ archived?: boolean;
859
+ } | {
860
+ callout: {
861
+ rich_text?: Array<RichTextItemRequest>;
862
+ icon?: PageIconRequest;
863
+ color?: ApiColor;
864
+ };
865
+ type?: "callout";
866
+ in_trash?: boolean;
867
+ /** @deprecated Use `in_trash` instead. */
868
+ archived?: boolean;
869
+ } | {
870
+ synced_block: {
871
+ synced_from: {
872
+ block_id: IdRequest;
873
+ type?: "block_id";
874
+ } | null;
875
+ };
876
+ type?: "synced_block";
877
+ in_trash?: boolean;
878
+ /** @deprecated Use `in_trash` instead. */
879
+ archived?: boolean;
880
+ } | {
881
+ table: {
882
+ has_column_header?: boolean;
883
+ has_row_header?: boolean;
884
+ };
885
+ type?: "table";
886
+ in_trash?: boolean;
887
+ /** @deprecated Use `in_trash` instead. */
888
+ archived?: boolean;
889
+ } | {
890
+ column: {
891
+ width_ratio?: number;
892
+ };
893
+ type?: "column";
894
+ in_trash?: boolean;
895
+ /** @deprecated Use `in_trash` instead. */
896
+ archived?: boolean;
897
+ } | {
898
+ in_trash?: boolean;
899
+ /** @deprecated Use `in_trash` instead. */
900
+ archived?: boolean;
901
+ };
902
+ export type UpdateBlockParameters = UpdateBlockPathParameters & UpdateBlockBodyParameters;
903
+ export type UpdateBlockResponse = PartialBlockObjectResponse | BlockObjectResponse;
904
+ /**
905
+ * Update a block
906
+ */
907
+ export declare const updateBlock: {
908
+ readonly method: "patch";
909
+ readonly pathParams: readonly ["block_id"];
910
+ readonly queryParams: readonly [];
911
+ readonly bodyParams: readonly ["archived", "embed", "type", "in_trash", "bookmark", "image", "video", "pdf", "file", "audio", "code", "equation", "divider", "breadcrumb", "tab", "table_of_contents", "link_to_page", "table_row", "heading_1", "heading_2", "heading_3", "paragraph", "bulleted_list_item", "numbered_list_item", "quote", "to_do", "toggle", "template", "callout", "synced_block", "table", "column"];
912
+ readonly path: (p: UpdateBlockPathParameters) => string;
913
+ };
914
+ type DeleteBlockPathParameters = {
915
+ block_id: IdRequest;
916
+ };
917
+ export type DeleteBlockParameters = DeleteBlockPathParameters;
918
+ export type DeleteBlockResponse = PartialBlockObjectResponse | BlockObjectResponse;
919
+ /**
920
+ * Delete a block
921
+ */
922
+ export declare const deleteBlock: {
923
+ readonly method: "delete";
924
+ readonly pathParams: readonly ["block_id"];
925
+ readonly queryParams: readonly [];
926
+ readonly bodyParams: readonly [];
927
+ readonly path: (p: DeleteBlockPathParameters) => string;
928
+ };
929
+ type ListBlockChildrenPathParameters = {
930
+ block_id: IdRequest;
931
+ };
932
+ type ListBlockChildrenQueryParameters = {
933
+ start_cursor?: string;
934
+ page_size?: number;
935
+ };
936
+ export type ListBlockChildrenParameters = ListBlockChildrenPathParameters & ListBlockChildrenQueryParameters;
937
+ export type ListBlockChildrenResponse = {
938
+ type: "block";
939
+ block: EmptyObject;
940
+ object: "list";
941
+ next_cursor: string | null;
942
+ has_more: boolean;
943
+ results: Array<PartialBlockObjectResponse | BlockObjectResponse>;
944
+ };
945
+ /**
946
+ * Retrieve block children
947
+ */
948
+ export declare const listBlockChildren: {
949
+ readonly method: "get";
950
+ readonly pathParams: readonly ["block_id"];
951
+ readonly queryParams: readonly ["start_cursor", "page_size"];
952
+ readonly bodyParams: readonly [];
953
+ readonly path: (p: ListBlockChildrenPathParameters) => string;
954
+ };
955
+ type AppendBlockChildrenPathParameters = {
956
+ block_id: IdRequest;
957
+ };
958
+ type AppendBlockChildrenBodyParameters = {
959
+ children: Array<BlockObjectRequest>;
960
+ /** @deprecated Use `position` instead. */
961
+ after?: IdRequest;
962
+ position?: ContentPositionSchema;
963
+ };
964
+ export type AppendBlockChildrenParameters = AppendBlockChildrenPathParameters & AppendBlockChildrenBodyParameters;
965
+ export type AppendBlockChildrenResponse = {
966
+ type: "block";
967
+ block: EmptyObject;
968
+ object: "list";
969
+ next_cursor: string | null;
970
+ has_more: boolean;
971
+ results: Array<PartialBlockObjectResponse | BlockObjectResponse>;
972
+ };
973
+ /**
974
+ * Append block children
975
+ */
976
+ export declare const appendBlockChildren: {
977
+ readonly method: "patch";
978
+ readonly pathParams: readonly ["block_id"];
979
+ readonly queryParams: readonly [];
980
+ readonly bodyParams: readonly ["after", "children", "position"];
981
+ readonly path: (p: AppendBlockChildrenPathParameters) => string;
982
+ };
983
+ export {};
984
+ //# sourceMappingURL=blocks.d.ts.map