@orthacms/content-server 0.0.0-reserve.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 (396) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +7 -0
  3. package/dist/define.d.ts +17 -0
  4. package/dist/define.d.ts.map +1 -0
  5. package/dist/define.js +28 -0
  6. package/dist/index.d.ts +48 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +109 -0
  9. package/dist/lib/collection/define.d.ts +35 -0
  10. package/dist/lib/collection/define.d.ts.map +1 -0
  11. package/dist/lib/collection/define.js +217 -0
  12. package/dist/lib/collection/table-builder.d.ts +28 -0
  13. package/dist/lib/collection/table-builder.d.ts.map +1 -0
  14. package/dist/lib/collection/table-builder.js +306 -0
  15. package/dist/lib/content-types/controllers/get-content-schema.controller.d.ts +24 -0
  16. package/dist/lib/content-types/controllers/get-content-schema.controller.d.ts.map +1 -0
  17. package/dist/lib/content-types/controllers/get-content-schema.controller.js +58 -0
  18. package/dist/lib/content-types/controllers/get-filter-fields.controller.d.ts +35 -0
  19. package/dist/lib/content-types/controllers/get-filter-fields.controller.d.ts.map +1 -0
  20. package/dist/lib/content-types/controllers/get-filter-fields.controller.js +74 -0
  21. package/dist/lib/content-types/controllers/list-content-schema.controller.d.ts +15 -0
  22. package/dist/lib/content-types/controllers/list-content-schema.controller.d.ts.map +1 -0
  23. package/dist/lib/content-types/controllers/list-content-schema.controller.js +38 -0
  24. package/dist/lib/content-types/queries/workspace-grants.query.d.ts +25 -0
  25. package/dist/lib/content-types/queries/workspace-grants.query.d.ts.map +1 -0
  26. package/dist/lib/content-types/queries/workspace-grants.query.js +45 -0
  27. package/dist/lib/content.module.d.ts +21 -0
  28. package/dist/lib/content.module.d.ts.map +1 -0
  29. package/dist/lib/content.module.js +264 -0
  30. package/dist/lib/content.tokens.d.ts +5 -0
  31. package/dist/lib/content.tokens.d.ts.map +1 -0
  32. package/dist/lib/content.tokens.js +9 -0
  33. package/dist/lib/copilot/content-tool.provider.d.ts +64 -0
  34. package/dist/lib/copilot/content-tool.provider.d.ts.map +1 -0
  35. package/dist/lib/copilot/content-tool.provider.js +309 -0
  36. package/dist/lib/copilot/diff-snapshots.d.ts +42 -0
  37. package/dist/lib/copilot/diff-snapshots.d.ts.map +1 -0
  38. package/dist/lib/copilot/diff-snapshots.js +77 -0
  39. package/dist/lib/copilot/entry-proposal.applier.d.ts +89 -0
  40. package/dist/lib/copilot/entry-proposal.applier.d.ts.map +1 -0
  41. package/dist/lib/copilot/entry-proposal.applier.js +245 -0
  42. package/dist/lib/copilot/entry-proposal.provider.d.ts +157 -0
  43. package/dist/lib/copilot/entry-proposal.provider.d.ts.map +1 -0
  44. package/dist/lib/copilot/entry-proposal.provider.js +619 -0
  45. package/dist/lib/copilot/filter-schema.d.ts +61 -0
  46. package/dist/lib/copilot/filter-schema.d.ts.map +1 -0
  47. package/dist/lib/copilot/filter-schema.js +139 -0
  48. package/dist/lib/copilot/project-entry.d.ts +23 -0
  49. package/dist/lib/copilot/project-entry.d.ts.map +1 -0
  50. package/dist/lib/copilot/project-entry.js +36 -0
  51. package/dist/lib/copilot/proposal-kinds.d.ts +30 -0
  52. package/dist/lib/copilot/proposal-kinds.d.ts.map +1 -0
  53. package/dist/lib/copilot/proposal-kinds.js +32 -0
  54. package/dist/lib/copilot/revision-tool.provider.d.ts +56 -0
  55. package/dist/lib/copilot/revision-tool.provider.d.ts.map +1 -0
  56. package/dist/lib/copilot/revision-tool.provider.js +215 -0
  57. package/dist/lib/docs/content-schemas.d.ts +34 -0
  58. package/dist/lib/docs/content-schemas.d.ts.map +1 -0
  59. package/dist/lib/docs/content-schemas.js +617 -0
  60. package/dist/lib/docs/describe-content-api.d.ts +22 -0
  61. package/dist/lib/docs/describe-content-api.d.ts.map +1 -0
  62. package/dist/lib/docs/describe-content-api.js +173 -0
  63. package/dist/lib/docs/field-schema.d.ts +28 -0
  64. package/dist/lib/docs/field-schema.d.ts.map +1 -0
  65. package/dist/lib/docs/field-schema.js +214 -0
  66. package/dist/lib/entries/application/use-cases/bulk-publish-entries.use-case.d.ts +23 -0
  67. package/dist/lib/entries/application/use-cases/bulk-publish-entries.use-case.d.ts.map +1 -0
  68. package/dist/lib/entries/application/use-cases/bulk-publish-entries.use-case.js +77 -0
  69. package/dist/lib/entries/application/use-cases/bulk-unpublish-entries.use-case.d.ts +23 -0
  70. package/dist/lib/entries/application/use-cases/bulk-unpublish-entries.use-case.d.ts.map +1 -0
  71. package/dist/lib/entries/application/use-cases/bulk-unpublish-entries.use-case.js +66 -0
  72. package/dist/lib/entries/application/use-cases/publish-entry.use-case.d.ts +43 -0
  73. package/dist/lib/entries/application/use-cases/publish-entry.use-case.d.ts.map +1 -0
  74. package/dist/lib/entries/application/use-cases/publish-entry.use-case.js +106 -0
  75. package/dist/lib/entries/application/use-cases/unpublish-entry.use-case.d.ts +30 -0
  76. package/dist/lib/entries/application/use-cases/unpublish-entry.use-case.d.ts.map +1 -0
  77. package/dist/lib/entries/application/use-cases/unpublish-entry.use-case.js +70 -0
  78. package/dist/lib/entries/controllers/bulk-entries.controller.d.ts +26 -0
  79. package/dist/lib/entries/controllers/bulk-entries.controller.d.ts.map +1 -0
  80. package/dist/lib/entries/controllers/create-entry.controller.d.ts +20 -0
  81. package/dist/lib/entries/controllers/create-entry.controller.d.ts.map +1 -0
  82. package/dist/lib/entries/controllers/delete-entry.controller.d.ts +24 -0
  83. package/dist/lib/entries/controllers/delete-entry.controller.d.ts.map +1 -0
  84. package/dist/lib/entries/controllers/get-entry.controller.d.ts +34 -0
  85. package/dist/lib/entries/controllers/get-entry.controller.d.ts.map +1 -0
  86. package/dist/lib/entries/controllers/list-entries.controller.d.ts +20 -0
  87. package/dist/lib/entries/controllers/list-entries.controller.d.ts.map +1 -0
  88. package/dist/lib/entries/controllers/publish-entry.controller.d.ts +19 -0
  89. package/dist/lib/entries/controllers/publish-entry.controller.d.ts.map +1 -0
  90. package/dist/lib/entries/controllers/resolve-type.d.ts +9 -0
  91. package/dist/lib/entries/controllers/resolve-type.d.ts.map +1 -0
  92. package/dist/lib/entries/controllers/update-entry.controller.d.ts +18 -0
  93. package/dist/lib/entries/controllers/update-entry.controller.d.ts.map +1 -0
  94. package/dist/lib/entries/domain/entry-publish-blocked.error.d.ts +13 -0
  95. package/dist/lib/entries/domain/entry-publish-blocked.error.d.ts.map +1 -0
  96. package/dist/lib/entries/domain/entry-publish-blocked.error.js +19 -0
  97. package/dist/lib/entries/domain/entry.d.ts +71 -0
  98. package/dist/lib/entries/domain/entry.d.ts.map +1 -0
  99. package/dist/lib/entries/domain/entry.js +90 -0
  100. package/dist/lib/entries/domain/events/entry-events.d.ts +67 -0
  101. package/dist/lib/entries/domain/events/entry-events.d.ts.map +1 -0
  102. package/dist/lib/entries/domain/events/entry-events.js +100 -0
  103. package/dist/lib/entries/dto/bulk-ids.dto.d.ts +11 -0
  104. package/dist/lib/entries/dto/bulk-ids.dto.d.ts.map +1 -0
  105. package/dist/lib/entries/dto/list-entries-query.dto.d.ts +46 -0
  106. package/dist/lib/entries/dto/list-entries-query.dto.d.ts.map +1 -0
  107. package/dist/lib/entries/dto/relation-delta-map.validator.d.ts +19 -0
  108. package/dist/lib/entries/dto/relation-delta-map.validator.d.ts.map +1 -0
  109. package/dist/lib/entries/dto/save-entry.dto.d.ts +46 -0
  110. package/dist/lib/entries/dto/save-entry.dto.d.ts.map +1 -0
  111. package/dist/lib/entries/entries.constants.d.ts +19 -0
  112. package/dist/lib/entries/entries.constants.d.ts.map +1 -0
  113. package/dist/lib/entries/entries.constants.js +21 -0
  114. package/dist/lib/entries/http/controllers/bulk-entries.controller.d.ts +33 -0
  115. package/dist/lib/entries/http/controllers/bulk-entries.controller.d.ts.map +1 -0
  116. package/dist/lib/entries/http/controllers/bulk-entries.controller.js +143 -0
  117. package/dist/lib/entries/http/controllers/create-entry.controller.d.ts +21 -0
  118. package/dist/lib/entries/http/controllers/create-entry.controller.d.ts.map +1 -0
  119. package/dist/lib/entries/http/controllers/create-entry.controller.js +52 -0
  120. package/dist/lib/entries/http/controllers/delete-entry.controller.d.ts +25 -0
  121. package/dist/lib/entries/http/controllers/delete-entry.controller.d.ts.map +1 -0
  122. package/dist/lib/entries/http/controllers/delete-entry.controller.js +84 -0
  123. package/dist/lib/entries/http/controllers/get-entry.controller.d.ts +44 -0
  124. package/dist/lib/entries/http/controllers/get-entry.controller.d.ts.map +1 -0
  125. package/dist/lib/entries/http/controllers/get-entry.controller.js +124 -0
  126. package/dist/lib/entries/http/controllers/list-entries.controller.d.ts +20 -0
  127. package/dist/lib/entries/http/controllers/list-entries.controller.d.ts.map +1 -0
  128. package/dist/lib/entries/http/controllers/list-entries.controller.js +52 -0
  129. package/dist/lib/entries/http/controllers/publish-entry.controller.d.ts +22 -0
  130. package/dist/lib/entries/http/controllers/publish-entry.controller.d.ts.map +1 -0
  131. package/dist/lib/entries/http/controllers/publish-entry.controller.js +68 -0
  132. package/dist/lib/entries/http/controllers/resolve-type.d.ts +9 -0
  133. package/dist/lib/entries/http/controllers/resolve-type.d.ts.map +1 -0
  134. package/dist/lib/entries/http/controllers/resolve-type.js +16 -0
  135. package/dist/lib/entries/http/controllers/to-actor.d.ts +13 -0
  136. package/dist/lib/entries/http/controllers/to-actor.d.ts.map +1 -0
  137. package/dist/lib/entries/http/controllers/to-actor.js +15 -0
  138. package/dist/lib/entries/http/controllers/update-entry.controller.d.ts +19 -0
  139. package/dist/lib/entries/http/controllers/update-entry.controller.d.ts.map +1 -0
  140. package/dist/lib/entries/http/controllers/update-entry.controller.js +51 -0
  141. package/dist/lib/entries/http/dto/bulk-ids.dto.d.ts +11 -0
  142. package/dist/lib/entries/http/dto/bulk-ids.dto.d.ts.map +1 -0
  143. package/dist/lib/entries/http/dto/bulk-ids.dto.js +33 -0
  144. package/dist/lib/entries/http/dto/list-entries-query.dto.d.ts +66 -0
  145. package/dist/lib/entries/http/dto/list-entries-query.dto.d.ts.map +1 -0
  146. package/dist/lib/entries/http/dto/list-entries-query.dto.js +192 -0
  147. package/dist/lib/entries/http/dto/relation-delta-map.validator.d.ts +30 -0
  148. package/dist/lib/entries/http/dto/relation-delta-map.validator.d.ts.map +1 -0
  149. package/dist/lib/entries/http/dto/relation-delta-map.validator.js +102 -0
  150. package/dist/lib/entries/http/dto/save-entry.dto.d.ts +48 -0
  151. package/dist/lib/entries/http/dto/save-entry.dto.d.ts.map +1 -0
  152. package/dist/lib/entries/http/dto/save-entry.dto.js +120 -0
  153. package/dist/lib/entries/http/guards/content-grant.guard.d.ts +37 -0
  154. package/dist/lib/entries/http/guards/content-grant.guard.d.ts.map +1 -0
  155. package/dist/lib/entries/http/guards/content-grant.guard.js +67 -0
  156. package/dist/lib/entries/infrastructure/persistence/bulk-publish-verdicts.d.ts +22 -0
  157. package/dist/lib/entries/infrastructure/persistence/bulk-publish-verdicts.d.ts.map +1 -0
  158. package/dist/lib/entries/infrastructure/persistence/bulk-publish-verdicts.js +81 -0
  159. package/dist/lib/entries/infrastructure/persistence/entry-counter.service.d.ts +42 -0
  160. package/dist/lib/entries/infrastructure/persistence/entry-counter.service.d.ts.map +1 -0
  161. package/dist/lib/entries/infrastructure/persistence/entry-counter.service.js +73 -0
  162. package/dist/lib/entries/infrastructure/persistence/entry-row.d.ts +56 -0
  163. package/dist/lib/entries/infrastructure/persistence/entry-row.d.ts.map +1 -0
  164. package/dist/lib/entries/infrastructure/persistence/entry-row.js +185 -0
  165. package/dist/lib/entries/infrastructure/persistence/entry-writer.service.d.ts +392 -0
  166. package/dist/lib/entries/infrastructure/persistence/entry-writer.service.d.ts.map +1 -0
  167. package/dist/lib/entries/infrastructure/persistence/entry-writer.service.js +1223 -0
  168. package/dist/lib/entries/infrastructure/persistence/field-selection.d.ts +24 -0
  169. package/dist/lib/entries/infrastructure/persistence/field-selection.d.ts.map +1 -0
  170. package/dist/lib/entries/infrastructure/persistence/media-accept.d.ts +23 -0
  171. package/dist/lib/entries/infrastructure/persistence/media-accept.d.ts.map +1 -0
  172. package/dist/lib/entries/infrastructure/persistence/media-accept.js +55 -0
  173. package/dist/lib/entries/infrastructure/persistence/relation-link.service.d.ts +327 -0
  174. package/dist/lib/entries/infrastructure/persistence/relation-link.service.d.ts.map +1 -0
  175. package/dist/lib/entries/infrastructure/persistence/relation-link.service.js +1008 -0
  176. package/dist/lib/entries/infrastructure/queries/bulk-publish-preview.query.d.ts +19 -0
  177. package/dist/lib/entries/infrastructure/queries/bulk-publish-preview.query.d.ts.map +1 -0
  178. package/dist/lib/entries/infrastructure/queries/bulk-publish-preview.query.js +39 -0
  179. package/dist/lib/entries/infrastructure/queries/entries.service.d.ts +64 -0
  180. package/dist/lib/entries/infrastructure/queries/entries.service.d.ts.map +1 -0
  181. package/dist/lib/entries/infrastructure/queries/entries.service.js +202 -0
  182. package/dist/lib/entries/infrastructure/queries/entry-filter-schema.d.ts +40 -0
  183. package/dist/lib/entries/infrastructure/queries/entry-filter-schema.d.ts.map +1 -0
  184. package/dist/lib/entries/infrastructure/queries/entry-filter-surface.d.ts +38 -0
  185. package/dist/lib/entries/infrastructure/queries/entry-filter-surface.d.ts.map +1 -0
  186. package/dist/lib/entries/infrastructure/queries/entry-filter-surface.js +310 -0
  187. package/dist/lib/entries/infrastructure/queries/entry-scalar-fields.d.ts +25 -0
  188. package/dist/lib/entries/infrastructure/queries/entry-scalar-fields.d.ts.map +1 -0
  189. package/dist/lib/entries/infrastructure/queries/entry-scalar-fields.js +51 -0
  190. package/dist/lib/entries/infrastructure/queries/entry-search.d.ts +19 -0
  191. package/dist/lib/entries/infrastructure/queries/entry-search.d.ts.map +1 -0
  192. package/dist/lib/entries/infrastructure/queries/entry-search.js +52 -0
  193. package/dist/lib/entries/infrastructure/queries/media-refs.query.d.ts +21 -0
  194. package/dist/lib/entries/infrastructure/queries/media-refs.query.d.ts.map +1 -0
  195. package/dist/lib/entries/infrastructure/queries/media-refs.query.js +117 -0
  196. package/dist/lib/entries/services/entries.service.d.ts +59 -0
  197. package/dist/lib/entries/services/entries.service.d.ts.map +1 -0
  198. package/dist/lib/entries/services/entry-counter.service.d.ts +31 -0
  199. package/dist/lib/entries/services/entry-counter.service.d.ts.map +1 -0
  200. package/dist/lib/entries/services/entry-filter-schema.d.ts +32 -0
  201. package/dist/lib/entries/services/entry-filter-schema.d.ts.map +1 -0
  202. package/dist/lib/entries/services/entry-row.d.ts +56 -0
  203. package/dist/lib/entries/services/entry-row.d.ts.map +1 -0
  204. package/dist/lib/entries/services/entry-writer.service.d.ts +193 -0
  205. package/dist/lib/entries/services/entry-writer.service.d.ts.map +1 -0
  206. package/dist/lib/entries/services/relation-link.service.d.ts +115 -0
  207. package/dist/lib/entries/services/relation-link.service.d.ts.map +1 -0
  208. package/dist/lib/entries/types/bulk-publish.d.ts +75 -0
  209. package/dist/lib/entries/types/bulk-publish.d.ts.map +1 -0
  210. package/dist/lib/entries/types/bulk-publish.js +22 -0
  211. package/dist/lib/entries/types/entry-list-view.d.ts +205 -0
  212. package/dist/lib/entries/types/entry-list-view.d.ts.map +1 -0
  213. package/dist/lib/entries/types/entry-list-view.js +5 -0
  214. package/dist/lib/entries/types/filter-surface.d.ts +35 -0
  215. package/dist/lib/entries/types/filter-surface.d.ts.map +1 -0
  216. package/dist/lib/entries/types/filter-surface.js +2 -0
  217. package/dist/lib/extension/entry-extension-boot-check.d.ts +16 -0
  218. package/dist/lib/extension/entry-extension-boot-check.d.ts.map +1 -0
  219. package/dist/lib/extension/entry-extension-boot-check.js +42 -0
  220. package/dist/lib/extension/entry-extension.d.ts +225 -0
  221. package/dist/lib/extension/entry-extension.d.ts.map +1 -0
  222. package/dist/lib/extension/entry-extension.js +27 -0
  223. package/dist/lib/extension/media-asset-resolver.d.ts +85 -0
  224. package/dist/lib/extension/media-asset-resolver.d.ts.map +1 -0
  225. package/dist/lib/extension/media-asset-resolver.js +26 -0
  226. package/dist/lib/extension/per-locale-relation.d.ts +18 -0
  227. package/dist/lib/extension/per-locale-relation.d.ts.map +1 -0
  228. package/dist/lib/extension/relation-locale-sync.d.ts +62 -0
  229. package/dist/lib/extension/relation-locale-sync.d.ts.map +1 -0
  230. package/dist/lib/extension/relation-locale-sync.js +88 -0
  231. package/dist/lib/fields/index.d.ts +94 -0
  232. package/dist/lib/fields/index.d.ts.map +1 -0
  233. package/dist/lib/fields/index.js +203 -0
  234. package/dist/lib/insights/http/controllers/content-pipeline.controller.d.ts +16 -0
  235. package/dist/lib/insights/http/controllers/content-pipeline.controller.d.ts.map +1 -0
  236. package/dist/lib/insights/http/controllers/content-pipeline.controller.js +39 -0
  237. package/dist/lib/insights/http/controllers/content-punchcard.controller.d.ts +18 -0
  238. package/dist/lib/insights/http/controllers/content-punchcard.controller.d.ts.map +1 -0
  239. package/dist/lib/insights/http/controllers/content-punchcard.controller.js +42 -0
  240. package/dist/lib/insights/http/controllers/content-stale.controller.d.ts +17 -0
  241. package/dist/lib/insights/http/controllers/content-stale.controller.d.ts.map +1 -0
  242. package/dist/lib/insights/http/controllers/content-stale.controller.js +40 -0
  243. package/dist/lib/insights/http/controllers/content-totals.controller.d.ts +18 -0
  244. package/dist/lib/insights/http/controllers/content-totals.controller.d.ts.map +1 -0
  245. package/dist/lib/insights/http/controllers/content-totals.controller.js +42 -0
  246. package/dist/lib/insights/http/controllers/content-unshipped.controller.d.ts +17 -0
  247. package/dist/lib/insights/http/controllers/content-unshipped.controller.d.ts.map +1 -0
  248. package/dist/lib/insights/http/controllers/content-unshipped.controller.js +40 -0
  249. package/dist/lib/insights/http/controllers/content-velocity.controller.d.ts +17 -0
  250. package/dist/lib/insights/http/controllers/content-velocity.controller.d.ts.map +1 -0
  251. package/dist/lib/insights/http/controllers/content-velocity.controller.js +41 -0
  252. package/dist/lib/insights/http/dto/insights-range-query.dto.d.ts +15 -0
  253. package/dist/lib/insights/http/dto/insights-range-query.dto.d.ts.map +1 -0
  254. package/dist/lib/insights/http/dto/insights-range-query.dto.js +38 -0
  255. package/dist/lib/insights/infrastructure/queries/content-insights.query.d.ts +77 -0
  256. package/dist/lib/insights/infrastructure/queries/content-insights.query.d.ts.map +1 -0
  257. package/dist/lib/insights/infrastructure/queries/content-insights.query.js +380 -0
  258. package/dist/lib/insights/types/content-insights-view.d.ts +134 -0
  259. package/dist/lib/insights/types/content-insights-view.d.ts.map +1 -0
  260. package/dist/lib/insights/types/content-insights-view.js +10 -0
  261. package/dist/lib/mcp/content-tools.provider.d.ts +83 -0
  262. package/dist/lib/mcp/content-tools.provider.d.ts.map +1 -0
  263. package/dist/lib/mcp/content-tools.provider.js +441 -0
  264. package/dist/lib/mcp/tool-input.d.ts +43 -0
  265. package/dist/lib/mcp/tool-input.d.ts.map +1 -0
  266. package/dist/lib/mcp/tool-input.js +117 -0
  267. package/dist/lib/mcp/tool-schemas.d.ts +34 -0
  268. package/dist/lib/mcp/tool-schemas.d.ts.map +1 -0
  269. package/dist/lib/mcp/tool-schemas.js +282 -0
  270. package/dist/lib/public/controllers/get-public-entry.controller.d.ts +26 -0
  271. package/dist/lib/public/controllers/get-public-entry.controller.d.ts.map +1 -0
  272. package/dist/lib/public/controllers/list-public-entries.controller.d.ts +24 -0
  273. package/dist/lib/public/controllers/list-public-entries.controller.d.ts.map +1 -0
  274. package/dist/lib/public/controllers/public-schema.controller.d.ts +18 -0
  275. package/dist/lib/public/controllers/public-schema.controller.d.ts.map +1 -0
  276. package/dist/lib/public-api/http/api-token-request.d.ts +41 -0
  277. package/dist/lib/public-api/http/api-token-request.d.ts.map +1 -0
  278. package/dist/lib/public-api/http/api-token-request.js +2 -0
  279. package/dist/lib/public-api/http/controllers/public-content-types.controller.d.ts +31 -0
  280. package/dist/lib/public-api/http/controllers/public-content-types.controller.d.ts.map +1 -0
  281. package/dist/lib/public-api/http/controllers/public-content-types.controller.js +93 -0
  282. package/dist/lib/public-api/http/controllers/public-entries.controller.d.ts +101 -0
  283. package/dist/lib/public-api/http/controllers/public-entries.controller.d.ts.map +1 -0
  284. package/dist/lib/public-api/http/controllers/public-entries.controller.js +307 -0
  285. package/dist/lib/public-api/http/controllers/public-entry-writes.controller.d.ts +76 -0
  286. package/dist/lib/public-api/http/controllers/public-entry-writes.controller.d.ts.map +1 -0
  287. package/dist/lib/public-api/http/controllers/public-entry-writes.controller.js +353 -0
  288. package/dist/lib/public-api/http/controllers/resolve-granted-type.d.ts +42 -0
  289. package/dist/lib/public-api/http/controllers/resolve-granted-type.d.ts.map +1 -0
  290. package/dist/lib/public-api/http/controllers/resolve-granted-type.js +25 -0
  291. package/dist/lib/public-api/http/decorators/current-api-token.decorator.d.ts +8 -0
  292. package/dist/lib/public-api/http/decorators/current-api-token.decorator.d.ts.map +1 -0
  293. package/dist/lib/public-api/http/decorators/current-api-token.decorator.js +17 -0
  294. package/dist/lib/public-api/http/dto/public-bulk.dto.d.ts +58 -0
  295. package/dist/lib/public-api/http/dto/public-bulk.dto.d.ts.map +1 -0
  296. package/dist/lib/public-api/http/dto/public-bulk.dto.js +118 -0
  297. package/dist/lib/public-api/http/dto/public-list-entries-query.dto.d.ts +106 -0
  298. package/dist/lib/public-api/http/dto/public-list-entries-query.dto.d.ts.map +1 -0
  299. package/dist/lib/public-api/http/dto/public-list-entries-query.dto.js +297 -0
  300. package/dist/lib/public-api/http/dto/public-save-entry.dto.d.ts +39 -0
  301. package/dist/lib/public-api/http/dto/public-save-entry.dto.d.ts.map +1 -0
  302. package/dist/lib/public-api/http/dto/public-save-entry.dto.js +112 -0
  303. package/dist/lib/public-api/http/guards/api-token-workspace.guard.d.ts +25 -0
  304. package/dist/lib/public-api/http/guards/api-token-workspace.guard.d.ts.map +1 -0
  305. package/dist/lib/public-api/http/guards/api-token-workspace.guard.js +58 -0
  306. package/dist/lib/public-api/http/guards/api-token.guard.d.ts +32 -0
  307. package/dist/lib/public-api/http/guards/api-token.guard.d.ts.map +1 -0
  308. package/dist/lib/public-api/http/guards/api-token.guard.js +92 -0
  309. package/dist/lib/public-api/http/guards/draft-visibility.guard.d.ts +25 -0
  310. package/dist/lib/public-api/http/guards/draft-visibility.guard.d.ts.map +1 -0
  311. package/dist/lib/public-api/http/guards/draft-visibility.guard.js +56 -0
  312. package/dist/lib/public-api/infrastructure/bulk-save-op.d.ts +55 -0
  313. package/dist/lib/public-api/infrastructure/bulk-save-op.d.ts.map +1 -0
  314. package/dist/lib/public-api/infrastructure/bulk-save-op.js +61 -0
  315. package/dist/lib/public-api/infrastructure/field-selection.d.ts +21 -0
  316. package/dist/lib/public-api/infrastructure/field-selection.d.ts.map +1 -0
  317. package/dist/lib/public-api/infrastructure/field-selection.js +72 -0
  318. package/dist/lib/public-api/infrastructure/public-entries.query.d.ts +248 -0
  319. package/dist/lib/public-api/infrastructure/public-entries.query.d.ts.map +1 -0
  320. package/dist/lib/public-api/infrastructure/public-entries.query.js +557 -0
  321. package/dist/lib/public-api/infrastructure/public-entry-row.d.ts +31 -0
  322. package/dist/lib/public-api/infrastructure/public-entry-row.d.ts.map +1 -0
  323. package/dist/lib/public-api/infrastructure/public-entry-row.js +76 -0
  324. package/dist/lib/public-api/infrastructure/public-entry-writes.service.d.ts +188 -0
  325. package/dist/lib/public-api/infrastructure/public-entry-writes.service.d.ts.map +1 -0
  326. package/dist/lib/public-api/infrastructure/public-entry-writes.service.js +321 -0
  327. package/dist/lib/public-api/infrastructure/public-expansion.query.d.ts +98 -0
  328. package/dist/lib/public-api/infrastructure/public-expansion.query.d.ts.map +1 -0
  329. package/dist/lib/public-api/infrastructure/public-expansion.query.js +384 -0
  330. package/dist/lib/public-api/types/public-bulk.d.ts +77 -0
  331. package/dist/lib/public-api/types/public-bulk.d.ts.map +1 -0
  332. package/dist/lib/public-api/types/public-bulk.js +23 -0
  333. package/dist/lib/public-api/types/public-entry.d.ts +97 -0
  334. package/dist/lib/public-api/types/public-entry.d.ts.map +1 -0
  335. package/dist/lib/public-api/types/public-entry.js +8 -0
  336. package/dist/lib/public-api/types/public-expansion.d.ts +92 -0
  337. package/dist/lib/public-api/types/public-expansion.d.ts.map +1 -0
  338. package/dist/lib/public-api/types/public-expansion.js +2 -0
  339. package/dist/lib/registry/content-type-registry.d.ts +103 -0
  340. package/dist/lib/registry/content-type-registry.d.ts.map +1 -0
  341. package/dist/lib/registry/content-type-registry.js +155 -0
  342. package/dist/lib/revisions/application/ports/revision-store.d.ts +71 -0
  343. package/dist/lib/revisions/application/ports/revision-store.d.ts.map +1 -0
  344. package/dist/lib/revisions/application/ports/revision-store.js +9 -0
  345. package/dist/lib/revisions/application/use-cases/publish-revision.use-case.d.ts +40 -0
  346. package/dist/lib/revisions/application/use-cases/publish-revision.use-case.d.ts.map +1 -0
  347. package/dist/lib/revisions/application/use-cases/publish-revision.use-case.js +66 -0
  348. package/dist/lib/revisions/application/use-cases/restore-revision.use-case.d.ts +36 -0
  349. package/dist/lib/revisions/application/use-cases/restore-revision.use-case.d.ts.map +1 -0
  350. package/dist/lib/revisions/application/use-cases/restore-revision.use-case.js +57 -0
  351. package/dist/lib/revisions/domain/revision-status.d.ts +18 -0
  352. package/dist/lib/revisions/domain/revision-status.d.ts.map +1 -0
  353. package/dist/lib/revisions/domain/revision-status.js +18 -0
  354. package/dist/lib/revisions/domain/revision.d.ts +80 -0
  355. package/dist/lib/revisions/domain/revision.d.ts.map +1 -0
  356. package/dist/lib/revisions/domain/revision.js +84 -0
  357. package/dist/lib/revisions/http/controllers/publish-revision.controller.d.ts +19 -0
  358. package/dist/lib/revisions/http/controllers/publish-revision.controller.d.ts.map +1 -0
  359. package/dist/lib/revisions/http/controllers/publish-revision.controller.js +51 -0
  360. package/dist/lib/revisions/http/controllers/restore-revision.controller.d.ts +17 -0
  361. package/dist/lib/revisions/http/controllers/restore-revision.controller.d.ts.map +1 -0
  362. package/dist/lib/revisions/http/controllers/restore-revision.controller.js +49 -0
  363. package/dist/lib/revisions/http/controllers/revisions.controller.d.ts +20 -0
  364. package/dist/lib/revisions/http/controllers/revisions.controller.d.ts.map +1 -0
  365. package/dist/lib/revisions/http/controllers/revisions.controller.js +76 -0
  366. package/dist/lib/revisions/infrastructure/persistence/drizzle-revision.store.d.ts +33 -0
  367. package/dist/lib/revisions/infrastructure/persistence/drizzle-revision.store.d.ts.map +1 -0
  368. package/dist/lib/revisions/infrastructure/persistence/drizzle-revision.store.js +174 -0
  369. package/dist/lib/revisions/infrastructure/persistence/revision-snapshot.d.ts +17 -0
  370. package/dist/lib/revisions/infrastructure/persistence/revision-snapshot.d.ts.map +1 -0
  371. package/dist/lib/revisions/infrastructure/persistence/revision-snapshot.js +20 -0
  372. package/dist/lib/revisions/infrastructure/persistence/revision-table.d.ts +228 -0
  373. package/dist/lib/revisions/infrastructure/persistence/revision-table.d.ts.map +1 -0
  374. package/dist/lib/revisions/infrastructure/persistence/revision-table.js +57 -0
  375. package/dist/lib/revisions/infrastructure/queries/revision-refs.query.d.ts +22 -0
  376. package/dist/lib/revisions/infrastructure/queries/revision-refs.query.d.ts.map +1 -0
  377. package/dist/lib/revisions/infrastructure/queries/revision-refs.query.js +66 -0
  378. package/dist/lib/revisions/revisions.constants.d.ts +10 -0
  379. package/dist/lib/revisions/revisions.constants.d.ts.map +1 -0
  380. package/dist/lib/revisions/revisions.constants.js +12 -0
  381. package/dist/lib/revisions/types/revision-view.d.ts +74 -0
  382. package/dist/lib/revisions/types/revision-view.d.ts.map +1 -0
  383. package/dist/lib/revisions/types/revision-view.js +2 -0
  384. package/dist/lib/types/content-type.d.ts +131 -0
  385. package/dist/lib/types/content-type.d.ts.map +1 -0
  386. package/dist/lib/types/content-type.js +28 -0
  387. package/dist/lib/types/fields.d.ts +303 -0
  388. package/dist/lib/types/fields.d.ts.map +1 -0
  389. package/dist/lib/types/fields.js +52 -0
  390. package/dist/lib/utils/content-plugin.d.ts +35 -0
  391. package/dist/lib/utils/content-plugin.d.ts.map +1 -0
  392. package/dist/lib/utils/content-plugin.js +35 -0
  393. package/dist/lib/validation/services/entry-validation.service.d.ts +24 -0
  394. package/dist/lib/validation/services/entry-validation.service.d.ts.map +1 -0
  395. package/dist/lib/validation/services/entry-validation.service.js +35 -0
  396. package/package.json +54 -0
@@ -0,0 +1,205 @@
1
+ import type { EntryStatus } from '../../types/content-type';
2
+ /** Re-exported so list-view consumers get publish state from one source. */
3
+ export type { EntryStatus };
4
+ /**
5
+ * One entry as served to the admin records table: the storage envelope plus a
6
+ * `values` bag keyed by field name. Mirrors the admin's `EntryRecord` — the
7
+ * wire contract the dynamic table renders from. `status` is present only on
8
+ * `publishable` types (see {@link EntryEnvelope}).
9
+ */
10
+ export interface EntryRecord {
11
+ /** Entry id (the `:entryId` route segment). */
12
+ id: string;
13
+ /** Publication status — only on `publishable` types. */
14
+ status?: EntryStatus;
15
+ /**
16
+ * ISO timestamp of when this entry last went live, or `null` if it never has
17
+ * (or was explicitly unpublished) — only on `publishable` types.
18
+ *
19
+ * It **survives an edit**: saving a published entry moves it back to `draft`
20
+ * while its published *version* stays live in history, so `status: 'draft'`
21
+ * with a `publishedAt` means "published content plus unpublished changes"
22
+ * (the admin's **Modified** state), which a plain draft has never had.
23
+ */
24
+ publishedAt?: string | null;
25
+ /** Locale slug of this row — only on `i18n` types. */
26
+ locale?: string;
27
+ /** Shared translation-group id — only on `i18n` types. */
28
+ localeGroupId?: string;
29
+ /** ISO creation timestamp. */
30
+ createdAt: string;
31
+ /** ISO last-updated timestamp. */
32
+ updatedAt: string;
33
+ /** Field values, keyed by field name. */
34
+ values: Record<string, unknown>;
35
+ /**
36
+ * A capped **preview** of this entry's relation links, keyed by relation
37
+ * field name — present only when the caller opts in with
38
+ * `?relations=preview&relationFields=<names>` (the records table, for its
39
+ * visible relation columns). Each field carries at most one page of refs
40
+ * plus its true `total`, so a record with thousands of links contributes one
41
+ * page here; the table's dropdown pages through the rest via
42
+ * `GET /content/:type/:id/relations/:field`.
43
+ *
44
+ * Additive to {@link values}, never a replacement: an owning single
45
+ * relation still passes through `values` as its raw FK, which is what a save
46
+ * submits back.
47
+ */
48
+ relations?: Record<string, RelationFieldView>;
49
+ }
50
+ /** The paginated envelope, matching the admin list-page convention. */
51
+ export interface EntryListView {
52
+ items: EntryRecord[];
53
+ total: number;
54
+ page: number;
55
+ pageSize: number;
56
+ }
57
+ /**
58
+ * One linked record on a relation field, resolved for display: the target id
59
+ * plus a pre-derived {@link EntryRecord} title (and publish `status` for a
60
+ * publishable target). Lets the admin render an assigned relation by title —
61
+ * and seed the form value with the id — without a per-id round-trip.
62
+ */
63
+ export interface RelationRef {
64
+ /** The linked entry's id (what a save submits back). */
65
+ id: string;
66
+ /** Display title (first text/select field, else the id). */
67
+ title: string;
68
+ /**
69
+ * URL-ish handle for the record — the value of its slug field (a field with
70
+ * `admin.widget === 'slug'`, else one literally named `slug`) when non-empty.
71
+ * Absent when the target has no slug field; the admin falls back to a
72
+ * slugified title for display.
73
+ */
74
+ slug?: string;
75
+ /** Publish status — present only for publishable target types. */
76
+ status?: EntryStatus;
77
+ /**
78
+ * The link exists but its target row could not be resolved — soft-deleted,
79
+ * or outside the workspace. `title` then stands in as the raw id, which is
80
+ * not displayable, so the ref is flagged and the admin renders it as an
81
+ * unavailable record instead of printing an FK.
82
+ */
83
+ missing?: true;
84
+ }
85
+ /**
86
+ * One attached asset on a media field, resolved for display: the asset id plus
87
+ * the facts the admin renders (name, thumbnail url, kind/MIME). Mirrors
88
+ * {@link RelationRef} — an asset that can't be resolved (deleted / cross-
89
+ * workspace) is an id-only ref flagged `missing`, so the UI shows "Unavailable
90
+ * asset" rather than a raw uuid.
91
+ */
92
+ export interface MediaRef {
93
+ /** The asset id (what a save submits back). */
94
+ id: string;
95
+ /** Original file name / display label. */
96
+ name: string;
97
+ /** Raw-stream route for the **original** bytes (download, or the fallback). */
98
+ url: string;
99
+ /**
100
+ * Route for the small (~320px) derivative the media plugin generated, when
101
+ * there is one — what an editor tile or a version-preview chip renders, so a
102
+ * form full of media doesn't pull full-size originals. Absent for a
103
+ * non-image, an SVG, or an image too small to derive.
104
+ */
105
+ thumbUrl?: string;
106
+ /** Route for the larger (~1280px) derivative, same caveats as {@link thumbUrl}. */
107
+ previewUrl?: string;
108
+ /** Coarse kind — image/video/audio/document/archive. */
109
+ kind: string;
110
+ /** MIME type, e.g. `image/png`. */
111
+ mimeType: string;
112
+ /**
113
+ * The text alternative **this usage** publishes with — the value's own
114
+ * `alt` where it has one, the asset row's default otherwise, and `''` when
115
+ * the usage is marked {@link decorative} (`ORT-83`).
116
+ */
117
+ alt?: string | null;
118
+ /**
119
+ * The author marked this usage purely presentational, so it publishes with
120
+ * an empty `alt` and a screen reader skips it.
121
+ *
122
+ * Distinct from an absent {@link alt}, which means nobody has answered the
123
+ * question yet — the distinction WCAG 1.1.1 turns on, and what a required
124
+ * media field's publish gate checks for.
125
+ */
126
+ decorative?: true;
127
+ /** The asset could not be resolved (deleted or outside the workspace). */
128
+ missing?: true;
129
+ }
130
+ /**
131
+ * One relation field's links: a **windowed** page of resolved refs plus the
132
+ * `total` count across the whole set. A many/inverse relation can hold far more
133
+ * links than fit in one payload, so the editor pages through them (infinite
134
+ * scroll) rather than loading every id; a single relation is a `total` of 0/1.
135
+ */
136
+ export interface RelationFieldView {
137
+ items: RelationRef[];
138
+ /** Total links on this field (across all pages). */
139
+ total: number;
140
+ }
141
+ /**
142
+ * The relation links of one entry, keyed by relation field name — every relation
143
+ * field (owning single/many **and** inverse back-references), each a **first
144
+ * page** of links + its total, so the editor has one source for what's linked
145
+ * and its counts. Further pages come from the per-field read.
146
+ */
147
+ export interface EntryRelationsView {
148
+ relations: Record<string, RelationFieldView>;
149
+ }
150
+ /**
151
+ * The attached assets of one entry, keyed by media field name — each field's
152
+ * ordered {@link MediaRef}s (name / thumbnail url / kind), so the editor renders
153
+ * assigned media by thumbnail without a per-id round-trip. Empty when no media
154
+ * resolver is bound. A `multiple` field's list preserves the stored order, with
155
+ * a deleted/cross-workspace asset kept as a `missing` ref.
156
+ */
157
+ export interface EntryMediaView {
158
+ media: Record<string, MediaRef[]>;
159
+ }
160
+ /**
161
+ * An incremental change to one many/inverse relation field — the wire body of
162
+ * `POST /content/:type/:id/relations/:field`. Only the diff crosses the wire, so
163
+ * a relation with thousands of links never has to be sent (or held) in full.
164
+ * `order` renumbers the listed ids (owning many-relations only); it's ignored
165
+ * for the inverse side, which doesn't own the order.
166
+ */
167
+ export interface RelationDelta {
168
+ /** Target ids to link (append; re-linking an existing pair is a no-op). */
169
+ link?: string[];
170
+ /** Target ids to unlink. */
171
+ unlink?: string[];
172
+ /** Desired order of the listed target ids (owning many-relations only). */
173
+ order?: string[];
174
+ /**
175
+ * The target of an owning **single** relation — the one-value counterpart of
176
+ * `link`, and the only key a single relation accepts here. `null` clears it.
177
+ *
178
+ * A single relation is a column on the row, so it is normally set through
179
+ * `values`. It is settable here too for one reason: `values` carries the
180
+ * content type's own contract, where a relation field means *an entry id* —
181
+ * there is no room in it for `by`, so without this key a single relation
182
+ * could not be addressed by translation group at all while a many-relation
183
+ * could. Sending the same field in both `values` and here is a 400.
184
+ */
185
+ set?: string | null;
186
+ /**
187
+ * How the uuids above name their targets. `id` (the default) is a literal
188
+ * entry id; `localeGroup` reads them as **translation group** ids, each
189
+ * resolved to that group's row in the *source entry's own locale*.
190
+ *
191
+ * The group form exists because a client that holds "this tag" as a concept
192
+ * holds its group id, not one id per language — and links may not cross
193
+ * locales, so linking by id forces it to keep a per-locale id map and pick
194
+ * the right one for every write. With `localeGroup` the server picks, which
195
+ * is the only party that knows the source row's locale for certain.
196
+ *
197
+ * Only meaningful when both sides are localized; anything else is a 400.
198
+ */
199
+ by?: RelationDeltaAddressing;
200
+ }
201
+ /** @see RelationDelta.by */
202
+ export declare const RELATION_DELTA_ADDRESSING: readonly ["id", "localeGroup"];
203
+ /** @see RelationDelta.by */
204
+ export type RelationDeltaAddressing = (typeof RELATION_DELTA_ADDRESSING)[number];
205
+ //# sourceMappingURL=entry-list-view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-list-view.d.ts","sourceRoot":"","sources":["../../../../src/lib/entries/types/entry-list-view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D,4EAA4E;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C"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RELATION_DELTA_ADDRESSING = void 0;
4
+ /** @see RelationDelta.by */
5
+ exports.RELATION_DELTA_ADDRESSING = ['id', 'localeGroup'];
@@ -0,0 +1,35 @@
1
+ import type { ScalarFieldType } from '@orthacms/utils-server';
2
+ /**
3
+ * One filterable path offered to the admin's query builder, produced by
4
+ * `buildEntryFilterSurface`. Flat and dotted (`author.name`) — the same
5
+ * string the query-builder puts on the wire as a rule's `field`, walked
6
+ * segment-by-segment by `parseFilterTree` against the sibling
7
+ * `FilterSchema`. The two are built in one traversal so they cannot drift.
8
+ */
9
+ export interface WireFilterField {
10
+ /** Dotted path — `author.name`. Serialised verbatim as a rule `field`. */
11
+ path: string;
12
+ /** Human label for the leaf segment (the relation label for an `id` picker). */
13
+ label: string;
14
+ /** Coercion type; matches the admin's `FIELD_TYPE`. */
15
+ type: ScalarFieldType;
16
+ /** Allowed values — present only for `enum`. */
17
+ enumValues?: readonly string[];
18
+ /**
19
+ * Breadcrumb of relation labels, root-first — `['Author']` for
20
+ * `author.name`, `['Author','Company']` for `author.company.name`.
21
+ * Empty for a root field. Groups the field picker; never serialised.
22
+ */
23
+ group: readonly string[];
24
+ /**
25
+ * For a relation's own `id` field: the target content type name. Tells
26
+ * the admin to render a record picker instead of a raw uuid input.
27
+ * `author.id` → `'author'`.
28
+ */
29
+ relationTarget?: string;
30
+ }
31
+ /** Response body of `GET /content-schema/:name/filter-fields`. */
32
+ export interface FilterFieldsResponse {
33
+ fields: WireFilterField[];
34
+ }
35
+ //# sourceMappingURL=filter-surface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-surface.d.ts","sourceRoot":"","sources":["../../../../src/lib/entries/types/filter-surface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC5B,0EAA0E;IAC1E,IAAI,EAAE,MAAM,CAAC;IACb,gFAAgF;IAChF,KAAK,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,IAAI,EAAE,eAAe,CAAC;IACtB,gDAAgD;IAChD,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B;;;;OAIG;IACH,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,kEAAkE;AAClE,MAAM,WAAW,oBAAoB;IACjC,MAAM,EAAE,eAAe,EAAE,CAAC;CAC7B"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,16 @@
1
+ import { type OnApplicationBootstrap } from '@nestjs/common';
2
+ import type { ContentTypeRegistry } from '../registry/content-type-registry';
3
+ import { type ContentEntryExtension } from './entry-extension';
4
+ /**
5
+ * Fails boot when a registered content type declares `i18n: true` but no
6
+ * {@link ContentEntryExtension} is bound. Without an extension nothing stamps
7
+ * the NOT NULL `locale` column, so the first create would 500 — a clear boot
8
+ * error ("register the i18n plugin") beats a broken first request.
9
+ */
10
+ export declare class EntryExtensionBootCheck implements OnApplicationBootstrap {
11
+ private readonly registry;
12
+ private readonly extension?;
13
+ constructor(registry: ContentTypeRegistry, extension?: ContentEntryExtension | undefined);
14
+ onApplicationBootstrap(): void;
15
+ }
16
+ //# sourceMappingURL=entry-extension-boot-check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-extension-boot-check.d.ts","sourceRoot":"","sources":["../../../src/lib/extension/entry-extension-boot-check.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,KAAK,sBAAsB,EAC9B,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAEH,KAAK,qBAAqB,EAC7B,MAAM,mBAAmB,CAAC;AAE3B;;;;;GAKG;AACH,qBACa,uBAAwB,YAAW,sBAAsB;IAG9D,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAGzB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC;gBAHV,QAAQ,EAAE,mBAAmB,EAG7B,SAAS,CAAC,EAAE,qBAAqB,YAAA;IAGtD,sBAAsB,IAAI,IAAI;CAcjC"}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EntryExtensionBootCheck = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const common_1 = require("@nestjs/common");
6
+ const content_tokens_1 = require("../content.tokens");
7
+ const entry_extension_1 = require("./entry-extension");
8
+ /**
9
+ * Fails boot when a registered content type declares `i18n: true` but no
10
+ * {@link ContentEntryExtension} is bound. Without an extension nothing stamps
11
+ * the NOT NULL `locale` column, so the first create would 500 — a clear boot
12
+ * error ("register the i18n plugin") beats a broken first request.
13
+ */
14
+ let EntryExtensionBootCheck = class EntryExtensionBootCheck {
15
+ registry;
16
+ extension;
17
+ constructor(registry, extension) {
18
+ this.registry = registry;
19
+ this.extension = extension;
20
+ }
21
+ onApplicationBootstrap() {
22
+ if (this.extension)
23
+ return;
24
+ const orphaned = this.registry
25
+ .all()
26
+ .filter((type) => type.i18n)
27
+ .map((type) => `"${type.name}"`);
28
+ if (orphaned.length) {
29
+ throw new Error(`Content type(s) ${orphaned.join(', ')} declare i18n: true, but no ` +
30
+ `CONTENT_ENTRY_EXTENSION is bound. Register a localization plugin ` +
31
+ `(e.g. I18nServerPlugin) after ContentPlugin, or drop the flag.`);
32
+ }
33
+ }
34
+ };
35
+ exports.EntryExtensionBootCheck = EntryExtensionBootCheck;
36
+ exports.EntryExtensionBootCheck = EntryExtensionBootCheck = tslib_1.__decorate([
37
+ (0, common_1.Injectable)(),
38
+ tslib_1.__param(0, (0, content_tokens_1.InjectContentRegistry)()),
39
+ tslib_1.__param(1, (0, common_1.Optional)()),
40
+ tslib_1.__param(1, (0, common_1.Inject)(entry_extension_1.CONTENT_ENTRY_EXTENSION)),
41
+ tslib_1.__metadata("design:paramtypes", [Function, Object])
42
+ ], EntryExtensionBootCheck);
@@ -0,0 +1,225 @@
1
+ /**
2
+ * The entries **extension port** — the seam through which a downstream plugin
3
+ * (e.g. a localization plugin) extends the generic entries pipeline without
4
+ * this package knowing its domain. Content-server *declares* the port and
5
+ * consults it optionally (`@Optional()` injection) from {@link EntriesService}
6
+ * and {@link EntryWriterService}; the extending plugin *binds* an
7
+ * implementation to {@link CONTENT_ENTRY_EXTENSION} in its own module — the
8
+ * same inversion as identity's `CONTENT_CATALOG`, with the roles swapped.
9
+ *
10
+ * Every method is called unconditionally when an extension is bound, for every
11
+ * content type — an implementation MUST no-op (return `undefined` / `{}`) for
12
+ * types it doesn't apply to, so binding an extension never changes the
13
+ * behavior of unrelated types.
14
+ *
15
+ * NestJS-free on purpose (types + a Symbol only): implementations live in
16
+ * other packages, and keeping decorators out means this file could move into
17
+ * a decorator-free subpath without churn.
18
+ *
19
+ * Currently a **single binding**: one provider per app. If a second extension
20
+ * ever needs to coexist, bind a composite that fans out to both — the port's
21
+ * shape (SQL fragments AND-ed, column bags merged) composes cleanly.
22
+ */
23
+ import type { SQL } from 'drizzle-orm';
24
+ import type { Database } from '@orthacms/database';
25
+ import type { FieldSchema, ParsedRule } from '@orthacms/utils-server';
26
+ import type { AnyContentType } from '../types/content-type';
27
+ /** DI token an extension plugin binds its {@link ContentEntryExtension} to. */
28
+ export declare const CONTENT_ENTRY_EXTENSION: unique symbol;
29
+ /**
30
+ * Extension-owned request parameters, forwarded verbatim from the wire
31
+ * (`?locale=` / `?localeFallback=` on reads, `body.locale` on create).
32
+ * Content-server declares them on its DTOs — the strict global
33
+ * `ValidationPipe` rejects undeclared keys, so a generic bag isn't possible —
34
+ * but never interprets them; their semantics live entirely behind the port.
35
+ */
36
+ export interface EntryScopeParams {
37
+ /** Locale slug the request targets; validated by the extension. */
38
+ locale?: string;
39
+ /**
40
+ * `'default'` widens {@link ContentEntryExtension.listScope} to fall back
41
+ * to the default locale where the requested one is missing (used by the
42
+ * admin's relation picker); absent = strict.
43
+ */
44
+ localeFallback?: string;
45
+ /**
46
+ * On **create**, the existing translation group the new row joins (making
47
+ * it a sibling). Absent → the row starts its own fresh group. Validated by
48
+ * the extension against the workspace.
49
+ */
50
+ localeGroupId?: string;
51
+ }
52
+ /**
53
+ * Which write {@link ContentEntryExtension.afterUpdate} is running inside.
54
+ *
55
+ * The two are not symmetric, which is why the hook has to be told them apart.
56
+ * On an **update** the edited row is the authority: what it now holds is what
57
+ * the extension propagates outward. On a **create** it is the opposite — the
58
+ * new row is the one with gaps to fill (a translation arrives carrying the
59
+ * source's shared values but none of its links), so an extension that treated
60
+ * it as the authority would push those gaps onto rows that were already right.
61
+ */
62
+ export interface EntryWriteContext {
63
+ /** True when the row was just INSERTed; false on an update. */
64
+ created: boolean;
65
+ }
66
+ /**
67
+ * What a write of one entry would **also** rewrite, beyond the row addressed.
68
+ *
69
+ * The entries pipeline does not know that a save can travel: an extension's
70
+ * {@link ContentEntryExtension.afterUpdate} may rewrite a whole set of related
71
+ * rows (the i18n plugin propagates a type's *shared* fields onto every sibling
72
+ * in the translation group), and the caller that asked for "change this one
73
+ * entry" has no way to see it. Everywhere a person types the change that is
74
+ * tolerable — they are looking at the record and its language switcher. It is
75
+ * not tolerable where an **agent** composes the change and it applies with no
76
+ * human in between ([ADR-0009](../../../../../../docs/adr/0009-copilot-applies-directly.md)),
77
+ * which is what this exists for: the copilot's propose tools ask before they
78
+ * draft, so the receipt names the blast radius instead of reading as a
79
+ * single-entry edit.
80
+ *
81
+ * It describes; it does not decide. Propagating shared values IS the contract —
82
+ * "shared" means shared — so refusing the write would take away the only way to
83
+ * edit a shared field at all. The defect was that nobody was told.
84
+ */
85
+ export interface EntryWriteFanout {
86
+ /**
87
+ * The names of the fields **in the submitted values** whose value travels
88
+ * to the other rows — a subset of what was asked for, never the whole type.
89
+ */
90
+ fields: readonly string[];
91
+ /**
92
+ * The other rows, named the way a person would recognise them (locale
93
+ * slugs, for the i18n extension). Never empty: an extension returns
94
+ * `undefined` rather than an empty description.
95
+ */
96
+ locales: readonly string[];
97
+ }
98
+ /** Context handed to {@link EntryFilterExtension.resolve} with each rule. */
99
+ export interface EntryFilterContext {
100
+ /** The content type the list request targets. */
101
+ type: AnyContentType;
102
+ /** The requesting workspace — every emitted subquery MUST scope to it. */
103
+ workspaceId: string;
104
+ }
105
+ /**
106
+ * Virtual filter fields an extension contributes to one type's `?filter=`
107
+ * schema — e.g. "has locale", "locale count" — resolved to SQL subqueries by
108
+ * the extension itself via the filter engine's `resolveExtension` hook.
109
+ */
110
+ export interface EntryFilterExtension {
111
+ /**
112
+ * Parser declarations for the virtual fields, merged into the type's
113
+ * `FilterSchema.fields` and registered as `extensionFields` (so the
114
+ * translator routes them here instead of to a column).
115
+ */
116
+ fields: FieldSchema;
117
+ /** Translate one virtual-field rule into a SQL predicate. */
118
+ resolve(rule: ParsedRule, context: EntryFilterContext): Promise<SQL>;
119
+ }
120
+ /**
121
+ * A transaction handle of the shared Drizzle client — what
122
+ * {@link ContentEntryExtension.afterUpdate} receives so its writes commit or
123
+ * roll back with the triggering update.
124
+ */
125
+ export type EntryTransaction = Parameters<Parameters<Database['transaction']>[0]>[0];
126
+ /**
127
+ * The operations the entries pipeline consults an extension for. All methods
128
+ * are required — a no-op is `undefined`/`{}`, keeping call sites branch-free.
129
+ */
130
+ export interface ContentEntryExtension {
131
+ /**
132
+ * An extra predicate AND-ed into the list WHERE (alongside the workspace
133
+ * scope, search, filter tree, and soft-delete guard). Interprets and
134
+ * validates {@link EntryScopeParams} — throw a `BadRequestException` for
135
+ * an invalid value. Return `undefined` to add nothing.
136
+ */
137
+ listScope(type: AnyContentType, workspaceId: string, params: EntryScopeParams): SQL | undefined;
138
+ /**
139
+ * Virtual filter fields for the type's `?filter=` schema, or `undefined`
140
+ * when the extension adds none for this type.
141
+ */
142
+ filterExtension(type: AnyContentType): EntryFilterExtension | undefined;
143
+ /**
144
+ * Extra envelope columns stamped onto the INSERT of a create (merged over
145
+ * the field columns + `workspaceId`). Interprets/validates
146
+ * {@link EntryScopeParams} — may throw (e.g. an unknown locale or a
147
+ * `localeGroupId` that names no group in the workspace). Return `{}` to add
148
+ * nothing. May be async (the group check reads the DB); the caller awaits.
149
+ */
150
+ createColumns(type: AnyContentType, workspaceId: string, params: EntryScopeParams): Record<string, unknown> | Promise<Record<string, unknown>>;
151
+ /**
152
+ * Runs as the **first statement inside the create and update
153
+ * transactions**, before the row itself is touched — the seam for taking a
154
+ * deterministic, transaction-scoped lock over the wider set the extension
155
+ * will write in {@link afterUpdate}.
156
+ *
157
+ * It exists because ordering the extension's own locks is not enough. By
158
+ * the time {@link afterUpdate} runs, this transaction already holds a row
159
+ * lock on the entry being saved (the pipeline's `UPDATE … RETURNING`), and
160
+ * that lock was taken outside any ordering the extension controls. Two
161
+ * concurrent saves on two members of the same extension-defined set (two
162
+ * locales of one translation group) therefore each hold a row the other is
163
+ * about to request — a textbook lock-order inversion that Postgres resolves
164
+ * by aborting one with `deadlock detected` (SQLSTATE 40P01), surfacing as a
165
+ * 500. A lock taken *here* precedes every row lock, so it imposes a total
166
+ * order on the set and the inversion becomes unreachable.
167
+ *
168
+ * Optional: an extension that writes only the row it was handed needs
169
+ * nothing. `params` carries the extension-owned scope of the write
170
+ * ({@link EntryScopeParams}) — on an update the pipeline fills in the
171
+ * **stored** row's values, not the request's, since that is the set the
172
+ * write actually contends on.
173
+ */
174
+ beforeWrite?(tx: EntryTransaction, type: AnyContentType, params: EntryScopeParams, workspaceId: string): Promise<void>;
175
+ /**
176
+ * Runs inside the **create and update** transactions, after the row's
177
+ * columns and relation deltas are written — e.g. to propagate shared values
178
+ * to sibling rows (so a newly-created sibling lands consistent with its
179
+ * group, and an edit re-syncs). A throw rolls the whole save back. The
180
+ * implementation must no-op when there are no siblings to affect.
181
+ *
182
+ * Returns the **other rows it changed**, if any. The entries pipeline
183
+ * appends a revision for each, in the same transaction — so a row whose
184
+ * values an extension rewrote gets the history entry it earned, instead of
185
+ * its timeline silently skipping the change.
186
+ *
187
+ * Revision writing deliberately stays here rather than in the extension:
188
+ * numbering is serialized per entry by an advisory lock, and a second
189
+ * writer allocating numbers out-of-band is how duplicate versions happen.
190
+ *
191
+ * An implementation MAY amend `row` **in place** for columns it derives for
192
+ * that row itself (the i18n sync resolves a mirrored relation into the new
193
+ * row's own locale on create). The caller snapshots `row` *after* this
194
+ * call, so an in-place amendment lands in the revision; writing only to the
195
+ * database would leave the first version describing something the row never
196
+ * held.
197
+ */
198
+ afterUpdate(tx: EntryTransaction, type: AnyContentType, row: Record<string, unknown>, values: Record<string, unknown>, workspaceId: string, context: EntryWriteContext): Promise<Record<string, unknown>[] | void>;
199
+ /**
200
+ * What a write of `values` onto `entryId` would rewrite **besides that
201
+ * row** — the read-only counterpart of {@link afterUpdate}, answered before
202
+ * anything is written.
203
+ *
204
+ * The pipeline itself never calls it: a save just saves, and the fan-out is
205
+ * the extension's own contract. It is asked by callers that have to
206
+ * *describe* a change before making it — the copilot's `content_propose_*`
207
+ * tools, whose receipt is the only place a user learns their content moved.
208
+ *
209
+ * Return `undefined` — not an empty description — when the write touches
210
+ * nothing else: the type is not the extension's, no field in `values`
211
+ * travels, or the row has no companions. Callers treat `undefined` as "an
212
+ * ordinary single-row edit" and say nothing, which is the common case and
213
+ * must stay silent.
214
+ *
215
+ * Reads only, and takes **no locks**: it runs outside the write
216
+ * transaction and its answer is advisory by construction — a sibling can
217
+ * appear between the description and the write. Locking here would put a
218
+ * `FOR UPDATE` on a translation group for the duration of a model's turn.
219
+ *
220
+ * Optional: an extension that only ever writes the row it was handed has
221
+ * nothing to describe.
222
+ */
223
+ describeFanout?(type: AnyContentType, entryId: string, values: Record<string, unknown>, workspaceId: string): Promise<EntryWriteFanout | undefined>;
224
+ }
225
+ //# sourceMappingURL=entry-extension.d.ts.map
@@ -0,0 +1 @@
1
+ {"version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EACpB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,WAAW,EAAE,MAAM,GACpB,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC,CAAC;CAC5C"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ /**
3
+ * The entries **extension port** — the seam through which a downstream plugin
4
+ * (e.g. a localization plugin) extends the generic entries pipeline without
5
+ * this package knowing its domain. Content-server *declares* the port and
6
+ * consults it optionally (`@Optional()` injection) from {@link EntriesService}
7
+ * and {@link EntryWriterService}; the extending plugin *binds* an
8
+ * implementation to {@link CONTENT_ENTRY_EXTENSION} in its own module — the
9
+ * same inversion as identity's `CONTENT_CATALOG`, with the roles swapped.
10
+ *
11
+ * Every method is called unconditionally when an extension is bound, for every
12
+ * content type — an implementation MUST no-op (return `undefined` / `{}`) for
13
+ * types it doesn't apply to, so binding an extension never changes the
14
+ * behavior of unrelated types.
15
+ *
16
+ * NestJS-free on purpose (types + a Symbol only): implementations live in
17
+ * other packages, and keeping decorators out means this file could move into
18
+ * a decorator-free subpath without churn.
19
+ *
20
+ * Currently a **single binding**: one provider per app. If a second extension
21
+ * ever needs to coexist, bind a composite that fans out to both — the port's
22
+ * shape (SQL fragments AND-ed, column bags merged) composes cleanly.
23
+ */
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.CONTENT_ENTRY_EXTENSION = void 0;
26
+ /** DI token an extension plugin binds its {@link ContentEntryExtension} to. */
27
+ exports.CONTENT_ENTRY_EXTENSION = Symbol('CONTENT_ENTRY_EXTENSION');