@notionhq/custom-blocks 0.2.23 → 0.3.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 (77) hide show
  1. package/README.md +8 -5
  2. package/dist/bridge/SandboxBridge.d.ts +15 -14
  3. package/dist/bridge/SandboxBridge.d.ts.map +1 -1
  4. package/dist/bridge/SandboxBridge.js +117 -35
  5. package/dist/bridge/dataSources/resolve.d.ts +1 -3
  6. package/dist/bridge/dataSources/resolve.d.ts.map +1 -1
  7. package/dist/bridge/dataSources/resolve.js +1 -11
  8. package/dist/bridge/dataSources/resolveProperty.d.ts +3 -3
  9. package/dist/bridge/dataSources/resolveProperty.d.ts.map +1 -1
  10. package/dist/bridge/dataSources/resolveProperty.js +1 -1
  11. package/dist/bridge/dataSources/subscribe.d.ts +2 -1
  12. package/dist/bridge/dataSources/subscribe.d.ts.map +1 -1
  13. package/dist/bridge/dataSources/subscribe.js +6 -1
  14. package/dist/bridge/hostState.d.ts +11 -39
  15. package/dist/bridge/hostState.d.ts.map +1 -1
  16. package/dist/bridge/hostState.js +5 -50
  17. package/dist/bridge/page.d.ts +14 -0
  18. package/dist/bridge/page.d.ts.map +1 -0
  19. package/dist/bridge/page.js +59 -0
  20. package/dist/bridge/sandboxClient.d.ts +8 -14
  21. package/dist/bridge/sandboxClient.d.ts.map +1 -1
  22. package/dist/bridge/sandboxClient.js +13 -21
  23. package/dist/dataSources.d.ts +8 -0
  24. package/dist/dataSources.d.ts.map +1 -0
  25. package/dist/dataSources.js +103 -0
  26. package/dist/index.d.ts +6 -6
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +3 -2
  29. package/dist/protocol/dataSources/dataSourcePage.d.ts +3 -5
  30. package/dist/protocol/dataSources/dataSourcePage.js +2 -3
  31. package/dist/protocol/dataSources/propertySchema.d.ts +1 -0
  32. package/dist/protocol/index.d.ts +1 -0
  33. package/dist/protocol/index.js +1 -0
  34. package/dist/protocol/messages/createPage.d.ts +28 -0
  35. package/dist/protocol/messages/createPageResult.d.ts +496 -1
  36. package/dist/protocol/messages/createPageResult.js +17 -2
  37. package/dist/protocol/messages/getPage.d.ts +496 -1
  38. package/dist/protocol/messages/getPage.js +18 -3
  39. package/dist/protocol/messages/hostToSandbox.d.ts +2647 -154
  40. package/dist/protocol/messages/hostToSandbox.js +24 -12
  41. package/dist/protocol/messages/openExternalUrl.d.ts +32 -0
  42. package/dist/protocol/messages/openExternalUrl.js +26 -0
  43. package/dist/protocol/messages/queryDataSourceResult.d.ts +468 -1
  44. package/dist/protocol/messages/queryDataSourceResult.js +18 -2
  45. package/dist/protocol/messages/sandboxToHost.d.ts +62 -0
  46. package/dist/protocol/messages/sandboxToHost.js +2 -0
  47. package/dist/protocol/messages/updatePage.d.ts +29 -0
  48. package/dist/protocol/messages/updatePage.js +2 -1
  49. package/dist/protocol/messages/updatePageResult.d.ts +495 -1
  50. package/dist/protocol/messages/updatePageResult.js +16 -2
  51. package/dist/protocol/pages/page.d.ts +470 -3
  52. package/dist/protocol/pages/page.js +53 -1
  53. package/dist/protocol/protocolVersion.d.ts +2 -1
  54. package/dist/protocol/protocolVersion.js +4 -1
  55. package/dist/react/useDataSource.d.ts +1 -1
  56. package/dist/react/useDataSource.d.ts.map +1 -1
  57. package/dist/react/useDataSource.js +1 -3
  58. package/dist/types.d.ts +55 -96
  59. package/dist/types.d.ts.map +1 -1
  60. package/dist/version.js +1 -1
  61. package/docs/block-location.md +3 -3
  62. package/docs/data-sources.md +159 -122
  63. package/docs/errors.md +9 -9
  64. package/docs/links.md +44 -0
  65. package/docs/pages.md +121 -191
  66. package/package.json +1 -1
  67. package/src/bridge/SandboxBridge.ts +189 -62
  68. package/src/bridge/dataSources/resolve.ts +1 -20
  69. package/src/bridge/dataSources/resolveProperty.ts +4 -4
  70. package/src/bridge/dataSources/subscribe.ts +10 -5
  71. package/src/bridge/hostState.ts +21 -100
  72. package/src/bridge/page.ts +90 -0
  73. package/src/bridge/sandboxClient.ts +15 -25
  74. package/src/dataSources.ts +140 -0
  75. package/src/index.ts +9 -19
  76. package/src/react/useDataSource.ts +1 -3
  77. package/src/types.ts +61 -109
@@ -283,6 +283,34 @@ export declare const notionPagePropertyValueSchema: v.VariantSchema<"type", [v.O
283
283
  readonly aws_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
284
284
  readonly google_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
285
285
  }, undefined>, undefined>;
286
+ }, undefined>, v.ObjectSchema<{
287
+ readonly id: v.StringSchema<undefined>;
288
+ readonly type: v.LiteralSchema<"created_time", undefined>;
289
+ readonly created_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
290
+ }, undefined>, v.ObjectSchema<{
291
+ readonly id: v.StringSchema<undefined>;
292
+ readonly type: v.LiteralSchema<"last_edited_time", undefined>;
293
+ readonly last_edited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
294
+ }, undefined>, v.ObjectSchema<{
295
+ readonly id: v.StringSchema<undefined>;
296
+ readonly type: v.LiteralSchema<"created_by", undefined>;
297
+ readonly created_by: v.NullableSchema<v.ObjectSchema<{
298
+ readonly id: v.StringSchema<undefined>;
299
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
300
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
301
+ }, undefined>, undefined>;
302
+ }, undefined>, v.ObjectSchema<{
303
+ readonly id: v.StringSchema<undefined>;
304
+ readonly type: v.LiteralSchema<"last_edited_by", undefined>;
305
+ readonly last_edited_by: v.NullableSchema<v.ObjectSchema<{
306
+ readonly id: v.StringSchema<undefined>;
307
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
308
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
309
+ }, undefined>, undefined>;
310
+ }, undefined>, v.ObjectSchema<{
311
+ readonly id: v.StringSchema<undefined>;
312
+ readonly type: v.LiteralSchema<"last_visited_time", undefined>;
313
+ readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
286
314
  }, undefined>], undefined>;
287
315
  export type NotionPagePropertyValue = v.InferOutput<typeof notionPagePropertyValueSchema>;
288
316
  export declare const notionPagePropertyWriteMapSchema: v.RecordSchema<v.StringSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
@@ -409,12 +437,423 @@ export declare const notionPagePropertyWriteMapSchema: v.RecordSchema<v.StringSc
409
437
  readonly aws_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
410
438
  readonly google_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
411
439
  }, undefined>, undefined>;
440
+ }, undefined>, v.ObjectSchema<{
441
+ readonly id: v.StringSchema<undefined>;
442
+ readonly type: v.LiteralSchema<"created_time", undefined>;
443
+ readonly created_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
444
+ }, undefined>, v.ObjectSchema<{
445
+ readonly id: v.StringSchema<undefined>;
446
+ readonly type: v.LiteralSchema<"last_edited_time", undefined>;
447
+ readonly last_edited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
448
+ }, undefined>, v.ObjectSchema<{
449
+ readonly id: v.StringSchema<undefined>;
450
+ readonly type: v.LiteralSchema<"created_by", undefined>;
451
+ readonly created_by: v.NullableSchema<v.ObjectSchema<{
452
+ readonly id: v.StringSchema<undefined>;
453
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
454
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
455
+ }, undefined>, undefined>;
456
+ }, undefined>, v.ObjectSchema<{
457
+ readonly id: v.StringSchema<undefined>;
458
+ readonly type: v.LiteralSchema<"last_edited_by", undefined>;
459
+ readonly last_edited_by: v.NullableSchema<v.ObjectSchema<{
460
+ readonly id: v.StringSchema<undefined>;
461
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
462
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
463
+ }, undefined>, undefined>;
464
+ }, undefined>, v.ObjectSchema<{
465
+ readonly id: v.StringSchema<undefined>;
466
+ readonly type: v.LiteralSchema<"last_visited_time", undefined>;
467
+ readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
412
468
  }, undefined>], undefined>, undefined>;
413
- export type NotionPagePropertyWriteMap = v.InferOutput<typeof notionPagePropertyWriteMapSchema>;
469
+ export declare const notionPagePropertyReadMapSchema: v.RecordSchema<v.StringSchema<undefined>, v.NullableSchema<v.VariantSchema<"type", [v.ObjectSchema<{
470
+ readonly id: v.StringSchema<undefined>;
471
+ readonly type: v.LiteralSchema<"title", undefined>;
472
+ readonly title: v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
473
+ }, undefined>, v.ObjectSchema<{
474
+ readonly id: v.StringSchema<undefined>;
475
+ readonly type: v.LiteralSchema<"rich_text", undefined>;
476
+ readonly rich_text: v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
477
+ }, undefined>, v.ObjectSchema<{
478
+ readonly id: v.StringSchema<undefined>;
479
+ readonly type: v.LiteralSchema<"number", undefined>;
480
+ readonly number: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
481
+ }, undefined>, v.ObjectSchema<{
482
+ readonly id: v.StringSchema<undefined>;
483
+ readonly type: v.LiteralSchema<"url", undefined>;
484
+ readonly url: v.NullableSchema<v.StringSchema<undefined>, undefined>;
485
+ }, undefined>, v.ObjectSchema<{
486
+ readonly id: v.StringSchema<undefined>;
487
+ readonly type: v.LiteralSchema<"email", undefined>;
488
+ readonly email: v.NullableSchema<v.StringSchema<undefined>, undefined>;
489
+ }, undefined>, v.ObjectSchema<{
490
+ readonly id: v.StringSchema<undefined>;
491
+ readonly type: v.LiteralSchema<"phone_number", undefined>;
492
+ readonly phone_number: v.NullableSchema<v.StringSchema<undefined>, undefined>;
493
+ }, undefined>, v.ObjectSchema<{
494
+ readonly id: v.StringSchema<undefined>;
495
+ readonly type: v.LiteralSchema<"checkbox", undefined>;
496
+ readonly checkbox: v.BooleanSchema<undefined>;
497
+ }, undefined>, v.ObjectSchema<{
498
+ readonly id: v.StringSchema<undefined>;
499
+ readonly type: v.LiteralSchema<"select", undefined>;
500
+ readonly select: v.NullableSchema<v.UnionSchema<[v.ObjectSchema<{
501
+ readonly id: v.StringSchema<undefined>;
502
+ readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
503
+ readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
504
+ readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
505
+ }, undefined>, v.ObjectSchema<{
506
+ readonly name: v.StringSchema<undefined>;
507
+ readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
508
+ readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
509
+ readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
510
+ }, undefined>], undefined>, undefined>;
511
+ }, undefined>, v.ObjectSchema<{
512
+ readonly id: v.StringSchema<undefined>;
513
+ readonly type: v.LiteralSchema<"status", undefined>;
514
+ readonly status: v.NullableSchema<v.UnionSchema<[v.ObjectSchema<{
515
+ readonly id: v.StringSchema<undefined>;
516
+ readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
517
+ readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
518
+ readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
519
+ }, undefined>, v.ObjectSchema<{
520
+ readonly name: v.StringSchema<undefined>;
521
+ readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
522
+ readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
523
+ readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
524
+ }, undefined>], undefined>, undefined>;
525
+ }, undefined>, v.ObjectSchema<{
526
+ readonly id: v.StringSchema<undefined>;
527
+ readonly type: v.LiteralSchema<"multi_select", undefined>;
528
+ readonly multi_select: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
529
+ readonly id: v.StringSchema<undefined>;
530
+ readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
531
+ readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
532
+ readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
533
+ }, undefined>, v.ObjectSchema<{
534
+ readonly name: v.StringSchema<undefined>;
535
+ readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
536
+ readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
537
+ readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
538
+ }, undefined>], undefined>, undefined>;
539
+ }, undefined>, v.ObjectSchema<{
540
+ readonly id: v.StringSchema<undefined>;
541
+ readonly type: v.LiteralSchema<"date", undefined>;
542
+ readonly date: v.NullableSchema<v.ObjectSchema<{
543
+ readonly start: v.StringSchema<undefined>;
544
+ readonly end: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
545
+ readonly time_zone: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
546
+ }, undefined>, undefined>;
547
+ }, undefined>, v.ObjectSchema<{
548
+ readonly id: v.StringSchema<undefined>;
549
+ readonly type: v.LiteralSchema<"people", undefined>;
550
+ readonly people: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
551
+ readonly object: v.OptionalSchema<v.LiteralSchema<"user", undefined>, undefined>;
552
+ readonly id: v.StringSchema<undefined>;
553
+ }, undefined>, v.ObjectSchema<{
554
+ readonly object: v.LiteralSchema<"group", undefined>;
555
+ readonly id: v.StringSchema<undefined>;
556
+ readonly name: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
557
+ }, undefined>], undefined>, undefined>;
558
+ }, undefined>, v.ObjectSchema<{
559
+ readonly id: v.StringSchema<undefined>;
560
+ readonly type: v.LiteralSchema<"relation", undefined>;
561
+ readonly has_more: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
562
+ readonly relation: v.ArraySchema<v.ObjectSchema<{
563
+ readonly id: v.StringSchema<undefined>;
564
+ }, undefined>, undefined>;
565
+ }, undefined>, v.ObjectSchema<{
566
+ readonly id: v.StringSchema<undefined>;
567
+ readonly type: v.LiteralSchema<"files", undefined>;
568
+ readonly files: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
569
+ readonly type: v.LiteralSchema<"external", undefined>;
570
+ readonly name: v.StringSchema<undefined>;
571
+ readonly external: v.ObjectSchema<{
572
+ readonly url: v.StringSchema<undefined>;
573
+ }, undefined>;
574
+ }, undefined>, v.ObjectSchema<{
575
+ readonly type: v.LiteralSchema<"file", undefined>;
576
+ readonly name: v.StringSchema<undefined>;
577
+ readonly file: v.ObjectSchema<{
578
+ readonly url: v.StringSchema<undefined>;
579
+ readonly expiry_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
580
+ }, undefined>;
581
+ }, undefined>], undefined>, undefined>;
582
+ }, undefined>, v.ObjectSchema<{
583
+ readonly id: v.StringSchema<undefined>;
584
+ readonly type: v.LiteralSchema<"place", undefined>;
585
+ readonly place: v.NullableSchema<v.ObjectSchema<{
586
+ readonly lat: v.NumberSchema<undefined>;
587
+ readonly lon: v.NumberSchema<undefined>;
588
+ readonly name: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
589
+ readonly address: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
590
+ readonly aws_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
591
+ readonly google_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
592
+ }, undefined>, undefined>;
593
+ }, undefined>, v.ObjectSchema<{
594
+ readonly id: v.StringSchema<undefined>;
595
+ readonly type: v.LiteralSchema<"created_time", undefined>;
596
+ readonly created_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
597
+ }, undefined>, v.ObjectSchema<{
598
+ readonly id: v.StringSchema<undefined>;
599
+ readonly type: v.LiteralSchema<"last_edited_time", undefined>;
600
+ readonly last_edited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
601
+ }, undefined>, v.ObjectSchema<{
602
+ readonly id: v.StringSchema<undefined>;
603
+ readonly type: v.LiteralSchema<"created_by", undefined>;
604
+ readonly created_by: v.NullableSchema<v.ObjectSchema<{
605
+ readonly id: v.StringSchema<undefined>;
606
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
607
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
608
+ }, undefined>, undefined>;
609
+ }, undefined>, v.ObjectSchema<{
610
+ readonly id: v.StringSchema<undefined>;
611
+ readonly type: v.LiteralSchema<"last_edited_by", undefined>;
612
+ readonly last_edited_by: v.NullableSchema<v.ObjectSchema<{
613
+ readonly id: v.StringSchema<undefined>;
614
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
615
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
616
+ }, undefined>, undefined>;
617
+ }, undefined>, v.ObjectSchema<{
618
+ readonly id: v.StringSchema<undefined>;
619
+ readonly type: v.LiteralSchema<"last_visited_time", undefined>;
620
+ readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
621
+ }, undefined>], undefined>, undefined>, undefined>;
622
+ export type NotionPagePropertyReadMap = v.InferOutput<typeof notionPagePropertyReadMapSchema>;
623
+ export type NotionPagePropertyWriteMap = v.InferInput<typeof notionPagePropertyWriteMapSchema>;
414
624
  /**
415
625
  * The `Page` object returned in `createPageResult` messages.
416
626
  */
417
- export declare const notionPageSchema: v.ObjectSchema<{
627
+ export declare const notionPageDataSchema: v.ObjectSchema<{
628
+ readonly object: v.LiteralSchema<"page", undefined>;
629
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
630
+ readonly parent: v.VariantSchema<"type", [v.ObjectSchema<{
631
+ readonly type: v.LiteralSchema<"page_id", undefined>;
632
+ readonly page_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
633
+ }, undefined>, v.ObjectSchema<{
634
+ readonly type: v.LiteralSchema<"data_source_id", undefined>;
635
+ readonly data_source_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionDataSourceId">]>;
636
+ }, undefined>, v.ObjectSchema<{
637
+ readonly type: v.LiteralSchema<"workspace", undefined>;
638
+ readonly workspace: v.LiteralSchema<true, undefined>;
639
+ }, undefined>, v.ObjectSchema<{
640
+ readonly type: v.LiteralSchema<"block_id", undefined>;
641
+ readonly block_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionBlockId">]>;
642
+ }, undefined>, v.ObjectSchema<{
643
+ readonly type: v.LiteralSchema<"agent_id", undefined>;
644
+ readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
645
+ }, undefined>, v.ObjectSchema<{
646
+ readonly type: v.LiteralSchema<"unavailable", undefined>;
647
+ }, undefined>], undefined>;
648
+ readonly properties: v.RecordSchema<v.StringSchema<undefined>, v.NullableSchema<v.VariantSchema<"type", [v.ObjectSchema<{
649
+ readonly id: v.StringSchema<undefined>;
650
+ readonly type: v.LiteralSchema<"title", undefined>;
651
+ readonly title: v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
652
+ }, undefined>, v.ObjectSchema<{
653
+ readonly id: v.StringSchema<undefined>;
654
+ readonly type: v.LiteralSchema<"rich_text", undefined>;
655
+ readonly rich_text: v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
656
+ }, undefined>, v.ObjectSchema<{
657
+ readonly id: v.StringSchema<undefined>;
658
+ readonly type: v.LiteralSchema<"number", undefined>;
659
+ readonly number: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
660
+ }, undefined>, v.ObjectSchema<{
661
+ readonly id: v.StringSchema<undefined>;
662
+ readonly type: v.LiteralSchema<"url", undefined>;
663
+ readonly url: v.NullableSchema<v.StringSchema<undefined>, undefined>;
664
+ }, undefined>, v.ObjectSchema<{
665
+ readonly id: v.StringSchema<undefined>;
666
+ readonly type: v.LiteralSchema<"email", undefined>;
667
+ readonly email: v.NullableSchema<v.StringSchema<undefined>, undefined>;
668
+ }, undefined>, v.ObjectSchema<{
669
+ readonly id: v.StringSchema<undefined>;
670
+ readonly type: v.LiteralSchema<"phone_number", undefined>;
671
+ readonly phone_number: v.NullableSchema<v.StringSchema<undefined>, undefined>;
672
+ }, undefined>, v.ObjectSchema<{
673
+ readonly id: v.StringSchema<undefined>;
674
+ readonly type: v.LiteralSchema<"checkbox", undefined>;
675
+ readonly checkbox: v.BooleanSchema<undefined>;
676
+ }, undefined>, v.ObjectSchema<{
677
+ readonly id: v.StringSchema<undefined>;
678
+ readonly type: v.LiteralSchema<"select", undefined>;
679
+ readonly select: v.NullableSchema<v.UnionSchema<[v.ObjectSchema<{
680
+ readonly id: v.StringSchema<undefined>;
681
+ readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
682
+ readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
683
+ readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
684
+ }, undefined>, v.ObjectSchema<{
685
+ readonly name: v.StringSchema<undefined>;
686
+ readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
687
+ readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
688
+ readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
689
+ }, undefined>], undefined>, undefined>;
690
+ }, undefined>, v.ObjectSchema<{
691
+ readonly id: v.StringSchema<undefined>;
692
+ readonly type: v.LiteralSchema<"status", undefined>;
693
+ readonly status: v.NullableSchema<v.UnionSchema<[v.ObjectSchema<{
694
+ readonly id: v.StringSchema<undefined>;
695
+ readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
696
+ readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
697
+ readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
698
+ }, undefined>, v.ObjectSchema<{
699
+ readonly name: v.StringSchema<undefined>;
700
+ readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
701
+ readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
702
+ readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
703
+ }, undefined>], undefined>, undefined>;
704
+ }, undefined>, v.ObjectSchema<{
705
+ readonly id: v.StringSchema<undefined>;
706
+ readonly type: v.LiteralSchema<"multi_select", undefined>;
707
+ readonly multi_select: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
708
+ readonly id: v.StringSchema<undefined>;
709
+ readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
710
+ readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
711
+ readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
712
+ }, undefined>, v.ObjectSchema<{
713
+ readonly name: v.StringSchema<undefined>;
714
+ readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
715
+ readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
716
+ readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
717
+ }, undefined>], undefined>, undefined>;
718
+ }, undefined>, v.ObjectSchema<{
719
+ readonly id: v.StringSchema<undefined>;
720
+ readonly type: v.LiteralSchema<"date", undefined>;
721
+ readonly date: v.NullableSchema<v.ObjectSchema<{
722
+ readonly start: v.StringSchema<undefined>;
723
+ readonly end: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
724
+ readonly time_zone: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
725
+ }, undefined>, undefined>;
726
+ }, undefined>, v.ObjectSchema<{
727
+ readonly id: v.StringSchema<undefined>;
728
+ readonly type: v.LiteralSchema<"people", undefined>;
729
+ readonly people: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
730
+ readonly object: v.OptionalSchema<v.LiteralSchema<"user", undefined>, undefined>;
731
+ readonly id: v.StringSchema<undefined>;
732
+ }, undefined>, v.ObjectSchema<{
733
+ readonly object: v.LiteralSchema<"group", undefined>;
734
+ readonly id: v.StringSchema<undefined>;
735
+ readonly name: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
736
+ }, undefined>], undefined>, undefined>;
737
+ }, undefined>, v.ObjectSchema<{
738
+ readonly id: v.StringSchema<undefined>;
739
+ readonly type: v.LiteralSchema<"relation", undefined>;
740
+ readonly has_more: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
741
+ readonly relation: v.ArraySchema<v.ObjectSchema<{
742
+ readonly id: v.StringSchema<undefined>;
743
+ }, undefined>, undefined>;
744
+ }, undefined>, v.ObjectSchema<{
745
+ readonly id: v.StringSchema<undefined>;
746
+ readonly type: v.LiteralSchema<"files", undefined>;
747
+ readonly files: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
748
+ readonly type: v.LiteralSchema<"external", undefined>;
749
+ readonly name: v.StringSchema<undefined>;
750
+ readonly external: v.ObjectSchema<{
751
+ readonly url: v.StringSchema<undefined>;
752
+ }, undefined>;
753
+ }, undefined>, v.ObjectSchema<{
754
+ readonly type: v.LiteralSchema<"file", undefined>;
755
+ readonly name: v.StringSchema<undefined>;
756
+ readonly file: v.ObjectSchema<{
757
+ readonly url: v.StringSchema<undefined>;
758
+ readonly expiry_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
759
+ }, undefined>;
760
+ }, undefined>], undefined>, undefined>;
761
+ }, undefined>, v.ObjectSchema<{
762
+ readonly id: v.StringSchema<undefined>;
763
+ readonly type: v.LiteralSchema<"place", undefined>;
764
+ readonly place: v.NullableSchema<v.ObjectSchema<{
765
+ readonly lat: v.NumberSchema<undefined>;
766
+ readonly lon: v.NumberSchema<undefined>;
767
+ readonly name: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
768
+ readonly address: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
769
+ readonly aws_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
770
+ readonly google_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
771
+ }, undefined>, undefined>;
772
+ }, undefined>, v.ObjectSchema<{
773
+ readonly id: v.StringSchema<undefined>;
774
+ readonly type: v.LiteralSchema<"created_time", undefined>;
775
+ readonly created_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
776
+ }, undefined>, v.ObjectSchema<{
777
+ readonly id: v.StringSchema<undefined>;
778
+ readonly type: v.LiteralSchema<"last_edited_time", undefined>;
779
+ readonly last_edited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
780
+ }, undefined>, v.ObjectSchema<{
781
+ readonly id: v.StringSchema<undefined>;
782
+ readonly type: v.LiteralSchema<"created_by", undefined>;
783
+ readonly created_by: v.NullableSchema<v.ObjectSchema<{
784
+ readonly id: v.StringSchema<undefined>;
785
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
786
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
787
+ }, undefined>, undefined>;
788
+ }, undefined>, v.ObjectSchema<{
789
+ readonly id: v.StringSchema<undefined>;
790
+ readonly type: v.LiteralSchema<"last_edited_by", undefined>;
791
+ readonly last_edited_by: v.NullableSchema<v.ObjectSchema<{
792
+ readonly id: v.StringSchema<undefined>;
793
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
794
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
795
+ }, undefined>, undefined>;
796
+ }, undefined>, v.ObjectSchema<{
797
+ readonly id: v.StringSchema<undefined>;
798
+ readonly type: v.LiteralSchema<"last_visited_time", undefined>;
799
+ readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
800
+ }, undefined>], undefined>, undefined>, undefined>;
801
+ readonly created_by: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
802
+ readonly id: v.StringSchema<undefined>;
803
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
804
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
805
+ }, undefined>, undefined>, null>;
806
+ readonly last_edited_by: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
807
+ readonly id: v.StringSchema<undefined>;
808
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
809
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
810
+ }, undefined>, undefined>, null>;
811
+ readonly last_visited_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
812
+ readonly created_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
813
+ readonly last_edited_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
814
+ readonly icon: v.OptionalSchema<v.NullableSchema<v.VariantSchema<"type", [v.ObjectSchema<{
815
+ readonly type: v.LiteralSchema<"emoji", undefined>;
816
+ readonly emoji: v.StringSchema<undefined>;
817
+ }, undefined>, v.ObjectSchema<{
818
+ readonly type: v.LiteralSchema<"custom_emoji", undefined>;
819
+ readonly custom_emoji: v.ObjectSchema<{
820
+ readonly id: v.StringSchema<undefined>;
821
+ readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
822
+ readonly url: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
823
+ }, undefined>;
824
+ }, undefined>, v.ObjectSchema<{
825
+ readonly type: v.LiteralSchema<"external", undefined>;
826
+ readonly external: v.ObjectSchema<{
827
+ readonly url: v.StringSchema<undefined>;
828
+ }, undefined>;
829
+ }, undefined>, v.ObjectSchema<{
830
+ readonly type: v.LiteralSchema<"file", undefined>;
831
+ readonly file: v.ObjectSchema<{
832
+ readonly url: v.StringSchema<undefined>;
833
+ readonly expiry_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
834
+ }, undefined>;
835
+ }, undefined>], undefined>, undefined>, null>;
836
+ readonly cover: v.OptionalSchema<v.NullableSchema<v.VariantSchema<"type", [v.ObjectSchema<{
837
+ readonly type: v.LiteralSchema<"external", undefined>;
838
+ readonly external: v.ObjectSchema<{
839
+ readonly url: v.StringSchema<undefined>;
840
+ }, undefined>;
841
+ }, undefined>, v.ObjectSchema<{
842
+ readonly type: v.LiteralSchema<"file", undefined>;
843
+ readonly file: v.ObjectSchema<{
844
+ readonly url: v.StringSchema<undefined>;
845
+ readonly expiry_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
846
+ }, undefined>;
847
+ }, undefined>], undefined>, undefined>, null>;
848
+ readonly url: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
849
+ readonly public_url: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
850
+ /** Whether the page or an ancestor is archived. */
851
+ readonly is_archived: v.BooleanSchema<undefined>;
852
+ /** Whether the page or an ancestor is in Trash. */
853
+ readonly in_trash: v.BooleanSchema<undefined>;
854
+ }, undefined>;
855
+ export type NotionPageData = v.InferInput<typeof notionPageDataSchema>;
856
+ export declare const legacyNotionPageSchema: v.ObjectSchema<{
418
857
  readonly object: v.LiteralSchema<"page", undefined>;
419
858
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
420
859
  readonly parent: v.VariantSchema<"type", [v.ObjectSchema<{
@@ -559,6 +998,34 @@ export declare const notionPageSchema: v.ObjectSchema<{
559
998
  readonly aws_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
560
999
  readonly google_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
561
1000
  }, undefined>, undefined>;
1001
+ }, undefined>, v.ObjectSchema<{
1002
+ readonly id: v.StringSchema<undefined>;
1003
+ readonly type: v.LiteralSchema<"created_time", undefined>;
1004
+ readonly created_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1005
+ }, undefined>, v.ObjectSchema<{
1006
+ readonly id: v.StringSchema<undefined>;
1007
+ readonly type: v.LiteralSchema<"last_edited_time", undefined>;
1008
+ readonly last_edited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1009
+ }, undefined>, v.ObjectSchema<{
1010
+ readonly id: v.StringSchema<undefined>;
1011
+ readonly type: v.LiteralSchema<"created_by", undefined>;
1012
+ readonly created_by: v.NullableSchema<v.ObjectSchema<{
1013
+ readonly id: v.StringSchema<undefined>;
1014
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
1015
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1016
+ }, undefined>, undefined>;
1017
+ }, undefined>, v.ObjectSchema<{
1018
+ readonly id: v.StringSchema<undefined>;
1019
+ readonly type: v.LiteralSchema<"last_edited_by", undefined>;
1020
+ readonly last_edited_by: v.NullableSchema<v.ObjectSchema<{
1021
+ readonly id: v.StringSchema<undefined>;
1022
+ readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
1023
+ readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1024
+ }, undefined>, undefined>;
1025
+ }, undefined>, v.ObjectSchema<{
1026
+ readonly id: v.StringSchema<undefined>;
1027
+ readonly type: v.LiteralSchema<"last_visited_time", undefined>;
1028
+ readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
562
1029
  }, undefined>], undefined>, undefined>;
563
1030
  readonly created_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
564
1031
  readonly last_edited_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
@@ -603,5 +1070,5 @@ export declare const notionPageSchema: v.ObjectSchema<{
603
1070
  /** Whether the page or an ancestor is in Trash. */
604
1071
  readonly in_trash: v.BooleanSchema<undefined>;
605
1072
  }, undefined>;
606
- export type NotionPage = v.InferOutput<typeof notionPageSchema>;
1073
+ export type LegacyNotionPage = v.InferOutput<typeof legacyNotionPageSchema>;
607
1074
  export {};
@@ -5,6 +5,7 @@
5
5
  * shape the host delivers for messages like `createPageResult`.
6
6
  */
7
7
  import * as v from "valibot";
8
+ import { notionRecordPointerSchema } from "../dataSources/recordPointer.js";
8
9
  import { notionPageIdSchema } from "../ids.js";
9
10
  import { notionParentSchema } from "../parent.js";
10
11
  /**
@@ -117,6 +118,12 @@ const notionPlaceInputSchema = v.object({
117
118
  const pagePropertyBaseSchema = {
118
119
  id: v.string(),
119
120
  };
121
+ // TODO(custom-blocks): Make spaceId required for metadataActor
122
+ const metadataActorSchema = v.nullable(v.object({
123
+ ...notionRecordPointerSchema.entries,
124
+ table: v.picklist(["notion_user", "bot", "organization_bot"]),
125
+ spaceId: v.optional(v.string()),
126
+ }));
120
127
  /**
121
128
  * A page property value.
122
129
  */
@@ -197,12 +204,57 @@ export const notionPagePropertyValueSchema = v.variant("type", [
197
204
  type: v.literal("place"),
198
205
  place: v.nullable(notionPlaceInputSchema),
199
206
  }),
207
+ v.object({
208
+ ...pagePropertyBaseSchema,
209
+ type: v.literal("created_time"),
210
+ created_time: nullableStringSchema,
211
+ }),
212
+ v.object({
213
+ ...pagePropertyBaseSchema,
214
+ type: v.literal("last_edited_time"),
215
+ last_edited_time: nullableStringSchema,
216
+ }),
217
+ v.object({
218
+ ...pagePropertyBaseSchema,
219
+ type: v.literal("created_by"),
220
+ created_by: metadataActorSchema,
221
+ }),
222
+ v.object({
223
+ ...pagePropertyBaseSchema,
224
+ type: v.literal("last_edited_by"),
225
+ last_edited_by: metadataActorSchema,
226
+ }),
227
+ v.object({
228
+ ...pagePropertyBaseSchema,
229
+ type: v.literal("last_visited_time"),
230
+ last_visited_time: nullableStringSchema,
231
+ }),
200
232
  ]);
201
233
  export const notionPagePropertyWriteMapSchema = v.record(v.string(), notionPagePropertyValueSchema);
234
+ export const notionPagePropertyReadMapSchema = v.record(v.string(), v.nullable(notionPagePropertyValueSchema));
202
235
  /**
203
236
  * The `Page` object returned in `createPageResult` messages.
204
237
  */
205
- export const notionPageSchema = v.object({
238
+ export const notionPageDataSchema = v.object({
239
+ object: v.literal("page"),
240
+ id: notionPageIdSchema,
241
+ parent: notionParentSchema,
242
+ properties: notionPagePropertyReadMapSchema,
243
+ created_by: v.optional(metadataActorSchema, null),
244
+ last_edited_by: v.optional(metadataActorSchema, null),
245
+ last_visited_time: v.optional(v.nullable(v.string()), null),
246
+ created_time: v.optional(v.nullable(v.string()), null),
247
+ last_edited_time: v.optional(v.nullable(v.string()), null),
248
+ icon: v.optional(v.nullable(notionPageIconSchema), null),
249
+ cover: v.optional(v.nullable(notionPageCoverSchema), null),
250
+ url: v.optional(v.nullable(v.string()), null),
251
+ public_url: v.optional(v.nullable(v.string()), null),
252
+ /** Whether the page or an ancestor is archived. */
253
+ is_archived: v.boolean(),
254
+ /** Whether the page or an ancestor is in Trash. */
255
+ in_trash: v.boolean(),
256
+ });
257
+ export const legacyNotionPageSchema = v.object({
206
258
  object: v.literal("page"),
207
259
  id: notionPageIdSchema,
208
260
  parent: notionParentSchema,
@@ -3,4 +3,5 @@
3
3
  * Increase this value for breaking wire changes. Hosts can continue to accept
4
4
  * older versions, so this value does not set the minimum or maximum they accept.
5
5
  */
6
- export declare const LATEST_BRIDGE_PROTOCOL_VERSION = 5;
6
+ export declare const LATEST_BRIDGE_PROTOCOL_VERSION = 6;
7
+ export declare const LEGACY_PROPERTY_SHAPE_PROTOCOL_VERSION = 6;
@@ -3,4 +3,7 @@
3
3
  * Increase this value for breaking wire changes. Hosts can continue to accept
4
4
  * older versions, so this value does not set the minimum or maximum they accept.
5
5
  */
6
- export const LATEST_BRIDGE_PROTOCOL_VERSION = 5;
6
+ export const LATEST_BRIDGE_PROTOCOL_VERSION = 6;
7
+ // Protocol 6 introduces unified pages with name-keyed property objects.
8
+ // Keep this cutoff fixed when the latest protocol version increases.
9
+ export const LEGACY_PROPERTY_SHAPE_PROTOCOL_VERSION = 6;
@@ -7,7 +7,7 @@ import type { UseDataSourceOptions, UseDataSourceResult } from "../types.js";
7
7
  * is capped at 999. `sorts` are applied in array order.
8
8
  *
9
9
  * @example
10
- * const { items, isLoading, hasMore, error } = useDataSource("default", { limit: 25 })
10
+ * const { items, propertyIdsByKey, isLoading, hasMore } = useDataSource("default", { limit: 25 })
11
11
  */
12
12
  export declare function useDataSource(key: string, options?: UseDataSourceOptions): UseDataSourceResult;
13
13
  //# sourceMappingURL=useDataSource.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDataSource.d.ts","sourceRoot":"","sources":["../../src/react/useDataSource.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAiB5E;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAC5B,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,oBAAoB,GAC5B,mBAAmB,CAqBrB"}
1
+ {"version":3,"file":"useDataSource.d.ts","sourceRoot":"","sources":["../../src/react/useDataSource.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAe5E;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAC5B,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,oBAAoB,GAC5B,mBAAmB,CAqBrB"}
@@ -3,9 +3,7 @@ import { getDataSourceQueryOptionsIdentity } from "../bridge/dataSources/query.j
3
3
  import { customBlock } from "../customBlock.js";
4
4
  const EMPTY_DATA_SOURCE_RESULT = {
5
5
  items: [],
6
- propertySchemasById: {},
7
6
  propertyIdsByKey: {},
8
- propertySchemasByKey: {},
9
7
  isLoading: false,
10
8
  hasMore: false,
11
9
  };
@@ -17,7 +15,7 @@ const EMPTY_DATA_SOURCE_RESULT = {
17
15
  * is capped at 999. `sorts` are applied in array order.
18
16
  *
19
17
  * @example
20
- * const { items, isLoading, hasMore, error } = useDataSource("default", { limit: 25 })
18
+ * const { items, propertyIdsByKey, isLoading, hasMore } = useDataSource("default", { limit: 25 })
21
19
  */
22
20
  export function useDataSource(key, options) {
23
21
  const optionsIdentity = getDataSourceQueryOptionsIdentity(options);