@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,174 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DrizzleRevisionStore = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
const drizzle_orm_1 = require("drizzle-orm");
|
|
7
|
+
const database_1 = require("@orthacms/database");
|
|
8
|
+
const revision_status_1 = require("../../domain/revision-status");
|
|
9
|
+
const revision_table_1 = require("./revision-table");
|
|
10
|
+
/**
|
|
11
|
+
* A private advisory-lock class namespacing the per-entry revision-append locks,
|
|
12
|
+
* so their hashed keys can't collide with any other advisory lock the app takes
|
|
13
|
+
* (identity's per-workspace lock, the relation-append locks). Arbitrary but fixed.
|
|
14
|
+
*/
|
|
15
|
+
const REVISION_APPEND_LOCK_CLASS = 0x5245; // 'RE'
|
|
16
|
+
/**
|
|
17
|
+
* The Drizzle-backed {@link RevisionStore}. Writes are executor-parameterized so
|
|
18
|
+
* a snapshot commits atomically with the save it records (via the
|
|
19
|
+
* `EntryWriterService` transaction); reads run on the base connection.
|
|
20
|
+
*/
|
|
21
|
+
let DrizzleRevisionStore = class DrizzleRevisionStore {
|
|
22
|
+
db;
|
|
23
|
+
constructor(db) {
|
|
24
|
+
this.db = db;
|
|
25
|
+
}
|
|
26
|
+
async lockEntry(exec, entryId) {
|
|
27
|
+
await exec.execute((0, drizzle_orm_1.sql) `select pg_advisory_xact_lock(${REVISION_APPEND_LOCK_CLASS}, hashtext(${entryId}))`);
|
|
28
|
+
}
|
|
29
|
+
async nextNumber(exec, entryId) {
|
|
30
|
+
const [row] = await exec
|
|
31
|
+
.select({ max: (0, drizzle_orm_1.max)(revision_table_1.contentEntryRevisions.revisionNumber) })
|
|
32
|
+
.from(revision_table_1.contentEntryRevisions)
|
|
33
|
+
.where((0, drizzle_orm_1.eq)(revision_table_1.contentEntryRevisions.entryId, entryId));
|
|
34
|
+
const current = row?.max;
|
|
35
|
+
return current == null ? 1 : Number(current) + 1;
|
|
36
|
+
}
|
|
37
|
+
async append(exec, revision) {
|
|
38
|
+
const record = revision.toPersistence();
|
|
39
|
+
const [inserted] = await exec
|
|
40
|
+
.insert(revision_table_1.contentEntryRevisions)
|
|
41
|
+
.values({
|
|
42
|
+
contentType: record.contentType,
|
|
43
|
+
entryId: record.entryId,
|
|
44
|
+
workspaceId: record.workspaceId,
|
|
45
|
+
localeGroupId: record.localeGroupId,
|
|
46
|
+
locale: record.locale,
|
|
47
|
+
revisionNumber: record.revisionNumber,
|
|
48
|
+
status: record.status,
|
|
49
|
+
snapshot: record.snapshot,
|
|
50
|
+
createdBy: record.createdBy
|
|
51
|
+
})
|
|
52
|
+
.returning();
|
|
53
|
+
// A freshly appended draft is by construction the newest revision; it is
|
|
54
|
+
// never the published one (publish is a separate transition).
|
|
55
|
+
return this.toSummary(inserted, {
|
|
56
|
+
latestNumber: record.revisionNumber
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
async markPublished(exec, entryId, workspaceId, revisionNumber) {
|
|
60
|
+
const scope = (0, drizzle_orm_1.and)((0, drizzle_orm_1.eq)(revision_table_1.contentEntryRevisions.entryId, entryId), (0, drizzle_orm_1.eq)(revision_table_1.contentEntryRevisions.workspaceId, workspaceId));
|
|
61
|
+
let target = revisionNumber;
|
|
62
|
+
if (target == null) {
|
|
63
|
+
const [row] = await exec
|
|
64
|
+
.select({ max: (0, drizzle_orm_1.max)(revision_table_1.contentEntryRevisions.revisionNumber) })
|
|
65
|
+
.from(revision_table_1.contentEntryRevisions)
|
|
66
|
+
.where(scope);
|
|
67
|
+
target = row?.max == null ? 0 : Number(row.max);
|
|
68
|
+
}
|
|
69
|
+
if (target === 0)
|
|
70
|
+
return;
|
|
71
|
+
// Demote a previously-published version (there's at most one, and it
|
|
72
|
+
// isn't the one we're about to promote) so the timeline keeps a
|
|
73
|
+
// single live row. Its `published_at` is left as the historical record
|
|
74
|
+
// of when it was live.
|
|
75
|
+
await exec
|
|
76
|
+
.update(revision_table_1.contentEntryRevisions)
|
|
77
|
+
.set({ status: revision_status_1.REVISION_STATUS.Superseded })
|
|
78
|
+
.where((0, drizzle_orm_1.and)(scope, (0, drizzle_orm_1.eq)(revision_table_1.contentEntryRevisions.status, revision_status_1.REVISION_STATUS.Published), (0, drizzle_orm_1.ne)(revision_table_1.contentEntryRevisions.revisionNumber, target)));
|
|
79
|
+
// Promote the target version — its snapshot is exactly the live row that
|
|
80
|
+
// was just published (the latest after a save, or the earlier version
|
|
81
|
+
// whose content the publish just re-applied). Re-stamps on an idempotent
|
|
82
|
+
// re-publish, mirroring the entry row's `markPublished`.
|
|
83
|
+
await exec
|
|
84
|
+
.update(revision_table_1.contentEntryRevisions)
|
|
85
|
+
.set({
|
|
86
|
+
status: revision_status_1.REVISION_STATUS.Published,
|
|
87
|
+
publishedAt: new Date()
|
|
88
|
+
})
|
|
89
|
+
.where((0, drizzle_orm_1.and)(scope, (0, drizzle_orm_1.eq)(revision_table_1.contentEntryRevisions.revisionNumber, target)));
|
|
90
|
+
}
|
|
91
|
+
async markUnpublished(exec, entryId, workspaceId) {
|
|
92
|
+
await exec
|
|
93
|
+
.update(revision_table_1.contentEntryRevisions)
|
|
94
|
+
.set({ status: revision_status_1.REVISION_STATUS.Draft, publishedAt: null })
|
|
95
|
+
.where((0, drizzle_orm_1.and)((0, drizzle_orm_1.eq)(revision_table_1.contentEntryRevisions.entryId, entryId), (0, drizzle_orm_1.eq)(revision_table_1.contentEntryRevisions.workspaceId, workspaceId), (0, drizzle_orm_1.eq)(revision_table_1.contentEntryRevisions.status, revision_status_1.REVISION_STATUS.Published)));
|
|
96
|
+
}
|
|
97
|
+
async list(contentType, entryId, workspaceId, page, pageSize) {
|
|
98
|
+
const where = this.scope(contentType, entryId, workspaceId);
|
|
99
|
+
const offset = (page - 1) * pageSize;
|
|
100
|
+
const [rows, [{ total }], latestNumber] = await Promise.all([
|
|
101
|
+
this.db
|
|
102
|
+
.select()
|
|
103
|
+
.from(revision_table_1.contentEntryRevisions)
|
|
104
|
+
.where(where)
|
|
105
|
+
.orderBy((0, drizzle_orm_1.desc)(revision_table_1.contentEntryRevisions.revisionNumber))
|
|
106
|
+
.limit(pageSize)
|
|
107
|
+
.offset(offset),
|
|
108
|
+
this.db.select({ total: (0, drizzle_orm_1.count)() }).from(revision_table_1.contentEntryRevisions).where(where),
|
|
109
|
+
this.latestNumber(contentType, entryId, workspaceId)
|
|
110
|
+
]);
|
|
111
|
+
return {
|
|
112
|
+
items: rows.map((row) => this.toSummary(row, { latestNumber })),
|
|
113
|
+
total: Number(total)
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
async get(contentType, entryId, workspaceId, number) {
|
|
117
|
+
const [row, latestNumber] = await Promise.all([
|
|
118
|
+
this.db
|
|
119
|
+
.select()
|
|
120
|
+
.from(revision_table_1.contentEntryRevisions)
|
|
121
|
+
.where((0, drizzle_orm_1.and)(this.scope(contentType, entryId, workspaceId), (0, drizzle_orm_1.eq)(revision_table_1.contentEntryRevisions.revisionNumber, number)))
|
|
122
|
+
.limit(1)
|
|
123
|
+
.then((r) => r[0]),
|
|
124
|
+
this.latestNumber(contentType, entryId, workspaceId)
|
|
125
|
+
]);
|
|
126
|
+
if (!row)
|
|
127
|
+
return undefined;
|
|
128
|
+
return {
|
|
129
|
+
...this.toSummary(row, { latestNumber }),
|
|
130
|
+
snapshot: row.snapshot
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
/** The highest version number for an entry, or 0 if it has no revisions. */
|
|
134
|
+
async latestNumber(contentType, entryId, workspaceId) {
|
|
135
|
+
const [row] = await this.db
|
|
136
|
+
.select({ max: (0, drizzle_orm_1.max)(revision_table_1.contentEntryRevisions.revisionNumber) })
|
|
137
|
+
.from(revision_table_1.contentEntryRevisions)
|
|
138
|
+
.where(this.scope(contentType, entryId, workspaceId));
|
|
139
|
+
return row?.max == null ? 0 : Number(row.max);
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* The read scope every timeline query shares: one entry, in one workspace,
|
|
143
|
+
* **of one content type**. All types share `content_entry_revisions`, and
|
|
144
|
+
* the routes address an entry as `:typeName/:id` — so leaving the type out
|
|
145
|
+
* means the `:typeName` in the URL is never checked against the revision it
|
|
146
|
+
* returns, and any registered type name serves any entry's history.
|
|
147
|
+
*/
|
|
148
|
+
scope(contentType, entryId, workspaceId) {
|
|
149
|
+
return (0, drizzle_orm_1.and)((0, drizzle_orm_1.eq)(revision_table_1.contentEntryRevisions.contentType, contentType), (0, drizzle_orm_1.eq)(revision_table_1.contentEntryRevisions.entryId, entryId), (0, drizzle_orm_1.eq)(revision_table_1.contentEntryRevisions.workspaceId, workspaceId));
|
|
150
|
+
}
|
|
151
|
+
/** Map a row to the metadata view, deriving the `isLatest`/`isPublished` flags. */
|
|
152
|
+
toSummary(row, ctx) {
|
|
153
|
+
const status = row.status;
|
|
154
|
+
const summary = {
|
|
155
|
+
id: row.id,
|
|
156
|
+
number: row.revisionNumber,
|
|
157
|
+
status,
|
|
158
|
+
isPublished: status === revision_status_1.REVISION_STATUS.Published,
|
|
159
|
+
isLatest: row.revisionNumber === ctx.latestNumber,
|
|
160
|
+
createdAt: row.createdAt.toISOString()
|
|
161
|
+
};
|
|
162
|
+
if (row.publishedAt)
|
|
163
|
+
summary.publishedAt = row.publishedAt.toISOString();
|
|
164
|
+
if (row.createdBy)
|
|
165
|
+
summary.authorId = row.createdBy;
|
|
166
|
+
return summary;
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
exports.DrizzleRevisionStore = DrizzleRevisionStore;
|
|
170
|
+
exports.DrizzleRevisionStore = DrizzleRevisionStore = tslib_1.__decorate([
|
|
171
|
+
(0, common_1.Injectable)(),
|
|
172
|
+
tslib_1.__param(0, (0, database_1.InjectDatabase)()),
|
|
173
|
+
tslib_1.__metadata("design:paramtypes", [Object])
|
|
174
|
+
], DrizzleRevisionStore);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { AnyContentType } from '../../../types/content-type';
|
|
2
|
+
import type { RevisionSnapshot } from '../../types/revision-view';
|
|
3
|
+
/** A generated content row seen as a bag of values by property name. */
|
|
4
|
+
type Row = Record<string, unknown>;
|
|
5
|
+
/**
|
|
6
|
+
* Build the immutable snapshot for a just-saved entry: its field `values` (the
|
|
7
|
+
* same bag the reader serves and the editor submits — scalars, localized +
|
|
8
|
+
* shared fields, and single-relation FK ids) plus the ordered target-id list of
|
|
9
|
+
* each join-backed relation field (owning many-to-many and the inverse of one).
|
|
10
|
+
*
|
|
11
|
+
* `relations` is read separately from the join tables — those links never travel
|
|
12
|
+
* in the `values` bag — inside the save transaction, so the snapshot reflects
|
|
13
|
+
* exactly what committed.
|
|
14
|
+
*/
|
|
15
|
+
export declare function buildSnapshot(type: AnyContentType, row: Row, relations: Record<string, string[]>): RevisionSnapshot;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=revision-snapshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revision-snapshot.d.ts","sourceRoot":"","sources":["../../../../../src/lib/revisions/infrastructure/persistence/revision-snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAElE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAElE,wEAAwE;AACxE,KAAK,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEnC;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CACzB,IAAI,EAAE,cAAc,EACpB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GACpC,gBAAgB,CAKlB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildSnapshot = buildSnapshot;
|
|
4
|
+
const entry_row_1 = require("../../../entries/infrastructure/persistence/entry-row");
|
|
5
|
+
/**
|
|
6
|
+
* Build the immutable snapshot for a just-saved entry: its field `values` (the
|
|
7
|
+
* same bag the reader serves and the editor submits — scalars, localized +
|
|
8
|
+
* shared fields, and single-relation FK ids) plus the ordered target-id list of
|
|
9
|
+
* each join-backed relation field (owning many-to-many and the inverse of one).
|
|
10
|
+
*
|
|
11
|
+
* `relations` is read separately from the join tables — those links never travel
|
|
12
|
+
* in the `values` bag — inside the save transaction, so the snapshot reflects
|
|
13
|
+
* exactly what committed.
|
|
14
|
+
*/
|
|
15
|
+
function buildSnapshot(type, row, relations) {
|
|
16
|
+
return {
|
|
17
|
+
values: (0, entry_row_1.toRecord)(type, row).values,
|
|
18
|
+
relations
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The **generic** entry-revision store — one immutable snapshot per save, for
|
|
3
|
+
* every content type (mirroring the generic `EntryWriterService` engine, which
|
|
4
|
+
* backs every type with no per-aggregate table). A revision captures the whole
|
|
5
|
+
* document — scalar values, localized + shared fields, single-relation FKs, and
|
|
6
|
+
* the ordered many/inverse link sets — as a JSON `snapshot`, so a version can be
|
|
7
|
+
* reconstructed or restored independently of the live `content_<name>` row.
|
|
8
|
+
*
|
|
9
|
+
* Like every `content_<name>` table, this is **HOST-owned**: content-server
|
|
10
|
+
* emits no migrations. The table is defined here (and re-exported from the
|
|
11
|
+
* decorator-free `@orthacms/content-server/define` barrel) so the host's
|
|
12
|
+
* drizzle-kit schema entry can re-export it into the migration diff, while the
|
|
13
|
+
* persistence layer imports the same object directly. It is scoped to a
|
|
14
|
+
* workspace and keyed **per-locale** (`entry_id` is the live row, one per
|
|
15
|
+
* locale), so each translation carries its own version timeline.
|
|
16
|
+
*/
|
|
17
|
+
export declare const contentEntryRevisions: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
18
|
+
name: "content_entry_revisions";
|
|
19
|
+
schema: undefined;
|
|
20
|
+
columns: {
|
|
21
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
22
|
+
name: "id";
|
|
23
|
+
tableName: "content_entry_revisions";
|
|
24
|
+
dataType: "string";
|
|
25
|
+
columnType: "PgUUID";
|
|
26
|
+
data: string;
|
|
27
|
+
driverParam: string;
|
|
28
|
+
notNull: true;
|
|
29
|
+
hasDefault: true;
|
|
30
|
+
isPrimaryKey: true;
|
|
31
|
+
isAutoincrement: false;
|
|
32
|
+
hasRuntimeDefault: false;
|
|
33
|
+
enumValues: undefined;
|
|
34
|
+
baseColumn: never;
|
|
35
|
+
identity: undefined;
|
|
36
|
+
generated: undefined;
|
|
37
|
+
}, {}, {}>;
|
|
38
|
+
workspaceId: import("drizzle-orm/pg-core").PgColumn<{
|
|
39
|
+
name: "workspace_id";
|
|
40
|
+
tableName: "content_entry_revisions";
|
|
41
|
+
dataType: "string";
|
|
42
|
+
columnType: "PgUUID";
|
|
43
|
+
data: string;
|
|
44
|
+
driverParam: string;
|
|
45
|
+
notNull: true;
|
|
46
|
+
hasDefault: false;
|
|
47
|
+
isPrimaryKey: false;
|
|
48
|
+
isAutoincrement: false;
|
|
49
|
+
hasRuntimeDefault: false;
|
|
50
|
+
enumValues: undefined;
|
|
51
|
+
baseColumn: never;
|
|
52
|
+
identity: undefined;
|
|
53
|
+
generated: undefined;
|
|
54
|
+
}, {}, {}>;
|
|
55
|
+
contentType: import("drizzle-orm/pg-core").PgColumn<{
|
|
56
|
+
name: "content_type";
|
|
57
|
+
tableName: "content_entry_revisions";
|
|
58
|
+
dataType: "string";
|
|
59
|
+
columnType: "PgText";
|
|
60
|
+
data: string;
|
|
61
|
+
driverParam: string;
|
|
62
|
+
notNull: true;
|
|
63
|
+
hasDefault: false;
|
|
64
|
+
isPrimaryKey: false;
|
|
65
|
+
isAutoincrement: false;
|
|
66
|
+
hasRuntimeDefault: false;
|
|
67
|
+
enumValues: [string, ...string[]];
|
|
68
|
+
baseColumn: never;
|
|
69
|
+
identity: undefined;
|
|
70
|
+
generated: undefined;
|
|
71
|
+
}, {}, {}>;
|
|
72
|
+
entryId: import("drizzle-orm/pg-core").PgColumn<{
|
|
73
|
+
name: "entry_id";
|
|
74
|
+
tableName: "content_entry_revisions";
|
|
75
|
+
dataType: "string";
|
|
76
|
+
columnType: "PgUUID";
|
|
77
|
+
data: string;
|
|
78
|
+
driverParam: string;
|
|
79
|
+
notNull: true;
|
|
80
|
+
hasDefault: false;
|
|
81
|
+
isPrimaryKey: false;
|
|
82
|
+
isAutoincrement: false;
|
|
83
|
+
hasRuntimeDefault: false;
|
|
84
|
+
enumValues: undefined;
|
|
85
|
+
baseColumn: never;
|
|
86
|
+
identity: undefined;
|
|
87
|
+
generated: undefined;
|
|
88
|
+
}, {}, {}>;
|
|
89
|
+
localeGroupId: import("drizzle-orm/pg-core").PgColumn<{
|
|
90
|
+
name: "locale_group_id";
|
|
91
|
+
tableName: "content_entry_revisions";
|
|
92
|
+
dataType: "string";
|
|
93
|
+
columnType: "PgUUID";
|
|
94
|
+
data: string;
|
|
95
|
+
driverParam: string;
|
|
96
|
+
notNull: false;
|
|
97
|
+
hasDefault: false;
|
|
98
|
+
isPrimaryKey: false;
|
|
99
|
+
isAutoincrement: false;
|
|
100
|
+
hasRuntimeDefault: false;
|
|
101
|
+
enumValues: undefined;
|
|
102
|
+
baseColumn: never;
|
|
103
|
+
identity: undefined;
|
|
104
|
+
generated: undefined;
|
|
105
|
+
}, {}, {}>;
|
|
106
|
+
locale: import("drizzle-orm/pg-core").PgColumn<{
|
|
107
|
+
name: "locale";
|
|
108
|
+
tableName: "content_entry_revisions";
|
|
109
|
+
dataType: "string";
|
|
110
|
+
columnType: "PgText";
|
|
111
|
+
data: string;
|
|
112
|
+
driverParam: string;
|
|
113
|
+
notNull: false;
|
|
114
|
+
hasDefault: false;
|
|
115
|
+
isPrimaryKey: false;
|
|
116
|
+
isAutoincrement: false;
|
|
117
|
+
hasRuntimeDefault: false;
|
|
118
|
+
enumValues: [string, ...string[]];
|
|
119
|
+
baseColumn: never;
|
|
120
|
+
identity: undefined;
|
|
121
|
+
generated: undefined;
|
|
122
|
+
}, {}, {}>;
|
|
123
|
+
revisionNumber: import("drizzle-orm/pg-core").PgColumn<{
|
|
124
|
+
name: "revision_number";
|
|
125
|
+
tableName: "content_entry_revisions";
|
|
126
|
+
dataType: "number";
|
|
127
|
+
columnType: "PgInteger";
|
|
128
|
+
data: number;
|
|
129
|
+
driverParam: string | number;
|
|
130
|
+
notNull: true;
|
|
131
|
+
hasDefault: false;
|
|
132
|
+
isPrimaryKey: false;
|
|
133
|
+
isAutoincrement: false;
|
|
134
|
+
hasRuntimeDefault: false;
|
|
135
|
+
enumValues: undefined;
|
|
136
|
+
baseColumn: never;
|
|
137
|
+
identity: undefined;
|
|
138
|
+
generated: undefined;
|
|
139
|
+
}, {}, {}>;
|
|
140
|
+
status: import("drizzle-orm/pg-core").PgColumn<{
|
|
141
|
+
name: "status";
|
|
142
|
+
tableName: "content_entry_revisions";
|
|
143
|
+
dataType: "string";
|
|
144
|
+
columnType: "PgText";
|
|
145
|
+
data: string;
|
|
146
|
+
driverParam: string;
|
|
147
|
+
notNull: true;
|
|
148
|
+
hasDefault: false;
|
|
149
|
+
isPrimaryKey: false;
|
|
150
|
+
isAutoincrement: false;
|
|
151
|
+
hasRuntimeDefault: false;
|
|
152
|
+
enumValues: [string, ...string[]];
|
|
153
|
+
baseColumn: never;
|
|
154
|
+
identity: undefined;
|
|
155
|
+
generated: undefined;
|
|
156
|
+
}, {}, {}>;
|
|
157
|
+
snapshot: import("drizzle-orm/pg-core").PgColumn<{
|
|
158
|
+
name: "snapshot";
|
|
159
|
+
tableName: "content_entry_revisions";
|
|
160
|
+
dataType: "json";
|
|
161
|
+
columnType: "PgJsonb";
|
|
162
|
+
data: unknown;
|
|
163
|
+
driverParam: unknown;
|
|
164
|
+
notNull: true;
|
|
165
|
+
hasDefault: false;
|
|
166
|
+
isPrimaryKey: false;
|
|
167
|
+
isAutoincrement: false;
|
|
168
|
+
hasRuntimeDefault: false;
|
|
169
|
+
enumValues: undefined;
|
|
170
|
+
baseColumn: never;
|
|
171
|
+
identity: undefined;
|
|
172
|
+
generated: undefined;
|
|
173
|
+
}, {}, {}>;
|
|
174
|
+
createdBy: import("drizzle-orm/pg-core").PgColumn<{
|
|
175
|
+
name: "created_by";
|
|
176
|
+
tableName: "content_entry_revisions";
|
|
177
|
+
dataType: "string";
|
|
178
|
+
columnType: "PgUUID";
|
|
179
|
+
data: string;
|
|
180
|
+
driverParam: string;
|
|
181
|
+
notNull: false;
|
|
182
|
+
hasDefault: false;
|
|
183
|
+
isPrimaryKey: false;
|
|
184
|
+
isAutoincrement: false;
|
|
185
|
+
hasRuntimeDefault: false;
|
|
186
|
+
enumValues: undefined;
|
|
187
|
+
baseColumn: never;
|
|
188
|
+
identity: undefined;
|
|
189
|
+
generated: undefined;
|
|
190
|
+
}, {}, {}>;
|
|
191
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
192
|
+
name: "created_at";
|
|
193
|
+
tableName: "content_entry_revisions";
|
|
194
|
+
dataType: "date";
|
|
195
|
+
columnType: "PgTimestamp";
|
|
196
|
+
data: Date;
|
|
197
|
+
driverParam: string;
|
|
198
|
+
notNull: true;
|
|
199
|
+
hasDefault: true;
|
|
200
|
+
isPrimaryKey: false;
|
|
201
|
+
isAutoincrement: false;
|
|
202
|
+
hasRuntimeDefault: false;
|
|
203
|
+
enumValues: undefined;
|
|
204
|
+
baseColumn: never;
|
|
205
|
+
identity: undefined;
|
|
206
|
+
generated: undefined;
|
|
207
|
+
}, {}, {}>;
|
|
208
|
+
publishedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
209
|
+
name: "published_at";
|
|
210
|
+
tableName: "content_entry_revisions";
|
|
211
|
+
dataType: "date";
|
|
212
|
+
columnType: "PgTimestamp";
|
|
213
|
+
data: Date;
|
|
214
|
+
driverParam: string;
|
|
215
|
+
notNull: false;
|
|
216
|
+
hasDefault: false;
|
|
217
|
+
isPrimaryKey: false;
|
|
218
|
+
isAutoincrement: false;
|
|
219
|
+
hasRuntimeDefault: false;
|
|
220
|
+
enumValues: undefined;
|
|
221
|
+
baseColumn: never;
|
|
222
|
+
identity: undefined;
|
|
223
|
+
generated: undefined;
|
|
224
|
+
}, {}, {}>;
|
|
225
|
+
};
|
|
226
|
+
dialect: "pg";
|
|
227
|
+
}>;
|
|
228
|
+
//# sourceMappingURL=revision-table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revision-table.d.ts","sourceRoot":"","sources":["../../../../../src/lib/revisions/infrastructure/persistence/revision-table.ts"],"names":[],"mappings":"AAWA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiDjC,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.contentEntryRevisions = void 0;
|
|
4
|
+
const pg_core_1 = require("drizzle-orm/pg-core");
|
|
5
|
+
/**
|
|
6
|
+
* The **generic** entry-revision store — one immutable snapshot per save, for
|
|
7
|
+
* every content type (mirroring the generic `EntryWriterService` engine, which
|
|
8
|
+
* backs every type with no per-aggregate table). A revision captures the whole
|
|
9
|
+
* document — scalar values, localized + shared fields, single-relation FKs, and
|
|
10
|
+
* the ordered many/inverse link sets — as a JSON `snapshot`, so a version can be
|
|
11
|
+
* reconstructed or restored independently of the live `content_<name>` row.
|
|
12
|
+
*
|
|
13
|
+
* Like every `content_<name>` table, this is **HOST-owned**: content-server
|
|
14
|
+
* emits no migrations. The table is defined here (and re-exported from the
|
|
15
|
+
* decorator-free `@orthacms/content-server/define` barrel) so the host's
|
|
16
|
+
* drizzle-kit schema entry can re-export it into the migration diff, while the
|
|
17
|
+
* persistence layer imports the same object directly. It is scoped to a
|
|
18
|
+
* workspace and keyed **per-locale** (`entry_id` is the live row, one per
|
|
19
|
+
* locale), so each translation carries its own version timeline.
|
|
20
|
+
*/
|
|
21
|
+
exports.contentEntryRevisions = (0, pg_core_1.pgTable)('content_entry_revisions', {
|
|
22
|
+
/** Revision id. */
|
|
23
|
+
id: (0, pg_core_1.uuid)('id').primaryKey().defaultRandom(),
|
|
24
|
+
/** Owning workspace — every read/write AND-s it in. */
|
|
25
|
+
workspaceId: (0, pg_core_1.uuid)('workspace_id').notNull(),
|
|
26
|
+
/** The registry content-type machine name (`article`, `home_page`…). */
|
|
27
|
+
contentType: (0, pg_core_1.text)('content_type').notNull(),
|
|
28
|
+
/** The live `content_<name>` row this revision belongs to (per-locale). */
|
|
29
|
+
entryId: (0, pg_core_1.uuid)('entry_id').notNull(),
|
|
30
|
+
/** The row's translation-group id — null on non-i18n types. */
|
|
31
|
+
localeGroupId: (0, pg_core_1.uuid)('locale_group_id'),
|
|
32
|
+
/** The row's locale — null on non-i18n types. */
|
|
33
|
+
locale: (0, pg_core_1.text)('locale'),
|
|
34
|
+
/** Monotonic version number within one `entry_id` (1-based). */
|
|
35
|
+
revisionNumber: (0, pg_core_1.integer)('revision_number').notNull(),
|
|
36
|
+
/** `draft` · `published` · `superseded`. */
|
|
37
|
+
status: (0, pg_core_1.text)('status').notNull(),
|
|
38
|
+
/** The full document snapshot — `{ values, relations }`. */
|
|
39
|
+
snapshot: (0, pg_core_1.jsonb)('snapshot').notNull(),
|
|
40
|
+
/** The acting user's id (identity), or null when unknown. */
|
|
41
|
+
createdBy: (0, pg_core_1.uuid)('created_by'),
|
|
42
|
+
/** When the version was captured. */
|
|
43
|
+
createdAt: (0, pg_core_1.timestamp)('created_at', { withTimezone: true })
|
|
44
|
+
.notNull()
|
|
45
|
+
.defaultNow(),
|
|
46
|
+
/** When this revision was published; null until then. */
|
|
47
|
+
publishedAt: (0, pg_core_1.timestamp)('published_at', { withTimezone: true })
|
|
48
|
+
}, (table) => [
|
|
49
|
+
// One number per entry — the store allocates `max + 1` under the
|
|
50
|
+
// entry's advisory lock, and this backstops a concurrent double-insert
|
|
51
|
+
// with a 23505 rather than a silent duplicate version.
|
|
52
|
+
(0, pg_core_1.unique)('content_entry_revisions_entry_number_uq').on(table.entryId, table.revisionNumber),
|
|
53
|
+
// The timeline read: newest-first for one entry.
|
|
54
|
+
(0, pg_core_1.index)('content_entry_revisions_entry_idx').on(table.entryId, table.revisionNumber),
|
|
55
|
+
// Workspace-scoped browsing across a type.
|
|
56
|
+
(0, pg_core_1.index)('content_entry_revisions_workspace_idx').on(table.workspaceId, table.contentType)
|
|
57
|
+
]);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { AnyContentType } from '../../../types/content-type';
|
|
2
|
+
import { RelationLinkService } from '../../../entries/infrastructure/persistence/relation-link.service';
|
|
3
|
+
import { MediaRefsQuery } from '../../../entries/infrastructure/queries/media-refs.query';
|
|
4
|
+
import type { RevisionDetail } from '../../types/revision-view';
|
|
5
|
+
/**
|
|
6
|
+
* Enriches a {@link RevisionDetail} with its relation fields resolved to display
|
|
7
|
+
* refs — the "exact list of linked records" the preview shows instead of raw
|
|
8
|
+
* uuids. A single (owning) relation resolves its FK id from `snapshot.values`; a
|
|
9
|
+
* join-backed relation (owning many-to-many, or an inverse) resolves its ordered
|
|
10
|
+
* id list from `snapshot.relations`. Each field is capped at
|
|
11
|
+
* {@link PREVIEW_RELATION_REF_CAP}; the true count rides in `relationTotals` so
|
|
12
|
+
* the UI can show a "+N more". Reuses {@link RelationLinkService.resolveRefs}, so
|
|
13
|
+
* a soft-deleted / cross-workspace target reads as a `missing` ref exactly as it
|
|
14
|
+
* does on the live relations read (no title leak, no enumeration signal).
|
|
15
|
+
*/
|
|
16
|
+
export declare class RevisionRefsQuery {
|
|
17
|
+
private readonly relations;
|
|
18
|
+
private readonly media;
|
|
19
|
+
constructor(relations: RelationLinkService, media: MediaRefsQuery);
|
|
20
|
+
enrich(type: AnyContentType, detail: RevisionDetail, workspaceId: string): Promise<RevisionDetail>;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=revision-refs.query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revision-refs.query.d.ts","sourceRoot":"","sources":["../../../../../src/lib/revisions/infrastructure/queries/revision-refs.query.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAElE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mEAAmE,CAAC;AACxG,OAAO,EAAE,cAAc,EAAE,MAAM,0DAA0D,CAAC;AAE1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAGhE;;;;;;;;;;GAUG;AACH,qBACa,iBAAiB;IAEtB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAG1B,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAHL,SAAS,EAAE,mBAAmB,EAG9B,KAAK,EAAE,cAAc;IAGpC,MAAM,CACR,IAAI,EAAE,cAAc,EACpB,MAAM,EAAE,cAAc,EACtB,WAAW,EAAE,MAAM,GACpB,OAAO,CAAC,cAAc,CAAC;CAqC7B"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RevisionRefsQuery = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
const fields_1 = require("../../../types/fields");
|
|
7
|
+
const relation_link_service_1 = require("../../../entries/infrastructure/persistence/relation-link.service");
|
|
8
|
+
const media_refs_query_1 = require("../../../entries/infrastructure/queries/media-refs.query");
|
|
9
|
+
const revisions_constants_1 = require("../../revisions.constants");
|
|
10
|
+
/**
|
|
11
|
+
* Enriches a {@link RevisionDetail} with its relation fields resolved to display
|
|
12
|
+
* refs — the "exact list of linked records" the preview shows instead of raw
|
|
13
|
+
* uuids. A single (owning) relation resolves its FK id from `snapshot.values`; a
|
|
14
|
+
* join-backed relation (owning many-to-many, or an inverse) resolves its ordered
|
|
15
|
+
* id list from `snapshot.relations`. Each field is capped at
|
|
16
|
+
* {@link PREVIEW_RELATION_REF_CAP}; the true count rides in `relationTotals` so
|
|
17
|
+
* the UI can show a "+N more". Reuses {@link RelationLinkService.resolveRefs}, so
|
|
18
|
+
* a soft-deleted / cross-workspace target reads as a `missing` ref exactly as it
|
|
19
|
+
* does on the live relations read (no title leak, no enumeration signal).
|
|
20
|
+
*/
|
|
21
|
+
let RevisionRefsQuery = class RevisionRefsQuery {
|
|
22
|
+
relations;
|
|
23
|
+
media;
|
|
24
|
+
constructor(relations,
|
|
25
|
+
// Resolves a snapshot's media ids to display refs (thumbnails); no-ops
|
|
26
|
+
// when the media plugin isn't registered.
|
|
27
|
+
media) {
|
|
28
|
+
this.relations = relations;
|
|
29
|
+
this.media = media;
|
|
30
|
+
}
|
|
31
|
+
async enrich(type, detail, workspaceId) {
|
|
32
|
+
const relationRefs = {};
|
|
33
|
+
const relationTotals = {};
|
|
34
|
+
for (const [name, spec] of Object.entries(type.fields)) {
|
|
35
|
+
if (spec.type !== fields_1.CONTENT_FIELD_TYPE.Relation || !spec.relation) {
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
const relation = spec.relation;
|
|
39
|
+
const joinBacked = !!relation.many || !!relation.inverse;
|
|
40
|
+
const ids = joinBacked
|
|
41
|
+
? (detail.snapshot.relations[name] ?? [])
|
|
42
|
+
: singleFkIds(detail.snapshot.values[name]);
|
|
43
|
+
if (!ids.length)
|
|
44
|
+
continue;
|
|
45
|
+
relationTotals[name] = ids.length;
|
|
46
|
+
relationRefs[name] = await this.relations.resolveRefs(relation.to(), ids, workspaceId, revisions_constants_1.PREVIEW_RELATION_REF_CAP);
|
|
47
|
+
}
|
|
48
|
+
const mediaRefs = await this.media.forValues(type, detail.snapshot.values, workspaceId);
|
|
49
|
+
return {
|
|
50
|
+
...detail,
|
|
51
|
+
relationRefs,
|
|
52
|
+
relationTotals,
|
|
53
|
+
...(Object.keys(mediaRefs).length ? { mediaRefs } : {})
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
exports.RevisionRefsQuery = RevisionRefsQuery;
|
|
58
|
+
exports.RevisionRefsQuery = RevisionRefsQuery = tslib_1.__decorate([
|
|
59
|
+
(0, common_1.Injectable)(),
|
|
60
|
+
tslib_1.__metadata("design:paramtypes", [relation_link_service_1.RelationLinkService,
|
|
61
|
+
media_refs_query_1.MediaRefsQuery])
|
|
62
|
+
], RevisionRefsQuery);
|
|
63
|
+
/** A single-relation FK value → a 0/1-length id list. */
|
|
64
|
+
function singleFkIds(value) {
|
|
65
|
+
return typeof value === 'string' && value ? [value] : [];
|
|
66
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Default page size for the entry revision timeline. */
|
|
2
|
+
export declare const REVISIONS_PAGE_SIZE = 20;
|
|
3
|
+
/**
|
|
4
|
+
* How many linked records the preview resolves to titles **per relation field**.
|
|
5
|
+
* The snapshot stores the full ordered id list, but a relation can hold
|
|
6
|
+
* thousands of links — the preview shows the first {@link PREVIEW_RELATION_REF_CAP}
|
|
7
|
+
* with a "+N more", so a single detail read never resolves a huge link set.
|
|
8
|
+
*/
|
|
9
|
+
export declare const PREVIEW_RELATION_REF_CAP = 50;
|
|
10
|
+
//# sourceMappingURL=revisions.constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revisions.constants.d.ts","sourceRoot":"","sources":["../../../src/lib/revisions/revisions.constants.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,KAAK,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PREVIEW_RELATION_REF_CAP = exports.REVISIONS_PAGE_SIZE = void 0;
|
|
4
|
+
/** Default page size for the entry revision timeline. */
|
|
5
|
+
exports.REVISIONS_PAGE_SIZE = 20;
|
|
6
|
+
/**
|
|
7
|
+
* How many linked records the preview resolves to titles **per relation field**.
|
|
8
|
+
* The snapshot stores the full ordered id list, but a relation can hold
|
|
9
|
+
* thousands of links — the preview shows the first {@link PREVIEW_RELATION_REF_CAP}
|
|
10
|
+
* with a "+N more", so a single detail read never resolves a huge link set.
|
|
11
|
+
*/
|
|
12
|
+
exports.PREVIEW_RELATION_REF_CAP = 50;
|