@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,90 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Entry = void 0;
4
+ const content_domain_1 = require("@orthacms/content-domain");
5
+ const entry_events_1 = require("./events/entry-events");
6
+ const entry_publish_blocked_error_1 = require("./entry-publish-blocked.error");
7
+ /**
8
+ * The **focused domain model** for an entry's publish lifecycle. The entries
9
+ * engine is generic and registry-driven — one service backs every content type,
10
+ * with no per-aggregate table or fixed field set — so a full row⇄aggregate
11
+ * aggregate would fight the metamodel (ADR-0003: DDD where it pays). This models
12
+ * only the part with real invariants: the `draft ↔ published` state machine and
13
+ * the publish gate. It owns no columns; the application loads its status,
14
+ * applies a transition here (raising the domain event), and the infrastructure
15
+ * persists the new status.
16
+ *
17
+ * Framework-free: imports only `@orthacms/content-domain` (the pure kernel) and
18
+ * `@orthacms/database`'s framework-free `createDomainEvent`/`DomainEvent` —
19
+ * nothing from `@nestjs/*`, `drizzle-orm`, `class-validator`, or the
20
+ * infrastructure layer (ADR-0003's one hard rule).
21
+ */
22
+ class Entry {
23
+ _id;
24
+ _contentType;
25
+ _status;
26
+ events = [];
27
+ constructor(_id, _contentType, _status) {
28
+ this._id = _id;
29
+ this._contentType = _contentType;
30
+ this._status = _status;
31
+ }
32
+ /** Reconstructs an entry from its persisted lifecycle state. */
33
+ static rehydrate(state) {
34
+ return new Entry(state.id, state.contentType, state.status);
35
+ }
36
+ /**
37
+ * Publish the entry. Rejects with {@link EntryPublishBlockedError} when the
38
+ * gate fails (mapped to 422 by the use-case) — checked first, so an
39
+ * already-published row whose stored values went invalid is still blocked,
40
+ * matching the original service. A `draft` transitions to `published` via
41
+ * {@link assertTransition} and raises `entry.published`; an already-published
42
+ * row is an idempotent re-publish that raises no event (the use-case still
43
+ * re-stamps `published_at`).
44
+ */
45
+ publish(gate) {
46
+ if (!gate.valid) {
47
+ throw new entry_publish_blocked_error_1.EntryPublishBlockedError(gate.issues);
48
+ }
49
+ if (this._status === content_domain_1.ENTRY_STATUS.Published) {
50
+ return; // idempotent re-publish
51
+ }
52
+ (0, content_domain_1.assertTransition)(this._status, content_domain_1.ENTRY_STATUS.Published);
53
+ this._status = content_domain_1.ENTRY_STATUS.Published;
54
+ this.raise(entry_events_1.ENTRY_EVENT_KINDS.PUBLISHED, {
55
+ contentType: this._contentType
56
+ });
57
+ }
58
+ /**
59
+ * Revert the entry to draft. A `published` row transitions to `draft` via
60
+ * {@link assertTransition} and raises `entry.unpublished`; an already-draft
61
+ * row is an idempotent no-op that raises no event (the use-case still
62
+ * performs the write, preserving the original unconditional behavior).
63
+ */
64
+ unpublish() {
65
+ if (this._status === content_domain_1.ENTRY_STATUS.Draft) {
66
+ return; // idempotent
67
+ }
68
+ (0, content_domain_1.assertTransition)(this._status, content_domain_1.ENTRY_STATUS.Draft);
69
+ this._status = content_domain_1.ENTRY_STATUS.Draft;
70
+ this.raise(entry_events_1.ENTRY_EVENT_KINDS.UNPUBLISHED, {
71
+ contentType: this._contentType
72
+ });
73
+ }
74
+ /** The entry id. */
75
+ get id() {
76
+ return this._id;
77
+ }
78
+ /** The current publish status. */
79
+ get status() {
80
+ return this._status;
81
+ }
82
+ /** Drains and returns the events raised since the last pull. */
83
+ pullEvents() {
84
+ return this.events.splice(0, this.events.length);
85
+ }
86
+ raise(kind, payload) {
87
+ this.events.push((0, entry_events_1.entryEvent)(kind, this._id, payload));
88
+ }
89
+ }
90
+ exports.Entry = Entry;
@@ -0,0 +1,67 @@
1
+ import { type DomainEvent } from '@orthacms/database';
2
+ /**
3
+ * The domain-event kinds an entry's lifecycle raises, as dotted names.
4
+ *
5
+ * Two of them — `entry.published` / `entry.unpublished` — are **status
6
+ * transitions** and are raised by the {@link Entry} model, which owns the
7
+ * `draft ↔ published` invariants. The rest are the ordinary editing lifecycle:
8
+ * a row appearing, its values changing, it going to the trash, coming back, or
9
+ * being destroyed. Those carry no invariant of their own — nothing about
10
+ * "created" can be violated — so they are minted by the builders below and
11
+ * raised by the write path directly, rather than by fabricating an aggregate
12
+ * (and a publish status a non-publishable type does not have) around a fact.
13
+ *
14
+ * Until this set existed the audit log could answer "who did what, when" for
15
+ * accounts, workspaces, API tokens, the media library and content **publishes**
16
+ * — and not for the single most frequent action in a CMS. An editor could
17
+ * create, rewrite and delete every entry in the product and the log stayed
18
+ * silent, because there was nothing on the outbox for a subscriber to consume.
19
+ */
20
+ export declare const ENTRY_EVENT_KINDS: {
21
+ readonly CREATED: "entry.created";
22
+ readonly UPDATED: "entry.updated";
23
+ readonly PUBLISHED: "entry.published";
24
+ readonly UNPUBLISHED: "entry.unpublished";
25
+ readonly DELETED: "entry.deleted";
26
+ readonly RESTORED: "entry.restored";
27
+ readonly PURGED: "entry.purged";
28
+ };
29
+ /**
30
+ * Builds an entry {@link DomainEvent} of `kind` for `entryId`, carrying
31
+ * `payload`. Keeps the domain model free of the event envelope's plumbing — the
32
+ * model names the fact and its data; this stamps the `aggregateType`/id.
33
+ */
34
+ export declare function entryEvent(kind: string, entryId: string, payload: Record<string, unknown>): DomainEvent;
35
+ /** A new entry exists. `contentType` is what lets the log name *what* was made. */
36
+ export declare function entryCreated(entryId: string, contentType: string): DomainEvent;
37
+ /**
38
+ * An entry's stored values changed, naming **which fields** did.
39
+ *
40
+ * The field list is the `workspace.updated` precedent (`{ fields }`), and it is
41
+ * what makes a row worth reading: "Ada edited Article X" is a fact, "Ada edited
42
+ * the title and body of Article X" is a review. It is computed by comparing the
43
+ * stored row against the written one, which also answers the volume question
44
+ * this event raises — a save that changes nothing (a re-submit, a reopened
45
+ * editor, a restore of the version already live) produces **no** field names
46
+ * and therefore no event at all, so the log records editorial changes rather
47
+ * than round trips.
48
+ */
49
+ export declare function entryUpdated(entryId: string, contentType: string, fields: readonly string[]): DomainEvent;
50
+ /**
51
+ * An entry was deleted. `soft` distinguishes the two very different facts the
52
+ * one route produces: a **paranoid** type is tombstoned and can be restored,
53
+ * while any other type is gone from the table the moment this commits, and a
54
+ * reviewer reading the log needs to know which happened.
55
+ */
56
+ export declare function entryDeleted(entryId: string, contentType: string, soft: boolean): DomainEvent;
57
+ /** A soft-deleted entry's tombstone was cleared. */
58
+ export declare function entryRestored(entryId: string, contentType: string): DomainEvent;
59
+ /**
60
+ * A tombstoned entry was destroyed permanently.
61
+ *
62
+ * Its own kind rather than a second `entry.deleted`: this is the one content
63
+ * action with nothing left behind to inspect afterwards, so it is exactly the
64
+ * one an audit trail has to record distinctly.
65
+ */
66
+ export declare function entryPurged(entryId: string, contentType: string): DomainEvent;
67
+ //# sourceMappingURL=entry-events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-events.d.ts","sourceRoot":"","sources":["../../../../../src/lib/entries/domain/events/entry-events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEzE;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;CAQpB,CAAC;AAKX;;;;GAIG;AACH,wBAAgB,UAAU,CACtB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACjC,WAAW,CAOb;AAED,mFAAmF;AACnF,wBAAgB,YAAY,CACxB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,GACpB,WAAW,CAEb;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CACxB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,SAAS,MAAM,EAAE,GAC1B,WAAW,CAKb;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CACxB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,OAAO,GACd,WAAW,CAKb;AAED,oDAAoD;AACpD,wBAAgB,aAAa,CACzB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,GACpB,WAAW,CAEb;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,WAAW,CAE7E"}
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ENTRY_EVENT_KINDS = void 0;
4
+ exports.entryEvent = entryEvent;
5
+ exports.entryCreated = entryCreated;
6
+ exports.entryUpdated = entryUpdated;
7
+ exports.entryDeleted = entryDeleted;
8
+ exports.entryRestored = entryRestored;
9
+ exports.entryPurged = entryPurged;
10
+ const database_1 = require("@orthacms/database");
11
+ /**
12
+ * The domain-event kinds an entry's lifecycle raises, as dotted names.
13
+ *
14
+ * Two of them — `entry.published` / `entry.unpublished` — are **status
15
+ * transitions** and are raised by the {@link Entry} model, which owns the
16
+ * `draft ↔ published` invariants. The rest are the ordinary editing lifecycle:
17
+ * a row appearing, its values changing, it going to the trash, coming back, or
18
+ * being destroyed. Those carry no invariant of their own — nothing about
19
+ * "created" can be violated — so they are minted by the builders below and
20
+ * raised by the write path directly, rather than by fabricating an aggregate
21
+ * (and a publish status a non-publishable type does not have) around a fact.
22
+ *
23
+ * Until this set existed the audit log could answer "who did what, when" for
24
+ * accounts, workspaces, API tokens, the media library and content **publishes**
25
+ * — and not for the single most frequent action in a CMS. An editor could
26
+ * create, rewrite and delete every entry in the product and the log stayed
27
+ * silent, because there was nothing on the outbox for a subscriber to consume.
28
+ */
29
+ exports.ENTRY_EVENT_KINDS = {
30
+ CREATED: 'entry.created',
31
+ UPDATED: 'entry.updated',
32
+ PUBLISHED: 'entry.published',
33
+ UNPUBLISHED: 'entry.unpublished',
34
+ DELETED: 'entry.deleted',
35
+ RESTORED: 'entry.restored',
36
+ PURGED: 'entry.purged'
37
+ };
38
+ /** The aggregate type stamped on every entry domain event. */
39
+ const AGGREGATE_TYPE = 'content_entry';
40
+ /**
41
+ * Builds an entry {@link DomainEvent} of `kind` for `entryId`, carrying
42
+ * `payload`. Keeps the domain model free of the event envelope's plumbing — the
43
+ * model names the fact and its data; this stamps the `aggregateType`/id.
44
+ */
45
+ function entryEvent(kind, entryId, payload) {
46
+ return (0, database_1.createDomainEvent)({
47
+ kind,
48
+ aggregateType: AGGREGATE_TYPE,
49
+ aggregateId: entryId,
50
+ payload
51
+ });
52
+ }
53
+ /** A new entry exists. `contentType` is what lets the log name *what* was made. */
54
+ function entryCreated(entryId, contentType) {
55
+ return entryEvent(exports.ENTRY_EVENT_KINDS.CREATED, entryId, { contentType });
56
+ }
57
+ /**
58
+ * An entry's stored values changed, naming **which fields** did.
59
+ *
60
+ * The field list is the `workspace.updated` precedent (`{ fields }`), and it is
61
+ * what makes a row worth reading: "Ada edited Article X" is a fact, "Ada edited
62
+ * the title and body of Article X" is a review. It is computed by comparing the
63
+ * stored row against the written one, which also answers the volume question
64
+ * this event raises — a save that changes nothing (a re-submit, a reopened
65
+ * editor, a restore of the version already live) produces **no** field names
66
+ * and therefore no event at all, so the log records editorial changes rather
67
+ * than round trips.
68
+ */
69
+ function entryUpdated(entryId, contentType, fields) {
70
+ return entryEvent(exports.ENTRY_EVENT_KINDS.UPDATED, entryId, {
71
+ contentType,
72
+ fields: [...fields]
73
+ });
74
+ }
75
+ /**
76
+ * An entry was deleted. `soft` distinguishes the two very different facts the
77
+ * one route produces: a **paranoid** type is tombstoned and can be restored,
78
+ * while any other type is gone from the table the moment this commits, and a
79
+ * reviewer reading the log needs to know which happened.
80
+ */
81
+ function entryDeleted(entryId, contentType, soft) {
82
+ return entryEvent(exports.ENTRY_EVENT_KINDS.DELETED, entryId, {
83
+ contentType,
84
+ soft
85
+ });
86
+ }
87
+ /** A soft-deleted entry's tombstone was cleared. */
88
+ function entryRestored(entryId, contentType) {
89
+ return entryEvent(exports.ENTRY_EVENT_KINDS.RESTORED, entryId, { contentType });
90
+ }
91
+ /**
92
+ * A tombstoned entry was destroyed permanently.
93
+ *
94
+ * Its own kind rather than a second `entry.deleted`: this is the one content
95
+ * action with nothing left behind to inspect afterwards, so it is exactly the
96
+ * one an audit trail has to record distinctly.
97
+ */
98
+ function entryPurged(entryId, contentType) {
99
+ return entryEvent(exports.ENTRY_EVENT_KINDS.PURGED, entryId, { contentType });
100
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Body for the bulk endpoints (`/bulk/publish`, `/bulk/unpublish`,
3
+ * `/bulk/delete`, `/bulk/restore`, and the publish dry run): the set of entry
4
+ * ids to act on. Non-empty, uuid-typed, and capped at {@link BULK_MAX_IDS} so a
5
+ * single request can't fan out unbounded work.
6
+ */
7
+ export declare class BulkIdsDto {
8
+ /** Entry ids to act on. */
9
+ ids: string[];
10
+ }
11
+ //# sourceMappingURL=bulk-ids.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bulk-ids.dto.d.ts","sourceRoot":"","sources":["../../../../src/lib/entries/dto/bulk-ids.dto.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,qBAAa,UAAU;IACnB,2BAA2B;IAK3B,GAAG,EAAG,MAAM,EAAE,CAAC;CAClB"}
@@ -0,0 +1,46 @@
1
+ /** `?deleted=only` flips the list to the trash view (soft-deleted rows). */
2
+ export declare const DELETED_ONLY = "only";
3
+ /**
4
+ * Query parameters for `GET /api/content/:typeName`. Pagination is 1-based; the
5
+ * service applies the defaults (page 1, {@link DEFAULT_PAGE_SIZE}) so the
6
+ * contract has one source of truth. `@Type` coerces the raw query strings — the
7
+ * host's global `ValidationPipe` transforms but does not implicitly convert.
8
+ */
9
+ export declare class ListEntriesQueryDto {
10
+ /** Free-text search across the type's text-like columns (text/richtext/select). */
11
+ search?: string;
12
+ /**
13
+ * Structured filter tree as a JSON string (`?filter=<json>`), produced by
14
+ * the admin query builder and validated against the type's derived filter
15
+ * schema by `parseFilterTree`. Length-capped here as a first line of
16
+ * defence; the engine's node/depth caps bound the parsed shape.
17
+ */
18
+ filter?: string;
19
+ /** Sort spec: a column id (ascending) or `-`-prefixed (descending). */
20
+ sort?: string;
21
+ /** 1-based page number. */
22
+ page?: number;
23
+ /** Rows per page, capped at {@link MAX_PAGE_SIZE}. */
24
+ pageSize?: number;
25
+ /**
26
+ * `only` lists soft-deleted rows (the trash view) instead of live ones.
27
+ * Meaningful only for paranoid types; ignored otherwise. Absent (the
28
+ * default) lists live rows.
29
+ */
30
+ deleted?: typeof DELETED_ONLY;
31
+ /**
32
+ * Locale slug the list targets — an **extension-owned** param this package
33
+ * declares (the strict ValidationPipe rejects undeclared keys) but never
34
+ * interprets: it's forwarded to the bound `CONTENT_ENTRY_EXTENSION`, which
35
+ * validates and applies it. Ignored when no extension is bound or the type
36
+ * isn't localized.
37
+ */
38
+ locale?: string;
39
+ /**
40
+ * `default` widens the locale scope to fall back to the default locale
41
+ * where the requested one is missing (the relation picker's mode).
42
+ * Extension-owned, like {@link locale}.
43
+ */
44
+ localeFallback?: string;
45
+ }
46
+ //# sourceMappingURL=list-entries-query.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-entries-query.dto.d.ts","sourceRoot":"","sources":["../../../../src/lib/entries/dto/list-entries-query.dto.ts"],"names":[],"mappings":"AAYA,4EAA4E;AAC5E,eAAO,MAAM,YAAY,SAAS,CAAC;AAEnC;;;;;GAKG;AACH,qBAAa,mBAAmB;IAC5B,mFAAmF;IAInF,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;OAKG;IAIH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,uEAAuE;IAIvE,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,2BAA2B;IAK3B,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,sDAAsD;IAMtD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IAGH,OAAO,CAAC,EAAE,OAAO,YAAY,CAAC;IAE9B;;;;;;OAMG;IAIH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IAGH,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B"}
@@ -0,0 +1,19 @@
1
+ import { type ValidationOptions, type ValidatorConstraintInterface } from 'class-validator';
2
+ /**
3
+ * Validates the `relations` bag of {@link SaveEntryDto}: a map from field name to
4
+ * `{ link?, unlink?, order? }`, each an array of uuid strings. class-validator
5
+ * can't decorate a `Record`'s dynamic keys, so this constraint checks the shape
6
+ * of every value — turning a malformed delta (a non-array `unlink`, a non-uuid
7
+ * id, an unknown inner key, or an over-large array) into a clean **400** instead
8
+ * of letting it reach `inArray(...)` against a `uuid` column and surface as a
9
+ * 500. Unknown inner keys are rejected so the nested `Record` can't slip past
10
+ * the app's `forbidNonWhitelisted` posture, and the id arrays and the map itself
11
+ * are size-bounded so a single request can't carry an unbounded payload.
12
+ */
13
+ export declare class RelationDeltaMapConstraint implements ValidatorConstraintInterface {
14
+ validate(value: unknown): boolean;
15
+ defaultMessage(): string;
16
+ }
17
+ /** Property decorator applying {@link RelationDeltaMapConstraint}. */
18
+ export declare function IsRelationDeltaMap(options?: ValidationOptions): (object: object, propertyName: string) => void;
19
+ //# sourceMappingURL=relation-delta-map.validator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relation-delta-map.validator.d.ts","sourceRoot":"","sources":["../../../../src/lib/entries/dto/relation-delta-map.validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,KAAK,iBAAiB,EACtB,KAAK,4BAA4B,EACpC,MAAM,iBAAiB,CAAC;AAmCzB;;;;;;;;;;GAUG;AACH,qBACa,0BACT,YAAW,4BAA4B;IAEvC,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IAwBjC,cAAc,IAAI,MAAM;CAG3B;AAED,sEAAsE;AACtE,wBAAgB,kBAAkB,CAAC,OAAO,CAAC,EAAE,iBAAiB,IAClD,QAAQ,MAAM,EAAE,cAAc,MAAM,KAAG,IAAI,CAOtD"}
@@ -0,0 +1,46 @@
1
+ import type { RelationDelta } from '../types/entry-list-view';
2
+ /**
3
+ * Body for `POST /api/content/:typeName` (create) and
4
+ * `PATCH /api/content/:typeName/:id` (update). The field `values` bag crosses the
5
+ * wire, plus optional per-field relation **deltas** (`relations`) — the editor
6
+ * stages its many-to-many / inverse link changes locally and sends them here
7
+ * with the rest of the document, so a save persists everything in **one
8
+ * transaction** without ever transmitting a huge relation whole.
9
+ *
10
+ * Reserved envelope columns (`status`/`published_at`/`deleted_at`) are owned by
11
+ * the service and can't be set from here: `toColumns` projects only keys
12
+ * declared on the type, so a reserved (or otherwise unknown) key in the bag is
13
+ * silently dropped before storage; on a non-publishable type
14
+ * `EntryValidationService` additionally flags unknown keys as a 422. The bag's
15
+ * *contents* are validated against the type's field specs by that same service
16
+ * (a dynamic, per-type contract class-validator can't express); the relation
17
+ * deltas' ids are validated as existing workspace entries by
18
+ * `RelationLinkService`. `values` is structurally only "an object" (its contents
19
+ * are the per-type contract); the `relations` bag's *shape* — each value a
20
+ * `{ link?, unlink?, order? }` of uuid arrays — is enforced here so a malformed
21
+ * delta is a clean 400, not a 500 from a bad id hitting the query.
22
+ */
23
+ export declare class SaveEntryDto {
24
+ /** Field values keyed by field name. */
25
+ values: Record<string, unknown>;
26
+ /**
27
+ * Per-field relation deltas (`{ <field>: { link?, unlink?, order? } }`) —
28
+ * many/inverse relations only; a single relation is set through `values`.
29
+ */
30
+ relations?: Record<string, RelationDelta>;
31
+ /**
32
+ * Locale slug the entry is created in — an **extension-owned** param this
33
+ * package declares but never interprets (forwarded to the bound
34
+ * `CONTENT_ENTRY_EXTENSION`, which validates it and stamps the envelope
35
+ * column). Read on create only; an update never re-homes a row's locale.
36
+ */
37
+ locale?: string;
38
+ /**
39
+ * The existing translation group a created row joins (making it a sibling)
40
+ * — an **extension-owned**, opaque param, like {@link locale}. Absent → the
41
+ * row starts its own fresh group. The bound extension validates it against
42
+ * the workspace. Read on create only.
43
+ */
44
+ localeGroupId?: string;
45
+ }
46
+ //# sourceMappingURL=save-entry.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"save-entry.dto.d.ts","sourceRoot":"","sources":["../../../../src/lib/entries/dto/save-entry.dto.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAG9D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,YAAY;IACrB,wCAAwC;IAExC,MAAM,EAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEjC;;;OAGG;IAIH,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAE1C;;;;;OAKG;IAIH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;OAKG;IAGH,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B"}
@@ -0,0 +1,19 @@
1
+ /** Pagination + filter limits for the entries list endpoint. */
2
+ /** Default rows per page when the client omits `pageSize`. */
3
+ export declare const DEFAULT_PAGE_SIZE = 25;
4
+ /** Hard cap on rows per page — bounds a single query's cost. */
5
+ export declare const MAX_PAGE_SIZE = 100;
6
+ /** Max length of the raw `?filter=` JSON (first line of defence before parsing). */
7
+ export declare const FILTER_MAX_LENGTH = 4096;
8
+ /** Max ids a single bulk action (`{ ids }`) may target — bounds the statement. */
9
+ export declare const BULK_MAX_IDS = 100;
10
+ /**
11
+ * Max items a single bulk **save** may carry.
12
+ *
13
+ * Lower than {@link BULK_MAX_IDS} on purpose: a bulk action ships a list of
14
+ * uuids, while a bulk save ships whole documents — rich-text bodies included —
15
+ * and then performs one write transaction per item. The cap bounds the request
16
+ * body and the time a single call can hold the workspace's content lock.
17
+ */
18
+ export declare const BULK_MAX_SAVE_ITEMS = 50;
19
+ //# sourceMappingURL=entries.constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entries.constants.d.ts","sourceRoot":"","sources":["../../../src/lib/entries/entries.constants.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAEhE,8DAA8D;AAC9D,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,gEAAgE;AAChE,eAAO,MAAM,aAAa,MAAM,CAAC;AAEjC,oFAAoF;AACpF,eAAO,MAAM,iBAAiB,OAAO,CAAC;AAEtC,kFAAkF;AAClF,eAAO,MAAM,YAAY,MAAM,CAAC;AAEhC;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,KAAK,CAAC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /** Pagination + filter limits for the entries list endpoint. */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.BULK_MAX_SAVE_ITEMS = exports.BULK_MAX_IDS = exports.FILTER_MAX_LENGTH = exports.MAX_PAGE_SIZE = exports.DEFAULT_PAGE_SIZE = void 0;
5
+ /** Default rows per page when the client omits `pageSize`. */
6
+ exports.DEFAULT_PAGE_SIZE = 25;
7
+ /** Hard cap on rows per page — bounds a single query's cost. */
8
+ exports.MAX_PAGE_SIZE = 100;
9
+ /** Max length of the raw `?filter=` JSON (first line of defence before parsing). */
10
+ exports.FILTER_MAX_LENGTH = 4096;
11
+ /** Max ids a single bulk action (`{ ids }`) may target — bounds the statement. */
12
+ exports.BULK_MAX_IDS = 100;
13
+ /**
14
+ * Max items a single bulk **save** may carry.
15
+ *
16
+ * Lower than {@link BULK_MAX_IDS} on purpose: a bulk action ships a list of
17
+ * uuids, while a bulk save ships whole documents — rich-text bodies included —
18
+ * and then performs one write transaction per item. The cap bounds the request
19
+ * body and the time a single call can hold the workspace's content lock.
20
+ */
21
+ exports.BULK_MAX_SAVE_ITEMS = 50;
@@ -0,0 +1,33 @@
1
+ import { type PublicUser } from '@orthacms/identity-server';
2
+ import type { ContentTypeRegistry } from '../../../registry/content-type-registry';
3
+ import { EntryWriterService } from '../../infrastructure/persistence/entry-writer.service';
4
+ import { BulkPublishPreviewQuery } from '../../infrastructure/queries/bulk-publish-preview.query';
5
+ import { BulkPublishEntriesUseCase } from '../../application/use-cases/bulk-publish-entries.use-case';
6
+ import { BulkUnpublishEntriesUseCase } from '../../application/use-cases/bulk-unpublish-entries.use-case';
7
+ import { BulkIdsDto } from '../dto/bulk-ids.dto';
8
+ import type { BulkActionResult, BulkPublishPreview, BulkPublishResult } from '../../types/bulk-publish';
9
+ /**
10
+ * Bulk entry actions over a set of `{ ids }`. **Registered before the
11
+ * single-item controllers** (see `content.module.ts`): the literal `bulk`
12
+ * segment sits in the same slot as those controllers' `:id`, so it must match
13
+ * first — otherwise `/bulk/publish` would resolve as `:id='bulk'` (and trip the
14
+ * single-item `ParseUUIDPipe`). `WorkspaceGuard` scopes every action to a
15
+ * workspace the caller belongs to. Per-route permissions: publish/unpublish need
16
+ * `content:publish`, delete/restore need `content:delete`.
17
+ */
18
+ export declare class BulkEntriesController {
19
+ private readonly registry;
20
+ private readonly writer;
21
+ private readonly bulkPublishPreview;
22
+ private readonly bulkPublishEntries;
23
+ private readonly bulkUnpublishEntries;
24
+ constructor(registry: ContentTypeRegistry, writer: EntryWriterService, bulkPublishPreview: BulkPublishPreviewQuery, bulkPublishEntries: BulkPublishEntriesUseCase, bulkUnpublishEntries: BulkUnpublishEntriesUseCase);
25
+ /** Dry run: validate each id and report a per-entry verdict. Writes nothing. */
26
+ previewPublish(typeName: string, body: BulkIdsDto, workspaceId: string): Promise<BulkPublishPreview>;
27
+ publish(typeName: string, body: BulkIdsDto, workspaceId: string): Promise<BulkPublishResult>;
28
+ unpublish(typeName: string, body: BulkIdsDto, workspaceId: string): Promise<BulkActionResult>;
29
+ remove(typeName: string, body: BulkIdsDto, workspaceId: string, user?: PublicUser): Promise<BulkActionResult>;
30
+ restore(typeName: string, body: BulkIdsDto, workspaceId: string, user?: PublicUser): Promise<BulkActionResult>;
31
+ purge(typeName: string, body: BulkIdsDto, workspaceId: string, user?: PublicUser): Promise<BulkActionResult>;
32
+ }
33
+ //# sourceMappingURL=bulk-entries.controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bulk-entries.controller.d.ts","sourceRoot":"","sources":["../../../../../src/lib/entries/http/controllers/bulk-entries.controller.ts"],"names":[],"mappings":"AASA,OAAO,EAKH,KAAK,UAAU,EAElB,MAAM,2BAA2B,CAAC;AAInC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uDAAuD,CAAC;AAC3F,OAAO,EAAE,uBAAuB,EAAE,MAAM,yDAAyD,CAAC;AAClG,OAAO,EAAE,yBAAyB,EAAE,MAAM,2DAA2D,CAAC;AACtG,OAAO,EAAE,2BAA2B,EAAE,MAAM,6DAA6D,CAAC;AAC1G,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EACR,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACpB,MAAM,0BAA0B,CAAC;AAIlC;;;;;;;;GAQG;AACH,qBAEa,qBAAqB;IAG1B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IACnC,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IACnC,OAAO,CAAC,QAAQ,CAAC,oBAAoB;gBAJpB,QAAQ,EAAE,mBAAmB,EAC7B,MAAM,EAAE,kBAAkB,EAC1B,kBAAkB,EAAE,uBAAuB,EAC3C,kBAAkB,EAAE,yBAAyB,EAC7C,oBAAoB,EAAE,2BAA2B;IAGtE,gFAAgF;IAIhF,cAAc,CACS,QAAQ,EAAE,MAAM,EAC3B,IAAI,EAAE,UAAU,EACJ,WAAW,EAAE,MAAM,GACxC,OAAO,CAAC,kBAAkB,CAAC;IAQ9B,OAAO,CACgB,QAAQ,EAAE,MAAM,EAC3B,IAAI,EAAE,UAAU,EACJ,WAAW,EAAE,MAAM,GACxC,OAAO,CAAC,iBAAiB,CAAC;IAQ7B,SAAS,CACc,QAAQ,EAAE,MAAM,EAC3B,IAAI,EAAE,UAAU,EACJ,WAAW,EAAE,MAAM,GACxC,OAAO,CAAC,gBAAgB,CAAC;IAQ5B,MAAM,CACiB,QAAQ,EAAE,MAAM,EAC3B,IAAI,EAAE,UAAU,EACJ,WAAW,EAAE,MAAM,EACxB,IAAI,CAAC,EAAE,UAAU,GACjC,OAAO,CAAC,gBAAgB,CAAC;IAa5B,OAAO,CACgB,QAAQ,EAAE,MAAM,EAC3B,IAAI,EAAE,UAAU,EACJ,WAAW,EAAE,MAAM,EACxB,IAAI,CAAC,EAAE,UAAU,GACjC,OAAO,CAAC,gBAAgB,CAAC;IAa5B,KAAK,CACkB,QAAQ,EAAE,MAAM,EAC3B,IAAI,EAAE,UAAU,EACJ,WAAW,EAAE,MAAM,EACxB,IAAI,CAAC,EAAE,UAAU,GACjC,OAAO,CAAC,gBAAgB,CAAC;CAS/B"}
@@ -0,0 +1,143 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BulkEntriesController = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const common_1 = require("@nestjs/common");
6
+ const identity_server_1 = require("@orthacms/identity-server");
7
+ const workspaces_server_1 = require("@orthacms/workspaces-server");
8
+ const content_grant_guard_1 = require("../guards/content-grant.guard");
9
+ const content_tokens_1 = require("../../../content.tokens");
10
+ const entry_writer_service_1 = require("../../infrastructure/persistence/entry-writer.service");
11
+ const bulk_publish_preview_query_1 = require("../../infrastructure/queries/bulk-publish-preview.query");
12
+ const bulk_publish_entries_use_case_1 = require("../../application/use-cases/bulk-publish-entries.use-case");
13
+ const bulk_unpublish_entries_use_case_1 = require("../../application/use-cases/bulk-unpublish-entries.use-case");
14
+ const bulk_ids_dto_1 = require("../dto/bulk-ids.dto");
15
+ const resolve_type_1 = require("./resolve-type");
16
+ const to_actor_1 = require("./to-actor");
17
+ /**
18
+ * Bulk entry actions over a set of `{ ids }`. **Registered before the
19
+ * single-item controllers** (see `content.module.ts`): the literal `bulk`
20
+ * segment sits in the same slot as those controllers' `:id`, so it must match
21
+ * first — otherwise `/bulk/publish` would resolve as `:id='bulk'` (and trip the
22
+ * single-item `ParseUUIDPipe`). `WorkspaceGuard` scopes every action to a
23
+ * workspace the caller belongs to. Per-route permissions: publish/unpublish need
24
+ * `content:publish`, delete/restore need `content:delete`.
25
+ */
26
+ let BulkEntriesController = class BulkEntriesController {
27
+ registry;
28
+ writer;
29
+ bulkPublishPreview;
30
+ bulkPublishEntries;
31
+ bulkUnpublishEntries;
32
+ constructor(registry, writer, bulkPublishPreview, bulkPublishEntries, bulkUnpublishEntries) {
33
+ this.registry = registry;
34
+ this.writer = writer;
35
+ this.bulkPublishPreview = bulkPublishPreview;
36
+ this.bulkPublishEntries = bulkPublishEntries;
37
+ this.bulkUnpublishEntries = bulkUnpublishEntries;
38
+ }
39
+ /** Dry run: validate each id and report a per-entry verdict. Writes nothing. */
40
+ previewPublish(typeName, body, workspaceId) {
41
+ const type = (0, resolve_type_1.resolveType)(this.registry, typeName);
42
+ return this.bulkPublishPreview.preview(type, body.ids, workspaceId);
43
+ }
44
+ publish(typeName, body, workspaceId) {
45
+ const type = (0, resolve_type_1.resolveType)(this.registry, typeName);
46
+ return this.bulkPublishEntries.execute(type, body.ids, workspaceId);
47
+ }
48
+ unpublish(typeName, body, workspaceId) {
49
+ const type = (0, resolve_type_1.resolveType)(this.registry, typeName);
50
+ return this.bulkUnpublishEntries.execute(type, body.ids, workspaceId);
51
+ }
52
+ remove(typeName, body, workspaceId, user) {
53
+ const type = (0, resolve_type_1.resolveType)(this.registry, typeName);
54
+ return this.writer.bulkRemove(type, body.ids, workspaceId, (0, to_actor_1.toActor)(user));
55
+ }
56
+ restore(typeName, body, workspaceId, user) {
57
+ const type = (0, resolve_type_1.resolveType)(this.registry, typeName);
58
+ return this.writer.bulkRestore(type, body.ids, workspaceId, (0, to_actor_1.toActor)(user));
59
+ }
60
+ purge(typeName, body, workspaceId, user) {
61
+ const type = (0, resolve_type_1.resolveType)(this.registry, typeName);
62
+ return this.writer.bulkPurge(type, body.ids, workspaceId, (0, to_actor_1.toActor)(user));
63
+ }
64
+ };
65
+ exports.BulkEntriesController = BulkEntriesController;
66
+ tslib_1.__decorate([
67
+ (0, common_1.Post)(':typeName/bulk/publish/preview'),
68
+ (0, common_1.HttpCode)(common_1.HttpStatus.OK),
69
+ (0, identity_server_1.RequirePermissions)(identity_server_1.PERMISSIONS.CONTENT_PUBLISH),
70
+ tslib_1.__param(0, (0, common_1.Param)('typeName')),
71
+ tslib_1.__param(1, (0, common_1.Body)()),
72
+ tslib_1.__param(2, (0, workspaces_server_1.CurrentWorkspace)()),
73
+ tslib_1.__metadata("design:type", Function),
74
+ tslib_1.__metadata("design:paramtypes", [String, bulk_ids_dto_1.BulkIdsDto, String]),
75
+ tslib_1.__metadata("design:returntype", Promise)
76
+ ], BulkEntriesController.prototype, "previewPublish", null);
77
+ tslib_1.__decorate([
78
+ (0, common_1.Post)(':typeName/bulk/publish'),
79
+ (0, common_1.HttpCode)(common_1.HttpStatus.OK),
80
+ (0, identity_server_1.RequirePermissions)(identity_server_1.PERMISSIONS.CONTENT_PUBLISH),
81
+ tslib_1.__param(0, (0, common_1.Param)('typeName')),
82
+ tslib_1.__param(1, (0, common_1.Body)()),
83
+ tslib_1.__param(2, (0, workspaces_server_1.CurrentWorkspace)()),
84
+ tslib_1.__metadata("design:type", Function),
85
+ tslib_1.__metadata("design:paramtypes", [String, bulk_ids_dto_1.BulkIdsDto, String]),
86
+ tslib_1.__metadata("design:returntype", Promise)
87
+ ], BulkEntriesController.prototype, "publish", null);
88
+ tslib_1.__decorate([
89
+ (0, common_1.Post)(':typeName/bulk/unpublish'),
90
+ (0, common_1.HttpCode)(common_1.HttpStatus.OK),
91
+ (0, identity_server_1.RequirePermissions)(identity_server_1.PERMISSIONS.CONTENT_PUBLISH),
92
+ tslib_1.__param(0, (0, common_1.Param)('typeName')),
93
+ tslib_1.__param(1, (0, common_1.Body)()),
94
+ tslib_1.__param(2, (0, workspaces_server_1.CurrentWorkspace)()),
95
+ tslib_1.__metadata("design:type", Function),
96
+ tslib_1.__metadata("design:paramtypes", [String, bulk_ids_dto_1.BulkIdsDto, String]),
97
+ tslib_1.__metadata("design:returntype", Promise)
98
+ ], BulkEntriesController.prototype, "unpublish", null);
99
+ tslib_1.__decorate([
100
+ (0, common_1.Post)(':typeName/bulk/delete'),
101
+ (0, common_1.HttpCode)(common_1.HttpStatus.OK),
102
+ (0, identity_server_1.RequirePermissions)(identity_server_1.PERMISSIONS.CONTENT_DELETE),
103
+ tslib_1.__param(0, (0, common_1.Param)('typeName')),
104
+ tslib_1.__param(1, (0, common_1.Body)()),
105
+ tslib_1.__param(2, (0, workspaces_server_1.CurrentWorkspace)()),
106
+ tslib_1.__param(3, (0, identity_server_1.CurrentUser)()),
107
+ tslib_1.__metadata("design:type", Function),
108
+ tslib_1.__metadata("design:paramtypes", [String, bulk_ids_dto_1.BulkIdsDto, String, Object]),
109
+ tslib_1.__metadata("design:returntype", Promise)
110
+ ], BulkEntriesController.prototype, "remove", null);
111
+ tslib_1.__decorate([
112
+ (0, common_1.Post)(':typeName/bulk/restore'),
113
+ (0, common_1.HttpCode)(common_1.HttpStatus.OK),
114
+ (0, identity_server_1.RequirePermissions)(identity_server_1.PERMISSIONS.CONTENT_DELETE),
115
+ tslib_1.__param(0, (0, common_1.Param)('typeName')),
116
+ tslib_1.__param(1, (0, common_1.Body)()),
117
+ tslib_1.__param(2, (0, workspaces_server_1.CurrentWorkspace)()),
118
+ tslib_1.__param(3, (0, identity_server_1.CurrentUser)()),
119
+ tslib_1.__metadata("design:type", Function),
120
+ tslib_1.__metadata("design:paramtypes", [String, bulk_ids_dto_1.BulkIdsDto, String, Object]),
121
+ tslib_1.__metadata("design:returntype", Promise)
122
+ ], BulkEntriesController.prototype, "restore", null);
123
+ tslib_1.__decorate([
124
+ (0, common_1.Post)(':typeName/bulk/purge'),
125
+ (0, common_1.HttpCode)(common_1.HttpStatus.OK),
126
+ (0, identity_server_1.RequirePermissions)(identity_server_1.PERMISSIONS.CONTENT_DELETE),
127
+ tslib_1.__param(0, (0, common_1.Param)('typeName')),
128
+ tslib_1.__param(1, (0, common_1.Body)()),
129
+ tslib_1.__param(2, (0, workspaces_server_1.CurrentWorkspace)()),
130
+ tslib_1.__param(3, (0, identity_server_1.CurrentUser)()),
131
+ tslib_1.__metadata("design:type", Function),
132
+ tslib_1.__metadata("design:paramtypes", [String, bulk_ids_dto_1.BulkIdsDto, String, Object]),
133
+ tslib_1.__metadata("design:returntype", Promise)
134
+ ], BulkEntriesController.prototype, "purge", null);
135
+ exports.BulkEntriesController = BulkEntriesController = tslib_1.__decorate([
136
+ (0, common_1.UseGuards)(identity_server_1.OriginGuard, identity_server_1.PermissionsGuard, workspaces_server_1.WorkspaceGuard, content_grant_guard_1.ContentGrantGuard),
137
+ (0, common_1.Controller)('content'),
138
+ tslib_1.__param(0, (0, content_tokens_1.InjectContentRegistry)()),
139
+ tslib_1.__metadata("design:paramtypes", [Function, entry_writer_service_1.EntryWriterService,
140
+ bulk_publish_preview_query_1.BulkPublishPreviewQuery,
141
+ bulk_publish_entries_use_case_1.BulkPublishEntriesUseCase,
142
+ bulk_unpublish_entries_use_case_1.BulkUnpublishEntriesUseCase])
143
+ ], BulkEntriesController);