@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 @@
1
+ {"version":3,"file":"actor.d.ts","sourceRoot":"","sources":["../../src/types/actor.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,wEAAwE;IACxE,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC;AAEhD;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC"}
@@ -0,0 +1,357 @@
1
+ import type { Actor, OperationSource } from "./actor";
2
+ import type { AiAuth } from "./config";
3
+ import type { ResolvedCollection } from "./config";
4
+ import type { AiModelRef, FieldAiAction, FieldDefinition } from "./fields";
5
+ import type { JsonObject, JsonValue } from "./json";
6
+ /**
7
+ * The AI runtime (stage 9, section 8).
8
+ *
9
+ * Two rules from the plan are expressed as types here rather than as
10
+ * documentation:
11
+ *
12
+ * 1. **AI is a capability of a field.** There is no global task list. A run
13
+ * is addressed by collection, field and action, and the action has to be
14
+ * a key of `field.ai` or the request is refused — a field without the key
15
+ * has no AI at all, not a hidden one.
16
+ * 2. **Nothing is written.** `run()` answers with a value; storing it is an
17
+ * ordinary update that the editor triggers, with the same hooks, access
18
+ * control and validation as typing it by hand. Autosave was ruled out, and
19
+ * a model writing silently would be worse than autosave.
20
+ */
21
+ /** What one call to a model cost, carried into `ai.task.completed`. */
22
+ export interface AiUsage {
23
+ input: number;
24
+ output: number;
25
+ total: number;
26
+ /** In US dollars, as the provider catalogue prices it. `0` when unknown. */
27
+ cost: number;
28
+ }
29
+ /** An image handed to a vision model: the bytes, not a URL it cannot fetch. */
30
+ export interface AiImageInput {
31
+ contentType: string;
32
+ data: Uint8Array;
33
+ }
34
+ export interface AiCompletionRequest {
35
+ model: AiModelRef;
36
+ auth: AiAuth;
37
+ system: string;
38
+ prompt: string;
39
+ /** Sent with the prompt. `alt` is the reason this exists. */
40
+ images?: AiImageInput[];
41
+ maxTokens?: number;
42
+ signal?: AbortSignal;
43
+ }
44
+ export interface AiCompletionResult {
45
+ text: string;
46
+ usage: AiUsage;
47
+ }
48
+ /**
49
+ * How a prompt reaches a model.
50
+ *
51
+ * pi is the default implementation and is loaded lazily, so a deployment
52
+ * without AI never pays for the import and a Worker bundle does not carry a
53
+ * provider catalogue it will not call. Overriding it is the supported way to
54
+ * put a proxy, a self-hosted model or a test double in the path — the same
55
+ * escape hatch `uploads.images.processor` gives the image pipeline.
56
+ */
57
+ export type AiCompletionFn = (request: AiCompletionRequest) => Promise<AiCompletionResult>;
58
+ /**
59
+ * What an action implementation is handed.
60
+ *
61
+ * `complete` is already bound to the resolved model and credentials, so an
62
+ * action never sees a token and cannot pick a different provider than the
63
+ * one the configuration resolved for it.
64
+ */
65
+ export interface AiActionContext {
66
+ /** The action key as it appears in `field.ai`. */
67
+ action: string;
68
+ /** The field's current value in this locale, as stored. */
69
+ value: JsonValue;
70
+ field: FieldDefinition;
71
+ fieldName: string;
72
+ collection: ResolvedCollection;
73
+ /** Only the fields the action's `context` named, already resolved. */
74
+ context: JsonObject;
75
+ /** The whole document as the caller supplied it, for actions that need it. */
76
+ document: JsonObject;
77
+ locale: string | null;
78
+ /** The locale a `translate` action is translating from. */
79
+ sourceLocale: string | null;
80
+ /** The action's configuration: prompt, label, model, maxLength. */
81
+ options: FieldAiAction;
82
+ model: AiModelRef;
83
+ actor: Actor | null;
84
+ complete: (request: Omit<AiCompletionRequest, "model" | "auth">) => Promise<AiCompletionResult>;
85
+ /**
86
+ * The bytes of a stored file, for an action that needs to look at one.
87
+ *
88
+ * `null` when there is no `uploads` section, when the id does not resolve,
89
+ * or when the file is not an image — an action is expected to degrade to
90
+ * what it can infer from the document rather than fail.
91
+ */
92
+ loadImage: (mediaId: string) => Promise<AiImageInput | null>;
93
+ signal?: AbortSignal;
94
+ }
95
+ export interface AiActionOutcome {
96
+ /** What the panel will offer to insert. Shaped for the field type. */
97
+ value: JsonValue;
98
+ /** The same thing as text, for a preview and for the activity log. */
99
+ preview: string;
100
+ usage: AiUsage;
101
+ }
102
+ /**
103
+ * A registered AI action.
104
+ *
105
+ * `appliesTo` is the list of field types the action may be configured on;
106
+ * `"*"` means any. It is checked when the configuration is built, so a
107
+ * `translate` on a number is a start-up error rather than a button that
108
+ * fails on click.
109
+ */
110
+ export interface AiActionDefinition {
111
+ id: string;
112
+ appliesTo: string[];
113
+ label: string;
114
+ /** Used when the field's action does not bring its own. */
115
+ prompt: string;
116
+ /** Instruction prepended to every run of this action. */
117
+ system?: string;
118
+ /** `true` refuses the action on a field that is not localized. */
119
+ requiresLocalized?: boolean;
120
+ run: (context: AiActionContext) => Promise<AiActionOutcome>;
121
+ }
122
+ export interface AiRunArgs {
123
+ collection: string;
124
+ field: string;
125
+ action: string;
126
+ /** The stored document, when there is one. Omitted for an unsaved draft. */
127
+ id?: string;
128
+ /**
129
+ * The form as it stands in the browser.
130
+ *
131
+ * Merged over the stored document, because the editor is asking about what
132
+ * they are looking at: generating a title from a body that was saved ten
133
+ * minutes ago would answer a question nobody asked.
134
+ */
135
+ document?: JsonObject;
136
+ locale?: string;
137
+ /** Where a `translate` reads from. Defaults to `i18n.defaultLocale`. */
138
+ sourceLocale?: string;
139
+ /** Internal variant workflow: translate localized text even without a field menu action. */
140
+ variantTranslation?: boolean;
141
+ actor?: Actor | null;
142
+ source?: OperationSource;
143
+ signal?: AbortSignal;
144
+ }
145
+ export interface AiRunResult {
146
+ collection: string;
147
+ field: string;
148
+ action: string;
149
+ value: JsonValue;
150
+ preview: string;
151
+ model: AiModelRef;
152
+ usage: AiUsage;
153
+ }
154
+ /**
155
+ * Which screen the editor is looking at.
156
+ *
157
+ * A hint and nothing more. The server resolves slugs against configuration,
158
+ * validates tabs, and re-reads documents through `cms.api` with the session's
159
+ * actor. Media metadata is public by design. A forged hint cannot grant
160
+ * permission, but may point at another *accessible* record, so it never
161
+ * replaces the editor's actual request or the tool's access checks.
162
+ */
163
+ export type AiPageContextKind = "dashboard" | "collection-list" | "document" | "global" | "media" | "trash" | "settings";
164
+ export interface AiPageContext {
165
+ kind: AiPageContextKind;
166
+ collectionSlug?: string;
167
+ documentId?: string;
168
+ /**
169
+ * The file the media screen's details pane is showing.
170
+ *
171
+ * Separate from `documentId` because it resolves somewhere else entirely —
172
+ * through `cms.media`, not through a collection — and a single field would
173
+ * make "this" ambiguous on the one screen where both could be meant.
174
+ */
175
+ mediaId?: string;
176
+ /**
177
+ * Which sub-surface of the screen is in front.
178
+ *
179
+ * A document with two rich-text fields is two tabs, and "rewrite this
180
+ * section" means the one the editor is looking at. The same field carries
181
+ * the settings tab and the media library's status tab: an opaque string,
182
+ * because the panel owns those names and the engine only ever repeats them
183
+ * back to the model.
184
+ */
185
+ tab?: string;
186
+ locale?: string;
187
+ /**
188
+ * Fields the open form has changed and not saved.
189
+ *
190
+ * Only the names — never the values. The draft itself stays in the browser
191
+ * in v1: sending it would leak unsaved text to a provider and would let the
192
+ * agent write a document the form is about to overwrite. What the names buy
193
+ * is the refusal: the assistant declines to write a record whose form is
194
+ * dirty and asks the editor to save or discard first.
195
+ */
196
+ dirtyFields?: string[];
197
+ /** The revision the open form was loaded from. */
198
+ baselineRevision?: number;
199
+ }
200
+ export interface AiAssistantTurn {
201
+ role: "user" | "assistant";
202
+ text: string;
203
+ }
204
+ /** What a mutation touched, in the shape the panel needs to go there. */
205
+ export interface AiMutationTarget {
206
+ kind: "document" | "global" | "media";
207
+ collection?: string;
208
+ collectionSlug?: string;
209
+ id: string;
210
+ locale?: string | null;
211
+ revision?: number;
212
+ }
213
+ /**
214
+ * A plan, as the panel may see it.
215
+ *
216
+ * Enough to decide with — how many records, which fields, what will happen —
217
+ * and nothing the model wrote that could pass for an instruction. The values
218
+ * themselves are summarised rather than dumped: an approval dialog is a place
219
+ * to confirm an intention, not to review a diff of twelve thousand
220
+ * characters.
221
+ */
222
+ export interface AiPlanOperationSummary {
223
+ action: "create" | "update" | "trash" | "restore" | "purge" | "update-global" | "update-media";
224
+ target: AiMutationTarget;
225
+ label: string;
226
+ fields: string[];
227
+ }
228
+ export interface AiPlanSummary {
229
+ id: string;
230
+ runId: string;
231
+ summary: string;
232
+ operations: AiPlanOperationSummary[];
233
+ /** ISO. The plan is refused after it, and is not silently renewed. */
234
+ expiresAt: string;
235
+ }
236
+ /**
237
+ * What the panel is told while a run is in flight.
238
+ *
239
+ * Deliberately ours rather than pi's event stream. The agent library's events
240
+ * are its internal contract and change with its minor versions; this one is
241
+ * the public shape the panel is written against, and it carries only what a
242
+ * human is allowed to see — a tool's *summary*, never its arguments or its
243
+ * raw result.
244
+ */
245
+ export type AiAssistantEvent = {
246
+ type: "text-delta";
247
+ text: string;
248
+ } | {
249
+ type: "tool-start";
250
+ id: string;
251
+ label: string;
252
+ } | {
253
+ type: "tool-end";
254
+ id: string;
255
+ summary: string;
256
+ } | {
257
+ type: "mutation-applied";
258
+ runId: string;
259
+ target: AiMutationTarget;
260
+ fields: string[];
261
+ } | {
262
+ type: "approval-required";
263
+ plan: AiPlanSummary;
264
+ } | {
265
+ type: "done";
266
+ runId: string;
267
+ usage: AiUsage;
268
+ } | {
269
+ type: "error";
270
+ code: string;
271
+ message: string;
272
+ };
273
+ export interface AiAssistantArgs {
274
+ /** Groups the turns of one conversation. Opaque to the engine. */
275
+ conversationId?: string;
276
+ message: string;
277
+ history?: AiAssistantTurn[];
278
+ pageContext?: AiPageContext;
279
+ locale?: string;
280
+ actor?: Actor | null;
281
+ source?: OperationSource;
282
+ signal?: AbortSignal;
283
+ }
284
+ export interface AiApprovePlanArgs {
285
+ planId: string;
286
+ actor?: Actor | null;
287
+ source?: OperationSource;
288
+ signal?: AbortSignal;
289
+ }
290
+ export interface AiApprovePlanResult {
291
+ planId: string;
292
+ runId: string;
293
+ applied: {
294
+ target: AiMutationTarget;
295
+ fields: string[];
296
+ }[];
297
+ }
298
+ /**
299
+ * A provider's credentials, as the panel may see them.
300
+ *
301
+ * Never the token. `configured` says whether a key exists and `source` says
302
+ * where it came from, which is everything a settings screen needs and
303
+ * nothing an attacker can use.
304
+ */
305
+ export interface AiProviderStatus {
306
+ provider: string;
307
+ configured: boolean;
308
+ source: "config" | "database" | null;
309
+ type: AiAuth["type"] | null;
310
+ /** Last four characters of a stored key, so it can be recognised. */
311
+ hint: string | null;
312
+ updatedAt: string | null;
313
+ /** Models the provider catalogue knows, when it is loadable. */
314
+ models?: string[];
315
+ }
316
+ export interface AiCredentialArgs {
317
+ provider: string;
318
+ token: string;
319
+ actor?: Actor | null;
320
+ source?: OperationSource;
321
+ }
322
+ /** `cms.ai`. Present whether or not `ai` is configured, like `cms.media`. */
323
+ export interface CmsAi {
324
+ /** Whether an `ai` section exists at all. */
325
+ readonly enabled: boolean;
326
+ /** Whether `ai.assistant` is configured and switched on. */
327
+ readonly assistantEnabled: boolean;
328
+ /** Action ids registered for a field type, in menu order. */
329
+ actions(fieldType: string): string[];
330
+ run(args: AiRunArgs): Promise<AiRunResult>;
331
+ /**
332
+ * The panel-wide agent.
333
+ *
334
+ * An async iterable rather than a promise because the interesting part of a
335
+ * run is what happens during it: the editor has to see which record was
336
+ * read and which field was written while it happens, and a run that only
337
+ * reported its result would be a progress spinner with a paragraph at the
338
+ * end.
339
+ */
340
+ runAssistant(args: AiAssistantArgs): AsyncIterable<AiAssistantEvent>;
341
+ /**
342
+ * Executes a stored plan after a human approved it.
343
+ *
344
+ * The plan is replayed from the row, exactly as it was shown. It is never
345
+ * handed back to the model to reconstruct — an approval has to mean the
346
+ * thing on the screen, not a second generation that resembles it.
347
+ */
348
+ approveAssistantPlan(args: AiApprovePlanArgs): Promise<AiApprovePlanResult>;
349
+ providers(): Promise<AiProviderStatus[]>;
350
+ /** Stores a provider key in the database, encrypted. */
351
+ setCredential(args: AiCredentialArgs): Promise<AiProviderStatus>;
352
+ removeCredential(args: {
353
+ provider: string;
354
+ actor?: Actor | null;
355
+ }): Promise<boolean>;
356
+ }
357
+ //# sourceMappingURL=ai.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../src/types/ai.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,MAA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W,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,eAAe,CAAC;CAC1B;AAED,6EAA6E;AAC7E,MAAM,WAAW,KAAK;IACpB,6CAA6C;IAC7C,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,4DAA4D;IAC5D,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACnC,6DAA6D;IAC7D,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACrC,GAAG,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAC3C;;;;;;;;OAQG;IACH,YAAY,CAAC,IAAI,EAAE,eAAe,GAAG,aAAa,CAAC,gBAAgB,CAAC,CAAC;IACrE;;;;;;OAMG;IACH,oBAAoB,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC5E,SAAS,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;IACzC,wDAAwD;IACxD,aAAa,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACjE,gBAAgB,CAAC,IAAI,EAAE;QACrB,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;KACtB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACtB"}
@@ -0,0 +1,268 @@
1
+ import type { Actor, OperationSource } from "./actor";
2
+ import type { CollectionsConfig, GlobalsConfig, InferDocument, SystemDocumentFields } from "./config";
3
+ import type { OrderBy, Where } from "./query";
4
+ /**
5
+ * Which language a call speaks.
6
+ *
7
+ * A field with no value in `locale` is answered from `i18n.defaultLocale`.
8
+ * `fallbackLocale` changes that for one call: `false` turns substitution off
9
+ * and a code forces one specific source. The panel needs both — an editor
10
+ * filling in translations wants to see the gaps, a preview wants the page to
11
+ * render (section 9).
12
+ */
13
+ export interface LocaleArgs {
14
+ locale?: string;
15
+ fallbackLocale?: string | false;
16
+ }
17
+ export interface OperationArgs extends LocaleArgs {
18
+ /** Who is calling. `null` is an anonymous caller, not a privileged one. */
19
+ actor?: Actor | null;
20
+ /** Where the call came from; carried into hooks, events and activity. */
21
+ source?: OperationSource;
22
+ /**
23
+ * The AI run that caused this write, recorded in the activity entry.
24
+ *
25
+ * Only ever set by the assistant. The actor stays the human who asked for
26
+ * the change — this is what links their change to the conversation it came
27
+ * from, not a second kind of author.
28
+ */
29
+ runId?: string;
30
+ }
31
+ /**
32
+ * What a write may promise about the state it is changing.
33
+ *
34
+ * Both are opt-in, and both exist for the same reason: a write that was
35
+ * decided somewhere other than the moment it is applied — a form the editor
36
+ * left open, an agent that read the document two tool calls ago, a client
37
+ * retrying over a dropped connection — needs to say what it believed, so the
38
+ * engine can refuse rather than guess.
39
+ */
40
+ export interface WriteConcurrencyArgs {
41
+ /**
42
+ * The `revision` the caller read. The write is refused with `409` if the
43
+ * stored revision has moved on.
44
+ */
45
+ expectedRevision?: number;
46
+ /**
47
+ * Makes the write replayable exactly once.
48
+ *
49
+ * Recorded inside the same transaction as the document, so a second call
50
+ * with the same key answers with the first result instead of running the
51
+ * hooks, the events and the outbox again.
52
+ */
53
+ idempotencyKey?: string;
54
+ }
55
+ export interface ReadArgs extends OperationArgs {
56
+ /** How many relation levels to resolve. Each level is one batched query. */
57
+ depth?: number;
58
+ /** Includes soft-deleted documents, which are hidden by default. */
59
+ includeTrashed?: boolean;
60
+ }
61
+ export interface FindArgs extends ReadArgs {
62
+ where?: Where;
63
+ /** Defaults to `updated_at desc`; `id` is always appended as a tiebreaker. */
64
+ orderBy?: OrderBy[];
65
+ limit?: number;
66
+ offset?: number;
67
+ /** Keyset pagination. Mutually exclusive with `offset` in practice. */
68
+ cursor?: string;
69
+ /** Runs a second COUNT query and fills `totalDocs`. Off by default. */
70
+ count?: boolean;
71
+ }
72
+ export interface FindOneArgs extends ReadArgs {
73
+ where?: Where;
74
+ orderBy?: OrderBy[];
75
+ }
76
+ export interface CountArgs extends OperationArgs {
77
+ where?: Where;
78
+ includeTrashed?: boolean;
79
+ }
80
+ /**
81
+ * One page of documents.
82
+ *
83
+ * `hasNextPage` comes from reading one row past the limit rather than from a
84
+ * count, so paging never costs a second query unless `count` asked for one.
85
+ */
86
+ export interface FindResult<TDoc> {
87
+ docs: TDoc[];
88
+ limit: number;
89
+ /** `null` unless the call set `count: true`. */
90
+ totalDocs: number | null;
91
+ hasNextPage: boolean;
92
+ /** Opaque. Pass it back as `cursor` to get the next page. */
93
+ cursor: string | null;
94
+ }
95
+ /**
96
+ * What a caller may write.
97
+ *
98
+ * System fields are stamped by the engine, and every field is optional
99
+ * because a `before` hook is allowed to fill a required one — which is the
100
+ * whole point of the slug example in section 5. Validation runs after the
101
+ * hooks, so a missing required field is still an error, just a later one.
102
+ */
103
+ export type DocumentInput<TDoc> = Partial<Omit<TDoc, keyof SystemDocumentFields>>;
104
+ export interface CreateArgs<TDoc> extends ReadArgs, WriteConcurrencyArgs {
105
+ data: DocumentInput<TDoc>;
106
+ /**
107
+ * The id to write, instead of a generated one.
108
+ *
109
+ * For imports and seeds, where a document's id is a reference other
110
+ * documents already hold (`heyo-cms import`, stage 10). The database rejects
111
+ * a duplicate, so this cannot overwrite anything by accident: a clash is an
112
+ * error, never a silent merge.
113
+ */
114
+ id?: string;
115
+ }
116
+ export interface UpdateArgs<TDoc> extends ReadArgs, WriteConcurrencyArgs {
117
+ id: string;
118
+ data: DocumentInput<TDoc>;
119
+ }
120
+ export interface DeleteArgs extends ReadArgs, WriteConcurrencyArgs {
121
+ id: string;
122
+ /**
123
+ * Skips the trash and removes the row.
124
+ *
125
+ * Ignored when `trash.enabled` is false, because the delete is permanent
126
+ * either way. Governed by the `purge` permission rather than `delete`:
127
+ * "remove it" and "remove it so nobody can get it back" are different
128
+ * decisions and an interface that confuses them will eventually be used to
129
+ * make the second one by accident.
130
+ */
131
+ permanent?: boolean;
132
+ }
133
+ export interface RestoreArgs extends ReadArgs, WriteConcurrencyArgs {
134
+ id: string;
135
+ }
136
+ /**
137
+ * A change to apply later.
138
+ *
139
+ * `data` is an ordinary patch — the engine attaches no meaning to any field in
140
+ * it. Scheduling `status: "published"` is the obvious use and the only reason
141
+ * the feature exists, but scheduling a price change or a banner is the same
142
+ * mechanism and the same code (section 3).
143
+ */
144
+ export interface ScheduleArgs<TDoc> extends ReadArgs {
145
+ id: string;
146
+ /** When the patch should be applied. A past time applies on the next sweep. */
147
+ at: Date | string;
148
+ data: DocumentInput<TDoc>;
149
+ }
150
+ export interface UnscheduleArgs extends ReadArgs {
151
+ id: string;
152
+ }
153
+ /**
154
+ * The local API for one collection.
155
+ *
156
+ * Identical in behaviour to the REST route that wraps it in stage 7: the same
157
+ * access control, the same hooks, the same events. Two code paths would mean
158
+ * two sets of bugs (section 10).
159
+ *
160
+ * A write returns `null` when a `before` hook returned `false` — the
161
+ * documented way to stop an operation without an error.
162
+ */
163
+ export interface ResolveSlugArgs extends Omit<ReadArgs, "includeTrashed"> {
164
+ /** The slug field to look in. The collection's first `slug` field by default. */
165
+ field?: string;
166
+ }
167
+ /**
168
+ * Where a slug leads.
169
+ *
170
+ * `current: false` means the slug is a previous address of the document —
171
+ * the caller answers with a redirect to the document's slug now. `locale`
172
+ * is the language the slug matched in, which is not necessarily the one
173
+ * asked for: a link shared with the wrong language prefix still arrives.
174
+ */
175
+ export interface SlugResolution<TDoc> {
176
+ id: string;
177
+ field: string;
178
+ /** Null for a field that is not localized. */
179
+ locale: string | null;
180
+ current: boolean;
181
+ /** Read in the requested locale, with the caller's access. */
182
+ document: TDoc;
183
+ }
184
+ /** One previous address of a document. */
185
+ export interface PreviousSlug {
186
+ slug: string;
187
+ field: string;
188
+ /** Null for a field that is not localized. */
189
+ locale: string | null;
190
+ createdAt: string | null;
191
+ }
192
+ export interface PreviousSlugsArgs extends OperationArgs {
193
+ id: string;
194
+ /** The collection's first `slug` field with `history` by default. */
195
+ field?: string;
196
+ }
197
+ export interface PreviousSlugWriteArgs extends OperationArgs {
198
+ id: string;
199
+ slug: string;
200
+ field?: string;
201
+ }
202
+ export interface CollectionApi<TDoc> {
203
+ find(args?: FindArgs): Promise<FindResult<TDoc>>;
204
+ findOne(args?: FindOneArgs): Promise<TDoc | null>;
205
+ findById(id: string, args?: ReadArgs): Promise<TDoc | null>;
206
+ count(args?: CountArgs): Promise<number>;
207
+ create(args: CreateArgs<TDoc>): Promise<TDoc | null>;
208
+ update(args: UpdateArgs<TDoc>): Promise<TDoc | null>;
209
+ /** Moves the document to the trash, or removes it when there is no trash. */
210
+ delete(args: DeleteArgs): Promise<TDoc | null>;
211
+ /** Brings a trashed document back. Refuses a document that is not trashed. */
212
+ restore(args: RestoreArgs): Promise<TDoc | null>;
213
+ /** Removes the row for good, trashed or not. */
214
+ purge(args: DeleteArgs): Promise<TDoc | null>;
215
+ schedule(args: ScheduleArgs<TDoc>): Promise<TDoc | null>;
216
+ unschedule(args: UnscheduleArgs): Promise<TDoc | null>;
217
+ /**
218
+ * The document a slug belongs to, now or before: the lookup behind a page
219
+ * route and the 301 from an old URL. Null when nothing readable has it.
220
+ * Needs a `slug` field; previous addresses need `history: true`.
221
+ */
222
+ resolveSlug(slug: string, args?: ResolveSlugArgs): Promise<SlugResolution<TDoc> | null>;
223
+ /** A document's previous addresses, newest first; `locale` narrows to one language. */
224
+ previousSlugs(args: PreviousSlugsArgs): Promise<PreviousSlug[]>;
225
+ /**
226
+ * Makes a slug lead here as a previous address: how two pages are merged
227
+ * — purge the old page, then add its slug here. Refused while the slug is
228
+ * another document's address (a trashed one included) or already leads
229
+ * elsewhere.
230
+ */
231
+ addPreviousSlug(args: PreviousSlugWriteArgs): Promise<PreviousSlug[]>;
232
+ /** Stops a previous address from leading here, which frees it for reuse. */
233
+ removePreviousSlug(args: PreviousSlugWriteArgs): Promise<PreviousSlug[]>;
234
+ }
235
+ /** `cms.api`: one entry per declared collection, typed from its fields. */
236
+ export type LocalApi<TCollections extends CollectionsConfig> = {
237
+ [K in keyof TCollections]: CollectionApi<InferDocument<TCollections[K]>>;
238
+ };
239
+ export interface GlobalUpdateArgs<TDoc> extends ReadArgs, WriteConcurrencyArgs {
240
+ data: DocumentInput<TDoc>;
241
+ }
242
+ export interface GlobalScheduleArgs<TDoc> extends ReadArgs {
243
+ at: Date | string;
244
+ data: DocumentInput<TDoc>;
245
+ }
246
+ /**
247
+ * A singleton, on the same machinery as a collection.
248
+ *
249
+ * `get()` never returns `null`: a global that has never been saved reads as
250
+ * its declared defaults, with `createdAt` and `updatedAt` still `null`. The
251
+ * alternative — a 404 on a global the configuration says exists — would make
252
+ * every template start with a null check for a document the developer
253
+ * declared themselves.
254
+ *
255
+ * There is no `create` and no `delete`: a singleton the panel could delete is
256
+ * a collection with one row.
257
+ */
258
+ export interface GlobalApi<TDoc> {
259
+ get(args?: ReadArgs): Promise<TDoc>;
260
+ update(args: GlobalUpdateArgs<TDoc>): Promise<TDoc | null>;
261
+ schedule(args: GlobalScheduleArgs<TDoc>): Promise<TDoc | null>;
262
+ unschedule(args?: OperationArgs): Promise<TDoc | null>;
263
+ }
264
+ /** `cms.globals`: one entry per declared global, typed from its fields. */
265
+ export type GlobalsApi<TGlobals extends GlobalsConfig> = {
266
+ [K in keyof TGlobals]: GlobalApi<InferDocument<TGlobals[K]>>;
267
+ };
268
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/types/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,KAAK,EACV,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,oBAAoB,EACrB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,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