@voltro/cms 0.84.0 → 0.85.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +549 -0
- package/THIRD-PARTY-NOTICES.md +71 -525
- package/dist/index.d.ts +2258 -166
- package/dist/index.js +3789 -1654
- package/dist/presenceAnchors-4iHAVQB3.js +4367 -0
- package/dist/web.d.ts +927 -131
- package/dist/web.js +2 -2
- package/package.json +6 -6
- 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
|
-
/**
|
|
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
|
-
|
|
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. */
|
|
@@ -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
|
|
|
@@ -690,6 +995,8 @@ export declare interface CmsScope {
|
|
|
690
995
|
|
|
691
996
|
export declare const cmsSearchTable: TableLike;
|
|
692
997
|
|
|
998
|
+
export declare const cmsSiteDomainsTable: TableLike;
|
|
999
|
+
|
|
693
1000
|
export declare const cmsStewardshipTable: TableLike;
|
|
694
1001
|
|
|
695
1002
|
/** Who is invited with which role. */
|
|
@@ -709,6 +1016,10 @@ export declare interface CmsTree {
|
|
|
709
1016
|
readonly orphans: ReadonlyArray<string>;
|
|
710
1017
|
}
|
|
711
1018
|
|
|
1019
|
+
export declare const cmsWorkflowDecisionsTable: TableLike;
|
|
1020
|
+
|
|
1021
|
+
export declare const cmsWorkflowInstancesTable: TableLike;
|
|
1022
|
+
|
|
712
1023
|
/** Everything the write pipeline can fail with on the typed channel. */
|
|
713
1024
|
export declare type CmsWriteError = ContentValidationFailed | ContentNotFound | ContentIdConflict | RevisionMismatch;
|
|
714
1025
|
|
|
@@ -719,6 +1030,30 @@ export declare type CmsWriteError = ContentValidationFailed | ContentNotFound |
|
|
|
719
1030
|
*/
|
|
720
1031
|
export declare const collaborativeFields: (type: ContentType) => ReadonlyArray<string>;
|
|
721
1032
|
|
|
1033
|
+
export declare interface Collection {
|
|
1034
|
+
readonly id: string;
|
|
1035
|
+
readonly name: string;
|
|
1036
|
+
readonly description: string | null;
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
export declare interface CollectionItem {
|
|
1040
|
+
readonly contentType: string;
|
|
1041
|
+
readonly documentId: string;
|
|
1042
|
+
readonly position: number;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
/** Effect form of {@link collectionItems}. */
|
|
1046
|
+
export declare const collectionItems: (...args: Parameters<typeof collectionItems_2>) => Effect<readonly CollectionItem[], never, never>;
|
|
1047
|
+
|
|
1048
|
+
/** A collection's documents, in order. */
|
|
1049
|
+
declare const collectionItems_2: (store: DataStore, collectionId: string, crossTenant?: boolean) => Promise<ReadonlyArray<CollectionItem>>;
|
|
1050
|
+
|
|
1051
|
+
/** Effect form of {@link collectionPortals}. */
|
|
1052
|
+
export declare const collectionPortals: (...args: Parameters<typeof collectionPortals_2>) => Effect<readonly Portal[], never, never>;
|
|
1053
|
+
|
|
1054
|
+
/** A collection's portals, newest first. */
|
|
1055
|
+
declare const collectionPortals_2: (store: DataStore, collectionId: string) => Promise<ReadonlyArray<Portal>>;
|
|
1056
|
+
|
|
722
1057
|
/** Effect form of {@link compareEnvironments}. */
|
|
723
1058
|
export declare const compareEnvironments: (...args: Parameters<typeof compareEnvironments_2>) => Effect<readonly EnvironmentDifference[], never, never>;
|
|
724
1059
|
|
|
@@ -728,6 +1063,19 @@ declare const compareEnvironments_2: (store: DataStore, types: ReadonlyArray<Con
|
|
|
728
1063
|
/** Order of two `major.minor.patch` versions: negative, 0 or positive. */
|
|
729
1064
|
export declare const compareVersions: (a: string, b: string) => number;
|
|
730
1065
|
|
|
1066
|
+
/**
|
|
1067
|
+
* The identity of `request` under `contract` at publication `checkpoint` (a
|
|
1068
|
+
* release or publication id), with the document tags its response depends on.
|
|
1069
|
+
*/
|
|
1070
|
+
export declare const compileCacheIdentity: (contract: CacheContract, request: CacheRequest, context: {
|
|
1071
|
+
readonly checkpoint: string;
|
|
1072
|
+
readonly tags?: ReadonlyArray<string>;
|
|
1073
|
+
}) => CacheIdentity;
|
|
1074
|
+
|
|
1075
|
+
declare type ComponentBlock = Extract<RichBlock, {
|
|
1076
|
+
readonly type: 'component';
|
|
1077
|
+
}>;
|
|
1078
|
+
|
|
731
1079
|
/**
|
|
732
1080
|
* A component editors compose pages from (ADR-CMS-015): a stable `id`, a
|
|
733
1081
|
* display name and typed props. The frontend renders it; the CMS validates
|
|
@@ -739,10 +1087,29 @@ export declare interface ComponentDefinition {
|
|
|
739
1087
|
readonly displayName: string;
|
|
740
1088
|
readonly props: Readonly<Record<string, FieldSchema>>;
|
|
741
1089
|
readonly fingerprint: string;
|
|
1090
|
+
/** What it is for, in an editor's words — searched by the picker. */
|
|
1091
|
+
readonly description?: string;
|
|
1092
|
+
/** The editorial jobs it serves (`'announce an event'`, `'collect leads'`) — the picker groups and searches by them. */
|
|
1093
|
+
readonly jobs?: ReadonlyArray<string>;
|
|
1094
|
+
/** Named presets an editor starts from (`dark`, `compact`): props that differ from empty. */
|
|
1095
|
+
readonly variants?: Readonly<Record<string, Readonly<Record<string, unknown>>>>;
|
|
1096
|
+
/** Example props — previews, galleries and tests render them; checked against `props` when a content type uses the component. */
|
|
1097
|
+
readonly fixtures?: Readonly<Record<string, Readonly<Record<string, unknown>>>>;
|
|
1098
|
+
/** Upgrades of instances saved against an earlier definition: its fingerprint → the props it becomes now. */
|
|
1099
|
+
readonly migrations?: Readonly<Record<string, (props: Readonly<Record<string, unknown>>) => Readonly<Record<string, unknown>>>>;
|
|
742
1100
|
/** The consent purpose a reader must grant before this component's props reach them (`gateConsent`). */
|
|
743
1101
|
readonly consent?: string;
|
|
744
1102
|
}
|
|
745
1103
|
|
|
1104
|
+
/** A component's fixtures and variants against its props: every violation, with the fixture or variant it is in. */
|
|
1105
|
+
export declare const componentExampleViolations: (definition: ComponentDefinition) => ReadonlyArray<FieldViolation>;
|
|
1106
|
+
|
|
1107
|
+
/** The fingerprint a component with these props has — to key a migration from an earlier definition. */
|
|
1108
|
+
export declare const componentFingerprint: (spec: {
|
|
1109
|
+
readonly id: string;
|
|
1110
|
+
readonly props: Readonly<Record<string, FieldSchema | PipeableField>>;
|
|
1111
|
+
}) => string;
|
|
1112
|
+
|
|
746
1113
|
/** One placed component in a `components` field, as stored. */
|
|
747
1114
|
export declare interface ComponentInstance {
|
|
748
1115
|
/** Stable across saves, reorders and translations of the same placement. */
|
|
@@ -753,9 +1120,29 @@ export declare interface ComponentInstance {
|
|
|
753
1120
|
readonly props: Readonly<Record<string, unknown>>;
|
|
754
1121
|
}
|
|
755
1122
|
|
|
1123
|
+
/** Every component placed in the values, nested ones included. */
|
|
1124
|
+
export declare const componentsOf: (type: ContentType, values: Readonly<Record<string, unknown>>) => ReadonlyArray<ComponentUse>;
|
|
1125
|
+
|
|
1126
|
+
/** A component placed in the document — a design-system node of the graph. */
|
|
1127
|
+
export declare interface ComponentUse {
|
|
1128
|
+
readonly path: string;
|
|
1129
|
+
readonly componentId: string;
|
|
1130
|
+
}
|
|
1131
|
+
|
|
756
1132
|
/** A reader's choices: purpose id → the version they allowed. */
|
|
757
1133
|
export declare type ConsentChoices = Readonly<Record<string, number>>;
|
|
758
1134
|
|
|
1135
|
+
/**
|
|
1136
|
+
* The same decision as {@link gateConsent}, for the browser to enforce: a
|
|
1137
|
+
* Content-Security-Policy whose `frame-src` lets in only this origin and the
|
|
1138
|
+
* vendors the reader granted. Set it on the response (a web middleware) and
|
|
1139
|
+
* an embed the reader refused cannot load even if one slipped into the page.
|
|
1140
|
+
*/
|
|
1141
|
+
export declare const consentContentSecurityPolicy: (purposes: ReadonlyArray<ConsentPurpose>, choices: ConsentChoices, base?: string) => string;
|
|
1142
|
+
|
|
1143
|
+
/** The origins of the vendors whose purpose the reader granted in its current version. */
|
|
1144
|
+
export declare const consentedOrigins: (purposes: ReadonlyArray<ConsentPurpose>, choices: ConsentChoices) => ReadonlyArray<string>;
|
|
1145
|
+
|
|
759
1146
|
/** Something a reader can allow or refuse. */
|
|
760
1147
|
export declare interface ConsentPurpose {
|
|
761
1148
|
readonly id: string;
|
|
@@ -763,6 +1150,8 @@ export declare interface ConsentPurpose {
|
|
|
763
1150
|
readonly version: number;
|
|
764
1151
|
readonly displayName: string;
|
|
765
1152
|
readonly description: string;
|
|
1153
|
+
/** The third parties it lets in (none for a first-party purpose). */
|
|
1154
|
+
readonly vendors?: ReadonlyArray<ConsentVendor>;
|
|
766
1155
|
}
|
|
767
1156
|
|
|
768
1157
|
/** Effect form of {@link consentToUpgrade}. */
|
|
@@ -771,6 +1160,27 @@ export declare const consentToUpgrade: (...args: Parameters<typeof consentToUpgr
|
|
|
771
1160
|
/** Consent to what the waiting version adds, and move to it. */
|
|
772
1161
|
declare const consentToUpgrade_2: (tx: DataStore, extensionId: string, consent: ReadonlyArray<ExtensionCapability>) => Promise<ExtensionChange>;
|
|
773
1162
|
|
|
1163
|
+
/**
|
|
1164
|
+
* A third party a purpose lets in — kept apart from the purpose itself: who
|
|
1165
|
+
* it is, where its content comes from (the origins a page may then load), what
|
|
1166
|
+
* it stores on the reader's device, and what it does with the data.
|
|
1167
|
+
*/
|
|
1168
|
+
export declare interface ConsentVendor {
|
|
1169
|
+
/** camelCase, unique within the purpose — what a reader-facing text is keyed by. */
|
|
1170
|
+
readonly id: string;
|
|
1171
|
+
readonly name: string;
|
|
1172
|
+
/** `https://host` origins, exactly — the browser loads frames from them once the purpose is granted. */
|
|
1173
|
+
readonly origins: ReadonlyArray<string>;
|
|
1174
|
+
readonly storage: string;
|
|
1175
|
+
readonly dataUse: string;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
/** The `href` of a one-off contact: `mailto:` an address, `tel:` a number without its spacing. */
|
|
1179
|
+
export declare const contactLiteralHref: (channel: "email" | "phone", value: string) => string;
|
|
1180
|
+
|
|
1181
|
+
/** Why `value` is not a usable one-off e-mail address or phone number, or null when it is. */
|
|
1182
|
+
export declare const contactLiteralProblem: (channel: "email" | "phone", value: string) => string | null;
|
|
1183
|
+
|
|
774
1184
|
export declare const CONTENT_FORM_STRINGS: ContentFormStrings;
|
|
775
1185
|
|
|
776
1186
|
/** The lifecycle states a content row moves through. */
|
|
@@ -829,6 +1239,11 @@ export declare interface ContentFormProps {
|
|
|
829
1239
|
readonly strings?: ContentFormStringsInput;
|
|
830
1240
|
/** How rich text's paragraphs and headings are edited — see `RichDocumentEditorProps.surface`. */
|
|
831
1241
|
readonly richTextSurface?: 'markup' | 'visual';
|
|
1242
|
+
/**
|
|
1243
|
+
* Where each field's value lives, for its widget's `target`; by default the
|
|
1244
|
+
* field itself. A placed component's props form names its instance and prop.
|
|
1245
|
+
*/
|
|
1246
|
+
readonly widgetTarget?: (name: string) => WidgetTarget;
|
|
832
1247
|
}
|
|
833
1248
|
|
|
834
1249
|
export declare interface ContentFormStrings {
|
|
@@ -844,6 +1259,11 @@ export declare interface ContentFormStrings {
|
|
|
844
1259
|
readonly add: string;
|
|
845
1260
|
readonly addBlock: string;
|
|
846
1261
|
readonly addComponent: string;
|
|
1262
|
+
/** The search above the component picker. */
|
|
1263
|
+
readonly findComponent: string;
|
|
1264
|
+
readonly noComponentFound: string;
|
|
1265
|
+
/** The group of components that name no job. */
|
|
1266
|
+
readonly otherComponents: string;
|
|
847
1267
|
readonly unknownComponent: (componentId: string) => string;
|
|
848
1268
|
readonly level: string;
|
|
849
1269
|
readonly numbered: string;
|
|
@@ -851,6 +1271,10 @@ export declare interface ContentFormStrings {
|
|
|
851
1271
|
readonly numberedAt: (depth: number) => string;
|
|
852
1272
|
readonly headerRow: string;
|
|
853
1273
|
readonly image: string;
|
|
1274
|
+
/** The label of a download block's file. */
|
|
1275
|
+
readonly file: string;
|
|
1276
|
+
/** The label of the text a download block's link shows. */
|
|
1277
|
+
readonly fileLabel: string;
|
|
854
1278
|
readonly caption: string;
|
|
855
1279
|
readonly text: string;
|
|
856
1280
|
readonly listItems: string;
|
|
@@ -866,6 +1290,27 @@ export declare interface ContentFormStrings {
|
|
|
866
1290
|
readonly bold: string;
|
|
867
1291
|
readonly italic: string;
|
|
868
1292
|
readonly underline: string;
|
|
1293
|
+
/** A block's or a selection's named style (a rich-text profile's styles). */
|
|
1294
|
+
readonly style: string;
|
|
1295
|
+
readonly noStyle: string;
|
|
1296
|
+
/** Which component a component block places. */
|
|
1297
|
+
readonly component: string;
|
|
1298
|
+
/** The contact inserter: a published contact point, or a one-off address or number. */
|
|
1299
|
+
readonly contactKind: string;
|
|
1300
|
+
readonly contactPoint: string;
|
|
1301
|
+
readonly contactEmail: string;
|
|
1302
|
+
readonly contactPhone: string;
|
|
1303
|
+
readonly contactValue: string;
|
|
1304
|
+
readonly contactText: string;
|
|
1305
|
+
readonly insertContact: string;
|
|
1306
|
+
/** Above a block holding suggested changes; it is edited again once they are decided. */
|
|
1307
|
+
readonly suggestedChanges: string;
|
|
1308
|
+
/** One suggestion: who made it, what it puts in and takes out. */
|
|
1309
|
+
readonly changeBy: (by: string, inserted: string, deleted: string) => string;
|
|
1310
|
+
readonly accept: string;
|
|
1311
|
+
readonly reject: string;
|
|
1312
|
+
readonly acceptLabel: (by: string) => string;
|
|
1313
|
+
readonly rejectLabel: (by: string) => string;
|
|
869
1314
|
}
|
|
870
1315
|
|
|
871
1316
|
/** The defaults with an app's words over them. */
|
|
@@ -921,13 +1366,11 @@ export declare interface ContentfulNode {
|
|
|
921
1366
|
export declare class ContentGone extends ContentGone_base {
|
|
922
1367
|
}
|
|
923
1368
|
|
|
924
|
-
declare const ContentGone_base: Schema_2.
|
|
925
|
-
readonly
|
|
926
|
-
} & {
|
|
927
|
-
contentType: typeof Schema_2.String;
|
|
1369
|
+
declare const ContentGone_base: Schema_2.Class<ContentGone, Schema_2.TaggedStruct<"ContentGone", {
|
|
1370
|
+
readonly contentType: Schema_2.String;
|
|
928
1371
|
/** The address asked for. */
|
|
929
|
-
path:
|
|
930
|
-
}>;
|
|
1372
|
+
readonly path: Schema_2.String;
|
|
1373
|
+
}>, YieldableError>;
|
|
931
1374
|
|
|
932
1375
|
/** Effect form of {@link contentHealth}. */
|
|
933
1376
|
export declare const contentHealth: (...args: Parameters<typeof contentHealth_2>) => Effect<readonly HealthFinding[], never, never>;
|
|
@@ -951,12 +1394,10 @@ declare const contentHealth_2: (store: DataStore, types: ReadonlyArray<ContentTy
|
|
|
951
1394
|
export declare class ContentIdConflict extends ContentIdConflict_base {
|
|
952
1395
|
}
|
|
953
1396
|
|
|
954
|
-
declare const ContentIdConflict_base: Schema_2.
|
|
955
|
-
readonly
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
id: typeof Schema_2.String;
|
|
959
|
-
}>;
|
|
1397
|
+
declare const ContentIdConflict_base: Schema_2.Class<ContentIdConflict, Schema_2.TaggedStruct<"ContentIdConflict", {
|
|
1398
|
+
readonly contentType: Schema_2.String;
|
|
1399
|
+
readonly id: Schema_2.String;
|
|
1400
|
+
}>, YieldableError>;
|
|
960
1401
|
|
|
961
1402
|
/**
|
|
962
1403
|
* Raised by `publish` / `unpublish` / `archive` when the row id doesn't
|
|
@@ -967,16 +1408,14 @@ declare const ContentIdConflict_base: Schema_2.TaggedErrorClass<ContentIdConflic
|
|
|
967
1408
|
export declare class ContentNotFound extends ContentNotFound_base {
|
|
968
1409
|
}
|
|
969
1410
|
|
|
970
|
-
declare const ContentNotFound_base: Schema_2.
|
|
971
|
-
readonly
|
|
972
|
-
|
|
973
|
-
contentType: typeof Schema_2.String;
|
|
974
|
-
id: typeof Schema_2.String;
|
|
1411
|
+
declare const ContentNotFound_base: Schema_2.Class<ContentNotFound, Schema_2.TaggedStruct<"ContentNotFound", {
|
|
1412
|
+
readonly contentType: Schema_2.String;
|
|
1413
|
+
readonly id: Schema_2.String;
|
|
975
1414
|
/** Which lifecycle table the id was looked up in (`revision`: the
|
|
976
1415
|
* revision to publish is not one of this variant's; `share`: a preview
|
|
977
1416
|
* share of the caller's). */
|
|
978
|
-
stage: Schema_2.
|
|
979
|
-
}>;
|
|
1417
|
+
readonly stage: Schema_2.Literals<readonly ["draft", "published", "revision", "share"]>;
|
|
1418
|
+
}>, YieldableError>;
|
|
980
1419
|
|
|
981
1420
|
/** A chainable read over one content type's published rows. */
|
|
982
1421
|
export declare interface ContentQuery {
|
|
@@ -1021,6 +1460,7 @@ export declare interface ContentType {
|
|
|
1021
1460
|
/** Whether publishing needs an approved revision — see `ContentTypeSpec.review`. */
|
|
1022
1461
|
readonly review?: {
|
|
1023
1462
|
readonly required: boolean | 'workspace';
|
|
1463
|
+
readonly workflow?: ReviewWorkflow;
|
|
1024
1464
|
};
|
|
1025
1465
|
/** When documents may be used — see `ContentTypeSpec.availability`. */
|
|
1026
1466
|
readonly availability?: AvailabilityConfig;
|
|
@@ -1070,10 +1510,15 @@ export declare interface ContentTypeSpec {
|
|
|
1070
1510
|
* (`approveReview`) — for every path that publishes: single, release,
|
|
1071
1511
|
* rollback, schedule. Register `cmsReviewsTable` when set. `'workspace'`:
|
|
1072
1512
|
* each workspace decides (team.ts `setReviewRequired`, or a blueprint's
|
|
1073
|
-
* `team.reviewRequired`) — register `cmsTeamTable` too.
|
|
1513
|
+
* `team.reviewRequired`) — register `cmsTeamTable` too. With `workflow`
|
|
1514
|
+
* (`defineReviewWorkflow`), the approval is a workflow instance that
|
|
1515
|
+
* approved the exact revision — every applicable step decided — instead of
|
|
1516
|
+
* one approval; register `cmsWorkflowInstancesTable` and
|
|
1517
|
+
* `cmsWorkflowDecisionsTable`.
|
|
1074
1518
|
*/
|
|
1075
1519
|
readonly review?: {
|
|
1076
1520
|
readonly required: boolean | 'workspace';
|
|
1521
|
+
readonly workflow?: ReviewWorkflow;
|
|
1077
1522
|
};
|
|
1078
1523
|
/**
|
|
1079
1524
|
* When this type's documents may be used (`until`: a date/datetime field,
|
|
@@ -1179,16 +1624,14 @@ declare const contentUsage_2: (store: DataStore, types: ReadonlyArray<ContentTyp
|
|
|
1179
1624
|
export declare class ContentValidationFailed extends ContentValidationFailed_base {
|
|
1180
1625
|
}
|
|
1181
1626
|
|
|
1182
|
-
declare const ContentValidationFailed_base: Schema_2.
|
|
1183
|
-
readonly
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
rule: typeof Schema_2.String;
|
|
1189
|
-
message: typeof Schema_2.String;
|
|
1627
|
+
declare const ContentValidationFailed_base: Schema_2.Class<ContentValidationFailed, Schema_2.TaggedStruct<"ContentValidationFailed", {
|
|
1628
|
+
readonly contentType: Schema_2.String;
|
|
1629
|
+
readonly violations: Schema_2.$Array<Schema_2.Struct<{
|
|
1630
|
+
readonly field: Schema_2.String;
|
|
1631
|
+
readonly rule: Schema_2.String;
|
|
1632
|
+
readonly message: Schema_2.String;
|
|
1190
1633
|
}>>;
|
|
1191
|
-
}>;
|
|
1634
|
+
}>, YieldableError>;
|
|
1192
1635
|
|
|
1193
1636
|
export declare type ContentValue = Record<string, unknown>;
|
|
1194
1637
|
|
|
@@ -1212,6 +1655,54 @@ export declare type ContentValue = Record<string, unknown>;
|
|
|
1212
1655
|
*/
|
|
1213
1656
|
export declare const contentViolations: (type: Pick<ContentType, "name" | "fields"> & Partial<Pick<ContentType, "taxonomy">>, row: Readonly<Record<string, unknown>>) => ReadonlyArray<FieldViolation>;
|
|
1214
1657
|
|
|
1658
|
+
/** Effect form of {@link continueBulkRun}. */
|
|
1659
|
+
export declare const continueBulkRun: (...args: Parameters<typeof continueBulkRun_2>) => Effect<BulkRunState | null, never, never>;
|
|
1660
|
+
|
|
1661
|
+
/**
|
|
1662
|
+
* Do the next `limit` items of a run — each in its own transaction, its
|
|
1663
|
+
* result saved before the next starts — and return where the run stands. A
|
|
1664
|
+
* call after an interruption continues at the first item without a result,
|
|
1665
|
+
* so no item runs twice. Hand it a store outside any transaction.
|
|
1666
|
+
*/
|
|
1667
|
+
declare const continueBulkRun_2: (store: DataStore, types: ReadonlyArray<ContentType>, runId: string, limit?: number, now?: Date) => Promise<BulkRunState | null>;
|
|
1668
|
+
|
|
1669
|
+
/** How many variants the contract allows at most (query strings count as unbounded beyond the budget). */
|
|
1670
|
+
export declare const contractVariants: (contract: CacheContract) => number;
|
|
1671
|
+
|
|
1672
|
+
/** Effect form of {@link copiesOf}. */
|
|
1673
|
+
export declare const copiesOf: (...args: Parameters<typeof copiesOf_2>) => Effect<readonly (CopyOrigin & {
|
|
1674
|
+
readonly documentId: string;
|
|
1675
|
+
})[], never, never>;
|
|
1676
|
+
|
|
1677
|
+
/** The independent copies made of a document, oldest first. */
|
|
1678
|
+
declare const copiesOf_2: (store: DataStore, sourceDocumentId: string) => Promise<ReadonlyArray<CopyOrigin & {
|
|
1679
|
+
readonly documentId: string;
|
|
1680
|
+
}>>;
|
|
1681
|
+
|
|
1682
|
+
/** Effect form of {@link copyDocument}. */
|
|
1683
|
+
export declare const copyDocument: (...args: Parameters<typeof copyDocument_2>) => Effect<CopyDocumentResult, ContentValidationFailed | ContentNotFound | ContentIdConflict | RevisionMismatch, never>;
|
|
1684
|
+
|
|
1685
|
+
/**
|
|
1686
|
+
* Copy a document's current draft into a new, independent document in the same
|
|
1687
|
+
* place, in the caller's transaction. The copy is titled `title` — or the
|
|
1688
|
+
* source's title with “(copy)”, numbered from the second copy — and records
|
|
1689
|
+
* the source and the revision it was made from.
|
|
1690
|
+
*/
|
|
1691
|
+
declare const copyDocument_2: (tx: DataStore, type: ContentType, sourceDocumentId: string, scope: CmsScope, input?: {
|
|
1692
|
+
readonly title?: string;
|
|
1693
|
+
readonly actorId?: string | null;
|
|
1694
|
+
}, now?: Date) => Promise<CopyDocumentResult>;
|
|
1695
|
+
|
|
1696
|
+
export declare type CopyDocumentResult = {
|
|
1697
|
+
readonly ok: true;
|
|
1698
|
+
readonly id: string;
|
|
1699
|
+
readonly documentId: string;
|
|
1700
|
+
readonly revisionId: string;
|
|
1701
|
+
} | {
|
|
1702
|
+
readonly ok: false;
|
|
1703
|
+
readonly reason: 'notFound';
|
|
1704
|
+
};
|
|
1705
|
+
|
|
1215
1706
|
/** Effect form of {@link copyEnvironment}. */
|
|
1216
1707
|
export declare const copyEnvironment: (...args: Parameters<typeof copyEnvironment_2>) => Effect<CopyEnvironmentResult, never, never>;
|
|
1217
1708
|
|
|
@@ -1232,6 +1723,19 @@ export declare type CopyEnvironmentResult = {
|
|
|
1232
1723
|
readonly variants: number;
|
|
1233
1724
|
};
|
|
1234
1725
|
|
|
1726
|
+
export declare interface CopyOrigin {
|
|
1727
|
+
readonly sourceDocumentId: string;
|
|
1728
|
+
readonly sourceRevisionId: string | null;
|
|
1729
|
+
readonly copiedBy: string | null;
|
|
1730
|
+
readonly copiedAt: Date;
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
/** Effect form of {@link copyOrigin}. */
|
|
1734
|
+
export declare const copyOrigin: (...args: Parameters<typeof copyOrigin_2>) => Effect<CopyOrigin | null, never, never>;
|
|
1735
|
+
|
|
1736
|
+
/** What a document was copied from, or null when it is an original. */
|
|
1737
|
+
declare const copyOrigin_2: (store: DataStore, documentId: string) => Promise<CopyOrigin | null>;
|
|
1738
|
+
|
|
1235
1739
|
/**
|
|
1236
1740
|
* A standalone CMS client for build-time consumption (the blog
|
|
1237
1741
|
* template's CMS mode), where there is no request handle. Same surface
|
|
@@ -1244,6 +1748,34 @@ export declare const createCmsClient: (config: {
|
|
|
1244
1748
|
secret?: string;
|
|
1245
1749
|
}) => CmsApi;
|
|
1246
1750
|
|
|
1751
|
+
/** Effect form of {@link createCollection}. */
|
|
1752
|
+
export declare const createCollection: (...args: Parameters<typeof createCollection_2>) => Effect<Collection, never, never>;
|
|
1753
|
+
|
|
1754
|
+
/** Create an empty collection in the caller's site and environment. */
|
|
1755
|
+
declare const createCollection_2: (tx: DataStore, scope: Pick<CmsScope, "site" | "environment">, input: {
|
|
1756
|
+
readonly name: string;
|
|
1757
|
+
readonly description?: string;
|
|
1758
|
+
}) => Promise<Collection>;
|
|
1759
|
+
|
|
1760
|
+
/** Effect form of {@link createPortal}. */
|
|
1761
|
+
export declare const createPortal: (...args: Parameters<typeof createPortal_2>) => Effect<CreatePortalResult, never, never>;
|
|
1762
|
+
|
|
1763
|
+
/** A portal link to a collection: the token is returned once, only its hash is stored. */
|
|
1764
|
+
declare const createPortal_2: (tx: DataStore, collectionId: string, input: {
|
|
1765
|
+
readonly expiresAt: Date;
|
|
1766
|
+
readonly maxDownloads?: number | null;
|
|
1767
|
+
readonly label?: string;
|
|
1768
|
+
}, now?: Date) => Promise<CreatePortalResult>;
|
|
1769
|
+
|
|
1770
|
+
export declare type CreatePortalResult = {
|
|
1771
|
+
readonly ok: true;
|
|
1772
|
+
readonly id: string;
|
|
1773
|
+
readonly token: string;
|
|
1774
|
+
} | {
|
|
1775
|
+
readonly ok: false;
|
|
1776
|
+
readonly reason: 'notFound' | 'badExpiry' | 'badLimit';
|
|
1777
|
+
};
|
|
1778
|
+
|
|
1247
1779
|
/** Effect form of {@link createPreviewShare}. */
|
|
1248
1780
|
export declare const createPreviewShare: (...args: Parameters<typeof createPreviewShare_2>) => Effect<{
|
|
1249
1781
|
readonly share: Row;
|
|
@@ -1281,6 +1813,111 @@ declare const createRelease_2: (store: DataStore, input: {
|
|
|
1281
1813
|
readonly environment: string;
|
|
1282
1814
|
}) => Promise<Row>;
|
|
1283
1815
|
|
|
1816
|
+
export declare interface CriterionResult extends CutoverCriterion {
|
|
1817
|
+
/** The measured number; null when the measure is missing (which fails). */
|
|
1818
|
+
readonly measured: number | null;
|
|
1819
|
+
readonly pass: boolean;
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1822
|
+
/** Effect form of {@link cutoverAdoption}. */
|
|
1823
|
+
export declare const cutoverAdoption: (...args: Parameters<typeof cutoverAdoption_2>) => Effect<readonly AdoptionEntry[], never, never>;
|
|
1824
|
+
|
|
1825
|
+
/**
|
|
1826
|
+
* Who has worked on migrated content since it arrived, per person: the
|
|
1827
|
+
* revisions saved after `since` (the import run), or — without it — after
|
|
1828
|
+
* each document's first revision.
|
|
1829
|
+
*/
|
|
1830
|
+
declare const cutoverAdoption_2: (store: DataStore, documentIds: ReadonlyArray<string>, since?: Date) => Promise<ReadonlyArray<AdoptionEntry>>;
|
|
1831
|
+
|
|
1832
|
+
/** One objective criterion: a named measure against a threshold. */
|
|
1833
|
+
export declare interface CutoverCriterion {
|
|
1834
|
+
readonly id: string;
|
|
1835
|
+
/** The measure it reads (a key of the measures handed to `evaluateCutover`). */
|
|
1836
|
+
readonly measure: string;
|
|
1837
|
+
readonly op: 'atMost' | 'atLeast';
|
|
1838
|
+
readonly value: number;
|
|
1839
|
+
/** What it means, in the team's words. */
|
|
1840
|
+
readonly label: string;
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1843
|
+
export declare interface CutoverDecision {
|
|
1844
|
+
readonly id: string;
|
|
1845
|
+
readonly decision: 'go' | 'fallback';
|
|
1846
|
+
readonly criteria: ReadonlyArray<CriterionResult>;
|
|
1847
|
+
readonly note: string;
|
|
1848
|
+
readonly plan: CutoverPlan | null;
|
|
1849
|
+
readonly decidedBy: string;
|
|
1850
|
+
readonly decidedAt: Date;
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
/** Effect form of {@link cutoverDecisions}. */
|
|
1854
|
+
export declare const cutoverDecisions: (...args: Parameters<typeof cutoverDecisions_2>) => Effect<readonly CutoverDecision[], never, never>;
|
|
1855
|
+
|
|
1856
|
+
/** A source's decisions, newest first. */
|
|
1857
|
+
declare const cutoverDecisions_2: (store: DataStore, source: string) => Promise<ReadonlyArray<CutoverDecision>>;
|
|
1858
|
+
|
|
1859
|
+
export declare interface CutoverIssue {
|
|
1860
|
+
readonly id: string;
|
|
1861
|
+
readonly key: string;
|
|
1862
|
+
readonly kind: string;
|
|
1863
|
+
readonly detail: string;
|
|
1864
|
+
readonly resolution: string | null;
|
|
1865
|
+
readonly resolvedBy: string | null;
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
/** Effect form of {@link cutoverIssues}. */
|
|
1869
|
+
export declare const cutoverIssues: (...args: Parameters<typeof cutoverIssues_2>) => Effect<readonly CutoverIssue[], never, never>;
|
|
1870
|
+
|
|
1871
|
+
/** A source's issues, open ones first. */
|
|
1872
|
+
declare const cutoverIssues_2: (store: DataStore, source: string) => Promise<ReadonlyArray<CutoverIssue>>;
|
|
1873
|
+
|
|
1874
|
+
/**
|
|
1875
|
+
* What a `go` pins: from when the old system takes no more edits (the freeze
|
|
1876
|
+
* — or, with `dualWrite`, until when both are written), where traffic goes,
|
|
1877
|
+
* how many old addresses redirect, whether caches are purged at the switch,
|
|
1878
|
+
* and until when a rollback to the old system stays possible.
|
|
1879
|
+
*/
|
|
1880
|
+
export declare interface CutoverPlan {
|
|
1881
|
+
readonly freezeAt: Date;
|
|
1882
|
+
readonly dualWrite?: boolean;
|
|
1883
|
+
readonly routing: string;
|
|
1884
|
+
readonly redirects: number;
|
|
1885
|
+
readonly purgeCaches: boolean;
|
|
1886
|
+
readonly rollbackUntil: Date;
|
|
1887
|
+
}
|
|
1888
|
+
|
|
1889
|
+
/** Why a plan cannot stand, or null. */
|
|
1890
|
+
export declare const cutoverPlanProblem: (plan: CutoverPlan, now: Date) => string | null;
|
|
1891
|
+
|
|
1892
|
+
/** Effect form of {@link decideCutover}. */
|
|
1893
|
+
export declare const decideCutover: (...args: Parameters<typeof decideCutover_2>) => Effect<DecideCutoverResult, never, never>;
|
|
1894
|
+
|
|
1895
|
+
/**
|
|
1896
|
+
* Record the decision with the criteria as they stand: `go` only when every
|
|
1897
|
+
* criterion passes and with a plan that pins the switch; `fallback` (stay on
|
|
1898
|
+
* the old system, or return to it) any time, with a note.
|
|
1899
|
+
*/
|
|
1900
|
+
declare const decideCutover_2: (tx: DataStore, input: {
|
|
1901
|
+
readonly source: string;
|
|
1902
|
+
readonly decision: "go" | "fallback";
|
|
1903
|
+
readonly results: ReadonlyArray<CriterionResult>;
|
|
1904
|
+
readonly note: string;
|
|
1905
|
+
readonly actorId: string;
|
|
1906
|
+
readonly tenantId: string | null;
|
|
1907
|
+
/** Required for `go`. */
|
|
1908
|
+
readonly plan?: CutoverPlan;
|
|
1909
|
+
}, now?: Date) => Promise<DecideCutoverResult>;
|
|
1910
|
+
|
|
1911
|
+
export declare type DecideCutoverResult = {
|
|
1912
|
+
readonly ok: true;
|
|
1913
|
+
readonly id: string;
|
|
1914
|
+
} | {
|
|
1915
|
+
readonly ok: false;
|
|
1916
|
+
readonly reason: 'notReady' | 'noNote' | 'noPlan';
|
|
1917
|
+
readonly failing?: ReadonlyArray<string>;
|
|
1918
|
+
readonly problem?: string;
|
|
1919
|
+
};
|
|
1920
|
+
|
|
1284
1921
|
export declare type DecideExceptionResult = {
|
|
1285
1922
|
readonly ok: true;
|
|
1286
1923
|
readonly state: 'approved' | 'rejected' | 'withdrawn';
|
|
@@ -1312,31 +1949,147 @@ declare const decideQualityException_2: (tx: DataStore, exceptionId: string, inp
|
|
|
1312
1949
|
readonly note?: string;
|
|
1313
1950
|
}, now?: Date) => Promise<DecideExceptionResult>;
|
|
1314
1951
|
|
|
1315
|
-
/**
|
|
1316
|
-
export declare
|
|
1952
|
+
/** Who decides, with the scopes they hold (effective scopes of the request). */
|
|
1953
|
+
export declare interface Decider {
|
|
1954
|
+
readonly actorId: string;
|
|
1955
|
+
readonly scopes: ReadonlySet<string>;
|
|
1956
|
+
}
|
|
1317
1957
|
|
|
1318
|
-
/**
|
|
1319
|
-
export declare const
|
|
1958
|
+
/** Effect form of {@link decideStep}. */
|
|
1959
|
+
export declare const decideStep: (...args: Parameters<typeof decideStep_2>) => Effect<DecideStepResult, never, never>;
|
|
1320
1960
|
|
|
1321
1961
|
/**
|
|
1322
|
-
*
|
|
1323
|
-
*
|
|
1324
|
-
*
|
|
1325
|
-
*
|
|
1962
|
+
* Approve or request changes on one open step, as `decider`, in the caller's
|
|
1963
|
+
* transaction. The draft must still show the instance's revision; the
|
|
1964
|
+
* requester never decides; a delegated step is decided by its delegate alone.
|
|
1965
|
+
* Approving the last applicable step approves the instance; asking for
|
|
1966
|
+
* changes on any step sends it back.
|
|
1326
1967
|
*/
|
|
1327
|
-
|
|
1968
|
+
declare const decideStep_2: (tx: DataStore, instanceId: string, stepId: string, decider: Decider, input: {
|
|
1969
|
+
readonly action: "approve" | "requestChanges";
|
|
1970
|
+
readonly evidence?: string;
|
|
1971
|
+
readonly note?: string;
|
|
1972
|
+
}, now?: Date) => Promise<DecideStepResult>;
|
|
1973
|
+
|
|
1974
|
+
export declare type DecideStepResult = {
|
|
1975
|
+
readonly ok: true;
|
|
1976
|
+
readonly instanceStatus: WorkflowInstance['status'];
|
|
1977
|
+
} | {
|
|
1978
|
+
readonly ok: false;
|
|
1979
|
+
readonly reason: StepRefusal;
|
|
1980
|
+
};
|
|
1981
|
+
|
|
1982
|
+
/** Decode character references (`&`, `’`, `—`). */
|
|
1983
|
+
export declare const decodeEntities: (text: string) => string;
|
|
1984
|
+
|
|
1985
|
+
/** The intent a `?select=…` value carries, or null. */
|
|
1986
|
+
export declare const decodeSelectionIntent: (value: string | null | undefined) => SelectionIntent | null;
|
|
1987
|
+
|
|
1988
|
+
/** Define an audience; a rule with no condition would match everyone and is refused. */
|
|
1989
|
+
export declare const defineAudience: (audience: Audience) => Audience;
|
|
1990
|
+
|
|
1991
|
+
/**
|
|
1992
|
+
* Check a blueprint and order its entries so every referenced entry comes
|
|
1993
|
+
* before the entries that reference it. Throws `BlueprintInvalid` for a key
|
|
1994
|
+
* used twice, a reference to no entry, or entries that reference each other
|
|
1995
|
+
* in a circle.
|
|
1996
|
+
*/
|
|
1997
|
+
export declare const defineBlueprint: (spec: Blueprint) => Blueprint;
|
|
1328
1998
|
|
|
1329
|
-
/** Declare a component editors can place in a `Schema.Components` field. */
|
|
1330
1999
|
export declare const defineComponent: (spec: {
|
|
1331
2000
|
readonly id: string;
|
|
1332
2001
|
readonly displayName: string;
|
|
1333
2002
|
readonly props: Readonly<Record<string, FieldSchema | PipeableField>>;
|
|
1334
2003
|
/** A consent purpose the reader must grant first — an embed that loads a third party. */
|
|
1335
2004
|
readonly consent?: string;
|
|
2005
|
+
/** What it is for, in an editor's words. */
|
|
2006
|
+
readonly description?: string;
|
|
2007
|
+
/** The editorial jobs it serves; the picker groups and searches by them. */
|
|
2008
|
+
readonly jobs?: ReadonlyArray<string>;
|
|
2009
|
+
readonly variants?: ComponentDefinition["variants"];
|
|
2010
|
+
readonly fixtures?: ComponentDefinition["fixtures"];
|
|
2011
|
+
readonly migrations?: ComponentDefinition["migrations"];
|
|
1336
2012
|
}) => ComponentDefinition;
|
|
1337
2013
|
|
|
1338
2014
|
export declare const defineContentType: (spec: ContentTypeSpec) => ContentType;
|
|
1339
2015
|
|
|
2016
|
+
/**
|
|
2017
|
+
* Declare the design tokens components may name (`Schema.Token(tokens, 'tone')`).
|
|
2018
|
+
* Group and token names are camelCase; the values are what an editor reads
|
|
2019
|
+
* beside each name — the renderer owns the actual styles.
|
|
2020
|
+
*/
|
|
2021
|
+
export declare const defineDesignTokens: <T extends DesignTokens>(tokens: T) => T;
|
|
2022
|
+
|
|
2023
|
+
/** Declare a metric; the fingerprint follows its meaning. */
|
|
2024
|
+
export declare const defineMetric: (spec: MetricSpec) => MetricDefinition;
|
|
2025
|
+
|
|
2026
|
+
/** Declare a review workflow; throws for a duplicate step, an unknown or a cyclic `after`. */
|
|
2027
|
+
export declare const defineReviewWorkflow: (spec: ReviewWorkflow) => ReviewWorkflow;
|
|
2028
|
+
|
|
2029
|
+
/**
|
|
2030
|
+
* Declare what a rich-text field allows (`Schema.RichText({ profile })`):
|
|
2031
|
+
* its blocks, heading levels and marks, named styles from one design-token
|
|
2032
|
+
* group, the components that may sit between blocks, and how e-mail
|
|
2033
|
+
* addresses and phone numbers are given — a published contact point of
|
|
2034
|
+
* `contactPoints`, and/or a one-off checked on save (`contactLiterals`).
|
|
2035
|
+
* Bump `version` when it changes: a saved document records `<name>@<version>`.
|
|
2036
|
+
* Unset lists allow every built-in block, heading level and mark.
|
|
2037
|
+
*/
|
|
2038
|
+
export declare const defineRichTextProfile: (spec: {
|
|
2039
|
+
readonly name: string;
|
|
2040
|
+
readonly version: number;
|
|
2041
|
+
readonly blocks?: ReadonlyArray<Exclude<RichBlockKind, "component">>;
|
|
2042
|
+
readonly headings?: ReadonlyArray<2 | 3>;
|
|
2043
|
+
readonly marks?: ReadonlyArray<RichMark>;
|
|
2044
|
+
readonly styles?: {
|
|
2045
|
+
readonly tokens: DesignTokens;
|
|
2046
|
+
readonly group: string;
|
|
2047
|
+
};
|
|
2048
|
+
readonly components?: ReadonlyArray<ComponentDefinition>;
|
|
2049
|
+
readonly contactPoints?: string;
|
|
2050
|
+
readonly contactLiterals?: boolean;
|
|
2051
|
+
}) => RichTextProfile;
|
|
2052
|
+
|
|
2053
|
+
/** Effect form of {@link delegateStep}. */
|
|
2054
|
+
export declare const delegateStep: (...args: Parameters<typeof delegateStep_2>) => Effect<{
|
|
2055
|
+
readonly ok: true;
|
|
2056
|
+
} | {
|
|
2057
|
+
readonly ok: false;
|
|
2058
|
+
readonly reason: StepRefusal | "selfDelegation";
|
|
2059
|
+
}, never, never>;
|
|
2060
|
+
|
|
2061
|
+
/** Hand an open step to a named person (someone allowed to decide it delegates); they decide it from then on. */
|
|
2062
|
+
declare const delegateStep_2: (tx: DataStore, instanceId: string, stepId: string, decider: Decider, to: string, now?: Date) => Promise<{
|
|
2063
|
+
readonly ok: true;
|
|
2064
|
+
} | {
|
|
2065
|
+
readonly ok: false;
|
|
2066
|
+
readonly reason: StepRefusal | "selfDelegation";
|
|
2067
|
+
}>;
|
|
2068
|
+
|
|
2069
|
+
export declare interface DeliveryCheck {
|
|
2070
|
+
readonly id: string;
|
|
2071
|
+
readonly contentType: string;
|
|
2072
|
+
readonly documentId: string;
|
|
2073
|
+
readonly locale: string;
|
|
2074
|
+
readonly kind: 'publish' | 'unpublish';
|
|
2075
|
+
readonly revisionId: string | null;
|
|
2076
|
+
readonly url: string;
|
|
2077
|
+
readonly status: 'pending' | 'observed' | 'stale';
|
|
2078
|
+
readonly requestedAt: Date;
|
|
2079
|
+
readonly observedAt: Date | null;
|
|
2080
|
+
readonly lastSeen: string | null;
|
|
2081
|
+
readonly attempts: number;
|
|
2082
|
+
}
|
|
2083
|
+
|
|
2084
|
+
/** Effect form of {@link deliveryChecks}. */
|
|
2085
|
+
export declare const deliveryChecks: (...args: Parameters<typeof deliveryChecks_2>) => Effect<readonly DeliveryCheck[], never, never>;
|
|
2086
|
+
|
|
2087
|
+
/** The newest checks, newest first — optionally of one document. */
|
|
2088
|
+
declare const deliveryChecks_2: (store: DataStore, options?: {
|
|
2089
|
+
readonly documentId?: string;
|
|
2090
|
+
readonly limit?: number;
|
|
2091
|
+
}) => Promise<ReadonlyArray<DeliveryCheck>>;
|
|
2092
|
+
|
|
1340
2093
|
/**
|
|
1341
2094
|
* Mark a field computed-on-save from another field. The transform runs
|
|
1342
2095
|
* before the row is written — `saveDraft` applies it (via
|
|
@@ -1365,6 +2118,9 @@ export declare const describeEdit: (fields: Readonly<Record<string, FieldSchema>
|
|
|
1365
2118
|
|
|
1366
2119
|
export declare const describeFailure: (err: unknown) => string;
|
|
1367
2120
|
|
|
2121
|
+
/** A design system's tokens: group → token name → what it stands for (a value or a description). */
|
|
2122
|
+
export declare type DesignTokens = Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
2123
|
+
|
|
1368
2124
|
/** One run of a word diff: text both sides share, or text only one side has. */
|
|
1369
2125
|
export declare interface DiffSegment {
|
|
1370
2126
|
readonly op: 'same' | 'removed' | 'added';
|
|
@@ -1379,6 +2135,68 @@ export declare interface DiffSegment {
|
|
|
1379
2135
|
*/
|
|
1380
2136
|
export declare const diffWords: (before: string, after: string) => ReadonlyArray<DiffSegment>;
|
|
1381
2137
|
|
|
2138
|
+
/** Effect form of {@link discardCandidate}. */
|
|
2139
|
+
export declare const discardCandidate: (...args: Parameters<typeof discardCandidate_2>) => Effect<boolean, never, never>;
|
|
2140
|
+
|
|
2141
|
+
/** Leave an open candidate; its AI operation is settled as discarded. */
|
|
2142
|
+
declare const discardCandidate_2: (tx: DataStore, candidateId: string, actorId: string, now?: Date) => Promise<boolean>;
|
|
2143
|
+
|
|
2144
|
+
export declare interface DocumentGraph {
|
|
2145
|
+
/** False when the document has no content in this perspective. */
|
|
2146
|
+
readonly found: boolean;
|
|
2147
|
+
readonly perspective: 'published' | 'draft' | 'revision';
|
|
2148
|
+
/** The revision the forward edges were read from. */
|
|
2149
|
+
readonly revision: {
|
|
2150
|
+
readonly id: string;
|
|
2151
|
+
readonly number: number;
|
|
2152
|
+
} | null;
|
|
2153
|
+
/** What it points at. */
|
|
2154
|
+
readonly references: ReadonlyArray<ReferenceOccurrence>;
|
|
2155
|
+
/** The components it is built from. */
|
|
2156
|
+
readonly components: ReadonlyArray<ComponentUse>;
|
|
2157
|
+
/** What uses it: live content for `published` and a revision, drafts for `draft`. */
|
|
2158
|
+
readonly usedBy: ReadonlyArray<GraphUse>;
|
|
2159
|
+
/** Its address now, and the addresses that redirect to it. */
|
|
2160
|
+
readonly routes: {
|
|
2161
|
+
readonly path: string | null;
|
|
2162
|
+
readonly formerPaths: ReadonlyArray<string>;
|
|
2163
|
+
};
|
|
2164
|
+
/** The releases that carry one of its variants. */
|
|
2165
|
+
readonly releases: ReadonlyArray<{
|
|
2166
|
+
readonly releaseId: string;
|
|
2167
|
+
readonly name: string;
|
|
2168
|
+
readonly status: string;
|
|
2169
|
+
readonly action: string;
|
|
2170
|
+
readonly revisionId: string | null;
|
|
2171
|
+
readonly locale: string;
|
|
2172
|
+
}>;
|
|
2173
|
+
}
|
|
2174
|
+
|
|
2175
|
+
/** Effect form of {@link documentGraph}. */
|
|
2176
|
+
export declare const documentGraph: (...args: Parameters<typeof documentGraph_2>) => Effect<DocumentGraph, never, never>;
|
|
2177
|
+
|
|
2178
|
+
/**
|
|
2179
|
+
* The graph around one document in one place (site, environment, locale) and
|
|
2180
|
+
* perspective. A revision perspective reads that revision's values — the
|
|
2181
|
+
* document as it was then — and refuses a revision of another document.
|
|
2182
|
+
*/
|
|
2183
|
+
declare const documentGraph_2: (store: DataStore, types: ReadonlyArray<ContentType>, target: {
|
|
2184
|
+
readonly type: ContentType;
|
|
2185
|
+
readonly documentId: string;
|
|
2186
|
+
}, scope: CmsScope, perspective?: GraphPerspective) => Promise<DocumentGraph>;
|
|
2187
|
+
|
|
2188
|
+
/** Whether any block of the document holds a suggestion. */
|
|
2189
|
+
export declare const documentHasChanges: (doc: RichDocument) => boolean;
|
|
2190
|
+
|
|
2191
|
+
/** Effect form of {@link draftUses}. */
|
|
2192
|
+
export declare const draftUses: (...args: Parameters<typeof draftUses_2>) => Effect<readonly GraphUse[], never, never>;
|
|
2193
|
+
|
|
2194
|
+
/** The drafts in a site and environment that reference `target`, with the paths and the revision each is in. */
|
|
2195
|
+
declare const draftUses_2: (store: DataStore, types: ReadonlyArray<ContentType>, target: {
|
|
2196
|
+
readonly type: string;
|
|
2197
|
+
readonly documentId: string;
|
|
2198
|
+
}, scope: Pick<CmsScope, "site" | "environment">) => Promise<ReadonlyArray<GraphUse>>;
|
|
2199
|
+
|
|
1382
2200
|
/** Effect form of {@link dropFromSearch}. */
|
|
1383
2201
|
export declare const dropFromSearch: (...args: Parameters<typeof dropFromSearch_2>) => Effect<void, never, never>;
|
|
1384
2202
|
|
|
@@ -1408,6 +2226,33 @@ declare const duplicateGroups_2: (store: DataStore, type: ContentType, scope: Cm
|
|
|
1408
2226
|
readonly titleField?: string;
|
|
1409
2227
|
}) => Promise<ReadonlyArray<DuplicateGroup>>;
|
|
1410
2228
|
|
|
2229
|
+
/**
|
|
2230
|
+
* The response headers that tell `provider` how to keep this answer: how long
|
|
2231
|
+
* (`maxAge`, then `staleWhileRevalidate` served stale while it refetches), the
|
|
2232
|
+
* `Vary` from the identity, and the purge tags in the header the provider
|
|
2233
|
+
* reads (`Cache-Tag` comma-separated; Fastly's `Surrogate-Key` space-separated
|
|
2234
|
+
* with its own `Surrogate-Control`). A request that is not shared-cacheable
|
|
2235
|
+
* gets `private, no-store` and no tags.
|
|
2236
|
+
*/
|
|
2237
|
+
export declare const edgeHeaders: (provider: EdgeProvider, identity: CacheIdentity, lifetime: {
|
|
2238
|
+
readonly maxAge: number;
|
|
2239
|
+
readonly staleWhileRevalidate?: number;
|
|
2240
|
+
}) => Readonly<Record<string, string>>;
|
|
2241
|
+
|
|
2242
|
+
/** A shared cache in front of the delivery API: your own (BYO) or a managed one. */
|
|
2243
|
+
export declare type EdgeProvider = 'cloudflare' | 'fastly' | 'generic';
|
|
2244
|
+
|
|
2245
|
+
/**
|
|
2246
|
+
* The requests that drop every cached answer carrying one of `tags`, and the
|
|
2247
|
+
* answers at `urls` — none when there is nothing to purge or the target is
|
|
2248
|
+
* unusable. Tags a header could not carry and addresses that are not absolute
|
|
2249
|
+
* http(s) URLs are left out rather than sent.
|
|
2250
|
+
*/
|
|
2251
|
+
export declare const edgePurgeRequests: (provider: PurgeProvider, config: {
|
|
2252
|
+
readonly target: string;
|
|
2253
|
+
readonly token: string | null;
|
|
2254
|
+
}, tags: ReadonlyArray<string>, urls?: ReadonlyArray<string>) => ReadonlyArray<PurgeRequest>;
|
|
2255
|
+
|
|
1411
2256
|
/** What one change did, and a key that tells whether the next change continues it. */
|
|
1412
2257
|
export declare interface EditDescription {
|
|
1413
2258
|
readonly label: string;
|
|
@@ -1458,11 +2303,33 @@ export declare interface EditWords {
|
|
|
1458
2303
|
/** The tools on for the last step of `chain`, and why each tool is as it is. */
|
|
1459
2304
|
export declare const effectiveExposure: (input: ExposureInput) => ExposureResult;
|
|
1460
2305
|
|
|
2306
|
+
/** One inherited field of a page as the editor shows it: what it is, where it came from, and what the page may do. */
|
|
2307
|
+
export declare interface EffectiveInheritance extends Inherited {
|
|
2308
|
+
readonly field: string;
|
|
2309
|
+
readonly locked: boolean;
|
|
2310
|
+
/** The mask field, when the field may be masked. */
|
|
2311
|
+
readonly mask: string | null;
|
|
2312
|
+
/** What it would be without the page's own value or mask — what "reset" brings back. */
|
|
2313
|
+
readonly inherited: Inherited;
|
|
2314
|
+
}
|
|
2315
|
+
|
|
2316
|
+
/**
|
|
2317
|
+
* Every inherited field of `node` (the type's `tree.inherit`): its effective
|
|
2318
|
+
* value with the document it came from and how, whether it is locked or may
|
|
2319
|
+
* be masked, and what it would be after a reset. A draft not yet in the tree
|
|
2320
|
+
* inherits through its parent — pass it as `node` and it is placed for the
|
|
2321
|
+
* walk.
|
|
2322
|
+
*/
|
|
2323
|
+
export declare const effectiveInheritance: (inherit: Readonly<Record<string, InheritRule>>, tree: CmsTree, node: TreeNode) => ReadonlyArray<EffectiveInheritance>;
|
|
2324
|
+
|
|
1461
2325
|
export declare const EMPTY_EDIT_HISTORY: EditHistory;
|
|
1462
2326
|
|
|
1463
2327
|
/** An empty document. */
|
|
1464
2328
|
export declare const emptyRichDocument: () => RichDocument;
|
|
1465
2329
|
|
|
2330
|
+
/** The intent as a URL parameter value (`?select=…`). */
|
|
2331
|
+
export declare const encodeSelectionIntent: (intent: SelectionIntent) => string;
|
|
2332
|
+
|
|
1466
2333
|
export declare interface EnvironmentDifference {
|
|
1467
2334
|
readonly contentType: string;
|
|
1468
2335
|
/** Documents (with a variant) in `from` only, and in `to` only. */
|
|
@@ -1482,6 +2349,12 @@ export declare interface EnvironmentPair {
|
|
|
1482
2349
|
readonly to: string;
|
|
1483
2350
|
}
|
|
1484
2351
|
|
|
2352
|
+
/** Every criterion against the measures: each with its measured value, and whether all pass. */
|
|
2353
|
+
export declare const evaluateCutover: (criteria: ReadonlyArray<CutoverCriterion>, measures: Readonly<Record<string, number>>) => {
|
|
2354
|
+
readonly results: ReadonlyArray<CriterionResult>;
|
|
2355
|
+
readonly ready: boolean;
|
|
2356
|
+
};
|
|
2357
|
+
|
|
1485
2358
|
export declare type ExceptionState = 'requested' | 'approved' | 'rejected' | 'withdrawn' | 'expired';
|
|
1486
2359
|
|
|
1487
2360
|
export declare interface Experiment {
|
|
@@ -1490,15 +2363,18 @@ export declare interface Experiment {
|
|
|
1490
2363
|
readonly contentType: string;
|
|
1491
2364
|
readonly documentId: string;
|
|
1492
2365
|
readonly locale: string;
|
|
1493
|
-
readonly status: 'running' | 'stopped';
|
|
2366
|
+
readonly status: 'planned' | 'running' | 'stopped';
|
|
1494
2367
|
readonly share: number;
|
|
1495
2368
|
readonly overrides: Readonly<Record<string, string>>;
|
|
1496
2369
|
readonly goal: string;
|
|
1497
2370
|
/** Null for an experiment started before hypotheses were asked for. */
|
|
1498
2371
|
readonly hypothesis: string | null;
|
|
1499
2372
|
readonly guardrailMaxDrop: number | null;
|
|
1500
|
-
|
|
2373
|
+
/** Null while planned. */
|
|
2374
|
+
readonly startedAt: Date | null;
|
|
1501
2375
|
readonly stoppedAt: Date | null;
|
|
2376
|
+
readonly startReleaseId: string | null;
|
|
2377
|
+
readonly stopReason: 'manual' | 'replaced' | 'rolledBack' | null;
|
|
1502
2378
|
/** Version A: the published revision it was started on (null before lineage was recorded). */
|
|
1503
2379
|
readonly revisionId: string | null;
|
|
1504
2380
|
readonly adoptedReleaseId: string | null;
|
|
@@ -1539,6 +2415,22 @@ export declare const experimentLineage: (...args: Parameters<typeof experimentLi
|
|
|
1539
2415
|
/** Where every delivery of an experiment came from — revision, version, adoption. */
|
|
1540
2416
|
declare const experimentLineage_2: (store: DataStore, experimentId: string) => Promise<ExperimentLineage | null>;
|
|
1541
2417
|
|
|
2418
|
+
/**
|
|
2419
|
+
* Everything version B may override on a page with these values: its text
|
|
2420
|
+
* fields, and each text prop of each component placed on it
|
|
2421
|
+
* (`sections[<instanceId>].heading`).
|
|
2422
|
+
*/
|
|
2423
|
+
export declare const experimentOverrideKeys: (type: ContentType, values: Readonly<Record<string, unknown>>) => ReadonlyArray<string>;
|
|
2424
|
+
|
|
2425
|
+
/**
|
|
2426
|
+
* The release hook experiments need (pass it to `publishRelease`,
|
|
2427
|
+
* `publishDueReleases` and `rollbackRelease` as `afterPublish`): a release
|
|
2428
|
+
* going live starts the experiments planned on it — on the revision it just
|
|
2429
|
+
* published, replacing one still running on that page — and a rollback stops
|
|
2430
|
+
* the experiments the rolled-back release started.
|
|
2431
|
+
*/
|
|
2432
|
+
export declare const experimentReleaseHook: ReleaseHook;
|
|
2433
|
+
|
|
1542
2434
|
export declare interface ExperimentResults {
|
|
1543
2435
|
readonly A: VariantResult;
|
|
1544
2436
|
readonly B: VariantResult;
|
|
@@ -1561,6 +2453,28 @@ export declare const experimentResults: (...args: Parameters<typeof experimentRe
|
|
|
1561
2453
|
/** Per version: readers, conversions and rate, the lift of B, and whether the difference is yet more than noise. */
|
|
1562
2454
|
declare const experimentResults_2: (store: DataStore, experimentId: string) => Promise<ExperimentResults>;
|
|
1563
2455
|
|
|
2456
|
+
/** Effect form of {@link expiringAmong}. */
|
|
2457
|
+
export declare const expiringAmong: (...args: Parameters<typeof expiringAmong_2>) => Effect<readonly ExpiringRight[], never, never>;
|
|
2458
|
+
|
|
2459
|
+
/** The published documents whose rights end within `days`, soonest first. */
|
|
2460
|
+
declare const expiringAmong_2: (store: DataStore, scope: Pick<CmsScope, "site" | "environment">, days: number, now?: Date) => Promise<ReadonlyArray<ExpiringRight>>;
|
|
2461
|
+
|
|
2462
|
+
/** A document whose rights end soon, for a renewal reminder. */
|
|
2463
|
+
export declare interface ExpiringRight {
|
|
2464
|
+
readonly contentType: string;
|
|
2465
|
+
readonly documentId: string;
|
|
2466
|
+
readonly until: Date;
|
|
2467
|
+
readonly days: number;
|
|
2468
|
+
}
|
|
2469
|
+
|
|
2470
|
+
/** Why a dimension is in the identity or not. */
|
|
2471
|
+
export declare interface ExplainLine {
|
|
2472
|
+
readonly dimension: string;
|
|
2473
|
+
readonly included: boolean;
|
|
2474
|
+
readonly value: string | null;
|
|
2475
|
+
readonly why: string;
|
|
2476
|
+
}
|
|
2477
|
+
|
|
1564
2478
|
export declare interface ExposureInput {
|
|
1565
2479
|
readonly ceiling: ReadonlyArray<string>;
|
|
1566
2480
|
readonly defaults: ReadonlyArray<string>;
|
|
@@ -1589,12 +2503,10 @@ export declare const EXTENSION_SLOTS: readonly ["dashboard", "sidebar", "fieldWi
|
|
|
1589
2503
|
export declare class ExtensionAccessDenied extends ExtensionAccessDenied_base {
|
|
1590
2504
|
}
|
|
1591
2505
|
|
|
1592
|
-
declare const ExtensionAccessDenied_base: Schema_2.
|
|
1593
|
-
readonly
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
capability: typeof Schema_2.String;
|
|
1597
|
-
}>;
|
|
2506
|
+
declare const ExtensionAccessDenied_base: Schema_2.Class<ExtensionAccessDenied, Schema_2.TaggedStruct<"ExtensionAccessDenied", {
|
|
2507
|
+
readonly extensionId: Schema_2.String;
|
|
2508
|
+
readonly capability: Schema_2.String;
|
|
2509
|
+
}>, YieldableError>;
|
|
1598
2510
|
|
|
1599
2511
|
/**
|
|
1600
2512
|
* What an extension may do; everything else is refused.
|
|
@@ -1641,31 +2553,31 @@ export declare interface ExtensionHost {
|
|
|
1641
2553
|
|
|
1642
2554
|
/** A manifest on the wire — for a descriptor's input or output. */
|
|
1643
2555
|
export declare const ExtensionManifestSchema: Schema_2.Struct<{
|
|
1644
|
-
id:
|
|
1645
|
-
name:
|
|
1646
|
-
version:
|
|
1647
|
-
publisher:
|
|
1648
|
-
capabilities: Schema_2
|
|
1649
|
-
slots: Schema_2
|
|
1650
|
-
fields: Schema_2.optional<Schema_2
|
|
1651
|
-
settings: Schema_2.optional<Schema_2
|
|
1652
|
-
key:
|
|
1653
|
-
label:
|
|
1654
|
-
kind: Schema_2.Literal<
|
|
1655
|
-
default:
|
|
1656
|
-
min: Schema_2.optional<
|
|
1657
|
-
max: Schema_2.optional<
|
|
2556
|
+
readonly id: Schema_2.String;
|
|
2557
|
+
readonly name: Schema_2.String;
|
|
2558
|
+
readonly version: Schema_2.String;
|
|
2559
|
+
readonly publisher: Schema_2.String;
|
|
2560
|
+
readonly capabilities: Schema_2.$Array<Schema_2.String>;
|
|
2561
|
+
readonly slots: Schema_2.$Array<Schema_2.String>;
|
|
2562
|
+
readonly fields: Schema_2.optional<Schema_2.$Array<Schema_2.String>>;
|
|
2563
|
+
readonly settings: Schema_2.optional<Schema_2.$Array<Schema_2.Union<readonly [Schema_2.Struct<{
|
|
2564
|
+
readonly key: Schema_2.String;
|
|
2565
|
+
readonly label: Schema_2.String;
|
|
2566
|
+
readonly kind: Schema_2.Literal<"number">;
|
|
2567
|
+
readonly default: Schema_2.Number;
|
|
2568
|
+
readonly min: Schema_2.optional<Schema_2.Number>;
|
|
2569
|
+
readonly max: Schema_2.optional<Schema_2.Number>;
|
|
1658
2570
|
}>, Schema_2.Struct<{
|
|
1659
|
-
key:
|
|
1660
|
-
label:
|
|
1661
|
-
kind: Schema_2.Literal<
|
|
1662
|
-
default:
|
|
2571
|
+
readonly key: Schema_2.String;
|
|
2572
|
+
readonly label: Schema_2.String;
|
|
2573
|
+
readonly kind: Schema_2.Literal<"boolean">;
|
|
2574
|
+
readonly default: Schema_2.Boolean;
|
|
1663
2575
|
}>, Schema_2.Struct<{
|
|
1664
|
-
key:
|
|
1665
|
-
label:
|
|
1666
|
-
kind: Schema_2.Literal<
|
|
1667
|
-
default:
|
|
1668
|
-
options: Schema_2
|
|
2576
|
+
readonly key: Schema_2.String;
|
|
2577
|
+
readonly label: Schema_2.String;
|
|
2578
|
+
readonly kind: Schema_2.Literal<"choice">;
|
|
2579
|
+
readonly default: Schema_2.String;
|
|
2580
|
+
readonly options: Schema_2.$Array<Schema_2.String>;
|
|
1669
2581
|
}>]>>>;
|
|
1670
2582
|
}>;
|
|
1671
2583
|
|
|
@@ -1776,6 +2688,12 @@ export declare interface FieldSchema {
|
|
|
1776
2688
|
readonly pattern?: string;
|
|
1777
2689
|
/** Closed value set for `literal` fields → `<select>` + CHECK constraint. */
|
|
1778
2690
|
readonly literals?: ReadonlyArray<string>;
|
|
2691
|
+
/** What an editor reads for each literal (a token's value, an action's purpose). */
|
|
2692
|
+
readonly literalLabels?: Readonly<Record<string, string>>;
|
|
2693
|
+
/** Set by `Schema.Token`: the design-token group the value names. */
|
|
2694
|
+
readonly token?: string;
|
|
2695
|
+
/** Set by `Schema.Action`: the value names an action the renderer binds. */
|
|
2696
|
+
readonly action?: true;
|
|
1779
2697
|
/** A `number` field that takes fractions (a `real` column); without it a number is whole. */
|
|
1780
2698
|
readonly fraction?: boolean;
|
|
1781
2699
|
/**
|
|
@@ -1882,6 +2800,16 @@ export declare const glossaryProblems: (text: string, entries: ReadonlyArray<Glo
|
|
|
1882
2800
|
/** The purposes whose current version the reader allowed. */
|
|
1883
2801
|
export declare const grantedPurposes: (purposes: ReadonlyArray<ConsentPurpose>, choices: ConsentChoices) => ReadonlySet<string>;
|
|
1884
2802
|
|
|
2803
|
+
/** Which content the graph is read from. */
|
|
2804
|
+
export declare type GraphPerspective = 'published' | 'draft' | {
|
|
2805
|
+
readonly revisionId: string;
|
|
2806
|
+
};
|
|
2807
|
+
|
|
2808
|
+
/** One use of the document in the graph's perspective. A draft use names the revision it is in. */
|
|
2809
|
+
export declare interface GraphUse extends ReferenceUse {
|
|
2810
|
+
readonly revisionId: string | null;
|
|
2811
|
+
}
|
|
2812
|
+
|
|
1885
2813
|
/** Effect form of {@link hadAddress}. */
|
|
1886
2814
|
export declare const hadAddress: (...args: Parameters<typeof hadAddress_2>) => Effect<boolean, never, never>;
|
|
1887
2815
|
|
|
@@ -1937,6 +2865,8 @@ export declare interface HtmlImportOptions {
|
|
|
1937
2865
|
readonly resolveImage?: (src: string) => string | null;
|
|
1938
2866
|
/** Block ids; defaults to a counter, so a test reads stable ids. */
|
|
1939
2867
|
readonly newId?: () => string;
|
|
2868
|
+
/** 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. */
|
|
2869
|
+
readonly contacts?: boolean;
|
|
1940
2870
|
}
|
|
1941
2871
|
|
|
1942
2872
|
export declare interface HtmlImportResult {
|
|
@@ -1952,12 +2882,22 @@ declare const indexForSearch_2: (tx: DataStore, type: ContentType, row: Row, sco
|
|
|
1952
2882
|
|
|
1953
2883
|
/** Where an inherited value came from. */
|
|
1954
2884
|
export declare interface Inherited {
|
|
1955
|
-
/** The value; undefined when
|
|
2885
|
+
/** The value; undefined when masked or when nothing in the tree sets it. */
|
|
1956
2886
|
readonly value: unknown;
|
|
1957
|
-
/** The document that
|
|
2887
|
+
/** The document that decided it: the page itself, an ancestor, or null for none. */
|
|
1958
2888
|
readonly from: string | null;
|
|
2889
|
+
readonly how: InheritedHow;
|
|
1959
2890
|
}
|
|
1960
2891
|
|
|
2892
|
+
/**
|
|
2893
|
+
* How a page came by an inherited field:
|
|
2894
|
+
* - `own` — the page sets it;
|
|
2895
|
+
* - `ancestor` — the nearest ancestor that sets it;
|
|
2896
|
+
* - `masked` — the page or an ancestor masks it: nothing shows;
|
|
2897
|
+
* - `none` — nothing in the tree sets it (the app's site default applies).
|
|
2898
|
+
*/
|
|
2899
|
+
export declare type InheritedHow = 'own' | 'ancestor' | 'masked' | 'none';
|
|
2900
|
+
|
|
1961
2901
|
/**
|
|
1962
2902
|
* The value of an inherited field for `node`: its own when set, else the
|
|
1963
2903
|
* nearest ancestor's in `tree` (the same locale's variants the tree was built
|
|
@@ -1966,12 +2906,20 @@ export declare interface Inherited {
|
|
|
1966
2906
|
*/
|
|
1967
2907
|
export declare const inheritedValue: (tree: CmsTree, node: TreeNode, field: string, options?: {
|
|
1968
2908
|
readonly ancestorsOnly?: boolean;
|
|
2909
|
+
readonly mask?: string;
|
|
1969
2910
|
}) => Inherited;
|
|
1970
2911
|
|
|
1971
2912
|
/** How one inherited field may be set. */
|
|
1972
2913
|
export declare interface InheritRule {
|
|
1973
2914
|
/** No page may set the field; saving one that does is refused (`locked`). */
|
|
1974
2915
|
readonly locked?: boolean;
|
|
2916
|
+
/**
|
|
2917
|
+
* An optional Boolean field of the same type that MASKS this one: true on a
|
|
2918
|
+
* page means it shows nothing here, on purpose — not "unset" (that
|
|
2919
|
+
* inherits) and not an empty value. Pages below inherit the mask until one
|
|
2920
|
+
* sets its own value or mask. A locked field cannot be masked.
|
|
2921
|
+
*/
|
|
2922
|
+
readonly mask?: string;
|
|
1975
2923
|
}
|
|
1976
2924
|
|
|
1977
2925
|
/** The minimal DOM a surface is read from (a browser element, or jsdom's). */
|
|
@@ -1990,7 +2938,7 @@ export declare interface InlineDomNode {
|
|
|
1990
2938
|
*/
|
|
1991
2939
|
export declare const inlineFromDom: (root: InlineDomNode) => ReadonlyArray<RichInline>;
|
|
1992
2940
|
|
|
1993
|
-
/** A run as the HTML a visual surface shows: `strong`, `em`, `u`, `a[data-target]`, escaped text. */
|
|
2941
|
+
/** A run as the HTML a visual surface shows: `strong`, `em`, `u`, `span[data-style]`, `a[data-target]`, `a[data-contact]`, escaped text. */
|
|
1994
2942
|
export declare const inlineHtml: (content: ReadonlyArray<RichInline>) => string;
|
|
1995
2943
|
|
|
1996
2944
|
/** Inline nodes back to the editor's markup (the inverse of `parseInlineMarkup`). */
|
|
@@ -2057,12 +3005,24 @@ export declare const isKnownZone: (zone: string) => boolean;
|
|
|
2057
3005
|
/** Accept-Language → languages in order of preference (quality factors honoured). */
|
|
2058
3006
|
export declare const languagesOf: (acceptLanguage: string | undefined) => ReadonlyArray<string>;
|
|
2059
3007
|
|
|
3008
|
+
/** Effect form of {@link latestWorkflow}. */
|
|
3009
|
+
export declare const latestWorkflow: (...args: Parameters<typeof latestWorkflow_2>) => Effect<WorkflowInstance | null, never, never>;
|
|
3010
|
+
|
|
3011
|
+
/** The newest instance for a draft (any status), or null. */
|
|
3012
|
+
declare const latestWorkflow_2: (store: DataStore, type: ContentType, variantId: string, now?: Date) => Promise<WorkflowInstance | null>;
|
|
3013
|
+
|
|
2060
3014
|
/** How often a type's documents are checked again, declared on the type. */
|
|
2061
3015
|
export declare interface LifecycleConfig {
|
|
2062
3016
|
/** Days from a publish or a recertification to the next review. */
|
|
2063
3017
|
readonly reviewEveryDays: number;
|
|
2064
3018
|
}
|
|
2065
3019
|
|
|
3020
|
+
/** Effect form of {@link listCollections}. */
|
|
3021
|
+
export declare const listCollections: (...args: Parameters<typeof listCollections_2>) => Effect<readonly Collection[], never, never>;
|
|
3022
|
+
|
|
3023
|
+
/** The caller's collections in a site and environment, by name. */
|
|
3024
|
+
declare const listCollections_2: (store: DataStore, scope: Pick<CmsScope, "site" | "environment">) => Promise<ReadonlyArray<Collection>>;
|
|
3025
|
+
|
|
2066
3026
|
/**
|
|
2067
3027
|
* List-view configuration for the consuming editor/template: which
|
|
2068
3028
|
* columns its list page shows and the default sort. Validated by
|
|
@@ -2142,6 +3102,15 @@ export declare const liveDraftTexts: (...args: Parameters<typeof liveDraftTexts_
|
|
|
2142
3102
|
|
|
2143
3103
|
declare const liveDraftTexts_2: (store: DataStore, draft: Row) => Promise<LiveDraftTexts>;
|
|
2144
3104
|
|
|
3105
|
+
/** One stretch of time a revision was live (`to` null: still live). */
|
|
3106
|
+
export declare interface LiveStretch {
|
|
3107
|
+
readonly revision: number;
|
|
3108
|
+
readonly releaseId: string | null;
|
|
3109
|
+
/** ISO timestamps. */
|
|
3110
|
+
readonly from: string;
|
|
3111
|
+
readonly to: string | null;
|
|
3112
|
+
}
|
|
3113
|
+
|
|
2145
3114
|
/** One language's published page tree. */
|
|
2146
3115
|
export declare interface LocalizedTree {
|
|
2147
3116
|
readonly locale: string;
|
|
@@ -2170,9 +3139,15 @@ export declare const MAX_LIST_LEVEL = 3;
|
|
|
2170
3139
|
|
|
2171
3140
|
export declare const MAX_OCCURRENCES = 100;
|
|
2172
3141
|
|
|
3142
|
+
/** The longest a portal link may live. */
|
|
3143
|
+
export declare const MAX_PORTAL_DAYS = 90;
|
|
3144
|
+
|
|
2173
3145
|
/** The longest a preview link may live. */
|
|
2174
3146
|
export declare const MAX_PREVIEW_SHARE_DAYS = 30;
|
|
2175
3147
|
|
|
3148
|
+
/** The longest a rollback window may stay open. */
|
|
3149
|
+
export declare const MAX_ROLLBACK_DAYS = 30;
|
|
3150
|
+
|
|
2176
3151
|
/** Cap a string field's length. Past `value` the editor renders a textarea. */
|
|
2177
3152
|
export declare const maxLength: (value: number) => FieldRefinement;
|
|
2178
3153
|
|
|
@@ -2188,9 +3163,95 @@ export declare const mediaFields: (type: Pick<ContentType, "fields">) => Readonl
|
|
|
2188
3163
|
*/
|
|
2189
3164
|
export declare type MediaResolver = (key: string) => Promise<string | null>;
|
|
2190
3165
|
|
|
2191
|
-
/** Adjacent text runs with the same marks become one; empty text runs go. */
|
|
3166
|
+
/** Adjacent text runs with the same marks and style become one; empty text runs go. */
|
|
2192
3167
|
export declare const mergeInline: (content: ReadonlyArray<RichInline>) => ReadonlyArray<RichInline>;
|
|
2193
3168
|
|
|
3169
|
+
export declare interface MetricDefinition extends MetricSpec {
|
|
3170
|
+
/** A digest of what the number means (not of its label or description). */
|
|
3171
|
+
readonly fingerprint: string;
|
|
3172
|
+
}
|
|
3173
|
+
|
|
3174
|
+
export declare type MetricDrill = 'document' | 'locale' | 'revision' | 'release';
|
|
3175
|
+
|
|
3176
|
+
export declare type MetricFreshness = {
|
|
3177
|
+
readonly kind: 'live';
|
|
3178
|
+
} | {
|
|
3179
|
+
readonly kind: 'daily';
|
|
3180
|
+
} | {
|
|
3181
|
+
readonly kind: 'interval';
|
|
3182
|
+
readonly minutes: number;
|
|
3183
|
+
};
|
|
3184
|
+
|
|
3185
|
+
export declare interface MetricSpec {
|
|
3186
|
+
readonly id: string;
|
|
3187
|
+
/** Raise it whenever the formula, scope, freshness, quality or drill changes. */
|
|
3188
|
+
readonly version: number;
|
|
3189
|
+
readonly label: string;
|
|
3190
|
+
readonly description: string;
|
|
3191
|
+
/** What is computed, in words a reviewer can check against the code. */
|
|
3192
|
+
readonly formula: string;
|
|
3193
|
+
readonly unit: MetricUnit;
|
|
3194
|
+
/** What it is counted over — `site`, `environment`, `locale`, `document`, `day`… */
|
|
3195
|
+
readonly scope: ReadonlyArray<string>;
|
|
3196
|
+
readonly freshness: MetricFreshness;
|
|
3197
|
+
/** Known limits of the number, e.g. `consent-only`, `utc-days`. */
|
|
3198
|
+
readonly quality: ReadonlyArray<string>;
|
|
3199
|
+
/** Where it drills down to. */
|
|
3200
|
+
readonly drill: ReadonlyArray<MetricDrill>;
|
|
3201
|
+
}
|
|
3202
|
+
|
|
3203
|
+
export declare type MetricUnit = 'count' | 'ratio' | 'percent' | 'seconds';
|
|
3204
|
+
|
|
3205
|
+
/**
|
|
3206
|
+
* The metrics whose meaning changed against a recorded set of
|
|
3207
|
+
* `{ id, version, fingerprint }` without a new version — keep the set in a
|
|
3208
|
+
* test, and this names every silent redefinition.
|
|
3209
|
+
*/
|
|
3210
|
+
export declare const metricVersionDrift: (metrics: ReadonlyArray<MetricDefinition>, recorded: ReadonlyArray<{
|
|
3211
|
+
readonly id: string;
|
|
3212
|
+
readonly version: number;
|
|
3213
|
+
readonly fingerprint: string;
|
|
3214
|
+
}>) => ReadonlyArray<string>;
|
|
3215
|
+
|
|
3216
|
+
/** The stages of a migration, in the order they pass. */
|
|
3217
|
+
export declare const MIGRATION_STAGES: readonly ["inventory", "mapping", "dryRun", "reconciliation", "delta", "cutover", "fallback", "uat"];
|
|
3218
|
+
|
|
3219
|
+
export declare interface MigrationLedger {
|
|
3220
|
+
/** Records per result. */
|
|
3221
|
+
readonly counts: Readonly<Record<'created' | 'already' | 'skipped' | 'failed', number>>;
|
|
3222
|
+
/** Records with a conflict or a loss. */
|
|
3223
|
+
readonly withConflict: number;
|
|
3224
|
+
readonly withLoss: number;
|
|
3225
|
+
readonly records: ReadonlyArray<MigrationRecord & {
|
|
3226
|
+
readonly recordedAt: Date;
|
|
3227
|
+
}>;
|
|
3228
|
+
}
|
|
3229
|
+
|
|
3230
|
+
/** Effect form of {@link migrationLedger}. */
|
|
3231
|
+
export declare const migrationLedger: (...args: Parameters<typeof migrationLedger_2>) => Effect<MigrationLedger, never, never>;
|
|
3232
|
+
|
|
3233
|
+
/** The ledger of a source: counts, and the records (those with a conflict or loss first). */
|
|
3234
|
+
declare const migrationLedger_2: (store: DataStore, source: string, limit?: number) => Promise<MigrationLedger>;
|
|
3235
|
+
|
|
3236
|
+
export declare interface MigrationRecord {
|
|
3237
|
+
readonly sourceKey: string;
|
|
3238
|
+
readonly sourceType: string;
|
|
3239
|
+
readonly result: 'created' | 'already' | 'skipped' | 'failed';
|
|
3240
|
+
readonly targetType?: string | null;
|
|
3241
|
+
readonly targetDocumentId?: string | null;
|
|
3242
|
+
readonly transformation?: string | null;
|
|
3243
|
+
readonly conflict?: string | null;
|
|
3244
|
+
readonly loss?: string | null;
|
|
3245
|
+
}
|
|
3246
|
+
|
|
3247
|
+
export declare type MigrationStage = (typeof MIGRATION_STAGES)[number];
|
|
3248
|
+
|
|
3249
|
+
/** Effect form of {@link migrationStages}. */
|
|
3250
|
+
export declare const migrationStages: (...args: Parameters<typeof migrationStages_2>) => Effect<readonly StageState[], never, never>;
|
|
3251
|
+
|
|
3252
|
+
/** Every stage of a source's migration, in order — open where nothing is recorded yet. */
|
|
3253
|
+
declare const migrationStages_2: (store: DataStore, source: string) => Promise<ReadonlyArray<StageState>>;
|
|
3254
|
+
|
|
2194
3255
|
/** Readers per version before a result is called at all. */
|
|
2195
3256
|
export declare const MIN_READERS = 100;
|
|
2196
3257
|
|
|
@@ -2216,13 +3277,16 @@ export declare const newCapabilities: (granted: ReadonlyArray<ExtensionCapabilit
|
|
|
2216
3277
|
/** A nonce for one editing session (unguessable; 128 bits). */
|
|
2217
3278
|
export declare const newVisualNonce: () => string;
|
|
2218
3279
|
|
|
3280
|
+
/** A host name as stored: lower-case, trimmed, without a trailing dot; null when it is no host name. */
|
|
3281
|
+
export declare const normalizeHost: (input: string) => string | null;
|
|
3282
|
+
|
|
2219
3283
|
/**
|
|
2220
3284
|
* The canonical form of a stored value: a plain string becomes paragraphs (a
|
|
2221
3285
|
* blank line starts a new one), a document keeps its blocks and gets an id on
|
|
2222
3286
|
* every block that lacks one, anything else is returned as is for the
|
|
2223
|
-
* validator to reject.
|
|
3287
|
+
* validator to reject. With a profile, the document records its id.
|
|
2224
3288
|
*/
|
|
2225
|
-
export declare const normalizeRichDocument: (value: unknown) => unknown;
|
|
3289
|
+
export declare const normalizeRichDocument: (value: unknown, profile?: RichTextProfile) => unknown;
|
|
2226
3290
|
|
|
2227
3291
|
/** The vocabulary's terms for `input`, in first-seen order, and what it does not know. */
|
|
2228
3292
|
export declare const normalizeTerms: (config: Pick<TaxonomyConfig, "terms">, input: ReadonlyArray<unknown>) => {
|
|
@@ -2257,6 +3321,22 @@ export declare const openDraftTexts: (...args: Parameters<typeof openDraftTexts_
|
|
|
2257
3321
|
*/
|
|
2258
3322
|
declare const openDraftTexts_2: (tx: DataStore, type: ContentType, draftId: string) => Promise<ReadonlyArray<Row>>;
|
|
2259
3323
|
|
|
3324
|
+
/** An open step that fell due in a window — for a reminder to whoever decides it. */
|
|
3325
|
+
export declare interface OverdueStep {
|
|
3326
|
+
readonly instance: WorkflowInstance;
|
|
3327
|
+
readonly step: StepState;
|
|
3328
|
+
}
|
|
3329
|
+
|
|
3330
|
+
/** Effect form of {@link overdueSteps}. */
|
|
3331
|
+
export declare const overdueSteps: (...args: Parameters<typeof overdueSteps_2>) => Effect<readonly OverdueStep[], never, never>;
|
|
3332
|
+
|
|
3333
|
+
/**
|
|
3334
|
+
* Open steps whose due time lies in `(since, now]` — each once, when a sweep
|
|
3335
|
+
* runs over consecutive windows. The reminder is derived from the state; it
|
|
3336
|
+
* changes nothing. Hand it a store over every tenant (a schedule's `app.store`).
|
|
3337
|
+
*/
|
|
3338
|
+
declare const overdueSteps_2: (store: DataStore, since: Date, now: Date) => Promise<ReadonlyArray<OverdueStep>>;
|
|
3339
|
+
|
|
2260
3340
|
/** Where a document lives in one language. */
|
|
2261
3341
|
export declare interface PageAlternate {
|
|
2262
3342
|
readonly locale: string;
|
|
@@ -2284,10 +3364,25 @@ export declare interface PageTemplate {
|
|
|
2284
3364
|
readonly component: ComponentDefinition;
|
|
2285
3365
|
readonly count: number;
|
|
2286
3366
|
}>;
|
|
3367
|
+
/** Other `Schema.Components` fields of the type (an aside), each with its own rules. */
|
|
3368
|
+
readonly regions?: Readonly<Record<string, RegionRule>>;
|
|
3369
|
+
/** The widths a component may take here: the values its `TemplatesConfig.width` prop may hold. */
|
|
3370
|
+
readonly widths?: ReadonlyArray<{
|
|
3371
|
+
readonly component: ComponentDefinition;
|
|
3372
|
+
readonly allowed: ReadonlyArray<string>;
|
|
3373
|
+
}>;
|
|
3374
|
+
/** How deep components may sit inside each other's slots; 1 = no nesting. */
|
|
3375
|
+
readonly maxDepth?: number;
|
|
2287
3376
|
}
|
|
2288
3377
|
|
|
2289
|
-
/** Parse the editor's inline markup into inline nodes. Unclosed markers stay text
|
|
2290
|
-
export declare const parseInlineMarkup: (input: string) => ReadonlyArray<RichInline>;
|
|
3378
|
+
/** Parse the editor's inline markup into inline nodes. Unclosed markers stay text; `{name|…}` is a style only for a name in `styles`. */
|
|
3379
|
+
export declare const parseInlineMarkup: (input: string, styles?: ReadonlyArray<string>) => ReadonlyArray<RichInline>;
|
|
3380
|
+
|
|
3381
|
+
/** An anchor from someone else's presence, or null when it is not one of the declared shapes. */
|
|
3382
|
+
export declare const parsePresenceAnchor: (value: unknown) => PresenceAnchor | null;
|
|
3383
|
+
|
|
3384
|
+
/** An intent from a URL or a message, or null when it is not one of the declared shape. Untrusted input. */
|
|
3385
|
+
export declare const parseSelectionIntent: (value: unknown) => SelectionIntent | null;
|
|
2291
3386
|
|
|
2292
3387
|
/** `sections.2` → `{ field: 'sections', index: 2 }`; `title` → `{ field: 'title' }`. */
|
|
2293
3388
|
export declare const parseSourcePath: (path: string) => {
|
|
@@ -2298,14 +3393,75 @@ export declare const parseSourcePath: (path: string) => {
|
|
|
2298
3393
|
/** Read an XLIFF 2.x file with one `<file>`: languages, notes and each unit's source and target. */
|
|
2299
3394
|
export declare const parseXliff: (xml: string) => XliffExchange;
|
|
2300
3395
|
|
|
3396
|
+
/** Effect form of {@link passStage}. */
|
|
3397
|
+
export declare const passStage: (...args: Parameters<typeof passStage_2>) => Effect<PassStageResult, never, never>;
|
|
3398
|
+
|
|
3399
|
+
/**
|
|
3400
|
+
* Pass a stage's exit gate: only its owner, with a note; only after every
|
|
3401
|
+
* earlier stage passed; and only when `gate` (the stage's objective check,
|
|
3402
|
+
* when it has one) holds.
|
|
3403
|
+
*/
|
|
3404
|
+
declare const passStage_2: (tx: DataStore, source: string, stage: MigrationStage, input: {
|
|
3405
|
+
readonly actorId: string;
|
|
3406
|
+
readonly note: string;
|
|
3407
|
+
readonly evidenceUri?: string;
|
|
3408
|
+
readonly gate?: boolean;
|
|
3409
|
+
}, now?: Date) => Promise<PassStageResult>;
|
|
3410
|
+
|
|
3411
|
+
export declare type PassStageResult = {
|
|
3412
|
+
readonly ok: true;
|
|
3413
|
+
} | {
|
|
3414
|
+
readonly ok: false;
|
|
3415
|
+
readonly reason: 'noOwner' | 'notOwner' | 'noNote' | 'earlierOpen' | 'gateNotMet' | 'passed';
|
|
3416
|
+
readonly stage?: MigrationStage;
|
|
3417
|
+
};
|
|
3418
|
+
|
|
2301
3419
|
/** Constrain a string field to a regex (source form, validated on save). */
|
|
2302
3420
|
export declare const pattern: (re: RegExp) => FieldRefinement;
|
|
2303
3421
|
|
|
3422
|
+
/** One suggestion: who made it and when, the blocks it touches, and the text it puts in and takes out. */
|
|
3423
|
+
export declare interface PendingChange {
|
|
3424
|
+
readonly id: string;
|
|
3425
|
+
readonly by: string;
|
|
3426
|
+
readonly at: string;
|
|
3427
|
+
readonly blockIds: ReadonlyArray<string>;
|
|
3428
|
+
readonly inserted: string;
|
|
3429
|
+
readonly deleted: string;
|
|
3430
|
+
/** Blocks it inserts or deletes whole (an image, a component, a paragraph). */
|
|
3431
|
+
readonly blocks: number;
|
|
3432
|
+
}
|
|
3433
|
+
|
|
3434
|
+
/** The suggestions in a document, in order of first appearance. */
|
|
3435
|
+
export declare const pendingChanges: (doc: RichDocument) => ReadonlyArray<PendingChange>;
|
|
3436
|
+
|
|
2304
3437
|
/** The first variant whose audience matches, or null for the original. Variants naming an unknown audience never match. */
|
|
2305
3438
|
export declare const pickVariant: <V extends {
|
|
2306
3439
|
readonly audience: string;
|
|
2307
3440
|
}>(variants: ReadonlyArray<V>, audiences: ReadonlyArray<Audience>, signals: AudienceSignals) => V | null;
|
|
2308
3441
|
|
|
3442
|
+
/** One inherited field as a release pinned it. */
|
|
3443
|
+
export declare interface PinnedInheritance {
|
|
3444
|
+
readonly how: InheritedHow;
|
|
3445
|
+
/** The document that decided it (the page, an ancestor), null for none. */
|
|
3446
|
+
readonly from: string | null;
|
|
3447
|
+
readonly value: unknown;
|
|
3448
|
+
/** A readable name for the value — a referenced document's title. */
|
|
3449
|
+
readonly label?: string | null;
|
|
3450
|
+
/** The revision of the referenced document that was live then, when the value is a reference. */
|
|
3451
|
+
readonly revisionId?: string | null;
|
|
3452
|
+
}
|
|
3453
|
+
|
|
3454
|
+
/** Effect form of {@link pinReleaseInheritance}. */
|
|
3455
|
+
export declare const pinReleaseInheritance: (...args: Parameters<typeof pinReleaseInheritance_2>) => Effect<boolean, never, never>;
|
|
3456
|
+
|
|
3457
|
+
/**
|
|
3458
|
+
* Record what a release's item inherited as it went live — run from an
|
|
3459
|
+
* `afterPublish` hook, where the tree is the one the release just made. Kept
|
|
3460
|
+
* on the item, so the release shows what its pages showed even after a
|
|
3461
|
+
* header changes, and a rollback says what it returns to.
|
|
3462
|
+
*/
|
|
3463
|
+
declare const pinReleaseInheritance_2: (tx: DataStore, releaseId: string, variantId: string, inherited: Readonly<Record<string, PinnedInheritance>>) => Promise<boolean>;
|
|
3464
|
+
|
|
2309
3465
|
export declare interface PipeableField extends FieldSchema {
|
|
2310
3466
|
readonly isOptional: boolean;
|
|
2311
3467
|
pipe(...refinements: ReadonlyArray<FieldRefinement>): PipeableField;
|
|
@@ -2349,6 +3505,31 @@ export declare const planBulk: (...args: Parameters<typeof planBulk_2>) => Effec
|
|
|
2349
3505
|
/** The dry run: what `action` would do to each item, changing nothing. */
|
|
2350
3506
|
declare const planBulk_2: (store: DataStore, types: ReadonlyArray<ContentType>, place: Place, action: BulkAction, items: ReadonlyArray<BulkItem>) => Promise<ReadonlyArray<PlannedItem>>;
|
|
2351
3507
|
|
|
3508
|
+
/** Effect form of {@link planExperiment}. */
|
|
3509
|
+
export declare const planExperiment: (...args: Parameters<typeof planExperiment_2>) => Effect<PlanExperimentResult, never, never>;
|
|
3510
|
+
|
|
3511
|
+
/**
|
|
3512
|
+
* Plan an experiment that starts when `releaseId` goes live — the experiment
|
|
3513
|
+
* is content state: it ships, and rolls back, with the release that carries
|
|
3514
|
+
* its page. The release must still be a draft or scheduled and publish this
|
|
3515
|
+
* page in this language; version B's keys are checked against the page's
|
|
3516
|
+
* draft. Started by {@link experimentReleaseHook}. In the caller's transaction.
|
|
3517
|
+
*/
|
|
3518
|
+
declare const planExperiment_2: (tx: DataStore, type: ContentType, scope: CmsScope, input: StartExperimentInput & {
|
|
3519
|
+
readonly releaseId: string;
|
|
3520
|
+
}) => Promise<PlanExperimentResult>;
|
|
3521
|
+
|
|
3522
|
+
export declare type PlanExperimentResult = {
|
|
3523
|
+
readonly ok: true;
|
|
3524
|
+
readonly id: string;
|
|
3525
|
+
} | {
|
|
3526
|
+
readonly ok: false;
|
|
3527
|
+
readonly reason: Exclude<StartExperimentResult, {
|
|
3528
|
+
ok: true;
|
|
3529
|
+
}>['reason'] | 'releaseNotEditable' | 'notInRelease' | 'alreadyPlanned';
|
|
3530
|
+
readonly fields?: ReadonlyArray<string>;
|
|
3531
|
+
};
|
|
3532
|
+
|
|
2352
3533
|
export declare interface PlannedItem extends BulkItem {
|
|
2353
3534
|
readonly documentId: string | null;
|
|
2354
3535
|
readonly title: string;
|
|
@@ -2367,6 +3548,76 @@ export declare const planPromotion: (...args: Parameters<typeof planPromotion_2>
|
|
|
2367
3548
|
/** What promoting `from` into `to` would change, per document and language. */
|
|
2368
3549
|
declare const planPromotion_2: (store: DataStore, types: ReadonlyArray<ContentType>, pair: EnvironmentPair) => Promise<ReadonlyArray<PromotionItem>>;
|
|
2369
3550
|
|
|
3551
|
+
/** Effect form of {@link planReferenceReplacement}. */
|
|
3552
|
+
export declare const planReferenceReplacement: (...args: Parameters<typeof planReferenceReplacement_2>) => Effect<ReplacementPlan, never, never>;
|
|
3553
|
+
|
|
3554
|
+
/**
|
|
3555
|
+
* The drafts that reference `from`, grouped per variant with every path —
|
|
3556
|
+
* what replacing it with `to` (a document of the same type) would change.
|
|
3557
|
+
*/
|
|
3558
|
+
declare const planReferenceReplacement_2: (store: DataStore, types: ReadonlyArray<ContentType>, from: {
|
|
3559
|
+
readonly type: string;
|
|
3560
|
+
readonly documentId: string;
|
|
3561
|
+
}, to: {
|
|
3562
|
+
readonly type: string;
|
|
3563
|
+
readonly documentId: string;
|
|
3564
|
+
}, scope: Pick<CmsScope, "site" | "environment">) => Promise<ReplacementPlan>;
|
|
3565
|
+
|
|
3566
|
+
export declare interface Portal {
|
|
3567
|
+
readonly id: string;
|
|
3568
|
+
readonly label: string | null;
|
|
3569
|
+
readonly expiresAt: Date;
|
|
3570
|
+
readonly revoked: boolean;
|
|
3571
|
+
readonly maxDownloads: number | null;
|
|
3572
|
+
readonly downloads: number;
|
|
3573
|
+
}
|
|
3574
|
+
|
|
3575
|
+
export declare type PortalDownloadResult = {
|
|
3576
|
+
readonly ok: true;
|
|
3577
|
+
readonly contentType: string;
|
|
3578
|
+
readonly tenantId: string | null;
|
|
3579
|
+
readonly downloadsLeft: number | null;
|
|
3580
|
+
} | {
|
|
3581
|
+
readonly ok: false;
|
|
3582
|
+
readonly reason: 'unknown' | 'expired' | 'revoked' | 'notInCollection' | 'limitReached';
|
|
3583
|
+
};
|
|
3584
|
+
|
|
3585
|
+
export declare type PresenceAnchor = {
|
|
3586
|
+
readonly kind: 'view';
|
|
3587
|
+
readonly view: string;
|
|
3588
|
+
} | {
|
|
3589
|
+
readonly kind: 'field';
|
|
3590
|
+
readonly field: string;
|
|
3591
|
+
} | {
|
|
3592
|
+
readonly kind: 'component';
|
|
3593
|
+
readonly field: string;
|
|
3594
|
+
readonly instanceId: string;
|
|
3595
|
+
readonly componentId: string;
|
|
3596
|
+
} | {
|
|
3597
|
+
readonly kind: 'slot';
|
|
3598
|
+
readonly field: string;
|
|
3599
|
+
readonly instanceId: string;
|
|
3600
|
+
readonly componentId: string;
|
|
3601
|
+
readonly prop: string;
|
|
3602
|
+
} | {
|
|
3603
|
+
readonly kind: 'selection';
|
|
3604
|
+
readonly field: string;
|
|
3605
|
+
readonly start: number;
|
|
3606
|
+
readonly end: number;
|
|
3607
|
+
} | {
|
|
3608
|
+
readonly kind: 'assetRegion';
|
|
3609
|
+
readonly x: number;
|
|
3610
|
+
readonly y: number;
|
|
3611
|
+
readonly width: number;
|
|
3612
|
+
readonly height: number;
|
|
3613
|
+
};
|
|
3614
|
+
|
|
3615
|
+
/**
|
|
3616
|
+
* The anchor of a focused control in a `ContentForm`: the field, or — inside
|
|
3617
|
+
* a placed component — the component, or the prop (slot) within it.
|
|
3618
|
+
*/
|
|
3619
|
+
export declare const presenceAnchorOf: (target: unknown) => PresenceAnchor | null;
|
|
3620
|
+
|
|
2370
3621
|
/** A verified preview claim. */
|
|
2371
3622
|
export declare interface PreviewClaim {
|
|
2372
3623
|
readonly type: string;
|
|
@@ -2398,11 +3649,9 @@ export declare type PreviewMessage = {
|
|
|
2398
3649
|
export declare class PreviewShareRejected extends PreviewShareRejected_base {
|
|
2399
3650
|
}
|
|
2400
3651
|
|
|
2401
|
-
declare const PreviewShareRejected_base: Schema_2.
|
|
2402
|
-
readonly
|
|
2403
|
-
}
|
|
2404
|
-
reason: Schema_2.Literal<["expiryInPast", "expiryTooFar"]>;
|
|
2405
|
-
}>;
|
|
3652
|
+
declare const PreviewShareRejected_base: Schema_2.Class<PreviewShareRejected, Schema_2.TaggedStruct<"PreviewShareRejected", {
|
|
3653
|
+
readonly reason: Schema_2.Literals<readonly ["expiryInPast", "expiryTooFar"]>;
|
|
3654
|
+
}>, YieldableError>;
|
|
2406
3655
|
|
|
2407
3656
|
/** Mint a signed preview token for a draft row. */
|
|
2408
3657
|
export declare const previewToken: (type: string, id: string, options?: {
|
|
@@ -2410,6 +3659,12 @@ export declare const previewToken: (type: string, id: string, options?: {
|
|
|
2410
3659
|
secret?: string;
|
|
2411
3660
|
}) => string;
|
|
2412
3661
|
|
|
3662
|
+
/** Effect form of {@link primaryDomain}. */
|
|
3663
|
+
export declare const primaryDomain: (...args: Parameters<typeof primaryDomain_2>) => Effect<string | null, never, never>;
|
|
3664
|
+
|
|
3665
|
+
/** The site's primary domain, or null. */
|
|
3666
|
+
declare const primaryDomain_2: (store: DataStore, site: string) => Promise<string | null>;
|
|
3667
|
+
|
|
2413
3668
|
/** Effect form of {@link promote}. */
|
|
2414
3669
|
export declare const promote: (...args: Parameters<typeof promote_2>) => Effect<PromotionResult, ContentValidationFailed | ContentNotFound | ContentIdConflict | RevisionMismatch | ReleaseNotEditable | ReviewRequired | ReferenceUnavailable, never>;
|
|
2415
3670
|
|
|
@@ -2450,6 +3705,28 @@ export declare interface PromotionSelection {
|
|
|
2450
3705
|
/** The hash an operation keeps of its prompt: enough to tell two prompts apart, nothing to read back. */
|
|
2451
3706
|
export declare const promptHash: (prompt: string) => string;
|
|
2452
3707
|
|
|
3708
|
+
/** Effect form of {@link proposeCandidate}. */
|
|
3709
|
+
export declare const proposeCandidate: (...args: Parameters<typeof proposeCandidate_2>) => Effect<{
|
|
3710
|
+
readonly ok: true;
|
|
3711
|
+
readonly id: string;
|
|
3712
|
+
} | {
|
|
3713
|
+
readonly ok: false;
|
|
3714
|
+
readonly reason: "notFound" | "empty";
|
|
3715
|
+
}, never, never>;
|
|
3716
|
+
|
|
3717
|
+
/** Keep a proposal for a draft — only the type's declared fields; the id of the candidate. */
|
|
3718
|
+
declare const proposeCandidate_2: (tx: DataStore, type: ContentType, variantId: string, scope: CmsScope, input: {
|
|
3719
|
+
readonly values: Readonly<Record<string, unknown>>;
|
|
3720
|
+
readonly operationId?: string | null;
|
|
3721
|
+
readonly suggestedBy?: string | null;
|
|
3722
|
+
}) => Promise<{
|
|
3723
|
+
readonly ok: true;
|
|
3724
|
+
readonly id: string;
|
|
3725
|
+
} | {
|
|
3726
|
+
readonly ok: false;
|
|
3727
|
+
readonly reason: "notFound" | "empty";
|
|
3728
|
+
}>;
|
|
3729
|
+
|
|
2453
3730
|
/** Effect-native `publish` (see {@link saveDraftEffect}). */
|
|
2454
3731
|
export declare const publish: (store: DataStore, type: ContentType, id: string, scope: CmsScope, options?: PublishOptions) => Effect_2.Effect<Row, ContentNotFound | RevisionMismatch | ReviewRequired | ReferenceUnavailable | ContentValidationFailed>;
|
|
2455
3732
|
|
|
@@ -2483,7 +3760,7 @@ export declare const publishDueReleases: (...args: Parameters<typeof publishDueR
|
|
|
2483
3760
|
* that went live. Hand it a store outside any transaction (a schedule's
|
|
2484
3761
|
* `app.store`).
|
|
2485
3762
|
*/
|
|
2486
|
-
declare const publishDueReleases_2: (store: DataStore, types: ReadonlyArray<ContentType>, now?: Date) => Promise<ReadonlyArray<string>>;
|
|
3763
|
+
declare const publishDueReleases_2: (store: DataStore, types: ReadonlyArray<ContentType>, now?: Date, options?: PublishReleaseOptions) => Promise<ReadonlyArray<string>>;
|
|
2487
3764
|
|
|
2488
3765
|
/** Options for {@link publish}. */
|
|
2489
3766
|
export declare interface PublishOptions {
|
|
@@ -2496,13 +3773,11 @@ export declare interface PublishOptions {
|
|
|
2496
3773
|
/** Effect form of {@link publishRelease}. */
|
|
2497
3774
|
export declare const publishRelease: (...args: Parameters<typeof publishRelease_2>) => Effect<Readonly<Record<string, unknown>>, ContentNotFound | ReleaseNotEditable | ReviewRequired | ReferenceUnavailable, never>;
|
|
2498
3775
|
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
*/
|
|
2505
|
-
declare const publishRelease_2: (tx: DataStore, types: ReadonlyArray<ContentType>, releaseId: string, now?: Date) => Promise<Row>;
|
|
3776
|
+
declare const publishRelease_2: (tx: DataStore, types: ReadonlyArray<ContentType>, releaseId: string, now?: Date, options?: PublishReleaseOptions) => Promise<Row>;
|
|
3777
|
+
|
|
3778
|
+
export declare interface PublishReleaseOptions {
|
|
3779
|
+
readonly afterPublish?: ReadonlyArray<ReleaseHook>;
|
|
3780
|
+
}
|
|
2506
3781
|
|
|
2507
3782
|
/** Effect-native `publishRevision` (see {@link saveDraftEffect}). */
|
|
2508
3783
|
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 +3794,32 @@ export declare interface PublishSeries {
|
|
|
2519
3794
|
|
|
2520
3795
|
/**
|
|
2521
3796
|
* What stops these values from being published: every `requiredToPublish()`
|
|
2522
|
-
* field that is empty (absent, null, or a blank string)
|
|
2523
|
-
*
|
|
3797
|
+
* field that is empty (absent, null, or a blank string), and every rich text
|
|
3798
|
+
* that still holds suggested changes. Browser-safe, so an editor can say so
|
|
3799
|
+
* before the publish is refused.
|
|
2524
3800
|
*/
|
|
2525
3801
|
export declare const publishViolations: (type: Pick<ContentType, "fields">, values: Readonly<Record<string, unknown>>) => ReadonlyArray<FieldViolation>;
|
|
2526
3802
|
|
|
3803
|
+
export declare type PurgeProvider = 'cloudflare' | 'fastly' | 'webhook';
|
|
3804
|
+
|
|
3805
|
+
export declare interface PurgeRequest {
|
|
3806
|
+
readonly url: string;
|
|
3807
|
+
readonly method: 'POST';
|
|
3808
|
+
readonly headers: Readonly<Record<string, string>>;
|
|
3809
|
+
readonly body?: string;
|
|
3810
|
+
}
|
|
3811
|
+
|
|
2527
3812
|
/** The purposes the components of `type` need, for a banner to ask about. */
|
|
2528
3813
|
export declare const purposesUsedBy: (type: {
|
|
2529
3814
|
readonly fields: Readonly<Record<string, FieldSchema>>;
|
|
2530
3815
|
}) => ReadonlySet<string>;
|
|
2531
3816
|
|
|
3817
|
+
/** When and where a quality rule is checked; `scope` is null where no place is known (every pack then applies). */
|
|
3818
|
+
export declare interface QualityContext {
|
|
3819
|
+
readonly now: Date;
|
|
3820
|
+
readonly scope: CmsScope | null;
|
|
3821
|
+
}
|
|
3822
|
+
|
|
2532
3823
|
export declare interface QualityException {
|
|
2533
3824
|
readonly id: string;
|
|
2534
3825
|
readonly ruleId: string;
|
|
@@ -2552,10 +3843,16 @@ export declare interface QualityFinding {
|
|
|
2552
3843
|
readonly field: string;
|
|
2553
3844
|
readonly message: string;
|
|
2554
3845
|
readonly blocking: boolean;
|
|
3846
|
+
/** The policy pack the rule belongs to, if any. */
|
|
3847
|
+
readonly pack: string | null;
|
|
2555
3848
|
}
|
|
2556
3849
|
|
|
2557
|
-
/**
|
|
2558
|
-
|
|
3850
|
+
/**
|
|
3851
|
+
* What a type's rules find in these values — pure, for the editor as for the
|
|
3852
|
+
* gate. With `at`, only the packs of that place apply and checks see that
|
|
3853
|
+
* moment; without, every rule is checked now.
|
|
3854
|
+
*/
|
|
3855
|
+
export declare const qualityFindings: (type: Pick<ContentType, "quality">, values: Readonly<Record<string, unknown>>, at?: QualityContext) => ReadonlyArray<QualityFinding>;
|
|
2559
3856
|
|
|
2560
3857
|
/** One quality check of a type — see `ContentTypeSpec.quality`. */
|
|
2561
3858
|
export declare interface QualityRule {
|
|
@@ -2567,8 +3864,16 @@ export declare interface QualityRule {
|
|
|
2567
3864
|
readonly message: string;
|
|
2568
3865
|
/** Whether publishing waits for a repair or an approved exception. Default true. */
|
|
2569
3866
|
readonly blocking?: boolean;
|
|
2570
|
-
/**
|
|
2571
|
-
|
|
3867
|
+
/**
|
|
3868
|
+
* The policy pack it belongs to (`'EU claims'`, `'German market'`) — shown
|
|
3869
|
+
* beside the finding. With `sites` / `locales` a pack applies only there;
|
|
3870
|
+
* absent, everywhere.
|
|
3871
|
+
*/
|
|
3872
|
+
readonly pack?: string;
|
|
3873
|
+
readonly sites?: ReadonlyArray<string>;
|
|
3874
|
+
readonly locales?: ReadonlyArray<string>;
|
|
3875
|
+
/** True when the values have the finding. Pure; `at` says when and where (a claim's evidence may have run out). */
|
|
3876
|
+
readonly check: (values: Readonly<Record<string, unknown>>, at: QualityContext) => boolean;
|
|
2572
3877
|
}
|
|
2573
3878
|
|
|
2574
3879
|
/** Effect form of {@link qualityViolations}. */
|
|
@@ -2581,6 +3886,25 @@ export declare const qualityViolations: (...args: Parameters<typeof qualityViola
|
|
|
2581
3886
|
*/
|
|
2582
3887
|
declare const qualityViolations_2: (store: DataStore, type: ContentType, variantId: string, scope: CmsScope, values: Readonly<Record<string, unknown>>, now?: Date) => Promise<ReadonlyArray<FieldViolation>>;
|
|
2583
3888
|
|
|
3889
|
+
/** One allowed query parameter. */
|
|
3890
|
+
export declare type QueryParam = {
|
|
3891
|
+
readonly name: string;
|
|
3892
|
+
readonly type: 'string';
|
|
3893
|
+
readonly maxLength?: number;
|
|
3894
|
+
readonly default?: string;
|
|
3895
|
+
} | {
|
|
3896
|
+
readonly name: string;
|
|
3897
|
+
readonly type: 'int';
|
|
3898
|
+
readonly min?: number;
|
|
3899
|
+
readonly max?: number;
|
|
3900
|
+
readonly default?: number;
|
|
3901
|
+
} | {
|
|
3902
|
+
readonly name: string;
|
|
3903
|
+
readonly type: 'enum';
|
|
3904
|
+
readonly values: ReadonlyArray<string>;
|
|
3905
|
+
readonly default?: string;
|
|
3906
|
+
};
|
|
3907
|
+
|
|
2584
3908
|
/**
|
|
2585
3909
|
* Raised when a create would take a tenant past a limit its app set — more
|
|
2586
3910
|
* documents, keys or environments than it may hold. Nothing was written;
|
|
@@ -2589,13 +3913,11 @@ declare const qualityViolations_2: (store: DataStore, type: ContentType, variant
|
|
|
2589
3913
|
export declare class QuotaExceeded extends QuotaExceeded_base {
|
|
2590
3914
|
}
|
|
2591
3915
|
|
|
2592
|
-
declare const QuotaExceeded_base: Schema_2.
|
|
2593
|
-
readonly
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
used: typeof Schema_2.Number;
|
|
2598
|
-
}>;
|
|
3916
|
+
declare const QuotaExceeded_base: Schema_2.Class<QuotaExceeded, Schema_2.TaggedStruct<"QuotaExceeded", {
|
|
3917
|
+
readonly quota: Schema_2.String;
|
|
3918
|
+
readonly limit: Schema_2.Number;
|
|
3919
|
+
readonly used: Schema_2.Number;
|
|
3920
|
+
}>, YieldableError>;
|
|
2599
3921
|
|
|
2600
3922
|
/** Effect form of {@link readChanges}. */
|
|
2601
3923
|
export declare const readChanges: (...args: Parameters<typeof readChanges_2>) => Effect<{
|
|
@@ -2637,6 +3959,16 @@ export declare const readEditorMessage: (event: VisualMessageEvent, session: Vis
|
|
|
2637
3959
|
/** The preview's message, or null for anything else (another origin, another session, another shape). */
|
|
2638
3960
|
export declare const readPreviewMessage: (event: VisualMessageEvent, session: VisualSession) => PreviewMessage | null;
|
|
2639
3961
|
|
|
3962
|
+
/**
|
|
3963
|
+
* What a reader gets at an address: the revision id it carries, `gone` when it
|
|
3964
|
+
* answers without content (404/410), or an HTTP status as text. The app
|
|
3965
|
+
* supplies it — a plain `fetch` through the public front door. An address that
|
|
3966
|
+
* shows more than its own entry (a page with the header and blocks it
|
|
3967
|
+
* includes) answers every revision it shows: a check of an included document
|
|
3968
|
+
* is observed there once its revision is among them.
|
|
3969
|
+
*/
|
|
3970
|
+
export declare type ReadRevision = (url: string) => Promise<string | ReadonlyArray<string>>;
|
|
3971
|
+
|
|
2640
3972
|
/** Effect form of {@link rebaseDraftTexts}. */
|
|
2641
3973
|
export declare const rebaseDraftTexts: (...args: Parameters<typeof rebaseDraftTexts_2>) => Effect<void, ContentNotFound, never>;
|
|
2642
3974
|
|
|
@@ -2680,6 +4012,19 @@ export declare const recordChange: (...args: Parameters<typeof recordChange_2>)
|
|
|
2680
4012
|
/** Append one change, in the caller's transaction. A type without `changeFeed` writes nothing. */
|
|
2681
4013
|
declare const recordChange_2: (tx: DataStore, type: ContentType, row: Row, scope: CmsScope, action: "published" | "unpublished", origin?: ChangeOrigin) => Promise<void>;
|
|
2682
4014
|
|
|
4015
|
+
/** Effect form of {@link recordCutoverIssues}. */
|
|
4016
|
+
export declare const recordCutoverIssues: (...args: Parameters<typeof recordCutoverIssues_2>) => Effect<number, never, never>;
|
|
4017
|
+
|
|
4018
|
+
/**
|
|
4019
|
+
* Record what a run found: an issue not seen before opens; one seen again
|
|
4020
|
+
* keeps its resolution (a closed issue stays closed). Returns how many are new.
|
|
4021
|
+
*/
|
|
4022
|
+
declare const recordCutoverIssues_2: (tx: DataStore, source: string, found: ReadonlyArray<{
|
|
4023
|
+
readonly key: string;
|
|
4024
|
+
readonly kind: string;
|
|
4025
|
+
readonly detail: string;
|
|
4026
|
+
}>, tenantId: string | null) => Promise<number>;
|
|
4027
|
+
|
|
2683
4028
|
/**
|
|
2684
4029
|
* Record a change: `before` is the form as it was. A change with the same key
|
|
2685
4030
|
* within `mergeMs` of the last step continues it (typing is one step). The
|
|
@@ -2701,6 +4046,12 @@ export declare const recordExperimentEvent: (...args: Parameters<typeof recordEx
|
|
|
2701
4046
|
*/
|
|
2702
4047
|
declare const recordExperimentEvent_2: (store: DataStore, experiment: Experiment, readerId: string, kind: "exposure" | "conversion", now?: Date) => Promise<boolean>;
|
|
2703
4048
|
|
|
4049
|
+
/** Effect form of {@link recordMigrationRecords}. */
|
|
4050
|
+
export declare const recordMigrationRecords: (...args: Parameters<typeof recordMigrationRecords_2>) => Effect<void, never, never>;
|
|
4051
|
+
|
|
4052
|
+
/** Record what a run did with each source record; a record seen again is updated, not doubled. */
|
|
4053
|
+
declare const recordMigrationRecords_2: (tx: DataStore, source: string, records: ReadonlyArray<MigrationRecord>, tenantId: string | null, now?: Date) => Promise<void>;
|
|
4054
|
+
|
|
2704
4055
|
/** Effect form of {@link recordPaths}. */
|
|
2705
4056
|
export declare const recordPaths: (...args: Parameters<typeof recordPaths_2>) => Effect<void, never, never>;
|
|
2706
4057
|
|
|
@@ -2712,6 +4063,16 @@ export declare const recordPaths: (...args: Parameters<typeof recordPaths_2>) =>
|
|
|
2712
4063
|
*/
|
|
2713
4064
|
declare const recordPaths_2: (tx: DataStore, type: ContentType, scope: CmsScope, tenantId: unknown) => Promise<void>;
|
|
2714
4065
|
|
|
4066
|
+
/** Effect form of {@link recordPortalDownload}. */
|
|
4067
|
+
export declare const recordPortalDownload: (...args: Parameters<typeof recordPortalDownload_2>) => Effect<PortalDownloadResult, never, never>;
|
|
4068
|
+
|
|
4069
|
+
/**
|
|
4070
|
+
* Count one download of a document through a portal. Refused once the cap is
|
|
4071
|
+
* reached; the count is a conditional update on the value read, retried on a
|
|
4072
|
+
* race, so two downloads at once never pass the cap.
|
|
4073
|
+
*/
|
|
4074
|
+
declare const recordPortalDownload_2: (store: DataStore, token: string, documentId: string, now?: Date) => Promise<PortalDownloadResult>;
|
|
4075
|
+
|
|
2715
4076
|
export declare type RecurrenceEvery = 'day' | 'week' | 'month';
|
|
2716
4077
|
|
|
2717
4078
|
/** What is wrong with a rule, in words; empty when it can be scheduled. */
|
|
@@ -2763,18 +4124,16 @@ export declare const referencesOf: (type: ContentType, values: Readonly<Record<s
|
|
|
2763
4124
|
export declare class ReferenceUnavailable extends ReferenceUnavailable_base {
|
|
2764
4125
|
}
|
|
2765
4126
|
|
|
2766
|
-
declare const ReferenceUnavailable_base: Schema_2.
|
|
2767
|
-
readonly
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
documentId: typeof Schema_2.String;
|
|
2775
|
-
reason: Schema_2.Literal<["blocked", "expired"]>;
|
|
4127
|
+
declare const ReferenceUnavailable_base: Schema_2.Class<ReferenceUnavailable, Schema_2.TaggedStruct<"ReferenceUnavailable", {
|
|
4128
|
+
readonly contentType: Schema_2.String;
|
|
4129
|
+
readonly id: Schema_2.String;
|
|
4130
|
+
readonly targets: Schema_2.$Array<Schema_2.Struct<{
|
|
4131
|
+
readonly path: Schema_2.String;
|
|
4132
|
+
readonly contentType: Schema_2.String;
|
|
4133
|
+
readonly documentId: Schema_2.String;
|
|
4134
|
+
readonly reason: Schema_2.Literals<readonly ["blocked", "expired", "notYet", "territory", "channel", "purpose"]>;
|
|
2776
4135
|
}>>;
|
|
2777
|
-
}>;
|
|
4136
|
+
}>, YieldableError>;
|
|
2778
4137
|
|
|
2779
4138
|
/** One live use of a document. */
|
|
2780
4139
|
export declare interface ReferenceUse {
|
|
@@ -2785,6 +4144,15 @@ export declare interface ReferenceUse {
|
|
|
2785
4144
|
readonly path: string;
|
|
2786
4145
|
}
|
|
2787
4146
|
|
|
4147
|
+
/** The rules of one region of a template. */
|
|
4148
|
+
export declare interface RegionRule {
|
|
4149
|
+
/** Only these components may be placed here (all the field allows, when unset). */
|
|
4150
|
+
readonly allowed?: ReadonlyArray<ComponentDefinition>;
|
|
4151
|
+
readonly required?: ReadonlyArray<ComponentDefinition>;
|
|
4152
|
+
/** The most components the region may hold. */
|
|
4153
|
+
readonly maxItems?: number;
|
|
4154
|
+
}
|
|
4155
|
+
|
|
2788
4156
|
/** Effect form of {@link regrantExtension}. */
|
|
2789
4157
|
export declare const regrantExtension: (...args: Parameters<typeof regrantExtension_2>) => Effect<ExtensionChange, never, never>;
|
|
2790
4158
|
|
|
@@ -2794,6 +4162,62 @@ declare const regrantExtension_2: (tx: DataStore, extensionId: string, consent:
|
|
|
2794
4162
|
/** The lifecycle of a release. */
|
|
2795
4163
|
export declare const RELEASE_STATUSES: readonly ["draft", "scheduled", "published", "failed"];
|
|
2796
4164
|
|
|
4165
|
+
/**
|
|
4166
|
+
* One address of a release's entry, and whether it shows what the release did.
|
|
4167
|
+
* An entry has its own address and, when other pages include it (a header, a
|
|
4168
|
+
* shared block), one per page a check was requested for.
|
|
4169
|
+
*/
|
|
4170
|
+
export declare interface ReleaseAddress {
|
|
4171
|
+
readonly contentType: string;
|
|
4172
|
+
readonly documentId: string;
|
|
4173
|
+
readonly locale: string;
|
|
4174
|
+
readonly action: 'publish' | 'unpublish';
|
|
4175
|
+
/** `unchecked`: the entry has no public address to read (no check was requested). */
|
|
4176
|
+
readonly status: 'observed' | 'pending' | 'stale' | 'unchecked';
|
|
4177
|
+
readonly url: string | null;
|
|
4178
|
+
readonly tookSeconds: number | null;
|
|
4179
|
+
readonly lastSeen: string | null;
|
|
4180
|
+
}
|
|
4181
|
+
|
|
4182
|
+
/** Whether a published release reached readers at every address of its entries. */
|
|
4183
|
+
export declare interface ReleaseCheckpoint {
|
|
4184
|
+
readonly releaseId: string;
|
|
4185
|
+
readonly status: string;
|
|
4186
|
+
readonly publishedAt: Date | null;
|
|
4187
|
+
readonly addresses: ReadonlyArray<ReleaseAddress>;
|
|
4188
|
+
/** Addresses that answer as the release left them, of those that are read. */
|
|
4189
|
+
readonly reached: number;
|
|
4190
|
+
readonly checked: number;
|
|
4191
|
+
/** Every read address answers as the release left it, and none is still pending. */
|
|
4192
|
+
readonly complete: boolean;
|
|
4193
|
+
}
|
|
4194
|
+
|
|
4195
|
+
/** Effect form of {@link releaseCheckpoint}. */
|
|
4196
|
+
export declare const releaseCheckpoint: (...args: Parameters<typeof releaseCheckpoint_2>) => Effect<ReleaseCheckpoint | null, never, never>;
|
|
4197
|
+
|
|
4198
|
+
/**
|
|
4199
|
+
* The release's checkpoint across addresses: for each entry, the newest
|
|
4200
|
+
* delivery check of every address requested when the release went out — the
|
|
4201
|
+
* publish answering with the revision the release pinned, the take-down no
|
|
4202
|
+
* longer answering — read through the public address. The pages that include
|
|
4203
|
+
* an entry count like its own address. A purge is not a checkpoint; an
|
|
4204
|
+
* observed address is. Null for a release the caller cannot see.
|
|
4205
|
+
*/
|
|
4206
|
+
declare const releaseCheckpoint_2: (store: DataStore, releaseId: string) => Promise<ReleaseCheckpoint | null>;
|
|
4207
|
+
|
|
4208
|
+
/**
|
|
4209
|
+
* Publish every entry of a release — in the CALLER'S transaction, so either
|
|
4210
|
+
* all of them go live or, when one fails, none does. Records what each variant
|
|
4211
|
+
* showed before (for rollback) and marks the release `published`. Throws
|
|
4212
|
+
* `ReleaseNotEditable` for a release that is already published or failed.
|
|
4213
|
+
*/
|
|
4214
|
+
/**
|
|
4215
|
+
* Work that belongs to a release going live — an experiment it starts, one its
|
|
4216
|
+
* rollback stops. Runs in the release's transaction after its items, so a hook
|
|
4217
|
+
* that fails fails the release.
|
|
4218
|
+
*/
|
|
4219
|
+
export declare type ReleaseHook = (tx: DataStore, release: Row, now: Date) => Promise<void>;
|
|
4220
|
+
|
|
2797
4221
|
/**
|
|
2798
4222
|
* Raised when a release is asked to change in a state that does not allow it:
|
|
2799
4223
|
* adding to or scheduling a release that is no longer a draft, publishing one
|
|
@@ -2802,12 +4226,10 @@ export declare const RELEASE_STATUSES: readonly ["draft", "scheduled", "publishe
|
|
|
2802
4226
|
export declare class ReleaseNotEditable extends ReleaseNotEditable_base {
|
|
2803
4227
|
}
|
|
2804
4228
|
|
|
2805
|
-
declare const ReleaseNotEditable_base: Schema_2.
|
|
2806
|
-
readonly
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
status: typeof Schema_2.String;
|
|
2810
|
-
}>;
|
|
4229
|
+
declare const ReleaseNotEditable_base: Schema_2.Class<ReleaseNotEditable, Schema_2.TaggedStruct<"ReleaseNotEditable", {
|
|
4230
|
+
readonly id: Schema_2.String;
|
|
4231
|
+
readonly status: Schema_2.String;
|
|
4232
|
+
}>, YieldableError>;
|
|
2811
4233
|
|
|
2812
4234
|
export declare type ReleaseStatus = (typeof RELEASE_STATUSES)[number];
|
|
2813
4235
|
|
|
@@ -2817,21 +4239,93 @@ export declare const releaseStatusOf: (...args: Parameters<typeof releaseStatusO
|
|
|
2817
4239
|
/** A release's status (`draft`, `scheduled`, `published`, …), or null when there is none of that id. */
|
|
2818
4240
|
declare const releaseStatusOf_2: (store: DataStore, releaseId: string) => Promise<string | null>;
|
|
2819
4241
|
|
|
4242
|
+
/** Effect form of {@link removeDomain}. */
|
|
4243
|
+
export declare const removeDomain: (...args: Parameters<typeof removeDomain_2>) => Effect<{
|
|
4244
|
+
readonly ok: true;
|
|
4245
|
+
} | {
|
|
4246
|
+
readonly ok: false;
|
|
4247
|
+
readonly reason: "notFound" | "primary";
|
|
4248
|
+
}, never, never>;
|
|
4249
|
+
|
|
4250
|
+
/** Remove a domain. The primary one is removed only after another took its place. */
|
|
4251
|
+
declare const removeDomain_2: (tx: DataStore, domainId: string) => Promise<{
|
|
4252
|
+
readonly ok: true;
|
|
4253
|
+
} | {
|
|
4254
|
+
readonly ok: false;
|
|
4255
|
+
readonly reason: "notFound" | "primary";
|
|
4256
|
+
}>;
|
|
4257
|
+
|
|
4258
|
+
/** Effect form of {@link removeFromCollection}. */
|
|
4259
|
+
export declare const removeFromCollection: (...args: Parameters<typeof removeFromCollection_2>) => Effect<boolean, never, never>;
|
|
4260
|
+
|
|
4261
|
+
/** Take a document out of a collection. */
|
|
4262
|
+
declare const removeFromCollection_2: (tx: DataStore, collectionId: string, documentId: string) => Promise<boolean>;
|
|
4263
|
+
|
|
2820
4264
|
/** Effect form of {@link removeGlossaryTerm}. */
|
|
2821
4265
|
export declare const removeGlossaryTerm: (...args: Parameters<typeof removeGlossaryTerm_2>) => Effect<boolean, never, never>;
|
|
2822
4266
|
|
|
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>;
|
|
4267
|
+
/** Remove an entry; false when there was none in this workspace. */
|
|
4268
|
+
declare const removeGlossaryTerm_2: (tx: DataStore, tenantId: string, entryId: string) => Promise<boolean>;
|
|
4269
|
+
|
|
4270
|
+
/** Effect form of {@link removeRedirect}. */
|
|
4271
|
+
export declare const removeRedirect: (...args: Parameters<typeof removeRedirect_2>) => Effect<boolean, never, never>;
|
|
4272
|
+
|
|
4273
|
+
/**
|
|
4274
|
+
* Remove the redirect from `fromPath` in `scope`. True when there was one. A
|
|
4275
|
+
* page that had the address and is no longer live still answers it as gone
|
|
4276
|
+
* (`goneAt`). In the caller's transaction.
|
|
4277
|
+
*/
|
|
4278
|
+
declare const removeRedirect_2: (tx: DataStore, type: ContentType, scope: CmsScope, fromPath: string) => Promise<boolean>;
|
|
4279
|
+
|
|
4280
|
+
/** Effect form of {@link reopenStage}. */
|
|
4281
|
+
export declare const reopenStage: (...args: Parameters<typeof reopenStage_2>) => Effect<number, never, never>;
|
|
4282
|
+
|
|
4283
|
+
/**
|
|
4284
|
+
* Reopen a stage and every stage after it — the fallback: a failure returns
|
|
4285
|
+
* the migration to the last stage that is still proven.
|
|
4286
|
+
*/
|
|
4287
|
+
declare const reopenStage_2: (tx: DataStore, source: string, stage: MigrationStage) => Promise<number>;
|
|
4288
|
+
|
|
4289
|
+
/** One draft a replacement would change. */
|
|
4290
|
+
export declare interface ReplacementItem {
|
|
4291
|
+
readonly type: string;
|
|
4292
|
+
readonly documentId: string;
|
|
4293
|
+
readonly variantId: string;
|
|
4294
|
+
readonly locale: string;
|
|
4295
|
+
/** The revision the plan saw — an edit in between is not overwritten. */
|
|
4296
|
+
readonly revisionId: string | null;
|
|
4297
|
+
readonly paths: ReadonlyArray<string>;
|
|
4298
|
+
}
|
|
4299
|
+
|
|
4300
|
+
export declare type ReplacementPlan = {
|
|
4301
|
+
readonly ok: true;
|
|
4302
|
+
readonly items: ReadonlyArray<ReplacementItem>;
|
|
4303
|
+
} | {
|
|
4304
|
+
readonly ok: false;
|
|
4305
|
+
readonly reason: 'sameDocument' | 'typeMismatch';
|
|
4306
|
+
};
|
|
4307
|
+
|
|
4308
|
+
/** What replacing one item did. */
|
|
4309
|
+
export declare interface ReplacementResult extends ReplacementItem {
|
|
4310
|
+
readonly outcome: 'done' | 'failed';
|
|
4311
|
+
readonly reason: 'revisionMoved' | 'incomplete' | 'notFound' | 'pathGone' | 'failed' | null;
|
|
4312
|
+
/** The new draft revision, when done. */
|
|
4313
|
+
readonly newRevisionId: string | null;
|
|
4314
|
+
/** For `incomplete`, the fields a rule refused; for `failed`, the error. */
|
|
4315
|
+
readonly detail: ReadonlyArray<string>;
|
|
4316
|
+
}
|
|
2825
4317
|
|
|
2826
|
-
/** Effect form of {@link
|
|
2827
|
-
export declare const
|
|
4318
|
+
/** Effect form of {@link replaceReferences}. */
|
|
4319
|
+
export declare const replaceReferences: (...args: Parameters<typeof replaceReferences_2>) => Effect<readonly ReplacementResult[], never, never>;
|
|
2828
4320
|
|
|
2829
4321
|
/**
|
|
2830
|
-
*
|
|
2831
|
-
*
|
|
2832
|
-
*
|
|
4322
|
+
* Point every planned draft at `to` instead: per item, a new draft revision
|
|
4323
|
+
* against the revision the plan saw, each in its own transaction with its
|
|
4324
|
+
* own result. Nothing is published — the changes go live like any edit. It
|
|
4325
|
+
* opens those transactions itself, so call it outside one: from an action or
|
|
4326
|
+
* a schedule, not inside a mutation.
|
|
2833
4327
|
*/
|
|
2834
|
-
declare const
|
|
4328
|
+
declare const replaceReferences_2: (store: DataStore, types: ReadonlyArray<ContentType>, items: ReadonlyArray<ReplacementItem>, to: string, scope: Pick<CmsScope, "site" | "environment">) => Promise<ReadonlyArray<ReplacementResult>>;
|
|
2835
4329
|
|
|
2836
4330
|
/**
|
|
2837
4331
|
* Replace the text in `[start, end)` with `text` (a paste, a typed line
|
|
@@ -2846,6 +4340,24 @@ export declare const requestChanges: (...args: Parameters<typeof requestChanges_
|
|
|
2846
4340
|
/** Send the revision in review back with a note. Same checks as approving, minus self-approval. */
|
|
2847
4341
|
declare const requestChanges_2: (store: DataStore, type: ContentType, variantId: string, scope: CmsScope, options: Omit<DecideOptions, "allowSelfApproval">) => Promise<Row>;
|
|
2848
4342
|
|
|
4343
|
+
/** Effect form of {@link requestDeliveryCheck}. */
|
|
4344
|
+
export declare const requestDeliveryCheck: (...args: Parameters<typeof requestDeliveryCheck_2>) => Effect<string, never, never>;
|
|
4345
|
+
|
|
4346
|
+
/**
|
|
4347
|
+
* Record what a public address must show after this change, in the caller's
|
|
4348
|
+
* transaction. An earlier pending check of the same document, language and
|
|
4349
|
+
* address is closed as stale: the newer change is what counts now.
|
|
4350
|
+
*/
|
|
4351
|
+
declare const requestDeliveryCheck_2: (tx: DataStore, input: {
|
|
4352
|
+
readonly contentType: string;
|
|
4353
|
+
readonly documentId: string;
|
|
4354
|
+
readonly locale: string;
|
|
4355
|
+
readonly kind: "publish" | "unpublish";
|
|
4356
|
+
readonly revisionId?: string | null;
|
|
4357
|
+
readonly url: string;
|
|
4358
|
+
readonly tenantId?: string | null;
|
|
4359
|
+
}, now?: Date) => Promise<string>;
|
|
4360
|
+
|
|
2849
4361
|
export declare type RequestExceptionResult = {
|
|
2850
4362
|
readonly ok: true;
|
|
2851
4363
|
readonly id: string;
|
|
@@ -2874,6 +4386,18 @@ declare const requestReview_2: (store: DataStore, type: ContentType, variantId:
|
|
|
2874
4386
|
readonly note?: string;
|
|
2875
4387
|
}) => Promise<Row>;
|
|
2876
4388
|
|
|
4389
|
+
/** The document with each suggestion accepted, rejected or kept, as `decide` says. */
|
|
4390
|
+
export declare const resolveChanges: (doc: RichDocument, decide: (change: RichChange) => ChangeDecision) => RichDocument;
|
|
4391
|
+
|
|
4392
|
+
/** Effect form of {@link resolveCutoverIssue}. */
|
|
4393
|
+
export declare const resolveCutoverIssue: (...args: Parameters<typeof resolveCutoverIssue_2>) => Effect<ResolveIssueResult, never, never>;
|
|
4394
|
+
|
|
4395
|
+
/** Close an issue with why it may stand (an item type deliberately not migrated, a file replaced by hand). */
|
|
4396
|
+
declare const resolveCutoverIssue_2: (tx: DataStore, issueId: string, input: {
|
|
4397
|
+
readonly resolution: string;
|
|
4398
|
+
readonly actorId: string;
|
|
4399
|
+
}, now?: Date) => Promise<ResolveIssueResult>;
|
|
4400
|
+
|
|
2877
4401
|
/** One published entry found by {@link CmsApi.resolve}, with where it came from. */
|
|
2878
4402
|
export declare interface ResolvedEntry {
|
|
2879
4403
|
/** The published row that answers the request. */
|
|
@@ -2887,6 +4411,18 @@ export declare interface ResolvedEntry {
|
|
|
2887
4411
|
readonly fallback: boolean;
|
|
2888
4412
|
}
|
|
2889
4413
|
|
|
4414
|
+
export declare type ResolvedPortal = {
|
|
4415
|
+
readonly ok: true;
|
|
4416
|
+
readonly portal: Portal;
|
|
4417
|
+
readonly tenantId: string | null;
|
|
4418
|
+
readonly collection: Collection;
|
|
4419
|
+
readonly items: ReadonlyArray<CollectionItem>;
|
|
4420
|
+
readonly downloadsLeft: number | null;
|
|
4421
|
+
} | {
|
|
4422
|
+
readonly ok: false;
|
|
4423
|
+
readonly reason: 'unknown' | 'expired' | 'revoked';
|
|
4424
|
+
};
|
|
4425
|
+
|
|
2890
4426
|
/** What a preview link shows. */
|
|
2891
4427
|
export declare type ResolvedPreviewShare = {
|
|
2892
4428
|
readonly ok: true;
|
|
@@ -2904,6 +4440,13 @@ export declare type ResolvedPreviewShare = {
|
|
|
2904
4440
|
readonly reason: 'unknown' | 'expired' | 'revoked';
|
|
2905
4441
|
};
|
|
2906
4442
|
|
|
4443
|
+
export declare type ResolveIssueResult = {
|
|
4444
|
+
readonly ok: true;
|
|
4445
|
+
} | {
|
|
4446
|
+
readonly ok: false;
|
|
4447
|
+
readonly reason: 'notFound' | 'noReason' | 'alreadyResolved';
|
|
4448
|
+
};
|
|
4449
|
+
|
|
2907
4450
|
/** Effect form of {@link resolveMedia}. */
|
|
2908
4451
|
export declare const resolveMedia: (...args: Parameters<typeof resolveMedia_2>) => Effect<Record<string, unknown>, never, never>;
|
|
2909
4452
|
|
|
@@ -2936,6 +4479,12 @@ export declare interface ResolveOptions {
|
|
|
2936
4479
|
readonly fallback?: ReadonlyArray<string>;
|
|
2937
4480
|
}
|
|
2938
4481
|
|
|
4482
|
+
/** Effect form of {@link resolvePortal}. */
|
|
4483
|
+
export declare const resolvePortal: (...args: Parameters<typeof resolvePortal_2>) => Effect<ResolvedPortal, never, never>;
|
|
4484
|
+
|
|
4485
|
+
/** What a portal link shows. The token is the authorization: this read crosses tenants. */
|
|
4486
|
+
declare const resolvePortal_2: (store: DataStore, token: string, now?: Date) => Promise<ResolvedPortal>;
|
|
4487
|
+
|
|
2939
4488
|
/** Effect form of {@link resolvePreviewShare}. */
|
|
2940
4489
|
export declare const resolvePreviewShare: (...args: Parameters<typeof resolvePreviewShare_2>) => Effect<ResolvedPreviewShare, ContentNotFound | PreviewShareRejected, never>;
|
|
2941
4490
|
|
|
@@ -3015,13 +4564,11 @@ declare const reviewLog_2: (store: DataStore, type: ContentType, variantId: stri
|
|
|
3015
4564
|
export declare class ReviewRequired extends ReviewRequired_base {
|
|
3016
4565
|
}
|
|
3017
4566
|
|
|
3018
|
-
declare const ReviewRequired_base: Schema_2.
|
|
3019
|
-
readonly
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
revisionId: typeof Schema_2.String;
|
|
3024
|
-
}>;
|
|
4567
|
+
declare const ReviewRequired_base: Schema_2.Class<ReviewRequired, Schema_2.TaggedStruct<"ReviewRequired", {
|
|
4568
|
+
readonly contentType: Schema_2.String;
|
|
4569
|
+
readonly id: Schema_2.String;
|
|
4570
|
+
readonly revisionId: Schema_2.String;
|
|
4571
|
+
}>, YieldableError>;
|
|
3025
4572
|
|
|
3026
4573
|
/** Effect form of {@link reviewRequiredFor}. */
|
|
3027
4574
|
export declare const reviewRequiredFor: (...args: Parameters<typeof reviewRequiredFor_2>) => Effect<boolean, never, never>;
|
|
@@ -3058,13 +4605,18 @@ declare const reviewStatus_2: (store: DataStore, type: ContentType, variantId: s
|
|
|
3058
4605
|
export declare class ReviewStepRefused extends ReviewStepRefused_base {
|
|
3059
4606
|
}
|
|
3060
4607
|
|
|
3061
|
-
declare const ReviewStepRefused_base: Schema_2.
|
|
3062
|
-
readonly
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
4608
|
+
declare const ReviewStepRefused_base: Schema_2.Class<ReviewStepRefused, Schema_2.TaggedStruct<"ReviewStepRefused", {
|
|
4609
|
+
readonly contentType: Schema_2.String;
|
|
4610
|
+
readonly id: Schema_2.String;
|
|
4611
|
+
readonly reason: Schema_2.Literals<readonly ["notInReview", "selfApproval", "ambiguousOrder"]>;
|
|
4612
|
+
}>, YieldableError>;
|
|
4613
|
+
|
|
4614
|
+
export declare interface ReviewWorkflow {
|
|
4615
|
+
readonly id: string;
|
|
4616
|
+
/** Raise it whenever the steps change: an instance keeps the version it started with. */
|
|
4617
|
+
readonly version: number;
|
|
4618
|
+
readonly steps: ReadonlyArray<WorkflowStep>;
|
|
4619
|
+
}
|
|
3068
4620
|
|
|
3069
4621
|
/**
|
|
3070
4622
|
* Raised by `publish` when the caller pinned a revision (`{ revisionId }`)
|
|
@@ -3074,14 +4626,54 @@ declare const ReviewStepRefused_base: Schema_2.TaggedErrorClass<ReviewStepRefuse
|
|
|
3074
4626
|
export declare class RevisionMismatch extends RevisionMismatch_base {
|
|
3075
4627
|
}
|
|
3076
4628
|
|
|
3077
|
-
declare const RevisionMismatch_base: Schema_2.
|
|
3078
|
-
readonly
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
4629
|
+
declare const RevisionMismatch_base: Schema_2.Class<RevisionMismatch, Schema_2.TaggedStruct<"RevisionMismatch", {
|
|
4630
|
+
readonly contentType: Schema_2.String;
|
|
4631
|
+
readonly id: Schema_2.String;
|
|
4632
|
+
readonly expected: Schema_2.String;
|
|
4633
|
+
readonly actual: Schema_2.String;
|
|
4634
|
+
}>, YieldableError>;
|
|
4635
|
+
|
|
4636
|
+
/** A value attributed to the revision live when it was counted. */
|
|
4637
|
+
export declare interface RevisionShare extends LiveStretch {
|
|
4638
|
+
readonly value: number;
|
|
4639
|
+
readonly days: number;
|
|
4640
|
+
}
|
|
4641
|
+
|
|
4642
|
+
/** Effect form of {@link revisionsReferencing}. */
|
|
4643
|
+
export declare const revisionsReferencing: (...args: Parameters<typeof revisionsReferencing_2>) => Effect<readonly RevisionUse[], never, never>;
|
|
4644
|
+
|
|
4645
|
+
/**
|
|
4646
|
+
* Every saved revision, of any document in the site and environment, that
|
|
4647
|
+
* referenced `target` — newest first. Answers "what pointed here, and since
|
|
4648
|
+
* when", including uses since removed.
|
|
4649
|
+
*/
|
|
4650
|
+
declare const revisionsReferencing_2: (store: DataStore, types: ReadonlyArray<ContentType>, target: {
|
|
4651
|
+
readonly type: string;
|
|
4652
|
+
readonly documentId: string;
|
|
4653
|
+
}, scope: Pick<CmsScope, "site" | "environment">) => Promise<ReadonlyArray<RevisionUse>>;
|
|
4654
|
+
|
|
4655
|
+
/** Effect form of {@link revisionTimeline}. */
|
|
4656
|
+
export declare const revisionTimeline: (...args: Parameters<typeof revisionTimeline_2>) => Effect<readonly LiveStretch[], never, never>;
|
|
4657
|
+
|
|
4658
|
+
/**
|
|
4659
|
+
* When each revision of one document was live in one place, from its
|
|
4660
|
+
* changes: a publish opens a stretch (with the release that took it live), the
|
|
4661
|
+
* next publish or a take-down closes it. For `attributeToRevisions` (metrics.ts).
|
|
4662
|
+
*/
|
|
4663
|
+
declare const revisionTimeline_2: (store: DataStore, target: {
|
|
4664
|
+
readonly contentType: string;
|
|
4665
|
+
readonly documentId: string;
|
|
4666
|
+
}, scope: CmsScope) => Promise<ReadonlyArray<LiveStretch>>;
|
|
4667
|
+
|
|
4668
|
+
/** One saved revision that referenced a document — the history of its uses. */
|
|
4669
|
+
export declare interface RevisionUse {
|
|
4670
|
+
readonly sourceType: string;
|
|
4671
|
+
readonly sourceDocumentId: string;
|
|
4672
|
+
readonly locale: string;
|
|
4673
|
+
readonly revisionId: string;
|
|
4674
|
+
readonly number: number;
|
|
4675
|
+
readonly path: string;
|
|
4676
|
+
}
|
|
3085
4677
|
|
|
3086
4678
|
/** Effect form of {@link revokeExtension}. */
|
|
3087
4679
|
export declare const revokeExtension: (...args: Parameters<typeof revokeExtension_2>) => Effect<ExtensionChange, never, never>;
|
|
@@ -3089,25 +4681,39 @@ export declare const revokeExtension: (...args: Parameters<typeof revokeExtensio
|
|
|
3089
4681
|
/** Take every capability away; the install and its data stay. */
|
|
3090
4682
|
declare const revokeExtension_2: (tx: DataStore, extensionId: string) => Promise<ExtensionChange>;
|
|
3091
4683
|
|
|
4684
|
+
/** Effect form of {@link revokePortal}. */
|
|
4685
|
+
export declare const revokePortal: (...args: Parameters<typeof revokePortal_2>) => Effect<boolean, never, never>;
|
|
4686
|
+
|
|
4687
|
+
/** Revoke a portal: the link stops working at once. */
|
|
4688
|
+
declare const revokePortal_2: (tx: DataStore, portalId: string, now?: Date) => Promise<boolean>;
|
|
4689
|
+
|
|
3092
4690
|
/** Effect form of {@link revokePreviewShare}. */
|
|
3093
4691
|
export declare const revokePreviewShare: (...args: Parameters<typeof revokePreviewShare_2>) => Effect<void, ContentNotFound | PreviewShareRejected, never>;
|
|
3094
4692
|
|
|
3095
4693
|
/** Revoke one of the caller's shares; the link stops working at once. */
|
|
3096
4694
|
declare const revokePreviewShare_2: (store: DataStore, shareId: string, now?: Date) => Promise<void>;
|
|
3097
4695
|
|
|
3098
|
-
/** A top-level block. `id` is stable across edits, moves and translations.
|
|
4696
|
+
/** A top-level block. `id` is stable across edits, moves and translations. `style`
|
|
4697
|
+
* names a token of the profile's style group; `change` marks a block suggested
|
|
4698
|
+
* for insertion or deletion. */
|
|
3099
4699
|
export declare type RichBlock = {
|
|
3100
4700
|
readonly id: string;
|
|
4701
|
+
readonly change?: RichChange;
|
|
3101
4702
|
readonly type: 'paragraph';
|
|
3102
4703
|
readonly content: ReadonlyArray<RichInline>;
|
|
4704
|
+
readonly style?: string;
|
|
3103
4705
|
} | {
|
|
3104
4706
|
readonly id: string;
|
|
4707
|
+
readonly change?: RichChange;
|
|
3105
4708
|
readonly type: 'heading';
|
|
3106
4709
|
readonly level: 2 | 3;
|
|
3107
4710
|
readonly content: ReadonlyArray<RichInline>;
|
|
4711
|
+
readonly style?: string;
|
|
3108
4712
|
} | {
|
|
3109
4713
|
readonly id: string;
|
|
4714
|
+
readonly change?: RichChange;
|
|
3110
4715
|
readonly type: 'list';
|
|
4716
|
+
readonly style?: string;
|
|
3111
4717
|
readonly ordered: boolean;
|
|
3112
4718
|
readonly items: ReadonlyArray<ReadonlyArray<RichInline>>;
|
|
3113
4719
|
/** How deep each item sits (0 at the top, at most `MAX_LIST_LEVEL`), one per item; absent: all at the top.
|
|
@@ -3118,6 +4724,7 @@ export declare type RichBlock = {
|
|
|
3118
4724
|
readonly sublists?: ReadonlyArray<ListKind>;
|
|
3119
4725
|
} | {
|
|
3120
4726
|
readonly id: string;
|
|
4727
|
+
readonly change?: RichChange;
|
|
3121
4728
|
readonly type: 'table';
|
|
3122
4729
|
/** True when the first row holds the column headers. */
|
|
3123
4730
|
readonly header: boolean;
|
|
@@ -3126,15 +4733,67 @@ export declare type RichBlock = {
|
|
|
3126
4733
|
/** An image asset (by its documentId) with an optional caption. */
|
|
3127
4734
|
| {
|
|
3128
4735
|
readonly id: string;
|
|
4736
|
+
readonly change?: RichChange;
|
|
3129
4737
|
readonly type: 'image';
|
|
3130
4738
|
readonly asset: string;
|
|
3131
4739
|
readonly caption?: string;
|
|
4740
|
+
}
|
|
4741
|
+
/** A file to download — an asset (by its documentId) from the media library — and the text its link shows. */
|
|
4742
|
+
| {
|
|
4743
|
+
readonly id: string;
|
|
4744
|
+
readonly change?: RichChange;
|
|
4745
|
+
readonly type: 'file';
|
|
4746
|
+
readonly asset: string;
|
|
4747
|
+
readonly label: string;
|
|
4748
|
+
}
|
|
4749
|
+
/** A component the profile allows, placed between blocks; `id` is its instance id. */
|
|
4750
|
+
| {
|
|
4751
|
+
readonly id: string;
|
|
4752
|
+
readonly change?: RichChange;
|
|
4753
|
+
readonly type: 'component';
|
|
4754
|
+
readonly componentId: string;
|
|
4755
|
+
readonly props: Readonly<Record<string, unknown>>;
|
|
4756
|
+
/** The definition's fingerprint when it was last saved. */
|
|
4757
|
+
readonly fingerprint?: string;
|
|
4758
|
+
};
|
|
4759
|
+
|
|
4760
|
+
/** A kind of block. */
|
|
4761
|
+
export declare type RichBlockKind = RichBlock['type'];
|
|
4762
|
+
|
|
4763
|
+
/** The field and block a text key names, or null for a plain field's key. */
|
|
4764
|
+
export declare const richBlockOfKey: (key: string) => {
|
|
4765
|
+
readonly field: string;
|
|
4766
|
+
readonly blockId: string;
|
|
4767
|
+
} | null;
|
|
4768
|
+
|
|
4769
|
+
/** The text key of one block of a rich text: `<field>#<blockId>`. */
|
|
4770
|
+
export declare const richBlockTextKey: (field: string, blockId: string) => string;
|
|
4771
|
+
|
|
4772
|
+
/** A suggested change (track changes): text or a block someone proposes to insert
|
|
4773
|
+
* or delete, until it is accepted or rejected (trackChanges.ts). */
|
|
4774
|
+
export declare interface RichChange {
|
|
4775
|
+
readonly id: string;
|
|
4776
|
+
readonly kind: 'insert' | 'delete';
|
|
4777
|
+
/** Who suggested it. */
|
|
4778
|
+
readonly by: string;
|
|
4779
|
+
/** When, as an ISO timestamp. */
|
|
4780
|
+
readonly at: string;
|
|
4781
|
+
}
|
|
4782
|
+
|
|
4783
|
+
/** How a contact is given: a published contact point (its documentId), or a one-off address or number. */
|
|
4784
|
+
export declare type RichContact = {
|
|
4785
|
+
readonly target: string;
|
|
4786
|
+
} | {
|
|
4787
|
+
readonly channel: 'email' | 'phone';
|
|
4788
|
+
readonly value: string;
|
|
3132
4789
|
};
|
|
3133
4790
|
|
|
3134
4791
|
/** A rich document. */
|
|
3135
4792
|
export declare interface RichDocument {
|
|
3136
4793
|
readonly type: 'doc';
|
|
3137
4794
|
readonly blocks: ReadonlyArray<RichBlock>;
|
|
4795
|
+
/** The profile it was saved against (`article@2`). */
|
|
4796
|
+
readonly profile?: string;
|
|
3138
4797
|
}
|
|
3139
4798
|
|
|
3140
4799
|
export declare const RichDocumentEditor: (props: RichDocumentEditorProps) => ReactNode;
|
|
@@ -3154,6 +4813,8 @@ export declare interface RichDocumentEditorProps extends WidgetProps {
|
|
|
3154
4813
|
* tables keep their lines either way.
|
|
3155
4814
|
*/
|
|
3156
4815
|
readonly surface?: 'markup' | 'visual';
|
|
4816
|
+
/** Renders the props form of a component between the blocks (`ContentForm` passes its own, nested). */
|
|
4817
|
+
readonly renderComponentProps?: (definition: ComponentDefinition, props: Readonly<Record<string, unknown>>, onChange: (props: Readonly<Record<string, unknown>>) => void) => ReactNode;
|
|
3157
4818
|
}
|
|
3158
4819
|
|
|
3159
4820
|
/** Translate a Contentful rich-text document, and say what could not be translated. */
|
|
@@ -3171,6 +4832,15 @@ export declare type RichDocumentPicker = (props: {
|
|
|
3171
4832
|
readonly type: string;
|
|
3172
4833
|
readonly value: string;
|
|
3173
4834
|
readonly onChange: (documentId: string) => void;
|
|
4835
|
+
/** 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. */
|
|
4836
|
+
readonly target?: {
|
|
4837
|
+
readonly field: string;
|
|
4838
|
+
readonly blockId?: string;
|
|
4839
|
+
};
|
|
4840
|
+
/** 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`. */
|
|
4841
|
+
readonly role?: 'image' | 'file' | 'link' | 'contact';
|
|
4842
|
+
/** 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`). */
|
|
4843
|
+
readonly labelledBy?: string;
|
|
3174
4844
|
}) => ReactNode;
|
|
3175
4845
|
|
|
3176
4846
|
/** One problem with a rich document, at a path below the field. */
|
|
@@ -3180,7 +4850,7 @@ export declare interface RichDocumentProblem {
|
|
|
3180
4850
|
readonly message: string;
|
|
3181
4851
|
}
|
|
3182
4852
|
|
|
3183
|
-
/** Everything wrong with `value` as a rich document under `options
|
|
4853
|
+
/** Everything wrong with `value` as a rich document under `options` (component props are checked by the caller). */
|
|
3184
4854
|
export declare const richDocumentProblems: (path: string, value: unknown, options: RichTextOptions) => ReadonlyArray<RichDocumentProblem>;
|
|
3185
4855
|
|
|
3186
4856
|
/** A document reference found in a rich document. */
|
|
@@ -3194,7 +4864,7 @@ export declare interface RichDocumentReference {
|
|
|
3194
4864
|
export declare const richDocumentReferences: (path: string, doc: RichDocument, options: RichTextOptions) => ReadonlyArray<RichDocumentReference>;
|
|
3195
4865
|
|
|
3196
4866
|
/** 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;
|
|
4867
|
+
export declare const RichDocumentView: ({ document, hrefOf, renderImage, contactHrefOf, renderComponent, fileHrefOf }: RichDocumentViewProps) => ReactNode;
|
|
3198
4868
|
|
|
3199
4869
|
export declare interface RichDocumentViewProps {
|
|
3200
4870
|
/** A stored `Schema.RichText()` value (a plain string renders as paragraphs). */
|
|
@@ -3206,19 +4876,37 @@ export declare interface RichDocumentViewProps {
|
|
|
3206
4876
|
readonly asset: string;
|
|
3207
4877
|
readonly caption?: string;
|
|
3208
4878
|
}) => ReactNode;
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
/**
|
|
3212
|
-
|
|
4879
|
+
/** The `mailto:` / `tel:` address of a published contact point, or undefined when it is not live. */
|
|
4880
|
+
readonly contactHrefOf?: (documentId: string) => string | undefined;
|
|
4881
|
+
/** Render a component placed between the blocks; without it, components are left out. */
|
|
4882
|
+
readonly renderComponent?: (block: ComponentBlock) => ReactNode;
|
|
4883
|
+
/** 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. */
|
|
4884
|
+
readonly fileHrefOf?: (asset: string) => string | undefined;
|
|
4885
|
+
}
|
|
4886
|
+
|
|
4887
|
+
/** A run of text inside a block. `change` marks it as suggested. */
|
|
4888
|
+
export declare type RichInline =
|
|
4889
|
+
/** `style` names a token of the profile's style group (`lead`, `note`). */
|
|
4890
|
+
{
|
|
3213
4891
|
readonly type: 'text';
|
|
3214
4892
|
readonly text: string;
|
|
3215
4893
|
readonly marks?: ReadonlyArray<RichMark>;
|
|
4894
|
+
readonly style?: string;
|
|
4895
|
+
readonly change?: RichChange;
|
|
3216
4896
|
}
|
|
3217
4897
|
/** A link to a document (by its documentId) — the site resolves its address. */
|
|
3218
4898
|
| {
|
|
3219
4899
|
readonly type: 'link';
|
|
3220
4900
|
readonly target: string;
|
|
3221
4901
|
readonly text: string;
|
|
4902
|
+
readonly change?: RichChange;
|
|
4903
|
+
}
|
|
4904
|
+
/** An e-mail address or a phone number — the site makes it a `mailto:` / `tel:` link. */
|
|
4905
|
+
| {
|
|
4906
|
+
readonly type: 'contact';
|
|
4907
|
+
readonly text: string;
|
|
4908
|
+
readonly contact: RichContact;
|
|
4909
|
+
readonly change?: RichChange;
|
|
3222
4910
|
};
|
|
3223
4911
|
|
|
3224
4912
|
/** An inline mark. */
|
|
@@ -3226,12 +4914,39 @@ export declare type RichMark = 'bold' | 'italic' | 'underline';
|
|
|
3226
4914
|
|
|
3227
4915
|
/**
|
|
3228
4916
|
* Which resources a rich-text field may hold: `images` names the content type
|
|
3229
|
-
* an image block references (an asset type), `
|
|
3230
|
-
* references (
|
|
4917
|
+
* an image block references (an asset type), `files` the type a download
|
|
4918
|
+
* block references (an asset type), `links` the type a link references (a
|
|
4919
|
+
* page type). Unset → that node is not allowed.
|
|
3231
4920
|
*/
|
|
3232
4921
|
export declare interface RichTextOptions {
|
|
3233
4922
|
readonly images?: string;
|
|
4923
|
+
/** The asset type a download block references; unset → no downloads. */
|
|
4924
|
+
readonly files?: string;
|
|
3234
4925
|
readonly links?: string;
|
|
4926
|
+
/** What this field allows beyond that; without one, every built-in block and mark, no styles, components or contacts. */
|
|
4927
|
+
readonly profile?: RichTextProfile;
|
|
4928
|
+
}
|
|
4929
|
+
|
|
4930
|
+
/** What a rich-text field allows (`defineRichTextProfile`). Versioned: a change bumps `version`. */
|
|
4931
|
+
export declare interface RichTextProfile {
|
|
4932
|
+
readonly name: string;
|
|
4933
|
+
readonly version: number;
|
|
4934
|
+
/** `<name>@<version>` — what a saved document records. */
|
|
4935
|
+
readonly id: string;
|
|
4936
|
+
readonly blocks: ReadonlyArray<RichBlockKind>;
|
|
4937
|
+
readonly headings: ReadonlyArray<2 | 3>;
|
|
4938
|
+
readonly marks: ReadonlyArray<RichMark>;
|
|
4939
|
+
/** Named styles of paragraphs, headings, lists and runs of text: one design-token group, name → meaning. */
|
|
4940
|
+
readonly styles?: {
|
|
4941
|
+
readonly group: string;
|
|
4942
|
+
readonly tokens: Readonly<Record<string, string>>;
|
|
4943
|
+
};
|
|
4944
|
+
/** The components that may sit between the blocks. */
|
|
4945
|
+
readonly components: ReadonlyArray<ComponentDefinition>;
|
|
4946
|
+
/** The content type of the published contact points (e-mail, phone) a text may name. */
|
|
4947
|
+
readonly contactPoints?: string;
|
|
4948
|
+
/** Whether a text may hold a one-off e-mail address or phone number (checked on save). */
|
|
4949
|
+
readonly contactLiterals: boolean;
|
|
3235
4950
|
}
|
|
3236
4951
|
|
|
3237
4952
|
export declare const RichTextSurface: (props: RichTextSurfaceProps) => ReactNode;
|
|
@@ -3269,7 +4984,7 @@ export declare const rollbackRelease: (...args: Parameters<typeof rollbackReleas
|
|
|
3269
4984
|
* published in the caller's transaction. The rolled-back release is left as it
|
|
3270
4985
|
* was. Returns the new release.
|
|
3271
4986
|
*/
|
|
3272
|
-
declare const rollbackRelease_2: (tx: DataStore, types: ReadonlyArray<ContentType>, releaseId: string, now?: Date) => Promise<Row>;
|
|
4987
|
+
declare const rollbackRelease_2: (tx: DataStore, types: ReadonlyArray<ContentType>, releaseId: string, now?: Date, options?: PublishReleaseOptions) => Promise<Row>;
|
|
3273
4988
|
|
|
3274
4989
|
/** A path found by {@link CmsApi.route}. */
|
|
3275
4990
|
export declare interface RouteMatch {
|
|
@@ -3286,6 +5001,9 @@ export declare interface RouteMatch {
|
|
|
3286
5001
|
readonly via: 'path' | 'fallback' | 'redirect';
|
|
3287
5002
|
}
|
|
3288
5003
|
|
|
5004
|
+
/** Whether a rule's pack applies in this site and language (every rule applies where no place is known). */
|
|
5005
|
+
export declare const ruleApplies: (rule: QualityRule, scope: CmsScope | null) => boolean;
|
|
5006
|
+
|
|
3289
5007
|
/** Effect form of {@link runBulk}. */
|
|
3290
5008
|
export declare const runBulk: (...args: Parameters<typeof runBulk_2>) => Effect<readonly BulkResult[], ContentValidationFailed | ContentNotFound | ContentIdConflict | RevisionMismatch | ReviewRequired | ReferenceUnavailable, never>;
|
|
3291
5009
|
|
|
@@ -3297,6 +5015,20 @@ export declare const runBulk: (...args: Parameters<typeof runBulk_2>) => Effect<
|
|
|
3297
5015
|
*/
|
|
3298
5016
|
declare const runBulk_2: (store: DataStore, types: ReadonlyArray<ContentType>, place: Place, action: BulkAction, plan: ReadonlyArray<PlannedItem>) => Promise<ReadonlyArray<BulkResult>>;
|
|
3299
5017
|
|
|
5018
|
+
/** Effect form of {@link runDeliveryChecks}. */
|
|
5019
|
+
export declare const runDeliveryChecks: (...args: Parameters<typeof runDeliveryChecks_2>) => Effect<readonly DeliveryCheck[], never, never>;
|
|
5020
|
+
|
|
5021
|
+
/**
|
|
5022
|
+
* Read every pending check's address once: observed when it answers as
|
|
5023
|
+
* expected, stale once `staleAfterMs` passed since the change without that.
|
|
5024
|
+
* Hand it a store outside any request (a schedule's `app.store`). Returns
|
|
5025
|
+
* the checks it settled.
|
|
5026
|
+
*/
|
|
5027
|
+
declare const runDeliveryChecks_2: (store: DataStore, read: ReadRevision, now?: Date, options?: {
|
|
5028
|
+
readonly staleAfterMs?: number;
|
|
5029
|
+
readonly limit?: number;
|
|
5030
|
+
}) => Promise<ReadonlyArray<DeliveryCheck>>;
|
|
5031
|
+
|
|
3300
5032
|
/** Effect form of {@link runningExperiment}. */
|
|
3301
5033
|
export declare const runningExperiment: (...args: Parameters<typeof runningExperiment_2>) => Effect<Experiment | null, never, never>;
|
|
3302
5034
|
|
|
@@ -3403,6 +5135,20 @@ export declare const Schema: {
|
|
|
3403
5135
|
readonly unique: () => FieldRefinement;
|
|
3404
5136
|
/** Closed value set → `<select>` widget + a CHECK constraint. */
|
|
3405
5137
|
readonly Literal: (values_0: string, ...values: string[]) => PipeableField;
|
|
5138
|
+
/**
|
|
5139
|
+
* A design token of one group (`tone`, `space`) from the set the design
|
|
5140
|
+
* system declares with `defineDesignTokens`: the editor picks a NAME, never
|
|
5141
|
+
* a colour or a size, and the renderer maps the name to its style. Stored
|
|
5142
|
+
* and checked like a literal.
|
|
5143
|
+
*/
|
|
5144
|
+
readonly Token: (tokens: DesignTokens, group: string) => PipeableField;
|
|
5145
|
+
/**
|
|
5146
|
+
* An action a component performs, chosen from the ones its renderer
|
|
5147
|
+
* implements (`{ follow: 'Go to the target page', share: 'Share this page' }`):
|
|
5148
|
+
* the editor picks what happens, the developer owns how. Stored and checked
|
|
5149
|
+
* like a literal; the labels are what the editor reads.
|
|
5150
|
+
*/
|
|
5151
|
+
readonly Action: (actions: Readonly<Record<string, string>>) => PipeableField;
|
|
3406
5152
|
/**
|
|
3407
5153
|
* Rich text, stored as a `RichDocument` (see richDocument.ts): blocks with
|
|
3408
5154
|
* stable ids — paragraph, heading, list, table, image — and inline text
|
|
@@ -3496,6 +5242,48 @@ export declare type SecretBinding = {
|
|
|
3496
5242
|
readonly reason: 'notInstalled' | 'notAsked';
|
|
3497
5243
|
};
|
|
3498
5244
|
|
|
5245
|
+
/** The answer of an intent: which resource was chosen. */
|
|
5246
|
+
export declare interface SelectionAnswer {
|
|
5247
|
+
readonly intentId: string;
|
|
5248
|
+
readonly documentId: string;
|
|
5249
|
+
/** What the chosen resource is called — the link text when nothing was selected. */
|
|
5250
|
+
readonly title?: string;
|
|
5251
|
+
}
|
|
5252
|
+
|
|
5253
|
+
export declare interface SelectionIntent {
|
|
5254
|
+
readonly id: string;
|
|
5255
|
+
/** The content type to pick from (`asset`, `page`). */
|
|
5256
|
+
readonly pick: string;
|
|
5257
|
+
/** What kind of it is wanted, when the type holds several (`image`, `file`); the tool shows only those. */
|
|
5258
|
+
readonly kind?: string;
|
|
5259
|
+
readonly target: SelectionTarget;
|
|
5260
|
+
/** The app-relative address to go back to. */
|
|
5261
|
+
readonly returnTo: string;
|
|
5262
|
+
/** What the picking tool shows about the target (`Planting guide — Text, image 3`). */
|
|
5263
|
+
readonly label?: string;
|
|
5264
|
+
}
|
|
5265
|
+
|
|
5266
|
+
/** Where a chosen resource goes. */
|
|
5267
|
+
export declare interface SelectionTarget {
|
|
5268
|
+
/** The type being edited; the document and the revision the intent was made on — or, before the draft is saved, the open form (`formId`). */
|
|
5269
|
+
readonly type: string;
|
|
5270
|
+
readonly documentId?: string;
|
|
5271
|
+
readonly revisionId?: string;
|
|
5272
|
+
readonly formId?: string;
|
|
5273
|
+
readonly locale?: string;
|
|
5274
|
+
/** The field; with `blockId`, a block of that rich text (an image block's asset, or a link over `selection`). */
|
|
5275
|
+
readonly field: string;
|
|
5276
|
+
readonly blockId?: string;
|
|
5277
|
+
/** With `prop`: a placed component of a components field, by its instance id, and the prop that takes the choice. */
|
|
5278
|
+
readonly instanceId?: string;
|
|
5279
|
+
readonly prop?: string;
|
|
5280
|
+
/** For a link: the text it is made over, by character offset in the block's text. */
|
|
5281
|
+
readonly selection?: {
|
|
5282
|
+
readonly start: number;
|
|
5283
|
+
readonly end: number;
|
|
5284
|
+
};
|
|
5285
|
+
}
|
|
5286
|
+
|
|
3499
5287
|
/** Effect form of {@link seriesOf}. */
|
|
3500
5288
|
export declare const seriesOf: (...args: Parameters<typeof seriesOf_2>) => Effect<PublishSeries | null, ContentValidationFailed | ContentNotFound, never>;
|
|
3501
5289
|
|
|
@@ -3540,12 +5328,41 @@ export declare const setOwner: (...args: Parameters<typeof setOwner_2>) => Effec
|
|
|
3540
5328
|
/** Make `owner` (an account id) responsible for the document, or nobody (`null`). */
|
|
3541
5329
|
declare const setOwner_2: (store: DataStore, type: ContentType, documentId: string, place: Place_2, owner: string | null) => Promise<Stewardship>;
|
|
3542
5330
|
|
|
5331
|
+
/** Effect form of {@link setPrimaryDomain}. */
|
|
5332
|
+
export declare const setPrimaryDomain: (...args: Parameters<typeof setPrimaryDomain_2>) => Effect<SetPrimaryResult, never, never>;
|
|
5333
|
+
|
|
5334
|
+
/** Make a verified domain the site's primary one; the previous primary stays, as an alias. */
|
|
5335
|
+
declare const setPrimaryDomain_2: (tx: DataStore, domainId: string) => Promise<SetPrimaryResult>;
|
|
5336
|
+
|
|
5337
|
+
export declare type SetPrimaryResult = {
|
|
5338
|
+
readonly ok: true;
|
|
5339
|
+
} | {
|
|
5340
|
+
readonly ok: false;
|
|
5341
|
+
readonly reason: 'notFound' | 'notVerified';
|
|
5342
|
+
};
|
|
5343
|
+
|
|
3543
5344
|
/** Effect form of {@link setReviewRequired}. */
|
|
3544
5345
|
export declare const setReviewRequired: (...args: Parameters<typeof setReviewRequired_2>) => Effect<readonly string[], never, never>;
|
|
3545
5346
|
|
|
3546
5347
|
/** Turn the workspace's review requirement for `typeName` on or off, in the caller's transaction. */
|
|
3547
5348
|
declare const setReviewRequired_2: (tx: DataStore, tenantId: string, typeName: string, required: boolean) => Promise<ReadonlyArray<string>>;
|
|
3548
5349
|
|
|
5350
|
+
/** Effect form of {@link setStageOwner}. */
|
|
5351
|
+
export declare const setStageOwner: (...args: Parameters<typeof setStageOwner_2>) => Effect<{
|
|
5352
|
+
readonly ok: true;
|
|
5353
|
+
} | {
|
|
5354
|
+
readonly ok: false;
|
|
5355
|
+
readonly reason: "passed";
|
|
5356
|
+
}, never, never>;
|
|
5357
|
+
|
|
5358
|
+
/** Name who owns a stage. A passed stage keeps its owner. */
|
|
5359
|
+
declare const setStageOwner_2: (tx: DataStore, source: string, stage: MigrationStage, ownerId: string, tenantId: string | null) => Promise<{
|
|
5360
|
+
readonly ok: true;
|
|
5361
|
+
} | {
|
|
5362
|
+
readonly ok: false;
|
|
5363
|
+
readonly reason: "passed";
|
|
5364
|
+
}>;
|
|
5365
|
+
|
|
3549
5366
|
export declare type SettingsChange = {
|
|
3550
5367
|
readonly ok: true;
|
|
3551
5368
|
readonly settings: Readonly<Record<string, ExtensionSettingValue>>;
|
|
@@ -3570,6 +5387,45 @@ export declare const settleAiOperation: (...args: Parameters<typeof settleAiOper
|
|
|
3570
5387
|
/** What the person did with a proposal; false when it is not a pending proposal. */
|
|
3571
5388
|
declare const settleAiOperation_2: (tx: DataStore, operationId: string, outcome: "applied" | "discarded") => Promise<boolean>;
|
|
3572
5389
|
|
|
5390
|
+
/**
|
|
5391
|
+
* Whether an origin response may be stored by a shared cache: eligibility is
|
|
5392
|
+
* checked again after the origin answered — a `Set-Cookie`, `private` or
|
|
5393
|
+
* `no-store` keeps it out whatever the request looked like.
|
|
5394
|
+
*/
|
|
5395
|
+
export declare const sharedCacheable: (headers: Readonly<Record<string, string | undefined>>) => boolean;
|
|
5396
|
+
|
|
5397
|
+
/**
|
|
5398
|
+
* The blocks of a draft's rich texts typed in together, with their markup:
|
|
5399
|
+
* every paragraph, heading, list and table that holds no suggestions (a block
|
|
5400
|
+
* with suggestions is decided, not typed in).
|
|
5401
|
+
*/
|
|
5402
|
+
export declare const sharedRichBlocks: (type: ContentType, values: Readonly<Record<string, unknown>>) => ReadonlyArray<{
|
|
5403
|
+
readonly key: string;
|
|
5404
|
+
readonly field: string;
|
|
5405
|
+
readonly block: RichBlock;
|
|
5406
|
+
readonly markup: string;
|
|
5407
|
+
}>;
|
|
5408
|
+
|
|
5409
|
+
export declare interface SiteDomain {
|
|
5410
|
+
readonly id: string;
|
|
5411
|
+
readonly site: string;
|
|
5412
|
+
readonly host: string;
|
|
5413
|
+
readonly status: 'pending' | 'verified';
|
|
5414
|
+
readonly primary: boolean;
|
|
5415
|
+
readonly verifiedAt: Date | null;
|
|
5416
|
+
/** The TXT record that proves ownership. */
|
|
5417
|
+
readonly record: {
|
|
5418
|
+
readonly name: string;
|
|
5419
|
+
readonly value: string;
|
|
5420
|
+
};
|
|
5421
|
+
}
|
|
5422
|
+
|
|
5423
|
+
/** Effect form of {@link siteDomains}. */
|
|
5424
|
+
export declare const siteDomains: (...args: Parameters<typeof siteDomains_2>) => Effect<readonly SiteDomain[], never, never>;
|
|
5425
|
+
|
|
5426
|
+
/** A site's domains: the primary first, then by host. */
|
|
5427
|
+
declare const siteDomains_2: (store: DataStore, site: string) => Promise<ReadonlyArray<SiteDomain>>;
|
|
5428
|
+
|
|
3573
5429
|
export declare interface SitemapUrl extends PageAlternate {
|
|
3574
5430
|
readonly documentId: string;
|
|
3575
5431
|
/** ISO date of the variant's last change, when known. */
|
|
@@ -3609,6 +5465,32 @@ export declare const sourceAttributes: (path: string) => {
|
|
|
3609
5465
|
/** The field path behind a clicked element of the preview, or null. */
|
|
3610
5466
|
export declare const sourcePathOf: (target: unknown) => string | null;
|
|
3611
5467
|
|
|
5468
|
+
export declare interface StageState {
|
|
5469
|
+
readonly stage: MigrationStage;
|
|
5470
|
+
readonly ownerId: string | null;
|
|
5471
|
+
readonly status: 'open' | 'passed';
|
|
5472
|
+
readonly note: string | null;
|
|
5473
|
+
readonly evidenceUri: string | null;
|
|
5474
|
+
readonly passedBy: string | null;
|
|
5475
|
+
readonly passedAt: Date | null;
|
|
5476
|
+
}
|
|
5477
|
+
|
|
5478
|
+
/** A placed component saved against an earlier definition of it, with no migration to upgrade it. */
|
|
5479
|
+
export declare interface StaleComponent {
|
|
5480
|
+
readonly path: string;
|
|
5481
|
+
readonly componentId: string;
|
|
5482
|
+
readonly fingerprint: string | null;
|
|
5483
|
+
}
|
|
5484
|
+
|
|
5485
|
+
/** The instances in `values` (nested ones included) that a save would not upgrade — their definition changed and names no migration from them. */
|
|
5486
|
+
export declare const staleComponents: (type: Pick<ContentType, "fields">, values: Readonly<Record<string, unknown>>) => ReadonlyArray<StaleComponent>;
|
|
5487
|
+
|
|
5488
|
+
/** Effect form of {@link startBulkRun}. */
|
|
5489
|
+
export declare const startBulkRun: (...args: Parameters<typeof startBulkRun_2>) => Effect<string, never, never>;
|
|
5490
|
+
|
|
5491
|
+
/** Record a run of `plan`; nothing is executed yet. */
|
|
5492
|
+
declare const startBulkRun_2: (tx: DataStore, place: Place, action: BulkAction, plan: ReadonlyArray<PlannedItem>, actorId: string | null) => Promise<string>;
|
|
5493
|
+
|
|
3612
5494
|
/** Effect form of {@link startExperiment}. */
|
|
3613
5495
|
export declare const startExperiment: (...args: Parameters<typeof startExperiment_2>) => Effect<StartExperimentResult, never, never>;
|
|
3614
5496
|
|
|
@@ -3648,6 +5530,46 @@ export declare const startStewardship: (...args: Parameters<typeof startStewards
|
|
|
3648
5530
|
*/
|
|
3649
5531
|
declare const startStewardship_2: (tx: DataStore, type: ContentType, documentId: string, place: Place_2, tenantId: unknown, now?: Date) => Promise<void>;
|
|
3650
5532
|
|
|
5533
|
+
/** Effect form of {@link startWorkflow}. */
|
|
5534
|
+
export declare const startWorkflow: (...args: Parameters<typeof startWorkflow_2>) => Effect<{
|
|
5535
|
+
readonly id: string;
|
|
5536
|
+
readonly revisionId: string;
|
|
5537
|
+
}, ContentNotFound, never>;
|
|
5538
|
+
|
|
5539
|
+
/** Start a review of the revision the draft shows now; an open instance of an earlier revision is superseded. */
|
|
5540
|
+
declare const startWorkflow_2: (tx: DataStore, type: ContentType, workflow: ReviewWorkflow, variantId: string, scope: CmsScope, options: {
|
|
5541
|
+
readonly actorId: string;
|
|
5542
|
+
}, now?: Date) => Promise<{
|
|
5543
|
+
readonly id: string;
|
|
5544
|
+
readonly revisionId: string;
|
|
5545
|
+
}>;
|
|
5546
|
+
|
|
5547
|
+
export declare type StepRefusal = 'notFound' | 'closed' | 'revisionMoved' | 'unknownStep' | 'notApplicable' | 'waiting' | 'decided' | 'selfApproval' | 'notAllowed' | 'noEvidence' | 'noNote';
|
|
5548
|
+
|
|
5549
|
+
/** One step as it applied to the revision an instance is about — the review snapshot. */
|
|
5550
|
+
export declare interface StepSnapshot {
|
|
5551
|
+
readonly id: string;
|
|
5552
|
+
readonly label: string;
|
|
5553
|
+
readonly approverScope: string;
|
|
5554
|
+
readonly after: ReadonlyArray<string>;
|
|
5555
|
+
readonly applies: boolean;
|
|
5556
|
+
readonly slaHours: number | null;
|
|
5557
|
+
readonly evidence: boolean;
|
|
5558
|
+
}
|
|
5559
|
+
|
|
5560
|
+
export declare interface StepState extends StepSnapshot {
|
|
5561
|
+
readonly status: StepStatus;
|
|
5562
|
+
/** When the step opened (its predecessors approved, or the request), null while waiting. */
|
|
5563
|
+
readonly openedAt: Date | null;
|
|
5564
|
+
readonly dueAt: Date | null;
|
|
5565
|
+
readonly overdue: boolean;
|
|
5566
|
+
readonly delegateTo: string | null;
|
|
5567
|
+
readonly decidedBy: string | null;
|
|
5568
|
+
readonly evidenceGiven: string | null;
|
|
5569
|
+
}
|
|
5570
|
+
|
|
5571
|
+
export declare type StepStatus = 'notApplicable' | 'waiting' | 'open' | 'approved' | 'changesRequested';
|
|
5572
|
+
|
|
3651
5573
|
export declare interface Stewardship {
|
|
3652
5574
|
readonly owner: string | null;
|
|
3653
5575
|
readonly reviewDue: Date | null;
|
|
@@ -3669,6 +5591,29 @@ export declare const stopExperiment: (...args: Parameters<typeof stopExperiment_
|
|
|
3669
5591
|
/** Stop a running experiment; its counts stay. False when there is none of that id running. */
|
|
3670
5592
|
declare const stopExperiment_2: (tx: DataStore, experimentId: string, now?: Date) => Promise<boolean>;
|
|
3671
5593
|
|
|
5594
|
+
/** Effect form of {@link suggestOnStep}. */
|
|
5595
|
+
export declare const suggestOnStep: (...args: Parameters<typeof suggestOnStep_2>) => Effect<{
|
|
5596
|
+
readonly ok: true;
|
|
5597
|
+
} | {
|
|
5598
|
+
readonly ok: false;
|
|
5599
|
+
readonly reason: StepRefusal;
|
|
5600
|
+
}, never, never>;
|
|
5601
|
+
|
|
5602
|
+
/**
|
|
5603
|
+
* Record a suggested change on an open step — the change itself is a
|
|
5604
|
+
* candidate the author adopts or leaves (`proposeCandidate` with
|
|
5605
|
+
* `suggestedBy`). Whoever may decide the step may suggest; the step stays open.
|
|
5606
|
+
*/
|
|
5607
|
+
declare const suggestOnStep_2: (tx: DataStore, instanceId: string, stepId: string, decider: Decider, input: {
|
|
5608
|
+
readonly candidateId: string;
|
|
5609
|
+
readonly note?: string;
|
|
5610
|
+
}, now?: Date) => Promise<{
|
|
5611
|
+
readonly ok: true;
|
|
5612
|
+
} | {
|
|
5613
|
+
readonly ok: false;
|
|
5614
|
+
readonly reason: StepRefusal;
|
|
5615
|
+
}>;
|
|
5616
|
+
|
|
3672
5617
|
/** A type's taxonomy — see `ContentTypeSpec.taxonomy`. */
|
|
3673
5618
|
export declare interface TaxonomyConfig {
|
|
3674
5619
|
/** A declared `Schema.Array(Schema.String)` field. */
|
|
@@ -3729,6 +5674,8 @@ export declare interface TemplatesConfig {
|
|
|
3729
5674
|
readonly field: string;
|
|
3730
5675
|
/** The `Schema.Components` field the rules apply to. */
|
|
3731
5676
|
readonly components: string;
|
|
5677
|
+
/** The component prop that holds a placement's width (`widths`); default `width`. */
|
|
5678
|
+
readonly width?: string;
|
|
3732
5679
|
readonly list: ReadonlyArray<PageTemplate>;
|
|
3733
5680
|
}
|
|
3734
5681
|
|
|
@@ -3745,6 +5692,9 @@ export declare const templateViolations: (type: Typed, row: Readonly<Record<stri
|
|
|
3745
5692
|
/** The entries whose term `text` (in the source language) contains. */
|
|
3746
5693
|
export declare const termsIn: (text: string, entries: ReadonlyArray<GlossaryEntry>) => ReadonlyArray<GlossaryEntry>;
|
|
3747
5694
|
|
|
5695
|
+
/** 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. */
|
|
5696
|
+
export declare const textSelectionIn: (root: HTMLElement) => [number, number] | null;
|
|
5697
|
+
|
|
3748
5698
|
/**
|
|
3749
5699
|
* Put `mark` on the text in `[start, end)`, or take it off when all of it
|
|
3750
5700
|
* already carries it. Text runs are split at the edges; a link is left as it
|
|
@@ -3762,6 +5712,38 @@ export declare interface ToolExposure {
|
|
|
3762
5712
|
/** An XLIFF 2.1 core document for one file. */
|
|
3763
5713
|
export declare const toXliff: (exchange: XliffExchange) => string;
|
|
3764
5714
|
|
|
5715
|
+
/** `edited` (a copy of `base` someone changed) as suggestions inside `base`. */
|
|
5716
|
+
export declare const trackChanges: (base: RichDocument, edited: RichDocument, author: ChangeAuthor) => TrackedChanges;
|
|
5717
|
+
|
|
5718
|
+
/** The document with the edit suggested, and the blocks it could not suggest over (they hold others' suggestions). */
|
|
5719
|
+
export declare interface TrackedChanges {
|
|
5720
|
+
readonly document: RichDocument;
|
|
5721
|
+
readonly conflicts: ReadonlyArray<string>;
|
|
5722
|
+
}
|
|
5723
|
+
|
|
5724
|
+
/** One run with the edit from `base` to `edited` suggested: the changed middle as a deletion and an insertion. */
|
|
5725
|
+
export declare const trackInline: (base: ReadonlyArray<RichInline>, edited: ReadonlyArray<RichInline>, author: ChangeAuthor) => ReadonlyArray<RichInline>;
|
|
5726
|
+
|
|
5727
|
+
/**
|
|
5728
|
+
* What an exchange does not carry, so the export can say so instead of
|
|
5729
|
+
* losing it silently:
|
|
5730
|
+
*
|
|
5731
|
+
* - `suggestedChange`: a block holds suggested changes (track changes). Its
|
|
5732
|
+
* text goes out as written, insertions and deletions alike, and a
|
|
5733
|
+
* translation coming back has no suggestion marks — decide them first.
|
|
5734
|
+
* - `unknownComponent`: a component whose definition the field no longer
|
|
5735
|
+
* declares; its text is not exported and stays as it is.
|
|
5736
|
+
*/
|
|
5737
|
+
export declare interface TranslationLoss {
|
|
5738
|
+
/** Where: `body/<blockId>`, `sections/<instanceId>`, or deeper inside a component. */
|
|
5739
|
+
readonly id: string;
|
|
5740
|
+
/** Suggested changes flattened into the text, or a component's text left out. */
|
|
5741
|
+
readonly kind: 'suggestedChange' | 'unknownComponent';
|
|
5742
|
+
}
|
|
5743
|
+
|
|
5744
|
+
/** What exporting these values as translation units leaves out or flattens, in field order. */
|
|
5745
|
+
export declare const translationLosses: (fields: Readonly<Record<string, FieldSchema>>, values: Readonly<Record<string, unknown>>, prefix?: string) => ReadonlyArray<TranslationLoss>;
|
|
5746
|
+
|
|
3765
5747
|
/** Where one language stands against the source. */
|
|
3766
5748
|
export declare interface TranslationState {
|
|
3767
5749
|
readonly locale: string;
|
|
@@ -3869,6 +5851,9 @@ export declare interface TreeOptions {
|
|
|
3869
5851
|
readonly filter?: Readonly<Record<string, unknown>>;
|
|
3870
5852
|
}
|
|
3871
5853
|
|
|
5854
|
+
/** Looks up a name's TXT records (`node:dns/promises` `resolveTxt`, joined per record). */
|
|
5855
|
+
export declare type TxtResolver = (name: string) => Promise<ReadonlyArray<string>>;
|
|
5856
|
+
|
|
3872
5857
|
declare type Typed = {
|
|
3873
5858
|
readonly name: string;
|
|
3874
5859
|
readonly fields: Readonly<Record<string, FieldSchema>>;
|
|
@@ -3894,10 +5879,10 @@ export declare const unavailableAmong: (...args: Parameters<typeof unavailableAm
|
|
|
3894
5879
|
* A document without a record (a type without availability, not published
|
|
3895
5880
|
* yet) is not listed.
|
|
3896
5881
|
*/
|
|
3897
|
-
declare const unavailableAmong_2: (store: DataStore, documentIds: ReadonlyArray<string>, scope: Pick<CmsScope, "site" | "environment">, now?: Date) => Promise<ReadonlyMap<string, UnavailableReason>>;
|
|
5882
|
+
declare const unavailableAmong_2: (store: DataStore, documentIds: ReadonlyArray<string>, scope: Pick<CmsScope, "site" | "environment">, now?: Date, use?: AvailabilityUse) => Promise<ReadonlyMap<string, UnavailableReason>>;
|
|
3898
5883
|
|
|
3899
5884
|
/** Why a referenced document may not be used. */
|
|
3900
|
-
export declare type UnavailableReason = 'blocked' | 'expired';
|
|
5885
|
+
export declare type UnavailableReason = 'blocked' | 'expired' | 'notYet' | 'territory' | 'channel' | 'purpose';
|
|
3901
5886
|
|
|
3902
5887
|
/** Undo the last step: the form to show, and the history after it; null when there is nothing to undo. */
|
|
3903
5888
|
export declare const undoEdit: (history: EditHistory, current: Readonly<Record<string, unknown>>) => {
|
|
@@ -3906,6 +5891,12 @@ export declare const undoEdit: (history: EditHistory, current: Readonly<Record<s
|
|
|
3906
5891
|
readonly label: string;
|
|
3907
5892
|
} | null;
|
|
3908
5893
|
|
|
5894
|
+
/** Effect form of {@link unfinishedBulkRuns}. */
|
|
5895
|
+
export declare const unfinishedBulkRuns: (...args: Parameters<typeof unfinishedBulkRuns_2>) => Effect<readonly string[], never, never>;
|
|
5896
|
+
|
|
5897
|
+
/** The runs still going, oldest first — for a schedule that continues them. */
|
|
5898
|
+
declare const unfinishedBulkRuns_2: (store: DataStore) => Promise<ReadonlyArray<string>>;
|
|
5899
|
+
|
|
3909
5900
|
/** Effect form of {@link uninstallExtension}. */
|
|
3910
5901
|
export declare const uninstallExtension: (...args: Parameters<typeof uninstallExtension_2>) => Effect<ExtensionRemoval, never, never>;
|
|
3911
5902
|
|
|
@@ -3999,6 +5990,21 @@ export declare interface VariantResult {
|
|
|
3999
5990
|
readonly rate: number;
|
|
4000
5991
|
}
|
|
4001
5992
|
|
|
5993
|
+
/** Effect form of {@link verifyDomain}. */
|
|
5994
|
+
export declare const verifyDomain: (...args: Parameters<typeof verifyDomain_2>) => Effect<VerifyDomainResult, never, never>;
|
|
5995
|
+
|
|
5996
|
+
/** Look for the domain's TXT record; found, the domain is verified. A lookup that fails counts as missing. */
|
|
5997
|
+
declare const verifyDomain_2: (tx: DataStore, domainId: string, resolveTxt: TxtResolver, now?: Date) => Promise<VerifyDomainResult>;
|
|
5998
|
+
|
|
5999
|
+
export declare type VerifyDomainResult = {
|
|
6000
|
+
readonly ok: true;
|
|
6001
|
+
readonly domain: SiteDomain;
|
|
6002
|
+
} | {
|
|
6003
|
+
readonly ok: false;
|
|
6004
|
+
readonly reason: 'notFound' | 'recordMissing';
|
|
6005
|
+
readonly found?: ReadonlyArray<string>;
|
|
6006
|
+
};
|
|
6007
|
+
|
|
4002
6008
|
/**
|
|
4003
6009
|
* Verify a preview token. Returns the `{ type, id }` claim on success,
|
|
4004
6010
|
* `null` on any failure (malformed, signature mismatch, expired). Never
|
|
@@ -4053,8 +6059,23 @@ export declare interface WidgetProps {
|
|
|
4053
6059
|
readonly field: FieldSchema;
|
|
4054
6060
|
readonly value: unknown;
|
|
4055
6061
|
readonly onChange: (value: unknown) => void;
|
|
6062
|
+
/**
|
|
6063
|
+
* Where the value lives: the field, and for a prop of a placed component
|
|
6064
|
+
* its instance and prop — what a picker hands to a selection intent.
|
|
6065
|
+
*/
|
|
6066
|
+
readonly target?: WidgetTarget;
|
|
6067
|
+
}
|
|
6068
|
+
|
|
6069
|
+
/** Where a widget's value lives (a `SelectionTarget`'s `field`, `instanceId`, `prop`). */
|
|
6070
|
+
declare interface WidgetTarget {
|
|
6071
|
+
readonly field: string;
|
|
6072
|
+
readonly instanceId?: string;
|
|
6073
|
+
readonly prop?: string;
|
|
4056
6074
|
}
|
|
4057
6075
|
|
|
6076
|
+
/** A block with its text replaced by `text` in its markup (the inverse of `blockMarkup`); `styles` are the names `{name|…}` may use. */
|
|
6077
|
+
export declare const withBlockMarkup: (block: RichBlock, text: string, styles?: ReadonlyArray<string>) => RichBlock;
|
|
6078
|
+
|
|
4058
6079
|
/** Effect form of {@link withdrawInvitation}. */
|
|
4059
6080
|
export declare const withdrawInvitation: (...args: Parameters<typeof withdrawInvitation_2>) => Effect<boolean, never, never>;
|
|
4060
6081
|
|
|
@@ -4069,6 +6090,77 @@ export declare interface WithheldInstance {
|
|
|
4069
6090
|
readonly props: Readonly<Record<string, never>>;
|
|
4070
6091
|
}
|
|
4071
6092
|
|
|
6093
|
+
/**
|
|
6094
|
+
* The values with the reference at `path` (as `referencesOf` reports it)
|
|
6095
|
+
* pointing at `to`: a reference field holds the id itself, a rich-text link
|
|
6096
|
+
* its `target`, a rich-text image block its `asset`. Returns null when the
|
|
6097
|
+
* path leads nowhere — the values changed since the path was read.
|
|
6098
|
+
*/
|
|
6099
|
+
export declare const withReferenceAt: (values: Readonly<Record<string, unknown>>, path: string, to: string) => Record<string, unknown> | null;
|
|
6100
|
+
|
|
6101
|
+
/**
|
|
6102
|
+
* The rich texts of `form` with each shared block's text taken from `texts`
|
|
6103
|
+
* (key → merged markup). A block the editor changed in the form before its
|
|
6104
|
+
* shared text reached them keeps the form's text while nobody typed into it or
|
|
6105
|
+
* saved it since `seen` — those come back in `typedBefore`, for the save to
|
|
6106
|
+
* write into their texts.
|
|
6107
|
+
*/
|
|
6108
|
+
export declare const withSharedBlocks: (type: ContentType, form: Readonly<Record<string, unknown>>, texts: ReadonlyMap<string, string>, context?: {
|
|
6109
|
+
readonly current?: Readonly<Record<string, unknown>> | undefined;
|
|
6110
|
+
readonly seen?: Readonly<Record<string, unknown>> | undefined;
|
|
6111
|
+
}) => {
|
|
6112
|
+
readonly values: Readonly<Record<string, unknown>>;
|
|
6113
|
+
readonly typedBefore: ReadonlyArray<{
|
|
6114
|
+
readonly key: string;
|
|
6115
|
+
readonly markup: string;
|
|
6116
|
+
}>;
|
|
6117
|
+
};
|
|
6118
|
+
|
|
6119
|
+
export declare interface WorkflowInstance {
|
|
6120
|
+
readonly id: string;
|
|
6121
|
+
readonly contentType: string;
|
|
6122
|
+
readonly variantId: string;
|
|
6123
|
+
readonly revisionId: string;
|
|
6124
|
+
readonly workflowId: string;
|
|
6125
|
+
readonly workflowVersion: number;
|
|
6126
|
+
readonly status: 'open' | 'approved' | 'changesRequested' | 'superseded';
|
|
6127
|
+
readonly requestedBy: string;
|
|
6128
|
+
readonly requestedAt: Date;
|
|
6129
|
+
readonly steps: ReadonlyArray<StepState>;
|
|
6130
|
+
readonly decisions: ReadonlyArray<{
|
|
6131
|
+
readonly stepId: string;
|
|
6132
|
+
readonly action: string;
|
|
6133
|
+
readonly actorId: string;
|
|
6134
|
+
readonly delegateTo: string | null;
|
|
6135
|
+
readonly candidateId: string | null;
|
|
6136
|
+
readonly evidence: string | null;
|
|
6137
|
+
readonly note: string | null;
|
|
6138
|
+
readonly decidedAt: Date;
|
|
6139
|
+
}>;
|
|
6140
|
+
}
|
|
6141
|
+
|
|
6142
|
+
/** Effect form of {@link workflowState}. */
|
|
6143
|
+
export declare const workflowState: (...args: Parameters<typeof workflowState_2>) => Effect<WorkflowInstance | null, never, never>;
|
|
6144
|
+
|
|
6145
|
+
/** One instance with its steps and decisions, or null. */
|
|
6146
|
+
declare const workflowState_2: (store: DataStore, instanceId: string, now?: Date) => Promise<WorkflowInstance | null>;
|
|
6147
|
+
|
|
6148
|
+
export declare interface WorkflowStep {
|
|
6149
|
+
/** camelCase, unique within the workflow. */
|
|
6150
|
+
readonly id: string;
|
|
6151
|
+
readonly label: string;
|
|
6152
|
+
/** The scope a person needs to decide this step (a delegate decides without it). */
|
|
6153
|
+
readonly approverScope: string;
|
|
6154
|
+
/** Steps that must be approved before this one opens. */
|
|
6155
|
+
readonly after?: ReadonlyArray<string>;
|
|
6156
|
+
/** The step applies only when this holds for the revision's values. */
|
|
6157
|
+
readonly when?: (values: Readonly<Record<string, unknown>>) => boolean;
|
|
6158
|
+
/** Hours the step may stay open once it is open; later it is overdue. */
|
|
6159
|
+
readonly slaHours?: number;
|
|
6160
|
+
/** Approving needs evidence: a link or a note saying what was checked. */
|
|
6161
|
+
readonly evidence?: boolean;
|
|
6162
|
+
}
|
|
6163
|
+
|
|
4072
6164
|
/** Effect form of {@link workspaceReviewTypes}. */
|
|
4073
6165
|
export declare const workspaceReviewTypes: (...args: Parameters<typeof workspaceReviewTypes_2>) => Effect<readonly string[], never, never>;
|
|
4074
6166
|
|