@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.
- package/LICENSE +21 -0
- package/README.md +7 -0
- package/dist/define.d.ts +17 -0
- package/dist/define.d.ts.map +1 -0
- package/dist/define.js +28 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +109 -0
- package/dist/lib/collection/define.d.ts +35 -0
- package/dist/lib/collection/define.d.ts.map +1 -0
- package/dist/lib/collection/define.js +217 -0
- package/dist/lib/collection/table-builder.d.ts +28 -0
- package/dist/lib/collection/table-builder.d.ts.map +1 -0
- package/dist/lib/collection/table-builder.js +306 -0
- package/dist/lib/content-types/controllers/get-content-schema.controller.d.ts +24 -0
- package/dist/lib/content-types/controllers/get-content-schema.controller.d.ts.map +1 -0
- package/dist/lib/content-types/controllers/get-content-schema.controller.js +58 -0
- package/dist/lib/content-types/controllers/get-filter-fields.controller.d.ts +35 -0
- package/dist/lib/content-types/controllers/get-filter-fields.controller.d.ts.map +1 -0
- package/dist/lib/content-types/controllers/get-filter-fields.controller.js +74 -0
- package/dist/lib/content-types/controllers/list-content-schema.controller.d.ts +15 -0
- package/dist/lib/content-types/controllers/list-content-schema.controller.d.ts.map +1 -0
- package/dist/lib/content-types/controllers/list-content-schema.controller.js +38 -0
- package/dist/lib/content-types/queries/workspace-grants.query.d.ts +25 -0
- package/dist/lib/content-types/queries/workspace-grants.query.d.ts.map +1 -0
- package/dist/lib/content-types/queries/workspace-grants.query.js +45 -0
- package/dist/lib/content.module.d.ts +21 -0
- package/dist/lib/content.module.d.ts.map +1 -0
- package/dist/lib/content.module.js +264 -0
- package/dist/lib/content.tokens.d.ts +5 -0
- package/dist/lib/content.tokens.d.ts.map +1 -0
- package/dist/lib/content.tokens.js +9 -0
- package/dist/lib/copilot/content-tool.provider.d.ts +64 -0
- package/dist/lib/copilot/content-tool.provider.d.ts.map +1 -0
- package/dist/lib/copilot/content-tool.provider.js +309 -0
- package/dist/lib/copilot/diff-snapshots.d.ts +42 -0
- package/dist/lib/copilot/diff-snapshots.d.ts.map +1 -0
- package/dist/lib/copilot/diff-snapshots.js +77 -0
- package/dist/lib/copilot/entry-proposal.applier.d.ts +89 -0
- package/dist/lib/copilot/entry-proposal.applier.d.ts.map +1 -0
- package/dist/lib/copilot/entry-proposal.applier.js +245 -0
- package/dist/lib/copilot/entry-proposal.provider.d.ts +157 -0
- package/dist/lib/copilot/entry-proposal.provider.d.ts.map +1 -0
- package/dist/lib/copilot/entry-proposal.provider.js +619 -0
- package/dist/lib/copilot/filter-schema.d.ts +61 -0
- package/dist/lib/copilot/filter-schema.d.ts.map +1 -0
- package/dist/lib/copilot/filter-schema.js +139 -0
- package/dist/lib/copilot/project-entry.d.ts +23 -0
- package/dist/lib/copilot/project-entry.d.ts.map +1 -0
- package/dist/lib/copilot/project-entry.js +36 -0
- package/dist/lib/copilot/proposal-kinds.d.ts +30 -0
- package/dist/lib/copilot/proposal-kinds.d.ts.map +1 -0
- package/dist/lib/copilot/proposal-kinds.js +32 -0
- package/dist/lib/copilot/revision-tool.provider.d.ts +56 -0
- package/dist/lib/copilot/revision-tool.provider.d.ts.map +1 -0
- package/dist/lib/copilot/revision-tool.provider.js +215 -0
- package/dist/lib/docs/content-schemas.d.ts +34 -0
- package/dist/lib/docs/content-schemas.d.ts.map +1 -0
- package/dist/lib/docs/content-schemas.js +617 -0
- package/dist/lib/docs/describe-content-api.d.ts +22 -0
- package/dist/lib/docs/describe-content-api.d.ts.map +1 -0
- package/dist/lib/docs/describe-content-api.js +173 -0
- package/dist/lib/docs/field-schema.d.ts +28 -0
- package/dist/lib/docs/field-schema.d.ts.map +1 -0
- package/dist/lib/docs/field-schema.js +214 -0
- package/dist/lib/entries/application/use-cases/bulk-publish-entries.use-case.d.ts +23 -0
- package/dist/lib/entries/application/use-cases/bulk-publish-entries.use-case.d.ts.map +1 -0
- package/dist/lib/entries/application/use-cases/bulk-publish-entries.use-case.js +77 -0
- package/dist/lib/entries/application/use-cases/bulk-unpublish-entries.use-case.d.ts +23 -0
- package/dist/lib/entries/application/use-cases/bulk-unpublish-entries.use-case.d.ts.map +1 -0
- package/dist/lib/entries/application/use-cases/bulk-unpublish-entries.use-case.js +66 -0
- package/dist/lib/entries/application/use-cases/publish-entry.use-case.d.ts +43 -0
- package/dist/lib/entries/application/use-cases/publish-entry.use-case.d.ts.map +1 -0
- package/dist/lib/entries/application/use-cases/publish-entry.use-case.js +106 -0
- package/dist/lib/entries/application/use-cases/unpublish-entry.use-case.d.ts +30 -0
- package/dist/lib/entries/application/use-cases/unpublish-entry.use-case.d.ts.map +1 -0
- package/dist/lib/entries/application/use-cases/unpublish-entry.use-case.js +70 -0
- package/dist/lib/entries/controllers/bulk-entries.controller.d.ts +26 -0
- package/dist/lib/entries/controllers/bulk-entries.controller.d.ts.map +1 -0
- package/dist/lib/entries/controllers/create-entry.controller.d.ts +20 -0
- package/dist/lib/entries/controllers/create-entry.controller.d.ts.map +1 -0
- package/dist/lib/entries/controllers/delete-entry.controller.d.ts +24 -0
- package/dist/lib/entries/controllers/delete-entry.controller.d.ts.map +1 -0
- package/dist/lib/entries/controllers/get-entry.controller.d.ts +34 -0
- package/dist/lib/entries/controllers/get-entry.controller.d.ts.map +1 -0
- package/dist/lib/entries/controllers/list-entries.controller.d.ts +20 -0
- package/dist/lib/entries/controllers/list-entries.controller.d.ts.map +1 -0
- package/dist/lib/entries/controllers/publish-entry.controller.d.ts +19 -0
- package/dist/lib/entries/controllers/publish-entry.controller.d.ts.map +1 -0
- package/dist/lib/entries/controllers/resolve-type.d.ts +9 -0
- package/dist/lib/entries/controllers/resolve-type.d.ts.map +1 -0
- package/dist/lib/entries/controllers/update-entry.controller.d.ts +18 -0
- package/dist/lib/entries/controllers/update-entry.controller.d.ts.map +1 -0
- package/dist/lib/entries/domain/entry-publish-blocked.error.d.ts +13 -0
- package/dist/lib/entries/domain/entry-publish-blocked.error.d.ts.map +1 -0
- package/dist/lib/entries/domain/entry-publish-blocked.error.js +19 -0
- package/dist/lib/entries/domain/entry.d.ts +71 -0
- package/dist/lib/entries/domain/entry.d.ts.map +1 -0
- package/dist/lib/entries/domain/entry.js +90 -0
- package/dist/lib/entries/domain/events/entry-events.d.ts +67 -0
- package/dist/lib/entries/domain/events/entry-events.d.ts.map +1 -0
- package/dist/lib/entries/domain/events/entry-events.js +100 -0
- package/dist/lib/entries/dto/bulk-ids.dto.d.ts +11 -0
- package/dist/lib/entries/dto/bulk-ids.dto.d.ts.map +1 -0
- package/dist/lib/entries/dto/list-entries-query.dto.d.ts +46 -0
- package/dist/lib/entries/dto/list-entries-query.dto.d.ts.map +1 -0
- package/dist/lib/entries/dto/relation-delta-map.validator.d.ts +19 -0
- package/dist/lib/entries/dto/relation-delta-map.validator.d.ts.map +1 -0
- package/dist/lib/entries/dto/save-entry.dto.d.ts +46 -0
- package/dist/lib/entries/dto/save-entry.dto.d.ts.map +1 -0
- package/dist/lib/entries/entries.constants.d.ts +19 -0
- package/dist/lib/entries/entries.constants.d.ts.map +1 -0
- package/dist/lib/entries/entries.constants.js +21 -0
- package/dist/lib/entries/http/controllers/bulk-entries.controller.d.ts +33 -0
- package/dist/lib/entries/http/controllers/bulk-entries.controller.d.ts.map +1 -0
- package/dist/lib/entries/http/controllers/bulk-entries.controller.js +143 -0
- package/dist/lib/entries/http/controllers/create-entry.controller.d.ts +21 -0
- package/dist/lib/entries/http/controllers/create-entry.controller.d.ts.map +1 -0
- package/dist/lib/entries/http/controllers/create-entry.controller.js +52 -0
- package/dist/lib/entries/http/controllers/delete-entry.controller.d.ts +25 -0
- package/dist/lib/entries/http/controllers/delete-entry.controller.d.ts.map +1 -0
- package/dist/lib/entries/http/controllers/delete-entry.controller.js +84 -0
- package/dist/lib/entries/http/controllers/get-entry.controller.d.ts +44 -0
- package/dist/lib/entries/http/controllers/get-entry.controller.d.ts.map +1 -0
- package/dist/lib/entries/http/controllers/get-entry.controller.js +124 -0
- package/dist/lib/entries/http/controllers/list-entries.controller.d.ts +20 -0
- package/dist/lib/entries/http/controllers/list-entries.controller.d.ts.map +1 -0
- package/dist/lib/entries/http/controllers/list-entries.controller.js +52 -0
- package/dist/lib/entries/http/controllers/publish-entry.controller.d.ts +22 -0
- package/dist/lib/entries/http/controllers/publish-entry.controller.d.ts.map +1 -0
- package/dist/lib/entries/http/controllers/publish-entry.controller.js +68 -0
- package/dist/lib/entries/http/controllers/resolve-type.d.ts +9 -0
- package/dist/lib/entries/http/controllers/resolve-type.d.ts.map +1 -0
- package/dist/lib/entries/http/controllers/resolve-type.js +16 -0
- package/dist/lib/entries/http/controllers/to-actor.d.ts +13 -0
- package/dist/lib/entries/http/controllers/to-actor.d.ts.map +1 -0
- package/dist/lib/entries/http/controllers/to-actor.js +15 -0
- package/dist/lib/entries/http/controllers/update-entry.controller.d.ts +19 -0
- package/dist/lib/entries/http/controllers/update-entry.controller.d.ts.map +1 -0
- package/dist/lib/entries/http/controllers/update-entry.controller.js +51 -0
- package/dist/lib/entries/http/dto/bulk-ids.dto.d.ts +11 -0
- package/dist/lib/entries/http/dto/bulk-ids.dto.d.ts.map +1 -0
- package/dist/lib/entries/http/dto/bulk-ids.dto.js +33 -0
- package/dist/lib/entries/http/dto/list-entries-query.dto.d.ts +66 -0
- package/dist/lib/entries/http/dto/list-entries-query.dto.d.ts.map +1 -0
- package/dist/lib/entries/http/dto/list-entries-query.dto.js +192 -0
- package/dist/lib/entries/http/dto/relation-delta-map.validator.d.ts +30 -0
- package/dist/lib/entries/http/dto/relation-delta-map.validator.d.ts.map +1 -0
- package/dist/lib/entries/http/dto/relation-delta-map.validator.js +102 -0
- package/dist/lib/entries/http/dto/save-entry.dto.d.ts +48 -0
- package/dist/lib/entries/http/dto/save-entry.dto.d.ts.map +1 -0
- package/dist/lib/entries/http/dto/save-entry.dto.js +120 -0
- package/dist/lib/entries/http/guards/content-grant.guard.d.ts +37 -0
- package/dist/lib/entries/http/guards/content-grant.guard.d.ts.map +1 -0
- package/dist/lib/entries/http/guards/content-grant.guard.js +67 -0
- package/dist/lib/entries/infrastructure/persistence/bulk-publish-verdicts.d.ts +22 -0
- package/dist/lib/entries/infrastructure/persistence/bulk-publish-verdicts.d.ts.map +1 -0
- package/dist/lib/entries/infrastructure/persistence/bulk-publish-verdicts.js +81 -0
- package/dist/lib/entries/infrastructure/persistence/entry-counter.service.d.ts +42 -0
- package/dist/lib/entries/infrastructure/persistence/entry-counter.service.d.ts.map +1 -0
- package/dist/lib/entries/infrastructure/persistence/entry-counter.service.js +73 -0
- package/dist/lib/entries/infrastructure/persistence/entry-row.d.ts +56 -0
- package/dist/lib/entries/infrastructure/persistence/entry-row.d.ts.map +1 -0
- package/dist/lib/entries/infrastructure/persistence/entry-row.js +185 -0
- package/dist/lib/entries/infrastructure/persistence/entry-writer.service.d.ts +392 -0
- package/dist/lib/entries/infrastructure/persistence/entry-writer.service.d.ts.map +1 -0
- package/dist/lib/entries/infrastructure/persistence/entry-writer.service.js +1223 -0
- package/dist/lib/entries/infrastructure/persistence/field-selection.d.ts +24 -0
- package/dist/lib/entries/infrastructure/persistence/field-selection.d.ts.map +1 -0
- package/dist/lib/entries/infrastructure/persistence/media-accept.d.ts +23 -0
- package/dist/lib/entries/infrastructure/persistence/media-accept.d.ts.map +1 -0
- package/dist/lib/entries/infrastructure/persistence/media-accept.js +55 -0
- package/dist/lib/entries/infrastructure/persistence/relation-link.service.d.ts +327 -0
- package/dist/lib/entries/infrastructure/persistence/relation-link.service.d.ts.map +1 -0
- package/dist/lib/entries/infrastructure/persistence/relation-link.service.js +1008 -0
- package/dist/lib/entries/infrastructure/queries/bulk-publish-preview.query.d.ts +19 -0
- package/dist/lib/entries/infrastructure/queries/bulk-publish-preview.query.d.ts.map +1 -0
- package/dist/lib/entries/infrastructure/queries/bulk-publish-preview.query.js +39 -0
- package/dist/lib/entries/infrastructure/queries/entries.service.d.ts +64 -0
- package/dist/lib/entries/infrastructure/queries/entries.service.d.ts.map +1 -0
- package/dist/lib/entries/infrastructure/queries/entries.service.js +202 -0
- package/dist/lib/entries/infrastructure/queries/entry-filter-schema.d.ts +40 -0
- package/dist/lib/entries/infrastructure/queries/entry-filter-schema.d.ts.map +1 -0
- package/dist/lib/entries/infrastructure/queries/entry-filter-surface.d.ts +38 -0
- package/dist/lib/entries/infrastructure/queries/entry-filter-surface.d.ts.map +1 -0
- package/dist/lib/entries/infrastructure/queries/entry-filter-surface.js +310 -0
- package/dist/lib/entries/infrastructure/queries/entry-scalar-fields.d.ts +25 -0
- package/dist/lib/entries/infrastructure/queries/entry-scalar-fields.d.ts.map +1 -0
- package/dist/lib/entries/infrastructure/queries/entry-scalar-fields.js +51 -0
- package/dist/lib/entries/infrastructure/queries/entry-search.d.ts +19 -0
- package/dist/lib/entries/infrastructure/queries/entry-search.d.ts.map +1 -0
- package/dist/lib/entries/infrastructure/queries/entry-search.js +52 -0
- package/dist/lib/entries/infrastructure/queries/media-refs.query.d.ts +21 -0
- package/dist/lib/entries/infrastructure/queries/media-refs.query.d.ts.map +1 -0
- package/dist/lib/entries/infrastructure/queries/media-refs.query.js +117 -0
- package/dist/lib/entries/services/entries.service.d.ts +59 -0
- package/dist/lib/entries/services/entries.service.d.ts.map +1 -0
- package/dist/lib/entries/services/entry-counter.service.d.ts +31 -0
- package/dist/lib/entries/services/entry-counter.service.d.ts.map +1 -0
- package/dist/lib/entries/services/entry-filter-schema.d.ts +32 -0
- package/dist/lib/entries/services/entry-filter-schema.d.ts.map +1 -0
- package/dist/lib/entries/services/entry-row.d.ts +56 -0
- package/dist/lib/entries/services/entry-row.d.ts.map +1 -0
- package/dist/lib/entries/services/entry-writer.service.d.ts +193 -0
- package/dist/lib/entries/services/entry-writer.service.d.ts.map +1 -0
- package/dist/lib/entries/services/relation-link.service.d.ts +115 -0
- package/dist/lib/entries/services/relation-link.service.d.ts.map +1 -0
- package/dist/lib/entries/types/bulk-publish.d.ts +75 -0
- package/dist/lib/entries/types/bulk-publish.d.ts.map +1 -0
- package/dist/lib/entries/types/bulk-publish.js +22 -0
- package/dist/lib/entries/types/entry-list-view.d.ts +205 -0
- package/dist/lib/entries/types/entry-list-view.d.ts.map +1 -0
- package/dist/lib/entries/types/entry-list-view.js +5 -0
- package/dist/lib/entries/types/filter-surface.d.ts +35 -0
- package/dist/lib/entries/types/filter-surface.d.ts.map +1 -0
- package/dist/lib/entries/types/filter-surface.js +2 -0
- package/dist/lib/extension/entry-extension-boot-check.d.ts +16 -0
- package/dist/lib/extension/entry-extension-boot-check.d.ts.map +1 -0
- package/dist/lib/extension/entry-extension-boot-check.js +42 -0
- package/dist/lib/extension/entry-extension.d.ts +225 -0
- package/dist/lib/extension/entry-extension.d.ts.map +1 -0
- package/dist/lib/extension/entry-extension.js +27 -0
- package/dist/lib/extension/media-asset-resolver.d.ts +85 -0
- package/dist/lib/extension/media-asset-resolver.d.ts.map +1 -0
- package/dist/lib/extension/media-asset-resolver.js +26 -0
- package/dist/lib/extension/per-locale-relation.d.ts +18 -0
- package/dist/lib/extension/per-locale-relation.d.ts.map +1 -0
- package/dist/lib/extension/relation-locale-sync.d.ts +62 -0
- package/dist/lib/extension/relation-locale-sync.d.ts.map +1 -0
- package/dist/lib/extension/relation-locale-sync.js +88 -0
- package/dist/lib/fields/index.d.ts +94 -0
- package/dist/lib/fields/index.d.ts.map +1 -0
- package/dist/lib/fields/index.js +203 -0
- package/dist/lib/insights/http/controllers/content-pipeline.controller.d.ts +16 -0
- package/dist/lib/insights/http/controllers/content-pipeline.controller.d.ts.map +1 -0
- package/dist/lib/insights/http/controllers/content-pipeline.controller.js +39 -0
- package/dist/lib/insights/http/controllers/content-punchcard.controller.d.ts +18 -0
- package/dist/lib/insights/http/controllers/content-punchcard.controller.d.ts.map +1 -0
- package/dist/lib/insights/http/controllers/content-punchcard.controller.js +42 -0
- package/dist/lib/insights/http/controllers/content-stale.controller.d.ts +17 -0
- package/dist/lib/insights/http/controllers/content-stale.controller.d.ts.map +1 -0
- package/dist/lib/insights/http/controllers/content-stale.controller.js +40 -0
- package/dist/lib/insights/http/controllers/content-totals.controller.d.ts +18 -0
- package/dist/lib/insights/http/controllers/content-totals.controller.d.ts.map +1 -0
- package/dist/lib/insights/http/controllers/content-totals.controller.js +42 -0
- package/dist/lib/insights/http/controllers/content-unshipped.controller.d.ts +17 -0
- package/dist/lib/insights/http/controllers/content-unshipped.controller.d.ts.map +1 -0
- package/dist/lib/insights/http/controllers/content-unshipped.controller.js +40 -0
- package/dist/lib/insights/http/controllers/content-velocity.controller.d.ts +17 -0
- package/dist/lib/insights/http/controllers/content-velocity.controller.d.ts.map +1 -0
- package/dist/lib/insights/http/controllers/content-velocity.controller.js +41 -0
- package/dist/lib/insights/http/dto/insights-range-query.dto.d.ts +15 -0
- package/dist/lib/insights/http/dto/insights-range-query.dto.d.ts.map +1 -0
- package/dist/lib/insights/http/dto/insights-range-query.dto.js +38 -0
- package/dist/lib/insights/infrastructure/queries/content-insights.query.d.ts +77 -0
- package/dist/lib/insights/infrastructure/queries/content-insights.query.d.ts.map +1 -0
- package/dist/lib/insights/infrastructure/queries/content-insights.query.js +380 -0
- package/dist/lib/insights/types/content-insights-view.d.ts +134 -0
- package/dist/lib/insights/types/content-insights-view.d.ts.map +1 -0
- package/dist/lib/insights/types/content-insights-view.js +10 -0
- package/dist/lib/mcp/content-tools.provider.d.ts +83 -0
- package/dist/lib/mcp/content-tools.provider.d.ts.map +1 -0
- package/dist/lib/mcp/content-tools.provider.js +441 -0
- package/dist/lib/mcp/tool-input.d.ts +43 -0
- package/dist/lib/mcp/tool-input.d.ts.map +1 -0
- package/dist/lib/mcp/tool-input.js +117 -0
- package/dist/lib/mcp/tool-schemas.d.ts +34 -0
- package/dist/lib/mcp/tool-schemas.d.ts.map +1 -0
- package/dist/lib/mcp/tool-schemas.js +282 -0
- package/dist/lib/public/controllers/get-public-entry.controller.d.ts +26 -0
- package/dist/lib/public/controllers/get-public-entry.controller.d.ts.map +1 -0
- package/dist/lib/public/controllers/list-public-entries.controller.d.ts +24 -0
- package/dist/lib/public/controllers/list-public-entries.controller.d.ts.map +1 -0
- package/dist/lib/public/controllers/public-schema.controller.d.ts +18 -0
- package/dist/lib/public/controllers/public-schema.controller.d.ts.map +1 -0
- package/dist/lib/public-api/http/api-token-request.d.ts +41 -0
- package/dist/lib/public-api/http/api-token-request.d.ts.map +1 -0
- package/dist/lib/public-api/http/api-token-request.js +2 -0
- package/dist/lib/public-api/http/controllers/public-content-types.controller.d.ts +31 -0
- package/dist/lib/public-api/http/controllers/public-content-types.controller.d.ts.map +1 -0
- package/dist/lib/public-api/http/controllers/public-content-types.controller.js +93 -0
- package/dist/lib/public-api/http/controllers/public-entries.controller.d.ts +101 -0
- package/dist/lib/public-api/http/controllers/public-entries.controller.d.ts.map +1 -0
- package/dist/lib/public-api/http/controllers/public-entries.controller.js +307 -0
- package/dist/lib/public-api/http/controllers/public-entry-writes.controller.d.ts +76 -0
- package/dist/lib/public-api/http/controllers/public-entry-writes.controller.d.ts.map +1 -0
- package/dist/lib/public-api/http/controllers/public-entry-writes.controller.js +353 -0
- package/dist/lib/public-api/http/controllers/resolve-granted-type.d.ts +42 -0
- package/dist/lib/public-api/http/controllers/resolve-granted-type.d.ts.map +1 -0
- package/dist/lib/public-api/http/controllers/resolve-granted-type.js +25 -0
- package/dist/lib/public-api/http/decorators/current-api-token.decorator.d.ts +8 -0
- package/dist/lib/public-api/http/decorators/current-api-token.decorator.d.ts.map +1 -0
- package/dist/lib/public-api/http/decorators/current-api-token.decorator.js +17 -0
- package/dist/lib/public-api/http/dto/public-bulk.dto.d.ts +58 -0
- package/dist/lib/public-api/http/dto/public-bulk.dto.d.ts.map +1 -0
- package/dist/lib/public-api/http/dto/public-bulk.dto.js +118 -0
- package/dist/lib/public-api/http/dto/public-list-entries-query.dto.d.ts +106 -0
- package/dist/lib/public-api/http/dto/public-list-entries-query.dto.d.ts.map +1 -0
- package/dist/lib/public-api/http/dto/public-list-entries-query.dto.js +297 -0
- package/dist/lib/public-api/http/dto/public-save-entry.dto.d.ts +39 -0
- package/dist/lib/public-api/http/dto/public-save-entry.dto.d.ts.map +1 -0
- package/dist/lib/public-api/http/dto/public-save-entry.dto.js +112 -0
- package/dist/lib/public-api/http/guards/api-token-workspace.guard.d.ts +25 -0
- package/dist/lib/public-api/http/guards/api-token-workspace.guard.d.ts.map +1 -0
- package/dist/lib/public-api/http/guards/api-token-workspace.guard.js +58 -0
- package/dist/lib/public-api/http/guards/api-token.guard.d.ts +32 -0
- package/dist/lib/public-api/http/guards/api-token.guard.d.ts.map +1 -0
- package/dist/lib/public-api/http/guards/api-token.guard.js +92 -0
- package/dist/lib/public-api/http/guards/draft-visibility.guard.d.ts +25 -0
- package/dist/lib/public-api/http/guards/draft-visibility.guard.d.ts.map +1 -0
- package/dist/lib/public-api/http/guards/draft-visibility.guard.js +56 -0
- package/dist/lib/public-api/infrastructure/bulk-save-op.d.ts +55 -0
- package/dist/lib/public-api/infrastructure/bulk-save-op.d.ts.map +1 -0
- package/dist/lib/public-api/infrastructure/bulk-save-op.js +61 -0
- package/dist/lib/public-api/infrastructure/field-selection.d.ts +21 -0
- package/dist/lib/public-api/infrastructure/field-selection.d.ts.map +1 -0
- package/dist/lib/public-api/infrastructure/field-selection.js +72 -0
- package/dist/lib/public-api/infrastructure/public-entries.query.d.ts +248 -0
- package/dist/lib/public-api/infrastructure/public-entries.query.d.ts.map +1 -0
- package/dist/lib/public-api/infrastructure/public-entries.query.js +557 -0
- package/dist/lib/public-api/infrastructure/public-entry-row.d.ts +31 -0
- package/dist/lib/public-api/infrastructure/public-entry-row.d.ts.map +1 -0
- package/dist/lib/public-api/infrastructure/public-entry-row.js +76 -0
- package/dist/lib/public-api/infrastructure/public-entry-writes.service.d.ts +188 -0
- package/dist/lib/public-api/infrastructure/public-entry-writes.service.d.ts.map +1 -0
- package/dist/lib/public-api/infrastructure/public-entry-writes.service.js +321 -0
- package/dist/lib/public-api/infrastructure/public-expansion.query.d.ts +98 -0
- package/dist/lib/public-api/infrastructure/public-expansion.query.d.ts.map +1 -0
- package/dist/lib/public-api/infrastructure/public-expansion.query.js +384 -0
- package/dist/lib/public-api/types/public-bulk.d.ts +77 -0
- package/dist/lib/public-api/types/public-bulk.d.ts.map +1 -0
- package/dist/lib/public-api/types/public-bulk.js +23 -0
- package/dist/lib/public-api/types/public-entry.d.ts +97 -0
- package/dist/lib/public-api/types/public-entry.d.ts.map +1 -0
- package/dist/lib/public-api/types/public-entry.js +8 -0
- package/dist/lib/public-api/types/public-expansion.d.ts +92 -0
- package/dist/lib/public-api/types/public-expansion.d.ts.map +1 -0
- package/dist/lib/public-api/types/public-expansion.js +2 -0
- package/dist/lib/registry/content-type-registry.d.ts +103 -0
- package/dist/lib/registry/content-type-registry.d.ts.map +1 -0
- package/dist/lib/registry/content-type-registry.js +155 -0
- package/dist/lib/revisions/application/ports/revision-store.d.ts +71 -0
- package/dist/lib/revisions/application/ports/revision-store.d.ts.map +1 -0
- package/dist/lib/revisions/application/ports/revision-store.js +9 -0
- package/dist/lib/revisions/application/use-cases/publish-revision.use-case.d.ts +40 -0
- package/dist/lib/revisions/application/use-cases/publish-revision.use-case.d.ts.map +1 -0
- package/dist/lib/revisions/application/use-cases/publish-revision.use-case.js +66 -0
- package/dist/lib/revisions/application/use-cases/restore-revision.use-case.d.ts +36 -0
- package/dist/lib/revisions/application/use-cases/restore-revision.use-case.d.ts.map +1 -0
- package/dist/lib/revisions/application/use-cases/restore-revision.use-case.js +57 -0
- package/dist/lib/revisions/domain/revision-status.d.ts +18 -0
- package/dist/lib/revisions/domain/revision-status.d.ts.map +1 -0
- package/dist/lib/revisions/domain/revision-status.js +18 -0
- package/dist/lib/revisions/domain/revision.d.ts +80 -0
- package/dist/lib/revisions/domain/revision.d.ts.map +1 -0
- package/dist/lib/revisions/domain/revision.js +84 -0
- package/dist/lib/revisions/http/controllers/publish-revision.controller.d.ts +19 -0
- package/dist/lib/revisions/http/controllers/publish-revision.controller.d.ts.map +1 -0
- package/dist/lib/revisions/http/controllers/publish-revision.controller.js +51 -0
- package/dist/lib/revisions/http/controllers/restore-revision.controller.d.ts +17 -0
- package/dist/lib/revisions/http/controllers/restore-revision.controller.d.ts.map +1 -0
- package/dist/lib/revisions/http/controllers/restore-revision.controller.js +49 -0
- package/dist/lib/revisions/http/controllers/revisions.controller.d.ts +20 -0
- package/dist/lib/revisions/http/controllers/revisions.controller.d.ts.map +1 -0
- package/dist/lib/revisions/http/controllers/revisions.controller.js +76 -0
- package/dist/lib/revisions/infrastructure/persistence/drizzle-revision.store.d.ts +33 -0
- package/dist/lib/revisions/infrastructure/persistence/drizzle-revision.store.d.ts.map +1 -0
- package/dist/lib/revisions/infrastructure/persistence/drizzle-revision.store.js +174 -0
- package/dist/lib/revisions/infrastructure/persistence/revision-snapshot.d.ts +17 -0
- package/dist/lib/revisions/infrastructure/persistence/revision-snapshot.d.ts.map +1 -0
- package/dist/lib/revisions/infrastructure/persistence/revision-snapshot.js +20 -0
- package/dist/lib/revisions/infrastructure/persistence/revision-table.d.ts +228 -0
- package/dist/lib/revisions/infrastructure/persistence/revision-table.d.ts.map +1 -0
- package/dist/lib/revisions/infrastructure/persistence/revision-table.js +57 -0
- package/dist/lib/revisions/infrastructure/queries/revision-refs.query.d.ts +22 -0
- package/dist/lib/revisions/infrastructure/queries/revision-refs.query.d.ts.map +1 -0
- package/dist/lib/revisions/infrastructure/queries/revision-refs.query.js +66 -0
- package/dist/lib/revisions/revisions.constants.d.ts +10 -0
- package/dist/lib/revisions/revisions.constants.d.ts.map +1 -0
- package/dist/lib/revisions/revisions.constants.js +12 -0
- package/dist/lib/revisions/types/revision-view.d.ts +74 -0
- package/dist/lib/revisions/types/revision-view.d.ts.map +1 -0
- package/dist/lib/revisions/types/revision-view.js +2 -0
- package/dist/lib/types/content-type.d.ts +131 -0
- package/dist/lib/types/content-type.d.ts.map +1 -0
- package/dist/lib/types/content-type.js +28 -0
- package/dist/lib/types/fields.d.ts +303 -0
- package/dist/lib/types/fields.d.ts.map +1 -0
- package/dist/lib/types/fields.js +52 -0
- package/dist/lib/utils/content-plugin.d.ts +35 -0
- package/dist/lib/utils/content-plugin.d.ts.map +1 -0
- package/dist/lib/utils/content-plugin.js +35 -0
- package/dist/lib/validation/services/entry-validation.service.d.ts +24 -0
- package/dist/lib/validation/services/entry-validation.service.d.ts.map +1 -0
- package/dist/lib/validation/services/entry-validation.service.js +35 -0
- package/package.json +54 -0
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Pure row ↔ entry mappers shared by the read ({@link EntriesService}) and write
|
|
4
|
+
* ({@link EntryWriterService}) paths, so the wire shape and the column projection
|
|
5
|
+
* have one definition each. No DB access, no NestJS — just shape translation.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.toRecord = toRecord;
|
|
9
|
+
exports.coerceValues = coerceValues;
|
|
10
|
+
exports.toColumns = toColumns;
|
|
11
|
+
exports.entryTitle = entryTitle;
|
|
12
|
+
exports.entrySlug = entrySlug;
|
|
13
|
+
const content_domain_1 = require("@orthacms/content-domain");
|
|
14
|
+
const fields_1 = require("../../../types/fields");
|
|
15
|
+
/**
|
|
16
|
+
* Map a raw DB row to the admin {@link EntryRecord}: envelope fields plus a
|
|
17
|
+
* `values` bag keyed by field name. `status`/`publishedAt` are emitted only for
|
|
18
|
+
* publishable types. Relations that own no column — many-relations (their links live in join
|
|
19
|
+
* tables) and inverse/back-references (they reuse the owning side's storage) —
|
|
20
|
+
* aren't selected here; an owning single relation passes through as its FK uuid.
|
|
21
|
+
*/
|
|
22
|
+
function toRecord(type, row) {
|
|
23
|
+
const values = {};
|
|
24
|
+
for (const [name, spec] of Object.entries(type.fields)) {
|
|
25
|
+
if (spec.type === fields_1.CONTENT_FIELD_TYPE.Relation &&
|
|
26
|
+
(spec.relation?.many || spec.relation?.inverse))
|
|
27
|
+
continue;
|
|
28
|
+
values[name] = row[name] ?? null;
|
|
29
|
+
}
|
|
30
|
+
const record = {
|
|
31
|
+
id: row['id'],
|
|
32
|
+
createdAt: row['createdAt'].toISOString(),
|
|
33
|
+
updatedAt: row['updatedAt'].toISOString(),
|
|
34
|
+
values
|
|
35
|
+
};
|
|
36
|
+
if (type.publishable) {
|
|
37
|
+
record.status = row['status'];
|
|
38
|
+
// Carried alongside `status` because the two together name the publish
|
|
39
|
+
// state: a `draft` that has a `published_at` still has live content
|
|
40
|
+
// behind it (the admin's "Modified"), unlike one that never published.
|
|
41
|
+
const publishedAt = row['publishedAt'];
|
|
42
|
+
record.publishedAt = publishedAt ? publishedAt.toISOString() : null;
|
|
43
|
+
}
|
|
44
|
+
if (type.i18n) {
|
|
45
|
+
record.locale = row['locale'];
|
|
46
|
+
record.localeGroupId = row['localeGroupId'];
|
|
47
|
+
}
|
|
48
|
+
return record;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The shared empty-value test (see {@link isEmptyFieldValue}), taught the one
|
|
52
|
+
* thing it cannot see on its own: a **rich-text document** is a JSON object, so
|
|
53
|
+
* the empty one an editor leaves behind (`{ doc: [paragraph] }`) is neither
|
|
54
|
+
* null, nor blank, nor an empty array. Storing that instead of `null` would
|
|
55
|
+
* make a cleared body read as content — `required` would pass, the publish gate
|
|
56
|
+
* would let it through, and the admin's "Changed" badge would disagree with
|
|
57
|
+
* what the author sees.
|
|
58
|
+
*/
|
|
59
|
+
function isEmpty(value, spec) {
|
|
60
|
+
return spec?.type === fields_1.CONTENT_FIELD_TYPE.RichText
|
|
61
|
+
? (0, content_domain_1.isEmptyRichText)(value)
|
|
62
|
+
: (0, fields_1.isEmptyFieldValue)(value);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Normalize the admin's (string-shaped) `values` bag to the proper JS types the
|
|
66
|
+
* validator and storage expect — numbers parsed, JSON text parsed, empties
|
|
67
|
+
* collapsed to null — keeping every field (so a many-relation array still
|
|
68
|
+
* validates). The single coercion point: both {@link toColumns} (storage) and
|
|
69
|
+
* the writer's validation run against the result, so they can't disagree on a
|
|
70
|
+
* value's type. Datetime/date stay ISO strings (the validator accepts them;
|
|
71
|
+
* {@link toColumns} converts datetime to `Date` for `timestamptz`).
|
|
72
|
+
*/
|
|
73
|
+
function coerceValues(type, values) {
|
|
74
|
+
const out = {};
|
|
75
|
+
for (const [name, spec] of Object.entries(type.fields)) {
|
|
76
|
+
let value = values[name];
|
|
77
|
+
if (isEmpty(value, spec)) {
|
|
78
|
+
out[name] = Array.isArray(value) ? value : null;
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
switch (spec.type) {
|
|
82
|
+
case fields_1.CONTENT_FIELD_TYPE.Number:
|
|
83
|
+
case fields_1.CONTENT_FIELD_TYPE.Money:
|
|
84
|
+
// NaN when unparseable — the validator reports "must be a number".
|
|
85
|
+
value = typeof value === 'number' ? value : Number(value);
|
|
86
|
+
break;
|
|
87
|
+
case fields_1.CONTENT_FIELD_TYPE.Json:
|
|
88
|
+
if (typeof value === 'string') {
|
|
89
|
+
try {
|
|
90
|
+
value = JSON.parse(value);
|
|
91
|
+
}
|
|
92
|
+
catch {
|
|
93
|
+
// Unparseable: collapse to null rather than persist the
|
|
94
|
+
// raw string into the jsonb column (which would store a
|
|
95
|
+
// string scalar where consumers expect structured data).
|
|
96
|
+
// Mirrors the invalid-date / NaN-number handling below.
|
|
97
|
+
// A required Json field then fails validation as empty.
|
|
98
|
+
value = null;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
out[name] = value;
|
|
104
|
+
}
|
|
105
|
+
return out;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Project a (coerced) `values` bag onto the columns of a generated table for an
|
|
109
|
+
* insert/update. Includes only keys declared on the type (reserved envelope
|
|
110
|
+
* columns — `status`/`published_at`/`deleted_at`/timestamps — are owned by the
|
|
111
|
+
* service, never the client), skips relations that own no column (many-relations,
|
|
112
|
+
* whose links live in join tables, and inverse/back-references, which reuse the
|
|
113
|
+
* owning side's storage), collapses empties to `null`, converts a `datetime` to a `Date` for
|
|
114
|
+
* the `timestamptz` column (guarding an invalid date to `null` rather than
|
|
115
|
+
* letting `pg` throw), and drops a `NaN` number to `null`. A field absent from
|
|
116
|
+
* `values` is written as `null` — the editor submits the full bag, so a write
|
|
117
|
+
* replaces the whole document.
|
|
118
|
+
*/
|
|
119
|
+
function toColumns(type, values) {
|
|
120
|
+
const columns = {};
|
|
121
|
+
for (const [name, spec] of Object.entries(type.fields)) {
|
|
122
|
+
if (spec.type === fields_1.CONTENT_FIELD_TYPE.Relation &&
|
|
123
|
+
(spec.relation?.many || spec.relation?.inverse))
|
|
124
|
+
continue;
|
|
125
|
+
let value = values[name];
|
|
126
|
+
if (isEmpty(value, spec)) {
|
|
127
|
+
columns[name] = null;
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
if (spec.type === fields_1.CONTENT_FIELD_TYPE.Datetime) {
|
|
131
|
+
const date = value instanceof Date ? value : new Date(String(value));
|
|
132
|
+
value = Number.isNaN(date.getTime()) ? null : date;
|
|
133
|
+
}
|
|
134
|
+
else if (spec.type === fields_1.CONTENT_FIELD_TYPE.Number ||
|
|
135
|
+
spec.type === fields_1.CONTENT_FIELD_TYPE.Money) {
|
|
136
|
+
const num = typeof value === 'number' ? value : Number(value);
|
|
137
|
+
value = Number.isNaN(num) ? null : num;
|
|
138
|
+
}
|
|
139
|
+
columns[name] = value;
|
|
140
|
+
}
|
|
141
|
+
return columns;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Field types short enough to label a row by. Text first, then Select — both are
|
|
145
|
+
* compact strings, unlike richtext (potentially huge HTML).
|
|
146
|
+
*/
|
|
147
|
+
const TITLE_FIELD_TYPES = new Set([
|
|
148
|
+
fields_1.CONTENT_FIELD_TYPE.Text,
|
|
149
|
+
fields_1.CONTENT_FIELD_TYPE.Select
|
|
150
|
+
]);
|
|
151
|
+
/**
|
|
152
|
+
* A human display label for an entry — the first non-empty title-eligible field's
|
|
153
|
+
* value (see {@link TITLE_FIELD_TYPES}), falling back to the id. Used to label
|
|
154
|
+
* rows in the bulk-publish preview.
|
|
155
|
+
*/
|
|
156
|
+
function entryTitle(type, row) {
|
|
157
|
+
for (const [name, spec] of Object.entries(type.fields)) {
|
|
158
|
+
if (!TITLE_FIELD_TYPES.has(spec.type))
|
|
159
|
+
continue;
|
|
160
|
+
const value = row[name];
|
|
161
|
+
if (typeof value === 'string' && value.trim())
|
|
162
|
+
return value;
|
|
163
|
+
}
|
|
164
|
+
return row['id'];
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* The slug handle for an entry — the value of its **slug field**: the first
|
|
168
|
+
* field flagged `admin.widget === 'slug'`, else a field literally named `slug`.
|
|
169
|
+
* Returns the trimmed value when present and non-empty, otherwise `undefined`
|
|
170
|
+
* (the type has no slug field, or the row's slug is blank). Used to give a
|
|
171
|
+
* linked relation record a stable `/handle` in the admin.
|
|
172
|
+
*/
|
|
173
|
+
function entrySlug(type, row) {
|
|
174
|
+
let named;
|
|
175
|
+
for (const [name, spec] of Object.entries(type.fields)) {
|
|
176
|
+
const value = row[name];
|
|
177
|
+
if (typeof value !== 'string' || !value.trim())
|
|
178
|
+
continue;
|
|
179
|
+
if (spec.admin?.widget === 'slug')
|
|
180
|
+
return value;
|
|
181
|
+
if (name === 'slug')
|
|
182
|
+
named = value;
|
|
183
|
+
}
|
|
184
|
+
return named;
|
|
185
|
+
}
|
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
import { OutboxWriter, UnitOfWork, type Database, type EventActor } from '@orthacms/database';
|
|
2
|
+
import { type ContentEntryExtension } from '../../../extension/entry-extension';
|
|
3
|
+
import { type MediaAssetResolver } from '../../../extension/media-asset-resolver';
|
|
4
|
+
import type { AnyContentType } from '../../../types/content-type';
|
|
5
|
+
import { EntryValidationService, type ValidationIssue } from '../../../validation/services/entry-validation.service';
|
|
6
|
+
import type { EntryRecord, RelationDelta, RelationFieldView } from '../../types/entry-list-view';
|
|
7
|
+
import type { BulkActionResult } from '../../types/bulk-publish';
|
|
8
|
+
import { RelationLinkService, type DbTransaction } from './relation-link.service';
|
|
9
|
+
import { type RevisionStore } from '../../../revisions/application/ports/revision-store';
|
|
10
|
+
/** A generated content table seen as a bag of values / columns by property name. */
|
|
11
|
+
type Row = Record<string, unknown>;
|
|
12
|
+
/**
|
|
13
|
+
* The infrastructure persistence engine for entry writes — create / read-one /
|
|
14
|
+
* update / delete / restore / purge, plus their bulk variants, plus the small
|
|
15
|
+
* status read/write primitives the **publish-lifecycle use-cases** compose
|
|
16
|
+
* (`findLive`, `markPublished`/`markDraft`, the bulk selectors, and
|
|
17
|
+
* `requiredRelationIssues`). Generic over the content type (like
|
|
18
|
+
* {@link EntriesService}): the physical table and its envelope columns are
|
|
19
|
+
* derived from `type` at request time, so one engine backs every collection.
|
|
20
|
+
*
|
|
21
|
+
* Layering note (ADR-0003): the entries engine is generic and registry-driven —
|
|
22
|
+
* one service backs every content type, with no per-aggregate table — so the
|
|
23
|
+
* heavy, battle-tested column/relation/extension persistence stays here as
|
|
24
|
+
* infrastructure rather than being forced into a row⇄aggregate mapper. The
|
|
25
|
+
* publish **lifecycle** (the part with real invariants) is modelled by the
|
|
26
|
+
* `Entry` domain object and driven by application use-cases, which call the
|
|
27
|
+
* status primitives below through the {@link UnitOfWork} so the write and its
|
|
28
|
+
* outbox events commit atomically. {@link EntryValidationService} remains the
|
|
29
|
+
* gate — nothing is written or published without passing it.
|
|
30
|
+
*/
|
|
31
|
+
export declare class EntryWriterService {
|
|
32
|
+
private readonly db;
|
|
33
|
+
private readonly uow;
|
|
34
|
+
private readonly outbox;
|
|
35
|
+
private readonly validation;
|
|
36
|
+
private readonly relations;
|
|
37
|
+
private readonly revisionStore;
|
|
38
|
+
private readonly extension?;
|
|
39
|
+
private readonly mediaResolver?;
|
|
40
|
+
constructor(db: Database, uow: UnitOfWork, outbox: OutboxWriter, validation: EntryValidationService, relations: RelationLinkService, revisionStore: RevisionStore, extension?: ContentEntryExtension | undefined, mediaResolver?: MediaAssetResolver | undefined);
|
|
41
|
+
/**
|
|
42
|
+
* The active unit-of-work transaction, typed as the handle drizzle hands a
|
|
43
|
+
* `db.transaction` callback.
|
|
44
|
+
*
|
|
45
|
+
* `UnitOfWork` stores exactly that object and publishes it as `Database`,
|
|
46
|
+
* because most callers only need the query surface — while this file's
|
|
47
|
+
* helpers, `RelationLinkService`, and the `CONTENT_ENTRY_EXTENSION` port are
|
|
48
|
+
* all typed against the transaction handle. Only ever called from inside
|
|
49
|
+
* `uow.run(...)`, where the two are the same object.
|
|
50
|
+
*/
|
|
51
|
+
private tx;
|
|
52
|
+
/** One event per affected row, built from each row's own id. */
|
|
53
|
+
private eventsFor;
|
|
54
|
+
/**
|
|
55
|
+
* Append `events` to the transactional outbox, stamped with the acting
|
|
56
|
+
* user, from inside the active unit of work.
|
|
57
|
+
*
|
|
58
|
+
* `actor` is `null` for a write made with an API token: revisions record a
|
|
59
|
+
* *user* id and a token is not one, and an audit row naming a person who
|
|
60
|
+
* did not do it is worse than one that says "System". Attributing a token's
|
|
61
|
+
* writes is a real gap that wants its own column, not a misused one.
|
|
62
|
+
*/
|
|
63
|
+
private emit;
|
|
64
|
+
/**
|
|
65
|
+
* The declared fields whose stored value differs between two rows — what
|
|
66
|
+
* `entry.updated` reports, and the test for whether it is raised at all.
|
|
67
|
+
*
|
|
68
|
+
* Compared by JSON shape rather than identity so a jsonb field (`json`,
|
|
69
|
+
* `multiselect`, a media array) is judged on content, and only over
|
|
70
|
+
* `type.fields`: the envelope columns a save always rewrites
|
|
71
|
+
* (`updated_at`, and `status` on a publishable type) are not editorial
|
|
72
|
+
* changes and would make every save look like one.
|
|
73
|
+
*/
|
|
74
|
+
private changedFields;
|
|
75
|
+
/**
|
|
76
|
+
* Fold any `relations: { <singleField>: { set } }` entries into the values
|
|
77
|
+
* bag, resolving `by: "localeGroup"` on the way, and return the deltas with
|
|
78
|
+
* those fields removed.
|
|
79
|
+
*
|
|
80
|
+
* Done **before** the write rather than alongside the link deltas, because a
|
|
81
|
+
* single relation is a column on the row itself: routing it through `values`
|
|
82
|
+
* means the row is written once, and the resolved id then passes through
|
|
83
|
+
* `assertRelationTargets` — existence, workspace, and the same-locale rule —
|
|
84
|
+
* with no second implementation of any of them.
|
|
85
|
+
*
|
|
86
|
+
* The field must not appear in both bags. One of the two would have to win
|
|
87
|
+
* silently, and a caller who set it twice does not know which they meant.
|
|
88
|
+
* Reads the **raw** submitted values for that test — `coerceValues` stamps
|
|
89
|
+
* every declared field, so after coercion every field is "present".
|
|
90
|
+
*/
|
|
91
|
+
private foldSingleRelationSets;
|
|
92
|
+
/**
|
|
93
|
+
* The locale of one live row, or `undefined` on a type that has none.
|
|
94
|
+
*
|
|
95
|
+
* A relation link may not cross locales, and an update's target checks run
|
|
96
|
+
* before the transaction opens — so the row's locale has to be read up
|
|
97
|
+
* front. Costs one indexed lookup, and only on localized types: a non-i18n
|
|
98
|
+
* type short-circuits without touching the database.
|
|
99
|
+
*/
|
|
100
|
+
private localeOf;
|
|
101
|
+
/**
|
|
102
|
+
* Append an immutable **draft** revision for a just-saved row, on the save's
|
|
103
|
+
* own transaction so the snapshot commits atomically with it. Captures the
|
|
104
|
+
* whole document — the field `values` bag plus the full ordered link sets of
|
|
105
|
+
* every join-backed relation (read back inside `tx`, so it reflects the
|
|
106
|
+
* committed state). The entry's append lock serializes concurrent savers so
|
|
107
|
+
* each allocates a distinct version number.
|
|
108
|
+
*/
|
|
109
|
+
private appendRevision;
|
|
110
|
+
/**
|
|
111
|
+
* Append a revision for each row an extension changed as a side-effect of
|
|
112
|
+
* this save — the locale siblings a shared (non-localized) field is synced
|
|
113
|
+
* to, today.
|
|
114
|
+
*
|
|
115
|
+
* Without this their stored values move while their timeline doesn't, so
|
|
116
|
+
* the history claims a change that never happened to them and hides one
|
|
117
|
+
* that did. Rows are sorted by id before appending: each takes a per-entry
|
|
118
|
+
* advisory lock, and a stable order across concurrent savers is what keeps
|
|
119
|
+
* two of them from deadlocking on the pair.
|
|
120
|
+
*/
|
|
121
|
+
private appendRevisionsFor;
|
|
122
|
+
/**
|
|
123
|
+
* Create an entry **owned by `workspaceId`** (stamped onto the row so the
|
|
124
|
+
* reader's workspace filter and every later scoped write see it). A
|
|
125
|
+
* publishable type starts as a **draft** and may be incomplete — validation
|
|
126
|
+
* is deferred to publish. A non-publishable type is always live, so its
|
|
127
|
+
* values must validate now.
|
|
128
|
+
*
|
|
129
|
+
* The insert runs in a transaction that first takes the workspace's *shared*
|
|
130
|
+
* content lock ({@link lockWorkspaceShared}): it coordinates with the
|
|
131
|
+
* workspace delete / content-revoke guards (which take the lock exclusively),
|
|
132
|
+
* so a new entry can't land between their emptiness check and their mutation
|
|
133
|
+
* and be orphaned. Shared mode keeps concurrent creates non-blocking.
|
|
134
|
+
*
|
|
135
|
+
* `locale` / `localeGroupId` are opaque, extension-owned params: the bound
|
|
136
|
+
* extension validates them and stamps the envelope columns (a
|
|
137
|
+
* `localeGroupId` makes the row a **sibling** in that translation group). A
|
|
138
|
+
* duplicate `(group, locale)` surfaces as a **409** via {@link uniqueGuarded}.
|
|
139
|
+
*/
|
|
140
|
+
create(type: AnyContentType, values: Record<string, unknown>, workspaceId: string, relations?: Record<string, RelationDelta>, locale?: string, localeGroupId?: string, actor?: EventActor | null): Promise<EntryRecord>;
|
|
141
|
+
/**
|
|
142
|
+
* First page (+ total) of every relation field's links for one live entry,
|
|
143
|
+
* keyed by field name — what the editor loads on open. Each field is
|
|
144
|
+
* paginated, so a relation with many links contributes only its first page.
|
|
145
|
+
* 404 if the entry is missing (or soft-deleted) in this workspace.
|
|
146
|
+
*/
|
|
147
|
+
getRelations(type: AnyContentType, id: string, workspaceId: string): Promise<Record<string, RelationFieldView>>;
|
|
148
|
+
/**
|
|
149
|
+
* One page of a single relation field's links (infinite-scroll for a
|
|
150
|
+
* many/inverse relation). 404 if the entry is missing; 400 if `field` isn't a
|
|
151
|
+
* relation on the type.
|
|
152
|
+
*/
|
|
153
|
+
getRelationField(type: AnyContentType, id: string, field: string, page: number, pageSize: number, workspaceId: string): Promise<RelationFieldView>;
|
|
154
|
+
/**
|
|
155
|
+
* Apply the staged per-field relation deltas of a save, inside the entry's
|
|
156
|
+
* transaction — so the row and every link change commit or roll back as one.
|
|
157
|
+
* Each field must be a **many/inverse** relation (a single relation is set
|
|
158
|
+
* through `values`); a single-relation or unknown key is a 400. `applyDelta`
|
|
159
|
+
* validates the linked ids against the workspace (422 on a bad target).
|
|
160
|
+
*/
|
|
161
|
+
private applyRelationDeltas;
|
|
162
|
+
/** Resolve a relation field spec on the type, or 400 if it isn't one. */
|
|
163
|
+
private relationSpec;
|
|
164
|
+
/** Read one live entry in the workspace, or 404. */
|
|
165
|
+
getOne(type: AnyContentType, id: string, workspaceId: string): Promise<EntryRecord>;
|
|
166
|
+
/**
|
|
167
|
+
* Replace a live entry's values, or 404. As with {@link create}, a
|
|
168
|
+
* publishable type's values aren't validated here (a draft may be saved
|
|
169
|
+
* incomplete; publish enforces the rules) — a non-publishable, always-live
|
|
170
|
+
* type validates now.
|
|
171
|
+
*/
|
|
172
|
+
update(type: AnyContentType, id: string, values: Record<string, unknown>, workspaceId: string, relations?: Record<string, RelationDelta>, actor?: EventActor | null, options?: {
|
|
173
|
+
/**
|
|
174
|
+
* Whether this write appends a version of its own (default `true`).
|
|
175
|
+
* Set `false` by the publish-a-specific-version path, which re-applies
|
|
176
|
+
* an existing version's snapshot to the live row: that version is
|
|
177
|
+
* marked published in place, so minting a copy of it would add a
|
|
178
|
+
* duplicate entry to the timeline for every publish. Locale siblings
|
|
179
|
+
* the extension rewrites still get their versions — their content
|
|
180
|
+
* really did change.
|
|
181
|
+
*/
|
|
182
|
+
appendRevision?: boolean;
|
|
183
|
+
}): Promise<EntryRecord>;
|
|
184
|
+
/**
|
|
185
|
+
* Stamp `status='published'` + `published_at`/`updated_at` on one live row,
|
|
186
|
+
* returning the updated row (or undefined if none matched, i.e. a 404).
|
|
187
|
+
*/
|
|
188
|
+
markPublished(exec: Database | DbTransaction, type: AnyContentType, id: string, workspaceId: string): Promise<Row | undefined>;
|
|
189
|
+
/**
|
|
190
|
+
* Transition the entry's **revision history** to reflect a publish: one
|
|
191
|
+
* revision becomes the live (`published`) version and any prior published
|
|
192
|
+
* one is `superseded`. Runs on the publish transaction's executor (the
|
|
193
|
+
* active unit of work) so the row's status and its history commit as one.
|
|
194
|
+
* Delegates to the revision store — every revision is minted a draft, so
|
|
195
|
+
* this is what makes a published entry read as "Live" in the timeline.
|
|
196
|
+
*
|
|
197
|
+
* `revisionNumber` targets a **specific** version (publishing an earlier one
|
|
198
|
+
* in place); omitted, it targets the latest — the row that was just saved.
|
|
199
|
+
*/
|
|
200
|
+
markRevisionPublished(exec: Database | DbTransaction, entryId: string, workspaceId: string, revisionNumber?: number): Promise<void>;
|
|
201
|
+
/**
|
|
202
|
+
* Revert the entry's published revision back to `draft` on `exec` — the
|
|
203
|
+
* unpublish counterpart to {@link markRevisionPublished}.
|
|
204
|
+
*/
|
|
205
|
+
markRevisionUnpublished(exec: Database | DbTransaction, entryId: string, workspaceId: string): Promise<void>;
|
|
206
|
+
/** Revert one live row to `status='draft'` (clearing `published_at`) on `exec`. */
|
|
207
|
+
markDraft(exec: Database | DbTransaction, type: AnyContentType, id: string, workspaceId: string): Promise<Row | undefined>;
|
|
208
|
+
/**
|
|
209
|
+
* Load the workspace's live rows for `ids` **`FOR UPDATE`** on `exec`, keyed
|
|
210
|
+
* by id — the locked candidate set a bulk publish re-validates inside its
|
|
211
|
+
* transaction (closing the preview→commit TOCTOU window the comments on the
|
|
212
|
+
* original single-transaction bulk publish defended).
|
|
213
|
+
*/
|
|
214
|
+
loadLiveByIdsForUpdate(exec: Database | DbTransaction, type: AnyContentType, ids: string[], workspaceId: string): Promise<Map<string, Row>>;
|
|
215
|
+
/** Publish a set of ids in one statement on `exec` (the caller pre-filtered them). */
|
|
216
|
+
markPublishedBulk(exec: Database | DbTransaction, type: AnyContentType, ids: string[], workspaceId: string): Promise<void>;
|
|
217
|
+
/**
|
|
218
|
+
* Which of `ids` are currently `published` and live in the workspace, on
|
|
219
|
+
* `exec` — the set a bulk unpublish actually transitions, so it raises one
|
|
220
|
+
* `entry.unpublished` per real change rather than per matched row.
|
|
221
|
+
*/
|
|
222
|
+
publishedIdsAmong(exec: Database | DbTransaction, type: AnyContentType, ids: string[], workspaceId: string): Promise<string[]>;
|
|
223
|
+
/**
|
|
224
|
+
* Revert the **published** rows among `ids` to draft on `exec`, returning
|
|
225
|
+
* how many actually transitioned — the `{ count }` the bulk endpoint
|
|
226
|
+
* reports.
|
|
227
|
+
*
|
|
228
|
+
* The status predicate is the whole of it, and it was missing: without it
|
|
229
|
+
* the `UPDATE` matched every live row in the list, so unpublishing two ids
|
|
230
|
+
* of which one was already a draft answered `{ count: 2 }` — which is what
|
|
231
|
+
* the route's own OpenAPI description promises it never does ("an id that
|
|
232
|
+
* was not a live published row … is not counted"). It also stamped
|
|
233
|
+
* `updatedAt` on rows nothing happened to, moving an entry up a
|
|
234
|
+
* last-modified sort because somebody unpublished a *different* one.
|
|
235
|
+
*/
|
|
236
|
+
markDraftBulk(exec: Database | DbTransaction, type: AnyContentType, ids: string[], workspaceId: string): Promise<number>;
|
|
237
|
+
/**
|
|
238
|
+
* Delete an entry: soft (stamp `deleted_at`) for a paranoid type, hard
|
|
239
|
+
* `DELETE` otherwise. 404 if there's no live row to remove **in this
|
|
240
|
+
* workspace** — an id from another workspace is indistinguishable from a
|
|
241
|
+
* missing one.
|
|
242
|
+
*/
|
|
243
|
+
remove(type: AnyContentType, id: string, workspaceId: string, actor?: EventActor | null): Promise<void>;
|
|
244
|
+
/**
|
|
245
|
+
* Clear a soft-deleted entry's tombstone (paranoid types only), or 404.
|
|
246
|
+
* On an i18n type the restore can collide with a row created in the same
|
|
247
|
+
* (locale group, locale) slot after the soft delete — the partial unique
|
|
248
|
+
* index rejects it, surfaced as a 409 rather than a 500.
|
|
249
|
+
*/
|
|
250
|
+
restore(type: AnyContentType, id: string, workspaceId: string, actor?: EventActor | null): Promise<EntryRecord>;
|
|
251
|
+
/** Permanently delete a tombstoned entry (paranoid types only), or 404. */
|
|
252
|
+
purge(type: AnyContentType, id: string, workspaceId: string, actor?: EventActor | null): Promise<void>;
|
|
253
|
+
/** Delete a set of entries: soft for paranoid types, hard otherwise. */
|
|
254
|
+
bulkRemove(type: AnyContentType, ids: string[], workspaceId: string, actor?: EventActor | null): Promise<BulkActionResult>;
|
|
255
|
+
/** Permanently delete a set of tombstoned entries (paranoid types only). */
|
|
256
|
+
bulkPurge(type: AnyContentType, ids: string[], workspaceId: string, actor?: EventActor | null): Promise<BulkActionResult>;
|
|
257
|
+
/**
|
|
258
|
+
* Restore a set of soft-deleted entries (paranoid types only). As with
|
|
259
|
+
* {@link restore}, a restored row colliding with a live sibling in its
|
|
260
|
+
* (locale group, locale) slot is a 409 — the whole batch rolls back
|
|
261
|
+
* (single statement), so the caller can retry without the conflicting id.
|
|
262
|
+
*/
|
|
263
|
+
bulkRestore(type: AnyContentType, ids: string[], workspaceId: string, actor?: EventActor | null): Promise<BulkActionResult>;
|
|
264
|
+
/**
|
|
265
|
+
* Run a write, translating a Postgres unique violation (23505) into a 409.
|
|
266
|
+
* Only i18n types carry a restore-relevant unique index — the partial
|
|
267
|
+
* `(locale_group_id, locale)` one — so the mapping is scoped to them and
|
|
268
|
+
* any other type's violation still surfaces as the bug it is.
|
|
269
|
+
*/
|
|
270
|
+
/**
|
|
271
|
+
* Run a delete and translate a Postgres **foreign-key** violation into a
|
|
272
|
+
* `409`.
|
|
273
|
+
*
|
|
274
|
+
* A required single relation declares `onDelete: 'restrict'` (a NOT NULL FK
|
|
275
|
+
* cannot be nulled on delete), so deleting a row something still points at
|
|
276
|
+
* is refused by the database. That refusal is legitimate and actionable —
|
|
277
|
+
* "detach the referring records first" — but it surfaced as a raw `500`,
|
|
278
|
+
* which tells the caller the server broke and gives them nothing to do. The
|
|
279
|
+
* symmetric counterpart of {@link uniqueGuarded}.
|
|
280
|
+
*
|
|
281
|
+
* Deliberately does not name the referring rows: finding them means a query
|
|
282
|
+
* per inbound relation across every type in the registry, and the caller
|
|
283
|
+
* cannot be told about records in workspaces they cannot see.
|
|
284
|
+
*/
|
|
285
|
+
private restrictGuarded;
|
|
286
|
+
private uniqueGuarded;
|
|
287
|
+
/** The type's generated table seen as a column bag (envelope + fields). */
|
|
288
|
+
private columns;
|
|
289
|
+
/**
|
|
290
|
+
* `workspace_id = :workspaceId` — the ownership predicate every read and
|
|
291
|
+
* write AND-s in, so a request scoped to one workspace can neither see nor
|
|
292
|
+
* mutate another's rows.
|
|
293
|
+
*/
|
|
294
|
+
private scope;
|
|
295
|
+
/**
|
|
296
|
+
* `id = :id` AND the workspace scope AND (for paranoid types)
|
|
297
|
+
* `deleted_at IS NULL`.
|
|
298
|
+
*/
|
|
299
|
+
private liveWhere;
|
|
300
|
+
/**
|
|
301
|
+
* Fetch one live row by id in the workspace, or undefined. Public + executor
|
|
302
|
+
* parameterized so the publish-lifecycle use-cases can read it under the
|
|
303
|
+
* active unit of work; internal callers use the default (base connection).
|
|
304
|
+
*/
|
|
305
|
+
findLive(type: AnyContentType, id: string, workspaceId: string, exec?: Database | DbTransaction): Promise<Row | undefined>;
|
|
306
|
+
/**
|
|
307
|
+
* Fetch the workspace's live rows for a set of ids, keyed by id — the
|
|
308
|
+
* bulk-publish **dry run** (no `FOR UPDATE`; the committed path uses
|
|
309
|
+
* {@link loadLiveByIdsForUpdate}).
|
|
310
|
+
*/
|
|
311
|
+
loadLiveByIds(type: AnyContentType, ids: string[], workspaceId: string, exec?: Database | DbTransaction): Promise<Map<string, Row>>;
|
|
312
|
+
/**
|
|
313
|
+
* Verify every referenced relation target exists **in the same workspace** —
|
|
314
|
+
* single FKs, many-to-many links, and the inverse (back-reference) side of a
|
|
315
|
+
* two-way relation. Neither the FK column nor the join table has a workspace
|
|
316
|
+
* constraint of its own (the target table is workspace-scoped only at the app
|
|
317
|
+
* layer), so without this a caller could reference — or probe the existence
|
|
318
|
+
* of — an entry in another workspace. Batched one existence query per
|
|
319
|
+
* referenced target type; a missing or cross-workspace target surfaces as a
|
|
320
|
+
* uniform 422 validation issue (indistinguishable from a plain "invalid id",
|
|
321
|
+
* so no not-found-vs-forbidden enumeration signal). Runs on every
|
|
322
|
+
* create/update, draft or not, because links are written eagerly either way.
|
|
323
|
+
* An inverse-of-single (one-to-many) field owns no writable link from this
|
|
324
|
+
* side, so it's skipped.
|
|
325
|
+
*/
|
|
326
|
+
/**
|
|
327
|
+
* Reject a `unique: true` single relation whose target is already claimed
|
|
328
|
+
* — by a **different record**, in the locale being written.
|
|
329
|
+
*
|
|
330
|
+
* The database settles this too (a column-wide UNIQUE on a plain type, a
|
|
331
|
+
* per-locale `(<field>_id, locale)` index on a localized one), and it has to
|
|
332
|
+
* stay there: it is the only thing that holds under concurrency. This check
|
|
333
|
+
* exists for the message, not the guarantee. A raw 23505 surfaces as a 500
|
|
334
|
+
* with a constraint name in it; the caller needs to know *which field* is
|
|
335
|
+
* taken, in the same `{ field, message }` shape as every other entry
|
|
336
|
+
* validation error.
|
|
337
|
+
*
|
|
338
|
+
* "Different record" is the whole subtlety on a localized type. The English
|
|
339
|
+
* and German rows of one article are two rows and one record, and a relation
|
|
340
|
+
* synced across the group deliberately puts the same id in both — so this
|
|
341
|
+
* compares translation **groups**, not row ids. Excluding only `entryId`
|
|
342
|
+
* would make the second locale of a record look like a rival claimant to the
|
|
343
|
+
* target the record already owns.
|
|
344
|
+
*/
|
|
345
|
+
private assertUniqueRelations;
|
|
346
|
+
private assertRelationTargets;
|
|
347
|
+
/**
|
|
348
|
+
* Validate every media field's asset ids: each must reference an asset that
|
|
349
|
+
* **exists in the same workspace** and whose kind/MIME satisfies the field's
|
|
350
|
+
* `accept` restriction. Mirrors {@link assertRelationTargets} — asset ids are
|
|
351
|
+
* plain uuids with no FK (the assets live in the media plugin's schema), so
|
|
352
|
+
* without this a caller could reference — or probe — an asset in another
|
|
353
|
+
* workspace, or attach a disallowed file type. Batched: one resolver lookup
|
|
354
|
+
* across every media id on the entry.
|
|
355
|
+
*
|
|
356
|
+
* A **missing** asset and a **cross-workspace** one both read as the same
|
|
357
|
+
* uniform 422 (the resolver simply omits them from its map — no
|
|
358
|
+
* not-found-vs-forbidden enumeration signal). When no resolver is bound (the
|
|
359
|
+
* media plugin isn't registered) this is a no-op: media fields shape-validate
|
|
360
|
+
* and store their ids, but existence/restriction aren't enforced.
|
|
361
|
+
*/
|
|
362
|
+
private assertMediaTargets;
|
|
363
|
+
/**
|
|
364
|
+
* Enforce required **link-managed** relations (an owning many-to-many, or the
|
|
365
|
+
* inverse of one) against the entry's actual link set — the check
|
|
366
|
+
* {@link EntryValidationService} can't make, because those links never travel
|
|
367
|
+
* in the `values` bag it sees. A required such relation with zero links is a
|
|
368
|
+
* 422 `is required`, matching how a required scalar field reads. A single FK
|
|
369
|
+
* relation is validated in `values` already; an inverse-of-single owns no
|
|
370
|
+
* writable link from this side, so it's skipped (it can't be satisfied here).
|
|
371
|
+
* `exec` is the write transaction on create/update (so it counts the
|
|
372
|
+
* just-written, uncommitted rows) or the root client on publish (committed).
|
|
373
|
+
*/
|
|
374
|
+
private assertRequiredRelations;
|
|
375
|
+
/**
|
|
376
|
+
* The `is required` issues for required **link-managed** relations (an owning
|
|
377
|
+
* many-to-many, or the inverse of one) whose link set is empty — the check
|
|
378
|
+
* {@link EntryValidationService} can't make, since those links never travel
|
|
379
|
+
* in the `values` bag. Returns the issues rather than throwing, so the
|
|
380
|
+
* publish use-case can fold them into the `Entry` domain publish gate. `exec`
|
|
381
|
+
* is the write transaction (counting just-written rows) on create/update, or
|
|
382
|
+
* the unit-of-work transaction on publish.
|
|
383
|
+
*/
|
|
384
|
+
requiredRelationIssues(exec: Database | DbTransaction, type: AnyContentType, row: Row, workspaceId: string): Promise<ValidationIssue[]>;
|
|
385
|
+
/** Throw 422 with the issue list when the values fail validation. */
|
|
386
|
+
private assertValid;
|
|
387
|
+
/** Reject restore/purge on a type without soft delete. */
|
|
388
|
+
private assertParanoid;
|
|
389
|
+
private notFound;
|
|
390
|
+
}
|
|
391
|
+
export {};
|
|
392
|
+
//# sourceMappingURL=entry-writer.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entry-writer.service.d.ts","sourceRoot":"","sources":["../../../../../src/lib/entries/infrastructure/persistence/entry-writer.service.ts"],"names":[],"mappings":"AAoBA,OAAO,EAGH,YAAY,EACZ,UAAU,EACV,KAAK,QAAQ,EAEb,KAAK,UAAU,EAClB,MAAM,oBAAoB,CAAC;AAO5B,OAAO,EAEH,KAAK,qBAAqB,EAC7B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAEH,KAAK,kBAAkB,EAC1B,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAGlE,OAAO,EACH,sBAAsB,EACtB,KAAK,eAAe,EACvB,MAAM,uDAAuD,CAAC;AAC/D,OAAO,KAAK,EACR,WAAW,EACX,aAAa,EACb,iBAAiB,EACpB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAGjE,OAAO,EAEH,mBAAmB,EACnB,KAAK,aAAa,EACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEH,KAAK,aAAa,EACrB,MAAM,qDAAqD,CAAC;AAW7D,oFAAoF;AACpF,KAAK,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAenC;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBACa,kBAAkB;IAEL,OAAO,CAAC,QAAQ,CAAC,EAAE;IAIrC,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,SAAS;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