@voltro/cms 0.84.0 → 0.86.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 (81) hide show
  1. package/CHANGELOG.md +1215 -0
  2. package/THIRD-PARTY-NOTICES.md +118 -600
  3. package/dist/ContentForm.js +282 -0
  4. package/dist/RichDocumentEditor.js +550 -0
  5. package/dist/RichDocumentView.js +132 -0
  6. package/dist/RichTextSurface.js +135 -0
  7. package/dist/aiCandidates.js +199 -0
  8. package/dist/aiOperations.js +152 -0
  9. package/dist/audiences.js +31 -0
  10. package/dist/availability.js +121 -0
  11. package/dist/blueprint.js +166 -0
  12. package/dist/bulk.js +281 -0
  13. package/dist/cacheIdentity.js +152 -0
  14. package/dist/changes.js +90 -0
  15. package/dist/cmsContext.js +229 -0
  16. package/dist/collections.js +224 -0
  17. package/dist/consent.js +29 -0
  18. package/dist/contentType.js +191 -0
  19. package/dist/contentfulImport.js +162 -0
  20. package/dist/copies.js +89 -0
  21. package/dist/cutover.js +202 -0
  22. package/dist/deliveryChecks.js +138 -0
  23. package/dist/domains.js +145 -0
  24. package/dist/draftTexts.js +164 -0
  25. package/dist/duplicates.js +78 -0
  26. package/dist/edgePurge.js +69 -0
  27. package/dist/editHistory.js +113 -0
  28. package/dist/effectForm.js +11 -0
  29. package/dist/environments.js +109 -0
  30. package/dist/errors.js +67 -0
  31. package/dist/experiments.js +528 -0
  32. package/dist/exposure.js +28 -0
  33. package/dist/extensionManifest.js +81 -0
  34. package/dist/extensions.js +314 -0
  35. package/dist/fieldSchema.js +199 -0
  36. package/dist/formStrings.js +74 -0
  37. package/dist/glossary.js +73 -0
  38. package/dist/history.js +54 -0
  39. package/dist/htmlImport.js +297 -0
  40. package/dist/index.d.ts +2266 -170
  41. package/dist/index.js +73 -3947
  42. package/dist/media.js +29 -0
  43. package/dist/metrics.js +46 -0
  44. package/dist/migration.js +193 -0
  45. package/dist/migrationStages.js +13 -0
  46. package/dist/presenceAnchors.js +68 -0
  47. package/dist/preview.js +31 -0
  48. package/dist/promotion.js +107 -0
  49. package/dist/quality.js +188 -0
  50. package/dist/recurrence.js +78 -0
  51. package/dist/redirects.js +99 -0
  52. package/dist/referenceGraph.js +223 -0
  53. package/dist/references.js +173 -0
  54. package/dist/release.js +205 -0
  55. package/dist/rest.js +52 -0
  56. package/dist/review.js +160 -0
  57. package/dist/richDocument.js +491 -0
  58. package/dist/richInline.js +100 -0
  59. package/dist/schedule.js +80 -0
  60. package/dist/search.js +148 -0
  61. package/dist/selectionIntent.js +164 -0
  62. package/dist/seo.js +31 -0
  63. package/dist/series.js +105 -0
  64. package/dist/share.js +112 -0
  65. package/dist/stewardship.js +146 -0
  66. package/dist/taxonomy.js +36 -0
  67. package/dist/team.js +103 -0
  68. package/dist/templates.js +106 -0
  69. package/dist/trackChanges.js +197 -0
  70. package/dist/translation.js +64 -0
  71. package/dist/tree.js +87 -0
  72. package/dist/usage.js +50 -0
  73. package/dist/validation.js +192 -0
  74. package/dist/visualEditing.js +60 -0
  75. package/dist/web.d.ts +927 -131
  76. package/dist/web.js +33 -2
  77. package/dist/workflow.js +322 -0
  78. package/dist/write.js +394 -0
  79. package/dist/xliff.js +325 -0
  80. package/package.json +6 -6
  81. package/dist/extensionManifest-BK3ZcL2P.js +0 -2782
package/dist/index.d.ts CHANGED
@@ -5,6 +5,21 @@ import { ReactNode } from 'react';
5
5
  import { Row } from '@voltro/database';
6
6
  import { Schema as Schema_2 } from 'effect';
7
7
  import { TableLike } from '@voltro/database';
8
+ import { YieldableError } from 'effect/Cause';
9
+
10
+ /** Effect form of {@link addDomain}. */
11
+ export declare const addDomain: (...args: Parameters<typeof addDomain_2>) => Effect<AddDomainResult, never, never>;
12
+
13
+ /** 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>;
15
+
16
+ export declare type AddDomainResult = {
17
+ readonly ok: true;
18
+ readonly domain: SiteDomain;
19
+ } | {
20
+ readonly ok: false;
21
+ readonly reason: 'notAHost' | 'taken';
22
+ };
8
23
 
9
24
  /** Effect form of {@link addRedirect}. */
10
25
  export declare const addRedirect: (...args: Parameters<typeof addRedirect_2>) => Effect<void, never, never>;
@@ -17,6 +32,15 @@ export declare const addRedirect: (...args: Parameters<typeof addRedirect_2>) =>
17
32
  */
18
33
  declare const addRedirect_2: (tx: DataStore, type: ContentType, scope: CmsScope, fromPath: string, documentId: string, tenantId?: unknown) => Promise<void>;
19
34
 
35
+ /** Effect form of {@link addToCollection}. */
36
+ export declare const addToCollection: (...args: Parameters<typeof addToCollection_2>) => Effect<boolean, never, never>;
37
+
38
+ /** Add a document to a collection (at the end); already in it, nothing changes. False when the collection is not the caller's. */
39
+ declare const addToCollection_2: (tx: DataStore, collectionId: string, item: {
40
+ readonly contentType: string;
41
+ readonly documentId: string;
42
+ }) => Promise<boolean>;
43
+
20
44
  /** Effect form of {@link addToRelease}. */
21
45
  export declare const addToRelease: (...args: Parameters<typeof addToRelease_2>) => Effect<Readonly<Record<string, unknown>>, ContentNotFound | ReleaseNotEditable, never>;
22
46
 
@@ -35,6 +59,37 @@ declare const addToRelease_2: (store: DataStore, releaseId: string, item: {
35
59
  readonly revisionId?: string;
36
60
  }) => Promise<Row>;
37
61
 
62
+ /** Effect form of {@link adoptCandidate}. */
63
+ export declare const adoptCandidate: (...args: Parameters<typeof adoptCandidate_2>) => Effect<AdoptCandidateResult, ContentValidationFailed | ContentNotFound | ContentIdConflict | RevisionMismatch, never>;
64
+
65
+ /**
66
+ * Save the chosen units of an open candidate on top of the draft as it is
67
+ * now — a new draft revision, validated like any save — and record what was
68
+ * taken. The AI operation behind it is settled as applied.
69
+ */
70
+ declare const adoptCandidate_2: (tx: DataStore, type: ContentType, candidateId: string, scope: CmsScope, input: {
71
+ readonly units: ReadonlyArray<string>;
72
+ readonly actorId: string;
73
+ }, now?: Date) => Promise<AdoptCandidateResult>;
74
+
75
+ export declare type AdoptCandidateResult = {
76
+ readonly ok: true;
77
+ readonly revisionId: string;
78
+ readonly status: 'adopted' | 'partial';
79
+ } | {
80
+ readonly ok: false;
81
+ readonly reason: 'notFound' | 'closed' | 'noUnits' | 'unknownUnit';
82
+ readonly units?: ReadonlyArray<string>;
83
+ };
84
+
85
+ export declare interface AdoptionEntry {
86
+ readonly actorId: string;
87
+ /** Revisions they saved of migrated documents after the import. */
88
+ readonly revisions: number;
89
+ readonly documents: number;
90
+ readonly lastAt: Date | null;
91
+ }
92
+
38
93
  /** Effect form of {@link adoptWinner}. */
39
94
  export declare const adoptWinner: (...args: Parameters<typeof adoptWinner_2>) => Effect<AdoptWinnerResult, ContentValidationFailed | ContentNotFound | ContentIdConflict | RevisionMismatch | ReleaseNotEditable, never>;
40
95
 
@@ -77,6 +132,22 @@ export declare const aiBudgetLeft: (...args: Parameters<typeof aiBudgetLeft_2>)
77
132
  /** What is left of the workspace's monthly budget: a number of tokens, or null (no limit). */
78
133
  declare const aiBudgetLeft_2: (store: DataStore, tenantId: string, now?: Date) => Promise<number | null>;
79
134
 
135
+ export declare interface AiCandidate {
136
+ readonly id: string;
137
+ readonly contentType: string;
138
+ readonly variantId: string;
139
+ readonly baseRevisionId: string | null;
140
+ readonly operationId: string | null;
141
+ /** Set for a person's suggestion; null for a model's candidate. */
142
+ readonly suggestedBy: string | null;
143
+ readonly values: Readonly<Record<string, unknown>>;
144
+ readonly status: 'open' | 'adopted' | 'partial' | 'discarded';
145
+ readonly adoptedUnits: ReadonlyArray<string>;
146
+ readonly adoptedRevisionId: string | null;
147
+ readonly decidedBy: string | null;
148
+ readonly createdAt: Date;
149
+ }
150
+
80
151
  export declare interface AiOperation {
81
152
  readonly id: string;
82
153
  readonly operation: string;
@@ -143,6 +214,14 @@ declare const aiTokensUsed_2: (store: DataStore, tenantId: string, since?: Date)
143
214
  /** A document's address in every language it has its own variant in. */
144
215
  export declare const alternatesOf: (trees: ReadonlyArray<LocalizedTree>, documentId: string) => ReadonlyArray<PageAlternate>;
145
216
 
217
+ export declare type AppliedSelection = {
218
+ readonly ok: true;
219
+ readonly values: Readonly<Record<string, unknown>>;
220
+ } | {
221
+ readonly ok: false;
222
+ readonly reason: 'otherIntent' | 'otherDocument' | 'revisionMoved' | 'targetGone';
223
+ };
224
+
146
225
  /** Effect form of {@link applyBlueprint}. */
147
226
  export declare const applyBlueprint: (...args: Parameters<typeof applyBlueprint_2>) => Effect<BlueprintPlan, ContentValidationFailed | ContentNotFound | ContentIdConflict | RevisionMismatch | ReviewRequired | ReferenceUnavailable | BlueprintInvalid, never>;
148
227
 
@@ -176,6 +255,19 @@ declare const applyBlueprintTeam_2: (tx: DataStore, tenantId: string, team: Blue
176
255
  */
177
256
  export declare const applyDerivations: (type: Pick<ContentType, "fields" | "derivedFields"> & Partial<Pick<ContentType, "taxonomy">>, row: Readonly<Record<string, unknown>>) => Record<string, unknown>;
178
257
 
258
+ /**
259
+ * The values with the answer applied where the intent said: a field takes the
260
+ * chosen document; a placed component's prop takes it; an image block takes it
261
+ * as its asset; a paragraph or a heading gets a link to it over the selected
262
+ * text. Refused for another intent, another document or form, a revision that
263
+ * moved on, or a block or component that is gone.
264
+ */
265
+ export declare const applySelection: (values: Readonly<Record<string, unknown>>, intent: SelectionIntent, answer: SelectionAnswer, now: {
266
+ readonly documentId?: string | null;
267
+ readonly revisionId?: string | null;
268
+ readonly formId?: string;
269
+ }) => AppliedSelection;
270
+
179
271
  /**
180
272
  * The source values with each unit's target in place — what a translation
181
273
  * draft saves. A unit without a target keeps the source text; an id that
@@ -183,9 +275,19 @@ export declare const applyDerivations: (type: Pick<ContentType, "fields" | "deri
183
275
  */
184
276
  export declare const applyTranslation: (fields: Readonly<Record<string, FieldSchema>>, source: Readonly<Record<string, unknown>>, units: ReadonlyArray<TranslationUnit>) => Record<string, unknown>;
185
277
 
186
- /** The values a reader of `variant` sees: version B's text over the published values. */
278
+ /**
279
+ * The values a reader of `variant` sees: version B's text over the published
280
+ * values — a field, or one prop of one placed component (an instance no longer
281
+ * on the page is left alone).
282
+ */
187
283
  export declare const applyVariant: (values: Readonly<Record<string, unknown>>, experiment: Pick<Experiment, "overrides">, variant: Variant) => Readonly<Record<string, unknown>>;
188
284
 
285
+ /** Effect form of {@link approvedByWorkflow}. */
286
+ export declare const approvedByWorkflow: (...args: Parameters<typeof approvedByWorkflow_2>) => Effect<boolean, never, never>;
287
+
288
+ /** The publish gate's question: did a workflow instance approve exactly this revision? */
289
+ declare const approvedByWorkflow_2: (store: DataStore, type: ContentType, variantId: string, revisionId: string) => Promise<boolean>;
290
+
189
291
  /** Effect form of {@link approveReview}. */
190
292
  export declare const approveReview: (...args: Parameters<typeof approveReview_2>) => Effect<Readonly<Record<string, unknown>>, ContentNotFound | RevisionMismatch | ReviewStepRefused, never>;
191
293
 
@@ -205,7 +307,7 @@ export declare const assertApproved: (...args: Parameters<typeof assertApproved_
205
307
 
206
308
  /**
207
309
  * The publish gate: for a type that requires review, `revisionId` must carry
208
- * an approval. Called by `publishRevision` — so single publishes, releases,
310
+ * an approval — with a review workflow, an instance that approved it. Called by `publishRevision` — so single publishes, releases,
209
311
  * rollbacks and scheduled publishing all pass the same gate.
210
312
  */
211
313
  declare const assertApproved_2: (store: DataStore, type: ContentType, variantId: string, scope: CmsScope, revisionId: string) => Promise<void>;
@@ -222,6 +324,18 @@ declare const assertReferencesAvailable_2: (tx: DataStore, type: ContentType, va
222
324
  /** The version a reader is shown: the same reader, the same version, every time. */
223
325
  export declare const assignVariant: (experimentId: string, readerId: string, share: number) => Variant;
224
326
 
327
+ /**
328
+ * Attribute per-day values (`YYYY-MM-DD`, UTC) to the revision live at the end
329
+ * of each day. A day when nothing was live is left out (`unattributed`).
330
+ */
331
+ export declare const attributeToRevisions: (timeline: ReadonlyArray<LiveStretch>, daily: ReadonlyArray<{
332
+ readonly day: string;
333
+ readonly value: number;
334
+ }>) => {
335
+ readonly shares: ReadonlyArray<RevisionShare>;
336
+ readonly unattributed: number;
337
+ };
338
+
225
339
  export declare interface Audience {
226
340
  readonly id: string;
227
341
  /** Raise it when the rule changes meaning; a variant records the version it was written for. */
@@ -256,6 +370,22 @@ export declare interface AvailabilityConfig {
256
370
  readonly until?: string;
257
371
  /** A boolean field: `true` withdraws the document at once. */
258
372
  readonly blocked?: string;
373
+ /** A date or datetime field: usable from this moment on. */
374
+ readonly from?: string;
375
+ /** A list-of-text field of territory codes (ISO 3166-1 alpha-2): usable only there. Empty: everywhere. */
376
+ readonly territories?: string;
377
+ /** A list-of-text field of channels (`web`, `app`, `print`, …): usable only on these. Empty: on every channel. */
378
+ readonly channels?: string;
379
+ /** A list-of-text field of purposes (`editorial`, `advertising`, …): usable only for these. Empty: for every purpose. */
380
+ readonly purposes?: string;
381
+ }
382
+
383
+ /** Where, on what and for what a document is about to be used; each is checked only when given. */
384
+ export declare interface AvailabilityUse {
385
+ /** The reader's territory, ISO 3166-1 alpha-2 (`AT`). */
386
+ readonly territory?: string | null;
387
+ readonly channel?: string | null;
388
+ readonly purpose?: string | null;
259
389
  }
260
390
 
261
391
  /** Effect form of {@link bindExtensionSecret}. */
@@ -267,7 +397,17 @@ export declare const bindExtensionSecret: (...args: Parameters<typeof bindExtens
267
397
  */
268
398
  declare const bindExtensionSecret_2: (tx: DataStore, extensionId: string, name: string, value: string | null) => Promise<SecretBinding>;
269
399
 
270
- export declare type BlockReason = 'notFound' | 'reviewRequired' | 'incomplete' | 'referenceUnavailable' | 'notPublished' | 'unknownType' | 'invalid' | 'revisionMoved';
400
+ /** Whether a block, or any text in it, holds a suggestion. */
401
+ export declare const blockHasChanges: (block: RichBlock) => boolean;
402
+
403
+ /**
404
+ * The markup a block is edited as: text blocks are one run, a list one line
405
+ * per item (two spaces of indent per level), a table one line per row with
406
+ * cells split by `|`; an image or a component has none.
407
+ */
408
+ export declare const blockMarkup: (block: RichBlock) => string;
409
+
410
+ export declare type BlockReason = 'notFound' | 'reviewRequired' | 'incomplete' | 'referenceUnavailable' | 'notPublished' | 'unknownType' | 'invalid' | 'revisionMoved' | 'releaseClosed';
271
411
 
272
412
  export declare interface Blueprint {
273
413
  readonly id: string;
@@ -375,6 +515,11 @@ export declare type BulkAction = {
375
515
  readonly kind: 'setField';
376
516
  readonly field: string;
377
517
  readonly value: unknown;
518
+ }
519
+ /** Put each item's current revision into one draft release (to publish at once). */
520
+ | {
521
+ readonly kind: 'addToRelease';
522
+ readonly releaseId: string;
378
523
  };
379
524
 
380
525
  /** One locale variant (a draft id) of a document. */
@@ -391,12 +536,118 @@ export declare interface BulkResult extends BulkItem {
391
536
  readonly detail: ReadonlyArray<string>;
392
537
  }
393
538
 
539
+ export declare interface BulkRunState {
540
+ readonly id: string;
541
+ readonly action: BulkAction;
542
+ readonly status: 'running' | 'done';
543
+ readonly total: number;
544
+ readonly results: ReadonlyArray<BulkResult>;
545
+ }
546
+
547
+ /** Effect form of {@link bulkRunState}. */
548
+ export declare const bulkRunState: (...args: Parameters<typeof bulkRunState_2>) => Effect<BulkRunState | null, never, never>;
549
+
550
+ /** Where a run stands, or null. */
551
+ declare const bulkRunState_2: (store: DataStore, runId: string) => Promise<BulkRunState | null>;
552
+
553
+ /** What a route's response depends on — declared once, read by every cache in front of it. */
554
+ export declare interface CacheContract {
555
+ /** The route pattern (`/v1/site/page`), the purge selector's route class. */
556
+ readonly route: string;
557
+ readonly query?: ReadonlyArray<QueryParam>;
558
+ /** The language, from a bounded set — never the raw `Accept-Language`. */
559
+ readonly locale?: CacheDimension;
560
+ /** Declared audiences or experiment cohorts the output differs by. */
561
+ readonly audience?: CacheDimension;
562
+ /** The reader's consent decision class — only when the output really varies by it. */
563
+ readonly consent?: CacheDimension;
564
+ /** Cookies and headers that make a response private when present (a session, a preview token). */
565
+ readonly credentials?: ReadonlyArray<string>;
566
+ /** The most variants one route may fan out to. Default 64. */
567
+ readonly cardinalityBudget?: number;
568
+ }
569
+
570
+ /** A bounded request dimension: where it is read from, and its values. */
571
+ export declare interface CacheDimension {
572
+ /** A request header (lowercase) or a cookie (`cookie:<name>`). */
573
+ readonly from: string;
574
+ readonly values: ReadonlyArray<string>;
575
+ /** Taken when the request names none, or one not in `values`. */
576
+ readonly fallback: string;
577
+ }
578
+
579
+ export declare type CacheIdentity = {
580
+ readonly cacheable: true;
581
+ /** The canonical identity — every dimension in a fixed order. */
582
+ readonly key: string;
583
+ /** A short, stable fingerprint of `key`. */
584
+ readonly fingerprint: string;
585
+ readonly vary: ReadonlyArray<string>;
586
+ /** What a purge of this response names: the route class and its tags. */
587
+ readonly purge: {
588
+ readonly route: string;
589
+ readonly tags: ReadonlyArray<string>;
590
+ };
591
+ readonly variants: number;
592
+ readonly explain: ReadonlyArray<ExplainLine>;
593
+ } | {
594
+ readonly cacheable: false;
595
+ readonly reason: 'method' | 'credential' | 'path' | 'budget';
596
+ readonly detail: string;
597
+ /** A refused or private request is never stored by a shared cache. */
598
+ readonly cacheControl: 'private, no-store';
599
+ readonly explain: ReadonlyArray<ExplainLine>;
600
+ };
601
+
602
+ export declare interface CacheRequest {
603
+ readonly method: string;
604
+ readonly host: string;
605
+ /** The path as received, still encoded. */
606
+ readonly path: string;
607
+ /** The query string without `?`. */
608
+ readonly query: string;
609
+ readonly headers: Readonly<Record<string, string | undefined>>;
610
+ }
611
+
394
612
  /** Effect form of {@link cancelSeries}. */
395
613
  export declare const cancelSeries: (...args: Parameters<typeof cancelSeries_2>) => Effect<boolean, ContentValidationFailed | ContentNotFound, never>;
396
614
 
397
615
  /** End a draft's series and clear what it armed. True when there was one. In the caller's transaction. */
398
616
  declare const cancelSeries_2: (tx: DataStore, type: ContentType, draftId: string) => Promise<boolean>;
399
617
 
618
+ /** Effect form of {@link candidatesFor}. */
619
+ export declare const candidatesFor: (...args: Parameters<typeof candidatesFor_2>) => Effect<readonly AiCandidate[], never, never>;
620
+
621
+ /** A draft's candidates, newest first. */
622
+ declare const candidatesFor_2: (store: DataStore, type: ContentType, variantId: string) => Promise<ReadonlyArray<AiCandidate>>;
623
+
624
+ /** One unit of a candidate an editor adopts or leaves: a field, or one section of a components field. */
625
+ export declare interface CandidateUnit {
626
+ /** `title`, or `sections[<instanceId>]` for a changed section, `sections+<n>` for an added one. */
627
+ readonly key: string;
628
+ readonly kind: 'field' | 'section' | 'addedSection';
629
+ readonly field: string;
630
+ readonly before: unknown;
631
+ readonly after: unknown;
632
+ }
633
+
634
+ /** The units in which `proposed` differs from `current`, field by field and section by section. */
635
+ export declare const candidateUnits: (type: ContentType, current: Readonly<Record<string, unknown>>, proposed: Readonly<Record<string, unknown>>) => ReadonlyArray<CandidateUnit>;
636
+
637
+ /** Who suggests the edit, and when; `id` names the change. */
638
+ export declare type ChangeAuthor = Omit<RichChange, 'kind'>;
639
+
640
+ /**
641
+ * The fields that changed between `before` and `after` other than through the
642
+ * texts typed in together (`keys`): a plain field with a shared text, a field
643
+ * derived from one, and a rich text whose change lies only in its shared blocks
644
+ * do not count.
645
+ */
646
+ export declare const changedApartFromShared: (type: ContentType, before: Readonly<Record<string, unknown>>, after: Readonly<Record<string, unknown>>, keys: Iterable<string>) => ReadonlyArray<string>;
647
+
648
+ /** What to do with one suggestion. */
649
+ export declare type ChangeDecision = 'accept' | 'reject' | 'keep';
650
+
400
651
  /** The declared fields whose values differ between `before` and `after`, in declaration order. */
401
652
  export declare const changedFields: (fields: Readonly<Record<string, unknown>>, before: Readonly<Record<string, unknown>>, after: Readonly<Record<string, unknown>>) => ReadonlyArray<string>;
402
653
 
@@ -418,9 +669,14 @@ export declare interface ChangeOrigin {
418
669
  readonly releaseId?: string;
419
670
  }
420
671
 
672
+ /** Throws for a vendor origin that is not exactly `https://host[:port]` — it would widen the policy. */
673
+ export declare const checkConsentPurposes: (purposes: ReadonlyArray<ConsentPurpose>) => void;
674
+
421
675
  /** Throws when a declaration cannot work: fields missing or of the wrong kind, a component the field does not allow. */
422
676
  export declare const checkTemplates: (name: string, fields: Readonly<Record<string, FieldSchema>>, config: TemplatesConfig) => void;
423
677
 
678
+ export declare const CMS_AI_CANDIDATES_TABLE = "cms_ai_candidates";
679
+
424
680
  export declare const CMS_AI_OPERATIONS_TABLE = "cms_ai_operations";
425
681
 
426
682
  export declare const CMS_AI_SETTINGS_TABLE = "cms_ai_settings";
@@ -428,8 +684,24 @@ export declare const CMS_AI_SETTINGS_TABLE = "cms_ai_settings";
428
684
  /** The system table holding the availability of published documents. */
429
685
  export declare const CMS_AVAILABILITY_TABLE = "cms_availability";
430
686
 
687
+ export declare const CMS_BULK_RUNS_TABLE = "cms_bulk_runs";
688
+
431
689
  export declare const CMS_CHANGES_TABLE = "cms_changes";
432
690
 
691
+ export declare const CMS_COLLECTION_ITEMS_TABLE = "cms_collection_items";
692
+
693
+ export declare const CMS_COLLECTION_PORTALS_TABLE = "cms_collection_portals";
694
+
695
+ export declare const CMS_COLLECTIONS_TABLE = "cms_collections";
696
+
697
+ export declare const CMS_COPIES_TABLE = "cms_copies";
698
+
699
+ export declare const CMS_CUTOVER_DECISIONS_TABLE = "cms_cutover_decisions";
700
+
701
+ export declare const CMS_CUTOVER_ISSUES_TABLE = "cms_cutover_issues";
702
+
703
+ export declare const CMS_DELIVERY_CHECKS_TABLE = "cms_delivery_checks";
704
+
433
705
  export declare const CMS_DRAFT_TEXTS_TABLE = "cms_draft_texts";
434
706
 
435
707
  export declare const CMS_EXPERIMENT_EVENTS_TABLE = "cms_experiment_events";
@@ -444,6 +716,10 @@ export declare const CMS_EXTENSIONS_TABLE = "cms_extensions";
444
716
 
445
717
  export declare const CMS_GLOSSARY_TABLE = "cms_glossary";
446
718
 
719
+ export declare const CMS_MIGRATION_RECORDS_TABLE = "cms_migration_records";
720
+
721
+ export declare const CMS_MIGRATION_STAGES_TABLE = "cms_migration_stages";
722
+
447
723
  export declare const CMS_PATHS_TABLE = "cms_paths";
448
724
 
449
725
  /** The system table holding preview shares. */
@@ -455,7 +731,7 @@ export declare const CMS_QUALITY_EXCEPTIONS_TABLE = "cms_quality_exceptions";
455
731
 
456
732
  export declare const CMS_REDIRECTS_TABLE = "cms_redirects";
457
733
 
458
- /** The system table holding the reference edges of every published variant. */
734
+ /** The system table holding scoped published, draft and revision edges. */
459
735
  export declare const CMS_REFERENCES_TABLE = "cms_references";
460
736
 
461
737
  export declare const CMS_RELEASE_ITEMS_TABLE = "cms_release_items";
@@ -473,12 +749,20 @@ export declare const CMS_SCOPE_COLUMNS: readonly ["site", "environment", "locale
473
749
 
474
750
  export declare const CMS_SEARCH_TABLE = "cms_search";
475
751
 
752
+ export declare const CMS_SITE_DOMAINS_TABLE = "cms_site_domains";
753
+
476
754
  export declare const CMS_STEWARDSHIP_TABLE = "cms_stewardship";
477
755
 
478
756
  export declare const CMS_TEAM_INVITATIONS_TABLE = "cms_team_invitations";
479
757
 
480
758
  export declare const CMS_TEAM_TABLE = "cms_team";
481
759
 
760
+ export declare const CMS_WORKFLOW_DECISIONS_TABLE = "cms_workflow_decisions";
761
+
762
+ export declare const CMS_WORKFLOW_INSTANCES_TABLE = "cms_workflow_instances";
763
+
764
+ export declare const cmsAiCandidatesTable: TableLike;
765
+
482
766
  /** One AI call on a document, and what became of it. */
483
767
  export declare const cmsAiOperationsTable: TableLike;
484
768
 
@@ -541,8 +825,17 @@ export declare interface CmsApi {
541
825
  */
542
826
  export declare const cmsAvailabilityTable: TableLike;
543
827
 
828
+ /** A bulk run as a durable record: what it does, the plan, and each item's result so far. */
829
+ export declare const cmsBulkRunsTable: TableLike;
830
+
544
831
  export declare const cmsChangesTable: TableLike;
545
832
 
833
+ export declare const cmsCollectionItemsTable: TableLike;
834
+
835
+ export declare const cmsCollectionPortalsTable: TableLike;
836
+
837
+ export declare const cmsCollectionsTable: TableLike;
838
+
546
839
  /**
547
840
  * Build the `ctx.cms` surface over a request-scoped store, confined to one
548
841
  * `scope` (site, environment, locale). Attach the result to your
@@ -553,6 +846,14 @@ export declare const cmsContext: (store: DataStore, types: ReadonlyArray<Content
553
846
  readonly secret?: string;
554
847
  }) => CmsApi;
555
848
 
849
+ export declare const cmsCopiesTable: TableLike;
850
+
851
+ export declare const cmsCutoverDecisionsTable: TableLike;
852
+
853
+ export declare const cmsCutoverIssuesTable: TableLike;
854
+
855
+ export declare const cmsDeliveryChecksTable: TableLike;
856
+
556
857
  /** One text field of one draft (a document in one language), as a CRDT text. */
557
858
  export declare const cmsDraftTextsTable: TableLike;
558
859
 
@@ -587,6 +888,10 @@ export declare const cmsExtensionsTable: TableLike;
587
888
  /** One entry per workspace, term (lower case) and target language. */
588
889
  export declare const cmsGlossaryTable: TableLike;
589
890
 
891
+ export declare const cmsMigrationRecordsTable: TableLike;
892
+
893
+ export declare const cmsMigrationStagesTable: TableLike;
894
+
590
895
  /** The address each published document of a tree type had at its last publish, per locale. */
591
896
  export declare const cmsPathsTable: TableLike;
592
897
 
@@ -605,12 +910,6 @@ export declare const cmsQualityExceptionsTable: TableLike;
605
910
  /** A former address and the document now answering it. */
606
911
  export declare const cmsRedirectsTable: TableLike;
607
912
 
608
- /**
609
- * One row per reference a published variant makes: the source (type,
610
- * document, variant, scope), where in its values the reference sits (`path`)
611
- * and the target document. Tenant-scoped. Register it in the app's
612
- * `databaseHandle` beside `cmsRevisionsTable`.
613
- */
614
913
  export declare const cmsReferencesTable: TableLike;
615
914
 
616
915
  /** One variant in a release: publish its pinned revision, or unpublish it. */
@@ -690,6 +989,8 @@ export declare interface CmsScope {
690
989
 
691
990
  export declare const cmsSearchTable: TableLike;
692
991
 
992
+ export declare const cmsSiteDomainsTable: TableLike;
993
+
693
994
  export declare const cmsStewardshipTable: TableLike;
694
995
 
695
996
  /** Who is invited with which role. */
@@ -709,6 +1010,10 @@ export declare interface CmsTree {
709
1010
  readonly orphans: ReadonlyArray<string>;
710
1011
  }
711
1012
 
1013
+ export declare const cmsWorkflowDecisionsTable: TableLike;
1014
+
1015
+ export declare const cmsWorkflowInstancesTable: TableLike;
1016
+
712
1017
  /** Everything the write pipeline can fail with on the typed channel. */
713
1018
  export declare type CmsWriteError = ContentValidationFailed | ContentNotFound | ContentIdConflict | RevisionMismatch;
714
1019
 
@@ -719,6 +1024,30 @@ export declare type CmsWriteError = ContentValidationFailed | ContentNotFound |
719
1024
  */
720
1025
  export declare const collaborativeFields: (type: ContentType) => ReadonlyArray<string>;
721
1026
 
1027
+ export declare interface Collection {
1028
+ readonly id: string;
1029
+ readonly name: string;
1030
+ readonly description: string | null;
1031
+ }
1032
+
1033
+ export declare interface CollectionItem {
1034
+ readonly contentType: string;
1035
+ readonly documentId: string;
1036
+ readonly position: number;
1037
+ }
1038
+
1039
+ /** Effect form of {@link collectionItems}. */
1040
+ export declare const collectionItems: (...args: Parameters<typeof collectionItems_2>) => Effect<readonly CollectionItem[], never, never>;
1041
+
1042
+ /** A collection's documents, in order. */
1043
+ declare const collectionItems_2: (store: DataStore, collectionId: string, crossTenant?: boolean) => Promise<ReadonlyArray<CollectionItem>>;
1044
+
1045
+ /** Effect form of {@link collectionPortals}. */
1046
+ export declare const collectionPortals: (...args: Parameters<typeof collectionPortals_2>) => Effect<readonly Portal[], never, never>;
1047
+
1048
+ /** A collection's portals, newest first. */
1049
+ declare const collectionPortals_2: (store: DataStore, collectionId: string) => Promise<ReadonlyArray<Portal>>;
1050
+
722
1051
  /** Effect form of {@link compareEnvironments}. */
723
1052
  export declare const compareEnvironments: (...args: Parameters<typeof compareEnvironments_2>) => Effect<readonly EnvironmentDifference[], never, never>;
724
1053
 
@@ -728,6 +1057,19 @@ declare const compareEnvironments_2: (store: DataStore, types: ReadonlyArray<Con
728
1057
  /** Order of two `major.minor.patch` versions: negative, 0 or positive. */
729
1058
  export declare const compareVersions: (a: string, b: string) => number;
730
1059
 
1060
+ /**
1061
+ * The identity of `request` under `contract` at publication `checkpoint` (a
1062
+ * release or publication id), with the document tags its response depends on.
1063
+ */
1064
+ export declare const compileCacheIdentity: (contract: CacheContract, request: CacheRequest, context: {
1065
+ readonly checkpoint: string;
1066
+ readonly tags?: ReadonlyArray<string>;
1067
+ }) => CacheIdentity;
1068
+
1069
+ declare type ComponentBlock = Extract<RichBlock, {
1070
+ readonly type: 'component';
1071
+ }>;
1072
+
731
1073
  /**
732
1074
  * A component editors compose pages from (ADR-CMS-015): a stable `id`, a
733
1075
  * display name and typed props. The frontend renders it; the CMS validates
@@ -739,10 +1081,29 @@ export declare interface ComponentDefinition {
739
1081
  readonly displayName: string;
740
1082
  readonly props: Readonly<Record<string, FieldSchema>>;
741
1083
  readonly fingerprint: string;
1084
+ /** What it is for, in an editor's words — searched by the picker. */
1085
+ readonly description?: string;
1086
+ /** The editorial jobs it serves (`'announce an event'`, `'collect leads'`) — the picker groups and searches by them. */
1087
+ readonly jobs?: ReadonlyArray<string>;
1088
+ /** Named presets an editor starts from (`dark`, `compact`): props that differ from empty. */
1089
+ readonly variants?: Readonly<Record<string, Readonly<Record<string, unknown>>>>;
1090
+ /** Example props — previews, galleries and tests render them; checked against `props` when a content type uses the component. */
1091
+ readonly fixtures?: Readonly<Record<string, Readonly<Record<string, unknown>>>>;
1092
+ /** Upgrades of instances saved against an earlier definition: its fingerprint → the props it becomes now. */
1093
+ readonly migrations?: Readonly<Record<string, (props: Readonly<Record<string, unknown>>) => Readonly<Record<string, unknown>>>>;
742
1094
  /** The consent purpose a reader must grant before this component's props reach them (`gateConsent`). */
743
1095
  readonly consent?: string;
744
1096
  }
745
1097
 
1098
+ /** A component's fixtures and variants against its props: every violation, with the fixture or variant it is in. */
1099
+ export declare const componentExampleViolations: (definition: ComponentDefinition) => ReadonlyArray<FieldViolation>;
1100
+
1101
+ /** The fingerprint a component with these props has — to key a migration from an earlier definition. */
1102
+ export declare const componentFingerprint: (spec: {
1103
+ readonly id: string;
1104
+ readonly props: Readonly<Record<string, FieldSchema | PipeableField>>;
1105
+ }) => string;
1106
+
746
1107
  /** One placed component in a `components` field, as stored. */
747
1108
  export declare interface ComponentInstance {
748
1109
  /** Stable across saves, reorders and translations of the same placement. */
@@ -753,9 +1114,29 @@ export declare interface ComponentInstance {
753
1114
  readonly props: Readonly<Record<string, unknown>>;
754
1115
  }
755
1116
 
1117
+ /** Every component placed in the values, nested ones included. */
1118
+ export declare const componentsOf: (type: ContentType, values: Readonly<Record<string, unknown>>) => ReadonlyArray<ComponentUse>;
1119
+
1120
+ /** A component placed in the document — a design-system node of the graph. */
1121
+ export declare interface ComponentUse {
1122
+ readonly path: string;
1123
+ readonly componentId: string;
1124
+ }
1125
+
756
1126
  /** A reader's choices: purpose id → the version they allowed. */
757
1127
  export declare type ConsentChoices = Readonly<Record<string, number>>;
758
1128
 
1129
+ /**
1130
+ * The same decision as {@link gateConsent}, for the browser to enforce: a
1131
+ * Content-Security-Policy whose `frame-src` lets in only this origin and the
1132
+ * vendors the reader granted. Set it on the response (a web middleware) and
1133
+ * an embed the reader refused cannot load even if one slipped into the page.
1134
+ */
1135
+ export declare const consentContentSecurityPolicy: (purposes: ReadonlyArray<ConsentPurpose>, choices: ConsentChoices, base?: string) => string;
1136
+
1137
+ /** The origins of the vendors whose purpose the reader granted in its current version. */
1138
+ export declare const consentedOrigins: (purposes: ReadonlyArray<ConsentPurpose>, choices: ConsentChoices) => ReadonlyArray<string>;
1139
+
759
1140
  /** Something a reader can allow or refuse. */
760
1141
  export declare interface ConsentPurpose {
761
1142
  readonly id: string;
@@ -763,6 +1144,8 @@ export declare interface ConsentPurpose {
763
1144
  readonly version: number;
764
1145
  readonly displayName: string;
765
1146
  readonly description: string;
1147
+ /** The third parties it lets in (none for a first-party purpose). */
1148
+ readonly vendors?: ReadonlyArray<ConsentVendor>;
766
1149
  }
767
1150
 
768
1151
  /** Effect form of {@link consentToUpgrade}. */
@@ -771,6 +1154,27 @@ export declare const consentToUpgrade: (...args: Parameters<typeof consentToUpgr
771
1154
  /** Consent to what the waiting version adds, and move to it. */
772
1155
  declare const consentToUpgrade_2: (tx: DataStore, extensionId: string, consent: ReadonlyArray<ExtensionCapability>) => Promise<ExtensionChange>;
773
1156
 
1157
+ /**
1158
+ * A third party a purpose lets in — kept apart from the purpose itself: who
1159
+ * it is, where its content comes from (the origins a page may then load), what
1160
+ * it stores on the reader's device, and what it does with the data.
1161
+ */
1162
+ export declare interface ConsentVendor {
1163
+ /** camelCase, unique within the purpose — what a reader-facing text is keyed by. */
1164
+ readonly id: string;
1165
+ readonly name: string;
1166
+ /** `https://host` origins, exactly — the browser loads frames from them once the purpose is granted. */
1167
+ readonly origins: ReadonlyArray<string>;
1168
+ readonly storage: string;
1169
+ readonly dataUse: string;
1170
+ }
1171
+
1172
+ /** The `href` of a one-off contact: `mailto:` an address, `tel:` a number without its spacing. */
1173
+ export declare const contactLiteralHref: (channel: "email" | "phone", value: string) => string;
1174
+
1175
+ /** Why `value` is not a usable one-off e-mail address or phone number, or null when it is. */
1176
+ export declare const contactLiteralProblem: (channel: "email" | "phone", value: string) => string | null;
1177
+
774
1178
  export declare const CONTENT_FORM_STRINGS: ContentFormStrings;
775
1179
 
776
1180
  /** The lifecycle states a content row moves through. */
@@ -829,6 +1233,11 @@ export declare interface ContentFormProps {
829
1233
  readonly strings?: ContentFormStringsInput;
830
1234
  /** How rich text's paragraphs and headings are edited — see `RichDocumentEditorProps.surface`. */
831
1235
  readonly richTextSurface?: 'markup' | 'visual';
1236
+ /**
1237
+ * Where each field's value lives, for its widget's `target`; by default the
1238
+ * field itself. A placed component's props form names its instance and prop.
1239
+ */
1240
+ readonly widgetTarget?: (name: string) => WidgetTarget;
832
1241
  }
833
1242
 
834
1243
  export declare interface ContentFormStrings {
@@ -844,6 +1253,11 @@ export declare interface ContentFormStrings {
844
1253
  readonly add: string;
845
1254
  readonly addBlock: string;
846
1255
  readonly addComponent: string;
1256
+ /** The search above the component picker. */
1257
+ readonly findComponent: string;
1258
+ readonly noComponentFound: string;
1259
+ /** The group of components that name no job. */
1260
+ readonly otherComponents: string;
847
1261
  readonly unknownComponent: (componentId: string) => string;
848
1262
  readonly level: string;
849
1263
  readonly numbered: string;
@@ -851,6 +1265,10 @@ export declare interface ContentFormStrings {
851
1265
  readonly numberedAt: (depth: number) => string;
852
1266
  readonly headerRow: string;
853
1267
  readonly image: string;
1268
+ /** The label of a download block's file. */
1269
+ readonly file: string;
1270
+ /** The label of the text a download block's link shows. */
1271
+ readonly fileLabel: string;
854
1272
  readonly caption: string;
855
1273
  readonly text: string;
856
1274
  readonly listItems: string;
@@ -866,6 +1284,27 @@ export declare interface ContentFormStrings {
866
1284
  readonly bold: string;
867
1285
  readonly italic: string;
868
1286
  readonly underline: string;
1287
+ /** A block's or a selection's named style (a rich-text profile's styles). */
1288
+ readonly style: string;
1289
+ readonly noStyle: string;
1290
+ /** Which component a component block places. */
1291
+ readonly component: string;
1292
+ /** The contact inserter: a published contact point, or a one-off address or number. */
1293
+ readonly contactKind: string;
1294
+ readonly contactPoint: string;
1295
+ readonly contactEmail: string;
1296
+ readonly contactPhone: string;
1297
+ readonly contactValue: string;
1298
+ readonly contactText: string;
1299
+ readonly insertContact: string;
1300
+ /** Above a block holding suggested changes; it is edited again once they are decided. */
1301
+ readonly suggestedChanges: string;
1302
+ /** One suggestion: who made it, what it puts in and takes out. */
1303
+ readonly changeBy: (by: string, inserted: string, deleted: string) => string;
1304
+ readonly accept: string;
1305
+ readonly reject: string;
1306
+ readonly acceptLabel: (by: string) => string;
1307
+ readonly rejectLabel: (by: string) => string;
869
1308
  }
870
1309
 
871
1310
  /** The defaults with an app's words over them. */
@@ -921,13 +1360,11 @@ export declare interface ContentfulNode {
921
1360
  export declare class ContentGone extends ContentGone_base {
922
1361
  }
923
1362
 
924
- declare const ContentGone_base: Schema_2.TaggedErrorClass<ContentGone, "ContentGone", {
925
- readonly _tag: Schema_2.tag<"ContentGone">;
926
- } & {
927
- contentType: typeof Schema_2.String;
1363
+ declare const ContentGone_base: Schema_2.Class<ContentGone, Schema_2.TaggedStruct<"ContentGone", {
1364
+ readonly contentType: Schema_2.String;
928
1365
  /** The address asked for. */
929
- path: typeof Schema_2.String;
930
- }>;
1366
+ readonly path: Schema_2.String;
1367
+ }>, YieldableError>;
931
1368
 
932
1369
  /** Effect form of {@link contentHealth}. */
933
1370
  export declare const contentHealth: (...args: Parameters<typeof contentHealth_2>) => Effect<readonly HealthFinding[], never, never>;
@@ -951,12 +1388,10 @@ declare const contentHealth_2: (store: DataStore, types: ReadonlyArray<ContentTy
951
1388
  export declare class ContentIdConflict extends ContentIdConflict_base {
952
1389
  }
953
1390
 
954
- declare const ContentIdConflict_base: Schema_2.TaggedErrorClass<ContentIdConflict, "ContentIdConflict", {
955
- readonly _tag: Schema_2.tag<"ContentIdConflict">;
956
- } & {
957
- contentType: typeof Schema_2.String;
958
- id: typeof Schema_2.String;
959
- }>;
1391
+ declare const ContentIdConflict_base: Schema_2.Class<ContentIdConflict, Schema_2.TaggedStruct<"ContentIdConflict", {
1392
+ readonly contentType: Schema_2.String;
1393
+ readonly id: Schema_2.String;
1394
+ }>, YieldableError>;
960
1395
 
961
1396
  /**
962
1397
  * Raised by `publish` / `unpublish` / `archive` when the row id doesn't
@@ -967,16 +1402,14 @@ declare const ContentIdConflict_base: Schema_2.TaggedErrorClass<ContentIdConflic
967
1402
  export declare class ContentNotFound extends ContentNotFound_base {
968
1403
  }
969
1404
 
970
- declare const ContentNotFound_base: Schema_2.TaggedErrorClass<ContentNotFound, "ContentNotFound", {
971
- readonly _tag: Schema_2.tag<"ContentNotFound">;
972
- } & {
973
- contentType: typeof Schema_2.String;
974
- id: typeof Schema_2.String;
1405
+ declare const ContentNotFound_base: Schema_2.Class<ContentNotFound, Schema_2.TaggedStruct<"ContentNotFound", {
1406
+ readonly contentType: Schema_2.String;
1407
+ readonly id: Schema_2.String;
975
1408
  /** Which lifecycle table the id was looked up in (`revision`: the
976
1409
  * revision to publish is not one of this variant's; `share`: a preview
977
1410
  * share of the caller's). */
978
- stage: Schema_2.Literal<["draft", "published", "revision", "share"]>;
979
- }>;
1411
+ readonly stage: Schema_2.Literals<readonly ["draft", "published", "revision", "share"]>;
1412
+ }>, YieldableError>;
980
1413
 
981
1414
  /** A chainable read over one content type's published rows. */
982
1415
  export declare interface ContentQuery {
@@ -1021,6 +1454,7 @@ export declare interface ContentType {
1021
1454
  /** Whether publishing needs an approved revision — see `ContentTypeSpec.review`. */
1022
1455
  readonly review?: {
1023
1456
  readonly required: boolean | 'workspace';
1457
+ readonly workflow?: ReviewWorkflow;
1024
1458
  };
1025
1459
  /** When documents may be used — see `ContentTypeSpec.availability`. */
1026
1460
  readonly availability?: AvailabilityConfig;
@@ -1070,10 +1504,15 @@ export declare interface ContentTypeSpec {
1070
1504
  * (`approveReview`) — for every path that publishes: single, release,
1071
1505
  * rollback, schedule. Register `cmsReviewsTable` when set. `'workspace'`:
1072
1506
  * each workspace decides (team.ts `setReviewRequired`, or a blueprint's
1073
- * `team.reviewRequired`) — register `cmsTeamTable` too.
1507
+ * `team.reviewRequired`) — register `cmsTeamTable` too. With `workflow`
1508
+ * (`defineReviewWorkflow`), the approval is a workflow instance that
1509
+ * approved the exact revision — every applicable step decided — instead of
1510
+ * one approval; register `cmsWorkflowInstancesTable` and
1511
+ * `cmsWorkflowDecisionsTable`.
1074
1512
  */
1075
1513
  readonly review?: {
1076
1514
  readonly required: boolean | 'workspace';
1515
+ readonly workflow?: ReviewWorkflow;
1077
1516
  };
1078
1517
  /**
1079
1518
  * When this type's documents may be used (`until`: a date/datetime field,
@@ -1179,16 +1618,14 @@ declare const contentUsage_2: (store: DataStore, types: ReadonlyArray<ContentTyp
1179
1618
  export declare class ContentValidationFailed extends ContentValidationFailed_base {
1180
1619
  }
1181
1620
 
1182
- declare const ContentValidationFailed_base: Schema_2.TaggedErrorClass<ContentValidationFailed, "ContentValidationFailed", {
1183
- readonly _tag: Schema_2.tag<"ContentValidationFailed">;
1184
- } & {
1185
- contentType: typeof Schema_2.String;
1186
- violations: Schema_2.Array$<Schema_2.Struct<{
1187
- field: typeof Schema_2.String;
1188
- rule: typeof Schema_2.String;
1189
- message: typeof Schema_2.String;
1621
+ declare const ContentValidationFailed_base: Schema_2.Class<ContentValidationFailed, Schema_2.TaggedStruct<"ContentValidationFailed", {
1622
+ readonly contentType: Schema_2.String;
1623
+ readonly violations: Schema_2.$Array<Schema_2.Struct<{
1624
+ readonly field: Schema_2.String;
1625
+ readonly rule: Schema_2.String;
1626
+ readonly message: Schema_2.String;
1190
1627
  }>>;
1191
- }>;
1628
+ }>, YieldableError>;
1192
1629
 
1193
1630
  export declare type ContentValue = Record<string, unknown>;
1194
1631
 
@@ -1212,6 +1649,54 @@ export declare type ContentValue = Record<string, unknown>;
1212
1649
  */
1213
1650
  export declare const contentViolations: (type: Pick<ContentType, "name" | "fields"> & Partial<Pick<ContentType, "taxonomy">>, row: Readonly<Record<string, unknown>>) => ReadonlyArray<FieldViolation>;
1214
1651
 
1652
+ /** Effect form of {@link continueBulkRun}. */
1653
+ export declare const continueBulkRun: (...args: Parameters<typeof continueBulkRun_2>) => Effect<BulkRunState | null, never, never>;
1654
+
1655
+ /**
1656
+ * Do the next `limit` items of a run — each in its own transaction, its
1657
+ * result saved before the next starts — and return where the run stands. A
1658
+ * call after an interruption continues at the first item without a result,
1659
+ * so no item runs twice. Hand it a store outside any transaction.
1660
+ */
1661
+ declare const continueBulkRun_2: (store: DataStore, types: ReadonlyArray<ContentType>, runId: string, limit?: number, now?: Date) => Promise<BulkRunState | null>;
1662
+
1663
+ /** How many variants the contract allows at most (query strings count as unbounded beyond the budget). */
1664
+ export declare const contractVariants: (contract: CacheContract) => number;
1665
+
1666
+ /** Effect form of {@link copiesOf}. */
1667
+ export declare const copiesOf: (...args: Parameters<typeof copiesOf_2>) => Effect<readonly (CopyOrigin & {
1668
+ readonly documentId: string;
1669
+ })[], never, never>;
1670
+
1671
+ /** The independent copies made of a document, oldest first. */
1672
+ declare const copiesOf_2: (store: DataStore, sourceDocumentId: string) => Promise<ReadonlyArray<CopyOrigin & {
1673
+ readonly documentId: string;
1674
+ }>>;
1675
+
1676
+ /** Effect form of {@link copyDocument}. */
1677
+ export declare const copyDocument: (...args: Parameters<typeof copyDocument_2>) => Effect<CopyDocumentResult, ContentValidationFailed | ContentNotFound | ContentIdConflict | RevisionMismatch, never>;
1678
+
1679
+ /**
1680
+ * Copy a document's current draft into a new, independent document in the same
1681
+ * place, in the caller's transaction. The copy is titled `title` — or the
1682
+ * source's title with “(copy)”, numbered from the second copy — and records
1683
+ * the source and the revision it was made from.
1684
+ */
1685
+ declare const copyDocument_2: (tx: DataStore, type: ContentType, sourceDocumentId: string, scope: CmsScope, input?: {
1686
+ readonly title?: string;
1687
+ readonly actorId?: string | null;
1688
+ }, now?: Date) => Promise<CopyDocumentResult>;
1689
+
1690
+ export declare type CopyDocumentResult = {
1691
+ readonly ok: true;
1692
+ readonly id: string;
1693
+ readonly documentId: string;
1694
+ readonly revisionId: string;
1695
+ } | {
1696
+ readonly ok: false;
1697
+ readonly reason: 'notFound';
1698
+ };
1699
+
1215
1700
  /** Effect form of {@link copyEnvironment}. */
1216
1701
  export declare const copyEnvironment: (...args: Parameters<typeof copyEnvironment_2>) => Effect<CopyEnvironmentResult, never, never>;
1217
1702
 
@@ -1232,6 +1717,19 @@ export declare type CopyEnvironmentResult = {
1232
1717
  readonly variants: number;
1233
1718
  };
1234
1719
 
1720
+ export declare interface CopyOrigin {
1721
+ readonly sourceDocumentId: string;
1722
+ readonly sourceRevisionId: string | null;
1723
+ readonly copiedBy: string | null;
1724
+ readonly copiedAt: Date;
1725
+ }
1726
+
1727
+ /** Effect form of {@link copyOrigin}. */
1728
+ export declare const copyOrigin: (...args: Parameters<typeof copyOrigin_2>) => Effect<CopyOrigin | null, never, never>;
1729
+
1730
+ /** What a document was copied from, or null when it is an original. */
1731
+ declare const copyOrigin_2: (store: DataStore, documentId: string) => Promise<CopyOrigin | null>;
1732
+
1235
1733
  /**
1236
1734
  * A standalone CMS client for build-time consumption (the blog
1237
1735
  * template's CMS mode), where there is no request handle. Same surface
@@ -1244,6 +1742,34 @@ export declare const createCmsClient: (config: {
1244
1742
  secret?: string;
1245
1743
  }) => CmsApi;
1246
1744
 
1745
+ /** Effect form of {@link createCollection}. */
1746
+ export declare const createCollection: (...args: Parameters<typeof createCollection_2>) => Effect<Collection, never, never>;
1747
+
1748
+ /** Create an empty collection in the caller's site and environment. */
1749
+ declare const createCollection_2: (tx: DataStore, scope: Pick<CmsScope, "site" | "environment">, input: {
1750
+ readonly name: string;
1751
+ readonly description?: string;
1752
+ }) => Promise<Collection>;
1753
+
1754
+ /** Effect form of {@link createPortal}. */
1755
+ export declare const createPortal: (...args: Parameters<typeof createPortal_2>) => Effect<CreatePortalResult, never, never>;
1756
+
1757
+ /** A portal link to a collection: the token is returned once, only its hash is stored. */
1758
+ declare const createPortal_2: (tx: DataStore, collectionId: string, input: {
1759
+ readonly expiresAt: Date;
1760
+ readonly maxDownloads?: number | null;
1761
+ readonly label?: string;
1762
+ }, now?: Date) => Promise<CreatePortalResult>;
1763
+
1764
+ export declare type CreatePortalResult = {
1765
+ readonly ok: true;
1766
+ readonly id: string;
1767
+ readonly token: string;
1768
+ } | {
1769
+ readonly ok: false;
1770
+ readonly reason: 'notFound' | 'badExpiry' | 'badLimit';
1771
+ };
1772
+
1247
1773
  /** Effect form of {@link createPreviewShare}. */
1248
1774
  export declare const createPreviewShare: (...args: Parameters<typeof createPreviewShare_2>) => Effect<{
1249
1775
  readonly share: Row;
@@ -1281,6 +1807,111 @@ declare const createRelease_2: (store: DataStore, input: {
1281
1807
  readonly environment: string;
1282
1808
  }) => Promise<Row>;
1283
1809
 
1810
+ export declare interface CriterionResult extends CutoverCriterion {
1811
+ /** The measured number; null when the measure is missing (which fails). */
1812
+ readonly measured: number | null;
1813
+ readonly pass: boolean;
1814
+ }
1815
+
1816
+ /** Effect form of {@link cutoverAdoption}. */
1817
+ export declare const cutoverAdoption: (...args: Parameters<typeof cutoverAdoption_2>) => Effect<readonly AdoptionEntry[], never, never>;
1818
+
1819
+ /**
1820
+ * Who has worked on migrated content since it arrived, per person: the
1821
+ * revisions saved after `since` (the import run), or — without it — after
1822
+ * each document's first revision.
1823
+ */
1824
+ declare const cutoverAdoption_2: (store: DataStore, documentIds: ReadonlyArray<string>, since?: Date) => Promise<ReadonlyArray<AdoptionEntry>>;
1825
+
1826
+ /** One objective criterion: a named measure against a threshold. */
1827
+ export declare interface CutoverCriterion {
1828
+ readonly id: string;
1829
+ /** The measure it reads (a key of the measures handed to `evaluateCutover`). */
1830
+ readonly measure: string;
1831
+ readonly op: 'atMost' | 'atLeast';
1832
+ readonly value: number;
1833
+ /** What it means, in the team's words. */
1834
+ readonly label: string;
1835
+ }
1836
+
1837
+ export declare interface CutoverDecision {
1838
+ readonly id: string;
1839
+ readonly decision: 'go' | 'fallback';
1840
+ readonly criteria: ReadonlyArray<CriterionResult>;
1841
+ readonly note: string;
1842
+ readonly plan: CutoverPlan | null;
1843
+ readonly decidedBy: string;
1844
+ readonly decidedAt: Date;
1845
+ }
1846
+
1847
+ /** Effect form of {@link cutoverDecisions}. */
1848
+ export declare const cutoverDecisions: (...args: Parameters<typeof cutoverDecisions_2>) => Effect<readonly CutoverDecision[], never, never>;
1849
+
1850
+ /** A source's decisions, newest first. */
1851
+ declare const cutoverDecisions_2: (store: DataStore, source: string) => Promise<ReadonlyArray<CutoverDecision>>;
1852
+
1853
+ export declare interface CutoverIssue {
1854
+ readonly id: string;
1855
+ readonly key: string;
1856
+ readonly kind: string;
1857
+ readonly detail: string;
1858
+ readonly resolution: string | null;
1859
+ readonly resolvedBy: string | null;
1860
+ }
1861
+
1862
+ /** Effect form of {@link cutoverIssues}. */
1863
+ export declare const cutoverIssues: (...args: Parameters<typeof cutoverIssues_2>) => Effect<readonly CutoverIssue[], never, never>;
1864
+
1865
+ /** A source's issues, open ones first. */
1866
+ declare const cutoverIssues_2: (store: DataStore, source: string) => Promise<ReadonlyArray<CutoverIssue>>;
1867
+
1868
+ /**
1869
+ * What a `go` pins: from when the old system takes no more edits (the freeze
1870
+ * — or, with `dualWrite`, until when both are written), where traffic goes,
1871
+ * how many old addresses redirect, whether caches are purged at the switch,
1872
+ * and until when a rollback to the old system stays possible.
1873
+ */
1874
+ export declare interface CutoverPlan {
1875
+ readonly freezeAt: Date;
1876
+ readonly dualWrite?: boolean;
1877
+ readonly routing: string;
1878
+ readonly redirects: number;
1879
+ readonly purgeCaches: boolean;
1880
+ readonly rollbackUntil: Date;
1881
+ }
1882
+
1883
+ /** Why a plan cannot stand, or null. */
1884
+ export declare const cutoverPlanProblem: (plan: CutoverPlan, now: Date) => string | null;
1885
+
1886
+ /** Effect form of {@link decideCutover}. */
1887
+ export declare const decideCutover: (...args: Parameters<typeof decideCutover_2>) => Effect<DecideCutoverResult, never, never>;
1888
+
1889
+ /**
1890
+ * Record the decision with the criteria as they stand: `go` only when every
1891
+ * criterion passes and with a plan that pins the switch; `fallback` (stay on
1892
+ * the old system, or return to it) any time, with a note.
1893
+ */
1894
+ declare const decideCutover_2: (tx: DataStore, input: {
1895
+ readonly source: string;
1896
+ readonly decision: "go" | "fallback";
1897
+ readonly results: ReadonlyArray<CriterionResult>;
1898
+ readonly note: string;
1899
+ readonly actorId: string;
1900
+ readonly tenantId: string | null;
1901
+ /** Required for `go`. */
1902
+ readonly plan?: CutoverPlan;
1903
+ }, now?: Date) => Promise<DecideCutoverResult>;
1904
+
1905
+ export declare type DecideCutoverResult = {
1906
+ readonly ok: true;
1907
+ readonly id: string;
1908
+ } | {
1909
+ readonly ok: false;
1910
+ readonly reason: 'notReady' | 'noNote' | 'noPlan';
1911
+ readonly failing?: ReadonlyArray<string>;
1912
+ readonly problem?: string;
1913
+ };
1914
+
1284
1915
  export declare type DecideExceptionResult = {
1285
1916
  readonly ok: true;
1286
1917
  readonly state: 'approved' | 'rejected' | 'withdrawn';
@@ -1312,31 +1943,147 @@ declare const decideQualityException_2: (tx: DataStore, exceptionId: string, inp
1312
1943
  readonly note?: string;
1313
1944
  }, now?: Date) => Promise<DecideExceptionResult>;
1314
1945
 
1315
- /** Decode character references (`&amp;`, `&#8217;`, `&#x2014;`). */
1316
- export declare const decodeEntities: (text: string) => string;
1946
+ /** Who decides, with the scopes they hold (effective scopes of the request). */
1947
+ export declare interface Decider {
1948
+ readonly actorId: string;
1949
+ readonly scopes: ReadonlySet<string>;
1950
+ }
1317
1951
 
1318
- /** Define an audience; a rule with no condition would match everyone and is refused. */
1319
- export declare const defineAudience: (audience: Audience) => Audience;
1952
+ /** Effect form of {@link decideStep}. */
1953
+ export declare const decideStep: (...args: Parameters<typeof decideStep_2>) => Effect<DecideStepResult, never, never>;
1320
1954
 
1321
1955
  /**
1322
- * Check a blueprint and order its entries so every referenced entry comes
1323
- * before the entries that reference it. Throws `BlueprintInvalid` for a key
1956
+ * Approve or request changes on one open step, as `decider`, in the caller's
1957
+ * transaction. The draft must still show the instance's revision; the
1958
+ * requester never decides; a delegated step is decided by its delegate alone.
1959
+ * Approving the last applicable step approves the instance; asking for
1960
+ * changes on any step sends it back.
1961
+ */
1962
+ declare const decideStep_2: (tx: DataStore, instanceId: string, stepId: string, decider: Decider, input: {
1963
+ readonly action: "approve" | "requestChanges";
1964
+ readonly evidence?: string;
1965
+ readonly note?: string;
1966
+ }, now?: Date) => Promise<DecideStepResult>;
1967
+
1968
+ export declare type DecideStepResult = {
1969
+ readonly ok: true;
1970
+ readonly instanceStatus: WorkflowInstance['status'];
1971
+ } | {
1972
+ readonly ok: false;
1973
+ readonly reason: StepRefusal;
1974
+ };
1975
+
1976
+ /** Decode character references (`&amp;`, `&#8217;`, `&#x2014;`). */
1977
+ export declare const decodeEntities: (text: string) => string;
1978
+
1979
+ /** The intent a `?select=…` value carries, or null. */
1980
+ export declare const decodeSelectionIntent: (value: string | null | undefined) => SelectionIntent | null;
1981
+
1982
+ /** Define an audience; a rule with no condition would match everyone and is refused. */
1983
+ export declare const defineAudience: (audience: Audience) => Audience;
1984
+
1985
+ /**
1986
+ * Check a blueprint and order its entries so every referenced entry comes
1987
+ * before the entries that reference it. Throws `BlueprintInvalid` for a key
1324
1988
  * used twice, a reference to no entry, or entries that reference each other
1325
1989
  * in a circle.
1326
1990
  */
1327
1991
  export declare const defineBlueprint: (spec: Blueprint) => Blueprint;
1328
1992
 
1329
- /** Declare a component editors can place in a `Schema.Components` field. */
1330
1993
  export declare const defineComponent: (spec: {
1331
1994
  readonly id: string;
1332
1995
  readonly displayName: string;
1333
1996
  readonly props: Readonly<Record<string, FieldSchema | PipeableField>>;
1334
1997
  /** A consent purpose the reader must grant first — an embed that loads a third party. */
1335
1998
  readonly consent?: string;
1999
+ /** What it is for, in an editor's words. */
2000
+ readonly description?: string;
2001
+ /** The editorial jobs it serves; the picker groups and searches by them. */
2002
+ readonly jobs?: ReadonlyArray<string>;
2003
+ readonly variants?: ComponentDefinition["variants"];
2004
+ readonly fixtures?: ComponentDefinition["fixtures"];
2005
+ readonly migrations?: ComponentDefinition["migrations"];
1336
2006
  }) => ComponentDefinition;
1337
2007
 
1338
2008
  export declare const defineContentType: (spec: ContentTypeSpec) => ContentType;
1339
2009
 
2010
+ /**
2011
+ * Declare the design tokens components may name (`Schema.Token(tokens, 'tone')`).
2012
+ * Group and token names are camelCase; the values are what an editor reads
2013
+ * beside each name — the renderer owns the actual styles.
2014
+ */
2015
+ export declare const defineDesignTokens: <T extends DesignTokens>(tokens: T) => T;
2016
+
2017
+ /** Declare a metric; the fingerprint follows its meaning. */
2018
+ export declare const defineMetric: (spec: MetricSpec) => MetricDefinition;
2019
+
2020
+ /** Declare a review workflow; throws for a duplicate step, an unknown or a cyclic `after`. */
2021
+ export declare const defineReviewWorkflow: (spec: ReviewWorkflow) => ReviewWorkflow;
2022
+
2023
+ /**
2024
+ * Declare what a rich-text field allows (`Schema.RichText({ profile })`):
2025
+ * its blocks, heading levels and marks, named styles from one design-token
2026
+ * group, the components that may sit between blocks, and how e-mail
2027
+ * addresses and phone numbers are given — a published contact point of
2028
+ * `contactPoints`, and/or a one-off checked on save (`contactLiterals`).
2029
+ * Bump `version` when it changes: a saved document records `<name>@<version>`.
2030
+ * Unset lists allow every built-in block, heading level and mark.
2031
+ */
2032
+ export declare const defineRichTextProfile: (spec: {
2033
+ readonly name: string;
2034
+ readonly version: number;
2035
+ readonly blocks?: ReadonlyArray<Exclude<RichBlockKind, "component">>;
2036
+ readonly headings?: ReadonlyArray<2 | 3>;
2037
+ readonly marks?: ReadonlyArray<RichMark>;
2038
+ readonly styles?: {
2039
+ readonly tokens: DesignTokens;
2040
+ readonly group: string;
2041
+ };
2042
+ readonly components?: ReadonlyArray<ComponentDefinition>;
2043
+ readonly contactPoints?: string;
2044
+ readonly contactLiterals?: boolean;
2045
+ }) => RichTextProfile;
2046
+
2047
+ /** Effect form of {@link delegateStep}. */
2048
+ export declare const delegateStep: (...args: Parameters<typeof delegateStep_2>) => Effect<{
2049
+ readonly ok: true;
2050
+ } | {
2051
+ readonly ok: false;
2052
+ readonly reason: StepRefusal | "selfDelegation";
2053
+ }, never, never>;
2054
+
2055
+ /** Hand an open step to a named person (someone allowed to decide it delegates); they decide it from then on. */
2056
+ declare const delegateStep_2: (tx: DataStore, instanceId: string, stepId: string, decider: Decider, to: string, now?: Date) => Promise<{
2057
+ readonly ok: true;
2058
+ } | {
2059
+ readonly ok: false;
2060
+ readonly reason: StepRefusal | "selfDelegation";
2061
+ }>;
2062
+
2063
+ export declare interface DeliveryCheck {
2064
+ readonly id: string;
2065
+ readonly contentType: string;
2066
+ readonly documentId: string;
2067
+ readonly locale: string;
2068
+ readonly kind: 'publish' | 'unpublish';
2069
+ readonly revisionId: string | null;
2070
+ readonly url: string;
2071
+ readonly status: 'pending' | 'observed' | 'stale';
2072
+ readonly requestedAt: Date;
2073
+ readonly observedAt: Date | null;
2074
+ readonly lastSeen: string | null;
2075
+ readonly attempts: number;
2076
+ }
2077
+
2078
+ /** Effect form of {@link deliveryChecks}. */
2079
+ export declare const deliveryChecks: (...args: Parameters<typeof deliveryChecks_2>) => Effect<readonly DeliveryCheck[], never, never>;
2080
+
2081
+ /** The newest checks, newest first — optionally of one document. */
2082
+ declare const deliveryChecks_2: (store: DataStore, options?: {
2083
+ readonly documentId?: string;
2084
+ readonly limit?: number;
2085
+ }) => Promise<ReadonlyArray<DeliveryCheck>>;
2086
+
1340
2087
  /**
1341
2088
  * Mark a field computed-on-save from another field. The transform runs
1342
2089
  * before the row is written — `saveDraft` applies it (via
@@ -1365,6 +2112,9 @@ export declare const describeEdit: (fields: Readonly<Record<string, FieldSchema>
1365
2112
 
1366
2113
  export declare const describeFailure: (err: unknown) => string;
1367
2114
 
2115
+ /** A design system's tokens: group → token name → what it stands for (a value or a description). */
2116
+ export declare type DesignTokens = Readonly<Record<string, Readonly<Record<string, string>>>>;
2117
+
1368
2118
  /** One run of a word diff: text both sides share, or text only one side has. */
1369
2119
  export declare interface DiffSegment {
1370
2120
  readonly op: 'same' | 'removed' | 'added';
@@ -1379,6 +2129,68 @@ export declare interface DiffSegment {
1379
2129
  */
1380
2130
  export declare const diffWords: (before: string, after: string) => ReadonlyArray<DiffSegment>;
1381
2131
 
2132
+ /** Effect form of {@link discardCandidate}. */
2133
+ export declare const discardCandidate: (...args: Parameters<typeof discardCandidate_2>) => Effect<boolean, never, never>;
2134
+
2135
+ /** Leave an open candidate; its AI operation is settled as discarded. */
2136
+ declare const discardCandidate_2: (tx: DataStore, candidateId: string, actorId: string, now?: Date) => Promise<boolean>;
2137
+
2138
+ export declare interface DocumentGraph {
2139
+ /** False when the document has no content in this perspective. */
2140
+ readonly found: boolean;
2141
+ readonly perspective: 'published' | 'draft' | 'revision';
2142
+ /** The revision the forward edges were read from. */
2143
+ readonly revision: {
2144
+ readonly id: string;
2145
+ readonly number: number;
2146
+ } | null;
2147
+ /** What it points at. */
2148
+ readonly references: ReadonlyArray<ReferenceOccurrence>;
2149
+ /** The components it is built from. */
2150
+ readonly components: ReadonlyArray<ComponentUse>;
2151
+ /** What uses it: live content for `published` and a revision, drafts for `draft`. */
2152
+ readonly usedBy: ReadonlyArray<GraphUse>;
2153
+ /** Its address now, and the addresses that redirect to it. */
2154
+ readonly routes: {
2155
+ readonly path: string | null;
2156
+ readonly formerPaths: ReadonlyArray<string>;
2157
+ };
2158
+ /** The releases that carry one of its variants. */
2159
+ readonly releases: ReadonlyArray<{
2160
+ readonly releaseId: string;
2161
+ readonly name: string;
2162
+ readonly status: string;
2163
+ readonly action: string;
2164
+ readonly revisionId: string | null;
2165
+ readonly locale: string;
2166
+ }>;
2167
+ }
2168
+
2169
+ /** Effect form of {@link documentGraph}. */
2170
+ export declare const documentGraph: (...args: Parameters<typeof documentGraph_2>) => Effect<DocumentGraph, never, never>;
2171
+
2172
+ /**
2173
+ * The graph around one document in one place (site, environment, locale) and
2174
+ * perspective. A revision perspective reads that revision's values — the
2175
+ * document as it was then — and refuses a revision of another document.
2176
+ */
2177
+ declare const documentGraph_2: (store: DataStore, types: ReadonlyArray<ContentType>, target: {
2178
+ readonly type: ContentType;
2179
+ readonly documentId: string;
2180
+ }, scope: CmsScope, perspective?: GraphPerspective) => Promise<DocumentGraph>;
2181
+
2182
+ /** Whether any block of the document holds a suggestion. */
2183
+ export declare const documentHasChanges: (doc: RichDocument) => boolean;
2184
+
2185
+ /** Effect form of {@link draftUses}. */
2186
+ export declare const draftUses: (...args: Parameters<typeof draftUses_2>) => Effect<readonly GraphUse[], never, never>;
2187
+
2188
+ /** The drafts in a site and environment that reference `target`, with the paths and the revision each is in. */
2189
+ declare const draftUses_2: (store: DataStore, types: ReadonlyArray<ContentType>, target: {
2190
+ readonly type: string;
2191
+ readonly documentId: string;
2192
+ }, scope: Pick<CmsScope, "site" | "environment">) => Promise<ReadonlyArray<GraphUse>>;
2193
+
1382
2194
  /** Effect form of {@link dropFromSearch}. */
1383
2195
  export declare const dropFromSearch: (...args: Parameters<typeof dropFromSearch_2>) => Effect<void, never, never>;
1384
2196
 
@@ -1408,6 +2220,33 @@ declare const duplicateGroups_2: (store: DataStore, type: ContentType, scope: Cm
1408
2220
  readonly titleField?: string;
1409
2221
  }) => Promise<ReadonlyArray<DuplicateGroup>>;
1410
2222
 
2223
+ /**
2224
+ * The response headers that tell `provider` how to keep this answer: how long
2225
+ * (`maxAge`, then `staleWhileRevalidate` served stale while it refetches), the
2226
+ * `Vary` from the identity, and the purge tags in the header the provider
2227
+ * reads (`Cache-Tag` comma-separated; Fastly's `Surrogate-Key` space-separated
2228
+ * with its own `Surrogate-Control`). A request that is not shared-cacheable
2229
+ * gets `private, no-store` and no tags.
2230
+ */
2231
+ export declare const edgeHeaders: (provider: EdgeProvider, identity: CacheIdentity, lifetime: {
2232
+ readonly maxAge: number;
2233
+ readonly staleWhileRevalidate?: number;
2234
+ }) => Readonly<Record<string, string>>;
2235
+
2236
+ /** A shared cache in front of the delivery API: your own (BYO) or a managed one. */
2237
+ export declare type EdgeProvider = 'cloudflare' | 'fastly' | 'generic';
2238
+
2239
+ /**
2240
+ * The requests that drop every cached answer carrying one of `tags`, and the
2241
+ * answers at `urls` — none when there is nothing to purge or the target is
2242
+ * unusable. Tags a header could not carry and addresses that are not absolute
2243
+ * http(s) URLs are left out rather than sent.
2244
+ */
2245
+ export declare const edgePurgeRequests: (provider: PurgeProvider, config: {
2246
+ readonly target: string;
2247
+ readonly token: string | null;
2248
+ }, tags: ReadonlyArray<string>, urls?: ReadonlyArray<string>) => ReadonlyArray<PurgeRequest>;
2249
+
1411
2250
  /** What one change did, and a key that tells whether the next change continues it. */
1412
2251
  export declare interface EditDescription {
1413
2252
  readonly label: string;
@@ -1458,11 +2297,33 @@ export declare interface EditWords {
1458
2297
  /** The tools on for the last step of `chain`, and why each tool is as it is. */
1459
2298
  export declare const effectiveExposure: (input: ExposureInput) => ExposureResult;
1460
2299
 
2300
+ /** One inherited field of a page as the editor shows it: what it is, where it came from, and what the page may do. */
2301
+ export declare interface EffectiveInheritance extends Inherited {
2302
+ readonly field: string;
2303
+ readonly locked: boolean;
2304
+ /** The mask field, when the field may be masked. */
2305
+ readonly mask: string | null;
2306
+ /** What it would be without the page's own value or mask — what "reset" brings back. */
2307
+ readonly inherited: Inherited;
2308
+ }
2309
+
2310
+ /**
2311
+ * Every inherited field of `node` (the type's `tree.inherit`): its effective
2312
+ * value with the document it came from and how, whether it is locked or may
2313
+ * be masked, and what it would be after a reset. A draft not yet in the tree
2314
+ * inherits through its parent — pass it as `node` and it is placed for the
2315
+ * walk.
2316
+ */
2317
+ export declare const effectiveInheritance: (inherit: Readonly<Record<string, InheritRule>>, tree: CmsTree, node: TreeNode) => ReadonlyArray<EffectiveInheritance>;
2318
+
1461
2319
  export declare const EMPTY_EDIT_HISTORY: EditHistory;
1462
2320
 
1463
2321
  /** An empty document. */
1464
2322
  export declare const emptyRichDocument: () => RichDocument;
1465
2323
 
2324
+ /** The intent as a URL parameter value (`?select=…`). */
2325
+ export declare const encodeSelectionIntent: (intent: SelectionIntent) => string;
2326
+
1466
2327
  export declare interface EnvironmentDifference {
1467
2328
  readonly contentType: string;
1468
2329
  /** Documents (with a variant) in `from` only, and in `to` only. */
@@ -1482,6 +2343,12 @@ export declare interface EnvironmentPair {
1482
2343
  readonly to: string;
1483
2344
  }
1484
2345
 
2346
+ /** Every criterion against the measures: each with its measured value, and whether all pass. */
2347
+ export declare const evaluateCutover: (criteria: ReadonlyArray<CutoverCriterion>, measures: Readonly<Record<string, number>>) => {
2348
+ readonly results: ReadonlyArray<CriterionResult>;
2349
+ readonly ready: boolean;
2350
+ };
2351
+
1485
2352
  export declare type ExceptionState = 'requested' | 'approved' | 'rejected' | 'withdrawn' | 'expired';
1486
2353
 
1487
2354
  export declare interface Experiment {
@@ -1490,15 +2357,18 @@ export declare interface Experiment {
1490
2357
  readonly contentType: string;
1491
2358
  readonly documentId: string;
1492
2359
  readonly locale: string;
1493
- readonly status: 'running' | 'stopped';
2360
+ readonly status: 'planned' | 'running' | 'stopped';
1494
2361
  readonly share: number;
1495
2362
  readonly overrides: Readonly<Record<string, string>>;
1496
2363
  readonly goal: string;
1497
2364
  /** Null for an experiment started before hypotheses were asked for. */
1498
2365
  readonly hypothesis: string | null;
1499
2366
  readonly guardrailMaxDrop: number | null;
1500
- readonly startedAt: Date;
2367
+ /** Null while planned. */
2368
+ readonly startedAt: Date | null;
1501
2369
  readonly stoppedAt: Date | null;
2370
+ readonly startReleaseId: string | null;
2371
+ readonly stopReason: 'manual' | 'replaced' | 'rolledBack' | null;
1502
2372
  /** Version A: the published revision it was started on (null before lineage was recorded). */
1503
2373
  readonly revisionId: string | null;
1504
2374
  readonly adoptedReleaseId: string | null;
@@ -1539,6 +2409,22 @@ export declare const experimentLineage: (...args: Parameters<typeof experimentLi
1539
2409
  /** Where every delivery of an experiment came from — revision, version, adoption. */
1540
2410
  declare const experimentLineage_2: (store: DataStore, experimentId: string) => Promise<ExperimentLineage | null>;
1541
2411
 
2412
+ /**
2413
+ * Everything version B may override on a page with these values: its text
2414
+ * fields, and each text prop of each component placed on it
2415
+ * (`sections[<instanceId>].heading`).
2416
+ */
2417
+ export declare const experimentOverrideKeys: (type: ContentType, values: Readonly<Record<string, unknown>>) => ReadonlyArray<string>;
2418
+
2419
+ /**
2420
+ * The release hook experiments need (pass it to `publishRelease`,
2421
+ * `publishDueReleases` and `rollbackRelease` as `afterPublish`): a release
2422
+ * going live starts the experiments planned on it — on the revision it just
2423
+ * published, replacing one still running on that page — and a rollback stops
2424
+ * the experiments the rolled-back release started.
2425
+ */
2426
+ export declare const experimentReleaseHook: ReleaseHook;
2427
+
1542
2428
  export declare interface ExperimentResults {
1543
2429
  readonly A: VariantResult;
1544
2430
  readonly B: VariantResult;
@@ -1561,6 +2447,28 @@ export declare const experimentResults: (...args: Parameters<typeof experimentRe
1561
2447
  /** Per version: readers, conversions and rate, the lift of B, and whether the difference is yet more than noise. */
1562
2448
  declare const experimentResults_2: (store: DataStore, experimentId: string) => Promise<ExperimentResults>;
1563
2449
 
2450
+ /** Effect form of {@link expiringAmong}. */
2451
+ export declare const expiringAmong: (...args: Parameters<typeof expiringAmong_2>) => Effect<readonly ExpiringRight[], never, never>;
2452
+
2453
+ /** The published documents whose rights end within `days`, soonest first. */
2454
+ declare const expiringAmong_2: (store: DataStore, scope: Pick<CmsScope, "site" | "environment">, days: number, now?: Date) => Promise<ReadonlyArray<ExpiringRight>>;
2455
+
2456
+ /** A document whose rights end soon, for a renewal reminder. */
2457
+ export declare interface ExpiringRight {
2458
+ readonly contentType: string;
2459
+ readonly documentId: string;
2460
+ readonly until: Date;
2461
+ readonly days: number;
2462
+ }
2463
+
2464
+ /** Why a dimension is in the identity or not. */
2465
+ export declare interface ExplainLine {
2466
+ readonly dimension: string;
2467
+ readonly included: boolean;
2468
+ readonly value: string | null;
2469
+ readonly why: string;
2470
+ }
2471
+
1564
2472
  export declare interface ExposureInput {
1565
2473
  readonly ceiling: ReadonlyArray<string>;
1566
2474
  readonly defaults: ReadonlyArray<string>;
@@ -1589,12 +2497,10 @@ export declare const EXTENSION_SLOTS: readonly ["dashboard", "sidebar", "fieldWi
1589
2497
  export declare class ExtensionAccessDenied extends ExtensionAccessDenied_base {
1590
2498
  }
1591
2499
 
1592
- declare const ExtensionAccessDenied_base: Schema_2.TaggedErrorClass<ExtensionAccessDenied, "ExtensionAccessDenied", {
1593
- readonly _tag: Schema_2.tag<"ExtensionAccessDenied">;
1594
- } & {
1595
- extensionId: typeof Schema_2.String;
1596
- capability: typeof Schema_2.String;
1597
- }>;
2500
+ declare const ExtensionAccessDenied_base: Schema_2.Class<ExtensionAccessDenied, Schema_2.TaggedStruct<"ExtensionAccessDenied", {
2501
+ readonly extensionId: Schema_2.String;
2502
+ readonly capability: Schema_2.String;
2503
+ }>, YieldableError>;
1598
2504
 
1599
2505
  /**
1600
2506
  * What an extension may do; everything else is refused.
@@ -1641,31 +2547,31 @@ export declare interface ExtensionHost {
1641
2547
 
1642
2548
  /** A manifest on the wire — for a descriptor's input or output. */
1643
2549
  export declare const ExtensionManifestSchema: Schema_2.Struct<{
1644
- id: typeof Schema_2.String;
1645
- name: typeof Schema_2.String;
1646
- version: typeof Schema_2.String;
1647
- publisher: typeof Schema_2.String;
1648
- capabilities: Schema_2.Array$<typeof Schema_2.String>;
1649
- slots: Schema_2.Array$<typeof Schema_2.String>;
1650
- fields: Schema_2.optional<Schema_2.Array$<typeof Schema_2.String>>;
1651
- settings: Schema_2.optional<Schema_2.Array$<Schema_2.Union<[Schema_2.Struct<{
1652
- key: typeof Schema_2.String;
1653
- label: typeof Schema_2.String;
1654
- kind: Schema_2.Literal<["number"]>;
1655
- default: typeof Schema_2.Number;
1656
- min: Schema_2.optional<typeof Schema_2.Number>;
1657
- max: Schema_2.optional<typeof Schema_2.Number>;
2550
+ readonly id: Schema_2.String;
2551
+ readonly name: Schema_2.String;
2552
+ readonly version: Schema_2.String;
2553
+ readonly publisher: Schema_2.String;
2554
+ readonly capabilities: Schema_2.$Array<Schema_2.String>;
2555
+ readonly slots: Schema_2.$Array<Schema_2.String>;
2556
+ readonly fields: Schema_2.optional<Schema_2.$Array<Schema_2.String>>;
2557
+ readonly settings: Schema_2.optional<Schema_2.$Array<Schema_2.Union<readonly [Schema_2.Struct<{
2558
+ readonly key: Schema_2.String;
2559
+ readonly label: Schema_2.String;
2560
+ readonly kind: Schema_2.Literal<"number">;
2561
+ readonly default: Schema_2.Number;
2562
+ readonly min: Schema_2.optional<Schema_2.Number>;
2563
+ readonly max: Schema_2.optional<Schema_2.Number>;
1658
2564
  }>, Schema_2.Struct<{
1659
- key: typeof Schema_2.String;
1660
- label: typeof Schema_2.String;
1661
- kind: Schema_2.Literal<["boolean"]>;
1662
- default: typeof Schema_2.Boolean;
2565
+ readonly key: Schema_2.String;
2566
+ readonly label: Schema_2.String;
2567
+ readonly kind: Schema_2.Literal<"boolean">;
2568
+ readonly default: Schema_2.Boolean;
1663
2569
  }>, Schema_2.Struct<{
1664
- key: typeof Schema_2.String;
1665
- label: typeof Schema_2.String;
1666
- kind: Schema_2.Literal<["choice"]>;
1667
- default: typeof Schema_2.String;
1668
- options: Schema_2.Array$<typeof Schema_2.String>;
2570
+ readonly key: Schema_2.String;
2571
+ readonly label: Schema_2.String;
2572
+ readonly kind: Schema_2.Literal<"choice">;
2573
+ readonly default: Schema_2.String;
2574
+ readonly options: Schema_2.$Array<Schema_2.String>;
1669
2575
  }>]>>>;
1670
2576
  }>;
1671
2577
 
@@ -1776,6 +2682,12 @@ export declare interface FieldSchema {
1776
2682
  readonly pattern?: string;
1777
2683
  /** Closed value set for `literal` fields → `<select>` + CHECK constraint. */
1778
2684
  readonly literals?: ReadonlyArray<string>;
2685
+ /** What an editor reads for each literal (a token's value, an action's purpose). */
2686
+ readonly literalLabels?: Readonly<Record<string, string>>;
2687
+ /** Set by `Schema.Token`: the design-token group the value names. */
2688
+ readonly token?: string;
2689
+ /** Set by `Schema.Action`: the value names an action the renderer binds. */
2690
+ readonly action?: true;
1779
2691
  /** A `number` field that takes fractions (a `real` column); without it a number is whole. */
1780
2692
  readonly fraction?: boolean;
1781
2693
  /**
@@ -1882,6 +2794,16 @@ export declare const glossaryProblems: (text: string, entries: ReadonlyArray<Glo
1882
2794
  /** The purposes whose current version the reader allowed. */
1883
2795
  export declare const grantedPurposes: (purposes: ReadonlyArray<ConsentPurpose>, choices: ConsentChoices) => ReadonlySet<string>;
1884
2796
 
2797
+ /** Which content the graph is read from. */
2798
+ export declare type GraphPerspective = 'published' | 'draft' | {
2799
+ readonly revisionId: string;
2800
+ };
2801
+
2802
+ /** One use of the document in the graph's perspective. A draft use names the revision it is in. */
2803
+ export declare interface GraphUse extends ReferenceUse {
2804
+ readonly revisionId: string | null;
2805
+ }
2806
+
1885
2807
  /** Effect form of {@link hadAddress}. */
1886
2808
  export declare const hadAddress: (...args: Parameters<typeof hadAddress_2>) => Effect<boolean, never, never>;
1887
2809
 
@@ -1937,6 +2859,8 @@ export declare interface HtmlImportOptions {
1937
2859
  readonly resolveImage?: (src: string) => string | null;
1938
2860
  /** Block ids; defaults to a counter, so a test reads stable ids. */
1939
2861
  readonly newId?: () => string;
2862
+ /** Keep `mailto:` and `tel:` links as one-off contacts (a field profile with `contactLiterals`); one that is not a usable address or number is reported. */
2863
+ readonly contacts?: boolean;
1940
2864
  }
1941
2865
 
1942
2866
  export declare interface HtmlImportResult {
@@ -1952,12 +2876,22 @@ declare const indexForSearch_2: (tx: DataStore, type: ContentType, row: Row, sco
1952
2876
 
1953
2877
  /** Where an inherited value came from. */
1954
2878
  export declare interface Inherited {
1955
- /** The value; undefined when neither the page nor an ancestor sets it. */
2879
+ /** The value; undefined when masked or when nothing in the tree sets it. */
1956
2880
  readonly value: unknown;
1957
- /** The document that set it: the page itself, an ancestor, or null for none. */
2881
+ /** The document that decided it: the page itself, an ancestor, or null for none. */
1958
2882
  readonly from: string | null;
2883
+ readonly how: InheritedHow;
1959
2884
  }
1960
2885
 
2886
+ /**
2887
+ * How a page came by an inherited field:
2888
+ * - `own` — the page sets it;
2889
+ * - `ancestor` — the nearest ancestor that sets it;
2890
+ * - `masked` — the page or an ancestor masks it: nothing shows;
2891
+ * - `none` — nothing in the tree sets it (the app's site default applies).
2892
+ */
2893
+ export declare type InheritedHow = 'own' | 'ancestor' | 'masked' | 'none';
2894
+
1961
2895
  /**
1962
2896
  * The value of an inherited field for `node`: its own when set, else the
1963
2897
  * nearest ancestor's in `tree` (the same locale's variants the tree was built
@@ -1966,12 +2900,20 @@ export declare interface Inherited {
1966
2900
  */
1967
2901
  export declare const inheritedValue: (tree: CmsTree, node: TreeNode, field: string, options?: {
1968
2902
  readonly ancestorsOnly?: boolean;
2903
+ readonly mask?: string;
1969
2904
  }) => Inherited;
1970
2905
 
1971
2906
  /** How one inherited field may be set. */
1972
2907
  export declare interface InheritRule {
1973
2908
  /** No page may set the field; saving one that does is refused (`locked`). */
1974
2909
  readonly locked?: boolean;
2910
+ /**
2911
+ * An optional Boolean field of the same type that MASKS this one: true on a
2912
+ * page means it shows nothing here, on purpose — not "unset" (that
2913
+ * inherits) and not an empty value. Pages below inherit the mask until one
2914
+ * sets its own value or mask. A locked field cannot be masked.
2915
+ */
2916
+ readonly mask?: string;
1975
2917
  }
1976
2918
 
1977
2919
  /** The minimal DOM a surface is read from (a browser element, or jsdom's). */
@@ -1990,7 +2932,7 @@ export declare interface InlineDomNode {
1990
2932
  */
1991
2933
  export declare const inlineFromDom: (root: InlineDomNode) => ReadonlyArray<RichInline>;
1992
2934
 
1993
- /** A run as the HTML a visual surface shows: `strong`, `em`, `u`, `a[data-target]`, escaped text. */
2935
+ /** A run as the HTML a visual surface shows: `strong`, `em`, `u`, `span[data-style]`, `a[data-target]`, `a[data-contact]`, escaped text. */
1994
2936
  export declare const inlineHtml: (content: ReadonlyArray<RichInline>) => string;
1995
2937
 
1996
2938
  /** Inline nodes back to the editor's markup (the inverse of `parseInlineMarkup`). */
@@ -2057,12 +2999,24 @@ export declare const isKnownZone: (zone: string) => boolean;
2057
2999
  /** Accept-Language → languages in order of preference (quality factors honoured). */
2058
3000
  export declare const languagesOf: (acceptLanguage: string | undefined) => ReadonlyArray<string>;
2059
3001
 
3002
+ /** Effect form of {@link latestWorkflow}. */
3003
+ export declare const latestWorkflow: (...args: Parameters<typeof latestWorkflow_2>) => Effect<WorkflowInstance | null, never, never>;
3004
+
3005
+ /** The newest instance for a draft (any status), or null. */
3006
+ declare const latestWorkflow_2: (store: DataStore, type: ContentType, variantId: string, now?: Date) => Promise<WorkflowInstance | null>;
3007
+
2060
3008
  /** How often a type's documents are checked again, declared on the type. */
2061
3009
  export declare interface LifecycleConfig {
2062
3010
  /** Days from a publish or a recertification to the next review. */
2063
3011
  readonly reviewEveryDays: number;
2064
3012
  }
2065
3013
 
3014
+ /** Effect form of {@link listCollections}. */
3015
+ export declare const listCollections: (...args: Parameters<typeof listCollections_2>) => Effect<readonly Collection[], never, never>;
3016
+
3017
+ /** The caller's collections in a site and environment, by name. */
3018
+ declare const listCollections_2: (store: DataStore, scope: Pick<CmsScope, "site" | "environment">) => Promise<ReadonlyArray<Collection>>;
3019
+
2066
3020
  /**
2067
3021
  * List-view configuration for the consuming editor/template: which
2068
3022
  * columns its list page shows and the default sort. Validated by
@@ -2142,6 +3096,15 @@ export declare const liveDraftTexts: (...args: Parameters<typeof liveDraftTexts_
2142
3096
 
2143
3097
  declare const liveDraftTexts_2: (store: DataStore, draft: Row) => Promise<LiveDraftTexts>;
2144
3098
 
3099
+ /** One stretch of time a revision was live (`to` null: still live). */
3100
+ export declare interface LiveStretch {
3101
+ readonly revision: number;
3102
+ readonly releaseId: string | null;
3103
+ /** ISO timestamps. */
3104
+ readonly from: string;
3105
+ readonly to: string | null;
3106
+ }
3107
+
2145
3108
  /** One language's published page tree. */
2146
3109
  export declare interface LocalizedTree {
2147
3110
  readonly locale: string;
@@ -2170,9 +3133,15 @@ export declare const MAX_LIST_LEVEL = 3;
2170
3133
 
2171
3134
  export declare const MAX_OCCURRENCES = 100;
2172
3135
 
3136
+ /** The longest a portal link may live. */
3137
+ export declare const MAX_PORTAL_DAYS = 90;
3138
+
2173
3139
  /** The longest a preview link may live. */
2174
3140
  export declare const MAX_PREVIEW_SHARE_DAYS = 30;
2175
3141
 
3142
+ /** The longest a rollback window may stay open. */
3143
+ export declare const MAX_ROLLBACK_DAYS = 30;
3144
+
2176
3145
  /** Cap a string field's length. Past `value` the editor renders a textarea. */
2177
3146
  export declare const maxLength: (value: number) => FieldRefinement;
2178
3147
 
@@ -2188,9 +3157,95 @@ export declare const mediaFields: (type: Pick<ContentType, "fields">) => Readonl
2188
3157
  */
2189
3158
  export declare type MediaResolver = (key: string) => Promise<string | null>;
2190
3159
 
2191
- /** Adjacent text runs with the same marks become one; empty text runs go. */
3160
+ /** Adjacent text runs with the same marks and style become one; empty text runs go. */
2192
3161
  export declare const mergeInline: (content: ReadonlyArray<RichInline>) => ReadonlyArray<RichInline>;
2193
3162
 
3163
+ export declare interface MetricDefinition extends MetricSpec {
3164
+ /** A digest of what the number means (not of its label or description). */
3165
+ readonly fingerprint: string;
3166
+ }
3167
+
3168
+ export declare type MetricDrill = 'document' | 'locale' | 'revision' | 'release';
3169
+
3170
+ export declare type MetricFreshness = {
3171
+ readonly kind: 'live';
3172
+ } | {
3173
+ readonly kind: 'daily';
3174
+ } | {
3175
+ readonly kind: 'interval';
3176
+ readonly minutes: number;
3177
+ };
3178
+
3179
+ export declare interface MetricSpec {
3180
+ readonly id: string;
3181
+ /** Raise it whenever the formula, scope, freshness, quality or drill changes. */
3182
+ readonly version: number;
3183
+ readonly label: string;
3184
+ readonly description: string;
3185
+ /** What is computed, in words a reviewer can check against the code. */
3186
+ readonly formula: string;
3187
+ readonly unit: MetricUnit;
3188
+ /** What it is counted over — `site`, `environment`, `locale`, `document`, `day`… */
3189
+ readonly scope: ReadonlyArray<string>;
3190
+ readonly freshness: MetricFreshness;
3191
+ /** Known limits of the number, e.g. `consent-only`, `utc-days`. */
3192
+ readonly quality: ReadonlyArray<string>;
3193
+ /** Where it drills down to. */
3194
+ readonly drill: ReadonlyArray<MetricDrill>;
3195
+ }
3196
+
3197
+ export declare type MetricUnit = 'count' | 'ratio' | 'percent' | 'seconds';
3198
+
3199
+ /**
3200
+ * The metrics whose meaning changed against a recorded set of
3201
+ * `{ id, version, fingerprint }` without a new version — keep the set in a
3202
+ * test, and this names every silent redefinition.
3203
+ */
3204
+ export declare const metricVersionDrift: (metrics: ReadonlyArray<MetricDefinition>, recorded: ReadonlyArray<{
3205
+ readonly id: string;
3206
+ readonly version: number;
3207
+ readonly fingerprint: string;
3208
+ }>) => ReadonlyArray<string>;
3209
+
3210
+ /** The stages of a migration, in the order they pass. */
3211
+ export declare const MIGRATION_STAGES: readonly ["inventory", "mapping", "dryRun", "reconciliation", "delta", "cutover", "fallback", "uat"];
3212
+
3213
+ export declare interface MigrationLedger {
3214
+ /** Records per result. */
3215
+ readonly counts: Readonly<Record<'created' | 'already' | 'skipped' | 'failed', number>>;
3216
+ /** Records with a conflict or a loss. */
3217
+ readonly withConflict: number;
3218
+ readonly withLoss: number;
3219
+ readonly records: ReadonlyArray<MigrationRecord & {
3220
+ readonly recordedAt: Date;
3221
+ }>;
3222
+ }
3223
+
3224
+ /** Effect form of {@link migrationLedger}. */
3225
+ export declare const migrationLedger: (...args: Parameters<typeof migrationLedger_2>) => Effect<MigrationLedger, never, never>;
3226
+
3227
+ /** The ledger of a source: counts, and the records (those with a conflict or loss first). */
3228
+ declare const migrationLedger_2: (store: DataStore, source: string, limit?: number) => Promise<MigrationLedger>;
3229
+
3230
+ export declare interface MigrationRecord {
3231
+ readonly sourceKey: string;
3232
+ readonly sourceType: string;
3233
+ readonly result: 'created' | 'already' | 'skipped' | 'failed';
3234
+ readonly targetType?: string | null;
3235
+ readonly targetDocumentId?: string | null;
3236
+ readonly transformation?: string | null;
3237
+ readonly conflict?: string | null;
3238
+ readonly loss?: string | null;
3239
+ }
3240
+
3241
+ export declare type MigrationStage = (typeof MIGRATION_STAGES)[number];
3242
+
3243
+ /** Effect form of {@link migrationStages}. */
3244
+ export declare const migrationStages: (...args: Parameters<typeof migrationStages_2>) => Effect<readonly StageState[], never, never>;
3245
+
3246
+ /** Every stage of a source's migration, in order — open where nothing is recorded yet. */
3247
+ declare const migrationStages_2: (store: DataStore, source: string) => Promise<ReadonlyArray<StageState>>;
3248
+
2194
3249
  /** Readers per version before a result is called at all. */
2195
3250
  export declare const MIN_READERS = 100;
2196
3251
 
@@ -2216,13 +3271,16 @@ export declare const newCapabilities: (granted: ReadonlyArray<ExtensionCapabilit
2216
3271
  /** A nonce for one editing session (unguessable; 128 bits). */
2217
3272
  export declare const newVisualNonce: () => string;
2218
3273
 
3274
+ /** A host name as stored: lower-case, trimmed, without a trailing dot; null when it is no host name. */
3275
+ export declare const normalizeHost: (input: string) => string | null;
3276
+
2219
3277
  /**
2220
3278
  * The canonical form of a stored value: a plain string becomes paragraphs (a
2221
3279
  * blank line starts a new one), a document keeps its blocks and gets an id on
2222
3280
  * every block that lacks one, anything else is returned as is for the
2223
- * validator to reject.
3281
+ * validator to reject. With a profile, the document records its id.
2224
3282
  */
2225
- export declare const normalizeRichDocument: (value: unknown) => unknown;
3283
+ export declare const normalizeRichDocument: (value: unknown, profile?: RichTextProfile) => unknown;
2226
3284
 
2227
3285
  /** The vocabulary's terms for `input`, in first-seen order, and what it does not know. */
2228
3286
  export declare const normalizeTerms: (config: Pick<TaxonomyConfig, "terms">, input: ReadonlyArray<unknown>) => {
@@ -2257,6 +3315,22 @@ export declare const openDraftTexts: (...args: Parameters<typeof openDraftTexts_
2257
3315
  */
2258
3316
  declare const openDraftTexts_2: (tx: DataStore, type: ContentType, draftId: string) => Promise<ReadonlyArray<Row>>;
2259
3317
 
3318
+ /** An open step that fell due in a window — for a reminder to whoever decides it. */
3319
+ export declare interface OverdueStep {
3320
+ readonly instance: WorkflowInstance;
3321
+ readonly step: StepState;
3322
+ }
3323
+
3324
+ /** Effect form of {@link overdueSteps}. */
3325
+ export declare const overdueSteps: (...args: Parameters<typeof overdueSteps_2>) => Effect<readonly OverdueStep[], never, never>;
3326
+
3327
+ /**
3328
+ * Open steps whose due time lies in `(since, now]` — each once, when a sweep
3329
+ * runs over consecutive windows. The reminder is derived from the state; it
3330
+ * changes nothing. Hand it a store over every tenant (a schedule's `app.store`).
3331
+ */
3332
+ declare const overdueSteps_2: (store: DataStore, since: Date, now: Date) => Promise<ReadonlyArray<OverdueStep>>;
3333
+
2260
3334
  /** Where a document lives in one language. */
2261
3335
  export declare interface PageAlternate {
2262
3336
  readonly locale: string;
@@ -2284,10 +3358,25 @@ export declare interface PageTemplate {
2284
3358
  readonly component: ComponentDefinition;
2285
3359
  readonly count: number;
2286
3360
  }>;
3361
+ /** Other `Schema.Components` fields of the type (an aside), each with its own rules. */
3362
+ readonly regions?: Readonly<Record<string, RegionRule>>;
3363
+ /** The widths a component may take here: the values its `TemplatesConfig.width` prop may hold. */
3364
+ readonly widths?: ReadonlyArray<{
3365
+ readonly component: ComponentDefinition;
3366
+ readonly allowed: ReadonlyArray<string>;
3367
+ }>;
3368
+ /** How deep components may sit inside each other's slots; 1 = no nesting. */
3369
+ readonly maxDepth?: number;
2287
3370
  }
2288
3371
 
2289
- /** Parse the editor's inline markup into inline nodes. Unclosed markers stay text. */
2290
- export declare const parseInlineMarkup: (input: string) => ReadonlyArray<RichInline>;
3372
+ /** Parse the editor's inline markup into inline nodes. Unclosed markers stay text; `{name|…}` is a style only for a name in `styles`. */
3373
+ export declare const parseInlineMarkup: (input: string, styles?: ReadonlyArray<string>) => ReadonlyArray<RichInline>;
3374
+
3375
+ /** An anchor from someone else's presence, or null when it is not one of the declared shapes. */
3376
+ export declare const parsePresenceAnchor: (value: unknown) => PresenceAnchor | null;
3377
+
3378
+ /** An intent from a URL or a message, or null when it is not one of the declared shape. Untrusted input. */
3379
+ export declare const parseSelectionIntent: (value: unknown) => SelectionIntent | null;
2291
3380
 
2292
3381
  /** `sections.2` → `{ field: 'sections', index: 2 }`; `title` → `{ field: 'title' }`. */
2293
3382
  export declare const parseSourcePath: (path: string) => {
@@ -2298,14 +3387,75 @@ export declare const parseSourcePath: (path: string) => {
2298
3387
  /** Read an XLIFF 2.x file with one `<file>`: languages, notes and each unit's source and target. */
2299
3388
  export declare const parseXliff: (xml: string) => XliffExchange;
2300
3389
 
3390
+ /** Effect form of {@link passStage}. */
3391
+ export declare const passStage: (...args: Parameters<typeof passStage_2>) => Effect<PassStageResult, never, never>;
3392
+
3393
+ /**
3394
+ * Pass a stage's exit gate: only its owner, with a note; only after every
3395
+ * earlier stage passed; and only when `gate` (the stage's objective check,
3396
+ * when it has one) holds.
3397
+ */
3398
+ declare const passStage_2: (tx: DataStore, source: string, stage: MigrationStage, input: {
3399
+ readonly actorId: string;
3400
+ readonly note: string;
3401
+ readonly evidenceUri?: string;
3402
+ readonly gate?: boolean;
3403
+ }, now?: Date) => Promise<PassStageResult>;
3404
+
3405
+ export declare type PassStageResult = {
3406
+ readonly ok: true;
3407
+ } | {
3408
+ readonly ok: false;
3409
+ readonly reason: 'noOwner' | 'notOwner' | 'noNote' | 'earlierOpen' | 'gateNotMet' | 'passed';
3410
+ readonly stage?: MigrationStage;
3411
+ };
3412
+
2301
3413
  /** Constrain a string field to a regex (source form, validated on save). */
2302
3414
  export declare const pattern: (re: RegExp) => FieldRefinement;
2303
3415
 
3416
+ /** One suggestion: who made it and when, the blocks it touches, and the text it puts in and takes out. */
3417
+ export declare interface PendingChange {
3418
+ readonly id: string;
3419
+ readonly by: string;
3420
+ readonly at: string;
3421
+ readonly blockIds: ReadonlyArray<string>;
3422
+ readonly inserted: string;
3423
+ readonly deleted: string;
3424
+ /** Blocks it inserts or deletes whole (an image, a component, a paragraph). */
3425
+ readonly blocks: number;
3426
+ }
3427
+
3428
+ /** The suggestions in a document, in order of first appearance. */
3429
+ export declare const pendingChanges: (doc: RichDocument) => ReadonlyArray<PendingChange>;
3430
+
2304
3431
  /** The first variant whose audience matches, or null for the original. Variants naming an unknown audience never match. */
2305
3432
  export declare const pickVariant: <V extends {
2306
3433
  readonly audience: string;
2307
3434
  }>(variants: ReadonlyArray<V>, audiences: ReadonlyArray<Audience>, signals: AudienceSignals) => V | null;
2308
3435
 
3436
+ /** One inherited field as a release pinned it. */
3437
+ export declare interface PinnedInheritance {
3438
+ readonly how: InheritedHow;
3439
+ /** The document that decided it (the page, an ancestor), null for none. */
3440
+ readonly from: string | null;
3441
+ readonly value: unknown;
3442
+ /** A readable name for the value — a referenced document's title. */
3443
+ readonly label?: string | null;
3444
+ /** The revision of the referenced document that was live then, when the value is a reference. */
3445
+ readonly revisionId?: string | null;
3446
+ }
3447
+
3448
+ /** Effect form of {@link pinReleaseInheritance}. */
3449
+ export declare const pinReleaseInheritance: (...args: Parameters<typeof pinReleaseInheritance_2>) => Effect<boolean, never, never>;
3450
+
3451
+ /**
3452
+ * Record what a release's item inherited as it went live — run from an
3453
+ * `afterPublish` hook, where the tree is the one the release just made. Kept
3454
+ * on the item, so the release shows what its pages showed even after a
3455
+ * header changes, and a rollback says what it returns to.
3456
+ */
3457
+ declare const pinReleaseInheritance_2: (tx: DataStore, releaseId: string, variantId: string, inherited: Readonly<Record<string, PinnedInheritance>>) => Promise<boolean>;
3458
+
2309
3459
  export declare interface PipeableField extends FieldSchema {
2310
3460
  readonly isOptional: boolean;
2311
3461
  pipe(...refinements: ReadonlyArray<FieldRefinement>): PipeableField;
@@ -2349,6 +3499,31 @@ export declare const planBulk: (...args: Parameters<typeof planBulk_2>) => Effec
2349
3499
  /** The dry run: what `action` would do to each item, changing nothing. */
2350
3500
  declare const planBulk_2: (store: DataStore, types: ReadonlyArray<ContentType>, place: Place, action: BulkAction, items: ReadonlyArray<BulkItem>) => Promise<ReadonlyArray<PlannedItem>>;
2351
3501
 
3502
+ /** Effect form of {@link planExperiment}. */
3503
+ export declare const planExperiment: (...args: Parameters<typeof planExperiment_2>) => Effect<PlanExperimentResult, never, never>;
3504
+
3505
+ /**
3506
+ * Plan an experiment that starts when `releaseId` goes live — the experiment
3507
+ * is content state: it ships, and rolls back, with the release that carries
3508
+ * its page. The release must still be a draft or scheduled and publish this
3509
+ * page in this language; version B's keys are checked against the page's
3510
+ * draft. Started by {@link experimentReleaseHook}. In the caller's transaction.
3511
+ */
3512
+ declare const planExperiment_2: (tx: DataStore, type: ContentType, scope: CmsScope, input: StartExperimentInput & {
3513
+ readonly releaseId: string;
3514
+ }) => Promise<PlanExperimentResult>;
3515
+
3516
+ export declare type PlanExperimentResult = {
3517
+ readonly ok: true;
3518
+ readonly id: string;
3519
+ } | {
3520
+ readonly ok: false;
3521
+ readonly reason: Exclude<StartExperimentResult, {
3522
+ ok: true;
3523
+ }>['reason'] | 'releaseNotEditable' | 'notInRelease' | 'alreadyPlanned';
3524
+ readonly fields?: ReadonlyArray<string>;
3525
+ };
3526
+
2352
3527
  export declare interface PlannedItem extends BulkItem {
2353
3528
  readonly documentId: string | null;
2354
3529
  readonly title: string;
@@ -2367,6 +3542,76 @@ export declare const planPromotion: (...args: Parameters<typeof planPromotion_2>
2367
3542
  /** What promoting `from` into `to` would change, per document and language. */
2368
3543
  declare const planPromotion_2: (store: DataStore, types: ReadonlyArray<ContentType>, pair: EnvironmentPair) => Promise<ReadonlyArray<PromotionItem>>;
2369
3544
 
3545
+ /** Effect form of {@link planReferenceReplacement}. */
3546
+ export declare const planReferenceReplacement: (...args: Parameters<typeof planReferenceReplacement_2>) => Effect<ReplacementPlan, never, never>;
3547
+
3548
+ /**
3549
+ * The drafts that reference `from`, grouped per variant with every path —
3550
+ * what replacing it with `to` (a document of the same type) would change.
3551
+ */
3552
+ declare const planReferenceReplacement_2: (store: DataStore, types: ReadonlyArray<ContentType>, from: {
3553
+ readonly type: string;
3554
+ readonly documentId: string;
3555
+ }, to: {
3556
+ readonly type: string;
3557
+ readonly documentId: string;
3558
+ }, scope: Pick<CmsScope, "site" | "environment">) => Promise<ReplacementPlan>;
3559
+
3560
+ export declare interface Portal {
3561
+ readonly id: string;
3562
+ readonly label: string | null;
3563
+ readonly expiresAt: Date;
3564
+ readonly revoked: boolean;
3565
+ readonly maxDownloads: number | null;
3566
+ readonly downloads: number;
3567
+ }
3568
+
3569
+ export declare type PortalDownloadResult = {
3570
+ readonly ok: true;
3571
+ readonly contentType: string;
3572
+ readonly tenantId: string | null;
3573
+ readonly downloadsLeft: number | null;
3574
+ } | {
3575
+ readonly ok: false;
3576
+ readonly reason: 'unknown' | 'expired' | 'revoked' | 'notInCollection' | 'limitReached';
3577
+ };
3578
+
3579
+ export declare type PresenceAnchor = {
3580
+ readonly kind: 'view';
3581
+ readonly view: string;
3582
+ } | {
3583
+ readonly kind: 'field';
3584
+ readonly field: string;
3585
+ } | {
3586
+ readonly kind: 'component';
3587
+ readonly field: string;
3588
+ readonly instanceId: string;
3589
+ readonly componentId: string;
3590
+ } | {
3591
+ readonly kind: 'slot';
3592
+ readonly field: string;
3593
+ readonly instanceId: string;
3594
+ readonly componentId: string;
3595
+ readonly prop: string;
3596
+ } | {
3597
+ readonly kind: 'selection';
3598
+ readonly field: string;
3599
+ readonly start: number;
3600
+ readonly end: number;
3601
+ } | {
3602
+ readonly kind: 'assetRegion';
3603
+ readonly x: number;
3604
+ readonly y: number;
3605
+ readonly width: number;
3606
+ readonly height: number;
3607
+ };
3608
+
3609
+ /**
3610
+ * The anchor of a focused control in a `ContentForm`: the field, or — inside
3611
+ * a placed component — the component, or the prop (slot) within it.
3612
+ */
3613
+ export declare const presenceAnchorOf: (target: unknown) => PresenceAnchor | null;
3614
+
2370
3615
  /** A verified preview claim. */
2371
3616
  export declare interface PreviewClaim {
2372
3617
  readonly type: string;
@@ -2398,11 +3643,9 @@ export declare type PreviewMessage = {
2398
3643
  export declare class PreviewShareRejected extends PreviewShareRejected_base {
2399
3644
  }
2400
3645
 
2401
- declare const PreviewShareRejected_base: Schema_2.TaggedErrorClass<PreviewShareRejected, "PreviewShareRejected", {
2402
- readonly _tag: Schema_2.tag<"PreviewShareRejected">;
2403
- } & {
2404
- reason: Schema_2.Literal<["expiryInPast", "expiryTooFar"]>;
2405
- }>;
3646
+ declare const PreviewShareRejected_base: Schema_2.Class<PreviewShareRejected, Schema_2.TaggedStruct<"PreviewShareRejected", {
3647
+ readonly reason: Schema_2.Literals<readonly ["expiryInPast", "expiryTooFar"]>;
3648
+ }>, YieldableError>;
2406
3649
 
2407
3650
  /** Mint a signed preview token for a draft row. */
2408
3651
  export declare const previewToken: (type: string, id: string, options?: {
@@ -2410,6 +3653,12 @@ export declare const previewToken: (type: string, id: string, options?: {
2410
3653
  secret?: string;
2411
3654
  }) => string;
2412
3655
 
3656
+ /** Effect form of {@link primaryDomain}. */
3657
+ export declare const primaryDomain: (...args: Parameters<typeof primaryDomain_2>) => Effect<string | null, never, never>;
3658
+
3659
+ /** The site's primary domain, or null. */
3660
+ declare const primaryDomain_2: (store: DataStore, site: string) => Promise<string | null>;
3661
+
2413
3662
  /** Effect form of {@link promote}. */
2414
3663
  export declare const promote: (...args: Parameters<typeof promote_2>) => Effect<PromotionResult, ContentValidationFailed | ContentNotFound | ContentIdConflict | RevisionMismatch | ReleaseNotEditable | ReviewRequired | ReferenceUnavailable, never>;
2415
3664
 
@@ -2450,6 +3699,28 @@ export declare interface PromotionSelection {
2450
3699
  /** The hash an operation keeps of its prompt: enough to tell two prompts apart, nothing to read back. */
2451
3700
  export declare const promptHash: (prompt: string) => string;
2452
3701
 
3702
+ /** Effect form of {@link proposeCandidate}. */
3703
+ export declare const proposeCandidate: (...args: Parameters<typeof proposeCandidate_2>) => Effect<{
3704
+ readonly ok: true;
3705
+ readonly id: string;
3706
+ } | {
3707
+ readonly ok: false;
3708
+ readonly reason: "notFound" | "empty";
3709
+ }, never, never>;
3710
+
3711
+ /** Keep a proposal for a draft — only the type's declared fields; the id of the candidate. */
3712
+ declare const proposeCandidate_2: (tx: DataStore, type: ContentType, variantId: string, scope: CmsScope, input: {
3713
+ readonly values: Readonly<Record<string, unknown>>;
3714
+ readonly operationId?: string | null;
3715
+ readonly suggestedBy?: string | null;
3716
+ }) => Promise<{
3717
+ readonly ok: true;
3718
+ readonly id: string;
3719
+ } | {
3720
+ readonly ok: false;
3721
+ readonly reason: "notFound" | "empty";
3722
+ }>;
3723
+
2453
3724
  /** Effect-native `publish` (see {@link saveDraftEffect}). */
2454
3725
  export declare const publish: (store: DataStore, type: ContentType, id: string, scope: CmsScope, options?: PublishOptions) => Effect_2.Effect<Row, ContentNotFound | RevisionMismatch | ReviewRequired | ReferenceUnavailable | ContentValidationFailed>;
2455
3726
 
@@ -2483,7 +3754,7 @@ export declare const publishDueReleases: (...args: Parameters<typeof publishDueR
2483
3754
  * that went live. Hand it a store outside any transaction (a schedule's
2484
3755
  * `app.store`).
2485
3756
  */
2486
- declare const publishDueReleases_2: (store: DataStore, types: ReadonlyArray<ContentType>, now?: Date) => Promise<ReadonlyArray<string>>;
3757
+ declare const publishDueReleases_2: (store: DataStore, types: ReadonlyArray<ContentType>, now?: Date, options?: PublishReleaseOptions) => Promise<ReadonlyArray<string>>;
2487
3758
 
2488
3759
  /** Options for {@link publish}. */
2489
3760
  export declare interface PublishOptions {
@@ -2496,13 +3767,11 @@ export declare interface PublishOptions {
2496
3767
  /** Effect form of {@link publishRelease}. */
2497
3768
  export declare const publishRelease: (...args: Parameters<typeof publishRelease_2>) => Effect<Readonly<Record<string, unknown>>, ContentNotFound | ReleaseNotEditable | ReviewRequired | ReferenceUnavailable, never>;
2498
3769
 
2499
- /**
2500
- * Publish every entry of a release — in the CALLER'S transaction, so either
2501
- * all of them go live or, when one fails, none does. Records what each variant
2502
- * showed before (for rollback) and marks the release `published`. Throws
2503
- * `ReleaseNotEditable` for a release that is already published or failed.
2504
- */
2505
- declare const publishRelease_2: (tx: DataStore, types: ReadonlyArray<ContentType>, releaseId: string, now?: Date) => Promise<Row>;
3770
+ declare const publishRelease_2: (tx: DataStore, types: ReadonlyArray<ContentType>, releaseId: string, now?: Date, options?: PublishReleaseOptions) => Promise<Row>;
3771
+
3772
+ export declare interface PublishReleaseOptions {
3773
+ readonly afterPublish?: ReadonlyArray<ReleaseHook>;
3774
+ }
2506
3775
 
2507
3776
  /** Effect-native `publishRevision` (see {@link saveDraftEffect}). */
2508
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>;
@@ -2519,16 +3788,32 @@ export declare interface PublishSeries {
2519
3788
 
2520
3789
  /**
2521
3790
  * What stops these values from being published: every `requiredToPublish()`
2522
- * field that is empty (absent, null, or a blank string). Browser-safe, so an
2523
- * editor can say so before the publish is refused.
3791
+ * field that is empty (absent, null, or a blank string), and every rich text
3792
+ * that still holds suggested changes. Browser-safe, so an editor can say so
3793
+ * before the publish is refused.
2524
3794
  */
2525
3795
  export declare const publishViolations: (type: Pick<ContentType, "fields">, values: Readonly<Record<string, unknown>>) => ReadonlyArray<FieldViolation>;
2526
3796
 
3797
+ export declare type PurgeProvider = 'cloudflare' | 'fastly' | 'webhook';
3798
+
3799
+ export declare interface PurgeRequest {
3800
+ readonly url: string;
3801
+ readonly method: 'POST';
3802
+ readonly headers: Readonly<Record<string, string>>;
3803
+ readonly body?: string;
3804
+ }
3805
+
2527
3806
  /** The purposes the components of `type` need, for a banner to ask about. */
2528
3807
  export declare const purposesUsedBy: (type: {
2529
3808
  readonly fields: Readonly<Record<string, FieldSchema>>;
2530
3809
  }) => ReadonlySet<string>;
2531
3810
 
3811
+ /** When and where a quality rule is checked; `scope` is null where no place is known (every pack then applies). */
3812
+ export declare interface QualityContext {
3813
+ readonly now: Date;
3814
+ readonly scope: CmsScope | null;
3815
+ }
3816
+
2532
3817
  export declare interface QualityException {
2533
3818
  readonly id: string;
2534
3819
  readonly ruleId: string;
@@ -2552,10 +3837,16 @@ export declare interface QualityFinding {
2552
3837
  readonly field: string;
2553
3838
  readonly message: string;
2554
3839
  readonly blocking: boolean;
3840
+ /** The policy pack the rule belongs to, if any. */
3841
+ readonly pack: string | null;
2555
3842
  }
2556
3843
 
2557
- /** What a type's rules find in these values — pure, for the editor as for the gate. */
2558
- export declare const qualityFindings: (type: Pick<ContentType, "quality">, values: Readonly<Record<string, unknown>>) => ReadonlyArray<QualityFinding>;
3844
+ /**
3845
+ * What a type's rules find in these values — pure, for the editor as for the
3846
+ * gate. With `at`, only the packs of that place apply and checks see that
3847
+ * moment; without, every rule is checked now.
3848
+ */
3849
+ export declare const qualityFindings: (type: Pick<ContentType, "quality">, values: Readonly<Record<string, unknown>>, at?: QualityContext) => ReadonlyArray<QualityFinding>;
2559
3850
 
2560
3851
  /** One quality check of a type — see `ContentTypeSpec.quality`. */
2561
3852
  export declare interface QualityRule {
@@ -2567,8 +3858,16 @@ export declare interface QualityRule {
2567
3858
  readonly message: string;
2568
3859
  /** Whether publishing waits for a repair or an approved exception. Default true. */
2569
3860
  readonly blocking?: boolean;
2570
- /** True when the values have the finding. Pure. */
2571
- readonly check: (values: Readonly<Record<string, unknown>>) => boolean;
3861
+ /**
3862
+ * The policy pack it belongs to (`'EU claims'`, `'German market'`) — shown
3863
+ * beside the finding. With `sites` / `locales` a pack applies only there;
3864
+ * absent, everywhere.
3865
+ */
3866
+ readonly pack?: string;
3867
+ readonly sites?: ReadonlyArray<string>;
3868
+ readonly locales?: ReadonlyArray<string>;
3869
+ /** True when the values have the finding. Pure; `at` says when and where (a claim's evidence may have run out). */
3870
+ readonly check: (values: Readonly<Record<string, unknown>>, at: QualityContext) => boolean;
2572
3871
  }
2573
3872
 
2574
3873
  /** Effect form of {@link qualityViolations}. */
@@ -2581,6 +3880,25 @@ export declare const qualityViolations: (...args: Parameters<typeof qualityViola
2581
3880
  */
2582
3881
  declare const qualityViolations_2: (store: DataStore, type: ContentType, variantId: string, scope: CmsScope, values: Readonly<Record<string, unknown>>, now?: Date) => Promise<ReadonlyArray<FieldViolation>>;
2583
3882
 
3883
+ /** One allowed query parameter. */
3884
+ export declare type QueryParam = {
3885
+ readonly name: string;
3886
+ readonly type: 'string';
3887
+ readonly maxLength?: number;
3888
+ readonly default?: string;
3889
+ } | {
3890
+ readonly name: string;
3891
+ readonly type: 'int';
3892
+ readonly min?: number;
3893
+ readonly max?: number;
3894
+ readonly default?: number;
3895
+ } | {
3896
+ readonly name: string;
3897
+ readonly type: 'enum';
3898
+ readonly values: ReadonlyArray<string>;
3899
+ readonly default?: string;
3900
+ };
3901
+
2584
3902
  /**
2585
3903
  * Raised when a create would take a tenant past a limit its app set — more
2586
3904
  * documents, keys or environments than it may hold. Nothing was written;
@@ -2589,13 +3907,11 @@ declare const qualityViolations_2: (store: DataStore, type: ContentType, variant
2589
3907
  export declare class QuotaExceeded extends QuotaExceeded_base {
2590
3908
  }
2591
3909
 
2592
- declare const QuotaExceeded_base: Schema_2.TaggedErrorClass<QuotaExceeded, "QuotaExceeded", {
2593
- readonly _tag: Schema_2.tag<"QuotaExceeded">;
2594
- } & {
2595
- quota: typeof Schema_2.String;
2596
- limit: typeof Schema_2.Number;
2597
- used: typeof Schema_2.Number;
2598
- }>;
3910
+ declare const QuotaExceeded_base: Schema_2.Class<QuotaExceeded, Schema_2.TaggedStruct<"QuotaExceeded", {
3911
+ readonly quota: Schema_2.String;
3912
+ readonly limit: Schema_2.Number;
3913
+ readonly used: Schema_2.Number;
3914
+ }>, YieldableError>;
2599
3915
 
2600
3916
  /** Effect form of {@link readChanges}. */
2601
3917
  export declare const readChanges: (...args: Parameters<typeof readChanges_2>) => Effect<{
@@ -2637,12 +3953,32 @@ export declare const readEditorMessage: (event: VisualMessageEvent, session: Vis
2637
3953
  /** The preview's message, or null for anything else (another origin, another session, another shape). */
2638
3954
  export declare const readPreviewMessage: (event: VisualMessageEvent, session: VisualSession) => PreviewMessage | null;
2639
3955
 
3956
+ /**
3957
+ * What a reader gets at an address: the revision id it carries, `gone` when it
3958
+ * answers without content (404/410), or an HTTP status as text. The app
3959
+ * supplies it — a plain `fetch` through the public front door. An address that
3960
+ * shows more than its own entry (a page with the header and blocks it
3961
+ * includes) answers every revision it shows: a check of an included document
3962
+ * is observed there once its revision is among them.
3963
+ */
3964
+ export declare type ReadRevision = (url: string) => Promise<string | ReadonlyArray<string>>;
3965
+
2640
3966
  /** Effect form of {@link rebaseDraftTexts}. */
2641
3967
  export declare const rebaseDraftTexts: (...args: Parameters<typeof rebaseDraftTexts_2>) => Effect<void, ContentNotFound, never>;
2642
3968
 
2643
3969
  /** After a save: the texts belong to the new revision. In the caller's transaction. */
2644
3970
  declare const rebaseDraftTexts_2: (tx: DataStore, rows: ReadonlyArray<Row>, revisionId: string) => Promise<void>;
2645
3971
 
3972
+ /** Effect form of {@link rebuildReferenceIndex}. */
3973
+ export declare const rebuildReferenceIndex: (...args: Parameters<typeof rebuildReferenceIndex_2>) => Effect<void, never, never>;
3974
+
3975
+ /**
3976
+ * Rebuild draft/history edges after schema application for existing content or
3977
+ * changed reference declarations. Run inside the caller's transaction, with
3978
+ * the same tenant-scoped store used for content writes. Published edges stay.
3979
+ */
3980
+ declare const rebuildReferenceIndex_2: (store: DataStore, types: ReadonlyArray<ContentType>, scope: Pick<CmsScope, "site" | "environment">) => Promise<void>;
3981
+
2646
3982
  /** Effect form of {@link rebuildSearch}. */
2647
3983
  export declare const rebuildSearch: (...args: Parameters<typeof rebuildSearch_2>) => Effect<number, never, never>;
2648
3984
 
@@ -2680,6 +4016,19 @@ export declare const recordChange: (...args: Parameters<typeof recordChange_2>)
2680
4016
  /** Append one change, in the caller's transaction. A type without `changeFeed` writes nothing. */
2681
4017
  declare const recordChange_2: (tx: DataStore, type: ContentType, row: Row, scope: CmsScope, action: "published" | "unpublished", origin?: ChangeOrigin) => Promise<void>;
2682
4018
 
4019
+ /** Effect form of {@link recordCutoverIssues}. */
4020
+ export declare const recordCutoverIssues: (...args: Parameters<typeof recordCutoverIssues_2>) => Effect<number, never, never>;
4021
+
4022
+ /**
4023
+ * Record what a run found: an issue not seen before opens; one seen again
4024
+ * keeps its resolution (a closed issue stays closed). Returns how many are new.
4025
+ */
4026
+ declare const recordCutoverIssues_2: (tx: DataStore, source: string, found: ReadonlyArray<{
4027
+ readonly key: string;
4028
+ readonly kind: string;
4029
+ readonly detail: string;
4030
+ }>, tenantId: string | null) => Promise<number>;
4031
+
2683
4032
  /**
2684
4033
  * Record a change: `before` is the form as it was. A change with the same key
2685
4034
  * within `mergeMs` of the last step continues it (typing is one step). The
@@ -2701,6 +4050,12 @@ export declare const recordExperimentEvent: (...args: Parameters<typeof recordEx
2701
4050
  */
2702
4051
  declare const recordExperimentEvent_2: (store: DataStore, experiment: Experiment, readerId: string, kind: "exposure" | "conversion", now?: Date) => Promise<boolean>;
2703
4052
 
4053
+ /** Effect form of {@link recordMigrationRecords}. */
4054
+ export declare const recordMigrationRecords: (...args: Parameters<typeof recordMigrationRecords_2>) => Effect<void, never, never>;
4055
+
4056
+ /** Record what a run did with each source record; a record seen again is updated, not doubled. */
4057
+ declare const recordMigrationRecords_2: (tx: DataStore, source: string, records: ReadonlyArray<MigrationRecord>, tenantId: string | null, now?: Date) => Promise<void>;
4058
+
2704
4059
  /** Effect form of {@link recordPaths}. */
2705
4060
  export declare const recordPaths: (...args: Parameters<typeof recordPaths_2>) => Effect<void, never, never>;
2706
4061
 
@@ -2712,6 +4067,16 @@ export declare const recordPaths: (...args: Parameters<typeof recordPaths_2>) =>
2712
4067
  */
2713
4068
  declare const recordPaths_2: (tx: DataStore, type: ContentType, scope: CmsScope, tenantId: unknown) => Promise<void>;
2714
4069
 
4070
+ /** Effect form of {@link recordPortalDownload}. */
4071
+ export declare const recordPortalDownload: (...args: Parameters<typeof recordPortalDownload_2>) => Effect<PortalDownloadResult, never, never>;
4072
+
4073
+ /**
4074
+ * Count one download of a document through a portal. Refused once the cap is
4075
+ * reached; the count is a conditional update on the value read, retried on a
4076
+ * race, so two downloads at once never pass the cap.
4077
+ */
4078
+ declare const recordPortalDownload_2: (store: DataStore, token: string, documentId: string, now?: Date) => Promise<PortalDownloadResult>;
4079
+
2715
4080
  export declare type RecurrenceEvery = 'day' | 'week' | 'month';
2716
4081
 
2717
4082
  /** What is wrong with a rule, in words; empty when it can be scheduled. */
@@ -2763,18 +4128,16 @@ export declare const referencesOf: (type: ContentType, values: Readonly<Record<s
2763
4128
  export declare class ReferenceUnavailable extends ReferenceUnavailable_base {
2764
4129
  }
2765
4130
 
2766
- declare const ReferenceUnavailable_base: Schema_2.TaggedErrorClass<ReferenceUnavailable, "ReferenceUnavailable", {
2767
- readonly _tag: Schema_2.tag<"ReferenceUnavailable">;
2768
- } & {
2769
- contentType: typeof Schema_2.String;
2770
- id: typeof Schema_2.String;
2771
- targets: Schema_2.Array$<Schema_2.Struct<{
2772
- path: typeof Schema_2.String;
2773
- contentType: typeof Schema_2.String;
2774
- documentId: typeof Schema_2.String;
2775
- reason: Schema_2.Literal<["blocked", "expired"]>;
4131
+ declare const ReferenceUnavailable_base: Schema_2.Class<ReferenceUnavailable, Schema_2.TaggedStruct<"ReferenceUnavailable", {
4132
+ readonly contentType: Schema_2.String;
4133
+ readonly id: Schema_2.String;
4134
+ readonly targets: Schema_2.$Array<Schema_2.Struct<{
4135
+ readonly path: Schema_2.String;
4136
+ readonly contentType: Schema_2.String;
4137
+ readonly documentId: Schema_2.String;
4138
+ readonly reason: Schema_2.Literals<readonly ["blocked", "expired", "notYet", "territory", "channel", "purpose"]>;
2776
4139
  }>>;
2777
- }>;
4140
+ }>, YieldableError>;
2778
4141
 
2779
4142
  /** One live use of a document. */
2780
4143
  export declare interface ReferenceUse {
@@ -2785,6 +4148,15 @@ export declare interface ReferenceUse {
2785
4148
  readonly path: string;
2786
4149
  }
2787
4150
 
4151
+ /** The rules of one region of a template. */
4152
+ export declare interface RegionRule {
4153
+ /** Only these components may be placed here (all the field allows, when unset). */
4154
+ readonly allowed?: ReadonlyArray<ComponentDefinition>;
4155
+ readonly required?: ReadonlyArray<ComponentDefinition>;
4156
+ /** The most components the region may hold. */
4157
+ readonly maxItems?: number;
4158
+ }
4159
+
2788
4160
  /** Effect form of {@link regrantExtension}. */
2789
4161
  export declare const regrantExtension: (...args: Parameters<typeof regrantExtension_2>) => Effect<ExtensionChange, never, never>;
2790
4162
 
@@ -2794,6 +4166,62 @@ declare const regrantExtension_2: (tx: DataStore, extensionId: string, consent:
2794
4166
  /** The lifecycle of a release. */
2795
4167
  export declare const RELEASE_STATUSES: readonly ["draft", "scheduled", "published", "failed"];
2796
4168
 
4169
+ /**
4170
+ * One address of a release's entry, and whether it shows what the release did.
4171
+ * An entry has its own address and, when other pages include it (a header, a
4172
+ * shared block), one per page a check was requested for.
4173
+ */
4174
+ export declare interface ReleaseAddress {
4175
+ readonly contentType: string;
4176
+ readonly documentId: string;
4177
+ readonly locale: string;
4178
+ readonly action: 'publish' | 'unpublish';
4179
+ /** `unchecked`: the entry has no public address to read (no check was requested). */
4180
+ readonly status: 'observed' | 'pending' | 'stale' | 'unchecked';
4181
+ readonly url: string | null;
4182
+ readonly tookSeconds: number | null;
4183
+ readonly lastSeen: string | null;
4184
+ }
4185
+
4186
+ /** Whether a published release reached readers at every address of its entries. */
4187
+ export declare interface ReleaseCheckpoint {
4188
+ readonly releaseId: string;
4189
+ readonly status: string;
4190
+ readonly publishedAt: Date | null;
4191
+ readonly addresses: ReadonlyArray<ReleaseAddress>;
4192
+ /** Addresses that answer as the release left them, of those that are read. */
4193
+ readonly reached: number;
4194
+ readonly checked: number;
4195
+ /** Every read address answers as the release left it, and none is still pending. */
4196
+ readonly complete: boolean;
4197
+ }
4198
+
4199
+ /** Effect form of {@link releaseCheckpoint}. */
4200
+ export declare const releaseCheckpoint: (...args: Parameters<typeof releaseCheckpoint_2>) => Effect<ReleaseCheckpoint | null, never, never>;
4201
+
4202
+ /**
4203
+ * The release's checkpoint across addresses: for each entry, the newest
4204
+ * delivery check of every address requested when the release went out — the
4205
+ * publish answering with the revision the release pinned, the take-down no
4206
+ * longer answering — read through the public address. The pages that include
4207
+ * an entry count like its own address. A purge is not a checkpoint; an
4208
+ * observed address is. Null for a release the caller cannot see.
4209
+ */
4210
+ declare const releaseCheckpoint_2: (store: DataStore, releaseId: string) => Promise<ReleaseCheckpoint | null>;
4211
+
4212
+ /**
4213
+ * Publish every entry of a release — in the CALLER'S transaction, so either
4214
+ * all of them go live or, when one fails, none does. Records what each variant
4215
+ * showed before (for rollback) and marks the release `published`. Throws
4216
+ * `ReleaseNotEditable` for a release that is already published or failed.
4217
+ */
4218
+ /**
4219
+ * Work that belongs to a release going live — an experiment it starts, one its
4220
+ * rollback stops. Runs in the release's transaction after its items, so a hook
4221
+ * that fails fails the release.
4222
+ */
4223
+ export declare type ReleaseHook = (tx: DataStore, release: Row, now: Date) => Promise<void>;
4224
+
2797
4225
  /**
2798
4226
  * Raised when a release is asked to change in a state that does not allow it:
2799
4227
  * adding to or scheduling a release that is no longer a draft, publishing one
@@ -2802,12 +4230,10 @@ export declare const RELEASE_STATUSES: readonly ["draft", "scheduled", "publishe
2802
4230
  export declare class ReleaseNotEditable extends ReleaseNotEditable_base {
2803
4231
  }
2804
4232
 
2805
- declare const ReleaseNotEditable_base: Schema_2.TaggedErrorClass<ReleaseNotEditable, "ReleaseNotEditable", {
2806
- readonly _tag: Schema_2.tag<"ReleaseNotEditable">;
2807
- } & {
2808
- id: typeof Schema_2.String;
2809
- status: typeof Schema_2.String;
2810
- }>;
4233
+ declare const ReleaseNotEditable_base: Schema_2.Class<ReleaseNotEditable, Schema_2.TaggedStruct<"ReleaseNotEditable", {
4234
+ readonly id: Schema_2.String;
4235
+ readonly status: Schema_2.String;
4236
+ }>, YieldableError>;
2811
4237
 
2812
4238
  export declare type ReleaseStatus = (typeof RELEASE_STATUSES)[number];
2813
4239
 
@@ -2817,21 +4243,93 @@ export declare const releaseStatusOf: (...args: Parameters<typeof releaseStatusO
2817
4243
  /** A release's status (`draft`, `scheduled`, `published`, …), or null when there is none of that id. */
2818
4244
  declare const releaseStatusOf_2: (store: DataStore, releaseId: string) => Promise<string | null>;
2819
4245
 
4246
+ /** Effect form of {@link removeDomain}. */
4247
+ export declare const removeDomain: (...args: Parameters<typeof removeDomain_2>) => Effect<{
4248
+ readonly ok: true;
4249
+ } | {
4250
+ readonly ok: false;
4251
+ readonly reason: "notFound" | "primary";
4252
+ }, never, never>;
4253
+
4254
+ /** Remove a domain. The primary one is removed only after another took its place. */
4255
+ declare const removeDomain_2: (tx: DataStore, domainId: string) => Promise<{
4256
+ readonly ok: true;
4257
+ } | {
4258
+ readonly ok: false;
4259
+ readonly reason: "notFound" | "primary";
4260
+ }>;
4261
+
4262
+ /** Effect form of {@link removeFromCollection}. */
4263
+ export declare const removeFromCollection: (...args: Parameters<typeof removeFromCollection_2>) => Effect<boolean, never, never>;
4264
+
4265
+ /** Take a document out of a collection. */
4266
+ declare const removeFromCollection_2: (tx: DataStore, collectionId: string, documentId: string) => Promise<boolean>;
4267
+
2820
4268
  /** Effect form of {@link removeGlossaryTerm}. */
2821
4269
  export declare const removeGlossaryTerm: (...args: Parameters<typeof removeGlossaryTerm_2>) => Effect<boolean, never, never>;
2822
4270
 
2823
- /** Remove an entry; false when there was none in this workspace. */
2824
- declare const removeGlossaryTerm_2: (tx: DataStore, tenantId: string, entryId: string) => Promise<boolean>;
4271
+ /** Remove an entry; false when there was none in this workspace. */
4272
+ declare const removeGlossaryTerm_2: (tx: DataStore, tenantId: string, entryId: string) => Promise<boolean>;
4273
+
4274
+ /** Effect form of {@link removeRedirect}. */
4275
+ export declare const removeRedirect: (...args: Parameters<typeof removeRedirect_2>) => Effect<boolean, never, never>;
4276
+
4277
+ /**
4278
+ * Remove the redirect from `fromPath` in `scope`. True when there was one. A
4279
+ * page that had the address and is no longer live still answers it as gone
4280
+ * (`goneAt`). In the caller's transaction.
4281
+ */
4282
+ declare const removeRedirect_2: (tx: DataStore, type: ContentType, scope: CmsScope, fromPath: string) => Promise<boolean>;
4283
+
4284
+ /** Effect form of {@link reopenStage}. */
4285
+ export declare const reopenStage: (...args: Parameters<typeof reopenStage_2>) => Effect<number, never, never>;
4286
+
4287
+ /**
4288
+ * Reopen a stage and every stage after it — the fallback: a failure returns
4289
+ * the migration to the last stage that is still proven.
4290
+ */
4291
+ declare const reopenStage_2: (tx: DataStore, source: string, stage: MigrationStage) => Promise<number>;
4292
+
4293
+ /** One draft a replacement would change. */
4294
+ export declare interface ReplacementItem {
4295
+ readonly type: string;
4296
+ readonly documentId: string;
4297
+ readonly variantId: string;
4298
+ readonly locale: string;
4299
+ /** The revision the plan saw — an edit in between is not overwritten. */
4300
+ readonly revisionId: string | null;
4301
+ readonly paths: ReadonlyArray<string>;
4302
+ }
4303
+
4304
+ export declare type ReplacementPlan = {
4305
+ readonly ok: true;
4306
+ readonly items: ReadonlyArray<ReplacementItem>;
4307
+ } | {
4308
+ readonly ok: false;
4309
+ readonly reason: 'sameDocument' | 'typeMismatch';
4310
+ };
4311
+
4312
+ /** What replacing one item did. */
4313
+ export declare interface ReplacementResult extends ReplacementItem {
4314
+ readonly outcome: 'done' | 'failed';
4315
+ readonly reason: 'revisionMoved' | 'incomplete' | 'notFound' | 'pathGone' | 'failed' | null;
4316
+ /** The new draft revision, when done. */
4317
+ readonly newRevisionId: string | null;
4318
+ /** For `incomplete`, the fields a rule refused; for `failed`, the error. */
4319
+ readonly detail: ReadonlyArray<string>;
4320
+ }
2825
4321
 
2826
- /** Effect form of {@link removeRedirect}. */
2827
- export declare const removeRedirect: (...args: Parameters<typeof removeRedirect_2>) => Effect<boolean, never, never>;
4322
+ /** Effect form of {@link replaceReferences}. */
4323
+ export declare const replaceReferences: (...args: Parameters<typeof replaceReferences_2>) => Effect<readonly ReplacementResult[], never, never>;
2828
4324
 
2829
4325
  /**
2830
- * Remove the redirect from `fromPath` in `scope`. True when there was one. A
2831
- * page that had the address and is no longer live still answers it as gone
2832
- * (`goneAt`). In the caller's transaction.
4326
+ * Point every planned draft at `to` instead: per item, a new draft revision
4327
+ * against the revision the plan saw, each in its own transaction with its
4328
+ * own result. Nothing is published — the changes go live like any edit. It
4329
+ * opens those transactions itself, so call it outside one: from an action or
4330
+ * a schedule, not inside a mutation.
2833
4331
  */
2834
- declare const removeRedirect_2: (tx: DataStore, type: ContentType, scope: CmsScope, fromPath: string) => Promise<boolean>;
4332
+ declare const replaceReferences_2: (store: DataStore, types: ReadonlyArray<ContentType>, items: ReadonlyArray<ReplacementItem>, to: string, scope: Pick<CmsScope, "site" | "environment">) => Promise<ReadonlyArray<ReplacementResult>>;
2835
4333
 
2836
4334
  /**
2837
4335
  * Replace the text in `[start, end)` with `text` (a paste, a typed line
@@ -2846,6 +4344,24 @@ export declare const requestChanges: (...args: Parameters<typeof requestChanges_
2846
4344
  /** Send the revision in review back with a note. Same checks as approving, minus self-approval. */
2847
4345
  declare const requestChanges_2: (store: DataStore, type: ContentType, variantId: string, scope: CmsScope, options: Omit<DecideOptions, "allowSelfApproval">) => Promise<Row>;
2848
4346
 
4347
+ /** Effect form of {@link requestDeliveryCheck}. */
4348
+ export declare const requestDeliveryCheck: (...args: Parameters<typeof requestDeliveryCheck_2>) => Effect<string, never, never>;
4349
+
4350
+ /**
4351
+ * Record what a public address must show after this change, in the caller's
4352
+ * transaction. An earlier pending check of the same document, language and
4353
+ * address is closed as stale: the newer change is what counts now.
4354
+ */
4355
+ declare const requestDeliveryCheck_2: (tx: DataStore, input: {
4356
+ readonly contentType: string;
4357
+ readonly documentId: string;
4358
+ readonly locale: string;
4359
+ readonly kind: "publish" | "unpublish";
4360
+ readonly revisionId?: string | null;
4361
+ readonly url: string;
4362
+ readonly tenantId?: string | null;
4363
+ }, now?: Date) => Promise<string>;
4364
+
2849
4365
  export declare type RequestExceptionResult = {
2850
4366
  readonly ok: true;
2851
4367
  readonly id: string;
@@ -2874,6 +4390,18 @@ declare const requestReview_2: (store: DataStore, type: ContentType, variantId:
2874
4390
  readonly note?: string;
2875
4391
  }) => Promise<Row>;
2876
4392
 
4393
+ /** The document with each suggestion accepted, rejected or kept, as `decide` says. */
4394
+ export declare const resolveChanges: (doc: RichDocument, decide: (change: RichChange) => ChangeDecision) => RichDocument;
4395
+
4396
+ /** Effect form of {@link resolveCutoverIssue}. */
4397
+ export declare const resolveCutoverIssue: (...args: Parameters<typeof resolveCutoverIssue_2>) => Effect<ResolveIssueResult, never, never>;
4398
+
4399
+ /** Close an issue with why it may stand (an item type deliberately not migrated, a file replaced by hand). */
4400
+ declare const resolveCutoverIssue_2: (tx: DataStore, issueId: string, input: {
4401
+ readonly resolution: string;
4402
+ readonly actorId: string;
4403
+ }, now?: Date) => Promise<ResolveIssueResult>;
4404
+
2877
4405
  /** One published entry found by {@link CmsApi.resolve}, with where it came from. */
2878
4406
  export declare interface ResolvedEntry {
2879
4407
  /** The published row that answers the request. */
@@ -2887,6 +4415,18 @@ export declare interface ResolvedEntry {
2887
4415
  readonly fallback: boolean;
2888
4416
  }
2889
4417
 
4418
+ export declare type ResolvedPortal = {
4419
+ readonly ok: true;
4420
+ readonly portal: Portal;
4421
+ readonly tenantId: string | null;
4422
+ readonly collection: Collection;
4423
+ readonly items: ReadonlyArray<CollectionItem>;
4424
+ readonly downloadsLeft: number | null;
4425
+ } | {
4426
+ readonly ok: false;
4427
+ readonly reason: 'unknown' | 'expired' | 'revoked';
4428
+ };
4429
+
2890
4430
  /** What a preview link shows. */
2891
4431
  export declare type ResolvedPreviewShare = {
2892
4432
  readonly ok: true;
@@ -2904,6 +4444,13 @@ export declare type ResolvedPreviewShare = {
2904
4444
  readonly reason: 'unknown' | 'expired' | 'revoked';
2905
4445
  };
2906
4446
 
4447
+ export declare type ResolveIssueResult = {
4448
+ readonly ok: true;
4449
+ } | {
4450
+ readonly ok: false;
4451
+ readonly reason: 'notFound' | 'noReason' | 'alreadyResolved';
4452
+ };
4453
+
2907
4454
  /** Effect form of {@link resolveMedia}. */
2908
4455
  export declare const resolveMedia: (...args: Parameters<typeof resolveMedia_2>) => Effect<Record<string, unknown>, never, never>;
2909
4456
 
@@ -2936,6 +4483,12 @@ export declare interface ResolveOptions {
2936
4483
  readonly fallback?: ReadonlyArray<string>;
2937
4484
  }
2938
4485
 
4486
+ /** Effect form of {@link resolvePortal}. */
4487
+ export declare const resolvePortal: (...args: Parameters<typeof resolvePortal_2>) => Effect<ResolvedPortal, never, never>;
4488
+
4489
+ /** What a portal link shows. The token is the authorization: this read crosses tenants. */
4490
+ declare const resolvePortal_2: (store: DataStore, token: string, now?: Date) => Promise<ResolvedPortal>;
4491
+
2939
4492
  /** Effect form of {@link resolvePreviewShare}. */
2940
4493
  export declare const resolvePreviewShare: (...args: Parameters<typeof resolvePreviewShare_2>) => Effect<ResolvedPreviewShare, ContentNotFound | PreviewShareRejected, never>;
2941
4494
 
@@ -3015,13 +4568,11 @@ declare const reviewLog_2: (store: DataStore, type: ContentType, variantId: stri
3015
4568
  export declare class ReviewRequired extends ReviewRequired_base {
3016
4569
  }
3017
4570
 
3018
- declare const ReviewRequired_base: Schema_2.TaggedErrorClass<ReviewRequired, "ReviewRequired", {
3019
- readonly _tag: Schema_2.tag<"ReviewRequired">;
3020
- } & {
3021
- contentType: typeof Schema_2.String;
3022
- id: typeof Schema_2.String;
3023
- revisionId: typeof Schema_2.String;
3024
- }>;
4571
+ declare const ReviewRequired_base: Schema_2.Class<ReviewRequired, Schema_2.TaggedStruct<"ReviewRequired", {
4572
+ readonly contentType: Schema_2.String;
4573
+ readonly id: Schema_2.String;
4574
+ readonly revisionId: Schema_2.String;
4575
+ }>, YieldableError>;
3025
4576
 
3026
4577
  /** Effect form of {@link reviewRequiredFor}. */
3027
4578
  export declare const reviewRequiredFor: (...args: Parameters<typeof reviewRequiredFor_2>) => Effect<boolean, never, never>;
@@ -3058,13 +4609,18 @@ declare const reviewStatus_2: (store: DataStore, type: ContentType, variantId: s
3058
4609
  export declare class ReviewStepRefused extends ReviewStepRefused_base {
3059
4610
  }
3060
4611
 
3061
- declare const ReviewStepRefused_base: Schema_2.TaggedErrorClass<ReviewStepRefused, "ReviewStepRefused", {
3062
- readonly _tag: Schema_2.tag<"ReviewStepRefused">;
3063
- } & {
3064
- contentType: typeof Schema_2.String;
3065
- id: typeof Schema_2.String;
3066
- reason: Schema_2.Literal<["notInReview", "selfApproval", "ambiguousOrder"]>;
3067
- }>;
4612
+ declare const ReviewStepRefused_base: Schema_2.Class<ReviewStepRefused, Schema_2.TaggedStruct<"ReviewStepRefused", {
4613
+ readonly contentType: Schema_2.String;
4614
+ readonly id: Schema_2.String;
4615
+ readonly reason: Schema_2.Literals<readonly ["notInReview", "selfApproval", "ambiguousOrder"]>;
4616
+ }>, YieldableError>;
4617
+
4618
+ export declare interface ReviewWorkflow {
4619
+ readonly id: string;
4620
+ /** Raise it whenever the steps change: an instance keeps the version it started with. */
4621
+ readonly version: number;
4622
+ readonly steps: ReadonlyArray<WorkflowStep>;
4623
+ }
3068
4624
 
3069
4625
  /**
3070
4626
  * Raised by `publish` when the caller pinned a revision (`{ revisionId }`)
@@ -3074,14 +4630,54 @@ declare const ReviewStepRefused_base: Schema_2.TaggedErrorClass<ReviewStepRefuse
3074
4630
  export declare class RevisionMismatch extends RevisionMismatch_base {
3075
4631
  }
3076
4632
 
3077
- declare const RevisionMismatch_base: Schema_2.TaggedErrorClass<RevisionMismatch, "RevisionMismatch", {
3078
- readonly _tag: Schema_2.tag<"RevisionMismatch">;
3079
- } & {
3080
- contentType: typeof Schema_2.String;
3081
- id: typeof Schema_2.String;
3082
- expected: typeof Schema_2.String;
3083
- actual: typeof Schema_2.String;
3084
- }>;
4633
+ declare const RevisionMismatch_base: Schema_2.Class<RevisionMismatch, Schema_2.TaggedStruct<"RevisionMismatch", {
4634
+ readonly contentType: Schema_2.String;
4635
+ readonly id: Schema_2.String;
4636
+ readonly expected: Schema_2.String;
4637
+ readonly actual: Schema_2.String;
4638
+ }>, YieldableError>;
4639
+
4640
+ /** A value attributed to the revision live when it was counted. */
4641
+ export declare interface RevisionShare extends LiveStretch {
4642
+ readonly value: number;
4643
+ readonly days: number;
4644
+ }
4645
+
4646
+ /** Effect form of {@link revisionsReferencing}. */
4647
+ export declare const revisionsReferencing: (...args: Parameters<typeof revisionsReferencing_2>) => Effect<readonly RevisionUse[], never, never>;
4648
+
4649
+ /**
4650
+ * Every saved revision, of any document in the site and environment, that
4651
+ * referenced `target` — newest first. Answers "what pointed here, and since
4652
+ * when", including uses since removed.
4653
+ */
4654
+ declare const revisionsReferencing_2: (store: DataStore, types: ReadonlyArray<ContentType>, target: {
4655
+ readonly type: string;
4656
+ readonly documentId: string;
4657
+ }, scope: Pick<CmsScope, "site" | "environment">) => Promise<ReadonlyArray<RevisionUse>>;
4658
+
4659
+ /** Effect form of {@link revisionTimeline}. */
4660
+ export declare const revisionTimeline: (...args: Parameters<typeof revisionTimeline_2>) => Effect<readonly LiveStretch[], never, never>;
4661
+
4662
+ /**
4663
+ * When each revision of one document was live in one place, from its
4664
+ * changes: a publish opens a stretch (with the release that took it live), the
4665
+ * next publish or a take-down closes it. For `attributeToRevisions` (metrics.ts).
4666
+ */
4667
+ declare const revisionTimeline_2: (store: DataStore, target: {
4668
+ readonly contentType: string;
4669
+ readonly documentId: string;
4670
+ }, scope: CmsScope) => Promise<ReadonlyArray<LiveStretch>>;
4671
+
4672
+ /** One saved revision that referenced a document — the history of its uses. */
4673
+ export declare interface RevisionUse {
4674
+ readonly sourceType: string;
4675
+ readonly sourceDocumentId: string;
4676
+ readonly locale: string;
4677
+ readonly revisionId: string;
4678
+ readonly number: number;
4679
+ readonly path: string;
4680
+ }
3085
4681
 
3086
4682
  /** Effect form of {@link revokeExtension}. */
3087
4683
  export declare const revokeExtension: (...args: Parameters<typeof revokeExtension_2>) => Effect<ExtensionChange, never, never>;
@@ -3089,25 +4685,39 @@ export declare const revokeExtension: (...args: Parameters<typeof revokeExtensio
3089
4685
  /** Take every capability away; the install and its data stay. */
3090
4686
  declare const revokeExtension_2: (tx: DataStore, extensionId: string) => Promise<ExtensionChange>;
3091
4687
 
4688
+ /** Effect form of {@link revokePortal}. */
4689
+ export declare const revokePortal: (...args: Parameters<typeof revokePortal_2>) => Effect<boolean, never, never>;
4690
+
4691
+ /** Revoke a portal: the link stops working at once. */
4692
+ declare const revokePortal_2: (tx: DataStore, portalId: string, now?: Date) => Promise<boolean>;
4693
+
3092
4694
  /** Effect form of {@link revokePreviewShare}. */
3093
4695
  export declare const revokePreviewShare: (...args: Parameters<typeof revokePreviewShare_2>) => Effect<void, ContentNotFound | PreviewShareRejected, never>;
3094
4696
 
3095
4697
  /** Revoke one of the caller's shares; the link stops working at once. */
3096
4698
  declare const revokePreviewShare_2: (store: DataStore, shareId: string, now?: Date) => Promise<void>;
3097
4699
 
3098
- /** A top-level block. `id` is stable across edits, moves and translations. */
4700
+ /** A top-level block. `id` is stable across edits, moves and translations. `style`
4701
+ * names a token of the profile's style group; `change` marks a block suggested
4702
+ * for insertion or deletion. */
3099
4703
  export declare type RichBlock = {
3100
4704
  readonly id: string;
4705
+ readonly change?: RichChange;
3101
4706
  readonly type: 'paragraph';
3102
4707
  readonly content: ReadonlyArray<RichInline>;
4708
+ readonly style?: string;
3103
4709
  } | {
3104
4710
  readonly id: string;
4711
+ readonly change?: RichChange;
3105
4712
  readonly type: 'heading';
3106
4713
  readonly level: 2 | 3;
3107
4714
  readonly content: ReadonlyArray<RichInline>;
4715
+ readonly style?: string;
3108
4716
  } | {
3109
4717
  readonly id: string;
4718
+ readonly change?: RichChange;
3110
4719
  readonly type: 'list';
4720
+ readonly style?: string;
3111
4721
  readonly ordered: boolean;
3112
4722
  readonly items: ReadonlyArray<ReadonlyArray<RichInline>>;
3113
4723
  /** How deep each item sits (0 at the top, at most `MAX_LIST_LEVEL`), one per item; absent: all at the top.
@@ -3118,6 +4728,7 @@ export declare type RichBlock = {
3118
4728
  readonly sublists?: ReadonlyArray<ListKind>;
3119
4729
  } | {
3120
4730
  readonly id: string;
4731
+ readonly change?: RichChange;
3121
4732
  readonly type: 'table';
3122
4733
  /** True when the first row holds the column headers. */
3123
4734
  readonly header: boolean;
@@ -3126,15 +4737,67 @@ export declare type RichBlock = {
3126
4737
  /** An image asset (by its documentId) with an optional caption. */
3127
4738
  | {
3128
4739
  readonly id: string;
4740
+ readonly change?: RichChange;
3129
4741
  readonly type: 'image';
3130
4742
  readonly asset: string;
3131
4743
  readonly caption?: string;
4744
+ }
4745
+ /** A file to download — an asset (by its documentId) from the media library — and the text its link shows. */
4746
+ | {
4747
+ readonly id: string;
4748
+ readonly change?: RichChange;
4749
+ readonly type: 'file';
4750
+ readonly asset: string;
4751
+ readonly label: string;
4752
+ }
4753
+ /** A component the profile allows, placed between blocks; `id` is its instance id. */
4754
+ | {
4755
+ readonly id: string;
4756
+ readonly change?: RichChange;
4757
+ readonly type: 'component';
4758
+ readonly componentId: string;
4759
+ readonly props: Readonly<Record<string, unknown>>;
4760
+ /** The definition's fingerprint when it was last saved. */
4761
+ readonly fingerprint?: string;
4762
+ };
4763
+
4764
+ /** A kind of block. */
4765
+ export declare type RichBlockKind = RichBlock['type'];
4766
+
4767
+ /** The field and block a text key names, or null for a plain field's key. */
4768
+ export declare const richBlockOfKey: (key: string) => {
4769
+ readonly field: string;
4770
+ readonly blockId: string;
4771
+ } | null;
4772
+
4773
+ /** The text key of one block of a rich text: `<field>#<blockId>`. */
4774
+ export declare const richBlockTextKey: (field: string, blockId: string) => string;
4775
+
4776
+ /** A suggested change (track changes): text or a block someone proposes to insert
4777
+ * or delete, until it is accepted or rejected (trackChanges.ts). */
4778
+ export declare interface RichChange {
4779
+ readonly id: string;
4780
+ readonly kind: 'insert' | 'delete';
4781
+ /** Who suggested it. */
4782
+ readonly by: string;
4783
+ /** When, as an ISO timestamp. */
4784
+ readonly at: string;
4785
+ }
4786
+
4787
+ /** How a contact is given: a published contact point (its documentId), or a one-off address or number. */
4788
+ export declare type RichContact = {
4789
+ readonly target: string;
4790
+ } | {
4791
+ readonly channel: 'email' | 'phone';
4792
+ readonly value: string;
3132
4793
  };
3133
4794
 
3134
4795
  /** A rich document. */
3135
4796
  export declare interface RichDocument {
3136
4797
  readonly type: 'doc';
3137
4798
  readonly blocks: ReadonlyArray<RichBlock>;
4799
+ /** The profile it was saved against (`article@2`). */
4800
+ readonly profile?: string;
3138
4801
  }
3139
4802
 
3140
4803
  export declare const RichDocumentEditor: (props: RichDocumentEditorProps) => ReactNode;
@@ -3154,6 +4817,8 @@ export declare interface RichDocumentEditorProps extends WidgetProps {
3154
4817
  * tables keep their lines either way.
3155
4818
  */
3156
4819
  readonly surface?: 'markup' | 'visual';
4820
+ /** Renders the props form of a component between the blocks (`ContentForm` passes its own, nested). */
4821
+ readonly renderComponentProps?: (definition: ComponentDefinition, props: Readonly<Record<string, unknown>>, onChange: (props: Readonly<Record<string, unknown>>) => void) => ReactNode;
3157
4822
  }
3158
4823
 
3159
4824
  /** Translate a Contentful rich-text document, and say what could not be translated. */
@@ -3171,6 +4836,15 @@ export declare type RichDocumentPicker = (props: {
3171
4836
  readonly type: string;
3172
4837
  readonly value: string;
3173
4838
  readonly onChange: (documentId: string) => void;
4839
+ /** Where the choice goes, for a picker that hands off to another tool (a selection intent): the field and, inside a rich text, the block. */
4840
+ readonly target?: {
4841
+ readonly field: string;
4842
+ readonly blockId?: string;
4843
+ };
4844
+ /** What the choice is for — an image block's image, a download block's file, a link's target, a contact — when two pickers share a `type`. */
4845
+ readonly role?: 'image' | 'file' | 'link' | 'contact';
4846
+ /** The id of the element that names the choice (a link's "Link to"): a control the picker renders is labelled by it (`aria-labelledby`). */
4847
+ readonly labelledBy?: string;
3174
4848
  }) => ReactNode;
3175
4849
 
3176
4850
  /** One problem with a rich document, at a path below the field. */
@@ -3180,7 +4854,7 @@ export declare interface RichDocumentProblem {
3180
4854
  readonly message: string;
3181
4855
  }
3182
4856
 
3183
- /** Everything wrong with `value` as a rich document under `options`. */
4857
+ /** Everything wrong with `value` as a rich document under `options` (component props are checked by the caller). */
3184
4858
  export declare const richDocumentProblems: (path: string, value: unknown, options: RichTextOptions) => ReadonlyArray<RichDocumentProblem>;
3185
4859
 
3186
4860
  /** A document reference found in a rich document. */
@@ -3194,7 +4868,7 @@ export declare interface RichDocumentReference {
3194
4868
  export declare const richDocumentReferences: (path: string, doc: RichDocument, options: RichTextOptions) => ReadonlyArray<RichDocumentReference>;
3195
4869
 
3196
4870
  /** The document's blocks, in order. Renders nothing for a value that is not a rich document. */
3197
- export declare const RichDocumentView: ({ document, hrefOf, renderImage }: RichDocumentViewProps) => ReactNode;
4871
+ export declare const RichDocumentView: ({ document, hrefOf, renderImage, contactHrefOf, renderComponent, fileHrefOf }: RichDocumentViewProps) => ReactNode;
3198
4872
 
3199
4873
  export declare interface RichDocumentViewProps {
3200
4874
  /** A stored `Schema.RichText()` value (a plain string renders as paragraphs). */
@@ -3206,19 +4880,37 @@ export declare interface RichDocumentViewProps {
3206
4880
  readonly asset: string;
3207
4881
  readonly caption?: string;
3208
4882
  }) => ReactNode;
3209
- }
3210
-
3211
- /** A run of text inside a block. */
3212
- export declare type RichInline = {
4883
+ /** The `mailto:` / `tel:` address of a published contact point, or undefined when it is not live. */
4884
+ readonly contactHrefOf?: (documentId: string) => string | undefined;
4885
+ /** Render a component placed between the blocks; without it, components are left out. */
4886
+ readonly renderComponent?: (block: ComponentBlock) => ReactNode;
4887
+ /** 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;
4889
+ }
4890
+
4891
+ /** A run of text inside a block. `change` marks it as suggested. */
4892
+ export declare type RichInline =
4893
+ /** `style` names a token of the profile's style group (`lead`, `note`). */
4894
+ {
3213
4895
  readonly type: 'text';
3214
4896
  readonly text: string;
3215
4897
  readonly marks?: ReadonlyArray<RichMark>;
4898
+ readonly style?: string;
4899
+ readonly change?: RichChange;
3216
4900
  }
3217
4901
  /** A link to a document (by its documentId) — the site resolves its address. */
3218
4902
  | {
3219
4903
  readonly type: 'link';
3220
4904
  readonly target: string;
3221
4905
  readonly text: string;
4906
+ readonly change?: RichChange;
4907
+ }
4908
+ /** An e-mail address or a phone number — the site makes it a `mailto:` / `tel:` link. */
4909
+ | {
4910
+ readonly type: 'contact';
4911
+ readonly text: string;
4912
+ readonly contact: RichContact;
4913
+ readonly change?: RichChange;
3222
4914
  };
3223
4915
 
3224
4916
  /** An inline mark. */
@@ -3226,12 +4918,39 @@ export declare type RichMark = 'bold' | 'italic' | 'underline';
3226
4918
 
3227
4919
  /**
3228
4920
  * Which resources a rich-text field may hold: `images` names the content type
3229
- * an image block references (an asset type), `links` the type a link
3230
- * references (a page type). Unset → that node is not allowed.
4921
+ * an image block references (an asset type), `files` the type a download
4922
+ * block references (an asset type), `links` the type a link references (a
4923
+ * page type). Unset → that node is not allowed.
3231
4924
  */
3232
4925
  export declare interface RichTextOptions {
3233
4926
  readonly images?: string;
4927
+ /** The asset type a download block references; unset → no downloads. */
4928
+ readonly files?: string;
3234
4929
  readonly links?: string;
4930
+ /** What this field allows beyond that; without one, every built-in block and mark, no styles, components or contacts. */
4931
+ readonly profile?: RichTextProfile;
4932
+ }
4933
+
4934
+ /** What a rich-text field allows (`defineRichTextProfile`). Versioned: a change bumps `version`. */
4935
+ export declare interface RichTextProfile {
4936
+ readonly name: string;
4937
+ readonly version: number;
4938
+ /** `<name>@<version>` — what a saved document records. */
4939
+ readonly id: string;
4940
+ readonly blocks: ReadonlyArray<RichBlockKind>;
4941
+ readonly headings: ReadonlyArray<2 | 3>;
4942
+ readonly marks: ReadonlyArray<RichMark>;
4943
+ /** Named styles of paragraphs, headings, lists and runs of text: one design-token group, name → meaning. */
4944
+ readonly styles?: {
4945
+ readonly group: string;
4946
+ readonly tokens: Readonly<Record<string, string>>;
4947
+ };
4948
+ /** The components that may sit between the blocks. */
4949
+ readonly components: ReadonlyArray<ComponentDefinition>;
4950
+ /** The content type of the published contact points (e-mail, phone) a text may name. */
4951
+ readonly contactPoints?: string;
4952
+ /** Whether a text may hold a one-off e-mail address or phone number (checked on save). */
4953
+ readonly contactLiterals: boolean;
3235
4954
  }
3236
4955
 
3237
4956
  export declare const RichTextSurface: (props: RichTextSurfaceProps) => ReactNode;
@@ -3269,7 +4988,7 @@ export declare const rollbackRelease: (...args: Parameters<typeof rollbackReleas
3269
4988
  * published in the caller's transaction. The rolled-back release is left as it
3270
4989
  * was. Returns the new release.
3271
4990
  */
3272
- declare const rollbackRelease_2: (tx: DataStore, types: ReadonlyArray<ContentType>, releaseId: string, now?: Date) => Promise<Row>;
4991
+ declare const rollbackRelease_2: (tx: DataStore, types: ReadonlyArray<ContentType>, releaseId: string, now?: Date, options?: PublishReleaseOptions) => Promise<Row>;
3273
4992
 
3274
4993
  /** A path found by {@link CmsApi.route}. */
3275
4994
  export declare interface RouteMatch {
@@ -3286,6 +5005,9 @@ export declare interface RouteMatch {
3286
5005
  readonly via: 'path' | 'fallback' | 'redirect';
3287
5006
  }
3288
5007
 
5008
+ /** Whether a rule's pack applies in this site and language (every rule applies where no place is known). */
5009
+ export declare const ruleApplies: (rule: QualityRule, scope: CmsScope | null) => boolean;
5010
+
3289
5011
  /** Effect form of {@link runBulk}. */
3290
5012
  export declare const runBulk: (...args: Parameters<typeof runBulk_2>) => Effect<readonly BulkResult[], ContentValidationFailed | ContentNotFound | ContentIdConflict | RevisionMismatch | ReviewRequired | ReferenceUnavailable, never>;
3291
5013
 
@@ -3297,6 +5019,20 @@ export declare const runBulk: (...args: Parameters<typeof runBulk_2>) => Effect<
3297
5019
  */
3298
5020
  declare const runBulk_2: (store: DataStore, types: ReadonlyArray<ContentType>, place: Place, action: BulkAction, plan: ReadonlyArray<PlannedItem>) => Promise<ReadonlyArray<BulkResult>>;
3299
5021
 
5022
+ /** Effect form of {@link runDeliveryChecks}. */
5023
+ export declare const runDeliveryChecks: (...args: Parameters<typeof runDeliveryChecks_2>) => Effect<readonly DeliveryCheck[], never, never>;
5024
+
5025
+ /**
5026
+ * Read every pending check's address once: observed when it answers as
5027
+ * expected, stale once `staleAfterMs` passed since the change without that.
5028
+ * Hand it a store outside any request (a schedule's `app.store`). Returns
5029
+ * the checks it settled.
5030
+ */
5031
+ declare const runDeliveryChecks_2: (store: DataStore, read: ReadRevision, now?: Date, options?: {
5032
+ readonly staleAfterMs?: number;
5033
+ readonly limit?: number;
5034
+ }) => Promise<ReadonlyArray<DeliveryCheck>>;
5035
+
3300
5036
  /** Effect form of {@link runningExperiment}. */
3301
5037
  export declare const runningExperiment: (...args: Parameters<typeof runningExperiment_2>) => Effect<Experiment | null, never, never>;
3302
5038
 
@@ -3403,6 +5139,20 @@ export declare const Schema: {
3403
5139
  readonly unique: () => FieldRefinement;
3404
5140
  /** Closed value set → `<select>` widget + a CHECK constraint. */
3405
5141
  readonly Literal: (values_0: string, ...values: string[]) => PipeableField;
5142
+ /**
5143
+ * A design token of one group (`tone`, `space`) from the set the design
5144
+ * system declares with `defineDesignTokens`: the editor picks a NAME, never
5145
+ * a colour or a size, and the renderer maps the name to its style. Stored
5146
+ * and checked like a literal.
5147
+ */
5148
+ readonly Token: (tokens: DesignTokens, group: string) => PipeableField;
5149
+ /**
5150
+ * An action a component performs, chosen from the ones its renderer
5151
+ * implements (`{ follow: 'Go to the target page', share: 'Share this page' }`):
5152
+ * the editor picks what happens, the developer owns how. Stored and checked
5153
+ * like a literal; the labels are what the editor reads.
5154
+ */
5155
+ readonly Action: (actions: Readonly<Record<string, string>>) => PipeableField;
3406
5156
  /**
3407
5157
  * Rich text, stored as a `RichDocument` (see richDocument.ts): blocks with
3408
5158
  * stable ids — paragraph, heading, list, table, image — and inline text
@@ -3496,6 +5246,48 @@ export declare type SecretBinding = {
3496
5246
  readonly reason: 'notInstalled' | 'notAsked';
3497
5247
  };
3498
5248
 
5249
+ /** The answer of an intent: which resource was chosen. */
5250
+ export declare interface SelectionAnswer {
5251
+ readonly intentId: string;
5252
+ readonly documentId: string;
5253
+ /** What the chosen resource is called — the link text when nothing was selected. */
5254
+ readonly title?: string;
5255
+ }
5256
+
5257
+ export declare interface SelectionIntent {
5258
+ readonly id: string;
5259
+ /** The content type to pick from (`asset`, `page`). */
5260
+ readonly pick: string;
5261
+ /** What kind of it is wanted, when the type holds several (`image`, `file`); the tool shows only those. */
5262
+ readonly kind?: string;
5263
+ readonly target: SelectionTarget;
5264
+ /** The app-relative address to go back to. */
5265
+ readonly returnTo: string;
5266
+ /** What the picking tool shows about the target (`Planting guide — Text, image 3`). */
5267
+ readonly label?: string;
5268
+ }
5269
+
5270
+ /** Where a chosen resource goes. */
5271
+ export declare interface SelectionTarget {
5272
+ /** The type being edited; the document and the revision the intent was made on — or, before the draft is saved, the open form (`formId`). */
5273
+ readonly type: string;
5274
+ readonly documentId?: string;
5275
+ readonly revisionId?: string;
5276
+ readonly formId?: string;
5277
+ readonly locale?: string;
5278
+ /** The field; with `blockId`, a block of that rich text (an image block's asset, or a link over `selection`). */
5279
+ readonly field: string;
5280
+ readonly blockId?: string;
5281
+ /** With `prop`: a placed component of a components field, by its instance id, and the prop that takes the choice. */
5282
+ readonly instanceId?: string;
5283
+ readonly prop?: string;
5284
+ /** For a link: the text it is made over, by character offset in the block's text. */
5285
+ readonly selection?: {
5286
+ readonly start: number;
5287
+ readonly end: number;
5288
+ };
5289
+ }
5290
+
3499
5291
  /** Effect form of {@link seriesOf}. */
3500
5292
  export declare const seriesOf: (...args: Parameters<typeof seriesOf_2>) => Effect<PublishSeries | null, ContentValidationFailed | ContentNotFound, never>;
3501
5293
 
@@ -3540,12 +5332,41 @@ export declare const setOwner: (...args: Parameters<typeof setOwner_2>) => Effec
3540
5332
  /** Make `owner` (an account id) responsible for the document, or nobody (`null`). */
3541
5333
  declare const setOwner_2: (store: DataStore, type: ContentType, documentId: string, place: Place_2, owner: string | null) => Promise<Stewardship>;
3542
5334
 
5335
+ /** Effect form of {@link setPrimaryDomain}. */
5336
+ export declare const setPrimaryDomain: (...args: Parameters<typeof setPrimaryDomain_2>) => Effect<SetPrimaryResult, never, never>;
5337
+
5338
+ /** 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>;
5340
+
5341
+ export declare type SetPrimaryResult = {
5342
+ readonly ok: true;
5343
+ } | {
5344
+ readonly ok: false;
5345
+ readonly reason: 'notFound' | 'notVerified';
5346
+ };
5347
+
3543
5348
  /** Effect form of {@link setReviewRequired}. */
3544
5349
  export declare const setReviewRequired: (...args: Parameters<typeof setReviewRequired_2>) => Effect<readonly string[], never, never>;
3545
5350
 
3546
5351
  /** Turn the workspace's review requirement for `typeName` on or off, in the caller's transaction. */
3547
5352
  declare const setReviewRequired_2: (tx: DataStore, tenantId: string, typeName: string, required: boolean) => Promise<ReadonlyArray<string>>;
3548
5353
 
5354
+ /** Effect form of {@link setStageOwner}. */
5355
+ export declare const setStageOwner: (...args: Parameters<typeof setStageOwner_2>) => Effect<{
5356
+ readonly ok: true;
5357
+ } | {
5358
+ readonly ok: false;
5359
+ readonly reason: "passed";
5360
+ }, never, never>;
5361
+
5362
+ /** Name who owns a stage. A passed stage keeps its owner. */
5363
+ declare const setStageOwner_2: (tx: DataStore, source: string, stage: MigrationStage, ownerId: string, tenantId: string | null) => Promise<{
5364
+ readonly ok: true;
5365
+ } | {
5366
+ readonly ok: false;
5367
+ readonly reason: "passed";
5368
+ }>;
5369
+
3549
5370
  export declare type SettingsChange = {
3550
5371
  readonly ok: true;
3551
5372
  readonly settings: Readonly<Record<string, ExtensionSettingValue>>;
@@ -3570,6 +5391,45 @@ export declare const settleAiOperation: (...args: Parameters<typeof settleAiOper
3570
5391
  /** What the person did with a proposal; false when it is not a pending proposal. */
3571
5392
  declare const settleAiOperation_2: (tx: DataStore, operationId: string, outcome: "applied" | "discarded") => Promise<boolean>;
3572
5393
 
5394
+ /**
5395
+ * Whether an origin response may be stored by a shared cache: eligibility is
5396
+ * checked again after the origin answered — a `Set-Cookie`, `private` or
5397
+ * `no-store` keeps it out whatever the request looked like.
5398
+ */
5399
+ export declare const sharedCacheable: (headers: Readonly<Record<string, string | undefined>>) => boolean;
5400
+
5401
+ /**
5402
+ * The blocks of a draft's rich texts typed in together, with their markup:
5403
+ * every paragraph, heading, list and table that holds no suggestions (a block
5404
+ * with suggestions is decided, not typed in).
5405
+ */
5406
+ export declare const sharedRichBlocks: (type: ContentType, values: Readonly<Record<string, unknown>>) => ReadonlyArray<{
5407
+ readonly key: string;
5408
+ readonly field: string;
5409
+ readonly block: RichBlock;
5410
+ readonly markup: string;
5411
+ }>;
5412
+
5413
+ export declare interface SiteDomain {
5414
+ readonly id: string;
5415
+ readonly site: string;
5416
+ readonly host: string;
5417
+ readonly status: 'pending' | 'verified';
5418
+ readonly primary: boolean;
5419
+ readonly verifiedAt: Date | null;
5420
+ /** The TXT record that proves ownership. */
5421
+ readonly record: {
5422
+ readonly name: string;
5423
+ readonly value: string;
5424
+ };
5425
+ }
5426
+
5427
+ /** Effect form of {@link siteDomains}. */
5428
+ export declare const siteDomains: (...args: Parameters<typeof siteDomains_2>) => Effect<readonly SiteDomain[], never, never>;
5429
+
5430
+ /** A site's domains: the primary first, then by host. */
5431
+ declare const siteDomains_2: (store: DataStore, site: string) => Promise<ReadonlyArray<SiteDomain>>;
5432
+
3573
5433
  export declare interface SitemapUrl extends PageAlternate {
3574
5434
  readonly documentId: string;
3575
5435
  /** ISO date of the variant's last change, when known. */
@@ -3609,6 +5469,32 @@ export declare const sourceAttributes: (path: string) => {
3609
5469
  /** The field path behind a clicked element of the preview, or null. */
3610
5470
  export declare const sourcePathOf: (target: unknown) => string | null;
3611
5471
 
5472
+ export declare interface StageState {
5473
+ readonly stage: MigrationStage;
5474
+ readonly ownerId: string | null;
5475
+ readonly status: 'open' | 'passed';
5476
+ readonly note: string | null;
5477
+ readonly evidenceUri: string | null;
5478
+ readonly passedBy: string | null;
5479
+ readonly passedAt: Date | null;
5480
+ }
5481
+
5482
+ /** A placed component saved against an earlier definition of it, with no migration to upgrade it. */
5483
+ export declare interface StaleComponent {
5484
+ readonly path: string;
5485
+ readonly componentId: string;
5486
+ readonly fingerprint: string | null;
5487
+ }
5488
+
5489
+ /** The instances in `values` (nested ones included) that a save would not upgrade — their definition changed and names no migration from them. */
5490
+ export declare const staleComponents: (type: Pick<ContentType, "fields">, values: Readonly<Record<string, unknown>>) => ReadonlyArray<StaleComponent>;
5491
+
5492
+ /** Effect form of {@link startBulkRun}. */
5493
+ export declare const startBulkRun: (...args: Parameters<typeof startBulkRun_2>) => Effect<string, never, never>;
5494
+
5495
+ /** Record a run of `plan`; nothing is executed yet. */
5496
+ declare const startBulkRun_2: (tx: DataStore, place: Place, action: BulkAction, plan: ReadonlyArray<PlannedItem>, actorId: string | null) => Promise<string>;
5497
+
3612
5498
  /** Effect form of {@link startExperiment}. */
3613
5499
  export declare const startExperiment: (...args: Parameters<typeof startExperiment_2>) => Effect<StartExperimentResult, never, never>;
3614
5500
 
@@ -3648,6 +5534,46 @@ export declare const startStewardship: (...args: Parameters<typeof startStewards
3648
5534
  */
3649
5535
  declare const startStewardship_2: (tx: DataStore, type: ContentType, documentId: string, place: Place_2, tenantId: unknown, now?: Date) => Promise<void>;
3650
5536
 
5537
+ /** Effect form of {@link startWorkflow}. */
5538
+ export declare const startWorkflow: (...args: Parameters<typeof startWorkflow_2>) => Effect<{
5539
+ readonly id: string;
5540
+ readonly revisionId: string;
5541
+ }, ContentNotFound, never>;
5542
+
5543
+ /** Start a review of the revision the draft shows now; an open instance of an earlier revision is superseded. */
5544
+ declare const startWorkflow_2: (tx: DataStore, type: ContentType, workflow: ReviewWorkflow, variantId: string, scope: CmsScope, options: {
5545
+ readonly actorId: string;
5546
+ }, now?: Date) => Promise<{
5547
+ readonly id: string;
5548
+ readonly revisionId: string;
5549
+ }>;
5550
+
5551
+ export declare type StepRefusal = 'notFound' | 'closed' | 'revisionMoved' | 'unknownStep' | 'notApplicable' | 'waiting' | 'decided' | 'selfApproval' | 'notAllowed' | 'noEvidence' | 'noNote';
5552
+
5553
+ /** One step as it applied to the revision an instance is about — the review snapshot. */
5554
+ export declare interface StepSnapshot {
5555
+ readonly id: string;
5556
+ readonly label: string;
5557
+ readonly approverScope: string;
5558
+ readonly after: ReadonlyArray<string>;
5559
+ readonly applies: boolean;
5560
+ readonly slaHours: number | null;
5561
+ readonly evidence: boolean;
5562
+ }
5563
+
5564
+ export declare interface StepState extends StepSnapshot {
5565
+ readonly status: StepStatus;
5566
+ /** When the step opened (its predecessors approved, or the request), null while waiting. */
5567
+ readonly openedAt: Date | null;
5568
+ readonly dueAt: Date | null;
5569
+ readonly overdue: boolean;
5570
+ readonly delegateTo: string | null;
5571
+ readonly decidedBy: string | null;
5572
+ readonly evidenceGiven: string | null;
5573
+ }
5574
+
5575
+ export declare type StepStatus = 'notApplicable' | 'waiting' | 'open' | 'approved' | 'changesRequested';
5576
+
3651
5577
  export declare interface Stewardship {
3652
5578
  readonly owner: string | null;
3653
5579
  readonly reviewDue: Date | null;
@@ -3669,6 +5595,29 @@ export declare const stopExperiment: (...args: Parameters<typeof stopExperiment_
3669
5595
  /** Stop a running experiment; its counts stay. False when there is none of that id running. */
3670
5596
  declare const stopExperiment_2: (tx: DataStore, experimentId: string, now?: Date) => Promise<boolean>;
3671
5597
 
5598
+ /** Effect form of {@link suggestOnStep}. */
5599
+ export declare const suggestOnStep: (...args: Parameters<typeof suggestOnStep_2>) => Effect<{
5600
+ readonly ok: true;
5601
+ } | {
5602
+ readonly ok: false;
5603
+ readonly reason: StepRefusal;
5604
+ }, never, never>;
5605
+
5606
+ /**
5607
+ * Record a suggested change on an open step — the change itself is a
5608
+ * candidate the author adopts or leaves (`proposeCandidate` with
5609
+ * `suggestedBy`). Whoever may decide the step may suggest; the step stays open.
5610
+ */
5611
+ declare const suggestOnStep_2: (tx: DataStore, instanceId: string, stepId: string, decider: Decider, input: {
5612
+ readonly candidateId: string;
5613
+ readonly note?: string;
5614
+ }, now?: Date) => Promise<{
5615
+ readonly ok: true;
5616
+ } | {
5617
+ readonly ok: false;
5618
+ readonly reason: StepRefusal;
5619
+ }>;
5620
+
3672
5621
  /** A type's taxonomy — see `ContentTypeSpec.taxonomy`. */
3673
5622
  export declare interface TaxonomyConfig {
3674
5623
  /** A declared `Schema.Array(Schema.String)` field. */
@@ -3729,6 +5678,8 @@ export declare interface TemplatesConfig {
3729
5678
  readonly field: string;
3730
5679
  /** The `Schema.Components` field the rules apply to. */
3731
5680
  readonly components: string;
5681
+ /** The component prop that holds a placement's width (`widths`); default `width`. */
5682
+ readonly width?: string;
3732
5683
  readonly list: ReadonlyArray<PageTemplate>;
3733
5684
  }
3734
5685
 
@@ -3745,6 +5696,9 @@ export declare const templateViolations: (type: Typed, row: Readonly<Record<stri
3745
5696
  /** The entries whose term `text` (in the source language) contains. */
3746
5697
  export declare const termsIn: (text: string, entries: ReadonlyArray<GlossaryEntry>) => ReadonlyArray<GlossaryEntry>;
3747
5698
 
5699
+ /** The current selection inside a text surface, as character offsets into its text — what a selection intent's `selection` is made of; null when it is elsewhere. */
5700
+ export declare const textSelectionIn: (root: HTMLElement) => [number, number] | null;
5701
+
3748
5702
  /**
3749
5703
  * Put `mark` on the text in `[start, end)`, or take it off when all of it
3750
5704
  * already carries it. Text runs are split at the edges; a link is left as it
@@ -3762,6 +5716,38 @@ export declare interface ToolExposure {
3762
5716
  /** An XLIFF 2.1 core document for one file. */
3763
5717
  export declare const toXliff: (exchange: XliffExchange) => string;
3764
5718
 
5719
+ /** `edited` (a copy of `base` someone changed) as suggestions inside `base`. */
5720
+ export declare const trackChanges: (base: RichDocument, edited: RichDocument, author: ChangeAuthor) => TrackedChanges;
5721
+
5722
+ /** The document with the edit suggested, and the blocks it could not suggest over (they hold others' suggestions). */
5723
+ export declare interface TrackedChanges {
5724
+ readonly document: RichDocument;
5725
+ readonly conflicts: ReadonlyArray<string>;
5726
+ }
5727
+
5728
+ /** One run with the edit from `base` to `edited` suggested: the changed middle as a deletion and an insertion. */
5729
+ export declare const trackInline: (base: ReadonlyArray<RichInline>, edited: ReadonlyArray<RichInline>, author: ChangeAuthor) => ReadonlyArray<RichInline>;
5730
+
5731
+ /**
5732
+ * What an exchange does not carry, so the export can say so instead of
5733
+ * losing it silently:
5734
+ *
5735
+ * - `suggestedChange`: a block holds suggested changes (track changes). Its
5736
+ * text goes out as written, insertions and deletions alike, and a
5737
+ * translation coming back has no suggestion marks — decide them first.
5738
+ * - `unknownComponent`: a component whose definition the field no longer
5739
+ * declares; its text is not exported and stays as it is.
5740
+ */
5741
+ export declare interface TranslationLoss {
5742
+ /** Where: `body/<blockId>`, `sections/<instanceId>`, or deeper inside a component. */
5743
+ readonly id: string;
5744
+ /** Suggested changes flattened into the text, or a component's text left out. */
5745
+ readonly kind: 'suggestedChange' | 'unknownComponent';
5746
+ }
5747
+
5748
+ /** What exporting these values as translation units leaves out or flattens, in field order. */
5749
+ export declare const translationLosses: (fields: Readonly<Record<string, FieldSchema>>, values: Readonly<Record<string, unknown>>, prefix?: string) => ReadonlyArray<TranslationLoss>;
5750
+
3765
5751
  /** Where one language stands against the source. */
3766
5752
  export declare interface TranslationState {
3767
5753
  readonly locale: string;
@@ -3869,6 +5855,9 @@ export declare interface TreeOptions {
3869
5855
  readonly filter?: Readonly<Record<string, unknown>>;
3870
5856
  }
3871
5857
 
5858
+ /** Looks up a name's TXT records (`node:dns/promises` `resolveTxt`, joined per record). */
5859
+ export declare type TxtResolver = (name: string) => Promise<ReadonlyArray<string>>;
5860
+
3872
5861
  declare type Typed = {
3873
5862
  readonly name: string;
3874
5863
  readonly fields: Readonly<Record<string, FieldSchema>>;
@@ -3894,10 +5883,10 @@ export declare const unavailableAmong: (...args: Parameters<typeof unavailableAm
3894
5883
  * A document without a record (a type without availability, not published
3895
5884
  * yet) is not listed.
3896
5885
  */
3897
- declare const unavailableAmong_2: (store: DataStore, documentIds: ReadonlyArray<string>, scope: Pick<CmsScope, "site" | "environment">, now?: Date) => Promise<ReadonlyMap<string, UnavailableReason>>;
5886
+ declare const unavailableAmong_2: (store: DataStore, documentIds: ReadonlyArray<string>, scope: Pick<CmsScope, "site" | "environment">, now?: Date, use?: AvailabilityUse) => Promise<ReadonlyMap<string, UnavailableReason>>;
3898
5887
 
3899
5888
  /** Why a referenced document may not be used. */
3900
- export declare type UnavailableReason = 'blocked' | 'expired';
5889
+ export declare type UnavailableReason = 'blocked' | 'expired' | 'notYet' | 'territory' | 'channel' | 'purpose';
3901
5890
 
3902
5891
  /** Undo the last step: the form to show, and the history after it; null when there is nothing to undo. */
3903
5892
  export declare const undoEdit: (history: EditHistory, current: Readonly<Record<string, unknown>>) => {
@@ -3906,6 +5895,12 @@ export declare const undoEdit: (history: EditHistory, current: Readonly<Record<s
3906
5895
  readonly label: string;
3907
5896
  } | null;
3908
5897
 
5898
+ /** Effect form of {@link unfinishedBulkRuns}. */
5899
+ export declare const unfinishedBulkRuns: (...args: Parameters<typeof unfinishedBulkRuns_2>) => Effect<readonly string[], never, never>;
5900
+
5901
+ /** The runs still going, oldest first — for a schedule that continues them. */
5902
+ declare const unfinishedBulkRuns_2: (store: DataStore) => Promise<ReadonlyArray<string>>;
5903
+
3909
5904
  /** Effect form of {@link uninstallExtension}. */
3910
5905
  export declare const uninstallExtension: (...args: Parameters<typeof uninstallExtension_2>) => Effect<ExtensionRemoval, never, never>;
3911
5906
 
@@ -3999,6 +5994,21 @@ export declare interface VariantResult {
3999
5994
  readonly rate: number;
4000
5995
  }
4001
5996
 
5997
+ /** Effect form of {@link verifyDomain}. */
5998
+ export declare const verifyDomain: (...args: Parameters<typeof verifyDomain_2>) => Effect<VerifyDomainResult, never, never>;
5999
+
6000
+ /** 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>;
6002
+
6003
+ export declare type VerifyDomainResult = {
6004
+ readonly ok: true;
6005
+ readonly domain: SiteDomain;
6006
+ } | {
6007
+ readonly ok: false;
6008
+ readonly reason: 'notFound' | 'recordMissing';
6009
+ readonly found?: ReadonlyArray<string>;
6010
+ };
6011
+
4002
6012
  /**
4003
6013
  * Verify a preview token. Returns the `{ type, id }` claim on success,
4004
6014
  * `null` on any failure (malformed, signature mismatch, expired). Never
@@ -4053,8 +6063,23 @@ export declare interface WidgetProps {
4053
6063
  readonly field: FieldSchema;
4054
6064
  readonly value: unknown;
4055
6065
  readonly onChange: (value: unknown) => void;
6066
+ /**
6067
+ * Where the value lives: the field, and for a prop of a placed component
6068
+ * its instance and prop — what a picker hands to a selection intent.
6069
+ */
6070
+ readonly target?: WidgetTarget;
6071
+ }
6072
+
6073
+ /** Where a widget's value lives (a `SelectionTarget`'s `field`, `instanceId`, `prop`). */
6074
+ declare interface WidgetTarget {
6075
+ readonly field: string;
6076
+ readonly instanceId?: string;
6077
+ readonly prop?: string;
4056
6078
  }
4057
6079
 
6080
+ /** A block with its text replaced by `text` in its markup (the inverse of `blockMarkup`); `styles` are the names `{name|…}` may use. */
6081
+ export declare const withBlockMarkup: (block: RichBlock, text: string, styles?: ReadonlyArray<string>) => RichBlock;
6082
+
4058
6083
  /** Effect form of {@link withdrawInvitation}. */
4059
6084
  export declare const withdrawInvitation: (...args: Parameters<typeof withdrawInvitation_2>) => Effect<boolean, never, never>;
4060
6085
 
@@ -4069,6 +6094,77 @@ export declare interface WithheldInstance {
4069
6094
  readonly props: Readonly<Record<string, never>>;
4070
6095
  }
4071
6096
 
6097
+ /**
6098
+ * The values with the reference at `path` (as `referencesOf` reports it)
6099
+ * pointing at `to`: a reference field holds the id itself, a rich-text link
6100
+ * its `target`, a rich-text image block its `asset`. Returns null when the
6101
+ * path leads nowhere — the values changed since the path was read.
6102
+ */
6103
+ export declare const withReferenceAt: (values: Readonly<Record<string, unknown>>, path: string, to: string) => Record<string, unknown> | null;
6104
+
6105
+ /**
6106
+ * The rich texts of `form` with each shared block's text taken from `texts`
6107
+ * (key → merged markup). A block the editor changed in the form before its
6108
+ * shared text reached them keeps the form's text while nobody typed into it or
6109
+ * saved it since `seen` — those come back in `typedBefore`, for the save to
6110
+ * write into their texts.
6111
+ */
6112
+ export declare const withSharedBlocks: (type: ContentType, form: Readonly<Record<string, unknown>>, texts: ReadonlyMap<string, string>, context?: {
6113
+ readonly current?: Readonly<Record<string, unknown>> | undefined;
6114
+ readonly seen?: Readonly<Record<string, unknown>> | undefined;
6115
+ }) => {
6116
+ readonly values: Readonly<Record<string, unknown>>;
6117
+ readonly typedBefore: ReadonlyArray<{
6118
+ readonly key: string;
6119
+ readonly markup: string;
6120
+ }>;
6121
+ };
6122
+
6123
+ export declare interface WorkflowInstance {
6124
+ readonly id: string;
6125
+ readonly contentType: string;
6126
+ readonly variantId: string;
6127
+ readonly revisionId: string;
6128
+ readonly workflowId: string;
6129
+ readonly workflowVersion: number;
6130
+ readonly status: 'open' | 'approved' | 'changesRequested' | 'superseded';
6131
+ readonly requestedBy: string;
6132
+ readonly requestedAt: Date;
6133
+ readonly steps: ReadonlyArray<StepState>;
6134
+ readonly decisions: ReadonlyArray<{
6135
+ readonly stepId: string;
6136
+ readonly action: string;
6137
+ readonly actorId: string;
6138
+ readonly delegateTo: string | null;
6139
+ readonly candidateId: string | null;
6140
+ readonly evidence: string | null;
6141
+ readonly note: string | null;
6142
+ readonly decidedAt: Date;
6143
+ }>;
6144
+ }
6145
+
6146
+ /** Effect form of {@link workflowState}. */
6147
+ export declare const workflowState: (...args: Parameters<typeof workflowState_2>) => Effect<WorkflowInstance | null, never, never>;
6148
+
6149
+ /** One instance with its steps and decisions, or null. */
6150
+ declare const workflowState_2: (store: DataStore, instanceId: string, now?: Date) => Promise<WorkflowInstance | null>;
6151
+
6152
+ export declare interface WorkflowStep {
6153
+ /** camelCase, unique within the workflow. */
6154
+ readonly id: string;
6155
+ readonly label: string;
6156
+ /** The scope a person needs to decide this step (a delegate decides without it). */
6157
+ readonly approverScope: string;
6158
+ /** Steps that must be approved before this one opens. */
6159
+ readonly after?: ReadonlyArray<string>;
6160
+ /** The step applies only when this holds for the revision's values. */
6161
+ readonly when?: (values: Readonly<Record<string, unknown>>) => boolean;
6162
+ /** Hours the step may stay open once it is open; later it is overdue. */
6163
+ readonly slaHours?: number;
6164
+ /** Approving needs evidence: a link or a note saying what was checked. */
6165
+ readonly evidence?: boolean;
6166
+ }
6167
+
4072
6168
  /** Effect form of {@link workspaceReviewTypes}. */
4073
6169
  export declare const workspaceReviewTypes: (...args: Parameters<typeof workspaceReviewTypes_2>) => Effect<readonly string[], never, never>;
4074
6170