@orthacms/content-server 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/dist/index.d.ts +15 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +38 -1
  4. package/dist/lib/content.module.d.ts.map +1 -1
  5. package/dist/lib/content.module.js +23 -1
  6. package/dist/lib/entries/http/controllers/create-entry.controller.d.ts.map +1 -1
  7. package/dist/lib/entries/http/controllers/create-entry.controller.js +1 -1
  8. package/dist/lib/entries/http/controllers/update-entry.controller.d.ts.map +1 -1
  9. package/dist/lib/entries/http/controllers/update-entry.controller.js +1 -1
  10. package/dist/lib/entries/http/dto/extension-bag.validator.d.ts +14 -0
  11. package/dist/lib/entries/http/dto/extension-bag.validator.d.ts.map +1 -0
  12. package/dist/lib/entries/http/dto/extension-bag.validator.js +42 -0
  13. package/dist/lib/entries/http/dto/save-entry.dto.d.ts +16 -0
  14. package/dist/lib/entries/http/dto/save-entry.dto.d.ts.map +1 -1
  15. package/dist/lib/entries/http/dto/save-entry.dto.js +30 -0
  16. package/dist/lib/entries/infrastructure/persistence/entry-writer.service.d.ts +28 -2
  17. package/dist/lib/entries/infrastructure/persistence/entry-writer.service.d.ts.map +1 -1
  18. package/dist/lib/entries/infrastructure/persistence/entry-writer.service.js +112 -15
  19. package/dist/lib/entries/infrastructure/persistence/relation-link.service.d.ts +38 -5
  20. package/dist/lib/entries/infrastructure/persistence/relation-link.service.d.ts.map +1 -1
  21. package/dist/lib/entries/infrastructure/persistence/relation-link.service.js +38 -6
  22. package/dist/lib/entries/infrastructure/queries/entries.service.d.ts +3 -1
  23. package/dist/lib/entries/infrastructure/queries/entries.service.d.ts.map +1 -1
  24. package/dist/lib/entries/infrastructure/queries/entries.service.js +17 -5
  25. package/dist/lib/entries/infrastructure/queries/entry-match.query.d.ts +82 -0
  26. package/dist/lib/entries/infrastructure/queries/entry-match.query.d.ts.map +1 -0
  27. package/dist/lib/entries/infrastructure/queries/entry-match.query.js +152 -0
  28. package/dist/lib/extension/entry-access-source.d.ts +112 -0
  29. package/dist/lib/extension/entry-access-source.d.ts.map +1 -0
  30. package/dist/lib/extension/entry-filter-provider.d.ts +79 -0
  31. package/dist/lib/extension/entry-filter-provider.d.ts.map +1 -0
  32. package/dist/lib/extension/entry-filter-provider.js +149 -0
  33. package/dist/lib/extension/entry-write-extension.d.ts +185 -0
  34. package/dist/lib/extension/entry-write-extension.d.ts.map +1 -0
  35. package/dist/lib/extension/entry-write-extension.js +182 -0
  36. package/dist/lib/extension/entry-write-hook.d.ts +98 -0
  37. package/dist/lib/extension/entry-write-hook.d.ts.map +1 -0
  38. package/dist/lib/extension/read-scope.d.ts +107 -0
  39. package/dist/lib/extension/read-scope.d.ts.map +1 -0
  40. package/dist/lib/extension/read-scope.js +131 -0
  41. package/dist/lib/public-api/infrastructure/public-entries.query.d.ts +14 -1
  42. package/dist/lib/public-api/infrastructure/public-entries.query.d.ts.map +1 -1
  43. package/dist/lib/public-api/infrastructure/public-entries.query.js +20 -3
  44. package/dist/lib/public-api/infrastructure/public-expansion.query.d.ts +16 -4
  45. package/dist/lib/public-api/infrastructure/public-expansion.query.d.ts.map +1 -1
  46. package/dist/lib/public-api/infrastructure/public-expansion.query.js +29 -9
  47. package/dist/lib/revisions/application/use-cases/restore-revision.use-case.d.ts.map +1 -1
  48. package/dist/lib/revisions/application/use-cases/restore-revision.use-case.js +12 -1
  49. package/dist/lib/revisions/infrastructure/persistence/revision-snapshot.d.ts +7 -1
  50. package/dist/lib/revisions/infrastructure/persistence/revision-snapshot.d.ts.map +1 -1
  51. package/dist/lib/revisions/infrastructure/persistence/revision-snapshot.js +9 -2
  52. package/dist/lib/revisions/types/revision-view.d.ts +11 -0
  53. package/dist/lib/revisions/types/revision-view.d.ts.map +1 -1
  54. package/dist/lib/utils/content-views-plugin.d.ts +28 -0
  55. package/dist/lib/utils/content-views-plugin.d.ts.map +1 -0
  56. package/dist/lib/utils/content-views-plugin.js +29 -0
  57. package/dist/lib/views/application/queries/saved-views.query.d.ts +16 -0
  58. package/dist/lib/views/application/queries/saved-views.query.d.ts.map +1 -0
  59. package/dist/lib/views/application/queries/saved-views.query.js +46 -0
  60. package/dist/lib/views/application/saved-view-access.service.d.ts +30 -0
  61. package/dist/lib/views/application/saved-view-access.service.d.ts.map +1 -0
  62. package/dist/lib/views/application/saved-view-access.service.js +55 -0
  63. package/dist/lib/views/application/use-cases/create-saved-view.use-case.d.ts +27 -0
  64. package/dist/lib/views/application/use-cases/create-saved-view.use-case.d.ts.map +1 -0
  65. package/dist/lib/views/application/use-cases/create-saved-view.use-case.js +57 -0
  66. package/dist/lib/views/application/use-cases/delete-saved-view.use-case.d.ts +15 -0
  67. package/dist/lib/views/application/use-cases/delete-saved-view.use-case.d.ts.map +1 -0
  68. package/dist/lib/views/application/use-cases/delete-saved-view.use-case.js +35 -0
  69. package/dist/lib/views/application/use-cases/set-default-view.use-case.d.ts +23 -0
  70. package/dist/lib/views/application/use-cases/set-default-view.use-case.d.ts.map +1 -0
  71. package/dist/lib/views/application/use-cases/set-default-view.use-case.js +51 -0
  72. package/dist/lib/views/application/use-cases/update-saved-view.use-case.d.ts +21 -0
  73. package/dist/lib/views/application/use-cases/update-saved-view.use-case.d.ts.map +1 -0
  74. package/dist/lib/views/application/use-cases/update-saved-view.use-case.js +61 -0
  75. package/dist/lib/views/application/view-scope.service.d.ts +25 -0
  76. package/dist/lib/views/application/view-scope.service.d.ts.map +1 -0
  77. package/dist/lib/views/application/view-scope.service.js +45 -0
  78. package/dist/lib/views/content-views.module.d.ts +22 -0
  79. package/dist/lib/views/content-views.module.d.ts.map +1 -0
  80. package/dist/lib/views/content-views.module.js +63 -0
  81. package/dist/lib/views/domain/errors/index.d.ts +6 -0
  82. package/dist/lib/views/domain/errors/index.d.ts.map +1 -0
  83. package/dist/lib/views/domain/errors/index.js +12 -0
  84. package/dist/lib/views/domain/errors/saved-view-forbidden.error.d.ts +10 -0
  85. package/dist/lib/views/domain/errors/saved-view-forbidden.error.d.ts.map +1 -0
  86. package/dist/lib/views/domain/errors/saved-view-forbidden.error.js +16 -0
  87. package/dist/lib/views/domain/errors/saved-view-limit-error.d.ts +9 -0
  88. package/dist/lib/views/domain/errors/saved-view-limit-error.d.ts.map +1 -0
  89. package/dist/lib/views/domain/errors/saved-view-limit-error.js +16 -0
  90. package/dist/lib/views/domain/errors/saved-view-name-taken.error.d.ts +5 -0
  91. package/dist/lib/views/domain/errors/saved-view-name-taken.error.d.ts.map +1 -0
  92. package/dist/lib/views/domain/errors/saved-view-name-taken.error.js +11 -0
  93. package/dist/lib/views/domain/errors/saved-view-not-found.error.d.ts +9 -0
  94. package/dist/lib/views/domain/errors/saved-view-not-found.error.d.ts.map +1 -0
  95. package/dist/lib/views/domain/errors/saved-view-not-found.error.js +15 -0
  96. package/dist/lib/views/domain/saved-view.d.ts +66 -0
  97. package/dist/lib/views/domain/saved-view.d.ts.map +1 -0
  98. package/dist/lib/views/domain/saved-view.js +18 -0
  99. package/dist/lib/views/domain/saved-view.repository.d.ts +77 -0
  100. package/dist/lib/views/domain/saved-view.repository.d.ts.map +1 -0
  101. package/dist/lib/views/domain/saved-view.repository.js +5 -0
  102. package/dist/lib/views/http/controllers/saved-views.controller.d.ts +45 -0
  103. package/dist/lib/views/http/controllers/saved-views.controller.d.ts.map +1 -0
  104. package/dist/lib/views/http/controllers/saved-views.controller.js +216 -0
  105. package/dist/lib/views/http/controllers/to-http-error.d.ts +10 -0
  106. package/dist/lib/views/http/controllers/to-http-error.d.ts.map +1 -0
  107. package/dist/lib/views/http/controllers/to-http-error.js +26 -0
  108. package/dist/lib/views/http/dto/save-view.dto.d.ts +54 -0
  109. package/dist/lib/views/http/dto/save-view.dto.d.ts.map +1 -0
  110. package/dist/lib/views/http/dto/save-view.dto.js +230 -0
  111. package/dist/lib/views/http/dto/view-payload.validator.d.ts +20 -0
  112. package/dist/lib/views/http/dto/view-payload.validator.d.ts.map +1 -0
  113. package/dist/lib/views/http/dto/view-payload.validator.js +52 -0
  114. package/dist/lib/views/infrastructure/persistence/drizzle-saved-view.repository.d.ts +17 -0
  115. package/dist/lib/views/infrastructure/persistence/drizzle-saved-view.repository.d.ts.map +1 -0
  116. package/dist/lib/views/infrastructure/persistence/drizzle-saved-view.repository.js +125 -0
  117. package/dist/lib/views/infrastructure/schema/external-refs.d.ts +68 -0
  118. package/dist/lib/views/infrastructure/schema/external-refs.d.ts.map +1 -0
  119. package/dist/lib/views/infrastructure/schema/external-refs.js +29 -0
  120. package/dist/lib/views/infrastructure/schema/index.d.ts +8 -0
  121. package/dist/lib/views/infrastructure/schema/index.d.ts.map +1 -0
  122. package/dist/lib/views/infrastructure/schema/index.js +13 -0
  123. package/dist/lib/views/infrastructure/schema/saved-views.d.ts +275 -0
  124. package/dist/lib/views/infrastructure/schema/saved-views.d.ts.map +1 -0
  125. package/dist/lib/views/infrastructure/schema/saved-views.js +87 -0
  126. package/dist/lib/views/views.constants.d.ts +26 -0
  127. package/dist/lib/views/views.constants.d.ts.map +1 -0
  128. package/dist/lib/views/views.constants.js +28 -0
  129. package/dist/lib/views/views.tokens.d.ts +17 -0
  130. package/dist/lib/views/views.tokens.d.ts.map +1 -0
  131. package/dist/lib/views/views.tokens.js +21 -0
  132. package/migrations/0000_saved_views.sql +29 -0
  133. package/migrations/meta/0000_snapshot.json +256 -0
  134. package/migrations/meta/_journal.json +13 -0
  135. package/package.json +13 -12
package/dist/index.d.ts CHANGED
@@ -1,6 +1,12 @@
1
1
  /** Public API of @orthacms/content-server. */
2
2
  export { ContentPlugin } from './lib/utils/content-plugin';
3
3
  export type { ContentPluginOptions, ContentServerPlugin } from './lib/utils/content-plugin';
4
+ export { ContentViewsPlugin } from './lib/utils/content-views-plugin';
5
+ export type { ContentViewsPluginOptions } from './lib/utils/content-views-plugin';
6
+ export { ContentViewsModule } from './lib/views/content-views.module';
7
+ export { savedViews, savedViewDefaults, viewVisibility } from './lib/views/infrastructure/schema';
8
+ export { VIEW_VISIBILITY, VIEW_VISIBILITY_VALUES } from './lib/views/domain/saved-view';
9
+ export type { SavedView, SavedViewPayload, ViewVisibility } from './lib/views/domain/saved-view';
4
10
  export { collection, single, joinTableOf } from './lib/collection/define';
5
11
  export { field } from './lib/fields';
6
12
  export { ContentModule } from './lib/content.module';
@@ -12,12 +18,21 @@ export { ContentGrantGuard } from './lib/entries/http/guards/content-grant.guard
12
18
  export { CONTENT_ENTRY_EXTENSION } from './lib/extension/entry-extension';
13
19
  export type { ContentEntryExtension, EntryFilterContext, EntryFilterExtension, EntryScopeParams, EntryTransaction, EntryWriteContext, EntryWriteFanout } from './lib/extension/entry-extension';
14
20
  export { RELATION_LOCALE_SYNC, relationLocaleSync, isPerLocaleField, isJoinBackedRelation, type RelationLocaleSync } from './lib/extension/relation-locale-sync';
21
+ export { ContentReadScopeRegistry, contentReadScopeRegistrar } from './lib/extension/read-scope';
22
+ export type { ContentReadScope, ContentReadScopeContext } from './lib/extension/read-scope';
23
+ export { EntryWriteExtensionRegistry, entryWriteExtensionRegistrar } from './lib/extension/entry-write-extension';
24
+ export type { EntryWriteExtension, EntryWriteExtensionInput, EntryWriteExtensionTarget } from './lib/extension/entry-write-extension';
25
+ export { EntryFilterProviderRegistry, entryFilterProviderRegistrar } from './lib/extension/entry-filter-provider';
26
+ export type { EntryFilterProvider } from './lib/extension/entry-filter-provider';
27
+ export type { DbTransaction } from './lib/entries/infrastructure/persistence/relation-link.service';
15
28
  export { MEDIA_ASSET_RESOLVER, InjectMediaAssetResolver } from './lib/extension/media-asset-resolver';
16
29
  export type { MediaAssetResolver, ResolvedMediaAsset } from './lib/extension/media-asset-resolver';
17
30
  export { toColumns, toRecord } from './lib/entries/infrastructure/persistence/entry-row';
18
31
  export type { EntryListView, EntryMediaView, EntryRecord, MediaRef } from './lib/entries/types/entry-list-view';
19
32
  export { ContentTypeRegistry } from './lib/registry/content-type-registry';
20
33
  export type { SerializedContentType, SerializedContentTypeSummary, SerializedField } from './lib/registry/content-type-registry';
34
+ export { EntryMatchQuery } from './lib/entries/infrastructure/queries/entry-match.query';
35
+ export type { EntryMatchOptions } from './lib/entries/infrastructure/queries/entry-match.query';
21
36
  export { EntryValidationService } from './lib/validation/services/entry-validation.service';
22
37
  export type { ValidationIssue, ValidationResult } from './lib/validation/services/entry-validation.service';
23
38
  export { CONTENT_TYPE_KIND, ENTRY_STATUS } from './lib/types/content-type';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,YAAY,EACR,oBAAoB,EACpB,mBAAmB,EACtB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAO/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,oDAAoD,CAAC;AAO1F,OAAO,EAAE,kBAAkB,EAAE,MAAM,+DAA+D,CAAC;AAInG,OAAO,EAAE,mBAAmB,EAAE,MAAM,gEAAgE,CAAC;AAOrG,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAElF,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,YAAY,EACR,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EACnB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACH,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,KAAK,kBAAkB,EAC1B,MAA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ACH,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACxB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,YAAY,EACR,UAAU,EACV,eAAe,EACf,wBAAwB,EACxB,oBAAoB,EACvB,MAAM,oCAAoC,CAAC;AAC5C,YAAY,EACR,oBAAoB,EACpB,cAAc,EACd,uBAAuB,EAC1B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACH,iBAAiB,EACjB,aAAa,EAIb,mBAAmB,EACtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAChF,YAAY,EACR,aAAa,EACb,uBAAuB,EAC1B,MAAM,qCAAqC,CAAC"}
package/dist/index.js CHANGED
@@ -1,9 +1,24 @@
1
1
  "use strict";
2
2
  /** Public API of @orthacms/content-server. */
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.RELATION_DELTA_ADDRESSING = exports.BULK_MAX_SAVE_ITEMS = exports.MAX_PAGE_SIZE = exports.DEFAULT_PAGE_SIZE = exports.BULK_SAVE_OP = exports.PublicBulkSaveItemDto = exports.PublicBulkSaveDto = exports.PublicBulkIdsDto = exports.PublicSaveEntryDto = exports.DEFAULT_EXPANSION_LIMIT = exports.PREVIEW = exports.ENTRY_VISIBILITY = exports.PublicListEntriesQueryDto = exports.PublicEntryQueryDto = exports.resolveGrantedType = exports.PublicEntryWritesService = exports.PublicEntriesQuery = exports.CurrentApiToken = exports.ApiTokenWorkspaceGuard = exports.ApiTokenGuard = exports.MEDIA_KIND_VALUES = exports.CONTENT_FIELD_TYPE = exports.ENTRY_STATUS = exports.CONTENT_TYPE_KIND = exports.EntryValidationService = exports.ContentTypeRegistry = exports.toRecord = exports.toColumns = exports.InjectMediaAssetResolver = exports.MEDIA_ASSET_RESOLVER = exports.isJoinBackedRelation = exports.isPerLocaleField = exports.relationLocaleSync = exports.RELATION_LOCALE_SYNC = exports.CONTENT_ENTRY_EXTENSION = exports.ContentGrantGuard = exports.RelationLinkService = exports.EntryWriterService = exports.WorkspaceGrantsQuery = exports.InjectContentRegistry = exports.CONTENT_REGISTRY = exports.ContentModule = exports.field = exports.joinTableOf = exports.single = exports.collection = exports.ContentPlugin = void 0;
4
+ exports.ENTRY_VISIBILITY = exports.PublicListEntriesQueryDto = exports.PublicEntryQueryDto = exports.resolveGrantedType = exports.PublicEntryWritesService = exports.PublicEntriesQuery = exports.CurrentApiToken = exports.ApiTokenWorkspaceGuard = exports.ApiTokenGuard = exports.MEDIA_KIND_VALUES = exports.CONTENT_FIELD_TYPE = exports.ENTRY_STATUS = exports.CONTENT_TYPE_KIND = exports.EntryValidationService = exports.EntryMatchQuery = exports.ContentTypeRegistry = exports.toRecord = exports.toColumns = exports.InjectMediaAssetResolver = exports.MEDIA_ASSET_RESOLVER = exports.entryFilterProviderRegistrar = exports.EntryFilterProviderRegistry = exports.entryWriteExtensionRegistrar = exports.EntryWriteExtensionRegistry = exports.contentReadScopeRegistrar = exports.ContentReadScopeRegistry = exports.isJoinBackedRelation = exports.isPerLocaleField = exports.relationLocaleSync = exports.RELATION_LOCALE_SYNC = exports.CONTENT_ENTRY_EXTENSION = exports.ContentGrantGuard = exports.RelationLinkService = exports.EntryWriterService = exports.WorkspaceGrantsQuery = exports.InjectContentRegistry = exports.CONTENT_REGISTRY = exports.ContentModule = exports.field = exports.joinTableOf = exports.single = exports.collection = exports.VIEW_VISIBILITY_VALUES = exports.VIEW_VISIBILITY = exports.viewVisibility = exports.savedViewDefaults = exports.savedViews = exports.ContentViewsModule = exports.ContentViewsPlugin = exports.ContentPlugin = void 0;
5
+ exports.RELATION_DELTA_ADDRESSING = exports.BULK_MAX_SAVE_ITEMS = exports.MAX_PAGE_SIZE = exports.DEFAULT_PAGE_SIZE = exports.BULK_SAVE_OP = exports.PublicBulkSaveItemDto = exports.PublicBulkSaveDto = exports.PublicBulkIdsDto = exports.PublicSaveEntryDto = exports.DEFAULT_EXPANSION_LIMIT = exports.PREVIEW = void 0;
5
6
  var content_plugin_1 = require("./lib/utils/content-plugin");
6
7
  Object.defineProperty(exports, "ContentPlugin", { enumerable: true, get: function () { return content_plugin_1.ContentPlugin; } });
8
+ // Saved list views. A second `ServerPlugin` entry from this package because
9
+ // `ServerPlugin.migrations` holds one descriptor and content's is already the
10
+ // HOST's generated collection tables — see `content-views-plugin.ts`.
11
+ var content_views_plugin_1 = require("./lib/utils/content-views-plugin");
12
+ Object.defineProperty(exports, "ContentViewsPlugin", { enumerable: true, get: function () { return content_views_plugin_1.ContentViewsPlugin; } });
13
+ var content_views_module_1 = require("./lib/views/content-views.module");
14
+ Object.defineProperty(exports, "ContentViewsModule", { enumerable: true, get: function () { return content_views_module_1.ContentViewsModule; } });
15
+ var schema_1 = require("./lib/views/infrastructure/schema");
16
+ Object.defineProperty(exports, "savedViews", { enumerable: true, get: function () { return schema_1.savedViews; } });
17
+ Object.defineProperty(exports, "savedViewDefaults", { enumerable: true, get: function () { return schema_1.savedViewDefaults; } });
18
+ Object.defineProperty(exports, "viewVisibility", { enumerable: true, get: function () { return schema_1.viewVisibility; } });
19
+ var saved_view_1 = require("./lib/views/domain/saved-view");
20
+ Object.defineProperty(exports, "VIEW_VISIBILITY", { enumerable: true, get: function () { return saved_view_1.VIEW_VISIBILITY; } });
21
+ Object.defineProperty(exports, "VIEW_VISIBILITY_VALUES", { enumerable: true, get: function () { return saved_view_1.VIEW_VISIBILITY_VALUES; } });
7
22
  var define_1 = require("./lib/collection/define");
8
23
  Object.defineProperty(exports, "collection", { enumerable: true, get: function () { return define_1.collection; } });
9
24
  Object.defineProperty(exports, "single", { enumerable: true, get: function () { return define_1.single; } });
@@ -48,6 +63,23 @@ Object.defineProperty(exports, "RELATION_LOCALE_SYNC", { enumerable: true, get:
48
63
  Object.defineProperty(exports, "relationLocaleSync", { enumerable: true, get: function () { return relation_locale_sync_1.relationLocaleSync; } });
49
64
  Object.defineProperty(exports, "isPerLocaleField", { enumerable: true, get: function () { return relation_locale_sync_1.isPerLocaleField; } });
50
65
  Object.defineProperty(exports, "isJoinBackedRelation", { enumerable: true, get: function () { return relation_locale_sync_1.isJoinBackedRelation; } });
66
+ // The read-scope port. Separate from CONTENT_ENTRY_EXTENSION on purpose — that
67
+ // one is single-binding and i18n holds it; see the file header for why a
68
+ // composite was the wrong shape here.
69
+ var read_scope_1 = require("./lib/extension/read-scope");
70
+ Object.defineProperty(exports, "ContentReadScopeRegistry", { enumerable: true, get: function () { return read_scope_1.ContentReadScopeRegistry; } });
71
+ Object.defineProperty(exports, "contentReadScopeRegistrar", { enumerable: true, get: function () { return read_scope_1.contentReadScopeRegistrar; } });
72
+ // The entry-write extension port — how a plugin stores state *about* an entry
73
+ // inside the entry's own write transaction, and has it captured by (and restored
74
+ // from) the entry's own version history.
75
+ var entry_write_extension_1 = require("./lib/extension/entry-write-extension");
76
+ Object.defineProperty(exports, "EntryWriteExtensionRegistry", { enumerable: true, get: function () { return entry_write_extension_1.EntryWriteExtensionRegistry; } });
77
+ Object.defineProperty(exports, "entryWriteExtensionRegistrar", { enumerable: true, get: function () { return entry_write_extension_1.entryWriteExtensionRegistrar; } });
78
+ // The virtual filter-field registry — how a plugin other than the single bound
79
+ // `CONTENT_ENTRY_EXTENSION` adds fields to a type's `?filter=` surface.
80
+ var entry_filter_provider_1 = require("./lib/extension/entry-filter-provider");
81
+ Object.defineProperty(exports, "EntryFilterProviderRegistry", { enumerable: true, get: function () { return entry_filter_provider_1.EntryFilterProviderRegistry; } });
82
+ Object.defineProperty(exports, "entryFilterProviderRegistrar", { enumerable: true, get: function () { return entry_filter_provider_1.entryFilterProviderRegistrar; } });
51
83
  var media_asset_resolver_1 = require("./lib/extension/media-asset-resolver");
52
84
  Object.defineProperty(exports, "MEDIA_ASSET_RESOLVER", { enumerable: true, get: function () { return media_asset_resolver_1.MEDIA_ASSET_RESOLVER; } });
53
85
  Object.defineProperty(exports, "InjectMediaAssetResolver", { enumerable: true, get: function () { return media_asset_resolver_1.InjectMediaAssetResolver; } });
@@ -58,6 +90,11 @@ Object.defineProperty(exports, "toColumns", { enumerable: true, get: function ()
58
90
  Object.defineProperty(exports, "toRecord", { enumerable: true, get: function () { return entry_row_1.toRecord; } });
59
91
  var content_type_registry_1 = require("./lib/registry/content-type-registry");
60
92
  Object.defineProperty(exports, "ContentTypeRegistry", { enumerable: true, get: function () { return content_type_registry_1.ContentTypeRegistry; } });
93
+ // Filter evaluation over a content type, exported for `@orthacms/alarms-server`:
94
+ // an alarm rule IS a records-list filter, so it must be parsed and translated
95
+ // by the same surface the list uses rather than by a second implementation.
96
+ var entry_match_query_1 = require("./lib/entries/infrastructure/queries/entry-match.query");
97
+ Object.defineProperty(exports, "EntryMatchQuery", { enumerable: true, get: function () { return entry_match_query_1.EntryMatchQuery; } });
61
98
  var entry_validation_service_1 = require("./lib/validation/services/entry-validation.service");
62
99
  Object.defineProperty(exports, "EntryValidationService", { enumerable: true, get: function () { return entry_validation_service_1.EntryValidationService; } });
63
100
  var content_type_1 = require("./lib/types/content-type");
@@ -1 +1 @@
1
- {"version":3,"file":"content.module.d.ts","sourceRoot":"","sources":["../../src/lib/content.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAU,MAAM,gBAAgB,CAAC;AAOvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AA4D5E;;;;;;;;;;;;;GAaG;AACH,qBACa,aAAa;IACtB,qEAAqE;IACrE,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,mBAAmB,GAAG,aAAa;CA0L/D"}
1
+ {"version":3,"file":"content.module.d.ts","sourceRoot":"","sources":["../../src/lib/content.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAU,MAAM,gBAAgB,CAAC;AAOvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAgE5E;;;;;;;;;;;;;GAaG;AACH,qBACa,aAAa;IACtB,qEAAqE;IACrE,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,mBAAmB,GAAG,aAAa;CA4M/D"}
@@ -10,6 +10,9 @@ const list_content_schema_controller_1 = require("./content-types/controllers/li
10
10
  const get_content_schema_controller_1 = require("./content-types/controllers/get-content-schema.controller");
11
11
  const get_filter_fields_controller_1 = require("./content-types/controllers/get-filter-fields.controller");
12
12
  const workspace_grants_query_1 = require("./content-types/queries/workspace-grants.query");
13
+ const read_scope_1 = require("./extension/read-scope");
14
+ const entry_write_extension_1 = require("./extension/entry-write-extension");
15
+ const entry_filter_provider_1 = require("./extension/entry-filter-provider");
13
16
  const content_grant_guard_1 = require("./entries/http/guards/content-grant.guard");
14
17
  const list_entries_controller_1 = require("./entries/http/controllers/list-entries.controller");
15
18
  const bulk_entries_controller_1 = require("./entries/http/controllers/bulk-entries.controller");
@@ -26,6 +29,7 @@ const entry_proposal_provider_1 = require("./copilot/entry-proposal.provider");
26
29
  const entry_proposal_applier_1 = require("./copilot/entry-proposal.applier");
27
30
  const entry_validation_service_1 = require("./validation/services/entry-validation.service");
28
31
  const entries_service_1 = require("./entries/infrastructure/queries/entries.service");
32
+ const entry_match_query_1 = require("./entries/infrastructure/queries/entry-match.query");
29
33
  const media_refs_query_1 = require("./entries/infrastructure/queries/media-refs.query");
30
34
  const entry_writer_service_1 = require("./entries/infrastructure/persistence/entry-writer.service");
31
35
  const entry_counter_service_1 = require("./entries/infrastructure/persistence/entry-counter.service");
@@ -150,10 +154,20 @@ let ContentModule = ContentModule_1 = class ContentModule {
150
154
  },
151
155
  entry_validation_service_1.EntryValidationService,
152
156
  workspace_grants_query_1.WorkspaceGrantsQuery,
157
+ // Holds the read scopes a downstream plugin registers. Provided
158
+ // (and exported) unconditionally: an empty registry is what an
159
+ // installation with no scoping plugin has, and it costs a
160
+ // length check per read.
161
+ read_scope_1.ContentReadScopeRegistry,
162
+ entry_write_extension_1.EntryWriteExtensionRegistry,
163
+ entry_filter_provider_1.EntryFilterProviderRegistry,
153
164
  // Every registry-driven `content/:typeName` route is guarded by
154
165
  // it, so it is resolved from this module's context.
155
166
  content_grant_guard_1.ContentGrantGuard,
156
167
  entries_service_1.EntriesService,
168
+ // Filter evaluation as a reusable question ('which entries match
169
+ // this tree?'), exported for `@orthacms/alarms-server`.
170
+ entry_match_query_1.EntryMatchQuery,
157
171
  content_insights_query_1.ContentInsightsQuery,
158
172
  // Resolves media field ids → display refs (thumbnails); injected
159
173
  // by the entry-media read endpoint and the revision refs query.
@@ -239,6 +253,9 @@ let ContentModule = ContentModule_1 = class ContentModule {
239
253
  // workspace's grants — and there must be exactly one
240
254
  // implementation of that check, not one per binder.
241
255
  workspace_grants_query_1.WorkspaceGrantsQuery,
256
+ read_scope_1.ContentReadScopeRegistry,
257
+ entry_write_extension_1.EntryWriteExtensionRegistry,
258
+ entry_filter_provider_1.EntryFilterProviderRegistry,
242
259
  public_entries_query_1.PublicEntriesQuery,
243
260
  public_entry_writes_service_1.PublicEntryWritesService,
244
261
  api_token_guard_1.ApiTokenGuard,
@@ -253,7 +270,12 @@ let ContentModule = ContentModule_1 = class ContentModule {
253
270
  // and it has to be through the same service the entries
254
271
  // pipeline writes with — a second implementation of the join
255
272
  // table's ordering and de-duplication is how the two drift.
256
- relation_link_service_1.RelationLinkService
273
+ relation_link_service_1.RelationLinkService,
274
+ // Filter evaluation, for the alarms plugin: a stored rule is a
275
+ // records-list filter, and it has to keep meaning exactly what
276
+ // the list showed when it was saved. Sharing the query is what
277
+ // makes that structural instead of aspirational.
278
+ entry_match_query_1.EntryMatchQuery
257
279
  ]
258
280
  };
259
281
  }
@@ -1 +1 @@
1
- {"version":3,"file":"create-entry.controller.d.ts","sourceRoot":"","sources":["../../../../../src/lib/entries/http/controllers/create-entry.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAKH,KAAK,UAAU,EAElB,MAAM,2BAA2B,CAAC;AAInC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uDAAuD,CAAC;AAC3F,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAI/D;;;;;;;;GAQG;AACH,qBAGa,qBAAqB;IAG1B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBADN,QAAQ,EAAE,mBAAmB,EAC7B,MAAM,EAAE,kBAAkB;IAI/C,MAAM,CACiB,QAAQ,EAAE,MAAM,EAC3B,IAAI,EAAE,YAAY,EACN,WAAW,EAAE,MAAM,EACxB,IAAI,CAAC,EAAE,UAAU,GACjC,OAAO,CAAC,WAAW,CAAC;CAY1B"}
1
+ {"version":3,"file":"create-entry.controller.d.ts","sourceRoot":"","sources":["../../../../../src/lib/entries/http/controllers/create-entry.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAKH,KAAK,UAAU,EAElB,MAAM,2BAA2B,CAAC;AAInC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uDAAuD,CAAC;AAC3F,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAI/D;;;;;;;;GAQG;AACH,qBAGa,qBAAqB;IAG1B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBADN,QAAQ,EAAE,mBAAmB,EAC7B,MAAM,EAAE,kBAAkB;IAI/C,MAAM,CACiB,QAAQ,EAAE,MAAM,EAC3B,IAAI,EAAE,YAAY,EACN,WAAW,EAAE,MAAM,EACxB,IAAI,CAAC,EAAE,UAAU,GACjC,OAAO,CAAC,WAAW,CAAC;CAa1B"}
@@ -29,7 +29,7 @@ let CreateEntryController = class CreateEntryController {
29
29
  }
30
30
  create(typeName, body, workspaceId, user) {
31
31
  const type = (0, resolve_type_1.resolveType)(this.registry, typeName);
32
- return this.writer.create(type, body.values, workspaceId, body.relations, body.locale, body.localeGroupId, (0, to_actor_1.toActor)(user));
32
+ return this.writer.create(type, body.values, workspaceId, body.relations, body.locale, body.localeGroupId, (0, to_actor_1.toActor)(user), body.extensions);
33
33
  }
34
34
  };
35
35
  exports.CreateEntryController = CreateEntryController;
@@ -1 +1 @@
1
- {"version":3,"file":"update-entry.controller.d.ts","sourceRoot":"","sources":["../../../../../src/lib/entries/http/controllers/update-entry.controller.ts"],"names":[],"mappings":"AAQA,OAAO,EAKH,KAAK,UAAU,EAElB,MAAM,2BAA2B,CAAC;AAInC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uDAAuD,CAAC;AAC3F,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAI/D;;;;;;GAMG;AACH,qBAGa,qBAAqB;IAG1B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBADN,QAAQ,EAAE,mBAAmB,EAC7B,MAAM,EAAE,kBAAkB;IAI/C,MAAM,CACiB,QAAQ,EAAE,MAAM,EACP,EAAE,EAAE,MAAM,EAC9B,IAAI,EAAE,YAAY,EACN,WAAW,EAAE,MAAM,EACxB,IAAI,CAAC,EAAE,UAAU,GACjC,OAAO,CAAC,WAAW,CAAC;CAW1B"}
1
+ {"version":3,"file":"update-entry.controller.d.ts","sourceRoot":"","sources":["../../../../../src/lib/entries/http/controllers/update-entry.controller.ts"],"names":[],"mappings":"AAQA,OAAO,EAKH,KAAK,UAAU,EAElB,MAAM,2BAA2B,CAAC;AAInC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uDAAuD,CAAC;AAC3F,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAI/D;;;;;;GAMG;AACH,qBAGa,qBAAqB;IAG1B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBADN,QAAQ,EAAE,mBAAmB,EAC7B,MAAM,EAAE,kBAAkB;IAI/C,MAAM,CACiB,QAAQ,EAAE,MAAM,EACP,EAAE,EAAE,MAAM,EAC9B,IAAI,EAAE,YAAY,EACN,WAAW,EAAE,MAAM,EACxB,IAAI,CAAC,EAAE,UAAU,GACjC,OAAO,CAAC,WAAW,CAAC;CAY1B"}
@@ -27,7 +27,7 @@ let UpdateEntryController = class UpdateEntryController {
27
27
  }
28
28
  update(typeName, id, body, workspaceId, user) {
29
29
  const type = (0, resolve_type_1.resolveType)(this.registry, typeName);
30
- return this.writer.update(type, id, body.values, workspaceId, body.relations, (0, to_actor_1.toActor)(user));
30
+ return this.writer.update(type, id, body.values, workspaceId, body.relations, (0, to_actor_1.toActor)(user), { extensions: body.extensions });
31
31
  }
32
32
  };
33
33
  exports.UpdateEntryController = UpdateEntryController;
@@ -0,0 +1,14 @@
1
+ import { type ValidationOptions } from 'class-validator';
2
+ /**
3
+ * Most extension keys one save may carry.
4
+ *
5
+ * A key names an installed plugin, so the real ceiling is single digits; this is
6
+ * a guard against a client posting an object with thousands of keys, each of
7
+ * which the registry would otherwise walk on every write. Deliberately not a
8
+ * bound on the *values* — those are the extensions' own contracts, and
9
+ * content-server declares the bag opaque.
10
+ */
11
+ export declare const MAX_EXTENSION_KEYS = 16;
12
+ /** Rejects an extension bag with more keys than {@link MAX_EXTENSION_KEYS}. */
13
+ export declare function MaxExtensionKeys(options?: ValidationOptions): (target: object, propertyName: string) => void;
14
+ //# sourceMappingURL=extension-bag.validator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extension-bag.validator.d.ts","sourceRoot":"","sources":["../../../../../src/lib/entries/http/dto/extension-bag.validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAE5E;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,+EAA+E;AAC/E,wBAAgB,gBAAgB,CAAC,OAAO,CAAC,EAAE,iBAAiB,IACvC,QAAQ,MAAM,EAAE,cAAc,MAAM,KAAG,IAAI,CAyB/D"}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MAX_EXTENSION_KEYS = void 0;
4
+ exports.MaxExtensionKeys = MaxExtensionKeys;
5
+ const class_validator_1 = require("class-validator");
6
+ /**
7
+ * Most extension keys one save may carry.
8
+ *
9
+ * A key names an installed plugin, so the real ceiling is single digits; this is
10
+ * a guard against a client posting an object with thousands of keys, each of
11
+ * which the registry would otherwise walk on every write. Deliberately not a
12
+ * bound on the *values* — those are the extensions' own contracts, and
13
+ * content-server declares the bag opaque.
14
+ */
15
+ exports.MAX_EXTENSION_KEYS = 16;
16
+ /** Rejects an extension bag with more keys than {@link MAX_EXTENSION_KEYS}. */
17
+ function MaxExtensionKeys(options) {
18
+ return function (target, propertyName) {
19
+ (0, class_validator_1.registerDecorator)({
20
+ name: 'maxExtensionKeys',
21
+ target: target.constructor,
22
+ propertyName,
23
+ options,
24
+ validator: {
25
+ validate(value) {
26
+ if (value === undefined || value === null)
27
+ return true;
28
+ if (typeof value !== 'object' || Array.isArray(value)) {
29
+ // `@IsObject()` owns that message; saying it twice
30
+ // would put two sentences about one field in the 400.
31
+ return true;
32
+ }
33
+ return (Object.keys(value).length <=
34
+ exports.MAX_EXTENSION_KEYS);
35
+ },
36
+ defaultMessage() {
37
+ return `extensions may name at most ${exports.MAX_EXTENSION_KEYS} plugins`;
38
+ }
39
+ }
40
+ });
41
+ };
42
+ }
@@ -44,5 +44,21 @@ export declare class SaveEntryDto {
44
44
  * the workspace. Read on create only.
45
45
  */
46
46
  localeGroupId?: string;
47
+ /**
48
+ * State a **different plugin** owns about this entry, keyed by that plugin's
49
+ * extension key — opaque here, exactly like {@link locale}: content-server
50
+ * forwards the bag to the bound entry-write extensions and never looks
51
+ * inside it. `@orthacms/segments-server` reads `access` from it.
52
+ *
53
+ * It rides the save body rather than a second request so the entry, its
54
+ * links, the plugin's state and the version recording all of them commit in
55
+ * one transaction — and so the version records what the save applied instead
56
+ * of what it replaced.
57
+ *
58
+ * A key **omitted** is left alone; a key present is written. An **unknown**
59
+ * key is ignored rather than refused, because the same client may be talking
60
+ * to a deployment without that plugin installed.
61
+ */
62
+ extensions?: Record<string, unknown>;
47
63
  }
48
64
  //# sourceMappingURL=save-entry.dto.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"save-entry.dto.d.ts","sourceRoot":"","sources":["../../../../../src/lib/entries/http/dto/save-entry.dto.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAiBjE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,YAAY;IACrB,wCAAwC;IASxC,MAAM,EAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEjC;;;OAGG;IAwBH,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAE1C;;;;;OAKG;IAWH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;OAKG;IASH,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B"}
1
+ {"version":3,"file":"save-entry.dto.d.ts","sourceRoot":"","sources":["../../../../../src/lib/entries/http/dto/save-entry.dto.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAqBjE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,YAAY;IACrB,wCAAwC;IASxC,MAAM,EAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEjC;;;OAGG;IAwBH,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAE1C;;;;;OAKG;IAWH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;OAKG;IASH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;;;;;;;;;;;OAcG;IAYH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC"}
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const swagger_1 = require("@nestjs/swagger");
6
6
  const class_validator_1 = require("class-validator");
7
7
  const relation_delta_map_validator_1 = require("./relation-delta-map.validator");
8
+ const extension_bag_validator_1 = require("./extension-bag.validator");
8
9
  /** Longest accepted locale slug (BCP-47's practical bound). */
9
10
  const LOCALE_MAX_LENGTH = 35;
10
11
  /** OpenAPI schema of one uuid-array leg of a relation delta. */
@@ -58,6 +59,22 @@ class SaveEntryDto {
58
59
  * the workspace. Read on create only.
59
60
  */
60
61
  localeGroupId;
62
+ /**
63
+ * State a **different plugin** owns about this entry, keyed by that plugin's
64
+ * extension key — opaque here, exactly like {@link locale}: content-server
65
+ * forwards the bag to the bound entry-write extensions and never looks
66
+ * inside it. `@orthacms/segments-server` reads `access` from it.
67
+ *
68
+ * It rides the save body rather than a second request so the entry, its
69
+ * links, the plugin's state and the version recording all of them commit in
70
+ * one transaction — and so the version records what the save applied instead
71
+ * of what it replaced.
72
+ *
73
+ * A key **omitted** is left alone; a key present is written. An **unknown**
74
+ * key is ignored rather than refused, because the same client may be talking
75
+ * to a deployment without that plugin installed.
76
+ */
77
+ extensions;
61
78
  }
62
79
  exports.SaveEntryDto = SaveEntryDto;
63
80
  tslib_1.__decorate([
@@ -118,3 +135,16 @@ tslib_1.__decorate([
118
135
  (0, class_validator_1.IsUUID)(),
119
136
  tslib_1.__metadata("design:type", String)
120
137
  ], SaveEntryDto.prototype, "localeGroupId", void 0);
138
+ tslib_1.__decorate([
139
+ (0, swagger_1.ApiPropertyOptional)({
140
+ type: 'object',
141
+ maxProperties: extension_bag_validator_1.MAX_EXTENSION_KEYS,
142
+ additionalProperties: true,
143
+ example: { access: { allow: [], deny: [] } },
144
+ description: 'Per-plugin state stored alongside the entry, keyed by extension (e.g. `access`). Opaque to content-server: forwarded to the bound entry-write extensions, written inside the save’s transaction, and captured by the revision. An omitted key is left unchanged; an unknown key is ignored.'
145
+ }),
146
+ (0, class_validator_1.IsOptional)(),
147
+ (0, class_validator_1.IsObject)(),
148
+ (0, extension_bag_validator_1.MaxExtensionKeys)(),
149
+ tslib_1.__metadata("design:type", Object)
150
+ ], SaveEntryDto.prototype, "extensions", void 0);
@@ -1,6 +1,7 @@
1
1
  import { OutboxWriter, UnitOfWork, type Database, type EventActor } from '@orthacms/database';
2
2
  import { type ContentEntryExtension } from '../../../extension/entry-extension';
3
3
  import { type MediaAssetResolver } from '../../../extension/media-asset-resolver';
4
+ import { EntryWriteExtensionRegistry } from '../../../extension/entry-write-extension';
4
5
  import type { AnyContentType } from '../../../types/content-type';
5
6
  import { EntryValidationService, type ValidationIssue } from '../../../validation/services/entry-validation.service';
6
7
  import type { EntryRecord, RelationDelta, RelationFieldView } from '../../types/entry-list-view';
@@ -35,9 +36,10 @@ export declare class EntryWriterService {
35
36
  private readonly validation;
36
37
  private readonly relations;
37
38
  private readonly revisionStore;
39
+ private readonly writeExtensions;
38
40
  private readonly extension?;
39
41
  private readonly mediaResolver?;
40
- constructor(db: Database, uow: UnitOfWork, outbox: OutboxWriter, validation: EntryValidationService, relations: RelationLinkService, revisionStore: RevisionStore, extension?: ContentEntryExtension | undefined, mediaResolver?: MediaAssetResolver | undefined);
42
+ constructor(db: Database, uow: UnitOfWork, outbox: OutboxWriter, validation: EntryValidationService, relations: RelationLinkService, revisionStore: RevisionStore, writeExtensions: EntryWriteExtensionRegistry, extension?: ContentEntryExtension | undefined, mediaResolver?: MediaAssetResolver | undefined);
41
43
  /**
42
44
  * The active unit-of-work transaction, typed as the handle drizzle hands a
43
45
  * `db.transaction` callback.
@@ -119,6 +121,14 @@ export declare class EntryWriterService {
119
121
  * two of them from deadlocking on the pair.
120
122
  */
121
123
  private appendRevisionsFor;
124
+ /**
125
+ * The rows behind a set of ids, on this transaction.
126
+ *
127
+ * Soft-deleted rows are **included**: a locale in the trash is still a row
128
+ * whose state an extension just changed, and it comes back on restore
129
+ * expecting a timeline that says so.
130
+ */
131
+ private rowsByIds;
122
132
  /**
123
133
  * Create an entry **owned by `workspaceId`** (stamped onto the row so the
124
134
  * reader's workspace filter and every later scoped write see it). A
@@ -136,8 +146,13 @@ export declare class EntryWriterService {
136
146
  * extension validates them and stamps the envelope columns (a
137
147
  * `localeGroupId` makes the row a **sibling** in that translation group). A
138
148
  * duplicate `(group, locale)` surfaces as a **409** via {@link uniqueGuarded}.
149
+ *
150
+ * `extensions` is the same kind of thing one plugin further out: an opaque
151
+ * bag forwarded to the bound {@link EntryWriteExtensionRegistry}, so a plugin
152
+ * that owns state *about* an entry (segments' audiences) writes it inside
153
+ * this transaction and has it captured by the same version.
139
154
  */
140
- create(type: AnyContentType, values: Record<string, unknown>, workspaceId: string, relations?: Record<string, RelationDelta>, locale?: string, localeGroupId?: string, actor?: EventActor | null): Promise<EntryRecord>;
155
+ create(type: AnyContentType, values: Record<string, unknown>, workspaceId: string, relations?: Record<string, RelationDelta>, locale?: string, localeGroupId?: string, actor?: EventActor | null, extensions?: Record<string, unknown>): Promise<EntryRecord>;
141
156
  /**
142
157
  * First page (+ total) of every relation field's links for one live entry,
143
158
  * keyed by field name — what the editor loads on open. Each field is
@@ -180,6 +195,17 @@ export declare class EntryWriterService {
180
195
  * really did change.
181
196
  */
182
197
  appendRevision?: boolean;
198
+ /**
199
+ * Opaque per-plugin state to store alongside the entry, forwarded to
200
+ * the bound {@link EntryWriteExtensionRegistry} inside this write's
201
+ * transaction. A key the caller omits is left alone — a save that
202
+ * said nothing about audiences must not clear them.
203
+ *
204
+ * A **restore** passes the restored version's `snapshot.extra` here,
205
+ * which is what makes going back to Tuesday put Tuesday's audiences
206
+ * back too rather than leaving today's readers on Tuesday's words.
207
+ */
208
+ extensions?: Record<string, unknown>;
183
209
  }): Promise<EntryRecord>;
184
210
  /**
185
211
  * Stamp `status='published'` + `published_at`/`updated_at` on one live row,
@@ -1 +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;I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;OAIG;IACG,aAAa,CACf,IAAI,EAAE,cAAc,EACpB,GAAG,EAAE,MAAM,EAAE,EACb,WAAW,EAAE,MAAM,EACnB,IAAI,GAAE,QAAQ,GAAG,aAAuB,GACzC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAgB5B;;;;;;;;;;;;;OAaG;IACH;;;;;;;;;;;;;;;;;;OAkBG;YACW,qBAAqB;YA4DrB,qBAAqB;IAiHnC;;;;;;;;;;;;;;OAcG;YACW,kBAAkB;IAoDhC;;;;;;;;;;OAUG;YACW,uBAAuB;IAoBrC;;;;;;;;OAQG;IACG,sBAAsB,CACxB,IAAI,EAAE,QAAQ,GAAG,aAAa,EAC9B,IAAI,EAAE,cAAc,EACpB,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,MAAM,GACpB,OAAO,CAAC,eAAe,EAAE,CAAC;IA8B7B,qEAAqE;IACrE,OAAO,CAAC,WAAW;IAanB,0DAA0D;IAC1D,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,QAAQ;CAKnB"}
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;AACjD,OAAO,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;AAEvF,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,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