@voltro/cms 0.86.0 → 0.88.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/CHANGELOG.md +5484 -0
  2. package/README.md +138 -0
  3. package/THIRD-PARTY-NOTICES.md +1511 -276
  4. package/dist/ContentForm.js +1 -2
  5. package/dist/RichDocumentEditor.js +1 -2
  6. package/dist/RichDocumentView.js +82 -38
  7. package/dist/RichTextSurface.js +1 -2
  8. package/dist/aiCandidates.js +4 -5
  9. package/dist/aiOperations.js +1 -2
  10. package/dist/applicationBuildSnapshotService.js +100 -0
  11. package/dist/assetRenditions.js +101 -0
  12. package/dist/assetRevision.js +45 -0
  13. package/dist/assetUseRights.js +71 -0
  14. package/dist/audiences.js +1 -2
  15. package/dist/availability.js +20 -18
  16. package/dist/blueprint.js +76 -77
  17. package/dist/build.d.ts +3063 -0
  18. package/dist/build.js +37 -0
  19. package/dist/buildApplicationAdmission.js +15 -0
  20. package/dist/buildApplicationCatalog.js +135 -0
  21. package/dist/buildApplicationCatalogTable.js +23 -0
  22. package/dist/buildApplicationRest.js +98 -0
  23. package/dist/buildApplicationUpload.js +110 -0
  24. package/dist/buildSnapshot.js +400 -0
  25. package/dist/buildSnapshotApplicationPin.js +31 -0
  26. package/dist/buildSnapshotRest.js +209 -0
  27. package/dist/buildSnapshotService.js +264 -0
  28. package/dist/buildSnapshotTables.js +24 -0
  29. package/dist/bulk.js +72 -72
  30. package/dist/cacheIdentity.js +1 -2
  31. package/dist/changes.js +280 -64
  32. package/dist/cmsContext.js +1 -2
  33. package/dist/collections.js +1 -2
  34. package/dist/consent.js +6 -7
  35. package/dist/contentLocations.js +52 -0
  36. package/dist/contentProjection.js +82 -0
  37. package/dist/contentRouteIdentity.js +12 -0
  38. package/dist/contentRouteMaterializer.js +96 -0
  39. package/dist/contentRouteTypes.js +38 -0
  40. package/dist/contentSeo.js +188 -0
  41. package/dist/contentTreePath.js +59 -0
  42. package/dist/contentType.js +121 -105
  43. package/dist/contentValues.js +17 -0
  44. package/dist/contentfulImport.js +1 -2
  45. package/dist/copies.js +4 -5
  46. package/dist/cutover.js +1 -2
  47. package/dist/deliveryChecks.js +1 -2
  48. package/dist/domainHost.js +6 -0
  49. package/dist/domains.js +82 -89
  50. package/dist/draftTexts.js +38 -39
  51. package/dist/duplicates.js +24 -25
  52. package/dist/edgePurge.js +1 -2
  53. package/dist/editHistory.js +1 -2
  54. package/dist/effectForm.js +1 -2
  55. package/dist/environmentAliases.js +137 -0
  56. package/dist/environments.js +108 -71
  57. package/dist/errors.js +55 -16
  58. package/dist/experiments.js +8 -9
  59. package/dist/exposure.js +1 -2
  60. package/dist/extensionManifest.js +2 -3
  61. package/dist/extensions.js +1 -2
  62. package/dist/fieldSchema.js +1 -2
  63. package/dist/formStrings.js +1 -2
  64. package/dist/frontendBindings.js +98 -0
  65. package/dist/frontendMedia.js +17 -0
  66. package/dist/glossary.js +1 -2
  67. package/dist/history.js +1 -2
  68. package/dist/htmlImport.js +1 -2
  69. package/dist/index.d.ts +760 -47
  70. package/dist/index.js +89 -73
  71. package/dist/initializePublicRoutes.js +27 -0
  72. package/dist/liveContentRouteView.js +75 -0
  73. package/dist/media.js +1 -2
  74. package/dist/metrics.js +1 -2
  75. package/dist/migration.js +1 -2
  76. package/dist/migrationStages.js +1 -2
  77. package/dist/nativeOutputDeploymentService.js +204 -0
  78. package/dist/outputActivation.js +233 -0
  79. package/dist/outputActivationOrigin.js +50 -0
  80. package/dist/outputActivationStore.js +410 -0
  81. package/dist/outputActivationTables.js +10 -0
  82. package/dist/outputActivationTarget.js +80 -0
  83. package/dist/outputActivationTargetTable.js +24 -0
  84. package/dist/outputDeployment.js +173 -0
  85. package/dist/outputDeploymentRest.js +167 -0
  86. package/dist/outputDeploymentService.js +240 -0
  87. package/dist/outputRouteGraph.js +176 -0
  88. package/dist/outputSafetyArtifact.js +146 -0
  89. package/dist/outputTargetRest.js +61 -0
  90. package/dist/pathSegmentEncoding.js +3 -0
  91. package/dist/presenceAnchors.js +1 -2
  92. package/dist/preview.js +1 -2
  93. package/dist/privateCmsTransport.js +75 -0
  94. package/dist/privateNativeRouteReservation.js +9 -0
  95. package/dist/promotion.js +69 -61
  96. package/dist/publicBuild.js +89 -0
  97. package/dist/publicBuildRest.js +97 -0
  98. package/dist/publicBuildService.js +62 -0
  99. package/dist/publicOutputHttp.js +128 -0
  100. package/dist/publicOutputService.js +286 -0
  101. package/dist/publicPresentation.js +16 -0
  102. package/dist/publicRouteDispositionAdmission.js +37 -0
  103. package/dist/publicRouteHistoryStore.js +11 -0
  104. package/dist/publicRouteHistoryView.js +33 -0
  105. package/dist/publicRouteIntegrity.js +4 -0
  106. package/dist/publicRouteMutation.js +5 -0
  107. package/dist/publicRouteNamespace.js +133 -0
  108. package/dist/publicRoutePublication.js +35 -0
  109. package/dist/publicRouteRegistry.js +16 -0
  110. package/dist/publicRouteRegistryBinding.js +193 -0
  111. package/dist/publicRouteRegistryDefinition.js +75 -0
  112. package/dist/publicRouteSitePublication.js +39 -0
  113. package/dist/publicRouteTables.js +12 -0
  114. package/dist/publicRouteUrl.js +17 -0
  115. package/dist/publicationSeo.js +51 -0
  116. package/dist/publicationState.js +295 -0
  117. package/dist/quality.js +9 -10
  118. package/dist/reconfigurePublicRoutes.js +40 -0
  119. package/dist/recurrence.js +1 -2
  120. package/dist/redirects.js +105 -75
  121. package/dist/referenceGraph.js +16 -16
  122. package/dist/references.js +3 -4
  123. package/dist/release.js +178 -143
  124. package/dist/renderReadAuthority.js +42 -0
  125. package/dist/renderReadGrant.js +136 -0
  126. package/dist/rest.js +1 -2
  127. package/dist/review.js +29 -30
  128. package/dist/richDocument.js +56 -27
  129. package/dist/richInline.js +1 -2
  130. package/dist/routeDispositionGraph.js +43 -0
  131. package/dist/routeDispositionRest.js +50 -0
  132. package/dist/routeDispositionService.js +72 -0
  133. package/dist/routeDispositionStore.js +288 -0
  134. package/dist/routeDispositionTables.js +4 -0
  135. package/dist/routeDispositions.js +90 -0
  136. package/dist/routeHistoryStorage.js +319 -0
  137. package/dist/routeHistoryStore.js +11 -0
  138. package/dist/schedule.js +37 -38
  139. package/dist/search.js +1 -2
  140. package/dist/selectionIntent.js +1 -2
  141. package/dist/seo.js +2 -3
  142. package/dist/series.js +12 -13
  143. package/dist/share.js +14 -15
  144. package/dist/siteBindings.js +158 -0
  145. package/dist/siteBuildCandidate.js +103 -0
  146. package/dist/siteDelivery.js +114 -0
  147. package/dist/siteState.js +46 -0
  148. package/dist/snapshotAddressGraph.js +54 -0
  149. package/dist/snapshotAddressRead.js +72 -0
  150. package/dist/snapshotAppConsumer.js +70 -0
  151. package/dist/snapshotAppExecution.js +101 -0
  152. package/dist/snapshotApplication.js +74 -0
  153. package/dist/snapshotApprovedRouteDispositions.js +43 -0
  154. package/dist/snapshotAssetAssembly.js +69 -0
  155. package/dist/snapshotAssetAssemblyRest.js +49 -0
  156. package/dist/snapshotBindingRead.js +60 -0
  157. package/dist/snapshotCodeSeo.js +28 -0
  158. package/dist/snapshotComponent.js +33 -0
  159. package/dist/snapshotComponentSource.js +23 -0
  160. package/dist/snapshotConsumer.js +86 -0
  161. package/dist/snapshotContentIdentity.js +9 -0
  162. package/dist/snapshotDefinitions.js +263 -0
  163. package/dist/snapshotDocumentAssembly.js +192 -0
  164. package/dist/snapshotDocumentAssemblyRest.js +83 -0
  165. package/dist/snapshotDocumentProjection.js +201 -0
  166. package/dist/snapshotDocumentTransfer.js +34 -0
  167. package/dist/snapshotDocumentTransferRest.js +79 -0
  168. package/dist/snapshotDomains.js +55 -0
  169. package/dist/snapshotEnvironment.js +30 -0
  170. package/dist/snapshotFieldPlan.js +84 -0
  171. package/dist/snapshotFrontend.js +102 -0
  172. package/dist/snapshotLink.js +7 -0
  173. package/dist/snapshotMedia.js +110 -0
  174. package/dist/snapshotMediaCapture.js +245 -0
  175. package/dist/snapshotMediaFields.js +224 -0
  176. package/dist/snapshotMediaRead.js +184 -0
  177. package/dist/snapshotMediaReader.js +12 -0
  178. package/dist/snapshotObservation.js +15 -0
  179. package/dist/snapshotObservedRouteHistory.js +33 -0
  180. package/dist/snapshotOutputTransfer.js +77 -0
  181. package/dist/snapshotPageLoader.js +6 -0
  182. package/dist/snapshotPageSeo.js +58 -0
  183. package/dist/snapshotPathLocale.js +14 -0
  184. package/dist/snapshotPresentation.js +85 -0
  185. package/dist/snapshotPresentationPolicy.js +11 -0
  186. package/dist/snapshotProjection.js +118 -0
  187. package/dist/snapshotPublicAccess.js +160 -0
  188. package/dist/snapshotPublicRouteHistory.js +39 -0
  189. package/dist/snapshotReadAdmission.js +37 -0
  190. package/dist/snapshotRedirectOutput.js +150 -0
  191. package/dist/snapshotRedirectTargets.js +23 -0
  192. package/dist/snapshotRedirects.js +131 -0
  193. package/dist/snapshotReference.js +7 -0
  194. package/dist/snapshotReferenceAddress.js +9 -0
  195. package/dist/snapshotReferenceGraph.js +78 -0
  196. package/dist/snapshotReferenceRead.js +64 -0
  197. package/dist/snapshotRelease.js +98 -0
  198. package/dist/snapshotRender.js +360 -0
  199. package/dist/snapshotRenderDependencies.js +177 -0
  200. package/dist/snapshotRenditions.js +87 -0
  201. package/dist/snapshotRichDocument.js +61 -0
  202. package/dist/snapshotRoleTransfer.js +105 -0
  203. package/dist/snapshotRoleTransferRest.js +98 -0
  204. package/dist/snapshotRouteAdmission.js +70 -0
  205. package/dist/snapshotRouteDispatch.js +110 -0
  206. package/dist/snapshotRouteDispositionPlan.js +72 -0
  207. package/dist/snapshotRouteRead.js +42 -0
  208. package/dist/snapshotRoutes.js +78 -0
  209. package/dist/snapshotRouting.js +112 -0
  210. package/dist/snapshotSeo.js +178 -0
  211. package/dist/snapshotSeoControls.js +100 -0
  212. package/dist/snapshotSeoDocumentInventory.js +114 -0
  213. package/dist/snapshotSeoDocuments.js +128 -0
  214. package/dist/snapshotSeoMerge.js +84 -0
  215. package/dist/snapshotSeoMetadata.js +136 -0
  216. package/dist/snapshotSeoOutput.js +172 -0
  217. package/dist/snapshotSeoPathSets.js +104 -0
  218. package/dist/snapshotSeoRead.js +87 -0
  219. package/dist/snapshotSite.js +127 -0
  220. package/dist/snapshotSitemapFiles.js +35 -0
  221. package/dist/snapshotTreeDependencies.js +57 -0
  222. package/dist/snapshotTreeLoader.js +9 -0
  223. package/dist/snapshotTreeRead.js +157 -0
  224. package/dist/staticPathSet.js +176 -0
  225. package/dist/staticPathSetRest.js +128 -0
  226. package/dist/staticPathSetService.js +248 -0
  227. package/dist/staticPathSetStore.js +337 -0
  228. package/dist/stewardship.js +2 -3
  229. package/dist/taxonomy.js +1 -2
  230. package/dist/team.js +1 -2
  231. package/dist/templates.js +2 -3
  232. package/dist/trackChanges.js +1 -2
  233. package/dist/translation.js +1 -2
  234. package/dist/tree.js +10 -11
  235. package/dist/usage.js +1 -2
  236. package/dist/validation.js +54 -55
  237. package/dist/visualEditing.js +1 -2
  238. package/dist/web.d.ts +709 -7
  239. package/dist/web.js +50 -33
  240. package/dist/workflow.js +9 -10
  241. package/dist/write.js +251 -227
  242. package/dist/xliff.js +1 -2
  243. package/package.json +21 -7
package/dist/index.d.ts CHANGED
@@ -1,17 +1,33 @@
1
+ import { ApiWorkload } from '@voltro/protocol';
1
2
  import { DataStore } from '@voltro/database';
2
3
  import { Effect } from 'effect/Effect';
3
4
  import { Effect as Effect_2 } from 'effect';
5
+ import { PluginHttpRouteByteStream } from '@voltro/protocol';
6
+ import { PluginHttpRouteRequest } from '@voltro/protocol';
7
+ import { PluginHttpRouteResult } from '@voltro/protocol';
8
+ import { PluginHttpRouteStream } from '@voltro/protocol';
9
+ import { PluginHttpRouteStreamRequest } from '@voltro/protocol';
10
+ import { PublicApiDescriptor } from '@voltro/protocol/rest';
4
11
  import { ReactNode } from 'react';
12
+ import { RestCache } from '@voltro/protocol/rest';
13
+ import { RestCors } from '@voltro/protocol/rest';
14
+ import { RestGuard } from '@voltro/protocol/rest';
15
+ import { RestMethod } from '@voltro/protocol/rest';
16
+ import { RestRateLimit } from '@voltro/protocol/rest';
17
+ import { RestRouteContext } from '@voltro/protocol/rest';
18
+ import { RestRouteDescriptor } from '@voltro/protocol/rest';
19
+ import { RestRouteExample } from '@voltro/protocol/rest';
20
+ import { RestRouteProjection } from '@voltro/protocol/rest';
5
21
  import { Row } from '@voltro/database';
6
22
  import { Schema as Schema_2 } from 'effect';
7
23
  import { TableLike } from '@voltro/database';
8
24
  import { YieldableError } from 'effect/Cause';
9
25
 
10
26
  /** Effect form of {@link addDomain}. */
11
- export declare const addDomain: (...args: Parameters<typeof addDomain_2>) => Effect<AddDomainResult, never, never>;
27
+ export declare const addDomain: (...args: Parameters<typeof addDomain_2>) => Effect<AddDomainResult, SiteStateUnavailable, never>;
12
28
 
13
29
  /** Add a host to a site, pending until its TXT record is found. A host belongs to one site anywhere. */
14
- declare const addDomain_2: (tx: DataStore, site: string, input: string) => Promise<AddDomainResult>;
30
+ declare const addDomain_2: (tx: DataStore, scope: CmsSiteScope, input: string) => Promise<AddDomainResult>;
15
31
 
16
32
  export declare type AddDomainResult = {
17
33
  readonly ok: true;
@@ -22,7 +38,7 @@ export declare type AddDomainResult = {
22
38
  };
23
39
 
24
40
  /** Effect form of {@link addRedirect}. */
25
- export declare const addRedirect: (...args: Parameters<typeof addRedirect_2>) => Effect<void, never, never>;
41
+ export declare const addRedirect: (...args: Parameters<typeof addRedirect_2>) => Effect<void, ChangeFeedUnavailable, never>;
26
42
 
27
43
  /**
28
44
  * Point a former address at a document — an address from before an import, a
@@ -30,7 +46,7 @@ export declare const addRedirect: (...args: Parameters<typeof addRedirect_2>) =>
30
46
  * `fromPath` still wins over it (`cms.route` tries the tree first). In the
31
47
  * caller's transaction.
32
48
  */
33
- declare const addRedirect_2: (tx: DataStore, type: ContentType, scope: CmsScope, fromPath: string, documentId: string, tenantId?: unknown) => Promise<void>;
49
+ declare const addRedirect_2: (tx: DataStore, type: ContentType, scope: CmsScope, fromPath: string, documentId: string, tenantId: unknown) => Promise<void>;
34
50
 
35
51
  /** Effect form of {@link addToCollection}. */
36
52
  export declare const addToCollection: (...args: Parameters<typeof addToCollection_2>) => Effect<boolean, never, never>;
@@ -223,7 +239,7 @@ export declare type AppliedSelection = {
223
239
  };
224
240
 
225
241
  /** Effect form of {@link applyBlueprint}. */
226
- export declare const applyBlueprint: (...args: Parameters<typeof applyBlueprint_2>) => Effect<BlueprintPlan, ContentValidationFailed | ContentNotFound | ContentIdConflict | RevisionMismatch | ReviewRequired | ReferenceUnavailable | BlueprintInvalid, never>;
242
+ export declare const applyBlueprint: (...args: Parameters<typeof applyBlueprint_2>) => Effect<BlueprintPlan, ContentValidationFailed | ContentNotFound | ContentIdConflict | RevisionMismatch | ReviewRequired | ReferenceUnavailable | ChangeFeedUnavailable | BlueprintInvalid, never>;
227
243
 
228
244
  /**
229
245
  * Provision `blueprint` into `target`: every step the plan calls `create` is
@@ -300,7 +316,7 @@ export declare const approveReview: (...args: Parameters<typeof approveReview_2>
300
316
  declare const approveReview_2: (store: DataStore, type: ContentType, variantId: string, scope: CmsScope, options: DecideOptions) => Promise<Row>;
301
317
 
302
318
  /** Effect-native `archive` (see {@link saveDraftEffect}). */
303
- export declare const archive: (store: DataStore, type: ContentType, id: string, scope: CmsScope) => Effect_2.Effect<void, ContentNotFound>;
319
+ export declare const archive: (store: DataStore, type: ContentType, id: string, scope: CmsScope) => Effect_2.Effect<void, ContentNotFound | ChangeFeedUnavailable | PublicRouteRegistryUnavailable>;
304
320
 
305
321
  /** Effect form of {@link assertApproved}. */
306
322
  export declare const assertApproved: (...args: Parameters<typeof assertApproved_2>) => Effect<void, ReviewRequired, never>;
@@ -321,6 +337,12 @@ export declare const assertReferencesAvailable: (...args: Parameters<typeof asse
321
337
  */
322
338
  declare const assertReferencesAvailable_2: (tx: DataStore, type: ContentType, variantId: string, values: Readonly<Record<string, unknown>>, scope: CmsScope, now?: Date) => Promise<void>;
323
339
 
340
+ /** Declares the original-file field of a versioned asset document. It does
341
+ * not imply ingestion, creative approval, rights or public delivery fitness. */
342
+ export declare interface AssetConfig {
343
+ readonly file: string;
344
+ }
345
+
324
346
  /** The version a reader is shown: the same reader, the same version, every time. */
325
347
  export declare const assignVariant: (experimentId: string, readerId: string, share: number) => Variant;
326
348
 
@@ -397,6 +419,15 @@ export declare const bindExtensionSecret: (...args: Parameters<typeof bindExtens
397
419
  */
398
420
  declare const bindExtensionSecret_2: (tx: DataStore, extensionId: string, name: string, value: string | null) => Promise<SecretBinding>;
399
421
 
422
+ export declare const bindSiteContent: (...args: Parameters<typeof bindSiteContent_2>) => Effect<SiteContentBinding, ChangeFeedUnavailable | SiteBindingUnavailable, never>;
423
+
424
+ /** Create with expectedRevisionId:null, or replace the exact revision observed. Caller authorizes the binding and target type. */
425
+ declare const bindSiteContent_2: (tx: DataStore, types: ReadonlyArray<ContentType>, scope: ChangeFeedScope, name: string, input: {
426
+ readonly expectedRevisionId: string | null;
427
+ readonly contentType: string;
428
+ readonly documentId: string;
429
+ }) => Promise<SiteContentBinding>;
430
+
400
431
  /** Whether a block, or any text in it, holds a suggestion. */
401
432
  export declare const blockHasChanges: (block: RichBlock) => boolean;
402
433
 
@@ -497,6 +528,8 @@ export declare interface BlueprintTeam {
497
528
  * Arrange one variant per document into a tree. `entries` holds at most one
498
529
  * entry per `documentId` (the first one wins). A node without a segment is
499
530
  * not routable and counts as an orphan, and so does everything below it.
531
+ * Equal positions use locale-independent JavaScript string order for segments
532
+ * and document IDs; process locale or ICU data must not reorder a snapshot.
500
533
  */
501
534
  export declare const buildTree: (entries: ReadonlyArray<TreeEntry>, config: TreeConfig) => CmsTree;
502
535
 
@@ -664,6 +697,21 @@ export declare interface ChangeEntry {
664
697
  readonly releaseId: string | null;
665
698
  }
666
699
 
700
+ /** One independently resumable publication stream. Tenant must be explicit. */
701
+ export declare interface ChangeFeedScope {
702
+ readonly tenantId: string;
703
+ readonly site: string;
704
+ readonly environment: string;
705
+ }
706
+
707
+ /** The feed cannot issue a safe cursor; migrate, repair scope, or perform full sync. */
708
+ export declare class ChangeFeedUnavailable extends ChangeFeedUnavailable_base {
709
+ }
710
+
711
+ declare const ChangeFeedUnavailable_base: Schema_2.Class<ChangeFeedUnavailable, Schema_2.TaggedStruct<"ChangeFeedUnavailable", {
712
+ readonly reason: Schema_2.Literals<readonly ["scope", "cursor", "migration", "exhausted"]>;
713
+ }>, YieldableError>;
714
+
667
715
  export declare interface ChangeOrigin {
668
716
  /** The release applying this change. */
669
717
  readonly releaseId?: string;
@@ -686,6 +734,9 @@ export declare const CMS_AVAILABILITY_TABLE = "cms_availability";
686
734
 
687
735
  export declare const CMS_BULK_RUNS_TABLE = "cms_bulk_runs";
688
736
 
737
+ /** Internal coordination, never an editor's inverse/redo operation. */
738
+ export declare const CMS_CHANGE_HEADS_TABLE = "_voltro_cms_change_heads";
739
+
689
740
  export declare const CMS_CHANGES_TABLE = "cms_changes";
690
741
 
691
742
  export declare const CMS_COLLECTION_ITEMS_TABLE = "cms_collection_items";
@@ -704,6 +755,10 @@ export declare const CMS_DELIVERY_CHECKS_TABLE = "cms_delivery_checks";
704
755
 
705
756
  export declare const CMS_DRAFT_TEXTS_TABLE = "cms_draft_texts";
706
757
 
758
+ export declare const CMS_ENVIRONMENT_ALIAS_REVISIONS_TABLE = "cms_environment_alias_revisions";
759
+
760
+ export declare const CMS_ENVIRONMENT_ALIASES_TABLE = "cms_environment_aliases";
761
+
707
762
  export declare const CMS_EXPERIMENT_EVENTS_TABLE = "cms_experiment_events";
708
763
 
709
764
  export declare const CMS_EXPERIMENTS_TABLE = "cms_experiments";
@@ -749,8 +804,14 @@ export declare const CMS_SCOPE_COLUMNS: readonly ["site", "environment", "locale
749
804
 
750
805
  export declare const CMS_SEARCH_TABLE = "cms_search";
751
806
 
807
+ export declare const CMS_SITE_BINDING_REVISIONS_TABLE = "cms_site_binding_revisions";
808
+
809
+ export declare const CMS_SITE_BINDINGS_TABLE = "cms_site_bindings";
810
+
752
811
  export declare const CMS_SITE_DOMAINS_TABLE = "cms_site_domains";
753
812
 
813
+ export declare const CMS_SITE_STATE_HEADS_TABLE = "_voltro_cms_site_state_heads";
814
+
754
815
  export declare const CMS_STEWARDSHIP_TABLE = "cms_stewardship";
755
816
 
756
817
  export declare const CMS_TEAM_INVITATIONS_TABLE = "cms_team_invitations";
@@ -828,6 +889,8 @@ export declare const cmsAvailabilityTable: TableLike;
828
889
  /** A bulk run as a durable record: what it does, the plan, and each item's result so far. */
829
890
  export declare const cmsBulkRunsTable: TableLike;
830
891
 
892
+ export declare const cmsChangeHeadsTable: TableLike;
893
+
831
894
  export declare const cmsChangesTable: TableLike;
832
895
 
833
896
  export declare const cmsCollectionItemsTable: TableLike;
@@ -857,6 +920,10 @@ export declare const cmsDeliveryChecksTable: TableLike;
857
920
  /** One text field of one draft (a document in one language), as a CRDT text. */
858
921
  export declare const cmsDraftTextsTable: TableLike;
859
922
 
923
+ export declare const cmsEnvironmentAliasesTable: TableLike;
924
+
925
+ export declare const cmsEnvironmentAliasRevisionsTable: TableLike;
926
+
860
927
  export declare const cmsExperimentEventsTable: TableLike;
861
928
 
862
929
  export declare const cmsExperimentsTable: TableLike;
@@ -902,6 +969,34 @@ export declare const cmsPathsTable: TableLike;
902
969
  */
903
970
  export declare const cmsPreviewSharesTable: TableLike;
904
971
 
972
+ export declare interface CmsPublicPresentations {
973
+ readonly consentPurposes: ReadonlyArray<SnapshotConsentPurpose>;
974
+ readonly presentations: ReadonlyArray<SnapshotPresentation>;
975
+ }
976
+
977
+ export declare interface CmsPublicPresentationTarget {
978
+ readonly host: string;
979
+ readonly path: string;
980
+ readonly presentation: SnapshotPresentation;
981
+ }
982
+
983
+ /** Use actual registered content types, approved site profiles and retained
984
+ * native discovery from the server application, never request-authored JSON. */
985
+ export declare interface CmsPublicRouteDeclaration {
986
+ readonly types: ReadonlyArray<ContentType>;
987
+ readonly site: SiteDeliveryDefinition;
988
+ /** Explicit null admits only CMS locations, with no native routing/discovery. */
989
+ readonly code: SnapshotAppCodePin | null;
990
+ readonly routing: SnapshotRoutingDefinition | null;
991
+ readonly routeDiscovery: unknown;
992
+ }
993
+
994
+ export declare interface CmsPublicRouteInitialization {
995
+ readonly revision: number;
996
+ }
997
+
998
+ export declare const cmsPublicRouteTables: readonly [ TableLike, TableLike, TableLike, TableLike, TableLike, TableLike];
999
+
905
1000
  /** One repeating live window per draft: its rule, and the occurrence armed last (-1: none yet). */
906
1001
  export declare const cmsPublishSeriesTable: TableLike;
907
1002
 
@@ -973,6 +1068,109 @@ export declare const cmsReviewsTable: TableLike;
973
1068
  */
974
1069
  export declare const cmsRevisionsTable: TableLike;
975
1070
 
1071
+ export declare interface CmsRouteDispositionApproval extends CmsRouteDispositionRecord {
1072
+ readonly count: number;
1073
+ }
1074
+
1075
+ export declare interface CmsRouteDispositionPage {
1076
+ readonly revision: number;
1077
+ readonly count: number;
1078
+ readonly entries: ReadonlyArray<CmsRouteDispositionRecord>;
1079
+ readonly next: string | null;
1080
+ }
1081
+
1082
+ export declare interface CmsRouteDispositionRecord {
1083
+ readonly revision: number;
1084
+ readonly revisionId: string;
1085
+ readonly previousRevisionId: string | null;
1086
+ readonly definition: RouteDispositionDefinition;
1087
+ readonly approvedAt: number;
1088
+ }
1089
+
1090
+ /** Dedicated organization API-key exchange. Mount only httpRoutes through the
1091
+ * plugin HTTP seam and pass routes to OpenAPI; no generic idempotency cache or
1092
+ * ambient Subject authorizes publisher decisions. */
1093
+ export declare const cmsRouteDispositionRest: (service: CmsRouteDispositions) => {
1094
+ routes: {
1095
+ guards: RestGuard[];
1096
+ maxBodyBytes: number;
1097
+ publicApiDescriptor?: PublicApiDescriptor;
1098
+ method: RestMethod;
1099
+ path: string;
1100
+ input?: Schema_2.Codec<Record<string, unknown>, any, never, never>;
1101
+ output: Schema_2.Codec<unknown, any, never, never>;
1102
+ handler: (input: Record<string, unknown>, ctx: RestRouteContext) => unknown;
1103
+ mapFailure?: (error: unknown, request: Pick< PluginHttpRouteRequest, "method" | "path" | "query">) => unknown;
1104
+ summary?: string;
1105
+ description?: string;
1106
+ example?: RestRouteExample;
1107
+ operationId?: string;
1108
+ tags?: ReadonlyArray<string>;
1109
+ projection?: RestRouteProjection;
1110
+ deprecated?: string;
1111
+ sunset?: string;
1112
+ version?: `v${number}`;
1113
+ cors?: RestCors;
1114
+ credentials?: "bearer";
1115
+ rateLimit?: RestRateLimit;
1116
+ streaming?: boolean;
1117
+ etag?: boolean;
1118
+ cache?: RestCache;
1119
+ }[];
1120
+ httpRoutes: {
1121
+ handle: (req: PluginHttpRouteRequest) => Promise<{
1122
+ headers: {
1123
+ 'www-authenticate'?: string;
1124
+ 'cache-control': string;
1125
+ pragma: string;
1126
+ vary: string;
1127
+ };
1128
+ status: number;
1129
+ body?: string | Uint8Array;
1130
+ contentType?: string;
1131
+ stream?: PluginHttpRouteStream;
1132
+ cause?: unknown;
1133
+ byteStream?: PluginHttpRouteByteStream;
1134
+ }>;
1135
+ workload?: ApiWorkload;
1136
+ restContract?: RestRouteDescriptor<any, any>;
1137
+ method: "*" | "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
1138
+ answersOtherMethods?: boolean | undefined;
1139
+ path: string;
1140
+ match?: "prefix" | "exact";
1141
+ handleStream?: (req: PluginHttpRouteStreamRequest) => Promise< PluginHttpRouteResult>;
1142
+ maxBodyBytes?: number;
1143
+ originGuard?: "exempt";
1144
+ cors?: RestCors;
1145
+ credentials?: "bearer";
1146
+ }[];
1147
+ };
1148
+
1149
+ export declare interface CmsRouteDispositions {
1150
+ readonly approve: (request: {
1151
+ readonly apiKey: string;
1152
+ readonly expectedRevision: number;
1153
+ readonly definition: RouteDispositionDefinition;
1154
+ }) => Effect_2.Effect<CmsRouteDispositionApproval, RouteDispositionUnavailable>;
1155
+ readonly list: (request: {
1156
+ readonly apiKey: string;
1157
+ readonly expectedRevision?: number;
1158
+ readonly after?: string;
1159
+ readonly take?: number;
1160
+ }) => Effect_2.Effect<CmsRouteDispositionPage, RouteDispositionUnavailable>;
1161
+ }
1162
+
1163
+ export declare interface CmsRouteDispositionsOptions {
1164
+ readonly store: DataStore;
1165
+ readonly scope: ChangeFeedScope;
1166
+ readonly approvalScope: string;
1167
+ readonly readScope: string;
1168
+ readonly now?: () => number;
1169
+ }
1170
+
1171
+ /** Private approval state and history, never anonymous delivery projections. */
1172
+ export declare const cmsRouteDispositionTables: ReadonlyArray<TableLike>;
1173
+
976
1174
  /**
977
1175
  * Where a content row lives besides its tenant: the site it belongs to, the
978
1176
  * content environment (e.g. `production`, `staging`) and its locale. Three
@@ -989,8 +1187,19 @@ export declare interface CmsScope {
989
1187
 
990
1188
  export declare const cmsSearchTable: TableLike;
991
1189
 
1190
+ export declare const cmsSiteBindingRevisionsTable: TableLike;
1191
+
1192
+ export declare const cmsSiteBindingsTable: TableLike;
1193
+
992
1194
  export declare const cmsSiteDomainsTable: TableLike;
993
1195
 
1196
+ export declare interface CmsSiteScope {
1197
+ readonly tenantId: string;
1198
+ readonly site: string;
1199
+ }
1200
+
1201
+ export declare const cmsSiteStateHeadsTable: TableLike;
1202
+
994
1203
  export declare const cmsStewardshipTable: TableLike;
995
1204
 
996
1205
  /** Who is invited with which role. */
@@ -1066,6 +1275,20 @@ export declare const compileCacheIdentity: (contract: CacheContract, request: Ca
1066
1275
  readonly tags?: ReadonlyArray<string>;
1067
1276
  }) => CacheIdentity;
1068
1277
 
1278
+ export declare interface CompiledSiteDelivery<D extends SiteDeliveryDefinition = SiteDeliveryDefinition> {
1279
+ readonly definition: D;
1280
+ readonly contentLocales: readonly [ContentLocale<D>, ...ContentLocale<D>[]];
1281
+ readonly defaultLocale: ContentLocale<D>;
1282
+ readonly sourceLocale: ContentLocale<D>;
1283
+ readonly fallback: Readonly<Record<ContentLocale<D>, ReadonlyArray<ContentLocale<D>>>>;
1284
+ readonly prefixes: Readonly<Record<ContentLocale<D>, string>>;
1285
+ readonly tags: Readonly<Record<ContentLocale<D>, string>>;
1286
+ readonly directions: Readonly<Record<ContentLocale<D>, 'ltr' | 'rtl'>>;
1287
+ }
1288
+
1289
+ /** Compile the one graph used by API and frontend; fallback is ordered depth-first, with each locale visited once. */
1290
+ export declare const compileSiteDelivery: <const D extends SiteDeliveryDefinition>(input: D) => CompiledSiteDelivery<D>;
1291
+
1069
1292
  declare type ComponentBlock = Extract<RichBlock, {
1070
1293
  readonly type: 'component';
1071
1294
  }>;
@@ -1134,6 +1357,11 @@ export declare type ConsentChoices = Readonly<Record<string, number>>;
1134
1357
  */
1135
1358
  export declare const consentContentSecurityPolicy: (purposes: ReadonlyArray<ConsentPurpose>, choices: ConsentChoices, base?: string) => string;
1136
1359
 
1360
+ /** Every current purpose was either refused or allowed in its current version.
1361
+ * A missing or superseded choice needs another decision without discarding
1362
+ * still-valid grants for other purposes. */
1363
+ export declare const consentDecisionComplete: (purposes: ReadonlyArray<Pick<ConsentPurpose, "id" | "version">>, choices: ConsentChoices | undefined) => boolean;
1364
+
1137
1365
  /** The origins of the vendors whose purpose the reader granted in its current version. */
1138
1366
  export declare const consentedOrigins: (purposes: ReadonlyArray<ConsentPurpose>, choices: ConsentChoices) => ReadonlyArray<string>;
1139
1367
 
@@ -1393,6 +1621,36 @@ declare const ContentIdConflict_base: Schema_2.Class<ContentIdConflict, Schema_2
1393
1621
  readonly id: Schema_2.String;
1394
1622
  }>, YieldableError>;
1395
1623
 
1624
+ declare type ContentLocale<D extends SiteDeliveryDefinition> = D['locales'][number]['contentLocale'];
1625
+
1626
+ export declare interface ContentLocation {
1627
+ /** Stable mapping identity. Changing a slug/path must not change this ID. */
1628
+ readonly id: string;
1629
+ readonly segments: ReadonlyArray<ContentLocationSegment>;
1630
+ }
1631
+
1632
+ export declare interface ContentLocationContext {
1633
+ /** Decoded absolute locale prefix, or the empty string for the root locale. */
1634
+ readonly prefix: string;
1635
+ /** Decoded path from buildTree, required only by a tree segment. */
1636
+ readonly treePath?: string;
1637
+ }
1638
+
1639
+ /** A decoded literal segment, one string field, or the complete content-tree path. */
1640
+ export declare type ContentLocationSegment = string | {
1641
+ readonly field: string;
1642
+ } | {
1643
+ readonly tree: true;
1644
+ };
1645
+
1646
+ /** Invalid location mapping or missing/unsafe decoded path input. */
1647
+ export declare class ContentLocationUnavailable extends ContentLocationUnavailable_base {
1648
+ }
1649
+
1650
+ declare const ContentLocationUnavailable_base: Schema_2.Class<ContentLocationUnavailable, Schema_2.TaggedStruct<"ContentLocationUnavailable", {
1651
+ readonly reason: Schema_2.Literals<readonly ["definition", "field", "tree", "path", "bounds"]>;
1652
+ }>, YieldableError>;
1653
+
1396
1654
  /**
1397
1655
  * Raised by `publish` / `unpublish` / `archive` when the row id doesn't
1398
1656
  * exist in the caller's scope. On a tenant-scoped request store this is
@@ -1434,6 +1692,60 @@ export declare interface ContentQuery {
1434
1692
  }>;
1435
1693
  }
1436
1694
 
1695
+ export declare interface ContentSeoDefaults {
1696
+ readonly title?: string;
1697
+ readonly description?: string;
1698
+ readonly social?: {
1699
+ readonly title?: string;
1700
+ readonly description?: string;
1701
+ };
1702
+ readonly robots?: SeoRobotsPolicy;
1703
+ readonly sitemap?: boolean;
1704
+ }
1705
+
1706
+ export declare interface ContentSeoDefinition {
1707
+ readonly version: 1;
1708
+ readonly title: SeoTextMapping;
1709
+ readonly description?: SeoTextMapping;
1710
+ readonly social?: {
1711
+ readonly title?: SeoTextMapping;
1712
+ readonly description?: SeoTextMapping;
1713
+ readonly image?: string;
1714
+ };
1715
+ /** Route addresses remain authoritative; no independent URL field mapping. */
1716
+ readonly canonical?: 'route' | 'omit';
1717
+ readonly robots?: SeoRobotsPolicy;
1718
+ readonly sitemap?: boolean;
1719
+ readonly structuredData?: {
1720
+ readonly type: 'WebPage' | 'Article' | 'BlogPosting';
1721
+ /** A field the rendered main content actually shows, not the SEO override. */
1722
+ readonly title: string;
1723
+ readonly description?: string;
1724
+ readonly datePublished?: string;
1725
+ };
1726
+ }
1727
+
1728
+ export declare interface ContentSeoFinding {
1729
+ readonly kind: 'missing' | 'invalid' | 'recommendation';
1730
+ readonly target: string;
1731
+ readonly field: string | null;
1732
+ readonly rule: 'required' | 'text' | 'date' | 'recommendedMaxLength';
1733
+ }
1734
+
1735
+ export declare interface ContentSeoScope {
1736
+ readonly site: string;
1737
+ readonly environment: string;
1738
+ readonly locale: string;
1739
+ }
1740
+
1741
+ /** Invalid editorial SEO declaration or projected input; browser-safe. */
1742
+ export declare class ContentSeoUnavailable extends ContentSeoUnavailable_base {
1743
+ }
1744
+
1745
+ declare const ContentSeoUnavailable_base: Schema_2.Class<ContentSeoUnavailable, Schema_2.TaggedStruct<"ContentSeoUnavailable", {
1746
+ readonly reason: Schema_2.Literals<readonly ["definition", "field", "defaults", "values", "scope"]>;
1747
+ }>, YieldableError>;
1748
+
1437
1749
  export declare type ContentStatus = (typeof CONTENT_STATUSES)[number];
1438
1750
 
1439
1751
  /** A registered content type. */
@@ -1442,6 +1754,8 @@ export declare interface ContentType {
1442
1754
  readonly displayName: string;
1443
1755
  readonly pluralName: string;
1444
1756
  readonly fields: Readonly<Record<string, FieldSchema>>;
1757
+ /** Original-file field of a versioned asset document. */
1758
+ readonly asset?: AssetConfig;
1445
1759
  readonly list?: ListConfig;
1446
1760
  readonly idPrefix?: string;
1447
1761
  /** Declared ISR revalidations fired by `revalidateContent` — see
@@ -1451,6 +1765,12 @@ export declare interface ContentType {
1451
1765
  readonly tree?: TreeConfig;
1452
1766
  /** The field a document outside a tree is addressed by — see `ContentTypeSpec.address`. */
1453
1767
  readonly address?: string;
1768
+ /** Serializable delivery paths with stable mapping IDs; no publish reservation implied. */
1769
+ readonly locations?: ReadonlyArray<ContentLocation>;
1770
+ /** Required/invalid mapped values block publication; length recommendations do not. */
1771
+ readonly seo?: ContentSeoDefinition;
1772
+ /** Explicit delivery definitions supplying locale-specific SEO defaults. Requires `seo`. */
1773
+ readonly seoSites?: ReadonlyArray<SiteDeliveryDefinition>;
1454
1774
  /** Whether publishing needs an approved revision — see `ContentTypeSpec.review`. */
1455
1775
  readonly review?: {
1456
1776
  readonly required: boolean | 'workspace';
@@ -1482,6 +1802,8 @@ export declare interface ContentTypeSpec {
1482
1802
  readonly displayName: string;
1483
1803
  readonly pluralName: string;
1484
1804
  readonly fields: Readonly<Record<string, FieldSchema | PipeableField>>;
1805
+ /** Explicit asset identity; the original is a required Media field. */
1806
+ readonly asset?: AssetConfig;
1485
1807
  readonly list?: ListConfig;
1486
1808
  /** Override the TypeID prefix for awkward plurals / long names. */
1487
1809
  readonly idPrefix?: string;
@@ -1499,6 +1821,12 @@ export declare interface ContentTypeSpec {
1499
1821
  * page in a tree does. Read it with `redirectTarget(store, type, path, scope)`.
1500
1822
  */
1501
1823
  readonly address?: string;
1824
+ /** Serializable delivery paths with stable mapping IDs; no publish reservation implied. */
1825
+ readonly locations?: ReadonlyArray<ContentLocation>;
1826
+ /** Required/invalid mapped values block publication; length recommendations do not. */
1827
+ readonly seo?: ContentSeoDefinition;
1828
+ /** Explicit delivery definitions supplying locale-specific SEO defaults. Requires `seo`. */
1829
+ readonly seoSites?: ReadonlyArray<SiteDeliveryDefinition>;
1502
1830
  /**
1503
1831
  * `required: true` publishes only revisions another editor approved
1504
1832
  * (`approveReview`) — for every path that publishes: single, release,
@@ -1537,7 +1865,8 @@ export declare interface ContentTypeSpec {
1537
1865
  /**
1538
1866
  * Append every publish and take-down of this type to the change feed
1539
1867
  * (`cms_changes`, read with `readChanges`), in the same transaction. Register
1540
- * `cmsChangesTable` when set.
1868
+ * `cmsChangesTable` and `cmsChangeHeadsTable` for every publication writer;
1869
+ * this flag controls event emission, not publication coordination.
1541
1870
  */
1542
1871
  readonly changeFeed?: boolean;
1543
1872
  /**
@@ -1698,7 +2027,7 @@ export declare type CopyDocumentResult = {
1698
2027
  };
1699
2028
 
1700
2029
  /** Effect form of {@link copyEnvironment}. */
1701
- export declare const copyEnvironment: (...args: Parameters<typeof copyEnvironment_2>) => Effect<CopyEnvironmentResult, never, never>;
2030
+ export declare const copyEnvironment: (...args: Parameters<typeof copyEnvironment_2>) => Effect<CopyEnvironmentResult, PublicRouteRegistryUnavailable | ChangeFeedUnavailable, never>;
1702
2031
 
1703
2032
  /**
1704
2033
  * Fill `to` from `from`, within one site. Refused unless `to` holds no variant
@@ -1730,6 +2059,8 @@ export declare const copyOrigin: (...args: Parameters<typeof copyOrigin_2>) => E
1730
2059
  /** What a document was copied from, or null when it is an original. */
1731
2060
  declare const copyOrigin_2: (store: DataStore, documentId: string) => Promise<CopyOrigin | null>;
1732
2061
 
2062
+ export declare const copyRouteDispositionDefinition: (value: unknown) => RouteDispositionDefinition;
2063
+
1733
2064
  /**
1734
2065
  * A standalone CMS client for build-time consumption (the blog
1735
2066
  * template's CMS mode), where there is no request handle. Same surface
@@ -1742,6 +2073,8 @@ export declare const createCmsClient: (config: {
1742
2073
  secret?: string;
1743
2074
  }) => CmsApi;
1744
2075
 
2076
+ export declare const createCmsRouteDispositions: (configured: CmsRouteDispositionsOptions) => CmsRouteDispositions;
2077
+
1745
2078
  /** Effect form of {@link createCollection}. */
1746
2079
  export declare const createCollection: (...args: Parameters<typeof createCollection_2>) => Effect<Collection, never, never>;
1747
2080
 
@@ -1751,6 +2084,14 @@ declare const createCollection_2: (tx: DataStore, scope: Pick<CmsScope, "site" |
1751
2084
  readonly description?: string;
1752
2085
  }) => Promise<Collection>;
1753
2086
 
2087
+ export declare const createEnvironmentAlias: (...args: Parameters<typeof createEnvironmentAlias_2>) => Effect<EnvironmentAlias, EnvironmentAliasUnavailable, never>;
2088
+
2089
+ /** Create a stable name pointing directly at a configured physical environment. */
2090
+ declare const createEnvironmentAlias_2: (tx: DataStore, scope: EnvironmentAliasScope, environments: ReadonlyArray<string>, input: {
2091
+ readonly name: string;
2092
+ readonly environment: string;
2093
+ }) => Promise<EnvironmentAlias>;
2094
+
1754
2095
  /** Effect form of {@link createPortal}. */
1755
2096
  export declare const createPortal: (...args: Parameters<typeof createPortal_2>) => Effect<CreatePortalResult, never, never>;
1756
2097
 
@@ -2005,6 +2346,15 @@ export declare const defineComponent: (spec: {
2005
2346
  readonly migrations?: ComponentDefinition["migrations"];
2006
2347
  }) => ComponentDefinition;
2007
2348
 
2349
+ /** Validate and detach a bounded, JSON-only set of stable location mappings. */
2350
+ export declare const defineContentLocations: (input: ReadonlyArray<ContentLocation>) => ReadonlyArray<ContentLocation>;
2351
+
2352
+ /** Detach a bounded JSON-only declaration; getters/functions/unknown keys refuse. */
2353
+ export declare const defineContentSeo: (input: ContentSeoDefinition) => ContentSeoDefinition;
2354
+
2355
+ /** Locale-specific text and editorial policy defaults, not an access decision. */
2356
+ export declare const defineContentSeoDefaults: (input: ContentSeoDefaults) => ContentSeoDefaults;
2357
+
2008
2358
  export declare const defineContentType: (spec: ContentTypeSpec) => ContentType;
2009
2359
 
2010
2360
  /**
@@ -2044,6 +2394,13 @@ export declare const defineRichTextProfile: (spec: {
2044
2394
  readonly contactLiterals?: boolean;
2045
2395
  }) => RichTextProfile;
2046
2396
 
2397
+ /**
2398
+ * Copy and validate the explicit site delivery graph. This performs no tag
2399
+ * inference, registry lookup, source migration or content writes. Authoring
2400
+ * supplies approved profiles; the complete definition is pinned with app code.
2401
+ */
2402
+ export declare const defineSiteDelivery: <const D extends SiteDeliveryDefinition>(input: D) => D;
2403
+
2047
2404
  /** Effect form of {@link delegateStep}. */
2048
2405
  export declare const delegateStep: (...args: Parameters<typeof delegateStep_2>) => Effect<{
2049
2406
  readonly ok: true;
@@ -2324,6 +2681,40 @@ export declare const emptyRichDocument: () => RichDocument;
2324
2681
  /** The intent as a URL parameter value (`?select=…`). */
2325
2682
  export declare const encodeSelectionIntent: (intent: SelectionIntent) => string;
2326
2683
 
2684
+ export declare interface EnvironmentAlias {
2685
+ readonly id: string;
2686
+ readonly name: string;
2687
+ readonly environment: string;
2688
+ readonly revisionId: string;
2689
+ }
2690
+
2691
+ export declare interface EnvironmentAliasRevision {
2692
+ readonly id: string;
2693
+ readonly aliasId: string;
2694
+ readonly environment: string;
2695
+ readonly previousRevisionId: string | null;
2696
+ readonly action: 'created' | 'swapped' | 'rolledBack';
2697
+ readonly sourceRevisionId: string | null;
2698
+ }
2699
+
2700
+ export declare const environmentAliasRevision: (...args: Parameters<typeof environmentAliasRevision_2>) => Effect<EnvironmentAliasRevision, EnvironmentAliasUnavailable, never>;
2701
+
2702
+ /** Read a revision of this alias only; previousRevisionId supports bounded history traversal. */
2703
+ declare const environmentAliasRevision_2: (store: DataStore, scope: EnvironmentAliasScope, name: string, revisionId: string) => Promise<EnvironmentAliasRevision>;
2704
+
2705
+ export declare interface EnvironmentAliasScope {
2706
+ readonly tenantId: string;
2707
+ readonly site: string;
2708
+ }
2709
+
2710
+ /** An environment alias never falls back to a literal environment or stale target. */
2711
+ export declare class EnvironmentAliasUnavailable extends EnvironmentAliasUnavailable_base {
2712
+ }
2713
+
2714
+ declare const EnvironmentAliasUnavailable_base: Schema_2.Class<EnvironmentAliasUnavailable, Schema_2.TaggedStruct<"EnvironmentAliasUnavailable", {
2715
+ readonly reason: Schema_2.Literals<readonly ["scope", "name", "target", "missing", "conflict", "revision", "state"]>;
2716
+ }>, YieldableError>;
2717
+
2327
2718
  export declare interface EnvironmentDifference {
2328
2719
  readonly contentType: string;
2329
2720
  /** Documents (with a variant) in `from` only, and in `to` only. */
@@ -2792,7 +3183,7 @@ export declare const glossaryProblems: (text: string, entries: ReadonlyArray<Glo
2792
3183
  }>;
2793
3184
 
2794
3185
  /** The purposes whose current version the reader allowed. */
2795
- export declare const grantedPurposes: (purposes: ReadonlyArray<ConsentPurpose>, choices: ConsentChoices) => ReadonlySet<string>;
3186
+ export declare const grantedPurposes: (purposes: ReadonlyArray<Pick<ConsentPurpose, "id" | "version">>, choices: ConsentChoices) => ReadonlySet<string>;
2796
3187
 
2797
3188
  /** Which content the graph is read from. */
2798
3189
  export declare type GraphPerspective = 'published' | 'draft' | {
@@ -2916,6 +3307,23 @@ export declare interface InheritRule {
2916
3307
  readonly mask?: string;
2917
3308
  }
2918
3309
 
3310
+ /** Effect form of the explicit deployment upgrade. */
3311
+ export declare const initializeChangeFeed: (...args: Parameters<typeof initializeChangeFeed_2>) => Effect<number, ChangeFeedUnavailable, never>;
3312
+
3313
+ /**
3314
+ * One-time additive upgrade, IN THE CALLER'S TRANSACTION, with old writers
3315
+ * stopped. Retains historical IDs/order. Never resequences an issued position.
3316
+ * Bounded batches keep migration memory independent of the backlog size.
3317
+ */
3318
+ declare const initializeChangeFeed_2: (tx: DataStore, scope: ChangeFeedScope) => Promise<number>;
3319
+
3320
+ /** In the caller's transaction with cmsPublicRouteTables and ordinary CMS
3321
+ * revision/change/path tables applied. Existing unknown history refuses;
3322
+ * identical initialization is idempotent, configuration changes hold. */
3323
+ export declare const initializeCmsPublicRoutes: (tx: DataStore, scope: ChangeFeedScope, declaration: CmsPublicRouteDeclaration, options?: {
3324
+ readonly now?: number;
3325
+ }) => Effect<CmsPublicRouteInitialization, PublicRouteRegistryUnavailable | ChangeFeedUnavailable | SiteStateUnavailable, never>;
3326
+
2919
3327
  /** The minimal DOM a surface is read from (a browser element, or jsdom's). */
2920
3328
  export declare interface InlineDomNode {
2921
3329
  readonly nodeType: number;
@@ -3654,13 +4062,13 @@ export declare const previewToken: (type: string, id: string, options?: {
3654
4062
  }) => string;
3655
4063
 
3656
4064
  /** Effect form of {@link primaryDomain}. */
3657
- export declare const primaryDomain: (...args: Parameters<typeof primaryDomain_2>) => Effect<string | null, never, never>;
4065
+ export declare const primaryDomain: (...args: Parameters<typeof primaryDomain_2>) => Effect<string | null, SiteStateUnavailable, never>;
3658
4066
 
3659
4067
  /** The site's primary domain, or null. */
3660
- declare const primaryDomain_2: (store: DataStore, site: string) => Promise<string | null>;
4068
+ declare const primaryDomain_2: (store: DataStore, scope: CmsSiteScope) => Promise<string | null>;
3661
4069
 
3662
4070
  /** Effect form of {@link promote}. */
3663
- export declare const promote: (...args: Parameters<typeof promote_2>) => Effect<PromotionResult, ContentValidationFailed | ContentNotFound | ContentIdConflict | RevisionMismatch | ReleaseNotEditable | ReviewRequired | ReferenceUnavailable, never>;
4071
+ export declare const promote: (...args: Parameters<typeof promote_2>) => Effect<PromotionResult, PublicRouteRegistryUnavailable | ContentValidationFailed | ContentNotFound | ContentIdConflict | RevisionMismatch | ReleaseNotEditable | ReviewRequired | ReferenceUnavailable | ChangeFeedUnavailable, never>;
3664
4072
 
3665
4073
  /**
3666
4074
  * Promote the chosen documents from `pair.from` into `pair.to` as one release
@@ -3721,11 +4129,23 @@ declare const proposeCandidate_2: (tx: DataStore, type: ContentType, variantId:
3721
4129
  readonly reason: "notFound" | "empty";
3722
4130
  }>;
3723
4131
 
4132
+ export declare interface PublicRouteIdentity {
4133
+ readonly url: string;
4134
+ readonly routeId: string;
4135
+ }
4136
+
4137
+ export declare class PublicRouteRegistryUnavailable extends PublicRouteRegistryUnavailable_base {
4138
+ }
4139
+
4140
+ declare const PublicRouteRegistryUnavailable_base: Schema_2.Class<PublicRouteRegistryUnavailable, Schema_2.TaggedStruct<"PublicRouteRegistryUnavailable", {
4141
+ readonly reason: Schema_2.Literals<readonly ["scope", "definition", "configuration", "history", "state", "revision", "conflict", "bounds", "location"]>;
4142
+ }>, YieldableError>;
4143
+
3724
4144
  /** Effect-native `publish` (see {@link saveDraftEffect}). */
3725
- export declare const publish: (store: DataStore, type: ContentType, id: string, scope: CmsScope, options?: PublishOptions) => Effect_2.Effect<Row, ContentNotFound | RevisionMismatch | ReviewRequired | ReferenceUnavailable | ContentValidationFailed>;
4145
+ export declare const publish: (store: DataStore, type: ContentType, id: string, scope: CmsScope, options?: PublishOptions) => Effect_2.Effect<Row, ContentNotFound | RevisionMismatch | ReviewRequired | ReferenceUnavailable | ContentValidationFailed | ChangeFeedUnavailable | PublicRouteRegistryUnavailable>;
3726
4146
 
3727
4147
  /** Effect form of {@link publishDue}. */
3728
- export declare const publishDue: (...args: Parameters<typeof publishDue_2>) => Effect<readonly string[], never, never>;
4148
+ export declare const publishDue: (...args: Parameters<typeof publishDue_2>) => Effect<readonly string[], ContentValidationFailed | ChangeFeedUnavailable, never>;
3729
4149
 
3730
4150
  /**
3731
4151
  * Publish every draft of `type` whose scheduled `publishAt` has passed
@@ -3765,7 +4185,7 @@ export declare interface PublishOptions {
3765
4185
  }
3766
4186
 
3767
4187
  /** Effect form of {@link publishRelease}. */
3768
- export declare const publishRelease: (...args: Parameters<typeof publishRelease_2>) => Effect<Readonly<Record<string, unknown>>, ContentNotFound | ReleaseNotEditable | ReviewRequired | ReferenceUnavailable, never>;
4188
+ export declare const publishRelease: (...args: Parameters<typeof publishRelease_2>) => Effect<Readonly<Record<string, unknown>>, PublicRouteRegistryUnavailable | ContentNotFound | ReleaseNotEditable | ReviewRequired | ReferenceUnavailable | ChangeFeedUnavailable, never>;
3769
4189
 
3770
4190
  declare const publishRelease_2: (tx: DataStore, types: ReadonlyArray<ContentType>, releaseId: string, now?: Date, options?: PublishReleaseOptions) => Promise<Row>;
3771
4191
 
@@ -3774,7 +4194,7 @@ export declare interface PublishReleaseOptions {
3774
4194
  }
3775
4195
 
3776
4196
  /** Effect-native `publishRevision` (see {@link saveDraftEffect}). */
3777
- export declare const publishRevision: (tx: DataStore, type: ContentType, id: string, scope: CmsScope, revisionId: string, origin?: ChangeOrigin) => Effect_2.Effect<Row, ContentNotFound | RevisionMismatch | ReviewRequired | ReferenceUnavailable | ContentValidationFailed>;
4197
+ export declare const publishRevision: (tx: DataStore, type: ContentType, id: string, scope: CmsScope, revisionId: string, origin?: ChangeOrigin) => Effect_2.Effect<Row, ContentNotFound | RevisionMismatch | ReviewRequired | ReferenceUnavailable | ContentValidationFailed | ChangeFeedUnavailable | PublicRouteRegistryUnavailable>;
3778
4198
 
3779
4199
  /** A series as the editor shows it. */
3780
4200
  export declare interface PublishSeries {
@@ -3913,18 +4333,24 @@ declare const QuotaExceeded_base: Schema_2.Class<QuotaExceeded, Schema_2.TaggedS
3913
4333
  readonly used: Schema_2.Number;
3914
4334
  }>, YieldableError>;
3915
4335
 
4336
+ /** Effect form of the latest committed checkpoint. */
4337
+ export declare const readChangeCheckpoint: (...args: Parameters<typeof readChangeCheckpoint_2>) => Effect<string | null, ChangeFeedUnavailable, never>;
4338
+
4339
+ /** Latest committed change ID; ordinary consumer reads do not take write locks. */
4340
+ declare const readChangeCheckpoint_2: (store: DataStore, place: ChangeFeedScope) => Promise<string | null>;
4341
+
3916
4342
  /** Effect form of {@link readChanges}. */
3917
4343
  export declare const readChanges: (...args: Parameters<typeof readChanges_2>) => Effect<{
3918
4344
  readonly items: ReadonlyArray<ChangeEntry>;
3919
4345
  readonly next: string | null;
3920
- }, never, never>;
4346
+ }, ChangeFeedUnavailable, never>;
3921
4347
 
3922
4348
  /**
3923
4349
  * The changes in a site and environment after `after`, oldest first. Keep
3924
4350
  * `next` and pass it as `after` next time; it stays put when nothing new has
3925
4351
  * settled, so polling with it never skips.
3926
4352
  */
3927
- declare const readChanges_2: (store: DataStore, place: Pick<CmsScope, "site" | "environment">, options?: ReadChangesOptions) => Promise<{
4353
+ declare const readChanges_2: (store: DataStore, place: ChangeFeedScope, options?: ReadChangesOptions) => Promise<{
3928
4354
  readonly items: ReadonlyArray<ChangeEntry>;
3929
4355
  readonly next: string | null;
3930
4356
  }>;
@@ -3932,9 +4358,11 @@ declare const readChanges_2: (store: DataStore, place: Pick<CmsScope, "site" | "
3932
4358
  export declare interface ReadChangesOptions {
3933
4359
  /** The `next` of the previous read; omit to start at the beginning. */
3934
4360
  readonly after?: string;
4361
+ /** Inclusive upper checkpoint from readChangeCheckpoint; later commits wait for the next scan. */
4362
+ readonly through?: string;
3935
4363
  /** At most this many (default 100). */
3936
4364
  readonly limit?: number;
3937
- /** Leave out changes younger than this (default 2000 ms) — see the file header. */
4365
+ /** Pause at the first change younger than this (default 2000 ms); 0 disables freshness waiting. */
3938
4366
  readonly settleMs?: number;
3939
4367
  /** Equality filters, e.g. the tenant for a reader that carries none. */
3940
4368
  readonly filter?: Readonly<Record<string, unknown>>;
@@ -3953,6 +4381,12 @@ export declare const readEditorMessage: (event: VisualMessageEvent, session: Vis
3953
4381
  /** The preview's message, or null for anything else (another origin, another session, another shape). */
3954
4382
  export declare const readPreviewMessage: (event: VisualMessageEvent, session: VisualSession) => PreviewMessage | null;
3955
4383
 
4384
+ /** Effect form of the bounded editorial history. */
4385
+ export declare const readRecentChanges: (...args: Parameters<typeof readRecentChanges_2>) => Effect<readonly ChangeEntry[], ChangeFeedUnavailable, never>;
4386
+
4387
+ /** Bounded editorial history, newest committed position first, without freshness waiting. */
4388
+ declare const readRecentChanges_2: (store: DataStore, place: ChangeFeedScope, limit?: number) => Promise<ReadonlyArray<ChangeEntry>>;
4389
+
3956
4390
  /**
3957
4391
  * What a reader gets at an address: the revision id it carries, `gone` when it
3958
4392
  * answers without content (404/410), or an HTTP status as text. The app
@@ -4004,6 +4438,27 @@ declare const recertify_2: (store: DataStore, type: ContentType, documentId: str
4004
4438
  readonly now?: Date;
4005
4439
  }) => Promise<Stewardship>;
4006
4440
 
4441
+ /** Effect form of the explicit archival-history repair. */
4442
+ export declare const reconcileArchivedPublications: (...args: Parameters<typeof reconcileArchivedPublications_2>) => Effect<number, ChangeFeedUnavailable, never>;
4443
+
4444
+ /**
4445
+ * Explicit deployment repair for archives created before archival emitted a
4446
+ * take-down. Stop publication writers and use one caller-owned transaction,
4447
+ * after initializeChangeFeed. Append missing take-downs at the current tail;
4448
+ * never backdate events or rewrite previously issued identities/positions.
4449
+ * Only change-feed types and archived published copies in this scope qualify.
4450
+ */
4451
+ declare const reconcileArchivedPublications_2: (tx: DataStore, types: ReadonlyArray<ContentType>, scope: ChangeFeedScope) => Promise<number>;
4452
+
4453
+ /** In the actual caller transaction. Existing exact initialization remains the
4454
+ * fresh-scope API; use this explicit CAS only for an admitted existing scope.
4455
+ * Changed declarations reserve their complete actual final graph atomically.
4456
+ * Exact latest retries return the same revision, never another binding record. */
4457
+ export declare const reconfigureCmsPublicRoutes: (tx: DataStore, supplied: ChangeFeedScope, declaration: CmsPublicRouteDeclaration, options: {
4458
+ readonly expectedRevision: number;
4459
+ readonly now?: number;
4460
+ }) => Effect<CmsPublicRouteInitialization, PublicRouteRegistryUnavailable | ChangeFeedUnavailable | SiteStateUnavailable, never>;
4461
+
4007
4462
  /** Effect form of {@link recordAiOperation}. */
4008
4463
  export declare const recordAiOperation: (...args: Parameters<typeof recordAiOperation_2>) => Effect<string, never, never>;
4009
4464
 
@@ -4011,9 +4466,9 @@ export declare const recordAiOperation: (...args: Parameters<typeof recordAiOper
4011
4466
  declare const recordAiOperation_2: (tx: DataStore, input: AiOperationInput) => Promise<string>;
4012
4467
 
4013
4468
  /** Effect form of {@link recordChange}. */
4014
- export declare const recordChange: (...args: Parameters<typeof recordChange_2>) => Effect<void, never, never>;
4469
+ export declare const recordChange: (...args: Parameters<typeof recordChange_2>) => Effect<void, ChangeFeedUnavailable, never>;
4015
4470
 
4016
- /** Append one change, in the caller's transaction. A type without `changeFeed` writes nothing. */
4471
+ /** Advance publication generation atomically; only opted-in types append a feed event. */
4017
4472
  declare const recordChange_2: (tx: DataStore, type: ContentType, row: Row, scope: CmsScope, action: "published" | "unpublished", origin?: ChangeOrigin) => Promise<void>;
4018
4473
 
4019
4474
  /** Effect form of {@link recordCutoverIssues}. */
@@ -4057,14 +4512,9 @@ export declare const recordMigrationRecords: (...args: Parameters<typeof recordM
4057
4512
  declare const recordMigrationRecords_2: (tx: DataStore, source: string, records: ReadonlyArray<MigrationRecord>, tenantId: string | null, now?: Date) => Promise<void>;
4058
4513
 
4059
4514
  /** Effect form of {@link recordPaths}. */
4060
- export declare const recordPaths: (...args: Parameters<typeof recordPaths_2>) => Effect<void, never, never>;
4515
+ export declare const recordPaths: (...args: Parameters<typeof recordPaths_2>) => Effect<void, ChangeFeedUnavailable, never>;
4061
4516
 
4062
- /**
4063
- * Record the paths of a tree type's published documents in `scope` — or, for
4064
- * a type with an `address` field, each document's address — turning every
4065
- * changed one into a redirect. Runs after a publish or unpublish, in the
4066
- * caller's transaction. A type with neither is left alone.
4067
- */
4517
+ /** Standalone path maintenance shares the publication boundary; no content event is invented. */
4068
4518
  declare const recordPaths_2: (tx: DataStore, type: ContentType, scope: CmsScope, tenantId: unknown) => Promise<void>;
4069
4519
 
4070
4520
  /** Effect form of {@link recordPortalDownload}. */
@@ -4249,10 +4699,10 @@ export declare const removeDomain: (...args: Parameters<typeof removeDomain_2>)
4249
4699
  } | {
4250
4700
  readonly ok: false;
4251
4701
  readonly reason: "notFound" | "primary";
4252
- }, never, never>;
4702
+ }, PublicRouteRegistryUnavailable | ChangeFeedUnavailable | SiteStateUnavailable, never>;
4253
4703
 
4254
4704
  /** Remove a domain. The primary one is removed only after another took its place. */
4255
- declare const removeDomain_2: (tx: DataStore, domainId: string) => Promise<{
4705
+ declare const removeDomain_2: (tx: DataStore, scope: CmsSiteScope, domainId: string) => Promise<{
4256
4706
  readonly ok: true;
4257
4707
  } | {
4258
4708
  readonly ok: false;
@@ -4272,14 +4722,14 @@ export declare const removeGlossaryTerm: (...args: Parameters<typeof removeGloss
4272
4722
  declare const removeGlossaryTerm_2: (tx: DataStore, tenantId: string, entryId: string) => Promise<boolean>;
4273
4723
 
4274
4724
  /** Effect form of {@link removeRedirect}. */
4275
- export declare const removeRedirect: (...args: Parameters<typeof removeRedirect_2>) => Effect<boolean, never, never>;
4725
+ export declare const removeRedirect: (...args: Parameters<typeof removeRedirect_2>) => Effect<boolean, ChangeFeedUnavailable, never>;
4276
4726
 
4277
4727
  /**
4278
4728
  * Remove the redirect from `fromPath` in `scope`. True when there was one. A
4279
4729
  * page that had the address and is no longer live still answers it as gone
4280
4730
  * (`goneAt`). In the caller's transaction.
4281
4731
  */
4282
- declare const removeRedirect_2: (tx: DataStore, type: ContentType, scope: CmsScope, fromPath: string) => Promise<boolean>;
4732
+ declare const removeRedirect_2: (tx: DataStore, type: ContentType, scope: CmsScope, fromPath: string, tenantId: unknown) => Promise<boolean>;
4283
4733
 
4284
4734
  /** Effect form of {@link reopenStage}. */
4285
4735
  export declare const reopenStage: (...args: Parameters<typeof reopenStage_2>) => Effect<number, never, never>;
@@ -4393,6 +4843,14 @@ declare const requestReview_2: (store: DataStore, type: ContentType, variantId:
4393
4843
  /** The document with each suggestion accepted, rejected or kept, as `decide` says. */
4394
4844
  export declare const resolveChanges: (doc: RichDocument, decide: (change: RichChange) => ChangeDecision) => RichDocument;
4395
4845
 
4846
+ /** Resolve decoded inputs into one canonical absolute path; no host, query or live reads. */
4847
+ export declare const resolveContentLocation: (input: ContentLocation, values: Readonly<Record<string, unknown>>, context: ContentLocationContext) => string;
4848
+
4849
+ /** Project only mapped fields. Findings must be judged before publication/output.
4850
+ * Public visibility, runtime rights, robots.txt, URLs and resolved images are
4851
+ * separate admission/rendering contracts; true here is never a public grant. */
4852
+ export declare const resolveContentSeo: (definition: ContentSeoDefinition, values: Readonly<Record<string, unknown>>, defaults?: ContentSeoDefaults) => ResolvedContentSeo;
4853
+
4396
4854
  /** Effect form of {@link resolveCutoverIssue}. */
4397
4855
  export declare const resolveCutoverIssue: (...args: Parameters<typeof resolveCutoverIssue_2>) => Effect<ResolveIssueResult, never, never>;
4398
4856
 
@@ -4402,6 +4860,28 @@ declare const resolveCutoverIssue_2: (tx: DataStore, issueId: string, input: {
4402
4860
  readonly actorId: string;
4403
4861
  }, now?: Date) => Promise<ResolveIssueResult>;
4404
4862
 
4863
+ export declare interface ResolvedContentSeo {
4864
+ readonly title: string | null;
4865
+ readonly description: string | null;
4866
+ readonly canonical: 'route' | 'omit';
4867
+ readonly robots: SeoRobotsPolicy;
4868
+ readonly sitemap: boolean;
4869
+ readonly social: {
4870
+ readonly title: string | null;
4871
+ readonly description: string | null;
4872
+ readonly imageKey: string | null;
4873
+ };
4874
+ /** Typed semantic values; a renderer adds the admitted URL, locale and media. */
4875
+ readonly structuredData: {
4876
+ readonly type: 'WebPage' | 'Article' | 'BlogPosting';
4877
+ readonly title: string;
4878
+ readonly description: string | null;
4879
+ readonly datePublished: string | null;
4880
+ } | null;
4881
+ readonly sources: Readonly<Record<string, string | null>>;
4882
+ readonly findings: ReadonlyArray<ContentSeoFinding>;
4883
+ }
4884
+
4405
4885
  /** One published entry found by {@link CmsApi.resolve}, with where it came from. */
4406
4886
  export declare interface ResolvedEntry {
4407
4887
  /** The published row that answers the request. */
@@ -4444,6 +4924,11 @@ export declare type ResolvedPreviewShare = {
4444
4924
  readonly reason: 'unknown' | 'expired' | 'revoked';
4445
4925
  };
4446
4926
 
4927
+ export declare const resolveEnvironmentAlias: (...args: Parameters<typeof resolveEnvironmentAlias_2>) => Effect<EnvironmentAlias, EnvironmentAliasUnavailable, never>;
4928
+
4929
+ /** Resolve once for a request; retain the returned physical target throughout it. */
4930
+ declare const resolveEnvironmentAlias_2: (store: DataStore, scope: EnvironmentAliasScope, environments: ReadonlyArray<string>, name: string) => Promise<EnvironmentAlias>;
4931
+
4447
4932
  export declare type ResolveIssueResult = {
4448
4933
  readonly ok: true;
4449
4934
  } | {
@@ -4499,11 +4984,15 @@ export declare const resolvePreviewShare: (...args: Parameters<typeof resolvePre
4499
4984
  */
4500
4985
  declare const resolvePreviewShare_2: (store: DataStore, token: string, now?: Date) => Promise<ResolvedPreviewShare>;
4501
4986
 
4987
+ /** Project the variant's own language. Delivery fallback never supplies missing
4988
+ * publication metadata. An undeclared scope refuses even if all fields are set. */
4989
+ export declare const resolveScopedContentSeo: (policy: ScopedContentSeo, values: Readonly<Record<string, unknown>>, scope: ContentSeoScope) => ResolvedContentSeo | null;
4990
+
4502
4991
  /** Effect-native `restoreRevision` (see {@link saveDraftEffect}). */
4503
4992
  export declare const restoreRevision: (store: DataStore, type: ContentType, id: string, scope: CmsScope, revisionId: string) => Effect_2.Effect<Row, ContentValidationFailed | ContentNotFound>;
4504
4993
 
4505
4994
  /** Effect form of {@link retireDuplicate}. */
4506
- export declare const retireDuplicate: (...args: Parameters<typeof retireDuplicate_2>) => Effect<RetireDuplicateResult, ContentNotFound, never>;
4995
+ export declare const retireDuplicate: (...args: Parameters<typeof retireDuplicate_2>) => Effect<RetireDuplicateResult, ContentNotFound | ChangeFeedUnavailable, never>;
4507
4996
 
4508
4997
  /**
4509
4998
  * Retire `copyId` in favour of `keepId` — both drafts of `type` in `scope`
@@ -4800,6 +5289,11 @@ export declare interface RichDocument {
4800
5289
  readonly profile?: string;
4801
5290
  }
4802
5291
 
5292
+ export declare interface RichDocumentBlockContext {
5293
+ /** Position in the rendered document's blocks, including repeated assets. */
5294
+ readonly index: number;
5295
+ }
5296
+
4803
5297
  export declare const RichDocumentEditor: (props: RichDocumentEditorProps) => ReactNode;
4804
5298
 
4805
5299
  export declare interface RichDocumentEditorProps extends WidgetProps {
@@ -4830,6 +5324,11 @@ export declare const richDocumentFromContentful: (root: ContentfulNode | null |
4830
5324
  */
4831
5325
  export declare const richDocumentFromHtml: (html: string, options?: HtmlImportOptions) => HtmlImportResult;
4832
5326
 
5327
+ export declare interface RichDocumentInlineContext {
5328
+ /** Exact reference scalar path relative to the document, including block/list/table positions. */
5329
+ readonly fieldPath: ReadonlyArray<string | number>;
5330
+ }
5331
+
4833
5332
  /** Renders a control that picks one document of `type`. */
4834
5333
  export declare type RichDocumentPicker = (props: {
4835
5334
  readonly id: string;
@@ -4874,18 +5373,18 @@ export declare interface RichDocumentViewProps {
4874
5373
  /** A stored `Schema.RichText()` value (a plain string renders as paragraphs). */
4875
5374
  readonly document: unknown;
4876
5375
  /** The address of a linked document, or undefined when it has none (not live). */
4877
- readonly hrefOf?: (documentId: string) => string | undefined;
5376
+ readonly hrefOf?: (documentId: string, context: RichDocumentInlineContext) => string | undefined;
4878
5377
  /** Render an image block; without it, images are left out. */
4879
5378
  readonly renderImage?: (block: {
4880
5379
  readonly asset: string;
4881
5380
  readonly caption?: string;
4882
- }) => ReactNode;
5381
+ }, context: RichDocumentBlockContext) => ReactNode;
4883
5382
  /** The `mailto:` / `tel:` address of a published contact point, or undefined when it is not live. */
4884
- readonly contactHrefOf?: (documentId: string) => string | undefined;
5383
+ readonly contactHrefOf?: (documentId: string, context: RichDocumentInlineContext) => string | undefined;
4885
5384
  /** Render a component placed between the blocks; without it, components are left out. */
4886
- readonly renderComponent?: (block: ComponentBlock) => ReactNode;
5385
+ readonly renderComponent?: (block: ComponentBlock, context: RichDocumentBlockContext) => ReactNode;
4887
5386
  /** The address a download block's file is fetched from, or undefined when it is not live — then the download is left out, never a dead link. */
4888
- readonly fileHrefOf?: (asset: string) => string | undefined;
5387
+ readonly fileHrefOf?: (asset: string, context: RichDocumentBlockContext) => string | undefined;
4889
5388
  }
4890
5389
 
4891
5390
  /** A run of text inside a block. `change` marks it as suggested. */
@@ -4969,6 +5468,14 @@ export declare interface RichTextSurfaceProps {
4969
5468
  };
4970
5469
  }
4971
5470
 
5471
+ export declare const rollbackEnvironmentAlias: (...args: Parameters<typeof rollbackEnvironmentAlias_2>) => Effect<EnvironmentAlias, EnvironmentAliasUnavailable, never>;
5472
+
5473
+ /** Restore a recorded target as a NEW revision, without undoing intervening history. */
5474
+ declare const rollbackEnvironmentAlias_2: (tx: DataStore, scope: EnvironmentAliasScope, environments: ReadonlyArray<string>, name: string, input: {
5475
+ readonly expectedRevisionId: string;
5476
+ readonly revisionId: string;
5477
+ }) => Promise<EnvironmentAlias>;
5478
+
4972
5479
  /** Effect form of {@link rollbackExtension}. */
4973
5480
  export declare const rollbackExtension: (...args: Parameters<typeof rollbackExtension_2>) => Effect<ExtensionChange, never, never>;
4974
5481
 
@@ -4980,7 +5487,7 @@ export declare const rollbackExtension: (...args: Parameters<typeof rollbackExte
4980
5487
  declare const rollbackExtension_2: (tx: DataStore, extensionId: string) => Promise<ExtensionChange>;
4981
5488
 
4982
5489
  /** Effect form of {@link rollbackRelease}. */
4983
- export declare const rollbackRelease: (...args: Parameters<typeof rollbackRelease_2>) => Effect<Readonly<Record<string, unknown>>, ContentNotFound | ReleaseNotEditable | ReviewRequired | ReferenceUnavailable, never>;
5490
+ export declare const rollbackRelease: (...args: Parameters<typeof rollbackRelease_2>) => Effect<Readonly<Record<string, unknown>>, PublicRouteRegistryUnavailable | ContentNotFound | ReleaseNotEditable | ReviewRequired | ReferenceUnavailable | ChangeFeedUnavailable, never>;
4984
5491
 
4985
5492
  /**
4986
5493
  * Roll a published release back: a NEW release that puts back what each of
@@ -4990,6 +5497,79 @@ export declare const rollbackRelease: (...args: Parameters<typeof rollbackReleas
4990
5497
  */
4991
5498
  declare const rollbackRelease_2: (tx: DataStore, types: ReadonlyArray<ContentType>, releaseId: string, now?: Date, options?: PublishReleaseOptions) => Promise<Row>;
4992
5499
 
5500
+ export declare const rollbackSiteContentBinding: (...args: Parameters<typeof rollbackSiteContentBinding_2>) => Effect<SiteContentBinding, ChangeFeedUnavailable | SiteBindingUnavailable, never>;
5501
+
5502
+ /** Restore a prior target as a new revision; it must still be published in this scope. */
5503
+ declare const rollbackSiteContentBinding_2: (tx: DataStore, types: ReadonlyArray<ContentType>, scope: ChangeFeedScope, name: string, input: {
5504
+ readonly expectedRevisionId: string;
5505
+ readonly revisionId: string;
5506
+ }) => Promise<SiteContentBinding>;
5507
+
5508
+ export declare type RouteDispositionAction = {
5509
+ readonly kind: 'redirect';
5510
+ readonly status: 301 | 302;
5511
+ readonly method: 'allow-post-to-get';
5512
+ readonly target: PublicRouteIdentity;
5513
+ } | {
5514
+ readonly kind: 'redirect';
5515
+ readonly status: 307 | 308;
5516
+ readonly method: 'preserve';
5517
+ readonly target: PublicRouteIdentity;
5518
+ } | {
5519
+ readonly kind: 'gone';
5520
+ readonly status: 404 | 410;
5521
+ } | {
5522
+ readonly kind: 'hold';
5523
+ };
5524
+
5525
+ export declare interface RouteDispositionDefinition {
5526
+ readonly version: 1;
5527
+ readonly source: PublicRouteIdentity;
5528
+ readonly action: RouteDispositionAction;
5529
+ /** Inclusive lower and exclusive upper bound, UTC epoch milliseconds. */
5530
+ readonly activeFrom: number | null;
5531
+ readonly activeUntil: number | null;
5532
+ }
5533
+
5534
+ export declare const RouteDispositionDefinitionSchema: Schema_2.Struct<{
5535
+ readonly version: Schema_2.Literal<1>;
5536
+ readonly source: Schema_2.Struct<{
5537
+ readonly url: Schema_2.String;
5538
+ readonly routeId: Schema_2.String;
5539
+ }>;
5540
+ readonly action: Schema_2.Union<readonly [Schema_2.Struct<{
5541
+ readonly kind: Schema_2.Literal<"redirect">;
5542
+ readonly status: Schema_2.Literals<readonly [301, 302]>;
5543
+ readonly method: Schema_2.Literal<"allow-post-to-get">;
5544
+ readonly target: Schema_2.Struct<{
5545
+ readonly url: Schema_2.String;
5546
+ readonly routeId: Schema_2.String;
5547
+ }>;
5548
+ }>, Schema_2.Struct<{
5549
+ readonly kind: Schema_2.Literal<"redirect">;
5550
+ readonly status: Schema_2.Literals<readonly [307, 308]>;
5551
+ readonly method: Schema_2.Literal<"preserve">;
5552
+ readonly target: Schema_2.Struct<{
5553
+ readonly url: Schema_2.String;
5554
+ readonly routeId: Schema_2.String;
5555
+ }>;
5556
+ }>, Schema_2.Struct<{
5557
+ readonly kind: Schema_2.Literal<"gone">;
5558
+ readonly status: Schema_2.Literals<readonly [404, 410]>;
5559
+ }>, Schema_2.Struct<{
5560
+ readonly kind: Schema_2.Literal<"hold">;
5561
+ }>]>;
5562
+ readonly activeFrom: Schema_2.NullOr<Schema_2.Int>;
5563
+ readonly activeUntil: Schema_2.NullOr<Schema_2.Int>;
5564
+ }>;
5565
+
5566
+ export declare class RouteDispositionUnavailable extends RouteDispositionUnavailable_base {
5567
+ }
5568
+
5569
+ declare const RouteDispositionUnavailable_base: Schema_2.Class<RouteDispositionUnavailable, Schema_2.TaggedStruct<"RouteDispositionUnavailable", {
5570
+ readonly reason: Schema_2.Literals<readonly ["input", "bounds", "scope", "state", "revision", "credential", "graph", "hold"]>;
5571
+ }>, YieldableError>;
5572
+
4993
5573
  /** A path found by {@link CmsApi.route}. */
4994
5574
  export declare interface RouteMatch {
4995
5575
  /** The node for the path's document, in the requested locale's tree. Its
@@ -5184,6 +5764,12 @@ export declare const Schema: {
5184
5764
  readonly Components: (definitions: ReadonlyArray<ComponentDefinition>) => PipeableField;
5185
5765
  };
5186
5766
 
5767
+ export declare interface ScopedContentSeo {
5768
+ readonly seo?: ContentSeoDefinition;
5769
+ /** The same site declarations used by delivery; no inferred site or language. */
5770
+ readonly seoSites?: ReadonlyArray<SiteDeliveryDefinition>;
5771
+ }
5772
+
5187
5773
  /** What makes a type findable. */
5188
5774
  export declare interface SearchConfig {
5189
5775
  /** The string field ranked first — usually the title. */
@@ -5288,6 +5874,18 @@ export declare interface SelectionTarget {
5288
5874
  };
5289
5875
  }
5290
5876
 
5877
+ export declare interface SeoRobotsPolicy {
5878
+ readonly index: boolean;
5879
+ readonly follow: boolean;
5880
+ }
5881
+
5882
+ export declare interface SeoTextMapping {
5883
+ readonly fields: ReadonlyArray<string>;
5884
+ readonly required?: boolean;
5885
+ /** An editorial recommendation, never an invented search-engine limit. */
5886
+ readonly recommendedMaxLength?: number;
5887
+ }
5888
+
5291
5889
  /** Effect form of {@link seriesOf}. */
5292
5890
  export declare const seriesOf: (...args: Parameters<typeof seriesOf_2>) => Effect<PublishSeries | null, ContentValidationFailed | ContentNotFound, never>;
5293
5891
 
@@ -5333,10 +5931,10 @@ export declare const setOwner: (...args: Parameters<typeof setOwner_2>) => Effec
5333
5931
  declare const setOwner_2: (store: DataStore, type: ContentType, documentId: string, place: Place_2, owner: string | null) => Promise<Stewardship>;
5334
5932
 
5335
5933
  /** Effect form of {@link setPrimaryDomain}. */
5336
- export declare const setPrimaryDomain: (...args: Parameters<typeof setPrimaryDomain_2>) => Effect<SetPrimaryResult, never, never>;
5934
+ export declare const setPrimaryDomain: (...args: Parameters<typeof setPrimaryDomain_2>) => Effect<SetPrimaryResult, PublicRouteRegistryUnavailable | ChangeFeedUnavailable | SiteStateUnavailable, never>;
5337
5935
 
5338
5936
  /** Make a verified domain the site's primary one; the previous primary stays, as an alias. */
5339
- declare const setPrimaryDomain_2: (tx: DataStore, domainId: string) => Promise<SetPrimaryResult>;
5937
+ declare const setPrimaryDomain_2: (tx: DataStore, scope: CmsSiteScope, domainId: string) => Promise<SetPrimaryResult>;
5340
5938
 
5341
5939
  export declare type SetPrimaryResult = {
5342
5940
  readonly ok: true;
@@ -5410,6 +6008,76 @@ export declare const sharedRichBlocks: (type: ContentType, values: Readonly<Reco
5410
6008
  readonly markup: string;
5411
6009
  }>;
5412
6010
 
6011
+ /** A named site content binding cannot be resolved or changed as requested. */
6012
+ export declare class SiteBindingUnavailable extends SiteBindingUnavailable_base {
6013
+ }
6014
+
6015
+ declare const SiteBindingUnavailable_base: Schema_2.Class<SiteBindingUnavailable, Schema_2.TaggedStruct<"SiteBindingUnavailable", {
6016
+ readonly reason: Schema_2.Literals<readonly ["scope", "name", "target", "missing", "conflict", "revision", "state"]>;
6017
+ }>, YieldableError>;
6018
+
6019
+ export declare interface SiteContentBinding {
6020
+ readonly id: string;
6021
+ readonly name: string;
6022
+ readonly contentType: string;
6023
+ readonly documentId: string;
6024
+ readonly revisionId: string;
6025
+ }
6026
+
6027
+ export declare const siteContentBinding: (...args: Parameters<typeof siteContentBinding_2>) => Effect<SiteContentBinding | null, SiteBindingUnavailable, never>;
6028
+
6029
+ /** The explicit target, or null when no binding was authored. Never a newest-row fallback. */
6030
+ declare const siteContentBinding_2: (store: DataStore, scope: ChangeFeedScope, name: string) => Promise<SiteContentBinding | null>;
6031
+
6032
+ export declare interface SiteContentBindingRevision {
6033
+ readonly id: string;
6034
+ readonly bindingId: string;
6035
+ readonly contentType: string;
6036
+ readonly documentId: string;
6037
+ readonly previousRevisionId: string | null;
6038
+ readonly sourceRevisionId: string | null;
6039
+ }
6040
+
6041
+ export declare const siteContentBindingRevision: (...args: Parameters<typeof siteContentBindingRevision_2>) => Effect<SiteContentBindingRevision, SiteBindingUnavailable, never>;
6042
+
6043
+ /** Read only a revision belonging to this named binding in this physical scope. */
6044
+ declare const siteContentBindingRevision_2: (store: DataStore, scope: ChangeFeedScope, name: string, revisionId: string) => Promise<SiteContentBindingRevision>;
6045
+
6046
+ export declare interface SiteDeliveryDefinition {
6047
+ readonly id: string;
6048
+ readonly version: number;
6049
+ readonly environments: ReadonlyArray<string>;
6050
+ readonly defaultEnvironment: string;
6051
+ readonly locales: ReadonlyArray<SiteDeliveryLocale>;
6052
+ readonly defaultLocale: string;
6053
+ readonly sourceLocale: string;
6054
+ /** Named site-content bindings and their registered content type names. */
6055
+ readonly bindings: Readonly<Record<string, string>>;
6056
+ /** Editorial defaults keyed by stable locale identity, never request language guesses. */
6057
+ readonly seo?: Readonly<Record<string, ContentSeoDefaults>>;
6058
+ }
6059
+
6060
+ export declare interface SiteDeliveryLocale {
6061
+ readonly id: string;
6062
+ /** An explicitly approved language tag; this compiler never canonicalizes it. */
6063
+ readonly tag: string;
6064
+ /** Existing published/draft row partition. Renaming a tag does not rewrite it. */
6065
+ readonly contentLocale: string;
6066
+ readonly direction: 'ltr' | 'rtl';
6067
+ readonly enabled: boolean;
6068
+ readonly prefix: string;
6069
+ /** Ordered fallback locale IDs, independent of translation source. */
6070
+ readonly fallback: ReadonlyArray<string>;
6071
+ }
6072
+
6073
+ /** The explicit site delivery definition is invalid; no implicit defaults are selected. */
6074
+ export declare class SiteDeliveryUnavailable extends SiteDeliveryUnavailable_base {
6075
+ }
6076
+
6077
+ declare const SiteDeliveryUnavailable_base: Schema_2.Class<SiteDeliveryUnavailable, Schema_2.TaggedStruct<"SiteDeliveryUnavailable", {
6078
+ readonly reason: Schema_2.Literals<readonly ["definition", "environment", "locale", "fallback", "prefix", "binding"]>;
6079
+ }>, YieldableError>;
6080
+
5413
6081
  export declare interface SiteDomain {
5414
6082
  readonly id: string;
5415
6083
  readonly site: string;
@@ -5425,10 +6093,10 @@ export declare interface SiteDomain {
5425
6093
  }
5426
6094
 
5427
6095
  /** Effect form of {@link siteDomains}. */
5428
- export declare const siteDomains: (...args: Parameters<typeof siteDomains_2>) => Effect<readonly SiteDomain[], never, never>;
6096
+ export declare const siteDomains: (...args: Parameters<typeof siteDomains_2>) => Effect<readonly SiteDomain[], SiteStateUnavailable, never>;
5429
6097
 
5430
6098
  /** A site's domains: the primary first, then by host. */
5431
- declare const siteDomains_2: (store: DataStore, site: string) => Promise<ReadonlyArray<SiteDomain>>;
6099
+ declare const siteDomains_2: (store: DataStore, scope: CmsSiteScope) => Promise<ReadonlyArray<SiteDomain>>;
5432
6100
 
5433
6101
  export declare interface SitemapUrl extends PageAlternate {
5434
6102
  readonly documentId: string;
@@ -5451,6 +6119,14 @@ export declare const sitemapUrls: (trees: ReadonlyArray<LocalizedTree>, include?
5451
6119
  */
5452
6120
  export declare const sitemapXml: (urls: ReadonlyArray<SitemapUrl>, href: (locale: string, path: string) => string, xDefault?: string) => string;
5453
6121
 
6122
+ /** The site configuration scope or stored coordination state is invalid. */
6123
+ export declare class SiteStateUnavailable extends SiteStateUnavailable_base {
6124
+ }
6125
+
6126
+ declare const SiteStateUnavailable_base: Schema_2.Class<SiteStateUnavailable, Schema_2.TaggedStruct<"SiteStateUnavailable", {
6127
+ readonly reason: Schema_2.Literals<readonly ["scope", "state"]>;
6128
+ }>, YieldableError>;
6129
+
5454
6130
  /**
5455
6131
  * The canonical slug helper: lowercase, letters with accents folded to their
5456
6132
  * base letter (umlauts spelled out, `ß` as `ss`), hyphenate, strip every
@@ -5458,6 +6134,35 @@ export declare const sitemapXml: (urls: ReadonlyArray<SitemapUrl>, href: (locale
5458
6134
  */
5459
6135
  export declare const slugify: (value: unknown) => string;
5460
6136
 
6137
+ /** Must come from the admitted build artifact/config, never a request claim. */
6138
+ declare interface SnapshotAppCodePin {
6139
+ readonly commit: string;
6140
+ readonly artifactDigest: string;
6141
+ readonly configDigest: string;
6142
+ }
6143
+
6144
+ declare type SnapshotConsentPurpose = Pick<ConsentPurpose, 'id' | 'version'>;
6145
+
6146
+ declare interface SnapshotPresentation {
6147
+ readonly version: 1;
6148
+ readonly decided: boolean;
6149
+ readonly granted: ReadonlyArray<SnapshotConsentPurpose>;
6150
+ }
6151
+
6152
+ declare type SnapshotRouteClaim = {
6153
+ readonly kind: 'cms';
6154
+ } | {
6155
+ readonly kind: 'code';
6156
+ readonly collision: 'reject' | 'cms' | 'code';
6157
+ /** Opt this native page into public production documents and path sets. */
6158
+ readonly public?: boolean;
6159
+ };
6160
+
6161
+ declare interface SnapshotRoutingDefinition {
6162
+ readonly pagesDirectory: string;
6163
+ readonly claims: Readonly<Record<string, SnapshotRouteClaim>>;
6164
+ }
6165
+
5461
6166
  /** The passage of `body` around the first word that starts with a query word. */
5462
6167
  export declare const snippetOf: (body: string, query: string) => SearchSnippet;
5463
6168
 
@@ -5618,6 +6323,14 @@ declare const suggestOnStep_2: (tx: DataStore, instanceId: string, stepId: strin
5618
6323
  readonly reason: StepRefusal;
5619
6324
  }>;
5620
6325
 
6326
+ export declare const swapEnvironmentAlias: (...args: Parameters<typeof swapEnvironmentAlias_2>) => Effect<EnvironmentAlias, EnvironmentAliasUnavailable, never>;
6327
+
6328
+ /** Atomically swap from an observed revision. A stale editor must re-read before retrying. */
6329
+ declare const swapEnvironmentAlias_2: (tx: DataStore, scope: EnvironmentAliasScope, environments: ReadonlyArray<string>, name: string, input: {
6330
+ readonly expectedRevisionId: string;
6331
+ readonly environment: string;
6332
+ }) => Promise<EnvironmentAlias>;
6333
+
5621
6334
  /** A type's taxonomy — see `ContentTypeSpec.taxonomy`. */
5622
6335
  export declare interface TaxonomyConfig {
5623
6336
  /** A declared `Schema.Array(Schema.String)` field. */
@@ -5921,10 +6634,10 @@ export declare const unique: () => FieldRefinement;
5921
6634
  export declare const unitsHash: (units: ReadonlyArray<TranslationUnit>) => string;
5922
6635
 
5923
6636
  /** Effect-native `unpublish` (see {@link saveDraftEffect}). */
5924
- export declare const unpublish: (store: DataStore, type: ContentType, id: string, scope: CmsScope) => Effect_2.Effect<void, ContentNotFound>;
6637
+ export declare const unpublish: (store: DataStore, type: ContentType, id: string, scope: CmsScope) => Effect_2.Effect<void, ContentNotFound | ChangeFeedUnavailable | PublicRouteRegistryUnavailable>;
5925
6638
 
5926
6639
  /** Effect form of {@link unpublishDue}. */
5927
- export declare const unpublishDue: (...args: Parameters<typeof unpublishDue_2>) => Effect<readonly string[], never, never>;
6640
+ export declare const unpublishDue: (...args: Parameters<typeof unpublishDue_2>) => Effect<readonly string[], ChangeFeedUnavailable, never>;
5928
6641
 
5929
6642
  /**
5930
6643
  * Take down every entry of `type` whose scheduled `unpublishAt` has passed.
@@ -5995,10 +6708,10 @@ export declare interface VariantResult {
5995
6708
  }
5996
6709
 
5997
6710
  /** Effect form of {@link verifyDomain}. */
5998
- export declare const verifyDomain: (...args: Parameters<typeof verifyDomain_2>) => Effect<VerifyDomainResult, never, never>;
6711
+ export declare const verifyDomain: (...args: Parameters<typeof verifyDomain_2>) => Effect<VerifyDomainResult, PublicRouteRegistryUnavailable | ChangeFeedUnavailable | SiteStateUnavailable, never>;
5999
6712
 
6000
6713
  /** Look for the domain's TXT record; found, the domain is verified. A lookup that fails counts as missing. */
6001
- declare const verifyDomain_2: (tx: DataStore, domainId: string, resolveTxt: TxtResolver, now?: Date) => Promise<VerifyDomainResult>;
6714
+ declare const verifyDomain_2: (tx: DataStore, scope: CmsSiteScope, domainId: string, resolveTxt: TxtResolver, now?: Date) => Promise<VerifyDomainResult>;
6002
6715
 
6003
6716
  export declare type VerifyDomainResult = {
6004
6717
  readonly ok: true;