@notionhq/custom-blocks 0.3.5 → 0.4.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 (124) hide show
  1. package/README.md +2 -2
  2. package/dist/bridge/SandboxBridge.d.ts +4 -23
  3. package/dist/bridge/SandboxBridge.d.ts.map +1 -1
  4. package/dist/bridge/SandboxBridge.js +36 -104
  5. package/dist/bridge/requests.d.ts +35 -0
  6. package/dist/bridge/requests.d.ts.map +1 -0
  7. package/dist/bridge/requests.js +97 -0
  8. package/dist/dataSources/bridge/resolveDataSourceQuery.d.ts.map +1 -1
  9. package/dist/dataSources/bridge/resolveDataSourceQuery.js +15 -1
  10. package/dist/dataSources/createDataSourcePage.d.ts.map +1 -1
  11. package/dist/dataSources/createDataSourcePage.js +5 -1
  12. package/dist/dataSources/types.d.ts +2 -0
  13. package/dist/dataSources/types.d.ts.map +1 -1
  14. package/dist/index.d.ts +2 -1
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/manifest/types.d.ts +1 -1
  17. package/dist/manifest/types.d.ts.map +1 -1
  18. package/dist/navigation/openExternalUrl.d.ts.map +1 -1
  19. package/dist/navigation/openExternalUrl.js +2 -1
  20. package/dist/pages/bridge/getPageForDataSource.d.ts.map +1 -1
  21. package/dist/pages/bridge/getPageForDataSource.js +2 -1
  22. package/dist/pages/bridge/sendCreatePageRequest.d.ts.map +1 -1
  23. package/dist/pages/bridge/sendCreatePageRequest.js +2 -1
  24. package/dist/pages/bridge/toNotionPageFieldsFromBridgePage.d.ts +11 -2
  25. package/dist/pages/bridge/toNotionPageFieldsFromBridgePage.d.ts.map +1 -1
  26. package/dist/pages/bridge/toNotionPageFieldsFromBridgePage.js +0 -1
  27. package/dist/pages/bridge/toNotionPagePropertyFromBridgeProperty.d.ts.map +1 -1
  28. package/dist/pages/bridge/toNotionPagePropertyFromBridgeProperty.js +0 -6
  29. package/dist/pages/bridge/updatePage.d.ts.map +1 -1
  30. package/dist/pages/bridge/updatePage.js +19 -4
  31. package/dist/pages/createPage.d.ts.map +1 -1
  32. package/dist/pages/createPage.js +5 -1
  33. package/dist/pages/openPage.d.ts.map +1 -1
  34. package/dist/pages/openPage.js +2 -1
  35. package/dist/pages/types.d.ts +5 -7
  36. package/dist/pages/types.d.ts.map +1 -1
  37. package/dist/protocol/compatibility/protocol3To5/bridgePage.d.ts +7 -5
  38. package/dist/protocol/context/parent.d.ts +2 -0
  39. package/dist/protocol/dataSources/bridgeArchiveStatus.d.ts +3 -0
  40. package/dist/protocol/dataSources/bridgeArchiveStatus.js +6 -0
  41. package/dist/protocol/dataSources/bridgeDataSourceBinding.d.ts +0 -4
  42. package/dist/protocol/dataSources/bridgeDataSourceBindings.d.ts +0 -4
  43. package/dist/protocol/dataSources/collectionSchema.d.ts +0 -4
  44. package/dist/protocol/dataSources/messages/dataSourcesChanged.d.ts +0 -4
  45. package/dist/protocol/dataSources/messages/queryDataSource.d.ts +17 -14
  46. package/dist/protocol/dataSources/messages/queryDataSource.js +2 -0
  47. package/dist/protocol/dataSources/notionDataSource.d.ts +0 -8
  48. package/dist/protocol/dataSources/properties/propertySchema.d.ts +3 -7
  49. package/dist/protocol/dataSources/properties/propertySchema.js +1 -3
  50. package/dist/protocol/handshake/connect.d.ts +15 -4
  51. package/dist/protocol/handshake/init.d.ts +15 -8
  52. package/dist/protocol/icons.d.ts +17 -0
  53. package/dist/protocol/icons.js +27 -0
  54. package/dist/protocol/index.d.ts +13 -9
  55. package/dist/protocol/index.js +8 -5
  56. package/dist/protocol/manifest/grants.d.ts +48 -0
  57. package/dist/protocol/manifest/grants.js +19 -0
  58. package/dist/protocol/manifest/manifest.d.ts +33 -10
  59. package/dist/protocol/manifest/manifest.js +11 -5
  60. package/dist/protocol/messages/hostToSandbox.d.ts +109 -87
  61. package/dist/protocol/messages/invalidHostMessage.d.ts +2 -0
  62. package/dist/protocol/messages/invalidHostMessage.js +2 -0
  63. package/dist/protocol/messages/invalidSandboxMessage.d.ts +2 -0
  64. package/dist/protocol/messages/invalidSandboxMessage.js +2 -0
  65. package/dist/protocol/messages/sandboxToHost.d.ts +104 -17
  66. package/dist/protocol/navigation/openExternalUrl.d.ts +2 -2
  67. package/dist/protocol/pages/bridgePage.d.ts +7 -6
  68. package/dist/protocol/pages/bridgePage.js +0 -1
  69. package/dist/protocol/pages/makeBridgePage.d.ts +3 -1
  70. package/dist/protocol/pages/messages/createPage.d.ts +103 -27
  71. package/dist/protocol/pages/messages/createPage.js +3 -1
  72. package/dist/protocol/pages/messages/getPage.d.ts +23 -19
  73. package/dist/protocol/pages/messages/openPage.d.ts +2 -2
  74. package/dist/protocol/pages/messages/updatePage.d.ts +30 -24
  75. package/dist/protocol/pages/pageAppearance.d.ts +36 -1
  76. package/dist/protocol/pages/pageAppearance.js +9 -0
  77. package/dist/protocol/pages/properties/bridgePagePropertyMaps.d.ts +0 -8
  78. package/dist/protocol/pages/properties/bridgePagePropertyValue.d.ts +0 -4
  79. package/dist/protocol/pages/properties/bridgePagePropertyValue.js +0 -5
  80. package/dist/protocol/users/makeBridgeUser.d.ts +3 -1
  81. package/dist/protocol/users/messages/getUser.d.ts +2 -2
  82. package/dist/protocol/users/messages/listUsers.d.ts +2 -2
  83. package/dist/protocol/utils/errors.d.ts +6 -4
  84. package/dist/protocol/utils/errors.js +3 -3
  85. package/dist/protocol/utils/protocolVersion.d.ts +2 -1
  86. package/dist/protocol/utils/protocolVersion.js +3 -1
  87. package/dist/protocol/utils/readRequestId.d.ts +2 -0
  88. package/dist/protocol/utils/readRequestId.js +7 -0
  89. package/dist/users/getUser.d.ts.map +1 -1
  90. package/dist/users/getUser.js +2 -1
  91. package/dist/users/listUsers.d.ts.map +1 -1
  92. package/dist/users/listUsers.js +4 -2
  93. package/dist/utils/version.js +1 -1
  94. package/docs/data-sources.md +38 -34
  95. package/docs/errors.md +47 -5
  96. package/docs/grants.md +127 -0
  97. package/docs/pages.md +45 -32
  98. package/docs/users.md +2 -2
  99. package/package.json +1 -1
  100. package/src/bridge/SandboxBridge.ts +44 -188
  101. package/src/bridge/requests.ts +138 -0
  102. package/src/dataSources/bridge/resolveDataSourceQuery.ts +21 -1
  103. package/src/dataSources/createDataSourcePage.ts +5 -1
  104. package/src/dataSources/types.ts +3 -0
  105. package/src/index.ts +8 -4
  106. package/src/manifest/types.ts +1 -1
  107. package/src/navigation/openExternalUrl.ts +5 -1
  108. package/src/pages/bridge/getPageForDataSource.ts +5 -1
  109. package/src/pages/bridge/sendCreatePageRequest.ts +5 -1
  110. package/src/pages/bridge/toNotionPageFieldsFromBridgePage.ts +0 -1
  111. package/src/pages/bridge/toNotionPagePropertyFromBridgeProperty.ts +0 -6
  112. package/src/pages/bridge/updatePage.ts +28 -8
  113. package/src/pages/createPage.ts +5 -1
  114. package/src/pages/openPage.ts +5 -1
  115. package/src/pages/types.ts +7 -5
  116. package/src/users/getUser.ts +5 -1
  117. package/src/users/listUsers.ts +9 -4
  118. package/dist/bridge/pendingRequests.d.ts +0 -14
  119. package/dist/bridge/pendingRequests.d.ts.map +0 -1
  120. package/dist/bridge/pendingRequests.js +0 -28
  121. package/dist/protocol/manifest/capabilities.d.ts +0 -37
  122. package/dist/protocol/manifest/capabilities.js +0 -13
  123. package/docs/capabilities.md +0 -111
  124. package/src/bridge/pendingRequests.ts +0 -28
@@ -70,12 +70,23 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
70
70
  readonly properties: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
71
71
  readonly name: v.StringSchema<undefined>;
72
72
  readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
73
- readonly type: v.PicklistSchema<readonly ["title", "rich_text", "number", "checkbox", "url", "email", "phone_number", "select", "multi_select", "status", "date", "people", "files", "unique_id", "relation", "place", "formula", "rollup", "button", "verification", "last_visited_time", "location", "created_time", "last_edited_time", "created_by", "last_edited_by"], undefined>;
73
+ readonly type: v.PicklistSchema<readonly ["title", "rich_text", "number", "checkbox", "url", "email", "phone_number", "select", "multi_select", "status", "date", "people", "files", "unique_id", "relation", "place", "formula", "rollup", "button", "verification", "location", "created_time", "last_edited_time", "created_by", "last_edited_by"], undefined>;
74
74
  }, undefined>, undefined>, {}>;
75
75
  }, undefined>, undefined>, {}>;
76
- readonly capabilities: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
77
- readonly capability: v.StringSchema<undefined>;
78
- readonly resource: v.StringSchema<undefined>;
76
+ readonly pages: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
77
+ readonly name: v.StringSchema<undefined>;
78
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
79
+ readonly icon: v.OptionalSchema<v.VariantSchema<"type", [v.ObjectSchema<{
80
+ readonly type: v.LiteralSchema<"emoji", undefined>;
81
+ readonly emoji: v.StringSchema<undefined>;
82
+ }, undefined>, v.ObjectSchema<{
83
+ readonly type: v.LiteralSchema<"external", undefined>;
84
+ readonly url: v.StringSchema<undefined>;
85
+ }, undefined>], undefined>, undefined>;
86
+ }, undefined>, undefined>, undefined>;
87
+ readonly grants: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
88
+ readonly action: v.StringSchema<undefined>;
89
+ readonly resource: v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.MinLengthAction<string[], 1, undefined>]>], undefined>;
79
90
  }, undefined>, undefined>, undefined>;
80
91
  }, undefined>;
81
92
  readonly dataSources: v.ObjectSchema<{
@@ -196,10 +207,6 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
196
207
  readonly name: v.StringSchema<undefined>;
197
208
  readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
198
209
  readonly type: v.LiteralSchema<"verification", undefined>;
199
- }, undefined>, v.ObjectSchema<{
200
- readonly name: v.StringSchema<undefined>;
201
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
202
- readonly type: v.LiteralSchema<"last_visited_time", undefined>;
203
210
  }, undefined>, v.ObjectSchema<{
204
211
  readonly name: v.StringSchema<undefined>;
205
212
  readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
@@ -429,10 +436,6 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
429
436
  readonly name: v.StringSchema<undefined>;
430
437
  readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
431
438
  readonly type: v.LiteralSchema<"verification", undefined>;
432
- }, undefined>, v.ObjectSchema<{
433
- readonly name: v.StringSchema<undefined>;
434
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
435
- readonly type: v.LiteralSchema<"last_visited_time", undefined>;
436
439
  }, undefined>, v.ObjectSchema<{
437
440
  readonly name: v.StringSchema<undefined>;
438
441
  readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
@@ -541,6 +544,7 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
541
544
  }, undefined>;
542
545
  }, undefined>], undefined>, v.ObjectSchema<{
543
546
  readonly type: v.LiteralSchema<"invalidSandboxMessage", undefined>;
547
+ readonly requestId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
544
548
  readonly reason: v.StringSchema<undefined>;
545
549
  }, undefined>, v.VariantSchema<"status", [v.ObjectSchema<{
546
550
  readonly type: v.LiteralSchema<"queryDataSourceResult", undefined>;
@@ -753,10 +757,6 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
753
757
  readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
754
758
  readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
755
759
  }, undefined>, undefined>;
756
- }, undefined>, v.ObjectSchema<{
757
- readonly id: v.StringSchema<undefined>;
758
- readonly type: v.LiteralSchema<"last_visited_time", undefined>;
759
- readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
760
760
  }, undefined>, v.ObjectSchema<{
761
761
  readonly id: v.StringSchema<undefined>;
762
762
  readonly type: v.LiteralSchema<"unique_id", undefined>;
@@ -792,10 +792,15 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
792
792
  readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
793
793
  readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
794
794
  }, undefined>, undefined>, null>;
795
- readonly last_visited_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
796
795
  readonly created_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
797
796
  readonly last_edited_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
798
- readonly icon: v.OptionalSchema<v.NullableSchema<v.VariantSchema<"type", [v.ObjectSchema<{
797
+ readonly icon: v.OptionalSchema<v.NullableSchema<v.VariantSchema<"type", [v.LooseObjectSchema<{
798
+ readonly type: v.LiteralSchema<"icon", undefined>;
799
+ readonly icon: v.LooseObjectSchema<{
800
+ readonly name: v.StringSchema<undefined>;
801
+ readonly color: v.OptionalSchema<v.GenericSchema<import("../icons.js").NotionIconColor>, undefined>;
802
+ }, undefined>;
803
+ }, undefined>, v.ObjectSchema<{
799
804
  readonly type: v.LiteralSchema<"emoji", undefined>;
800
805
  readonly emoji: v.StringSchema<undefined>;
801
806
  }, undefined>, v.ObjectSchema<{
@@ -1055,10 +1060,6 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
1055
1060
  readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
1056
1061
  readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1057
1062
  }, undefined>, undefined>;
1058
- }, undefined>, v.ObjectSchema<{
1059
- readonly id: v.StringSchema<undefined>;
1060
- readonly type: v.LiteralSchema<"last_visited_time", undefined>;
1061
- readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1062
1063
  }, undefined>, v.ObjectSchema<{
1063
1064
  readonly id: v.StringSchema<undefined>;
1064
1065
  readonly type: v.LiteralSchema<"unique_id", undefined>;
@@ -1094,10 +1095,15 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
1094
1095
  readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
1095
1096
  readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1096
1097
  }, undefined>, undefined>, null>;
1097
- readonly last_visited_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
1098
1098
  readonly created_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
1099
1099
  readonly last_edited_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
1100
- readonly icon: v.OptionalSchema<v.NullableSchema<v.VariantSchema<"type", [v.ObjectSchema<{
1100
+ readonly icon: v.OptionalSchema<v.NullableSchema<v.VariantSchema<"type", [v.LooseObjectSchema<{
1101
+ readonly type: v.LiteralSchema<"icon", undefined>;
1102
+ readonly icon: v.LooseObjectSchema<{
1103
+ readonly name: v.StringSchema<undefined>;
1104
+ readonly color: v.OptionalSchema<v.GenericSchema<import("../icons.js").NotionIconColor>, undefined>;
1105
+ }, undefined>;
1106
+ }, undefined>, v.ObjectSchema<{
1101
1107
  readonly type: v.LiteralSchema<"emoji", undefined>;
1102
1108
  readonly emoji: v.StringSchema<undefined>;
1103
1109
  }, undefined>, v.ObjectSchema<{
@@ -1356,10 +1362,6 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
1356
1362
  readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
1357
1363
  readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1358
1364
  }, undefined>, undefined>;
1359
- }, undefined>, v.ObjectSchema<{
1360
- readonly id: v.StringSchema<undefined>;
1361
- readonly type: v.LiteralSchema<"last_visited_time", undefined>;
1362
- readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1363
1365
  }, undefined>, v.ObjectSchema<{
1364
1366
  readonly id: v.StringSchema<undefined>;
1365
1367
  readonly type: v.LiteralSchema<"unique_id", undefined>;
@@ -1395,10 +1397,15 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
1395
1397
  readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
1396
1398
  readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1397
1399
  }, undefined>, undefined>, null>;
1398
- readonly last_visited_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
1399
1400
  readonly created_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
1400
1401
  readonly last_edited_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
1401
- readonly icon: v.OptionalSchema<v.NullableSchema<v.VariantSchema<"type", [v.ObjectSchema<{
1402
+ readonly icon: v.OptionalSchema<v.NullableSchema<v.VariantSchema<"type", [v.LooseObjectSchema<{
1403
+ readonly type: v.LiteralSchema<"icon", undefined>;
1404
+ readonly icon: v.LooseObjectSchema<{
1405
+ readonly name: v.StringSchema<undefined>;
1406
+ readonly color: v.OptionalSchema<v.GenericSchema<import("../icons.js").NotionIconColor>, undefined>;
1407
+ }, undefined>;
1408
+ }, undefined>, v.ObjectSchema<{
1402
1409
  readonly type: v.LiteralSchema<"emoji", undefined>;
1403
1410
  readonly emoji: v.StringSchema<undefined>;
1404
1411
  }, undefined>, v.ObjectSchema<{
@@ -1657,10 +1664,6 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
1657
1664
  readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
1658
1665
  readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1659
1666
  }, undefined>, undefined>;
1660
- }, undefined>, v.ObjectSchema<{
1661
- readonly id: v.StringSchema<undefined>;
1662
- readonly type: v.LiteralSchema<"last_visited_time", undefined>;
1663
- readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1664
1667
  }, undefined>, v.ObjectSchema<{
1665
1668
  readonly id: v.StringSchema<undefined>;
1666
1669
  readonly type: v.LiteralSchema<"unique_id", undefined>;
@@ -1696,10 +1699,15 @@ export declare const hostToSandboxMessageSchema: v.VariantSchema<"type", [v.Vari
1696
1699
  readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
1697
1700
  readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1698
1701
  }, undefined>, undefined>, null>;
1699
- readonly last_visited_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
1700
1702
  readonly created_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
1701
1703
  readonly last_edited_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
1702
- readonly icon: v.OptionalSchema<v.NullableSchema<v.VariantSchema<"type", [v.ObjectSchema<{
1704
+ readonly icon: v.OptionalSchema<v.NullableSchema<v.VariantSchema<"type", [v.LooseObjectSchema<{
1705
+ readonly type: v.LiteralSchema<"icon", undefined>;
1706
+ readonly icon: v.LooseObjectSchema<{
1707
+ readonly name: v.StringSchema<undefined>;
1708
+ readonly color: v.OptionalSchema<v.GenericSchema<import("../icons.js").NotionIconColor>, undefined>;
1709
+ }, undefined>;
1710
+ }, undefined>, v.ObjectSchema<{
1703
1711
  readonly type: v.LiteralSchema<"emoji", undefined>;
1704
1712
  readonly emoji: v.StringSchema<undefined>;
1705
1713
  }, undefined>, v.ObjectSchema<{
@@ -1822,12 +1830,23 @@ export declare const hostToSandboxMessageWithProtocol3To5CompatibilitySchema: v.
1822
1830
  readonly properties: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
1823
1831
  readonly name: v.StringSchema<undefined>;
1824
1832
  readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1825
- readonly type: v.PicklistSchema<readonly ["title", "rich_text", "number", "checkbox", "url", "email", "phone_number", "select", "multi_select", "status", "date", "people", "files", "unique_id", "relation", "place", "formula", "rollup", "button", "verification", "last_visited_time", "location", "created_time", "last_edited_time", "created_by", "last_edited_by"], undefined>;
1833
+ readonly type: v.PicklistSchema<readonly ["title", "rich_text", "number", "checkbox", "url", "email", "phone_number", "select", "multi_select", "status", "date", "people", "files", "unique_id", "relation", "place", "formula", "rollup", "button", "verification", "location", "created_time", "last_edited_time", "created_by", "last_edited_by"], undefined>;
1826
1834
  }, undefined>, undefined>, {}>;
1827
1835
  }, undefined>, undefined>, {}>;
1828
- readonly capabilities: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1829
- readonly capability: v.StringSchema<undefined>;
1830
- readonly resource: v.StringSchema<undefined>;
1836
+ readonly pages: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
1837
+ readonly name: v.StringSchema<undefined>;
1838
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1839
+ readonly icon: v.OptionalSchema<v.VariantSchema<"type", [v.ObjectSchema<{
1840
+ readonly type: v.LiteralSchema<"emoji", undefined>;
1841
+ readonly emoji: v.StringSchema<undefined>;
1842
+ }, undefined>, v.ObjectSchema<{
1843
+ readonly type: v.LiteralSchema<"external", undefined>;
1844
+ readonly url: v.StringSchema<undefined>;
1845
+ }, undefined>], undefined>, undefined>;
1846
+ }, undefined>, undefined>, undefined>;
1847
+ readonly grants: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1848
+ readonly action: v.StringSchema<undefined>;
1849
+ readonly resource: v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.MinLengthAction<string[], 1, undefined>]>], undefined>;
1831
1850
  }, undefined>, undefined>, undefined>;
1832
1851
  }, undefined>;
1833
1852
  readonly dataSources: v.ObjectSchema<{
@@ -1948,10 +1967,6 @@ export declare const hostToSandboxMessageWithProtocol3To5CompatibilitySchema: v.
1948
1967
  readonly name: v.StringSchema<undefined>;
1949
1968
  readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1950
1969
  readonly type: v.LiteralSchema<"verification", undefined>;
1951
- }, undefined>, v.ObjectSchema<{
1952
- readonly name: v.StringSchema<undefined>;
1953
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1954
- readonly type: v.LiteralSchema<"last_visited_time", undefined>;
1955
1970
  }, undefined>, v.ObjectSchema<{
1956
1971
  readonly name: v.StringSchema<undefined>;
1957
1972
  readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
@@ -2181,10 +2196,6 @@ export declare const hostToSandboxMessageWithProtocol3To5CompatibilitySchema: v.
2181
2196
  readonly name: v.StringSchema<undefined>;
2182
2197
  readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2183
2198
  readonly type: v.LiteralSchema<"verification", undefined>;
2184
- }, undefined>, v.ObjectSchema<{
2185
- readonly name: v.StringSchema<undefined>;
2186
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2187
- readonly type: v.LiteralSchema<"last_visited_time", undefined>;
2188
2199
  }, undefined>, v.ObjectSchema<{
2189
2200
  readonly name: v.StringSchema<undefined>;
2190
2201
  readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
@@ -2293,6 +2304,7 @@ export declare const hostToSandboxMessageWithProtocol3To5CompatibilitySchema: v.
2293
2304
  }, undefined>;
2294
2305
  }, undefined>], undefined>, v.ObjectSchema<{
2295
2306
  readonly type: v.LiteralSchema<"invalidSandboxMessage", undefined>;
2307
+ readonly requestId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2296
2308
  readonly reason: v.StringSchema<undefined>;
2297
2309
  }, undefined>, v.VariantSchema<"status", [v.ObjectSchema<{
2298
2310
  readonly type: v.LiteralSchema<"queryDataSourceResult", undefined>;
@@ -2505,10 +2517,6 @@ export declare const hostToSandboxMessageWithProtocol3To5CompatibilitySchema: v.
2505
2517
  readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
2506
2518
  readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2507
2519
  }, undefined>, undefined>;
2508
- }, undefined>, v.ObjectSchema<{
2509
- readonly id: v.StringSchema<undefined>;
2510
- readonly type: v.LiteralSchema<"last_visited_time", undefined>;
2511
- readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2512
2520
  }, undefined>, v.ObjectSchema<{
2513
2521
  readonly id: v.StringSchema<undefined>;
2514
2522
  readonly type: v.LiteralSchema<"unique_id", undefined>;
@@ -2544,10 +2552,15 @@ export declare const hostToSandboxMessageWithProtocol3To5CompatibilitySchema: v.
2544
2552
  readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
2545
2553
  readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2546
2554
  }, undefined>, undefined>, null>;
2547
- readonly last_visited_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
2548
2555
  readonly created_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
2549
2556
  readonly last_edited_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
2550
- readonly icon: v.OptionalSchema<v.NullableSchema<v.VariantSchema<"type", [v.ObjectSchema<{
2557
+ readonly icon: v.OptionalSchema<v.NullableSchema<v.VariantSchema<"type", [v.LooseObjectSchema<{
2558
+ readonly type: v.LiteralSchema<"icon", undefined>;
2559
+ readonly icon: v.LooseObjectSchema<{
2560
+ readonly name: v.StringSchema<undefined>;
2561
+ readonly color: v.OptionalSchema<v.GenericSchema<import("../icons.js").NotionIconColor>, undefined>;
2562
+ }, undefined>;
2563
+ }, undefined>, v.ObjectSchema<{
2551
2564
  readonly type: v.LiteralSchema<"emoji", undefined>;
2552
2565
  readonly emoji: v.StringSchema<undefined>;
2553
2566
  }, undefined>, v.ObjectSchema<{
@@ -2872,10 +2885,6 @@ export declare const hostToSandboxMessageWithProtocol3To5CompatibilitySchema: v.
2872
2885
  readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
2873
2886
  readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2874
2887
  }, undefined>, undefined>;
2875
- }, undefined>, v.ObjectSchema<{
2876
- readonly id: v.StringSchema<undefined>;
2877
- readonly type: v.LiteralSchema<"last_visited_time", undefined>;
2878
- readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2879
2888
  }, undefined>, v.ObjectSchema<{
2880
2889
  readonly id: v.StringSchema<undefined>;
2881
2890
  readonly type: v.LiteralSchema<"unique_id", undefined>;
@@ -2911,10 +2920,15 @@ export declare const hostToSandboxMessageWithProtocol3To5CompatibilitySchema: v.
2911
2920
  readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
2912
2921
  readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2913
2922
  }, undefined>, undefined>, null>;
2914
- readonly last_visited_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
2915
2923
  readonly created_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
2916
2924
  readonly last_edited_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
2917
- readonly icon: v.OptionalSchema<v.NullableSchema<v.VariantSchema<"type", [v.ObjectSchema<{
2925
+ readonly icon: v.OptionalSchema<v.NullableSchema<v.VariantSchema<"type", [v.LooseObjectSchema<{
2926
+ readonly type: v.LiteralSchema<"icon", undefined>;
2927
+ readonly icon: v.LooseObjectSchema<{
2928
+ readonly name: v.StringSchema<undefined>;
2929
+ readonly color: v.OptionalSchema<v.GenericSchema<import("../icons.js").NotionIconColor>, undefined>;
2930
+ }, undefined>;
2931
+ }, undefined>, v.ObjectSchema<{
2918
2932
  readonly type: v.LiteralSchema<"emoji", undefined>;
2919
2933
  readonly emoji: v.StringSchema<undefined>;
2920
2934
  }, undefined>, v.ObjectSchema<{
@@ -3159,10 +3173,6 @@ export declare const hostToSandboxMessageWithProtocol3To5CompatibilitySchema: v.
3159
3173
  readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
3160
3174
  readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3161
3175
  }, undefined>, undefined>;
3162
- }, undefined>, v.ObjectSchema<{
3163
- readonly id: v.StringSchema<undefined>;
3164
- readonly type: v.LiteralSchema<"last_visited_time", undefined>;
3165
- readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
3166
3176
  }, undefined>, v.ObjectSchema<{
3167
3177
  readonly id: v.StringSchema<undefined>;
3168
3178
  readonly type: v.LiteralSchema<"unique_id", undefined>;
@@ -3190,7 +3200,13 @@ export declare const hostToSandboxMessageWithProtocol3To5CompatibilitySchema: v.
3190
3200
  }, undefined>], undefined>, undefined>;
3191
3201
  readonly created_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3192
3202
  readonly last_edited_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3193
- readonly icon: v.OptionalSchema<v.VariantSchema<"type", [v.ObjectSchema<{
3203
+ readonly icon: v.OptionalSchema<v.VariantSchema<"type", [v.LooseObjectSchema<{
3204
+ readonly type: v.LiteralSchema<"icon", undefined>;
3205
+ readonly icon: v.LooseObjectSchema<{
3206
+ readonly name: v.StringSchema<undefined>;
3207
+ readonly color: v.OptionalSchema<v.GenericSchema<import("../icons.js").NotionIconColor>, undefined>;
3208
+ }, undefined>;
3209
+ }, undefined>, v.ObjectSchema<{
3194
3210
  readonly type: v.LiteralSchema<"emoji", undefined>;
3195
3211
  readonly emoji: v.StringSchema<undefined>;
3196
3212
  }, undefined>, v.ObjectSchema<{
@@ -3449,10 +3465,6 @@ export declare const hostToSandboxMessageWithProtocol3To5CompatibilitySchema: v.
3449
3465
  readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
3450
3466
  readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3451
3467
  }, undefined>, undefined>;
3452
- }, undefined>, v.ObjectSchema<{
3453
- readonly id: v.StringSchema<undefined>;
3454
- readonly type: v.LiteralSchema<"last_visited_time", undefined>;
3455
- readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
3456
3468
  }, undefined>, v.ObjectSchema<{
3457
3469
  readonly id: v.StringSchema<undefined>;
3458
3470
  readonly type: v.LiteralSchema<"unique_id", undefined>;
@@ -3488,10 +3500,15 @@ export declare const hostToSandboxMessageWithProtocol3To5CompatibilitySchema: v.
3488
3500
  readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
3489
3501
  readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3490
3502
  }, undefined>, undefined>, null>;
3491
- readonly last_visited_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
3492
3503
  readonly created_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
3493
3504
  readonly last_edited_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
3494
- readonly icon: v.OptionalSchema<v.NullableSchema<v.VariantSchema<"type", [v.ObjectSchema<{
3505
+ readonly icon: v.OptionalSchema<v.NullableSchema<v.VariantSchema<"type", [v.LooseObjectSchema<{
3506
+ readonly type: v.LiteralSchema<"icon", undefined>;
3507
+ readonly icon: v.LooseObjectSchema<{
3508
+ readonly name: v.StringSchema<undefined>;
3509
+ readonly color: v.OptionalSchema<v.GenericSchema<import("../icons.js").NotionIconColor>, undefined>;
3510
+ }, undefined>;
3511
+ }, undefined>, v.ObjectSchema<{
3495
3512
  readonly type: v.LiteralSchema<"emoji", undefined>;
3496
3513
  readonly emoji: v.StringSchema<undefined>;
3497
3514
  }, undefined>, v.ObjectSchema<{
@@ -3736,10 +3753,6 @@ export declare const hostToSandboxMessageWithProtocol3To5CompatibilitySchema: v.
3736
3753
  readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
3737
3754
  readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3738
3755
  }, undefined>, undefined>;
3739
- }, undefined>, v.ObjectSchema<{
3740
- readonly id: v.StringSchema<undefined>;
3741
- readonly type: v.LiteralSchema<"last_visited_time", undefined>;
3742
- readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
3743
3756
  }, undefined>, v.ObjectSchema<{
3744
3757
  readonly id: v.StringSchema<undefined>;
3745
3758
  readonly type: v.LiteralSchema<"unique_id", undefined>;
@@ -3767,7 +3780,13 @@ export declare const hostToSandboxMessageWithProtocol3To5CompatibilitySchema: v.
3767
3780
  }, undefined>], undefined>, undefined>;
3768
3781
  readonly created_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3769
3782
  readonly last_edited_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3770
- readonly icon: v.OptionalSchema<v.VariantSchema<"type", [v.ObjectSchema<{
3783
+ readonly icon: v.OptionalSchema<v.VariantSchema<"type", [v.LooseObjectSchema<{
3784
+ readonly type: v.LiteralSchema<"icon", undefined>;
3785
+ readonly icon: v.LooseObjectSchema<{
3786
+ readonly name: v.StringSchema<undefined>;
3787
+ readonly color: v.OptionalSchema<v.GenericSchema<import("../icons.js").NotionIconColor>, undefined>;
3788
+ }, undefined>;
3789
+ }, undefined>, v.ObjectSchema<{
3771
3790
  readonly type: v.LiteralSchema<"emoji", undefined>;
3772
3791
  readonly emoji: v.StringSchema<undefined>;
3773
3792
  }, undefined>, v.ObjectSchema<{
@@ -4026,10 +4045,6 @@ export declare const hostToSandboxMessageWithProtocol3To5CompatibilitySchema: v.
4026
4045
  readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
4027
4046
  readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
4028
4047
  }, undefined>, undefined>;
4029
- }, undefined>, v.ObjectSchema<{
4030
- readonly id: v.StringSchema<undefined>;
4031
- readonly type: v.LiteralSchema<"last_visited_time", undefined>;
4032
- readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
4033
4048
  }, undefined>, v.ObjectSchema<{
4034
4049
  readonly id: v.StringSchema<undefined>;
4035
4050
  readonly type: v.LiteralSchema<"unique_id", undefined>;
@@ -4065,10 +4080,15 @@ export declare const hostToSandboxMessageWithProtocol3To5CompatibilitySchema: v.
4065
4080
  readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
4066
4081
  readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
4067
4082
  }, undefined>, undefined>, null>;
4068
- readonly last_visited_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
4069
4083
  readonly created_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
4070
4084
  readonly last_edited_time: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, null>;
4071
- readonly icon: v.OptionalSchema<v.NullableSchema<v.VariantSchema<"type", [v.ObjectSchema<{
4085
+ readonly icon: v.OptionalSchema<v.NullableSchema<v.VariantSchema<"type", [v.LooseObjectSchema<{
4086
+ readonly type: v.LiteralSchema<"icon", undefined>;
4087
+ readonly icon: v.LooseObjectSchema<{
4088
+ readonly name: v.StringSchema<undefined>;
4089
+ readonly color: v.OptionalSchema<v.GenericSchema<import("../icons.js").NotionIconColor>, undefined>;
4090
+ }, undefined>;
4091
+ }, undefined>, v.ObjectSchema<{
4072
4092
  readonly type: v.LiteralSchema<"emoji", undefined>;
4073
4093
  readonly emoji: v.StringSchema<undefined>;
4074
4094
  }, undefined>, v.ObjectSchema<{
@@ -4313,10 +4333,6 @@ export declare const hostToSandboxMessageWithProtocol3To5CompatibilitySchema: v.
4313
4333
  readonly table: v.PicklistSchema<["notion_user", "bot", "organization_bot"], undefined>;
4314
4334
  readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
4315
4335
  }, undefined>, undefined>;
4316
- }, undefined>, v.ObjectSchema<{
4317
- readonly id: v.StringSchema<undefined>;
4318
- readonly type: v.LiteralSchema<"last_visited_time", undefined>;
4319
- readonly last_visited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
4320
4336
  }, undefined>, v.ObjectSchema<{
4321
4337
  readonly id: v.StringSchema<undefined>;
4322
4338
  readonly type: v.LiteralSchema<"unique_id", undefined>;
@@ -4344,7 +4360,13 @@ export declare const hostToSandboxMessageWithProtocol3To5CompatibilitySchema: v.
4344
4360
  }, undefined>], undefined>, undefined>;
4345
4361
  readonly created_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
4346
4362
  readonly last_edited_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
4347
- readonly icon: v.OptionalSchema<v.VariantSchema<"type", [v.ObjectSchema<{
4363
+ readonly icon: v.OptionalSchema<v.VariantSchema<"type", [v.LooseObjectSchema<{
4364
+ readonly type: v.LiteralSchema<"icon", undefined>;
4365
+ readonly icon: v.LooseObjectSchema<{
4366
+ readonly name: v.StringSchema<undefined>;
4367
+ readonly color: v.OptionalSchema<v.GenericSchema<import("../icons.js").NotionIconColor>, undefined>;
4368
+ }, undefined>;
4369
+ }, undefined>, v.ObjectSchema<{
4348
4370
  readonly type: v.LiteralSchema<"emoji", undefined>;
4349
4371
  readonly emoji: v.StringSchema<undefined>;
4350
4372
  }, undefined>, v.ObjectSchema<{
@@ -6,6 +6,8 @@ import * as v from "valibot";
6
6
  */
7
7
  export declare const invalidHostMessageSchema: v.ObjectSchema<{
8
8
  readonly type: v.LiteralSchema<"invalidHostMessage", undefined>;
9
+ /** Identifies the rejected request or response, when readable. */
10
+ readonly requestId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
9
11
  /**
10
12
  * A human-readable string intended for sandbox-side logging. It has no structured contract.
11
13
  */
@@ -6,6 +6,8 @@ import * as v from "valibot";
6
6
  */
7
7
  export const invalidHostMessageSchema = v.object({
8
8
  type: v.literal("invalidHostMessage"),
9
+ /** Identifies the rejected request or response, when readable. */
10
+ requestId: v.optional(v.string()),
9
11
  /**
10
12
  * A human-readable string intended for sandbox-side logging. It has no structured contract.
11
13
  */
@@ -6,6 +6,8 @@ import * as v from "valibot";
6
6
  */
7
7
  export declare const invalidSandboxMessageSchema: v.ObjectSchema<{
8
8
  readonly type: v.LiteralSchema<"invalidSandboxMessage", undefined>;
9
+ /** Identifies the rejected request or response, when readable. */
10
+ readonly requestId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
9
11
  /**
10
12
  * A human-readable string intended for sandbox-side logging. It has no structured contract.
11
13
  */
@@ -6,6 +6,8 @@ import * as v from "valibot";
6
6
  */
7
7
  export const invalidSandboxMessageSchema = v.object({
8
8
  type: v.literal("invalidSandboxMessage"),
9
+ /** Identifies the rejected request or response, when readable. */
10
+ requestId: v.optional(v.string()),
9
11
  /**
10
12
  * A human-readable string intended for sandbox-side logging. It has no structured contract.
11
13
  */