@notionhq/client 5.13.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 (70) hide show
  1. package/build/package.json +1 -1
  2. package/build/src/Client.d.ts +43 -1
  3. package/build/src/Client.d.ts.map +1 -1
  4. package/build/src/Client.js +139 -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 -4078
  59. package/build/src/api-endpoints.d.ts.map +1 -1
  60. package/build/src/api-endpoints.js +31 -452
  61. package/build/src/api-endpoints.js.map +1 -1
  62. package/build/src/helpers.d.ts +5 -1
  63. package/build/src/helpers.d.ts.map +1 -1
  64. package/build/src/helpers.js +7 -0
  65. package/build/src/helpers.js.map +1 -1
  66. package/build/src/index.d.ts +2 -2
  67. package/build/src/index.d.ts.map +1 -1
  68. package/build/src/index.js +2 -1
  69. package/build/src/index.js.map +1 -1
  70. package/package.json +1 -1
@@ -1,4079 +1,14 @@
1
- type AnnotationRequest = {
2
- bold?: boolean;
3
- italic?: boolean;
4
- strikethrough?: boolean;
5
- underline?: boolean;
6
- code?: boolean;
7
- color?: ApiColor;
8
- };
9
- type AnnotationResponse = {
10
- bold: boolean;
11
- italic: boolean;
12
- strikethrough: boolean;
13
- underline: boolean;
14
- code: boolean;
15
- color: ApiColor;
16
- };
17
- /**
18
- * One of: `default`, `gray`, `brown`, `orange`, `yellow`, `green`, `blue`, `purple`,
19
- * `pink`, `red`, `default_background`, `gray_background`, `brown_background`,
20
- * `orange_background`, `yellow_background`, `green_background`, `blue_background`,
21
- * `purple_background`, `pink_background`, `red_background`
22
- */
23
- type ApiColor = "default" | "gray" | "brown" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "red" | "default_background" | "gray_background" | "brown_background" | "orange_background" | "yellow_background" | "green_background" | "blue_background" | "purple_background" | "pink_background" | "red_background";
24
- type ApiTranscriptionStatus = "transcription_not_started" | "transcription_paused" | "transcription_in_progress" | "summary_in_progress" | "notes_ready";
25
- type ArrayBasedPropertyValueResponse = TitleArrayBasedPropertyValueResponse | RichTextArrayBasedPropertyValueResponse | PeopleArrayBasedPropertyValueResponse | RelationArrayBasedPropertyValueResponse;
26
- type ArrayPartialRollupValueResponse = {
27
- type: "array";
28
- array: Array<SimpleOrArrayPropertyValueResponse>;
29
- };
30
- export type AudioBlockObjectResponse = {
31
- type: "audio";
32
- audio: MediaContentWithFileAndCaptionResponse;
33
- parent: ParentForBlockBasedObjectResponse;
34
- object: "block";
35
- id: string;
36
- created_time: string;
37
- created_by: PartialUserObjectResponse;
38
- last_edited_time: string;
39
- last_edited_by: PartialUserObjectResponse;
40
- has_children: boolean;
41
- in_trash: boolean;
42
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
43
- archived: boolean;
44
- };
45
- type BlockIdCommentParentResponse = {
46
- type: "block_id";
47
- block_id: IdResponse;
48
- };
49
- type BlockIdParentForBlockBasedObjectResponse = {
50
- type: "block_id";
51
- block_id: IdResponse;
52
- };
53
- export type BlockObjectRequest = {
54
- embed: MediaContentWithUrlAndCaptionRequest;
55
- type?: "embed";
56
- object?: "block";
57
- } | {
58
- bookmark: MediaContentWithUrlAndCaptionRequest;
59
- type?: "bookmark";
60
- object?: "block";
61
- } | {
62
- image: MediaContentWithFileAndCaptionRequest;
63
- type?: "image";
64
- object?: "block";
65
- } | {
66
- video: MediaContentWithFileAndCaptionRequest;
67
- type?: "video";
68
- object?: "block";
69
- } | {
70
- pdf: MediaContentWithFileAndCaptionRequest;
71
- type?: "pdf";
72
- object?: "block";
73
- } | {
74
- file: MediaContentWithFileNameAndCaptionRequest;
75
- type?: "file";
76
- object?: "block";
77
- } | {
78
- audio: MediaContentWithFileAndCaptionRequest;
79
- type?: "audio";
80
- object?: "block";
81
- } | {
82
- code: {
83
- rich_text: Array<RichTextItemRequest>;
84
- language: LanguageRequest;
85
- caption?: Array<RichTextItemRequest>;
86
- };
87
- type?: "code";
88
- object?: "block";
89
- } | {
90
- equation: ContentWithExpressionRequest;
91
- type?: "equation";
92
- object?: "block";
93
- } | {
94
- divider: EmptyObject;
95
- type?: "divider";
96
- object?: "block";
97
- } | {
98
- breadcrumb: EmptyObject;
99
- type?: "breadcrumb";
100
- object?: "block";
101
- } | {
102
- table_of_contents: {
103
- color?: ApiColor;
104
- };
105
- type?: "table_of_contents";
106
- object?: "block";
107
- } | {
108
- link_to_page: {
109
- page_id: IdRequest;
110
- type?: "page_id";
111
- } | {
112
- database_id: IdRequest;
113
- type?: "database_id";
114
- } | {
115
- comment_id: IdRequest;
116
- type?: "comment_id";
117
- };
118
- type?: "link_to_page";
119
- object?: "block";
120
- } | {
121
- table_row: ContentWithTableRowRequest;
122
- type?: "table_row";
123
- object?: "block";
124
- } | {
125
- table: TableRequestWithTableRowChildren;
126
- type?: "table";
127
- object?: "block";
128
- } | {
129
- column_list: ColumnListRequest;
130
- type?: "column_list";
131
- object?: "block";
132
- } | {
133
- column: ColumnWithChildrenRequest;
134
- type?: "column";
135
- object?: "block";
136
- } | {
137
- heading_1: {
138
- rich_text: Array<RichTextItemRequest>;
139
- color?: ApiColor;
140
- is_toggleable?: boolean;
141
- children?: Array<BlockObjectWithSingleLevelOfChildrenRequest>;
142
- };
143
- type?: "heading_1";
144
- object?: "block";
145
- } | {
146
- heading_2: {
147
- rich_text: Array<RichTextItemRequest>;
148
- color?: ApiColor;
149
- is_toggleable?: boolean;
150
- children?: Array<BlockObjectWithSingleLevelOfChildrenRequest>;
151
- };
152
- type?: "heading_2";
153
- object?: "block";
154
- } | {
155
- heading_3: {
156
- rich_text: Array<RichTextItemRequest>;
157
- color?: ApiColor;
158
- is_toggleable?: boolean;
159
- children?: Array<BlockObjectWithSingleLevelOfChildrenRequest>;
160
- };
161
- type?: "heading_3";
162
- object?: "block";
163
- } | {
164
- paragraph: {
165
- rich_text: Array<RichTextItemRequest>;
166
- color?: ApiColor;
167
- children?: Array<BlockObjectWithSingleLevelOfChildrenRequest>;
168
- };
169
- type?: "paragraph";
170
- object?: "block";
171
- } | {
172
- bulleted_list_item: {
173
- rich_text: Array<RichTextItemRequest>;
174
- color?: ApiColor;
175
- children?: Array<BlockObjectWithSingleLevelOfChildrenRequest>;
176
- };
177
- type?: "bulleted_list_item";
178
- object?: "block";
179
- } | {
180
- numbered_list_item: {
181
- rich_text: Array<RichTextItemRequest>;
182
- color?: ApiColor;
183
- children?: Array<BlockObjectWithSingleLevelOfChildrenRequest>;
184
- };
185
- type?: "numbered_list_item";
186
- object?: "block";
187
- } | {
188
- quote: {
189
- rich_text: Array<RichTextItemRequest>;
190
- color?: ApiColor;
191
- children?: Array<BlockObjectWithSingleLevelOfChildrenRequest>;
192
- };
193
- type?: "quote";
194
- object?: "block";
195
- } | {
196
- to_do: {
197
- rich_text: Array<RichTextItemRequest>;
198
- color?: ApiColor;
199
- children?: Array<BlockObjectWithSingleLevelOfChildrenRequest>;
200
- checked?: boolean;
201
- };
202
- type?: "to_do";
203
- object?: "block";
204
- } | {
205
- toggle: {
206
- rich_text: Array<RichTextItemRequest>;
207
- color?: ApiColor;
208
- children?: Array<BlockObjectWithSingleLevelOfChildrenRequest>;
209
- };
210
- type?: "toggle";
211
- object?: "block";
212
- } | {
213
- template: {
214
- rich_text: Array<RichTextItemRequest>;
215
- children?: Array<BlockObjectWithSingleLevelOfChildrenRequest>;
216
- };
217
- type?: "template";
218
- object?: "block";
219
- } | {
220
- callout: {
221
- rich_text: Array<RichTextItemRequest>;
222
- color?: ApiColor;
223
- children?: Array<BlockObjectWithSingleLevelOfChildrenRequest>;
224
- icon?: PageIconRequest;
225
- };
226
- type?: "callout";
227
- object?: "block";
228
- } | {
229
- synced_block: {
230
- synced_from: {
231
- block_id: IdRequest;
232
- type?: "block_id";
233
- } | null;
234
- children?: Array<BlockObjectWithSingleLevelOfChildrenRequest>;
235
- };
236
- type?: "synced_block";
237
- object?: "block";
238
- };
239
- export type BlockObjectRequestWithoutChildren = {
240
- embed: MediaContentWithUrlAndCaptionRequest;
241
- type?: "embed";
242
- object?: "block";
243
- } | {
244
- bookmark: MediaContentWithUrlAndCaptionRequest;
245
- type?: "bookmark";
246
- object?: "block";
247
- } | {
248
- image: MediaContentWithFileAndCaptionRequest;
249
- type?: "image";
250
- object?: "block";
251
- } | {
252
- video: MediaContentWithFileAndCaptionRequest;
253
- type?: "video";
254
- object?: "block";
255
- } | {
256
- pdf: MediaContentWithFileAndCaptionRequest;
257
- type?: "pdf";
258
- object?: "block";
259
- } | {
260
- file: MediaContentWithFileNameAndCaptionRequest;
261
- type?: "file";
262
- object?: "block";
263
- } | {
264
- audio: MediaContentWithFileAndCaptionRequest;
265
- type?: "audio";
266
- object?: "block";
267
- } | {
268
- code: {
269
- rich_text: Array<RichTextItemRequest>;
270
- language: LanguageRequest;
271
- caption?: Array<RichTextItemRequest>;
272
- };
273
- type?: "code";
274
- object?: "block";
275
- } | {
276
- equation: ContentWithExpressionRequest;
277
- type?: "equation";
278
- object?: "block";
279
- } | {
280
- divider: EmptyObject;
281
- type?: "divider";
282
- object?: "block";
283
- } | {
284
- breadcrumb: EmptyObject;
285
- type?: "breadcrumb";
286
- object?: "block";
287
- } | {
288
- table_of_contents: {
289
- color?: ApiColor;
290
- };
291
- type?: "table_of_contents";
292
- object?: "block";
293
- } | {
294
- link_to_page: {
295
- page_id: IdRequest;
296
- type?: "page_id";
297
- } | {
298
- database_id: IdRequest;
299
- type?: "database_id";
300
- } | {
301
- comment_id: IdRequest;
302
- type?: "comment_id";
303
- };
304
- type?: "link_to_page";
305
- object?: "block";
306
- } | {
307
- table_row: ContentWithTableRowRequest;
308
- type?: "table_row";
309
- object?: "block";
310
- } | {
311
- heading_1: HeaderContentWithRichTextAndColorRequest;
312
- type?: "heading_1";
313
- object?: "block";
314
- } | {
315
- heading_2: HeaderContentWithRichTextAndColorRequest;
316
- type?: "heading_2";
317
- object?: "block";
318
- } | {
319
- heading_3: HeaderContentWithRichTextAndColorRequest;
320
- type?: "heading_3";
321
- object?: "block";
322
- } | {
323
- paragraph: ContentWithRichTextAndColorRequest;
324
- type?: "paragraph";
325
- object?: "block";
326
- } | {
327
- bulleted_list_item: ContentWithRichTextAndColorRequest;
328
- type?: "bulleted_list_item";
329
- object?: "block";
330
- } | {
331
- numbered_list_item: ContentWithRichTextAndColorRequest;
332
- type?: "numbered_list_item";
333
- object?: "block";
334
- } | {
335
- quote: ContentWithRichTextAndColorRequest;
336
- type?: "quote";
337
- object?: "block";
338
- } | {
339
- to_do: {
340
- rich_text: Array<RichTextItemRequest>;
341
- checked?: boolean;
342
- color?: ApiColor;
343
- };
344
- type?: "to_do";
345
- object?: "block";
346
- } | {
347
- toggle: ContentWithRichTextAndColorRequest;
348
- type?: "toggle";
349
- object?: "block";
350
- } | {
351
- template: ContentWithRichTextRequest;
352
- type?: "template";
353
- object?: "block";
354
- } | {
355
- callout: {
356
- rich_text: Array<RichTextItemRequest>;
357
- icon?: PageIconRequest;
358
- color?: ApiColor;
359
- };
360
- type?: "callout";
361
- object?: "block";
362
- } | {
363
- synced_block: {
364
- synced_from: {
365
- block_id: IdRequest;
366
- type?: "block_id";
367
- } | null;
368
- };
369
- type?: "synced_block";
370
- object?: "block";
371
- };
372
- export type BlockObjectResponse = ParagraphBlockObjectResponse | Heading1BlockObjectResponse | Heading2BlockObjectResponse | Heading3BlockObjectResponse | BulletedListItemBlockObjectResponse | NumberedListItemBlockObjectResponse | QuoteBlockObjectResponse | ToDoBlockObjectResponse | ToggleBlockObjectResponse | TemplateBlockObjectResponse | SyncedBlockBlockObjectResponse | ChildPageBlockObjectResponse | ChildDatabaseBlockObjectResponse | EquationBlockObjectResponse | CodeBlockObjectResponse | CalloutBlockObjectResponse | DividerBlockObjectResponse | BreadcrumbBlockObjectResponse | TableOfContentsBlockObjectResponse | ColumnListBlockObjectResponse | ColumnBlockObjectResponse | LinkToPageBlockObjectResponse | TableBlockObjectResponse | TableRowBlockObjectResponse | MeetingNotesBlockObjectResponse | TranscriptionBlockObjectResponse | EmbedBlockObjectResponse | BookmarkBlockObjectResponse | ImageBlockObjectResponse | VideoBlockObjectResponse | PdfBlockObjectResponse | FileBlockObjectResponse | AudioBlockObjectResponse | LinkPreviewBlockObjectResponse | UnsupportedBlockObjectResponse;
373
- type BlockObjectWithSingleLevelOfChildrenRequest = {
374
- embed: MediaContentWithUrlAndCaptionRequest;
375
- type?: "embed";
376
- object?: "block";
377
- } | {
378
- bookmark: MediaContentWithUrlAndCaptionRequest;
379
- type?: "bookmark";
380
- object?: "block";
381
- } | {
382
- image: MediaContentWithFileAndCaptionRequest;
383
- type?: "image";
384
- object?: "block";
385
- } | {
386
- video: MediaContentWithFileAndCaptionRequest;
387
- type?: "video";
388
- object?: "block";
389
- } | {
390
- pdf: MediaContentWithFileAndCaptionRequest;
391
- type?: "pdf";
392
- object?: "block";
393
- } | {
394
- file: MediaContentWithFileNameAndCaptionRequest;
395
- type?: "file";
396
- object?: "block";
397
- } | {
398
- audio: MediaContentWithFileAndCaptionRequest;
399
- type?: "audio";
400
- object?: "block";
401
- } | {
402
- code: {
403
- rich_text: Array<RichTextItemRequest>;
404
- language: LanguageRequest;
405
- caption?: Array<RichTextItemRequest>;
406
- };
407
- type?: "code";
408
- object?: "block";
409
- } | {
410
- equation: ContentWithExpressionRequest;
411
- type?: "equation";
412
- object?: "block";
413
- } | {
414
- divider: EmptyObject;
415
- type?: "divider";
416
- object?: "block";
417
- } | {
418
- breadcrumb: EmptyObject;
419
- type?: "breadcrumb";
420
- object?: "block";
421
- } | {
422
- table_of_contents: {
423
- color?: ApiColor;
424
- };
425
- type?: "table_of_contents";
426
- object?: "block";
427
- } | {
428
- link_to_page: {
429
- page_id: IdRequest;
430
- type?: "page_id";
431
- } | {
432
- database_id: IdRequest;
433
- type?: "database_id";
434
- } | {
435
- comment_id: IdRequest;
436
- type?: "comment_id";
437
- };
438
- type?: "link_to_page";
439
- object?: "block";
440
- } | {
441
- table_row: ContentWithTableRowRequest;
442
- type?: "table_row";
443
- object?: "block";
444
- } | {
445
- heading_1: HeaderContentWithSingleLevelOfChildrenRequest;
446
- type?: "heading_1";
447
- object?: "block";
448
- } | {
449
- heading_2: HeaderContentWithSingleLevelOfChildrenRequest;
450
- type?: "heading_2";
451
- object?: "block";
452
- } | {
453
- heading_3: HeaderContentWithSingleLevelOfChildrenRequest;
454
- type?: "heading_3";
455
- object?: "block";
456
- } | {
457
- paragraph: ContentWithSingleLevelOfChildrenRequest;
458
- type?: "paragraph";
459
- object?: "block";
460
- } | {
461
- bulleted_list_item: ContentWithSingleLevelOfChildrenRequest;
462
- type?: "bulleted_list_item";
463
- object?: "block";
464
- } | {
465
- numbered_list_item: ContentWithSingleLevelOfChildrenRequest;
466
- type?: "numbered_list_item";
467
- object?: "block";
468
- } | {
469
- quote: ContentWithSingleLevelOfChildrenRequest;
470
- type?: "quote";
471
- object?: "block";
472
- } | {
473
- table: TableRequestWithTableRowChildren;
474
- type?: "table";
475
- object?: "block";
476
- } | {
477
- to_do: {
478
- rich_text: Array<RichTextItemRequest>;
479
- color?: ApiColor;
480
- children?: Array<BlockObjectRequestWithoutChildren>;
481
- checked?: boolean;
482
- };
483
- type?: "to_do";
484
- object?: "block";
485
- } | {
486
- toggle: ContentWithSingleLevelOfChildrenRequest;
487
- type?: "toggle";
488
- object?: "block";
489
- } | {
490
- template: {
491
- rich_text: Array<RichTextItemRequest>;
492
- children?: Array<BlockObjectRequestWithoutChildren>;
493
- };
494
- type?: "template";
495
- object?: "block";
496
- } | {
497
- callout: {
498
- rich_text: Array<RichTextItemRequest>;
499
- color?: ApiColor;
500
- children?: Array<BlockObjectRequestWithoutChildren>;
501
- icon?: PageIconRequest;
502
- };
503
- type?: "callout";
504
- object?: "block";
505
- } | {
506
- synced_block: {
507
- synced_from: {
508
- block_id: IdRequest;
509
- type?: "block_id";
510
- } | null;
511
- children?: Array<BlockObjectRequestWithoutChildren>;
512
- };
513
- type?: "synced_block";
514
- object?: "block";
515
- };
516
- export type BookmarkBlockObjectResponse = {
517
- type: "bookmark";
518
- bookmark: MediaContentWithUrlAndCaptionResponse;
519
- parent: ParentForBlockBasedObjectResponse;
520
- object: "block";
521
- id: string;
522
- created_time: string;
523
- created_by: PartialUserObjectResponse;
524
- last_edited_time: string;
525
- last_edited_by: PartialUserObjectResponse;
526
- has_children: boolean;
527
- in_trash: boolean;
528
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
529
- archived: boolean;
530
- };
531
- type BooleanFormulaPropertyResponse = {
532
- type: "boolean";
533
- boolean: boolean | null;
534
- };
535
- type BooleanFormulaPropertyValueResponse = {
536
- type: "boolean";
537
- boolean: boolean | null;
538
- };
539
- type BotInfoResponse = {
540
- owner: {
541
- type: "user";
542
- user: {
543
- id: IdResponse;
544
- object: "user";
545
- name: string | null;
546
- avatar_url: string | null;
547
- type: "person";
548
- person: {
549
- email?: string;
550
- };
551
- } | PartialUserObjectResponse;
552
- } | {
553
- type: "workspace";
554
- workspace: true;
555
- };
556
- workspace_id: string;
557
- workspace_limits: {
558
- max_file_upload_size_in_bytes: number;
559
- };
560
- workspace_name: string | null;
561
- };
562
- export type BotUserObjectResponse = {
563
- type: "bot";
564
- bot: EmptyObject | BotInfoResponse;
565
- };
566
- export type BreadcrumbBlockObjectResponse = {
567
- type: "breadcrumb";
568
- breadcrumb: EmptyObject;
569
- parent: ParentForBlockBasedObjectResponse;
570
- object: "block";
571
- id: string;
572
- created_time: string;
573
- created_by: PartialUserObjectResponse;
574
- last_edited_time: string;
575
- last_edited_by: PartialUserObjectResponse;
576
- has_children: boolean;
577
- in_trash: boolean;
578
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
579
- archived: boolean;
580
- };
581
- export type BulletedListItemBlockObjectResponse = {
582
- type: "bulleted_list_item";
583
- bulleted_list_item: ContentWithRichTextAndColorResponse;
584
- parent: ParentForBlockBasedObjectResponse;
585
- object: "block";
586
- id: string;
587
- created_time: string;
588
- created_by: PartialUserObjectResponse;
589
- last_edited_time: string;
590
- last_edited_by: PartialUserObjectResponse;
591
- has_children: boolean;
592
- in_trash: boolean;
593
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
594
- archived: boolean;
595
- };
596
- type ButtonPropertyConfigurationRequest = {
597
- type?: "button";
598
- button: EmptyObject;
599
- };
600
- export type ButtonPropertyItemObjectResponse = {
601
- type: "button";
602
- button: EmptyObject;
603
- object: "property_item";
604
- id: string;
605
- };
606
- type ButtonSimplePropertyValueResponse = {
607
- type: "button";
608
- button: EmptyObject;
609
- };
610
- export type CalloutBlockObjectResponse = {
611
- type: "callout";
612
- callout: {
613
- rich_text: Array<RichTextItemResponse>;
614
- color: ApiColor;
615
- icon: PageIconResponse | null;
616
- };
617
- parent: ParentForBlockBasedObjectResponse;
618
- object: "block";
619
- id: string;
620
- created_time: string;
621
- created_by: PartialUserObjectResponse;
622
- last_edited_time: string;
623
- last_edited_by: PartialUserObjectResponse;
624
- has_children: boolean;
625
- in_trash: boolean;
626
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
627
- archived: boolean;
628
- };
629
- type CheckboxDatabasePropertyConfigResponse = {
630
- type: "checkbox";
631
- checkbox: EmptyObject;
632
- };
633
- type CheckboxPropertyConfigurationRequest = {
634
- type?: "checkbox";
635
- checkbox: EmptyObject;
636
- };
637
- type CheckboxPropertyFilter = {
638
- equals: boolean;
639
- } | {
640
- does_not_equal: boolean;
641
- };
642
- export type CheckboxPropertyItemObjectResponse = {
643
- type: "checkbox";
644
- checkbox: boolean;
645
- object: "property_item";
646
- id: string;
647
- };
648
- type CheckboxSimplePropertyValueResponse = {
649
- type: "checkbox";
650
- checkbox: boolean;
651
- };
652
- export type ChildDatabaseBlockObjectResponse = {
653
- type: "child_database";
654
- child_database: TitleObjectResponse;
655
- parent: ParentForBlockBasedObjectResponse;
656
- object: "block";
657
- id: string;
658
- created_time: string;
659
- created_by: PartialUserObjectResponse;
660
- last_edited_time: string;
661
- last_edited_by: PartialUserObjectResponse;
662
- has_children: boolean;
663
- in_trash: boolean;
664
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
665
- archived: boolean;
666
- };
667
- export type ChildPageBlockObjectResponse = {
668
- type: "child_page";
669
- child_page: TitleObjectResponse;
670
- parent: ParentForBlockBasedObjectResponse;
671
- object: "block";
672
- id: string;
673
- created_time: string;
674
- created_by: PartialUserObjectResponse;
675
- last_edited_time: string;
676
- last_edited_by: PartialUserObjectResponse;
677
- has_children: boolean;
678
- in_trash: boolean;
679
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
680
- archived: boolean;
681
- };
682
- export type CodeBlockObjectResponse = {
683
- type: "code";
684
- code: {
685
- rich_text: Array<RichTextItemResponse>;
686
- caption: Array<RichTextItemResponse>;
687
- language: LanguageRequest;
688
- };
689
- parent: ParentForBlockBasedObjectResponse;
690
- object: "block";
691
- id: string;
692
- created_time: string;
693
- created_by: PartialUserObjectResponse;
694
- last_edited_time: string;
695
- last_edited_by: PartialUserObjectResponse;
696
- has_children: boolean;
697
- in_trash: boolean;
698
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
699
- archived: boolean;
700
- };
701
- export type ColumnBlockObjectResponse = {
702
- type: "column";
703
- column: ColumnResponse;
704
- parent: ParentForBlockBasedObjectResponse;
705
- object: "block";
706
- id: string;
707
- created_time: string;
708
- created_by: PartialUserObjectResponse;
709
- last_edited_time: string;
710
- last_edited_by: PartialUserObjectResponse;
711
- has_children: boolean;
712
- in_trash: boolean;
713
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
714
- archived: boolean;
715
- };
716
- type ColumnBlockWithChildrenRequest = {
717
- column: ColumnWithChildrenRequest;
718
- type?: "column";
719
- object?: "block";
720
- };
721
- export type ColumnListBlockObjectResponse = {
722
- type: "column_list";
723
- column_list: EmptyObject;
724
- parent: ParentForBlockBasedObjectResponse;
725
- object: "block";
726
- id: string;
727
- created_time: string;
728
- created_by: PartialUserObjectResponse;
729
- last_edited_time: string;
730
- last_edited_by: PartialUserObjectResponse;
731
- has_children: boolean;
732
- in_trash: boolean;
733
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
734
- archived: boolean;
735
- };
736
- type ColumnListRequest = {
737
- children: Array<ColumnBlockWithChildrenRequest>;
738
- };
739
- type ColumnResponse = {
740
- width_ratio?: number;
741
- };
742
- type ColumnWithChildrenRequest = {
743
- children: Array<BlockObjectWithSingleLevelOfChildrenRequest>;
744
- width_ratio?: number;
745
- };
746
- export type CommentObjectResponse = {
747
- object: "comment";
748
- id: IdResponse;
749
- parent: CommentParentResponse;
750
- discussion_id: IdResponse;
751
- created_time: string;
752
- last_edited_time: string;
753
- created_by: PartialUserObjectResponse;
754
- rich_text: Array<RichTextItemResponse>;
755
- display_name: {
756
- type: "custom" | "user" | "integration";
757
- resolved_name: string | null;
758
- };
759
- attachments?: Array<{
760
- category: "audio" | "image" | "pdf" | "productivity" | "video";
761
- file: InternalFileResponse;
762
- }>;
763
- };
764
- type CommentParentResponse = PageIdCommentParentResponse | BlockIdCommentParentResponse;
765
- type ContentPositionSchema = {
766
- type: "after_block";
767
- after_block: {
768
- id: IdRequest;
769
- };
770
- } | {
771
- type: "start";
772
- } | {
773
- type: "end";
774
- };
775
- type ContentWithExpressionRequest = {
776
- expression: string;
777
- };
778
- type ContentWithRichTextAndColorAndListResponse = {
779
- rich_text: Array<RichTextItemResponse>;
780
- color: ApiColor;
781
- list_start_index?: number;
782
- list_format?: NumberedListFormat;
783
- };
784
- type ContentWithRichTextAndColorRequest = {
785
- rich_text: Array<RichTextItemRequest>;
786
- color?: ApiColor;
787
- };
788
- type ContentWithRichTextAndColorResponse = {
789
- rich_text: Array<RichTextItemResponse>;
790
- color: ApiColor;
791
- };
792
- type ContentWithRichTextRequest = {
793
- rich_text: Array<RichTextItemRequest>;
794
- };
795
- type ContentWithSingleLevelOfChildrenRequest = {
796
- rich_text: Array<RichTextItemRequest>;
797
- color?: ApiColor;
798
- children?: Array<BlockObjectRequestWithoutChildren>;
799
- };
800
- type ContentWithTableResponse = {
801
- has_column_header: boolean;
802
- has_row_header: boolean;
803
- table_width: number;
804
- };
805
- type ContentWithTableRowRequest = {
806
- cells: Array<Array<RichTextItemRequest>>;
807
- };
808
- type ContentWithTableRowResponse = {
809
- cells: Array<Array<RichTextItemResponse>>;
810
- };
811
- type CreatedByDatabasePropertyConfigResponse = {
812
- type: "created_by";
813
- created_by: EmptyObject;
814
- };
815
- type CreatedByPropertyConfigurationRequest = {
816
- type?: "created_by";
817
- created_by: EmptyObject;
818
- };
819
- export type CreatedByPropertyItemObjectResponse = {
820
- type: "created_by";
821
- created_by: PartialUserObjectResponse | UserObjectResponse;
822
- object: "property_item";
823
- id: string;
824
- };
825
- type CreatedBySimplePropertyValueResponse = {
826
- type: "created_by";
827
- created_by: UserValueResponse;
828
- };
829
- type CreatedTimeDatabasePropertyConfigResponse = {
830
- type: "created_time";
831
- created_time: EmptyObject;
832
- };
833
- type CreatedTimePropertyConfigurationRequest = {
834
- type?: "created_time";
835
- created_time: EmptyObject;
836
- };
837
- export type CreatedTimePropertyItemObjectResponse = {
838
- type: "created_time";
839
- created_time: string;
840
- object: "property_item";
841
- id: string;
842
- };
843
- type CreatedTimeSimplePropertyValueResponse = {
844
- type: "created_time";
845
- created_time: string;
846
- };
847
- type CustomEmojiPageIconRequest = {
848
- type?: "custom_emoji";
849
- custom_emoji: {
850
- id: IdRequest;
851
- name?: string;
852
- url?: string;
853
- };
854
- };
855
- type CustomEmojiPageIconResponse = {
856
- type: "custom_emoji";
857
- custom_emoji: CustomEmojiResponse;
858
- };
859
- type CustomEmojiResponse = {
860
- id: IdResponse;
861
- name: string;
862
- url: string;
863
- };
864
- export type DataSourceObjectResponse = {
865
- object: "data_source";
866
- id: IdResponse;
867
- title: Array<RichTextItemResponse>;
868
- description: Array<RichTextItemResponse>;
869
- parent: ParentOfDataSourceResponse;
870
- database_parent: ParentOfDatabaseResponse;
871
- is_inline: boolean;
872
- in_trash: boolean;
873
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
874
- archived: boolean;
875
- created_time: string;
876
- last_edited_time: string;
877
- created_by: PartialUserObjectResponse;
878
- last_edited_by: PartialUserObjectResponse;
879
- properties: Record<string, DatabasePropertyConfigResponse>;
880
- icon: PageIconResponse | null;
881
- cover: PageCoverResponse | null;
882
- url: string;
883
- public_url: string | null;
884
- };
885
- type DataSourceParentResponse = {
886
- type: "data_source_id";
887
- data_source_id: IdResponse;
888
- database_id: IdResponse;
889
- };
890
- type DataSourceReferenceResponse = {
891
- id: IdResponse;
892
- name: string;
893
- };
894
- export type DatabaseObjectResponse = {
895
- object: "database";
896
- id: IdResponse;
897
- title: Array<RichTextItemResponse>;
898
- description: Array<RichTextItemResponse>;
899
- parent: ParentOfDatabaseResponse;
900
- is_inline: boolean;
901
- in_trash: boolean;
902
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
903
- archived: boolean;
904
- is_locked: boolean;
905
- created_time: string;
906
- last_edited_time: string;
907
- data_sources: Array<DataSourceReferenceResponse>;
908
- icon: PageIconResponse | null;
909
- cover: PageCoverResponse | null;
910
- url: string;
911
- public_url: string | null;
912
- };
913
- type DatabaseParentResponse = {
914
- type: "database_id";
915
- database_id: IdResponse;
916
- };
917
- type DatabasePropertyConfigResponse = DatabasePropertyConfigResponseCommon & (NumberDatabasePropertyConfigResponse | FormulaDatabasePropertyConfigResponse | SelectDatabasePropertyConfigResponse | MultiSelectDatabasePropertyConfigResponse | StatusDatabasePropertyConfigResponse | RelationDatabasePropertyConfigResponse | RollupDatabasePropertyConfigResponse | UniqueIdDatabasePropertyConfigResponse | TitleDatabasePropertyConfigResponse | RichTextDatabasePropertyConfigResponse | UrlDatabasePropertyConfigResponse | PeopleDatabasePropertyConfigResponse | FilesDatabasePropertyConfigResponse | EmailDatabasePropertyConfigResponse | PhoneNumberDatabasePropertyConfigResponse | DateDatabasePropertyConfigResponse | CheckboxDatabasePropertyConfigResponse | CreatedByDatabasePropertyConfigResponse | CreatedTimeDatabasePropertyConfigResponse | LastEditedByDatabasePropertyConfigResponse | LastEditedTimeDatabasePropertyConfigResponse);
918
- type DatabasePropertyConfigResponseCommon = {
919
- id: string;
920
- name: string;
921
- description: PropertyDescriptionRequest | null;
922
- };
923
- type DatabasePropertyRelationConfigResponse = DatabasePropertyRelationConfigResponseCommon & (SinglePropertyDatabasePropertyRelationConfigResponse | DualPropertyDatabasePropertyRelationConfigResponse);
924
- type DatabasePropertyRelationConfigResponseCommon = {
925
- database_id: IdResponse;
926
- data_source_id: IdResponse;
927
- };
928
- type DateDatabasePropertyConfigResponse = {
929
- type: "date";
930
- date: EmptyObject;
931
- };
932
- type DateFormulaPropertyResponse = {
933
- type: "date";
934
- date: DateResponse | null;
935
- };
936
- type DateFormulaPropertyValueResponse = {
937
- type: "date";
938
- date: DateResponse | null;
939
- };
940
- type DatePartialRollupValueResponse = {
941
- type: "date";
942
- date: DateResponse | null;
943
- };
944
- type DatePropertyConfigurationRequest = {
945
- type?: "date";
946
- date: EmptyObject;
947
- };
948
- type DatePropertyFilter = {
949
- equals: string;
950
- } | {
951
- before: string;
952
- } | {
953
- after: string;
954
- } | {
955
- on_or_before: string;
956
- } | {
957
- on_or_after: string;
958
- } | {
959
- this_week: EmptyObject;
960
- } | {
961
- past_week: EmptyObject;
962
- } | {
963
- past_month: EmptyObject;
964
- } | {
965
- past_year: EmptyObject;
966
- } | {
967
- next_week: EmptyObject;
968
- } | {
969
- next_month: EmptyObject;
970
- } | {
971
- next_year: EmptyObject;
972
- } | ExistencePropertyFilter;
973
- export type DatePropertyItemObjectResponse = {
974
- type: "date";
975
- date: DateResponse | null;
976
- object: "property_item";
977
- id: string;
978
- };
979
- type DateRequest = {
980
- start: string;
981
- end?: string | null;
982
- time_zone?: TimeZoneRequest | null;
983
- };
984
- type DateResponse = {
985
- start: string;
986
- end: string | null;
987
- time_zone: TimeZoneRequest | null;
988
- };
989
- type DateSimplePropertyValueResponse = {
990
- type: "date";
991
- date: DateResponse | null;
992
- };
993
- export type DividerBlockObjectResponse = {
994
- type: "divider";
995
- divider: EmptyObject;
996
- parent: ParentForBlockBasedObjectResponse;
997
- object: "block";
998
- id: string;
999
- created_time: string;
1000
- created_by: PartialUserObjectResponse;
1001
- last_edited_time: string;
1002
- last_edited_by: PartialUserObjectResponse;
1003
- has_children: boolean;
1004
- in_trash: boolean;
1005
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1006
- archived: boolean;
1007
- };
1008
- type DualPropertyDatabasePropertyRelationConfigResponse = {
1009
- type?: "dual_property";
1010
- dual_property: {
1011
- synced_property_id: string;
1012
- synced_property_name: string;
1013
- };
1014
- };
1015
- type EmailDatabasePropertyConfigResponse = {
1016
- type: "email";
1017
- email: EmptyObject;
1018
- };
1019
- type EmailPropertyConfigurationRequest = {
1020
- type?: "email";
1021
- email: EmptyObject;
1022
- };
1023
- export type EmailPropertyItemObjectResponse = {
1024
- type: "email";
1025
- email: string | null;
1026
- object: "property_item";
1027
- id: string;
1028
- };
1029
- type EmailSimplePropertyValueResponse = {
1030
- type: "email";
1031
- email: string | null;
1032
- };
1033
- export type EmbedBlockObjectResponse = {
1034
- type: "embed";
1035
- embed: MediaContentWithUrlAndCaptionResponse;
1036
- parent: ParentForBlockBasedObjectResponse;
1037
- object: "block";
1038
- id: string;
1039
- created_time: string;
1040
- created_by: PartialUserObjectResponse;
1041
- last_edited_time: string;
1042
- last_edited_by: PartialUserObjectResponse;
1043
- has_children: boolean;
1044
- in_trash: boolean;
1045
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1046
- archived: boolean;
1047
- };
1048
- type EmojiPageIconRequest = {
1049
- type?: "emoji";
1050
- emoji: EmojiRequest;
1051
- };
1052
- type EmojiPageIconResponse = {
1053
- type: "emoji";
1054
- emoji: EmojiRequest;
1055
- };
1056
- type EmojiRequest = string;
1057
- type EmptyObject = Record<string, never>;
1058
- export type EquationBlockObjectResponse = {
1059
- type: "equation";
1060
- equation: ExpressionObjectResponse;
1061
- parent: ParentForBlockBasedObjectResponse;
1062
- object: "block";
1063
- id: string;
1064
- created_time: string;
1065
- created_by: PartialUserObjectResponse;
1066
- last_edited_time: string;
1067
- last_edited_by: PartialUserObjectResponse;
1068
- has_children: boolean;
1069
- in_trash: boolean;
1070
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1071
- archived: boolean;
1072
- };
1073
- type EquationRichTextItemRequest = {
1074
- type?: "equation";
1075
- equation: {
1076
- expression: string;
1077
- };
1078
- };
1079
- export type EquationRichTextItemResponse = {
1080
- type: "equation";
1081
- equation: {
1082
- expression: string;
1083
- };
1084
- };
1085
- type ExistencePropertyFilter = {
1086
- is_empty: true;
1087
- } | {
1088
- is_not_empty: true;
1089
- };
1090
- type ExpressionObjectResponse = {
1091
- expression: string;
1092
- };
1093
- type ExternalFileRequest = {
1094
- url: TextRequest;
1095
- };
1096
- type ExternalInternalOrExternalFileWithNameResponse = {
1097
- type: "external";
1098
- external: {
1099
- url: string;
1100
- };
1101
- };
1102
- type ExternalMediaContentWithFileAndCaptionResponse = {
1103
- type: "external";
1104
- external: {
1105
- url: TextRequest;
1106
- };
1107
- caption: Array<RichTextItemResponse>;
1108
- };
1109
- type ExternalMediaContentWithFileNameAndCaptionResponse = {
1110
- type: "external";
1111
- external: {
1112
- url: TextRequest;
1113
- };
1114
- caption: Array<RichTextItemResponse>;
1115
- name: string;
1116
- };
1117
- type ExternalPageCoverRequest = {
1118
- type?: "external";
1119
- external: {
1120
- url: string;
1121
- };
1122
- };
1123
- type ExternalPageCoverResponse = {
1124
- type: "external";
1125
- external: {
1126
- url: string;
1127
- };
1128
- };
1129
- type ExternalPageIconRequest = {
1130
- type?: "external";
1131
- external: {
1132
- url: string;
1133
- };
1134
- };
1135
- type ExternalPageIconResponse = {
1136
- type: "external";
1137
- external: {
1138
- url: string;
1139
- };
1140
- };
1141
- export type FileBlockObjectResponse = {
1142
- type: "file";
1143
- file: MediaContentWithFileNameAndCaptionResponse;
1144
- parent: ParentForBlockBasedObjectResponse;
1145
- object: "block";
1146
- id: string;
1147
- created_time: string;
1148
- created_by: PartialUserObjectResponse;
1149
- last_edited_time: string;
1150
- last_edited_by: PartialUserObjectResponse;
1151
- has_children: boolean;
1152
- in_trash: boolean;
1153
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1154
- archived: boolean;
1155
- };
1156
- type FileInternalOrExternalFileWithNameResponse = {
1157
- type: "file";
1158
- file: InternalFileResponse;
1159
- };
1160
- type FileMediaContentWithFileAndCaptionResponse = {
1161
- type: "file";
1162
- file: InternalFileResponse;
1163
- caption: Array<RichTextItemResponse>;
1164
- };
1165
- type FileMediaContentWithFileNameAndCaptionResponse = {
1166
- type: "file";
1167
- file: InternalFileResponse;
1168
- caption: Array<RichTextItemResponse>;
1169
- name: string;
1170
- };
1171
- type FilePageCoverResponse = {
1172
- type: "file";
1173
- file: InternalFileResponse;
1174
- };
1175
- type FilePageIconResponse = {
1176
- type: "file";
1177
- file: InternalFileResponse;
1178
- };
1179
- type FileUploadIdRequest = {
1180
- id: IdRequest;
1181
- };
1182
- export type FileUploadObjectResponse = {
1183
- object: "file_upload";
1184
- id: IdResponse;
1185
- created_time: string;
1186
- created_by: {
1187
- id: IdResponse;
1188
- type: "person" | "bot" | "agent";
1189
- };
1190
- last_edited_time: string;
1191
- in_trash: boolean;
1192
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1193
- archived: boolean;
1194
- expiry_time: string | null;
1195
- status: "pending" | "uploaded" | "expired" | "failed";
1196
- filename: string | null;
1197
- content_type: string | null;
1198
- content_length: number | null;
1199
- upload_url?: string;
1200
- complete_url?: string;
1201
- file_import_result?: {
1202
- imported_time: string;
1203
- } & ({
1204
- type: "success";
1205
- success: EmptyObject;
1206
- } | {
1207
- type: "error";
1208
- error: {
1209
- type: "validation_error" | "internal_system_error" | "download_error" | "upload_error";
1210
- code: string;
1211
- message: string;
1212
- parameter: string | null;
1213
- status_code: number | null;
1214
- };
1215
- });
1216
- number_of_parts?: {
1217
- total: number;
1218
- sent: number;
1219
- };
1220
- };
1221
- type FileUploadPageCoverRequest = {
1222
- type?: "file_upload";
1223
- file_upload: {
1224
- id: string;
1225
- };
1226
- };
1227
- type FileUploadPageIconRequest = {
1228
- type?: "file_upload";
1229
- file_upload: {
1230
- id: string;
1231
- };
1232
- };
1233
- type FileUploadWithOptionalNameRequest = {
1234
- file_upload: FileUploadIdRequest;
1235
- type?: "file_upload";
1236
- name?: StringRequest;
1237
- };
1238
- type FilesDatabasePropertyConfigResponse = {
1239
- type: "files";
1240
- files: EmptyObject;
1241
- };
1242
- type FilesPropertyConfigurationRequest = {
1243
- type?: "files";
1244
- files: EmptyObject;
1245
- };
1246
- export type FilesPropertyItemObjectResponse = {
1247
- type: "files";
1248
- files: Array<InternalOrExternalFileWithNameResponse>;
1249
- object: "property_item";
1250
- id: string;
1251
- };
1252
- type FilesSimplePropertyValueResponse = {
1253
- type: "files";
1254
- files: Array<InternalOrExternalFileWithNameResponse>;
1255
- };
1256
- type FormulaDatabasePropertyConfigResponse = {
1257
- type: "formula";
1258
- formula: {
1259
- expression: string;
1260
- };
1261
- };
1262
- type FormulaPropertyConfigurationRequest = {
1263
- type?: "formula";
1264
- formula: {
1265
- expression?: string;
1266
- };
1267
- };
1268
- type FormulaPropertyFilter = {
1269
- string: TextPropertyFilter;
1270
- } | {
1271
- checkbox: CheckboxPropertyFilter;
1272
- } | {
1273
- number: NumberPropertyFilter;
1274
- } | {
1275
- date: DatePropertyFilter;
1276
- };
1277
- export type FormulaPropertyItemObjectResponse = {
1278
- type: "formula";
1279
- formula: FormulaPropertyResponse;
1280
- object: "property_item";
1281
- id: string;
1282
- };
1283
- type FormulaPropertyResponse = StringFormulaPropertyResponse | DateFormulaPropertyResponse | NumberFormulaPropertyResponse | BooleanFormulaPropertyResponse;
1284
- type FormulaPropertyValueResponse = BooleanFormulaPropertyValueResponse | DateFormulaPropertyValueResponse | NumberFormulaPropertyValueResponse | StringFormulaPropertyValueResponse;
1285
- type FormulaSimplePropertyValueResponse = {
1286
- type: "formula";
1287
- formula: FormulaPropertyValueResponse;
1288
- };
1289
- type GroupFilterOperatorArray = Array<PropertyOrTimestampFilter | {
1290
- or: PropertyOrTimestampFilterArray;
1291
- } | {
1292
- and: PropertyOrTimestampFilterArray;
1293
- }>;
1294
- type GroupObjectRequest = {
1295
- id: IdRequest;
1296
- name?: string | null;
1297
- object?: "group";
1298
- };
1299
- export type GroupObjectResponse = {
1300
- id: IdResponse;
1301
- object: "group";
1302
- name: string | null;
1303
- };
1304
- type HeaderContentWithRichTextAndColorRequest = {
1305
- rich_text: Array<RichTextItemRequest>;
1306
- color?: ApiColor;
1307
- is_toggleable?: boolean;
1308
- };
1309
- type HeaderContentWithRichTextAndColorResponse = {
1310
- rich_text: Array<RichTextItemResponse>;
1311
- color: ApiColor;
1312
- is_toggleable: boolean;
1313
- };
1314
- type HeaderContentWithSingleLevelOfChildrenRequest = {
1315
- rich_text: Array<RichTextItemRequest>;
1316
- color?: ApiColor;
1317
- is_toggleable?: boolean;
1318
- children?: Array<BlockObjectRequestWithoutChildren>;
1319
- };
1320
- export type Heading1BlockObjectResponse = {
1321
- type: "heading_1";
1322
- heading_1: HeaderContentWithRichTextAndColorResponse;
1323
- parent: ParentForBlockBasedObjectResponse;
1324
- object: "block";
1325
- id: string;
1326
- created_time: string;
1327
- created_by: PartialUserObjectResponse;
1328
- last_edited_time: string;
1329
- last_edited_by: PartialUserObjectResponse;
1330
- has_children: boolean;
1331
- in_trash: boolean;
1332
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1333
- archived: boolean;
1334
- };
1335
- export type Heading2BlockObjectResponse = {
1336
- type: "heading_2";
1337
- heading_2: HeaderContentWithRichTextAndColorResponse;
1338
- parent: ParentForBlockBasedObjectResponse;
1339
- object: "block";
1340
- id: string;
1341
- created_time: string;
1342
- created_by: PartialUserObjectResponse;
1343
- last_edited_time: string;
1344
- last_edited_by: PartialUserObjectResponse;
1345
- has_children: boolean;
1346
- in_trash: boolean;
1347
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1348
- archived: boolean;
1349
- };
1350
- export type Heading3BlockObjectResponse = {
1351
- type: "heading_3";
1352
- heading_3: HeaderContentWithRichTextAndColorResponse;
1353
- parent: ParentForBlockBasedObjectResponse;
1354
- object: "block";
1355
- id: string;
1356
- created_time: string;
1357
- created_by: PartialUserObjectResponse;
1358
- last_edited_time: string;
1359
- last_edited_by: PartialUserObjectResponse;
1360
- has_children: boolean;
1361
- in_trash: boolean;
1362
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1363
- archived: boolean;
1364
- };
1365
- type IdObjectResponse = {
1366
- id: string;
1367
- };
1368
- type IdRequest = string;
1369
- type IdResponse = string;
1370
- export type ImageBlockObjectResponse = {
1371
- type: "image";
1372
- image: MediaContentWithFileAndCaptionResponse;
1373
- parent: ParentForBlockBasedObjectResponse;
1374
- object: "block";
1375
- id: string;
1376
- created_time: string;
1377
- created_by: PartialUserObjectResponse;
1378
- last_edited_time: string;
1379
- last_edited_by: PartialUserObjectResponse;
1380
- has_children: boolean;
1381
- in_trash: boolean;
1382
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1383
- archived: boolean;
1384
- };
1385
- type InitialDataSourceRequest = {
1386
- properties?: Record<string, PropertyConfigurationRequest>;
1387
- };
1388
- type InternalFileRequest = {
1389
- url: string;
1390
- expiry_time?: string;
1391
- };
1392
- type InternalFileResponse = {
1393
- url: string;
1394
- expiry_time: string;
1395
- };
1396
- type InternalOrExternalFileWithNameRequest = {
1397
- file: InternalFileRequest;
1398
- name: StringRequest;
1399
- type?: "file";
1400
- } | {
1401
- external: ExternalFileRequest;
1402
- name: StringRequest;
1403
- type?: "external";
1404
- };
1405
- type InternalOrExternalFileWithNameResponse = InternalOrExternalFileWithNameResponseCommon & (FileInternalOrExternalFileWithNameResponse | ExternalInternalOrExternalFileWithNameResponse);
1406
- type InternalOrExternalFileWithNameResponseCommon = {
1407
- name: string;
1408
- };
1409
- type LanguageRequest = "abap" | "abc" | "agda" | "arduino" | "ascii art" | "assembly" | "bash" | "basic" | "bnf" | "c" | "c#" | "c++" | "clojure" | "coffeescript" | "coq" | "css" | "dart" | "dhall" | "diff" | "docker" | "ebnf" | "elixir" | "elm" | "erlang" | "f#" | "flow" | "fortran" | "gherkin" | "glsl" | "go" | "graphql" | "groovy" | "haskell" | "hcl" | "html" | "idris" | "java" | "javascript" | "json" | "julia" | "kotlin" | "latex" | "less" | "lisp" | "livescript" | "llvm ir" | "lua" | "makefile" | "markdown" | "markup" | "matlab" | "mathematica" | "mermaid" | "nix" | "notion formula" | "objective-c" | "ocaml" | "pascal" | "perl" | "php" | "plain text" | "powershell" | "prolog" | "protobuf" | "purescript" | "python" | "r" | "racket" | "reason" | "ruby" | "rust" | "sass" | "scala" | "scheme" | "scss" | "shell" | "smalltalk" | "solidity" | "sql" | "swift" | "toml" | "typescript" | "vb.net" | "verilog" | "vhdl" | "visual basic" | "webassembly" | "xml" | "yaml" | "java/c/c++/c#";
1410
- type LastEditedByDatabasePropertyConfigResponse = {
1411
- type: "last_edited_by";
1412
- last_edited_by: EmptyObject;
1413
- };
1414
- type LastEditedByPropertyConfigurationRequest = {
1415
- type?: "last_edited_by";
1416
- last_edited_by: EmptyObject;
1417
- };
1418
- export type LastEditedByPropertyItemObjectResponse = {
1419
- type: "last_edited_by";
1420
- last_edited_by: PartialUserObjectResponse | UserObjectResponse;
1421
- object: "property_item";
1422
- id: string;
1423
- };
1424
- type LastEditedBySimplePropertyValueResponse = {
1425
- type: "last_edited_by";
1426
- last_edited_by: UserValueResponse;
1427
- };
1428
- type LastEditedTimeDatabasePropertyConfigResponse = {
1429
- type: "last_edited_time";
1430
- last_edited_time: EmptyObject;
1431
- };
1432
- type LastEditedTimePropertyConfigurationRequest = {
1433
- type?: "last_edited_time";
1434
- last_edited_time: EmptyObject;
1435
- };
1436
- export type LastEditedTimePropertyItemObjectResponse = {
1437
- type: "last_edited_time";
1438
- last_edited_time: string;
1439
- object: "property_item";
1440
- id: string;
1441
- };
1442
- type LastEditedTimeSimplePropertyValueResponse = {
1443
- type: "last_edited_time";
1444
- last_edited_time: string;
1445
- };
1446
- type LastVisitedTimePropertyConfigurationRequest = {
1447
- type?: "last_visited_time";
1448
- last_visited_time: EmptyObject;
1449
- };
1450
- type LinkMentionResponse = {
1451
- href: string;
1452
- title?: string;
1453
- description?: string;
1454
- link_author?: string;
1455
- link_provider?: string;
1456
- thumbnail_url?: string;
1457
- icon_url?: string;
1458
- iframe_url?: string;
1459
- height?: number;
1460
- padding?: number;
1461
- padding_top?: number;
1462
- };
1463
- export type LinkPreviewBlockObjectResponse = {
1464
- type: "link_preview";
1465
- link_preview: MediaContentWithUrlResponse;
1466
- parent: ParentForBlockBasedObjectResponse;
1467
- object: "block";
1468
- id: string;
1469
- created_time: string;
1470
- created_by: PartialUserObjectResponse;
1471
- last_edited_time: string;
1472
- last_edited_by: PartialUserObjectResponse;
1473
- has_children: boolean;
1474
- in_trash: boolean;
1475
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1476
- archived: boolean;
1477
- };
1478
- type LinkPreviewMentionResponse = {
1479
- url: string;
1480
- };
1481
- export type LinkToPageBlockObjectResponse = {
1482
- type: "link_to_page";
1483
- link_to_page: {
1484
- type: "page_id";
1485
- page_id: IdRequest;
1486
- } | {
1487
- type: "database_id";
1488
- database_id: IdRequest;
1489
- } | {
1490
- type: "comment_id";
1491
- comment_id: IdRequest;
1492
- };
1493
- parent: ParentForBlockBasedObjectResponse;
1494
- object: "block";
1495
- id: string;
1496
- created_time: string;
1497
- created_by: PartialUserObjectResponse;
1498
- last_edited_time: string;
1499
- last_edited_by: PartialUserObjectResponse;
1500
- has_children: boolean;
1501
- in_trash: boolean;
1502
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1503
- archived: boolean;
1504
- };
1505
- type LocationPropertyConfigurationRequest = {
1506
- type?: "location";
1507
- location: EmptyObject;
1508
- };
1509
- type MediaContentWithFileAndCaptionRequest = {
1510
- external: ExternalFileRequest;
1511
- type?: "external";
1512
- caption?: Array<RichTextItemRequest>;
1513
- } | {
1514
- file_upload: FileUploadIdRequest;
1515
- type?: "file_upload";
1516
- caption?: Array<RichTextItemRequest>;
1517
- };
1518
- type MediaContentWithFileAndCaptionResponse = ExternalMediaContentWithFileAndCaptionResponse | FileMediaContentWithFileAndCaptionResponse;
1519
- type MediaContentWithFileNameAndCaptionRequest = {
1520
- external: ExternalFileRequest;
1521
- type?: "external";
1522
- caption?: Array<RichTextItemRequest>;
1523
- name?: StringRequest;
1524
- } | {
1525
- file_upload: FileUploadIdRequest;
1526
- type?: "file_upload";
1527
- caption?: Array<RichTextItemRequest>;
1528
- name?: StringRequest;
1529
- };
1530
- type MediaContentWithFileNameAndCaptionResponse = ExternalMediaContentWithFileNameAndCaptionResponse | FileMediaContentWithFileNameAndCaptionResponse;
1531
- type MediaContentWithUrlAndCaptionRequest = {
1532
- url: string;
1533
- caption?: Array<RichTextItemRequest>;
1534
- };
1535
- type MediaContentWithUrlAndCaptionResponse = {
1536
- url: string;
1537
- caption: Array<RichTextItemResponse>;
1538
- };
1539
- type MediaContentWithUrlResponse = {
1540
- url: TextRequest;
1541
- };
1542
- /**
1543
- * @deprecated Use MeetingNotesBlockObjectResponse instead. Renamed in API version 2026-03-11.
1544
- */
1545
- export type TranscriptionBlockObjectResponse = {
1546
- type: "transcription";
1547
- transcription: TranscriptionBlockResponse;
1548
- parent: ParentForBlockBasedObjectResponse;
1549
- object: "block";
1550
- id: string;
1551
- created_time: string;
1552
- created_by: PartialUserObjectResponse;
1553
- last_edited_time: string;
1554
- last_edited_by: PartialUserObjectResponse;
1555
- has_children: boolean;
1556
- in_trash: boolean;
1557
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1558
- archived: boolean;
1559
- };
1560
- export type MeetingNotesBlockObjectResponse = {
1561
- type: "meeting_notes";
1562
- meeting_notes: TranscriptionBlockResponse;
1563
- parent: ParentForBlockBasedObjectResponse;
1564
- object: "block";
1565
- id: string;
1566
- created_time: string;
1567
- created_by: PartialUserObjectResponse;
1568
- last_edited_time: string;
1569
- last_edited_by: PartialUserObjectResponse;
1570
- has_children: boolean;
1571
- in_trash: boolean;
1572
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1573
- archived: boolean;
1574
- };
1575
- type MentionRichTextItemRequest = {
1576
- type?: "mention";
1577
- mention: {
1578
- type?: "user";
1579
- user: PartialUserObjectRequest;
1580
- } | {
1581
- type?: "date";
1582
- date: DateRequest;
1583
- } | {
1584
- type?: "page";
1585
- page: {
1586
- id: IdRequest;
1587
- };
1588
- } | {
1589
- type?: "database";
1590
- database: {
1591
- id: IdRequest;
1592
- };
1593
- } | {
1594
- type?: "template_mention";
1595
- template_mention: TemplateMentionRequest;
1596
- } | {
1597
- type?: "custom_emoji";
1598
- custom_emoji: {
1599
- id: IdRequest;
1600
- name?: string;
1601
- url?: string;
1602
- };
1603
- };
1604
- };
1605
- export type MentionRichTextItemResponse = {
1606
- type: "mention";
1607
- mention: {
1608
- type: "user";
1609
- user: UserValueResponse;
1610
- } | {
1611
- type: "date";
1612
- date: DateResponse;
1613
- } | {
1614
- type: "link_preview";
1615
- link_preview: LinkPreviewMentionResponse;
1616
- } | {
1617
- type: "link_mention";
1618
- link_mention: LinkMentionResponse;
1619
- } | {
1620
- type: "page";
1621
- page: {
1622
- id: IdResponse;
1623
- };
1624
- } | {
1625
- type: "database";
1626
- database: {
1627
- id: IdResponse;
1628
- };
1629
- } | {
1630
- type: "template_mention";
1631
- template_mention: TemplateMentionResponse;
1632
- } | {
1633
- type: "custom_emoji";
1634
- custom_emoji: CustomEmojiResponse;
1635
- };
1636
- };
1637
- type MultiSelectDatabasePropertyConfigResponse = {
1638
- type: "multi_select";
1639
- multi_select: {
1640
- options: Array<SelectPropertyResponse>;
1641
- };
1642
- };
1643
- type MultiSelectPropertyConfigurationRequest = {
1644
- type?: "multi_select";
1645
- multi_select: {
1646
- options?: Array<{
1647
- name: string;
1648
- color?: SelectColor;
1649
- description?: string | null;
1650
- }>;
1651
- };
1652
- };
1653
- type MultiSelectPropertyFilter = {
1654
- contains: string;
1655
- } | {
1656
- does_not_contain: string;
1657
- } | ExistencePropertyFilter;
1658
- export type MultiSelectPropertyItemObjectResponse = {
1659
- type: "multi_select";
1660
- multi_select: Array<PartialSelectResponse>;
1661
- object: "property_item";
1662
- id: string;
1663
- };
1664
- type MultiSelectSimplePropertyValueResponse = {
1665
- type: "multi_select";
1666
- multi_select: Array<PartialSelectPropertyValueResponse>;
1667
- };
1668
- type NumberDatabasePropertyConfigResponse = {
1669
- type: "number";
1670
- number: {
1671
- format: NumberFormat;
1672
- };
1673
- };
1674
- type NumberFormat = string;
1675
- type NumberFormulaPropertyResponse = {
1676
- type: "number";
1677
- number: number | null;
1678
- };
1679
- type NumberFormulaPropertyValueResponse = {
1680
- type: "number";
1681
- number: number | null;
1682
- };
1683
- type NumberPartialRollupValueResponse = {
1684
- type: "number";
1685
- number: number | null;
1686
- };
1687
- type NumberPropertyConfigurationRequest = {
1688
- type?: "number";
1689
- number: {
1690
- format?: NumberFormat;
1691
- };
1692
- };
1693
- type NumberPropertyFilter = {
1694
- equals: number;
1695
- } | {
1696
- does_not_equal: number;
1697
- } | {
1698
- greater_than: number;
1699
- } | {
1700
- less_than: number;
1701
- } | {
1702
- greater_than_or_equal_to: number;
1703
- } | {
1704
- less_than_or_equal_to: number;
1705
- } | ExistencePropertyFilter;
1706
- export type NumberPropertyItemObjectResponse = {
1707
- type: "number";
1708
- number: number | null;
1709
- object: "property_item";
1710
- id: string;
1711
- };
1712
- type NumberSimplePropertyValueResponse = {
1713
- type: "number";
1714
- number: number | null;
1715
- };
1716
- type NumberedListFormat = "numbers" | "letters" | "roman";
1717
- export type NumberedListItemBlockObjectResponse = {
1718
- type: "numbered_list_item";
1719
- numbered_list_item: ContentWithRichTextAndColorAndListResponse;
1720
- parent: ParentForBlockBasedObjectResponse;
1721
- object: "block";
1722
- id: string;
1723
- created_time: string;
1724
- created_by: PartialUserObjectResponse;
1725
- last_edited_time: string;
1726
- last_edited_by: PartialUserObjectResponse;
1727
- has_children: boolean;
1728
- in_trash: boolean;
1729
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1730
- archived: boolean;
1731
- };
1732
- type PageCoverRequest = FileUploadPageCoverRequest | ExternalPageCoverRequest;
1733
- type PageCoverResponse = FilePageCoverResponse | ExternalPageCoverResponse;
1734
- type PageIconRequest = FileUploadPageIconRequest | EmojiPageIconRequest | ExternalPageIconRequest | CustomEmojiPageIconRequest;
1735
- type PageIconResponse = EmojiPageIconResponse | FilePageIconResponse | ExternalPageIconResponse | CustomEmojiPageIconResponse;
1736
- type PageIdCommentParentResponse = {
1737
- type: "page_id";
1738
- page_id: IdResponse;
1739
- };
1740
- type PageIdParentForBlockBasedObjectResponse = {
1741
- type: "page_id";
1742
- page_id: IdResponse;
1743
- };
1744
- type PageMarkdownResponse = {
1745
- object: "page_markdown";
1746
- id: IdResponse;
1747
- markdown: string;
1748
- truncated: boolean;
1749
- unknown_block_ids: Array<IdResponse>;
1750
- };
1751
- export type PageObjectResponse = {
1752
- object: "page";
1753
- id: IdResponse;
1754
- created_time: string;
1755
- last_edited_time: string;
1756
- in_trash: boolean;
1757
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1758
- archived: boolean;
1759
- is_locked: boolean;
1760
- url: string;
1761
- public_url: string | null;
1762
- parent: ParentForBlockBasedObjectResponse;
1763
- properties: Record<string, PagePropertyValueWithIdResponse>;
1764
- icon: PageIconResponse | null;
1765
- cover: PageCoverResponse | null;
1766
- created_by: PartialUserObjectResponse;
1767
- last_edited_by: PartialUserObjectResponse;
1768
- };
1769
- type PagePositionSchema = {
1770
- type: "after_block";
1771
- after_block: {
1772
- id: IdRequest;
1773
- };
1774
- } | {
1775
- type: "page_start";
1776
- } | {
1777
- type: "page_end";
1778
- };
1779
- type PagePropertyValueWithIdResponse = IdObjectResponse & (SimpleOrArrayPropertyValueResponse | PartialRollupPropertyResponse);
1780
- export type ParagraphBlockObjectResponse = {
1781
- type: "paragraph";
1782
- paragraph: ContentWithRichTextAndColorResponse;
1783
- parent: ParentForBlockBasedObjectResponse;
1784
- object: "block";
1785
- id: string;
1786
- created_time: string;
1787
- created_by: PartialUserObjectResponse;
1788
- last_edited_time: string;
1789
- last_edited_by: PartialUserObjectResponse;
1790
- has_children: boolean;
1791
- in_trash: boolean;
1792
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1793
- archived: boolean;
1794
- };
1795
- type ParentForBlockBasedObjectResponse = DatabaseParentResponse | DataSourceParentResponse | PageIdParentForBlockBasedObjectResponse | BlockIdParentForBlockBasedObjectResponse | WorkspaceParentForBlockBasedObjectResponse;
1796
- type ParentOfDataSourceRequest = {
1797
- type?: "database_id";
1798
- database_id: IdRequest;
1799
- };
1800
- /**
1801
- * The parent of the data source. This is typically a database (`database_id`), but for
1802
- * externally synced data sources, can be another data source (`data_source_id`).
1803
- */
1804
- type ParentOfDataSourceResponse = DatabaseParentResponse | DataSourceParentResponse;
1805
- type ParentOfDatabaseResponse = PageIdParentForBlockBasedObjectResponse | WorkspaceParentForBlockBasedObjectResponse | DatabaseParentResponse | BlockIdParentForBlockBasedObjectResponse;
1806
- export type PartialBlockObjectResponse = {
1807
- object: "block";
1808
- id: string;
1809
- };
1810
- export type PartialCommentObjectResponse = {
1811
- object: "comment";
1812
- id: IdResponse;
1813
- };
1814
- export type PartialDataSourceObjectResponse = {
1815
- object: "data_source";
1816
- id: IdResponse;
1817
- properties: Record<string, DatabasePropertyConfigResponse>;
1818
- };
1819
- export type PartialDatabaseObjectResponse = {
1820
- object: "database";
1821
- id: IdResponse;
1822
- };
1823
- export type PartialPageObjectResponse = {
1824
- object: "page";
1825
- id: IdResponse;
1826
- };
1827
- type PartialRollupPropertyResponse = {
1828
- type: "rollup";
1829
- rollup: PartialRollupValueResponse;
1830
- };
1831
- type PartialRollupValueResponse = PartialRollupValueResponseCommon & (NumberPartialRollupValueResponse | DatePartialRollupValueResponse | ArrayPartialRollupValueResponse);
1832
- type PartialRollupValueResponseCommon = {
1833
- function: RollupFunction;
1834
- };
1835
- type PartialSelectPropertyValueResponse = {
1836
- id: string;
1837
- name: string;
1838
- color: "default" | "gray" | "brown" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "red";
1839
- };
1840
- type PartialSelectResponse = {
1841
- id: string;
1842
- name: string;
1843
- color: SelectColor;
1844
- };
1845
- type PartialUserObjectRequest = {
1846
- id: IdRequest;
1847
- object?: "user";
1848
- };
1849
- export type PartialUserObjectResponse = {
1850
- id: IdResponse;
1851
- object: "user";
1852
- };
1853
- export type PdfBlockObjectResponse = {
1854
- type: "pdf";
1855
- pdf: MediaContentWithFileAndCaptionResponse;
1856
- parent: ParentForBlockBasedObjectResponse;
1857
- object: "block";
1858
- id: string;
1859
- created_time: string;
1860
- created_by: PartialUserObjectResponse;
1861
- last_edited_time: string;
1862
- last_edited_by: PartialUserObjectResponse;
1863
- has_children: boolean;
1864
- in_trash: boolean;
1865
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1866
- archived: boolean;
1867
- };
1868
- type PeopleArrayBasedPropertyValueResponse = {
1869
- type: "people";
1870
- people: Array<UserValueResponse | GroupObjectResponse>;
1871
- };
1872
- type PeopleDatabasePropertyConfigResponse = {
1873
- type: "people";
1874
- people: EmptyObject;
1875
- };
1876
- type PeoplePropertyConfigurationRequest = {
1877
- type?: "people";
1878
- people: EmptyObject;
1879
- };
1880
- type PeoplePropertyFilter = {
1881
- contains: IdRequest;
1882
- } | {
1883
- does_not_contain: IdRequest;
1884
- } | ExistencePropertyFilter;
1885
- export type PeoplePropertyItemObjectResponse = {
1886
- type: "people";
1887
- people: PartialUserObjectResponse | UserObjectResponse;
1888
- object: "property_item";
1889
- id: string;
1890
- };
1891
- export type PersonUserObjectResponse = {
1892
- type: "person";
1893
- person: {
1894
- email?: string;
1895
- };
1896
- };
1897
- type PhoneNumberDatabasePropertyConfigResponse = {
1898
- type: "phone_number";
1899
- phone_number: EmptyObject;
1900
- };
1901
- type PhoneNumberPropertyConfigurationRequest = {
1902
- type?: "phone_number";
1903
- phone_number: EmptyObject;
1904
- };
1905
- export type PhoneNumberPropertyItemObjectResponse = {
1906
- type: "phone_number";
1907
- phone_number: string | null;
1908
- object: "property_item";
1909
- id: string;
1910
- };
1911
- type PhoneNumberSimplePropertyValueResponse = {
1912
- type: "phone_number";
1913
- phone_number: string | null;
1914
- };
1915
- type PlacePropertyConfigurationRequest = {
1916
- type?: "place";
1917
- place: EmptyObject;
1918
- };
1919
- export type PlacePropertyItemObjectResponse = {
1920
- type: "place";
1921
- place: {
1922
- lat: number;
1923
- lon: number;
1924
- name?: string | null;
1925
- address?: string | null;
1926
- aws_place_id?: string | null;
1927
- google_place_id?: string | null;
1928
- } | null;
1929
- object: "property_item";
1930
- id: string;
1931
- };
1932
- type PlacePropertyValueResponse = {
1933
- lat: number;
1934
- lon: number;
1935
- name?: string | null;
1936
- address?: string | null;
1937
- aws_place_id?: string | null;
1938
- google_place_id?: string | null;
1939
- };
1940
- type PlaceSimplePropertyValueResponse = {
1941
- type: "place";
1942
- place: PlacePropertyValueResponse | null;
1943
- };
1944
- type PropertyConfigurationRequest = PropertyConfigurationRequestCommon & (NumberPropertyConfigurationRequest | FormulaPropertyConfigurationRequest | SelectPropertyConfigurationRequest | MultiSelectPropertyConfigurationRequest | StatusPropertyConfigurationRequest | RelationPropertyConfigurationRequest | RollupPropertyConfigurationRequest | UniqueIdPropertyConfigurationRequest | TitlePropertyConfigurationRequest | RichTextPropertyConfigurationRequest | UrlPropertyConfigurationRequest | PeoplePropertyConfigurationRequest | FilesPropertyConfigurationRequest | EmailPropertyConfigurationRequest | PhoneNumberPropertyConfigurationRequest | DatePropertyConfigurationRequest | CheckboxPropertyConfigurationRequest | CreatedByPropertyConfigurationRequest | CreatedTimePropertyConfigurationRequest | LastEditedByPropertyConfigurationRequest | LastEditedTimePropertyConfigurationRequest | ButtonPropertyConfigurationRequest | LocationPropertyConfigurationRequest | VerificationPropertyConfigurationRequest | LastVisitedTimePropertyConfigurationRequest | PlacePropertyConfigurationRequest);
1945
- type PropertyConfigurationRequestCommon = {
1946
- description?: PropertyDescriptionRequest | null;
1947
- };
1948
- type PropertyDescriptionRequest = string;
1949
- type PropertyFilter = {
1950
- title: TextPropertyFilter;
1951
- property: string;
1952
- type?: "title";
1953
- } | {
1954
- rich_text: TextPropertyFilter;
1955
- property: string;
1956
- type?: "rich_text";
1957
- } | {
1958
- number: NumberPropertyFilter;
1959
- property: string;
1960
- type?: "number";
1961
- } | {
1962
- checkbox: CheckboxPropertyFilter;
1963
- property: string;
1964
- type?: "checkbox";
1965
- } | {
1966
- select: SelectPropertyFilter;
1967
- property: string;
1968
- type?: "select";
1969
- } | {
1970
- multi_select: MultiSelectPropertyFilter;
1971
- property: string;
1972
- type?: "multi_select";
1973
- } | {
1974
- status: StatusPropertyFilter;
1975
- property: string;
1976
- type?: "status";
1977
- } | {
1978
- date: DatePropertyFilter;
1979
- property: string;
1980
- type?: "date";
1981
- } | {
1982
- people: PeoplePropertyFilter;
1983
- property: string;
1984
- type?: "people";
1985
- } | {
1986
- files: ExistencePropertyFilter;
1987
- property: string;
1988
- type?: "files";
1989
- } | {
1990
- url: TextPropertyFilter;
1991
- property: string;
1992
- type?: "url";
1993
- } | {
1994
- email: TextPropertyFilter;
1995
- property: string;
1996
- type?: "email";
1997
- } | {
1998
- phone_number: TextPropertyFilter;
1999
- property: string;
2000
- type?: "phone_number";
2001
- } | {
2002
- relation: RelationPropertyFilter;
2003
- property: string;
2004
- type?: "relation";
2005
- } | {
2006
- created_by: PeoplePropertyFilter;
2007
- property: string;
2008
- type?: "created_by";
2009
- } | {
2010
- created_time: DatePropertyFilter;
2011
- property: string;
2012
- type?: "created_time";
2013
- } | {
2014
- last_edited_by: PeoplePropertyFilter;
2015
- property: string;
2016
- type?: "last_edited_by";
2017
- } | {
2018
- last_edited_time: DatePropertyFilter;
2019
- property: string;
2020
- type?: "last_edited_time";
2021
- } | {
2022
- formula: FormulaPropertyFilter;
2023
- property: string;
2024
- type?: "formula";
2025
- } | {
2026
- unique_id: NumberPropertyFilter;
2027
- property: string;
2028
- type?: "unique_id";
2029
- } | {
2030
- rollup: RollupPropertyFilter;
2031
- property: string;
2032
- type?: "rollup";
2033
- } | {
2034
- verification: VerificationPropertyStatusFilter;
2035
- property: string;
2036
- type?: "verification";
2037
- };
2038
- export type PropertyItemListResponse = PropertyItemPropertyItemListResponse;
2039
- export type PropertyItemObjectResponse = NumberPropertyItemObjectResponse | UrlPropertyItemObjectResponse | SelectPropertyItemObjectResponse | MultiSelectPropertyItemObjectResponse | StatusPropertyItemObjectResponse | DatePropertyItemObjectResponse | EmailPropertyItemObjectResponse | PhoneNumberPropertyItemObjectResponse | CheckboxPropertyItemObjectResponse | FilesPropertyItemObjectResponse | CreatedByPropertyItemObjectResponse | CreatedTimePropertyItemObjectResponse | LastEditedByPropertyItemObjectResponse | LastEditedTimePropertyItemObjectResponse | FormulaPropertyItemObjectResponse | ButtonPropertyItemObjectResponse | UniqueIdPropertyItemObjectResponse | VerificationPropertyItemObjectResponse | PlacePropertyItemObjectResponse | TitlePropertyItemObjectResponse | RichTextPropertyItemObjectResponse | PeoplePropertyItemObjectResponse | RelationPropertyItemObjectResponse | RollupPropertyItemObjectResponse;
2040
- type PropertyItemPropertyItemListResponse = {
2041
- type: "property_item";
2042
- property_item: {
2043
- type: "title";
2044
- title: EmptyObject;
2045
- next_url: string | null;
2046
- id: string;
2047
- } | {
2048
- type: "rich_text";
2049
- rich_text: EmptyObject;
2050
- next_url: string | null;
2051
- id: string;
2052
- } | {
2053
- type: "people";
2054
- people: EmptyObject;
2055
- next_url: string | null;
2056
- id: string;
2057
- } | {
2058
- type: "relation";
2059
- relation: EmptyObject;
2060
- next_url: string | null;
2061
- id: string;
2062
- } | {
2063
- type: "rollup";
2064
- rollup: {
2065
- type: "number";
2066
- number: number | null;
2067
- function: RollupFunction;
2068
- } | {
2069
- type: "date";
2070
- date: DateResponse | null;
2071
- function: RollupFunction;
2072
- } | {
2073
- type: "array";
2074
- array: Array<EmptyObject>;
2075
- function: RollupFunction;
2076
- } | {
2077
- type: "unsupported";
2078
- unsupported: EmptyObject;
2079
- function: RollupFunction;
2080
- } | {
2081
- type: "incomplete";
2082
- incomplete: EmptyObject;
2083
- function: RollupFunction;
2084
- };
2085
- next_url: string | null;
2086
- id: string;
2087
- };
2088
- object: "list";
2089
- next_cursor: string | null;
2090
- has_more: boolean;
2091
- results: Array<PropertyItemObjectResponse>;
2092
- };
2093
- type PropertyOrTimestampFilter = PropertyFilter | TimestampFilter;
2094
- type PropertyOrTimestampFilterArray = Array<PropertyOrTimestampFilter>;
2095
- export type QuoteBlockObjectResponse = {
2096
- type: "quote";
2097
- quote: ContentWithRichTextAndColorResponse;
2098
- parent: ParentForBlockBasedObjectResponse;
2099
- object: "block";
2100
- id: string;
2101
- created_time: string;
2102
- created_by: PartialUserObjectResponse;
2103
- last_edited_time: string;
2104
- last_edited_by: PartialUserObjectResponse;
2105
- has_children: boolean;
2106
- in_trash: boolean;
2107
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
2108
- archived: boolean;
2109
- };
2110
- type RelationArrayBasedPropertyValueResponse = {
2111
- type: "relation";
2112
- relation: Array<RelationItemPropertyValueResponse>;
2113
- };
2114
- type RelationDatabasePropertyConfigResponse = {
2115
- type: "relation";
2116
- relation: DatabasePropertyRelationConfigResponse;
2117
- };
2118
- type RelationItemPropertyValueResponse = {
2119
- id: IdRequest;
2120
- };
2121
- type RelationPropertyConfigurationRequest = {
2122
- type?: "relation";
2123
- relation: {
2124
- data_source_id: IdRequest;
2125
- } & ({
2126
- type?: "single_property";
2127
- single_property: EmptyObject;
2128
- } | {
2129
- type?: "dual_property";
2130
- dual_property: {
2131
- synced_property_id?: string;
2132
- synced_property_name?: string;
2133
- };
2134
- });
2135
- };
2136
- type RelationPropertyFilter = {
2137
- contains: IdRequest;
2138
- } | {
2139
- does_not_contain: IdRequest;
2140
- } | ExistencePropertyFilter;
2141
- export type RelationPropertyItemObjectResponse = {
2142
- type: "relation";
2143
- relation: {
2144
- id: string;
2145
- };
2146
- object: "property_item";
2147
- id: string;
2148
- };
2149
- type RichTextArrayBasedPropertyValueResponse = {
2150
- type: "rich_text";
2151
- rich_text: Array<RichTextItemResponse>;
2152
- };
2153
- type RichTextDatabasePropertyConfigResponse = {
2154
- type: "rich_text";
2155
- rich_text: EmptyObject;
2156
- };
2157
- type RichTextItemRequest = RichTextItemRequestCommon & (TextRichTextItemRequest | MentionRichTextItemRequest | EquationRichTextItemRequest);
2158
- type RichTextItemRequestCommon = {
2159
- annotations?: AnnotationRequest;
2160
- };
2161
- export type RichTextItemResponse = RichTextItemResponseCommon & (TextRichTextItemResponse | MentionRichTextItemResponse | EquationRichTextItemResponse);
2162
- export type RichTextItemResponseCommon = {
2163
- plain_text: string;
2164
- href: string | null;
2165
- annotations: AnnotationResponse;
2166
- };
2167
- type RichTextPropertyConfigurationRequest = {
2168
- type?: "rich_text";
2169
- rich_text: EmptyObject;
2170
- };
2171
- export type RichTextPropertyItemObjectResponse = {
2172
- type: "rich_text";
2173
- rich_text: RichTextItemResponse;
2174
- object: "property_item";
2175
- id: string;
2176
- };
2177
- type RollupDatabasePropertyConfigResponse = {
2178
- type: "rollup";
2179
- rollup: {
2180
- function: RollupFunction;
2181
- rollup_property_name: string;
2182
- relation_property_name: string;
2183
- rollup_property_id: string;
2184
- relation_property_id: string;
2185
- };
2186
- };
2187
- type RollupFunction = "count" | "count_values" | "empty" | "not_empty" | "unique" | "show_unique" | "percent_empty" | "percent_not_empty" | "sum" | "average" | "median" | "min" | "max" | "range" | "earliest_date" | "latest_date" | "date_range" | "checked" | "unchecked" | "percent_checked" | "percent_unchecked" | "count_per_group" | "percent_per_group" | "show_original";
2188
- type RollupPropertyConfigurationRequest = {
2189
- type?: "rollup";
2190
- rollup: {
2191
- function: RollupFunction;
2192
- } & ({
2193
- relation_property_name: string;
2194
- rollup_property_name: string;
2195
- } | {
2196
- relation_property_id: string;
2197
- rollup_property_name: string;
2198
- } | {
2199
- relation_property_name: string;
2200
- rollup_property_id: string;
2201
- } | {
2202
- relation_property_id: string;
2203
- rollup_property_id: string;
2204
- });
2205
- };
2206
- type RollupPropertyFilter = {
2207
- any: RollupSubfilterPropertyFilter;
2208
- } | {
2209
- none: RollupSubfilterPropertyFilter;
2210
- } | {
2211
- every: RollupSubfilterPropertyFilter;
2212
- } | {
2213
- date: DatePropertyFilter;
2214
- } | {
2215
- number: NumberPropertyFilter;
2216
- };
2217
- export type RollupPropertyItemObjectResponse = {
2218
- type: "rollup";
2219
- rollup: {
2220
- type: "number";
2221
- number: number | null;
2222
- function: RollupFunction;
2223
- } | {
2224
- type: "date";
2225
- date: DateResponse | null;
2226
- function: RollupFunction;
2227
- } | {
2228
- type: "array";
2229
- array: Array<EmptyObject>;
2230
- function: RollupFunction;
2231
- } | {
2232
- type: "unsupported";
2233
- unsupported: EmptyObject;
2234
- function: RollupFunction;
2235
- } | {
2236
- type: "incomplete";
2237
- incomplete: EmptyObject;
2238
- function: RollupFunction;
2239
- };
2240
- object: "property_item";
2241
- id: string;
2242
- };
2243
- type RollupSubfilterPropertyFilter = {
2244
- rich_text: TextPropertyFilter;
2245
- } | {
2246
- number: NumberPropertyFilter;
2247
- } | {
2248
- checkbox: CheckboxPropertyFilter;
2249
- } | {
2250
- select: SelectPropertyFilter;
2251
- } | {
2252
- multi_select: MultiSelectPropertyFilter;
2253
- } | {
2254
- relation: RelationPropertyFilter;
2255
- } | {
2256
- date: DatePropertyFilter;
2257
- } | {
2258
- people: PeoplePropertyFilter;
2259
- } | {
2260
- files: ExistencePropertyFilter;
2261
- } | {
2262
- status: StatusPropertyFilter;
2263
- };
2264
- /**
2265
- * One of: `default`, `gray`, `brown`, `orange`, `yellow`, `green`, `blue`, `purple`,
2266
- * `pink`, `red`
2267
- */
2268
- type SelectColor = "default" | "gray" | "brown" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "red";
2269
- type SelectDatabasePropertyConfigResponse = {
2270
- type: "select";
2271
- select: {
2272
- options: Array<SelectPropertyResponse>;
2273
- };
2274
- };
2275
- type SelectPropertyConfigurationRequest = {
2276
- type?: "select";
2277
- select: {
2278
- options?: Array<{
2279
- name: string;
2280
- color?: SelectColor;
2281
- description?: string | null;
2282
- }>;
2283
- };
2284
- };
2285
- type SelectPropertyFilter = {
2286
- equals: string;
2287
- } | {
2288
- does_not_equal: string;
2289
- } | ExistencePropertyFilter;
2290
- export type SelectPropertyItemObjectResponse = {
2291
- type: "select";
2292
- select: PartialSelectResponse | null;
2293
- object: "property_item";
2294
- id: string;
2295
- };
2296
- type SelectPropertyResponse = {
2297
- id: string;
2298
- name: string;
2299
- color: SelectColor;
2300
- description: string | null;
2301
- };
2302
- type SelectSimplePropertyValueResponse = {
2303
- type: "select";
2304
- select: PartialSelectPropertyValueResponse | null;
2305
- };
2306
- type SimpleOrArrayPropertyValueResponse = SimplePropertyValueResponse | ArrayBasedPropertyValueResponse;
2307
- type SimplePropertyValueResponse = NumberSimplePropertyValueResponse | UrlSimplePropertyValueResponse | SelectSimplePropertyValueResponse | MultiSelectSimplePropertyValueResponse | StatusSimplePropertyValueResponse | DateSimplePropertyValueResponse | EmailSimplePropertyValueResponse | PhoneNumberSimplePropertyValueResponse | CheckboxSimplePropertyValueResponse | FilesSimplePropertyValueResponse | CreatedBySimplePropertyValueResponse | CreatedTimeSimplePropertyValueResponse | LastEditedBySimplePropertyValueResponse | LastEditedTimeSimplePropertyValueResponse | FormulaSimplePropertyValueResponse | ButtonSimplePropertyValueResponse | UniqueIdSimplePropertyValueResponse | VerificationSimplePropertyValueResponse | PlaceSimplePropertyValueResponse;
2308
- type SinglePropertyDatabasePropertyRelationConfigResponse = {
2309
- type: "single_property";
2310
- single_property: EmptyObject;
2311
- };
2312
- type StatusDatabasePropertyConfigResponse = {
2313
- type: "status";
2314
- status: {
2315
- options: Array<StatusPropertyResponse>;
2316
- groups: Array<{
2317
- id: string;
2318
- name: string;
2319
- color: SelectColor;
2320
- option_ids: Array<string>;
2321
- }>;
2322
- };
2323
- };
2324
- type StatusPropertyConfigurationRequest = {
2325
- type?: "status";
2326
- status: EmptyObject;
2327
- };
2328
- type StatusPropertyFilter = {
2329
- equals: string;
2330
- } | {
2331
- does_not_equal: string;
2332
- } | ExistencePropertyFilter;
2333
- export type StatusPropertyItemObjectResponse = {
2334
- type: "status";
2335
- status: PartialSelectResponse | null;
2336
- object: "property_item";
2337
- id: string;
2338
- };
2339
- type StatusPropertyResponse = {
2340
- id: string;
2341
- name: string;
2342
- color: SelectColor;
2343
- description: string | null;
2344
- };
2345
- type StatusSimplePropertyValueResponse = {
2346
- type: "status";
2347
- status: PartialSelectPropertyValueResponse | null;
2348
- };
2349
- type StringFormulaPropertyResponse = {
2350
- type: "string";
2351
- string: string | null;
2352
- };
2353
- type StringFormulaPropertyValueResponse = {
2354
- type: "string";
2355
- string: string | null;
2356
- };
2357
- type StringRequest = string;
2358
- export type SyncedBlockBlockObjectResponse = {
2359
- type: "synced_block";
2360
- synced_block: {
2361
- synced_from: {
2362
- type: "block_id";
2363
- block_id: IdRequest;
2364
- } | null;
2365
- };
2366
- parent: ParentForBlockBasedObjectResponse;
2367
- object: "block";
2368
- id: string;
2369
- created_time: string;
2370
- created_by: PartialUserObjectResponse;
2371
- last_edited_time: string;
2372
- last_edited_by: PartialUserObjectResponse;
2373
- has_children: boolean;
2374
- in_trash: boolean;
2375
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
2376
- archived: boolean;
2377
- };
2378
- export type TableBlockObjectResponse = {
2379
- type: "table";
2380
- table: ContentWithTableResponse;
2381
- parent: ParentForBlockBasedObjectResponse;
2382
- object: "block";
2383
- id: string;
2384
- created_time: string;
2385
- created_by: PartialUserObjectResponse;
2386
- last_edited_time: string;
2387
- last_edited_by: PartialUserObjectResponse;
2388
- has_children: boolean;
2389
- in_trash: boolean;
2390
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
2391
- archived: boolean;
2392
- };
2393
- export type TableOfContentsBlockObjectResponse = {
2394
- type: "table_of_contents";
2395
- table_of_contents: {
2396
- color: ApiColor;
2397
- };
2398
- parent: ParentForBlockBasedObjectResponse;
2399
- object: "block";
2400
- id: string;
2401
- created_time: string;
2402
- created_by: PartialUserObjectResponse;
2403
- last_edited_time: string;
2404
- last_edited_by: PartialUserObjectResponse;
2405
- has_children: boolean;
2406
- in_trash: boolean;
2407
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
2408
- archived: boolean;
2409
- };
2410
- type TableRequestWithTableRowChildren = {
2411
- table_width: number;
2412
- children: Array<TableRowRequest>;
2413
- has_column_header?: boolean;
2414
- has_row_header?: boolean;
2415
- };
2416
- export type TableRowBlockObjectResponse = {
2417
- type: "table_row";
2418
- table_row: ContentWithTableRowResponse;
2419
- parent: ParentForBlockBasedObjectResponse;
2420
- object: "block";
2421
- id: string;
2422
- created_time: string;
2423
- created_by: PartialUserObjectResponse;
2424
- last_edited_time: string;
2425
- last_edited_by: PartialUserObjectResponse;
2426
- has_children: boolean;
2427
- in_trash: boolean;
2428
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
2429
- archived: boolean;
2430
- };
2431
- type TableRowRequest = {
2432
- table_row: ContentWithTableRowRequest;
2433
- type?: "table_row";
2434
- object?: "block";
2435
- };
2436
- export type TemplateBlockObjectResponse = {
2437
- type: "template";
2438
- template: {
2439
- rich_text: Array<RichTextItemResponse>;
2440
- };
2441
- parent: ParentForBlockBasedObjectResponse;
2442
- object: "block";
2443
- id: string;
2444
- created_time: string;
2445
- created_by: PartialUserObjectResponse;
2446
- last_edited_time: string;
2447
- last_edited_by: PartialUserObjectResponse;
2448
- has_children: boolean;
2449
- in_trash: boolean;
2450
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
2451
- archived: boolean;
2452
- };
2453
- type TemplateMentionDateTemplateMentionRequest = {
2454
- type?: "template_mention_date";
2455
- template_mention_date: "today" | "now";
2456
- };
2457
- type TemplateMentionDateTemplateMentionResponse = {
2458
- type: "template_mention_date";
2459
- template_mention_date: "today" | "now";
2460
- };
2461
- type TemplateMentionRequest = TemplateMentionDateTemplateMentionRequest | TemplateMentionUserTemplateMentionRequest;
2462
- type TemplateMentionResponse = TemplateMentionDateTemplateMentionResponse | TemplateMentionUserTemplateMentionResponse;
2463
- type TemplateMentionUserTemplateMentionRequest = {
2464
- type?: "template_mention_user";
2465
- template_mention_user: "me";
2466
- };
2467
- type TemplateMentionUserTemplateMentionResponse = {
2468
- type: "template_mention_user";
2469
- template_mention_user: "me";
2470
- };
2471
- /**
2472
- * IANA timezone to use when resolving template variables like @now and @today (e.g.
2473
- * 'America/New_York'). Defaults to the authorizing user's timezone for public
2474
- * integrations, or UTC for internal integrations.
2475
- */
2476
- type TemplateTimezone = string;
2477
- type TextPropertyFilter = {
2478
- equals: string;
2479
- } | {
2480
- does_not_equal: string;
2481
- } | {
2482
- contains: string;
2483
- } | {
2484
- does_not_contain: string;
2485
- } | {
2486
- starts_with: string;
2487
- } | {
2488
- ends_with: string;
2489
- } | ExistencePropertyFilter;
2490
- type TextRequest = string;
2491
- type TextRichTextItemRequest = {
2492
- type?: "text";
2493
- text: {
2494
- content: string;
2495
- link?: {
2496
- url: string;
2497
- } | null;
2498
- };
2499
- };
2500
- export type TextRichTextItemResponse = {
2501
- type: "text";
2502
- text: {
2503
- content: string;
2504
- link: {
2505
- url: string;
2506
- } | null;
2507
- };
2508
- };
2509
- type TimeZoneRequest = string;
2510
- type TimestampCreatedTimeFilter = {
2511
- created_time: DatePropertyFilter;
2512
- timestamp: "created_time";
2513
- type?: "created_time";
2514
- };
2515
- type TimestampFilter = TimestampCreatedTimeFilter | TimestampLastEditedTimeFilter;
2516
- type TimestampLastEditedTimeFilter = {
2517
- last_edited_time: DatePropertyFilter;
2518
- timestamp: "last_edited_time";
2519
- type?: "last_edited_time";
2520
- };
2521
- type TitleArrayBasedPropertyValueResponse = {
2522
- type: "title";
2523
- title: Array<RichTextItemResponse>;
2524
- };
2525
- type TitleDatabasePropertyConfigResponse = {
2526
- type: "title";
2527
- title: EmptyObject;
2528
- };
2529
- type TitleObjectResponse = {
2530
- title: string;
2531
- };
2532
- type TitlePropertyConfigurationRequest = {
2533
- type?: "title";
2534
- title: EmptyObject;
2535
- };
2536
- export type TitlePropertyItemObjectResponse = {
2537
- type: "title";
2538
- title: RichTextItemResponse;
2539
- object: "property_item";
2540
- id: string;
2541
- };
2542
- export type ToDoBlockObjectResponse = {
2543
- type: "to_do";
2544
- to_do: {
2545
- rich_text: Array<RichTextItemResponse>;
2546
- color: ApiColor;
2547
- checked: boolean;
2548
- };
2549
- parent: ParentForBlockBasedObjectResponse;
2550
- object: "block";
2551
- id: string;
2552
- created_time: string;
2553
- created_by: PartialUserObjectResponse;
2554
- last_edited_time: string;
2555
- last_edited_by: PartialUserObjectResponse;
2556
- has_children: boolean;
2557
- in_trash: boolean;
2558
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
2559
- archived: boolean;
2560
- };
2561
- export type ToggleBlockObjectResponse = {
2562
- type: "toggle";
2563
- toggle: ContentWithRichTextAndColorResponse;
2564
- parent: ParentForBlockBasedObjectResponse;
2565
- object: "block";
2566
- id: string;
2567
- created_time: string;
2568
- created_by: PartialUserObjectResponse;
2569
- last_edited_time: string;
2570
- last_edited_by: PartialUserObjectResponse;
2571
- has_children: boolean;
2572
- in_trash: boolean;
2573
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
2574
- archived: boolean;
2575
- };
2576
- type TranscriptionBlockResponse = {
2577
- title?: Array<RichTextItemResponse>;
2578
- status?: ApiTranscriptionStatus;
2579
- children?: TranscriptionChildrenResponse;
2580
- calendar_event?: TranscriptionCalendarEventResponse;
2581
- recording?: TranscriptionRecordingResponse;
2582
- };
2583
- type TranscriptionCalendarEventResponse = {
2584
- start_time: string;
2585
- end_time: string;
2586
- attendees?: Array<IdRequest>;
2587
- };
2588
- type TranscriptionChildrenResponse = {
2589
- summary_block_id?: IdRequest;
2590
- notes_block_id?: IdRequest;
2591
- transcript_block_id?: IdRequest;
2592
- };
2593
- type TranscriptionRecordingResponse = {
2594
- start_time?: string;
2595
- end_time?: string;
2596
- };
2597
- type UniqueIdDatabasePropertyConfigResponse = {
2598
- type: "unique_id";
2599
- unique_id: {
2600
- prefix: string | null;
2601
- };
2602
- };
2603
- type UniqueIdPropertyConfigurationRequest = {
2604
- type?: "unique_id";
2605
- unique_id: {
2606
- prefix?: string | null;
2607
- };
2608
- };
2609
- export type UniqueIdPropertyItemObjectResponse = {
2610
- type: "unique_id";
2611
- unique_id: {
2612
- prefix: string | null;
2613
- number: number | null;
2614
- };
2615
- object: "property_item";
2616
- id: string;
2617
- };
2618
- type UniqueIdPropertyValueResponse = {
2619
- prefix: string | null;
2620
- number: number | null;
2621
- };
2622
- type UniqueIdSimplePropertyValueResponse = {
2623
- type: "unique_id";
2624
- unique_id: UniqueIdPropertyValueResponse;
2625
- };
2626
- export type UnsupportedBlockObjectResponse = {
2627
- type: "unsupported";
2628
- unsupported: {
2629
- block_type: string;
2630
- };
2631
- parent: ParentForBlockBasedObjectResponse;
2632
- object: "block";
2633
- id: string;
2634
- created_time: string;
2635
- created_by: PartialUserObjectResponse;
2636
- last_edited_time: string;
2637
- last_edited_by: PartialUserObjectResponse;
2638
- has_children: boolean;
2639
- in_trash: boolean;
2640
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
2641
- archived: boolean;
2642
- };
2643
- type UpdateMediaContentWithFileAndCaptionRequest = {
2644
- caption?: Array<RichTextItemRequest>;
2645
- external?: ExternalFileRequest;
2646
- file_upload?: FileUploadIdRequest;
2647
- };
2648
- type UpdateMediaContentWithFileNameAndCaptionRequest = {
2649
- caption?: Array<RichTextItemRequest>;
2650
- external?: ExternalFileRequest;
2651
- file_upload?: FileUploadIdRequest;
2652
- name?: StringRequest;
2653
- };
2654
- type UpdateMediaContentWithUrlAndCaptionRequest = {
2655
- url?: string;
2656
- caption?: Array<RichTextItemRequest>;
2657
- };
2658
- type UrlDatabasePropertyConfigResponse = {
2659
- type: "url";
2660
- url: EmptyObject;
2661
- };
2662
- type UrlPropertyConfigurationRequest = {
2663
- type?: "url";
2664
- url: EmptyObject;
2665
- };
2666
- export type UrlPropertyItemObjectResponse = {
2667
- type: "url";
2668
- url: string | null;
2669
- object: "property_item";
2670
- id: string;
2671
- };
2672
- type UrlSimplePropertyValueResponse = {
2673
- type: "url";
2674
- url: string | null;
2675
- };
2676
- export type UserObjectResponse = UserObjectResponseCommon & (PersonUserObjectResponse | BotUserObjectResponse);
2677
- export type UserObjectResponseCommon = {
2678
- id: IdResponse;
2679
- object: "user";
2680
- name: string | null;
2681
- avatar_url: string | null;
2682
- };
2683
- type UserValueResponse = PartialUserObjectResponse | UserObjectResponse;
2684
- type VerificationPropertyConfigurationRequest = {
2685
- type?: "verification";
2686
- verification: EmptyObject;
2687
- };
2688
- export type VerificationPropertyItemObjectResponse = {
2689
- type: "verification";
2690
- verification: VerificationPropertyValueResponse | null;
2691
- object: "property_item";
2692
- id: string;
2693
- };
2694
- type VerificationPropertyResponse = {
2695
- state: "verified" | "expired";
2696
- date: DateResponse | null;
2697
- verified_by: PartialUserObjectResponse | null;
2698
- };
2699
- type VerificationPropertyStatusFilter = {
2700
- status: "verified" | "expired" | "none";
2701
- };
2702
- type VerificationPropertyUnverifiedResponse = {
2703
- state: "unverified";
2704
- date: null;
2705
- verified_by: null;
2706
- };
2707
- type VerificationPropertyValueResponse = VerificationPropertyUnverifiedResponse | VerificationPropertyResponse;
2708
- type VerificationSimplePropertyValueResponse = {
2709
- type: "verification";
2710
- verification: VerificationPropertyValueResponse | null;
2711
- };
2712
- export type VideoBlockObjectResponse = {
2713
- type: "video";
2714
- video: MediaContentWithFileAndCaptionResponse;
2715
- parent: ParentForBlockBasedObjectResponse;
2716
- object: "block";
2717
- id: string;
2718
- created_time: string;
2719
- created_by: PartialUserObjectResponse;
2720
- last_edited_time: string;
2721
- last_edited_by: PartialUserObjectResponse;
2722
- has_children: boolean;
2723
- in_trash: boolean;
2724
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
2725
- archived: boolean;
2726
- };
2727
- type WorkspaceParentForBlockBasedObjectResponse = {
2728
- type: "workspace";
2729
- workspace: true;
2730
- };
2731
- export type GetSelfParameters = Record<string, never>;
2732
- export type GetSelfResponse = UserObjectResponse;
2733
- /**
2734
- * Retrieve your token's bot user
2735
- */
2736
- export declare const getSelf: {
2737
- readonly method: "get";
2738
- readonly pathParams: readonly [];
2739
- readonly queryParams: readonly [];
2740
- readonly bodyParams: readonly [];
2741
- readonly path: () => string;
2742
- };
2743
- type GetUserPathParameters = {
2744
- user_id: IdRequest;
2745
- };
2746
- export type GetUserParameters = GetUserPathParameters;
2747
- export type GetUserResponse = UserObjectResponse;
2748
- /**
2749
- * Retrieve a user
2750
- */
2751
- export declare const getUser: {
2752
- readonly method: "get";
2753
- readonly pathParams: readonly ["user_id"];
2754
- readonly queryParams: readonly [];
2755
- readonly bodyParams: readonly [];
2756
- readonly path: (p: GetUserPathParameters) => string;
2757
- };
2758
- type ListUsersQueryParameters = {
2759
- start_cursor?: string;
2760
- page_size?: number;
2761
- };
2762
- export type ListUsersParameters = ListUsersQueryParameters;
2763
- export type ListUsersResponse = {
2764
- type: "user";
2765
- user: EmptyObject;
2766
- object: "list";
2767
- next_cursor: string | null;
2768
- has_more: boolean;
2769
- results: Array<UserObjectResponse>;
2770
- };
2771
- /**
2772
- * List all users
2773
- */
2774
- export declare const listUsers: {
2775
- readonly method: "get";
2776
- readonly pathParams: readonly [];
2777
- readonly queryParams: readonly ["start_cursor", "page_size"];
2778
- readonly bodyParams: readonly [];
2779
- readonly path: () => string;
2780
- };
2781
- type CreatePageBodyParameters = {
2782
- parent?: {
2783
- page_id: IdRequest;
2784
- type?: "page_id";
2785
- } | {
2786
- database_id: IdRequest;
2787
- type?: "database_id";
2788
- } | {
2789
- data_source_id: IdRequest;
2790
- type?: "data_source_id";
2791
- } | {
2792
- workspace: true;
2793
- type?: "workspace";
2794
- };
2795
- properties?: Record<string, {
2796
- title: Array<RichTextItemRequest>;
2797
- type?: "title";
2798
- } | {
2799
- rich_text: Array<RichTextItemRequest>;
2800
- type?: "rich_text";
2801
- } | {
2802
- number: number | null;
2803
- type?: "number";
2804
- } | {
2805
- url: TextRequest | null;
2806
- type?: "url";
2807
- } | {
2808
- select: {
2809
- id: StringRequest;
2810
- name?: TextRequest;
2811
- color?: SelectColor;
2812
- description?: TextRequest | null;
2813
- } | {
2814
- name: TextRequest;
2815
- id?: StringRequest;
2816
- color?: SelectColor;
2817
- description?: TextRequest | null;
2818
- } | null;
2819
- type?: "select";
2820
- } | {
2821
- multi_select: Array<{
2822
- id: StringRequest;
2823
- name?: TextRequest;
2824
- color?: SelectColor;
2825
- description?: TextRequest | null;
2826
- } | {
2827
- name: TextRequest;
2828
- id?: StringRequest;
2829
- color?: SelectColor;
2830
- description?: TextRequest | null;
2831
- }>;
2832
- type?: "multi_select";
2833
- } | {
2834
- people: Array<PartialUserObjectRequest | GroupObjectRequest>;
2835
- type?: "people";
2836
- } | {
2837
- email: StringRequest | null;
2838
- type?: "email";
2839
- } | {
2840
- phone_number: StringRequest | null;
2841
- type?: "phone_number";
2842
- } | {
2843
- date: DateRequest | null;
2844
- type?: "date";
2845
- } | {
2846
- checkbox: boolean;
2847
- type?: "checkbox";
2848
- } | {
2849
- relation: Array<RelationItemPropertyValueResponse>;
2850
- type?: "relation";
2851
- } | {
2852
- files: Array<InternalOrExternalFileWithNameRequest | FileUploadWithOptionalNameRequest>;
2853
- type?: "files";
2854
- } | {
2855
- status: {
2856
- id: StringRequest;
2857
- name?: TextRequest;
2858
- color?: SelectColor;
2859
- description?: TextRequest | null;
2860
- } | {
2861
- name: TextRequest;
2862
- id?: StringRequest;
2863
- color?: SelectColor;
2864
- description?: TextRequest | null;
2865
- } | null;
2866
- type?: "status";
2867
- } | {
2868
- place: {
2869
- lat: number;
2870
- lon: number;
2871
- name?: string | null;
2872
- address?: string | null;
2873
- aws_place_id?: string | null;
2874
- google_place_id?: string | null;
2875
- } | null;
2876
- type?: "place";
2877
- }>;
2878
- icon?: PageIconRequest | null;
2879
- cover?: PageCoverRequest | null;
2880
- content?: Array<BlockObjectRequest>;
2881
- children?: Array<BlockObjectRequest>;
2882
- markdown?: string;
2883
- template?: {
2884
- type: "none";
2885
- } | {
2886
- type: "default";
2887
- timezone?: TemplateTimezone;
2888
- } | {
2889
- type: "template_id";
2890
- template_id: IdRequest;
2891
- timezone?: TemplateTimezone;
2892
- };
2893
- position?: PagePositionSchema;
2894
- };
2895
- export type CreatePageParameters = CreatePageBodyParameters;
2896
- export type CreatePageResponse = PageObjectResponse | PartialPageObjectResponse;
2897
- /**
2898
- * Create a page
2899
- */
2900
- export declare const createPage: {
2901
- readonly method: "post";
2902
- readonly pathParams: readonly [];
2903
- readonly queryParams: readonly [];
2904
- readonly bodyParams: readonly ["parent", "properties", "icon", "cover", "content", "children", "markdown", "template", "position"];
2905
- readonly path: () => string;
2906
- };
2907
- type GetPagePathParameters = {
2908
- page_id: IdRequest;
2909
- };
2910
- type GetPageQueryParameters = {
2911
- filter_properties?: Array<string>;
2912
- };
2913
- export type GetPageParameters = GetPagePathParameters & GetPageQueryParameters;
2914
- export type GetPageResponse = PartialPageObjectResponse | PageObjectResponse;
2915
- /**
2916
- * Retrieve a page
2917
- */
2918
- export declare const getPage: {
2919
- readonly method: "get";
2920
- readonly pathParams: readonly ["page_id"];
2921
- readonly queryParams: readonly ["filter_properties"];
2922
- readonly bodyParams: readonly [];
2923
- readonly path: (p: GetPagePathParameters) => string;
2924
- };
2925
- type UpdatePagePathParameters = {
2926
- page_id: IdRequest;
2927
- };
2928
- type UpdatePageBodyParameters = {
2929
- properties?: Record<string, {
2930
- title: Array<RichTextItemRequest>;
2931
- type?: "title";
2932
- } | {
2933
- rich_text: Array<RichTextItemRequest>;
2934
- type?: "rich_text";
2935
- } | {
2936
- number: number | null;
2937
- type?: "number";
2938
- } | {
2939
- url: TextRequest | null;
2940
- type?: "url";
2941
- } | {
2942
- select: {
2943
- id: StringRequest;
2944
- name?: TextRequest;
2945
- color?: SelectColor;
2946
- description?: TextRequest | null;
2947
- } | {
2948
- name: TextRequest;
2949
- id?: StringRequest;
2950
- color?: SelectColor;
2951
- description?: TextRequest | null;
2952
- } | null;
2953
- type?: "select";
2954
- } | {
2955
- multi_select: Array<{
2956
- id: StringRequest;
2957
- name?: TextRequest;
2958
- color?: SelectColor;
2959
- description?: TextRequest | null;
2960
- } | {
2961
- name: TextRequest;
2962
- id?: StringRequest;
2963
- color?: SelectColor;
2964
- description?: TextRequest | null;
2965
- }>;
2966
- type?: "multi_select";
2967
- } | {
2968
- people: Array<PartialUserObjectRequest | GroupObjectRequest>;
2969
- type?: "people";
2970
- } | {
2971
- email: StringRequest | null;
2972
- type?: "email";
2973
- } | {
2974
- phone_number: StringRequest | null;
2975
- type?: "phone_number";
2976
- } | {
2977
- date: DateRequest | null;
2978
- type?: "date";
2979
- } | {
2980
- checkbox: boolean;
2981
- type?: "checkbox";
2982
- } | {
2983
- relation: Array<RelationItemPropertyValueResponse>;
2984
- type?: "relation";
2985
- } | {
2986
- files: Array<InternalOrExternalFileWithNameRequest | FileUploadWithOptionalNameRequest>;
2987
- type?: "files";
2988
- } | {
2989
- status: {
2990
- id: StringRequest;
2991
- name?: TextRequest;
2992
- color?: SelectColor;
2993
- description?: TextRequest | null;
2994
- } | {
2995
- name: TextRequest;
2996
- id?: StringRequest;
2997
- color?: SelectColor;
2998
- description?: TextRequest | null;
2999
- } | null;
3000
- type?: "status";
3001
- } | {
3002
- place: {
3003
- lat: number;
3004
- lon: number;
3005
- name?: string | null;
3006
- address?: string | null;
3007
- aws_place_id?: string | null;
3008
- google_place_id?: string | null;
3009
- } | null;
3010
- type?: "place";
3011
- }>;
3012
- icon?: PageIconRequest | null;
3013
- cover?: PageCoverRequest | null;
3014
- is_locked?: boolean;
3015
- template?: {
3016
- type: "default";
3017
- timezone?: TemplateTimezone;
3018
- } | {
3019
- type: "template_id";
3020
- template_id: IdRequest;
3021
- timezone?: TemplateTimezone;
3022
- };
3023
- erase_content?: boolean;
3024
- in_trash?: boolean;
3025
- /** @deprecated Use `in_trash` instead. */
3026
- archived?: boolean;
3027
- };
3028
- export type UpdatePageParameters = UpdatePagePathParameters & UpdatePageBodyParameters;
3029
- export type UpdatePageResponse = PageObjectResponse | PartialPageObjectResponse;
3030
- /**
3031
- * Update page
3032
- */
3033
- export declare const updatePage: {
3034
- readonly method: "patch";
3035
- readonly pathParams: readonly ["page_id"];
3036
- readonly queryParams: readonly [];
3037
- readonly bodyParams: readonly ["archived", "properties", "icon", "cover", "is_locked", "template", "erase_content", "in_trash"];
3038
- readonly path: (p: UpdatePagePathParameters) => string;
3039
- };
3040
- type MovePagePathParameters = {
3041
- page_id: IdRequest;
3042
- };
3043
- type MovePageBodyParameters = {
3044
- parent: {
3045
- page_id: IdRequest;
3046
- type?: "page_id";
3047
- } | {
3048
- data_source_id: IdRequest;
3049
- type?: "data_source_id";
3050
- };
3051
- };
3052
- export type MovePageParameters = MovePagePathParameters & MovePageBodyParameters;
3053
- export type MovePageResponse = PartialPageObjectResponse | PageObjectResponse;
3054
- /**
3055
- * Move a page
3056
- */
3057
- export declare const movePage: {
3058
- readonly method: "post";
3059
- readonly pathParams: readonly ["page_id"];
3060
- readonly queryParams: readonly [];
3061
- readonly bodyParams: readonly ["parent"];
3062
- readonly path: (p: MovePagePathParameters) => string;
3063
- };
3064
- type GetPagePropertyPathParameters = {
3065
- page_id: IdRequest;
3066
- property_id: string;
3067
- };
3068
- type GetPagePropertyQueryParameters = {
3069
- start_cursor?: string;
3070
- page_size?: number;
3071
- };
3072
- export type GetPagePropertyParameters = GetPagePropertyPathParameters & GetPagePropertyQueryParameters;
3073
- export type GetPagePropertyResponse = PropertyItemObjectResponse | PropertyItemListResponse;
3074
- /**
3075
- * Retrieve a page property item
3076
- */
3077
- export declare const getPageProperty: {
3078
- readonly method: "get";
3079
- readonly pathParams: readonly ["page_id", "property_id"];
3080
- readonly queryParams: readonly ["start_cursor", "page_size"];
3081
- readonly bodyParams: readonly [];
3082
- readonly path: (p: GetPagePropertyPathParameters) => string;
3083
- };
3084
- type GetPageMarkdownPathParameters = {
3085
- page_id: IdRequest;
3086
- };
3087
- type GetPageMarkdownQueryParameters = {
3088
- include_transcript?: boolean;
3089
- };
3090
- export type GetPageMarkdownParameters = GetPageMarkdownPathParameters & GetPageMarkdownQueryParameters;
3091
- export type GetPageMarkdownResponse = PageMarkdownResponse;
3092
- /**
3093
- * Retrieve a page as markdown
3094
- */
3095
- export declare const getPageMarkdown: {
3096
- readonly method: "get";
3097
- readonly pathParams: readonly ["page_id"];
3098
- readonly queryParams: readonly ["include_transcript"];
3099
- readonly bodyParams: readonly [];
3100
- readonly path: (p: GetPageMarkdownPathParameters) => string;
3101
- };
3102
- type UpdatePageMarkdownPathParameters = {
3103
- page_id: IdRequest;
3104
- };
3105
- type UpdatePageMarkdownBodyParameters = {
3106
- type: "insert_content";
3107
- insert_content: {
3108
- content: string;
3109
- after?: string;
3110
- };
3111
- } | {
3112
- type: "replace_content_range";
3113
- replace_content_range: {
3114
- content: string;
3115
- content_range: string;
3116
- allow_deleting_content?: boolean;
3117
- };
3118
- } | {
3119
- type: "update_content";
3120
- update_content: {
3121
- content_updates: Array<{
3122
- old_str: string;
3123
- new_str: string;
3124
- replace_all_matches?: boolean;
3125
- }>;
3126
- allow_deleting_content?: boolean;
3127
- };
3128
- } | {
3129
- type: "replace_content";
3130
- replace_content: {
3131
- new_str: string;
3132
- allow_deleting_content?: boolean;
3133
- };
3134
- };
3135
- export type UpdatePageMarkdownParameters = UpdatePageMarkdownPathParameters & UpdatePageMarkdownBodyParameters;
3136
- export type UpdatePageMarkdownResponse = PageMarkdownResponse;
3137
- /**
3138
- * Update a page's content as markdown
3139
- */
3140
- export declare const updatePageMarkdown: {
3141
- readonly method: "patch";
3142
- readonly pathParams: readonly ["page_id"];
3143
- readonly queryParams: readonly [];
3144
- readonly bodyParams: readonly ["type", "insert_content", "replace_content_range", "update_content", "replace_content"];
3145
- readonly path: (p: UpdatePageMarkdownPathParameters) => string;
3146
- };
3147
- type GetBlockPathParameters = {
3148
- block_id: IdRequest;
3149
- };
3150
- export type GetBlockParameters = GetBlockPathParameters;
3151
- export type GetBlockResponse = PartialBlockObjectResponse | BlockObjectResponse;
3152
- /**
3153
- * Retrieve a block
3154
- */
3155
- export declare const getBlock: {
3156
- readonly method: "get";
3157
- readonly pathParams: readonly ["block_id"];
3158
- readonly queryParams: readonly [];
3159
- readonly bodyParams: readonly [];
3160
- readonly path: (p: GetBlockPathParameters) => string;
3161
- };
3162
- type UpdateBlockPathParameters = {
3163
- block_id: IdRequest;
3164
- };
3165
- type UpdateBlockBodyParameters = {
3166
- embed: UpdateMediaContentWithUrlAndCaptionRequest;
3167
- type?: "embed";
3168
- in_trash?: boolean;
3169
- /** @deprecated Use `in_trash` instead. */
3170
- archived?: boolean;
3171
- } | {
3172
- bookmark: UpdateMediaContentWithUrlAndCaptionRequest;
3173
- type?: "bookmark";
3174
- in_trash?: boolean;
3175
- /** @deprecated Use `in_trash` instead. */
3176
- archived?: boolean;
3177
- } | {
3178
- image: UpdateMediaContentWithFileAndCaptionRequest;
3179
- type?: "image";
3180
- in_trash?: boolean;
3181
- /** @deprecated Use `in_trash` instead. */
3182
- archived?: boolean;
3183
- } | {
3184
- video: UpdateMediaContentWithFileAndCaptionRequest;
3185
- type?: "video";
3186
- in_trash?: boolean;
3187
- /** @deprecated Use `in_trash` instead. */
3188
- archived?: boolean;
3189
- } | {
3190
- pdf: UpdateMediaContentWithFileAndCaptionRequest;
3191
- type?: "pdf";
3192
- in_trash?: boolean;
3193
- /** @deprecated Use `in_trash` instead. */
3194
- archived?: boolean;
3195
- } | {
3196
- file: UpdateMediaContentWithFileNameAndCaptionRequest;
3197
- type?: "file";
3198
- in_trash?: boolean;
3199
- /** @deprecated Use `in_trash` instead. */
3200
- archived?: boolean;
3201
- } | {
3202
- audio: UpdateMediaContentWithFileAndCaptionRequest;
3203
- type?: "audio";
3204
- in_trash?: boolean;
3205
- /** @deprecated Use `in_trash` instead. */
3206
- archived?: boolean;
3207
- } | {
3208
- code: {
3209
- rich_text?: Array<RichTextItemRequest>;
3210
- language?: LanguageRequest;
3211
- caption?: Array<RichTextItemRequest>;
3212
- };
3213
- type?: "code";
3214
- in_trash?: boolean;
3215
- /** @deprecated Use `in_trash` instead. */
3216
- archived?: boolean;
3217
- } | {
3218
- equation: ContentWithExpressionRequest;
3219
- type?: "equation";
3220
- in_trash?: boolean;
3221
- /** @deprecated Use `in_trash` instead. */
3222
- archived?: boolean;
3223
- } | {
3224
- divider: EmptyObject;
3225
- type?: "divider";
3226
- in_trash?: boolean;
3227
- /** @deprecated Use `in_trash` instead. */
3228
- archived?: boolean;
3229
- } | {
3230
- breadcrumb: EmptyObject;
3231
- type?: "breadcrumb";
3232
- in_trash?: boolean;
3233
- /** @deprecated Use `in_trash` instead. */
3234
- archived?: boolean;
3235
- } | {
3236
- table_of_contents: {
3237
- color?: ApiColor;
3238
- };
3239
- type?: "table_of_contents";
3240
- in_trash?: boolean;
3241
- /** @deprecated Use `in_trash` instead. */
3242
- archived?: boolean;
3243
- } | {
3244
- link_to_page: {
3245
- page_id: IdRequest;
3246
- type?: "page_id";
3247
- } | {
3248
- database_id: IdRequest;
3249
- type?: "database_id";
3250
- } | {
3251
- comment_id: IdRequest;
3252
- type?: "comment_id";
3253
- };
3254
- type?: "link_to_page";
3255
- in_trash?: boolean;
3256
- /** @deprecated Use `in_trash` instead. */
3257
- archived?: boolean;
3258
- } | {
3259
- table_row: ContentWithTableRowRequest;
3260
- type?: "table_row";
3261
- in_trash?: boolean;
3262
- /** @deprecated Use `in_trash` instead. */
3263
- archived?: boolean;
3264
- } | {
3265
- heading_1: HeaderContentWithRichTextAndColorRequest;
3266
- type?: "heading_1";
3267
- in_trash?: boolean;
3268
- /** @deprecated Use `in_trash` instead. */
3269
- archived?: boolean;
3270
- } | {
3271
- heading_2: HeaderContentWithRichTextAndColorRequest;
3272
- type?: "heading_2";
3273
- in_trash?: boolean;
3274
- /** @deprecated Use `in_trash` instead. */
3275
- archived?: boolean;
3276
- } | {
3277
- heading_3: HeaderContentWithRichTextAndColorRequest;
3278
- type?: "heading_3";
3279
- in_trash?: boolean;
3280
- /** @deprecated Use `in_trash` instead. */
3281
- archived?: boolean;
3282
- } | {
3283
- paragraph: ContentWithRichTextAndColorRequest;
3284
- type?: "paragraph";
3285
- in_trash?: boolean;
3286
- /** @deprecated Use `in_trash` instead. */
3287
- archived?: boolean;
3288
- } | {
3289
- bulleted_list_item: ContentWithRichTextAndColorRequest;
3290
- type?: "bulleted_list_item";
3291
- in_trash?: boolean;
3292
- /** @deprecated Use `in_trash` instead. */
3293
- archived?: boolean;
3294
- } | {
3295
- numbered_list_item: ContentWithRichTextAndColorRequest;
3296
- type?: "numbered_list_item";
3297
- in_trash?: boolean;
3298
- /** @deprecated Use `in_trash` instead. */
3299
- archived?: boolean;
3300
- } | {
3301
- quote: ContentWithRichTextAndColorRequest;
3302
- type?: "quote";
3303
- in_trash?: boolean;
3304
- /** @deprecated Use `in_trash` instead. */
3305
- archived?: boolean;
3306
- } | {
3307
- to_do: {
3308
- rich_text?: Array<RichTextItemRequest>;
3309
- checked?: boolean;
3310
- color?: ApiColor;
3311
- };
3312
- type?: "to_do";
3313
- in_trash?: boolean;
3314
- /** @deprecated Use `in_trash` instead. */
3315
- archived?: boolean;
3316
- } | {
3317
- toggle: ContentWithRichTextAndColorRequest;
3318
- type?: "toggle";
3319
- in_trash?: boolean;
3320
- /** @deprecated Use `in_trash` instead. */
3321
- archived?: boolean;
3322
- } | {
3323
- template: ContentWithRichTextRequest;
3324
- type?: "template";
3325
- in_trash?: boolean;
3326
- /** @deprecated Use `in_trash` instead. */
3327
- archived?: boolean;
3328
- } | {
3329
- callout: {
3330
- rich_text?: Array<RichTextItemRequest>;
3331
- icon?: PageIconRequest;
3332
- color?: ApiColor;
3333
- };
3334
- type?: "callout";
3335
- in_trash?: boolean;
3336
- /** @deprecated Use `in_trash` instead. */
3337
- archived?: boolean;
3338
- } | {
3339
- synced_block: {
3340
- synced_from: {
3341
- block_id: IdRequest;
3342
- type?: "block_id";
3343
- } | null;
3344
- };
3345
- type?: "synced_block";
3346
- in_trash?: boolean;
3347
- /** @deprecated Use `in_trash` instead. */
3348
- archived?: boolean;
3349
- } | {
3350
- table: {
3351
- has_column_header?: boolean;
3352
- has_row_header?: boolean;
3353
- };
3354
- type?: "table";
3355
- in_trash?: boolean;
3356
- /** @deprecated Use `in_trash` instead. */
3357
- archived?: boolean;
3358
- } | {
3359
- column: {
3360
- width_ratio?: number;
3361
- };
3362
- type?: "column";
3363
- in_trash?: boolean;
3364
- /** @deprecated Use `in_trash` instead. */
3365
- archived?: boolean;
3366
- } | {
3367
- in_trash?: boolean;
3368
- /** @deprecated Use `in_trash` instead. */
3369
- archived?: boolean;
3370
- };
3371
- export type UpdateBlockParameters = UpdateBlockPathParameters & UpdateBlockBodyParameters;
3372
- export type UpdateBlockResponse = PartialBlockObjectResponse | BlockObjectResponse;
3373
- /**
3374
- * Update a block
3375
- */
3376
- export declare const updateBlock: {
3377
- readonly method: "patch";
3378
- readonly pathParams: readonly ["block_id"];
3379
- readonly queryParams: readonly [];
3380
- readonly bodyParams: readonly ["archived", "embed", "type", "in_trash", "bookmark", "image", "video", "pdf", "file", "audio", "code", "equation", "divider", "breadcrumb", "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"];
3381
- readonly path: (p: UpdateBlockPathParameters) => string;
3382
- };
3383
- type DeleteBlockPathParameters = {
3384
- block_id: IdRequest;
3385
- };
3386
- export type DeleteBlockParameters = DeleteBlockPathParameters;
3387
- export type DeleteBlockResponse = PartialBlockObjectResponse | BlockObjectResponse;
3388
- /**
3389
- * Delete a block
3390
- */
3391
- export declare const deleteBlock: {
3392
- readonly method: "delete";
3393
- readonly pathParams: readonly ["block_id"];
3394
- readonly queryParams: readonly [];
3395
- readonly bodyParams: readonly [];
3396
- readonly path: (p: DeleteBlockPathParameters) => string;
3397
- };
3398
- type ListBlockChildrenPathParameters = {
3399
- block_id: IdRequest;
3400
- };
3401
- type ListBlockChildrenQueryParameters = {
3402
- start_cursor?: string;
3403
- page_size?: number;
3404
- };
3405
- export type ListBlockChildrenParameters = ListBlockChildrenPathParameters & ListBlockChildrenQueryParameters;
3406
- export type ListBlockChildrenResponse = {
3407
- type: "block";
3408
- block: EmptyObject;
3409
- object: "list";
3410
- next_cursor: string | null;
3411
- has_more: boolean;
3412
- results: Array<PartialBlockObjectResponse | BlockObjectResponse>;
3413
- };
3414
- /**
3415
- * Retrieve block children
3416
- */
3417
- export declare const listBlockChildren: {
3418
- readonly method: "get";
3419
- readonly pathParams: readonly ["block_id"];
3420
- readonly queryParams: readonly ["start_cursor", "page_size"];
3421
- readonly bodyParams: readonly [];
3422
- readonly path: (p: ListBlockChildrenPathParameters) => string;
3423
- };
3424
- type AppendBlockChildrenPathParameters = {
3425
- block_id: IdRequest;
3426
- };
3427
- type AppendBlockChildrenBodyParameters = {
3428
- children: Array<BlockObjectRequest>;
3429
- /** @deprecated Use `position` instead. */
3430
- after?: IdRequest;
3431
- position?: ContentPositionSchema;
3432
- };
3433
- export type AppendBlockChildrenParameters = AppendBlockChildrenPathParameters & AppendBlockChildrenBodyParameters;
3434
- export type AppendBlockChildrenResponse = {
3435
- type: "block";
3436
- block: EmptyObject;
3437
- object: "list";
3438
- next_cursor: string | null;
3439
- has_more: boolean;
3440
- results: Array<PartialBlockObjectResponse | BlockObjectResponse>;
3441
- };
3442
- /**
3443
- * Append block children
3444
- */
3445
- export declare const appendBlockChildren: {
3446
- readonly method: "patch";
3447
- readonly pathParams: readonly ["block_id"];
3448
- readonly queryParams: readonly [];
3449
- readonly bodyParams: readonly ["after", "children", "position"];
3450
- readonly path: (p: AppendBlockChildrenPathParameters) => string;
3451
- };
3452
- type GetDataSourcePathParameters = {
3453
- data_source_id: IdRequest;
3454
- };
3455
- export type GetDataSourceParameters = GetDataSourcePathParameters;
3456
- export type GetDataSourceResponse = PartialDataSourceObjectResponse | DataSourceObjectResponse;
3457
- /**
3458
- * Retrieve a data source
3459
- */
3460
- export declare const getDataSource: {
3461
- readonly method: "get";
3462
- readonly pathParams: readonly ["data_source_id"];
3463
- readonly queryParams: readonly [];
3464
- readonly bodyParams: readonly [];
3465
- readonly path: (p: GetDataSourcePathParameters) => string;
3466
- };
3467
- type UpdateDataSourcePathParameters = {
3468
- data_source_id: IdRequest;
3469
- };
3470
- type UpdateDataSourceBodyParameters = {
3471
- title?: Array<RichTextItemRequest>;
3472
- icon?: PageIconRequest | null;
3473
- properties?: Record<string, ({
3474
- name?: string;
3475
- description?: PropertyDescriptionRequest | null;
3476
- } & ({
3477
- type?: "number";
3478
- number: {
3479
- format?: NumberFormat;
3480
- };
3481
- } | {
3482
- type?: "formula";
3483
- formula: {
3484
- expression?: string;
3485
- };
3486
- } | {
3487
- type?: "select";
3488
- select: {
3489
- options?: Array<{
3490
- color?: SelectColor;
3491
- description?: string | null;
3492
- } & ({
3493
- name: string;
3494
- id?: string;
3495
- } | {
3496
- id: string;
3497
- name?: string;
3498
- })>;
3499
- };
3500
- } | {
3501
- type?: "multi_select";
3502
- multi_select: {
3503
- options?: Array<{
3504
- color?: SelectColor;
3505
- description?: string | null;
3506
- } & ({
3507
- name: string;
3508
- id?: string;
3509
- } | {
3510
- id: string;
3511
- name?: string;
3512
- })>;
3513
- };
3514
- } | {
3515
- type?: "status";
3516
- status: EmptyObject;
3517
- } | {
3518
- type?: "relation";
3519
- relation: {
3520
- data_source_id: IdRequest;
3521
- } & ({
3522
- type?: "single_property";
3523
- single_property: EmptyObject;
3524
- } | {
3525
- type?: "dual_property";
3526
- dual_property: {
3527
- synced_property_id?: string;
3528
- synced_property_name?: string;
3529
- };
3530
- });
3531
- } | {
3532
- type?: "rollup";
3533
- rollup: {
3534
- function: RollupFunction;
3535
- } & ({
3536
- relation_property_name: string;
3537
- rollup_property_name: string;
3538
- } | {
3539
- relation_property_id: string;
3540
- rollup_property_name: string;
3541
- } | {
3542
- relation_property_name: string;
3543
- rollup_property_id: string;
3544
- } | {
3545
- relation_property_id: string;
3546
- rollup_property_id: string;
3547
- });
3548
- } | {
3549
- type?: "unique_id";
3550
- unique_id: {
3551
- prefix?: string | null;
3552
- };
3553
- } | {
3554
- type?: "title";
3555
- title: EmptyObject;
3556
- } | {
3557
- type?: "rich_text";
3558
- rich_text: EmptyObject;
3559
- } | {
3560
- type?: "url";
3561
- url: EmptyObject;
3562
- } | {
3563
- type?: "people";
3564
- people: EmptyObject;
3565
- } | {
3566
- type?: "files";
3567
- files: EmptyObject;
3568
- } | {
3569
- type?: "email";
3570
- email: EmptyObject;
3571
- } | {
3572
- type?: "phone_number";
3573
- phone_number: EmptyObject;
3574
- } | {
3575
- type?: "date";
3576
- date: EmptyObject;
3577
- } | {
3578
- type?: "checkbox";
3579
- checkbox: EmptyObject;
3580
- } | {
3581
- type?: "created_by";
3582
- created_by: EmptyObject;
3583
- } | {
3584
- type?: "created_time";
3585
- created_time: EmptyObject;
3586
- } | {
3587
- type?: "last_edited_by";
3588
- last_edited_by: EmptyObject;
3589
- } | {
3590
- type?: "last_edited_time";
3591
- last_edited_time: EmptyObject;
3592
- } | {
3593
- type?: "place";
3594
- place: EmptyObject;
3595
- })) | {
3596
- name: string;
3597
- } | null>;
3598
- in_trash?: boolean;
3599
- /** @deprecated Use `in_trash` instead. */
3600
- archived?: boolean;
3601
- parent?: ParentOfDataSourceRequest;
3602
- };
3603
- export type UpdateDataSourceParameters = UpdateDataSourcePathParameters & UpdateDataSourceBodyParameters;
3604
- export type UpdateDataSourceResponse = PartialDataSourceObjectResponse | DataSourceObjectResponse;
3605
- /**
3606
- * Update a data source
3607
- */
3608
- export declare const updateDataSource: {
3609
- readonly method: "patch";
3610
- readonly pathParams: readonly ["data_source_id"];
3611
- readonly queryParams: readonly [];
3612
- readonly bodyParams: readonly ["archived", "title", "icon", "properties", "in_trash", "parent"];
3613
- readonly path: (p: UpdateDataSourcePathParameters) => string;
3614
- };
3615
- type QueryDataSourcePathParameters = {
3616
- data_source_id: IdRequest;
3617
- };
3618
- type QueryDataSourceQueryParameters = {
3619
- filter_properties?: Array<string>;
3620
- };
3621
- type QueryDataSourceBodyParameters = {
3622
- sorts?: Array<{
3623
- property: string;
3624
- direction: "ascending" | "descending";
3625
- } | {
3626
- timestamp: "created_time" | "last_edited_time";
3627
- direction: "ascending" | "descending";
3628
- }>;
3629
- filter?: {
3630
- or: GroupFilterOperatorArray;
3631
- } | {
3632
- and: GroupFilterOperatorArray;
3633
- } | PropertyFilter | TimestampFilter;
3634
- start_cursor?: string;
3635
- page_size?: number;
3636
- in_trash?: boolean;
3637
- /** @deprecated Use `in_trash` instead. */
3638
- archived?: boolean;
3639
- result_type?: "page" | "data_source";
3640
- };
3641
- export type QueryDataSourceParameters = QueryDataSourcePathParameters & QueryDataSourceQueryParameters & QueryDataSourceBodyParameters;
3642
- export type QueryDataSourceResponse = {
3643
- type: "page_or_data_source";
3644
- page_or_data_source: EmptyObject;
3645
- object: "list";
3646
- next_cursor: string | null;
3647
- has_more: boolean;
3648
- results: Array<PageObjectResponse | PartialPageObjectResponse | PartialDataSourceObjectResponse | DataSourceObjectResponse>;
3649
- };
3650
- /**
3651
- * Query a data source
3652
- */
3653
- export declare const queryDataSource: {
3654
- readonly method: "post";
3655
- readonly pathParams: readonly ["data_source_id"];
3656
- readonly queryParams: readonly ["filter_properties"];
3657
- readonly bodyParams: readonly ["archived", "sorts", "filter", "start_cursor", "page_size", "in_trash", "result_type"];
3658
- readonly path: (p: QueryDataSourcePathParameters) => string;
3659
- };
3660
- type CreateDataSourceBodyParameters = {
3661
- parent: ParentOfDataSourceRequest;
3662
- properties: Record<string, PropertyConfigurationRequest>;
3663
- title?: Array<RichTextItemRequest>;
3664
- icon?: PageIconRequest | null;
3665
- };
3666
- export type CreateDataSourceParameters = CreateDataSourceBodyParameters;
3667
- export type CreateDataSourceResponse = PartialDataSourceObjectResponse | DataSourceObjectResponse;
3668
- /**
3669
- * Create a data source
3670
- */
3671
- export declare const createDataSource: {
3672
- readonly method: "post";
3673
- readonly pathParams: readonly [];
3674
- readonly queryParams: readonly [];
3675
- readonly bodyParams: readonly ["parent", "properties", "title", "icon"];
3676
- readonly path: () => string;
3677
- };
3678
- type ListDataSourceTemplatesPathParameters = {
3679
- data_source_id: IdRequest;
3680
- };
3681
- type ListDataSourceTemplatesQueryParameters = {
3682
- name?: string;
3683
- start_cursor?: string;
3684
- page_size?: number;
3685
- };
3686
- export type ListDataSourceTemplatesParameters = ListDataSourceTemplatesPathParameters & ListDataSourceTemplatesQueryParameters;
3687
- export type ListDataSourceTemplatesResponse = {
3688
- templates: Array<{
3689
- id: IdResponse;
3690
- name: string;
3691
- is_default: boolean;
3692
- }>;
3693
- has_more: boolean;
3694
- next_cursor: IdResponse | null;
3695
- };
3696
- /**
3697
- * List templates in a data source
3698
- */
3699
- export declare const listDataSourceTemplates: {
3700
- readonly method: "get";
3701
- readonly pathParams: readonly ["data_source_id"];
3702
- readonly queryParams: readonly ["name", "start_cursor", "page_size"];
3703
- readonly bodyParams: readonly [];
3704
- readonly path: (p: ListDataSourceTemplatesPathParameters) => string;
3705
- };
3706
- type GetDatabasePathParameters = {
3707
- database_id: IdRequest;
3708
- };
3709
- export type GetDatabaseParameters = GetDatabasePathParameters;
3710
- export type GetDatabaseResponse = PartialDatabaseObjectResponse | DatabaseObjectResponse;
3711
- /**
3712
- * Retrieve a database
3713
- */
3714
- export declare const getDatabase: {
3715
- readonly method: "get";
3716
- readonly pathParams: readonly ["database_id"];
3717
- readonly queryParams: readonly [];
3718
- readonly bodyParams: readonly [];
3719
- readonly path: (p: GetDatabasePathParameters) => string;
3720
- };
3721
- type UpdateDatabasePathParameters = {
3722
- database_id: IdRequest;
3723
- };
3724
- type UpdateDatabaseBodyParameters = {
3725
- parent?: {
3726
- type: "page_id" | "workspace";
3727
- } & ({
3728
- type: "page_id";
3729
- page_id: IdRequest;
3730
- } | {
3731
- type: "workspace";
3732
- workspace: true;
3733
- });
3734
- title?: Array<RichTextItemRequest>;
3735
- description?: Array<RichTextItemRequest>;
3736
- is_inline?: boolean;
3737
- icon?: PageIconRequest;
3738
- cover?: PageCoverRequest;
3739
- in_trash?: boolean;
3740
- /** @deprecated Use `in_trash` instead. */
3741
- archived?: boolean;
3742
- is_locked?: boolean;
3743
- };
3744
- export type UpdateDatabaseParameters = UpdateDatabasePathParameters & UpdateDatabaseBodyParameters;
3745
- export type UpdateDatabaseResponse = PartialDatabaseObjectResponse | DatabaseObjectResponse;
3746
- /**
3747
- * Update a database
3748
- */
3749
- export declare const updateDatabase: {
3750
- readonly method: "patch";
3751
- readonly pathParams: readonly ["database_id"];
3752
- readonly queryParams: readonly [];
3753
- readonly bodyParams: readonly ["parent", "title", "description", "is_inline", "icon", "cover", "in_trash", "is_locked"];
3754
- readonly path: (p: UpdateDatabasePathParameters) => string;
3755
- };
3756
- type CreateDatabaseBodyParameters = {
3757
- parent: {
3758
- type: "page_id" | "workspace";
3759
- } & ({
3760
- type: "page_id";
3761
- page_id: IdRequest;
3762
- } | {
3763
- type: "workspace";
3764
- workspace: true;
3765
- });
3766
- title?: Array<RichTextItemRequest>;
3767
- description?: Array<RichTextItemRequest>;
3768
- is_inline?: boolean;
3769
- initial_data_source?: InitialDataSourceRequest;
3770
- icon?: PageIconRequest;
3771
- cover?: PageCoverRequest;
3772
- };
3773
- export type CreateDatabaseParameters = CreateDatabaseBodyParameters;
3774
- export type CreateDatabaseResponse = PartialDatabaseObjectResponse | DatabaseObjectResponse;
3775
- /**
3776
- * Create a database
3777
- */
3778
- export declare const createDatabase: {
3779
- readonly method: "post";
3780
- readonly pathParams: readonly [];
3781
- readonly queryParams: readonly [];
3782
- readonly bodyParams: readonly ["parent", "title", "description", "is_inline", "initial_data_source", "icon", "cover"];
3783
- readonly path: () => string;
3784
- };
3785
- type SearchBodyParameters = {
3786
- sort?: {
3787
- timestamp: "last_edited_time";
3788
- direction: "ascending" | "descending";
3789
- };
3790
- query?: string;
3791
- start_cursor?: string;
3792
- page_size?: number;
3793
- filter?: {
3794
- property: "object";
3795
- value: "page" | "data_source";
3796
- };
3797
- };
3798
- export type SearchParameters = SearchBodyParameters;
3799
- export type SearchResponse = {
3800
- type: "page_or_data_source";
3801
- page_or_data_source: EmptyObject;
3802
- object: "list";
3803
- next_cursor: string | null;
3804
- has_more: boolean;
3805
- results: Array<PageObjectResponse | PartialPageObjectResponse | PartialDataSourceObjectResponse | DataSourceObjectResponse>;
3806
- };
3807
- /**
3808
- * Search by title
3809
- */
3810
- export declare const search: {
3811
- readonly method: "post";
3812
- readonly pathParams: readonly [];
3813
- readonly queryParams: readonly [];
3814
- readonly bodyParams: readonly ["sort", "query", "start_cursor", "page_size", "filter"];
3815
- readonly path: () => string;
3816
- };
3817
- type CreateCommentBodyParameters = {
3818
- rich_text: Array<RichTextItemRequest>;
3819
- attachments?: Array<{
3820
- file_upload_id: string;
3821
- type?: "file_upload";
3822
- }>;
3823
- display_name?: {
3824
- type: "integration";
3825
- } | {
3826
- type: "user";
3827
- } | {
3828
- type: "custom";
3829
- custom: {
3830
- name: string;
3831
- };
3832
- };
3833
- } & ({
3834
- parent: {
3835
- page_id: IdRequest;
3836
- type?: "page_id";
3837
- } | {
3838
- block_id: IdRequest;
3839
- type?: "block_id";
3840
- };
3841
- } | {
3842
- discussion_id: IdRequest;
3843
- });
3844
- export type CreateCommentParameters = CreateCommentBodyParameters;
3845
- export type CreateCommentResponse = PartialCommentObjectResponse | CommentObjectResponse;
3846
- /**
3847
- * Create a comment
3848
- */
3849
- export declare const createComment: {
3850
- readonly method: "post";
3851
- readonly pathParams: readonly [];
3852
- readonly queryParams: readonly [];
3853
- readonly bodyParams: readonly ["rich_text", "attachments", "display_name", "parent", "discussion_id"];
3854
- readonly path: () => string;
3855
- };
3856
- type ListCommentsQueryParameters = {
3857
- block_id: IdRequest;
3858
- start_cursor?: string;
3859
- page_size?: number;
3860
- };
3861
- export type ListCommentsParameters = ListCommentsQueryParameters;
3862
- export type ListCommentsResponse = {
3863
- object: "list";
3864
- next_cursor: IdResponse | null;
3865
- has_more: boolean;
3866
- results: Array<CommentObjectResponse>;
3867
- type: "comment";
3868
- comment: EmptyObject;
3869
- };
3870
- /**
3871
- * List comments
3872
- */
3873
- export declare const listComments: {
3874
- readonly method: "get";
3875
- readonly pathParams: readonly [];
3876
- readonly queryParams: readonly ["block_id", "start_cursor", "page_size"];
3877
- readonly bodyParams: readonly [];
3878
- readonly path: () => string;
3879
- };
3880
- type GetCommentPathParameters = {
3881
- comment_id: IdRequest;
3882
- };
3883
- export type GetCommentParameters = GetCommentPathParameters;
3884
- export type GetCommentResponse = PartialCommentObjectResponse | CommentObjectResponse;
3885
- /**
3886
- * Retrieve a comment
3887
- */
3888
- export declare const getComment: {
3889
- readonly method: "get";
3890
- readonly pathParams: readonly ["comment_id"];
3891
- readonly queryParams: readonly [];
3892
- readonly bodyParams: readonly [];
3893
- readonly path: (p: GetCommentPathParameters) => string;
3894
- };
3895
- type CreateFileUploadBodyParameters = {
3896
- mode?: "single_part" | "multi_part" | "external_url";
3897
- filename?: string;
3898
- content_type?: string;
3899
- number_of_parts?: number;
3900
- external_url?: string;
3901
- };
3902
- export type CreateFileUploadParameters = CreateFileUploadBodyParameters;
3903
- export type CreateFileUploadResponse = FileUploadObjectResponse;
3904
- /**
3905
- * Create a file upload
3906
- */
3907
- export declare const createFileUpload: {
3908
- readonly method: "post";
3909
- readonly pathParams: readonly [];
3910
- readonly queryParams: readonly [];
3911
- readonly bodyParams: readonly ["mode", "filename", "content_type", "number_of_parts", "external_url"];
3912
- readonly path: () => string;
3913
- };
3914
- type ListFileUploadsQueryParameters = {
3915
- status?: "pending" | "uploaded" | "expired" | "failed";
3916
- start_cursor?: string;
3917
- page_size?: number;
3918
- };
3919
- export type ListFileUploadsParameters = ListFileUploadsQueryParameters;
3920
- export type ListFileUploadsResponse = {
3921
- object: "list";
3922
- next_cursor: IdResponse | null;
3923
- has_more: boolean;
3924
- results: Array<FileUploadObjectResponse>;
3925
- type: "file_upload";
3926
- file_upload: EmptyObject;
3927
- };
3928
- /**
3929
- * List file uploads
3930
- */
3931
- export declare const listFileUploads: {
3932
- readonly method: "get";
3933
- readonly pathParams: readonly [];
3934
- readonly queryParams: readonly ["status", "start_cursor", "page_size"];
3935
- readonly bodyParams: readonly [];
3936
- readonly path: () => string;
3937
- };
3938
- type SendFileUploadPathParameters = {
3939
- file_upload_id: IdRequest;
3940
- };
3941
- type SendFileUploadFormDataParameters = {
3942
- file: {
3943
- filename?: string;
3944
- data: string | Blob;
3945
- };
3946
- part_number?: string;
3947
- };
3948
- export type SendFileUploadParameters = SendFileUploadPathParameters & SendFileUploadFormDataParameters;
3949
- export type SendFileUploadResponse = FileUploadObjectResponse;
3950
- /**
3951
- * Upload a file
3952
- */
3953
- export declare const sendFileUpload: {
3954
- readonly method: "post";
3955
- readonly pathParams: readonly ["file_upload_id"];
3956
- readonly queryParams: readonly [];
3957
- readonly bodyParams: readonly [];
3958
- readonly formDataParams: readonly ["file", "part_number"];
3959
- readonly path: (p: SendFileUploadPathParameters) => string;
3960
- };
3961
- type CompleteFileUploadPathParameters = {
3962
- file_upload_id: IdRequest;
3963
- };
3964
- export type CompleteFileUploadParameters = CompleteFileUploadPathParameters;
3965
- export type CompleteFileUploadResponse = FileUploadObjectResponse;
3966
- /**
3967
- * Complete a multi-part file upload
3968
- */
3969
- export declare const completeFileUpload: {
3970
- readonly method: "post";
3971
- readonly pathParams: readonly ["file_upload_id"];
3972
- readonly queryParams: readonly [];
3973
- readonly bodyParams: readonly [];
3974
- readonly path: (p: CompleteFileUploadPathParameters) => string;
3975
- };
3976
- type GetFileUploadPathParameters = {
3977
- file_upload_id: IdRequest;
3978
- };
3979
- export type GetFileUploadParameters = GetFileUploadPathParameters;
3980
- export type GetFileUploadResponse = FileUploadObjectResponse;
3981
- /**
3982
- * Retrieve a file upload
3983
- */
3984
- export declare const getFileUpload: {
3985
- readonly method: "get";
3986
- readonly pathParams: readonly ["file_upload_id"];
3987
- readonly queryParams: readonly [];
3988
- readonly bodyParams: readonly [];
3989
- readonly path: (p: GetFileUploadPathParameters) => string;
3990
- };
3991
- type OauthTokenBodyParameters = {
3992
- grant_type: "authorization_code";
3993
- code: string;
3994
- redirect_uri?: string;
3995
- external_account?: {
3996
- key: string;
3997
- name: string;
3998
- };
3999
- } | {
4000
- grant_type: "refresh_token";
4001
- refresh_token: string;
4002
- };
4003
- export type OauthTokenParameters = OauthTokenBodyParameters;
4004
- export type OauthTokenResponse = {
4005
- access_token: string;
4006
- token_type: "bearer";
4007
- refresh_token: string | null;
4008
- bot_id: string;
4009
- workspace_icon: string | null;
4010
- workspace_name: string | null;
4011
- workspace_id: string;
4012
- owner: {
4013
- type: "user";
4014
- user: {
4015
- type: "person";
4016
- person: {
4017
- email: string;
4018
- };
4019
- name: string | null;
4020
- avatar_url: string | null;
4021
- id: IdRequest;
4022
- object: "user";
4023
- } | PartialUserObjectResponse;
4024
- } | {
4025
- type: "workspace";
4026
- workspace: true;
4027
- };
4028
- duplicated_template_id: string | null;
4029
- request_id?: string;
4030
- };
4031
- /**
4032
- * Exchange an authorization code for an access and refresh token
4033
- */
4034
- export declare const oauthToken: {
4035
- readonly method: "post";
4036
- readonly pathParams: readonly [];
4037
- readonly queryParams: readonly [];
4038
- readonly bodyParams: readonly ["grant_type", "code", "redirect_uri", "external_account", "refresh_token"];
4039
- readonly path: () => string;
4040
- };
4041
- type OauthRevokeBodyParameters = {
4042
- token: string;
4043
- };
4044
- export type OauthRevokeParameters = OauthRevokeBodyParameters;
4045
- export type OauthRevokeResponse = {
4046
- request_id?: string;
4047
- };
4048
- /**
4049
- * Revoke a token
4050
- */
4051
- export declare const oauthRevoke: {
4052
- readonly method: "post";
4053
- readonly pathParams: readonly [];
4054
- readonly queryParams: readonly [];
4055
- readonly bodyParams: readonly ["token"];
4056
- readonly path: () => string;
4057
- };
4058
- type OauthIntrospectBodyParameters = {
4059
- token: string;
4060
- };
4061
- export type OauthIntrospectParameters = OauthIntrospectBodyParameters;
4062
- export type OauthIntrospectResponse = {
4063
- active: boolean;
4064
- scope?: string;
4065
- iat?: number;
4066
- request_id?: string;
4067
- };
4068
- /**
4069
- * Introspect a token
4070
- */
4071
- export declare const oauthIntrospect: {
4072
- readonly method: "post";
4073
- readonly pathParams: readonly [];
4074
- readonly queryParams: readonly [];
4075
- readonly bodyParams: readonly ["token"];
4076
- readonly path: () => string;
4077
- };
4078
- export {};
1
+ export * from "./api-endpoints/blocks";
2
+ export * from "./api-endpoints/comments";
3
+ export * from "./api-endpoints/common";
4
+ export * from "./api-endpoints/custom-emojis";
5
+ export * from "./api-endpoints/data-sources";
6
+ export * from "./api-endpoints/databases";
7
+ export * from "./api-endpoints/file-uploads";
8
+ export * from "./api-endpoints/oauth";
9
+ export * from "./api-endpoints/pages";
10
+ export * from "./api-endpoints/search";
11
+ export * from "./api-endpoints/users";
12
+ export * from "./api-endpoints/views";
13
+ export * from "./api-endpoints/webhooks";
4079
14
  //# sourceMappingURL=api-endpoints.d.ts.map