@notionhq/client 2.3.0 → 3.0.1

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.
@@ -1342,9 +1342,12 @@ export type ColumnListBlockObjectResponse = {
1342
1342
  archived: boolean;
1343
1343
  in_trash: boolean;
1344
1344
  };
1345
+ type ColumnResponse = {
1346
+ width_ratio?: number;
1347
+ };
1345
1348
  export type ColumnBlockObjectResponse = {
1346
1349
  type: "column";
1347
- column: EmptyObject;
1350
+ column: ColumnResponse;
1348
1351
  parent: {
1349
1352
  type: "database_id";
1350
1353
  database_id: string;
@@ -2131,6 +2134,22 @@ type RichTextItemRequest = {
2131
2134
  color?: "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";
2132
2135
  };
2133
2136
  };
2137
+ type InternalFileRequest = {
2138
+ url: string;
2139
+ expiry_time?: string;
2140
+ };
2141
+ type ExternalFileRequest = {
2142
+ url: TextRequest;
2143
+ };
2144
+ type InternalOrExternalFileWithNameRequest = {
2145
+ file: InternalFileRequest;
2146
+ name: StringRequest;
2147
+ type?: "file";
2148
+ } | {
2149
+ external: ExternalFileRequest;
2150
+ name: StringRequest;
2151
+ type?: "external";
2152
+ };
2134
2153
  export type BlockObjectRequestWithoutChildren = {
2135
2154
  embed: {
2136
2155
  url: string;
@@ -2147,9 +2166,7 @@ export type BlockObjectRequestWithoutChildren = {
2147
2166
  object?: "block";
2148
2167
  } | {
2149
2168
  image: {
2150
- external: {
2151
- url: TextRequest;
2152
- };
2169
+ external: ExternalFileRequest;
2153
2170
  type?: "external";
2154
2171
  caption?: Array<RichTextItemRequest>;
2155
2172
  };
@@ -2157,9 +2174,7 @@ export type BlockObjectRequestWithoutChildren = {
2157
2174
  object?: "block";
2158
2175
  } | {
2159
2176
  video: {
2160
- external: {
2161
- url: TextRequest;
2162
- };
2177
+ external: ExternalFileRequest;
2163
2178
  type?: "external";
2164
2179
  caption?: Array<RichTextItemRequest>;
2165
2180
  };
@@ -2167,9 +2182,7 @@ export type BlockObjectRequestWithoutChildren = {
2167
2182
  object?: "block";
2168
2183
  } | {
2169
2184
  pdf: {
2170
- external: {
2171
- url: TextRequest;
2172
- };
2185
+ external: ExternalFileRequest;
2173
2186
  type?: "external";
2174
2187
  caption?: Array<RichTextItemRequest>;
2175
2188
  };
@@ -2177,9 +2190,7 @@ export type BlockObjectRequestWithoutChildren = {
2177
2190
  object?: "block";
2178
2191
  } | {
2179
2192
  file: {
2180
- external: {
2181
- url: TextRequest;
2182
- };
2193
+ external: ExternalFileRequest;
2183
2194
  type?: "external";
2184
2195
  caption?: Array<RichTextItemRequest>;
2185
2196
  name?: StringRequest;
@@ -2188,9 +2199,7 @@ export type BlockObjectRequestWithoutChildren = {
2188
2199
  object?: "block";
2189
2200
  } | {
2190
2201
  audio: {
2191
- external: {
2192
- url: TextRequest;
2193
- };
2202
+ external: ExternalFileRequest;
2194
2203
  type?: "external";
2195
2204
  caption?: Array<RichTextItemRequest>;
2196
2205
  };
@@ -2323,9 +2332,7 @@ export type BlockObjectRequestWithoutChildren = {
2323
2332
  emoji: EmojiRequest;
2324
2333
  type?: "emoji";
2325
2334
  } | {
2326
- external: {
2327
- url: TextRequest;
2328
- };
2335
+ external: ExternalFileRequest;
2329
2336
  type?: "external";
2330
2337
  } | {
2331
2338
  custom_emoji: {
@@ -2349,6 +2356,250 @@ export type BlockObjectRequestWithoutChildren = {
2349
2356
  type?: "synced_block";
2350
2357
  object?: "block";
2351
2358
  };
2359
+ type ColumnWithChildrenRequest = {
2360
+ children: Array<{
2361
+ embed: {
2362
+ url: string;
2363
+ caption?: Array<RichTextItemRequest>;
2364
+ };
2365
+ type?: "embed";
2366
+ object?: "block";
2367
+ } | {
2368
+ bookmark: {
2369
+ url: string;
2370
+ caption?: Array<RichTextItemRequest>;
2371
+ };
2372
+ type?: "bookmark";
2373
+ object?: "block";
2374
+ } | {
2375
+ image: {
2376
+ external: ExternalFileRequest;
2377
+ type?: "external";
2378
+ caption?: Array<RichTextItemRequest>;
2379
+ };
2380
+ type?: "image";
2381
+ object?: "block";
2382
+ } | {
2383
+ video: {
2384
+ external: ExternalFileRequest;
2385
+ type?: "external";
2386
+ caption?: Array<RichTextItemRequest>;
2387
+ };
2388
+ type?: "video";
2389
+ object?: "block";
2390
+ } | {
2391
+ pdf: {
2392
+ external: ExternalFileRequest;
2393
+ type?: "external";
2394
+ caption?: Array<RichTextItemRequest>;
2395
+ };
2396
+ type?: "pdf";
2397
+ object?: "block";
2398
+ } | {
2399
+ file: {
2400
+ external: ExternalFileRequest;
2401
+ type?: "external";
2402
+ caption?: Array<RichTextItemRequest>;
2403
+ name?: StringRequest;
2404
+ };
2405
+ type?: "file";
2406
+ object?: "block";
2407
+ } | {
2408
+ audio: {
2409
+ external: ExternalFileRequest;
2410
+ type?: "external";
2411
+ caption?: Array<RichTextItemRequest>;
2412
+ };
2413
+ type?: "audio";
2414
+ object?: "block";
2415
+ } | {
2416
+ code: {
2417
+ rich_text: Array<RichTextItemRequest>;
2418
+ language: LanguageRequest;
2419
+ caption?: Array<RichTextItemRequest>;
2420
+ };
2421
+ type?: "code";
2422
+ object?: "block";
2423
+ } | {
2424
+ equation: {
2425
+ expression: string;
2426
+ };
2427
+ type?: "equation";
2428
+ object?: "block";
2429
+ } | {
2430
+ divider: EmptyObject;
2431
+ type?: "divider";
2432
+ object?: "block";
2433
+ } | {
2434
+ breadcrumb: EmptyObject;
2435
+ type?: "breadcrumb";
2436
+ object?: "block";
2437
+ } | {
2438
+ table_of_contents: {
2439
+ color?: ApiColor;
2440
+ };
2441
+ type?: "table_of_contents";
2442
+ object?: "block";
2443
+ } | {
2444
+ link_to_page: {
2445
+ page_id: IdRequest;
2446
+ type?: "page_id";
2447
+ } | {
2448
+ database_id: IdRequest;
2449
+ type?: "database_id";
2450
+ } | {
2451
+ comment_id: IdRequest;
2452
+ type?: "comment_id";
2453
+ };
2454
+ type?: "link_to_page";
2455
+ object?: "block";
2456
+ } | {
2457
+ table_row: {
2458
+ cells: Array<Array<RichTextItemRequest>>;
2459
+ };
2460
+ type?: "table_row";
2461
+ object?: "block";
2462
+ } | {
2463
+ heading_1: {
2464
+ rich_text: Array<RichTextItemRequest>;
2465
+ color?: ApiColor;
2466
+ is_toggleable?: boolean;
2467
+ children?: Array<BlockObjectRequestWithoutChildren>;
2468
+ };
2469
+ type?: "heading_1";
2470
+ object?: "block";
2471
+ } | {
2472
+ heading_2: {
2473
+ rich_text: Array<RichTextItemRequest>;
2474
+ color?: ApiColor;
2475
+ is_toggleable?: boolean;
2476
+ children?: Array<BlockObjectRequestWithoutChildren>;
2477
+ };
2478
+ type?: "heading_2";
2479
+ object?: "block";
2480
+ } | {
2481
+ heading_3: {
2482
+ rich_text: Array<RichTextItemRequest>;
2483
+ color?: ApiColor;
2484
+ is_toggleable?: boolean;
2485
+ children?: Array<BlockObjectRequestWithoutChildren>;
2486
+ };
2487
+ type?: "heading_3";
2488
+ object?: "block";
2489
+ } | {
2490
+ paragraph: {
2491
+ rich_text: Array<RichTextItemRequest>;
2492
+ color?: ApiColor;
2493
+ children?: Array<BlockObjectRequestWithoutChildren>;
2494
+ };
2495
+ type?: "paragraph";
2496
+ object?: "block";
2497
+ } | {
2498
+ bulleted_list_item: {
2499
+ rich_text: Array<RichTextItemRequest>;
2500
+ color?: ApiColor;
2501
+ children?: Array<BlockObjectRequestWithoutChildren>;
2502
+ };
2503
+ type?: "bulleted_list_item";
2504
+ object?: "block";
2505
+ } | {
2506
+ numbered_list_item: {
2507
+ rich_text: Array<RichTextItemRequest>;
2508
+ color?: ApiColor;
2509
+ children?: Array<BlockObjectRequestWithoutChildren>;
2510
+ };
2511
+ type?: "numbered_list_item";
2512
+ object?: "block";
2513
+ } | {
2514
+ quote: {
2515
+ rich_text: Array<RichTextItemRequest>;
2516
+ color?: ApiColor;
2517
+ children?: Array<BlockObjectRequestWithoutChildren>;
2518
+ };
2519
+ type?: "quote";
2520
+ object?: "block";
2521
+ } | {
2522
+ table: {
2523
+ table_width: number;
2524
+ children: Array<{
2525
+ table_row: {
2526
+ cells: Array<Array<RichTextItemRequest>>;
2527
+ };
2528
+ type?: "table_row";
2529
+ object?: "block";
2530
+ }>;
2531
+ has_column_header?: boolean;
2532
+ has_row_header?: boolean;
2533
+ };
2534
+ type?: "table";
2535
+ object?: "block";
2536
+ } | {
2537
+ to_do: {
2538
+ rich_text: Array<RichTextItemRequest>;
2539
+ color?: ApiColor;
2540
+ children?: Array<BlockObjectRequestWithoutChildren>;
2541
+ checked?: boolean;
2542
+ };
2543
+ type?: "to_do";
2544
+ object?: "block";
2545
+ } | {
2546
+ toggle: {
2547
+ rich_text: Array<RichTextItemRequest>;
2548
+ color?: ApiColor;
2549
+ children?: Array<BlockObjectRequestWithoutChildren>;
2550
+ };
2551
+ type?: "toggle";
2552
+ object?: "block";
2553
+ } | {
2554
+ template: {
2555
+ rich_text: Array<RichTextItemRequest>;
2556
+ children?: Array<BlockObjectRequestWithoutChildren>;
2557
+ };
2558
+ type?: "template";
2559
+ object?: "block";
2560
+ } | {
2561
+ callout: {
2562
+ rich_text: Array<RichTextItemRequest>;
2563
+ color?: ApiColor;
2564
+ children?: Array<BlockObjectRequestWithoutChildren>;
2565
+ icon?: {
2566
+ emoji: EmojiRequest;
2567
+ type?: "emoji";
2568
+ } | {
2569
+ external: ExternalFileRequest;
2570
+ type?: "external";
2571
+ } | {
2572
+ custom_emoji: {
2573
+ id: IdRequest;
2574
+ name?: string;
2575
+ url?: string;
2576
+ };
2577
+ type?: "custom_emoji";
2578
+ };
2579
+ };
2580
+ type?: "callout";
2581
+ object?: "block";
2582
+ } | {
2583
+ synced_block: {
2584
+ synced_from: {
2585
+ block_id: IdRequest;
2586
+ type?: "block_id";
2587
+ } | null;
2588
+ children?: Array<BlockObjectRequestWithoutChildren>;
2589
+ };
2590
+ type?: "synced_block";
2591
+ object?: "block";
2592
+ }>;
2593
+ width_ratio?: number;
2594
+ };
2595
+ type ColumnBlockWithChildrenRequest = {
2596
+ column: ColumnWithChildrenRequest;
2597
+ type?: "column";
2598
+ object?: "block";
2599
+ };
2600
+ type ColumnListRequest = {
2601
+ children: Array<ColumnBlockWithChildrenRequest>;
2602
+ };
2352
2603
  export type BlockObjectRequest = {
2353
2604
  embed: {
2354
2605
  url: string;
@@ -2365,9 +2616,7 @@ export type BlockObjectRequest = {
2365
2616
  object?: "block";
2366
2617
  } | {
2367
2618
  image: {
2368
- external: {
2369
- url: TextRequest;
2370
- };
2619
+ external: ExternalFileRequest;
2371
2620
  type?: "external";
2372
2621
  caption?: Array<RichTextItemRequest>;
2373
2622
  };
@@ -2375,9 +2624,7 @@ export type BlockObjectRequest = {
2375
2624
  object?: "block";
2376
2625
  } | {
2377
2626
  video: {
2378
- external: {
2379
- url: TextRequest;
2380
- };
2627
+ external: ExternalFileRequest;
2381
2628
  type?: "external";
2382
2629
  caption?: Array<RichTextItemRequest>;
2383
2630
  };
@@ -2385,9 +2632,7 @@ export type BlockObjectRequest = {
2385
2632
  object?: "block";
2386
2633
  } | {
2387
2634
  pdf: {
2388
- external: {
2389
- url: TextRequest;
2390
- };
2635
+ external: ExternalFileRequest;
2391
2636
  type?: "external";
2392
2637
  caption?: Array<RichTextItemRequest>;
2393
2638
  };
@@ -2395,9 +2640,7 @@ export type BlockObjectRequest = {
2395
2640
  object?: "block";
2396
2641
  } | {
2397
2642
  file: {
2398
- external: {
2399
- url: TextRequest;
2400
- };
2643
+ external: ExternalFileRequest;
2401
2644
  type?: "external";
2402
2645
  caption?: Array<RichTextItemRequest>;
2403
2646
  name?: StringRequest;
@@ -2406,9 +2649,7 @@ export type BlockObjectRequest = {
2406
2649
  object?: "block";
2407
2650
  } | {
2408
2651
  audio: {
2409
- external: {
2410
- url: TextRequest;
2411
- };
2652
+ external: ExternalFileRequest;
2412
2653
  type?: "external";
2413
2654
  caption?: Array<RichTextItemRequest>;
2414
2655
  };
@@ -2418,568 +2659,70 @@ export type BlockObjectRequest = {
2418
2659
  code: {
2419
2660
  rich_text: Array<RichTextItemRequest>;
2420
2661
  language: LanguageRequest;
2421
- caption?: Array<RichTextItemRequest>;
2422
- };
2423
- type?: "code";
2424
- object?: "block";
2425
- } | {
2426
- equation: {
2427
- expression: string;
2428
- };
2429
- type?: "equation";
2430
- object?: "block";
2431
- } | {
2432
- divider: EmptyObject;
2433
- type?: "divider";
2434
- object?: "block";
2435
- } | {
2436
- breadcrumb: EmptyObject;
2437
- type?: "breadcrumb";
2438
- object?: "block";
2439
- } | {
2440
- table_of_contents: {
2441
- color?: ApiColor;
2442
- };
2443
- type?: "table_of_contents";
2444
- object?: "block";
2445
- } | {
2446
- link_to_page: {
2447
- page_id: IdRequest;
2448
- type?: "page_id";
2449
- } | {
2450
- database_id: IdRequest;
2451
- type?: "database_id";
2452
- } | {
2453
- comment_id: IdRequest;
2454
- type?: "comment_id";
2455
- };
2456
- type?: "link_to_page";
2457
- object?: "block";
2458
- } | {
2459
- table_row: {
2460
- cells: Array<Array<RichTextItemRequest>>;
2461
- };
2462
- type?: "table_row";
2463
- object?: "block";
2464
- } | {
2465
- table: {
2466
- table_width: number;
2467
- children: Array<{
2468
- table_row: {
2469
- cells: Array<Array<RichTextItemRequest>>;
2470
- };
2471
- type?: "table_row";
2472
- object?: "block";
2473
- }>;
2474
- has_column_header?: boolean;
2475
- has_row_header?: boolean;
2476
- };
2477
- type?: "table";
2478
- object?: "block";
2479
- } | {
2480
- column_list: {
2481
- children: Array<{
2482
- column: {
2483
- children: Array<{
2484
- embed: {
2485
- url: string;
2486
- caption?: Array<RichTextItemRequest>;
2487
- };
2488
- type?: "embed";
2489
- object?: "block";
2490
- } | {
2491
- bookmark: {
2492
- url: string;
2493
- caption?: Array<RichTextItemRequest>;
2494
- };
2495
- type?: "bookmark";
2496
- object?: "block";
2497
- } | {
2498
- image: {
2499
- external: {
2500
- url: TextRequest;
2501
- };
2502
- type?: "external";
2503
- caption?: Array<RichTextItemRequest>;
2504
- };
2505
- type?: "image";
2506
- object?: "block";
2507
- } | {
2508
- video: {
2509
- external: {
2510
- url: TextRequest;
2511
- };
2512
- type?: "external";
2513
- caption?: Array<RichTextItemRequest>;
2514
- };
2515
- type?: "video";
2516
- object?: "block";
2517
- } | {
2518
- pdf: {
2519
- external: {
2520
- url: TextRequest;
2521
- };
2522
- type?: "external";
2523
- caption?: Array<RichTextItemRequest>;
2524
- };
2525
- type?: "pdf";
2526
- object?: "block";
2527
- } | {
2528
- file: {
2529
- external: {
2530
- url: TextRequest;
2531
- };
2532
- type?: "external";
2533
- caption?: Array<RichTextItemRequest>;
2534
- name?: StringRequest;
2535
- };
2536
- type?: "file";
2537
- object?: "block";
2538
- } | {
2539
- audio: {
2540
- external: {
2541
- url: TextRequest;
2542
- };
2543
- type?: "external";
2544
- caption?: Array<RichTextItemRequest>;
2545
- };
2546
- type?: "audio";
2547
- object?: "block";
2548
- } | {
2549
- code: {
2550
- rich_text: Array<RichTextItemRequest>;
2551
- language: LanguageRequest;
2552
- caption?: Array<RichTextItemRequest>;
2553
- };
2554
- type?: "code";
2555
- object?: "block";
2556
- } | {
2557
- equation: {
2558
- expression: string;
2559
- };
2560
- type?: "equation";
2561
- object?: "block";
2562
- } | {
2563
- divider: EmptyObject;
2564
- type?: "divider";
2565
- object?: "block";
2566
- } | {
2567
- breadcrumb: EmptyObject;
2568
- type?: "breadcrumb";
2569
- object?: "block";
2570
- } | {
2571
- table_of_contents: {
2572
- color?: ApiColor;
2573
- };
2574
- type?: "table_of_contents";
2575
- object?: "block";
2576
- } | {
2577
- link_to_page: {
2578
- page_id: IdRequest;
2579
- type?: "page_id";
2580
- } | {
2581
- database_id: IdRequest;
2582
- type?: "database_id";
2583
- } | {
2584
- comment_id: IdRequest;
2585
- type?: "comment_id";
2586
- };
2587
- type?: "link_to_page";
2588
- object?: "block";
2589
- } | {
2590
- table_row: {
2591
- cells: Array<Array<RichTextItemRequest>>;
2592
- };
2593
- type?: "table_row";
2594
- object?: "block";
2595
- } | {
2596
- heading_1: {
2597
- rich_text: Array<RichTextItemRequest>;
2598
- color?: ApiColor;
2599
- is_toggleable?: boolean;
2600
- children?: Array<BlockObjectRequestWithoutChildren>;
2601
- };
2602
- type?: "heading_1";
2603
- object?: "block";
2604
- } | {
2605
- heading_2: {
2606
- rich_text: Array<RichTextItemRequest>;
2607
- color?: ApiColor;
2608
- is_toggleable?: boolean;
2609
- children?: Array<BlockObjectRequestWithoutChildren>;
2610
- };
2611
- type?: "heading_2";
2612
- object?: "block";
2613
- } | {
2614
- heading_3: {
2615
- rich_text: Array<RichTextItemRequest>;
2616
- color?: ApiColor;
2617
- is_toggleable?: boolean;
2618
- children?: Array<BlockObjectRequestWithoutChildren>;
2619
- };
2620
- type?: "heading_3";
2621
- object?: "block";
2622
- } | {
2623
- paragraph: {
2624
- rich_text: Array<RichTextItemRequest>;
2625
- color?: ApiColor;
2626
- children?: Array<BlockObjectRequestWithoutChildren>;
2627
- };
2628
- type?: "paragraph";
2629
- object?: "block";
2630
- } | {
2631
- bulleted_list_item: {
2632
- rich_text: Array<RichTextItemRequest>;
2633
- color?: ApiColor;
2634
- children?: Array<BlockObjectRequestWithoutChildren>;
2635
- };
2636
- type?: "bulleted_list_item";
2637
- object?: "block";
2638
- } | {
2639
- numbered_list_item: {
2640
- rich_text: Array<RichTextItemRequest>;
2641
- color?: ApiColor;
2642
- children?: Array<BlockObjectRequestWithoutChildren>;
2643
- };
2644
- type?: "numbered_list_item";
2645
- object?: "block";
2646
- } | {
2647
- quote: {
2648
- rich_text: Array<RichTextItemRequest>;
2649
- color?: ApiColor;
2650
- children?: Array<BlockObjectRequestWithoutChildren>;
2651
- };
2652
- type?: "quote";
2653
- object?: "block";
2654
- } | {
2655
- table: {
2656
- table_width: number;
2657
- children: Array<{
2658
- table_row: {
2659
- cells: Array<Array<RichTextItemRequest>>;
2660
- };
2661
- type?: "table_row";
2662
- object?: "block";
2663
- }>;
2664
- has_column_header?: boolean;
2665
- has_row_header?: boolean;
2666
- };
2667
- type?: "table";
2668
- object?: "block";
2669
- } | {
2670
- to_do: {
2671
- rich_text: Array<RichTextItemRequest>;
2672
- color?: ApiColor;
2673
- children?: Array<BlockObjectRequestWithoutChildren>;
2674
- checked?: boolean;
2675
- };
2676
- type?: "to_do";
2677
- object?: "block";
2678
- } | {
2679
- toggle: {
2680
- rich_text: Array<RichTextItemRequest>;
2681
- color?: ApiColor;
2682
- children?: Array<BlockObjectRequestWithoutChildren>;
2683
- };
2684
- type?: "toggle";
2685
- object?: "block";
2686
- } | {
2687
- template: {
2688
- rich_text: Array<RichTextItemRequest>;
2689
- children?: Array<BlockObjectRequestWithoutChildren>;
2690
- };
2691
- type?: "template";
2692
- object?: "block";
2693
- } | {
2694
- callout: {
2695
- rich_text: Array<RichTextItemRequest>;
2696
- color?: ApiColor;
2697
- children?: Array<BlockObjectRequestWithoutChildren>;
2698
- icon?: {
2699
- emoji: EmojiRequest;
2700
- type?: "emoji";
2701
- } | {
2702
- external: {
2703
- url: TextRequest;
2704
- };
2705
- type?: "external";
2706
- } | {
2707
- custom_emoji: {
2708
- id: IdRequest;
2709
- name?: string;
2710
- url?: string;
2711
- };
2712
- type?: "custom_emoji";
2713
- };
2714
- };
2715
- type?: "callout";
2716
- object?: "block";
2717
- } | {
2718
- synced_block: {
2719
- synced_from: {
2720
- block_id: IdRequest;
2721
- type?: "block_id";
2722
- } | null;
2723
- children?: Array<BlockObjectRequestWithoutChildren>;
2724
- };
2725
- type?: "synced_block";
2726
- object?: "block";
2727
- }>;
2728
- };
2729
- type?: "column";
2730
- object?: "block";
2731
- }>;
2732
- };
2733
- type?: "column_list";
2734
- object?: "block";
2735
- } | {
2736
- column: {
2737
- children: Array<{
2738
- embed: {
2739
- url: string;
2740
- caption?: Array<RichTextItemRequest>;
2741
- };
2742
- type?: "embed";
2743
- object?: "block";
2744
- } | {
2745
- bookmark: {
2746
- url: string;
2747
- caption?: Array<RichTextItemRequest>;
2748
- };
2749
- type?: "bookmark";
2750
- object?: "block";
2751
- } | {
2752
- image: {
2753
- external: {
2754
- url: TextRequest;
2755
- };
2756
- type?: "external";
2757
- caption?: Array<RichTextItemRequest>;
2758
- };
2759
- type?: "image";
2760
- object?: "block";
2761
- } | {
2762
- video: {
2763
- external: {
2764
- url: TextRequest;
2765
- };
2766
- type?: "external";
2767
- caption?: Array<RichTextItemRequest>;
2768
- };
2769
- type?: "video";
2770
- object?: "block";
2771
- } | {
2772
- pdf: {
2773
- external: {
2774
- url: TextRequest;
2775
- };
2776
- type?: "external";
2777
- caption?: Array<RichTextItemRequest>;
2778
- };
2779
- type?: "pdf";
2780
- object?: "block";
2781
- } | {
2782
- file: {
2783
- external: {
2784
- url: TextRequest;
2785
- };
2786
- type?: "external";
2787
- caption?: Array<RichTextItemRequest>;
2788
- name?: StringRequest;
2789
- };
2790
- type?: "file";
2791
- object?: "block";
2792
- } | {
2793
- audio: {
2794
- external: {
2795
- url: TextRequest;
2796
- };
2797
- type?: "external";
2798
- caption?: Array<RichTextItemRequest>;
2799
- };
2800
- type?: "audio";
2801
- object?: "block";
2802
- } | {
2803
- code: {
2804
- rich_text: Array<RichTextItemRequest>;
2805
- language: LanguageRequest;
2806
- caption?: Array<RichTextItemRequest>;
2807
- };
2808
- type?: "code";
2809
- object?: "block";
2810
- } | {
2811
- equation: {
2812
- expression: string;
2813
- };
2814
- type?: "equation";
2815
- object?: "block";
2816
- } | {
2817
- divider: EmptyObject;
2818
- type?: "divider";
2819
- object?: "block";
2820
- } | {
2821
- breadcrumb: EmptyObject;
2822
- type?: "breadcrumb";
2823
- object?: "block";
2824
- } | {
2825
- table_of_contents: {
2826
- color?: ApiColor;
2827
- };
2828
- type?: "table_of_contents";
2829
- object?: "block";
2830
- } | {
2831
- link_to_page: {
2832
- page_id: IdRequest;
2833
- type?: "page_id";
2834
- } | {
2835
- database_id: IdRequest;
2836
- type?: "database_id";
2837
- } | {
2838
- comment_id: IdRequest;
2839
- type?: "comment_id";
2840
- };
2841
- type?: "link_to_page";
2842
- object?: "block";
2843
- } | {
2844
- table_row: {
2845
- cells: Array<Array<RichTextItemRequest>>;
2846
- };
2847
- type?: "table_row";
2848
- object?: "block";
2849
- } | {
2850
- heading_1: {
2851
- rich_text: Array<RichTextItemRequest>;
2852
- color?: ApiColor;
2853
- is_toggleable?: boolean;
2854
- children?: Array<BlockObjectRequestWithoutChildren>;
2855
- };
2856
- type?: "heading_1";
2857
- object?: "block";
2858
- } | {
2859
- heading_2: {
2860
- rich_text: Array<RichTextItemRequest>;
2861
- color?: ApiColor;
2862
- is_toggleable?: boolean;
2863
- children?: Array<BlockObjectRequestWithoutChildren>;
2864
- };
2865
- type?: "heading_2";
2866
- object?: "block";
2867
- } | {
2868
- heading_3: {
2869
- rich_text: Array<RichTextItemRequest>;
2870
- color?: ApiColor;
2871
- is_toggleable?: boolean;
2872
- children?: Array<BlockObjectRequestWithoutChildren>;
2873
- };
2874
- type?: "heading_3";
2875
- object?: "block";
2876
- } | {
2877
- paragraph: {
2878
- rich_text: Array<RichTextItemRequest>;
2879
- color?: ApiColor;
2880
- children?: Array<BlockObjectRequestWithoutChildren>;
2881
- };
2882
- type?: "paragraph";
2883
- object?: "block";
2884
- } | {
2885
- bulleted_list_item: {
2886
- rich_text: Array<RichTextItemRequest>;
2887
- color?: ApiColor;
2888
- children?: Array<BlockObjectRequestWithoutChildren>;
2889
- };
2890
- type?: "bulleted_list_item";
2891
- object?: "block";
2892
- } | {
2893
- numbered_list_item: {
2894
- rich_text: Array<RichTextItemRequest>;
2895
- color?: ApiColor;
2896
- children?: Array<BlockObjectRequestWithoutChildren>;
2897
- };
2898
- type?: "numbered_list_item";
2899
- object?: "block";
2900
- } | {
2901
- quote: {
2902
- rich_text: Array<RichTextItemRequest>;
2903
- color?: ApiColor;
2904
- children?: Array<BlockObjectRequestWithoutChildren>;
2905
- };
2906
- type?: "quote";
2907
- object?: "block";
2908
- } | {
2909
- table: {
2910
- table_width: number;
2911
- children: Array<{
2912
- table_row: {
2913
- cells: Array<Array<RichTextItemRequest>>;
2914
- };
2915
- type?: "table_row";
2916
- object?: "block";
2917
- }>;
2918
- has_column_header?: boolean;
2919
- has_row_header?: boolean;
2920
- };
2921
- type?: "table";
2922
- object?: "block";
2923
- } | {
2924
- to_do: {
2925
- rich_text: Array<RichTextItemRequest>;
2926
- color?: ApiColor;
2927
- children?: Array<BlockObjectRequestWithoutChildren>;
2928
- checked?: boolean;
2929
- };
2930
- type?: "to_do";
2931
- object?: "block";
2932
- } | {
2933
- toggle: {
2934
- rich_text: Array<RichTextItemRequest>;
2935
- color?: ApiColor;
2936
- children?: Array<BlockObjectRequestWithoutChildren>;
2937
- };
2938
- type?: "toggle";
2939
- object?: "block";
2940
- } | {
2941
- template: {
2942
- rich_text: Array<RichTextItemRequest>;
2943
- children?: Array<BlockObjectRequestWithoutChildren>;
2944
- };
2945
- type?: "template";
2946
- object?: "block";
2947
- } | {
2948
- callout: {
2949
- rich_text: Array<RichTextItemRequest>;
2950
- color?: ApiColor;
2951
- children?: Array<BlockObjectRequestWithoutChildren>;
2952
- icon?: {
2953
- emoji: EmojiRequest;
2954
- type?: "emoji";
2955
- } | {
2956
- external: {
2957
- url: TextRequest;
2958
- };
2959
- type?: "external";
2960
- } | {
2961
- custom_emoji: {
2962
- id: IdRequest;
2963
- name?: string;
2964
- url?: string;
2965
- };
2966
- type?: "custom_emoji";
2967
- };
2968
- };
2969
- type?: "callout";
2970
- object?: "block";
2971
- } | {
2972
- synced_block: {
2973
- synced_from: {
2974
- block_id: IdRequest;
2975
- type?: "block_id";
2976
- } | null;
2977
- children?: Array<BlockObjectRequestWithoutChildren>;
2662
+ caption?: Array<RichTextItemRequest>;
2663
+ };
2664
+ type?: "code";
2665
+ object?: "block";
2666
+ } | {
2667
+ equation: {
2668
+ expression: string;
2669
+ };
2670
+ type?: "equation";
2671
+ object?: "block";
2672
+ } | {
2673
+ divider: EmptyObject;
2674
+ type?: "divider";
2675
+ object?: "block";
2676
+ } | {
2677
+ breadcrumb: EmptyObject;
2678
+ type?: "breadcrumb";
2679
+ object?: "block";
2680
+ } | {
2681
+ table_of_contents: {
2682
+ color?: ApiColor;
2683
+ };
2684
+ type?: "table_of_contents";
2685
+ object?: "block";
2686
+ } | {
2687
+ link_to_page: {
2688
+ page_id: IdRequest;
2689
+ type?: "page_id";
2690
+ } | {
2691
+ database_id: IdRequest;
2692
+ type?: "database_id";
2693
+ } | {
2694
+ comment_id: IdRequest;
2695
+ type?: "comment_id";
2696
+ };
2697
+ type?: "link_to_page";
2698
+ object?: "block";
2699
+ } | {
2700
+ table_row: {
2701
+ cells: Array<Array<RichTextItemRequest>>;
2702
+ };
2703
+ type?: "table_row";
2704
+ object?: "block";
2705
+ } | {
2706
+ table: {
2707
+ table_width: number;
2708
+ children: Array<{
2709
+ table_row: {
2710
+ cells: Array<Array<RichTextItemRequest>>;
2978
2711
  };
2979
- type?: "synced_block";
2712
+ type?: "table_row";
2980
2713
  object?: "block";
2981
2714
  }>;
2715
+ has_column_header?: boolean;
2716
+ has_row_header?: boolean;
2982
2717
  };
2718
+ type?: "table";
2719
+ object?: "block";
2720
+ } | {
2721
+ column_list: ColumnListRequest;
2722
+ type?: "column_list";
2723
+ object?: "block";
2724
+ } | {
2725
+ column: ColumnWithChildrenRequest;
2983
2726
  type?: "column";
2984
2727
  object?: "block";
2985
2728
  } | {
@@ -3003,9 +2746,7 @@ export type BlockObjectRequest = {
3003
2746
  object?: "block";
3004
2747
  } | {
3005
2748
  image: {
3006
- external: {
3007
- url: TextRequest;
3008
- };
2749
+ external: ExternalFileRequest;
3009
2750
  type?: "external";
3010
2751
  caption?: Array<RichTextItemRequest>;
3011
2752
  };
@@ -3013,9 +2754,7 @@ export type BlockObjectRequest = {
3013
2754
  object?: "block";
3014
2755
  } | {
3015
2756
  video: {
3016
- external: {
3017
- url: TextRequest;
3018
- };
2757
+ external: ExternalFileRequest;
3019
2758
  type?: "external";
3020
2759
  caption?: Array<RichTextItemRequest>;
3021
2760
  };
@@ -3023,9 +2762,7 @@ export type BlockObjectRequest = {
3023
2762
  object?: "block";
3024
2763
  } | {
3025
2764
  pdf: {
3026
- external: {
3027
- url: TextRequest;
3028
- };
2765
+ external: ExternalFileRequest;
3029
2766
  type?: "external";
3030
2767
  caption?: Array<RichTextItemRequest>;
3031
2768
  };
@@ -3033,9 +2770,7 @@ export type BlockObjectRequest = {
3033
2770
  object?: "block";
3034
2771
  } | {
3035
2772
  file: {
3036
- external: {
3037
- url: TextRequest;
3038
- };
2773
+ external: ExternalFileRequest;
3039
2774
  type?: "external";
3040
2775
  caption?: Array<RichTextItemRequest>;
3041
2776
  name?: StringRequest;
@@ -3044,9 +2779,7 @@ export type BlockObjectRequest = {
3044
2779
  object?: "block";
3045
2780
  } | {
3046
2781
  audio: {
3047
- external: {
3048
- url: TextRequest;
3049
- };
2782
+ external: ExternalFileRequest;
3050
2783
  type?: "external";
3051
2784
  caption?: Array<RichTextItemRequest>;
3052
2785
  };
@@ -3206,9 +2939,7 @@ export type BlockObjectRequest = {
3206
2939
  emoji: EmojiRequest;
3207
2940
  type?: "emoji";
3208
2941
  } | {
3209
- external: {
3210
- url: TextRequest;
3211
- };
2942
+ external: ExternalFileRequest;
3212
2943
  type?: "external";
3213
2944
  } | {
3214
2945
  custom_emoji: {
@@ -3256,9 +2987,7 @@ export type BlockObjectRequest = {
3256
2987
  object?: "block";
3257
2988
  } | {
3258
2989
  image: {
3259
- external: {
3260
- url: TextRequest;
3261
- };
2990
+ external: ExternalFileRequest;
3262
2991
  type?: "external";
3263
2992
  caption?: Array<RichTextItemRequest>;
3264
2993
  };
@@ -3266,9 +2995,7 @@ export type BlockObjectRequest = {
3266
2995
  object?: "block";
3267
2996
  } | {
3268
2997
  video: {
3269
- external: {
3270
- url: TextRequest;
3271
- };
2998
+ external: ExternalFileRequest;
3272
2999
  type?: "external";
3273
3000
  caption?: Array<RichTextItemRequest>;
3274
3001
  };
@@ -3276,9 +3003,7 @@ export type BlockObjectRequest = {
3276
3003
  object?: "block";
3277
3004
  } | {
3278
3005
  pdf: {
3279
- external: {
3280
- url: TextRequest;
3281
- };
3006
+ external: ExternalFileRequest;
3282
3007
  type?: "external";
3283
3008
  caption?: Array<RichTextItemRequest>;
3284
3009
  };
@@ -3286,9 +3011,7 @@ export type BlockObjectRequest = {
3286
3011
  object?: "block";
3287
3012
  } | {
3288
3013
  file: {
3289
- external: {
3290
- url: TextRequest;
3291
- };
3014
+ external: ExternalFileRequest;
3292
3015
  type?: "external";
3293
3016
  caption?: Array<RichTextItemRequest>;
3294
3017
  name?: StringRequest;
@@ -3297,9 +3020,7 @@ export type BlockObjectRequest = {
3297
3020
  object?: "block";
3298
3021
  } | {
3299
3022
  audio: {
3300
- external: {
3301
- url: TextRequest;
3302
- };
3023
+ external: ExternalFileRequest;
3303
3024
  type?: "external";
3304
3025
  caption?: Array<RichTextItemRequest>;
3305
3026
  };
@@ -3459,9 +3180,7 @@ export type BlockObjectRequest = {
3459
3180
  emoji: EmojiRequest;
3460
3181
  type?: "emoji";
3461
3182
  } | {
3462
- external: {
3463
- url: TextRequest;
3464
- };
3183
+ external: ExternalFileRequest;
3465
3184
  type?: "external";
3466
3185
  } | {
3467
3186
  custom_emoji: {
@@ -3509,9 +3228,7 @@ export type BlockObjectRequest = {
3509
3228
  object?: "block";
3510
3229
  } | {
3511
3230
  image: {
3512
- external: {
3513
- url: TextRequest;
3514
- };
3231
+ external: ExternalFileRequest;
3515
3232
  type?: "external";
3516
3233
  caption?: Array<RichTextItemRequest>;
3517
3234
  };
@@ -3519,9 +3236,7 @@ export type BlockObjectRequest = {
3519
3236
  object?: "block";
3520
3237
  } | {
3521
3238
  video: {
3522
- external: {
3523
- url: TextRequest;
3524
- };
3239
+ external: ExternalFileRequest;
3525
3240
  type?: "external";
3526
3241
  caption?: Array<RichTextItemRequest>;
3527
3242
  };
@@ -3529,9 +3244,7 @@ export type BlockObjectRequest = {
3529
3244
  object?: "block";
3530
3245
  } | {
3531
3246
  pdf: {
3532
- external: {
3533
- url: TextRequest;
3534
- };
3247
+ external: ExternalFileRequest;
3535
3248
  type?: "external";
3536
3249
  caption?: Array<RichTextItemRequest>;
3537
3250
  };
@@ -3539,9 +3252,7 @@ export type BlockObjectRequest = {
3539
3252
  object?: "block";
3540
3253
  } | {
3541
3254
  file: {
3542
- external: {
3543
- url: TextRequest;
3544
- };
3255
+ external: ExternalFileRequest;
3545
3256
  type?: "external";
3546
3257
  caption?: Array<RichTextItemRequest>;
3547
3258
  name?: StringRequest;
@@ -3550,9 +3261,7 @@ export type BlockObjectRequest = {
3550
3261
  object?: "block";
3551
3262
  } | {
3552
3263
  audio: {
3553
- external: {
3554
- url: TextRequest;
3555
- };
3264
+ external: ExternalFileRequest;
3556
3265
  type?: "external";
3557
3266
  caption?: Array<RichTextItemRequest>;
3558
3267
  };
@@ -3712,9 +3421,7 @@ export type BlockObjectRequest = {
3712
3421
  emoji: EmojiRequest;
3713
3422
  type?: "emoji";
3714
3423
  } | {
3715
- external: {
3716
- url: TextRequest;
3717
- };
3424
+ external: ExternalFileRequest;
3718
3425
  type?: "external";
3719
3426
  } | {
3720
3427
  custom_emoji: {
@@ -3761,9 +3468,7 @@ export type BlockObjectRequest = {
3761
3468
  object?: "block";
3762
3469
  } | {
3763
3470
  image: {
3764
- external: {
3765
- url: TextRequest;
3766
- };
3471
+ external: ExternalFileRequest;
3767
3472
  type?: "external";
3768
3473
  caption?: Array<RichTextItemRequest>;
3769
3474
  };
@@ -3771,9 +3476,7 @@ export type BlockObjectRequest = {
3771
3476
  object?: "block";
3772
3477
  } | {
3773
3478
  video: {
3774
- external: {
3775
- url: TextRequest;
3776
- };
3479
+ external: ExternalFileRequest;
3777
3480
  type?: "external";
3778
3481
  caption?: Array<RichTextItemRequest>;
3779
3482
  };
@@ -3781,9 +3484,7 @@ export type BlockObjectRequest = {
3781
3484
  object?: "block";
3782
3485
  } | {
3783
3486
  pdf: {
3784
- external: {
3785
- url: TextRequest;
3786
- };
3487
+ external: ExternalFileRequest;
3787
3488
  type?: "external";
3788
3489
  caption?: Array<RichTextItemRequest>;
3789
3490
  };
@@ -3791,9 +3492,7 @@ export type BlockObjectRequest = {
3791
3492
  object?: "block";
3792
3493
  } | {
3793
3494
  file: {
3794
- external: {
3795
- url: TextRequest;
3796
- };
3495
+ external: ExternalFileRequest;
3797
3496
  type?: "external";
3798
3497
  caption?: Array<RichTextItemRequest>;
3799
3498
  name?: StringRequest;
@@ -3802,9 +3501,7 @@ export type BlockObjectRequest = {
3802
3501
  object?: "block";
3803
3502
  } | {
3804
3503
  audio: {
3805
- external: {
3806
- url: TextRequest;
3807
- };
3504
+ external: ExternalFileRequest;
3808
3505
  type?: "external";
3809
3506
  caption?: Array<RichTextItemRequest>;
3810
3507
  };
@@ -3964,9 +3661,7 @@ export type BlockObjectRequest = {
3964
3661
  emoji: EmojiRequest;
3965
3662
  type?: "emoji";
3966
3663
  } | {
3967
- external: {
3968
- url: TextRequest;
3969
- };
3664
+ external: ExternalFileRequest;
3970
3665
  type?: "external";
3971
3666
  } | {
3972
3667
  custom_emoji: {
@@ -4013,9 +3708,7 @@ export type BlockObjectRequest = {
4013
3708
  object?: "block";
4014
3709
  } | {
4015
3710
  image: {
4016
- external: {
4017
- url: TextRequest;
4018
- };
3711
+ external: ExternalFileRequest;
4019
3712
  type?: "external";
4020
3713
  caption?: Array<RichTextItemRequest>;
4021
3714
  };
@@ -4023,9 +3716,7 @@ export type BlockObjectRequest = {
4023
3716
  object?: "block";
4024
3717
  } | {
4025
3718
  video: {
4026
- external: {
4027
- url: TextRequest;
4028
- };
3719
+ external: ExternalFileRequest;
4029
3720
  type?: "external";
4030
3721
  caption?: Array<RichTextItemRequest>;
4031
3722
  };
@@ -4033,9 +3724,7 @@ export type BlockObjectRequest = {
4033
3724
  object?: "block";
4034
3725
  } | {
4035
3726
  pdf: {
4036
- external: {
4037
- url: TextRequest;
4038
- };
3727
+ external: ExternalFileRequest;
4039
3728
  type?: "external";
4040
3729
  caption?: Array<RichTextItemRequest>;
4041
3730
  };
@@ -4043,9 +3732,7 @@ export type BlockObjectRequest = {
4043
3732
  object?: "block";
4044
3733
  } | {
4045
3734
  file: {
4046
- external: {
4047
- url: TextRequest;
4048
- };
3735
+ external: ExternalFileRequest;
4049
3736
  type?: "external";
4050
3737
  caption?: Array<RichTextItemRequest>;
4051
3738
  name?: StringRequest;
@@ -4054,9 +3741,7 @@ export type BlockObjectRequest = {
4054
3741
  object?: "block";
4055
3742
  } | {
4056
3743
  audio: {
4057
- external: {
4058
- url: TextRequest;
4059
- };
3744
+ external: ExternalFileRequest;
4060
3745
  type?: "external";
4061
3746
  caption?: Array<RichTextItemRequest>;
4062
3747
  };
@@ -4216,9 +3901,7 @@ export type BlockObjectRequest = {
4216
3901
  emoji: EmojiRequest;
4217
3902
  type?: "emoji";
4218
3903
  } | {
4219
- external: {
4220
- url: TextRequest;
4221
- };
3904
+ external: ExternalFileRequest;
4222
3905
  type?: "external";
4223
3906
  } | {
4224
3907
  custom_emoji: {
@@ -4265,9 +3948,7 @@ export type BlockObjectRequest = {
4265
3948
  object?: "block";
4266
3949
  } | {
4267
3950
  image: {
4268
- external: {
4269
- url: TextRequest;
4270
- };
3951
+ external: ExternalFileRequest;
4271
3952
  type?: "external";
4272
3953
  caption?: Array<RichTextItemRequest>;
4273
3954
  };
@@ -4275,9 +3956,7 @@ export type BlockObjectRequest = {
4275
3956
  object?: "block";
4276
3957
  } | {
4277
3958
  video: {
4278
- external: {
4279
- url: TextRequest;
4280
- };
3959
+ external: ExternalFileRequest;
4281
3960
  type?: "external";
4282
3961
  caption?: Array<RichTextItemRequest>;
4283
3962
  };
@@ -4285,9 +3964,7 @@ export type BlockObjectRequest = {
4285
3964
  object?: "block";
4286
3965
  } | {
4287
3966
  pdf: {
4288
- external: {
4289
- url: TextRequest;
4290
- };
3967
+ external: ExternalFileRequest;
4291
3968
  type?: "external";
4292
3969
  caption?: Array<RichTextItemRequest>;
4293
3970
  };
@@ -4295,9 +3972,7 @@ export type BlockObjectRequest = {
4295
3972
  object?: "block";
4296
3973
  } | {
4297
3974
  file: {
4298
- external: {
4299
- url: TextRequest;
4300
- };
3975
+ external: ExternalFileRequest;
4301
3976
  type?: "external";
4302
3977
  caption?: Array<RichTextItemRequest>;
4303
3978
  name?: StringRequest;
@@ -4306,9 +3981,7 @@ export type BlockObjectRequest = {
4306
3981
  object?: "block";
4307
3982
  } | {
4308
3983
  audio: {
4309
- external: {
4310
- url: TextRequest;
4311
- };
3984
+ external: ExternalFileRequest;
4312
3985
  type?: "external";
4313
3986
  caption?: Array<RichTextItemRequest>;
4314
3987
  };
@@ -4468,9 +4141,7 @@ export type BlockObjectRequest = {
4468
4141
  emoji: EmojiRequest;
4469
4142
  type?: "emoji";
4470
4143
  } | {
4471
- external: {
4472
- url: TextRequest;
4473
- };
4144
+ external: ExternalFileRequest;
4474
4145
  type?: "external";
4475
4146
  } | {
4476
4147
  custom_emoji: {
@@ -4517,9 +4188,7 @@ export type BlockObjectRequest = {
4517
4188
  object?: "block";
4518
4189
  } | {
4519
4190
  image: {
4520
- external: {
4521
- url: TextRequest;
4522
- };
4191
+ external: ExternalFileRequest;
4523
4192
  type?: "external";
4524
4193
  caption?: Array<RichTextItemRequest>;
4525
4194
  };
@@ -4527,9 +4196,7 @@ export type BlockObjectRequest = {
4527
4196
  object?: "block";
4528
4197
  } | {
4529
4198
  video: {
4530
- external: {
4531
- url: TextRequest;
4532
- };
4199
+ external: ExternalFileRequest;
4533
4200
  type?: "external";
4534
4201
  caption?: Array<RichTextItemRequest>;
4535
4202
  };
@@ -4537,9 +4204,7 @@ export type BlockObjectRequest = {
4537
4204
  object?: "block";
4538
4205
  } | {
4539
4206
  pdf: {
4540
- external: {
4541
- url: TextRequest;
4542
- };
4207
+ external: ExternalFileRequest;
4543
4208
  type?: "external";
4544
4209
  caption?: Array<RichTextItemRequest>;
4545
4210
  };
@@ -4547,9 +4212,7 @@ export type BlockObjectRequest = {
4547
4212
  object?: "block";
4548
4213
  } | {
4549
4214
  file: {
4550
- external: {
4551
- url: TextRequest;
4552
- };
4215
+ external: ExternalFileRequest;
4553
4216
  type?: "external";
4554
4217
  caption?: Array<RichTextItemRequest>;
4555
4218
  name?: StringRequest;
@@ -4558,9 +4221,7 @@ export type BlockObjectRequest = {
4558
4221
  object?: "block";
4559
4222
  } | {
4560
4223
  audio: {
4561
- external: {
4562
- url: TextRequest;
4563
- };
4224
+ external: ExternalFileRequest;
4564
4225
  type?: "external";
4565
4226
  caption?: Array<RichTextItemRequest>;
4566
4227
  };
@@ -4720,9 +4381,7 @@ export type BlockObjectRequest = {
4720
4381
  emoji: EmojiRequest;
4721
4382
  type?: "emoji";
4722
4383
  } | {
4723
- external: {
4724
- url: TextRequest;
4725
- };
4384
+ external: ExternalFileRequest;
4726
4385
  type?: "external";
4727
4386
  } | {
4728
4387
  custom_emoji: {
@@ -4769,9 +4428,7 @@ export type BlockObjectRequest = {
4769
4428
  object?: "block";
4770
4429
  } | {
4771
4430
  image: {
4772
- external: {
4773
- url: TextRequest;
4774
- };
4431
+ external: ExternalFileRequest;
4775
4432
  type?: "external";
4776
4433
  caption?: Array<RichTextItemRequest>;
4777
4434
  };
@@ -4779,9 +4436,7 @@ export type BlockObjectRequest = {
4779
4436
  object?: "block";
4780
4437
  } | {
4781
4438
  video: {
4782
- external: {
4783
- url: TextRequest;
4784
- };
4439
+ external: ExternalFileRequest;
4785
4440
  type?: "external";
4786
4441
  caption?: Array<RichTextItemRequest>;
4787
4442
  };
@@ -4789,9 +4444,7 @@ export type BlockObjectRequest = {
4789
4444
  object?: "block";
4790
4445
  } | {
4791
4446
  pdf: {
4792
- external: {
4793
- url: TextRequest;
4794
- };
4447
+ external: ExternalFileRequest;
4795
4448
  type?: "external";
4796
4449
  caption?: Array<RichTextItemRequest>;
4797
4450
  };
@@ -4799,9 +4452,7 @@ export type BlockObjectRequest = {
4799
4452
  object?: "block";
4800
4453
  } | {
4801
4454
  file: {
4802
- external: {
4803
- url: TextRequest;
4804
- };
4455
+ external: ExternalFileRequest;
4805
4456
  type?: "external";
4806
4457
  caption?: Array<RichTextItemRequest>;
4807
4458
  name?: StringRequest;
@@ -4810,9 +4461,7 @@ export type BlockObjectRequest = {
4810
4461
  object?: "block";
4811
4462
  } | {
4812
4463
  audio: {
4813
- external: {
4814
- url: TextRequest;
4815
- };
4464
+ external: ExternalFileRequest;
4816
4465
  type?: "external";
4817
4466
  caption?: Array<RichTextItemRequest>;
4818
4467
  };
@@ -4972,9 +4621,7 @@ export type BlockObjectRequest = {
4972
4621
  emoji: EmojiRequest;
4973
4622
  type?: "emoji";
4974
4623
  } | {
4975
- external: {
4976
- url: TextRequest;
4977
- };
4624
+ external: ExternalFileRequest;
4978
4625
  type?: "external";
4979
4626
  } | {
4980
4627
  custom_emoji: {
@@ -5022,9 +4669,7 @@ export type BlockObjectRequest = {
5022
4669
  object?: "block";
5023
4670
  } | {
5024
4671
  image: {
5025
- external: {
5026
- url: TextRequest;
5027
- };
4672
+ external: ExternalFileRequest;
5028
4673
  type?: "external";
5029
4674
  caption?: Array<RichTextItemRequest>;
5030
4675
  };
@@ -5032,9 +4677,7 @@ export type BlockObjectRequest = {
5032
4677
  object?: "block";
5033
4678
  } | {
5034
4679
  video: {
5035
- external: {
5036
- url: TextRequest;
5037
- };
4680
+ external: ExternalFileRequest;
5038
4681
  type?: "external";
5039
4682
  caption?: Array<RichTextItemRequest>;
5040
4683
  };
@@ -5042,9 +4685,7 @@ export type BlockObjectRequest = {
5042
4685
  object?: "block";
5043
4686
  } | {
5044
4687
  pdf: {
5045
- external: {
5046
- url: TextRequest;
5047
- };
4688
+ external: ExternalFileRequest;
5048
4689
  type?: "external";
5049
4690
  caption?: Array<RichTextItemRequest>;
5050
4691
  };
@@ -5052,9 +4693,7 @@ export type BlockObjectRequest = {
5052
4693
  object?: "block";
5053
4694
  } | {
5054
4695
  file: {
5055
- external: {
5056
- url: TextRequest;
5057
- };
4696
+ external: ExternalFileRequest;
5058
4697
  type?: "external";
5059
4698
  caption?: Array<RichTextItemRequest>;
5060
4699
  name?: StringRequest;
@@ -5063,9 +4702,7 @@ export type BlockObjectRequest = {
5063
4702
  object?: "block";
5064
4703
  } | {
5065
4704
  audio: {
5066
- external: {
5067
- url: TextRequest;
5068
- };
4705
+ external: ExternalFileRequest;
5069
4706
  type?: "external";
5070
4707
  caption?: Array<RichTextItemRequest>;
5071
4708
  };
@@ -5225,9 +4862,7 @@ export type BlockObjectRequest = {
5225
4862
  emoji: EmojiRequest;
5226
4863
  type?: "emoji";
5227
4864
  } | {
5228
- external: {
5229
- url: TextRequest;
5230
- };
4865
+ external: ExternalFileRequest;
5231
4866
  type?: "external";
5232
4867
  } | {
5233
4868
  custom_emoji: {
@@ -5273,9 +4908,7 @@ export type BlockObjectRequest = {
5273
4908
  object?: "block";
5274
4909
  } | {
5275
4910
  image: {
5276
- external: {
5277
- url: TextRequest;
5278
- };
4911
+ external: ExternalFileRequest;
5279
4912
  type?: "external";
5280
4913
  caption?: Array<RichTextItemRequest>;
5281
4914
  };
@@ -5283,9 +4916,7 @@ export type BlockObjectRequest = {
5283
4916
  object?: "block";
5284
4917
  } | {
5285
4918
  video: {
5286
- external: {
5287
- url: TextRequest;
5288
- };
4919
+ external: ExternalFileRequest;
5289
4920
  type?: "external";
5290
4921
  caption?: Array<RichTextItemRequest>;
5291
4922
  };
@@ -5293,9 +4924,7 @@ export type BlockObjectRequest = {
5293
4924
  object?: "block";
5294
4925
  } | {
5295
4926
  pdf: {
5296
- external: {
5297
- url: TextRequest;
5298
- };
4927
+ external: ExternalFileRequest;
5299
4928
  type?: "external";
5300
4929
  caption?: Array<RichTextItemRequest>;
5301
4930
  };
@@ -5303,9 +4932,7 @@ export type BlockObjectRequest = {
5303
4932
  object?: "block";
5304
4933
  } | {
5305
4934
  file: {
5306
- external: {
5307
- url: TextRequest;
5308
- };
4935
+ external: ExternalFileRequest;
5309
4936
  type?: "external";
5310
4937
  caption?: Array<RichTextItemRequest>;
5311
4938
  name?: StringRequest;
@@ -5314,9 +4941,7 @@ export type BlockObjectRequest = {
5314
4941
  object?: "block";
5315
4942
  } | {
5316
4943
  audio: {
5317
- external: {
5318
- url: TextRequest;
5319
- };
4944
+ external: ExternalFileRequest;
5320
4945
  type?: "external";
5321
4946
  caption?: Array<RichTextItemRequest>;
5322
4947
  };
@@ -5476,9 +5101,7 @@ export type BlockObjectRequest = {
5476
5101
  emoji: EmojiRequest;
5477
5102
  type?: "emoji";
5478
5103
  } | {
5479
- external: {
5480
- url: TextRequest;
5481
- };
5104
+ external: ExternalFileRequest;
5482
5105
  type?: "external";
5483
5106
  } | {
5484
5107
  custom_emoji: {
@@ -5525,9 +5148,7 @@ export type BlockObjectRequest = {
5525
5148
  object?: "block";
5526
5149
  } | {
5527
5150
  image: {
5528
- external: {
5529
- url: TextRequest;
5530
- };
5151
+ external: ExternalFileRequest;
5531
5152
  type?: "external";
5532
5153
  caption?: Array<RichTextItemRequest>;
5533
5154
  };
@@ -5535,9 +5156,7 @@ export type BlockObjectRequest = {
5535
5156
  object?: "block";
5536
5157
  } | {
5537
5158
  video: {
5538
- external: {
5539
- url: TextRequest;
5540
- };
5159
+ external: ExternalFileRequest;
5541
5160
  type?: "external";
5542
5161
  caption?: Array<RichTextItemRequest>;
5543
5162
  };
@@ -5545,9 +5164,7 @@ export type BlockObjectRequest = {
5545
5164
  object?: "block";
5546
5165
  } | {
5547
5166
  pdf: {
5548
- external: {
5549
- url: TextRequest;
5550
- };
5167
+ external: ExternalFileRequest;
5551
5168
  type?: "external";
5552
5169
  caption?: Array<RichTextItemRequest>;
5553
5170
  };
@@ -5555,9 +5172,7 @@ export type BlockObjectRequest = {
5555
5172
  object?: "block";
5556
5173
  } | {
5557
5174
  file: {
5558
- external: {
5559
- url: TextRequest;
5560
- };
5175
+ external: ExternalFileRequest;
5561
5176
  type?: "external";
5562
5177
  caption?: Array<RichTextItemRequest>;
5563
5178
  name?: StringRequest;
@@ -5566,9 +5181,7 @@ export type BlockObjectRequest = {
5566
5181
  object?: "block";
5567
5182
  } | {
5568
5183
  audio: {
5569
- external: {
5570
- url: TextRequest;
5571
- };
5184
+ external: ExternalFileRequest;
5572
5185
  type?: "external";
5573
5186
  caption?: Array<RichTextItemRequest>;
5574
5187
  };
@@ -5728,9 +5341,7 @@ export type BlockObjectRequest = {
5728
5341
  emoji: EmojiRequest;
5729
5342
  type?: "emoji";
5730
5343
  } | {
5731
- external: {
5732
- url: TextRequest;
5733
- };
5344
+ external: ExternalFileRequest;
5734
5345
  type?: "external";
5735
5346
  } | {
5736
5347
  custom_emoji: {
@@ -5758,9 +5369,7 @@ export type BlockObjectRequest = {
5758
5369
  emoji: EmojiRequest;
5759
5370
  type?: "emoji";
5760
5371
  } | {
5761
- external: {
5762
- url: TextRequest;
5763
- };
5372
+ external: ExternalFileRequest;
5764
5373
  type?: "external";
5765
5374
  } | {
5766
5375
  custom_emoji: {
@@ -5795,9 +5404,7 @@ export type BlockObjectRequest = {
5795
5404
  object?: "block";
5796
5405
  } | {
5797
5406
  image: {
5798
- external: {
5799
- url: TextRequest;
5800
- };
5407
+ external: ExternalFileRequest;
5801
5408
  type?: "external";
5802
5409
  caption?: Array<RichTextItemRequest>;
5803
5410
  };
@@ -5805,9 +5412,7 @@ export type BlockObjectRequest = {
5805
5412
  object?: "block";
5806
5413
  } | {
5807
5414
  video: {
5808
- external: {
5809
- url: TextRequest;
5810
- };
5415
+ external: ExternalFileRequest;
5811
5416
  type?: "external";
5812
5417
  caption?: Array<RichTextItemRequest>;
5813
5418
  };
@@ -5815,9 +5420,7 @@ export type BlockObjectRequest = {
5815
5420
  object?: "block";
5816
5421
  } | {
5817
5422
  pdf: {
5818
- external: {
5819
- url: TextRequest;
5820
- };
5423
+ external: ExternalFileRequest;
5821
5424
  type?: "external";
5822
5425
  caption?: Array<RichTextItemRequest>;
5823
5426
  };
@@ -5825,9 +5428,7 @@ export type BlockObjectRequest = {
5825
5428
  object?: "block";
5826
5429
  } | {
5827
5430
  file: {
5828
- external: {
5829
- url: TextRequest;
5830
- };
5431
+ external: ExternalFileRequest;
5831
5432
  type?: "external";
5832
5433
  caption?: Array<RichTextItemRequest>;
5833
5434
  name?: StringRequest;
@@ -5836,9 +5437,7 @@ export type BlockObjectRequest = {
5836
5437
  object?: "block";
5837
5438
  } | {
5838
5439
  audio: {
5839
- external: {
5840
- url: TextRequest;
5841
- };
5440
+ external: ExternalFileRequest;
5842
5441
  type?: "external";
5843
5442
  caption?: Array<RichTextItemRequest>;
5844
5443
  };
@@ -5998,9 +5597,7 @@ export type BlockObjectRequest = {
5998
5597
  emoji: EmojiRequest;
5999
5598
  type?: "emoji";
6000
5599
  } | {
6001
- external: {
6002
- url: TextRequest;
6003
- };
5600
+ external: ExternalFileRequest;
6004
5601
  type?: "external";
6005
5602
  } | {
6006
5603
  custom_emoji: {
@@ -6394,20 +5991,7 @@ type CreatePageBodyParameters = {
6394
5991
  }>;
6395
5992
  type?: "relation";
6396
5993
  } | {
6397
- files: Array<{
6398
- file: {
6399
- url: string;
6400
- expiry_time?: string;
6401
- };
6402
- name: StringRequest;
6403
- type?: "file";
6404
- } | {
6405
- external: {
6406
- url: TextRequest;
6407
- };
6408
- name: StringRequest;
6409
- type?: "external";
6410
- }>;
5994
+ files: Array<InternalOrExternalFileWithNameRequest>;
6411
5995
  type?: "files";
6412
5996
  } | {
6413
5997
  status: {
@@ -6480,20 +6064,7 @@ type CreatePageBodyParameters = {
6480
6064
  object?: "user";
6481
6065
  }> | StringRequest | null | StringRequest | null | DateRequest | null | boolean | Array<{
6482
6066
  id: IdRequest;
6483
- }> | Array<{
6484
- file: {
6485
- url: string;
6486
- expiry_time?: string;
6487
- };
6488
- name: StringRequest;
6489
- type?: "file";
6490
- } | {
6491
- external: {
6492
- url: TextRequest;
6493
- };
6494
- name: StringRequest;
6495
- type?: "external";
6496
- }> | {
6067
+ }> | Array<InternalOrExternalFileWithNameRequest> | {
6497
6068
  id: StringRequest;
6498
6069
  name?: StringRequest;
6499
6070
  color?: SelectColor;
@@ -6508,9 +6079,7 @@ type CreatePageBodyParameters = {
6508
6079
  emoji: EmojiRequest;
6509
6080
  type?: "emoji";
6510
6081
  } | null | {
6511
- external: {
6512
- url: TextRequest;
6513
- };
6082
+ external: ExternalFileRequest;
6514
6083
  type?: "external";
6515
6084
  } | null | {
6516
6085
  custom_emoji: {
@@ -6521,9 +6090,7 @@ type CreatePageBodyParameters = {
6521
6090
  type?: "custom_emoji";
6522
6091
  } | null;
6523
6092
  cover?: {
6524
- external: {
6525
- url: TextRequest;
6526
- };
6093
+ external: ExternalFileRequest;
6527
6094
  type?: "external";
6528
6095
  } | null;
6529
6096
  content?: Array<BlockObjectRequest>;
@@ -6652,20 +6219,7 @@ type UpdatePageBodyParameters = {
6652
6219
  }>;
6653
6220
  type?: "relation";
6654
6221
  } | {
6655
- files: Array<{
6656
- file: {
6657
- url: string;
6658
- expiry_time?: string;
6659
- };
6660
- name: StringRequest;
6661
- type?: "file";
6662
- } | {
6663
- external: {
6664
- url: TextRequest;
6665
- };
6666
- name: StringRequest;
6667
- type?: "external";
6668
- }>;
6222
+ files: Array<InternalOrExternalFileWithNameRequest>;
6669
6223
  type?: "files";
6670
6224
  } | {
6671
6225
  status: {
@@ -6738,20 +6292,7 @@ type UpdatePageBodyParameters = {
6738
6292
  object?: "user";
6739
6293
  }> | StringRequest | null | StringRequest | null | DateRequest | null | boolean | Array<{
6740
6294
  id: IdRequest;
6741
- }> | Array<{
6742
- file: {
6743
- url: string;
6744
- expiry_time?: string;
6745
- };
6746
- name: StringRequest;
6747
- type?: "file";
6748
- } | {
6749
- external: {
6750
- url: TextRequest;
6751
- };
6752
- name: StringRequest;
6753
- type?: "external";
6754
- }> | {
6295
+ }> | Array<InternalOrExternalFileWithNameRequest> | {
6755
6296
  id: StringRequest;
6756
6297
  name?: StringRequest;
6757
6298
  color?: SelectColor;
@@ -6766,9 +6307,7 @@ type UpdatePageBodyParameters = {
6766
6307
  emoji: EmojiRequest;
6767
6308
  type?: "emoji";
6768
6309
  } | null | {
6769
- external: {
6770
- url: TextRequest;
6771
- };
6310
+ external: ExternalFileRequest;
6772
6311
  type?: "external";
6773
6312
  } | null | {
6774
6313
  custom_emoji: {
@@ -6779,9 +6318,7 @@ type UpdatePageBodyParameters = {
6779
6318
  type?: "custom_emoji";
6780
6319
  } | null;
6781
6320
  cover?: {
6782
- external: {
6783
- url: TextRequest;
6784
- };
6321
+ external: ExternalFileRequest;
6785
6322
  type?: "external";
6786
6323
  } | null;
6787
6324
  archived?: boolean;
@@ -6847,9 +6384,7 @@ type UpdateBlockBodyParameters = {
6847
6384
  } | {
6848
6385
  image: {
6849
6386
  caption?: Array<RichTextItemRequest>;
6850
- external?: {
6851
- url: TextRequest;
6852
- };
6387
+ external?: ExternalFileRequest;
6853
6388
  };
6854
6389
  type?: "image";
6855
6390
  archived?: boolean;
@@ -6857,9 +6392,7 @@ type UpdateBlockBodyParameters = {
6857
6392
  } | {
6858
6393
  video: {
6859
6394
  caption?: Array<RichTextItemRequest>;
6860
- external?: {
6861
- url: TextRequest;
6862
- };
6395
+ external?: ExternalFileRequest;
6863
6396
  };
6864
6397
  type?: "video";
6865
6398
  archived?: boolean;
@@ -6867,9 +6400,7 @@ type UpdateBlockBodyParameters = {
6867
6400
  } | {
6868
6401
  pdf: {
6869
6402
  caption?: Array<RichTextItemRequest>;
6870
- external?: {
6871
- url: TextRequest;
6872
- };
6403
+ external?: ExternalFileRequest;
6873
6404
  };
6874
6405
  type?: "pdf";
6875
6406
  archived?: boolean;
@@ -6877,9 +6408,7 @@ type UpdateBlockBodyParameters = {
6877
6408
  } | {
6878
6409
  file: {
6879
6410
  caption?: Array<RichTextItemRequest>;
6880
- external?: {
6881
- url: TextRequest;
6882
- };
6411
+ external?: ExternalFileRequest;
6883
6412
  name?: StringRequest;
6884
6413
  };
6885
6414
  type?: "file";
@@ -6888,9 +6417,7 @@ type UpdateBlockBodyParameters = {
6888
6417
  } | {
6889
6418
  audio: {
6890
6419
  caption?: Array<RichTextItemRequest>;
6891
- external?: {
6892
- url: TextRequest;
6893
- };
6420
+ external?: ExternalFileRequest;
6894
6421
  };
6895
6422
  type?: "audio";
6896
6423
  archived?: boolean;
@@ -7039,9 +6566,7 @@ type UpdateBlockBodyParameters = {
7039
6566
  emoji: EmojiRequest;
7040
6567
  type?: "emoji";
7041
6568
  } | {
7042
- external: {
7043
- url: TextRequest;
7044
- };
6569
+ external: ExternalFileRequest;
7045
6570
  type?: "external";
7046
6571
  } | {
7047
6572
  custom_emoji: {
@@ -7074,6 +6599,13 @@ type UpdateBlockBodyParameters = {
7074
6599
  type?: "table";
7075
6600
  archived?: boolean;
7076
6601
  in_trash?: boolean;
6602
+ } | {
6603
+ column: {
6604
+ width_ratio?: number;
6605
+ };
6606
+ type?: "column";
6607
+ archived?: boolean;
6608
+ in_trash?: boolean;
7077
6609
  } | {
7078
6610
  archived?: boolean;
7079
6611
  in_trash?: boolean;
@@ -7084,7 +6616,7 @@ export declare const updateBlock: {
7084
6616
  readonly method: "patch";
7085
6617
  readonly pathParams: readonly ["block_id"];
7086
6618
  readonly queryParams: readonly [];
7087
- readonly bodyParams: readonly ["embed", "type", "archived", "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"];
6619
+ readonly bodyParams: readonly ["embed", "type", "archived", "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"];
7088
6620
  readonly path: (p: UpdateBlockPathParameters) => string;
7089
6621
  };
7090
6622
  type DeleteBlockPathParameters = {
@@ -7167,9 +6699,7 @@ type UpdateDatabaseBodyParameters = {
7167
6699
  emoji: EmojiRequest;
7168
6700
  type?: "emoji";
7169
6701
  } | null | {
7170
- external: {
7171
- url: TextRequest;
7172
- };
6702
+ external: ExternalFileRequest;
7173
6703
  type?: "external";
7174
6704
  } | null | {
7175
6705
  custom_emoji: {
@@ -7180,9 +6710,7 @@ type UpdateDatabaseBodyParameters = {
7180
6710
  type?: "custom_emoji";
7181
6711
  } | null;
7182
6712
  cover?: {
7183
- external: {
7184
- url: TextRequest;
7185
- };
6713
+ external: ExternalFileRequest;
7186
6714
  type?: "external";
7187
6715
  } | null;
7188
6716
  properties?: Record<string, {
@@ -7574,9 +7102,7 @@ type CreateDatabaseBodyParameters = {
7574
7102
  emoji: EmojiRequest;
7575
7103
  type?: "emoji";
7576
7104
  } | null | {
7577
- external: {
7578
- url: TextRequest;
7579
- };
7105
+ external: ExternalFileRequest;
7580
7106
  type?: "external";
7581
7107
  } | null | {
7582
7108
  custom_emoji: {
@@ -7587,9 +7113,7 @@ type CreateDatabaseBodyParameters = {
7587
7113
  type?: "custom_emoji";
7588
7114
  } | null;
7589
7115
  cover?: {
7590
- external: {
7591
- url: TextRequest;
7592
- };
7116
+ external: ExternalFileRequest;
7593
7117
  type?: "external";
7594
7118
  } | null;
7595
7119
  title?: Array<RichTextItemRequest>;
@@ -7640,6 +7164,12 @@ type CreateCommentBodyParameters = {
7640
7164
  type?: "page_id";
7641
7165
  };
7642
7166
  rich_text: Array<RichTextItemRequest>;
7167
+ } | {
7168
+ parent: {
7169
+ block_id: IdRequest;
7170
+ type?: "block_id";
7171
+ };
7172
+ rich_text: Array<RichTextItemRequest>;
7643
7173
  } | {
7644
7174
  discussion_id: IdRequest;
7645
7175
  rich_text: Array<RichTextItemRequest>;