@heyo-sh/heyo-cms 0.0.0-stage → 0.1.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 (382) 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 +38 -0
  8. package/dist/adapters/astro.d.ts.map +1 -0
  9. package/dist/adapters/astro.js +1 -0
  10. package/dist/adapters/next.d.ts +31 -0
  11. package/dist/adapters/next.d.ts.map +1 -0
  12. package/dist/adapters/next.js +1 -0
  13. package/dist/adapters/nuxt.d.ts +47 -0
  14. package/dist/adapters/nuxt.d.ts.map +1 -0
  15. package/dist/adapters/nuxt.js +1 -0
  16. package/dist/adapters/react-router.d.ts +29 -0
  17. package/dist/adapters/react-router.d.ts.map +1 -0
  18. package/dist/adapters/react-router.js +1 -0
  19. package/dist/adapters/sveltekit.d.ts +37 -0
  20. package/dist/adapters/sveltekit.d.ts.map +1 -0
  21. package/dist/adapters/sveltekit.js +1 -0
  22. package/dist/ai/assistant/context.d.ts +64 -0
  23. package/dist/ai/assistant/context.d.ts.map +1 -0
  24. package/dist/ai/assistant/limits.d.ts +10 -0
  25. package/dist/ai/assistant/limits.d.ts.map +1 -0
  26. package/dist/ai/assistant/plans.d.ts +83 -0
  27. package/dist/ai/assistant/plans.d.ts.map +1 -0
  28. package/dist/ai/assistant/prompt.d.ts +22 -0
  29. package/dist/ai/assistant/prompt.d.ts.map +1 -0
  30. package/dist/ai/assistant/run.d.ts +59 -0
  31. package/dist/ai/assistant/run.d.ts.map +1 -0
  32. package/dist/ai/assistant/runtime.d.ts +35 -0
  33. package/dist/ai/assistant/runtime.d.ts.map +1 -0
  34. package/dist/ai/assistant/schema.d.ts +66 -0
  35. package/dist/ai/assistant/schema.d.ts.map +1 -0
  36. package/dist/ai/assistant/tools.d.ts +41 -0
  37. package/dist/ai/assistant/tools.d.ts.map +1 -0
  38. package/dist/ai/assistant/values.d.ts +33 -0
  39. package/dist/ai/assistant/values.d.ts.map +1 -0
  40. package/dist/ai/crypto.d.ts +12 -0
  41. package/dist/ai/crypto.d.ts.map +1 -0
  42. package/dist/ai/index.d.ts +19 -0
  43. package/dist/ai/index.d.ts.map +1 -0
  44. package/dist/ai/pi.d.ts +89 -0
  45. package/dist/ai/pi.d.ts.map +1 -0
  46. package/dist/ai/registry.d.ts +66 -0
  47. package/dist/ai/registry.d.ts.map +1 -0
  48. package/dist/ai/service.d.ts +31 -0
  49. package/dist/ai/service.d.ts.map +1 -0
  50. package/dist/ai/variant-translation.d.ts +6 -0
  51. package/dist/ai/variant-translation.d.ts.map +1 -0
  52. package/dist/ai.d.ts +12 -0
  53. package/dist/ai.d.ts.map +1 -0
  54. package/dist/ai.js +1 -0
  55. package/dist/auth/config.d.ts +65 -0
  56. package/dist/auth/config.d.ts.map +1 -0
  57. package/dist/auth/crypto.d.ts +44 -0
  58. package/dist/auth/crypto.d.ts.map +1 -0
  59. package/dist/auth/index.d.ts +15 -0
  60. package/dist/auth/index.d.ts.map +1 -0
  61. package/dist/auth/oauth.d.ts +93 -0
  62. package/dist/auth/oauth.d.ts.map +1 -0
  63. package/dist/auth/service.d.ts +38 -0
  64. package/dist/auth/service.d.ts.map +1 -0
  65. package/dist/auth/totp.d.ts +34 -0
  66. package/dist/auth/totp.d.ts.map +1 -0
  67. package/dist/auth.d.ts +9 -0
  68. package/dist/auth.d.ts.map +1 -0
  69. package/dist/auth.js +1 -0
  70. package/dist/cli.d.ts +3 -0
  71. package/dist/cli.d.ts.map +1 -0
  72. package/dist/cli.js +30 -0
  73. package/dist/client/index.d.ts +51 -0
  74. package/dist/client/index.d.ts.map +1 -0
  75. package/dist/client/types.d.ts +340 -0
  76. package/dist/client/types.d.ts.map +1 -0
  77. package/dist/client.d.ts +46 -0
  78. package/dist/client.d.ts.map +1 -0
  79. package/dist/client.js +1 -0
  80. package/dist/config.d.ts +31 -0
  81. package/dist/config.d.ts.map +1 -0
  82. package/dist/config.js +1 -0
  83. package/dist/content/export.d.ts +28 -0
  84. package/dist/content/export.d.ts.map +1 -0
  85. package/dist/content/import.d.ts +65 -0
  86. package/dist/content/import.d.ts.map +1 -0
  87. package/dist/content/records.d.ts +73 -0
  88. package/dist/content/records.d.ts.map +1 -0
  89. package/dist/content.d.ts +12 -0
  90. package/dist/content.d.ts.map +1 -0
  91. package/dist/content.js +1 -0
  92. package/dist/db/d1.d.ts +29 -0
  93. package/dist/db/d1.d.ts.map +1 -0
  94. package/dist/db/d1.js +1 -0
  95. package/dist/db/mongodb.d.ts +128 -0
  96. package/dist/db/mongodb.d.ts.map +1 -0
  97. package/dist/db/mongodb.js +2 -0
  98. package/dist/db/postgres.d.ts +37 -0
  99. package/dist/db/postgres.d.ts.map +1 -0
  100. package/dist/db/postgres.js +1 -0
  101. package/dist/db/sql/adapter.d.ts +57 -0
  102. package/dist/db/sql/adapter.d.ts.map +1 -0
  103. package/dist/db/sql/compile.d.ts +50 -0
  104. package/dist/db/sql/compile.d.ts.map +1 -0
  105. package/dist/db/sql/ddl.d.ts +34 -0
  106. package/dist/db/sql/ddl.d.ts.map +1 -0
  107. package/dist/db/sql/dialect.d.ts +35 -0
  108. package/dist/db/sql/dialect.d.ts.map +1 -0
  109. package/dist/db/sql/driver.d.ts +34 -0
  110. package/dist/db/sql/driver.d.ts.map +1 -0
  111. package/dist/db/sql/introspect.d.ts +15 -0
  112. package/dist/db/sql/introspect.d.ts.map +1 -0
  113. package/dist/db/sqlite.d.ts +39 -0
  114. package/dist/db/sqlite.d.ts.map +1 -0
  115. package/dist/db/sqlite.js +1 -0
  116. package/dist/defaults.d.ts +5 -0
  117. package/dist/defaults.d.ts.map +1 -0
  118. package/dist/duration.d.ts +12 -0
  119. package/dist/duration.d.ts.map +1 -0
  120. package/dist/editor/builtin.d.ts +45 -0
  121. package/dist/editor/builtin.d.ts.map +1 -0
  122. package/dist/editor/index.d.ts +14 -0
  123. package/dist/editor/index.d.ts.map +1 -0
  124. package/dist/editor/markdown.d.ts +19 -0
  125. package/dist/editor/markdown.d.ts.map +1 -0
  126. package/dist/editor/registry.d.ts +30 -0
  127. package/dist/editor/registry.d.ts.map +1 -0
  128. package/dist/editor/serialize.d.ts +41 -0
  129. package/dist/editor/serialize.d.ts.map +1 -0
  130. package/dist/editor.d.ts +10 -0
  131. package/dist/editor.d.ts.map +1 -0
  132. package/dist/editor.js +1 -0
  133. package/dist/engine/access.d.ts +33 -0
  134. package/dist/engine/access.d.ts.map +1 -0
  135. package/dist/engine/activity.d.ts +16 -0
  136. package/dist/engine/activity.d.ts.map +1 -0
  137. package/dist/engine/cursor.d.ts +19 -0
  138. package/dist/engine/cursor.d.ts.map +1 -0
  139. package/dist/engine/documents.d.ts +81 -0
  140. package/dist/engine/documents.d.ts.map +1 -0
  141. package/dist/engine/engine.d.ts +276 -0
  142. package/dist/engine/engine.d.ts.map +1 -0
  143. package/dist/engine/field-access.d.ts +21 -0
  144. package/dist/engine/field-access.d.ts.map +1 -0
  145. package/dist/engine/hooks.d.ts +58 -0
  146. package/dist/engine/hooks.d.ts.map +1 -0
  147. package/dist/engine/index.d.ts +20 -0
  148. package/dist/engine/index.d.ts.map +1 -0
  149. package/dist/engine/jobs.d.ts +63 -0
  150. package/dist/engine/jobs.d.ts.map +1 -0
  151. package/dist/engine/locales.d.ts +40 -0
  152. package/dist/engine/locales.d.ts.map +1 -0
  153. package/dist/engine/outbox.d.ts +81 -0
  154. package/dist/engine/outbox.d.ts.map +1 -0
  155. package/dist/engine/relations.d.ts +60 -0
  156. package/dist/engine/relations.d.ts.map +1 -0
  157. package/dist/engine/scoped-db.d.ts +13 -0
  158. package/dist/engine/scoped-db.d.ts.map +1 -0
  159. package/dist/engine/trash.d.ts +25 -0
  160. package/dist/engine/trash.d.ts.map +1 -0
  161. package/dist/errors.d.ts +42 -0
  162. package/dist/errors.d.ts.map +1 -0
  163. package/dist/fields/builtin.d.ts +142 -0
  164. package/dist/fields/builtin.d.ts.map +1 -0
  165. package/dist/fields/index.d.ts +3 -0
  166. package/dist/fields/index.d.ts.map +1 -0
  167. package/dist/fields/registry.d.ts +35 -0
  168. package/dist/fields/registry.d.ts.map +1 -0
  169. package/dist/fields.d.ts +8 -0
  170. package/dist/fields.d.ts.map +1 -0
  171. package/dist/fields.js +1 -0
  172. package/dist/http/guard.d.ts +45 -0
  173. package/dist/http/guard.d.ts.map +1 -0
  174. package/dist/http/handler.d.ts +31 -0
  175. package/dist/http/handler.d.ts.map +1 -0
  176. package/dist/http/index.d.ts +13 -0
  177. package/dist/http/index.d.ts.map +1 -0
  178. package/dist/http/openapi.d.ts +5 -0
  179. package/dist/http/openapi.d.ts.map +1 -0
  180. package/dist/http/params.d.ts +32 -0
  181. package/dist/http/params.d.ts.map +1 -0
  182. package/dist/http/request-db.d.ts +19 -0
  183. package/dist/http/request-db.d.ts.map +1 -0
  184. package/dist/http/respond.d.ts +48 -0
  185. package/dist/http/respond.d.ts.map +1 -0
  186. package/dist/http/rich-text.d.ts +30 -0
  187. package/dist/http/rich-text.d.ts.map +1 -0
  188. package/dist/http/router.d.ts +55 -0
  189. package/dist/http/router.d.ts.map +1 -0
  190. package/dist/http/routes/access.d.ts +13 -0
  191. package/dist/http/routes/access.d.ts.map +1 -0
  192. package/dist/http/routes/admin.d.ts +28 -0
  193. package/dist/http/routes/admin.d.ts.map +1 -0
  194. package/dist/http/routes/ai.d.ts +26 -0
  195. package/dist/http/routes/ai.d.ts.map +1 -0
  196. package/dist/http/routes/auth.d.ts +13 -0
  197. package/dist/http/routes/auth.d.ts.map +1 -0
  198. package/dist/http/routes/documents.d.ts +24 -0
  199. package/dist/http/routes/documents.d.ts.map +1 -0
  200. package/dist/http/routes/generate.d.ts +5 -0
  201. package/dist/http/routes/generate.d.ts.map +1 -0
  202. package/dist/http/routes/media.d.ts +28 -0
  203. package/dist/http/routes/media.d.ts.map +1 -0
  204. package/dist/http/routes/panel.d.ts +20 -0
  205. package/dist/http/routes/panel.d.ts.map +1 -0
  206. package/dist/http/routes/system.d.ts +25 -0
  207. package/dist/http/routes/system.d.ts.map +1 -0
  208. package/dist/http/routes/webhooks.d.ts +17 -0
  209. package/dist/http/routes/webhooks.d.ts.map +1 -0
  210. package/dist/http/spec.d.ts +28 -0
  211. package/dist/http/spec.d.ts.map +1 -0
  212. package/dist/http.d.ts +17 -0
  213. package/dist/http.d.ts.map +1 -0
  214. package/dist/http.js +1 -0
  215. package/dist/i18n/index.d.ts +12 -0
  216. package/dist/i18n/index.d.ts.map +1 -0
  217. package/dist/i18n/names.d.ts +25 -0
  218. package/dist/i18n/names.d.ts.map +1 -0
  219. package/dist/ids.d.ts +28 -0
  220. package/dist/ids.d.ts.map +1 -0
  221. package/dist/index-2757kej5.js +2 -0
  222. package/dist/index-2kb5nbxx.js +2 -0
  223. package/dist/index-2z1qe5mw.js +2 -0
  224. package/dist/index-34s342fz.js +2 -0
  225. package/dist/index-5ngtc7gy.js +2 -0
  226. package/dist/index-7a231xfp.js +2 -0
  227. package/dist/index-7k091gpe.js +2 -0
  228. package/dist/index-9g2n7xa6.js +2 -0
  229. package/dist/index-9x1z3b85.js +5 -0
  230. package/dist/index-9zqnf6gx.js +23 -0
  231. package/dist/index-b2ecggck.js +26 -0
  232. package/dist/index-cbwwtcm4.js +2 -0
  233. package/dist/index-ebtj6ebd.js +0 -0
  234. package/dist/index-g4crf47y.js +0 -0
  235. package/dist/index-gpwcmmvr.js +2 -0
  236. package/dist/index-hq05mc1n.js +3 -0
  237. package/dist/index-hy1x46nf.js +2 -0
  238. package/dist/index-k8wbg1dw.js +2 -0
  239. package/dist/index-kbsgt44t.js +2 -0
  240. package/dist/index-m82a0shw.js +2 -0
  241. package/dist/index-md79xr6h.js +5 -0
  242. package/dist/index-nvgwyykk.js +40 -0
  243. package/dist/index-ty698y02.js +2 -0
  244. package/dist/index-vq2978e7.js +14 -0
  245. package/dist/index-vxw0a03g.js +2 -0
  246. package/dist/index-wj8y1xcj.js +2 -0
  247. package/dist/index-x72d1hzh.js +2 -0
  248. package/dist/index-y5mwknr9.js +2 -0
  249. package/dist/index-ymq6jsar.js +2 -0
  250. package/dist/index.d.ts +25 -0
  251. package/dist/index.d.ts.map +1 -0
  252. package/dist/index.js +1 -0
  253. package/dist/jobs/runner.d.ts +77 -0
  254. package/dist/jobs/runner.d.ts.map +1 -0
  255. package/dist/jobs.d.ts +11 -0
  256. package/dist/jobs.d.ts.map +1 -0
  257. package/dist/jobs.js +1 -0
  258. package/dist/media/document.d.ts +28 -0
  259. package/dist/media/document.d.ts.map +1 -0
  260. package/dist/media/gc.d.ts +46 -0
  261. package/dist/media/gc.d.ts.map +1 -0
  262. package/dist/media/index.d.ts +20 -0
  263. package/dist/media/index.d.ts.map +1 -0
  264. package/dist/media/pipeline.d.ts +36 -0
  265. package/dist/media/pipeline.d.ts.map +1 -0
  266. package/dist/media/probe.d.ts +6 -0
  267. package/dist/media/probe.d.ts.map +1 -0
  268. package/dist/media/service.d.ts +26 -0
  269. package/dist/media/service.d.ts.map +1 -0
  270. package/dist/media/sharp.d.ts +28 -0
  271. package/dist/media/sharp.d.ts.map +1 -0
  272. package/dist/media/strip.d.ts +16 -0
  273. package/dist/media/strip.d.ts.map +1 -0
  274. package/dist/media/usages.d.ts +69 -0
  275. package/dist/media/usages.d.ts.map +1 -0
  276. package/dist/media/variants.d.ts +50 -0
  277. package/dist/media/variants.d.ts.map +1 -0
  278. package/dist/migrations.d.ts +115 -0
  279. package/dist/migrations.d.ts.map +1 -0
  280. package/dist/migrations.js +1 -0
  281. package/dist/panel.d.ts +31 -0
  282. package/dist/panel.d.ts.map +1 -0
  283. package/dist/query.d.ts +40 -0
  284. package/dist/query.d.ts.map +1 -0
  285. package/dist/query.js +1 -0
  286. package/dist/run-3r72dwhs.js +6 -0
  287. package/dist/schema/describe.d.ts +19 -0
  288. package/dist/schema/describe.d.ts.map +1 -0
  289. package/dist/schema/index.d.ts +5 -0
  290. package/dist/schema/index.d.ts.map +1 -0
  291. package/dist/schema/plan.d.ts +20 -0
  292. package/dist/schema/plan.d.ts.map +1 -0
  293. package/dist/schema/snapshot.d.ts +22 -0
  294. package/dist/schema/snapshot.d.ts.map +1 -0
  295. package/dist/schema/system.d.ts +22 -0
  296. package/dist/schema/system.d.ts.map +1 -0
  297. package/dist/schema.d.ts +7 -0
  298. package/dist/schema.d.ts.map +1 -0
  299. package/dist/schema.js +1 -0
  300. package/dist/storage/bytes.d.ts +17 -0
  301. package/dist/storage/bytes.d.ts.map +1 -0
  302. package/dist/storage/http.d.ts +43 -0
  303. package/dist/storage/http.d.ts.map +1 -0
  304. package/dist/storage/local.d.ts +31 -0
  305. package/dist/storage/local.d.ts.map +1 -0
  306. package/dist/storage/providers.d.ts +95 -0
  307. package/dist/storage/providers.d.ts.map +1 -0
  308. package/dist/storage/sign.d.ts +53 -0
  309. package/dist/storage/sign.d.ts.map +1 -0
  310. package/dist/strings.d.ts +13 -0
  311. package/dist/strings.d.ts.map +1 -0
  312. package/dist/telemetry.d.ts +137 -0
  313. package/dist/telemetry.d.ts.map +1 -0
  314. package/dist/telemetry.js +1 -0
  315. package/dist/types/activity.d.ts +68 -0
  316. package/dist/types/activity.d.ts.map +1 -0
  317. package/dist/types/actor.d.ts +26 -0
  318. package/dist/types/actor.d.ts.map +1 -0
  319. package/dist/types/ai.d.ts +357 -0
  320. package/dist/types/ai.d.ts.map +1 -0
  321. package/dist/types/api.d.ts +212 -0
  322. package/dist/types/api.d.ts.map +1 -0
  323. package/dist/types/auth.d.ts +310 -0
  324. package/dist/types/auth.d.ts.map +1 -0
  325. package/dist/types/config.d.ts +632 -0
  326. package/dist/types/config.d.ts.map +1 -0
  327. package/dist/types/database.d.ts +75 -0
  328. package/dist/types/database.d.ts.map +1 -0
  329. package/dist/types/editor.d.ts +140 -0
  330. package/dist/types/editor.d.ts.map +1 -0
  331. package/dist/types/events.d.ts +72 -0
  332. package/dist/types/events.d.ts.map +1 -0
  333. package/dist/types/fields.d.ts +142 -0
  334. package/dist/types/fields.d.ts.map +1 -0
  335. package/dist/types/hooks.d.ts +142 -0
  336. package/dist/types/hooks.d.ts.map +1 -0
  337. package/dist/types/index.d.ts +25 -0
  338. package/dist/types/index.d.ts.map +1 -0
  339. package/dist/types/instance.d.ts +263 -0
  340. package/dist/types/instance.d.ts.map +1 -0
  341. package/dist/types/jobs.d.ts +78 -0
  342. package/dist/types/jobs.d.ts.map +1 -0
  343. package/dist/types/json.d.ts +24 -0
  344. package/dist/types/json.d.ts.map +1 -0
  345. package/dist/types/locales.d.ts +30 -0
  346. package/dist/types/locales.d.ts.map +1 -0
  347. package/dist/types/media.d.ts +245 -0
  348. package/dist/types/media.d.ts.map +1 -0
  349. package/dist/types/panel.d.ts +249 -0
  350. package/dist/types/panel.d.ts.map +1 -0
  351. package/dist/types/plugin.d.ts +172 -0
  352. package/dist/types/plugin.d.ts.map +1 -0
  353. package/dist/types/query.d.ts +101 -0
  354. package/dist/types/query.d.ts.map +1 -0
  355. package/dist/types/schema.d.ts +203 -0
  356. package/dist/types/schema.d.ts.map +1 -0
  357. package/dist/types/storage.d.ts +61 -0
  358. package/dist/types/storage.d.ts.map +1 -0
  359. package/dist/types/telemetry.d.ts +14 -0
  360. package/dist/types/telemetry.d.ts.map +1 -0
  361. package/dist/types/trash.d.ts +42 -0
  362. package/dist/types/trash.d.ts.map +1 -0
  363. package/dist/types/webhooks.d.ts +133 -0
  364. package/dist/types/webhooks.d.ts.map +1 -0
  365. package/dist/types.d.ts +8 -0
  366. package/dist/types.d.ts.map +1 -0
  367. package/dist/types.js +1 -0
  368. package/dist/uploads.d.ts +21 -0
  369. package/dist/uploads.d.ts.map +1 -0
  370. package/dist/uploads.js +9 -0
  371. package/dist/webhooks/index.d.ts +10 -0
  372. package/dist/webhooks/index.d.ts.map +1 -0
  373. package/dist/webhooks/job.d.ts +17 -0
  374. package/dist/webhooks/job.d.ts.map +1 -0
  375. package/dist/webhooks/service.d.ts +53 -0
  376. package/dist/webhooks/service.d.ts.map +1 -0
  377. package/dist/webhooks/sign.d.ts +26 -0
  378. package/dist/webhooks/sign.d.ts.map +1 -0
  379. package/dist/webhooks.d.ts +10 -0
  380. package/dist/webhooks.d.ts.map +1 -0
  381. package/dist/webhooks.js +1 -0
  382. package/package.json +183 -4
@@ -0,0 +1,263 @@
1
+ import type { CmsActivity } from "./activity";
2
+ import type { CmsAi } from "./ai";
3
+ import type { GlobalsApi, LocalApi } from "./api";
4
+ import type { CmsAuth } from "./auth";
5
+ import type { EditorSchemaDescription } from "./editor";
6
+ import type { CollectionsConfig, GlobalsConfig, ResolvedCmsConfig } from "./config";
7
+ import type { DatabaseAdapter, DatabaseCapabilities } from "./database";
8
+ import type { AnyEventType, CmsEventListener } from "./events";
9
+ import type { HookOperation } from "./hooks";
10
+ import type { CmsJobs } from "./jobs";
11
+ import type { CmsLocales } from "./locales";
12
+ import type { CmsMedia } from "./media";
13
+ import type { RouteMethod } from "./plugin";
14
+ import type { SchemaSnapshot } from "./schema";
15
+ import type { CmsTrash } from "./trash";
16
+ import type { CmsWebhooks } from "./webhooks";
17
+ /** One entry of the hook pipeline, in the order it will actually run. */
18
+ export interface HookPipelineEntry {
19
+ collection: string;
20
+ operation: HookOperation;
21
+ timing: "before" | "after";
22
+ /** `config` or the id of the plugin that registered it. */
23
+ source: string;
24
+ priority: number;
25
+ }
26
+ export interface RouteInspection {
27
+ method: RouteMethod;
28
+ /** Including `basePath`, i.e. what a client actually calls. */
29
+ path: string;
30
+ /** `core`, or the id of the plugin that registered it. */
31
+ source: string;
32
+ /** How many `before`/`after` wrappers run around the handler. */
33
+ middleware: number;
34
+ }
35
+ /**
36
+ * The panel, printed.
37
+ *
38
+ * `panel: null` means `admin.assets` is not configured, so `admin.path`
39
+ * answers with a page that says so rather than with a bundle. Worth printing
40
+ * because the two are indistinguishable from a 200.
41
+ */
42
+ export interface AdminInspection {
43
+ /** Including `basePath`. */
44
+ path: string;
45
+ panel: string | null;
46
+ }
47
+ /**
48
+ * What authentication is actually turned on.
49
+ *
50
+ * Printed rather than implied: "is two-factor enforced here" and "can this
51
+ * deployment issue API keys" are questions an operator should be able to
52
+ * answer without reading the configuration file.
53
+ */
54
+ export interface AuthInspection {
55
+ methods: string[];
56
+ twoFactor: boolean;
57
+ apiKeys: boolean;
58
+ /** The SSO issuer, when one is configured. */
59
+ sso: string | null;
60
+ roles: string[];
61
+ customRoles: boolean;
62
+ }
63
+ /**
64
+ * One plugin, and what it actually contributed.
65
+ *
66
+ * A list of ids answers "is it installed"; this answers "did it do
67
+ * anything", which is the question somebody has when a plugin appears to be
68
+ * installed and inert.
69
+ */
70
+ export interface PluginInspection {
71
+ id: string;
72
+ collections: string[];
73
+ tables: string[];
74
+ routes: number;
75
+ hooks: number;
76
+ migrations: string[];
77
+ client: boolean;
78
+ admin: boolean;
79
+ }
80
+ export interface CollectionInspection {
81
+ name: string;
82
+ slug: string;
83
+ kind: "collection" | "global";
84
+ fields: {
85
+ name: string;
86
+ type: string;
87
+ localized: boolean;
88
+ required: boolean;
89
+ }[];
90
+ }
91
+ /**
92
+ * What `cms.inspect()` answers.
93
+ *
94
+ * The auto-router and the plugin loader are only acceptable if their result is
95
+ * printable: this is the antidote to "magic" (section 10). Everything the
96
+ * engine decided — schema, hook order, routes — is readable from one call.
97
+ */
98
+ /**
99
+ * What happens to a file, printed.
100
+ *
101
+ * `processor: null` with `variants: "on-demand"` is a working configuration,
102
+ * not a broken one — it means the edge resizes — and the only way to tell the
103
+ * two apart from the outside is to say so here.
104
+ */
105
+ export interface StorageInspection {
106
+ id: string;
107
+ variants: "on-demand" | "pregenerate" | null;
108
+ processor: string | null;
109
+ /** `null` when files are kept forever. */
110
+ purgeAfter: string | null;
111
+ }
112
+ export interface CmsInspection {
113
+ basePath: string;
114
+ database: {
115
+ id: string;
116
+ capabilities: DatabaseCapabilities;
117
+ };
118
+ storage: StorageInspection | null;
119
+ collections: CollectionInspection[];
120
+ schema: SchemaSnapshot;
121
+ hooks: HookPipelineEntry[];
122
+ /** Every route the handler answers, core and plugin, in match order. */
123
+ routes: RouteInspection[];
124
+ admin: AdminInspection;
125
+ plugins: PluginInspection[];
126
+ auth: AuthInspection;
127
+ /**
128
+ * The AI surface, printed.
129
+ *
130
+ * `actions` is the registry rather than the configuration: a plugin that
131
+ * registered `tone-of-voice` has to be visible to somebody debugging why
132
+ * the button is missing from a field that names it.
133
+ */
134
+ ai: {
135
+ enabled: boolean;
136
+ defaultModel: {
137
+ provider: string;
138
+ model: string;
139
+ } | null;
140
+ /** Whether the panel-wide agent is configured and switched on. */
141
+ assistant: boolean;
142
+ actions: string[];
143
+ /** Providers with credentials in the configuration. Never the keys. */
144
+ providers: string[];
145
+ /** Whether keys can also be stored in the database. */
146
+ panelManagedKeys: boolean;
147
+ };
148
+ webhooks: {
149
+ enabled: boolean;
150
+ signed: boolean;
151
+ retries: number;
152
+ };
153
+ /** Rich-text nodes and marks, with the serialisers each one carries. */
154
+ editor: EditorSchemaDescription;
155
+ /** Registered sweeps, in the order `cms.jobs.run()` runs them. */
156
+ jobs: string[];
157
+ /** What a delete does, printed because it is the surprising one. */
158
+ trash: {
159
+ enabled: boolean;
160
+ purgeAfter: string | null;
161
+ };
162
+ }
163
+ /**
164
+ * What the HTTP layer answers with.
165
+ *
166
+ * One function, whatever the runtime: Node, Bun, Workers and Lambda all speak
167
+ * `Request → Response`, so a framework adapter is a wrapper around this and
168
+ * nothing more (section 10).
169
+ */
170
+ export type CmsHandler = (request: Request) => Promise<Response>;
171
+ /** The internal router, exposed for tests and inspection. */
172
+ export interface CmsRouter {
173
+ routes(): RouteInspection[];
174
+ }
175
+ /** The object `heyoCms()` returns. */
176
+ export interface CmsInstance<TCollections extends CollectionsConfig = CollectionsConfig, TGlobals extends GlobalsConfig = GlobalsConfig> {
177
+ /** Frozen, fully resolved configuration. */
178
+ readonly _config: ResolvedCmsConfig;
179
+ /**
180
+ * The whole HTTP surface: the API, the panel and every plugin route.
181
+ *
182
+ * `basePath` is stripped from the incoming URL and the rest is matched, so
183
+ * one catch-all route in any framework mounts everything, and a route added
184
+ * to the core or to a plugin needs no change in the application
185
+ * (section 10). Built on the first call, not at configuration time: a CLI
186
+ * that only generates a migration never pays for it.
187
+ */
188
+ readonly handler: CmsHandler;
189
+ /** The router behind `handler`. For tests and tooling. */
190
+ readonly _router: CmsRouter;
191
+ /** The schema the configuration implies; the `to` side of every migration. */
192
+ readonly schema: SchemaSnapshot;
193
+ readonly collections: TCollections;
194
+ /**
195
+ * The local API: `cms.api.posts.find()`, typed from the collection.
196
+ *
197
+ * No HTTP and no serialisation, but the same access control, hooks and
198
+ * events as the REST route that wraps it (section 10).
199
+ */
200
+ readonly api: LocalApi<TCollections>;
201
+ /**
202
+ * The singletons: `cms.globals.settings.get()`.
203
+ *
204
+ * Separate from `cms.api` because the operations differ — a global has no
205
+ * `find` and no `create` — not because the machinery does. Underneath it is
206
+ * the same `documents` table, the same hooks, the same events (stage 5).
207
+ */
208
+ readonly globals: GlobalsApi<TGlobals>;
209
+ /**
210
+ * Editor authentication and RBAC: sessions, invitations, API keys, roles.
211
+ *
212
+ * The same object the HTTP routes will call in stage 7, available without
213
+ * HTTP so a seed script can create the first administrator.
214
+ */
215
+ readonly auth: CmsAuth;
216
+ /**
217
+ * Files: upload, library, variants and the lifecycle.
218
+ *
219
+ * Present whether or not `uploads` is configured, because the alternative
220
+ * is an optional property every caller has to narrow; without a storage
221
+ * adapter every method answers with one error that names the missing
222
+ * section (section 3: media is not a plugin).
223
+ */
224
+ readonly media: CmsMedia;
225
+ /**
226
+ * Field actions and the panel-wide assistant.
227
+ *
228
+ * Present whether or not `ai` is configured, for the same reason `media`
229
+ * is: without the section every method answers with one error naming what
230
+ * is missing, rather than an optional property every caller must narrow.
231
+ */
232
+ readonly ai: CmsAi;
233
+ /** Subscriptions, deliveries, retries and replay (section 7). */
234
+ readonly webhooks: CmsWebhooks;
235
+ /** Deleted documents, across collections: list, restore, purge. */
236
+ readonly trash: CmsTrash;
237
+ /** The sweeps: scheduled changes and the expired trash. */
238
+ readonly jobs: CmsJobs;
239
+ /**
240
+ * Which languages exist: `i18n.locales`, with the name of each one.
241
+ *
242
+ * An instance method rather than a lookup the caller writes itself, so a
243
+ * panel, a seed script and a `curl` agree on what the list is (section 9).
244
+ */
245
+ readonly locales: CmsLocales;
246
+ /** The audit trail the engine writes. Read-only, by design. */
247
+ readonly activity: CmsActivity;
248
+ inspect(): CmsInspection;
249
+ /** Resolves the adapter, building it on first use. */
250
+ database(): Promise<DatabaseAdapter>;
251
+ /** Subscribes to a committed event. Returns an unsubscribe function. */
252
+ on(type: AnyEventType, listener: CmsEventListener): () => void;
253
+ /**
254
+ * Delivers pending outbox events now, and waits for them.
255
+ *
256
+ * A commit already schedules delivery in the background. This is how a
257
+ * test, a CLI or a runtime that is about to freeze makes sure nothing is
258
+ * left in the table.
259
+ */
260
+ drainEvents(limit?: number): Promise<number>;
261
+ close(): Promise<void>;
262
+ }
263
+ //# sourceMappingURL=instance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instance.d.ts","sourceRoot":"","sources":["../../src/types/instance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,KAAK,EACV,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,E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background work the engine owes.
4
+ *
5
+ * All three are sweeps rather than queues: a scheduled change is discovered
6
+ * from `documents.scheduled_at`, an expired trash entry from
7
+ * `documents.purge_after`, and a collectable file from `media.purge_after`.
8
+ * Nothing has to be enqueued, so a schedule written by a migration, a seed
9
+ * script or a `ctx.db` call in a hook is applied exactly like one written
10
+ * through the API \u2014 there is no second place to remember.
11
+ *
12
+ * `media-gc` is registered only when the configuration has an `uploads`
13
+ * section, so `cms.inspect().jobs` lists what will actually run.
14
+ */
15
+ export type JobName = "scheduled-changes" | "trash-purge" | "media-gc" | (string & {});
16
+ export interface JobRunArgs {
17
+ /** The moment the sweep runs as. Injectable so a test need not wait. */
18
+ now?: Date;
19
+ /** Documents examined per job in one call. Defaults to 100. */
20
+ limit?: number;
21
+ /** Runs only these jobs. Defaults to all registered ones. */
22
+ only?: JobName[];
23
+ }
24
+ export interface JobResult {
25
+ job: string;
26
+ /** Items this run actually completed. */
27
+ processed: number;
28
+ /** Items that threw. Each one is recorded in `jobs` and emits `job.failed`. */
29
+ failed: number;
30
+ /**
31
+ * Whether more work was waiting than `limit` allowed.
32
+ *
33
+ * A caller running the sweep from a cron can loop on it instead of
34
+ * discovering a backlog by watching a number fail to fall.
35
+ */
36
+ more: boolean;
37
+ }
38
+ export interface JobRunReport {
39
+ ranAt: string;
40
+ processed: number;
41
+ failed: number;
42
+ results: JobResult[];
43
+ }
44
+ /**
45
+ * A recorded failure.
46
+ *
47
+ * It carries the payload, which for a scheduled change is the patch itself:
48
+ * the claim that removed the schedule from the document has already happened
49
+ * by the time the write can fail, so this row is the only remaining copy and
50
+ * losing it would lose the editor's work.
51
+ */
52
+ export interface JobFailure {
53
+ id: string;
54
+ type: string;
55
+ payload: JsonObject | null;
56
+ error: string | null;
57
+ attempts: number;
58
+ createdAt: string | null;
59
+ }
60
+ export interface JobFailureArgs {
61
+ limit?: number;
62
+ type?: string;
63
+ }
64
+ /**
65
+ * `cms.jobs`.
66
+ *
67
+ * Deliberately not a daemon: the CMS runs on Workers and on Lambda as much as
68
+ * on a long-lived Node process, so the engine exposes the sweep and lets the
69
+ * deployment decide what calls it \u2014 a cron route in stage 7, `wrangler`'s
70
+ * scheduled handler, or a loop in `bun run dev`.
71
+ */
72
+ export interface CmsJobs {
73
+ /** Registered job names, in the order they run. */
74
+ list(): string[];
75
+ run(args?: JobRunArgs): Promise<JobRunReport>;
76
+ failures(args?: JobFailureArgs): Promise<JobFailure[]>;
77
+ }
78
+ //# sourceMappingURL=jobs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jobs.d.ts","sourceRoot":"","sources":["../../src/types/jobs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEzC;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,OAAO,GACjB,mBAAmB,GAAG,aAAa,GAAG,UAAU,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEnE,MAAM,WAAW,UAAU;IACzB,wEAAwE;IACxE,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,+DAA+D;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6DAA6D;IAC7D,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,yCAAyC;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,+EAA+E;IAC/E,MAAM,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,SAAS,EAAE,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,UAAU,GAAG,IAAI,CAAC;IAC3B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,OAAO;IACtB,mDAAmD;IACnD,IAAI,IAAI,MAAM,EAAE,CAAC;IACjB,GAAG,CAAC,IAAI,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAC9C,QAAQ,CAAC,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;CACxD"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * JSON is the storage format for document content on every supported engine:
3
+ * `jsonb` on Postgres, a native document on MongoDB, `TEXT` holding JSON on
4
+ * SQLite. Typing it explicitly keeps `unknown` out of the public contracts
5
+ * without pretending the engine understands richer values than it stores.
6
+ */
7
+ export type JsonPrimitive = string | number | boolean | null;
8
+ export type JsonValue = JsonPrimitive | JsonObject | JsonValue[];
9
+ export interface JsonObject {
10
+ [key: string]: JsonValue;
11
+ }
12
+ /** A stored document body: the `data` column of a row, keyed by field name. */
13
+ export type DocumentData = JsonObject;
14
+ /**
15
+ * A structural stand-in for a UI component.
16
+ *
17
+ * Fields carry their own editor, but the core must never import React — it
18
+ * runs on Workers and in CLIs where no renderer exists, and the size budget in
19
+ * section 0 of the plan does not survive a framework in the dependency tree.
20
+ * React components are structurally assignable to this type, so the admin
21
+ * package can narrow it without the core knowing what a component is.
22
+ */
23
+ export type ComponentType<Props> = (props: Props) => unknown;
24
+ //# sourceMappingURL=json.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../src/types/json.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;AAE7D,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,UAAU,GAAG,SAAS,EAAE,CAAC;AAEjE,MAAM,WAAW,UAAU;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B;AAED,+EAA+E;AAC/E,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC;AAEtC;;;;;;;;GAQG;AACH,MAAM,MAAM,aAAa,CAAC,KAAK,IAAI,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * A language the content can be written in.
3
+ *
4
+ * Derived from `i18n.locales`, which is a list of codes and nothing else:
5
+ * `name` and `rtl` are looked up from the code, so a deployment that wants
6
+ * French writes `"fr"` and still gets "French" in the panel's switcher.
7
+ */
8
+ export interface LocaleRecord {
9
+ code: string;
10
+ /** The English name of the language: `"pl"` reads as "Polish". */
11
+ name: string;
12
+ rtl: boolean;
13
+ /** Whether reads fall back to it. Exactly one locale has this. */
14
+ isDefault: boolean;
15
+ }
16
+ /**
17
+ * `cms.locales`.
18
+ *
19
+ * The list, not the resolver: which languages exist. Which one a read speaks,
20
+ * and what it falls back to, is decided per call from `i18n.defaultLocale`.
21
+ *
22
+ * Languages are configuration — adding one is a line in `i18n.locales` and a
23
+ * deploy, not a row somebody can delete from a panel at 18:00 on a Friday.
24
+ * Removing a code from the list leaves the translations stored under it
25
+ * alone, so putting it back brings them back.
26
+ */
27
+ export interface CmsLocales {
28
+ list(): LocaleRecord[];
29
+ }
30
+ //# sourceMappingURL=locales.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../src/types/locales.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,OAAO,CAAC;IACb,kEAAkE;IAClE,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,IAAI,YAAY,EAAE,CAAC;CACxB"}
@@ -0,0 +1,245 @@
1
+ import type { Actor, OperationSource } from "./actor";
2
+ import type { JsonObject } from "./json";
3
+ import type { StorageAdapter } from "./storage";
4
+ /**
5
+ * Where a file is in its life (section 6).
6
+ *
7
+ * `orphaned` is the state that makes the whole design work: a file that lost
8
+ * its last reference stops being counted as used but keeps serving, so an
9
+ * accidental delete or a reverted edit costs nothing for `retention.purgeAfter`.
10
+ * `purging` is only ever seen by a collector that died mid-sweep.
11
+ */
12
+ export type MediaStatus = "active" | "orphaned" | "purging";
13
+ /** Relative, `0..1`, origin top-left. Resolution-independent by construction. */
14
+ export interface FocalPoint {
15
+ x: number;
16
+ y: number;
17
+ }
18
+ /** A rectangle in the pixels of the stored original. */
19
+ export interface CropRect {
20
+ x: number;
21
+ y: number;
22
+ width: number;
23
+ height: number;
24
+ }
25
+ /**
26
+ * A file, as everything outside the engine sees it.
27
+ *
28
+ * `crop` and `variants` are stored inside the `metadata` column under those
29
+ * two reserved keys and surfaced here, because a panel needs them and nobody
30
+ * should have to know they share a column with user metadata.
31
+ */
32
+ export interface MediaDocument {
33
+ id: string;
34
+ filename: string;
35
+ mimeType: string;
36
+ size: number;
37
+ width: number | null;
38
+ height: number | null;
39
+ storageKey: string;
40
+ checksum: string | null;
41
+ /** Localized alternative text, keyed by locale like any content field. */
42
+ alt: Record<string, string>;
43
+ focalPoint: FocalPoint | null;
44
+ crop: CropRect | null;
45
+ status: MediaStatus;
46
+ orphanedAt: string | null;
47
+ /** When the collector will delete it. `null` means never. */
48
+ purgeAfter: string | null;
49
+ /** Why the last purge attempt failed, so it is not retried blindly. */
50
+ purgeError: string | null;
51
+ /** Everything except the two keys the engine reserves. */
52
+ metadata: JsonObject;
53
+ /** Named sizes that exist as stored objects right now. */
54
+ variants: string[];
55
+ createdBy: string | null;
56
+ createdAt: string | null;
57
+ updatedAt: string | null;
58
+ /** The public URL of the original, from the storage adapter. */
59
+ url: string;
60
+ }
61
+ /** One place a document points at a file. */
62
+ export interface MediaUsage {
63
+ mediaId: string;
64
+ collection: string;
65
+ documentId: string;
66
+ field: string;
67
+ /** Empty for a field that is not localized. */
68
+ locale: string;
69
+ createdAt: string | null;
70
+ }
71
+ /** What an upload may be handed. All of them end up as bytes. */
72
+ export type MediaSource = Blob | Uint8Array | ArrayBuffer | ReadableStream<Uint8Array>;
73
+ export interface MediaUploadArgs {
74
+ file: MediaSource;
75
+ /** Required unless `file` is a `File`, which already carries one. */
76
+ filename?: string;
77
+ /** Sniffed from the bytes when absent or when the client sent octet-stream. */
78
+ contentType?: string;
79
+ /** A string is stored under `locale`; an object is stored as given. */
80
+ alt?: string | Record<string, string>;
81
+ locale?: string;
82
+ metadata?: JsonObject;
83
+ actor?: Actor | null;
84
+ source?: OperationSource;
85
+ }
86
+ export interface MediaListArgs {
87
+ status?: MediaStatus;
88
+ /** `image/*` style wildcards allowed. */
89
+ mimeType?: string;
90
+ /** Case-insensitive match on the filename. */
91
+ search?: string;
92
+ limit?: number;
93
+ cursor?: string;
94
+ actor?: Actor | null;
95
+ }
96
+ export interface MediaListResult {
97
+ docs: MediaDocument[];
98
+ limit: number;
99
+ hasNextPage: boolean;
100
+ cursor: string | null;
101
+ }
102
+ export interface MediaUpdateArgs {
103
+ id: string;
104
+ filename?: string;
105
+ /** A string writes one locale; an object replaces the whole map. */
106
+ alt?: string | Record<string, string>;
107
+ locale?: string;
108
+ /** `null` clears it. Requires `uploads.images.focalPoint`. */
109
+ focalPoint?: FocalPoint | null;
110
+ /** `null` clears it. Requires `uploads.images.crop`. */
111
+ crop?: CropRect | null;
112
+ /** Merged into the existing metadata; the reserved keys are refused. */
113
+ metadata?: JsonObject;
114
+ actor?: Actor | null;
115
+ source?: OperationSource;
116
+ }
117
+ export interface MediaDeleteArgs {
118
+ id: string;
119
+ /**
120
+ * Deletes a file that documents still point at.
121
+ *
122
+ * Without it a referenced file is refused, because "delete" in a media
123
+ * library is routinely clicked on something that is on a page right now.
124
+ */
125
+ force?: boolean;
126
+ actor?: Actor | null;
127
+ source?: OperationSource;
128
+ }
129
+ export interface MediaKeepArgs {
130
+ id: string;
131
+ actor?: Actor | null;
132
+ source?: OperationSource;
133
+ }
134
+ export interface MediaVariantArgs {
135
+ id: string;
136
+ /**
137
+ * A name from `uploads.images.variants.sizes`. Omit for the original.
138
+ *
139
+ * Only declared names are accepted. Arbitrary dimensions in a URL are a way
140
+ * to make a stranger fill a bucket and burn CPU, one pixel at a time.
141
+ */
142
+ variant?: string;
143
+ /** Renders again even if a stored copy exists. */
144
+ refresh?: boolean;
145
+ }
146
+ /**
147
+ * One answer to "give me this file at this size".
148
+ *
149
+ * `cached` says whether the bytes came from storage or were rendered during
150
+ * this call, which is what makes the on-demand pipeline observable instead of
151
+ * a guess about CDN behaviour.
152
+ */
153
+ export interface MediaVariantResult {
154
+ media: MediaDocument;
155
+ variant: string | null;
156
+ key: string;
157
+ contentType: string;
158
+ width: number | null;
159
+ height: number | null;
160
+ size: number | null;
161
+ body: ReadableStream;
162
+ url: string;
163
+ cached: boolean;
164
+ }
165
+ export interface MediaCollectArgs {
166
+ /** The moment the sweep runs as. Injectable so a test need not wait. */
167
+ now?: Date;
168
+ limit?: number;
169
+ }
170
+ export interface MediaCollectReport {
171
+ examined: number;
172
+ purged: number;
173
+ /** Files that were used again between being orphaned and being collected. */
174
+ reclaimed: number;
175
+ failed: number;
176
+ }
177
+ /**
178
+ * `cms.media`.
179
+ *
180
+ * Media is a high-level setting rather than a plugin (section 3), so it is a
181
+ * first-class part of the instance: the same object the REST routes call in
182
+ * stage 7 and the panel calls in stage 8, available without HTTP so a seed
183
+ * script or a migration can upload a file.
184
+ */
185
+ export interface CmsMedia {
186
+ upload(args: MediaUploadArgs): Promise<MediaDocument>;
187
+ list(args?: MediaListArgs): Promise<MediaListResult>;
188
+ get(id: string): Promise<MediaDocument | null>;
189
+ update(args: MediaUpdateArgs): Promise<MediaDocument>;
190
+ /** Removes the record, the original and every stored variant. */
191
+ delete(args: MediaDeleteArgs): Promise<MediaDocument>;
192
+ /** The panel's "Keep" button: clears the purge deadline of an orphan. */
193
+ keep(args: MediaKeepArgs): Promise<MediaDocument>;
194
+ /** Where a file is used. Empty for an orphan, by definition. */
195
+ usages(id: string): Promise<MediaUsage[]>;
196
+ /** The original or a named size, rendering and storing it if needed. */
197
+ variant(args: MediaVariantArgs): Promise<MediaVariantResult | null>;
198
+ /** The `media-gc` sweep. Also registered in `cms.jobs`. */
199
+ collect(args?: MediaCollectArgs): Promise<MediaCollectReport>;
200
+ /** The configured adapter, built on first use. */
201
+ storage(): Promise<StorageAdapter>;
202
+ }
203
+ export type ImageFormat = "jpeg" | "png" | "gif" | "webp" | "avif" | "svg" | "tiff";
204
+ /** What the built-in header parser can tell without decoding an image. */
205
+ export interface ImageInfo {
206
+ format: ImageFormat;
207
+ contentType: string;
208
+ width: number;
209
+ height: number;
210
+ }
211
+ /** One rendering request, in the vocabulary every image library shares. */
212
+ export interface ImageTransform {
213
+ width?: number;
214
+ height?: number;
215
+ fit?: "cover" | "contain" | "inside" | "outside";
216
+ /** Where `cover` should crop around. Relative, so it survives a resize. */
217
+ position?: FocalPoint;
218
+ /** Applied to the original pixels, before any resize. */
219
+ crop?: CropRect;
220
+ format?: "webp" | "avif" | "jpeg" | "png";
221
+ quality?: number;
222
+ stripMetadata?: boolean;
223
+ }
224
+ export interface ProcessedImage {
225
+ data: Uint8Array;
226
+ contentType: string;
227
+ width: number;
228
+ height: number;
229
+ }
230
+ /**
231
+ * The pluggable renderer.
232
+ *
233
+ * Deliberately not built in. A codec is either a native module, which has no
234
+ * place in a package that has to load in a Worker, or a service call, which
235
+ * has no place in a package that has to run offline. Everything the engine can
236
+ * do without one — reading dimensions, enforcing limits, stripping EXIF — it
237
+ * does itself; everything that needs real pixels goes through here.
238
+ */
239
+ export interface ImageProcessor {
240
+ /** `sharp`, `cloudflare-images`. Printed by `cms.inspect()`. */
241
+ readonly id: string;
242
+ supports(contentType: string): boolean;
243
+ transform(source: Uint8Array, transform: ImageTransform, info: ImageInfo): Promise<ProcessedImage>;
244
+ }
245
+ //# sourceMappingURL=media.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../src/types/media.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD;;;;;;;GAOG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;AAE5D,iFAAiF;AACjF,MAAM,WAAW,UAAU;IACzB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,wDAAwD;AACxD,MAAM,WAAW,QAAQ;IACvB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,0EAA0E;IAC1E,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE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