opensentinel 2.1.1 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (268) hide show
  1. package/README.md +354 -283
  2. package/dist/archiver-AVNBYCKQ.js +15340 -0
  3. package/dist/archiver-AVNBYCKQ.js.map +1 -0
  4. package/dist/audit-logger-OBPR7CRO.js +22 -0
  5. package/dist/auth-UOX5K2BE.js +18 -0
  6. package/dist/autonomy-ZXDBDQUJ.js +86 -0
  7. package/dist/autonomy-ZXDBDQUJ.js.map +1 -0
  8. package/dist/aws-s3-Q4LLZZPD.js +146 -0
  9. package/dist/aws-s3-Q4LLZZPD.js.map +1 -0
  10. package/dist/backup-restore-PZ7CYYB7.js +16 -0
  11. package/dist/blocks-R3PODY47.js +23 -0
  12. package/dist/bot-QRARP4UN.js +36 -0
  13. package/dist/brain-7XLLM3KC.js +56 -0
  14. package/dist/camera-monitor-M5CYKUU4.js +335 -0
  15. package/dist/camera-monitor-M5CYKUU4.js.map +1 -0
  16. package/dist/{charts-MMXM6BWW.js → charts-V7ARZNKF.js} +2 -2
  17. package/dist/chunk-22VGGA7S.js +330 -0
  18. package/dist/chunk-22VGGA7S.js.map +1 -0
  19. package/dist/chunk-35WYTA3C.js +382 -0
  20. package/dist/chunk-35WYTA3C.js.map +1 -0
  21. package/dist/chunk-3E2PSU2C.js +146 -0
  22. package/dist/chunk-3E2PSU2C.js.map +1 -0
  23. package/dist/{chunk-L3F43VPB.js → chunk-4GLYY4NN.js} +2 -2
  24. package/dist/{chunk-L3F43VPB.js.map → chunk-4GLYY4NN.js.map} +1 -1
  25. package/dist/{chunk-L3PDU3XN.js → chunk-4UOE5TUZ.js} +4 -4
  26. package/dist/{chunk-6SNHU3CY.js → chunk-66OJ3WB4.js} +2 -2
  27. package/dist/chunk-6KONMXQ6.js +297 -0
  28. package/dist/chunk-6KONMXQ6.js.map +1 -0
  29. package/dist/chunk-6PMVAAA7.js +196 -0
  30. package/dist/chunk-6PMVAAA7.js.map +1 -0
  31. package/dist/chunk-766ASQWE.js +32620 -0
  32. package/dist/chunk-766ASQWE.js.map +1 -0
  33. package/dist/chunk-7WQO5J2M.js +29 -0
  34. package/dist/chunk-7WQO5J2M.js.map +1 -0
  35. package/dist/chunk-APHSRMBS.js +148 -0
  36. package/dist/chunk-APHSRMBS.js.map +1 -0
  37. package/dist/{chunk-4LVWXUNC.js → chunk-AYUKPTSM.js} +57 -39
  38. package/dist/chunk-AYUKPTSM.js.map +1 -0
  39. package/dist/chunk-BIPYADGB.js +84 -0
  40. package/dist/chunk-BIPYADGB.js.map +1 -0
  41. package/dist/chunk-BRBWNV65.js +457 -0
  42. package/dist/chunk-BRBWNV65.js.map +1 -0
  43. package/dist/chunk-BXZ6EA52.js +382 -0
  44. package/dist/chunk-BXZ6EA52.js.map +1 -0
  45. package/dist/chunk-EVE7MIIY.js +290 -0
  46. package/dist/chunk-EVE7MIIY.js.map +1 -0
  47. package/dist/chunk-F3TTNID2.js +138 -0
  48. package/dist/chunk-F3TTNID2.js.map +1 -0
  49. package/dist/chunk-H5RQOFO2.js +190 -0
  50. package/dist/chunk-H5RQOFO2.js.map +1 -0
  51. package/dist/chunk-HN3F4WSW.js +145 -0
  52. package/dist/chunk-HN3F4WSW.js.map +1 -0
  53. package/dist/{chunk-6DRDKB45.js → chunk-I6BDYQIG.js} +20 -9
  54. package/dist/chunk-I6BDYQIG.js.map +1 -0
  55. package/dist/chunk-IZJMVV7O.js +347 -0
  56. package/dist/chunk-IZJMVV7O.js.map +1 -0
  57. package/dist/chunk-KM22GV7G.js +211 -0
  58. package/dist/chunk-KM22GV7G.js.map +1 -0
  59. package/dist/chunk-MGFBLVR7.js +103 -0
  60. package/dist/chunk-MGFBLVR7.js.map +1 -0
  61. package/dist/chunk-MQJ2ECQT.js +228 -0
  62. package/dist/chunk-MQJ2ECQT.js.map +1 -0
  63. package/dist/{chunk-F6QUZQGI.js → chunk-MXAPLSJ5.js} +2 -2
  64. package/dist/{chunk-GK3E2I7A.js → chunk-NHMBTUMW.js} +2 -2
  65. package/dist/chunk-NPRTSZIF.js +131 -0
  66. package/dist/chunk-NPRTSZIF.js.map +1 -0
  67. package/dist/chunk-O7IH7JTI.js +1898 -0
  68. package/dist/chunk-O7IH7JTI.js.map +1 -0
  69. package/dist/chunk-OCVQGBJK.js +293 -0
  70. package/dist/chunk-OCVQGBJK.js.map +1 -0
  71. package/dist/chunk-P6QINGFL.js +332 -0
  72. package/dist/chunk-P6QINGFL.js.map +1 -0
  73. package/dist/chunk-PHDZKPNE.js +91 -0
  74. package/dist/chunk-PHDZKPNE.js.map +1 -0
  75. package/dist/chunk-PLDDJCW6.js +49 -0
  76. package/dist/chunk-PTGTGXV2.js +164 -0
  77. package/dist/chunk-PTGTGXV2.js.map +1 -0
  78. package/dist/chunk-REMIY4U2.js +171 -0
  79. package/dist/chunk-REMIY4U2.js.map +1 -0
  80. package/dist/chunk-RZ4YESBG.js +141 -0
  81. package/dist/chunk-RZ4YESBG.js.map +1 -0
  82. package/dist/chunk-SAX5MHK4.js +111 -0
  83. package/dist/chunk-SAX5MHK4.js.map +1 -0
  84. package/dist/{chunk-GVJVEWHI.js → chunk-SJSUSJ47.js} +2 -2
  85. package/dist/chunk-SPPMCAKG.js +777 -0
  86. package/dist/chunk-SPPMCAKG.js.map +1 -0
  87. package/dist/chunk-SVAPX2XN.js +2441 -0
  88. package/dist/chunk-SVAPX2XN.js.map +1 -0
  89. package/dist/chunk-TVEWKIK3.js +452 -0
  90. package/dist/chunk-TVEWKIK3.js.map +1 -0
  91. package/dist/{chunk-HH2HBTQM.js → chunk-TYAGMJNV.js} +5 -5
  92. package/dist/{chunk-JXUP2X7V.js → chunk-VEHFVBLI.js} +2 -2
  93. package/dist/chunk-VNX5GMTN.js +128 -0
  94. package/dist/chunk-VNX5GMTN.js.map +1 -0
  95. package/dist/chunk-VRD5CYRL.js +1568 -0
  96. package/dist/chunk-VRD5CYRL.js.map +1 -0
  97. package/dist/chunk-WLUHNG6X.js +122 -0
  98. package/dist/chunk-WLUHNG6X.js.map +1 -0
  99. package/dist/chunk-WRAKK6K6.js +265 -0
  100. package/dist/chunk-WRAKK6K6.js.map +1 -0
  101. package/dist/chunk-XKYRH4FM.js +681 -0
  102. package/dist/chunk-XKYRH4FM.js.map +1 -0
  103. package/dist/{chunk-GUBEEYDW.js → chunk-XMCVRVTF.js} +2 -2
  104. package/dist/{chunk-GUBEEYDW.js.map → chunk-XMCVRVTF.js.map} +1 -1
  105. package/dist/chunk-ZLZKF2PM.js +310 -0
  106. package/dist/chunk-ZLZKF2PM.js.map +1 -0
  107. package/dist/cli.js +5 -1
  108. package/dist/cli.js.map +1 -1
  109. package/dist/client-ZQSFPMOB.js +21 -0
  110. package/dist/clipboard-manager-TEO2GEDN.js +24 -0
  111. package/dist/commands/setup.js +3 -3
  112. package/dist/commands/setup.js.map +1 -1
  113. package/dist/commands/start.js +3 -3
  114. package/dist/commands/status.js +2 -2
  115. package/dist/commands/stop.js +2 -2
  116. package/dist/commands/utils.js +2 -2
  117. package/dist/cron-explain-HHQKPD3M.js +16 -0
  118. package/dist/crypto-4AP47IKC.js +14 -0
  119. package/dist/crypto-4AP47IKC.js.map +1 -0
  120. package/dist/databases-37X4CI2Y.js +21 -0
  121. package/dist/databases-37X4CI2Y.js.map +1 -0
  122. package/dist/discord-B3HUPGQ6.js +70 -0
  123. package/dist/discord-B3HUPGQ6.js.map +1 -0
  124. package/dist/dist-UISMLMFN.js +21847 -0
  125. package/dist/dist-UISMLMFN.js.map +1 -0
  126. package/dist/email-K7LO2IPB.js +268 -0
  127. package/dist/email-K7LO2IPB.js.map +1 -0
  128. package/dist/enhanced-retrieval-DNLLEM4Z.js +753 -0
  129. package/dist/enhanced-retrieval-DNLLEM4Z.js.map +1 -0
  130. package/dist/enrichment-pipeline-MNHNW65K.js +13 -0
  131. package/dist/enrichment-pipeline-MNHNW65K.js.map +1 -0
  132. package/dist/entity-resolution-Y3IUWEAT.js +24 -0
  133. package/dist/entity-resolution-Y3IUWEAT.js.map +1 -0
  134. package/dist/env-IWXUVTCB.js +12 -0
  135. package/dist/env-IWXUVTCB.js.map +1 -0
  136. package/dist/google-workspace-DKWUVNGC.js +169 -0
  137. package/dist/google-workspace-DKWUVNGC.js.map +1 -0
  138. package/dist/hash-tool-ULQYD7B5.js +22 -0
  139. package/dist/hash-tool-ULQYD7B5.js.map +1 -0
  140. package/dist/heartbeat-monitor-GCISLXI3.js +22 -0
  141. package/dist/heartbeat-monitor-GCISLXI3.js.map +1 -0
  142. package/dist/image-generation-OSU7FP6F.js +486 -0
  143. package/dist/image-generation-OSU7FP6F.js.map +1 -0
  144. package/dist/imessage-NGA2XF2V.js +35 -0
  145. package/dist/imessage-NGA2XF2V.js.map +1 -0
  146. package/dist/inbox-summarizer-NRI4S7IF.js +47 -0
  147. package/dist/inbox-summarizer-NRI4S7IF.js.map +1 -0
  148. package/dist/incident-response-C5J7Q6DT.js +244 -0
  149. package/dist/incident-response-C5J7Q6DT.js.map +1 -0
  150. package/dist/inventory-manager-352OHXWD.js +24 -0
  151. package/dist/inventory-manager-352OHXWD.js.map +1 -0
  152. package/dist/jira-GSGDBMIG.js +199 -0
  153. package/dist/jira-GSGDBMIG.js.map +1 -0
  154. package/dist/json-tool-QE2SYHEG.js +26 -0
  155. package/dist/json-tool-QE2SYHEG.js.map +1 -0
  156. package/dist/key-rotation-DPHU4ZTB.js +18 -0
  157. package/dist/key-rotation-DPHU4ZTB.js.map +1 -0
  158. package/dist/lib.d.ts +603 -11
  159. package/dist/lib.js +161 -35
  160. package/dist/lib.js.map +1 -1
  161. package/dist/mailchimp-KKNF6QJ7.js +152 -0
  162. package/dist/mailchimp-KKNF6QJ7.js.map +1 -0
  163. package/dist/matrix-QVHG76I7.js +279 -0
  164. package/dist/matrix-QVHG76I7.js.map +1 -0
  165. package/dist/{mcp-LS7Q3Z5W.js → mcp-3JI6W7ZE.js} +3 -3
  166. package/dist/mcp-3JI6W7ZE.js.map +1 -0
  167. package/dist/microsoft365-UCBKJHNX.js +164 -0
  168. package/dist/microsoft365-UCBKJHNX.js.map +1 -0
  169. package/dist/ocr-AC7NPX33.js +22 -0
  170. package/dist/ocr-AC7NPX33.js.map +1 -0
  171. package/dist/ollama-BOAMSPLJ.js +8 -0
  172. package/dist/ollama-BOAMSPLJ.js.map +1 -0
  173. package/dist/pages-MI523RB7.js +26 -0
  174. package/dist/pages-MI523RB7.js.map +1 -0
  175. package/dist/pair-JDFTERIK.js +24 -0
  176. package/dist/pair-JDFTERIK.js.map +1 -0
  177. package/dist/pairing-IFQYCPNS.js +10 -0
  178. package/dist/pairing-IFQYCPNS.js.map +1 -0
  179. package/dist/pdf-ALQVOEJR.js +17 -0
  180. package/dist/pdf-ALQVOEJR.js.map +1 -0
  181. package/dist/presentations-DSV5IHG5.js +1002 -0
  182. package/dist/presentations-DSV5IHG5.js.map +1 -0
  183. package/dist/prometheus-JNT2BD4L.js +10 -0
  184. package/dist/prometheus-JNT2BD4L.js.map +1 -0
  185. package/dist/providers-J4LYPHDR.js +19 -0
  186. package/dist/providers-J4LYPHDR.js.map +1 -0
  187. package/dist/qr-code-WIX4PB4U.js +16 -0
  188. package/dist/qr-code-WIX4PB4U.js.map +1 -0
  189. package/dist/quickbooks-XB4NII2S.js +190 -0
  190. package/dist/quickbooks-XB4NII2S.js.map +1 -0
  191. package/dist/regex-tool-W4ABRKGK.js +24 -0
  192. package/dist/regex-tool-W4ABRKGK.js.map +1 -0
  193. package/dist/scheduler-VK4WFERV.js +63 -0
  194. package/dist/scheduler-VK4WFERV.js.map +1 -0
  195. package/dist/search-BCLBO5E3.js +25 -0
  196. package/dist/search-BCLBO5E3.js.map +1 -0
  197. package/dist/sendgrid-RNXCAFKM.js +152 -0
  198. package/dist/sendgrid-RNXCAFKM.js.map +1 -0
  199. package/dist/shopify-NCXYJB4R.js +171 -0
  200. package/dist/shopify-NCXYJB4R.js.map +1 -0
  201. package/dist/signal-6CGDFYL2.js +35 -0
  202. package/dist/signal-6CGDFYL2.js.map +1 -0
  203. package/dist/slack-IZQWIKOH.js +75 -0
  204. package/dist/slack-IZQWIKOH.js.map +1 -0
  205. package/dist/sms-M3JIOTCW.js +23 -0
  206. package/dist/sms-M3JIOTCW.js.map +1 -0
  207. package/dist/{src-K7GASHRH.js → src-VYUE6LRA.js} +138 -32
  208. package/dist/src-VYUE6LRA.js.map +1 -0
  209. package/dist/stocks-XXWBPOCU.js +14 -0
  210. package/dist/stocks-XXWBPOCU.js.map +1 -0
  211. package/dist/text-transform-6SGUA5Z4.js +22 -0
  212. package/dist/text-transform-6SGUA5Z4.js.map +1 -0
  213. package/dist/tools-2RLEI2N6.js +38 -0
  214. package/dist/tools-2RLEI2N6.js.map +1 -0
  215. package/dist/tunnel-IWMXUML4.js +301 -0
  216. package/dist/tunnel-IWMXUML4.js.map +1 -0
  217. package/dist/twilio-53GEW5JT.js +139 -0
  218. package/dist/twilio-53GEW5JT.js.map +1 -0
  219. package/dist/unit-converter-ZYXMEZOE.js +14 -0
  220. package/dist/unit-converter-ZYXMEZOE.js.map +1 -0
  221. package/dist/whatsapp-LFX6YKCM.js +35 -0
  222. package/dist/whatsapp-LFX6YKCM.js.map +1 -0
  223. package/dist/word-document-7B6SJMAY.js +902 -0
  224. package/dist/word-document-7B6SJMAY.js.map +1 -0
  225. package/dist/xero-QYO66D45.js +162 -0
  226. package/dist/xero-QYO66D45.js.map +1 -0
  227. package/dist/zapier-webhook-TBZ5YF2A.js +106 -0
  228. package/dist/zapier-webhook-TBZ5YF2A.js.map +1 -0
  229. package/drizzle/0002_mushy_master_mold.sql +140 -0
  230. package/drizzle/meta/0002_snapshot.json +3637 -0
  231. package/drizzle/meta/_journal.json +7 -0
  232. package/package.json +100 -98
  233. package/dist/bot-KJ26BG56.js +0 -15
  234. package/dist/chunk-4LVWXUNC.js.map +0 -1
  235. package/dist/chunk-4TG2IG5K.js +0 -5249
  236. package/dist/chunk-4TG2IG5K.js.map +0 -1
  237. package/dist/chunk-6DRDKB45.js.map +0 -1
  238. package/dist/chunk-CI6Q63MM.js +0 -1613
  239. package/dist/chunk-CI6Q63MM.js.map +0 -1
  240. package/dist/chunk-KHNYJY2Z.js +0 -178
  241. package/dist/chunk-KHNYJY2Z.js.map +0 -1
  242. package/dist/chunk-NSBPE2FW.js +0 -17
  243. package/dist/discord-ZOJFTVTB.js +0 -49
  244. package/dist/imessage-JFRB6EJ7.js +0 -14
  245. package/dist/scheduler-EZ7CZMCS.js +0 -42
  246. package/dist/signal-T3MCSULM.js +0 -14
  247. package/dist/slack-N2M4FHAJ.js +0 -54
  248. package/dist/src-K7GASHRH.js.map +0 -1
  249. package/dist/tools-24GZHYRF.js +0 -16
  250. package/dist/whatsapp-VCRUPAO5.js +0 -14
  251. /package/dist/{bot-KJ26BG56.js.map → audit-logger-OBPR7CRO.js.map} +0 -0
  252. /package/dist/{chunk-NSBPE2FW.js.map → auth-UOX5K2BE.js.map} +0 -0
  253. /package/dist/{discord-ZOJFTVTB.js.map → backup-restore-PZ7CYYB7.js.map} +0 -0
  254. /package/dist/{imessage-JFRB6EJ7.js.map → blocks-R3PODY47.js.map} +0 -0
  255. /package/dist/{mcp-LS7Q3Z5W.js.map → bot-QRARP4UN.js.map} +0 -0
  256. /package/dist/{scheduler-EZ7CZMCS.js.map → brain-7XLLM3KC.js.map} +0 -0
  257. /package/dist/{charts-MMXM6BWW.js.map → charts-V7ARZNKF.js.map} +0 -0
  258. /package/dist/{chunk-L3PDU3XN.js.map → chunk-4UOE5TUZ.js.map} +0 -0
  259. /package/dist/{chunk-6SNHU3CY.js.map → chunk-66OJ3WB4.js.map} +0 -0
  260. /package/dist/{chunk-F6QUZQGI.js.map → chunk-MXAPLSJ5.js.map} +0 -0
  261. /package/dist/{chunk-GK3E2I7A.js.map → chunk-NHMBTUMW.js.map} +0 -0
  262. /package/dist/{signal-T3MCSULM.js.map → chunk-PLDDJCW6.js.map} +0 -0
  263. /package/dist/{chunk-GVJVEWHI.js.map → chunk-SJSUSJ47.js.map} +0 -0
  264. /package/dist/{chunk-HH2HBTQM.js.map → chunk-TYAGMJNV.js.map} +0 -0
  265. /package/dist/{chunk-JXUP2X7V.js.map → chunk-VEHFVBLI.js.map} +0 -0
  266. /package/dist/{slack-N2M4FHAJ.js.map → client-ZQSFPMOB.js.map} +0 -0
  267. /package/dist/{tools-24GZHYRF.js.map → clipboard-manager-TEO2GEDN.js.map} +0 -0
  268. /package/dist/{whatsapp-VCRUPAO5.js.map → cron-explain-HHQKPD3M.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../node_modules/@notionhq/client/src/utils.ts","../node_modules/@notionhq/client/src/logging.ts","../node_modules/@notionhq/client/src/errors.ts","../node_modules/@notionhq/client/src/api-endpoints.ts","../node_modules/@notionhq/client/build/package.json","../node_modules/@notionhq/client/src/Client.ts","../node_modules/@notionhq/client/src/helpers.ts","../node_modules/@notionhq/client/src/index.ts","../src/integrations/notion/client.ts"],"sourcesContent":["/**\n * Utility for enforcing exhaustiveness checks in the type system.\n *\n * @see https://basarat.gitbook.io/typescript/type-system/discriminated-unions#throw-in-exhaustive-checks\n *\n * @param value The variable with no remaining values\n */\nexport function assertNever(value: never): never {\n throw new Error(`Unexpected value should never occur: ${value}`)\n}\n\ntype AllKeys<T> = T extends unknown ? keyof T : never\n\nexport function pick<O, K extends AllKeys<O>>(\n base: O,\n keys: readonly K[]\n): Pick<O, K> {\n const entries = keys.map(key => [key, base?.[key]])\n return Object.fromEntries(entries)\n}\n\nexport function isObject(o: unknown): o is Record<PropertyKey, unknown> {\n return typeof o === \"object\" && o !== null\n}\n","import { assertNever } from \"./utils\"\n\nexport enum LogLevel {\n DEBUG = \"debug\",\n INFO = \"info\",\n WARN = \"warn\",\n ERROR = \"error\",\n}\n\nexport interface Logger {\n (level: LogLevel, message: string, extraInfo: Record<string, unknown>): void\n}\n\nexport function makeConsoleLogger(name: string): Logger {\n return (level, message, extraInfo) => {\n console[level](`${name} ${level}:`, message, extraInfo)\n }\n}\n\n/**\n * Transforms a log level into a comparable (numerical) value ordered by severity.\n */\nexport function logLevelSeverity(level: LogLevel): number {\n switch (level) {\n case LogLevel.DEBUG:\n return 20\n case LogLevel.INFO:\n return 40\n case LogLevel.WARN:\n return 60\n case LogLevel.ERROR:\n return 80\n default:\n return assertNever(level)\n }\n}\n","import { SupportedResponse } from \"./fetch-types\"\nimport { isObject } from \"./utils\"\nimport { Assert } from \"./type-utils\"\n\n/**\n * Error codes returned in responses from the API.\n */\nexport enum APIErrorCode {\n Unauthorized = \"unauthorized\",\n RestrictedResource = \"restricted_resource\",\n ObjectNotFound = \"object_not_found\",\n RateLimited = \"rate_limited\",\n InvalidJSON = \"invalid_json\",\n InvalidRequestURL = \"invalid_request_url\",\n InvalidRequest = \"invalid_request\",\n ValidationError = \"validation_error\",\n ConflictError = \"conflict_error\",\n InternalServerError = \"internal_server_error\",\n ServiceUnavailable = \"service_unavailable\",\n}\n\n/**\n * Error codes generated for client errors.\n */\nexport enum ClientErrorCode {\n RequestTimeout = \"notionhq_client_request_timeout\",\n ResponseError = \"notionhq_client_response_error\",\n InvalidPathParameter = \"notionhq_client_invalid_path_parameter\",\n}\n\n/**\n * Error codes on errors thrown by the `Client`.\n */\nexport type NotionErrorCode = APIErrorCode | ClientErrorCode\n\n/**\n * Base error type.\n */\nabstract class NotionClientErrorBase<\n Code extends NotionErrorCode\n> extends Error {\n abstract code: Code\n}\n\n/**\n * Error type that encompasses all the kinds of errors that the Notion client will throw.\n */\nexport type NotionClientError =\n | RequestTimeoutError\n | UnknownHTTPResponseError\n | APIResponseError\n | InvalidPathParameterError\n\n// Assert that NotionClientError's `code` property is a narrow type.\n// This prevents us from accidentally regressing to `string`-typed name field.\ntype _assertCodeIsNarrow = Assert<NotionErrorCode, NotionClientError[\"code\"]>\n\n// Assert that the type of `name` in NotionErrorCode is a narrow type.\n// This prevents us from accidentally regressing to `string`-typed name field.\ntype _assertNameIsNarrow = Assert<\n | \"RequestTimeoutError\"\n | \"UnknownHTTPResponseError\"\n | \"APIResponseError\"\n | \"InvalidPathParameterError\",\n NotionClientError[\"name\"]\n>\n\n/**\n * @param error any value, usually a caught error.\n * @returns `true` if error is a `NotionClientError`.\n */\nexport function isNotionClientError(\n error: unknown\n): error is NotionClientError {\n return isObject(error) && error instanceof NotionClientErrorBase\n}\n\n/**\n * Narrows down the types of a NotionClientError.\n * @param error any value, usually a caught error.\n * @param codes an object mapping from possible error codes to `true`\n * @returns `true` if error is a `NotionClientError` with a code in `codes`.\n */\nfunction isNotionClientErrorWithCode<Code extends NotionErrorCode>(\n error: unknown,\n codes: { [C in Code]: true }\n): error is NotionClientError & { code: Code } {\n return isNotionClientError(error) && error.code in codes\n}\n\n/**\n * Error thrown by the client if a request times out.\n */\nexport class RequestTimeoutError extends NotionClientErrorBase<ClientErrorCode.RequestTimeout> {\n readonly code = ClientErrorCode.RequestTimeout\n readonly name = \"RequestTimeoutError\"\n\n constructor(message = \"Request to Notion API has timed out\") {\n super(message)\n }\n\n static isRequestTimeoutError(error: unknown): error is RequestTimeoutError {\n return isNotionClientErrorWithCode(error, {\n [ClientErrorCode.RequestTimeout]: true,\n })\n }\n\n static rejectAfterTimeout<T>(\n promise: Promise<T>,\n timeoutMS: number\n ): Promise<T> {\n return new Promise<T>((resolve, reject) => {\n const timeoutId = setTimeout(() => {\n reject(new RequestTimeoutError())\n }, timeoutMS)\n\n promise\n .then(resolve)\n .catch(reject)\n .then(() => clearTimeout(timeoutId))\n })\n }\n}\n\n/**\n * Error thrown when a path parameter contains invalid characters such as\n * path traversal sequences (..) that could alter the intended API endpoint.\n */\nexport class InvalidPathParameterError extends NotionClientErrorBase<ClientErrorCode.InvalidPathParameter> {\n readonly code = ClientErrorCode.InvalidPathParameter\n readonly name = \"InvalidPathParameterError\"\n\n constructor(\n message = \"Path parameter contains invalid characters that could alter the request path\"\n ) {\n super(message)\n }\n\n static isInvalidPathParameterError(\n error: unknown\n ): error is InvalidPathParameterError {\n return isNotionClientErrorWithCode(error, {\n [ClientErrorCode.InvalidPathParameter]: true,\n })\n }\n}\n\n/**\n * Validates that a request path does not contain path traversal sequences.\n * Throws InvalidPathParameterError if the path contains \"..\" segments,\n * including URL-encoded variants like %2e%2e.\n */\nexport function validateRequestPath(path: string): void {\n // Check for literal path traversal\n if (path.includes(\"..\")) {\n throw new InvalidPathParameterError(\n `Request path \"${path}\" contains path traversal sequence \"..\"`\n )\n }\n\n // Check for URL-encoded path traversal (%2e = '.')\n // Only decode if path contains potential encoded dots\n if (/%2e/i.test(path)) {\n let decoded: string\n try {\n decoded = decodeURIComponent(path)\n } catch {\n // Invalid percent encoding - not a traversal concern\n return\n }\n if (decoded.includes(\"..\")) {\n throw new InvalidPathParameterError(\n `Request path \"${path}\" contains encoded path traversal sequence`\n )\n }\n }\n}\n\ntype HTTPResponseErrorCode = ClientErrorCode.ResponseError | APIErrorCode\n\ntype AdditionalData = Record<string, string | string[]>\n\nclass HTTPResponseError<\n Code extends HTTPResponseErrorCode\n> extends NotionClientErrorBase<Code> {\n readonly name: string = \"HTTPResponseError\"\n readonly code: Code\n readonly status: number\n readonly headers: SupportedResponse[\"headers\"]\n readonly body: string\n readonly additional_data: AdditionalData | undefined\n readonly request_id: string | undefined\n\n constructor(args: {\n code: Code\n status: number\n message: string\n headers: SupportedResponse[\"headers\"]\n rawBodyText: string\n additional_data: AdditionalData | undefined\n request_id: string | undefined\n }) {\n super(args.message)\n const { code, status, headers, rawBodyText, additional_data, request_id } =\n args\n this.code = code\n this.status = status\n this.headers = headers\n this.body = rawBodyText\n this.additional_data = additional_data\n this.request_id = request_id\n }\n}\n\nconst httpResponseErrorCodes: { [C in HTTPResponseErrorCode]: true } = {\n [ClientErrorCode.ResponseError]: true,\n [APIErrorCode.Unauthorized]: true,\n [APIErrorCode.RestrictedResource]: true,\n [APIErrorCode.ObjectNotFound]: true,\n [APIErrorCode.RateLimited]: true,\n [APIErrorCode.InvalidJSON]: true,\n [APIErrorCode.InvalidRequestURL]: true,\n [APIErrorCode.InvalidRequest]: true,\n [APIErrorCode.ValidationError]: true,\n [APIErrorCode.ConflictError]: true,\n [APIErrorCode.InternalServerError]: true,\n [APIErrorCode.ServiceUnavailable]: true,\n}\n\nexport function isHTTPResponseError(\n error: unknown\n): error is UnknownHTTPResponseError | APIResponseError {\n if (!isNotionClientErrorWithCode(error, httpResponseErrorCodes)) {\n return false\n }\n\n type _assert = Assert<\n UnknownHTTPResponseError | APIResponseError,\n typeof error\n >\n\n return true\n}\n\n/**\n * Error thrown if an API call responds with an unknown error code, or does not respond with\n * a property-formatted error.\n */\nexport class UnknownHTTPResponseError extends HTTPResponseError<ClientErrorCode.ResponseError> {\n readonly name = \"UnknownHTTPResponseError\"\n\n constructor(args: {\n status: number\n message: string | undefined\n headers: SupportedResponse[\"headers\"]\n rawBodyText: string\n }) {\n super({\n ...args,\n code: ClientErrorCode.ResponseError,\n message:\n args.message ??\n `Request to Notion API failed with status: ${args.status}`,\n additional_data: undefined,\n request_id: undefined,\n })\n }\n\n static isUnknownHTTPResponseError(\n error: unknown\n ): error is UnknownHTTPResponseError {\n return isNotionClientErrorWithCode(error, {\n [ClientErrorCode.ResponseError]: true,\n })\n }\n}\n\nconst apiErrorCodes: { [C in APIErrorCode]: true } = {\n [APIErrorCode.Unauthorized]: true,\n [APIErrorCode.RestrictedResource]: true,\n [APIErrorCode.ObjectNotFound]: true,\n [APIErrorCode.RateLimited]: true,\n [APIErrorCode.InvalidJSON]: true,\n [APIErrorCode.InvalidRequestURL]: true,\n [APIErrorCode.InvalidRequest]: true,\n [APIErrorCode.ValidationError]: true,\n [APIErrorCode.ConflictError]: true,\n [APIErrorCode.InternalServerError]: true,\n [APIErrorCode.ServiceUnavailable]: true,\n}\n\n/**\n * A response from the API indicating a problem.\n * Use the `code` property to handle various kinds of errors. All its possible values are in `APIErrorCode`.\n */\nexport class APIResponseError extends HTTPResponseError<APIErrorCode> {\n readonly name = \"APIResponseError\"\n readonly request_id: string | undefined\n\n static isAPIResponseError(error: unknown): error is APIResponseError {\n return isNotionClientErrorWithCode(error, apiErrorCodes)\n }\n}\n\nexport function buildRequestError(\n response: SupportedResponse,\n bodyText: string\n): APIResponseError | UnknownHTTPResponseError {\n const apiErrorResponseBody = parseAPIErrorResponseBody(bodyText)\n if (apiErrorResponseBody !== undefined) {\n return new APIResponseError({\n code: apiErrorResponseBody.code,\n message: apiErrorResponseBody.message,\n headers: response.headers,\n status: response.status,\n rawBodyText: bodyText,\n additional_data: apiErrorResponseBody.additional_data,\n request_id: apiErrorResponseBody.request_id,\n })\n }\n return new UnknownHTTPResponseError({\n message: undefined,\n headers: response.headers,\n status: response.status,\n rawBodyText: bodyText,\n })\n}\n\nfunction parseAPIErrorResponseBody(body: string):\n | {\n code: APIErrorCode\n message: string\n additional_data: AdditionalData | undefined\n request_id: string | undefined\n }\n | undefined {\n if (typeof body !== \"string\") {\n return\n }\n\n let parsed: unknown\n try {\n parsed = JSON.parse(body)\n } catch (parseError) {\n return\n }\n\n if (\n !isObject(parsed) ||\n typeof parsed[\"message\"] !== \"string\" ||\n !isAPIErrorCode(parsed[\"code\"])\n ) {\n return\n }\n\n const additional_data = parsed[\"additional_data\"] as\n | AdditionalData\n | undefined\n const request_id = parsed[\"request_id\"] as string | undefined\n\n return {\n ...parsed,\n code: parsed[\"code\"],\n message: parsed[\"message\"],\n additional_data,\n request_id,\n }\n}\n\nfunction isAPIErrorCode(code: unknown): code is APIErrorCode {\n return typeof code === \"string\" && code in apiErrorCodes\n}\n","// cspell:disable-file\n// Note: This is a generated file. DO NOT EDIT!\n\ntype AnnotationRequest = {\n // Whether the text is formatted as bold.\n bold?: boolean\n // Whether the text is formatted as italic.\n italic?: boolean\n // Whether the text is formatted with a strikethrough.\n strikethrough?: boolean\n // Whether the text is formatted with an underline.\n underline?: boolean\n // Whether the text is formatted as code.\n code?: boolean\n // The color of the text.\n color?: ApiColor\n}\n\ntype AnnotationResponse = {\n bold: boolean\n italic: boolean\n strikethrough: boolean\n underline: boolean\n code: boolean\n color: ApiColor\n}\n\n/**\n * One of: `default`, `gray`, `brown`, `orange`, `yellow`, `green`, `blue`, `purple`,\n * `pink`, `red`, `default_background`, `gray_background`, `brown_background`,\n * `orange_background`, `yellow_background`, `green_background`, `blue_background`,\n * `purple_background`, `pink_background`, `red_background`\n */\ntype ApiColor =\n | \"default\"\n | \"gray\"\n | \"brown\"\n | \"orange\"\n | \"yellow\"\n | \"green\"\n | \"blue\"\n | \"purple\"\n | \"pink\"\n | \"red\"\n | \"default_background\"\n | \"gray_background\"\n | \"brown_background\"\n | \"orange_background\"\n | \"yellow_background\"\n | \"green_background\"\n | \"blue_background\"\n | \"purple_background\"\n | \"pink_background\"\n | \"red_background\"\n\ntype ArrayBasedPropertyValueResponse =\n | TitleArrayBasedPropertyValueResponse\n | RichTextArrayBasedPropertyValueResponse\n | PeopleArrayBasedPropertyValueResponse\n | RelationArrayBasedPropertyValueResponse\n\ntype ArrayPartialRollupValueResponse = {\n // Always `array`\n type: \"array\"\n array: Array<SimpleOrArrayPropertyValueResponse>\n}\n\nexport type AudioBlockObjectResponse = {\n type: \"audio\"\n audio: MediaContentWithFileAndCaptionResponse\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\ntype BlockIdCommentParentResponse = {\n // Always `block_id`\n type: \"block_id\"\n block_id: IdResponse\n}\n\ntype BlockIdParentForBlockBasedObjectResponse = {\n // The parent type.\n type: \"block_id\"\n // The ID of the parent block.\n block_id: IdResponse\n}\n\nexport type BlockObjectRequest =\n | {\n embed: MediaContentWithUrlAndCaptionRequest\n type?: \"embed\"\n object?: \"block\"\n }\n | {\n bookmark: MediaContentWithUrlAndCaptionRequest\n type?: \"bookmark\"\n object?: \"block\"\n }\n | {\n image: MediaContentWithFileAndCaptionRequest\n type?: \"image\"\n object?: \"block\"\n }\n | {\n video: MediaContentWithFileAndCaptionRequest\n type?: \"video\"\n object?: \"block\"\n }\n | {\n pdf: MediaContentWithFileAndCaptionRequest\n type?: \"pdf\"\n object?: \"block\"\n }\n | {\n file: MediaContentWithFileNameAndCaptionRequest\n type?: \"file\"\n object?: \"block\"\n }\n | {\n audio: MediaContentWithFileAndCaptionRequest\n type?: \"audio\"\n object?: \"block\"\n }\n | {\n code: {\n rich_text: Array<RichTextItemRequest>\n language: LanguageRequest\n caption?: Array<RichTextItemRequest>\n }\n type?: \"code\"\n object?: \"block\"\n }\n | {\n equation: ContentWithExpressionRequest\n type?: \"equation\"\n object?: \"block\"\n }\n | { divider: EmptyObject; type?: \"divider\"; object?: \"block\" }\n | { breadcrumb: EmptyObject; type?: \"breadcrumb\"; object?: \"block\" }\n | {\n table_of_contents: { color?: ApiColor }\n type?: \"table_of_contents\"\n object?: \"block\"\n }\n | {\n link_to_page:\n | { page_id: IdRequest; type?: \"page_id\" }\n | { database_id: IdRequest; type?: \"database_id\" }\n | { comment_id: IdRequest; type?: \"comment_id\" }\n type?: \"link_to_page\"\n object?: \"block\"\n }\n | {\n table_row: ContentWithTableRowRequest\n type?: \"table_row\"\n object?: \"block\"\n }\n | {\n table: TableRequestWithTableRowChildren\n type?: \"table\"\n object?: \"block\"\n }\n | { column_list: ColumnListRequest; type?: \"column_list\"; object?: \"block\" }\n | { column: ColumnWithChildrenRequest; type?: \"column\"; object?: \"block\" }\n | {\n heading_1: {\n rich_text: Array<RichTextItemRequest>\n color?: ApiColor\n is_toggleable?: boolean\n children?: Array<BlockObjectWithSingleLevelOfChildrenRequest>\n }\n type?: \"heading_1\"\n object?: \"block\"\n }\n | {\n heading_2: {\n rich_text: Array<RichTextItemRequest>\n color?: ApiColor\n is_toggleable?: boolean\n children?: Array<BlockObjectWithSingleLevelOfChildrenRequest>\n }\n type?: \"heading_2\"\n object?: \"block\"\n }\n | {\n heading_3: {\n rich_text: Array<RichTextItemRequest>\n color?: ApiColor\n is_toggleable?: boolean\n children?: Array<BlockObjectWithSingleLevelOfChildrenRequest>\n }\n type?: \"heading_3\"\n object?: \"block\"\n }\n | {\n paragraph: {\n rich_text: Array<RichTextItemRequest>\n color?: ApiColor\n children?: Array<BlockObjectWithSingleLevelOfChildrenRequest>\n }\n type?: \"paragraph\"\n object?: \"block\"\n }\n | {\n bulleted_list_item: {\n rich_text: Array<RichTextItemRequest>\n color?: ApiColor\n children?: Array<BlockObjectWithSingleLevelOfChildrenRequest>\n }\n type?: \"bulleted_list_item\"\n object?: \"block\"\n }\n | {\n numbered_list_item: {\n rich_text: Array<RichTextItemRequest>\n color?: ApiColor\n children?: Array<BlockObjectWithSingleLevelOfChildrenRequest>\n }\n type?: \"numbered_list_item\"\n object?: \"block\"\n }\n | {\n quote: {\n rich_text: Array<RichTextItemRequest>\n color?: ApiColor\n children?: Array<BlockObjectWithSingleLevelOfChildrenRequest>\n }\n type?: \"quote\"\n object?: \"block\"\n }\n | {\n to_do: {\n rich_text: Array<RichTextItemRequest>\n color?: ApiColor\n children?: Array<BlockObjectWithSingleLevelOfChildrenRequest>\n checked?: boolean\n }\n type?: \"to_do\"\n object?: \"block\"\n }\n | {\n toggle: {\n rich_text: Array<RichTextItemRequest>\n color?: ApiColor\n children?: Array<BlockObjectWithSingleLevelOfChildrenRequest>\n }\n type?: \"toggle\"\n object?: \"block\"\n }\n | {\n template: {\n rich_text: Array<RichTextItemRequest>\n children?: Array<BlockObjectWithSingleLevelOfChildrenRequest>\n }\n type?: \"template\"\n object?: \"block\"\n }\n | {\n callout: {\n rich_text: Array<RichTextItemRequest>\n color?: ApiColor\n children?: Array<BlockObjectWithSingleLevelOfChildrenRequest>\n icon?: PageIconRequest\n }\n type?: \"callout\"\n object?: \"block\"\n }\n | {\n synced_block: {\n synced_from: { block_id: IdRequest; type?: \"block_id\" } | null\n children?: Array<BlockObjectWithSingleLevelOfChildrenRequest>\n }\n type?: \"synced_block\"\n object?: \"block\"\n }\n\nexport type BlockObjectRequestWithoutChildren =\n | {\n embed: MediaContentWithUrlAndCaptionRequest\n type?: \"embed\"\n object?: \"block\"\n }\n | {\n bookmark: MediaContentWithUrlAndCaptionRequest\n type?: \"bookmark\"\n object?: \"block\"\n }\n | {\n image: MediaContentWithFileAndCaptionRequest\n type?: \"image\"\n object?: \"block\"\n }\n | {\n video: MediaContentWithFileAndCaptionRequest\n type?: \"video\"\n object?: \"block\"\n }\n | {\n pdf: MediaContentWithFileAndCaptionRequest\n type?: \"pdf\"\n object?: \"block\"\n }\n | {\n file: MediaContentWithFileNameAndCaptionRequest\n type?: \"file\"\n object?: \"block\"\n }\n | {\n audio: MediaContentWithFileAndCaptionRequest\n type?: \"audio\"\n object?: \"block\"\n }\n | {\n code: {\n rich_text: Array<RichTextItemRequest>\n language: LanguageRequest\n caption?: Array<RichTextItemRequest>\n }\n type?: \"code\"\n object?: \"block\"\n }\n | {\n equation: ContentWithExpressionRequest\n type?: \"equation\"\n object?: \"block\"\n }\n | { divider: EmptyObject; type?: \"divider\"; object?: \"block\" }\n | { breadcrumb: EmptyObject; type?: \"breadcrumb\"; object?: \"block\" }\n | {\n table_of_contents: { color?: ApiColor }\n type?: \"table_of_contents\"\n object?: \"block\"\n }\n | {\n link_to_page:\n | { page_id: IdRequest; type?: \"page_id\" }\n | { database_id: IdRequest; type?: \"database_id\" }\n | { comment_id: IdRequest; type?: \"comment_id\" }\n type?: \"link_to_page\"\n object?: \"block\"\n }\n | {\n table_row: ContentWithTableRowRequest\n type?: \"table_row\"\n object?: \"block\"\n }\n | {\n heading_1: HeaderContentWithRichTextAndColorRequest\n type?: \"heading_1\"\n object?: \"block\"\n }\n | {\n heading_2: HeaderContentWithRichTextAndColorRequest\n type?: \"heading_2\"\n object?: \"block\"\n }\n | {\n heading_3: HeaderContentWithRichTextAndColorRequest\n type?: \"heading_3\"\n object?: \"block\"\n }\n | {\n paragraph: ContentWithRichTextAndColorRequest\n type?: \"paragraph\"\n object?: \"block\"\n }\n | {\n bulleted_list_item: ContentWithRichTextAndColorRequest\n type?: \"bulleted_list_item\"\n object?: \"block\"\n }\n | {\n numbered_list_item: ContentWithRichTextAndColorRequest\n type?: \"numbered_list_item\"\n object?: \"block\"\n }\n | {\n quote: ContentWithRichTextAndColorRequest\n type?: \"quote\"\n object?: \"block\"\n }\n | {\n to_do: {\n rich_text: Array<RichTextItemRequest>\n checked?: boolean\n color?: ApiColor\n }\n type?: \"to_do\"\n object?: \"block\"\n }\n | {\n toggle: ContentWithRichTextAndColorRequest\n type?: \"toggle\"\n object?: \"block\"\n }\n | {\n template: ContentWithRichTextRequest\n type?: \"template\"\n object?: \"block\"\n }\n | {\n callout: {\n rich_text: Array<RichTextItemRequest>\n icon?: PageIconRequest\n color?: ApiColor\n }\n type?: \"callout\"\n object?: \"block\"\n }\n | {\n synced_block: {\n synced_from: { block_id: IdRequest; type?: \"block_id\" } | null\n }\n type?: \"synced_block\"\n object?: \"block\"\n }\n\nexport type BlockObjectResponse =\n | ParagraphBlockObjectResponse\n | Heading1BlockObjectResponse\n | Heading2BlockObjectResponse\n | Heading3BlockObjectResponse\n | BulletedListItemBlockObjectResponse\n | NumberedListItemBlockObjectResponse\n | QuoteBlockObjectResponse\n | ToDoBlockObjectResponse\n | ToggleBlockObjectResponse\n | TemplateBlockObjectResponse\n | SyncedBlockBlockObjectResponse\n | ChildPageBlockObjectResponse\n | ChildDatabaseBlockObjectResponse\n | EquationBlockObjectResponse\n | CodeBlockObjectResponse\n | CalloutBlockObjectResponse\n | DividerBlockObjectResponse\n | BreadcrumbBlockObjectResponse\n | TableOfContentsBlockObjectResponse\n | ColumnListBlockObjectResponse\n | ColumnBlockObjectResponse\n | LinkToPageBlockObjectResponse\n | TableBlockObjectResponse\n | TableRowBlockObjectResponse\n | EmbedBlockObjectResponse\n | BookmarkBlockObjectResponse\n | ImageBlockObjectResponse\n | VideoBlockObjectResponse\n | PdfBlockObjectResponse\n | FileBlockObjectResponse\n | AudioBlockObjectResponse\n | LinkPreviewBlockObjectResponse\n | UnsupportedBlockObjectResponse\n\ntype BlockObjectWithSingleLevelOfChildrenRequest =\n | {\n embed: MediaContentWithUrlAndCaptionRequest\n type?: \"embed\"\n object?: \"block\"\n }\n | {\n bookmark: MediaContentWithUrlAndCaptionRequest\n type?: \"bookmark\"\n object?: \"block\"\n }\n | {\n image: MediaContentWithFileAndCaptionRequest\n type?: \"image\"\n object?: \"block\"\n }\n | {\n video: MediaContentWithFileAndCaptionRequest\n type?: \"video\"\n object?: \"block\"\n }\n | {\n pdf: MediaContentWithFileAndCaptionRequest\n type?: \"pdf\"\n object?: \"block\"\n }\n | {\n file: MediaContentWithFileNameAndCaptionRequest\n type?: \"file\"\n object?: \"block\"\n }\n | {\n audio: MediaContentWithFileAndCaptionRequest\n type?: \"audio\"\n object?: \"block\"\n }\n | {\n code: {\n rich_text: Array<RichTextItemRequest>\n language: LanguageRequest\n caption?: Array<RichTextItemRequest>\n }\n type?: \"code\"\n object?: \"block\"\n }\n | {\n equation: ContentWithExpressionRequest\n type?: \"equation\"\n object?: \"block\"\n }\n | { divider: EmptyObject; type?: \"divider\"; object?: \"block\" }\n | { breadcrumb: EmptyObject; type?: \"breadcrumb\"; object?: \"block\" }\n | {\n table_of_contents: { color?: ApiColor }\n type?: \"table_of_contents\"\n object?: \"block\"\n }\n | {\n link_to_page:\n | { page_id: IdRequest; type?: \"page_id\" }\n | { database_id: IdRequest; type?: \"database_id\" }\n | { comment_id: IdRequest; type?: \"comment_id\" }\n type?: \"link_to_page\"\n object?: \"block\"\n }\n | {\n table_row: ContentWithTableRowRequest\n type?: \"table_row\"\n object?: \"block\"\n }\n | {\n heading_1: HeaderContentWithSingleLevelOfChildrenRequest\n type?: \"heading_1\"\n object?: \"block\"\n }\n | {\n heading_2: HeaderContentWithSingleLevelOfChildrenRequest\n type?: \"heading_2\"\n object?: \"block\"\n }\n | {\n heading_3: HeaderContentWithSingleLevelOfChildrenRequest\n type?: \"heading_3\"\n object?: \"block\"\n }\n | {\n paragraph: ContentWithSingleLevelOfChildrenRequest\n type?: \"paragraph\"\n object?: \"block\"\n }\n | {\n bulleted_list_item: ContentWithSingleLevelOfChildrenRequest\n type?: \"bulleted_list_item\"\n object?: \"block\"\n }\n | {\n numbered_list_item: ContentWithSingleLevelOfChildrenRequest\n type?: \"numbered_list_item\"\n object?: \"block\"\n }\n | {\n quote: ContentWithSingleLevelOfChildrenRequest\n type?: \"quote\"\n object?: \"block\"\n }\n | {\n table: TableRequestWithTableRowChildren\n type?: \"table\"\n object?: \"block\"\n }\n | {\n to_do: {\n rich_text: Array<RichTextItemRequest>\n color?: ApiColor\n children?: Array<BlockObjectRequestWithoutChildren>\n checked?: boolean\n }\n type?: \"to_do\"\n object?: \"block\"\n }\n | {\n toggle: ContentWithSingleLevelOfChildrenRequest\n type?: \"toggle\"\n object?: \"block\"\n }\n | {\n template: {\n rich_text: Array<RichTextItemRequest>\n children?: Array<BlockObjectRequestWithoutChildren>\n }\n type?: \"template\"\n object?: \"block\"\n }\n | {\n callout: {\n rich_text: Array<RichTextItemRequest>\n color?: ApiColor\n children?: Array<BlockObjectRequestWithoutChildren>\n icon?: PageIconRequest\n }\n type?: \"callout\"\n object?: \"block\"\n }\n | {\n synced_block: {\n synced_from: { block_id: IdRequest; type?: \"block_id\" } | null\n children?: Array<BlockObjectRequestWithoutChildren>\n }\n type?: \"synced_block\"\n object?: \"block\"\n }\n\nexport type BookmarkBlockObjectResponse = {\n type: \"bookmark\"\n bookmark: MediaContentWithUrlAndCaptionResponse\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\ntype BooleanFormulaPropertyResponse = {\n type: \"boolean\"\n boolean: boolean | null\n}\n\ntype BooleanFormulaPropertyValueResponse = {\n // Always `boolean`\n type: \"boolean\"\n boolean: boolean | null\n}\n\ntype BotInfoResponse = {\n // Details about the owner of the bot.\n owner:\n | {\n // Always `user`\n type: \"user\"\n // Details about the owner of the bot, when the `type` of the owner is `user`. This means\n // the bot is for a integration.\n user:\n | {\n // The ID of the user.\n id: IdResponse\n // The user object type name.\n object: \"user\"\n // The name of the user.\n name: string | null\n // The avatar URL of the user.\n avatar_url: string | null\n // The type of the user.\n type: \"person\"\n // The person info of the user.\n person: {\n // The email of the person.\n email?: string\n }\n }\n | PartialUserObjectResponse\n }\n | {\n // Always `workspace`\n type: \"workspace\"\n // Details about the owner of the bot, when the `type` of the owner is `workspace`. This\n // means the bot is for an internal integration.\n workspace: true\n }\n // The ID of the bot's workspace.\n workspace_id: string\n // Limits and restrictions that apply to the bot's workspace\n workspace_limits: {\n // The maximum allowable size of a file upload, in bytes\n max_file_upload_size_in_bytes: number\n }\n // The name of the bot's workspace.\n workspace_name: string | null\n}\n\nexport type BotUserObjectResponse = {\n // Indicates this user is a bot.\n type: \"bot\"\n // Details about the bot, when the `type` of the user is `bot`.\n bot: EmptyObject | BotInfoResponse\n}\n\nexport type BreadcrumbBlockObjectResponse = {\n type: \"breadcrumb\"\n breadcrumb: EmptyObject\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\nexport type BulletedListItemBlockObjectResponse = {\n type: \"bulleted_list_item\"\n bulleted_list_item: ContentWithRichTextAndColorResponse\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\ntype ButtonPropertyConfigurationRequest = {\n // Always `button`\n type?: \"button\"\n button: EmptyObject\n}\n\nexport type ButtonPropertyItemObjectResponse = {\n type: \"button\"\n button: EmptyObject\n object: \"property_item\"\n id: string\n}\n\ntype ButtonSimplePropertyValueResponse = {\n // Always `button`\n type: \"button\"\n button: EmptyObject\n}\n\nexport type CalloutBlockObjectResponse = {\n type: \"callout\"\n callout: {\n rich_text: Array<RichTextItemResponse>\n color: ApiColor\n icon: PageIconResponse | null\n }\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\ntype CheckboxDatabasePropertyConfigResponse = {\n // Always `checkbox`\n type: \"checkbox\"\n checkbox: EmptyObject\n}\n\ntype CheckboxPropertyConfigurationRequest = {\n // Always `checkbox`\n type?: \"checkbox\"\n checkbox: EmptyObject\n}\n\ntype CheckboxPropertyFilter = { equals: boolean } | { does_not_equal: boolean }\n\nexport type CheckboxPropertyItemObjectResponse = {\n type: \"checkbox\"\n checkbox: boolean\n object: \"property_item\"\n id: string\n}\n\ntype CheckboxSimplePropertyValueResponse = {\n // Always `checkbox`\n type: \"checkbox\"\n checkbox: boolean\n}\n\nexport type ChildDatabaseBlockObjectResponse = {\n type: \"child_database\"\n child_database: TitleObjectResponse\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\nexport type ChildPageBlockObjectResponse = {\n type: \"child_page\"\n child_page: TitleObjectResponse\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\nexport type CodeBlockObjectResponse = {\n type: \"code\"\n code: {\n rich_text: Array<RichTextItemResponse>\n caption: Array<RichTextItemResponse>\n language: LanguageRequest\n }\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\nexport type ColumnBlockObjectResponse = {\n type: \"column\"\n column: ColumnResponse\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\ntype ColumnBlockWithChildrenRequest = {\n column: ColumnWithChildrenRequest\n type?: \"column\"\n object?: \"block\"\n}\n\nexport type ColumnListBlockObjectResponse = {\n type: \"column_list\"\n column_list: EmptyObject\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\ntype ColumnListRequest = { children: Array<ColumnBlockWithChildrenRequest> }\n\ntype ColumnResponse = {\n // Ratio between 0 and 1 of the width of this column relative to all columns in the list.\n // If not provided, uses an equal width.\n width_ratio?: number\n}\n\ntype ColumnWithChildrenRequest = {\n children: Array<BlockObjectWithSingleLevelOfChildrenRequest>\n // Ratio between 0 and 1 of the width of this column relative to all columns in the list.\n // If not provided, uses an equal width.\n width_ratio?: number\n}\n\nexport type CommentObjectResponse = {\n // The comment object type name.\n object: \"comment\"\n // The ID of the comment.\n id: IdResponse\n // The parent of the comment.\n parent: CommentParentResponse\n // The ID of the discussion thread this comment belongs to.\n discussion_id: IdResponse\n // The time when the comment was created.\n created_time: string\n // The time when the comment was last edited.\n last_edited_time: string\n // The user who created the comment.\n created_by: PartialUserObjectResponse\n // The rich text content of the comment.\n rich_text: Array<RichTextItemResponse>\n // The display name of the comment.\n display_name: {\n // One of: `custom`, `user`, `integration`\n type: \"custom\" | \"user\" | \"integration\"\n resolved_name: string | null\n }\n // Any file attachments associated with the comment.\n attachments?: Array<{\n // One of: `audio`, `image`, `pdf`, `productivity`, `video`\n category: \"audio\" | \"image\" | \"pdf\" | \"productivity\" | \"video\"\n file: InternalFileResponse\n }>\n}\n\ntype CommentParentResponse =\n | PageIdCommentParentResponse\n | BlockIdCommentParentResponse\n\ntype ContentPositionSchema =\n | { type: \"after_block\"; after_block: { id: IdRequest } }\n | { type: \"start\" }\n | { type: \"end\" }\n\ntype ContentWithExpressionRequest = { expression: string }\n\ntype ContentWithRichTextAndColorAndListResponse = {\n rich_text: Array<RichTextItemResponse>\n color: ApiColor\n list_start_index?: number\n list_format?: NumberedListFormat\n}\n\ntype ContentWithRichTextAndColorRequest = {\n rich_text: Array<RichTextItemRequest>\n color?: ApiColor\n}\n\ntype ContentWithRichTextAndColorResponse = {\n rich_text: Array<RichTextItemResponse>\n color: ApiColor\n}\n\ntype ContentWithRichTextRequest = { rich_text: Array<RichTextItemRequest> }\n\ntype ContentWithSingleLevelOfChildrenRequest = {\n rich_text: Array<RichTextItemRequest>\n color?: ApiColor\n children?: Array<BlockObjectRequestWithoutChildren>\n}\n\ntype ContentWithTableResponse = {\n has_column_header: boolean\n has_row_header: boolean\n table_width: number\n}\n\ntype ContentWithTableRowRequest = { cells: Array<Array<RichTextItemRequest>> }\n\ntype ContentWithTableRowResponse = { cells: Array<Array<RichTextItemResponse>> }\n\ntype CreatedByDatabasePropertyConfigResponse = {\n // Always `created_by`\n type: \"created_by\"\n created_by: EmptyObject\n}\n\ntype CreatedByPropertyConfigurationRequest = {\n // Always `created_by`\n type?: \"created_by\"\n created_by: EmptyObject\n}\n\nexport type CreatedByPropertyItemObjectResponse = {\n type: \"created_by\"\n created_by: PartialUserObjectResponse | UserObjectResponse\n object: \"property_item\"\n id: string\n}\n\ntype CreatedBySimplePropertyValueResponse = {\n // Always `created_by`\n type: \"created_by\"\n created_by: UserValueResponse\n}\n\ntype CreatedTimeDatabasePropertyConfigResponse = {\n // Always `created_time`\n type: \"created_time\"\n created_time: EmptyObject\n}\n\ntype CreatedTimePropertyConfigurationRequest = {\n // Always `created_time`\n type?: \"created_time\"\n created_time: EmptyObject\n}\n\nexport type CreatedTimePropertyItemObjectResponse = {\n type: \"created_time\"\n created_time: string\n object: \"property_item\"\n id: string\n}\n\ntype CreatedTimeSimplePropertyValueResponse = {\n // Always `created_time`\n type: \"created_time\"\n created_time: string\n}\n\ntype CustomEmojiPageIconRequest = {\n // Always `custom_emoji`\n type?: \"custom_emoji\"\n custom_emoji: {\n // The ID of the custom emoji.\n id: IdRequest\n // The name of the custom emoji.\n name?: string\n // The URL of the custom emoji.\n url?: string\n }\n}\n\ntype CustomEmojiPageIconResponse = {\n // Type of icon. In this case, a custom emoji.\n type: \"custom_emoji\"\n // The custom emoji details for the icon.\n custom_emoji: CustomEmojiResponse\n}\n\ntype CustomEmojiResponse = {\n // The ID of the custom emoji.\n id: IdResponse\n // The name of the custom emoji.\n name: string\n // The URL of the custom emoji.\n url: string\n}\n\nexport type DataSourceObjectResponse = {\n // The data source object type name.\n object: \"data_source\"\n // The ID of the data source.\n id: IdResponse\n // The title of the data source.\n title: Array<RichTextItemResponse>\n // The description of the data source.\n description: Array<RichTextItemResponse>\n // The parent of the data source.\n parent: ParentOfDataSourceResponse\n // The parent of the data source's containing database. This is typically a page, block,\n // or workspace, but can be another database in the case of wikis.\n database_parent: ParentOfDatabaseResponse\n // Whether the data source is inline.\n is_inline: boolean\n // Whether the data source is archived.\n archived: boolean\n // Whether the data source is in the trash.\n in_trash: boolean\n // The time when the data source was created.\n created_time: string\n // The time when the data source was last edited.\n last_edited_time: string\n // The user who created the data source.\n created_by: PartialUserObjectResponse\n // The user who last edited the data source.\n last_edited_by: PartialUserObjectResponse\n // The properties schema of the data source.\n properties: Record<string, DatabasePropertyConfigResponse>\n // The icon of the data source.\n icon: PageIconResponse | null\n // The cover of the data source.\n cover: PageCoverResponse | null\n // The URL of the data source.\n url: string\n // The public URL of the data source if it is publicly accessible.\n public_url: string | null\n}\n\ntype DataSourceParentResponse = {\n // The parent type.\n type: \"data_source_id\"\n // The ID of the parent data source.\n data_source_id: IdResponse\n // The ID of the data source's parent database.\n database_id: IdResponse\n}\n\ntype DataSourceReferenceResponse = {\n // The ID of the data source.\n id: IdResponse\n // The name of the data source.\n name: string\n}\n\nexport type DatabaseObjectResponse = {\n // The database object type name.\n object: \"database\"\n // The ID of the database.\n id: IdResponse\n // The title of the database.\n title: Array<RichTextItemResponse>\n // The description of the database.\n description: Array<RichTextItemResponse>\n // The parent of the database. This is typically a page, block, or workspace, but can be\n // another database in the case of wikis.\n parent: ParentOfDatabaseResponse\n // Whether the database is inline.\n is_inline: boolean\n // Whether the database is in the trash.\n in_trash: boolean\n // Whether the database is locked from editing in the Notion app UI.\n is_locked: boolean\n // The time when the database was created.\n created_time: string\n // The time when the database was last edited.\n last_edited_time: string\n // The data sources of the database.\n data_sources: Array<DataSourceReferenceResponse>\n // The icon of the database.\n icon: PageIconResponse | null\n // The cover of the database.\n cover: PageCoverResponse | null\n // The URL of the database.\n url: string\n // The public URL of the database if it is publicly accessible.\n public_url: string | null\n}\n\ntype DatabaseParentResponse = {\n // The parent type.\n type: \"database_id\"\n // The ID of the parent database.\n database_id: IdResponse\n}\n\ntype DatabasePropertyConfigResponse = DatabasePropertyConfigResponseCommon &\n (\n | NumberDatabasePropertyConfigResponse\n | FormulaDatabasePropertyConfigResponse\n | SelectDatabasePropertyConfigResponse\n | MultiSelectDatabasePropertyConfigResponse\n | StatusDatabasePropertyConfigResponse\n | RelationDatabasePropertyConfigResponse\n | RollupDatabasePropertyConfigResponse\n | UniqueIdDatabasePropertyConfigResponse\n | TitleDatabasePropertyConfigResponse\n | RichTextDatabasePropertyConfigResponse\n | UrlDatabasePropertyConfigResponse\n | PeopleDatabasePropertyConfigResponse\n | FilesDatabasePropertyConfigResponse\n | EmailDatabasePropertyConfigResponse\n | PhoneNumberDatabasePropertyConfigResponse\n | DateDatabasePropertyConfigResponse\n | CheckboxDatabasePropertyConfigResponse\n | CreatedByDatabasePropertyConfigResponse\n | CreatedTimeDatabasePropertyConfigResponse\n | LastEditedByDatabasePropertyConfigResponse\n | LastEditedTimeDatabasePropertyConfigResponse\n )\n\ntype DatabasePropertyConfigResponseCommon = {\n // The ID of the property.\n id: string\n // The name of the property.\n name: string\n // The description of the property.\n description: PropertyDescriptionRequest | null\n}\n\ntype DatabasePropertyRelationConfigResponse =\n DatabasePropertyRelationConfigResponseCommon &\n (\n | SinglePropertyDatabasePropertyRelationConfigResponse\n | DualPropertyDatabasePropertyRelationConfigResponse\n )\n\ntype DatabasePropertyRelationConfigResponseCommon = {\n database_id: IdResponse\n data_source_id: IdResponse\n}\n\ntype DateDatabasePropertyConfigResponse = {\n // Always `date`\n type: \"date\"\n date: EmptyObject\n}\n\ntype DateFormulaPropertyResponse = { type: \"date\"; date: DateResponse | null }\n\ntype DateFormulaPropertyValueResponse = {\n // Always `date`\n type: \"date\"\n date: DateResponse | null\n}\n\ntype DatePartialRollupValueResponse = {\n // Always `date`\n type: \"date\"\n date: DateResponse | null\n}\n\ntype DatePropertyConfigurationRequest = {\n // Always `date`\n type?: \"date\"\n date: EmptyObject\n}\n\ntype DatePropertyFilter =\n | { equals: string }\n | { before: string }\n | { after: string }\n | { on_or_before: string }\n | { on_or_after: string }\n | { this_week: EmptyObject }\n | { past_week: EmptyObject }\n | { past_month: EmptyObject }\n | { past_year: EmptyObject }\n | { next_week: EmptyObject }\n | { next_month: EmptyObject }\n | { next_year: EmptyObject }\n | ExistencePropertyFilter\n\nexport type DatePropertyItemObjectResponse = {\n type: \"date\"\n date: DateResponse | null\n object: \"property_item\"\n id: string\n}\n\ntype DateRequest = {\n // The start date of the date object.\n start: string\n // The end date of the date object, if any.\n end?: string | null\n // The time zone of the date object, if any. E.g. America/Los_Angeles, Europe/London,\n // etc.\n time_zone?: TimeZoneRequest | null\n}\n\ntype DateResponse = {\n // The start date of the date object.\n start: string\n // The end date of the date object, if any.\n end: string | null\n // The time zone of the date object.\n time_zone: TimeZoneRequest | null\n}\n\ntype DateSimplePropertyValueResponse = {\n // Always `date`\n type: \"date\"\n date: DateResponse | null\n}\n\nexport type DividerBlockObjectResponse = {\n type: \"divider\"\n divider: EmptyObject\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\ntype DualPropertyDatabasePropertyRelationConfigResponse = {\n // Always `dual_property`\n type?: \"dual_property\"\n dual_property: { synced_property_id: string; synced_property_name: string }\n}\n\ntype EmailDatabasePropertyConfigResponse = {\n // Always `email`\n type: \"email\"\n email: EmptyObject\n}\n\ntype EmailPropertyConfigurationRequest = {\n // Always `email`\n type?: \"email\"\n email: EmptyObject\n}\n\nexport type EmailPropertyItemObjectResponse = {\n type: \"email\"\n email: string | null\n object: \"property_item\"\n id: string\n}\n\ntype EmailSimplePropertyValueResponse = {\n // Always `email`\n type: \"email\"\n email: string | null\n}\n\nexport type EmbedBlockObjectResponse = {\n type: \"embed\"\n embed: MediaContentWithUrlAndCaptionResponse\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\ntype EmojiPageIconRequest = {\n // Always `emoji`\n type?: \"emoji\"\n // An emoji character.\n emoji: EmojiRequest\n}\n\ntype EmojiPageIconResponse = {\n // Type of icon. In this case, an emoji.\n type: \"emoji\"\n // The emoji character used as the icon.\n emoji: EmojiRequest\n}\n\ntype EmojiRequest = string\n\ntype EmptyObject = Record<string, never>\n\nexport type EquationBlockObjectResponse = {\n type: \"equation\"\n equation: ExpressionObjectResponse\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\ntype EquationRichTextItemRequest = {\n // Always `equation`\n type?: \"equation\"\n // Notion supports inline LaTeX equations as rich text objects with a type value of\n // `equation`.\n equation: {\n // A KaTeX compatible string.\n expression: string\n }\n}\n\nexport type EquationRichTextItemResponse = {\n // Always `equation`\n type: \"equation\"\n // Notion supports inline LaTeX equations as rich text objects with a type value of\n // `equation`.\n equation: {\n // A KaTeX compatible string.\n expression: string\n }\n}\n\ntype ExistencePropertyFilter = { is_empty: true } | { is_not_empty: true }\n\ntype ExpressionObjectResponse = { expression: string }\n\ntype ExternalFileRequest = { url: TextRequest }\n\ntype ExternalInternalOrExternalFileWithNameResponse = {\n // Type of attachment. In this case, an external URL.\n type: \"external\"\n // The external URL.\n external: {\n // The URL of the external file or resource.\n url: string\n }\n}\n\ntype ExternalMediaContentWithFileAndCaptionResponse = {\n type: \"external\"\n external: { url: TextRequest }\n caption: Array<RichTextItemResponse>\n}\n\ntype ExternalMediaContentWithFileNameAndCaptionResponse = {\n type: \"external\"\n external: { url: TextRequest }\n caption: Array<RichTextItemResponse>\n name: string\n}\n\ntype ExternalPageCoverRequest = {\n // Always `external`\n type?: \"external\"\n // External URL for the cover.\n external: {\n // The URL of the external file.\n url: string\n }\n}\n\ntype ExternalPageCoverResponse = {\n // Type of cover. In this case, an external URL.\n type: \"external\"\n // The external URL for the cover.\n external: {\n // The URL of the external file or resource.\n url: string\n }\n}\n\ntype ExternalPageIconRequest = {\n // Always `external`\n type?: \"external\"\n external: {\n // The URL of the external file.\n url: string\n }\n}\n\ntype ExternalPageIconResponse = {\n // Type of icon. In this case, an external URL.\n type: \"external\"\n // The external URL for the icon.\n external: {\n // The URL of the external file or resource.\n url: string\n }\n}\n\nexport type FileBlockObjectResponse = {\n type: \"file\"\n file: MediaContentWithFileNameAndCaptionResponse\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\ntype FileInternalOrExternalFileWithNameResponse = {\n // Type of attachment. In this case, a file uploaded to a Notion workspace.\n type: \"file\"\n // The file URL.\n file: InternalFileResponse\n}\n\ntype FileMediaContentWithFileAndCaptionResponse = {\n type: \"file\"\n file: InternalFileResponse\n caption: Array<RichTextItemResponse>\n}\n\ntype FileMediaContentWithFileNameAndCaptionResponse = {\n type: \"file\"\n file: InternalFileResponse\n caption: Array<RichTextItemResponse>\n name: string\n}\n\ntype FilePageCoverResponse = {\n // Type of cover. In this case, a file.\n type: \"file\"\n // The file URL for the cover.\n file: InternalFileResponse\n}\n\ntype FilePageIconResponse = {\n // Type of icon. In this case, a file.\n type: \"file\"\n // The file URL for the icon.\n file: InternalFileResponse\n}\n\ntype FileUploadIdRequest = { id: IdRequest }\n\nexport type FileUploadObjectResponse = {\n // Always `file_upload`\n object: \"file_upload\"\n id: IdResponse\n created_time: string\n created_by: {\n id: IdResponse\n // One of: `person`, `bot`, `agent`\n type: \"person\" | \"bot\" | \"agent\"\n }\n last_edited_time: string\n archived: boolean\n expiry_time: string | null\n // One of: `pending`, `uploaded`, `expired`, `failed`\n status: \"pending\" | \"uploaded\" | \"expired\" | \"failed\"\n filename: string | null\n content_type: string | null\n content_length: number | null\n upload_url?: string\n complete_url?: string\n file_import_result?: {\n // The time the file was imported into Notion. ISO 8601 format.\n imported_time: string\n } & (\n | {\n // Indicates a successful import.\n type: \"success\"\n // Empty object for success type.\n success: EmptyObject\n }\n | {\n // Indicates an error occurred during import.\n type: \"error\"\n // Details about the error that occurred during file import.\n error: {\n // The type of error that occurred during file import.\n type:\n | \"validation_error\"\n | \"internal_system_error\"\n | \"download_error\"\n | \"upload_error\"\n // A short string code representing the error.\n code: string\n // A human-readable message describing the error.\n message: string\n // The parameter related to the error, if applicable. Null if not applicable.\n parameter: string | null\n // The HTTP status code associated with the error, if available. Null if not applicable.\n status_code: number | null\n }\n }\n )\n number_of_parts?: { total: number; sent: number }\n}\n\ntype FileUploadPageCoverRequest = {\n // Always `file_upload`\n type?: \"file_upload\"\n // The file upload for the cover.\n file_upload: {\n // ID of a FileUpload object that has the status `uploaded`.\n id: string\n }\n}\n\ntype FileUploadPageIconRequest = {\n // Always `file_upload`\n type?: \"file_upload\"\n file_upload: {\n // ID of a FileUpload object that has the status `uploaded`.\n id: string\n }\n}\n\ntype FileUploadWithOptionalNameRequest = {\n file_upload: FileUploadIdRequest\n type?: \"file_upload\"\n name?: StringRequest\n}\n\ntype FilesDatabasePropertyConfigResponse = {\n // Always `files`\n type: \"files\"\n files: EmptyObject\n}\n\ntype FilesPropertyConfigurationRequest = {\n // Always `files`\n type?: \"files\"\n files: EmptyObject\n}\n\nexport type FilesPropertyItemObjectResponse = {\n type: \"files\"\n files: Array<InternalOrExternalFileWithNameResponse>\n object: \"property_item\"\n id: string\n}\n\ntype FilesSimplePropertyValueResponse = {\n // Always `files`\n type: \"files\"\n files: Array<InternalOrExternalFileWithNameResponse>\n}\n\ntype FormulaDatabasePropertyConfigResponse = {\n // Always `formula`\n type: \"formula\"\n formula: { expression: string }\n}\n\ntype FormulaPropertyConfigurationRequest = {\n // Always `formula`\n type?: \"formula\"\n formula: { expression?: string }\n}\n\ntype FormulaPropertyFilter =\n | { string: TextPropertyFilter }\n | { checkbox: CheckboxPropertyFilter }\n | { number: NumberPropertyFilter }\n | { date: DatePropertyFilter }\n\nexport type FormulaPropertyItemObjectResponse = {\n type: \"formula\"\n formula: FormulaPropertyResponse\n object: \"property_item\"\n id: string\n}\n\ntype FormulaPropertyResponse =\n | StringFormulaPropertyResponse\n | DateFormulaPropertyResponse\n | NumberFormulaPropertyResponse\n | BooleanFormulaPropertyResponse\n\ntype FormulaPropertyValueResponse =\n | BooleanFormulaPropertyValueResponse\n | DateFormulaPropertyValueResponse\n | NumberFormulaPropertyValueResponse\n | StringFormulaPropertyValueResponse\n\ntype FormulaSimplePropertyValueResponse = {\n // Always `formula`\n type: \"formula\"\n formula: FormulaPropertyValueResponse\n}\n\ntype GroupFilterOperatorArray = Array<\n | PropertyOrTimestampFilter\n | { or: PropertyOrTimestampFilterArray }\n | { and: PropertyOrTimestampFilterArray }\n>\n\ntype GroupObjectRequest = {\n id: IdRequest\n name?: string | null\n object?: \"group\"\n}\n\nexport type GroupObjectResponse = {\n // The ID of the group.\n id: IdResponse\n // The group object type name.\n object: \"group\"\n // The name of the group.\n name: string | null\n}\n\ntype HeaderContentWithRichTextAndColorRequest = {\n rich_text: Array<RichTextItemRequest>\n color?: ApiColor\n is_toggleable?: boolean\n}\n\ntype HeaderContentWithRichTextAndColorResponse = {\n rich_text: Array<RichTextItemResponse>\n color: ApiColor\n is_toggleable: boolean\n}\n\ntype HeaderContentWithSingleLevelOfChildrenRequest = {\n rich_text: Array<RichTextItemRequest>\n color?: ApiColor\n is_toggleable?: boolean\n children?: Array<BlockObjectRequestWithoutChildren>\n}\n\nexport type Heading1BlockObjectResponse = {\n type: \"heading_1\"\n heading_1: HeaderContentWithRichTextAndColorResponse\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\nexport type Heading2BlockObjectResponse = {\n type: \"heading_2\"\n heading_2: HeaderContentWithRichTextAndColorResponse\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\nexport type Heading3BlockObjectResponse = {\n type: \"heading_3\"\n heading_3: HeaderContentWithRichTextAndColorResponse\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\ntype IdObjectResponse = { id: string }\n\ntype IdRequest = string\n\ntype IdResponse = string\n\nexport type ImageBlockObjectResponse = {\n type: \"image\"\n image: MediaContentWithFileAndCaptionResponse\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\ntype InitialDataSourceRequest = {\n // Property schema for the initial data source, if you'd like to create one.\n properties?: Record<string, PropertyConfigurationRequest>\n}\n\ntype InternalFileRequest = { url: string; expiry_time?: string }\n\ntype InternalFileResponse = {\n // The URL of the file.\n url: string\n // The time when the URL will expire.\n expiry_time: string\n}\n\ntype InternalOrExternalFileWithNameRequest =\n | { file: InternalFileRequest; name: StringRequest; type?: \"file\" }\n | { external: ExternalFileRequest; name: StringRequest; type?: \"external\" }\n\ntype InternalOrExternalFileWithNameResponse =\n InternalOrExternalFileWithNameResponseCommon &\n (\n | FileInternalOrExternalFileWithNameResponse\n | ExternalInternalOrExternalFileWithNameResponse\n )\n\ntype InternalOrExternalFileWithNameResponseCommon = {\n // The name of the file.\n name: string\n}\n\ntype LanguageRequest =\n | \"abap\"\n | \"abc\"\n | \"agda\"\n | \"arduino\"\n | \"ascii art\"\n | \"assembly\"\n | \"bash\"\n | \"basic\"\n | \"bnf\"\n | \"c\"\n | \"c#\"\n | \"c++\"\n | \"clojure\"\n | \"coffeescript\"\n | \"coq\"\n | \"css\"\n | \"dart\"\n | \"dhall\"\n | \"diff\"\n | \"docker\"\n | \"ebnf\"\n | \"elixir\"\n | \"elm\"\n | \"erlang\"\n | \"f#\"\n | \"flow\"\n | \"fortran\"\n | \"gherkin\"\n | \"glsl\"\n | \"go\"\n | \"graphql\"\n | \"groovy\"\n | \"haskell\"\n | \"hcl\"\n | \"html\"\n | \"idris\"\n | \"java\"\n | \"javascript\"\n | \"json\"\n | \"julia\"\n | \"kotlin\"\n | \"latex\"\n | \"less\"\n | \"lisp\"\n | \"livescript\"\n | \"llvm ir\"\n | \"lua\"\n | \"makefile\"\n | \"markdown\"\n | \"markup\"\n | \"matlab\"\n | \"mathematica\"\n | \"mermaid\"\n | \"nix\"\n | \"notion formula\"\n | \"objective-c\"\n | \"ocaml\"\n | \"pascal\"\n | \"perl\"\n | \"php\"\n | \"plain text\"\n | \"powershell\"\n | \"prolog\"\n | \"protobuf\"\n | \"purescript\"\n | \"python\"\n | \"r\"\n | \"racket\"\n | \"reason\"\n | \"ruby\"\n | \"rust\"\n | \"sass\"\n | \"scala\"\n | \"scheme\"\n | \"scss\"\n | \"shell\"\n | \"smalltalk\"\n | \"solidity\"\n | \"sql\"\n | \"swift\"\n | \"toml\"\n | \"typescript\"\n | \"vb.net\"\n | \"verilog\"\n | \"vhdl\"\n | \"visual basic\"\n | \"webassembly\"\n | \"xml\"\n | \"yaml\"\n | \"java/c/c++/c#\"\n\ntype LastEditedByDatabasePropertyConfigResponse = {\n // Always `last_edited_by`\n type: \"last_edited_by\"\n last_edited_by: EmptyObject\n}\n\ntype LastEditedByPropertyConfigurationRequest = {\n // Always `last_edited_by`\n type?: \"last_edited_by\"\n last_edited_by: EmptyObject\n}\n\nexport type LastEditedByPropertyItemObjectResponse = {\n type: \"last_edited_by\"\n last_edited_by: PartialUserObjectResponse | UserObjectResponse\n object: \"property_item\"\n id: string\n}\n\ntype LastEditedBySimplePropertyValueResponse = {\n // Always `last_edited_by`\n type: \"last_edited_by\"\n last_edited_by: UserValueResponse\n}\n\ntype LastEditedTimeDatabasePropertyConfigResponse = {\n // Always `last_edited_time`\n type: \"last_edited_time\"\n last_edited_time: EmptyObject\n}\n\ntype LastEditedTimePropertyConfigurationRequest = {\n // Always `last_edited_time`\n type?: \"last_edited_time\"\n last_edited_time: EmptyObject\n}\n\nexport type LastEditedTimePropertyItemObjectResponse = {\n type: \"last_edited_time\"\n last_edited_time: string\n object: \"property_item\"\n id: string\n}\n\ntype LastEditedTimeSimplePropertyValueResponse = {\n // Always `last_edited_time`\n type: \"last_edited_time\"\n last_edited_time: string\n}\n\ntype LastVisitedTimePropertyConfigurationRequest = {\n // Always `last_visited_time`\n type?: \"last_visited_time\"\n last_visited_time: EmptyObject\n}\n\ntype LinkMentionResponse = {\n // The href of the link mention.\n href: string\n // The title of the link.\n title?: string\n // The description of the link.\n description?: string\n // The author of the link.\n link_author?: string\n // The provider of the link.\n link_provider?: string\n // The thumbnail URL of the link.\n thumbnail_url?: string\n // The icon URL of the link.\n icon_url?: string\n // The iframe URL of the link.\n iframe_url?: string\n // The height of the link preview iframe.\n height?: number\n // The padding of the link preview iframe.\n padding?: number\n // The top padding of the link preview iframe.\n padding_top?: number\n}\n\nexport type LinkPreviewBlockObjectResponse = {\n type: \"link_preview\"\n link_preview: MediaContentWithUrlResponse\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\ntype LinkPreviewMentionResponse = {\n // The URL of the link preview mention.\n url: string\n}\n\nexport type LinkToPageBlockObjectResponse = {\n type: \"link_to_page\"\n link_to_page:\n | { type: \"page_id\"; page_id: IdRequest }\n | { type: \"database_id\"; database_id: IdRequest }\n | { type: \"comment_id\"; comment_id: IdRequest }\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\ntype LocationPropertyConfigurationRequest = {\n // Always `location`\n type?: \"location\"\n location: EmptyObject\n}\n\ntype MediaContentWithFileAndCaptionRequest =\n | {\n external: ExternalFileRequest\n type?: \"external\"\n caption?: Array<RichTextItemRequest>\n }\n | {\n file_upload: FileUploadIdRequest\n type?: \"file_upload\"\n caption?: Array<RichTextItemRequest>\n }\n\ntype MediaContentWithFileAndCaptionResponse =\n | ExternalMediaContentWithFileAndCaptionResponse\n | FileMediaContentWithFileAndCaptionResponse\n\ntype MediaContentWithFileNameAndCaptionRequest =\n | {\n external: ExternalFileRequest\n type?: \"external\"\n caption?: Array<RichTextItemRequest>\n name?: StringRequest\n }\n | {\n file_upload: FileUploadIdRequest\n type?: \"file_upload\"\n caption?: Array<RichTextItemRequest>\n name?: StringRequest\n }\n\ntype MediaContentWithFileNameAndCaptionResponse =\n | ExternalMediaContentWithFileNameAndCaptionResponse\n | FileMediaContentWithFileNameAndCaptionResponse\n\ntype MediaContentWithUrlAndCaptionRequest = {\n url: string\n caption?: Array<RichTextItemRequest>\n}\n\ntype MediaContentWithUrlAndCaptionResponse = {\n url: string\n caption: Array<RichTextItemResponse>\n}\n\ntype MediaContentWithUrlResponse = { url: TextRequest }\n\ntype MentionRichTextItemRequest = {\n // Always `mention`\n type?: \"mention\"\n // Mention objects represent an inline mention of a database, date, link preview mention,\n // page, template mention, or user. A mention is created in the Notion UI when a user\n // types `@` followed by the name of the reference.\n mention:\n | {\n // Always `user`\n type?: \"user\"\n // Details of the user mention.\n user: PartialUserObjectRequest\n }\n | {\n // Always `date`\n type?: \"date\"\n // Details of the date mention.\n date: DateRequest\n }\n | {\n // Always `page`\n type?: \"page\"\n // Details of the page mention.\n page: {\n // The ID of the page in the mention.\n id: IdRequest\n }\n }\n | {\n // Always `database`\n type?: \"database\"\n // Details of the database mention.\n database: {\n // The ID of the database in the mention.\n id: IdRequest\n }\n }\n | {\n // Always `template_mention`\n type?: \"template_mention\"\n // Details of the template mention.\n template_mention: TemplateMentionRequest\n }\n | {\n // Always `custom_emoji`\n type?: \"custom_emoji\"\n // Details of the custom emoji mention.\n custom_emoji: {\n // The ID of the custom emoji.\n id: IdRequest\n // The name of the custom emoji.\n name?: string\n // The URL of the custom emoji.\n url?: string\n }\n }\n}\n\nexport type MentionRichTextItemResponse = {\n // Always `mention`\n type: \"mention\"\n // Mention objects represent an inline mention of a database, date, link preview mention,\n // page, template mention, or user. A mention is created in the Notion UI when a user\n // types `@` followed by the name of the reference.\n mention:\n | {\n // Always `user`\n type: \"user\"\n // Details of the user mention.\n user: UserValueResponse\n }\n | {\n // Always `date`\n type: \"date\"\n // Details of the date mention.\n date: DateResponse\n }\n | {\n // Always `link_preview`\n type: \"link_preview\"\n // Details of the link preview mention.\n link_preview: LinkPreviewMentionResponse\n }\n | {\n // Always `link_mention`\n type: \"link_mention\"\n // Details of the link mention.\n link_mention: LinkMentionResponse\n }\n | {\n // Always `page`\n type: \"page\"\n // Details of the page mention.\n page: {\n // The ID of the page in the mention.\n id: IdResponse\n }\n }\n | {\n // Always `database`\n type: \"database\"\n // Details of the database mention.\n database: {\n // The ID of the database in the mention.\n id: IdResponse\n }\n }\n | {\n // Always `template_mention`\n type: \"template_mention\"\n // Details of the template mention.\n template_mention: TemplateMentionResponse\n }\n | {\n // Always `custom_emoji`\n type: \"custom_emoji\"\n // Details of the custom emoji mention.\n custom_emoji: CustomEmojiResponse\n }\n}\n\ntype MultiSelectDatabasePropertyConfigResponse = {\n // Always `multi_select`\n type: \"multi_select\"\n multi_select: { options: Array<SelectPropertyResponse> }\n}\n\ntype MultiSelectPropertyConfigurationRequest = {\n // Always `multi_select`\n type?: \"multi_select\"\n multi_select: {\n options?: Array<{\n name: string\n color?: SelectColor\n description?: string | null\n }>\n }\n}\n\ntype MultiSelectPropertyFilter =\n | { contains: string }\n | { does_not_contain: string }\n | ExistencePropertyFilter\n\nexport type MultiSelectPropertyItemObjectResponse = {\n type: \"multi_select\"\n multi_select: Array<PartialSelectResponse>\n object: \"property_item\"\n id: string\n}\n\ntype MultiSelectSimplePropertyValueResponse = {\n // Always `multi_select`\n type: \"multi_select\"\n multi_select: Array<PartialSelectPropertyValueResponse>\n}\n\ntype NumberDatabasePropertyConfigResponse = {\n // Always `number`\n type: \"number\"\n number: {\n // The number format for the property.\n format: NumberFormat\n }\n}\n\ntype NumberFormat = string\n\ntype NumberFormulaPropertyResponse = { type: \"number\"; number: number | null }\n\ntype NumberFormulaPropertyValueResponse = {\n // Always `number`\n type: \"number\"\n number: number | null\n}\n\ntype NumberPartialRollupValueResponse = {\n // Always `number`\n type: \"number\"\n number: number | null\n}\n\ntype NumberPropertyConfigurationRequest = {\n // Always `number`\n type?: \"number\"\n number: { format?: NumberFormat }\n}\n\ntype NumberPropertyFilter =\n | { equals: number }\n | { does_not_equal: number }\n | { greater_than: number }\n | { less_than: number }\n | { greater_than_or_equal_to: number }\n | { less_than_or_equal_to: number }\n | ExistencePropertyFilter\n\nexport type NumberPropertyItemObjectResponse = {\n type: \"number\"\n number: number | null\n object: \"property_item\"\n id: string\n}\n\ntype NumberSimplePropertyValueResponse = {\n // Always `number`\n type: \"number\"\n number: number | null\n}\n\ntype NumberedListFormat = \"numbers\" | \"letters\" | \"roman\"\n\nexport type NumberedListItemBlockObjectResponse = {\n type: \"numbered_list_item\"\n numbered_list_item: ContentWithRichTextAndColorAndListResponse\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\ntype PageCoverRequest = FileUploadPageCoverRequest | ExternalPageCoverRequest\n\ntype PageCoverResponse = FilePageCoverResponse | ExternalPageCoverResponse\n\ntype PageIconRequest =\n | FileUploadPageIconRequest\n | EmojiPageIconRequest\n | ExternalPageIconRequest\n | CustomEmojiPageIconRequest\n\ntype PageIconResponse =\n | EmojiPageIconResponse\n | FilePageIconResponse\n | ExternalPageIconResponse\n | CustomEmojiPageIconResponse\n\ntype PageIdCommentParentResponse = {\n // Always `page_id`\n type: \"page_id\"\n page_id: IdResponse\n}\n\ntype PageIdParentForBlockBasedObjectResponse = {\n // The parent type.\n type: \"page_id\"\n // The ID of the parent page.\n page_id: IdResponse\n}\n\nexport type PageObjectResponse = {\n // The page object type name.\n object: \"page\"\n // The ID of the page.\n id: IdResponse\n // Date and time when this page was created.\n created_time: string\n // Date and time when this page was last edited.\n last_edited_time: string\n // Whether the page has been archived.\n archived: boolean\n // Whether the page is in trash.\n in_trash: boolean\n // Whether the page is locked from editing in the Notion app UI.\n is_locked: boolean\n // The URL of the Notion page.\n url: string\n // The public URL of the Notion page, if it has been published to the web.\n public_url: string | null\n // Information about the page's parent.\n parent: ParentForBlockBasedObjectResponse\n // Property values of this page.\n properties: Record<string, PagePropertyValueWithIdResponse>\n // Page icon.\n icon: PageIconResponse | null\n // Page cover image.\n cover: PageCoverResponse | null\n // User who created the page.\n created_by: PartialUserObjectResponse\n // User who last edited the page.\n last_edited_by: PartialUserObjectResponse\n}\n\ntype PagePositionSchema =\n | { type: \"after_block\"; after_block: { id: IdRequest } }\n | { type: \"page_start\" }\n | { type: \"page_end\" }\n\ntype PagePropertyValueWithIdResponse = IdObjectResponse &\n (SimpleOrArrayPropertyValueResponse | PartialRollupPropertyResponse)\n\nexport type ParagraphBlockObjectResponse = {\n type: \"paragraph\"\n paragraph: ContentWithRichTextAndColorResponse\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\ntype ParentForBlockBasedObjectResponse =\n | DatabaseParentResponse\n | DataSourceParentResponse\n | PageIdParentForBlockBasedObjectResponse\n | BlockIdParentForBlockBasedObjectResponse\n | WorkspaceParentForBlockBasedObjectResponse\n\ntype ParentOfDataSourceRequest = {\n // Always `database_id`\n type?: \"database_id\"\n // The ID of the parent database (with or without dashes), for example,\n // 195de9221179449fab8075a27c979105\n database_id: IdRequest\n}\n\n/**\n * The parent of the data source. This is typically a database (`database_id`), but for\n * externally synced data sources, can be another data source (`data_source_id`).\n */\ntype ParentOfDataSourceResponse =\n | DatabaseParentResponse\n | DataSourceParentResponse\n\ntype ParentOfDatabaseResponse =\n | PageIdParentForBlockBasedObjectResponse\n | WorkspaceParentForBlockBasedObjectResponse\n | DatabaseParentResponse\n | BlockIdParentForBlockBasedObjectResponse\n\nexport type PartialBlockObjectResponse = { object: \"block\"; id: string }\n\nexport type PartialCommentObjectResponse = {\n // The comment object type name.\n object: \"comment\"\n // The ID of the comment.\n id: IdResponse\n}\n\nexport type PartialDataSourceObjectResponse = {\n // The data source object type name.\n object: \"data_source\"\n // The ID of the data source.\n id: IdResponse\n // The properties schema of the data source.\n properties: Record<string, DatabasePropertyConfigResponse>\n}\n\nexport type PartialDatabaseObjectResponse = {\n // The database object type name.\n object: \"database\"\n // The ID of the database.\n id: IdResponse\n}\n\nexport type PartialPageObjectResponse = {\n // The page object type name.\n object: \"page\"\n // The ID of the page.\n id: IdResponse\n}\n\ntype PartialRollupPropertyResponse = {\n // Always `rollup`\n type: \"rollup\"\n rollup: PartialRollupValueResponse\n}\n\ntype PartialRollupValueResponse = PartialRollupValueResponseCommon &\n (\n | NumberPartialRollupValueResponse\n | DatePartialRollupValueResponse\n | ArrayPartialRollupValueResponse\n )\n\ntype PartialRollupValueResponseCommon = {\n // The function used for the rollup, e.g. count, count_values, percent_not_empty, max.\n function: RollupFunction\n}\n\ntype PartialSelectPropertyValueResponse = {\n id: string\n name: string\n // One of: `default`, `gray`, `brown`, `orange`, `yellow`, `green`, `blue`, `purple`,\n // `pink`, `red`\n color:\n | \"default\"\n | \"gray\"\n | \"brown\"\n | \"orange\"\n | \"yellow\"\n | \"green\"\n | \"blue\"\n | \"purple\"\n | \"pink\"\n | \"red\"\n}\n\ntype PartialSelectResponse = { id: string; name: string; color: SelectColor }\n\ntype PartialUserObjectRequest = {\n // The ID of the user.\n id: IdRequest\n // The user object type name.\n object?: \"user\"\n}\n\nexport type PartialUserObjectResponse = {\n id: IdResponse\n // Always `user`\n object: \"user\"\n}\n\nexport type PdfBlockObjectResponse = {\n type: \"pdf\"\n pdf: MediaContentWithFileAndCaptionResponse\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\ntype PeopleArrayBasedPropertyValueResponse = {\n // Always `people`\n type: \"people\"\n people: Array<UserValueResponse | GroupObjectResponse>\n}\n\ntype PeopleDatabasePropertyConfigResponse = {\n // Always `people`\n type: \"people\"\n people: EmptyObject\n}\n\ntype PeoplePropertyConfigurationRequest = {\n // Always `people`\n type?: \"people\"\n people: EmptyObject\n}\n\ntype PeoplePropertyFilter =\n | { contains: IdRequest }\n | { does_not_contain: IdRequest }\n | ExistencePropertyFilter\n\nexport type PeoplePropertyItemObjectResponse = {\n type: \"people\"\n people: PartialUserObjectResponse | UserObjectResponse\n object: \"property_item\"\n id: string\n}\n\nexport type PersonUserObjectResponse = {\n // Indicates this user is a person.\n type: \"person\"\n // Details about the person, when the `type` of the user is `person`.\n person: {\n // The email of the person.\n email?: string\n }\n}\n\ntype PhoneNumberDatabasePropertyConfigResponse = {\n // Always `phone_number`\n type: \"phone_number\"\n phone_number: EmptyObject\n}\n\ntype PhoneNumberPropertyConfigurationRequest = {\n // Always `phone_number`\n type?: \"phone_number\"\n phone_number: EmptyObject\n}\n\nexport type PhoneNumberPropertyItemObjectResponse = {\n type: \"phone_number\"\n phone_number: string | null\n object: \"property_item\"\n id: string\n}\n\ntype PhoneNumberSimplePropertyValueResponse = {\n // Always `phone_number`\n type: \"phone_number\"\n phone_number: string | null\n}\n\ntype PlacePropertyConfigurationRequest = {\n // Always `place`\n type?: \"place\"\n place: EmptyObject\n}\n\nexport type PlacePropertyItemObjectResponse = {\n type: \"place\"\n place: {\n lat: number\n lon: number\n name?: string | null\n address?: string | null\n aws_place_id?: string | null\n google_place_id?: string | null\n } | null\n object: \"property_item\"\n id: string\n}\n\ntype PlacePropertyValueResponse = {\n lat: number\n lon: number\n name?: string | null\n address?: string | null\n aws_place_id?: string | null\n google_place_id?: string | null\n}\n\ntype PlaceSimplePropertyValueResponse = {\n // Always `place`\n type: \"place\"\n place: PlacePropertyValueResponse | null\n}\n\ntype PropertyConfigurationRequest = PropertyConfigurationRequestCommon &\n (\n | NumberPropertyConfigurationRequest\n | FormulaPropertyConfigurationRequest\n | SelectPropertyConfigurationRequest\n | MultiSelectPropertyConfigurationRequest\n | StatusPropertyConfigurationRequest\n | RelationPropertyConfigurationRequest\n | RollupPropertyConfigurationRequest\n | UniqueIdPropertyConfigurationRequest\n | TitlePropertyConfigurationRequest\n | RichTextPropertyConfigurationRequest\n | UrlPropertyConfigurationRequest\n | PeoplePropertyConfigurationRequest\n | FilesPropertyConfigurationRequest\n | EmailPropertyConfigurationRequest\n | PhoneNumberPropertyConfigurationRequest\n | DatePropertyConfigurationRequest\n | CheckboxPropertyConfigurationRequest\n | CreatedByPropertyConfigurationRequest\n | CreatedTimePropertyConfigurationRequest\n | LastEditedByPropertyConfigurationRequest\n | LastEditedTimePropertyConfigurationRequest\n | ButtonPropertyConfigurationRequest\n | LocationPropertyConfigurationRequest\n | VerificationPropertyConfigurationRequest\n | LastVisitedTimePropertyConfigurationRequest\n | PlacePropertyConfigurationRequest\n )\n\ntype PropertyConfigurationRequestCommon = {\n // The description of the property.\n description?: PropertyDescriptionRequest | null\n}\n\ntype PropertyDescriptionRequest = string\n\ntype PropertyFilter =\n | { title: TextPropertyFilter; property: string; type?: \"title\" }\n | { rich_text: TextPropertyFilter; property: string; type?: \"rich_text\" }\n | { number: NumberPropertyFilter; property: string; type?: \"number\" }\n | { checkbox: CheckboxPropertyFilter; property: string; type?: \"checkbox\" }\n | { select: SelectPropertyFilter; property: string; type?: \"select\" }\n | {\n multi_select: MultiSelectPropertyFilter\n property: string\n type?: \"multi_select\"\n }\n | { status: StatusPropertyFilter; property: string; type?: \"status\" }\n | { date: DatePropertyFilter; property: string; type?: \"date\" }\n | { people: PeoplePropertyFilter; property: string; type?: \"people\" }\n | { files: ExistencePropertyFilter; property: string; type?: \"files\" }\n | { url: TextPropertyFilter; property: string; type?: \"url\" }\n | { email: TextPropertyFilter; property: string; type?: \"email\" }\n | {\n phone_number: TextPropertyFilter\n property: string\n type?: \"phone_number\"\n }\n | { relation: RelationPropertyFilter; property: string; type?: \"relation\" }\n | { created_by: PeoplePropertyFilter; property: string; type?: \"created_by\" }\n | {\n created_time: DatePropertyFilter\n property: string\n type?: \"created_time\"\n }\n | {\n last_edited_by: PeoplePropertyFilter\n property: string\n type?: \"last_edited_by\"\n }\n | {\n last_edited_time: DatePropertyFilter\n property: string\n type?: \"last_edited_time\"\n }\n | { formula: FormulaPropertyFilter; property: string; type?: \"formula\" }\n | { unique_id: NumberPropertyFilter; property: string; type?: \"unique_id\" }\n | { rollup: RollupPropertyFilter; property: string; type?: \"rollup\" }\n | {\n verification: VerificationPropertyStatusFilter\n property: string\n type?: \"verification\"\n }\n\nexport type PropertyItemListResponse = PropertyItemPropertyItemListResponse\n\nexport type PropertyItemObjectResponse =\n | NumberPropertyItemObjectResponse\n | UrlPropertyItemObjectResponse\n | SelectPropertyItemObjectResponse\n | MultiSelectPropertyItemObjectResponse\n | StatusPropertyItemObjectResponse\n | DatePropertyItemObjectResponse\n | EmailPropertyItemObjectResponse\n | PhoneNumberPropertyItemObjectResponse\n | CheckboxPropertyItemObjectResponse\n | FilesPropertyItemObjectResponse\n | CreatedByPropertyItemObjectResponse\n | CreatedTimePropertyItemObjectResponse\n | LastEditedByPropertyItemObjectResponse\n | LastEditedTimePropertyItemObjectResponse\n | FormulaPropertyItemObjectResponse\n | ButtonPropertyItemObjectResponse\n | UniqueIdPropertyItemObjectResponse\n | VerificationPropertyItemObjectResponse\n | PlacePropertyItemObjectResponse\n | TitlePropertyItemObjectResponse\n | RichTextPropertyItemObjectResponse\n | PeoplePropertyItemObjectResponse\n | RelationPropertyItemObjectResponse\n | RollupPropertyItemObjectResponse\n\ntype PropertyItemPropertyItemListResponse = {\n type: \"property_item\"\n property_item:\n | { type: \"title\"; title: EmptyObject; next_url: string | null; id: string }\n | {\n type: \"rich_text\"\n rich_text: EmptyObject\n next_url: string | null\n id: string\n }\n | {\n type: \"people\"\n people: EmptyObject\n next_url: string | null\n id: string\n }\n | {\n type: \"relation\"\n relation: EmptyObject\n next_url: string | null\n id: string\n }\n | {\n type: \"rollup\"\n rollup:\n | { type: \"number\"; number: number | null; function: RollupFunction }\n | {\n type: \"date\"\n date: DateResponse | null\n function: RollupFunction\n }\n | {\n type: \"array\"\n array: Array<EmptyObject>\n function: RollupFunction\n }\n | {\n type: \"unsupported\"\n unsupported: EmptyObject\n function: RollupFunction\n }\n | {\n type: \"incomplete\"\n incomplete: EmptyObject\n function: RollupFunction\n }\n next_url: string | null\n id: string\n }\n object: \"list\"\n next_cursor: string | null\n has_more: boolean\n results: Array<PropertyItemObjectResponse>\n}\n\ntype PropertyOrTimestampFilter = PropertyFilter | TimestampFilter\n\ntype PropertyOrTimestampFilterArray = Array<PropertyOrTimestampFilter>\n\nexport type QuoteBlockObjectResponse = {\n type: \"quote\"\n quote: ContentWithRichTextAndColorResponse\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\ntype RelationArrayBasedPropertyValueResponse = {\n // Always `relation`\n type: \"relation\"\n relation: Array<RelationItemPropertyValueResponse>\n}\n\ntype RelationDatabasePropertyConfigResponse = {\n // Always `relation`\n type: \"relation\"\n relation: DatabasePropertyRelationConfigResponse\n}\n\ntype RelationItemPropertyValueResponse = { id: IdRequest }\n\ntype RelationPropertyConfigurationRequest = {\n // Always `relation`\n type?: \"relation\"\n relation: { data_source_id: IdRequest } & (\n | {\n // Always `single_property`\n type?: \"single_property\"\n single_property: EmptyObject\n }\n | {\n // Always `dual_property`\n type?: \"dual_property\"\n dual_property: {\n synced_property_id?: string\n synced_property_name?: string\n }\n }\n )\n}\n\ntype RelationPropertyFilter =\n | { contains: IdRequest }\n | { does_not_contain: IdRequest }\n | ExistencePropertyFilter\n\nexport type RelationPropertyItemObjectResponse = {\n type: \"relation\"\n relation: { id: string }\n object: \"property_item\"\n id: string\n}\n\ntype RichTextArrayBasedPropertyValueResponse = {\n // Always `rich_text`\n type: \"rich_text\"\n rich_text: Array<RichTextItemResponse>\n}\n\ntype RichTextDatabasePropertyConfigResponse = {\n // Always `rich_text`\n type: \"rich_text\"\n rich_text: EmptyObject\n}\n\ntype RichTextItemRequest = RichTextItemRequestCommon &\n (\n | TextRichTextItemRequest\n | MentionRichTextItemRequest\n | EquationRichTextItemRequest\n )\n\ntype RichTextItemRequestCommon = {\n // All rich text objects contain an annotations object that sets the styling for the rich\n // text.\n annotations?: AnnotationRequest\n}\n\nexport type RichTextItemResponse = RichTextItemResponseCommon &\n (\n | TextRichTextItemResponse\n | MentionRichTextItemResponse\n | EquationRichTextItemResponse\n )\n\nexport type RichTextItemResponseCommon = {\n // The plain text content of the rich text object, without any styling.\n plain_text: string\n // A URL that the rich text object links to or mentions.\n href: string | null\n // All rich text objects contain an annotations object that sets the styling for the rich\n // text.\n annotations: AnnotationResponse\n}\n\ntype RichTextPropertyConfigurationRequest = {\n // Always `rich_text`\n type?: \"rich_text\"\n rich_text: EmptyObject\n}\n\nexport type RichTextPropertyItemObjectResponse = {\n type: \"rich_text\"\n rich_text: RichTextItemResponse\n object: \"property_item\"\n id: string\n}\n\ntype RollupDatabasePropertyConfigResponse = {\n // Always `rollup`\n type: \"rollup\"\n rollup: {\n // The function to use for the rollup, e.g. count, count_values, percent_not_empty, max.\n function: RollupFunction\n rollup_property_name: string\n relation_property_name: string\n rollup_property_id: string\n relation_property_id: string\n }\n}\n\ntype RollupFunction =\n | \"count\"\n | \"count_values\"\n | \"empty\"\n | \"not_empty\"\n | \"unique\"\n | \"show_unique\"\n | \"percent_empty\"\n | \"percent_not_empty\"\n | \"sum\"\n | \"average\"\n | \"median\"\n | \"min\"\n | \"max\"\n | \"range\"\n | \"earliest_date\"\n | \"latest_date\"\n | \"date_range\"\n | \"checked\"\n | \"unchecked\"\n | \"percent_checked\"\n | \"percent_unchecked\"\n | \"count_per_group\"\n | \"percent_per_group\"\n | \"show_original\"\n\ntype RollupPropertyConfigurationRequest = {\n // Always `rollup`\n type?: \"rollup\"\n rollup: {\n // The function to use for the rollup, e.g. count, count_values, percent_not_empty, max.\n function: RollupFunction\n } & (\n | { relation_property_name: string; rollup_property_name: string }\n | { relation_property_id: string; rollup_property_name: string }\n | { relation_property_name: string; rollup_property_id: string }\n | { relation_property_id: string; rollup_property_id: string }\n )\n}\n\ntype RollupPropertyFilter =\n | { any: RollupSubfilterPropertyFilter }\n | { none: RollupSubfilterPropertyFilter }\n | { every: RollupSubfilterPropertyFilter }\n | { date: DatePropertyFilter }\n | { number: NumberPropertyFilter }\n\nexport type RollupPropertyItemObjectResponse = {\n type: \"rollup\"\n rollup:\n | { type: \"number\"; number: number | null; function: RollupFunction }\n | { type: \"date\"; date: DateResponse | null; function: RollupFunction }\n | { type: \"array\"; array: Array<EmptyObject>; function: RollupFunction }\n | {\n type: \"unsupported\"\n unsupported: EmptyObject\n function: RollupFunction\n }\n | { type: \"incomplete\"; incomplete: EmptyObject; function: RollupFunction }\n object: \"property_item\"\n id: string\n}\n\ntype RollupSubfilterPropertyFilter =\n | { rich_text: TextPropertyFilter }\n | { number: NumberPropertyFilter }\n | { checkbox: CheckboxPropertyFilter }\n | { select: SelectPropertyFilter }\n | { multi_select: MultiSelectPropertyFilter }\n | { relation: RelationPropertyFilter }\n | { date: DatePropertyFilter }\n | { people: PeoplePropertyFilter }\n | { files: ExistencePropertyFilter }\n | { status: StatusPropertyFilter }\n\n/**\n * One of: `default`, `gray`, `brown`, `orange`, `yellow`, `green`, `blue`, `purple`,\n * `pink`, `red`\n */\ntype SelectColor =\n | \"default\"\n | \"gray\"\n | \"brown\"\n | \"orange\"\n | \"yellow\"\n | \"green\"\n | \"blue\"\n | \"purple\"\n | \"pink\"\n | \"red\"\n\ntype SelectDatabasePropertyConfigResponse = {\n // Always `select`\n type: \"select\"\n select: { options: Array<SelectPropertyResponse> }\n}\n\ntype SelectPropertyConfigurationRequest = {\n // Always `select`\n type?: \"select\"\n select: {\n options?: Array<{\n name: string\n color?: SelectColor\n description?: string | null\n }>\n }\n}\n\ntype SelectPropertyFilter =\n | { equals: string }\n | { does_not_equal: string }\n | ExistencePropertyFilter\n\nexport type SelectPropertyItemObjectResponse = {\n type: \"select\"\n select: PartialSelectResponse | null\n object: \"property_item\"\n id: string\n}\n\ntype SelectPropertyResponse = {\n id: string\n name: string\n color: SelectColor\n description: string | null\n}\n\ntype SelectSimplePropertyValueResponse = {\n // Always `select`\n type: \"select\"\n select: PartialSelectPropertyValueResponse | null\n}\n\ntype SimpleOrArrayPropertyValueResponse =\n | SimplePropertyValueResponse\n | ArrayBasedPropertyValueResponse\n\ntype SimplePropertyValueResponse =\n | NumberSimplePropertyValueResponse\n | UrlSimplePropertyValueResponse\n | SelectSimplePropertyValueResponse\n | MultiSelectSimplePropertyValueResponse\n | StatusSimplePropertyValueResponse\n | DateSimplePropertyValueResponse\n | EmailSimplePropertyValueResponse\n | PhoneNumberSimplePropertyValueResponse\n | CheckboxSimplePropertyValueResponse\n | FilesSimplePropertyValueResponse\n | CreatedBySimplePropertyValueResponse\n | CreatedTimeSimplePropertyValueResponse\n | LastEditedBySimplePropertyValueResponse\n | LastEditedTimeSimplePropertyValueResponse\n | FormulaSimplePropertyValueResponse\n | ButtonSimplePropertyValueResponse\n | UniqueIdSimplePropertyValueResponse\n | VerificationSimplePropertyValueResponse\n | PlaceSimplePropertyValueResponse\n\ntype SinglePropertyDatabasePropertyRelationConfigResponse = {\n // Always `single_property`\n type: \"single_property\"\n single_property: EmptyObject\n}\n\ntype StatusDatabasePropertyConfigResponse = {\n // Always `status`\n type: \"status\"\n status: {\n // The options for the status property.\n options: Array<StatusPropertyResponse>\n // The groups for the status property.\n groups: Array<{\n // The ID of the status group.\n id: string\n // The name of the status group.\n name: string\n // The color of the status group.\n color: SelectColor\n // The IDs of the status options in this group.\n option_ids: Array<string>\n }>\n }\n}\n\ntype StatusPropertyConfigurationRequest = {\n // Always `status`\n type?: \"status\"\n status: EmptyObject\n}\n\ntype StatusPropertyFilter =\n | { equals: string }\n | { does_not_equal: string }\n | ExistencePropertyFilter\n\nexport type StatusPropertyItemObjectResponse = {\n type: \"status\"\n status: PartialSelectResponse | null\n object: \"property_item\"\n id: string\n}\n\ntype StatusPropertyResponse = {\n // The ID of the status option.\n id: string\n // The name of the status option.\n name: string\n // The color of the status option.\n color: SelectColor\n // The description of the status option.\n description: string | null\n}\n\ntype StatusSimplePropertyValueResponse = {\n // Always `status`\n type: \"status\"\n status: PartialSelectPropertyValueResponse | null\n}\n\ntype StringFormulaPropertyResponse = { type: \"string\"; string: string | null }\n\ntype StringFormulaPropertyValueResponse = {\n // Always `string`\n type: \"string\"\n string: string | null\n}\n\ntype StringRequest = string\n\nexport type SyncedBlockBlockObjectResponse = {\n type: \"synced_block\"\n synced_block: {\n synced_from: { type: \"block_id\"; block_id: IdRequest } | null\n }\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\nexport type TableBlockObjectResponse = {\n type: \"table\"\n table: ContentWithTableResponse\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\nexport type TableOfContentsBlockObjectResponse = {\n type: \"table_of_contents\"\n table_of_contents: { color: ApiColor }\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\ntype TableRequestWithTableRowChildren = {\n table_width: number\n children: Array<TableRowRequest>\n has_column_header?: boolean\n has_row_header?: boolean\n}\n\nexport type TableRowBlockObjectResponse = {\n type: \"table_row\"\n table_row: ContentWithTableRowResponse\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\ntype TableRowRequest = {\n table_row: ContentWithTableRowRequest\n type?: \"table_row\"\n object?: \"block\"\n}\n\nexport type TemplateBlockObjectResponse = {\n type: \"template\"\n template: { rich_text: Array<RichTextItemResponse> }\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\ntype TemplateMentionDateTemplateMentionRequest = {\n // Always `template_mention_date`\n type?: \"template_mention_date\"\n // The date of the template mention.\n template_mention_date: \"today\" | \"now\"\n}\n\ntype TemplateMentionDateTemplateMentionResponse = {\n // Always `template_mention_date`\n type: \"template_mention_date\"\n // The date of the template mention.\n template_mention_date: \"today\" | \"now\"\n}\n\ntype TemplateMentionRequest =\n | TemplateMentionDateTemplateMentionRequest\n | TemplateMentionUserTemplateMentionRequest\n\ntype TemplateMentionResponse =\n | TemplateMentionDateTemplateMentionResponse\n | TemplateMentionUserTemplateMentionResponse\n\ntype TemplateMentionUserTemplateMentionRequest = {\n // Always `template_mention_user`\n type?: \"template_mention_user\"\n // The user of the template mention.\n template_mention_user: \"me\"\n}\n\ntype TemplateMentionUserTemplateMentionResponse = {\n // Always `template_mention_user`\n type: \"template_mention_user\"\n // The user of the template mention.\n template_mention_user: \"me\"\n}\n\ntype TextPropertyFilter =\n | { equals: string }\n | { does_not_equal: string }\n | { contains: string }\n | { does_not_contain: string }\n | { starts_with: string }\n | { ends_with: string }\n | ExistencePropertyFilter\n\ntype TextRequest = string\n\ntype TextRichTextItemRequest = {\n // Always `text`\n type?: \"text\"\n // If a rich text object's type value is `text`, then the corresponding text field\n // contains an object including the text content and any inline link.\n text: {\n // The actual text content of the text.\n content: string\n // An object with information about any inline link in this text, if included.\n link?: {\n // The URL of the link.\n url: string\n } | null\n }\n}\n\nexport type TextRichTextItemResponse = {\n // Always `text`\n type: \"text\"\n // If a rich text object's type value is `text`, then the corresponding text field\n // contains an object including the text content and any inline link.\n text: {\n // The actual text content of the text.\n content: string\n // An object with information about any inline link in this text, if included.\n link: {\n // The URL of the link.\n url: string\n } | null\n }\n}\n\ntype TimeZoneRequest = string\n\ntype TimestampCreatedTimeFilter = {\n created_time: DatePropertyFilter\n timestamp: \"created_time\"\n type?: \"created_time\"\n}\n\ntype TimestampFilter =\n | TimestampCreatedTimeFilter\n | TimestampLastEditedTimeFilter\n\ntype TimestampLastEditedTimeFilter = {\n last_edited_time: DatePropertyFilter\n timestamp: \"last_edited_time\"\n type?: \"last_edited_time\"\n}\n\ntype TitleArrayBasedPropertyValueResponse = {\n // Always `title`\n type: \"title\"\n title: Array<RichTextItemResponse>\n}\n\ntype TitleDatabasePropertyConfigResponse = {\n // Always `title`\n type: \"title\"\n title: EmptyObject\n}\n\ntype TitleObjectResponse = { title: string }\n\ntype TitlePropertyConfigurationRequest = {\n // Always `title`\n type?: \"title\"\n title: EmptyObject\n}\n\nexport type TitlePropertyItemObjectResponse = {\n type: \"title\"\n title: RichTextItemResponse\n object: \"property_item\"\n id: string\n}\n\nexport type ToDoBlockObjectResponse = {\n type: \"to_do\"\n to_do: {\n rich_text: Array<RichTextItemResponse>\n color: ApiColor\n checked: boolean\n }\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\nexport type ToggleBlockObjectResponse = {\n type: \"toggle\"\n toggle: ContentWithRichTextAndColorResponse\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\ntype UniqueIdDatabasePropertyConfigResponse = {\n // Always `unique_id`\n type: \"unique_id\"\n unique_id: {\n // The prefix for the unique ID.\n prefix: string | null\n }\n}\n\ntype UniqueIdPropertyConfigurationRequest = {\n // Always `unique_id`\n type?: \"unique_id\"\n unique_id: { prefix?: string | null }\n}\n\nexport type UniqueIdPropertyItemObjectResponse = {\n type: \"unique_id\"\n unique_id: { prefix: string | null; number: number | null }\n object: \"property_item\"\n id: string\n}\n\ntype UniqueIdPropertyValueResponse = {\n prefix: string | null\n number: number | null\n}\n\ntype UniqueIdSimplePropertyValueResponse = {\n // Always `unique_id`\n type: \"unique_id\"\n unique_id: UniqueIdPropertyValueResponse\n}\n\nexport type UnsupportedBlockObjectResponse = {\n type: \"unsupported\"\n unsupported: EmptyObject\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\ntype UpdateMediaContentWithFileAndCaptionRequest = {\n caption?: Array<RichTextItemRequest>\n external?: ExternalFileRequest\n file_upload?: FileUploadIdRequest\n}\n\ntype UpdateMediaContentWithFileNameAndCaptionRequest = {\n caption?: Array<RichTextItemRequest>\n external?: ExternalFileRequest\n file_upload?: FileUploadIdRequest\n name?: StringRequest\n}\n\ntype UpdateMediaContentWithUrlAndCaptionRequest = {\n url?: string\n caption?: Array<RichTextItemRequest>\n}\n\ntype UrlDatabasePropertyConfigResponse = {\n // Always `url`\n type: \"url\"\n url: EmptyObject\n}\n\ntype UrlPropertyConfigurationRequest = {\n // Always `url`\n type?: \"url\"\n url: EmptyObject\n}\n\nexport type UrlPropertyItemObjectResponse = {\n type: \"url\"\n url: string | null\n object: \"property_item\"\n id: string\n}\n\ntype UrlSimplePropertyValueResponse = {\n // Always `url`\n type: \"url\"\n url: string | null\n}\n\nexport type UserObjectResponse = UserObjectResponseCommon &\n (PersonUserObjectResponse | BotUserObjectResponse)\n\nexport type UserObjectResponseCommon = {\n // The ID of the user.\n id: IdResponse\n // The user object type name.\n object: \"user\"\n // The name of the user.\n name: string | null\n // The avatar URL of the user.\n avatar_url: string | null\n}\n\ntype UserValueResponse = PartialUserObjectResponse | UserObjectResponse\n\ntype VerificationPropertyConfigurationRequest = {\n // Always `verification`\n type?: \"verification\"\n verification: EmptyObject\n}\n\nexport type VerificationPropertyItemObjectResponse = {\n type: \"verification\"\n verification: VerificationPropertyValueResponse | null\n object: \"property_item\"\n id: string\n}\n\ntype VerificationPropertyResponse = {\n // One of: `verified`, `expired`\n state: \"verified\" | \"expired\"\n date: DateResponse | null\n verified_by: PartialUserObjectResponse | null\n}\n\ntype VerificationPropertyStatusFilter = {\n status: \"verified\" | \"expired\" | \"none\"\n}\n\ntype VerificationPropertyUnverifiedResponse = {\n // Always `unverified`\n state: \"unverified\"\n date: null\n verified_by: null\n}\n\ntype VerificationPropertyValueResponse =\n | VerificationPropertyUnverifiedResponse\n | VerificationPropertyResponse\n\ntype VerificationSimplePropertyValueResponse = {\n // Always `verification`\n type: \"verification\"\n verification: VerificationPropertyValueResponse | null\n}\n\nexport type VideoBlockObjectResponse = {\n type: \"video\"\n video: MediaContentWithFileAndCaptionResponse\n parent: ParentForBlockBasedObjectResponse\n object: \"block\"\n id: string\n created_time: string\n created_by: PartialUserObjectResponse\n last_edited_time: string\n last_edited_by: PartialUserObjectResponse\n has_children: boolean\n archived: boolean\n in_trash: boolean\n}\n\ntype WorkspaceParentForBlockBasedObjectResponse = {\n // The parent type.\n type: \"workspace\"\n // Always true for workspace parent.\n workspace: true\n}\nexport type GetSelfParameters = Record<string, never>\n\nexport type GetSelfResponse = UserObjectResponse\n\n/**\n * Retrieve your token's bot user\n */\nexport const getSelf = {\n method: \"get\",\n pathParams: [],\n queryParams: [],\n bodyParams: [],\n\n path: (): string => `users/me`,\n} as const\n\ntype GetUserPathParameters = {\n user_id: IdRequest\n}\n\nexport type GetUserParameters = GetUserPathParameters\n\nexport type GetUserResponse = UserObjectResponse\n\n/**\n * Retrieve a user\n */\nexport const getUser = {\n method: \"get\",\n pathParams: [\"user_id\"],\n queryParams: [],\n bodyParams: [],\n\n path: (p: GetUserPathParameters): string => `users/${p.user_id}`,\n} as const\n\ntype ListUsersQueryParameters = {\n start_cursor?: string\n page_size?: number\n}\n\nexport type ListUsersParameters = ListUsersQueryParameters\n\nexport type ListUsersResponse = {\n type: \"user\"\n user: EmptyObject\n object: \"list\"\n next_cursor: string | null\n has_more: boolean\n results: Array<UserObjectResponse>\n}\n\n/**\n * List all users\n */\nexport const listUsers = {\n method: \"get\",\n pathParams: [],\n queryParams: [\"start_cursor\", \"page_size\"],\n bodyParams: [],\n\n path: (): string => `users`,\n} as const\n\ntype CreatePageBodyParameters = {\n parent?:\n | { page_id: IdRequest; type?: \"page_id\" }\n | { database_id: IdRequest; type?: \"database_id\" }\n | { data_source_id: IdRequest; type?: \"data_source_id\" }\n | { workspace: true; type?: \"workspace\" }\n properties?: Record<\n string,\n | { title: Array<RichTextItemRequest>; type?: \"title\" }\n | { rich_text: Array<RichTextItemRequest>; type?: \"rich_text\" }\n | { number: number | null; type?: \"number\" }\n | { url: TextRequest | null; type?: \"url\" }\n | {\n select:\n | {\n id: StringRequest\n name?: TextRequest\n color?: SelectColor\n description?: TextRequest | null\n }\n | {\n name: TextRequest\n id?: StringRequest\n color?: SelectColor\n description?: TextRequest | null\n }\n | null\n type?: \"select\"\n }\n | {\n multi_select: Array<\n | {\n id: StringRequest\n name?: TextRequest\n color?: SelectColor\n description?: TextRequest | null\n }\n | {\n name: TextRequest\n id?: StringRequest\n color?: SelectColor\n description?: TextRequest | null\n }\n >\n type?: \"multi_select\"\n }\n | {\n people: Array<PartialUserObjectRequest | GroupObjectRequest>\n type?: \"people\"\n }\n | { email: StringRequest | null; type?: \"email\" }\n | { phone_number: StringRequest | null; type?: \"phone_number\" }\n | { date: DateRequest | null; type?: \"date\" }\n | { checkbox: boolean; type?: \"checkbox\" }\n | { relation: Array<RelationItemPropertyValueResponse>; type?: \"relation\" }\n | {\n files: Array<\n | InternalOrExternalFileWithNameRequest\n | FileUploadWithOptionalNameRequest\n >\n type?: \"files\"\n }\n | {\n status:\n | {\n id: StringRequest\n name?: TextRequest\n color?: SelectColor\n description?: TextRequest | null\n }\n | {\n name: TextRequest\n id?: StringRequest\n color?: SelectColor\n description?: TextRequest | null\n }\n | null\n type?: \"status\"\n }\n | {\n place: {\n lat: number\n lon: number\n name?: string | null\n address?: string | null\n aws_place_id?: string | null\n google_place_id?: string | null\n } | null\n type?: \"place\"\n }\n >\n icon?: PageIconRequest | null\n cover?: PageCoverRequest | null\n content?: Array<BlockObjectRequest>\n children?: Array<BlockObjectRequest>\n template?:\n | { type: \"none\" }\n | { type: \"default\" }\n | { type: \"template_id\"; template_id: IdRequest }\n position?: PagePositionSchema\n}\n\nexport type CreatePageParameters = CreatePageBodyParameters\n\nexport type CreatePageResponse = PageObjectResponse | PartialPageObjectResponse\n\n/**\n * Create a page\n */\nexport const createPage = {\n method: \"post\",\n pathParams: [],\n queryParams: [],\n bodyParams: [\n \"parent\",\n \"properties\",\n \"icon\",\n \"cover\",\n \"content\",\n \"children\",\n \"template\",\n \"position\",\n ],\n\n path: (): string => `pages`,\n} as const\n\ntype GetPagePathParameters = {\n // The ID of the page to retrieve.\n page_id: IdRequest\n}\n\ntype GetPageQueryParameters = {\n // Supply a list of property IDs to filter properties in the response. Note that if a\n // page doesn't have a property, it won't be included in the filtered response.\n filter_properties?: Array<string>\n}\n\nexport type GetPageParameters = GetPagePathParameters & GetPageQueryParameters\n\nexport type GetPageResponse = PartialPageObjectResponse | PageObjectResponse\n\n/**\n * Retrieve a page\n */\nexport const getPage = {\n method: \"get\",\n pathParams: [\"page_id\"],\n queryParams: [\"filter_properties\"],\n bodyParams: [],\n\n path: (p: GetPagePathParameters): string => `pages/${p.page_id}`,\n} as const\n\ntype UpdatePagePathParameters = {\n page_id: IdRequest\n}\n\ntype UpdatePageBodyParameters = {\n properties?: Record<\n string,\n | { title: Array<RichTextItemRequest>; type?: \"title\" }\n | { rich_text: Array<RichTextItemRequest>; type?: \"rich_text\" }\n | { number: number | null; type?: \"number\" }\n | { url: TextRequest | null; type?: \"url\" }\n | {\n select:\n | {\n id: StringRequest\n name?: TextRequest\n color?: SelectColor\n description?: TextRequest | null\n }\n | {\n name: TextRequest\n id?: StringRequest\n color?: SelectColor\n description?: TextRequest | null\n }\n | null\n type?: \"select\"\n }\n | {\n multi_select: Array<\n | {\n id: StringRequest\n name?: TextRequest\n color?: SelectColor\n description?: TextRequest | null\n }\n | {\n name: TextRequest\n id?: StringRequest\n color?: SelectColor\n description?: TextRequest | null\n }\n >\n type?: \"multi_select\"\n }\n | {\n people: Array<PartialUserObjectRequest | GroupObjectRequest>\n type?: \"people\"\n }\n | { email: StringRequest | null; type?: \"email\" }\n | { phone_number: StringRequest | null; type?: \"phone_number\" }\n | { date: DateRequest | null; type?: \"date\" }\n | { checkbox: boolean; type?: \"checkbox\" }\n | { relation: Array<RelationItemPropertyValueResponse>; type?: \"relation\" }\n | {\n files: Array<\n | InternalOrExternalFileWithNameRequest\n | FileUploadWithOptionalNameRequest\n >\n type?: \"files\"\n }\n | {\n status:\n | {\n id: StringRequest\n name?: TextRequest\n color?: SelectColor\n description?: TextRequest | null\n }\n | {\n name: TextRequest\n id?: StringRequest\n color?: SelectColor\n description?: TextRequest | null\n }\n | null\n type?: \"status\"\n }\n | {\n place: {\n lat: number\n lon: number\n name?: string | null\n address?: string | null\n aws_place_id?: string | null\n google_place_id?: string | null\n } | null\n type?: \"place\"\n }\n >\n icon?: PageIconRequest | null\n cover?: PageCoverRequest | null\n // Whether the page should be locked from editing in the Notion app UI. If not provided,\n // the locked state will not be updated.\n is_locked?: boolean\n template?:\n | { type: \"default\" }\n | { type: \"template_id\"; template_id: IdRequest }\n // Whether to erase all existing content from the page. When used with a template, the\n // template content replaces the existing content. When used without a template, simply\n // clears the page content.\n erase_content?: boolean\n archived?: boolean\n in_trash?: boolean\n}\n\nexport type UpdatePageParameters = UpdatePagePathParameters &\n UpdatePageBodyParameters\n\nexport type UpdatePageResponse = PageObjectResponse | PartialPageObjectResponse\n\n/**\n * Update page properties\n */\nexport const updatePage = {\n method: \"patch\",\n pathParams: [\"page_id\"],\n queryParams: [],\n bodyParams: [\n \"properties\",\n \"icon\",\n \"cover\",\n \"is_locked\",\n \"template\",\n \"erase_content\",\n \"archived\",\n \"in_trash\",\n ],\n\n path: (p: UpdatePagePathParameters): string => `pages/${p.page_id}`,\n} as const\n\ntype GetPagePropertyPathParameters = {\n page_id: IdRequest\n property_id: string\n}\n\ntype GetPagePropertyQueryParameters = {\n start_cursor?: string\n page_size?: number\n}\n\nexport type GetPagePropertyParameters = GetPagePropertyPathParameters &\n GetPagePropertyQueryParameters\n\nexport type GetPagePropertyResponse =\n | PropertyItemObjectResponse\n | PropertyItemListResponse\n\n/**\n * Retrieve a page property item\n */\nexport const getPageProperty = {\n method: \"get\",\n pathParams: [\"page_id\", \"property_id\"],\n queryParams: [\"start_cursor\", \"page_size\"],\n bodyParams: [],\n\n path: (p: GetPagePropertyPathParameters): string =>\n `pages/${p.page_id}/properties/${p.property_id}`,\n} as const\n\ntype GetBlockPathParameters = {\n block_id: IdRequest\n}\n\nexport type GetBlockParameters = GetBlockPathParameters\n\nexport type GetBlockResponse = PartialBlockObjectResponse | BlockObjectResponse\n\n/**\n * Retrieve a block\n */\nexport const getBlock = {\n method: \"get\",\n pathParams: [\"block_id\"],\n queryParams: [],\n bodyParams: [],\n\n path: (p: GetBlockPathParameters): string => `blocks/${p.block_id}`,\n} as const\n\ntype UpdateBlockPathParameters = {\n block_id: IdRequest\n}\n\ntype UpdateBlockBodyParameters =\n | {\n embed: UpdateMediaContentWithUrlAndCaptionRequest\n type?: \"embed\"\n archived?: boolean\n in_trash?: boolean\n }\n | {\n bookmark: UpdateMediaContentWithUrlAndCaptionRequest\n type?: \"bookmark\"\n archived?: boolean\n in_trash?: boolean\n }\n | {\n image: UpdateMediaContentWithFileAndCaptionRequest\n type?: \"image\"\n archived?: boolean\n in_trash?: boolean\n }\n | {\n video: UpdateMediaContentWithFileAndCaptionRequest\n type?: \"video\"\n archived?: boolean\n in_trash?: boolean\n }\n | {\n pdf: UpdateMediaContentWithFileAndCaptionRequest\n type?: \"pdf\"\n archived?: boolean\n in_trash?: boolean\n }\n | {\n file: UpdateMediaContentWithFileNameAndCaptionRequest\n type?: \"file\"\n archived?: boolean\n in_trash?: boolean\n }\n | {\n audio: UpdateMediaContentWithFileAndCaptionRequest\n type?: \"audio\"\n archived?: boolean\n in_trash?: boolean\n }\n | {\n code: {\n rich_text?: Array<RichTextItemRequest>\n language?: LanguageRequest\n caption?: Array<RichTextItemRequest>\n }\n type?: \"code\"\n archived?: boolean\n in_trash?: boolean\n }\n | {\n equation: ContentWithExpressionRequest\n type?: \"equation\"\n archived?: boolean\n in_trash?: boolean\n }\n | {\n divider: EmptyObject\n type?: \"divider\"\n archived?: boolean\n in_trash?: boolean\n }\n | {\n breadcrumb: EmptyObject\n type?: \"breadcrumb\"\n archived?: boolean\n in_trash?: boolean\n }\n | {\n table_of_contents: { color?: ApiColor }\n type?: \"table_of_contents\"\n archived?: boolean\n in_trash?: boolean\n }\n | {\n link_to_page:\n | { page_id: IdRequest; type?: \"page_id\" }\n | { database_id: IdRequest; type?: \"database_id\" }\n | { comment_id: IdRequest; type?: \"comment_id\" }\n type?: \"link_to_page\"\n archived?: boolean\n in_trash?: boolean\n }\n | {\n table_row: ContentWithTableRowRequest\n type?: \"table_row\"\n archived?: boolean\n in_trash?: boolean\n }\n | {\n heading_1: HeaderContentWithRichTextAndColorRequest\n type?: \"heading_1\"\n archived?: boolean\n in_trash?: boolean\n }\n | {\n heading_2: HeaderContentWithRichTextAndColorRequest\n type?: \"heading_2\"\n archived?: boolean\n in_trash?: boolean\n }\n | {\n heading_3: HeaderContentWithRichTextAndColorRequest\n type?: \"heading_3\"\n archived?: boolean\n in_trash?: boolean\n }\n | {\n paragraph: ContentWithRichTextAndColorRequest\n type?: \"paragraph\"\n archived?: boolean\n in_trash?: boolean\n }\n | {\n bulleted_list_item: ContentWithRichTextAndColorRequest\n type?: \"bulleted_list_item\"\n archived?: boolean\n in_trash?: boolean\n }\n | {\n numbered_list_item: ContentWithRichTextAndColorRequest\n type?: \"numbered_list_item\"\n archived?: boolean\n in_trash?: boolean\n }\n | {\n quote: ContentWithRichTextAndColorRequest\n type?: \"quote\"\n archived?: boolean\n in_trash?: boolean\n }\n | {\n to_do: {\n rich_text?: Array<RichTextItemRequest>\n checked?: boolean\n color?: ApiColor\n }\n type?: \"to_do\"\n archived?: boolean\n in_trash?: boolean\n }\n | {\n toggle: ContentWithRichTextAndColorRequest\n type?: \"toggle\"\n archived?: boolean\n in_trash?: boolean\n }\n | {\n template: ContentWithRichTextRequest\n type?: \"template\"\n archived?: boolean\n in_trash?: boolean\n }\n | {\n callout: {\n rich_text?: Array<RichTextItemRequest>\n icon?: PageIconRequest\n color?: ApiColor\n }\n type?: \"callout\"\n archived?: boolean\n in_trash?: boolean\n }\n | {\n synced_block: {\n synced_from: { block_id: IdRequest; type?: \"block_id\" } | null\n }\n type?: \"synced_block\"\n archived?: boolean\n in_trash?: boolean\n }\n | {\n table: { has_column_header?: boolean; has_row_header?: boolean }\n type?: \"table\"\n archived?: boolean\n in_trash?: boolean\n }\n | {\n column: {\n // Ratio between 0 and 1 of the width of this column relative to all columns in the list.\n // If not provided, uses an equal width.\n width_ratio?: number\n }\n type?: \"column\"\n archived?: boolean\n in_trash?: boolean\n }\n | { archived?: boolean; in_trash?: boolean }\n\nexport type UpdateBlockParameters = UpdateBlockPathParameters &\n UpdateBlockBodyParameters\n\nexport type UpdateBlockResponse =\n | PartialBlockObjectResponse\n | BlockObjectResponse\n\n/**\n * Update a block\n */\nexport const updateBlock = {\n method: \"patch\",\n pathParams: [\"block_id\"],\n queryParams: [],\n bodyParams: [\n \"embed\",\n \"type\",\n \"archived\",\n \"in_trash\",\n \"bookmark\",\n \"image\",\n \"video\",\n \"pdf\",\n \"file\",\n \"audio\",\n \"code\",\n \"equation\",\n \"divider\",\n \"breadcrumb\",\n \"table_of_contents\",\n \"link_to_page\",\n \"table_row\",\n \"heading_1\",\n \"heading_2\",\n \"heading_3\",\n \"paragraph\",\n \"bulleted_list_item\",\n \"numbered_list_item\",\n \"quote\",\n \"to_do\",\n \"toggle\",\n \"template\",\n \"callout\",\n \"synced_block\",\n \"table\",\n \"column\",\n ],\n\n path: (p: UpdateBlockPathParameters): string => `blocks/${p.block_id}`,\n} as const\n\ntype DeleteBlockPathParameters = {\n block_id: IdRequest\n}\n\nexport type DeleteBlockParameters = DeleteBlockPathParameters\n\nexport type DeleteBlockResponse =\n | PartialBlockObjectResponse\n | BlockObjectResponse\n\n/**\n * Delete a block\n */\nexport const deleteBlock = {\n method: \"delete\",\n pathParams: [\"block_id\"],\n queryParams: [],\n bodyParams: [],\n\n path: (p: DeleteBlockPathParameters): string => `blocks/${p.block_id}`,\n} as const\n\ntype ListBlockChildrenPathParameters = {\n block_id: IdRequest\n}\n\ntype ListBlockChildrenQueryParameters = {\n start_cursor?: string\n page_size?: number\n}\n\nexport type ListBlockChildrenParameters = ListBlockChildrenPathParameters &\n ListBlockChildrenQueryParameters\n\nexport type ListBlockChildrenResponse = {\n type: \"block\"\n block: EmptyObject\n object: \"list\"\n next_cursor: string | null\n has_more: boolean\n results: Array<PartialBlockObjectResponse | BlockObjectResponse>\n}\n\n/**\n * Retrieve block children\n */\nexport const listBlockChildren = {\n method: \"get\",\n pathParams: [\"block_id\"],\n queryParams: [\"start_cursor\", \"page_size\"],\n bodyParams: [],\n\n path: (p: ListBlockChildrenPathParameters): string =>\n `blocks/${p.block_id}/children`,\n} as const\n\ntype AppendBlockChildrenPathParameters = {\n block_id: IdRequest\n}\n\ntype AppendBlockChildrenBodyParameters = {\n children: Array<BlockObjectRequest>\n after?: IdRequest\n position?: ContentPositionSchema\n}\n\nexport type AppendBlockChildrenParameters = AppendBlockChildrenPathParameters &\n AppendBlockChildrenBodyParameters\n\nexport type AppendBlockChildrenResponse = {\n type: \"block\"\n block: EmptyObject\n object: \"list\"\n next_cursor: string | null\n has_more: boolean\n results: Array<PartialBlockObjectResponse | BlockObjectResponse>\n}\n\n/**\n * Append block children\n */\nexport const appendBlockChildren = {\n method: \"patch\",\n pathParams: [\"block_id\"],\n queryParams: [],\n bodyParams: [\"children\", \"after\", \"position\"],\n\n path: (p: AppendBlockChildrenPathParameters): string =>\n `blocks/${p.block_id}/children`,\n} as const\n\ntype GetDataSourcePathParameters = {\n // ID of a Notion data source.\n data_source_id: IdRequest\n}\n\nexport type GetDataSourceParameters = GetDataSourcePathParameters\n\nexport type GetDataSourceResponse =\n | PartialDataSourceObjectResponse\n | DataSourceObjectResponse\n\n/**\n * Retrieve a data source\n */\nexport const getDataSource = {\n method: \"get\",\n pathParams: [\"data_source_id\"],\n queryParams: [],\n bodyParams: [],\n\n path: (p: GetDataSourcePathParameters): string =>\n `data_sources/${p.data_source_id}`,\n} as const\n\ntype UpdateDataSourcePathParameters = {\n // ID of a Notion data source.\n data_source_id: IdRequest\n}\n\ntype UpdateDataSourceBodyParameters = {\n // Title of data source as it appears in Notion.\n title?: Array<RichTextItemRequest>\n // Page icon.\n icon?: PageIconRequest | null\n // The property schema of the data source. The keys are property names or IDs, and the\n // values are property configuration objects. Properties set to null will be removed.\n properties?: Record<\n string,\n | ({\n // The name of the property.\n name?: string\n // The description of the property.\n description?: PropertyDescriptionRequest | null\n } & (\n | {\n // Always `number`\n type?: \"number\"\n number: { format?: NumberFormat }\n }\n | {\n // Always `formula`\n type?: \"formula\"\n formula: { expression?: string }\n }\n | {\n // Always `select`\n type?: \"select\"\n select: {\n options?: Array<\n { color?: SelectColor; description?: string | null } & (\n | { name: string; id?: string }\n | { id: string; name?: string }\n )\n >\n }\n }\n | {\n // Always `multi_select`\n type?: \"multi_select\"\n multi_select: {\n options?: Array<\n { color?: SelectColor; description?: string | null } & (\n | { name: string; id?: string }\n | { id: string; name?: string }\n )\n >\n }\n }\n | {\n // Always `status`\n type?: \"status\"\n status: EmptyObject\n }\n | {\n // Always `relation`\n type?: \"relation\"\n relation: { data_source_id: IdRequest } & (\n | {\n // Always `single_property`\n type?: \"single_property\"\n single_property: EmptyObject\n }\n | {\n // Always `dual_property`\n type?: \"dual_property\"\n dual_property: {\n synced_property_id?: string\n synced_property_name?: string\n }\n }\n )\n }\n | {\n // Always `rollup`\n type?: \"rollup\"\n rollup: {\n // The function to use for the rollup, e.g. count, count_values, percent_not_empty, max.\n function: RollupFunction\n } & (\n | { relation_property_name: string; rollup_property_name: string }\n | { relation_property_id: string; rollup_property_name: string }\n | { relation_property_name: string; rollup_property_id: string }\n | { relation_property_id: string; rollup_property_id: string }\n )\n }\n | {\n // Always `unique_id`\n type?: \"unique_id\"\n unique_id: { prefix?: string | null }\n }\n | {\n // Always `title`\n type?: \"title\"\n title: EmptyObject\n }\n | {\n // Always `rich_text`\n type?: \"rich_text\"\n rich_text: EmptyObject\n }\n | {\n // Always `url`\n type?: \"url\"\n url: EmptyObject\n }\n | {\n // Always `people`\n type?: \"people\"\n people: EmptyObject\n }\n | {\n // Always `files`\n type?: \"files\"\n files: EmptyObject\n }\n | {\n // Always `email`\n type?: \"email\"\n email: EmptyObject\n }\n | {\n // Always `phone_number`\n type?: \"phone_number\"\n phone_number: EmptyObject\n }\n | {\n // Always `date`\n type?: \"date\"\n date: EmptyObject\n }\n | {\n // Always `checkbox`\n type?: \"checkbox\"\n checkbox: EmptyObject\n }\n | {\n // Always `created_by`\n type?: \"created_by\"\n created_by: EmptyObject\n }\n | {\n // Always `created_time`\n type?: \"created_time\"\n created_time: EmptyObject\n }\n | {\n // Always `last_edited_by`\n type?: \"last_edited_by\"\n last_edited_by: EmptyObject\n }\n | {\n // Always `last_edited_time`\n type?: \"last_edited_time\"\n last_edited_time: EmptyObject\n }\n | {\n // Always `place`\n type?: \"place\"\n place: EmptyObject\n }\n ))\n | {\n // The new name of the property.\n name: string\n }\n | null\n >\n // Whether the database should be moved to or from the trash. If not provided, the trash\n // status will not be updated.\n in_trash?: boolean\n // Whether the database should be moved to or from the trash. If not provided, the trash\n // status will not be updated. Equivalent to `in_trash`.\n archived?: boolean\n // The parent of the data source, when moving it to a different database. If not\n // provided, the parent will not be updated.\n parent?: ParentOfDataSourceRequest\n}\n\nexport type UpdateDataSourceParameters = UpdateDataSourcePathParameters &\n UpdateDataSourceBodyParameters\n\nexport type UpdateDataSourceResponse =\n | PartialDataSourceObjectResponse\n | DataSourceObjectResponse\n\n/**\n * Update a data source\n */\nexport const updateDataSource = {\n method: \"patch\",\n pathParams: [\"data_source_id\"],\n queryParams: [],\n bodyParams: [\"title\", \"icon\", \"properties\", \"in_trash\", \"archived\", \"parent\"],\n\n path: (p: UpdateDataSourcePathParameters): string =>\n `data_sources/${p.data_source_id}`,\n} as const\n\ntype QueryDataSourcePathParameters = {\n data_source_id: IdRequest\n}\n\ntype QueryDataSourceQueryParameters = {\n filter_properties?: Array<string>\n}\n\ntype QueryDataSourceBodyParameters = {\n sorts?: Array<\n | { property: string; direction: \"ascending\" | \"descending\" }\n | {\n timestamp: \"created_time\" | \"last_edited_time\"\n direction: \"ascending\" | \"descending\"\n }\n >\n filter?:\n | { or: GroupFilterOperatorArray }\n | { and: GroupFilterOperatorArray }\n | PropertyFilter\n | TimestampFilter\n start_cursor?: string\n page_size?: number\n archived?: boolean\n in_trash?: boolean\n // Optionally filter the results to only include pages or data sources. Regular, non-wiki\n // databases only support page children. The default behavior is no result type\n // filtering, in other words, returning both pages and data sources for wikis.\n result_type?: \"page\" | \"data_source\"\n}\n\nexport type QueryDataSourceParameters = QueryDataSourcePathParameters &\n QueryDataSourceQueryParameters &\n QueryDataSourceBodyParameters\n\nexport type QueryDataSourceResponse = {\n type: \"page_or_data_source\"\n page_or_data_source: EmptyObject\n object: \"list\"\n next_cursor: string | null\n has_more: boolean\n results: Array<\n | PageObjectResponse\n | PartialPageObjectResponse\n | PartialDataSourceObjectResponse\n | DataSourceObjectResponse\n >\n}\n\n/**\n * Query a data source\n */\nexport const queryDataSource = {\n method: \"post\",\n pathParams: [\"data_source_id\"],\n queryParams: [\"filter_properties\"],\n bodyParams: [\n \"sorts\",\n \"filter\",\n \"start_cursor\",\n \"page_size\",\n \"archived\",\n \"in_trash\",\n \"result_type\",\n ],\n\n path: (p: QueryDataSourcePathParameters): string =>\n `data_sources/${p.data_source_id}/query`,\n} as const\n\ntype CreateDataSourceBodyParameters = {\n // An object specifying the parent of the new data source to be created.\n parent: ParentOfDataSourceRequest\n // Property schema of data source.\n properties: Record<string, PropertyConfigurationRequest>\n // Title of data source as it appears in Notion.\n title?: Array<RichTextItemRequest>\n // Page icon.\n icon?: PageIconRequest | null\n}\n\nexport type CreateDataSourceParameters = CreateDataSourceBodyParameters\n\nexport type CreateDataSourceResponse =\n | PartialDataSourceObjectResponse\n | DataSourceObjectResponse\n\n/**\n * Create a data source\n */\nexport const createDataSource = {\n method: \"post\",\n pathParams: [],\n queryParams: [],\n bodyParams: [\"parent\", \"properties\", \"title\", \"icon\"],\n\n path: (): string => `data_sources`,\n} as const\n\ntype ListDataSourceTemplatesPathParameters = {\n // ID of a Notion data source.\n data_source_id: IdRequest\n}\n\ntype ListDataSourceTemplatesQueryParameters = {\n // Filter templates by name (case-insensitive substring match).\n name?: string\n // If supplied, this endpoint will return a page of results starting after the cursor\n // provided. If not supplied, this endpoint will return the first page of results.\n start_cursor?: string\n // The number of items from the full list desired in the response. Maximum: 100\n page_size?: number\n}\n\nexport type ListDataSourceTemplatesParameters =\n ListDataSourceTemplatesPathParameters & ListDataSourceTemplatesQueryParameters\n\nexport type ListDataSourceTemplatesResponse = {\n // Array of templates available in this data source.\n templates: Array<{\n // ID of the template page.\n id: IdResponse\n // Name of the template.\n name: string\n // Whether this template is the default template for the data source.\n is_default: boolean\n }>\n // Whether there are more templates available beyond this page.\n has_more: boolean\n // Cursor to use for the next page of results. Null if there are no more results.\n next_cursor: IdResponse | null\n}\n\n/**\n * List templates in a data source\n */\nexport const listDataSourceTemplates = {\n method: \"get\",\n pathParams: [\"data_source_id\"],\n queryParams: [\"name\", \"start_cursor\", \"page_size\"],\n bodyParams: [],\n\n path: (p: ListDataSourceTemplatesPathParameters): string =>\n `data_sources/${p.data_source_id}/templates`,\n} as const\n\ntype GetDatabasePathParameters = {\n // ID of a Notion database, a container for one or more data sources.\n database_id: IdRequest\n}\n\nexport type GetDatabaseParameters = GetDatabasePathParameters\n\nexport type GetDatabaseResponse =\n | PartialDatabaseObjectResponse\n | DatabaseObjectResponse\n\n/**\n * Retrieve a database\n */\nexport const getDatabase = {\n method: \"get\",\n pathParams: [\"database_id\"],\n queryParams: [],\n bodyParams: [],\n\n path: (p: GetDatabasePathParameters): string => `databases/${p.database_id}`,\n} as const\n\ntype UpdateDatabasePathParameters = {\n // ID of a Notion database, a container for one or more data sources.\n database_id: IdRequest\n}\n\ntype UpdateDatabaseBodyParameters = {\n // The parent page or workspace to move the database to. If not provided, the database\n // will not be moved.\n parent?: {\n // The type of parent.\n type: \"page_id\" | \"workspace\"\n } & (\n | {\n // Always `page_id`\n type: \"page_id\"\n page_id: IdRequest\n }\n | {\n // Always `workspace`\n type: \"workspace\"\n // Always `true`\n workspace: true\n }\n )\n // The updated title of the database, if any. If not provided, the title will not be\n // updated.\n title?: Array<RichTextItemRequest>\n // The updated description of the database, if any. If not provided, the description will\n // not be updated.\n description?: Array<RichTextItemRequest>\n // Whether the database should be displayed inline in the parent page. If not provided,\n // the inline status will not be updated.\n is_inline?: boolean\n // The updated icon for the database, if any. If not provided, the icon will not be\n // updated.\n icon?: PageIconRequest\n // The updated cover image for the database, if any. If not provided, the cover will not\n // be updated.\n cover?: PageCoverRequest\n // Whether the database should be moved to or from the trash. If not provided, the trash\n // status will not be updated.\n in_trash?: boolean\n // Whether the database should be locked from editing in the Notion app UI. If not\n // provided, the locked state will not be updated.\n is_locked?: boolean\n}\n\nexport type UpdateDatabaseParameters = UpdateDatabasePathParameters &\n UpdateDatabaseBodyParameters\n\nexport type UpdateDatabaseResponse =\n | PartialDatabaseObjectResponse\n | DatabaseObjectResponse\n\n/**\n * Update a database\n */\nexport const updateDatabase = {\n method: \"patch\",\n pathParams: [\"database_id\"],\n queryParams: [],\n bodyParams: [\n \"parent\",\n \"title\",\n \"description\",\n \"is_inline\",\n \"icon\",\n \"cover\",\n \"in_trash\",\n \"is_locked\",\n ],\n\n path: (p: UpdateDatabasePathParameters): string =>\n `databases/${p.database_id}`,\n} as const\n\ntype CreateDatabaseBodyParameters = {\n // The parent page or workspace where the database will be created.\n parent: {\n // The type of parent.\n type: \"page_id\" | \"workspace\"\n } & (\n | {\n // Always `page_id`\n type: \"page_id\"\n page_id: IdRequest\n }\n | {\n // Always `workspace`\n type: \"workspace\"\n // Always `true`\n workspace: true\n }\n )\n // The title of the database.\n title?: Array<RichTextItemRequest>\n // The description of the database.\n description?: Array<RichTextItemRequest>\n // Whether the database should be displayed inline in the parent page. Defaults to false.\n is_inline?: boolean\n // Initial data source configuration for the database.\n initial_data_source?: InitialDataSourceRequest\n // The icon for the database.\n icon?: PageIconRequest\n // The cover image for the database.\n cover?: PageCoverRequest\n}\n\nexport type CreateDatabaseParameters = CreateDatabaseBodyParameters\n\nexport type CreateDatabaseResponse =\n | PartialDatabaseObjectResponse\n | DatabaseObjectResponse\n\n/**\n * Create a database\n */\nexport const createDatabase = {\n method: \"post\",\n pathParams: [],\n queryParams: [],\n bodyParams: [\n \"parent\",\n \"title\",\n \"description\",\n \"is_inline\",\n \"initial_data_source\",\n \"icon\",\n \"cover\",\n ],\n\n path: (): string => `databases`,\n} as const\n\ntype SearchBodyParameters = {\n sort?: {\n timestamp: \"last_edited_time\"\n direction: \"ascending\" | \"descending\"\n }\n query?: string\n start_cursor?: string\n page_size?: number\n filter?: { property: \"object\"; value: \"page\" | \"data_source\" }\n}\n\nexport type SearchParameters = SearchBodyParameters\n\nexport type SearchResponse = {\n type: \"page_or_data_source\"\n page_or_data_source: EmptyObject\n object: \"list\"\n next_cursor: string | null\n has_more: boolean\n results: Array<\n | PageObjectResponse\n | PartialPageObjectResponse\n | PartialDataSourceObjectResponse\n | DataSourceObjectResponse\n >\n}\n\n/**\n * Search by title\n */\nexport const search = {\n method: \"post\",\n pathParams: [],\n queryParams: [],\n bodyParams: [\"sort\", \"query\", \"start_cursor\", \"page_size\", \"filter\"],\n\n path: (): string => `search`,\n} as const\n\ntype CreateCommentBodyParameters = {\n // An array of rich text objects that represent the content of the comment.\n rich_text: Array<RichTextItemRequest>\n // An array of files to attach to the comment. Maximum of 3 allowed.\n attachments?: Array<{\n // ID of a FileUpload object that has the status `uploaded`.\n file_upload_id: string\n // Always `file_upload`\n type?: \"file_upload\"\n }>\n // Display name for the comment.\n display_name?:\n | {\n // Always `integration`\n type: \"integration\"\n }\n | {\n // Always `user`\n type: \"user\"\n }\n | {\n // Always `custom`\n type: \"custom\"\n custom: {\n // The custom display name to use\n name: string\n }\n }\n} & (\n | {\n // The parent of the comment. This can be a page or a block.\n parent:\n | {\n // The ID of the parent page (with or without dashes), for example,\n // 195de9221179449fab8075a27c979105\n page_id: IdRequest\n // Always `page_id`\n type?: \"page_id\"\n }\n | {\n // The ID of the parent block (with or without dashes), for example,\n // 195de9221179449fab8075a27c979105\n block_id: IdRequest\n // Always `block_id`\n type?: \"block_id\"\n }\n }\n | {\n // The ID of the discussion to comment on.\n discussion_id: IdRequest\n }\n)\n\nexport type CreateCommentParameters = CreateCommentBodyParameters\n\nexport type CreateCommentResponse =\n | PartialCommentObjectResponse\n | CommentObjectResponse\n\n/**\n * Create a comment\n */\nexport const createComment = {\n method: \"post\",\n pathParams: [],\n queryParams: [],\n bodyParams: [\n \"rich_text\",\n \"attachments\",\n \"display_name\",\n \"parent\",\n \"discussion_id\",\n ],\n\n path: (): string => `comments`,\n} as const\n\ntype ListCommentsQueryParameters = {\n // Identifier for a Notion block or page.\n block_id: IdRequest\n // If supplied, this endpoint will return a page of results starting after the cursor\n // provided. If not supplied, this endpoint will return the first page of results.\n start_cursor?: string\n // The number of items from the full list desired in the response. Maximum: 100\n page_size?: number\n}\n\nexport type ListCommentsParameters = ListCommentsQueryParameters\n\nexport type ListCommentsResponse = {\n // Always `list`\n object: \"list\"\n next_cursor: IdResponse | null\n has_more: boolean\n results: Array<CommentObjectResponse>\n // Always `comment`\n type: \"comment\"\n comment: EmptyObject\n}\n\n/**\n * List comments\n */\nexport const listComments = {\n method: \"get\",\n pathParams: [],\n queryParams: [\"block_id\", \"start_cursor\", \"page_size\"],\n bodyParams: [],\n\n path: (): string => `comments`,\n} as const\n\ntype GetCommentPathParameters = {\n // The ID of the comment to retrieve.\n comment_id: IdRequest\n}\n\nexport type GetCommentParameters = GetCommentPathParameters\n\nexport type GetCommentResponse =\n | PartialCommentObjectResponse\n | CommentObjectResponse\n\n/**\n * Retrieve a comment\n */\nexport const getComment = {\n method: \"get\",\n pathParams: [\"comment_id\"],\n queryParams: [],\n bodyParams: [],\n\n path: (p: GetCommentPathParameters): string => `comments/${p.comment_id}`,\n} as const\n\ntype CreateFileUploadBodyParameters = {\n // How the file is being sent. Use `multi_part` for files larger than 20MB. Use\n // `external_url` for files that are temporarily hosted publicly elsewhere. Default is\n // `single_part`.\n mode?: \"single_part\" | \"multi_part\" | \"external_url\"\n // Name of the file to be created. Required when `mode` is `multi_part`. Otherwise\n // optional, and used to override the filename. Must include an extension, or have one\n // inferred from the `content_type` parameter.\n filename?: string\n // MIME type of the file to be created. Recommended when sending the file in multiple\n // parts. Must match the content type of the file that's sent, and the extension of the\n // `filename` parameter if any.\n content_type?: string\n // When `mode` is `multi_part`, the number of parts you are uploading. This must match\n // the number of parts as well as the final `part_number` you send.\n number_of_parts?: number\n // When `mode` is `external_url`, provide the HTTPS URL of a publicly accessible file to\n // import into your workspace.\n external_url?: string\n}\n\nexport type CreateFileUploadParameters = CreateFileUploadBodyParameters\n\nexport type CreateFileUploadResponse = FileUploadObjectResponse\n\n/**\n * Create a file upload\n */\nexport const createFileUpload = {\n method: \"post\",\n pathParams: [],\n queryParams: [],\n bodyParams: [\n \"mode\",\n \"filename\",\n \"content_type\",\n \"number_of_parts\",\n \"external_url\",\n ],\n\n path: (): string => `file_uploads`,\n} as const\n\ntype ListFileUploadsQueryParameters = {\n // If supplied, the endpoint will return file uploads with the specified status.\n status?: \"pending\" | \"uploaded\" | \"expired\" | \"failed\"\n // If supplied, this endpoint will return a page of results starting after the cursor\n // provided. If not supplied, this endpoint will return the first page of results.\n start_cursor?: string\n // The number of items from the full list desired in the response. Maximum: 100\n page_size?: number\n}\n\nexport type ListFileUploadsParameters = ListFileUploadsQueryParameters\n\nexport type ListFileUploadsResponse = {\n // Always `list`\n object: \"list\"\n next_cursor: IdResponse | null\n has_more: boolean\n results: Array<FileUploadObjectResponse>\n // Always `file_upload`\n type: \"file_upload\"\n file_upload: EmptyObject\n}\n\n/**\n * List file uploads\n */\nexport const listFileUploads = {\n method: \"get\",\n pathParams: [],\n queryParams: [\"status\", \"start_cursor\", \"page_size\"],\n bodyParams: [],\n\n path: (): string => `file_uploads`,\n} as const\n\ntype SendFileUploadPathParameters = {\n // Identifier for a Notion file upload object.\n file_upload_id: IdRequest\n}\n\ntype SendFileUploadFormDataParameters = {\n file: { filename?: string; data: string | Blob }\n part_number?: string\n}\n\nexport type SendFileUploadParameters = SendFileUploadPathParameters &\n SendFileUploadFormDataParameters\n\nexport type SendFileUploadResponse = FileUploadObjectResponse\n\n/**\n * Upload a file\n */\nexport const sendFileUpload = {\n method: \"post\",\n pathParams: [\"file_upload_id\"],\n queryParams: [],\n bodyParams: [],\n formDataParams: [\"file\", \"part_number\"],\n path: (p: SendFileUploadPathParameters): string =>\n `file_uploads/${p.file_upload_id}/send`,\n} as const\n\ntype CompleteFileUploadPathParameters = {\n // Identifier for a Notion file upload object.\n file_upload_id: IdRequest\n}\n\nexport type CompleteFileUploadParameters = CompleteFileUploadPathParameters\n\nexport type CompleteFileUploadResponse = FileUploadObjectResponse\n\n/**\n * Complete a multi-part file upload\n */\nexport const completeFileUpload = {\n method: \"post\",\n pathParams: [\"file_upload_id\"],\n queryParams: [],\n bodyParams: [],\n\n path: (p: CompleteFileUploadPathParameters): string =>\n `file_uploads/${p.file_upload_id}/complete`,\n} as const\n\ntype GetFileUploadPathParameters = {\n // Identifier for a Notion file upload object.\n file_upload_id: IdRequest\n}\n\nexport type GetFileUploadParameters = GetFileUploadPathParameters\n\nexport type GetFileUploadResponse = FileUploadObjectResponse\n\n/**\n * Retrieve a file upload\n */\nexport const getFileUpload = {\n method: \"get\",\n pathParams: [\"file_upload_id\"],\n queryParams: [],\n bodyParams: [],\n\n path: (p: GetFileUploadPathParameters): string =>\n `file_uploads/${p.file_upload_id}`,\n} as const\n\ntype OauthTokenBodyParameters =\n | {\n grant_type: \"authorization_code\"\n code: string\n redirect_uri?: string\n external_account?: { key: string; name: string }\n }\n | { grant_type: \"refresh_token\"; refresh_token: string }\n\nexport type OauthTokenParameters = OauthTokenBodyParameters\n\nexport type OauthTokenResponse = {\n access_token: string\n token_type: \"bearer\"\n refresh_token: string | null\n bot_id: string\n workspace_icon: string | null\n workspace_name: string | null\n workspace_id: string\n owner:\n | {\n type: \"user\"\n user:\n | {\n type: \"person\"\n person: { email: string }\n name: string | null\n avatar_url: string | null\n id: IdRequest\n object: \"user\"\n }\n | PartialUserObjectResponse\n }\n | { type: \"workspace\"; workspace: true }\n duplicated_template_id: string | null\n request_id?: string\n}\n\n/**\n * Exchange an authorization code for an access and refresh token\n */\nexport const oauthToken = {\n method: \"post\",\n pathParams: [],\n queryParams: [],\n bodyParams: [\n \"grant_type\",\n \"code\",\n \"redirect_uri\",\n \"external_account\",\n \"refresh_token\",\n ],\n\n path: (): string => `oauth/token`,\n} as const\n\ntype OauthRevokeBodyParameters = { token: string }\n\nexport type OauthRevokeParameters = OauthRevokeBodyParameters\n\nexport type OauthRevokeResponse = { request_id?: string }\n\n/**\n * Revoke a token\n */\nexport const oauthRevoke = {\n method: \"post\",\n pathParams: [],\n queryParams: [],\n bodyParams: [\"token\"],\n\n path: (): string => `oauth/revoke`,\n} as const\n\ntype OauthIntrospectBodyParameters = { token: string }\n\nexport type OauthIntrospectParameters = OauthIntrospectBodyParameters\n\nexport type OauthIntrospectResponse = {\n active: boolean\n scope?: string\n iat?: number\n request_id?: string\n}\n\n/**\n * Introspect a token\n */\nexport const oauthIntrospect = {\n method: \"post\",\n pathParams: [],\n queryParams: [],\n bodyParams: [\"token\"],\n\n path: (): string => `oauth/introspect`,\n} as const\n\ntype MovePagePathParameters = {\n // The ID of the page to move.\n page_id: IdRequest\n}\n\ntype MovePageBodyParameters = {\n // The new parent of the page.\n parent:\n | {\n // The ID of the parent page (with or without dashes), for example,\n // 195de9221179449fab8075a27c979105\n page_id: IdRequest\n // Always `page_id`\n type?: \"page_id\"\n }\n | {\n // The ID of the parent data source (collection), with or without dashes. For example,\n // f336d0bc-b841-465b-8045-024475c079dd\n data_source_id: IdRequest\n // Always `data_source_id`\n type?: \"data_source_id\"\n }\n}\n\nexport type MovePageParameters = MovePagePathParameters & MovePageBodyParameters\n\nexport type MovePageResponse = PartialPageObjectResponse | PageObjectResponse\n\n/**\n * Move a page\n */\nexport const movePage = {\n method: \"post\",\n pathParams: [\"page_id\"],\n queryParams: [],\n bodyParams: [\"parent\"],\n\n path: (p: MovePagePathParameters): string => `pages/${p.page_id}/move`,\n} as const\n","{\n \"name\": \"@notionhq/client\",\n \"version\": \"5.9.0\",\n \"description\": \"A simple and easy to use client for the Notion API\",\n \"engines\": {\n \"node\": \">=18\"\n },\n \"homepage\": \"https://developers.notion.com/docs/getting-started\",\n \"bugs\": {\n \"url\": \"https://github.com/makenotion/notion-sdk-js/issues\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/makenotion/notion-sdk-js/\"\n },\n \"keywords\": [\n \"notion\",\n \"notionapi\",\n \"rest\",\n \"notion-api\"\n ],\n \"main\": \"./build/src\",\n \"types\": \"./build/src/index.d.ts\",\n \"scripts\": {\n \"prepare\": \"husky && npm run build\",\n \"prepublishOnly\": \"npm run checkLoggedIn && npm run lint && npm run test\",\n \"build\": \"tsc\",\n \"prettier\": \"prettier --write .\",\n \"lint\": \"prettier --check . && eslint . --ext .ts && cspell '**/*' \",\n \"test\": \"jest ./test\",\n \"check-links\": \"git ls-files | grep md$ | xargs -n 1 markdown-link-check\",\n \"prebuild\": \"npm run clean\",\n \"clean\": \"rm -rf ./build\",\n \"checkLoggedIn\": \"./scripts/verifyLoggedIn.sh\"\n },\n \"lint-staged\": {\n \"*.{ts,js,json,md}\": \"prettier --write\",\n \"*.ts\": \"eslint --fix\"\n },\n \"author\": \"\",\n \"license\": \"MIT\",\n \"files\": [\n \"build/package.json\",\n \"build/src/**\"\n ],\n \"devDependencies\": {\n \"@types/jest\": \"28.1.4\",\n \"@typescript-eslint/eslint-plugin\": \"5.39.0\",\n \"@typescript-eslint/parser\": \"5.39.0\",\n \"cspell\": \"5.4.1\",\n \"eslint\": \"7.24.0\",\n \"husky\": \"^9.1.7\",\n \"jest\": \"28.1.2\",\n \"lint-staged\": \"^16.2.6\",\n \"markdown-link-check\": \"3.13.7\",\n \"prettier\": \"2.8.8\",\n \"ts-jest\": \"28.0.5\",\n \"typescript\": \"5.9.2\"\n }\n}\n","import type { Agent } from \"node:http\"\nimport {\n type Logger,\n LogLevel,\n logLevelSeverity,\n makeConsoleLogger,\n} from \"./logging\"\nimport {\n buildRequestError,\n isHTTPResponseError,\n isNotionClientError,\n RequestTimeoutError,\n validateRequestPath,\n} from \"./errors\"\nimport { pick } from \"./utils\"\nimport {\n type GetBlockParameters,\n type GetBlockResponse,\n getBlock,\n type UpdateBlockParameters,\n type UpdateBlockResponse,\n updateBlock,\n type DeleteBlockParameters,\n type DeleteBlockResponse,\n deleteBlock,\n type AppendBlockChildrenParameters,\n type AppendBlockChildrenResponse,\n appendBlockChildren,\n type ListBlockChildrenParameters,\n type ListBlockChildrenResponse,\n listBlockChildren,\n type QueryDataSourceParameters,\n type QueryDataSourceResponse,\n queryDataSource,\n type CreateDataSourceParameters,\n type CreateDataSourceResponse,\n createDataSource,\n type UpdateDataSourceParameters,\n type UpdateDataSourceResponse,\n updateDataSource,\n type GetDataSourceParameters,\n type GetDataSourceResponse,\n getDataSource,\n type CreatePageParameters,\n type CreatePageResponse,\n createPage,\n type GetPageParameters,\n type GetPageResponse,\n getPage,\n type UpdatePageParameters,\n type UpdatePageResponse,\n updatePage,\n type MovePageParameters,\n type MovePageResponse,\n movePage,\n type GetUserParameters,\n type GetUserResponse,\n getUser,\n type ListUsersParameters,\n type ListUsersResponse,\n listUsers,\n type SearchParameters,\n type SearchResponse,\n search,\n type GetSelfParameters,\n type GetSelfResponse,\n getSelf,\n type GetPagePropertyParameters,\n type GetPagePropertyResponse,\n getPageProperty,\n type CreateCommentParameters,\n type CreateCommentResponse,\n createComment,\n type ListCommentsParameters,\n type ListCommentsResponse,\n listComments,\n type GetCommentParameters,\n type GetCommentResponse,\n getComment,\n type OauthTokenResponse,\n type OauthTokenParameters,\n oauthToken,\n type OauthIntrospectResponse,\n type OauthIntrospectParameters,\n oauthIntrospect,\n type OauthRevokeResponse,\n type OauthRevokeParameters,\n oauthRevoke,\n type CreateFileUploadParameters,\n type CreateFileUploadResponse,\n createFileUpload,\n type GetFileUploadResponse,\n type GetFileUploadParameters,\n getFileUpload,\n type SendFileUploadParameters,\n type SendFileUploadResponse,\n sendFileUpload,\n type CompleteFileUploadParameters,\n type CompleteFileUploadResponse,\n completeFileUpload,\n type ListFileUploadsParameters,\n type ListFileUploadsResponse,\n listFileUploads,\n GetDatabaseParameters,\n GetDatabaseResponse,\n getDatabase,\n CreateDatabaseResponse,\n CreateDatabaseParameters,\n createDatabase,\n UpdateDatabaseParameters,\n UpdateDatabaseResponse,\n updateDatabase,\n listDataSourceTemplates,\n ListDataSourceTemplatesResponse,\n ListDataSourceTemplatesParameters,\n} from \"./api-endpoints\"\nimport {\n version as PACKAGE_VERSION,\n name as PACKAGE_NAME,\n} from \"../package.json\"\nimport type { SupportedFetch } from \"./fetch-types\"\n\nexport interface ClientOptions {\n auth?: string\n timeoutMs?: number\n baseUrl?: string\n logLevel?: LogLevel\n logger?: Logger\n notionVersion?: string\n fetch?: SupportedFetch\n /** Silently ignored in the browser */\n agent?: Agent\n}\n\ntype FileParam = {\n filename?: string\n data: string | Blob\n}\n\nexport interface RequestParameters {\n path: string\n method: Method\n query?: QueryParams\n body?: Record<string, unknown>\n formDataParams?: Record<string, string | FileParam>\n headers?: Record<string, string>\n /**\n * To authenticate using public API token, `auth` should be passed as a\n * string. If you are trying to complete OAuth, then `auth` should be an object\n * containing your integration's client ID and secret.\n */\n auth?:\n | string\n | {\n client_id: string\n client_secret: string\n }\n}\n\nexport default class Client {\n #auth?: string\n #logLevel: LogLevel\n #logger: Logger\n #prefixUrl: string\n #timeoutMs: number\n #notionVersion: string\n #fetch: SupportedFetch\n #agent: Agent | undefined\n #userAgent: string\n\n static readonly defaultNotionVersion = \"2025-09-03\"\n\n public constructor(options?: ClientOptions) {\n this.#auth = options?.auth\n this.#logLevel = options?.logLevel ?? LogLevel.WARN\n this.#logger = options?.logger ?? makeConsoleLogger(PACKAGE_NAME)\n this.#prefixUrl = `${options?.baseUrl ?? \"https://api.notion.com\"}/v1/`\n this.#timeoutMs = options?.timeoutMs ?? 60_000\n this.#notionVersion = options?.notionVersion ?? Client.defaultNotionVersion\n this.#fetch = options?.fetch ?? fetch\n this.#agent = options?.agent\n this.#userAgent = `notionhq-client/${PACKAGE_VERSION}`\n }\n\n /**\n * Sends a request.\n */\n public async request<ResponseBody extends object>(\n args: RequestParameters\n ): Promise<ResponseBody> {\n const { path, method, query, body, formDataParams, auth } = args\n\n validateRequestPath(path)\n\n this.log(LogLevel.INFO, \"request start\", { method, path })\n\n // If the body is empty, don't send the body in the HTTP request\n const bodyAsJsonString =\n !body || Object.entries(body).length === 0\n ? undefined\n : JSON.stringify(body)\n\n const url = new URL(`${this.#prefixUrl}${path}`)\n if (query) {\n for (const [key, value] of Object.entries(query)) {\n if (value !== undefined) {\n if (Array.isArray(value)) {\n for (const val of value) {\n url.searchParams.append(key, decodeURIComponent(val))\n }\n } else {\n url.searchParams.append(key, String(value))\n }\n }\n }\n }\n\n // Allow both client ID / client secret based auth as well as token based auth.\n let authorizationHeader: Record<string, string>\n if (typeof auth === \"object\") {\n // Client ID and secret based auth is **ONLY** supported when using the\n // `/oauth/token` endpoint. If this is the case, handle formatting the\n // authorization header as required by `Basic` auth.\n const unencodedCredential = `${auth.client_id}:${auth.client_secret}`\n const encodedCredential =\n Buffer.from(unencodedCredential).toString(\"base64\")\n authorizationHeader = { authorization: `Basic ${encodedCredential}` }\n } else {\n // Otherwise format authorization header as `Bearer` token auth.\n authorizationHeader = this.authAsHeaders(auth)\n }\n\n const headers: Record<string, string> = {\n // Request-level custom additional headers can be provided, but\n // don't allow them to override all other headers, e.g. the\n // standard user agent.\n ...args.headers,\n ...authorizationHeader,\n \"Notion-Version\": this.#notionVersion,\n \"user-agent\": this.#userAgent,\n }\n\n if (bodyAsJsonString !== undefined) {\n headers[\"content-type\"] = \"application/json\"\n }\n\n let formData: FormData | undefined\n if (formDataParams) {\n delete headers[\"content-type\"]\n\n formData = new FormData()\n for (const [key, value] of Object.entries(formDataParams)) {\n if (typeof value === \"string\") {\n formData.append(key, value)\n } else if (typeof value === \"object\") {\n formData.append(\n key,\n typeof value.data === \"object\"\n ? value.data\n : new Blob([value.data]),\n value.filename\n )\n }\n }\n }\n\n try {\n const response = await RequestTimeoutError.rejectAfterTimeout(\n this.#fetch(url.toString(), {\n method: method.toUpperCase(),\n headers,\n body: bodyAsJsonString ?? formData,\n agent: this.#agent,\n }),\n this.#timeoutMs\n )\n\n const responseText = await response.text()\n if (!response.ok) {\n throw buildRequestError(response, responseText)\n }\n\n const responseJson: ResponseBody = JSON.parse(responseText)\n this.log(LogLevel.INFO, \"request success\", {\n method,\n path,\n ...(\"request_id\" in responseJson && responseJson.request_id\n ? { requestId: responseJson.request_id }\n : {}),\n })\n return responseJson\n } catch (error: unknown) {\n if (!isNotionClientError(error)) {\n throw error\n }\n\n // Log the error if it's one of our known error types\n this.log(LogLevel.WARN, \"request fail\", {\n code: error.code,\n message: error.message,\n ...(\"request_id\" in error && error.request_id\n ? { requestId: error.request_id }\n : {}),\n })\n\n if (isHTTPResponseError(error)) {\n // The response body may contain sensitive information so it is logged separately at the DEBUG level\n this.log(LogLevel.DEBUG, \"failed response body\", {\n body: error.body,\n })\n }\n\n throw error\n }\n }\n\n /*\n * Notion API endpoints\n */\n\n public readonly blocks = {\n /**\n * Retrieve block\n */\n retrieve: (\n args: WithAuth<GetBlockParameters>\n ): Promise<GetBlockResponse> => {\n return this.request<GetBlockResponse>({\n path: getBlock.path(args),\n method: getBlock.method,\n query: pick(args, getBlock.queryParams),\n body: pick(args, getBlock.bodyParams),\n auth: args?.auth,\n })\n },\n\n /**\n * Update block\n */\n update: (\n args: WithAuth<UpdateBlockParameters>\n ): Promise<UpdateBlockResponse> => {\n return this.request<UpdateBlockResponse>({\n path: updateBlock.path(args),\n method: updateBlock.method,\n query: pick(args, updateBlock.queryParams),\n body: pick(args, updateBlock.bodyParams),\n auth: args?.auth,\n })\n },\n\n /**\n * Delete block\n */\n delete: (\n args: WithAuth<DeleteBlockParameters>\n ): Promise<DeleteBlockResponse> => {\n return this.request<DeleteBlockResponse>({\n path: deleteBlock.path(args),\n method: deleteBlock.method,\n query: pick(args, deleteBlock.queryParams),\n body: pick(args, deleteBlock.bodyParams),\n auth: args?.auth,\n })\n },\n children: {\n /**\n * Append block children\n */\n append: (\n args: WithAuth<AppendBlockChildrenParameters>\n ): Promise<AppendBlockChildrenResponse> => {\n return this.request<AppendBlockChildrenResponse>({\n path: appendBlockChildren.path(args),\n method: appendBlockChildren.method,\n query: pick(args, appendBlockChildren.queryParams),\n body: pick(args, appendBlockChildren.bodyParams),\n auth: args?.auth,\n })\n },\n\n /**\n * Retrieve block children\n */\n list: (\n args: WithAuth<ListBlockChildrenParameters>\n ): Promise<ListBlockChildrenResponse> => {\n return this.request<ListBlockChildrenResponse>({\n path: listBlockChildren.path(args),\n method: listBlockChildren.method,\n query: pick(args, listBlockChildren.queryParams),\n body: pick(args, listBlockChildren.bodyParams),\n auth: args?.auth,\n })\n },\n },\n }\n\n public readonly databases = {\n /**\n * Retrieve a database\n */\n retrieve: (\n args: WithAuth<GetDatabaseParameters>\n ): Promise<GetDatabaseResponse> => {\n return this.request<GetDatabaseResponse>({\n path: getDatabase.path(args),\n method: getDatabase.method,\n query: pick(args, getDatabase.queryParams),\n body: pick(args, getDatabase.bodyParams),\n auth: args?.auth,\n })\n },\n\n /**\n * Create a database\n */\n create: (\n args: WithAuth<CreateDatabaseParameters>\n ): Promise<CreateDatabaseResponse> => {\n return this.request<CreateDatabaseResponse>({\n path: createDatabase.path(),\n method: createDatabase.method,\n query: pick(args, createDatabase.queryParams),\n body: pick(args, createDatabase.bodyParams),\n auth: args?.auth,\n })\n },\n\n /**\n * Update a database\n */\n update: (\n args: WithAuth<UpdateDatabaseParameters>\n ): Promise<UpdateDatabaseResponse> => {\n return this.request<UpdateDatabaseResponse>({\n path: updateDatabase.path(args),\n method: updateDatabase.method,\n query: pick(args, updateDatabase.queryParams),\n body: pick(args, updateDatabase.bodyParams),\n auth: args?.auth,\n })\n },\n }\n\n public readonly dataSources = {\n /**\n * Retrieve a data source\n */\n retrieve: (\n args: WithAuth<GetDataSourceParameters>\n ): Promise<GetDataSourceResponse> => {\n return this.request<GetDataSourceResponse>({\n path: getDataSource.path(args),\n method: getDataSource.method,\n query: pick(args, getDataSource.queryParams),\n body: pick(args, getDataSource.bodyParams),\n auth: args?.auth,\n })\n },\n\n /**\n * Query a data source\n */\n query: (\n args: WithAuth<QueryDataSourceParameters>\n ): Promise<QueryDataSourceResponse> => {\n return this.request<QueryDataSourceResponse>({\n path: queryDataSource.path(args),\n method: queryDataSource.method,\n query: pick(args, queryDataSource.queryParams),\n body: pick(args, queryDataSource.bodyParams),\n auth: args?.auth,\n })\n },\n\n /**\n * Create a data source\n */\n create: (\n args: WithAuth<CreateDataSourceParameters>\n ): Promise<CreateDataSourceResponse> => {\n return this.request<CreateDataSourceResponse>({\n path: createDataSource.path(),\n method: createDataSource.method,\n query: pick(args, createDataSource.queryParams),\n body: pick(args, createDataSource.bodyParams),\n auth: args?.auth,\n })\n },\n\n /**\n * Update a data source\n */\n update: (\n args: WithAuth<UpdateDataSourceParameters>\n ): Promise<UpdateDataSourceResponse> => {\n return this.request<UpdateDataSourceResponse>({\n path: updateDataSource.path(args),\n method: updateDataSource.method,\n query: pick(args, updateDataSource.queryParams),\n body: pick(args, updateDataSource.bodyParams),\n auth: args?.auth,\n })\n },\n\n /**\n * List page templates that are available for a data source\n */\n listTemplates: (\n args: WithAuth<ListDataSourceTemplatesParameters>\n ): Promise<ListDataSourceTemplatesResponse> => {\n return this.request<ListDataSourceTemplatesResponse>({\n path: listDataSourceTemplates.path(args),\n method: listDataSourceTemplates.method,\n query: pick(args, listDataSourceTemplates.queryParams),\n body: pick(args, listDataSourceTemplates.bodyParams),\n auth: args?.auth,\n })\n },\n }\n\n public readonly pages = {\n /**\n * Create a page\n */\n create: (\n args: WithAuth<CreatePageParameters>\n ): Promise<CreatePageResponse> => {\n return this.request<CreatePageResponse>({\n path: createPage.path(),\n method: createPage.method,\n query: pick(args, createPage.queryParams),\n body: pick(args, createPage.bodyParams),\n auth: args?.auth,\n })\n },\n\n /**\n * Retrieve a page\n */\n retrieve: (args: WithAuth<GetPageParameters>): Promise<GetPageResponse> => {\n return this.request<GetPageResponse>({\n path: getPage.path(args),\n method: getPage.method,\n query: pick(args, getPage.queryParams),\n body: pick(args, getPage.bodyParams),\n auth: args?.auth,\n })\n },\n\n /**\n * Update page properties\n */\n update: (\n args: WithAuth<UpdatePageParameters>\n ): Promise<UpdatePageResponse> => {\n return this.request<UpdatePageResponse>({\n path: updatePage.path(args),\n method: updatePage.method,\n query: pick(args, updatePage.queryParams),\n body: pick(args, updatePage.bodyParams),\n auth: args?.auth,\n })\n },\n\n /**\n * Move a page\n */\n move: (args: WithAuth<MovePageParameters>): Promise<MovePageResponse> => {\n return this.request<MovePageResponse>({\n path: movePage.path(args),\n method: movePage.method,\n query: pick(args, movePage.queryParams),\n body: pick(args, movePage.bodyParams),\n auth: args?.auth,\n })\n },\n properties: {\n /**\n * Retrieve page property\n */\n retrieve: (\n args: WithAuth<GetPagePropertyParameters>\n ): Promise<GetPagePropertyResponse> => {\n return this.request<GetPagePropertyResponse>({\n path: getPageProperty.path(args),\n method: getPageProperty.method,\n query: pick(args, getPageProperty.queryParams),\n body: pick(args, getPageProperty.bodyParams),\n auth: args?.auth,\n })\n },\n },\n }\n\n public readonly users = {\n /**\n * Retrieve a user\n */\n retrieve: (args: WithAuth<GetUserParameters>): Promise<GetUserResponse> => {\n return this.request<GetUserResponse>({\n path: getUser.path(args),\n method: getUser.method,\n query: pick(args, getUser.queryParams),\n body: pick(args, getUser.bodyParams),\n auth: args?.auth,\n })\n },\n\n /**\n * List all users\n */\n list: (args: WithAuth<ListUsersParameters>): Promise<ListUsersResponse> => {\n return this.request<ListUsersResponse>({\n path: listUsers.path(),\n method: listUsers.method,\n query: pick(args, listUsers.queryParams),\n body: pick(args, listUsers.bodyParams),\n auth: args?.auth,\n })\n },\n\n /**\n * Get details about bot\n */\n me: (args: WithAuth<GetSelfParameters>): Promise<GetSelfResponse> => {\n return this.request<GetSelfResponse>({\n path: getSelf.path(),\n method: getSelf.method,\n query: pick(args, getSelf.queryParams),\n body: pick(args, getSelf.bodyParams),\n auth: args?.auth,\n })\n },\n }\n\n public readonly comments = {\n /**\n * Create a comment\n */\n create: (\n args: WithAuth<CreateCommentParameters>\n ): Promise<CreateCommentResponse> => {\n return this.request<CreateCommentResponse>({\n path: createComment.path(),\n method: createComment.method,\n query: pick(args, createComment.queryParams),\n body: pick(args, createComment.bodyParams),\n auth: args?.auth,\n })\n },\n\n /**\n * List comments\n */\n list: (\n args: WithAuth<ListCommentsParameters>\n ): Promise<ListCommentsResponse> => {\n return this.request<ListCommentsResponse>({\n path: listComments.path(),\n method: listComments.method,\n query: pick(args, listComments.queryParams),\n body: pick(args, listComments.bodyParams),\n auth: args?.auth,\n })\n },\n\n /**\n * Retrieve a comment\n */\n retrieve: (\n args: WithAuth<GetCommentParameters>\n ): Promise<GetCommentResponse> => {\n return this.request<GetCommentResponse>({\n path: getComment.path(args),\n method: getComment.method,\n query: pick(args, getComment.queryParams),\n body: pick(args, getComment.bodyParams),\n auth: args?.auth,\n })\n },\n }\n\n public readonly fileUploads = {\n /**\n * Create a file upload\n */\n create: (\n args: WithAuth<CreateFileUploadParameters>\n ): Promise<CreateFileUploadResponse> => {\n return this.request<CreateFileUploadResponse>({\n path: createFileUpload.path(),\n method: createFileUpload.method,\n query: pick(args, createFileUpload.queryParams),\n body: pick(args, createFileUpload.bodyParams),\n auth: args?.auth,\n })\n },\n\n /**\n * Retrieve a file upload\n */\n retrieve: (\n args: WithAuth<GetFileUploadParameters>\n ): Promise<GetFileUploadResponse> => {\n return this.request<GetFileUploadResponse>({\n path: getFileUpload.path(args),\n method: getFileUpload.method,\n query: pick(args, getFileUpload.queryParams),\n auth: args?.auth,\n })\n },\n\n /**\n * List file uploads\n */\n list: (\n args: WithAuth<ListFileUploadsParameters>\n ): Promise<ListFileUploadsResponse> => {\n return this.request<ListFileUploadsResponse>({\n path: listFileUploads.path(),\n method: listFileUploads.method,\n query: pick(args, listFileUploads.queryParams),\n auth: args?.auth,\n })\n },\n\n /**\n * Send a file upload\n *\n * Requires a `file_upload_id`, obtained from the `id` of the Create File\n * Upload API response.\n *\n * The `file` parameter contains the raw file contents or Blob/File object\n * under `file.data`, and an optional `file.filename` string.\n *\n * Supply a stringified `part_number` parameter when using file uploads\n * in multi-part mode.\n *\n * This endpoint sends HTTP multipart/form-data instead of JSON parameters.\n */\n send: (\n args: WithAuth<SendFileUploadParameters>\n ): Promise<SendFileUploadResponse> => {\n return this.request<SendFileUploadResponse>({\n path: sendFileUpload.path(args),\n method: sendFileUpload.method,\n query: pick(args, sendFileUpload.queryParams),\n formDataParams: pick(args, sendFileUpload.formDataParams),\n auth: args?.auth,\n })\n },\n\n /**\n * Complete a file upload\n */\n complete: (\n args: WithAuth<CompleteFileUploadParameters>\n ): Promise<CompleteFileUploadResponse> => {\n return this.request<CompleteFileUploadResponse>({\n path: completeFileUpload.path(args),\n method: completeFileUpload.method,\n query: pick(args, completeFileUpload.queryParams),\n auth: args?.auth,\n })\n },\n }\n\n /**\n * Search\n */\n public search = (\n args: WithAuth<SearchParameters>\n ): Promise<SearchResponse> => {\n return this.request<SearchResponse>({\n path: search.path(),\n method: search.method,\n query: pick(args, search.queryParams),\n body: pick(args, search.bodyParams),\n auth: args?.auth,\n })\n }\n\n public readonly oauth = {\n /**\n * Get token\n */\n token: (\n args: OauthTokenParameters & {\n client_id: string\n client_secret: string\n }\n ): Promise<OauthTokenResponse> => {\n return this.request<OauthTokenResponse>({\n path: oauthToken.path(),\n method: oauthToken.method,\n query: pick(args, oauthToken.queryParams),\n body: pick(args, oauthToken.bodyParams),\n auth: {\n client_id: args.client_id,\n client_secret: args.client_secret,\n },\n })\n },\n /**\n * Introspect token\n */\n introspect: (\n args: OauthIntrospectParameters & {\n client_id: string\n client_secret: string\n }\n ): Promise<OauthIntrospectResponse> => {\n return this.request<OauthIntrospectResponse>({\n path: oauthIntrospect.path(),\n method: oauthIntrospect.method,\n query: pick(args, oauthIntrospect.queryParams),\n body: pick(args, oauthIntrospect.bodyParams),\n auth: {\n client_id: args.client_id,\n client_secret: args.client_secret,\n },\n })\n },\n /**\n * Revoke token\n */\n revoke: (\n args: OauthRevokeParameters & {\n client_id: string\n client_secret: string\n }\n ): Promise<OauthRevokeResponse> => {\n return this.request<OauthRevokeResponse>({\n path: oauthRevoke.path(),\n method: oauthRevoke.method,\n query: pick(args, oauthRevoke.queryParams),\n body: pick(args, oauthRevoke.bodyParams),\n auth: {\n client_id: args.client_id,\n client_secret: args.client_secret,\n },\n })\n },\n }\n\n /**\n * Emits a log message to the console.\n *\n * @param level The level for this message\n * @param args Arguments to send to the console\n */\n private log(\n level: LogLevel,\n message: string,\n extraInfo: Record<string, unknown>\n ) {\n if (logLevelSeverity(level) >= logLevelSeverity(this.#logLevel)) {\n this.#logger(level, message, extraInfo)\n }\n }\n\n /**\n * Transforms an API key or access token into a headers object suitable for an HTTP request.\n *\n * This method uses the instance's value as the default when the input is undefined. If neither are defined, it returns\n * an empty object\n *\n * @param auth API key or access token\n * @returns headers key-value object\n */\n private authAsHeaders(auth?: string): Record<string, string> {\n const headers: Record<string, string> = {}\n const authHeaderValue = auth ?? this.#auth\n if (authHeaderValue !== undefined) {\n headers[\"authorization\"] = `Bearer ${authHeaderValue}`\n }\n return headers\n }\n}\n\n/*\n * Type aliases to support the generic request interface.\n */\ntype Method = \"get\" | \"post\" | \"patch\" | \"delete\"\ntype QueryParams = Record<string, string | number | string[]> | URLSearchParams\n\ntype WithAuth<P> = P & { auth?: string }\n","import {\n BlockObjectResponse,\n CommentObjectResponse,\n DatabaseObjectResponse,\n DataSourceObjectResponse,\n EquationRichTextItemResponse,\n ListDataSourceTemplatesResponse,\n MentionRichTextItemResponse,\n PageObjectResponse,\n PartialBlockObjectResponse,\n PartialCommentObjectResponse,\n PartialDatabaseObjectResponse,\n PartialDataSourceObjectResponse,\n PartialPageObjectResponse,\n PartialUserObjectResponse,\n RichTextItemResponse,\n RichTextItemResponseCommon,\n TextRichTextItemResponse,\n UserObjectResponse,\n} from \"./api-endpoints\"\nimport type Client from \"./Client\"\n\ninterface PaginatedArgs {\n start_cursor?: string\n}\n\ntype PaginatedList<T> = {\n object: \"list\"\n results: T[]\n next_cursor: string | null\n has_more: boolean\n}\n\n/**\n * Returns an async iterator over the results of any paginated Notion API.\n *\n * Example (given a notion Client called `notion`):\n *\n * ```\n * for await (const block of iteratePaginatedAPI(notion.blocks.children.list, {\n * block_id: parentBlockId,\n * })) {\n * // Do something with block.\n * }\n * ```\n *\n * @param listFn A bound function on the Notion client that represents a conforming paginated\n * API. Example: `notion.blocks.children.list`.\n * @param firstPageArgs Arguments that should be passed to the API on the first and subsequent\n * calls to the API. Any necessary `next_cursor` will be automatically populated by\n * this function. Example: `{ block_id: \"<my block id>\" }`\n */\nexport async function* iteratePaginatedAPI<Args extends PaginatedArgs, Item>(\n listFn: (args: Args) => Promise<PaginatedList<Item>>,\n firstPageArgs: Args\n): AsyncIterableIterator<Item> {\n let nextCursor: string | null | undefined = firstPageArgs.start_cursor\n do {\n const response: PaginatedList<Item> = await listFn({\n ...firstPageArgs,\n start_cursor: nextCursor,\n })\n yield* response.results\n nextCursor = response.next_cursor\n } while (nextCursor)\n}\n\n/**\n * Collect all of the results of paginating an API into an in-memory array.\n *\n * Example (given a notion Client called `notion`):\n *\n * ```\n * const blocks = await collectPaginatedAPI(notion.blocks.children.list, {\n * block_id: parentBlockId,\n * })\n * // Do something with blocks.\n * ```\n *\n * @param listFn A bound function on the Notion client that represents a conforming paginated\n * API. Example: `notion.blocks.children.list`.\n * @param firstPageArgs Arguments that should be passed to the API on the first and subsequent\n * calls to the API. Any necessary `next_cursor` will be automatically populated by\n * this function. Example: `{ block_id: \"<my block id>\" }`\n */\nexport async function collectPaginatedAPI<Args extends PaginatedArgs, Item>(\n listFn: (args: Args) => Promise<PaginatedList<Item>>,\n firstPageArgs: Args\n): Promise<Item[]> {\n const results: Item[] = []\n for await (const item of iteratePaginatedAPI(listFn, firstPageArgs)) {\n results.push(item)\n }\n return results\n}\n\ntype DataSourceTemplate = ListDataSourceTemplatesResponse[\"templates\"][number]\n\ninterface ListDataSourceTemplatesArgs extends PaginatedArgs {\n data_source_id: string\n name?: string\n page_size?: number\n}\n\n/**\n * Returns an async iterator over data source templates.\n *\n * Example (given a notion Client called `notion`):\n *\n * ```\n * for await (const template of iterateDataSourceTemplates(notion, {\n * data_source_id: dataSourceId,\n * })) {\n * console.log(template.name, template.is_default)\n * }\n * ```\n *\n * @param client A Notion client instance.\n * @param args Arguments including the data_source_id and optional start_cursor.\n */\nexport async function* iterateDataSourceTemplates(\n client: Client,\n args: ListDataSourceTemplatesArgs\n): AsyncIterableIterator<DataSourceTemplate> {\n let nextCursor: string | null | undefined = args.start_cursor\n do {\n const response: ListDataSourceTemplatesResponse =\n await client.dataSources.listTemplates({\n ...args,\n start_cursor: nextCursor,\n })\n yield* response.templates\n nextCursor = response.next_cursor\n } while (nextCursor)\n}\n\n/**\n * Collect all data source templates into an in-memory array.\n *\n * Example (given a notion Client called `notion`):\n *\n * ```\n * const templates = await collectDataSourceTemplates(notion, {\n * data_source_id: dataSourceId,\n * })\n * // Do something with templates.\n * ```\n *\n * @param client A Notion client instance.\n * @param args Arguments including the data_source_id and optional start_cursor.\n */\nexport async function collectDataSourceTemplates(\n client: Client,\n args: ListDataSourceTemplatesArgs\n): Promise<DataSourceTemplate[]> {\n const results: DataSourceTemplate[] = []\n for await (const template of iterateDataSourceTemplates(client, args)) {\n results.push(template)\n }\n return results\n}\n\ntype ObjectResponse =\n | PageObjectResponse\n | PartialPageObjectResponse\n | DataSourceObjectResponse\n | PartialDataSourceObjectResponse\n | DatabaseObjectResponse\n | PartialDatabaseObjectResponse\n | BlockObjectResponse\n | PartialBlockObjectResponse\n\n/**\n * @returns `true` if `response` is a full `BlockObjectResponse`.\n */\nexport function isFullBlock(\n response: ObjectResponse\n): response is BlockObjectResponse {\n return response.object === \"block\" && \"type\" in response\n}\n\n/**\n * @returns `true` if `response` is a full `PageObjectResponse`.\n */\nexport function isFullPage(\n response: ObjectResponse\n): response is PageObjectResponse {\n return response.object === \"page\" && \"url\" in response\n}\n\n/**\n * @returns `true` if `response` is a full `DataSourceObjectResponse`.\n */\nexport function isFullDataSource(\n response: ObjectResponse\n): response is DataSourceObjectResponse {\n return response.object === \"data_source\"\n}\n\n/**\n * @returns `true` if `response` is a full `DatabaseObjectResponse`.\n */\nexport function isFullDatabase(\n response: ObjectResponse\n): response is DatabaseObjectResponse {\n return response.object === \"database\"\n}\n\n/**\n * @returns `true` if `response` is a full `DataSourceObjectResponse` or a full\n * `PageObjectResponse`.\n *\n * Can be used on the results of the list response from `queryDataSource` or\n * `search` APIs.\n */\nexport function isFullPageOrDataSource(\n response: ObjectResponse\n): response is DataSourceObjectResponse | PageObjectResponse {\n if (response.object === \"data_source\") {\n return isFullDataSource(response)\n } else {\n return isFullPage(response)\n }\n}\n\n/**\n * @returns `true` if `response` is a full `UserObjectResponse`.\n */\nexport function isFullUser(\n response: UserObjectResponse | PartialUserObjectResponse\n): response is UserObjectResponse {\n return \"type\" in response\n}\n\n/**\n * @returns `true` if `response` is a full `CommentObjectResponse`.\n */\nexport function isFullComment(\n response: CommentObjectResponse | PartialCommentObjectResponse\n): response is CommentObjectResponse {\n return \"created_by\" in response\n}\n\n/**\n * @returns `true` if `richText` is a `TextRichTextItemResponse`.\n */\nexport function isTextRichTextItemResponse(\n richText: RichTextItemResponse\n): richText is RichTextItemResponseCommon & TextRichTextItemResponse {\n return richText.type === \"text\"\n}\n\n/**\n * @returns `true` if `richText` is an `EquationRichTextItemResponse`.\n */\nexport function isEquationRichTextItemResponse(\n richText: RichTextItemResponse\n): richText is RichTextItemResponseCommon & EquationRichTextItemResponse {\n return richText.type === \"equation\"\n}\n\n/**\n * @returns `true` if `richText` is an `MentionRichTextItemResponse`.\n */\nexport function isMentionRichTextItemResponse(\n richText: RichTextItemResponse\n): richText is RichTextItemResponseCommon & MentionRichTextItemResponse {\n return richText.type === \"mention\"\n}\n\n/**\n * Extracts a Notion ID from a Notion URL or returns the input if it's already a valid ID.\n *\n * Prioritizes path IDs over query parameters to avoid extracting view IDs instead of database IDs.\n *\n * @param urlOrId A Notion URL or ID string\n * @returns The extracted UUID in standard format (with hyphens) or null if invalid\n *\n * @example\n * ```typescript\n * // Database URL with view ID - extracts database ID, not view ID\n * extractNotionId('https://notion.so/workspace/DB-abc123def456789012345678901234ab?v=viewid123')\n * // Returns: 'abc123de-f456-7890-1234-5678901234ab' (database ID)\n *\n * // Already formatted UUID\n * extractNotionId('12345678-1234-1234-1234-123456789abc')\n * // Returns: '12345678-1234-1234-1234-123456789abc'\n * ```\n */\nexport function extractNotionId(urlOrId: string): string | null {\n if (!urlOrId || typeof urlOrId !== \"string\") {\n return null\n }\n\n const trimmed = urlOrId.trim()\n\n // Check if it's already a properly formatted UUID\n const uuidRegex =\n /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i\n if (uuidRegex.test(trimmed)) {\n return trimmed.toLowerCase()\n }\n\n // Check if it's a compact UUID (32 chars, no hyphens)\n const compactUuidRegex = /^[0-9a-f]{32}$/i\n if (compactUuidRegex.test(trimmed)) {\n return formatUuid(trimmed)\n }\n\n // Extract from URL - prioritize path over query parameters\n // This prevents extracting view IDs when database IDs are in the path\n const pathMatch = trimmed.match(/\\/[^/?#]*-([0-9a-f]{32})(?:[/?#]|$)/i)\n if (pathMatch && pathMatch[1]) {\n return formatUuid(pathMatch[1])\n }\n\n // Fallback to query parameters if no path ID found\n const queryMatch = trimmed.match(\n /[?&](?:p|page_id|database_id)=([0-9a-f]{32})/i\n )\n if (queryMatch && queryMatch[1]) {\n return formatUuid(queryMatch[1])\n }\n\n // Last resort: any 32-char hex string in the URL\n const anyMatch = trimmed.match(/([0-9a-f]{32})/i)\n if (anyMatch && anyMatch[1]) {\n return formatUuid(anyMatch[1])\n }\n\n return null\n}\n\n/**\n * Formats a 32-character hex string into a standard UUID format.\n * @param compactId 32-character hex string without hyphens\n * @returns UUID with hyphens in standard format\n */\nfunction formatUuid(compactId: string): string {\n const clean = compactId.toLowerCase()\n return `${clean.slice(0, 8)}-${clean.slice(8, 12)}-${clean.slice(\n 12,\n 16\n )}-${clean.slice(16, 20)}-${clean.slice(20, 32)}`\n}\n\n/**\n * Extracts a database ID from a Notion database URL.\n * Convenience wrapper around `extractNotionId`.\n */\nexport function extractDatabaseId(databaseUrl: string): string | null {\n return extractNotionId(databaseUrl)\n}\n\n/**\n * Extracts a page ID from a Notion page URL.\n * Convenience wrapper around `extractNotionId`.\n */\nexport function extractPageId(pageUrl: string): string | null {\n return extractNotionId(pageUrl)\n}\n\n/**\n * Extracts a block ID from a Notion URL with a block fragment.\n * Looks for #block-<id> or #<id> patterns.\n */\nexport function extractBlockId(urlWithBlock: string): string | null {\n if (!urlWithBlock || typeof urlWithBlock !== \"string\") {\n return null\n }\n\n // Look for block fragment in URL (#block-32chars or just #32chars)\n const blockMatch = urlWithBlock.match(/#(?:block-)?([0-9a-f]{32})/i)\n if (blockMatch && blockMatch[1]) {\n return formatUuid(blockMatch[1])\n }\n\n return null\n}\n","/**\n * index.ts\n *\n * This file is the entry point for the Notion SDK.\n * It exports the Client class and all the API endpoints.\n *\n * @packageDocumentation\n */\n\nexport type {\n AppendBlockChildrenParameters,\n AppendBlockChildrenResponse,\n AudioBlockObjectResponse,\n BlockObjectRequest,\n BlockObjectResponse,\n BookmarkBlockObjectResponse,\n BotUserObjectResponse,\n BreadcrumbBlockObjectResponse,\n BulletedListItemBlockObjectResponse,\n ButtonPropertyItemObjectResponse,\n CalloutBlockObjectResponse,\n CheckboxPropertyItemObjectResponse,\n ChildDatabaseBlockObjectResponse,\n ChildPageBlockObjectResponse,\n CodeBlockObjectResponse,\n ColumnBlockObjectResponse,\n ColumnListBlockObjectResponse,\n CommentObjectResponse,\n CompleteFileUploadParameters,\n CompleteFileUploadResponse,\n CreateCommentParameters,\n CreateCommentResponse,\n CreateDatabaseParameters,\n CreateDatabaseResponse,\n CreateDataSourceParameters,\n CreateDataSourceResponse,\n CreatedByPropertyItemObjectResponse,\n CreatedTimePropertyItemObjectResponse,\n CreateFileUploadParameters,\n CreateFileUploadResponse,\n CreatePageParameters,\n CreatePageResponse,\n DatabaseObjectResponse,\n DataSourceObjectResponse,\n DatePropertyItemObjectResponse,\n DeleteBlockParameters,\n DeleteBlockResponse,\n DividerBlockObjectResponse,\n EmailPropertyItemObjectResponse,\n EmbedBlockObjectResponse,\n EquationBlockObjectResponse,\n EquationRichTextItemResponse,\n FileBlockObjectResponse,\n FilesPropertyItemObjectResponse,\n FileUploadObjectResponse,\n FormulaPropertyItemObjectResponse,\n GetBlockParameters,\n GetBlockResponse,\n GetCommentParameters,\n GetCommentResponse,\n GetDatabaseParameters,\n GetDatabaseResponse,\n GetDataSourceParameters,\n GetDataSourceResponse,\n GetFileUploadParameters,\n GetFileUploadResponse,\n GetPageParameters,\n GetPagePropertyParameters,\n GetPagePropertyResponse,\n GetPageResponse,\n GetSelfParameters,\n GetSelfResponse,\n GetUserParameters,\n GetUserResponse,\n GroupObjectResponse,\n Heading1BlockObjectResponse,\n Heading2BlockObjectResponse,\n Heading3BlockObjectResponse,\n ImageBlockObjectResponse,\n LastEditedByPropertyItemObjectResponse,\n LastEditedTimePropertyItemObjectResponse,\n LinkPreviewBlockObjectResponse,\n LinkToPageBlockObjectResponse,\n ListBlockChildrenParameters,\n ListBlockChildrenResponse,\n ListCommentsParameters,\n ListCommentsResponse,\n ListFileUploadsParameters,\n ListFileUploadsResponse,\n ListUsersParameters,\n ListUsersResponse,\n MentionRichTextItemResponse,\n MovePageParameters,\n MovePageResponse,\n MultiSelectPropertyItemObjectResponse,\n NumberedListItemBlockObjectResponse,\n NumberPropertyItemObjectResponse,\n OauthIntrospectParameters,\n OauthIntrospectResponse,\n OauthRevokeParameters,\n OauthRevokeResponse,\n OauthTokenParameters,\n OauthTokenResponse,\n PageObjectResponse,\n ParagraphBlockObjectResponse,\n PartialBlockObjectResponse,\n PartialCommentObjectResponse,\n PartialDatabaseObjectResponse,\n PartialDataSourceObjectResponse,\n PartialPageObjectResponse,\n PartialUserObjectResponse,\n PdfBlockObjectResponse,\n PeoplePropertyItemObjectResponse,\n PersonUserObjectResponse,\n PhoneNumberPropertyItemObjectResponse,\n PropertyItemListResponse,\n PropertyItemObjectResponse,\n QueryDataSourceParameters,\n QueryDataSourceResponse,\n QuoteBlockObjectResponse,\n RelationPropertyItemObjectResponse,\n RichTextItemResponse,\n RichTextPropertyItemObjectResponse,\n RollupPropertyItemObjectResponse,\n SearchParameters,\n SearchResponse,\n SelectPropertyItemObjectResponse,\n SendFileUploadParameters,\n SendFileUploadResponse,\n StatusPropertyItemObjectResponse,\n SyncedBlockBlockObjectResponse,\n TableBlockObjectResponse,\n TableOfContentsBlockObjectResponse,\n TableRowBlockObjectResponse,\n TemplateBlockObjectResponse,\n TextRichTextItemResponse,\n TitlePropertyItemObjectResponse,\n ToDoBlockObjectResponse,\n ToggleBlockObjectResponse,\n UniqueIdPropertyItemObjectResponse,\n UnsupportedBlockObjectResponse,\n UpdateBlockParameters,\n UpdateBlockResponse,\n UpdateDatabaseParameters,\n UpdateDatabaseResponse,\n UpdateDataSourceParameters,\n UpdateDataSourceResponse,\n UpdatePageParameters,\n UpdatePageResponse,\n UrlPropertyItemObjectResponse,\n UserObjectResponse,\n VerificationPropertyItemObjectResponse,\n VideoBlockObjectResponse,\n} from \"./api-endpoints\"\nexport { default as Client } from \"./Client\"\nexport { LogLevel, Logger } from \"./logging\"\nexport {\n // Error codes\n NotionErrorCode,\n APIErrorCode,\n ClientErrorCode,\n // Error types\n NotionClientError,\n APIResponseError,\n UnknownHTTPResponseError,\n RequestTimeoutError,\n InvalidPathParameterError,\n // Error helpers\n isNotionClientError,\n} from \"./errors\"\nexport {\n collectPaginatedAPI,\n iteratePaginatedAPI,\n collectDataSourceTemplates,\n iterateDataSourceTemplates,\n isFullBlock,\n isFullDataSource,\n isFullDatabase,\n isFullPage,\n isFullUser,\n isFullComment,\n isFullPageOrDataSource,\n extractNotionId,\n extractDatabaseId,\n extractPageId,\n extractBlockId,\n} from \"./helpers\"\n","import { Client } from \"@notionhq/client\";\n\n/**\n * Notion API client wrapper\n * Provides authenticated access to Notion API\n */\n\nexport interface NotionClientConfig {\n apiKey: string;\n rootPageId?: string;\n}\n\nlet notionClient: Client | null = null;\nlet rootPageId: string | null = null;\n\n/**\n * Initialize the Notion client with API key\n */\nexport function initNotionClient(config: NotionClientConfig): Client {\n notionClient = new Client({\n auth: config.apiKey,\n });\n rootPageId = config.rootPageId || null;\n return notionClient;\n}\n\n/**\n * Get the initialized Notion client\n * @throws Error if client is not initialized\n */\nexport function getNotionClient(): Client {\n if (!notionClient) {\n throw new Error(\n \"Notion client not initialized. Call initNotionClient() first.\"\n );\n }\n return notionClient;\n}\n\n/**\n * Get the configured root page ID\n */\nexport function getRootPageId(): string | null {\n return rootPageId;\n}\n\n/**\n * Check if Notion client is initialized\n */\nexport function isNotionInitialized(): boolean {\n return notionClient !== null;\n}\n\n/**\n * Reset the Notion client (useful for testing)\n */\nexport function resetNotionClient(): void {\n notionClient = null;\n rootPageId = null;\n}\n\nexport { Client };\n"],"mappings":";;;;;;;;;;;;AAOA,YAAA,cAAA;AAMA,YAAA,OAAA;AAQA,YAAA,WAAA;AAdA,aAAgB,YAAY,OAAY;AACtC,YAAM,IAAI,MAAM,wCAAwC,KAAK,EAAE;IACjE;AAIA,aAAgB,KACd,MACA,MAAkB;AAElB,YAAM,UAAU,KAAK,IAAI,SAAO,CAAC,KAAK,SAAI,QAAJ,SAAI,SAAA,SAAJ,KAAO,GAAG,CAAC,CAAC;AAClD,aAAO,OAAO,YAAY,OAAO;IACnC;AAEA,aAAgB,SAAS,GAAU;AACjC,aAAO,OAAO,MAAM,YAAY,MAAM;IACxC;;;;;;;;;;ACVA,YAAA,oBAAA;AASA,YAAA,mBAAA;AAtBA,QAAA,UAAA;AAEA,QAAY;AAAZ,KAAA,SAAYA,WAAQ;AAClB,MAAAA,UAAA,OAAA,IAAA;AACA,MAAAA,UAAA,MAAA,IAAA;AACA,MAAAA,UAAA,MAAA,IAAA;AACA,MAAAA,UAAA,OAAA,IAAA;IACF,GALY,aAAQ,QAAA,WAAR,WAAQ,CAAA,EAAA;AAWpB,aAAgB,kBAAkB,MAAY;AAC5C,aAAO,CAAC,OAAO,SAAS,cAAa;AACnC,gBAAQ,KAAK,EAAE,GAAG,IAAI,IAAI,KAAK,KAAK,SAAS,SAAS;MACxD;IACF;AAKA,aAAgB,iBAAiB,OAAe;AAC9C,cAAQ,OAAO;QACb,KAAK,SAAS;AACZ,iBAAO;QACT,KAAK,S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