@notionhq/client 5.14.0 → 5.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/build/package.json +1 -1
  2. package/build/src/Client.d.ts +7 -1
  3. package/build/src/Client.d.ts.map +1 -1
  4. package/build/src/Client.js +15 -0
  5. package/build/src/Client.js.map +1 -1
  6. package/build/src/api-endpoints/blocks.d.ts +984 -0
  7. package/build/src/api-endpoints/blocks.d.ts.map +1 -0
  8. package/build/src/api-endpoints/blocks.js +89 -0
  9. package/build/src/api-endpoints/blocks.js.map +1 -0
  10. package/build/src/api-endpoints/comments.d.ts +112 -0
  11. package/build/src/api-endpoints/comments.d.ts.map +1 -0
  12. package/build/src/api-endpoints/comments.js +42 -0
  13. package/build/src/api-endpoints/comments.js.map +1 -0
  14. package/build/src/api-endpoints/common.d.ts +1939 -0
  15. package/build/src/api-endpoints/common.d.ts.map +1 -0
  16. package/build/src/api-endpoints/common.js +5 -0
  17. package/build/src/api-endpoints/common.js.map +1 -0
  18. package/build/src/api-endpoints/custom-emojis.d.ts +26 -0
  19. package/build/src/api-endpoints/custom-emojis.d.ts.map +1 -0
  20. package/build/src/api-endpoints/custom-emojis.js +16 -0
  21. package/build/src/api-endpoints/custom-emojis.js.map +1 -0
  22. package/build/src/api-endpoints/data-sources.d.ts +430 -0
  23. package/build/src/api-endpoints/data-sources.d.ts.map +1 -0
  24. package/build/src/api-endpoints/data-sources.js +64 -0
  25. package/build/src/api-endpoints/data-sources.js.map +1 -0
  26. package/build/src/api-endpoints/databases.d.ts +109 -0
  27. package/build/src/api-endpoints/databases.d.ts.map +1 -0
  28. package/build/src/api-endpoints/databases.js +53 -0
  29. package/build/src/api-endpoints/databases.js.map +1 -0
  30. package/build/src/api-endpoints/file-uploads.d.ts +138 -0
  31. package/build/src/api-endpoints/file-uploads.d.ts.map +1 -0
  32. package/build/src/api-endpoints/file-uploads.js +63 -0
  33. package/build/src/api-endpoints/file-uploads.js.map +1 -0
  34. package/build/src/api-endpoints/oauth.d.ts +90 -0
  35. package/build/src/api-endpoints/oauth.d.ts.map +1 -0
  36. package/build/src/api-endpoints/oauth.js +42 -0
  37. package/build/src/api-endpoints/oauth.js.map +1 -0
  38. package/build/src/api-endpoints/pages.d.ts +639 -0
  39. package/build/src/api-endpoints/pages.d.ts.map +1 -0
  40. package/build/src/api-endpoints/pages.js +102 -0
  41. package/build/src/api-endpoints/pages.js.map +1 -0
  42. package/build/src/api-endpoints/search.d.ts +36 -0
  43. package/build/src/api-endpoints/search.d.ts.map +1 -0
  44. package/build/src/api-endpoints/search.js +16 -0
  45. package/build/src/api-endpoints/search.js.map +1 -0
  46. package/build/src/api-endpoints/users.d.ts +53 -0
  47. package/build/src/api-endpoints/users.d.ts.map +1 -0
  48. package/build/src/api-endpoints/users.js +36 -0
  49. package/build/src/api-endpoints/users.js.map +1 -0
  50. package/build/src/api-endpoints/views.d.ts +504 -0
  51. package/build/src/api-endpoints/views.d.ts.map +1 -0
  52. package/build/src/api-endpoints/views.js +86 -0
  53. package/build/src/api-endpoints/views.js.map +1 -0
  54. package/build/src/api-endpoints/webhooks.d.ts +302 -0
  55. package/build/src/api-endpoints/webhooks.d.ts.map +1 -0
  56. package/build/src/api-endpoints/webhooks.js +5 -0
  57. package/build/src/api-endpoints/webhooks.js.map +1 -0
  58. package/build/src/api-endpoints.d.ts +13 -4916
  59. package/build/src/api-endpoints.d.ts.map +1 -1
  60. package/build/src/api-endpoints.js +31 -533
  61. package/build/src/api-endpoints.js.map +1 -1
  62. package/build/src/index.d.ts +1 -1
  63. package/build/src/index.d.ts.map +1 -1
  64. package/build/src/index.js.map +1 -1
  65. package/package.json +1 -1
@@ -1,4917 +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
- type BoardViewConfigRequest = {
517
- type: "board";
518
- group_by: GroupByConfigRequest;
519
- sub_group_by?: GroupByConfigRequest | null;
520
- properties?: Array<ViewPropertyConfigRequest> | null;
521
- cover?: CoverConfigRequest | null;
522
- cover_size?: "small" | "medium" | "large" | null;
523
- cover_aspect?: "contain" | "cover" | null;
524
- card_layout?: "list" | "compact" | null;
525
- };
526
- type BoardViewConfigResponse = {
527
- type: "board";
528
- group_by: GroupByConfigResponse;
529
- sub_group_by?: GroupByConfigResponse;
530
- properties?: Array<ViewPropertyConfigResponse>;
531
- cover?: CoverConfigResponse;
532
- cover_size?: "small" | "medium" | "large";
533
- cover_aspect?: "contain" | "cover";
534
- card_layout?: "list" | "compact";
535
- };
536
- export type BookmarkBlockObjectResponse = {
537
- type: "bookmark";
538
- bookmark: MediaContentWithUrlAndCaptionResponse;
539
- parent: ParentForBlockBasedObjectResponse;
540
- object: "block";
541
- id: string;
542
- created_time: string;
543
- created_by: PartialUserObjectResponse;
544
- last_edited_time: string;
545
- last_edited_by: PartialUserObjectResponse;
546
- has_children: boolean;
547
- in_trash: boolean;
548
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
549
- archived: boolean;
550
- };
551
- type BooleanFormulaPropertyResponse = {
552
- type: "boolean";
553
- boolean: boolean | null;
554
- };
555
- type BooleanFormulaPropertyValueResponse = {
556
- type: "boolean";
557
- boolean: boolean | null;
558
- };
559
- type BotInfoResponse = {
560
- owner: {
561
- type: "user";
562
- user: {
563
- id: IdResponse;
564
- object: "user";
565
- name: string | null;
566
- avatar_url: string | null;
567
- type: "person";
568
- person: {
569
- email?: string;
570
- };
571
- } | PartialUserObjectResponse;
572
- } | {
573
- type: "workspace";
574
- workspace: true;
575
- };
576
- workspace_id: string;
577
- workspace_limits: {
578
- max_file_upload_size_in_bytes: number;
579
- };
580
- workspace_name: string | null;
581
- };
582
- export type BotUserObjectResponse = {
583
- type: "bot";
584
- bot: EmptyObject | BotInfoResponse;
585
- };
586
- export type BreadcrumbBlockObjectResponse = {
587
- type: "breadcrumb";
588
- breadcrumb: EmptyObject;
589
- parent: ParentForBlockBasedObjectResponse;
590
- object: "block";
591
- id: string;
592
- created_time: string;
593
- created_by: PartialUserObjectResponse;
594
- last_edited_time: string;
595
- last_edited_by: PartialUserObjectResponse;
596
- has_children: boolean;
597
- in_trash: boolean;
598
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
599
- archived: boolean;
600
- };
601
- export type BulletedListItemBlockObjectResponse = {
602
- type: "bulleted_list_item";
603
- bulleted_list_item: ContentWithRichTextAndColorResponse;
604
- parent: ParentForBlockBasedObjectResponse;
605
- object: "block";
606
- id: string;
607
- created_time: string;
608
- created_by: PartialUserObjectResponse;
609
- last_edited_time: string;
610
- last_edited_by: PartialUserObjectResponse;
611
- has_children: boolean;
612
- in_trash: boolean;
613
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
614
- archived: boolean;
615
- };
616
- type ButtonPropertyConfigurationRequest = {
617
- type?: "button";
618
- button: EmptyObject;
619
- };
620
- export type ButtonPropertyItemObjectResponse = {
621
- type: "button";
622
- button: EmptyObject;
623
- object: "property_item";
624
- id: string;
625
- };
626
- type ButtonSimplePropertyValueResponse = {
627
- type: "button";
628
- button: EmptyObject;
629
- };
630
- type CalendarViewConfigRequest = {
631
- type: "calendar";
632
- date_property_id: string;
633
- properties?: Array<ViewPropertyConfigRequest> | null;
634
- view_range?: "week" | "month" | null;
635
- show_weekends?: boolean | null;
636
- };
637
- type CalendarViewConfigResponse = {
638
- type: "calendar";
639
- date_property_id: string;
640
- date_property_name?: string;
641
- properties?: Array<ViewPropertyConfigResponse>;
642
- view_range?: "week" | "month";
643
- show_weekends?: boolean;
644
- };
645
- export type CalloutBlockObjectResponse = {
646
- type: "callout";
647
- callout: {
648
- rich_text: Array<RichTextItemResponse>;
649
- color: ApiColor;
650
- icon: PageIconResponse | null;
651
- };
652
- parent: ParentForBlockBasedObjectResponse;
653
- object: "block";
654
- id: string;
655
- created_time: string;
656
- created_by: PartialUserObjectResponse;
657
- last_edited_time: string;
658
- last_edited_by: PartialUserObjectResponse;
659
- has_children: boolean;
660
- in_trash: boolean;
661
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
662
- archived: boolean;
663
- };
664
- type ChartAggregationRequest = {
665
- aggregator: "count" | "count_values" | "sum" | "average" | "median" | "min" | "max" | "range" | "unique" | "empty" | "not_empty" | "percent_empty" | "percent_not_empty" | "checked" | "unchecked" | "percent_checked" | "percent_unchecked" | "earliest_date" | "latest_date" | "date_range";
666
- property_id?: string;
667
- };
668
- type ChartAggregationResponse = {
669
- aggregator: "count" | "count_values" | "sum" | "average" | "median" | "min" | "max" | "range" | "unique" | "empty" | "not_empty" | "percent_empty" | "percent_not_empty" | "checked" | "unchecked" | "percent_checked" | "percent_unchecked" | "earliest_date" | "latest_date" | "date_range";
670
- property_id?: string;
671
- };
672
- type ChartReferenceLineRequest = {
673
- value: number;
674
- label: string;
675
- color: "gray" | "lightgray" | "brown" | "yellow" | "orange" | "green" | "blue" | "purple" | "pink" | "red";
676
- dash_style: "solid" | "dash";
677
- id?: string;
678
- };
679
- type ChartReferenceLineResponse = {
680
- id: string;
681
- value: number;
682
- label: string;
683
- color: "gray" | "lightgray" | "brown" | "yellow" | "orange" | "green" | "blue" | "purple" | "pink" | "red";
684
- dash_style: "solid" | "dash";
685
- };
686
- type ChartViewConfigRequest = {
687
- type: "chart";
688
- chart_type: "column" | "bar" | "line" | "donut" | "number";
689
- x_axis?: GroupByConfigRequest | null;
690
- y_axis?: ChartAggregationRequest | null;
691
- x_axis_property_id?: string | null;
692
- y_axis_property_id?: string | null;
693
- value?: ChartAggregationRequest | null;
694
- sort?: "manual" | "x_ascending" | "x_descending" | "y_ascending" | "y_descending" | null;
695
- color_theme?: "gray" | "blue" | "yellow" | "green" | "purple" | "teal" | "orange" | "pink" | "red" | "auto" | "colorful" | null;
696
- height?: "small" | "medium" | "large" | "extra_large" | null;
697
- hide_empty_groups?: boolean | null;
698
- legend_position?: "off" | "bottom" | "side" | null;
699
- show_data_labels?: boolean | null;
700
- axis_labels?: "none" | "x_axis" | "y_axis" | "both" | null;
701
- grid_lines?: "none" | "horizontal" | "vertical" | "both" | null;
702
- cumulative?: boolean | null;
703
- smooth_line?: boolean | null;
704
- hide_line_fill_area?: boolean | null;
705
- group_style?: "normal" | "percent" | "side_by_side" | null;
706
- y_axis_min?: number | null;
707
- y_axis_max?: number | null;
708
- donut_labels?: "none" | "value" | "name" | "name_and_value" | null;
709
- hide_title?: boolean | null;
710
- stack_by?: GroupByConfigRequest | null;
711
- reference_lines?: Array<ChartReferenceLineRequest> | null;
712
- caption?: string | null;
713
- color_by_value?: boolean | null;
714
- };
715
- type ChartViewConfigResponse = {
716
- type: "chart";
717
- chart_type: "column" | "bar" | "line" | "donut" | "number";
718
- x_axis?: GroupByConfigResponse | null;
719
- y_axis?: ChartAggregationResponse | null;
720
- x_axis_property_id?: string;
721
- y_axis_property_id?: string;
722
- value?: ChartAggregationResponse;
723
- sort?: "manual" | "x_ascending" | "x_descending" | "y_ascending" | "y_descending";
724
- color_theme?: "gray" | "blue" | "yellow" | "green" | "purple" | "teal" | "orange" | "pink" | "red" | "auto" | "colorful";
725
- height?: "small" | "medium" | "large" | "extra_large";
726
- hide_empty_groups?: boolean;
727
- legend_position?: "off" | "bottom" | "side";
728
- show_data_labels?: boolean;
729
- axis_labels?: "none" | "x_axis" | "y_axis" | "both";
730
- grid_lines?: "none" | "horizontal" | "vertical" | "both";
731
- cumulative?: boolean;
732
- smooth_line?: boolean;
733
- hide_line_fill_area?: boolean;
734
- group_style?: "normal" | "percent" | "side_by_side";
735
- y_axis_min?: number | null;
736
- y_axis_max?: number | null;
737
- donut_labels?: "none" | "value" | "name" | "name_and_value";
738
- hide_title?: boolean;
739
- stack_by?: GroupByConfigResponse | null;
740
- reference_lines?: Array<ChartReferenceLineResponse> | null;
741
- caption?: string | null;
742
- color_by_value?: boolean;
743
- };
744
- type CheckboxDatabasePropertyConfigResponse = {
745
- type: "checkbox";
746
- checkbox: EmptyObject;
747
- };
748
- type CheckboxGroupByConfigRequest = {
749
- type: "checkbox";
750
- property_id: string;
751
- sort: GroupSortRequest;
752
- hide_empty_groups?: boolean;
753
- };
754
- type CheckboxGroupByConfigResponse = {
755
- type: "checkbox";
756
- property_id: string;
757
- sort: GroupSortResponse;
758
- property_name?: string;
759
- hide_empty_groups?: boolean;
760
- };
761
- type CheckboxPropertyConfigurationRequest = {
762
- type?: "checkbox";
763
- checkbox: EmptyObject;
764
- };
765
- type CheckboxPropertyFilter = {
766
- equals: boolean;
767
- } | {
768
- does_not_equal: boolean;
769
- };
770
- export type CheckboxPropertyItemObjectResponse = {
771
- type: "checkbox";
772
- checkbox: boolean;
773
- object: "property_item";
774
- id: string;
775
- };
776
- type CheckboxSimplePropertyValueResponse = {
777
- type: "checkbox";
778
- checkbox: boolean;
779
- };
780
- export type ChildDatabaseBlockObjectResponse = {
781
- type: "child_database";
782
- child_database: TitleObjectResponse;
783
- parent: ParentForBlockBasedObjectResponse;
784
- object: "block";
785
- id: string;
786
- created_time: string;
787
- created_by: PartialUserObjectResponse;
788
- last_edited_time: string;
789
- last_edited_by: PartialUserObjectResponse;
790
- has_children: boolean;
791
- in_trash: boolean;
792
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
793
- archived: boolean;
794
- };
795
- export type ChildPageBlockObjectResponse = {
796
- type: "child_page";
797
- child_page: TitleObjectResponse;
798
- parent: ParentForBlockBasedObjectResponse;
799
- object: "block";
800
- id: string;
801
- created_time: string;
802
- created_by: PartialUserObjectResponse;
803
- last_edited_time: string;
804
- last_edited_by: PartialUserObjectResponse;
805
- has_children: boolean;
806
- in_trash: boolean;
807
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
808
- archived: boolean;
809
- };
810
- export type CodeBlockObjectResponse = {
811
- type: "code";
812
- code: {
813
- rich_text: Array<RichTextItemResponse>;
814
- caption: Array<RichTextItemResponse>;
815
- language: LanguageRequest;
816
- };
817
- parent: ParentForBlockBasedObjectResponse;
818
- object: "block";
819
- id: string;
820
- created_time: string;
821
- created_by: PartialUserObjectResponse;
822
- last_edited_time: string;
823
- last_edited_by: PartialUserObjectResponse;
824
- has_children: boolean;
825
- in_trash: boolean;
826
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
827
- archived: boolean;
828
- };
829
- export type ColumnBlockObjectResponse = {
830
- type: "column";
831
- column: ColumnResponse;
832
- parent: ParentForBlockBasedObjectResponse;
833
- object: "block";
834
- id: string;
835
- created_time: string;
836
- created_by: PartialUserObjectResponse;
837
- last_edited_time: string;
838
- last_edited_by: PartialUserObjectResponse;
839
- has_children: boolean;
840
- in_trash: boolean;
841
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
842
- archived: boolean;
843
- };
844
- type ColumnBlockWithChildrenRequest = {
845
- column: ColumnWithChildrenRequest;
846
- type?: "column";
847
- object?: "block";
848
- };
849
- export type ColumnListBlockObjectResponse = {
850
- type: "column_list";
851
- column_list: EmptyObject;
852
- parent: ParentForBlockBasedObjectResponse;
853
- object: "block";
854
- id: string;
855
- created_time: string;
856
- created_by: PartialUserObjectResponse;
857
- last_edited_time: string;
858
- last_edited_by: PartialUserObjectResponse;
859
- has_children: boolean;
860
- in_trash: boolean;
861
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
862
- archived: boolean;
863
- };
864
- type ColumnListRequest = {
865
- children: Array<ColumnBlockWithChildrenRequest>;
866
- };
867
- type ColumnResponse = {
868
- width_ratio?: number;
869
- };
870
- type ColumnWithChildrenRequest = {
871
- children: Array<BlockObjectWithSingleLevelOfChildrenRequest>;
872
- width_ratio?: number;
873
- };
874
- export type CommentObjectResponse = {
875
- object: "comment";
876
- id: IdResponse;
877
- parent: CommentParentResponse;
878
- discussion_id: IdResponse;
879
- created_time: string;
880
- last_edited_time: string;
881
- created_by: PartialUserObjectResponse;
882
- rich_text: Array<RichTextItemResponse>;
883
- display_name: {
884
- type: "custom" | "user" | "integration";
885
- resolved_name: string | null;
886
- };
887
- attachments?: Array<{
888
- category: "audio" | "image" | "pdf" | "productivity" | "video";
889
- file: InternalFileResponse;
890
- }>;
891
- };
892
- type CommentParentResponse = PageIdCommentParentResponse | BlockIdCommentParentResponse;
893
- type ContentPositionSchema = {
894
- type: "after_block";
895
- after_block: {
896
- id: IdRequest;
897
- };
898
- } | {
899
- type: "start";
900
- } | {
901
- type: "end";
902
- };
903
- type ContentWithExpressionRequest = {
904
- expression: string;
905
- };
906
- type ContentWithRichTextAndColorAndListResponse = {
907
- rich_text: Array<RichTextItemResponse>;
908
- color: ApiColor;
909
- list_start_index?: number;
910
- list_format?: NumberedListFormat;
911
- };
912
- type ContentWithRichTextAndColorRequest = {
913
- rich_text: Array<RichTextItemRequest>;
914
- color?: ApiColor;
915
- };
916
- type ContentWithRichTextAndColorResponse = {
917
- rich_text: Array<RichTextItemResponse>;
918
- color: ApiColor;
919
- };
920
- type ContentWithRichTextRequest = {
921
- rich_text: Array<RichTextItemRequest>;
922
- };
923
- type ContentWithSingleLevelOfChildrenRequest = {
924
- rich_text: Array<RichTextItemRequest>;
925
- color?: ApiColor;
926
- children?: Array<BlockObjectRequestWithoutChildren>;
927
- };
928
- type ContentWithTableResponse = {
929
- has_column_header: boolean;
930
- has_row_header: boolean;
931
- table_width: number;
932
- };
933
- type ContentWithTableRowRequest = {
934
- cells: Array<Array<RichTextItemRequest>>;
935
- };
936
- type ContentWithTableRowResponse = {
937
- cells: Array<Array<RichTextItemResponse>>;
938
- };
939
- type CoverConfigRequest = {
940
- type: "page_cover" | "page_content" | "property";
941
- property_id?: string;
942
- };
943
- type CoverConfigResponse = {
944
- type: "page_cover" | "page_content" | "page_content_first" | "property";
945
- property_id?: string;
946
- };
947
- type CreateDatabaseForViewRequest = {
948
- parent: {
949
- type: "page_id";
950
- page_id: IdRequest;
951
- };
952
- position?: {
953
- type: "after_block";
954
- block_id: IdRequest;
955
- };
956
- };
957
- type CreateViewQueryRequest = {
958
- page_size?: number;
959
- };
960
- type CreateViewRequest = {
961
- data_source_id: IdRequest;
962
- name: string;
963
- type: ViewTypeRequest;
964
- database_id?: IdRequest;
965
- view_id?: IdRequest;
966
- filter?: ViewFilterRequest;
967
- sorts?: ViewSortsRequest;
968
- quick_filters?: Record<string, QuickFilterConditionRequest>;
969
- create_database?: CreateDatabaseForViewRequest;
970
- configuration?: ViewConfigRequest;
971
- position?: ViewPositionRequest;
972
- placement?: WidgetPlacementRequest;
973
- };
974
- type CreatedByDatabasePropertyConfigResponse = {
975
- type: "created_by";
976
- created_by: EmptyObject;
977
- };
978
- type CreatedByPropertyConfigurationRequest = {
979
- type?: "created_by";
980
- created_by: EmptyObject;
981
- };
982
- export type CreatedByPropertyItemObjectResponse = {
983
- type: "created_by";
984
- created_by: PartialUserObjectResponse | UserObjectResponse;
985
- object: "property_item";
986
- id: string;
987
- };
988
- type CreatedBySimplePropertyValueResponse = {
989
- type: "created_by";
990
- created_by: UserValueResponse;
991
- };
992
- type CreatedTimeDatabasePropertyConfigResponse = {
993
- type: "created_time";
994
- created_time: EmptyObject;
995
- };
996
- type CreatedTimePropertyConfigurationRequest = {
997
- type?: "created_time";
998
- created_time: EmptyObject;
999
- };
1000
- export type CreatedTimePropertyItemObjectResponse = {
1001
- type: "created_time";
1002
- created_time: string;
1003
- object: "property_item";
1004
- id: string;
1005
- };
1006
- type CreatedTimeSimplePropertyValueResponse = {
1007
- type: "created_time";
1008
- created_time: string;
1009
- };
1010
- type CustomEmojiPageIconRequest = {
1011
- type?: "custom_emoji";
1012
- custom_emoji: {
1013
- id: IdRequest;
1014
- name?: string;
1015
- url?: string;
1016
- };
1017
- };
1018
- type CustomEmojiPageIconResponse = {
1019
- type: "custom_emoji";
1020
- custom_emoji: CustomEmojiResponse;
1021
- };
1022
- type CustomEmojiResponse = {
1023
- id: IdResponse;
1024
- name: string;
1025
- url: string;
1026
- };
1027
- export type DashboardRowResponse = {
1028
- id: string;
1029
- widgets: Array<DashboardWidgetResponse>;
1030
- height?: number;
1031
- };
1032
- type DashboardViewConfigResponse = {
1033
- type: "dashboard";
1034
- rows: Array<DashboardRowResponse>;
1035
- };
1036
- export type DashboardWidgetResponse = {
1037
- id: string;
1038
- view_id: string;
1039
- width?: number;
1040
- row_index?: number;
1041
- };
1042
- export type DataSourceObjectResponse = {
1043
- object: "data_source";
1044
- id: IdResponse;
1045
- title: Array<RichTextItemResponse>;
1046
- description: Array<RichTextItemResponse>;
1047
- parent: ParentOfDataSourceResponse;
1048
- database_parent: ParentOfDatabaseResponse;
1049
- is_inline: boolean;
1050
- in_trash: boolean;
1051
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1052
- archived: boolean;
1053
- created_time: string;
1054
- last_edited_time: string;
1055
- created_by: PartialUserObjectResponse;
1056
- last_edited_by: PartialUserObjectResponse;
1057
- properties: Record<string, DatabasePropertyConfigResponse>;
1058
- icon: PageIconResponse | null;
1059
- cover: PageCoverResponse | null;
1060
- url: string;
1061
- public_url: string | null;
1062
- };
1063
- type DataSourceParentResponse = {
1064
- type: "data_source_id";
1065
- data_source_id: IdResponse;
1066
- database_id: IdResponse;
1067
- };
1068
- type DataSourceReferenceResponse = {
1069
- id: IdResponse;
1070
- name: string;
1071
- };
1072
- export type DataSourceViewObjectResponse = {
1073
- object: "view";
1074
- id: IdResponse;
1075
- parent: DatabaseParentResponse;
1076
- name: string;
1077
- type: "table" | "board" | "list" | "calendar" | "timeline" | "gallery" | "form" | "chart" | "map" | "dashboard";
1078
- created_time: string;
1079
- last_edited_time: string;
1080
- url: string;
1081
- data_source_id?: string | null;
1082
- created_by?: PartialUserObjectResponse | null;
1083
- last_edited_by?: PartialUserObjectResponse | null;
1084
- filter?: ViewFilterResponse | null;
1085
- sorts?: Array<ViewSortResponse> | null;
1086
- quick_filters?: Record<string, QuickFilterConditionResponse> | null;
1087
- configuration?: ViewConfigResponse | null;
1088
- dashboard_view_id?: string;
1089
- };
1090
- type DataSourceViewReferenceResponse = {
1091
- object: "view";
1092
- id: IdResponse;
1093
- };
1094
- export type DatabaseObjectResponse = {
1095
- object: "database";
1096
- id: IdResponse;
1097
- title: Array<RichTextItemResponse>;
1098
- description: Array<RichTextItemResponse>;
1099
- parent: ParentOfDatabaseResponse;
1100
- is_inline: boolean;
1101
- in_trash: boolean;
1102
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1103
- archived: boolean;
1104
- is_locked: boolean;
1105
- created_time: string;
1106
- last_edited_time: string;
1107
- data_sources: Array<DataSourceReferenceResponse>;
1108
- icon: PageIconResponse | null;
1109
- cover: PageCoverResponse | null;
1110
- url: string;
1111
- public_url: string | null;
1112
- };
1113
- type DatabaseParentResponse = {
1114
- type: "database_id";
1115
- database_id: IdResponse;
1116
- };
1117
- type DatabasePropertyConfigResponse = DatabasePropertyConfigResponseCommon & (NumberDatabasePropertyConfigResponse | FormulaDatabasePropertyConfigResponse | SelectDatabasePropertyConfigResponse | MultiSelectDatabasePropertyConfigResponse | StatusDatabasePropertyConfigResponse | RelationDatabasePropertyConfigResponse | RollupDatabasePropertyConfigResponse | UniqueIdDatabasePropertyConfigResponse | TitleDatabasePropertyConfigResponse | RichTextDatabasePropertyConfigResponse | UrlDatabasePropertyConfigResponse | PeopleDatabasePropertyConfigResponse | FilesDatabasePropertyConfigResponse | EmailDatabasePropertyConfigResponse | PhoneNumberDatabasePropertyConfigResponse | DateDatabasePropertyConfigResponse | CheckboxDatabasePropertyConfigResponse | CreatedByDatabasePropertyConfigResponse | CreatedTimeDatabasePropertyConfigResponse | LastEditedByDatabasePropertyConfigResponse | LastEditedTimeDatabasePropertyConfigResponse);
1118
- type DatabasePropertyConfigResponseCommon = {
1119
- id: string;
1120
- name: string;
1121
- description: PropertyDescriptionRequest | null;
1122
- };
1123
- type DatabasePropertyRelationConfigResponse = DatabasePropertyRelationConfigResponseCommon & (SinglePropertyDatabasePropertyRelationConfigResponse | DualPropertyDatabasePropertyRelationConfigResponse);
1124
- type DatabasePropertyRelationConfigResponseCommon = {
1125
- database_id: IdResponse;
1126
- data_source_id: IdResponse;
1127
- };
1128
- type DateDatabasePropertyConfigResponse = {
1129
- type: "date";
1130
- date: EmptyObject;
1131
- };
1132
- type DateFormulaPropertyResponse = {
1133
- type: "date";
1134
- date: DateResponse | null;
1135
- };
1136
- type DateFormulaPropertyValueResponse = {
1137
- type: "date";
1138
- date: DateResponse | null;
1139
- };
1140
- type DateGroupByConfigRequest = {
1141
- type: "date" | "created_time" | "last_edited_time";
1142
- property_id: string;
1143
- group_by: "relative" | "day" | "week" | "month" | "year";
1144
- sort: GroupSortRequest;
1145
- hide_empty_groups?: boolean;
1146
- start_day_of_week?: 0 | 1;
1147
- };
1148
- type DateGroupByConfigResponse = {
1149
- type: "date" | "created_time" | "last_edited_time";
1150
- property_id: string;
1151
- group_by: "relative" | "day" | "week" | "month" | "year";
1152
- sort: GroupSortResponse;
1153
- property_name?: string;
1154
- hide_empty_groups?: boolean;
1155
- start_day_of_week?: 0 | 1;
1156
- };
1157
- type DatePartialRollupValueResponse = {
1158
- type: "date";
1159
- date: DateResponse | null;
1160
- };
1161
- type DatePropertyConfigurationRequest = {
1162
- type?: "date";
1163
- date: EmptyObject;
1164
- };
1165
- type DatePropertyFilter = {
1166
- equals: string;
1167
- } | {
1168
- before: string;
1169
- } | {
1170
- after: string;
1171
- } | {
1172
- on_or_before: string;
1173
- } | {
1174
- on_or_after: string;
1175
- } | {
1176
- this_week: EmptyObject;
1177
- } | {
1178
- past_week: EmptyObject;
1179
- } | {
1180
- past_month: EmptyObject;
1181
- } | {
1182
- past_year: EmptyObject;
1183
- } | {
1184
- next_week: EmptyObject;
1185
- } | {
1186
- next_month: EmptyObject;
1187
- } | {
1188
- next_year: EmptyObject;
1189
- } | ExistencePropertyFilter;
1190
- export type DatePropertyItemObjectResponse = {
1191
- type: "date";
1192
- date: DateResponse | null;
1193
- object: "property_item";
1194
- id: string;
1195
- };
1196
- type DateRequest = {
1197
- start: string;
1198
- end?: string | null;
1199
- time_zone?: TimeZoneRequest | null;
1200
- };
1201
- type DateResponse = {
1202
- start: string;
1203
- end: string | null;
1204
- time_zone: TimeZoneRequest | null;
1205
- };
1206
- type DateSimplePropertyValueResponse = {
1207
- type: "date";
1208
- date: DateResponse | null;
1209
- };
1210
- export type DeletedViewQueryResponse = {
1211
- object: "view_query";
1212
- id: IdResponse;
1213
- deleted: boolean;
1214
- };
1215
- export type DividerBlockObjectResponse = {
1216
- type: "divider";
1217
- divider: EmptyObject;
1218
- parent: ParentForBlockBasedObjectResponse;
1219
- object: "block";
1220
- id: string;
1221
- created_time: string;
1222
- created_by: PartialUserObjectResponse;
1223
- last_edited_time: string;
1224
- last_edited_by: PartialUserObjectResponse;
1225
- has_children: boolean;
1226
- in_trash: boolean;
1227
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1228
- archived: boolean;
1229
- };
1230
- type DualPropertyDatabasePropertyRelationConfigResponse = {
1231
- type?: "dual_property";
1232
- dual_property: {
1233
- synced_property_id: string;
1234
- synced_property_name: string;
1235
- };
1236
- };
1237
- type EmailDatabasePropertyConfigResponse = {
1238
- type: "email";
1239
- email: EmptyObject;
1240
- };
1241
- type EmailPropertyConfigurationRequest = {
1242
- type?: "email";
1243
- email: EmptyObject;
1244
- };
1245
- export type EmailPropertyItemObjectResponse = {
1246
- type: "email";
1247
- email: string | null;
1248
- object: "property_item";
1249
- id: string;
1250
- };
1251
- type EmailSimplePropertyValueResponse = {
1252
- type: "email";
1253
- email: string | null;
1254
- };
1255
- export type EmbedBlockObjectResponse = {
1256
- type: "embed";
1257
- embed: MediaContentWithUrlAndCaptionResponse;
1258
- parent: ParentForBlockBasedObjectResponse;
1259
- object: "block";
1260
- id: string;
1261
- created_time: string;
1262
- created_by: PartialUserObjectResponse;
1263
- last_edited_time: string;
1264
- last_edited_by: PartialUserObjectResponse;
1265
- has_children: boolean;
1266
- in_trash: boolean;
1267
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1268
- archived: boolean;
1269
- };
1270
- type EmojiPageIconRequest = {
1271
- type?: "emoji";
1272
- emoji: EmojiRequest;
1273
- };
1274
- type EmojiPageIconResponse = {
1275
- type: "emoji";
1276
- emoji: EmojiRequest;
1277
- };
1278
- type EmojiRequest = string;
1279
- type EmptyObject = Record<string, never>;
1280
- export type EquationBlockObjectResponse = {
1281
- type: "equation";
1282
- equation: ExpressionObjectResponse;
1283
- parent: ParentForBlockBasedObjectResponse;
1284
- object: "block";
1285
- id: string;
1286
- created_time: string;
1287
- created_by: PartialUserObjectResponse;
1288
- last_edited_time: string;
1289
- last_edited_by: PartialUserObjectResponse;
1290
- has_children: boolean;
1291
- in_trash: boolean;
1292
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1293
- archived: boolean;
1294
- };
1295
- type EquationRichTextItemRequest = {
1296
- type?: "equation";
1297
- equation: {
1298
- expression: string;
1299
- };
1300
- };
1301
- export type EquationRichTextItemResponse = {
1302
- type: "equation";
1303
- equation: {
1304
- expression: string;
1305
- };
1306
- };
1307
- type ExistencePropertyFilter = {
1308
- is_empty: true;
1309
- } | {
1310
- is_not_empty: true;
1311
- };
1312
- type ExpressionObjectResponse = {
1313
- expression: string;
1314
- };
1315
- type ExternalFileRequest = {
1316
- url: TextRequest;
1317
- };
1318
- type ExternalInternalOrExternalFileWithNameResponse = {
1319
- type: "external";
1320
- external: {
1321
- url: string;
1322
- };
1323
- };
1324
- type ExternalMediaContentWithFileAndCaptionResponse = {
1325
- type: "external";
1326
- external: {
1327
- url: TextRequest;
1328
- };
1329
- caption: Array<RichTextItemResponse>;
1330
- };
1331
- type ExternalMediaContentWithFileNameAndCaptionResponse = {
1332
- type: "external";
1333
- external: {
1334
- url: TextRequest;
1335
- };
1336
- caption: Array<RichTextItemResponse>;
1337
- name: string;
1338
- };
1339
- type ExternalPageCoverRequest = {
1340
- type?: "external";
1341
- external: {
1342
- url: string;
1343
- };
1344
- };
1345
- type ExternalPageCoverResponse = {
1346
- type: "external";
1347
- external: {
1348
- url: string;
1349
- };
1350
- };
1351
- type ExternalPageIconRequest = {
1352
- type?: "external";
1353
- external: {
1354
- url: string;
1355
- };
1356
- };
1357
- type ExternalPageIconResponse = {
1358
- type: "external";
1359
- external: {
1360
- url: string;
1361
- };
1362
- };
1363
- export type FileBlockObjectResponse = {
1364
- type: "file";
1365
- file: MediaContentWithFileNameAndCaptionResponse;
1366
- parent: ParentForBlockBasedObjectResponse;
1367
- object: "block";
1368
- id: string;
1369
- created_time: string;
1370
- created_by: PartialUserObjectResponse;
1371
- last_edited_time: string;
1372
- last_edited_by: PartialUserObjectResponse;
1373
- has_children: boolean;
1374
- in_trash: boolean;
1375
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1376
- archived: boolean;
1377
- };
1378
- type FileInternalOrExternalFileWithNameResponse = {
1379
- type: "file";
1380
- file: InternalFileResponse;
1381
- };
1382
- type FileMediaContentWithFileAndCaptionResponse = {
1383
- type: "file";
1384
- file: InternalFileResponse;
1385
- caption: Array<RichTextItemResponse>;
1386
- };
1387
- type FileMediaContentWithFileNameAndCaptionResponse = {
1388
- type: "file";
1389
- file: InternalFileResponse;
1390
- caption: Array<RichTextItemResponse>;
1391
- name: string;
1392
- };
1393
- type FilePageCoverResponse = {
1394
- type: "file";
1395
- file: InternalFileResponse;
1396
- };
1397
- type FilePageIconResponse = {
1398
- type: "file";
1399
- file: InternalFileResponse;
1400
- };
1401
- type FileUploadIdRequest = {
1402
- id: IdRequest;
1403
- };
1404
- export type FileUploadObjectResponse = {
1405
- object: "file_upload";
1406
- id: IdResponse;
1407
- created_time: string;
1408
- created_by: {
1409
- id: IdResponse;
1410
- type: "person" | "bot" | "agent";
1411
- };
1412
- last_edited_time: string;
1413
- in_trash: boolean;
1414
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1415
- archived: boolean;
1416
- expiry_time: string | null;
1417
- status: "pending" | "uploaded" | "expired" | "failed";
1418
- filename: string | null;
1419
- content_type: string | null;
1420
- content_length: number | null;
1421
- upload_url?: string;
1422
- complete_url?: string;
1423
- file_import_result?: {
1424
- imported_time: string;
1425
- } & ({
1426
- type: "success";
1427
- success: EmptyObject;
1428
- } | {
1429
- type: "error";
1430
- error: {
1431
- type: "validation_error" | "internal_system_error" | "download_error" | "upload_error";
1432
- code: string;
1433
- message: string;
1434
- parameter: string | null;
1435
- status_code: number | null;
1436
- };
1437
- });
1438
- number_of_parts?: {
1439
- total: number;
1440
- sent: number;
1441
- };
1442
- };
1443
- type FileUploadPageCoverRequest = {
1444
- type?: "file_upload";
1445
- file_upload: {
1446
- id: string;
1447
- };
1448
- };
1449
- type FileUploadPageIconRequest = {
1450
- type?: "file_upload";
1451
- file_upload: {
1452
- id: string;
1453
- };
1454
- };
1455
- type FileUploadWithOptionalNameRequest = {
1456
- file_upload: FileUploadIdRequest;
1457
- type?: "file_upload";
1458
- name?: StringRequest;
1459
- };
1460
- type FilesDatabasePropertyConfigResponse = {
1461
- type: "files";
1462
- files: EmptyObject;
1463
- };
1464
- type FilesPropertyConfigurationRequest = {
1465
- type?: "files";
1466
- files: EmptyObject;
1467
- };
1468
- export type FilesPropertyItemObjectResponse = {
1469
- type: "files";
1470
- files: Array<InternalOrExternalFileWithNameResponse>;
1471
- object: "property_item";
1472
- id: string;
1473
- };
1474
- type FilesSimplePropertyValueResponse = {
1475
- type: "files";
1476
- files: Array<InternalOrExternalFileWithNameResponse>;
1477
- };
1478
- type FormViewConfigRequest = {
1479
- type: "form";
1480
- is_form_closed?: boolean | null;
1481
- anonymous_submissions?: boolean | null;
1482
- submission_permissions?: "none" | "comment_only" | "reader" | "read_and_write" | "editor" | null;
1483
- };
1484
- type FormViewConfigResponse = {
1485
- type: "form";
1486
- is_form_closed?: boolean;
1487
- anonymous_submissions?: boolean;
1488
- submission_permissions?: "none" | "comment_only" | "reader" | "read_and_write" | "editor";
1489
- };
1490
- type FormulaCheckboxSubGroupByRequest = {
1491
- type: "checkbox";
1492
- sort: GroupSortRequest;
1493
- };
1494
- type FormulaCheckboxSubGroupByResponse = {
1495
- type: "checkbox";
1496
- sort: GroupSortResponse;
1497
- };
1498
- type FormulaDatabasePropertyConfigResponse = {
1499
- type: "formula";
1500
- formula: {
1501
- expression: string;
1502
- };
1503
- };
1504
- type FormulaDateSubGroupByRequest = {
1505
- type: "date";
1506
- group_by: "relative" | "day" | "week" | "month" | "year";
1507
- sort: GroupSortRequest;
1508
- start_day_of_week?: 0 | 1;
1509
- };
1510
- type FormulaDateSubGroupByResponse = {
1511
- type: "date";
1512
- group_by: "relative" | "day" | "week" | "month" | "year";
1513
- sort: GroupSortResponse;
1514
- start_day_of_week?: 0 | 1;
1515
- };
1516
- type FormulaGroupByConfigRequest = {
1517
- type: "formula";
1518
- property_id: string;
1519
- group_by: FormulaDateSubGroupByRequest | FormulaTextSubGroupByRequest | FormulaNumberSubGroupByRequest | FormulaCheckboxSubGroupByRequest;
1520
- hide_empty_groups?: boolean;
1521
- };
1522
- type FormulaGroupByConfigResponse = {
1523
- type: "formula";
1524
- property_id: string;
1525
- group_by: FormulaSubGroupByResponse;
1526
- property_name?: string;
1527
- hide_empty_groups?: boolean;
1528
- };
1529
- type FormulaNumberSubGroupByRequest = {
1530
- type: "number";
1531
- sort: GroupSortRequest;
1532
- range_start?: number;
1533
- range_end?: number;
1534
- range_size?: number;
1535
- };
1536
- type FormulaNumberSubGroupByResponse = {
1537
- type: "number";
1538
- sort: GroupSortResponse;
1539
- range_start?: number;
1540
- range_end?: number;
1541
- range_size?: number;
1542
- };
1543
- type FormulaPropertyConfigurationRequest = {
1544
- type?: "formula";
1545
- formula: {
1546
- expression?: string;
1547
- };
1548
- };
1549
- type FormulaPropertyFilter = {
1550
- string: TextPropertyFilter;
1551
- } | {
1552
- checkbox: CheckboxPropertyFilter;
1553
- } | {
1554
- number: NumberPropertyFilter;
1555
- } | {
1556
- date: DatePropertyFilter;
1557
- };
1558
- export type FormulaPropertyItemObjectResponse = {
1559
- type: "formula";
1560
- formula: FormulaPropertyResponse;
1561
- object: "property_item";
1562
- id: string;
1563
- };
1564
- type FormulaPropertyResponse = StringFormulaPropertyResponse | DateFormulaPropertyResponse | NumberFormulaPropertyResponse | BooleanFormulaPropertyResponse;
1565
- type FormulaPropertyValueResponse = BooleanFormulaPropertyValueResponse | DateFormulaPropertyValueResponse | NumberFormulaPropertyValueResponse | StringFormulaPropertyValueResponse;
1566
- type FormulaSimplePropertyValueResponse = {
1567
- type: "formula";
1568
- formula: FormulaPropertyValueResponse;
1569
- };
1570
- /**
1571
- * Sub-group-by configuration for formula properties based on result type.
1572
- */
1573
- type FormulaSubGroupByResponse = FormulaDateSubGroupByResponse | FormulaTextSubGroupByResponse | FormulaNumberSubGroupByResponse | FormulaCheckboxSubGroupByResponse;
1574
- type FormulaTextSubGroupByRequest = {
1575
- type: "text";
1576
- group_by: "exact" | "alphabet_prefix";
1577
- sort: GroupSortRequest;
1578
- };
1579
- type FormulaTextSubGroupByResponse = {
1580
- type: "text";
1581
- group_by: "exact" | "alphabet_prefix";
1582
- sort: GroupSortResponse;
1583
- };
1584
- type GalleryViewConfigRequest = {
1585
- type: "gallery";
1586
- properties?: Array<ViewPropertyConfigRequest> | null;
1587
- cover?: CoverConfigRequest | null;
1588
- cover_size?: "small" | "medium" | "large" | null;
1589
- cover_aspect?: "contain" | "cover" | null;
1590
- card_layout?: "list" | "compact" | null;
1591
- };
1592
- type GalleryViewConfigResponse = {
1593
- type: "gallery";
1594
- properties?: Array<ViewPropertyConfigResponse>;
1595
- cover?: CoverConfigResponse;
1596
- cover_size?: "small" | "medium" | "large";
1597
- cover_aspect?: "contain" | "cover";
1598
- card_layout?: "list" | "compact";
1599
- };
1600
- /**
1601
- * Group-by configuration based on property type.
1602
- */
1603
- type GroupByConfigRequest = SelectGroupByConfigRequest | StatusGroupByConfigRequest | PersonGroupByConfigRequest | RelationGroupByConfigRequest | DateGroupByConfigRequest | TextGroupByConfigRequest | NumberGroupByConfigRequest | CheckboxGroupByConfigRequest | FormulaGroupByConfigRequest;
1604
- /**
1605
- * Group-by configuration based on property type.
1606
- */
1607
- type GroupByConfigResponse = SelectGroupByConfigResponse | StatusGroupByConfigResponse | PersonGroupByConfigResponse | RelationGroupByConfigResponse | DateGroupByConfigResponse | TextGroupByConfigResponse | NumberGroupByConfigResponse | CheckboxGroupByConfigResponse | FormulaGroupByConfigResponse;
1608
- type GroupFilterOperatorArray = Array<PropertyOrTimestampFilter | {
1609
- or: PropertyOrTimestampFilterArray;
1610
- } | {
1611
- and: PropertyOrTimestampFilterArray;
1612
- }>;
1613
- type GroupObjectRequest = {
1614
- id: IdRequest;
1615
- name?: string | null;
1616
- object?: "group";
1617
- };
1618
- export type GroupObjectResponse = {
1619
- id: IdResponse;
1620
- object: "group";
1621
- name: string | null;
1622
- };
1623
- type GroupSortRequest = {
1624
- type: "manual" | "ascending" | "descending";
1625
- };
1626
- type GroupSortResponse = {
1627
- type: "manual" | "ascending" | "descending";
1628
- };
1629
- type HeaderContentWithRichTextAndColorRequest = {
1630
- rich_text: Array<RichTextItemRequest>;
1631
- color?: ApiColor;
1632
- is_toggleable?: boolean;
1633
- };
1634
- type HeaderContentWithRichTextAndColorResponse = {
1635
- rich_text: Array<RichTextItemResponse>;
1636
- color: ApiColor;
1637
- is_toggleable: boolean;
1638
- };
1639
- type HeaderContentWithSingleLevelOfChildrenRequest = {
1640
- rich_text: Array<RichTextItemRequest>;
1641
- color?: ApiColor;
1642
- is_toggleable?: boolean;
1643
- children?: Array<BlockObjectRequestWithoutChildren>;
1644
- };
1645
- export type Heading1BlockObjectResponse = {
1646
- type: "heading_1";
1647
- heading_1: HeaderContentWithRichTextAndColorResponse;
1648
- parent: ParentForBlockBasedObjectResponse;
1649
- object: "block";
1650
- id: string;
1651
- created_time: string;
1652
- created_by: PartialUserObjectResponse;
1653
- last_edited_time: string;
1654
- last_edited_by: PartialUserObjectResponse;
1655
- has_children: boolean;
1656
- in_trash: boolean;
1657
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1658
- archived: boolean;
1659
- };
1660
- export type Heading2BlockObjectResponse = {
1661
- type: "heading_2";
1662
- heading_2: HeaderContentWithRichTextAndColorResponse;
1663
- parent: ParentForBlockBasedObjectResponse;
1664
- object: "block";
1665
- id: string;
1666
- created_time: string;
1667
- created_by: PartialUserObjectResponse;
1668
- last_edited_time: string;
1669
- last_edited_by: PartialUserObjectResponse;
1670
- has_children: boolean;
1671
- in_trash: boolean;
1672
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1673
- archived: boolean;
1674
- };
1675
- export type Heading3BlockObjectResponse = {
1676
- type: "heading_3";
1677
- heading_3: HeaderContentWithRichTextAndColorResponse;
1678
- parent: ParentForBlockBasedObjectResponse;
1679
- object: "block";
1680
- id: string;
1681
- created_time: string;
1682
- created_by: PartialUserObjectResponse;
1683
- last_edited_time: string;
1684
- last_edited_by: PartialUserObjectResponse;
1685
- has_children: boolean;
1686
- in_trash: boolean;
1687
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1688
- archived: boolean;
1689
- };
1690
- type IdObjectResponse = {
1691
- id: string;
1692
- };
1693
- type IdRequest = string;
1694
- type IdResponse = string;
1695
- export type ImageBlockObjectResponse = {
1696
- type: "image";
1697
- image: MediaContentWithFileAndCaptionResponse;
1698
- parent: ParentForBlockBasedObjectResponse;
1699
- object: "block";
1700
- id: string;
1701
- created_time: string;
1702
- created_by: PartialUserObjectResponse;
1703
- last_edited_time: string;
1704
- last_edited_by: PartialUserObjectResponse;
1705
- has_children: boolean;
1706
- in_trash: boolean;
1707
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1708
- archived: boolean;
1709
- };
1710
- type InitialDataSourceRequest = {
1711
- properties?: Record<string, PropertyConfigurationRequest>;
1712
- };
1713
- type InternalFileRequest = {
1714
- url: string;
1715
- expiry_time?: string;
1716
- };
1717
- type InternalFileResponse = {
1718
- url: string;
1719
- expiry_time: string;
1720
- };
1721
- type InternalOrExternalFileWithNameRequest = {
1722
- file: InternalFileRequest;
1723
- name: StringRequest;
1724
- type?: "file";
1725
- } | {
1726
- external: ExternalFileRequest;
1727
- name: StringRequest;
1728
- type?: "external";
1729
- };
1730
- type InternalOrExternalFileWithNameResponse = InternalOrExternalFileWithNameResponseCommon & (FileInternalOrExternalFileWithNameResponse | ExternalInternalOrExternalFileWithNameResponse);
1731
- type InternalOrExternalFileWithNameResponseCommon = {
1732
- name: string;
1733
- };
1734
- 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#";
1735
- type LastEditedByDatabasePropertyConfigResponse = {
1736
- type: "last_edited_by";
1737
- last_edited_by: EmptyObject;
1738
- };
1739
- type LastEditedByPropertyConfigurationRequest = {
1740
- type?: "last_edited_by";
1741
- last_edited_by: EmptyObject;
1742
- };
1743
- export type LastEditedByPropertyItemObjectResponse = {
1744
- type: "last_edited_by";
1745
- last_edited_by: PartialUserObjectResponse | UserObjectResponse;
1746
- object: "property_item";
1747
- id: string;
1748
- };
1749
- type LastEditedBySimplePropertyValueResponse = {
1750
- type: "last_edited_by";
1751
- last_edited_by: UserValueResponse;
1752
- };
1753
- type LastEditedTimeDatabasePropertyConfigResponse = {
1754
- type: "last_edited_time";
1755
- last_edited_time: EmptyObject;
1756
- };
1757
- type LastEditedTimePropertyConfigurationRequest = {
1758
- type?: "last_edited_time";
1759
- last_edited_time: EmptyObject;
1760
- };
1761
- export type LastEditedTimePropertyItemObjectResponse = {
1762
- type: "last_edited_time";
1763
- last_edited_time: string;
1764
- object: "property_item";
1765
- id: string;
1766
- };
1767
- type LastEditedTimeSimplePropertyValueResponse = {
1768
- type: "last_edited_time";
1769
- last_edited_time: string;
1770
- };
1771
- type LastVisitedTimePropertyConfigurationRequest = {
1772
- type?: "last_visited_time";
1773
- last_visited_time: EmptyObject;
1774
- };
1775
- type LinkMentionResponse = {
1776
- href: string;
1777
- title?: string;
1778
- description?: string;
1779
- link_author?: string;
1780
- link_provider?: string;
1781
- thumbnail_url?: string;
1782
- icon_url?: string;
1783
- iframe_url?: string;
1784
- height?: number;
1785
- padding?: number;
1786
- padding_top?: number;
1787
- };
1788
- export type LinkPreviewBlockObjectResponse = {
1789
- type: "link_preview";
1790
- link_preview: MediaContentWithUrlResponse;
1791
- parent: ParentForBlockBasedObjectResponse;
1792
- object: "block";
1793
- id: string;
1794
- created_time: string;
1795
- created_by: PartialUserObjectResponse;
1796
- last_edited_time: string;
1797
- last_edited_by: PartialUserObjectResponse;
1798
- has_children: boolean;
1799
- in_trash: boolean;
1800
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1801
- archived: boolean;
1802
- };
1803
- type LinkPreviewMentionResponse = {
1804
- url: string;
1805
- };
1806
- export type LinkToPageBlockObjectResponse = {
1807
- type: "link_to_page";
1808
- link_to_page: {
1809
- type: "page_id";
1810
- page_id: IdRequest;
1811
- } | {
1812
- type: "database_id";
1813
- database_id: IdRequest;
1814
- } | {
1815
- type: "comment_id";
1816
- comment_id: IdRequest;
1817
- };
1818
- parent: ParentForBlockBasedObjectResponse;
1819
- object: "block";
1820
- id: string;
1821
- created_time: string;
1822
- created_by: PartialUserObjectResponse;
1823
- last_edited_time: string;
1824
- last_edited_by: PartialUserObjectResponse;
1825
- has_children: boolean;
1826
- in_trash: boolean;
1827
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1828
- archived: boolean;
1829
- };
1830
- type ListViewConfigRequest = {
1831
- type: "list";
1832
- properties?: Array<ViewPropertyConfigRequest> | null;
1833
- };
1834
- type ListViewConfigResponse = {
1835
- type: "list";
1836
- properties?: Array<ViewPropertyConfigResponse>;
1837
- };
1838
- type LocationPropertyConfigurationRequest = {
1839
- type?: "location";
1840
- location: EmptyObject;
1841
- };
1842
- type MapViewConfigRequest = {
1843
- type: "map";
1844
- height?: "small" | "medium" | "large" | "extra_large" | null;
1845
- map_by?: string | null;
1846
- properties?: Array<ViewPropertyConfigRequest> | null;
1847
- };
1848
- type MapViewConfigResponse = {
1849
- type: "map";
1850
- height?: "small" | "medium" | "large" | "extra_large";
1851
- map_by?: string;
1852
- map_by_property_name?: string;
1853
- properties?: Array<ViewPropertyConfigResponse>;
1854
- };
1855
- type MediaContentWithFileAndCaptionRequest = {
1856
- external: ExternalFileRequest;
1857
- type?: "external";
1858
- caption?: Array<RichTextItemRequest>;
1859
- } | {
1860
- file_upload: FileUploadIdRequest;
1861
- type?: "file_upload";
1862
- caption?: Array<RichTextItemRequest>;
1863
- };
1864
- type MediaContentWithFileAndCaptionResponse = ExternalMediaContentWithFileAndCaptionResponse | FileMediaContentWithFileAndCaptionResponse;
1865
- type MediaContentWithFileNameAndCaptionRequest = {
1866
- external: ExternalFileRequest;
1867
- type?: "external";
1868
- caption?: Array<RichTextItemRequest>;
1869
- name?: StringRequest;
1870
- } | {
1871
- file_upload: FileUploadIdRequest;
1872
- type?: "file_upload";
1873
- caption?: Array<RichTextItemRequest>;
1874
- name?: StringRequest;
1875
- };
1876
- type MediaContentWithFileNameAndCaptionResponse = ExternalMediaContentWithFileNameAndCaptionResponse | FileMediaContentWithFileNameAndCaptionResponse;
1877
- type MediaContentWithUrlAndCaptionRequest = {
1878
- url: string;
1879
- caption?: Array<RichTextItemRequest>;
1880
- };
1881
- type MediaContentWithUrlAndCaptionResponse = {
1882
- url: string;
1883
- caption: Array<RichTextItemResponse>;
1884
- };
1885
- type MediaContentWithUrlResponse = {
1886
- url: TextRequest;
1887
- };
1888
- /**
1889
- * @deprecated Use MeetingNotesBlockObjectResponse instead. Renamed in API version 2026-03-11.
1890
- */
1891
- export type TranscriptionBlockObjectResponse = {
1892
- type: "transcription";
1893
- transcription: TranscriptionBlockResponse;
1894
- parent: ParentForBlockBasedObjectResponse;
1895
- object: "block";
1896
- id: string;
1897
- created_time: string;
1898
- created_by: PartialUserObjectResponse;
1899
- last_edited_time: string;
1900
- last_edited_by: PartialUserObjectResponse;
1901
- has_children: boolean;
1902
- in_trash: boolean;
1903
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1904
- archived: boolean;
1905
- };
1906
- export type MeetingNotesBlockObjectResponse = {
1907
- type: "meeting_notes";
1908
- meeting_notes: TranscriptionBlockResponse;
1909
- parent: ParentForBlockBasedObjectResponse;
1910
- object: "block";
1911
- id: string;
1912
- created_time: string;
1913
- created_by: PartialUserObjectResponse;
1914
- last_edited_time: string;
1915
- last_edited_by: PartialUserObjectResponse;
1916
- has_children: boolean;
1917
- in_trash: boolean;
1918
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
1919
- archived: boolean;
1920
- };
1921
- type MentionRichTextItemRequest = {
1922
- type?: "mention";
1923
- mention: {
1924
- type?: "user";
1925
- user: PartialUserObjectRequest;
1926
- } | {
1927
- type?: "date";
1928
- date: DateRequest;
1929
- } | {
1930
- type?: "page";
1931
- page: {
1932
- id: IdRequest;
1933
- };
1934
- } | {
1935
- type?: "database";
1936
- database: {
1937
- id: IdRequest;
1938
- };
1939
- } | {
1940
- type?: "template_mention";
1941
- template_mention: TemplateMentionRequest;
1942
- } | {
1943
- type?: "custom_emoji";
1944
- custom_emoji: {
1945
- id: IdRequest;
1946
- name?: string;
1947
- url?: string;
1948
- };
1949
- };
1950
- };
1951
- export type MentionRichTextItemResponse = {
1952
- type: "mention";
1953
- mention: {
1954
- type: "user";
1955
- user: UserValueResponse;
1956
- } | {
1957
- type: "date";
1958
- date: DateResponse;
1959
- } | {
1960
- type: "link_preview";
1961
- link_preview: LinkPreviewMentionResponse;
1962
- } | {
1963
- type: "link_mention";
1964
- link_mention: LinkMentionResponse;
1965
- } | {
1966
- type: "page";
1967
- page: {
1968
- id: IdResponse;
1969
- };
1970
- } | {
1971
- type: "database";
1972
- database: {
1973
- id: IdResponse;
1974
- };
1975
- } | {
1976
- type: "template_mention";
1977
- template_mention: TemplateMentionResponse;
1978
- } | {
1979
- type: "custom_emoji";
1980
- custom_emoji: CustomEmojiResponse;
1981
- };
1982
- };
1983
- type MultiSelectDatabasePropertyConfigResponse = {
1984
- type: "multi_select";
1985
- multi_select: {
1986
- options: Array<SelectPropertyResponse>;
1987
- };
1988
- };
1989
- type MultiSelectPropertyConfigurationRequest = {
1990
- type?: "multi_select";
1991
- multi_select: {
1992
- options?: Array<{
1993
- name: string;
1994
- color?: SelectColor;
1995
- description?: string | null;
1996
- }>;
1997
- };
1998
- };
1999
- type MultiSelectPropertyFilter = {
2000
- contains: string;
2001
- } | {
2002
- does_not_contain: string;
2003
- } | ExistencePropertyFilter;
2004
- export type MultiSelectPropertyItemObjectResponse = {
2005
- type: "multi_select";
2006
- multi_select: Array<PartialSelectResponse>;
2007
- object: "property_item";
2008
- id: string;
2009
- };
2010
- type MultiSelectSimplePropertyValueResponse = {
2011
- type: "multi_select";
2012
- multi_select: Array<PartialSelectPropertyValueResponse>;
2013
- };
2014
- type NumberDatabasePropertyConfigResponse = {
2015
- type: "number";
2016
- number: {
2017
- format: NumberFormat;
2018
- };
2019
- };
2020
- type NumberFormat = string;
2021
- type NumberFormulaPropertyResponse = {
2022
- type: "number";
2023
- number: number | null;
2024
- };
2025
- type NumberFormulaPropertyValueResponse = {
2026
- type: "number";
2027
- number: number | null;
2028
- };
2029
- type NumberGroupByConfigRequest = {
2030
- type: "number";
2031
- property_id: string;
2032
- sort: GroupSortRequest;
2033
- hide_empty_groups?: boolean;
2034
- range_start?: number;
2035
- range_end?: number;
2036
- range_size?: number;
2037
- };
2038
- type NumberGroupByConfigResponse = {
2039
- type: "number";
2040
- property_id: string;
2041
- sort: GroupSortResponse;
2042
- property_name?: string;
2043
- hide_empty_groups?: boolean;
2044
- range_start?: number;
2045
- range_end?: number;
2046
- range_size?: number;
2047
- };
2048
- type NumberPartialRollupValueResponse = {
2049
- type: "number";
2050
- number: number | null;
2051
- };
2052
- type NumberPropertyConfigurationRequest = {
2053
- type?: "number";
2054
- number: {
2055
- format?: NumberFormat;
2056
- };
2057
- };
2058
- type NumberPropertyFilter = {
2059
- equals: number;
2060
- } | {
2061
- does_not_equal: number;
2062
- } | {
2063
- greater_than: number;
2064
- } | {
2065
- less_than: number;
2066
- } | {
2067
- greater_than_or_equal_to: number;
2068
- } | {
2069
- less_than_or_equal_to: number;
2070
- } | ExistencePropertyFilter;
2071
- export type NumberPropertyItemObjectResponse = {
2072
- type: "number";
2073
- number: number | null;
2074
- object: "property_item";
2075
- id: string;
2076
- };
2077
- type NumberSimplePropertyValueResponse = {
2078
- type: "number";
2079
- number: number | null;
2080
- };
2081
- type NumberedListFormat = "numbers" | "letters" | "roman";
2082
- export type NumberedListItemBlockObjectResponse = {
2083
- type: "numbered_list_item";
2084
- numbered_list_item: ContentWithRichTextAndColorAndListResponse;
2085
- parent: ParentForBlockBasedObjectResponse;
2086
- object: "block";
2087
- id: string;
2088
- created_time: string;
2089
- created_by: PartialUserObjectResponse;
2090
- last_edited_time: string;
2091
- last_edited_by: PartialUserObjectResponse;
2092
- has_children: boolean;
2093
- in_trash: boolean;
2094
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
2095
- archived: boolean;
2096
- };
2097
- type PageCoverRequest = FileUploadPageCoverRequest | ExternalPageCoverRequest;
2098
- type PageCoverResponse = FilePageCoverResponse | ExternalPageCoverResponse;
2099
- type PageIconRequest = FileUploadPageIconRequest | EmojiPageIconRequest | ExternalPageIconRequest | CustomEmojiPageIconRequest;
2100
- type PageIconResponse = EmojiPageIconResponse | FilePageIconResponse | ExternalPageIconResponse | CustomEmojiPageIconResponse;
2101
- type PageIdCommentParentResponse = {
2102
- type: "page_id";
2103
- page_id: IdResponse;
2104
- };
2105
- type PageIdParentForBlockBasedObjectResponse = {
2106
- type: "page_id";
2107
- page_id: IdResponse;
2108
- };
2109
- type PageMarkdownResponse = {
2110
- object: "page_markdown";
2111
- id: IdResponse;
2112
- markdown: string;
2113
- truncated: boolean;
2114
- unknown_block_ids: Array<IdResponse>;
2115
- };
2116
- export type PageObjectResponse = {
2117
- object: "page";
2118
- id: IdResponse;
2119
- created_time: string;
2120
- last_edited_time: string;
2121
- in_trash: boolean;
2122
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
2123
- archived: boolean;
2124
- is_archived: boolean;
2125
- is_locked: boolean;
2126
- url: string;
2127
- public_url: string | null;
2128
- parent: ParentForBlockBasedObjectResponse;
2129
- properties: Record<string, PagePropertyValueWithIdResponse>;
2130
- icon: PageIconResponse | null;
2131
- cover: PageCoverResponse | null;
2132
- created_by: PartialUserObjectResponse;
2133
- last_edited_by: PartialUserObjectResponse;
2134
- };
2135
- type PagePositionSchema = {
2136
- type: "after_block";
2137
- after_block: {
2138
- id: IdRequest;
2139
- };
2140
- } | {
2141
- type: "page_start";
2142
- } | {
2143
- type: "page_end";
2144
- };
2145
- type PagePropertyValueWithIdResponse = IdObjectResponse & (SimpleOrArrayPropertyValueResponse | PartialRollupPropertyResponse);
2146
- type PageReferenceResponse = {
2147
- object: string;
2148
- id: IdResponse;
2149
- };
2150
- export type ParagraphBlockObjectResponse = {
2151
- type: "paragraph";
2152
- paragraph: ContentWithRichTextAndColorResponse;
2153
- parent: ParentForBlockBasedObjectResponse;
2154
- object: "block";
2155
- id: string;
2156
- created_time: string;
2157
- created_by: PartialUserObjectResponse;
2158
- last_edited_time: string;
2159
- last_edited_by: PartialUserObjectResponse;
2160
- has_children: boolean;
2161
- in_trash: boolean;
2162
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
2163
- archived: boolean;
2164
- };
2165
- type ParentForBlockBasedObjectResponse = DatabaseParentResponse | DataSourceParentResponse | PageIdParentForBlockBasedObjectResponse | BlockIdParentForBlockBasedObjectResponse | WorkspaceParentForBlockBasedObjectResponse;
2166
- type ParentOfDataSourceRequest = {
2167
- type?: "database_id";
2168
- database_id: IdRequest;
2169
- };
2170
- /**
2171
- * The parent of the data source. This is typically a database (`database_id`), but for
2172
- * externally synced data sources, can be another data source (`data_source_id`).
2173
- */
2174
- type ParentOfDataSourceResponse = DatabaseParentResponse | DataSourceParentResponse;
2175
- type ParentOfDatabaseResponse = PageIdParentForBlockBasedObjectResponse | WorkspaceParentForBlockBasedObjectResponse | DatabaseParentResponse | BlockIdParentForBlockBasedObjectResponse;
2176
- export type PartialBlockObjectResponse = {
2177
- object: "block";
2178
- id: string;
2179
- };
2180
- export type PartialCommentObjectResponse = {
2181
- object: "comment";
2182
- id: IdResponse;
2183
- };
2184
- export type PartialDataSourceObjectResponse = {
2185
- object: "data_source";
2186
- id: IdResponse;
2187
- properties: Record<string, DatabasePropertyConfigResponse>;
2188
- };
2189
- export type PartialDataSourceViewObjectResponse = {
2190
- object: "view";
2191
- id: IdResponse;
2192
- parent: DatabaseParentResponse;
2193
- type: "table" | "board" | "list" | "calendar" | "timeline" | "gallery" | "form" | "chart" | "map" | "dashboard";
2194
- };
2195
- export type PartialDatabaseObjectResponse = {
2196
- object: "database";
2197
- id: IdResponse;
2198
- };
2199
- export type PartialPageObjectResponse = {
2200
- object: "page";
2201
- id: IdResponse;
2202
- };
2203
- type PartialRollupPropertyResponse = {
2204
- type: "rollup";
2205
- rollup: PartialRollupValueResponse;
2206
- };
2207
- type PartialRollupValueResponse = PartialRollupValueResponseCommon & (NumberPartialRollupValueResponse | DatePartialRollupValueResponse | ArrayPartialRollupValueResponse);
2208
- type PartialRollupValueResponseCommon = {
2209
- function: RollupFunction;
2210
- };
2211
- type PartialSelectPropertyValueResponse = {
2212
- id: string;
2213
- name: string;
2214
- color: "default" | "gray" | "brown" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "red";
2215
- };
2216
- type PartialSelectResponse = {
2217
- id: string;
2218
- name: string;
2219
- color: SelectColor;
2220
- };
2221
- type PartialUserObjectRequest = {
2222
- id: IdRequest;
2223
- object?: "user";
2224
- };
2225
- export type PartialUserObjectResponse = {
2226
- id: IdResponse;
2227
- object: "user";
2228
- };
2229
- export type PdfBlockObjectResponse = {
2230
- type: "pdf";
2231
- pdf: MediaContentWithFileAndCaptionResponse;
2232
- parent: ParentForBlockBasedObjectResponse;
2233
- object: "block";
2234
- id: string;
2235
- created_time: string;
2236
- created_by: PartialUserObjectResponse;
2237
- last_edited_time: string;
2238
- last_edited_by: PartialUserObjectResponse;
2239
- has_children: boolean;
2240
- in_trash: boolean;
2241
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
2242
- archived: boolean;
2243
- };
2244
- type PeopleArrayBasedPropertyValueResponse = {
2245
- type: "people";
2246
- people: Array<UserValueResponse | GroupObjectResponse>;
2247
- };
2248
- type PeopleDatabasePropertyConfigResponse = {
2249
- type: "people";
2250
- people: EmptyObject;
2251
- };
2252
- type PeoplePropertyConfigurationRequest = {
2253
- type?: "people";
2254
- people: EmptyObject;
2255
- };
2256
- type PeoplePropertyFilter = {
2257
- contains: IdRequest;
2258
- } | {
2259
- does_not_contain: IdRequest;
2260
- } | ExistencePropertyFilter;
2261
- export type PeoplePropertyItemObjectResponse = {
2262
- type: "people";
2263
- people: PartialUserObjectResponse | UserObjectResponse;
2264
- object: "property_item";
2265
- id: string;
2266
- };
2267
- type PersonGroupByConfigRequest = {
2268
- type: "person" | "created_by" | "last_edited_by";
2269
- property_id: string;
2270
- sort: GroupSortRequest;
2271
- hide_empty_groups?: boolean;
2272
- };
2273
- type PersonGroupByConfigResponse = {
2274
- type: "person" | "created_by" | "last_edited_by";
2275
- property_id: string;
2276
- sort: GroupSortResponse;
2277
- property_name?: string;
2278
- hide_empty_groups?: boolean;
2279
- };
2280
- export type PersonUserObjectResponse = {
2281
- type: "person";
2282
- person: {
2283
- email?: string;
2284
- };
2285
- };
2286
- type PhoneNumberDatabasePropertyConfigResponse = {
2287
- type: "phone_number";
2288
- phone_number: EmptyObject;
2289
- };
2290
- type PhoneNumberPropertyConfigurationRequest = {
2291
- type?: "phone_number";
2292
- phone_number: EmptyObject;
2293
- };
2294
- export type PhoneNumberPropertyItemObjectResponse = {
2295
- type: "phone_number";
2296
- phone_number: string | null;
2297
- object: "property_item";
2298
- id: string;
2299
- };
2300
- type PhoneNumberSimplePropertyValueResponse = {
2301
- type: "phone_number";
2302
- phone_number: string | null;
2303
- };
2304
- type PlacePropertyConfigurationRequest = {
2305
- type?: "place";
2306
- place: EmptyObject;
2307
- };
2308
- export type PlacePropertyItemObjectResponse = {
2309
- type: "place";
2310
- place: {
2311
- lat: number;
2312
- lon: number;
2313
- name?: string | null;
2314
- address?: string | null;
2315
- aws_place_id?: string | null;
2316
- google_place_id?: string | null;
2317
- } | null;
2318
- object: "property_item";
2319
- id: string;
2320
- };
2321
- type PlacePropertyValueResponse = {
2322
- lat: number;
2323
- lon: number;
2324
- name?: string | null;
2325
- address?: string | null;
2326
- aws_place_id?: string | null;
2327
- google_place_id?: string | null;
2328
- };
2329
- type PlaceSimplePropertyValueResponse = {
2330
- type: "place";
2331
- place: PlacePropertyValueResponse | null;
2332
- };
2333
- 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);
2334
- type PropertyConfigurationRequestCommon = {
2335
- description?: PropertyDescriptionRequest | null;
2336
- };
2337
- type PropertyDescriptionRequest = string;
2338
- type PropertyFilter = {
2339
- title: TextPropertyFilter;
2340
- property: string;
2341
- type?: "title";
2342
- } | {
2343
- rich_text: TextPropertyFilter;
2344
- property: string;
2345
- type?: "rich_text";
2346
- } | {
2347
- number: NumberPropertyFilter;
2348
- property: string;
2349
- type?: "number";
2350
- } | {
2351
- checkbox: CheckboxPropertyFilter;
2352
- property: string;
2353
- type?: "checkbox";
2354
- } | {
2355
- select: SelectPropertyFilter;
2356
- property: string;
2357
- type?: "select";
2358
- } | {
2359
- multi_select: MultiSelectPropertyFilter;
2360
- property: string;
2361
- type?: "multi_select";
2362
- } | {
2363
- status: StatusPropertyFilter;
2364
- property: string;
2365
- type?: "status";
2366
- } | {
2367
- date: DatePropertyFilter;
2368
- property: string;
2369
- type?: "date";
2370
- } | {
2371
- people: PeoplePropertyFilter;
2372
- property: string;
2373
- type?: "people";
2374
- } | {
2375
- files: ExistencePropertyFilter;
2376
- property: string;
2377
- type?: "files";
2378
- } | {
2379
- url: TextPropertyFilter;
2380
- property: string;
2381
- type?: "url";
2382
- } | {
2383
- email: TextPropertyFilter;
2384
- property: string;
2385
- type?: "email";
2386
- } | {
2387
- phone_number: TextPropertyFilter;
2388
- property: string;
2389
- type?: "phone_number";
2390
- } | {
2391
- relation: RelationPropertyFilter;
2392
- property: string;
2393
- type?: "relation";
2394
- } | {
2395
- created_by: PeoplePropertyFilter;
2396
- property: string;
2397
- type?: "created_by";
2398
- } | {
2399
- created_time: DatePropertyFilter;
2400
- property: string;
2401
- type?: "created_time";
2402
- } | {
2403
- last_edited_by: PeoplePropertyFilter;
2404
- property: string;
2405
- type?: "last_edited_by";
2406
- } | {
2407
- last_edited_time: DatePropertyFilter;
2408
- property: string;
2409
- type?: "last_edited_time";
2410
- } | {
2411
- formula: FormulaPropertyFilter;
2412
- property: string;
2413
- type?: "formula";
2414
- } | {
2415
- unique_id: NumberPropertyFilter;
2416
- property: string;
2417
- type?: "unique_id";
2418
- } | {
2419
- rollup: RollupPropertyFilter;
2420
- property: string;
2421
- type?: "rollup";
2422
- } | {
2423
- verification: VerificationPropertyStatusFilter;
2424
- property: string;
2425
- type?: "verification";
2426
- };
2427
- export type PropertyItemListResponse = PropertyItemPropertyItemListResponse;
2428
- 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;
2429
- type PropertyItemPropertyItemListResponse = {
2430
- type: "property_item";
2431
- property_item: {
2432
- type: "title";
2433
- title: EmptyObject;
2434
- next_url: string | null;
2435
- id: string;
2436
- } | {
2437
- type: "rich_text";
2438
- rich_text: EmptyObject;
2439
- next_url: string | null;
2440
- id: string;
2441
- } | {
2442
- type: "people";
2443
- people: EmptyObject;
2444
- next_url: string | null;
2445
- id: string;
2446
- } | {
2447
- type: "relation";
2448
- relation: EmptyObject;
2449
- next_url: string | null;
2450
- id: string;
2451
- } | {
2452
- type: "rollup";
2453
- rollup: {
2454
- type: "number";
2455
- number: number | null;
2456
- function: RollupFunction;
2457
- } | {
2458
- type: "date";
2459
- date: DateResponse | null;
2460
- function: RollupFunction;
2461
- } | {
2462
- type: "array";
2463
- array: Array<EmptyObject>;
2464
- function: RollupFunction;
2465
- } | {
2466
- type: "unsupported";
2467
- unsupported: EmptyObject;
2468
- function: RollupFunction;
2469
- } | {
2470
- type: "incomplete";
2471
- incomplete: EmptyObject;
2472
- function: RollupFunction;
2473
- };
2474
- next_url: string | null;
2475
- id: string;
2476
- };
2477
- object: "list";
2478
- next_cursor: string | null;
2479
- has_more: boolean;
2480
- results: Array<PropertyItemObjectResponse>;
2481
- };
2482
- type PropertyOrTimestampFilter = PropertyFilter | TimestampFilter;
2483
- type PropertyOrTimestampFilterArray = Array<PropertyOrTimestampFilter>;
2484
- type PropertySortResponse = {
2485
- property: string;
2486
- direction: "ascending" | "descending";
2487
- };
2488
- /**
2489
- * A property filter condition. Same shape as a property filter but without the
2490
- * "property" field (the hashmap key identifies the property). For example: { "select": {
2491
- * "equals": "High" } }.
2492
- */
2493
- type QuickFilterConditionRequest = Record<string, never>;
2494
- /**
2495
- * A property filter condition. Same shape as a property filter but without the
2496
- * "property" field. For example: { "select": { "equals": "High" } }.
2497
- */
2498
- type QuickFilterConditionResponse = Record<string, never>;
2499
- export type QuoteBlockObjectResponse = {
2500
- type: "quote";
2501
- quote: ContentWithRichTextAndColorResponse;
2502
- parent: ParentForBlockBasedObjectResponse;
2503
- object: "block";
2504
- id: string;
2505
- created_time: string;
2506
- created_by: PartialUserObjectResponse;
2507
- last_edited_time: string;
2508
- last_edited_by: PartialUserObjectResponse;
2509
- has_children: boolean;
2510
- in_trash: boolean;
2511
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
2512
- archived: boolean;
2513
- };
2514
- type RelationArrayBasedPropertyValueResponse = {
2515
- type: "relation";
2516
- relation: Array<RelationItemPropertyValueResponse>;
2517
- };
2518
- type RelationDatabasePropertyConfigResponse = {
2519
- type: "relation";
2520
- relation: DatabasePropertyRelationConfigResponse;
2521
- };
2522
- type RelationGroupByConfigRequest = {
2523
- type: "relation";
2524
- property_id: string;
2525
- sort: GroupSortRequest;
2526
- hide_empty_groups?: boolean;
2527
- };
2528
- type RelationGroupByConfigResponse = {
2529
- type: "relation";
2530
- property_id: string;
2531
- sort: GroupSortResponse;
2532
- property_name?: string;
2533
- hide_empty_groups?: boolean;
2534
- };
2535
- type RelationItemPropertyValueResponse = {
2536
- id: IdRequest;
2537
- };
2538
- type RelationPropertyConfigurationRequest = {
2539
- type?: "relation";
2540
- relation: {
2541
- data_source_id: IdRequest;
2542
- } & ({
2543
- type?: "single_property";
2544
- single_property: EmptyObject;
2545
- } | {
2546
- type?: "dual_property";
2547
- dual_property: {
2548
- synced_property_id?: string;
2549
- synced_property_name?: string;
2550
- };
2551
- });
2552
- };
2553
- type RelationPropertyFilter = {
2554
- contains: IdRequest;
2555
- } | {
2556
- does_not_contain: IdRequest;
2557
- } | ExistencePropertyFilter;
2558
- export type RelationPropertyItemObjectResponse = {
2559
- type: "relation";
2560
- relation: {
2561
- id: string;
2562
- };
2563
- object: "property_item";
2564
- id: string;
2565
- };
2566
- type RichTextArrayBasedPropertyValueResponse = {
2567
- type: "rich_text";
2568
- rich_text: Array<RichTextItemResponse>;
2569
- };
2570
- type RichTextDatabasePropertyConfigResponse = {
2571
- type: "rich_text";
2572
- rich_text: EmptyObject;
2573
- };
2574
- type RichTextItemRequest = RichTextItemRequestCommon & (TextRichTextItemRequest | MentionRichTextItemRequest | EquationRichTextItemRequest);
2575
- type RichTextItemRequestCommon = {
2576
- annotations?: AnnotationRequest;
2577
- };
2578
- export type RichTextItemResponse = RichTextItemResponseCommon & (TextRichTextItemResponse | MentionRichTextItemResponse | EquationRichTextItemResponse);
2579
- export type RichTextItemResponseCommon = {
2580
- plain_text: string;
2581
- href: string | null;
2582
- annotations: AnnotationResponse;
2583
- };
2584
- type RichTextPropertyConfigurationRequest = {
2585
- type?: "rich_text";
2586
- rich_text: EmptyObject;
2587
- };
2588
- export type RichTextPropertyItemObjectResponse = {
2589
- type: "rich_text";
2590
- rich_text: RichTextItemResponse;
2591
- object: "property_item";
2592
- id: string;
2593
- };
2594
- type RollupDatabasePropertyConfigResponse = {
2595
- type: "rollup";
2596
- rollup: {
2597
- function: RollupFunction;
2598
- rollup_property_name: string;
2599
- relation_property_name: string;
2600
- rollup_property_id: string;
2601
- relation_property_id: string;
2602
- };
2603
- };
2604
- 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";
2605
- type RollupPropertyConfigurationRequest = {
2606
- type?: "rollup";
2607
- rollup: {
2608
- function: RollupFunction;
2609
- } & ({
2610
- relation_property_name: string;
2611
- rollup_property_name: string;
2612
- } | {
2613
- relation_property_id: string;
2614
- rollup_property_name: string;
2615
- } | {
2616
- relation_property_name: string;
2617
- rollup_property_id: string;
2618
- } | {
2619
- relation_property_id: string;
2620
- rollup_property_id: string;
2621
- });
2622
- };
2623
- type RollupPropertyFilter = {
2624
- any: RollupSubfilterPropertyFilter;
2625
- } | {
2626
- none: RollupSubfilterPropertyFilter;
2627
- } | {
2628
- every: RollupSubfilterPropertyFilter;
2629
- } | {
2630
- date: DatePropertyFilter;
2631
- } | {
2632
- number: NumberPropertyFilter;
2633
- };
2634
- export type RollupPropertyItemObjectResponse = {
2635
- type: "rollup";
2636
- rollup: {
2637
- type: "number";
2638
- number: number | null;
2639
- function: RollupFunction;
2640
- } | {
2641
- type: "date";
2642
- date: DateResponse | null;
2643
- function: RollupFunction;
2644
- } | {
2645
- type: "array";
2646
- array: Array<EmptyObject>;
2647
- function: RollupFunction;
2648
- } | {
2649
- type: "unsupported";
2650
- unsupported: EmptyObject;
2651
- function: RollupFunction;
2652
- } | {
2653
- type: "incomplete";
2654
- incomplete: EmptyObject;
2655
- function: RollupFunction;
2656
- };
2657
- object: "property_item";
2658
- id: string;
2659
- };
2660
- type RollupSubfilterPropertyFilter = {
2661
- rich_text: TextPropertyFilter;
2662
- } | {
2663
- number: NumberPropertyFilter;
2664
- } | {
2665
- checkbox: CheckboxPropertyFilter;
2666
- } | {
2667
- select: SelectPropertyFilter;
2668
- } | {
2669
- multi_select: MultiSelectPropertyFilter;
2670
- } | {
2671
- relation: RelationPropertyFilter;
2672
- } | {
2673
- date: DatePropertyFilter;
2674
- } | {
2675
- people: PeoplePropertyFilter;
2676
- } | {
2677
- files: ExistencePropertyFilter;
2678
- } | {
2679
- status: StatusPropertyFilter;
2680
- };
2681
- /**
2682
- * One of: `default`, `gray`, `brown`, `orange`, `yellow`, `green`, `blue`, `purple`,
2683
- * `pink`, `red`
2684
- */
2685
- type SelectColor = "default" | "gray" | "brown" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "red";
2686
- type SelectDatabasePropertyConfigResponse = {
2687
- type: "select";
2688
- select: {
2689
- options: Array<SelectPropertyResponse>;
2690
- };
2691
- };
2692
- type SelectGroupByConfigRequest = {
2693
- type: "select" | "multi_select";
2694
- property_id: string;
2695
- sort: GroupSortRequest;
2696
- hide_empty_groups?: boolean;
2697
- };
2698
- type SelectGroupByConfigResponse = {
2699
- type: "select" | "multi_select";
2700
- property_id: string;
2701
- sort: GroupSortResponse;
2702
- property_name?: string;
2703
- hide_empty_groups?: boolean;
2704
- };
2705
- type SelectPropertyConfigurationRequest = {
2706
- type?: "select";
2707
- select: {
2708
- options?: Array<{
2709
- name: string;
2710
- color?: SelectColor;
2711
- description?: string | null;
2712
- }>;
2713
- };
2714
- };
2715
- type SelectPropertyFilter = {
2716
- equals: string;
2717
- } | {
2718
- does_not_equal: string;
2719
- } | ExistencePropertyFilter;
2720
- export type SelectPropertyItemObjectResponse = {
2721
- type: "select";
2722
- select: PartialSelectResponse | null;
2723
- object: "property_item";
2724
- id: string;
2725
- };
2726
- type SelectPropertyResponse = {
2727
- id: string;
2728
- name: string;
2729
- color: SelectColor;
2730
- description: string | null;
2731
- };
2732
- type SelectSimplePropertyValueResponse = {
2733
- type: "select";
2734
- select: PartialSelectPropertyValueResponse | null;
2735
- };
2736
- type SimpleOrArrayPropertyValueResponse = SimplePropertyValueResponse | ArrayBasedPropertyValueResponse;
2737
- type SimplePropertyValueResponse = NumberSimplePropertyValueResponse | UrlSimplePropertyValueResponse | SelectSimplePropertyValueResponse | MultiSelectSimplePropertyValueResponse | StatusSimplePropertyValueResponse | DateSimplePropertyValueResponse | EmailSimplePropertyValueResponse | PhoneNumberSimplePropertyValueResponse | CheckboxSimplePropertyValueResponse | FilesSimplePropertyValueResponse | CreatedBySimplePropertyValueResponse | CreatedTimeSimplePropertyValueResponse | LastEditedBySimplePropertyValueResponse | LastEditedTimeSimplePropertyValueResponse | FormulaSimplePropertyValueResponse | ButtonSimplePropertyValueResponse | UniqueIdSimplePropertyValueResponse | VerificationSimplePropertyValueResponse | PlaceSimplePropertyValueResponse;
2738
- type SinglePropertyDatabasePropertyRelationConfigResponse = {
2739
- type: "single_property";
2740
- single_property: EmptyObject;
2741
- };
2742
- /**
2743
- * One of: `ascending`, `descending`
2744
- */
2745
- type SortDirectionRequest = "ascending" | "descending";
2746
- type StatusDatabasePropertyConfigResponse = {
2747
- type: "status";
2748
- status: {
2749
- options: Array<StatusPropertyResponse>;
2750
- groups: Array<{
2751
- id: string;
2752
- name: string;
2753
- color: SelectColor;
2754
- option_ids: Array<string>;
2755
- }>;
2756
- };
2757
- };
2758
- type StatusGroupByConfigRequest = {
2759
- type: "status";
2760
- property_id: string;
2761
- group_by: "group" | "option";
2762
- sort: GroupSortRequest;
2763
- hide_empty_groups?: boolean;
2764
- };
2765
- type StatusGroupByConfigResponse = {
2766
- type: "status";
2767
- property_id: string;
2768
- group_by: "group" | "option";
2769
- sort: GroupSortResponse;
2770
- property_name?: string;
2771
- hide_empty_groups?: boolean;
2772
- };
2773
- type StatusPropertyConfigRequest = {
2774
- options?: Array<{
2775
- name: string;
2776
- color?: SelectColor;
2777
- description?: string | null;
2778
- }>;
2779
- };
2780
- type StatusPropertyConfigUpdateRequest = {
2781
- options?: Array<{
2782
- color?: SelectColor;
2783
- description?: string | null;
2784
- } & ({
2785
- name: string;
2786
- id?: string;
2787
- } | {
2788
- id: string;
2789
- name?: string;
2790
- })>;
2791
- };
2792
- type StatusPropertyConfigurationRequest = {
2793
- type?: "status";
2794
- status: StatusPropertyConfigRequest;
2795
- };
2796
- type StatusPropertyFilter = {
2797
- equals: string;
2798
- } | {
2799
- does_not_equal: string;
2800
- } | ExistencePropertyFilter;
2801
- export type StatusPropertyItemObjectResponse = {
2802
- type: "status";
2803
- status: PartialSelectResponse | null;
2804
- object: "property_item";
2805
- id: string;
2806
- };
2807
- type StatusPropertyResponse = {
2808
- id: string;
2809
- name: string;
2810
- color: SelectColor;
2811
- description: string | null;
2812
- };
2813
- type StatusSimplePropertyValueResponse = {
2814
- type: "status";
2815
- status: PartialSelectPropertyValueResponse | null;
2816
- };
2817
- type StringFormulaPropertyResponse = {
2818
- type: "string";
2819
- string: string | null;
2820
- };
2821
- type StringFormulaPropertyValueResponse = {
2822
- type: "string";
2823
- string: string | null;
2824
- };
2825
- type StringRequest = string;
2826
- type SubtaskConfigRequest = {
2827
- property_id?: string;
2828
- display_mode?: "show" | "hidden" | "flattened" | "disabled";
2829
- filter_scope?: "parents" | "parents_and_subitems" | "subitems";
2830
- toggle_column_id?: string;
2831
- };
2832
- type SubtaskConfigResponse = {
2833
- property_id?: string;
2834
- display_mode?: "show" | "hidden" | "flattened" | "disabled";
2835
- filter_scope?: "parents" | "parents_and_subitems" | "subitems";
2836
- toggle_column_id?: string;
2837
- };
2838
- export type SyncedBlockBlockObjectResponse = {
2839
- type: "synced_block";
2840
- synced_block: {
2841
- synced_from: {
2842
- type: "block_id";
2843
- block_id: IdRequest;
2844
- } | null;
2845
- };
2846
- parent: ParentForBlockBasedObjectResponse;
2847
- object: "block";
2848
- id: string;
2849
- created_time: string;
2850
- created_by: PartialUserObjectResponse;
2851
- last_edited_time: string;
2852
- last_edited_by: PartialUserObjectResponse;
2853
- has_children: boolean;
2854
- in_trash: boolean;
2855
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
2856
- archived: boolean;
2857
- };
2858
- export type TableBlockObjectResponse = {
2859
- type: "table";
2860
- table: ContentWithTableResponse;
2861
- parent: ParentForBlockBasedObjectResponse;
2862
- object: "block";
2863
- id: string;
2864
- created_time: string;
2865
- created_by: PartialUserObjectResponse;
2866
- last_edited_time: string;
2867
- last_edited_by: PartialUserObjectResponse;
2868
- has_children: boolean;
2869
- in_trash: boolean;
2870
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
2871
- archived: boolean;
2872
- };
2873
- export type TableOfContentsBlockObjectResponse = {
2874
- type: "table_of_contents";
2875
- table_of_contents: {
2876
- color: ApiColor;
2877
- };
2878
- parent: ParentForBlockBasedObjectResponse;
2879
- object: "block";
2880
- id: string;
2881
- created_time: string;
2882
- created_by: PartialUserObjectResponse;
2883
- last_edited_time: string;
2884
- last_edited_by: PartialUserObjectResponse;
2885
- has_children: boolean;
2886
- in_trash: boolean;
2887
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
2888
- archived: boolean;
2889
- };
2890
- type TableRequestWithTableRowChildren = {
2891
- table_width: number;
2892
- children: Array<TableRowRequest>;
2893
- has_column_header?: boolean;
2894
- has_row_header?: boolean;
2895
- };
2896
- export type TableRowBlockObjectResponse = {
2897
- type: "table_row";
2898
- table_row: ContentWithTableRowResponse;
2899
- parent: ParentForBlockBasedObjectResponse;
2900
- object: "block";
2901
- id: string;
2902
- created_time: string;
2903
- created_by: PartialUserObjectResponse;
2904
- last_edited_time: string;
2905
- last_edited_by: PartialUserObjectResponse;
2906
- has_children: boolean;
2907
- in_trash: boolean;
2908
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
2909
- archived: boolean;
2910
- };
2911
- type TableRowRequest = {
2912
- table_row: ContentWithTableRowRequest;
2913
- type?: "table_row";
2914
- object?: "block";
2915
- };
2916
- type TableViewConfigRequest = {
2917
- type: "table";
2918
- properties?: Array<ViewPropertyConfigRequest> | null;
2919
- group_by?: GroupByConfigRequest | null;
2920
- subtasks?: SubtaskConfigRequest | null;
2921
- wrap_cells?: boolean;
2922
- frozen_column_index?: number;
2923
- show_vertical_lines?: boolean;
2924
- };
2925
- type TableViewConfigResponse = {
2926
- type: "table";
2927
- properties?: Array<ViewPropertyConfigResponse>;
2928
- group_by?: GroupByConfigResponse;
2929
- subtasks?: SubtaskConfigResponse;
2930
- wrap_cells?: boolean;
2931
- frozen_column_index?: number;
2932
- show_vertical_lines?: boolean;
2933
- };
2934
- export type TemplateBlockObjectResponse = {
2935
- type: "template";
2936
- template: {
2937
- rich_text: Array<RichTextItemResponse>;
2938
- };
2939
- parent: ParentForBlockBasedObjectResponse;
2940
- object: "block";
2941
- id: string;
2942
- created_time: string;
2943
- created_by: PartialUserObjectResponse;
2944
- last_edited_time: string;
2945
- last_edited_by: PartialUserObjectResponse;
2946
- has_children: boolean;
2947
- in_trash: boolean;
2948
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
2949
- archived: boolean;
2950
- };
2951
- type TemplateMentionDateTemplateMentionRequest = {
2952
- type?: "template_mention_date";
2953
- template_mention_date: "today" | "now";
2954
- };
2955
- type TemplateMentionDateTemplateMentionResponse = {
2956
- type: "template_mention_date";
2957
- template_mention_date: "today" | "now";
2958
- };
2959
- type TemplateMentionRequest = TemplateMentionDateTemplateMentionRequest | TemplateMentionUserTemplateMentionRequest;
2960
- type TemplateMentionResponse = TemplateMentionDateTemplateMentionResponse | TemplateMentionUserTemplateMentionResponse;
2961
- type TemplateMentionUserTemplateMentionRequest = {
2962
- type?: "template_mention_user";
2963
- template_mention_user: "me";
2964
- };
2965
- type TemplateMentionUserTemplateMentionResponse = {
2966
- type: "template_mention_user";
2967
- template_mention_user: "me";
2968
- };
2969
- /**
2970
- * IANA timezone to use when resolving template variables like @now and @today (e.g.
2971
- * 'America/New_York'). Defaults to the authorizing user's timezone for public
2972
- * integrations, or UTC for internal integrations.
2973
- */
2974
- type TemplateTimezone = string;
2975
- type TextGroupByConfigRequest = {
2976
- type: "text" | "title" | "url" | "email" | "phone_number";
2977
- property_id: string;
2978
- group_by: "exact" | "alphabet_prefix";
2979
- sort: GroupSortRequest;
2980
- hide_empty_groups?: boolean;
2981
- };
2982
- type TextGroupByConfigResponse = {
2983
- type: "text" | "title" | "url" | "email" | "phone_number";
2984
- property_id: string;
2985
- group_by: "exact" | "alphabet_prefix";
2986
- sort: GroupSortResponse;
2987
- property_name?: string;
2988
- hide_empty_groups?: boolean;
2989
- };
2990
- type TextPropertyFilter = {
2991
- equals: string;
2992
- } | {
2993
- does_not_equal: string;
2994
- } | {
2995
- contains: string;
2996
- } | {
2997
- does_not_contain: string;
2998
- } | {
2999
- starts_with: string;
3000
- } | {
3001
- ends_with: string;
3002
- } | ExistencePropertyFilter;
3003
- type TextRequest = string;
3004
- type TextRichTextItemRequest = {
3005
- type?: "text";
3006
- text: {
3007
- content: string;
3008
- link?: {
3009
- url: string;
3010
- } | null;
3011
- };
3012
- };
3013
- export type TextRichTextItemResponse = {
3014
- type: "text";
3015
- text: {
3016
- content: string;
3017
- link: {
3018
- url: string;
3019
- } | null;
3020
- };
3021
- };
3022
- type TimeZoneRequest = string;
3023
- type TimelineArrowsByRequest = {
3024
- property_id?: string | null;
3025
- };
3026
- type TimelineArrowsByResponse = {
3027
- property_id?: string | null;
3028
- };
3029
- type TimelinePreferenceRequest = {
3030
- zoom_level: "hours" | "day" | "week" | "bi_week" | "month" | "quarter" | "year" | "5_years";
3031
- center_timestamp?: number;
3032
- };
3033
- type TimelinePreferenceResponse = {
3034
- zoom_level: "hours" | "day" | "week" | "bi_week" | "month" | "quarter" | "year" | "5_years";
3035
- center_timestamp?: number;
3036
- };
3037
- type TimelineViewConfigRequest = {
3038
- type: "timeline";
3039
- date_property_id: string;
3040
- end_date_property_id?: string | null;
3041
- properties?: Array<ViewPropertyConfigRequest> | null;
3042
- show_table?: boolean | null;
3043
- table_properties?: Array<ViewPropertyConfigRequest> | null;
3044
- preference?: TimelinePreferenceRequest | null;
3045
- arrows_by?: TimelineArrowsByRequest | null;
3046
- color_by?: boolean | null;
3047
- };
3048
- type TimelineViewConfigResponse = {
3049
- type: "timeline";
3050
- date_property_id: string;
3051
- date_property_name?: string;
3052
- end_date_property_id?: string;
3053
- end_date_property_name?: string;
3054
- properties?: Array<ViewPropertyConfigResponse>;
3055
- show_table?: boolean;
3056
- table_properties?: Array<ViewPropertyConfigResponse>;
3057
- preference?: TimelinePreferenceResponse;
3058
- arrows_by?: TimelineArrowsByResponse;
3059
- color_by?: boolean;
3060
- };
3061
- type TimestampCreatedTimeFilter = {
3062
- created_time: DatePropertyFilter;
3063
- timestamp: "created_time";
3064
- type?: "created_time";
3065
- };
3066
- type TimestampFilter = TimestampCreatedTimeFilter | TimestampLastEditedTimeFilter;
3067
- type TimestampLastEditedTimeFilter = {
3068
- last_edited_time: DatePropertyFilter;
3069
- timestamp: "last_edited_time";
3070
- type?: "last_edited_time";
3071
- };
3072
- type TimestampSortResponse = {
3073
- timestamp: "created_time" | "last_edited_time";
3074
- direction: "ascending" | "descending";
3075
- };
3076
- type TitleArrayBasedPropertyValueResponse = {
3077
- type: "title";
3078
- title: Array<RichTextItemResponse>;
3079
- };
3080
- type TitleDatabasePropertyConfigResponse = {
3081
- type: "title";
3082
- title: EmptyObject;
3083
- };
3084
- type TitleObjectResponse = {
3085
- title: string;
3086
- };
3087
- type TitlePropertyConfigurationRequest = {
3088
- type?: "title";
3089
- title: EmptyObject;
3090
- };
3091
- export type TitlePropertyItemObjectResponse = {
3092
- type: "title";
3093
- title: RichTextItemResponse;
3094
- object: "property_item";
3095
- id: string;
3096
- };
3097
- export type ToDoBlockObjectResponse = {
3098
- type: "to_do";
3099
- to_do: {
3100
- rich_text: Array<RichTextItemResponse>;
3101
- color: ApiColor;
3102
- checked: boolean;
3103
- };
3104
- parent: ParentForBlockBasedObjectResponse;
3105
- object: "block";
3106
- id: string;
3107
- created_time: string;
3108
- created_by: PartialUserObjectResponse;
3109
- last_edited_time: string;
3110
- last_edited_by: PartialUserObjectResponse;
3111
- has_children: boolean;
3112
- in_trash: boolean;
3113
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
3114
- archived: boolean;
3115
- };
3116
- export type ToggleBlockObjectResponse = {
3117
- type: "toggle";
3118
- toggle: ContentWithRichTextAndColorResponse;
3119
- parent: ParentForBlockBasedObjectResponse;
3120
- object: "block";
3121
- id: string;
3122
- created_time: string;
3123
- created_by: PartialUserObjectResponse;
3124
- last_edited_time: string;
3125
- last_edited_by: PartialUserObjectResponse;
3126
- has_children: boolean;
3127
- in_trash: boolean;
3128
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
3129
- archived: boolean;
3130
- };
3131
- type TranscriptionBlockResponse = {
3132
- title?: Array<RichTextItemResponse>;
3133
- status?: ApiTranscriptionStatus;
3134
- children?: TranscriptionChildrenResponse;
3135
- calendar_event?: TranscriptionCalendarEventResponse;
3136
- recording?: TranscriptionRecordingResponse;
3137
- };
3138
- type TranscriptionCalendarEventResponse = {
3139
- start_time: string;
3140
- end_time: string;
3141
- attendees?: Array<IdRequest>;
3142
- };
3143
- type TranscriptionChildrenResponse = {
3144
- summary_block_id?: IdRequest;
3145
- notes_block_id?: IdRequest;
3146
- transcript_block_id?: IdRequest;
3147
- };
3148
- type TranscriptionRecordingResponse = {
3149
- start_time?: string;
3150
- end_time?: string;
3151
- };
3152
- type UniqueIdDatabasePropertyConfigResponse = {
3153
- type: "unique_id";
3154
- unique_id: {
3155
- prefix: string | null;
3156
- };
3157
- };
3158
- type UniqueIdPropertyConfigurationRequest = {
3159
- type?: "unique_id";
3160
- unique_id: {
3161
- prefix?: string | null;
3162
- };
3163
- };
3164
- export type UniqueIdPropertyItemObjectResponse = {
3165
- type: "unique_id";
3166
- unique_id: {
3167
- prefix: string | null;
3168
- number: number | null;
3169
- };
3170
- object: "property_item";
3171
- id: string;
3172
- };
3173
- type UniqueIdPropertyValueResponse = {
3174
- prefix: string | null;
3175
- number: number | null;
3176
- };
3177
- type UniqueIdSimplePropertyValueResponse = {
3178
- type: "unique_id";
3179
- unique_id: UniqueIdPropertyValueResponse;
3180
- };
3181
- export type UnsupportedBlockObjectResponse = {
3182
- type: "unsupported";
3183
- unsupported: {
3184
- block_type: string;
3185
- };
3186
- parent: ParentForBlockBasedObjectResponse;
3187
- object: "block";
3188
- id: string;
3189
- created_time: string;
3190
- created_by: PartialUserObjectResponse;
3191
- last_edited_time: string;
3192
- last_edited_by: PartialUserObjectResponse;
3193
- has_children: boolean;
3194
- in_trash: boolean;
3195
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
3196
- archived: boolean;
3197
- };
3198
- type UpdateMediaContentWithFileAndCaptionRequest = {
3199
- caption?: Array<RichTextItemRequest>;
3200
- external?: ExternalFileRequest;
3201
- file_upload?: FileUploadIdRequest;
3202
- };
3203
- type UpdateMediaContentWithFileNameAndCaptionRequest = {
3204
- caption?: Array<RichTextItemRequest>;
3205
- external?: ExternalFileRequest;
3206
- file_upload?: FileUploadIdRequest;
3207
- name?: StringRequest;
3208
- };
3209
- type UpdateMediaContentWithUrlAndCaptionRequest = {
3210
- url?: string;
3211
- caption?: Array<RichTextItemRequest>;
3212
- };
3213
- type UpdateViewRequest = {
3214
- name?: string;
3215
- filter?: ViewFilterRequest | null;
3216
- sorts?: ViewPropertySortsRequest | null;
3217
- quick_filters?: Record<string, QuickFilterConditionRequest | null> | null;
3218
- configuration?: ViewConfigRequest;
3219
- };
3220
- type UrlDatabasePropertyConfigResponse = {
3221
- type: "url";
3222
- url: EmptyObject;
3223
- };
3224
- type UrlPropertyConfigurationRequest = {
3225
- type?: "url";
3226
- url: EmptyObject;
3227
- };
3228
- export type UrlPropertyItemObjectResponse = {
3229
- type: "url";
3230
- url: string | null;
3231
- object: "property_item";
3232
- id: string;
3233
- };
3234
- type UrlSimplePropertyValueResponse = {
3235
- type: "url";
3236
- url: string | null;
3237
- };
3238
- export type UserObjectResponse = UserObjectResponseCommon & (PersonUserObjectResponse | BotUserObjectResponse);
3239
- export type UserObjectResponseCommon = {
3240
- id: IdResponse;
3241
- object: "user";
3242
- name: string | null;
3243
- avatar_url: string | null;
3244
- };
3245
- type UserValueResponse = PartialUserObjectResponse | UserObjectResponse;
3246
- type VerificationPropertyConfigurationRequest = {
3247
- type?: "verification";
3248
- verification: EmptyObject;
3249
- };
3250
- export type VerificationPropertyItemObjectResponse = {
3251
- type: "verification";
3252
- verification: VerificationPropertyValueResponse | null;
3253
- object: "property_item";
3254
- id: string;
3255
- };
3256
- type VerificationPropertyResponse = {
3257
- state: "verified" | "expired";
3258
- date: DateResponse | null;
3259
- verified_by: PartialUserObjectResponse | null;
3260
- };
3261
- type VerificationPropertyStatusFilter = {
3262
- status: "verified" | "expired" | "none";
3263
- };
3264
- type VerificationPropertyUnverifiedResponse = {
3265
- state: "unverified";
3266
- date: null;
3267
- verified_by: null;
3268
- };
3269
- type VerificationPropertyValueResponse = VerificationPropertyUnverifiedResponse | VerificationPropertyResponse;
3270
- type VerificationSimplePropertyValueResponse = {
3271
- type: "verification";
3272
- verification: VerificationPropertyValueResponse | null;
3273
- };
3274
- export type VideoBlockObjectResponse = {
3275
- type: "video";
3276
- video: MediaContentWithFileAndCaptionResponse;
3277
- parent: ParentForBlockBasedObjectResponse;
3278
- object: "block";
3279
- id: string;
3280
- created_time: string;
3281
- created_by: PartialUserObjectResponse;
3282
- last_edited_time: string;
3283
- last_edited_by: PartialUserObjectResponse;
3284
- has_children: boolean;
3285
- in_trash: boolean;
3286
- /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */
3287
- archived: boolean;
3288
- };
3289
- /**
3290
- * View configuration, discriminated by the type field.
3291
- */
3292
- type ViewConfigRequest = TableViewConfigRequest | BoardViewConfigRequest | CalendarViewConfigRequest | TimelineViewConfigRequest | GalleryViewConfigRequest | ListViewConfigRequest | MapViewConfigRequest | FormViewConfigRequest | ChartViewConfigRequest;
3293
- /**
3294
- * View configuration, typed by view type (table, board, calendar, etc.).
3295
- */
3296
- type ViewConfigResponse = TableViewConfigResponse | BoardViewConfigResponse | CalendarViewConfigResponse | TimelineViewConfigResponse | GalleryViewConfigResponse | ListViewConfigResponse | MapViewConfigResponse | FormViewConfigResponse | ChartViewConfigResponse | DashboardViewConfigResponse;
3297
- /**
3298
- * Filter for the view. Uses the same format as the data source query filter (property
3299
- * filters, timestamp filters, or compound and/or filters). Simple property filters appear
3300
- * in the view's filter bar in the Notion UI. To filter by multiple values on a select or
3301
- * status property, use a compound "or" filter with separate "equals" conditions for each
3302
- * value.
3303
- */
3304
- type ViewFilterRequest = Record<string, never>;
3305
- /**
3306
- * Filter for the view. Can be a property filter (filter by property value), timestamp
3307
- * filter (filter by created_time or last_edited_time), or compound filter (combine
3308
- * filters with and/or logic). Compound filters support up to 2 levels of nesting.
3309
- */
3310
- type ViewFilterResponse = (Record<string, unknown> & {
3311
- property: string;
3312
- }) | (Record<string, unknown> & {
3313
- timestamp: "created_time" | "last_edited_time";
3314
- }) | {
3315
- or?: Array<(Record<string, unknown> & {
3316
- property: string;
3317
- }) | (Record<string, unknown> & {
3318
- timestamp: "created_time" | "last_edited_time";
3319
- }) | {
3320
- or?: Array<(Record<string, unknown> & {
3321
- property: string;
3322
- }) | (Record<string, unknown> & {
3323
- timestamp: "created_time" | "last_edited_time";
3324
- })>;
3325
- and?: Array<(Record<string, unknown> & {
3326
- property: string;
3327
- }) | (Record<string, unknown> & {
3328
- timestamp: "created_time" | "last_edited_time";
3329
- })>;
3330
- }>;
3331
- and?: Array<(Record<string, unknown> & {
3332
- property: string;
3333
- }) | (Record<string, unknown> & {
3334
- timestamp: "created_time" | "last_edited_time";
3335
- }) | {
3336
- or?: Array<(Record<string, unknown> & {
3337
- property: string;
3338
- }) | (Record<string, unknown> & {
3339
- timestamp: "created_time" | "last_edited_time";
3340
- })>;
3341
- and?: Array<(Record<string, unknown> & {
3342
- property: string;
3343
- }) | (Record<string, unknown> & {
3344
- timestamp: "created_time" | "last_edited_time";
3345
- })>;
3346
- }>;
3347
- };
3348
- /**
3349
- * Position of the new view in the database's view tab bar.
3350
- */
3351
- type ViewPositionRequest = {
3352
- type: "start";
3353
- } | {
3354
- type: "end";
3355
- } | {
3356
- type: "after_view";
3357
- view_id: IdRequest;
3358
- };
3359
- type ViewPropertyConfigRequest = {
3360
- property_id: string;
3361
- visible?: boolean;
3362
- width?: number;
3363
- wrap?: boolean;
3364
- status_show_as?: "select" | "checkbox";
3365
- card_property_width_mode?: "full_line" | "inline";
3366
- date_format?: "full" | "short" | "month_day_year" | "day_month_year" | "year_month_day" | "relative";
3367
- time_format?: "12_hour" | "24_hour" | "hidden";
3368
- };
3369
- type ViewPropertyConfigResponse = {
3370
- property_id: string;
3371
- property_name?: string;
3372
- visible?: boolean;
3373
- width?: number;
3374
- wrap?: boolean;
3375
- status_show_as?: "select" | "checkbox";
3376
- card_property_width_mode?: "full_line" | "inline";
3377
- date_format?: "full" | "short" | "month_day_year" | "day_month_year" | "year_month_day" | "relative";
3378
- time_format?: "12_hour" | "24_hour" | "hidden";
3379
- };
3380
- type ViewPropertySortRequest = {
3381
- property: string;
3382
- direction: SortDirectionRequest;
3383
- };
3384
- type ViewPropertySortsRequest = Array<ViewPropertySortRequest>;
3385
- export type ViewQueryResponse = {
3386
- object: "view_query";
3387
- id: IdResponse;
3388
- view_id: IdResponse;
3389
- expires_at: string;
3390
- total_count: number;
3391
- results: Array<PageReferenceResponse>;
3392
- next_cursor: IdResponse | null;
3393
- has_more: boolean;
3394
- };
3395
- /**
3396
- * Sort for the view. Can be a property sort (with property and direction) or timestamp
3397
- * sort (with timestamp and direction).
3398
- */
3399
- type ViewSortRequest = Record<string, never>;
3400
- /**
3401
- * Sort for the view. Can sort by property or timestamp.
3402
- */
3403
- type ViewSortResponse = PropertySortResponse | TimestampSortResponse;
3404
- type ViewSortsRequest = Array<ViewSortRequest>;
3405
- /**
3406
- * One of: `table`, `board`, `list`, `calendar`, `timeline`, `gallery`, `form`, `chart`,
3407
- * `map`, `dashboard`
3408
- */
3409
- type ViewTypeRequest = "table" | "board" | "list" | "calendar" | "timeline" | "gallery" | "form" | "chart" | "map" | "dashboard";
3410
- /**
3411
- * Where to place the new widget in the dashboard. "new_row" creates a new row,
3412
- * "existing_row" adds to an existing row side-by-side with other widgets.
3413
- */
3414
- type WidgetPlacementRequest = {
3415
- type: "new_row";
3416
- row_index?: number;
3417
- } | {
3418
- type: "existing_row";
3419
- row_index: number;
3420
- };
3421
- type WorkspaceParentForBlockBasedObjectResponse = {
3422
- type: "workspace";
3423
- workspace: true;
3424
- };
3425
- export type GetSelfParameters = Record<string, never>;
3426
- export type GetSelfResponse = UserObjectResponse;
3427
- /**
3428
- * Retrieve your token's bot user
3429
- */
3430
- export declare const getSelf: {
3431
- readonly method: "get";
3432
- readonly pathParams: readonly [];
3433
- readonly queryParams: readonly [];
3434
- readonly bodyParams: readonly [];
3435
- readonly path: () => string;
3436
- };
3437
- type GetUserPathParameters = {
3438
- user_id: IdRequest;
3439
- };
3440
- export type GetUserParameters = GetUserPathParameters;
3441
- export type GetUserResponse = UserObjectResponse;
3442
- /**
3443
- * Retrieve a user
3444
- */
3445
- export declare const getUser: {
3446
- readonly method: "get";
3447
- readonly pathParams: readonly ["user_id"];
3448
- readonly queryParams: readonly [];
3449
- readonly bodyParams: readonly [];
3450
- readonly path: (p: GetUserPathParameters) => string;
3451
- };
3452
- type ListUsersQueryParameters = {
3453
- start_cursor?: string;
3454
- page_size?: number;
3455
- };
3456
- export type ListUsersParameters = ListUsersQueryParameters;
3457
- export type ListUsersResponse = {
3458
- type: "user";
3459
- user: EmptyObject;
3460
- object: "list";
3461
- next_cursor: string | null;
3462
- has_more: boolean;
3463
- results: Array<UserObjectResponse>;
3464
- };
3465
- /**
3466
- * List all users
3467
- */
3468
- export declare const listUsers: {
3469
- readonly method: "get";
3470
- readonly pathParams: readonly [];
3471
- readonly queryParams: readonly ["start_cursor", "page_size"];
3472
- readonly bodyParams: readonly [];
3473
- readonly path: () => string;
3474
- };
3475
- type CreatePageBodyParameters = {
3476
- parent?: {
3477
- page_id: IdRequest;
3478
- type?: "page_id";
3479
- } | {
3480
- database_id: IdRequest;
3481
- type?: "database_id";
3482
- } | {
3483
- data_source_id: IdRequest;
3484
- type?: "data_source_id";
3485
- } | {
3486
- workspace: true;
3487
- type?: "workspace";
3488
- };
3489
- properties?: Record<string, {
3490
- title: Array<RichTextItemRequest>;
3491
- type?: "title";
3492
- } | {
3493
- rich_text: Array<RichTextItemRequest>;
3494
- type?: "rich_text";
3495
- } | {
3496
- number: number | null;
3497
- type?: "number";
3498
- } | {
3499
- url: TextRequest | null;
3500
- type?: "url";
3501
- } | {
3502
- select: {
3503
- id: StringRequest;
3504
- name?: TextRequest;
3505
- color?: SelectColor;
3506
- description?: TextRequest | null;
3507
- } | {
3508
- name: TextRequest;
3509
- id?: StringRequest;
3510
- color?: SelectColor;
3511
- description?: TextRequest | null;
3512
- } | null;
3513
- type?: "select";
3514
- } | {
3515
- multi_select: Array<{
3516
- id: StringRequest;
3517
- name?: TextRequest;
3518
- color?: SelectColor;
3519
- description?: TextRequest | null;
3520
- } | {
3521
- name: TextRequest;
3522
- id?: StringRequest;
3523
- color?: SelectColor;
3524
- description?: TextRequest | null;
3525
- }>;
3526
- type?: "multi_select";
3527
- } | {
3528
- people: Array<PartialUserObjectRequest | GroupObjectRequest>;
3529
- type?: "people";
3530
- } | {
3531
- email: StringRequest | null;
3532
- type?: "email";
3533
- } | {
3534
- phone_number: StringRequest | null;
3535
- type?: "phone_number";
3536
- } | {
3537
- date: DateRequest | null;
3538
- type?: "date";
3539
- } | {
3540
- checkbox: boolean;
3541
- type?: "checkbox";
3542
- } | {
3543
- relation: Array<RelationItemPropertyValueResponse>;
3544
- type?: "relation";
3545
- } | {
3546
- files: Array<InternalOrExternalFileWithNameRequest | FileUploadWithOptionalNameRequest>;
3547
- type?: "files";
3548
- } | {
3549
- status: {
3550
- id: StringRequest;
3551
- name?: TextRequest;
3552
- color?: SelectColor;
3553
- description?: TextRequest | null;
3554
- } | {
3555
- name: TextRequest;
3556
- id?: StringRequest;
3557
- color?: SelectColor;
3558
- description?: TextRequest | null;
3559
- } | null;
3560
- type?: "status";
3561
- } | {
3562
- place: {
3563
- lat: number;
3564
- lon: number;
3565
- name?: string | null;
3566
- address?: string | null;
3567
- aws_place_id?: string | null;
3568
- google_place_id?: string | null;
3569
- } | null;
3570
- type?: "place";
3571
- }>;
3572
- icon?: PageIconRequest | null;
3573
- cover?: PageCoverRequest | null;
3574
- content?: Array<BlockObjectRequest>;
3575
- children?: Array<BlockObjectRequest>;
3576
- markdown?: string;
3577
- template?: {
3578
- type: "none";
3579
- } | {
3580
- type: "default";
3581
- timezone?: TemplateTimezone;
3582
- } | {
3583
- type: "template_id";
3584
- template_id: IdRequest;
3585
- timezone?: TemplateTimezone;
3586
- };
3587
- position?: PagePositionSchema;
3588
- };
3589
- export type CreatePageParameters = CreatePageBodyParameters;
3590
- export type CreatePageResponse = PageObjectResponse | PartialPageObjectResponse;
3591
- /**
3592
- * Create a page
3593
- */
3594
- export declare const createPage: {
3595
- readonly method: "post";
3596
- readonly pathParams: readonly [];
3597
- readonly queryParams: readonly [];
3598
- readonly bodyParams: readonly ["parent", "properties", "icon", "cover", "content", "children", "markdown", "template", "position"];
3599
- readonly path: () => string;
3600
- };
3601
- type GetPagePathParameters = {
3602
- page_id: IdRequest;
3603
- };
3604
- type GetPageQueryParameters = {
3605
- filter_properties?: Array<string>;
3606
- };
3607
- export type GetPageParameters = GetPagePathParameters & GetPageQueryParameters;
3608
- export type GetPageResponse = PartialPageObjectResponse | PageObjectResponse;
3609
- /**
3610
- * Retrieve a page
3611
- */
3612
- export declare const getPage: {
3613
- readonly method: "get";
3614
- readonly pathParams: readonly ["page_id"];
3615
- readonly queryParams: readonly ["filter_properties"];
3616
- readonly bodyParams: readonly [];
3617
- readonly path: (p: GetPagePathParameters) => string;
3618
- };
3619
- type UpdatePagePathParameters = {
3620
- page_id: IdRequest;
3621
- };
3622
- type UpdatePageBodyParameters = {
3623
- properties?: Record<string, {
3624
- title: Array<RichTextItemRequest>;
3625
- type?: "title";
3626
- } | {
3627
- rich_text: Array<RichTextItemRequest>;
3628
- type?: "rich_text";
3629
- } | {
3630
- number: number | null;
3631
- type?: "number";
3632
- } | {
3633
- url: TextRequest | null;
3634
- type?: "url";
3635
- } | {
3636
- select: {
3637
- id: StringRequest;
3638
- name?: TextRequest;
3639
- color?: SelectColor;
3640
- description?: TextRequest | null;
3641
- } | {
3642
- name: TextRequest;
3643
- id?: StringRequest;
3644
- color?: SelectColor;
3645
- description?: TextRequest | null;
3646
- } | null;
3647
- type?: "select";
3648
- } | {
3649
- multi_select: Array<{
3650
- id: StringRequest;
3651
- name?: TextRequest;
3652
- color?: SelectColor;
3653
- description?: TextRequest | null;
3654
- } | {
3655
- name: TextRequest;
3656
- id?: StringRequest;
3657
- color?: SelectColor;
3658
- description?: TextRequest | null;
3659
- }>;
3660
- type?: "multi_select";
3661
- } | {
3662
- people: Array<PartialUserObjectRequest | GroupObjectRequest>;
3663
- type?: "people";
3664
- } | {
3665
- email: StringRequest | null;
3666
- type?: "email";
3667
- } | {
3668
- phone_number: StringRequest | null;
3669
- type?: "phone_number";
3670
- } | {
3671
- date: DateRequest | null;
3672
- type?: "date";
3673
- } | {
3674
- checkbox: boolean;
3675
- type?: "checkbox";
3676
- } | {
3677
- relation: Array<RelationItemPropertyValueResponse>;
3678
- type?: "relation";
3679
- } | {
3680
- files: Array<InternalOrExternalFileWithNameRequest | FileUploadWithOptionalNameRequest>;
3681
- type?: "files";
3682
- } | {
3683
- status: {
3684
- id: StringRequest;
3685
- name?: TextRequest;
3686
- color?: SelectColor;
3687
- description?: TextRequest | null;
3688
- } | {
3689
- name: TextRequest;
3690
- id?: StringRequest;
3691
- color?: SelectColor;
3692
- description?: TextRequest | null;
3693
- } | null;
3694
- type?: "status";
3695
- } | {
3696
- place: {
3697
- lat: number;
3698
- lon: number;
3699
- name?: string | null;
3700
- address?: string | null;
3701
- aws_place_id?: string | null;
3702
- google_place_id?: string | null;
3703
- } | null;
3704
- type?: "place";
3705
- }>;
3706
- icon?: PageIconRequest | null;
3707
- cover?: PageCoverRequest | null;
3708
- is_locked?: boolean;
3709
- template?: {
3710
- type: "default";
3711
- timezone?: TemplateTimezone;
3712
- } | {
3713
- type: "template_id";
3714
- template_id: IdRequest;
3715
- timezone?: TemplateTimezone;
3716
- };
3717
- erase_content?: boolean;
3718
- in_trash?: boolean;
3719
- /** @deprecated Use `in_trash` instead. */
3720
- archived?: boolean;
3721
- is_archived?: boolean;
3722
- };
3723
- export type UpdatePageParameters = UpdatePagePathParameters & UpdatePageBodyParameters;
3724
- export type UpdatePageResponse = PageObjectResponse | PartialPageObjectResponse;
3725
- /**
3726
- * Update page
3727
- */
3728
- export declare const updatePage: {
3729
- readonly method: "patch";
3730
- readonly pathParams: readonly ["page_id"];
3731
- readonly queryParams: readonly [];
3732
- readonly bodyParams: readonly ["archived", "properties", "icon", "cover", "is_locked", "template", "erase_content", "in_trash", "is_archived"];
3733
- readonly path: (p: UpdatePagePathParameters) => string;
3734
- };
3735
- type MovePagePathParameters = {
3736
- page_id: IdRequest;
3737
- };
3738
- type MovePageBodyParameters = {
3739
- parent: {
3740
- page_id: IdRequest;
3741
- type?: "page_id";
3742
- } | {
3743
- data_source_id: IdRequest;
3744
- type?: "data_source_id";
3745
- };
3746
- };
3747
- export type MovePageParameters = MovePagePathParameters & MovePageBodyParameters;
3748
- export type MovePageResponse = PartialPageObjectResponse | PageObjectResponse;
3749
- /**
3750
- * Move a page
3751
- */
3752
- export declare const movePage: {
3753
- readonly method: "post";
3754
- readonly pathParams: readonly ["page_id"];
3755
- readonly queryParams: readonly [];
3756
- readonly bodyParams: readonly ["parent"];
3757
- readonly path: (p: MovePagePathParameters) => string;
3758
- };
3759
- type GetPagePropertyPathParameters = {
3760
- page_id: IdRequest;
3761
- property_id: string;
3762
- };
3763
- type GetPagePropertyQueryParameters = {
3764
- start_cursor?: string;
3765
- page_size?: number;
3766
- };
3767
- export type GetPagePropertyParameters = GetPagePropertyPathParameters & GetPagePropertyQueryParameters;
3768
- export type GetPagePropertyResponse = PropertyItemObjectResponse | PropertyItemListResponse;
3769
- /**
3770
- * Retrieve a page property item
3771
- */
3772
- export declare const getPageProperty: {
3773
- readonly method: "get";
3774
- readonly pathParams: readonly ["page_id", "property_id"];
3775
- readonly queryParams: readonly ["start_cursor", "page_size"];
3776
- readonly bodyParams: readonly [];
3777
- readonly path: (p: GetPagePropertyPathParameters) => string;
3778
- };
3779
- type GetPageMarkdownPathParameters = {
3780
- page_id: IdRequest;
3781
- };
3782
- type GetPageMarkdownQueryParameters = {
3783
- include_transcript?: boolean;
3784
- };
3785
- export type GetPageMarkdownParameters = GetPageMarkdownPathParameters & GetPageMarkdownQueryParameters;
3786
- export type GetPageMarkdownResponse = PageMarkdownResponse;
3787
- /**
3788
- * Retrieve a page as markdown
3789
- */
3790
- export declare const getPageMarkdown: {
3791
- readonly method: "get";
3792
- readonly pathParams: readonly ["page_id"];
3793
- readonly queryParams: readonly ["include_transcript"];
3794
- readonly bodyParams: readonly [];
3795
- readonly path: (p: GetPageMarkdownPathParameters) => string;
3796
- };
3797
- type UpdatePageMarkdownPathParameters = {
3798
- page_id: IdRequest;
3799
- };
3800
- type UpdatePageMarkdownBodyParameters = {
3801
- type: "insert_content";
3802
- insert_content: {
3803
- content: string;
3804
- after?: string;
3805
- };
3806
- } | {
3807
- type: "replace_content_range";
3808
- replace_content_range: {
3809
- content: string;
3810
- content_range: string;
3811
- allow_deleting_content?: boolean;
3812
- };
3813
- } | {
3814
- type: "update_content";
3815
- update_content: {
3816
- content_updates: Array<{
3817
- old_str: string;
3818
- new_str: string;
3819
- replace_all_matches?: boolean;
3820
- }>;
3821
- allow_deleting_content?: boolean;
3822
- };
3823
- } | {
3824
- type: "replace_content";
3825
- replace_content: {
3826
- new_str: string;
3827
- allow_deleting_content?: boolean;
3828
- };
3829
- };
3830
- export type UpdatePageMarkdownParameters = UpdatePageMarkdownPathParameters & UpdatePageMarkdownBodyParameters;
3831
- export type UpdatePageMarkdownResponse = PageMarkdownResponse;
3832
- /**
3833
- * Update a page's content as markdown
3834
- */
3835
- export declare const updatePageMarkdown: {
3836
- readonly method: "patch";
3837
- readonly pathParams: readonly ["page_id"];
3838
- readonly queryParams: readonly [];
3839
- readonly bodyParams: readonly ["type", "insert_content", "replace_content_range", "update_content", "replace_content"];
3840
- readonly path: (p: UpdatePageMarkdownPathParameters) => string;
3841
- };
3842
- type GetBlockPathParameters = {
3843
- block_id: IdRequest;
3844
- };
3845
- export type GetBlockParameters = GetBlockPathParameters;
3846
- export type GetBlockResponse = PartialBlockObjectResponse | BlockObjectResponse;
3847
- /**
3848
- * Retrieve a block
3849
- */
3850
- export declare const getBlock: {
3851
- readonly method: "get";
3852
- readonly pathParams: readonly ["block_id"];
3853
- readonly queryParams: readonly [];
3854
- readonly bodyParams: readonly [];
3855
- readonly path: (p: GetBlockPathParameters) => string;
3856
- };
3857
- type UpdateBlockPathParameters = {
3858
- block_id: IdRequest;
3859
- };
3860
- type UpdateBlockBodyParameters = {
3861
- embed: UpdateMediaContentWithUrlAndCaptionRequest;
3862
- type?: "embed";
3863
- in_trash?: boolean;
3864
- /** @deprecated Use `in_trash` instead. */
3865
- archived?: boolean;
3866
- } | {
3867
- bookmark: UpdateMediaContentWithUrlAndCaptionRequest;
3868
- type?: "bookmark";
3869
- in_trash?: boolean;
3870
- /** @deprecated Use `in_trash` instead. */
3871
- archived?: boolean;
3872
- } | {
3873
- image: UpdateMediaContentWithFileAndCaptionRequest;
3874
- type?: "image";
3875
- in_trash?: boolean;
3876
- /** @deprecated Use `in_trash` instead. */
3877
- archived?: boolean;
3878
- } | {
3879
- video: UpdateMediaContentWithFileAndCaptionRequest;
3880
- type?: "video";
3881
- in_trash?: boolean;
3882
- /** @deprecated Use `in_trash` instead. */
3883
- archived?: boolean;
3884
- } | {
3885
- pdf: UpdateMediaContentWithFileAndCaptionRequest;
3886
- type?: "pdf";
3887
- in_trash?: boolean;
3888
- /** @deprecated Use `in_trash` instead. */
3889
- archived?: boolean;
3890
- } | {
3891
- file: UpdateMediaContentWithFileNameAndCaptionRequest;
3892
- type?: "file";
3893
- in_trash?: boolean;
3894
- /** @deprecated Use `in_trash` instead. */
3895
- archived?: boolean;
3896
- } | {
3897
- audio: UpdateMediaContentWithFileAndCaptionRequest;
3898
- type?: "audio";
3899
- in_trash?: boolean;
3900
- /** @deprecated Use `in_trash` instead. */
3901
- archived?: boolean;
3902
- } | {
3903
- code: {
3904
- rich_text?: Array<RichTextItemRequest>;
3905
- language?: LanguageRequest;
3906
- caption?: Array<RichTextItemRequest>;
3907
- };
3908
- type?: "code";
3909
- in_trash?: boolean;
3910
- /** @deprecated Use `in_trash` instead. */
3911
- archived?: boolean;
3912
- } | {
3913
- equation: ContentWithExpressionRequest;
3914
- type?: "equation";
3915
- in_trash?: boolean;
3916
- /** @deprecated Use `in_trash` instead. */
3917
- archived?: boolean;
3918
- } | {
3919
- divider: EmptyObject;
3920
- type?: "divider";
3921
- in_trash?: boolean;
3922
- /** @deprecated Use `in_trash` instead. */
3923
- archived?: boolean;
3924
- } | {
3925
- breadcrumb: EmptyObject;
3926
- type?: "breadcrumb";
3927
- in_trash?: boolean;
3928
- /** @deprecated Use `in_trash` instead. */
3929
- archived?: boolean;
3930
- } | {
3931
- table_of_contents: {
3932
- color?: ApiColor;
3933
- };
3934
- type?: "table_of_contents";
3935
- in_trash?: boolean;
3936
- /** @deprecated Use `in_trash` instead. */
3937
- archived?: boolean;
3938
- } | {
3939
- link_to_page: {
3940
- page_id: IdRequest;
3941
- type?: "page_id";
3942
- } | {
3943
- database_id: IdRequest;
3944
- type?: "database_id";
3945
- } | {
3946
- comment_id: IdRequest;
3947
- type?: "comment_id";
3948
- };
3949
- type?: "link_to_page";
3950
- in_trash?: boolean;
3951
- /** @deprecated Use `in_trash` instead. */
3952
- archived?: boolean;
3953
- } | {
3954
- table_row: ContentWithTableRowRequest;
3955
- type?: "table_row";
3956
- in_trash?: boolean;
3957
- /** @deprecated Use `in_trash` instead. */
3958
- archived?: boolean;
3959
- } | {
3960
- heading_1: HeaderContentWithRichTextAndColorRequest;
3961
- type?: "heading_1";
3962
- in_trash?: boolean;
3963
- /** @deprecated Use `in_trash` instead. */
3964
- archived?: boolean;
3965
- } | {
3966
- heading_2: HeaderContentWithRichTextAndColorRequest;
3967
- type?: "heading_2";
3968
- in_trash?: boolean;
3969
- /** @deprecated Use `in_trash` instead. */
3970
- archived?: boolean;
3971
- } | {
3972
- heading_3: HeaderContentWithRichTextAndColorRequest;
3973
- type?: "heading_3";
3974
- in_trash?: boolean;
3975
- /** @deprecated Use `in_trash` instead. */
3976
- archived?: boolean;
3977
- } | {
3978
- paragraph: ContentWithRichTextAndColorRequest;
3979
- type?: "paragraph";
3980
- in_trash?: boolean;
3981
- /** @deprecated Use `in_trash` instead. */
3982
- archived?: boolean;
3983
- } | {
3984
- bulleted_list_item: ContentWithRichTextAndColorRequest;
3985
- type?: "bulleted_list_item";
3986
- in_trash?: boolean;
3987
- /** @deprecated Use `in_trash` instead. */
3988
- archived?: boolean;
3989
- } | {
3990
- numbered_list_item: ContentWithRichTextAndColorRequest;
3991
- type?: "numbered_list_item";
3992
- in_trash?: boolean;
3993
- /** @deprecated Use `in_trash` instead. */
3994
- archived?: boolean;
3995
- } | {
3996
- quote: ContentWithRichTextAndColorRequest;
3997
- type?: "quote";
3998
- in_trash?: boolean;
3999
- /** @deprecated Use `in_trash` instead. */
4000
- archived?: boolean;
4001
- } | {
4002
- to_do: {
4003
- rich_text?: Array<RichTextItemRequest>;
4004
- checked?: boolean;
4005
- color?: ApiColor;
4006
- };
4007
- type?: "to_do";
4008
- in_trash?: boolean;
4009
- /** @deprecated Use `in_trash` instead. */
4010
- archived?: boolean;
4011
- } | {
4012
- toggle: ContentWithRichTextAndColorRequest;
4013
- type?: "toggle";
4014
- in_trash?: boolean;
4015
- /** @deprecated Use `in_trash` instead. */
4016
- archived?: boolean;
4017
- } | {
4018
- template: ContentWithRichTextRequest;
4019
- type?: "template";
4020
- in_trash?: boolean;
4021
- /** @deprecated Use `in_trash` instead. */
4022
- archived?: boolean;
4023
- } | {
4024
- callout: {
4025
- rich_text?: Array<RichTextItemRequest>;
4026
- icon?: PageIconRequest;
4027
- color?: ApiColor;
4028
- };
4029
- type?: "callout";
4030
- in_trash?: boolean;
4031
- /** @deprecated Use `in_trash` instead. */
4032
- archived?: boolean;
4033
- } | {
4034
- synced_block: {
4035
- synced_from: {
4036
- block_id: IdRequest;
4037
- type?: "block_id";
4038
- } | null;
4039
- };
4040
- type?: "synced_block";
4041
- in_trash?: boolean;
4042
- /** @deprecated Use `in_trash` instead. */
4043
- archived?: boolean;
4044
- } | {
4045
- table: {
4046
- has_column_header?: boolean;
4047
- has_row_header?: boolean;
4048
- };
4049
- type?: "table";
4050
- in_trash?: boolean;
4051
- /** @deprecated Use `in_trash` instead. */
4052
- archived?: boolean;
4053
- } | {
4054
- column: {
4055
- width_ratio?: number;
4056
- };
4057
- type?: "column";
4058
- in_trash?: boolean;
4059
- /** @deprecated Use `in_trash` instead. */
4060
- archived?: boolean;
4061
- } | {
4062
- in_trash?: boolean;
4063
- /** @deprecated Use `in_trash` instead. */
4064
- archived?: boolean;
4065
- };
4066
- export type UpdateBlockParameters = UpdateBlockPathParameters & UpdateBlockBodyParameters;
4067
- export type UpdateBlockResponse = PartialBlockObjectResponse | BlockObjectResponse;
4068
- /**
4069
- * Update a block
4070
- */
4071
- export declare const updateBlock: {
4072
- readonly method: "patch";
4073
- readonly pathParams: readonly ["block_id"];
4074
- readonly queryParams: readonly [];
4075
- 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"];
4076
- readonly path: (p: UpdateBlockPathParameters) => string;
4077
- };
4078
- type DeleteBlockPathParameters = {
4079
- block_id: IdRequest;
4080
- };
4081
- export type DeleteBlockParameters = DeleteBlockPathParameters;
4082
- export type DeleteBlockResponse = PartialBlockObjectResponse | BlockObjectResponse;
4083
- /**
4084
- * Delete a block
4085
- */
4086
- export declare const deleteBlock: {
4087
- readonly method: "delete";
4088
- readonly pathParams: readonly ["block_id"];
4089
- readonly queryParams: readonly [];
4090
- readonly bodyParams: readonly [];
4091
- readonly path: (p: DeleteBlockPathParameters) => string;
4092
- };
4093
- type ListBlockChildrenPathParameters = {
4094
- block_id: IdRequest;
4095
- };
4096
- type ListBlockChildrenQueryParameters = {
4097
- start_cursor?: string;
4098
- page_size?: number;
4099
- };
4100
- export type ListBlockChildrenParameters = ListBlockChildrenPathParameters & ListBlockChildrenQueryParameters;
4101
- export type ListBlockChildrenResponse = {
4102
- type: "block";
4103
- block: EmptyObject;
4104
- object: "list";
4105
- next_cursor: string | null;
4106
- has_more: boolean;
4107
- results: Array<PartialBlockObjectResponse | BlockObjectResponse>;
4108
- };
4109
- /**
4110
- * Retrieve block children
4111
- */
4112
- export declare const listBlockChildren: {
4113
- readonly method: "get";
4114
- readonly pathParams: readonly ["block_id"];
4115
- readonly queryParams: readonly ["start_cursor", "page_size"];
4116
- readonly bodyParams: readonly [];
4117
- readonly path: (p: ListBlockChildrenPathParameters) => string;
4118
- };
4119
- type AppendBlockChildrenPathParameters = {
4120
- block_id: IdRequest;
4121
- };
4122
- type AppendBlockChildrenBodyParameters = {
4123
- children: Array<BlockObjectRequest>;
4124
- /** @deprecated Use `position` instead. */
4125
- after?: IdRequest;
4126
- position?: ContentPositionSchema;
4127
- };
4128
- export type AppendBlockChildrenParameters = AppendBlockChildrenPathParameters & AppendBlockChildrenBodyParameters;
4129
- export type AppendBlockChildrenResponse = {
4130
- type: "block";
4131
- block: EmptyObject;
4132
- object: "list";
4133
- next_cursor: string | null;
4134
- has_more: boolean;
4135
- results: Array<PartialBlockObjectResponse | BlockObjectResponse>;
4136
- };
4137
- /**
4138
- * Append block children
4139
- */
4140
- export declare const appendBlockChildren: {
4141
- readonly method: "patch";
4142
- readonly pathParams: readonly ["block_id"];
4143
- readonly queryParams: readonly [];
4144
- readonly bodyParams: readonly ["after", "children", "position"];
4145
- readonly path: (p: AppendBlockChildrenPathParameters) => string;
4146
- };
4147
- type GetDataSourcePathParameters = {
4148
- data_source_id: IdRequest;
4149
- };
4150
- export type GetDataSourceParameters = GetDataSourcePathParameters;
4151
- export type GetDataSourceResponse = PartialDataSourceObjectResponse | DataSourceObjectResponse;
4152
- /**
4153
- * Retrieve a data source
4154
- */
4155
- export declare const getDataSource: {
4156
- readonly method: "get";
4157
- readonly pathParams: readonly ["data_source_id"];
4158
- readonly queryParams: readonly [];
4159
- readonly bodyParams: readonly [];
4160
- readonly path: (p: GetDataSourcePathParameters) => string;
4161
- };
4162
- type UpdateDataSourcePathParameters = {
4163
- data_source_id: IdRequest;
4164
- };
4165
- type UpdateDataSourceBodyParameters = {
4166
- title?: Array<RichTextItemRequest>;
4167
- icon?: PageIconRequest | null;
4168
- properties?: Record<string, ({
4169
- name?: string;
4170
- description?: PropertyDescriptionRequest | null;
4171
- } & ({
4172
- type?: "number";
4173
- number: {
4174
- format?: NumberFormat;
4175
- };
4176
- } | {
4177
- type?: "formula";
4178
- formula: {
4179
- expression?: string;
4180
- };
4181
- } | {
4182
- type?: "select";
4183
- select: {
4184
- options?: Array<{
4185
- color?: SelectColor;
4186
- description?: string | null;
4187
- } & ({
4188
- name: string;
4189
- id?: string;
4190
- } | {
4191
- id: string;
4192
- name?: string;
4193
- })>;
4194
- };
4195
- } | {
4196
- type?: "multi_select";
4197
- multi_select: {
4198
- options?: Array<{
4199
- color?: SelectColor;
4200
- description?: string | null;
4201
- } & ({
4202
- name: string;
4203
- id?: string;
4204
- } | {
4205
- id: string;
4206
- name?: string;
4207
- })>;
4208
- };
4209
- } | {
4210
- type?: "status";
4211
- status: StatusPropertyConfigUpdateRequest;
4212
- } | {
4213
- type?: "relation";
4214
- relation: {
4215
- data_source_id: IdRequest;
4216
- } & ({
4217
- type?: "single_property";
4218
- single_property: EmptyObject;
4219
- } | {
4220
- type?: "dual_property";
4221
- dual_property: {
4222
- synced_property_id?: string;
4223
- synced_property_name?: string;
4224
- };
4225
- });
4226
- } | {
4227
- type?: "rollup";
4228
- rollup: {
4229
- function: RollupFunction;
4230
- } & ({
4231
- relation_property_name: string;
4232
- rollup_property_name: string;
4233
- } | {
4234
- relation_property_id: string;
4235
- rollup_property_name: string;
4236
- } | {
4237
- relation_property_name: string;
4238
- rollup_property_id: string;
4239
- } | {
4240
- relation_property_id: string;
4241
- rollup_property_id: string;
4242
- });
4243
- } | {
4244
- type?: "unique_id";
4245
- unique_id: {
4246
- prefix?: string | null;
4247
- };
4248
- } | {
4249
- type?: "title";
4250
- title: EmptyObject;
4251
- } | {
4252
- type?: "rich_text";
4253
- rich_text: EmptyObject;
4254
- } | {
4255
- type?: "url";
4256
- url: EmptyObject;
4257
- } | {
4258
- type?: "people";
4259
- people: EmptyObject;
4260
- } | {
4261
- type?: "files";
4262
- files: EmptyObject;
4263
- } | {
4264
- type?: "email";
4265
- email: EmptyObject;
4266
- } | {
4267
- type?: "phone_number";
4268
- phone_number: EmptyObject;
4269
- } | {
4270
- type?: "date";
4271
- date: EmptyObject;
4272
- } | {
4273
- type?: "checkbox";
4274
- checkbox: EmptyObject;
4275
- } | {
4276
- type?: "created_by";
4277
- created_by: EmptyObject;
4278
- } | {
4279
- type?: "created_time";
4280
- created_time: EmptyObject;
4281
- } | {
4282
- type?: "last_edited_by";
4283
- last_edited_by: EmptyObject;
4284
- } | {
4285
- type?: "last_edited_time";
4286
- last_edited_time: EmptyObject;
4287
- } | {
4288
- type?: "place";
4289
- place: EmptyObject;
4290
- })) | {
4291
- name: string;
4292
- } | null>;
4293
- in_trash?: boolean;
4294
- /** @deprecated Use `in_trash` instead. */
4295
- archived?: boolean;
4296
- parent?: ParentOfDataSourceRequest;
4297
- };
4298
- export type UpdateDataSourceParameters = UpdateDataSourcePathParameters & UpdateDataSourceBodyParameters;
4299
- export type UpdateDataSourceResponse = PartialDataSourceObjectResponse | DataSourceObjectResponse;
4300
- /**
4301
- * Update a data source
4302
- */
4303
- export declare const updateDataSource: {
4304
- readonly method: "patch";
4305
- readonly pathParams: readonly ["data_source_id"];
4306
- readonly queryParams: readonly [];
4307
- readonly bodyParams: readonly ["archived", "title", "icon", "properties", "in_trash", "parent"];
4308
- readonly path: (p: UpdateDataSourcePathParameters) => string;
4309
- };
4310
- type QueryDataSourcePathParameters = {
4311
- data_source_id: IdRequest;
4312
- };
4313
- type QueryDataSourceQueryParameters = {
4314
- filter_properties?: Array<string>;
4315
- };
4316
- type QueryDataSourceBodyParameters = {
4317
- sorts?: Array<{
4318
- property: string;
4319
- direction: "ascending" | "descending";
4320
- } | {
4321
- timestamp: "created_time" | "last_edited_time";
4322
- direction: "ascending" | "descending";
4323
- }>;
4324
- filter?: {
4325
- or: GroupFilterOperatorArray;
4326
- } | {
4327
- and: GroupFilterOperatorArray;
4328
- } | PropertyFilter | TimestampFilter;
4329
- start_cursor?: string;
4330
- page_size?: number;
4331
- in_trash?: boolean;
4332
- /** @deprecated Use `in_trash` instead. */
4333
- archived?: boolean;
4334
- result_type?: "page" | "data_source";
4335
- };
4336
- export type QueryDataSourceParameters = QueryDataSourcePathParameters & QueryDataSourceQueryParameters & QueryDataSourceBodyParameters;
4337
- export type QueryDataSourceResponse = {
4338
- type: "page_or_data_source";
4339
- page_or_data_source: EmptyObject;
4340
- object: "list";
4341
- next_cursor: string | null;
4342
- has_more: boolean;
4343
- results: Array<PageObjectResponse | PartialPageObjectResponse | PartialDataSourceObjectResponse | DataSourceObjectResponse>;
4344
- };
4345
- /**
4346
- * Query a data source
4347
- */
4348
- export declare const queryDataSource: {
4349
- readonly method: "post";
4350
- readonly pathParams: readonly ["data_source_id"];
4351
- readonly queryParams: readonly ["filter_properties"];
4352
- readonly bodyParams: readonly ["archived", "sorts", "filter", "start_cursor", "page_size", "in_trash", "result_type"];
4353
- readonly path: (p: QueryDataSourcePathParameters) => string;
4354
- };
4355
- type CreateDataSourceBodyParameters = {
4356
- parent: ParentOfDataSourceRequest;
4357
- properties: Record<string, PropertyConfigurationRequest>;
4358
- title?: Array<RichTextItemRequest>;
4359
- icon?: PageIconRequest | null;
4360
- };
4361
- export type CreateDataSourceParameters = CreateDataSourceBodyParameters;
4362
- export type CreateDataSourceResponse = PartialDataSourceObjectResponse | DataSourceObjectResponse;
4363
- /**
4364
- * Create a data source
4365
- */
4366
- export declare const createDataSource: {
4367
- readonly method: "post";
4368
- readonly pathParams: readonly [];
4369
- readonly queryParams: readonly [];
4370
- readonly bodyParams: readonly ["parent", "properties", "title", "icon"];
4371
- readonly path: () => string;
4372
- };
4373
- type ListDataSourceTemplatesPathParameters = {
4374
- data_source_id: IdRequest;
4375
- };
4376
- type ListDataSourceTemplatesQueryParameters = {
4377
- name?: string;
4378
- start_cursor?: string;
4379
- page_size?: number;
4380
- };
4381
- export type ListDataSourceTemplatesParameters = ListDataSourceTemplatesPathParameters & ListDataSourceTemplatesQueryParameters;
4382
- export type ListDataSourceTemplatesResponse = {
4383
- templates: Array<{
4384
- id: IdResponse;
4385
- name: string;
4386
- is_default: boolean;
4387
- }>;
4388
- has_more: boolean;
4389
- next_cursor: IdResponse | null;
4390
- };
4391
- /**
4392
- * List templates in a data source
4393
- */
4394
- export declare const listDataSourceTemplates: {
4395
- readonly method: "get";
4396
- readonly pathParams: readonly ["data_source_id"];
4397
- readonly queryParams: readonly ["name", "start_cursor", "page_size"];
4398
- readonly bodyParams: readonly [];
4399
- readonly path: (p: ListDataSourceTemplatesPathParameters) => string;
4400
- };
4401
- type GetDatabasePathParameters = {
4402
- database_id: IdRequest;
4403
- };
4404
- export type GetDatabaseParameters = GetDatabasePathParameters;
4405
- export type GetDatabaseResponse = PartialDatabaseObjectResponse | DatabaseObjectResponse;
4406
- /**
4407
- * Retrieve a database
4408
- */
4409
- export declare const getDatabase: {
4410
- readonly method: "get";
4411
- readonly pathParams: readonly ["database_id"];
4412
- readonly queryParams: readonly [];
4413
- readonly bodyParams: readonly [];
4414
- readonly path: (p: GetDatabasePathParameters) => string;
4415
- };
4416
- type UpdateDatabasePathParameters = {
4417
- database_id: IdRequest;
4418
- };
4419
- type UpdateDatabaseBodyParameters = {
4420
- parent?: {
4421
- type: "page_id" | "workspace";
4422
- } & ({
4423
- type: "page_id";
4424
- page_id: IdRequest;
4425
- } | {
4426
- type: "workspace";
4427
- workspace: true;
4428
- });
4429
- title?: Array<RichTextItemRequest>;
4430
- description?: Array<RichTextItemRequest>;
4431
- is_inline?: boolean;
4432
- icon?: PageIconRequest;
4433
- cover?: PageCoverRequest;
4434
- in_trash?: boolean;
4435
- /** @deprecated Use `in_trash` instead. */
4436
- archived?: boolean;
4437
- is_locked?: boolean;
4438
- };
4439
- export type UpdateDatabaseParameters = UpdateDatabasePathParameters & UpdateDatabaseBodyParameters;
4440
- export type UpdateDatabaseResponse = PartialDatabaseObjectResponse | DatabaseObjectResponse;
4441
- /**
4442
- * Update a database
4443
- */
4444
- export declare const updateDatabase: {
4445
- readonly method: "patch";
4446
- readonly pathParams: readonly ["database_id"];
4447
- readonly queryParams: readonly [];
4448
- readonly bodyParams: readonly ["parent", "title", "description", "is_inline", "icon", "cover", "in_trash", "is_locked"];
4449
- readonly path: (p: UpdateDatabasePathParameters) => string;
4450
- };
4451
- type CreateDatabaseBodyParameters = {
4452
- parent: {
4453
- type: "page_id" | "workspace";
4454
- } & ({
4455
- type: "page_id";
4456
- page_id: IdRequest;
4457
- } | {
4458
- type: "workspace";
4459
- workspace: true;
4460
- });
4461
- title?: Array<RichTextItemRequest>;
4462
- description?: Array<RichTextItemRequest>;
4463
- is_inline?: boolean;
4464
- initial_data_source?: InitialDataSourceRequest;
4465
- icon?: PageIconRequest;
4466
- cover?: PageCoverRequest;
4467
- };
4468
- export type CreateDatabaseParameters = CreateDatabaseBodyParameters;
4469
- export type CreateDatabaseResponse = PartialDatabaseObjectResponse | DatabaseObjectResponse;
4470
- /**
4471
- * Create a database
4472
- */
4473
- export declare const createDatabase: {
4474
- readonly method: "post";
4475
- readonly pathParams: readonly [];
4476
- readonly queryParams: readonly [];
4477
- readonly bodyParams: readonly ["parent", "title", "description", "is_inline", "initial_data_source", "icon", "cover"];
4478
- readonly path: () => string;
4479
- };
4480
- type SearchBodyParameters = {
4481
- sort?: {
4482
- timestamp: "last_edited_time";
4483
- direction: "ascending" | "descending";
4484
- };
4485
- query?: string;
4486
- start_cursor?: string;
4487
- page_size?: number;
4488
- filter?: {
4489
- property: "object";
4490
- value: "page" | "data_source";
4491
- };
4492
- };
4493
- export type SearchParameters = SearchBodyParameters;
4494
- export type SearchResponse = {
4495
- type: "page_or_data_source";
4496
- page_or_data_source: EmptyObject;
4497
- object: "list";
4498
- next_cursor: string | null;
4499
- has_more: boolean;
4500
- results: Array<PageObjectResponse | PartialPageObjectResponse | PartialDataSourceObjectResponse | DataSourceObjectResponse>;
4501
- };
4502
- /**
4503
- * Search by title
4504
- */
4505
- export declare const search: {
4506
- readonly method: "post";
4507
- readonly pathParams: readonly [];
4508
- readonly queryParams: readonly [];
4509
- readonly bodyParams: readonly ["sort", "query", "start_cursor", "page_size", "filter"];
4510
- readonly path: () => string;
4511
- };
4512
- type CreateCommentBodyParameters = {
4513
- rich_text: Array<RichTextItemRequest>;
4514
- attachments?: Array<{
4515
- file_upload_id: string;
4516
- type?: "file_upload";
4517
- }>;
4518
- display_name?: {
4519
- type: "integration";
4520
- } | {
4521
- type: "user";
4522
- } | {
4523
- type: "custom";
4524
- custom: {
4525
- name: string;
4526
- };
4527
- };
4528
- } & ({
4529
- parent: {
4530
- page_id: IdRequest;
4531
- type?: "page_id";
4532
- } | {
4533
- block_id: IdRequest;
4534
- type?: "block_id";
4535
- };
4536
- } | {
4537
- discussion_id: IdRequest;
4538
- });
4539
- export type CreateCommentParameters = CreateCommentBodyParameters;
4540
- export type CreateCommentResponse = PartialCommentObjectResponse | CommentObjectResponse;
4541
- /**
4542
- * Create a comment
4543
- */
4544
- export declare const createComment: {
4545
- readonly method: "post";
4546
- readonly pathParams: readonly [];
4547
- readonly queryParams: readonly [];
4548
- readonly bodyParams: readonly ["rich_text", "attachments", "display_name", "parent", "discussion_id"];
4549
- readonly path: () => string;
4550
- };
4551
- type ListCommentsQueryParameters = {
4552
- block_id: IdRequest;
4553
- start_cursor?: string;
4554
- page_size?: number;
4555
- };
4556
- export type ListCommentsParameters = ListCommentsQueryParameters;
4557
- export type ListCommentsResponse = {
4558
- object: "list";
4559
- next_cursor: IdResponse | null;
4560
- has_more: boolean;
4561
- results: Array<CommentObjectResponse>;
4562
- type: "comment";
4563
- comment: EmptyObject;
4564
- };
4565
- /**
4566
- * List comments
4567
- */
4568
- export declare const listComments: {
4569
- readonly method: "get";
4570
- readonly pathParams: readonly [];
4571
- readonly queryParams: readonly ["block_id", "start_cursor", "page_size"];
4572
- readonly bodyParams: readonly [];
4573
- readonly path: () => string;
4574
- };
4575
- type GetCommentPathParameters = {
4576
- comment_id: IdRequest;
4577
- };
4578
- export type GetCommentParameters = GetCommentPathParameters;
4579
- export type GetCommentResponse = PartialCommentObjectResponse | CommentObjectResponse;
4580
- /**
4581
- * Retrieve a comment
4582
- */
4583
- export declare const getComment: {
4584
- readonly method: "get";
4585
- readonly pathParams: readonly ["comment_id"];
4586
- readonly queryParams: readonly [];
4587
- readonly bodyParams: readonly [];
4588
- readonly path: (p: GetCommentPathParameters) => string;
4589
- };
4590
- type CreateFileUploadBodyParameters = {
4591
- mode?: "single_part" | "multi_part" | "external_url";
4592
- filename?: string;
4593
- content_type?: string;
4594
- number_of_parts?: number;
4595
- external_url?: string;
4596
- };
4597
- export type CreateFileUploadParameters = CreateFileUploadBodyParameters;
4598
- export type CreateFileUploadResponse = FileUploadObjectResponse;
4599
- /**
4600
- * Create a file upload
4601
- */
4602
- export declare const createFileUpload: {
4603
- readonly method: "post";
4604
- readonly pathParams: readonly [];
4605
- readonly queryParams: readonly [];
4606
- readonly bodyParams: readonly ["mode", "filename", "content_type", "number_of_parts", "external_url"];
4607
- readonly path: () => string;
4608
- };
4609
- type ListFileUploadsQueryParameters = {
4610
- status?: "pending" | "uploaded" | "expired" | "failed";
4611
- start_cursor?: string;
4612
- page_size?: number;
4613
- };
4614
- export type ListFileUploadsParameters = ListFileUploadsQueryParameters;
4615
- export type ListFileUploadsResponse = {
4616
- object: "list";
4617
- next_cursor: IdResponse | null;
4618
- has_more: boolean;
4619
- results: Array<FileUploadObjectResponse>;
4620
- type: "file_upload";
4621
- file_upload: EmptyObject;
4622
- };
4623
- /**
4624
- * List file uploads
4625
- */
4626
- export declare const listFileUploads: {
4627
- readonly method: "get";
4628
- readonly pathParams: readonly [];
4629
- readonly queryParams: readonly ["status", "start_cursor", "page_size"];
4630
- readonly bodyParams: readonly [];
4631
- readonly path: () => string;
4632
- };
4633
- type SendFileUploadPathParameters = {
4634
- file_upload_id: IdRequest;
4635
- };
4636
- type SendFileUploadFormDataParameters = {
4637
- file: {
4638
- filename?: string;
4639
- data: string | Blob;
4640
- };
4641
- part_number?: string;
4642
- };
4643
- export type SendFileUploadParameters = SendFileUploadPathParameters & SendFileUploadFormDataParameters;
4644
- export type SendFileUploadResponse = FileUploadObjectResponse;
4645
- /**
4646
- * Upload a file
4647
- */
4648
- export declare const sendFileUpload: {
4649
- readonly method: "post";
4650
- readonly pathParams: readonly ["file_upload_id"];
4651
- readonly queryParams: readonly [];
4652
- readonly bodyParams: readonly [];
4653
- readonly formDataParams: readonly ["file", "part_number"];
4654
- readonly path: (p: SendFileUploadPathParameters) => string;
4655
- };
4656
- type CompleteFileUploadPathParameters = {
4657
- file_upload_id: IdRequest;
4658
- };
4659
- export type CompleteFileUploadParameters = CompleteFileUploadPathParameters;
4660
- export type CompleteFileUploadResponse = FileUploadObjectResponse;
4661
- /**
4662
- * Complete a multi-part file upload
4663
- */
4664
- export declare const completeFileUpload: {
4665
- readonly method: "post";
4666
- readonly pathParams: readonly ["file_upload_id"];
4667
- readonly queryParams: readonly [];
4668
- readonly bodyParams: readonly [];
4669
- readonly path: (p: CompleteFileUploadPathParameters) => string;
4670
- };
4671
- type GetFileUploadPathParameters = {
4672
- file_upload_id: IdRequest;
4673
- };
4674
- export type GetFileUploadParameters = GetFileUploadPathParameters;
4675
- export type GetFileUploadResponse = FileUploadObjectResponse;
4676
- /**
4677
- * Retrieve a file upload
4678
- */
4679
- export declare const getFileUpload: {
4680
- readonly method: "get";
4681
- readonly pathParams: readonly ["file_upload_id"];
4682
- readonly queryParams: readonly [];
4683
- readonly bodyParams: readonly [];
4684
- readonly path: (p: GetFileUploadPathParameters) => string;
4685
- };
4686
- type ListDatabaseViewsQueryParameters = {
4687
- database_id?: IdRequest;
4688
- data_source_id?: IdRequest;
4689
- start_cursor?: string;
4690
- page_size?: number;
4691
- };
4692
- export type ListDatabaseViewsParameters = ListDatabaseViewsQueryParameters;
4693
- export type ListDatabaseViewsResponse = {
4694
- object: "list";
4695
- next_cursor: IdResponse | null;
4696
- has_more: boolean;
4697
- results: Array<DataSourceViewReferenceResponse>;
4698
- type: "view";
4699
- view: EmptyObject;
4700
- };
4701
- /**
4702
- * List views
4703
- */
4704
- export declare const listDatabaseViews: {
4705
- readonly method: "get";
4706
- readonly pathParams: readonly [];
4707
- readonly queryParams: readonly ["database_id", "data_source_id", "start_cursor", "page_size"];
4708
- readonly bodyParams: readonly [];
4709
- readonly path: () => string;
4710
- };
4711
- type CreateViewBodyParameters = CreateViewRequest;
4712
- export type CreateViewParameters = CreateViewBodyParameters;
4713
- export type CreateViewResponse = PartialDataSourceViewObjectResponse | DataSourceViewObjectResponse;
4714
- /**
4715
- * Create a view
4716
- */
4717
- export declare const createView: {
4718
- readonly method: "post";
4719
- readonly pathParams: readonly [];
4720
- readonly queryParams: readonly [];
4721
- readonly bodyParams: readonly [];
4722
- readonly path: () => string;
4723
- };
4724
- type GetViewPathParameters = {
4725
- view_id: IdRequest;
4726
- };
4727
- export type GetViewParameters = GetViewPathParameters;
4728
- export type GetViewResponse = PartialDataSourceViewObjectResponse | DataSourceViewObjectResponse;
4729
- /**
4730
- * Retrieve a view
4731
- */
4732
- export declare const getView: {
4733
- readonly method: "get";
4734
- readonly pathParams: readonly ["view_id"];
4735
- readonly queryParams: readonly [];
4736
- readonly bodyParams: readonly [];
4737
- readonly path: (p: GetViewPathParameters) => string;
4738
- };
4739
- type UpdateViewPathParameters = {
4740
- view_id: IdRequest;
4741
- };
4742
- type UpdateViewBodyParameters = UpdateViewRequest;
4743
- export type UpdateViewParameters = UpdateViewPathParameters & UpdateViewBodyParameters;
4744
- export type UpdateViewResponse = PartialDataSourceViewObjectResponse | DataSourceViewObjectResponse;
4745
- /**
4746
- * Update a view
4747
- */
4748
- export declare const updateView: {
4749
- readonly method: "patch";
4750
- readonly pathParams: readonly ["view_id"];
4751
- readonly queryParams: readonly [];
4752
- readonly bodyParams: readonly [];
4753
- readonly path: (p: UpdateViewPathParameters) => string;
4754
- };
4755
- type DeleteViewPathParameters = {
4756
- view_id: IdRequest;
4757
- };
4758
- export type DeleteViewParameters = DeleteViewPathParameters;
4759
- export type DeleteViewResponse = PartialDataSourceViewObjectResponse;
4760
- /**
4761
- * Delete a view
4762
- */
4763
- export declare const deleteView: {
4764
- readonly method: "delete";
4765
- readonly pathParams: readonly ["view_id"];
4766
- readonly queryParams: readonly [];
4767
- readonly bodyParams: readonly [];
4768
- readonly path: (p: DeleteViewPathParameters) => string;
4769
- };
4770
- type CreateViewQueryPathParameters = {
4771
- view_id: IdRequest;
4772
- };
4773
- type CreateViewQueryBodyParameters = CreateViewQueryRequest;
4774
- export type CreateViewQueryParameters = CreateViewQueryPathParameters & CreateViewQueryBodyParameters;
4775
- export type CreateViewQueryResponse = ViewQueryResponse;
4776
- /**
4777
- * Create a view query
4778
- */
4779
- export declare const createViewQuery: {
4780
- readonly method: "post";
4781
- readonly pathParams: readonly ["view_id"];
4782
- readonly queryParams: readonly [];
4783
- readonly bodyParams: readonly [];
4784
- readonly path: (p: CreateViewQueryPathParameters) => string;
4785
- };
4786
- type GetViewQueryResultsPathParameters = {
4787
- view_id: IdRequest;
4788
- query_id: IdRequest;
4789
- };
4790
- type GetViewQueryResultsQueryParameters = {
4791
- start_cursor?: string;
4792
- page_size?: number;
4793
- };
4794
- export type GetViewQueryResultsParameters = GetViewQueryResultsPathParameters & GetViewQueryResultsQueryParameters;
4795
- export type GetViewQueryResultsResponse = {
4796
- object: "list";
4797
- next_cursor: IdResponse | null;
4798
- has_more: boolean;
4799
- results: Array<PartialPageObjectResponse>;
4800
- type: "page";
4801
- page: EmptyObject;
4802
- };
4803
- /**
4804
- * Get view query results
4805
- */
4806
- export declare const getViewQueryResults: {
4807
- readonly method: "get";
4808
- readonly pathParams: readonly ["view_id", "query_id"];
4809
- readonly queryParams: readonly ["start_cursor", "page_size"];
4810
- readonly bodyParams: readonly [];
4811
- readonly path: (p: GetViewQueryResultsPathParameters) => string;
4812
- };
4813
- type DeleteViewQueryPathParameters = {
4814
- view_id: IdRequest;
4815
- query_id: IdRequest;
4816
- };
4817
- export type DeleteViewQueryParameters = DeleteViewQueryPathParameters;
4818
- export type DeleteViewQueryResponse = DeletedViewQueryResponse;
4819
- /**
4820
- * Delete a view query
4821
- */
4822
- export declare const deleteViewQuery: {
4823
- readonly method: "delete";
4824
- readonly pathParams: readonly ["view_id", "query_id"];
4825
- readonly queryParams: readonly [];
4826
- readonly bodyParams: readonly [];
4827
- readonly path: (p: DeleteViewQueryPathParameters) => string;
4828
- };
4829
- type OauthTokenBodyParameters = {
4830
- grant_type: "authorization_code";
4831
- code: string;
4832
- redirect_uri?: string;
4833
- external_account?: {
4834
- key: string;
4835
- name: string;
4836
- };
4837
- } | {
4838
- grant_type: "refresh_token";
4839
- refresh_token: string;
4840
- };
4841
- export type OauthTokenParameters = OauthTokenBodyParameters;
4842
- export type OauthTokenResponse = {
4843
- access_token: string;
4844
- token_type: "bearer";
4845
- refresh_token: string | null;
4846
- bot_id: string;
4847
- workspace_icon: string | null;
4848
- workspace_name: string | null;
4849
- workspace_id: string;
4850
- owner: {
4851
- type: "user";
4852
- user: {
4853
- type: "person";
4854
- person: {
4855
- email: string;
4856
- };
4857
- name: string | null;
4858
- avatar_url: string | null;
4859
- id: IdRequest;
4860
- object: "user";
4861
- } | PartialUserObjectResponse;
4862
- } | {
4863
- type: "workspace";
4864
- workspace: true;
4865
- };
4866
- duplicated_template_id: string | null;
4867
- request_id?: string;
4868
- };
4869
- /**
4870
- * Exchange an authorization code for an access and refresh token
4871
- */
4872
- export declare const oauthToken: {
4873
- readonly method: "post";
4874
- readonly pathParams: readonly [];
4875
- readonly queryParams: readonly [];
4876
- readonly bodyParams: readonly ["grant_type", "code", "redirect_uri", "external_account", "refresh_token"];
4877
- readonly path: () => string;
4878
- };
4879
- type OauthRevokeBodyParameters = {
4880
- token: string;
4881
- };
4882
- export type OauthRevokeParameters = OauthRevokeBodyParameters;
4883
- export type OauthRevokeResponse = {
4884
- request_id?: string;
4885
- };
4886
- /**
4887
- * Revoke a token
4888
- */
4889
- export declare const oauthRevoke: {
4890
- readonly method: "post";
4891
- readonly pathParams: readonly [];
4892
- readonly queryParams: readonly [];
4893
- readonly bodyParams: readonly ["token"];
4894
- readonly path: () => string;
4895
- };
4896
- type OauthIntrospectBodyParameters = {
4897
- token: string;
4898
- };
4899
- export type OauthIntrospectParameters = OauthIntrospectBodyParameters;
4900
- export type OauthIntrospectResponse = {
4901
- active: boolean;
4902
- scope?: string;
4903
- iat?: number;
4904
- request_id?: string;
4905
- };
4906
- /**
4907
- * Introspect a token
4908
- */
4909
- export declare const oauthIntrospect: {
4910
- readonly method: "post";
4911
- readonly pathParams: readonly [];
4912
- readonly queryParams: readonly [];
4913
- readonly bodyParams: readonly ["token"];
4914
- readonly path: () => string;
4915
- };
4916
- 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";
4917
14
  //# sourceMappingURL=api-endpoints.d.ts.map