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