@heyo-sh/heyo-cms 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (401) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +44 -2
  3. package/dist/access/index.d.ts +9 -0
  4. package/dist/access/index.d.ts.map +1 -0
  5. package/dist/access/permissions.d.ts +54 -0
  6. package/dist/access/permissions.d.ts.map +1 -0
  7. package/dist/adapters/astro.d.ts +45 -0
  8. package/dist/adapters/astro.d.ts.map +1 -0
  9. package/dist/adapters/astro.js +1 -0
  10. package/dist/adapters/deliver.d.ts +26 -0
  11. package/dist/adapters/deliver.d.ts.map +1 -0
  12. package/dist/adapters/next.d.ts +45 -0
  13. package/dist/adapters/next.d.ts.map +1 -0
  14. package/dist/adapters/next.js +1 -0
  15. package/dist/adapters/nuxt.d.ts +51 -0
  16. package/dist/adapters/nuxt.d.ts.map +1 -0
  17. package/dist/adapters/nuxt.js +1 -0
  18. package/dist/adapters/react-router.d.ts +36 -0
  19. package/dist/adapters/react-router.d.ts.map +1 -0
  20. package/dist/adapters/react-router.js +1 -0
  21. package/dist/adapters/sveltekit.d.ts +41 -0
  22. package/dist/adapters/sveltekit.d.ts.map +1 -0
  23. package/dist/adapters/sveltekit.js +1 -0
  24. package/dist/ai/assistant/context.d.ts +64 -0
  25. package/dist/ai/assistant/context.d.ts.map +1 -0
  26. package/dist/ai/assistant/limits.d.ts +10 -0
  27. package/dist/ai/assistant/limits.d.ts.map +1 -0
  28. package/dist/ai/assistant/plans.d.ts +83 -0
  29. package/dist/ai/assistant/plans.d.ts.map +1 -0
  30. package/dist/ai/assistant/prompt.d.ts +22 -0
  31. package/dist/ai/assistant/prompt.d.ts.map +1 -0
  32. package/dist/ai/assistant/run.d.ts +59 -0
  33. package/dist/ai/assistant/run.d.ts.map +1 -0
  34. package/dist/ai/assistant/runtime.d.ts +35 -0
  35. package/dist/ai/assistant/runtime.d.ts.map +1 -0
  36. package/dist/ai/assistant/schema.d.ts +66 -0
  37. package/dist/ai/assistant/schema.d.ts.map +1 -0
  38. package/dist/ai/assistant/tools.d.ts +41 -0
  39. package/dist/ai/assistant/tools.d.ts.map +1 -0
  40. package/dist/ai/assistant/values.d.ts +33 -0
  41. package/dist/ai/assistant/values.d.ts.map +1 -0
  42. package/dist/ai/crypto.d.ts +12 -0
  43. package/dist/ai/crypto.d.ts.map +1 -0
  44. package/dist/ai/index.d.ts +19 -0
  45. package/dist/ai/index.d.ts.map +1 -0
  46. package/dist/ai/pi.d.ts +89 -0
  47. package/dist/ai/pi.d.ts.map +1 -0
  48. package/dist/ai/registry.d.ts +66 -0
  49. package/dist/ai/registry.d.ts.map +1 -0
  50. package/dist/ai/service.d.ts +31 -0
  51. package/dist/ai/service.d.ts.map +1 -0
  52. package/dist/ai/variant-translation.d.ts +6 -0
  53. package/dist/ai/variant-translation.d.ts.map +1 -0
  54. package/dist/ai.d.ts +12 -0
  55. package/dist/ai.d.ts.map +1 -0
  56. package/dist/ai.js +1 -0
  57. package/dist/auth/config.d.ts +65 -0
  58. package/dist/auth/config.d.ts.map +1 -0
  59. package/dist/auth/crypto.d.ts +44 -0
  60. package/dist/auth/crypto.d.ts.map +1 -0
  61. package/dist/auth/index.d.ts +15 -0
  62. package/dist/auth/index.d.ts.map +1 -0
  63. package/dist/auth/oauth.d.ts +93 -0
  64. package/dist/auth/oauth.d.ts.map +1 -0
  65. package/dist/auth/service.d.ts +38 -0
  66. package/dist/auth/service.d.ts.map +1 -0
  67. package/dist/auth/totp.d.ts +34 -0
  68. package/dist/auth/totp.d.ts.map +1 -0
  69. package/dist/auth.d.ts +9 -0
  70. package/dist/auth.d.ts.map +1 -0
  71. package/dist/auth.js +1 -0
  72. package/dist/cli.d.ts +3 -0
  73. package/dist/cli.d.ts.map +1 -0
  74. package/dist/cli.js +30 -0
  75. package/dist/client/index.d.ts +51 -0
  76. package/dist/client/index.d.ts.map +1 -0
  77. package/dist/client/types.d.ts +363 -0
  78. package/dist/client/types.d.ts.map +1 -0
  79. package/dist/client.d.ts +46 -0
  80. package/dist/client.d.ts.map +1 -0
  81. package/dist/client.js +1 -0
  82. package/dist/config.d.ts +31 -0
  83. package/dist/config.d.ts.map +1 -0
  84. package/dist/config.js +1 -0
  85. package/dist/content/export.d.ts +28 -0
  86. package/dist/content/export.d.ts.map +1 -0
  87. package/dist/content/import.d.ts +65 -0
  88. package/dist/content/import.d.ts.map +1 -0
  89. package/dist/content/records.d.ts +73 -0
  90. package/dist/content/records.d.ts.map +1 -0
  91. package/dist/content.d.ts +12 -0
  92. package/dist/content.d.ts.map +1 -0
  93. package/dist/content.js +1 -0
  94. package/dist/db/d1.d.ts +29 -0
  95. package/dist/db/d1.d.ts.map +1 -0
  96. package/dist/db/d1.js +1 -0
  97. package/dist/db/mongodb.d.ts +128 -0
  98. package/dist/db/mongodb.d.ts.map +1 -0
  99. package/dist/db/mongodb.js +2 -0
  100. package/dist/db/postgres.d.ts +37 -0
  101. package/dist/db/postgres.d.ts.map +1 -0
  102. package/dist/db/postgres.js +1 -0
  103. package/dist/db/sql/adapter.d.ts +57 -0
  104. package/dist/db/sql/adapter.d.ts.map +1 -0
  105. package/dist/db/sql/compile.d.ts +50 -0
  106. package/dist/db/sql/compile.d.ts.map +1 -0
  107. package/dist/db/sql/ddl.d.ts +34 -0
  108. package/dist/db/sql/ddl.d.ts.map +1 -0
  109. package/dist/db/sql/dialect.d.ts +37 -0
  110. package/dist/db/sql/dialect.d.ts.map +1 -0
  111. package/dist/db/sql/driver.d.ts +34 -0
  112. package/dist/db/sql/driver.d.ts.map +1 -0
  113. package/dist/db/sql/introspect.d.ts +15 -0
  114. package/dist/db/sql/introspect.d.ts.map +1 -0
  115. package/dist/db/sqlite.d.ts +50 -0
  116. package/dist/db/sqlite.d.ts.map +1 -0
  117. package/dist/db/sqlite.js +1 -0
  118. package/dist/defaults.d.ts +5 -0
  119. package/dist/defaults.d.ts.map +1 -0
  120. package/dist/duration.d.ts +12 -0
  121. package/dist/duration.d.ts.map +1 -0
  122. package/dist/editor/builtin.d.ts +45 -0
  123. package/dist/editor/builtin.d.ts.map +1 -0
  124. package/dist/editor/index.d.ts +14 -0
  125. package/dist/editor/index.d.ts.map +1 -0
  126. package/dist/editor/markdown.d.ts +19 -0
  127. package/dist/editor/markdown.d.ts.map +1 -0
  128. package/dist/editor/registry.d.ts +30 -0
  129. package/dist/editor/registry.d.ts.map +1 -0
  130. package/dist/editor/serialize.d.ts +41 -0
  131. package/dist/editor/serialize.d.ts.map +1 -0
  132. package/dist/editor.d.ts +10 -0
  133. package/dist/editor.d.ts.map +1 -0
  134. package/dist/editor.js +1 -0
  135. package/dist/engine/access.d.ts +33 -0
  136. package/dist/engine/access.d.ts.map +1 -0
  137. package/dist/engine/activity.d.ts +16 -0
  138. package/dist/engine/activity.d.ts.map +1 -0
  139. package/dist/engine/cursor.d.ts +19 -0
  140. package/dist/engine/cursor.d.ts.map +1 -0
  141. package/dist/engine/documents.d.ts +81 -0
  142. package/dist/engine/documents.d.ts.map +1 -0
  143. package/dist/engine/engine.d.ts +295 -0
  144. package/dist/engine/engine.d.ts.map +1 -0
  145. package/dist/engine/field-access.d.ts +21 -0
  146. package/dist/engine/field-access.d.ts.map +1 -0
  147. package/dist/engine/hooks.d.ts +58 -0
  148. package/dist/engine/hooks.d.ts.map +1 -0
  149. package/dist/engine/index.d.ts +20 -0
  150. package/dist/engine/index.d.ts.map +1 -0
  151. package/dist/engine/jobs.d.ts +63 -0
  152. package/dist/engine/jobs.d.ts.map +1 -0
  153. package/dist/engine/locales.d.ts +40 -0
  154. package/dist/engine/locales.d.ts.map +1 -0
  155. package/dist/engine/outbox.d.ts +81 -0
  156. package/dist/engine/outbox.d.ts.map +1 -0
  157. package/dist/engine/relations.d.ts +60 -0
  158. package/dist/engine/relations.d.ts.map +1 -0
  159. package/dist/engine/scoped-db.d.ts +13 -0
  160. package/dist/engine/scoped-db.d.ts.map +1 -0
  161. package/dist/engine/slugs.d.ts +124 -0
  162. package/dist/engine/slugs.d.ts.map +1 -0
  163. package/dist/engine/trash.d.ts +25 -0
  164. package/dist/engine/trash.d.ts.map +1 -0
  165. package/dist/errors.d.ts +42 -0
  166. package/dist/errors.d.ts.map +1 -0
  167. package/dist/fields/builtin.d.ts +169 -0
  168. package/dist/fields/builtin.d.ts.map +1 -0
  169. package/dist/fields/index.d.ts +3 -0
  170. package/dist/fields/index.d.ts.map +1 -0
  171. package/dist/fields/registry.d.ts +35 -0
  172. package/dist/fields/registry.d.ts.map +1 -0
  173. package/dist/fields.d.ts +9 -0
  174. package/dist/fields.d.ts.map +1 -0
  175. package/dist/fields.js +1 -0
  176. package/dist/http/guard.d.ts +45 -0
  177. package/dist/http/guard.d.ts.map +1 -0
  178. package/dist/http/handler.d.ts +31 -0
  179. package/dist/http/handler.d.ts.map +1 -0
  180. package/dist/http/index.d.ts +13 -0
  181. package/dist/http/index.d.ts.map +1 -0
  182. package/dist/http/openapi.d.ts +5 -0
  183. package/dist/http/openapi.d.ts.map +1 -0
  184. package/dist/http/params.d.ts +32 -0
  185. package/dist/http/params.d.ts.map +1 -0
  186. package/dist/http/request-db.d.ts +19 -0
  187. package/dist/http/request-db.d.ts.map +1 -0
  188. package/dist/http/respond.d.ts +48 -0
  189. package/dist/http/respond.d.ts.map +1 -0
  190. package/dist/http/rich-text.d.ts +41 -0
  191. package/dist/http/rich-text.d.ts.map +1 -0
  192. package/dist/http/router.d.ts +55 -0
  193. package/dist/http/router.d.ts.map +1 -0
  194. package/dist/http/routes/access.d.ts +13 -0
  195. package/dist/http/routes/access.d.ts.map +1 -0
  196. package/dist/http/routes/admin.d.ts +28 -0
  197. package/dist/http/routes/admin.d.ts.map +1 -0
  198. package/dist/http/routes/ai.d.ts +26 -0
  199. package/dist/http/routes/ai.d.ts.map +1 -0
  200. package/dist/http/routes/auth.d.ts +13 -0
  201. package/dist/http/routes/auth.d.ts.map +1 -0
  202. package/dist/http/routes/documents.d.ts +24 -0
  203. package/dist/http/routes/documents.d.ts.map +1 -0
  204. package/dist/http/routes/generate.d.ts +5 -0
  205. package/dist/http/routes/generate.d.ts.map +1 -0
  206. package/dist/http/routes/media.d.ts +58 -0
  207. package/dist/http/routes/media.d.ts.map +1 -0
  208. package/dist/http/routes/panel.d.ts +20 -0
  209. package/dist/http/routes/panel.d.ts.map +1 -0
  210. package/dist/http/routes/system.d.ts +25 -0
  211. package/dist/http/routes/system.d.ts.map +1 -0
  212. package/dist/http/routes/webhooks.d.ts +17 -0
  213. package/dist/http/routes/webhooks.d.ts.map +1 -0
  214. package/dist/http/spec.d.ts +28 -0
  215. package/dist/http/spec.d.ts.map +1 -0
  216. package/dist/http.d.ts +17 -0
  217. package/dist/http.d.ts.map +1 -0
  218. package/dist/http.js +1 -0
  219. package/dist/i18n/index.d.ts +12 -0
  220. package/dist/i18n/index.d.ts.map +1 -0
  221. package/dist/i18n/names.d.ts +25 -0
  222. package/dist/i18n/names.d.ts.map +1 -0
  223. package/dist/ids.d.ts +28 -0
  224. package/dist/ids.d.ts.map +1 -0
  225. package/dist/index-2ddk43me.js +2 -0
  226. package/dist/index-2prbs05k.js +2 -0
  227. package/dist/index-385ggnge.js +2 -0
  228. package/dist/index-466cwb0b.js +2 -0
  229. package/dist/index-4qrep5f0.js +26 -0
  230. package/dist/index-67e458ws.js +2 -0
  231. package/dist/index-6m1kjq9g.js +2 -0
  232. package/dist/index-6w10rch0.js +3 -0
  233. package/dist/index-761dec5z.js +2 -0
  234. package/dist/index-8nzmqy0f.js +2 -0
  235. package/dist/index-8x2em6c8.js +14 -0
  236. package/dist/index-91fa1gzf.js +2 -0
  237. package/dist/index-9g2n7xa6.js +2 -0
  238. package/dist/index-a8jcwqsf.js +2 -0
  239. package/dist/index-abfzb1ve.js +2 -0
  240. package/dist/index-cv0hpz3d.js +2 -0
  241. package/dist/index-ebtj6ebd.js +0 -0
  242. package/dist/index-g041kfa5.js +18 -0
  243. package/dist/index-g4crf47y.js +0 -0
  244. package/dist/index-hbx67b20.js +7 -0
  245. package/dist/index-hpast878.js +40 -0
  246. package/dist/index-kc1j3h6z.js +2 -0
  247. package/dist/index-p2cqsmvw.js +2 -0
  248. package/dist/index-rg9tpg3p.js +5 -0
  249. package/dist/index-rw0hze6x.js +2 -0
  250. package/dist/index-s9x07zb3.js +2 -0
  251. package/dist/index-sgdnp83t.js +2 -0
  252. package/dist/index-szaq03qq.js +2 -0
  253. package/dist/index-vkwzdfte.js +5 -0
  254. package/dist/index-vzhxn50e.js +2 -0
  255. package/dist/index-x72d1hzh.js +2 -0
  256. package/dist/index-y8kzzn94.js +2 -0
  257. package/dist/index-ypcmns0v.js +2 -0
  258. package/dist/index.d.ts +25 -0
  259. package/dist/index.d.ts.map +1 -0
  260. package/dist/index.js +1 -0
  261. package/dist/jobs/runner.d.ts +77 -0
  262. package/dist/jobs/runner.d.ts.map +1 -0
  263. package/dist/jobs.d.ts +11 -0
  264. package/dist/jobs.d.ts.map +1 -0
  265. package/dist/jobs.js +1 -0
  266. package/dist/media/cloudflare.d.ts +58 -0
  267. package/dist/media/cloudflare.d.ts.map +1 -0
  268. package/dist/media/document.d.ts +29 -0
  269. package/dist/media/document.d.ts.map +1 -0
  270. package/dist/media/gc.d.ts +46 -0
  271. package/dist/media/gc.d.ts.map +1 -0
  272. package/dist/media/index.d.ts +20 -0
  273. package/dist/media/index.d.ts.map +1 -0
  274. package/dist/media/pipeline.d.ts +55 -0
  275. package/dist/media/pipeline.d.ts.map +1 -0
  276. package/dist/media/probe.d.ts +6 -0
  277. package/dist/media/probe.d.ts.map +1 -0
  278. package/dist/media/service.d.ts +26 -0
  279. package/dist/media/service.d.ts.map +1 -0
  280. package/dist/media/sharp.d.ts +28 -0
  281. package/dist/media/sharp.d.ts.map +1 -0
  282. package/dist/media/strip.d.ts +16 -0
  283. package/dist/media/strip.d.ts.map +1 -0
  284. package/dist/media/urls.d.ts +77 -0
  285. package/dist/media/urls.d.ts.map +1 -0
  286. package/dist/media/usages.d.ts +77 -0
  287. package/dist/media/usages.d.ts.map +1 -0
  288. package/dist/media/variants.d.ts +61 -0
  289. package/dist/media/variants.d.ts.map +1 -0
  290. package/dist/migrations.d.ts +115 -0
  291. package/dist/migrations.d.ts.map +1 -0
  292. package/dist/migrations.js +1 -0
  293. package/dist/panel.d.ts +31 -0
  294. package/dist/panel.d.ts.map +1 -0
  295. package/dist/plugins/indexnow.d.ts +82 -0
  296. package/dist/plugins/indexnow.d.ts.map +1 -0
  297. package/dist/plugins.d.ts +9 -0
  298. package/dist/plugins.d.ts.map +1 -0
  299. package/dist/plugins.js +1 -0
  300. package/dist/query.d.ts +40 -0
  301. package/dist/query.d.ts.map +1 -0
  302. package/dist/query.js +1 -0
  303. package/dist/run-bjge3v8e.js +6 -0
  304. package/dist/schema/describe.d.ts +19 -0
  305. package/dist/schema/describe.d.ts.map +1 -0
  306. package/dist/schema/index.d.ts +5 -0
  307. package/dist/schema/index.d.ts.map +1 -0
  308. package/dist/schema/plan.d.ts +20 -0
  309. package/dist/schema/plan.d.ts.map +1 -0
  310. package/dist/schema/snapshot.d.ts +24 -0
  311. package/dist/schema/snapshot.d.ts.map +1 -0
  312. package/dist/schema/system.d.ts +31 -0
  313. package/dist/schema/system.d.ts.map +1 -0
  314. package/dist/schema.d.ts +7 -0
  315. package/dist/schema.d.ts.map +1 -0
  316. package/dist/schema.js +1 -0
  317. package/dist/slugify.d.ts +31 -0
  318. package/dist/slugify.d.ts.map +1 -0
  319. package/dist/storage/bytes.d.ts +17 -0
  320. package/dist/storage/bytes.d.ts.map +1 -0
  321. package/dist/storage/http.d.ts +43 -0
  322. package/dist/storage/http.d.ts.map +1 -0
  323. package/dist/storage/local.d.ts +31 -0
  324. package/dist/storage/local.d.ts.map +1 -0
  325. package/dist/storage/providers.d.ts +95 -0
  326. package/dist/storage/providers.d.ts.map +1 -0
  327. package/dist/storage/sign.d.ts +53 -0
  328. package/dist/storage/sign.d.ts.map +1 -0
  329. package/dist/strings.d.ts +13 -0
  330. package/dist/strings.d.ts.map +1 -0
  331. package/dist/telemetry.d.ts +137 -0
  332. package/dist/telemetry.d.ts.map +1 -0
  333. package/dist/telemetry.js +1 -0
  334. package/dist/types/activity.d.ts +68 -0
  335. package/dist/types/activity.d.ts.map +1 -0
  336. package/dist/types/actor.d.ts +26 -0
  337. package/dist/types/actor.d.ts.map +1 -0
  338. package/dist/types/ai.d.ts +357 -0
  339. package/dist/types/ai.d.ts.map +1 -0
  340. package/dist/types/api.d.ts +268 -0
  341. package/dist/types/api.d.ts.map +1 -0
  342. package/dist/types/auth.d.ts +310 -0
  343. package/dist/types/auth.d.ts.map +1 -0
  344. package/dist/types/config.d.ts +647 -0
  345. package/dist/types/config.d.ts.map +1 -0
  346. package/dist/types/database.d.ts +75 -0
  347. package/dist/types/database.d.ts.map +1 -0
  348. package/dist/types/editor.d.ts +166 -0
  349. package/dist/types/editor.d.ts.map +1 -0
  350. package/dist/types/events.d.ts +72 -0
  351. package/dist/types/events.d.ts.map +1 -0
  352. package/dist/types/fields.d.ts +142 -0
  353. package/dist/types/fields.d.ts.map +1 -0
  354. package/dist/types/hooks.d.ts +142 -0
  355. package/dist/types/hooks.d.ts.map +1 -0
  356. package/dist/types/index.d.ts +25 -0
  357. package/dist/types/index.d.ts.map +1 -0
  358. package/dist/types/instance.d.ts +263 -0
  359. package/dist/types/instance.d.ts.map +1 -0
  360. package/dist/types/jobs.d.ts +78 -0
  361. package/dist/types/jobs.d.ts.map +1 -0
  362. package/dist/types/json.d.ts +24 -0
  363. package/dist/types/json.d.ts.map +1 -0
  364. package/dist/types/locales.d.ts +30 -0
  365. package/dist/types/locales.d.ts.map +1 -0
  366. package/dist/types/media.d.ts +342 -0
  367. package/dist/types/media.d.ts.map +1 -0
  368. package/dist/types/panel.d.ts +249 -0
  369. package/dist/types/panel.d.ts.map +1 -0
  370. package/dist/types/plugin.d.ts +194 -0
  371. package/dist/types/plugin.d.ts.map +1 -0
  372. package/dist/types/query.d.ts +101 -0
  373. package/dist/types/query.d.ts.map +1 -0
  374. package/dist/types/schema.d.ts +203 -0
  375. package/dist/types/schema.d.ts.map +1 -0
  376. package/dist/types/storage.d.ts +61 -0
  377. package/dist/types/storage.d.ts.map +1 -0
  378. package/dist/types/telemetry.d.ts +14 -0
  379. package/dist/types/telemetry.d.ts.map +1 -0
  380. package/dist/types/trash.d.ts +42 -0
  381. package/dist/types/trash.d.ts.map +1 -0
  382. package/dist/types/webhooks.d.ts +133 -0
  383. package/dist/types/webhooks.d.ts.map +1 -0
  384. package/dist/types.d.ts +8 -0
  385. package/dist/types.d.ts.map +1 -0
  386. package/dist/types.js +1 -0
  387. package/dist/uploads.d.ts +22 -0
  388. package/dist/uploads.d.ts.map +1 -0
  389. package/dist/uploads.js +9 -0
  390. package/dist/webhooks/index.d.ts +10 -0
  391. package/dist/webhooks/index.d.ts.map +1 -0
  392. package/dist/webhooks/job.d.ts +17 -0
  393. package/dist/webhooks/job.d.ts.map +1 -0
  394. package/dist/webhooks/service.d.ts +53 -0
  395. package/dist/webhooks/service.d.ts.map +1 -0
  396. package/dist/webhooks/sign.d.ts +26 -0
  397. package/dist/webhooks/sign.d.ts.map +1 -0
  398. package/dist/webhooks.d.ts +10 -0
  399. package/dist/webhooks.d.ts.map +1 -0
  400. package/dist/webhooks.js +1 -0
  401. package/package.json +187 -4
@@ -0,0 +1,194 @@
1
+ import type { Actor } from "./actor";
2
+ import type { CollectionDefinition } from "./config";
3
+ import type { DatabaseAdapter } from "./database";
4
+ import type { AnyEventType, CmsEventListener } from "./events";
5
+ import type { FieldsConfig } from "./fields";
6
+ import type { CollectionDatabaseHooks, HookContext, HookOperation, HookResult, MaybePromise, ScopedDb } from "./hooks";
7
+ import type { CmsInstance } from "./instance";
8
+ import type { ComponentType, JsonObject } from "./json";
9
+ import type { MigrationStep, TableSnapshot } from "./schema";
10
+ /**
11
+ * What a route handler receives.
12
+ *
13
+ * Deliberately not a third-party router's context. The router inside the core
14
+ * is the core's own (section 10): a plugin contract typed against a specific
15
+ * router version is a lock-in the plan's "zero framework coupling" promise
16
+ * cannot afford, and a route that only ever needs `Request` and the matched
17
+ * parameters has no business importing one.
18
+ *
19
+ * The pair `db`/`cms` is the same distinction hooks make, by name rather than
20
+ * by a flag: `db` bypasses access control, `cms` enforces it.
21
+ */
22
+ export interface RouteContext {
23
+ request: Request;
24
+ /** Path parameters, e.g. `{ id: "doc_1" }` for `/posts/:id`. */
25
+ params: Record<string, string>;
26
+ query: URLSearchParams;
27
+ actor: Actor | null;
28
+ /** Access control enforced; the object hooks receive as `ctx.cms`. */
29
+ cms: CmsInstance;
30
+ /**
31
+ * Access-control-bypassing database handle, outside any transaction.
32
+ *
33
+ * Every call opens its own short transaction, because a route is not an
34
+ * operation: there is nothing for a second statement to be atomic with.
35
+ * A route that needs atomicity calls `cms.api`, or opens one itself through
36
+ * `database()`.
37
+ */
38
+ db: ScopedDb;
39
+ /**
40
+ * The adapter, built on first use.
41
+ *
42
+ * A function rather than a resolved value: a route that serves a bundled
43
+ * asset or the OpenAPI document must not open a connection pool, and a D1
44
+ * binding only exists inside a request in the first place.
45
+ */
46
+ database(): Promise<DatabaseAdapter>;
47
+ /** The parsed JSON body. Throws a 400 `CmsError` when it is not JSON. */
48
+ body(): Promise<unknown>;
49
+ /** Shared with the HTTP hooks that run around this request. */
50
+ meta: Record<string, unknown>;
51
+ json(body: unknown, status?: number): Response;
52
+ text(body: string, status?: number): Response;
53
+ }
54
+ export type RouteMethod = "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
55
+ /**
56
+ * An OpenAPI fragment carried by a route into the generated document.
57
+ *
58
+ * Attached to the route rather than written in a separate file, which is what
59
+ * makes an undocumented endpoint impossible: the generator reads the router,
60
+ * so a route that forgot its fragment shows up as one in the document.
61
+ */
62
+ export interface OpenApiRouteSpec {
63
+ summary?: string;
64
+ description?: string;
65
+ tags?: string[];
66
+ /** Query and path parameters, as OpenAPI parameter objects. */
67
+ parameters?: JsonObject[];
68
+ requestBody?: JsonObject;
69
+ responses?: JsonObject;
70
+ /** `false` marks a route that needs no credentials, e.g. a sign-in. */
71
+ security?: boolean;
72
+ }
73
+ export interface RouteDefinition {
74
+ method: RouteMethod;
75
+ /** Relative to `basePath`, e.g. `/analytics/pageviews`; absolute with `root`. */
76
+ path: string;
77
+ /**
78
+ * Matched against the whole URL path instead of below `basePath`.
79
+ *
80
+ * For the files a site has to serve at a fixed address — a verification
81
+ * file at `/<key>.txt`, the public media path — which a crawler fetches
82
+ * from the root and nothing can move. The application mounts the CMS
83
+ * handler on that path too; a request that never reaches the handler is
84
+ * never answered. Root routes are public: no actor is resolved and the
85
+ * HTTP hooks do not run, because they serve files, not the API.
86
+ */
87
+ root?: boolean;
88
+ handler: (context: RouteContext) => Response | Promise<Response>;
89
+ middleware?: ((context: RouteContext, next: () => Promise<Response>) => Promise<Response>)[];
90
+ openapi?: OpenApiRouteSpec;
91
+ }
92
+ /** Tables and collections a plugin brings with it. */
93
+ export interface PluginSchema {
94
+ collections?: Record<string, CollectionDefinition>;
95
+ tables?: TableSnapshot[];
96
+ }
97
+ /**
98
+ * A plugin migration.
99
+ *
100
+ * Steps, not SQL: a plugin that shipped Postgres DDL would be unusable on
101
+ * MongoDB, and the whole point of the neutral step list is that the adapter
102
+ * decides how a change is expressed.
103
+ */
104
+ export interface PluginMigration {
105
+ id: string;
106
+ steps: MigrationStep[];
107
+ }
108
+ /** Changes a plugin makes to collections the user declared. */
109
+ export interface CollectionPatch {
110
+ collection: string;
111
+ fields?: FieldsConfig;
112
+ hooks?: CollectionDatabaseHooks;
113
+ }
114
+ export interface PluginContext {
115
+ collections: Record<string, CollectionDefinition>;
116
+ basePath: string;
117
+ }
118
+ /**
119
+ * A hook a plugin installs on a collection it does not own.
120
+ *
121
+ * Ordering is explicit rather than registration-dependent: plugin hooks run
122
+ * in `priority` order and the configuration's own hooks always run last, so a
123
+ * user can always override what a plugin decided (section 5).
124
+ */
125
+ export interface HookRegistration {
126
+ collection: string;
127
+ operation: HookOperation;
128
+ timing: "before" | "after";
129
+ /** Lower runs first. Plugin hooks default to 0, user hooks always run last. */
130
+ priority?: number;
131
+ handler: (input: JsonObject, context: HookContext) => MaybePromise<HookResult<JsonObject>>;
132
+ }
133
+ /** Extra methods a plugin adds to the typed client. */
134
+ export type ClientExtension<Ext> = (base: {
135
+ baseUrl: string;
136
+ request: (path: string, init?: RequestInit & {
137
+ query?: Record<string, string>;
138
+ }) => Promise<unknown>;
139
+ }) => Ext;
140
+ /**
141
+ * Panel surfaces a plugin can extend. Rendered by `@heyo-sh/heyo-cms-admin`.
142
+ *
143
+ * `views` and `fields` are components, and a component cannot cross HTTP —
144
+ * the panel is one static bundle, compiled before this plugin existed. They
145
+ * are useful to a deployment that builds its own panel bundle. For the
146
+ * shipped one, `scripts` is the mechanism: the panel loads each URL at boot
147
+ * and the script registers its controls against `window.heyoCmsPanel`.
148
+ */
149
+ export interface AdminExtension {
150
+ navItems?: {
151
+ label: string;
152
+ path: string;
153
+ icon?: string;
154
+ }[];
155
+ views?: Record<string, ComponentType<Record<string, unknown>>>;
156
+ fields?: Record<string, ComponentType<Record<string, unknown>>>;
157
+ /**
158
+ * Scripts the panel loads before it renders.
159
+ *
160
+ * Relative URLs are resolved against `basePath`, so the usual arrangement
161
+ * is a plugin route serving its own bundle: `/analytics/panel.js`.
162
+ */
163
+ scripts?: string[];
164
+ }
165
+ /**
166
+ * A plugin.
167
+ *
168
+ * `Ext` is what the plugin adds to the typed client, and it is only ever in a
169
+ * return position — which is what lets a configuration hold
170
+ * `CmsPlugin<unknown>[]` while `heyoCmsClient({ plugins: [...] })` still
171
+ * recovers the concrete extension types from the tuple it is handed.
172
+ */
173
+ export interface CmsPlugin<Ext = Record<string, never>> {
174
+ id: string;
175
+ schema?: PluginSchema;
176
+ migrations?: PluginMigration[];
177
+ extendCollections?: (context: PluginContext) => CollectionPatch[];
178
+ hooks?: HookRegistration[];
179
+ /**
180
+ * Listeners for committed events, as `cms.on()` would register them.
181
+ *
182
+ * The place for a side effect that must not happen unless the write did:
183
+ * a ping to a search engine, a cache purge, a message. Delivered from the
184
+ * outbox after the commit — never for a rolled back write, retried with
185
+ * backoff when a listener throws — so a listener must tolerate seeing an
186
+ * event twice (`event.id` is stable). `"*"` receives every event.
187
+ */
188
+ events?: Partial<Record<AnyEventType, CmsEventListener>>;
189
+ /** Registered under `basePath` automatically, exactly like core routes. */
190
+ routes?: RouteDefinition[];
191
+ client?: ClientExtension<Ext>;
192
+ admin?: AdminExtension;
193
+ }
194
+ //# sourceMappingURL=plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/types/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EACV,uBAAuB,EACvB,WAAW,EACX,aAAa,EACb,UAAU,EACV,YAAY,EACZ,QAAQ,EACT,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE7D;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,gEAAgE;IAChE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,sEAAsE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distinct from its serialisation: Postgres wants a timestamp,
6
+ * SQLite wants an integer, MongoDB wants a `Date`. Deciding that inside the
7
+ * adapter is the only way the engine can stay engine-agnostic.
8
+ */
9
+ export type ColumnValue = JsonValue | Date | Uint8Array;
10
+ export type Row = Record<string, ColumnValue>;
11
+ /**
12
+ * A dotted path into a row: `id`, `created_at`, `data.title`, `data.title.pl`.
13
+ *
14
+ * Field names are validated to exclude dots, so splitting on `.` is lossless.
15
+ * The first segment names a column; the rest, when present, address a path
16
+ * inside that column's JSON document.
17
+ */
18
+ export type FieldPath = string;
19
+ export type Comparator = "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "in" | "nin" | "like" | "ilike" | "contains" | "exists";
20
+ /**
21
+ * The filter AST.
22
+ *
23
+ * This is the hard boundary from section 12: the engine builds `Where`, the
24
+ * adapter turns it into SQL or into a MongoDB filter document. If a feature
25
+ * cannot be expressed here, it cannot be expressed in the engine either —
26
+ * which is the constraint that keeps a third database adapter cheap.
27
+ */
28
+ export type Where = {
29
+ kind: "and";
30
+ conditions: Where[];
31
+ } | {
32
+ kind: "or";
33
+ conditions: Where[];
34
+ } | {
35
+ kind: "not";
36
+ condition: Where;
37
+ } | {
38
+ kind: "compare";
39
+ path: FieldPath;
40
+ operator: Comparator;
41
+ value: ColumnValue | ColumnValue[];
42
+ };
43
+ export interface OrderBy {
44
+ path: FieldPath;
45
+ direction: "asc" | "desc";
46
+ }
47
+ export interface Query {
48
+ table: string;
49
+ /** Omitted means every column. Paths may reach into the document body. */
50
+ select?: FieldPath[];
51
+ where?: Where;
52
+ orderBy?: OrderBy[];
53
+ limit?: number;
54
+ offset?: number;
55
+ /**
56
+ * Returns a single row `{ count }` instead of the matching rows. Counting
57
+ * belongs in the AST rather than in a second adapter method, so pagination
58
+ * never needs a code path the adapter contract does not cover.
59
+ */
60
+ count?: boolean;
61
+ }
62
+ export type Mutation = {
63
+ kind: "insert";
64
+ table: string;
65
+ values: Row;
66
+ returning?: boolean;
67
+ } | {
68
+ kind: "update";
69
+ table: string;
70
+ where: Where;
71
+ set: Row;
72
+ returning?: boolean;
73
+ } | {
74
+ kind: "delete";
75
+ table: string;
76
+ where: Where;
77
+ returning?: boolean;
78
+ };
79
+ /**
80
+ * What a mutation reports back.
81
+ *
82
+ * The plan sketched `Promise<Row>`, which cannot describe a delete or a
83
+ * multi-row update. `count` is always meaningful; `rows` is populated when the
84
+ * mutation asked for `returning`.
85
+ */
86
+ export interface MutationResult {
87
+ rows: Row[];
88
+ count: number;
89
+ }
90
+ /**
91
+ * A transaction handle.
92
+ *
93
+ * `real` is false when the engine could not start a true transaction — MongoDB
94
+ * without a replica set. Hooks and the outbox read it to switch to the
95
+ * compensating path instead of silently losing atomicity (section 12).
96
+ */
97
+ export interface Tx {
98
+ readonly id: string;
99
+ readonly real: boolean;
100
+ }
101
+ //# sourceMappingURL=query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/types/query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExC;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,IAAI,GAAG,UAAU,CAAC;AAExD,MAAM,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AAE9C;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B,MAAM,MAAM,UAAU,GAClB,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,KAAK,GACL,IAAI,GACJ,KAAK,GACL,IAAI,GACJ,KAAK,GACL,MAAM,GACN,OAAO,GACP,UAAU,GACV,QAAQ,CAAC;AAEb;;;;;;;GAOG;AACH,MAAM,MAAM,KAAK,GACb;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,UAAU,EAAE,KAAK,EAAE,CAAA;CAAE,GACpC;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,UAAU,E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KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,MAAM,WAAW,EAAE;IACjB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;CACxB"}
@@ -0,0 +1,203 @@
1
+ import type { JsonPrimitive, JsonValue } from "./json";
2
+ /**
3
+ * The storage types every supported engine can express.
4
+ *
5
+ * The list is deliberately short. A type that only Postgres understands would
6
+ * force the MongoDB and SQLite adapters to invent a translation, and the field
7
+ * registry would start encoding engine differences that the plan puts behind
8
+ * the adapter boundary (section 12).
9
+ */
10
+ export type ColumnType = "text" | "integer" | "bigint" | "real" | "boolean" | "timestamp" | "json" | "blob";
11
+ /** What a foreign key points at, and what happens when the target goes away. */
12
+ export interface ForeignKeyDefinition {
13
+ table: string;
14
+ column: string;
15
+ onDelete?: "cascade" | "set-null" | "restrict";
16
+ }
17
+ /**
18
+ * Where a value physically lives.
19
+ *
20
+ * `document` means "inside the JSON body of the row". Content fields use it,
21
+ * which is what lets a new locale or a new field ship without a table
22
+ * rewrite (sections 9 and 12). System collections use `column`, because they
23
+ * are queried by the engine itself on every request.
24
+ */
25
+ export type ColumnStorage = "column" | "document";
26
+ /**
27
+ * What a field type asks the storage layer for.
28
+ *
29
+ * Returned by `FieldType.column()`. For content fields only `type`, `nullable`,
30
+ * `array`, `unique`, `index` and `default` are meaningful: the value lands in
31
+ * the document body, and `unique`/`index` become expression indexes over the
32
+ * JSON path rather than table columns.
33
+ */
34
+ export interface ColumnDefinition {
35
+ type: ColumnType;
36
+ nullable?: boolean;
37
+ /** Literal default. Non-literal defaults belong in a hook, not in DDL. */
38
+ default?: JsonPrimitive;
39
+ unique?: boolean;
40
+ index?: boolean;
41
+ /** Multi-value field: stored as a JSON array, never as a native array type. */
42
+ array?: boolean;
43
+ references?: ForeignKeyDefinition;
44
+ storage?: ColumnStorage;
45
+ }
46
+ /** A column as it exists in a snapshot: a definition that knows its name. */
47
+ export interface ColumnSnapshot extends ColumnDefinition {
48
+ name: string;
49
+ nullable: boolean;
50
+ }
51
+ /**
52
+ * An index target.
53
+ *
54
+ * `json` targets are what make content queryable without promoting fields to
55
+ * columns: Postgres indexes the `data ->> 'slug'` expression, SQLite indexes
56
+ * `json_extract(data, '$.slug')`, MongoDB indexes `data.slug`. Same snapshot,
57
+ * three renderings, decided inside the adapter.
58
+ */
59
+ export type IndexTarget = {
60
+ kind: "column";
61
+ column: string;
62
+ } | {
63
+ kind: "json";
64
+ column: string;
65
+ path: string[];
66
+ type: ColumnType;
67
+ };
68
+ export interface IndexSnapshot {
69
+ name: string;
70
+ table: string;
71
+ targets: IndexTarget[];
72
+ unique: boolean;
73
+ /**
74
+ * A partial-index predicate, restricted to one equality on purpose.
75
+ *
76
+ * Every content collection shares the `documents` table, so an index for
77
+ * `posts.slug` has to exclude the other collections' rows. One equality is
78
+ * all that requires, and it is the only predicate all three engines express
79
+ * identically (`WHERE`, `WHERE`, `partialFilterExpression`).
80
+ */
81
+ where?: {
82
+ column: string;
83
+ equals: string;
84
+ };
85
+ }
86
+ export interface TableSnapshot {
87
+ name: string;
88
+ /** Sorted by name so two runs of `generate` cannot disagree on ordering. */
89
+ columns: ColumnSnapshot[];
90
+ primaryKey: string[];
91
+ indexes: IndexSnapshot[];
92
+ /**
93
+ * The collection this table stores, when it is a content table. Backfill
94
+ * steps need it to scope an update to one collection inside `documents`.
95
+ */
96
+ documentColumn?: string;
97
+ }
98
+ /**
99
+ * A content field as the migration layer sees it.
100
+ *
101
+ * Content lives in a JSON body, so most field changes move no DDL at all.
102
+ * They still have to be recorded: adding a field with a default is a
103
+ * backfill, removing one is a cleanup, and marking one unique is an index.
104
+ * Without this logical layer the diff would see two identical `documents`
105
+ * tables and generate nothing.
106
+ */
107
+ export interface FieldSnapshot {
108
+ name: string;
109
+ type: string;
110
+ localized: boolean;
111
+ required: boolean;
112
+ unique: boolean;
113
+ index: boolean;
114
+ default?: JsonValue;
115
+ relationTo?: string;
116
+ column: ColumnDefinition;
117
+ }
118
+ export interface CollectionSnapshot {
119
+ name: string;
120
+ slug: string;
121
+ kind: "collection" | "global";
122
+ /** The physical table; `documents` for everything the user declares. */
123
+ table: string;
124
+ documentColumn: string;
125
+ /** Sorted by name. */
126
+ fields: FieldSnapshot[];
127
+ }
128
+ export interface SchemaSnapshot {
129
+ version: 1;
130
+ /** Sorted by name. Determinism is the whole point of the snapshot. */
131
+ tables: TableSnapshot[];
132
+ /** Sorted by name. The logical layer behind the JSON document body. */
133
+ collections: CollectionSnapshot[];
134
+ }
135
+ /** Which attributes of a column a migration has to alter. */
136
+ export type ColumnChange = "type" | "nullable" | "default" | "references";
137
+ /**
138
+ * A neutral migration step.
139
+ *
140
+ * `plan()` produces these from two snapshots and nothing else, so the same
141
+ * diff drives a `.sql` file on Postgres, a `.sql` file on SQLite and an index
142
+ * plus backfill program on MongoDB. No SQL is constructed outside an adapter.
143
+ */
144
+ export type MigrationStep = {
145
+ kind: "create_table";
146
+ table: TableSnapshot;
147
+ } | {
148
+ kind: "drop_table";
149
+ table: string;
150
+ } | {
151
+ kind: "add_column";
152
+ table: string;
153
+ column: ColumnSnapshot;
154
+ } | {
155
+ kind: "drop_column";
156
+ table: string;
157
+ column: string;
158
+ } | {
159
+ kind: "alter_column";
160
+ table: string;
161
+ column: ColumnSnapshot;
162
+ previous: ColumnSnapshot;
163
+ changes: ColumnChange[];
164
+ } | {
165
+ kind: "create_index";
166
+ index: IndexSnapshot;
167
+ } | {
168
+ kind: "drop_index";
169
+ table: string;
170
+ index: string;
171
+ } | {
172
+ /** Writes a default into documents that predate the field. */
173
+ kind: "set_document_field";
174
+ table: string;
175
+ collection: string;
176
+ documentColumn: string;
177
+ path: string[];
178
+ value: JsonValue;
179
+ } | {
180
+ /** Removes a field that left the collection, so reads stop seeing it. */
181
+ kind: "unset_document_field";
182
+ table: string;
183
+ collection: string;
184
+ documentColumn: string;
185
+ path: string[];
186
+ };
187
+ /**
188
+ * A migration as it is written into the repository.
189
+ *
190
+ * SQL engines get `.sql` a human can read in a pull request; MongoDB has no
191
+ * DDL, so it gets the step list itself — index creations, uniqueness changes
192
+ * and backfills — as data the adapter replays. Both are reviewed the same way,
193
+ * numbered the same way and applied by the same CLI.
194
+ */
195
+ export interface MigrationArtifact {
196
+ /** `0003_add_posts_slug_index` — numbered, ordered, stable. */
197
+ id: string;
198
+ extension: "sql" | "json";
199
+ content: string;
200
+ /** One line per step, printed by `heyo-cms generate`. */
201
+ summary: string[];
202
+ }
203
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/types/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEvD;;;;;;;GAOG;AACH,MAAM,MAAM,UAAU,GAClB,MAAM,GACN,SAAS,GACT,QAAQ,GACR,MAAM,GACN,SAAS,GACT,WAAW,GACX,MAAM,GACN,MAAM,CAAC;AAEX,gFAAgF;AAChF,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;CAChD;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,UAAU,CAAC;AAElD;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0EAA0E;IAC1E,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,+EAA+E;IAC/E,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,OAAO,CAAC,EAAE,aAAa,CAA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AA;CAAE,GACpD;IACE,8DAA8D;IAC9D,IAAI,EAAE,oBAAoB,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,KAAK,EAAE,SAAS,CAAC;CAClB,GACD;IACE,yEAAyE;IACzE,IAAI,EAAE,sBAAsB,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC;AAEN;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC,+DAA+D;IAC/D,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,KAAK,GAAG,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,yDAAyD;IACzD,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB"}
@@ -0,0 +1,61 @@
1
+ /** Everything the storage layer records about an object it is given. */
2
+ export interface ObjectMeta {
3
+ contentType: string;
4
+ size?: number;
5
+ cacheControl?: string;
6
+ contentDisposition?: string;
7
+ /** Provider-side user metadata. Never trusted for access decisions. */
8
+ metadata?: Record<string, string>;
9
+ }
10
+ export interface SignedUrlOptions {
11
+ /** Seconds, or a duration string such as `1h`. */
12
+ expiresIn?: number | string;
13
+ download?: boolean;
14
+ filename?: string;
15
+ }
16
+ /** What `head()` reports for an object that exists. */
17
+ export interface StoredObject {
18
+ key: string;
19
+ size: number;
20
+ contentType: string;
21
+ lastModified?: Date;
22
+ }
23
+ /**
24
+ * The whole storage contract.
25
+ *
26
+ * Four required methods is the point: a bespoke adapter for an in-house object
27
+ * store should be a short afternoon, not a project. `head` is optional because
28
+ * media garbage collection can fall back to the size recorded in the database.
29
+ */
30
+ export interface StorageAdapter {
31
+ /** `local`, `s3`, `r2`, `gcs`, `azure`. Printed by `cms.inspect()`. */
32
+ readonly id: string;
33
+ put(key: string, body: ReadableStream | Uint8Array, meta: ObjectMeta): Promise<void>;
34
+ get(key: string): Promise<ReadableStream | null>;
35
+ delete(keys: string[]): Promise<void>;
36
+ url(key: string, options?: SignedUrlOptions): string;
37
+ head?(key: string): Promise<StoredObject | null>;
38
+ /**
39
+ * A time-limited URL for a bucket that is not public.
40
+ *
41
+ * Separate from `url()` and asynchronous because signing is cryptography:
42
+ * making `url()` async instead would make the common case — a public file
43
+ * on a CDN — pay for a feature it does not use, in every template that
44
+ * renders an image.
45
+ */
46
+ signedUrl?(key: string, options?: SignedUrlOptions): Promise<string>;
47
+ /**
48
+ * Where new objects should live, given the file being stored.
49
+ *
50
+ * The adapter decides because the layout belongs to the bucket: a lifecycle
51
+ * rule that archives `2024/` only works if the adapter that was configured
52
+ * with it is the one choosing prefixes (section 6).
53
+ */
54
+ readonly prefix?: (file: {
55
+ id: string;
56
+ filename: string;
57
+ }) => string;
58
+ }
59
+ export type StorageAdapterFactory = () => StorageAdapter | Promise<StorageAdapter>;
60
+ export type StorageConfig = StorageAdapter | StorageAdapterFactory;
61
+ //# sourceMappingURL=storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/types/storage.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,uEAAuE;IACvE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACnC;AAED,MAAM,WAAW,gBAAgB;IAC/B,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC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oCms({ telemetry })` accepts.
3
+ *
4
+ * The behaviour, and the list of everything that is ever sent, is documented
5
+ * on the module that implements it: `@heyo-sh/heyo-cms/telemetry`. In short —
6
+ * the CLI reports, a deployment never does, and `{ enabled: false }` here is
7
+ * one of three ways to turn even that off.
8
+ */
9
+ export interface TelemetryConfig {
10
+ enabled?: boolean;
11
+ /** For a self-hosted collector. */
12
+ endpoint?: string;
13
+ }
14
+ //# sourceMappingURL=telemetry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/types/telemetry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,42 @@
1
+ import type { OperationArgs } from "./api";
2
+ import type { JsonObject } from "./json";
3
+ /**
4
+ * The trash, across every collection at once.
5
+ *
6
+ * The per-collection API already has `restore` and `purge`; this exists
7
+ * because the panel's trash screen and `GET /trash` (section 10) are one list
8
+ * of everything an editor deleted, and building that by asking every
9
+ * collection in turn would page wrongly and count wrongly.
10
+ */
11
+ export interface TrashListArgs extends OperationArgs {
12
+ /** Collection name. Omitted means every collection the actor may read. */
13
+ collection?: string;
14
+ limit?: number;
15
+ cursor?: string;
16
+ }
17
+ export interface TrashedEntry {
18
+ collection: string;
19
+ id: string;
20
+ deletedAt: string | null;
21
+ /** When the purge job will remove it; `null` when retention is off. */
22
+ purgeAfter: string | null;
23
+ /** The document itself, with field-level read access already applied. */
24
+ document: JsonObject;
25
+ }
26
+ export interface TrashPage {
27
+ entries: TrashedEntry[];
28
+ limit: number;
29
+ hasNextPage: boolean;
30
+ cursor: string | null;
31
+ }
32
+ export interface TrashTargetArgs extends OperationArgs {
33
+ collection: string;
34
+ id: string;
35
+ }
36
+ export interface CmsTrash {
37
+ /** Newest deletion first. Keyset-paged, like every other list. */
38
+ list(args?: TrashListArgs): Promise<TrashPage>;
39
+ restore(args: TrashTargetArgs): Promise<JsonObject | null>;
40
+ purge(args: TrashTargetArgs): Promise<JsonObject | null>;
41
+ }
42
+ //# sourceMappingURL=trash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trash.d.ts","sourceRoot":"","sources":["../../src/types/trash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEzC;;;;;;;GAOG;AACH,MAAM,WAAW,aAAc,SAAQ,aAAa;IAClD,0EAA0E;IAC1E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,uEAAuE;IACvE,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,yEAAyE;IACzE,QAAQ,EAAE,UAAU,CAAC;CACtB;AAED,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,eAAgB,SAAQ,aAAa;IACpD,UAAU,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,QAAQ;IACvB,kEAAkE;IAClE,IAAI,CAAC,IAAI,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IAC/C,OAAO,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI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