@notionhq/custom-blocks-host 0.4.2 → 0.4.3

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 (418) hide show
  1. package/dist/browser.js +1 -1
  2. package/dist/compatibility/normalizeHostToSandboxMessage.js +4 -4
  3. package/dist/compatibility/normalizeSandboxToHostMessage.d.ts +232 -8
  4. package/dist/compatibility/normalizeSandboxToHostMessage.d.ts.map +1 -1
  5. package/dist/compatibility/{pageResult.d.ts → pages/pageResult.d.ts} +1 -1
  6. package/dist/compatibility/pages/pageResult.d.ts.map +1 -0
  7. package/dist/compatibility/{pageWithNullTextFallbackProperties.d.ts → pages/toPageWithNullTextFallbackProperties.d.ts} +2 -2
  8. package/dist/compatibility/pages/toPageWithNullTextFallbackProperties.d.ts.map +1 -0
  9. package/dist/compatibility/{pageWithNullTextFallbackProperties.js → pages/toPageWithNullTextFallbackProperties.js} +1 -1
  10. package/dist/compatibility/{addMetadataReadSchemasForProtocol3To4.d.ts → protocol3To4/addMetadataReadSchemasForProtocol3To4.d.ts} +96 -90
  11. package/dist/compatibility/{addMetadataReadSchemasForProtocol3To4.d.ts.map → protocol3To4/addMetadataReadSchemasForProtocol3To4.d.ts.map} +1 -1
  12. package/dist/compatibility/{addMetadataReadSchemasForProtocol3To4.js → protocol3To4/addMetadataReadSchemasForProtocol3To4.js} +1 -1
  13. package/dist/compatibility/{normalizePageResultsForProtocol3To5.d.ts → protocol3To5/normalizePageResultsForProtocol3To5.d.ts} +2 -2
  14. package/dist/compatibility/protocol3To5/normalizePageResultsForProtocol3To5.d.ts.map +1 -0
  15. package/dist/compatibility/{normalizePageResultsForProtocol3To5.js → protocol3To5/normalizePageResultsForProtocol3To5.js} +3 -2
  16. package/dist/compatibility/protocol3To5/toDateTimeValueForProtocol3To5.d.ts +9 -0
  17. package/dist/compatibility/protocol3To5/toDateTimeValueForProtocol3To5.d.ts.map +1 -0
  18. package/dist/compatibility/protocol3To5/toDateTimeValueForProtocol3To5.js +21 -0
  19. package/dist/compatibility/protocol3To5/toPageForProtocol3To5.d.ts +12 -0
  20. package/dist/compatibility/protocol3To5/toPageForProtocol3To5.d.ts.map +1 -0
  21. package/dist/compatibility/protocol3To5/toPageForProtocol3To5.js +20 -0
  22. package/dist/compatibility/protocol3To5/toPropertyValueForProtocol3To5.d.ts +10 -0
  23. package/dist/compatibility/protocol3To5/toPropertyValueForProtocol3To5.d.ts.map +1 -0
  24. package/dist/compatibility/{pageForProtocol3To5.js → protocol3To5/toPropertyValueForProtocol3To5.js} +25 -95
  25. package/dist/compatibility/{pageForProtocol3To5.d.ts → protocol3To5/toQueryPageForProtocol3To5.d.ts} +11 -21
  26. package/dist/compatibility/protocol3To5/toQueryPageForProtocol3To5.d.ts.map +1 -0
  27. package/dist/compatibility/protocol3To5/toQueryPageForProtocol3To5.js +32 -0
  28. package/dist/compatibility/{normalizePageResultsForProtocol6.d.ts → protocol6/normalizePageResultsForProtocol6.d.ts} +2 -2
  29. package/dist/compatibility/protocol6/normalizePageResultsForProtocol6.d.ts.map +1 -0
  30. package/dist/compatibility/{normalizePageResultsForProtocol6.js → protocol6/normalizePageResultsForProtocol6.js} +1 -1
  31. package/dist/context/initialState.d.ts +1809 -0
  32. package/dist/context/initialState.d.ts.map +1 -0
  33. package/dist/context/initialState.js +34 -0
  34. package/dist/context/resize.d.ts +4 -0
  35. package/dist/context/resize.d.ts.map +1 -0
  36. package/dist/createCustomBlockHost.d.ts +13 -9
  37. package/dist/createCustomBlockHost.d.ts.map +1 -1
  38. package/dist/createCustomBlockHost.js +37 -24
  39. package/dist/{autoBindProperties.d.ts → dataSources/bindings/getAutoBoundPropertyIdsByKey.d.ts} +2 -2
  40. package/dist/dataSources/bindings/getAutoBoundPropertyIdsByKey.d.ts.map +1 -0
  41. package/dist/{dateValue.d.ts → dataSources/properties/toNotionDateValue.d.ts} +3 -3
  42. package/dist/dataSources/properties/toNotionDateValue.d.ts.map +1 -0
  43. package/dist/{queries → dataSources/queries}/querySubscriptions.d.ts +2 -2
  44. package/dist/dataSources/queries/querySubscriptions.d.ts.map +1 -0
  45. package/dist/dataSources/types.d.ts +14 -0
  46. package/dist/dataSources/types.d.ts.map +1 -0
  47. package/dist/dataSources/validation/validateQueryDataSourceFilter.d.ts +5 -0
  48. package/dist/dataSources/validation/validateQueryDataSourceFilter.d.ts.map +1 -0
  49. package/dist/{queries → dataSources/validation}/validateQueryDataSourceFilter.js +2 -2
  50. package/dist/dataSources/validation/validateQueryDataSourceSorts.d.ts +8 -0
  51. package/dist/dataSources/validation/validateQueryDataSourceSorts.d.ts.map +1 -0
  52. package/dist/{queries → dataSources/validation}/validateQueryDataSourceSorts.js +2 -2
  53. package/dist/index.d.ts +14 -7
  54. package/dist/index.d.ts.map +1 -1
  55. package/dist/index.js +4 -4
  56. package/dist/lifecycle/{initializationController.d.ts → createInitializationController.d.ts} +7 -6
  57. package/dist/lifecycle/createInitializationController.d.ts.map +1 -0
  58. package/dist/lifecycle/{initializationController.js → createInitializationController.js} +9 -4
  59. package/dist/lifecycle/errors/contextUnavailableError.d.ts +3 -0
  60. package/dist/lifecycle/errors/contextUnavailableError.d.ts.map +1 -0
  61. package/dist/lifecycle/errors/contextUnavailableError.js +8 -0
  62. package/dist/lifecycle/errors/initialStateTimeoutError.d.ts +3 -0
  63. package/dist/lifecycle/errors/initialStateTimeoutError.d.ts.map +1 -0
  64. package/dist/lifecycle/errors/initialStateTimeoutError.js +8 -0
  65. package/dist/lifecycle/errors/invalidConnectPayloadError.d.ts +3 -0
  66. package/dist/lifecycle/errors/invalidConnectPayloadError.d.ts.map +1 -0
  67. package/dist/lifecycle/errors/invalidConnectPayloadError.js +8 -0
  68. package/dist/lifecycle/errors/invalidInitResultPayloadError.d.ts +3 -0
  69. package/dist/lifecycle/errors/invalidInitResultPayloadError.d.ts.map +1 -0
  70. package/dist/lifecycle/errors/invalidInitResultPayloadError.js +8 -0
  71. package/dist/lifecycle/errors/invalidLocalPreviewUrlError.d.ts +3 -0
  72. package/dist/lifecycle/errors/invalidLocalPreviewUrlError.d.ts.map +1 -0
  73. package/dist/lifecycle/errors/invalidLocalPreviewUrlError.js +7 -0
  74. package/dist/lifecycle/errors/invalidPropertyBindingError.d.ts +3 -0
  75. package/dist/lifecycle/errors/invalidPropertyBindingError.d.ts.map +1 -0
  76. package/dist/lifecycle/errors/invalidPropertyBindingError.js +9 -0
  77. package/dist/lifecycle/errors/invalidProtocolVersionError.d.ts +5 -0
  78. package/dist/lifecycle/errors/invalidProtocolVersionError.d.ts.map +1 -0
  79. package/dist/lifecycle/errors/invalidProtocolVersionError.js +9 -0
  80. package/dist/lifecycle/errors/missingDataSourceBindingError.d.ts +3 -0
  81. package/dist/lifecycle/errors/missingDataSourceBindingError.d.ts.map +1 -0
  82. package/dist/lifecycle/errors/missingDataSourceBindingError.js +8 -0
  83. package/dist/lifecycle/errors/missingPropertyBindingError.d.ts +3 -0
  84. package/dist/lifecycle/errors/missingPropertyBindingError.d.ts.map +1 -0
  85. package/dist/lifecycle/errors/missingPropertyBindingError.js +8 -0
  86. package/dist/lifecycle/errors/noConnectError.d.ts +8 -0
  87. package/dist/lifecycle/errors/noConnectError.d.ts.map +1 -0
  88. package/dist/lifecycle/errors/noConnectError.js +13 -0
  89. package/dist/lifecycle/errors/noInitResultError.d.ts +3 -0
  90. package/dist/lifecycle/errors/noInitResultError.d.ts.map +1 -0
  91. package/dist/lifecycle/errors/noInitResultError.js +8 -0
  92. package/dist/lifecycle/errors/unknownInitializationError.d.ts +3 -0
  93. package/dist/lifecycle/errors/unknownInitializationError.d.ts.map +1 -0
  94. package/dist/lifecycle/errors/unknownInitializationError.js +8 -0
  95. package/dist/lifecycle/errors/unsupportedProtocolVersionError.d.ts +6 -0
  96. package/dist/lifecycle/errors/unsupportedProtocolVersionError.d.ts.map +1 -0
  97. package/dist/lifecycle/errors/unsupportedProtocolVersionError.js +9 -0
  98. package/dist/lifecycle/isAllowedLocalPreviewUrl.d.ts.map +1 -0
  99. package/dist/{isAllowedLocalPreviewUrl.js → lifecycle/isAllowedLocalPreviewUrl.js} +1 -1
  100. package/dist/lifecycle/{protocolVersion.d.ts → isValidBridgeProtocolVersion.d.ts} +1 -1
  101. package/dist/lifecycle/isValidBridgeProtocolVersion.d.ts.map +1 -0
  102. package/dist/lifecycle/types.d.ts +16 -1849
  103. package/dist/lifecycle/types.d.ts.map +1 -1
  104. package/dist/lifecycle/types.js +1 -41
  105. package/dist/{lifecycle → manifest}/resolveManifest.d.ts +2 -2
  106. package/dist/manifest/resolveManifest.d.ts.map +1 -0
  107. package/dist/manifest/types.d.ts +59 -0
  108. package/dist/manifest/types.d.ts.map +1 -0
  109. package/dist/manifest/types.js +10 -0
  110. package/dist/messages/{sandboxMessageRouter.d.ts → createSandboxMessageRouter.d.ts} +15 -15
  111. package/dist/messages/createSandboxMessageRouter.d.ts.map +1 -0
  112. package/dist/messages/{sandboxMessageRouter.js → createSandboxMessageRouter.js} +5 -4
  113. package/dist/messages/{invalidSandboxMessage.d.ts → getInvalidSandboxMessageResponse.d.ts} +1 -1
  114. package/dist/messages/getInvalidSandboxMessageResponse.d.ts.map +1 -0
  115. package/dist/messages/handlers.d.ts +26 -0
  116. package/dist/messages/handlers.d.ts.map +1 -0
  117. package/dist/messages/handlers.js +1 -0
  118. package/dist/messages/logging.d.ts +2 -0
  119. package/dist/messages/logging.d.ts.map +1 -0
  120. package/dist/messages/logging.js +1 -0
  121. package/dist/navigation/parseExternalUrl.d.ts.map +1 -0
  122. package/dist/navigation/types.d.ts +9 -0
  123. package/dist/navigation/types.d.ts.map +1 -0
  124. package/dist/navigation/types.js +1 -0
  125. package/dist/pages/types.d.ts +20 -0
  126. package/dist/pages/types.d.ts.map +1 -0
  127. package/dist/pages/types.js +1 -0
  128. package/dist/protocol/{messages/updatePage.d.ts → compatibility/protocol3To5/bridgePage.d.ts} +32 -22
  129. package/dist/protocol/compatibility/protocol3To5/bridgePage.js +21 -0
  130. package/dist/protocol/{dataSources → compatibility/protocol3To5}/dataSourcePage.js +1 -1
  131. package/dist/protocol/{dataSources → compatibility/protocol3To5}/dataSourceValue.js +2 -2
  132. package/dist/protocol/context/containingPage.d.ts +31 -0
  133. package/dist/protocol/context/containingPage.js +18 -0
  134. package/dist/protocol/{messages → context/messages}/pageChanged.js +1 -1
  135. package/dist/protocol/{parent.d.ts → context/parent.d.ts} +11 -1
  136. package/dist/protocol/context/parent.js +31 -0
  137. package/dist/protocol/dataSources/bridgeDataSourceBinding.d.ts +164 -0
  138. package/dist/protocol/dataSources/bridgeDataSourceBinding.js +25 -0
  139. package/dist/protocol/dataSources/bridgeDataSourceBindings.d.ts +148 -0
  140. package/dist/protocol/dataSources/bridgeDataSourceBindings.js +3 -0
  141. package/dist/protocol/dataSources/collectionPointer.d.ts +7 -0
  142. package/dist/protocol/dataSources/collectionPointer.js +7 -0
  143. package/dist/protocol/dataSources/collectionSchema.d.ts +144 -0
  144. package/dist/protocol/dataSources/collectionSchema.js +12 -0
  145. package/dist/protocol/dataSources/errors.d.ts +2 -2
  146. package/dist/protocol/dataSources/filters/bridgeDataSourceFilter.d.ts +505 -0
  147. package/dist/protocol/dataSources/filters/bridgeDataSourceFilter.js +8 -0
  148. package/dist/protocol/dataSources/filters/bridgeDataSourceFilterCondition.d.ts +253 -0
  149. package/dist/protocol/dataSources/filters/bridgeDataSourceFilterCondition.js +69 -0
  150. package/dist/protocol/dataSources/filters/bridgeDataSourceSort.d.ts +11 -0
  151. package/dist/protocol/dataSources/filters/bridgeDataSourceSort.js +8 -0
  152. package/dist/protocol/dataSources/filters/checkboxFilterOperator.d.ts +7 -0
  153. package/dist/protocol/dataSources/filters/checkboxFilterOperator.js +5 -0
  154. package/dist/protocol/dataSources/filters/containsFilterOperator.d.ts +13 -0
  155. package/dist/protocol/dataSources/filters/containsFilterOperator.js +9 -0
  156. package/dist/protocol/dataSources/filters/createdByFilterOperator.d.ts +17 -0
  157. package/dist/protocol/dataSources/filters/createdByFilterOperator.js +11 -0
  158. package/dist/protocol/dataSources/filters/dateFilterOperator.d.ts +47 -0
  159. package/dist/protocol/dataSources/filters/dateFilterOperator.js +73 -0
  160. package/dist/protocol/dataSources/filters/emptyOperator.d.ts +6 -0
  161. package/dist/protocol/dataSources/filters/emptyOperator.js +5 -0
  162. package/dist/protocol/dataSources/filters/numberFilterOperator.d.ts +19 -0
  163. package/dist/protocol/dataSources/filters/numberFilterOperator.js +11 -0
  164. package/dist/protocol/dataSources/filters/optionFilterOperator.d.ts +11 -0
  165. package/dist/protocol/dataSources/filters/optionFilterOperator.js +8 -0
  166. package/dist/protocol/dataSources/filters/peopleFilterOperator.d.ts +23 -0
  167. package/dist/protocol/dataSources/filters/peopleFilterOperator.js +11 -0
  168. package/dist/protocol/dataSources/filters/relationFilterOperator.d.ts +11 -0
  169. package/dist/protocol/dataSources/filters/relationFilterOperator.js +12 -0
  170. package/dist/protocol/dataSources/filters/statusFilterOperator.d.ts +15 -0
  171. package/dist/protocol/dataSources/filters/statusFilterOperator.js +7 -0
  172. package/dist/protocol/dataSources/filters/statusGroupFilterOperator.d.ts +9 -0
  173. package/dist/protocol/dataSources/filters/statusGroupFilterOperator.js +18 -0
  174. package/dist/protocol/dataSources/filters/stringOrStringArray.d.ts +2 -0
  175. package/dist/protocol/dataSources/filters/stringOrStringArray.js +5 -0
  176. package/dist/protocol/dataSources/filters/textFilterOperator.d.ts +19 -0
  177. package/dist/protocol/dataSources/filters/textFilterOperator.js +11 -0
  178. package/dist/protocol/dataSources/makeBridgeDataSourceBinding.d.ts +6 -0
  179. package/dist/protocol/dataSources/makeBridgeDataSourceBinding.js +6 -0
  180. package/dist/protocol/{messages → dataSources/messages}/dataSourcesChanged.d.ts +1 -0
  181. package/dist/protocol/{messages → dataSources/messages}/dataSourcesChanged.js +2 -2
  182. package/dist/protocol/{messages/queryDataSourceResult.d.ts → dataSources/messages/queryDataSource.d.ts} +525 -2
  183. package/dist/protocol/{messages/queryDataSourceResult.js → dataSources/messages/queryDataSource.js} +22 -2
  184. package/dist/protocol/dataSources/notionDataSource.d.ts +309 -0
  185. package/dist/protocol/dataSources/notionDataSource.js +38 -0
  186. package/dist/protocol/dataSources/resolveDataSourceBinding.d.ts +32 -0
  187. package/dist/protocol/dataSources/resolveDataSourceBinding.js +33 -0
  188. package/dist/protocol/{messages → handshake}/connect.d.ts +4 -0
  189. package/dist/protocol/{messages → handshake}/connect.js +2 -2
  190. package/dist/protocol/{messages → handshake}/init.d.ts +6 -1
  191. package/dist/protocol/{messages → handshake}/init.js +10 -10
  192. package/dist/protocol/{messages → handshake}/initResult.d.ts +1 -1
  193. package/dist/protocol/{messages → handshake}/isInitHandshakeMessage.d.ts +2 -2
  194. package/dist/protocol/index.d.ts +150 -54
  195. package/dist/protocol/index.js +73 -54
  196. package/dist/protocol/manifest/capabilities.d.ts +37 -0
  197. package/dist/protocol/manifest/capabilities.js +13 -0
  198. package/dist/protocol/{manifest.d.ts → manifest/manifest.d.ts} +12 -2
  199. package/dist/protocol/{manifest.js → manifest/manifest.js} +8 -1
  200. package/dist/protocol/messages/hostToSandbox.d.ts +12 -0
  201. package/dist/protocol/messages/hostToSandbox.js +15 -15
  202. package/dist/protocol/messages/messagePayload.d.ts +1 -1
  203. package/dist/protocol/messages/sandboxToHost.d.ts +232 -8
  204. package/dist/protocol/messages/sandboxToHost.js +12 -12
  205. package/dist/protocol/{messages → navigation}/openExternalUrl.d.ts +1 -1
  206. package/dist/protocol/{messages/createPage.d.ts → pages/bridgePage.d.ts} +67 -65
  207. package/dist/protocol/pages/bridgePage.js +25 -0
  208. package/dist/protocol/pages/makeBridgePage.d.ts +4 -0
  209. package/dist/protocol/pages/makeBridgePage.js +12 -0
  210. package/dist/protocol/{messages/createPageResult.d.ts → pages/messages/createPage.d.ts} +500 -2
  211. package/dist/protocol/pages/messages/createPage.js +104 -0
  212. package/dist/protocol/{messages → pages/messages}/getPage.d.ts +2 -2
  213. package/dist/protocol/{messages → pages/messages}/getPage.js +4 -3
  214. package/dist/protocol/{messages → pages/messages}/openPage.d.ts +2 -2
  215. package/dist/protocol/{messages → pages/messages}/openPage.js +1 -1
  216. package/dist/protocol/{messages/updatePageResult.d.ts → pages/messages/updatePage.d.ts} +272 -2
  217. package/dist/protocol/{messages/updatePageResult.js → pages/messages/updatePage.js} +26 -2
  218. package/dist/protocol/pages/pageAppearance.d.ts +62 -0
  219. package/dist/protocol/pages/pageAppearance.js +34 -0
  220. package/dist/protocol/pages/properties/bridgePagePropertyMaps.d.ts +433 -0
  221. package/dist/protocol/pages/properties/bridgePagePropertyMaps.js +4 -0
  222. package/dist/protocol/pages/properties/bridgePagePropertyValue.d.ts +217 -0
  223. package/dist/protocol/pages/properties/bridgePagePropertyValue.js +144 -0
  224. package/dist/protocol/pages/properties/dateInput.d.ts +45 -0
  225. package/dist/protocol/pages/properties/dateInput.js +23 -0
  226. package/dist/protocol/pages/properties/fileInput.d.ts +16 -0
  227. package/dist/protocol/pages/properties/fileInput.js +16 -0
  228. package/dist/protocol/pages/properties/metadataActor.d.ts +6 -0
  229. package/dist/protocol/pages/properties/metadataActor.js +7 -0
  230. package/dist/protocol/pages/properties/placeInput.d.ts +10 -0
  231. package/dist/protocol/pages/properties/placeInput.js +10 -0
  232. package/dist/protocol/pages/properties/relationInput.d.ts +5 -0
  233. package/dist/protocol/pages/properties/relationInput.js +2 -0
  234. package/dist/protocol/pages/properties/richText.d.ts +3 -0
  235. package/dist/protocol/pages/properties/richText.js +2 -0
  236. package/dist/protocol/pages/properties/selectOption.d.ts +13 -0
  237. package/dist/protocol/pages/properties/selectOption.js +16 -0
  238. package/dist/protocol/pages/properties/userInput.d.ts +10 -0
  239. package/dist/protocol/pages/properties/userInput.js +13 -0
  240. package/dist/protocol/users/bridgeUser.d.ts +12 -0
  241. package/dist/protocol/users/bridgeUser.js +12 -0
  242. package/dist/protocol/users/{user.d.ts → bridgeUserList.d.ts} +2 -15
  243. package/dist/protocol/users/bridgeUserList.js +10 -0
  244. package/dist/protocol/users/makeBridgeUser.d.ts +4 -0
  245. package/dist/protocol/users/makeBridgeUser.js +11 -0
  246. package/dist/protocol/{messages → users/messages}/currentUserChanged.js +2 -2
  247. package/dist/protocol/{messages → users/messages}/getUser.d.ts +2 -2
  248. package/dist/protocol/{messages → users/messages}/getUser.js +3 -2
  249. package/dist/protocol/{messages → users/messages}/listUsers.d.ts +2 -2
  250. package/dist/protocol/{messages → users/messages}/listUsers.js +2 -2
  251. package/dist/protocol/users/userId.d.ts +3 -0
  252. package/dist/protocol/users/userId.js +2 -0
  253. package/dist/protocol/{errors.d.ts → utils/errors.d.ts} +6 -0
  254. package/dist/protocol/utils/errors.js +11 -0
  255. package/dist/protocol/utils/nullableStringSchema.d.ts +2 -0
  256. package/dist/protocol/utils/nullableStringSchema.js +2 -0
  257. package/dist/users/types.d.ts +9 -0
  258. package/dist/users/types.d.ts.map +1 -0
  259. package/dist/users/types.js +1 -0
  260. package/dist/utils/maybePromise.d.ts +2 -0
  261. package/dist/utils/maybePromise.d.ts.map +1 -0
  262. package/dist/utils/maybePromise.js +1 -0
  263. package/dist/utils/protocolVersion.d.ts.map +1 -0
  264. package/dist/utils/toNotionPageId.d.ts +3 -0
  265. package/dist/utils/toNotionPageId.d.ts.map +1 -0
  266. package/dist/{ids.js → utils/toNotionPageId.js} +1 -1
  267. package/dist/{utils.d.ts → utils/unreachable.d.ts} +1 -1
  268. package/dist/utils/unreachable.d.ts.map +1 -0
  269. package/docs/bridge/protocol.md +16 -1
  270. package/docs/bridge/versioning.md +2 -2
  271. package/docs/handlers.md +2 -2
  272. package/package.json +1 -1
  273. package/src/compatibility/normalizeHostToSandboxMessage.ts +4 -4
  274. package/src/compatibility/{pageWithNullTextFallbackProperties.ts → pages/toPageWithNullTextFallbackProperties.ts} +2 -2
  275. package/src/compatibility/{addMetadataReadSchemasForProtocol3To4.ts → protocol3To4/addMetadataReadSchemasForProtocol3To4.ts} +1 -1
  276. package/src/compatibility/{normalizePageResultsForProtocol3To5.ts → protocol3To5/normalizePageResultsForProtocol3To5.ts} +4 -6
  277. package/src/compatibility/protocol3To5/toDateTimeValueForProtocol3To5.ts +25 -0
  278. package/src/compatibility/protocol3To5/toPageForProtocol3To5.ts +29 -0
  279. package/src/compatibility/protocol3To5/toPropertyValueForProtocol3To5.ts +102 -0
  280. package/src/compatibility/protocol3To5/toQueryPageForProtocol3To5.ts +35 -0
  281. package/src/compatibility/{normalizePageResultsForProtocol6.ts → protocol6/normalizePageResultsForProtocol6.ts} +2 -2
  282. package/src/context/initialState.ts +65 -0
  283. package/src/context/resize.ts +4 -0
  284. package/src/createCustomBlockHost.ts +74 -73
  285. package/src/{autoBindProperties.ts → dataSources/bindings/getAutoBoundPropertyIdsByKey.ts} +1 -1
  286. package/src/{dateValue.ts → dataSources/properties/toNotionDateValue.ts} +2 -2
  287. package/src/{queries → dataSources/queries}/querySubscriptions.ts +2 -2
  288. package/src/dataSources/types.ts +26 -0
  289. package/src/{queries → dataSources/validation}/validateQueryDataSourceFilter.ts +11 -13
  290. package/src/{queries → dataSources/validation}/validateQueryDataSourceSorts.ts +6 -8
  291. package/src/index.ts +37 -27
  292. package/src/lifecycle/{initializationController.ts → createInitializationController.ts} +15 -20
  293. package/src/lifecycle/errors/contextUnavailableError.ts +10 -0
  294. package/src/lifecycle/errors/initialStateTimeoutError.ts +10 -0
  295. package/src/lifecycle/errors/invalidConnectPayloadError.ts +10 -0
  296. package/src/lifecycle/errors/invalidInitResultPayloadError.ts +10 -0
  297. package/src/lifecycle/errors/invalidLocalPreviewUrlError.ts +10 -0
  298. package/src/lifecycle/errors/invalidPropertyBindingError.ts +11 -0
  299. package/src/lifecycle/errors/invalidProtocolVersionError.ts +13 -0
  300. package/src/lifecycle/errors/missingDataSourceBindingError.ts +10 -0
  301. package/src/lifecycle/errors/missingPropertyBindingError.ts +10 -0
  302. package/src/lifecycle/errors/noConnectError.ts +15 -0
  303. package/src/lifecycle/errors/noInitResultError.ts +10 -0
  304. package/src/lifecycle/errors/unknownInitializationError.ts +10 -0
  305. package/src/lifecycle/errors/unsupportedProtocolVersionError.ts +14 -0
  306. package/src/{isAllowedLocalPreviewUrl.ts → lifecycle/isAllowedLocalPreviewUrl.ts} +1 -1
  307. package/src/lifecycle/types.ts +17 -103
  308. package/src/{lifecycle → manifest}/resolveManifest.ts +2 -2
  309. package/src/manifest/types.ts +28 -0
  310. package/src/messages/{sandboxMessageRouter.ts → createSandboxMessageRouter.ts} +19 -21
  311. package/src/messages/handlers.ts +54 -0
  312. package/src/messages/logging.ts +1 -0
  313. package/src/navigation/types.ts +20 -0
  314. package/src/pages/types.ts +55 -0
  315. package/src/users/types.ts +26 -0
  316. package/src/utils/maybePromise.ts +1 -0
  317. package/src/utils/toNotionPageId.ts +7 -0
  318. package/dist/autoBindProperties.d.ts.map +0 -1
  319. package/dist/compatibility/normalizePageResultsForProtocol3To5.d.ts.map +0 -1
  320. package/dist/compatibility/normalizePageResultsForProtocol6.d.ts.map +0 -1
  321. package/dist/compatibility/pageForProtocol3To5.d.ts.map +0 -1
  322. package/dist/compatibility/pageResult.d.ts.map +0 -1
  323. package/dist/compatibility/pageWithNullTextFallbackProperties.d.ts.map +0 -1
  324. package/dist/dateValue.d.ts.map +0 -1
  325. package/dist/ids.d.ts +0 -3
  326. package/dist/ids.d.ts.map +0 -1
  327. package/dist/isAllowedLocalPreviewUrl.d.ts.map +0 -1
  328. package/dist/lifecycle/initErrors.d.ts +0 -25
  329. package/dist/lifecycle/initErrors.d.ts.map +0 -1
  330. package/dist/lifecycle/initErrors.js +0 -111
  331. package/dist/lifecycle/initializationController.d.ts.map +0 -1
  332. package/dist/lifecycle/protocolVersion.d.ts.map +0 -1
  333. package/dist/lifecycle/resolveManifest.d.ts.map +0 -1
  334. package/dist/messages/invalidSandboxMessage.d.ts.map +0 -1
  335. package/dist/messages/parseExternalUrl.d.ts.map +0 -1
  336. package/dist/messages/sandboxMessageRouter.d.ts.map +0 -1
  337. package/dist/messages/types.d.ts +0 -65
  338. package/dist/messages/types.d.ts.map +0 -1
  339. package/dist/protocol/dataSources/dataSource.d.ts +0 -786
  340. package/dist/protocol/dataSources/dataSource.js +0 -66
  341. package/dist/protocol/errors.js +0 -6
  342. package/dist/protocol/messages/createPage.js +0 -51
  343. package/dist/protocol/messages/createPageResult.js +0 -43
  344. package/dist/protocol/messages/queryDataSource.d.ts +0 -1470
  345. package/dist/protocol/messages/queryDataSource.js +0 -254
  346. package/dist/protocol/messages/updatePage.js +0 -23
  347. package/dist/protocol/pages/page.d.ts +0 -1422
  348. package/dist/protocol/pages/page.js +0 -318
  349. package/dist/protocol/parent.js +0 -13
  350. package/dist/protocol/users/user.js +0 -20
  351. package/dist/protocolVersion.d.ts.map +0 -1
  352. package/dist/queries/querySubscriptions.d.ts.map +0 -1
  353. package/dist/queries/types.d.ts +0 -5
  354. package/dist/queries/types.d.ts.map +0 -1
  355. package/dist/queries/validateQueryDataSourceFilter.d.ts +0 -5
  356. package/dist/queries/validateQueryDataSourceFilter.d.ts.map +0 -1
  357. package/dist/queries/validateQueryDataSourceSorts.d.ts +0 -8
  358. package/dist/queries/validateQueryDataSourceSorts.d.ts.map +0 -1
  359. package/dist/utils.d.ts.map +0 -1
  360. package/src/compatibility/pageForProtocol3To5.ts +0 -190
  361. package/src/ids.ts +0 -9
  362. package/src/lifecycle/initErrors.ts +0 -131
  363. package/src/messages/types.ts +0 -171
  364. package/src/queries/types.ts +0 -11
  365. /package/dist/compatibility/{pageResult.js → pages/pageResult.js} +0 -0
  366. /package/dist/{messages/types.js → context/resize.js} +0 -0
  367. /package/dist/{autoBindProperties.js → dataSources/bindings/getAutoBoundPropertyIdsByKey.js} +0 -0
  368. /package/dist/{dateValue.js → dataSources/properties/toNotionDateValue.js} +0 -0
  369. /package/dist/{queries → dataSources/queries}/querySubscriptions.js +0 -0
  370. /package/dist/{queries → dataSources}/types.js +0 -0
  371. /package/dist/{isAllowedLocalPreviewUrl.d.ts → lifecycle/isAllowedLocalPreviewUrl.d.ts} +0 -0
  372. /package/dist/lifecycle/{protocolVersion.js → isValidBridgeProtocolVersion.js} +0 -0
  373. /package/dist/{lifecycle → manifest}/resolveManifest.js +0 -0
  374. /package/dist/messages/{invalidSandboxMessage.js → getInvalidSandboxMessageResponse.js} +0 -0
  375. /package/dist/{messages → navigation}/parseExternalUrl.d.ts +0 -0
  376. /package/dist/{messages → navigation}/parseExternalUrl.js +0 -0
  377. /package/dist/protocol/{dataSources → compatibility/protocol3To5}/dataSourcePage.d.ts +0 -0
  378. /package/dist/protocol/{dataSources → compatibility/protocol3To5}/dataSourceValue.d.ts +0 -0
  379. /package/dist/protocol/{contrast.d.ts → context/contrast.d.ts} +0 -0
  380. /package/dist/protocol/{contrast.js → context/contrast.js} +0 -0
  381. /package/dist/protocol/{messages → context/messages}/contrastModeChanged.d.ts +0 -0
  382. /package/dist/protocol/{messages → context/messages}/contrastModeChanged.js +0 -0
  383. /package/dist/protocol/{messages → context/messages}/pageChanged.d.ts +0 -0
  384. /package/dist/protocol/{messages → context/messages}/parentChanged.d.ts +0 -0
  385. /package/dist/protocol/{messages → context/messages}/parentChanged.js +0 -0
  386. /package/dist/protocol/{messages → context/messages}/resize.d.ts +0 -0
  387. /package/dist/protocol/{messages → context/messages}/resize.js +0 -0
  388. /package/dist/protocol/{messages → context/messages}/themeChanged.d.ts +0 -0
  389. /package/dist/protocol/{messages → context/messages}/themeChanged.js +0 -0
  390. /package/dist/protocol/{theme.d.ts → context/theme.d.ts} +0 -0
  391. /package/dist/protocol/{theme.js → context/theme.js} +0 -0
  392. /package/dist/protocol/{messages → dataSources/messages}/unsubscribeDataSourceQuery.d.ts +0 -0
  393. /package/dist/protocol/{messages → dataSources/messages}/unsubscribeDataSourceQuery.js +0 -0
  394. /package/dist/protocol/dataSources/{dateValue.d.ts → properties/dateValue.d.ts} +0 -0
  395. /package/dist/protocol/dataSources/{dateValue.js → properties/dateValue.js} +0 -0
  396. /package/dist/protocol/dataSources/{propertySchema.d.ts → properties/propertySchema.d.ts} +0 -0
  397. /package/dist/protocol/dataSources/{propertySchema.js → properties/propertySchema.js} +0 -0
  398. /package/dist/protocol/{messages → handshake}/initResult.js +0 -0
  399. /package/dist/protocol/{messages → handshake}/isInitHandshakeMessage.js +0 -0
  400. /package/dist/protocol/{messages → navigation}/openExternalUrl.js +0 -0
  401. /package/dist/protocol/{messages → users/messages}/currentUserChanged.d.ts +0 -0
  402. /package/dist/protocol/{ids.d.ts → utils/ids.d.ts} +0 -0
  403. /package/dist/protocol/{ids.js → utils/ids.js} +0 -0
  404. /package/dist/protocol/{isLocalBlockServerUrl.d.ts → utils/isLocalBlockServerUrl.d.ts} +0 -0
  405. /package/dist/protocol/{isLocalBlockServerUrl.js → utils/isLocalBlockServerUrl.js} +0 -0
  406. /package/dist/protocol/{protocolVersion.d.ts → utils/protocolVersion.d.ts} +0 -0
  407. /package/dist/protocol/{protocolVersion.js → utils/protocolVersion.js} +0 -0
  408. /package/dist/protocol/{dataSources → utils}/recordPointer.d.ts +0 -0
  409. /package/dist/protocol/{dataSources → utils}/recordPointer.js +0 -0
  410. /package/dist/{protocolVersion.d.ts → utils/protocolVersion.d.ts} +0 -0
  411. /package/dist/{protocolVersion.js → utils/protocolVersion.js} +0 -0
  412. /package/dist/{utils.js → utils/unreachable.js} +0 -0
  413. /package/src/compatibility/{pageResult.ts → pages/pageResult.ts} +0 -0
  414. /package/src/lifecycle/{protocolVersion.ts → isValidBridgeProtocolVersion.ts} +0 -0
  415. /package/src/messages/{invalidSandboxMessage.ts → getInvalidSandboxMessageResponse.ts} +0 -0
  416. /package/src/{messages → navigation}/parseExternalUrl.ts +0 -0
  417. /package/src/{protocolVersion.ts → utils/protocolVersion.ts} +0 -0
  418. /package/src/{utils.ts → utils/unreachable.ts} +0 -0
@@ -0,0 +1,1809 @@
1
+ import type { CustomBlockInitErrorInfo } from "../protocol/handshake/init.js";
2
+ import type { BridgeCustomBlockManifest } from "../protocol/manifest/manifest.js";
3
+ import * as v from "valibot";
4
+ export declare const customBlockHostInitialStateSchema: v.ObjectSchema<{
5
+ readonly theme: v.PicklistSchema<["light", "dark"], undefined>;
6
+ /**
7
+ * Defaults to standard for existing host integrations.
8
+ * TODO(custom-blocks): Make this required when MIN_HOST_SUPPORTED_BRIDGE_PROTOCOL_VERSION increases to 4.
9
+ */
10
+ readonly contrastMode: v.OptionalSchema<v.PicklistSchema<["standard", "high"], undefined>, undefined>;
11
+ readonly blockId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionBlockId">]>;
12
+ readonly parent: v.VariantSchema<"type", [v.ObjectSchema<{
13
+ readonly type: v.LiteralSchema<"page_id", undefined>;
14
+ readonly page_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
15
+ }, undefined>, v.ObjectSchema<{
16
+ readonly type: v.LiteralSchema<"data_source_id", undefined>;
17
+ readonly data_source_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionDataSourceId">]>;
18
+ }, undefined>, v.ObjectSchema<{
19
+ readonly type: v.LiteralSchema<"workspace", undefined>;
20
+ readonly workspace: v.LiteralSchema<true, undefined>;
21
+ }, undefined>, v.ObjectSchema<{
22
+ readonly type: v.LiteralSchema<"block_id", undefined>;
23
+ readonly block_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionBlockId">]>;
24
+ }, undefined>, v.ObjectSchema<{
25
+ readonly type: v.LiteralSchema<"agent_id", undefined>;
26
+ readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
27
+ }, undefined>, v.ObjectSchema<{
28
+ readonly type: v.LiteralSchema<"unavailable", undefined>;
29
+ }, undefined>], undefined>;
30
+ readonly page: v.VariantSchema<"type", [v.ObjectSchema<{
31
+ readonly type: v.LiteralSchema<"unavailable", undefined>;
32
+ }, undefined>, v.ObjectSchema<{
33
+ readonly type: v.LiteralSchema<"page", undefined>;
34
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
35
+ readonly parent: v.VariantSchema<"type", [v.ObjectSchema<{
36
+ readonly type: v.LiteralSchema<"page_id", undefined>;
37
+ readonly page_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
38
+ }, undefined>, v.ObjectSchema<{
39
+ readonly type: v.LiteralSchema<"data_source_id", undefined>;
40
+ readonly data_source_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionDataSourceId">]>;
41
+ }, undefined>, v.ObjectSchema<{
42
+ readonly type: v.LiteralSchema<"workspace", undefined>;
43
+ readonly workspace: v.LiteralSchema<true, undefined>;
44
+ }, undefined>, v.ObjectSchema<{
45
+ readonly type: v.LiteralSchema<"block_id", undefined>;
46
+ readonly block_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionBlockId">]>;
47
+ }, undefined>, v.ObjectSchema<{
48
+ readonly type: v.LiteralSchema<"agent_id", undefined>;
49
+ readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
50
+ }, undefined>, v.ObjectSchema<{
51
+ readonly type: v.LiteralSchema<"unavailable", undefined>;
52
+ }, undefined>], undefined>;
53
+ }, undefined>], undefined>;
54
+ readonly manifest: v.ObjectSchema<{
55
+ readonly version: v.LiteralSchema<1, undefined>;
56
+ readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
57
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
58
+ readonly slashCommand: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
59
+ readonly icon: v.OptionalSchema<v.ObjectSchema<{
60
+ readonly type: v.LiteralSchema<"emoji", undefined>;
61
+ readonly emoji: v.StringSchema<undefined>;
62
+ }, undefined>, undefined>;
63
+ readonly dataSources: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
64
+ readonly name: v.StringSchema<undefined>;
65
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
66
+ readonly icon: v.OptionalSchema<v.VariantSchema<"type", [v.ObjectSchema<{
67
+ readonly type: v.LiteralSchema<"emoji", undefined>;
68
+ readonly emoji: v.StringSchema<undefined>;
69
+ }, undefined>, v.ObjectSchema<{
70
+ readonly type: v.LiteralSchema<"external", undefined>;
71
+ readonly url: v.StringSchema<undefined>;
72
+ }, undefined>], undefined>, undefined>;
73
+ readonly properties: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
74
+ readonly name: v.StringSchema<undefined>;
75
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
76
+ 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>;
77
+ }, undefined>, undefined>, {}>;
78
+ }, undefined>, undefined>, {}>;
79
+ readonly capabilities: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
80
+ readonly capability: v.StringSchema<undefined>;
81
+ readonly resource: v.StringSchema<undefined>;
82
+ }, undefined>, undefined>, undefined>;
83
+ }, undefined>;
84
+ readonly dataSources: v.ObjectSchema<{
85
+ readonly bindings: v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
86
+ readonly collectionPointer: v.OptionalSchema<v.ObjectSchema<{
87
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionDataSourceId">]>;
88
+ readonly table: v.StringSchema<undefined>;
89
+ readonly spaceId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionSpaceId">]>, undefined>;
90
+ }, undefined>, undefined>;
91
+ readonly collectionSchema: v.OptionalSchema<v.ObjectSchema<{
92
+ readonly id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionDataSourceId">]>, undefined>;
93
+ readonly propertiesById: v.RecordSchema<v.StringSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
94
+ readonly name: v.StringSchema<undefined>;
95
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
96
+ readonly type: v.LiteralSchema<"title", undefined>;
97
+ }, undefined>, v.ObjectSchema<{
98
+ readonly name: v.StringSchema<undefined>;
99
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
100
+ readonly type: v.LiteralSchema<"rich_text", undefined>;
101
+ }, undefined>, v.ObjectSchema<{
102
+ readonly name: v.StringSchema<undefined>;
103
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
104
+ readonly type: v.LiteralSchema<"number", undefined>;
105
+ }, undefined>, v.ObjectSchema<{
106
+ readonly name: v.StringSchema<undefined>;
107
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
108
+ readonly type: v.LiteralSchema<"checkbox", undefined>;
109
+ }, undefined>, v.ObjectSchema<{
110
+ readonly name: v.StringSchema<undefined>;
111
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
112
+ readonly type: v.LiteralSchema<"url", undefined>;
113
+ }, undefined>, v.ObjectSchema<{
114
+ readonly name: v.StringSchema<undefined>;
115
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
116
+ readonly type: v.LiteralSchema<"email", undefined>;
117
+ }, undefined>, v.ObjectSchema<{
118
+ readonly name: v.StringSchema<undefined>;
119
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
120
+ readonly type: v.LiteralSchema<"phone_number", undefined>;
121
+ }, undefined>, v.ObjectSchema<{
122
+ readonly name: v.StringSchema<undefined>;
123
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
124
+ readonly type: v.LiteralSchema<"select", undefined>;
125
+ readonly options: v.ArraySchema<v.ObjectSchema<{
126
+ readonly id: v.StringSchema<undefined>;
127
+ readonly name: v.StringSchema<undefined>;
128
+ readonly color: v.OptionalSchema<v.PicklistSchema<["default", "gray", "brown", "orange", "yellow", "green", "blue", "purple", "pink", "red", "gray_background", "brown_background", "orange_background", "yellow_background", "green_background", "blue_background", "purple_background", "pink_background", "red_background", "default_background"], undefined>, undefined>;
129
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
130
+ }, undefined>, undefined>;
131
+ }, undefined>, v.ObjectSchema<{
132
+ readonly name: v.StringSchema<undefined>;
133
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
134
+ readonly type: v.LiteralSchema<"multi_select", undefined>;
135
+ readonly options: v.ArraySchema<v.ObjectSchema<{
136
+ readonly id: v.StringSchema<undefined>;
137
+ readonly name: v.StringSchema<undefined>;
138
+ readonly color: v.OptionalSchema<v.PicklistSchema<["default", "gray", "brown", "orange", "yellow", "green", "blue", "purple", "pink", "red", "gray_background", "brown_background", "orange_background", "yellow_background", "green_background", "blue_background", "purple_background", "pink_background", "red_background", "default_background"], undefined>, undefined>;
139
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
140
+ }, undefined>, undefined>;
141
+ }, undefined>, v.ObjectSchema<{
142
+ readonly name: v.StringSchema<undefined>;
143
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
144
+ readonly type: v.LiteralSchema<"status", undefined>;
145
+ readonly options: v.ArraySchema<v.ObjectSchema<{
146
+ readonly id: v.StringSchema<undefined>;
147
+ readonly name: v.StringSchema<undefined>;
148
+ readonly color: v.OptionalSchema<v.PicklistSchema<["default", "gray", "brown", "orange", "yellow", "green", "blue", "purple", "pink", "red", "gray_background", "brown_background", "orange_background", "yellow_background", "green_background", "blue_background", "purple_background", "pink_background", "red_background", "default_background"], undefined>, undefined>;
149
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
150
+ }, undefined>, undefined>;
151
+ readonly groups: v.ArraySchema<v.ObjectSchema<{
152
+ readonly id: v.StringSchema<undefined>;
153
+ readonly name: v.StringSchema<undefined>;
154
+ readonly color: v.OptionalSchema<v.PicklistSchema<["default", "gray", "brown", "orange", "yellow", "green", "blue", "purple", "pink", "red", "gray_background", "brown_background", "orange_background", "yellow_background", "green_background", "blue_background", "purple_background", "pink_background", "red_background", "default_background"], undefined>, undefined>;
155
+ readonly option_ids: v.ArraySchema<v.StringSchema<undefined>, undefined>;
156
+ }, undefined>, undefined>;
157
+ }, undefined>, v.ObjectSchema<{
158
+ readonly name: v.StringSchema<undefined>;
159
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
160
+ readonly type: v.LiteralSchema<"date", undefined>;
161
+ }, undefined>, v.ObjectSchema<{
162
+ readonly name: v.StringSchema<undefined>;
163
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
164
+ readonly type: v.LiteralSchema<"people", undefined>;
165
+ }, undefined>, v.ObjectSchema<{
166
+ readonly name: v.StringSchema<undefined>;
167
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
168
+ readonly type: v.LiteralSchema<"files", undefined>;
169
+ }, undefined>, v.ObjectSchema<{
170
+ readonly name: v.StringSchema<undefined>;
171
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
172
+ readonly type: v.LiteralSchema<"unique_id", undefined>;
173
+ }, undefined>, v.ObjectSchema<{
174
+ readonly name: v.StringSchema<undefined>;
175
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
176
+ readonly type: v.LiteralSchema<"relation", undefined>;
177
+ readonly data_source_id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
178
+ readonly dual_property: v.OptionalSchema<v.ObjectSchema<{
179
+ readonly synced_property_id: v.StringSchema<undefined>;
180
+ readonly synced_property_name: v.StringSchema<undefined>;
181
+ }, undefined>, undefined>;
182
+ }, undefined>, v.ObjectSchema<{
183
+ readonly name: v.StringSchema<undefined>;
184
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
185
+ readonly type: v.LiteralSchema<"place", undefined>;
186
+ }, undefined>, v.ObjectSchema<{
187
+ readonly name: v.StringSchema<undefined>;
188
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
189
+ readonly type: v.LiteralSchema<"formula", undefined>;
190
+ }, undefined>, v.ObjectSchema<{
191
+ readonly name: v.StringSchema<undefined>;
192
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
193
+ readonly type: v.LiteralSchema<"rollup", undefined>;
194
+ }, undefined>, v.ObjectSchema<{
195
+ readonly name: v.StringSchema<undefined>;
196
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
197
+ readonly type: v.LiteralSchema<"button", undefined>;
198
+ }, undefined>, v.ObjectSchema<{
199
+ readonly name: v.StringSchema<undefined>;
200
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
201
+ readonly type: v.LiteralSchema<"verification", undefined>;
202
+ }, undefined>, v.ObjectSchema<{
203
+ readonly name: v.StringSchema<undefined>;
204
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
205
+ readonly type: v.LiteralSchema<"last_visited_time", undefined>;
206
+ }, undefined>, v.ObjectSchema<{
207
+ readonly name: v.StringSchema<undefined>;
208
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
209
+ readonly type: v.LiteralSchema<"location", undefined>;
210
+ }, undefined>, v.ObjectSchema<{
211
+ readonly name: v.StringSchema<undefined>;
212
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
213
+ readonly type: v.LiteralSchema<"created_time", undefined>;
214
+ }, undefined>, v.ObjectSchema<{
215
+ readonly name: v.StringSchema<undefined>;
216
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
217
+ readonly type: v.LiteralSchema<"last_edited_time", undefined>;
218
+ }, undefined>, v.ObjectSchema<{
219
+ readonly name: v.StringSchema<undefined>;
220
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
221
+ readonly type: v.LiteralSchema<"created_by", undefined>;
222
+ }, undefined>, v.ObjectSchema<{
223
+ readonly name: v.StringSchema<undefined>;
224
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
225
+ readonly type: v.LiteralSchema<"last_edited_by", undefined>;
226
+ }, undefined>], undefined>, undefined>;
227
+ }, undefined>, undefined>;
228
+ readonly propertyIdsByKey: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.OptionalSchema<v.StringSchema<undefined>, undefined>, undefined>, undefined>;
229
+ readonly inaccessible: v.OptionalSchema<v.LiteralSchema<true, undefined>, undefined>;
230
+ }, undefined>, undefined>;
231
+ }, undefined>;
232
+ readonly currentUser: v.ObjectSchema<{
233
+ readonly object: v.LiteralSchema<"user", undefined>;
234
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionUserId">]>;
235
+ readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
236
+ readonly avatar_url: v.NullableSchema<v.StringSchema<undefined>, undefined>;
237
+ readonly type: v.LiteralSchema<"person", undefined>;
238
+ readonly person: v.ObjectSchema<{
239
+ readonly email: v.StringSchema<undefined>;
240
+ }, undefined>;
241
+ }, undefined>;
242
+ }, undefined>;
243
+ export type CustomBlockHostInitialState = v.InferInput<typeof customBlockHostInitialStateSchema>;
244
+ export type CustomBlockHostInitialStateResult = {
245
+ status: "success";
246
+ initialState: CustomBlockHostInitialState;
247
+ } | {
248
+ status: "error";
249
+ error: CustomBlockInitErrorInfo;
250
+ };
251
+ export declare const customBlockHostPreparedStateResultSchema: v.VariantSchema<"status", [v.ObjectSchema<{
252
+ readonly status: v.LiteralSchema<"success", undefined>;
253
+ readonly initialState: Omit<v.ObjectSchema<{
254
+ readonly theme: v.PicklistSchema<["light", "dark"], undefined>;
255
+ /**
256
+ * Defaults to standard for existing host integrations.
257
+ * TODO(custom-blocks): Make this required when MIN_HOST_SUPPORTED_BRIDGE_PROTOCOL_VERSION increases to 4.
258
+ */
259
+ readonly contrastMode: v.OptionalSchema<v.PicklistSchema<["standard", "high"], undefined>, undefined>;
260
+ readonly blockId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionBlockId">]>;
261
+ readonly parent: v.VariantSchema<"type", [v.ObjectSchema<{
262
+ readonly type: v.LiteralSchema<"page_id", undefined>;
263
+ readonly page_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
264
+ }, undefined>, v.ObjectSchema<{
265
+ readonly type: v.LiteralSchema<"data_source_id", undefined>;
266
+ readonly data_source_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionDataSourceId">]>;
267
+ }, undefined>, v.ObjectSchema<{
268
+ readonly type: v.LiteralSchema<"workspace", undefined>;
269
+ readonly workspace: v.LiteralSchema<true, undefined>;
270
+ }, undefined>, v.ObjectSchema<{
271
+ readonly type: v.LiteralSchema<"block_id", undefined>;
272
+ readonly block_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionBlockId">]>;
273
+ }, undefined>, v.ObjectSchema<{
274
+ readonly type: v.LiteralSchema<"agent_id", undefined>;
275
+ readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
276
+ }, undefined>, v.ObjectSchema<{
277
+ readonly type: v.LiteralSchema<"unavailable", undefined>;
278
+ }, undefined>], undefined>;
279
+ readonly page: v.VariantSchema<"type", [v.ObjectSchema<{
280
+ readonly type: v.LiteralSchema<"unavailable", undefined>;
281
+ }, undefined>, v.ObjectSchema<{
282
+ readonly type: v.LiteralSchema<"page", undefined>;
283
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
284
+ readonly parent: v.VariantSchema<"type", [v.ObjectSchema<{
285
+ readonly type: v.LiteralSchema<"page_id", undefined>;
286
+ readonly page_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
287
+ }, undefined>, v.ObjectSchema<{
288
+ readonly type: v.LiteralSchema<"data_source_id", undefined>;
289
+ readonly data_source_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionDataSourceId">]>;
290
+ }, undefined>, v.ObjectSchema<{
291
+ readonly type: v.LiteralSchema<"workspace", undefined>;
292
+ readonly workspace: v.LiteralSchema<true, undefined>;
293
+ }, undefined>, v.ObjectSchema<{
294
+ readonly type: v.LiteralSchema<"block_id", undefined>;
295
+ readonly block_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionBlockId">]>;
296
+ }, undefined>, v.ObjectSchema<{
297
+ readonly type: v.LiteralSchema<"agent_id", undefined>;
298
+ readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
299
+ }, undefined>, v.ObjectSchema<{
300
+ readonly type: v.LiteralSchema<"unavailable", undefined>;
301
+ }, undefined>], undefined>;
302
+ }, undefined>], undefined>;
303
+ readonly manifest: v.ObjectSchema<{
304
+ readonly version: v.LiteralSchema<1, undefined>;
305
+ readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
306
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
307
+ readonly slashCommand: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
308
+ readonly icon: v.OptionalSchema<v.ObjectSchema<{
309
+ readonly type: v.LiteralSchema<"emoji", undefined>;
310
+ readonly emoji: v.StringSchema<undefined>;
311
+ }, undefined>, undefined>;
312
+ readonly dataSources: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
313
+ readonly name: v.StringSchema<undefined>;
314
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
315
+ readonly icon: v.OptionalSchema<v.VariantSchema<"type", [v.ObjectSchema<{
316
+ readonly type: v.LiteralSchema<"emoji", undefined>;
317
+ readonly emoji: v.StringSchema<undefined>;
318
+ }, undefined>, v.ObjectSchema<{
319
+ readonly type: v.LiteralSchema<"external", undefined>;
320
+ readonly url: v.StringSchema<undefined>;
321
+ }, undefined>], undefined>, undefined>;
322
+ readonly properties: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
323
+ readonly name: v.StringSchema<undefined>;
324
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
325
+ 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>;
326
+ }, undefined>, undefined>, {}>;
327
+ }, undefined>, undefined>, {}>;
328
+ readonly capabilities: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
329
+ readonly capability: v.StringSchema<undefined>;
330
+ readonly resource: v.StringSchema<undefined>;
331
+ }, undefined>, undefined>, undefined>;
332
+ }, undefined>;
333
+ readonly dataSources: v.ObjectSchema<{
334
+ readonly bindings: v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
335
+ readonly collectionPointer: v.OptionalSchema<v.ObjectSchema<{
336
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionDataSourceId">]>;
337
+ readonly table: v.StringSchema<undefined>;
338
+ readonly spaceId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionSpaceId">]>, undefined>;
339
+ }, undefined>, undefined>;
340
+ readonly collectionSchema: v.OptionalSchema<v.ObjectSchema<{
341
+ readonly id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionDataSourceId">]>, undefined>;
342
+ readonly propertiesById: v.RecordSchema<v.StringSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
343
+ readonly name: v.StringSchema<undefined>;
344
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
345
+ readonly type: v.LiteralSchema<"title", undefined>;
346
+ }, undefined>, v.ObjectSchema<{
347
+ readonly name: v.StringSchema<undefined>;
348
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
349
+ readonly type: v.LiteralSchema<"rich_text", undefined>;
350
+ }, undefined>, v.ObjectSchema<{
351
+ readonly name: v.StringSchema<undefined>;
352
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
353
+ readonly type: v.LiteralSchema<"number", undefined>;
354
+ }, undefined>, v.ObjectSchema<{
355
+ readonly name: v.StringSchema<undefined>;
356
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
357
+ readonly type: v.LiteralSchema<"checkbox", undefined>;
358
+ }, undefined>, v.ObjectSchema<{
359
+ readonly name: v.StringSchema<undefined>;
360
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
361
+ readonly type: v.LiteralSchema<"url", undefined>;
362
+ }, undefined>, v.ObjectSchema<{
363
+ readonly name: v.StringSchema<undefined>;
364
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
365
+ readonly type: v.LiteralSchema<"email", undefined>;
366
+ }, undefined>, v.ObjectSchema<{
367
+ readonly name: v.StringSchema<undefined>;
368
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
369
+ readonly type: v.LiteralSchema<"phone_number", undefined>;
370
+ }, undefined>, v.ObjectSchema<{
371
+ readonly name: v.StringSchema<undefined>;
372
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
373
+ readonly type: v.LiteralSchema<"select", undefined>;
374
+ readonly options: v.ArraySchema<v.ObjectSchema<{
375
+ readonly id: v.StringSchema<undefined>;
376
+ readonly name: v.StringSchema<undefined>;
377
+ readonly color: v.OptionalSchema<v.PicklistSchema<["default", "gray", "brown", "orange", "yellow", "green", "blue", "purple", "pink", "red", "gray_background", "brown_background", "orange_background", "yellow_background", "green_background", "blue_background", "purple_background", "pink_background", "red_background", "default_background"], undefined>, undefined>;
378
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
379
+ }, undefined>, undefined>;
380
+ }, undefined>, v.ObjectSchema<{
381
+ readonly name: v.StringSchema<undefined>;
382
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
383
+ readonly type: v.LiteralSchema<"multi_select", undefined>;
384
+ readonly options: v.ArraySchema<v.ObjectSchema<{
385
+ readonly id: v.StringSchema<undefined>;
386
+ readonly name: v.StringSchema<undefined>;
387
+ readonly color: v.OptionalSchema<v.PicklistSchema<["default", "gray", "brown", "orange", "yellow", "green", "blue", "purple", "pink", "red", "gray_background", "brown_background", "orange_background", "yellow_background", "green_background", "blue_background", "purple_background", "pink_background", "red_background", "default_background"], undefined>, undefined>;
388
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
389
+ }, undefined>, undefined>;
390
+ }, undefined>, v.ObjectSchema<{
391
+ readonly name: v.StringSchema<undefined>;
392
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
393
+ readonly type: v.LiteralSchema<"status", undefined>;
394
+ readonly options: v.ArraySchema<v.ObjectSchema<{
395
+ readonly id: v.StringSchema<undefined>;
396
+ readonly name: v.StringSchema<undefined>;
397
+ readonly color: v.OptionalSchema<v.PicklistSchema<["default", "gray", "brown", "orange", "yellow", "green", "blue", "purple", "pink", "red", "gray_background", "brown_background", "orange_background", "yellow_background", "green_background", "blue_background", "purple_background", "pink_background", "red_background", "default_background"], undefined>, undefined>;
398
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
399
+ }, undefined>, undefined>;
400
+ readonly groups: v.ArraySchema<v.ObjectSchema<{
401
+ readonly id: v.StringSchema<undefined>;
402
+ readonly name: v.StringSchema<undefined>;
403
+ readonly color: v.OptionalSchema<v.PicklistSchema<["default", "gray", "brown", "orange", "yellow", "green", "blue", "purple", "pink", "red", "gray_background", "brown_background", "orange_background", "yellow_background", "green_background", "blue_background", "purple_background", "pink_background", "red_background", "default_background"], undefined>, undefined>;
404
+ readonly option_ids: v.ArraySchema<v.StringSchema<undefined>, undefined>;
405
+ }, undefined>, undefined>;
406
+ }, undefined>, v.ObjectSchema<{
407
+ readonly name: v.StringSchema<undefined>;
408
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
409
+ readonly type: v.LiteralSchema<"date", undefined>;
410
+ }, undefined>, v.ObjectSchema<{
411
+ readonly name: v.StringSchema<undefined>;
412
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
413
+ readonly type: v.LiteralSchema<"people", undefined>;
414
+ }, undefined>, v.ObjectSchema<{
415
+ readonly name: v.StringSchema<undefined>;
416
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
417
+ readonly type: v.LiteralSchema<"files", undefined>;
418
+ }, undefined>, v.ObjectSchema<{
419
+ readonly name: v.StringSchema<undefined>;
420
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
421
+ readonly type: v.LiteralSchema<"unique_id", undefined>;
422
+ }, undefined>, v.ObjectSchema<{
423
+ readonly name: v.StringSchema<undefined>;
424
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
425
+ readonly type: v.LiteralSchema<"relation", undefined>;
426
+ readonly data_source_id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
427
+ readonly dual_property: v.OptionalSchema<v.ObjectSchema<{
428
+ readonly synced_property_id: v.StringSchema<undefined>;
429
+ readonly synced_property_name: v.StringSchema<undefined>;
430
+ }, undefined>, undefined>;
431
+ }, undefined>, v.ObjectSchema<{
432
+ readonly name: v.StringSchema<undefined>;
433
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
434
+ readonly type: v.LiteralSchema<"place", undefined>;
435
+ }, undefined>, v.ObjectSchema<{
436
+ readonly name: v.StringSchema<undefined>;
437
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
438
+ readonly type: v.LiteralSchema<"formula", undefined>;
439
+ }, undefined>, v.ObjectSchema<{
440
+ readonly name: v.StringSchema<undefined>;
441
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
442
+ readonly type: v.LiteralSchema<"rollup", undefined>;
443
+ }, undefined>, v.ObjectSchema<{
444
+ readonly name: v.StringSchema<undefined>;
445
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
446
+ readonly type: v.LiteralSchema<"button", undefined>;
447
+ }, undefined>, v.ObjectSchema<{
448
+ readonly name: v.StringSchema<undefined>;
449
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
450
+ readonly type: v.LiteralSchema<"verification", undefined>;
451
+ }, undefined>, v.ObjectSchema<{
452
+ readonly name: v.StringSchema<undefined>;
453
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
454
+ readonly type: v.LiteralSchema<"last_visited_time", undefined>;
455
+ }, undefined>, v.ObjectSchema<{
456
+ readonly name: v.StringSchema<undefined>;
457
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
458
+ readonly type: v.LiteralSchema<"location", undefined>;
459
+ }, undefined>, v.ObjectSchema<{
460
+ readonly name: v.StringSchema<undefined>;
461
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
462
+ readonly type: v.LiteralSchema<"created_time", undefined>;
463
+ }, undefined>, v.ObjectSchema<{
464
+ readonly name: v.StringSchema<undefined>;
465
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
466
+ readonly type: v.LiteralSchema<"last_edited_time", undefined>;
467
+ }, undefined>, v.ObjectSchema<{
468
+ readonly name: v.StringSchema<undefined>;
469
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
470
+ readonly type: v.LiteralSchema<"created_by", undefined>;
471
+ }, undefined>, v.ObjectSchema<{
472
+ readonly name: v.StringSchema<undefined>;
473
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
474
+ readonly type: v.LiteralSchema<"last_edited_by", undefined>;
475
+ }, undefined>], undefined>, undefined>;
476
+ }, undefined>, undefined>;
477
+ readonly propertyIdsByKey: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.OptionalSchema<v.StringSchema<undefined>, undefined>, undefined>, undefined>;
478
+ readonly inaccessible: v.OptionalSchema<v.LiteralSchema<true, undefined>, undefined>;
479
+ }, undefined>, undefined>;
480
+ }, undefined>;
481
+ readonly currentUser: v.ObjectSchema<{
482
+ readonly object: v.LiteralSchema<"user", undefined>;
483
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionUserId">]>;
484
+ readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
485
+ readonly avatar_url: v.NullableSchema<v.StringSchema<undefined>, undefined>;
486
+ readonly type: v.LiteralSchema<"person", undefined>;
487
+ readonly person: v.ObjectSchema<{
488
+ readonly email: v.StringSchema<undefined>;
489
+ }, undefined>;
490
+ }, undefined>;
491
+ }, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
492
+ readonly entries: Omit<{
493
+ readonly theme: v.PicklistSchema<["light", "dark"], undefined>;
494
+ /**
495
+ * Defaults to standard for existing host integrations.
496
+ * TODO(custom-blocks): Make this required when MIN_HOST_SUPPORTED_BRIDGE_PROTOCOL_VERSION increases to 4.
497
+ */
498
+ readonly contrastMode: v.OptionalSchema<v.PicklistSchema<["standard", "high"], undefined>, undefined>;
499
+ readonly blockId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionBlockId">]>;
500
+ readonly parent: v.VariantSchema<"type", [v.ObjectSchema<{
501
+ readonly type: v.LiteralSchema<"page_id", undefined>;
502
+ readonly page_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
503
+ }, undefined>, v.ObjectSchema<{
504
+ readonly type: v.LiteralSchema<"data_source_id", undefined>;
505
+ readonly data_source_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionDataSourceId">]>;
506
+ }, undefined>, v.ObjectSchema<{
507
+ readonly type: v.LiteralSchema<"workspace", undefined>;
508
+ readonly workspace: v.LiteralSchema<true, undefined>;
509
+ }, undefined>, v.ObjectSchema<{
510
+ readonly type: v.LiteralSchema<"block_id", undefined>;
511
+ readonly block_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionBlockId">]>;
512
+ }, undefined>, v.ObjectSchema<{
513
+ readonly type: v.LiteralSchema<"agent_id", undefined>;
514
+ readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
515
+ }, undefined>, v.ObjectSchema<{
516
+ readonly type: v.LiteralSchema<"unavailable", undefined>;
517
+ }, undefined>], undefined>;
518
+ readonly page: v.VariantSchema<"type", [v.ObjectSchema<{
519
+ readonly type: v.LiteralSchema<"unavailable", undefined>;
520
+ }, undefined>, v.ObjectSchema<{
521
+ readonly type: v.LiteralSchema<"page", undefined>;
522
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
523
+ readonly parent: v.VariantSchema<"type", [v.ObjectSchema<{
524
+ readonly type: v.LiteralSchema<"page_id", undefined>;
525
+ readonly page_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionPageId">]>;
526
+ }, undefined>, v.ObjectSchema<{
527
+ readonly type: v.LiteralSchema<"data_source_id", undefined>;
528
+ readonly data_source_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionDataSourceId">]>;
529
+ }, undefined>, v.ObjectSchema<{
530
+ readonly type: v.LiteralSchema<"workspace", undefined>;
531
+ readonly workspace: v.LiteralSchema<true, undefined>;
532
+ }, undefined>, v.ObjectSchema<{
533
+ readonly type: v.LiteralSchema<"block_id", undefined>;
534
+ readonly block_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionBlockId">]>;
535
+ }, undefined>, v.ObjectSchema<{
536
+ readonly type: v.LiteralSchema<"agent_id", undefined>;
537
+ readonly agent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionAgentId">]>;
538
+ }, undefined>, v.ObjectSchema<{
539
+ readonly type: v.LiteralSchema<"unavailable", undefined>;
540
+ }, undefined>], undefined>;
541
+ }, undefined>], undefined>;
542
+ readonly manifest: v.ObjectSchema<{
543
+ readonly version: v.LiteralSchema<1, undefined>;
544
+ readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
545
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
546
+ readonly slashCommand: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
547
+ readonly icon: v.OptionalSchema<v.ObjectSchema<{
548
+ readonly type: v.LiteralSchema<"emoji", undefined>;
549
+ readonly emoji: v.StringSchema<undefined>;
550
+ }, undefined>, undefined>;
551
+ readonly dataSources: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
552
+ readonly name: v.StringSchema<undefined>;
553
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
554
+ readonly icon: v.OptionalSchema<v.VariantSchema<"type", [v.ObjectSchema<{
555
+ readonly type: v.LiteralSchema<"emoji", undefined>;
556
+ readonly emoji: v.StringSchema<undefined>;
557
+ }, undefined>, v.ObjectSchema<{
558
+ readonly type: v.LiteralSchema<"external", undefined>;
559
+ readonly url: v.StringSchema<undefined>;
560
+ }, undefined>], undefined>, undefined>;
561
+ readonly properties: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
562
+ readonly name: v.StringSchema<undefined>;
563
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
564
+ 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>;
565
+ }, undefined>, undefined>, {}>;
566
+ }, undefined>, undefined>, {}>;
567
+ readonly capabilities: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
568
+ readonly capability: v.StringSchema<undefined>;
569
+ readonly resource: v.StringSchema<undefined>;
570
+ }, undefined>, undefined>, undefined>;
571
+ }, undefined>;
572
+ readonly dataSources: v.ObjectSchema<{
573
+ readonly bindings: v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
574
+ readonly collectionPointer: v.OptionalSchema<v.ObjectSchema<{
575
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionDataSourceId">]>;
576
+ readonly table: v.StringSchema<undefined>;
577
+ readonly spaceId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionSpaceId">]>, undefined>;
578
+ }, undefined>, undefined>;
579
+ readonly collectionSchema: v.OptionalSchema<v.ObjectSchema<{
580
+ readonly id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionDataSourceId">]>, undefined>;
581
+ readonly propertiesById: v.RecordSchema<v.StringSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
582
+ readonly name: v.StringSchema<undefined>;
583
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
584
+ readonly type: v.LiteralSchema<"title", undefined>;
585
+ }, undefined>, v.ObjectSchema<{
586
+ readonly name: v.StringSchema<undefined>;
587
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
588
+ readonly type: v.LiteralSchema<"rich_text", undefined>;
589
+ }, undefined>, v.ObjectSchema<{
590
+ readonly name: v.StringSchema<undefined>;
591
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
592
+ readonly type: v.LiteralSchema<"number", undefined>;
593
+ }, undefined>, v.ObjectSchema<{
594
+ readonly name: v.StringSchema<undefined>;
595
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
596
+ readonly type: v.LiteralSchema<"checkbox", undefined>;
597
+ }, undefined>, v.ObjectSchema<{
598
+ readonly name: v.StringSchema<undefined>;
599
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
600
+ readonly type: v.LiteralSchema<"url", undefined>;
601
+ }, undefined>, v.ObjectSchema<{
602
+ readonly name: v.StringSchema<undefined>;
603
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
604
+ readonly type: v.LiteralSchema<"email", undefined>;
605
+ }, undefined>, v.ObjectSchema<{
606
+ readonly name: v.StringSchema<undefined>;
607
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
608
+ readonly type: v.LiteralSchema<"phone_number", undefined>;
609
+ }, undefined>, v.ObjectSchema<{
610
+ readonly name: v.StringSchema<undefined>;
611
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
612
+ readonly type: v.LiteralSchema<"select", undefined>;
613
+ readonly options: v.ArraySchema<v.ObjectSchema<{
614
+ readonly id: v.StringSchema<undefined>;
615
+ readonly name: v.StringSchema<undefined>;
616
+ readonly color: v.OptionalSchema<v.PicklistSchema<["default", "gray", "brown", "orange", "yellow", "green", "blue", "purple", "pink", "red", "gray_background", "brown_background", "orange_background", "yellow_background", "green_background", "blue_background", "purple_background", "pink_background", "red_background", "default_background"], undefined>, undefined>;
617
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
618
+ }, undefined>, undefined>;
619
+ }, undefined>, v.ObjectSchema<{
620
+ readonly name: v.StringSchema<undefined>;
621
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
622
+ readonly type: v.LiteralSchema<"multi_select", undefined>;
623
+ readonly options: v.ArraySchema<v.ObjectSchema<{
624
+ readonly id: v.StringSchema<undefined>;
625
+ readonly name: v.StringSchema<undefined>;
626
+ readonly color: v.OptionalSchema<v.PicklistSchema<["default", "gray", "brown", "orange", "yellow", "green", "blue", "purple", "pink", "red", "gray_background", "brown_background", "orange_background", "yellow_background", "green_background", "blue_background", "purple_background", "pink_background", "red_background", "default_background"], undefined>, undefined>;
627
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
628
+ }, undefined>, undefined>;
629
+ }, undefined>, v.ObjectSchema<{
630
+ readonly name: v.StringSchema<undefined>;
631
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
632
+ readonly type: v.LiteralSchema<"status", undefined>;
633
+ readonly options: v.ArraySchema<v.ObjectSchema<{
634
+ readonly id: v.StringSchema<undefined>;
635
+ readonly name: v.StringSchema<undefined>;
636
+ readonly color: v.OptionalSchema<v.PicklistSchema<["default", "gray", "brown", "orange", "yellow", "green", "blue", "purple", "pink", "red", "gray_background", "brown_background", "orange_background", "yellow_background", "green_background", "blue_background", "purple_background", "pink_background", "red_background", "default_background"], undefined>, undefined>;
637
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
638
+ }, undefined>, undefined>;
639
+ readonly groups: v.ArraySchema<v.ObjectSchema<{
640
+ readonly id: v.StringSchema<undefined>;
641
+ readonly name: v.StringSchema<undefined>;
642
+ readonly color: v.OptionalSchema<v.PicklistSchema<["default", "gray", "brown", "orange", "yellow", "green", "blue", "purple", "pink", "red", "gray_background", "brown_background", "orange_background", "yellow_background", "green_background", "blue_background", "purple_background", "pink_background", "red_background", "default_background"], undefined>, undefined>;
643
+ readonly option_ids: v.ArraySchema<v.StringSchema<undefined>, undefined>;
644
+ }, undefined>, undefined>;
645
+ }, undefined>, v.ObjectSchema<{
646
+ readonly name: v.StringSchema<undefined>;
647
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
648
+ readonly type: v.LiteralSchema<"date", undefined>;
649
+ }, undefined>, v.ObjectSchema<{
650
+ readonly name: v.StringSchema<undefined>;
651
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
652
+ readonly type: v.LiteralSchema<"people", undefined>;
653
+ }, undefined>, v.ObjectSchema<{
654
+ readonly name: v.StringSchema<undefined>;
655
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
656
+ readonly type: v.LiteralSchema<"files", undefined>;
657
+ }, undefined>, v.ObjectSchema<{
658
+ readonly name: v.StringSchema<undefined>;
659
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
660
+ readonly type: v.LiteralSchema<"unique_id", undefined>;
661
+ }, undefined>, v.ObjectSchema<{
662
+ readonly name: v.StringSchema<undefined>;
663
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
664
+ readonly type: v.LiteralSchema<"relation", undefined>;
665
+ readonly data_source_id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
666
+ readonly dual_property: v.OptionalSchema<v.ObjectSchema<{
667
+ readonly synced_property_id: v.StringSchema<undefined>;
668
+ readonly synced_property_name: v.StringSchema<undefined>;
669
+ }, undefined>, undefined>;
670
+ }, undefined>, v.ObjectSchema<{
671
+ readonly name: v.StringSchema<undefined>;
672
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
673
+ readonly type: v.LiteralSchema<"place", undefined>;
674
+ }, undefined>, v.ObjectSchema<{
675
+ readonly name: v.StringSchema<undefined>;
676
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
677
+ readonly type: v.LiteralSchema<"formula", undefined>;
678
+ }, undefined>, v.ObjectSchema<{
679
+ readonly name: v.StringSchema<undefined>;
680
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
681
+ readonly type: v.LiteralSchema<"rollup", undefined>;
682
+ }, undefined>, v.ObjectSchema<{
683
+ readonly name: v.StringSchema<undefined>;
684
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
685
+ readonly type: v.LiteralSchema<"button", undefined>;
686
+ }, undefined>, v.ObjectSchema<{
687
+ readonly name: v.StringSchema<undefined>;
688
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
689
+ readonly type: v.LiteralSchema<"verification", undefined>;
690
+ }, undefined>, v.ObjectSchema<{
691
+ readonly name: v.StringSchema<undefined>;
692
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
693
+ readonly type: v.LiteralSchema<"last_visited_time", undefined>;
694
+ }, undefined>, v.ObjectSchema<{
695
+ readonly name: v.StringSchema<undefined>;
696
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
697
+ readonly type: v.LiteralSchema<"location", undefined>;
698
+ }, undefined>, v.ObjectSchema<{
699
+ readonly name: v.StringSchema<undefined>;
700
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
701
+ readonly type: v.LiteralSchema<"created_time", undefined>;
702
+ }, undefined>, v.ObjectSchema<{
703
+ readonly name: v.StringSchema<undefined>;
704
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
705
+ readonly type: v.LiteralSchema<"last_edited_time", undefined>;
706
+ }, undefined>, v.ObjectSchema<{
707
+ readonly name: v.StringSchema<undefined>;
708
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
709
+ readonly type: v.LiteralSchema<"created_by", undefined>;
710
+ }, undefined>, v.ObjectSchema<{
711
+ readonly name: v.StringSchema<undefined>;
712
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
713
+ readonly type: v.LiteralSchema<"last_edited_by", undefined>;
714
+ }, undefined>], undefined>, undefined>;
715
+ }, undefined>, undefined>;
716
+ readonly propertyIdsByKey: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.OptionalSchema<v.StringSchema<undefined>, undefined>, undefined>, undefined>;
717
+ readonly inaccessible: v.OptionalSchema<v.LiteralSchema<true, undefined>, undefined>;
718
+ }, undefined>, undefined>;
719
+ }, undefined>;
720
+ readonly currentUser: v.ObjectSchema<{
721
+ readonly object: v.LiteralSchema<"user", undefined>;
722
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionUserId">]>;
723
+ readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
724
+ readonly avatar_url: v.NullableSchema<v.StringSchema<undefined>, undefined>;
725
+ readonly type: v.LiteralSchema<"person", undefined>;
726
+ readonly person: v.ObjectSchema<{
727
+ readonly email: v.StringSchema<undefined>;
728
+ }, undefined>;
729
+ }, undefined>;
730
+ }, "manifest">;
731
+ readonly "~standard": v.StandardProps<{
732
+ theme: "dark" | "light";
733
+ contrastMode?: "high" | "standard" | undefined;
734
+ blockId: string;
735
+ parent: {
736
+ type: "page_id";
737
+ page_id: string;
738
+ } | {
739
+ type: "data_source_id";
740
+ data_source_id: string;
741
+ } | {
742
+ type: "workspace";
743
+ workspace: true;
744
+ } | {
745
+ type: "block_id";
746
+ block_id: string;
747
+ } | {
748
+ type: "agent_id";
749
+ agent_id: string;
750
+ } | {
751
+ type: "unavailable";
752
+ };
753
+ page: {
754
+ type: "unavailable";
755
+ } | {
756
+ type: "page";
757
+ id: string;
758
+ parent: {
759
+ type: "page_id";
760
+ page_id: string;
761
+ } | {
762
+ type: "data_source_id";
763
+ data_source_id: string;
764
+ } | {
765
+ type: "workspace";
766
+ workspace: true;
767
+ } | {
768
+ type: "block_id";
769
+ block_id: string;
770
+ } | {
771
+ type: "agent_id";
772
+ agent_id: string;
773
+ } | {
774
+ type: "unavailable";
775
+ };
776
+ };
777
+ dataSources: {
778
+ bindings: {
779
+ [x: string]: {
780
+ collectionPointer?: {
781
+ id: string;
782
+ table: string;
783
+ spaceId?: string | undefined;
784
+ } | undefined;
785
+ collectionSchema?: {
786
+ id?: string | undefined;
787
+ propertiesById: {
788
+ [x: string]: {
789
+ name: string;
790
+ description?: string | undefined;
791
+ type: "title";
792
+ } | {
793
+ name: string;
794
+ description?: string | undefined;
795
+ type: "rich_text";
796
+ } | {
797
+ name: string;
798
+ description?: string | undefined;
799
+ type: "number";
800
+ } | {
801
+ name: string;
802
+ description?: string | undefined;
803
+ type: "checkbox";
804
+ } | {
805
+ name: string;
806
+ description?: string | undefined;
807
+ type: "url";
808
+ } | {
809
+ name: string;
810
+ description?: string | undefined;
811
+ type: "email";
812
+ } | {
813
+ name: string;
814
+ description?: string | undefined;
815
+ type: "phone_number";
816
+ } | {
817
+ name: string;
818
+ description?: string | undefined;
819
+ type: "select";
820
+ options: {
821
+ id: string;
822
+ name: string;
823
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
824
+ description?: string | undefined;
825
+ }[];
826
+ } | {
827
+ name: string;
828
+ description?: string | undefined;
829
+ type: "multi_select";
830
+ options: {
831
+ id: string;
832
+ name: string;
833
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
834
+ description?: string | undefined;
835
+ }[];
836
+ } | {
837
+ name: string;
838
+ description?: string | undefined;
839
+ type: "status";
840
+ options: {
841
+ id: string;
842
+ name: string;
843
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
844
+ description?: string | undefined;
845
+ }[];
846
+ groups: {
847
+ id: string;
848
+ name: string;
849
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
850
+ option_ids: string[];
851
+ }[];
852
+ } | {
853
+ name: string;
854
+ description?: string | undefined;
855
+ type: "date";
856
+ } | {
857
+ name: string;
858
+ description?: string | undefined;
859
+ type: "people";
860
+ } | {
861
+ name: string;
862
+ description?: string | undefined;
863
+ type: "files";
864
+ } | {
865
+ name: string;
866
+ description?: string | undefined;
867
+ type: "unique_id";
868
+ } | {
869
+ name: string;
870
+ description?: string | undefined;
871
+ type: "relation";
872
+ data_source_id?: string | undefined;
873
+ dual_property?: {
874
+ synced_property_id: string;
875
+ synced_property_name: string;
876
+ } | undefined;
877
+ } | {
878
+ name: string;
879
+ description?: string | undefined;
880
+ type: "place";
881
+ } | {
882
+ name: string;
883
+ description?: string | undefined;
884
+ type: "formula";
885
+ } | {
886
+ name: string;
887
+ description?: string | undefined;
888
+ type: "rollup";
889
+ } | {
890
+ name: string;
891
+ description?: string | undefined;
892
+ type: "button";
893
+ } | {
894
+ name: string;
895
+ description?: string | undefined;
896
+ type: "verification";
897
+ } | {
898
+ name: string;
899
+ description?: string | undefined;
900
+ type: "last_visited_time";
901
+ } | {
902
+ name: string;
903
+ description?: string | undefined;
904
+ type: "location";
905
+ } | {
906
+ name: string;
907
+ description?: string | undefined;
908
+ type: "created_time";
909
+ } | {
910
+ name: string;
911
+ description?: string | undefined;
912
+ type: "last_edited_time";
913
+ } | {
914
+ name: string;
915
+ description?: string | undefined;
916
+ type: "created_by";
917
+ } | {
918
+ name: string;
919
+ description?: string | undefined;
920
+ type: "last_edited_by";
921
+ };
922
+ };
923
+ } | undefined;
924
+ propertyIdsByKey?: {
925
+ [x: string]: string | undefined;
926
+ } | undefined;
927
+ inaccessible?: true | undefined;
928
+ };
929
+ };
930
+ };
931
+ currentUser: {
932
+ object: "user";
933
+ id: string;
934
+ name?: string | undefined;
935
+ avatar_url: string | null;
936
+ type: "person";
937
+ person: {
938
+ email: string;
939
+ };
940
+ };
941
+ }, {
942
+ theme: "dark" | "light";
943
+ contrastMode?: "high" | "standard" | undefined;
944
+ blockId: string & v.Brand<"NotionBlockId">;
945
+ parent: {
946
+ type: "page_id";
947
+ page_id: string & v.Brand<"NotionPageId">;
948
+ } | {
949
+ type: "data_source_id";
950
+ data_source_id: string & v.Brand<"NotionDataSourceId">;
951
+ } | {
952
+ type: "workspace";
953
+ workspace: true;
954
+ } | {
955
+ type: "block_id";
956
+ block_id: string & v.Brand<"NotionBlockId">;
957
+ } | {
958
+ type: "agent_id";
959
+ agent_id: string & v.Brand<"NotionAgentId">;
960
+ } | {
961
+ type: "unavailable";
962
+ };
963
+ page: {
964
+ type: "unavailable";
965
+ } | {
966
+ type: "page";
967
+ id: string & v.Brand<"NotionPageId">;
968
+ parent: {
969
+ type: "page_id";
970
+ page_id: string & v.Brand<"NotionPageId">;
971
+ } | {
972
+ type: "data_source_id";
973
+ data_source_id: string & v.Brand<"NotionDataSourceId">;
974
+ } | {
975
+ type: "workspace";
976
+ workspace: true;
977
+ } | {
978
+ type: "block_id";
979
+ block_id: string & v.Brand<"NotionBlockId">;
980
+ } | {
981
+ type: "agent_id";
982
+ agent_id: string & v.Brand<"NotionAgentId">;
983
+ } | {
984
+ type: "unavailable";
985
+ };
986
+ };
987
+ dataSources: {
988
+ bindings: {
989
+ [x: string]: {
990
+ collectionPointer?: {
991
+ id: string & v.Brand<"NotionDataSourceId">;
992
+ table: string;
993
+ spaceId?: (string & v.Brand<"NotionSpaceId">) | undefined;
994
+ } | undefined;
995
+ collectionSchema?: {
996
+ id?: (string & v.Brand<"NotionDataSourceId">) | undefined;
997
+ propertiesById: {
998
+ [x: string]: {
999
+ name: string;
1000
+ description?: string | undefined;
1001
+ type: "title";
1002
+ } | {
1003
+ name: string;
1004
+ description?: string | undefined;
1005
+ type: "rich_text";
1006
+ } | {
1007
+ name: string;
1008
+ description?: string | undefined;
1009
+ type: "number";
1010
+ } | {
1011
+ name: string;
1012
+ description?: string | undefined;
1013
+ type: "checkbox";
1014
+ } | {
1015
+ name: string;
1016
+ description?: string | undefined;
1017
+ type: "url";
1018
+ } | {
1019
+ name: string;
1020
+ description?: string | undefined;
1021
+ type: "email";
1022
+ } | {
1023
+ name: string;
1024
+ description?: string | undefined;
1025
+ type: "phone_number";
1026
+ } | {
1027
+ name: string;
1028
+ description?: string | undefined;
1029
+ type: "select";
1030
+ options: {
1031
+ id: string;
1032
+ name: string;
1033
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
1034
+ description?: string | undefined;
1035
+ }[];
1036
+ } | {
1037
+ name: string;
1038
+ description?: string | undefined;
1039
+ type: "multi_select";
1040
+ options: {
1041
+ id: string;
1042
+ name: string;
1043
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
1044
+ description?: string | undefined;
1045
+ }[];
1046
+ } | {
1047
+ name: string;
1048
+ description?: string | undefined;
1049
+ type: "status";
1050
+ options: {
1051
+ id: string;
1052
+ name: string;
1053
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
1054
+ description?: string | undefined;
1055
+ }[];
1056
+ groups: {
1057
+ id: string;
1058
+ name: string;
1059
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
1060
+ option_ids: string[];
1061
+ }[];
1062
+ } | {
1063
+ name: string;
1064
+ description?: string | undefined;
1065
+ type: "date";
1066
+ } | {
1067
+ name: string;
1068
+ description?: string | undefined;
1069
+ type: "people";
1070
+ } | {
1071
+ name: string;
1072
+ description?: string | undefined;
1073
+ type: "files";
1074
+ } | {
1075
+ name: string;
1076
+ description?: string | undefined;
1077
+ type: "unique_id";
1078
+ } | {
1079
+ name: string;
1080
+ description?: string | undefined;
1081
+ type: "relation";
1082
+ data_source_id?: string | undefined;
1083
+ dual_property?: {
1084
+ synced_property_id: string;
1085
+ synced_property_name: string;
1086
+ } | undefined;
1087
+ } | {
1088
+ name: string;
1089
+ description?: string | undefined;
1090
+ type: "place";
1091
+ } | {
1092
+ name: string;
1093
+ description?: string | undefined;
1094
+ type: "formula";
1095
+ } | {
1096
+ name: string;
1097
+ description?: string | undefined;
1098
+ type: "rollup";
1099
+ } | {
1100
+ name: string;
1101
+ description?: string | undefined;
1102
+ type: "button";
1103
+ } | {
1104
+ name: string;
1105
+ description?: string | undefined;
1106
+ type: "verification";
1107
+ } | {
1108
+ name: string;
1109
+ description?: string | undefined;
1110
+ type: "last_visited_time";
1111
+ } | {
1112
+ name: string;
1113
+ description?: string | undefined;
1114
+ type: "location";
1115
+ } | {
1116
+ name: string;
1117
+ description?: string | undefined;
1118
+ type: "created_time";
1119
+ } | {
1120
+ name: string;
1121
+ description?: string | undefined;
1122
+ type: "last_edited_time";
1123
+ } | {
1124
+ name: string;
1125
+ description?: string | undefined;
1126
+ type: "created_by";
1127
+ } | {
1128
+ name: string;
1129
+ description?: string | undefined;
1130
+ type: "last_edited_by";
1131
+ };
1132
+ };
1133
+ } | undefined;
1134
+ propertyIdsByKey?: {
1135
+ [x: string]: string | undefined;
1136
+ } | undefined;
1137
+ inaccessible?: true | undefined;
1138
+ };
1139
+ };
1140
+ };
1141
+ currentUser: {
1142
+ object: "user";
1143
+ id: string & v.Brand<"NotionUserId">;
1144
+ name?: string | undefined;
1145
+ avatar_url: string | null;
1146
+ type: "person";
1147
+ person: {
1148
+ email: string;
1149
+ };
1150
+ };
1151
+ }>;
1152
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
1153
+ theme: "dark" | "light";
1154
+ contrastMode?: "high" | "standard" | undefined;
1155
+ blockId: string & v.Brand<"NotionBlockId">;
1156
+ parent: {
1157
+ type: "page_id";
1158
+ page_id: string & v.Brand<"NotionPageId">;
1159
+ } | {
1160
+ type: "data_source_id";
1161
+ data_source_id: string & v.Brand<"NotionDataSourceId">;
1162
+ } | {
1163
+ type: "workspace";
1164
+ workspace: true;
1165
+ } | {
1166
+ type: "block_id";
1167
+ block_id: string & v.Brand<"NotionBlockId">;
1168
+ } | {
1169
+ type: "agent_id";
1170
+ agent_id: string & v.Brand<"NotionAgentId">;
1171
+ } | {
1172
+ type: "unavailable";
1173
+ };
1174
+ page: {
1175
+ type: "unavailable";
1176
+ } | {
1177
+ type: "page";
1178
+ id: string & v.Brand<"NotionPageId">;
1179
+ parent: {
1180
+ type: "page_id";
1181
+ page_id: string & v.Brand<"NotionPageId">;
1182
+ } | {
1183
+ type: "data_source_id";
1184
+ data_source_id: string & v.Brand<"NotionDataSourceId">;
1185
+ } | {
1186
+ type: "workspace";
1187
+ workspace: true;
1188
+ } | {
1189
+ type: "block_id";
1190
+ block_id: string & v.Brand<"NotionBlockId">;
1191
+ } | {
1192
+ type: "agent_id";
1193
+ agent_id: string & v.Brand<"NotionAgentId">;
1194
+ } | {
1195
+ type: "unavailable";
1196
+ };
1197
+ };
1198
+ dataSources: {
1199
+ bindings: {
1200
+ [x: string]: {
1201
+ collectionPointer?: {
1202
+ id: string & v.Brand<"NotionDataSourceId">;
1203
+ table: string;
1204
+ spaceId?: (string & v.Brand<"NotionSpaceId">) | undefined;
1205
+ } | undefined;
1206
+ collectionSchema?: {
1207
+ id?: (string & v.Brand<"NotionDataSourceId">) | undefined;
1208
+ propertiesById: {
1209
+ [x: string]: {
1210
+ name: string;
1211
+ description?: string | undefined;
1212
+ type: "title";
1213
+ } | {
1214
+ name: string;
1215
+ description?: string | undefined;
1216
+ type: "rich_text";
1217
+ } | {
1218
+ name: string;
1219
+ description?: string | undefined;
1220
+ type: "number";
1221
+ } | {
1222
+ name: string;
1223
+ description?: string | undefined;
1224
+ type: "checkbox";
1225
+ } | {
1226
+ name: string;
1227
+ description?: string | undefined;
1228
+ type: "url";
1229
+ } | {
1230
+ name: string;
1231
+ description?: string | undefined;
1232
+ type: "email";
1233
+ } | {
1234
+ name: string;
1235
+ description?: string | undefined;
1236
+ type: "phone_number";
1237
+ } | {
1238
+ name: string;
1239
+ description?: string | undefined;
1240
+ type: "select";
1241
+ options: {
1242
+ id: string;
1243
+ name: string;
1244
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
1245
+ description?: string | undefined;
1246
+ }[];
1247
+ } | {
1248
+ name: string;
1249
+ description?: string | undefined;
1250
+ type: "multi_select";
1251
+ options: {
1252
+ id: string;
1253
+ name: string;
1254
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
1255
+ description?: string | undefined;
1256
+ }[];
1257
+ } | {
1258
+ name: string;
1259
+ description?: string | undefined;
1260
+ type: "status";
1261
+ options: {
1262
+ id: string;
1263
+ name: string;
1264
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
1265
+ description?: string | undefined;
1266
+ }[];
1267
+ groups: {
1268
+ id: string;
1269
+ name: string;
1270
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
1271
+ option_ids: string[];
1272
+ }[];
1273
+ } | {
1274
+ name: string;
1275
+ description?: string | undefined;
1276
+ type: "date";
1277
+ } | {
1278
+ name: string;
1279
+ description?: string | undefined;
1280
+ type: "people";
1281
+ } | {
1282
+ name: string;
1283
+ description?: string | undefined;
1284
+ type: "files";
1285
+ } | {
1286
+ name: string;
1287
+ description?: string | undefined;
1288
+ type: "unique_id";
1289
+ } | {
1290
+ name: string;
1291
+ description?: string | undefined;
1292
+ type: "relation";
1293
+ data_source_id?: string | undefined;
1294
+ dual_property?: {
1295
+ synced_property_id: string;
1296
+ synced_property_name: string;
1297
+ } | undefined;
1298
+ } | {
1299
+ name: string;
1300
+ description?: string | undefined;
1301
+ type: "place";
1302
+ } | {
1303
+ name: string;
1304
+ description?: string | undefined;
1305
+ type: "formula";
1306
+ } | {
1307
+ name: string;
1308
+ description?: string | undefined;
1309
+ type: "rollup";
1310
+ } | {
1311
+ name: string;
1312
+ description?: string | undefined;
1313
+ type: "button";
1314
+ } | {
1315
+ name: string;
1316
+ description?: string | undefined;
1317
+ type: "verification";
1318
+ } | {
1319
+ name: string;
1320
+ description?: string | undefined;
1321
+ type: "last_visited_time";
1322
+ } | {
1323
+ name: string;
1324
+ description?: string | undefined;
1325
+ type: "location";
1326
+ } | {
1327
+ name: string;
1328
+ description?: string | undefined;
1329
+ type: "created_time";
1330
+ } | {
1331
+ name: string;
1332
+ description?: string | undefined;
1333
+ type: "last_edited_time";
1334
+ } | {
1335
+ name: string;
1336
+ description?: string | undefined;
1337
+ type: "created_by";
1338
+ } | {
1339
+ name: string;
1340
+ description?: string | undefined;
1341
+ type: "last_edited_by";
1342
+ };
1343
+ };
1344
+ } | undefined;
1345
+ propertyIdsByKey?: {
1346
+ [x: string]: string | undefined;
1347
+ } | undefined;
1348
+ inaccessible?: true | undefined;
1349
+ };
1350
+ };
1351
+ };
1352
+ currentUser: {
1353
+ object: "user";
1354
+ id: string & v.Brand<"NotionUserId">;
1355
+ name?: string | undefined;
1356
+ avatar_url: string | null;
1357
+ type: "person";
1358
+ person: {
1359
+ email: string;
1360
+ };
1361
+ };
1362
+ }, v.ArrayIssue | v.LiteralIssue | v.ObjectIssue | v.PicklistIssue | v.RecordIssue | v.StringIssue | v.VariantIssue>;
1363
+ readonly "~types"?: {
1364
+ readonly input: {
1365
+ theme: "dark" | "light";
1366
+ contrastMode?: "high" | "standard" | undefined;
1367
+ blockId: string;
1368
+ parent: {
1369
+ type: "page_id";
1370
+ page_id: string;
1371
+ } | {
1372
+ type: "data_source_id";
1373
+ data_source_id: string;
1374
+ } | {
1375
+ type: "workspace";
1376
+ workspace: true;
1377
+ } | {
1378
+ type: "block_id";
1379
+ block_id: string;
1380
+ } | {
1381
+ type: "agent_id";
1382
+ agent_id: string;
1383
+ } | {
1384
+ type: "unavailable";
1385
+ };
1386
+ page: {
1387
+ type: "unavailable";
1388
+ } | {
1389
+ type: "page";
1390
+ id: string;
1391
+ parent: {
1392
+ type: "page_id";
1393
+ page_id: string;
1394
+ } | {
1395
+ type: "data_source_id";
1396
+ data_source_id: string;
1397
+ } | {
1398
+ type: "workspace";
1399
+ workspace: true;
1400
+ } | {
1401
+ type: "block_id";
1402
+ block_id: string;
1403
+ } | {
1404
+ type: "agent_id";
1405
+ agent_id: string;
1406
+ } | {
1407
+ type: "unavailable";
1408
+ };
1409
+ };
1410
+ dataSources: {
1411
+ bindings: {
1412
+ [x: string]: {
1413
+ collectionPointer?: {
1414
+ id: string;
1415
+ table: string;
1416
+ spaceId?: string | undefined;
1417
+ } | undefined;
1418
+ collectionSchema?: {
1419
+ id?: string | undefined;
1420
+ propertiesById: {
1421
+ [x: string]: {
1422
+ name: string;
1423
+ description?: string | undefined;
1424
+ type: "title";
1425
+ } | {
1426
+ name: string;
1427
+ description?: string | undefined;
1428
+ type: "rich_text";
1429
+ } | {
1430
+ name: string;
1431
+ description?: string | undefined;
1432
+ type: "number";
1433
+ } | {
1434
+ name: string;
1435
+ description?: string | undefined;
1436
+ type: "checkbox";
1437
+ } | {
1438
+ name: string;
1439
+ description?: string | undefined;
1440
+ type: "url";
1441
+ } | {
1442
+ name: string;
1443
+ description?: string | undefined;
1444
+ type: "email";
1445
+ } | {
1446
+ name: string;
1447
+ description?: string | undefined;
1448
+ type: "phone_number";
1449
+ } | {
1450
+ name: string;
1451
+ description?: string | undefined;
1452
+ type: "select";
1453
+ options: {
1454
+ id: string;
1455
+ name: string;
1456
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
1457
+ description?: string | undefined;
1458
+ }[];
1459
+ } | {
1460
+ name: string;
1461
+ description?: string | undefined;
1462
+ type: "multi_select";
1463
+ options: {
1464
+ id: string;
1465
+ name: string;
1466
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
1467
+ description?: string | undefined;
1468
+ }[];
1469
+ } | {
1470
+ name: string;
1471
+ description?: string | undefined;
1472
+ type: "status";
1473
+ options: {
1474
+ id: string;
1475
+ name: string;
1476
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
1477
+ description?: string | undefined;
1478
+ }[];
1479
+ groups: {
1480
+ id: string;
1481
+ name: string;
1482
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
1483
+ option_ids: string[];
1484
+ }[];
1485
+ } | {
1486
+ name: string;
1487
+ description?: string | undefined;
1488
+ type: "date";
1489
+ } | {
1490
+ name: string;
1491
+ description?: string | undefined;
1492
+ type: "people";
1493
+ } | {
1494
+ name: string;
1495
+ description?: string | undefined;
1496
+ type: "files";
1497
+ } | {
1498
+ name: string;
1499
+ description?: string | undefined;
1500
+ type: "unique_id";
1501
+ } | {
1502
+ name: string;
1503
+ description?: string | undefined;
1504
+ type: "relation";
1505
+ data_source_id?: string | undefined;
1506
+ dual_property?: {
1507
+ synced_property_id: string;
1508
+ synced_property_name: string;
1509
+ } | undefined;
1510
+ } | {
1511
+ name: string;
1512
+ description?: string | undefined;
1513
+ type: "place";
1514
+ } | {
1515
+ name: string;
1516
+ description?: string | undefined;
1517
+ type: "formula";
1518
+ } | {
1519
+ name: string;
1520
+ description?: string | undefined;
1521
+ type: "rollup";
1522
+ } | {
1523
+ name: string;
1524
+ description?: string | undefined;
1525
+ type: "button";
1526
+ } | {
1527
+ name: string;
1528
+ description?: string | undefined;
1529
+ type: "verification";
1530
+ } | {
1531
+ name: string;
1532
+ description?: string | undefined;
1533
+ type: "last_visited_time";
1534
+ } | {
1535
+ name: string;
1536
+ description?: string | undefined;
1537
+ type: "location";
1538
+ } | {
1539
+ name: string;
1540
+ description?: string | undefined;
1541
+ type: "created_time";
1542
+ } | {
1543
+ name: string;
1544
+ description?: string | undefined;
1545
+ type: "last_edited_time";
1546
+ } | {
1547
+ name: string;
1548
+ description?: string | undefined;
1549
+ type: "created_by";
1550
+ } | {
1551
+ name: string;
1552
+ description?: string | undefined;
1553
+ type: "last_edited_by";
1554
+ };
1555
+ };
1556
+ } | undefined;
1557
+ propertyIdsByKey?: {
1558
+ [x: string]: string | undefined;
1559
+ } | undefined;
1560
+ inaccessible?: true | undefined;
1561
+ };
1562
+ };
1563
+ };
1564
+ currentUser: {
1565
+ object: "user";
1566
+ id: string;
1567
+ name?: string | undefined;
1568
+ avatar_url: string | null;
1569
+ type: "person";
1570
+ person: {
1571
+ email: string;
1572
+ };
1573
+ };
1574
+ };
1575
+ readonly output: {
1576
+ theme: "dark" | "light";
1577
+ contrastMode?: "high" | "standard" | undefined;
1578
+ blockId: string & v.Brand<"NotionBlockId">;
1579
+ parent: {
1580
+ type: "page_id";
1581
+ page_id: string & v.Brand<"NotionPageId">;
1582
+ } | {
1583
+ type: "data_source_id";
1584
+ data_source_id: string & v.Brand<"NotionDataSourceId">;
1585
+ } | {
1586
+ type: "workspace";
1587
+ workspace: true;
1588
+ } | {
1589
+ type: "block_id";
1590
+ block_id: string & v.Brand<"NotionBlockId">;
1591
+ } | {
1592
+ type: "agent_id";
1593
+ agent_id: string & v.Brand<"NotionAgentId">;
1594
+ } | {
1595
+ type: "unavailable";
1596
+ };
1597
+ page: {
1598
+ type: "unavailable";
1599
+ } | {
1600
+ type: "page";
1601
+ id: string & v.Brand<"NotionPageId">;
1602
+ parent: {
1603
+ type: "page_id";
1604
+ page_id: string & v.Brand<"NotionPageId">;
1605
+ } | {
1606
+ type: "data_source_id";
1607
+ data_source_id: string & v.Brand<"NotionDataSourceId">;
1608
+ } | {
1609
+ type: "workspace";
1610
+ workspace: true;
1611
+ } | {
1612
+ type: "block_id";
1613
+ block_id: string & v.Brand<"NotionBlockId">;
1614
+ } | {
1615
+ type: "agent_id";
1616
+ agent_id: string & v.Brand<"NotionAgentId">;
1617
+ } | {
1618
+ type: "unavailable";
1619
+ };
1620
+ };
1621
+ dataSources: {
1622
+ bindings: {
1623
+ [x: string]: {
1624
+ collectionPointer?: {
1625
+ id: string & v.Brand<"NotionDataSourceId">;
1626
+ table: string;
1627
+ spaceId?: (string & v.Brand<"NotionSpaceId">) | undefined;
1628
+ } | undefined;
1629
+ collectionSchema?: {
1630
+ id?: (string & v.Brand<"NotionDataSourceId">) | undefined;
1631
+ propertiesById: {
1632
+ [x: string]: {
1633
+ name: string;
1634
+ description?: string | undefined;
1635
+ type: "title";
1636
+ } | {
1637
+ name: string;
1638
+ description?: string | undefined;
1639
+ type: "rich_text";
1640
+ } | {
1641
+ name: string;
1642
+ description?: string | undefined;
1643
+ type: "number";
1644
+ } | {
1645
+ name: string;
1646
+ description?: string | undefined;
1647
+ type: "checkbox";
1648
+ } | {
1649
+ name: string;
1650
+ description?: string | undefined;
1651
+ type: "url";
1652
+ } | {
1653
+ name: string;
1654
+ description?: string | undefined;
1655
+ type: "email";
1656
+ } | {
1657
+ name: string;
1658
+ description?: string | undefined;
1659
+ type: "phone_number";
1660
+ } | {
1661
+ name: string;
1662
+ description?: string | undefined;
1663
+ type: "select";
1664
+ options: {
1665
+ id: string;
1666
+ name: string;
1667
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
1668
+ description?: string | undefined;
1669
+ }[];
1670
+ } | {
1671
+ name: string;
1672
+ description?: string | undefined;
1673
+ type: "multi_select";
1674
+ options: {
1675
+ id: string;
1676
+ name: string;
1677
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
1678
+ description?: string | undefined;
1679
+ }[];
1680
+ } | {
1681
+ name: string;
1682
+ description?: string | undefined;
1683
+ type: "status";
1684
+ options: {
1685
+ id: string;
1686
+ name: string;
1687
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
1688
+ description?: string | undefined;
1689
+ }[];
1690
+ groups: {
1691
+ id: string;
1692
+ name: string;
1693
+ color?: "blue" | "blue_background" | "brown" | "brown_background" | "default" | "default_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background" | undefined;
1694
+ option_ids: string[];
1695
+ }[];
1696
+ } | {
1697
+ name: string;
1698
+ description?: string | undefined;
1699
+ type: "date";
1700
+ } | {
1701
+ name: string;
1702
+ description?: string | undefined;
1703
+ type: "people";
1704
+ } | {
1705
+ name: string;
1706
+ description?: string | undefined;
1707
+ type: "files";
1708
+ } | {
1709
+ name: string;
1710
+ description?: string | undefined;
1711
+ type: "unique_id";
1712
+ } | {
1713
+ name: string;
1714
+ description?: string | undefined;
1715
+ type: "relation";
1716
+ data_source_id?: string | undefined;
1717
+ dual_property?: {
1718
+ synced_property_id: string;
1719
+ synced_property_name: string;
1720
+ } | undefined;
1721
+ } | {
1722
+ name: string;
1723
+ description?: string | undefined;
1724
+ type: "place";
1725
+ } | {
1726
+ name: string;
1727
+ description?: string | undefined;
1728
+ type: "formula";
1729
+ } | {
1730
+ name: string;
1731
+ description?: string | undefined;
1732
+ type: "rollup";
1733
+ } | {
1734
+ name: string;
1735
+ description?: string | undefined;
1736
+ type: "button";
1737
+ } | {
1738
+ name: string;
1739
+ description?: string | undefined;
1740
+ type: "verification";
1741
+ } | {
1742
+ name: string;
1743
+ description?: string | undefined;
1744
+ type: "last_visited_time";
1745
+ } | {
1746
+ name: string;
1747
+ description?: string | undefined;
1748
+ type: "location";
1749
+ } | {
1750
+ name: string;
1751
+ description?: string | undefined;
1752
+ type: "created_time";
1753
+ } | {
1754
+ name: string;
1755
+ description?: string | undefined;
1756
+ type: "last_edited_time";
1757
+ } | {
1758
+ name: string;
1759
+ description?: string | undefined;
1760
+ type: "created_by";
1761
+ } | {
1762
+ name: string;
1763
+ description?: string | undefined;
1764
+ type: "last_edited_by";
1765
+ };
1766
+ };
1767
+ } | undefined;
1768
+ propertyIdsByKey?: {
1769
+ [x: string]: string | undefined;
1770
+ } | undefined;
1771
+ inaccessible?: true | undefined;
1772
+ };
1773
+ };
1774
+ };
1775
+ currentUser: {
1776
+ object: "user";
1777
+ id: string & v.Brand<"NotionUserId">;
1778
+ name?: string | undefined;
1779
+ avatar_url: string | null;
1780
+ type: "person";
1781
+ person: {
1782
+ email: string;
1783
+ };
1784
+ };
1785
+ };
1786
+ readonly issue: v.ArrayIssue | v.LiteralIssue | v.ObjectIssue | v.PicklistIssue | v.RecordIssue | v.StringIssue | v.VariantIssue;
1787
+ } | undefined;
1788
+ };
1789
+ }, undefined>, v.ObjectSchema<{
1790
+ readonly status: v.LiteralSchema<"error", undefined>;
1791
+ readonly error: v.ObjectSchema<{
1792
+ readonly code: v.StringSchema<undefined>;
1793
+ readonly message: v.StringSchema<undefined>;
1794
+ readonly isRetryable: v.BooleanSchema<undefined>;
1795
+ }, undefined>;
1796
+ }, undefined>], undefined>;
1797
+ /** Adapter-owned state or an explicit preparation error. The host adds the manifest to init. */
1798
+ export type CustomBlockHostPreparedStateResult = {
1799
+ status: "success";
1800
+ initialState: Omit<CustomBlockHostInitialState, "manifest">;
1801
+ } | {
1802
+ status: "error";
1803
+ error: CustomBlockInitErrorInfo;
1804
+ };
1805
+ export type CustomBlockHostPrepareInitialState = (args: {
1806
+ manifest: BridgeCustomBlockManifest;
1807
+ signal: AbortSignal;
1808
+ }) => Promise<CustomBlockHostPreparedStateResult>;
1809
+ //# sourceMappingURL=initialState.d.ts.map