@bettercms-ai/types 1.34.0 → 1.36.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/dist/index.d.ts +48 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -205,7 +205,7 @@ interface ContentModelField {
|
|
|
205
205
|
key: string;
|
|
206
206
|
label: string;
|
|
207
207
|
type: ContentModelFieldType;
|
|
208
|
-
/** Shown to editors under the field
|
|
208
|
+
/** Shown to editors under the field: what it is for, where it shows, any constraint. Never its value. */
|
|
209
209
|
helpText?: string;
|
|
210
210
|
required?: boolean;
|
|
211
211
|
/**
|
|
@@ -241,6 +241,8 @@ interface ContentModelField {
|
|
|
241
241
|
ui?: ContentModelFieldUi;
|
|
242
242
|
/** Server-owned: who named this field (label, help text). Only an `auto` name may be renamed by a derive. */
|
|
243
243
|
nameSource?: "auto" | "human";
|
|
244
|
+
/** Server-owned: who wrote `helpText`. @see HelpSource */
|
|
245
|
+
helpSource?: HelpSource;
|
|
244
246
|
/** Server-owned provenance of this field's chrome. @see UiOrigin */
|
|
245
247
|
uiOrigin?: UiOrigin;
|
|
246
248
|
/** Server-owned revert point. @see UiBefore */
|
|
@@ -315,6 +317,12 @@ interface DockInputRef {
|
|
|
315
317
|
* (an array zone field with its own `config.zones`) is supported.
|
|
316
318
|
*/
|
|
317
319
|
type ZoneField = ContentModelField;
|
|
320
|
+
/**
|
|
321
|
+
* Who wrote a help text or a description: the platform's generator (`auto`, rewritten whenever its
|
|
322
|
+
* wording improves), a person in the dashboard (`human`) or an agent over the API (`agent`). Only
|
|
323
|
+
* `auto` text is ever replaced. Server-owned: a client's copy is ignored.
|
|
324
|
+
*/
|
|
325
|
+
type HelpSource = "auto" | "human" | "agent";
|
|
318
326
|
|
|
319
327
|
/**
|
|
320
328
|
* Page — a published content page within a workspace.
|
|
@@ -1130,6 +1138,10 @@ interface LayoutFieldDefinition {
|
|
|
1130
1138
|
} & Record<string, unknown>;
|
|
1131
1139
|
/** Required for group/repeater; forbidden for scalar fields. */
|
|
1132
1140
|
fields?: LayoutFieldDefinition[];
|
|
1141
|
+
/** Shown to editors under the field. */
|
|
1142
|
+
helpText?: string;
|
|
1143
|
+
/** Server-owned: who wrote `helpText`. */
|
|
1144
|
+
helpSource?: "auto" | "human" | "agent";
|
|
1133
1145
|
/** `true`: no route the last release inspected renders this field — hidden, never deleted. `false`: a person keeps it shown. */
|
|
1134
1146
|
stale?: boolean;
|
|
1135
1147
|
}
|
|
@@ -1179,6 +1191,10 @@ interface LayoutSection {
|
|
|
1179
1191
|
reserved?: ReservedLayoutSection;
|
|
1180
1192
|
fields: LayoutFieldDefinition[];
|
|
1181
1193
|
items: LayoutSectionItem[];
|
|
1194
|
+
/** What this Section is and which pages show it — for editors; no build reads it. */
|
|
1195
|
+
description?: string;
|
|
1196
|
+
/** Server-owned: who wrote `description`. */
|
|
1197
|
+
helpSource?: "auto" | "human" | "agent";
|
|
1182
1198
|
/**
|
|
1183
1199
|
* The language this Section is a VARIANT for — BCP-47, lowercase (`fr`, `pt-br`).
|
|
1184
1200
|
*
|
|
@@ -1343,6 +1359,7 @@ type ManagementLayoutCommand = {
|
|
|
1343
1359
|
slug?: string;
|
|
1344
1360
|
zone?: LayoutZone;
|
|
1345
1361
|
orderKey?: string;
|
|
1362
|
+
description?: string;
|
|
1346
1363
|
} | {
|
|
1347
1364
|
type: "remove-section";
|
|
1348
1365
|
sectionId: string;
|
|
@@ -1563,6 +1580,8 @@ interface ComponentPropDef {
|
|
|
1563
1580
|
required?: boolean;
|
|
1564
1581
|
/** Hint shown under the control, muted. */
|
|
1565
1582
|
helpText?: string;
|
|
1583
|
+
/** Server-owned: who wrote `helpText`. */
|
|
1584
|
+
helpSource?: "auto" | "human" | "agent";
|
|
1566
1585
|
/** Ghost text inside a text-ish control. */
|
|
1567
1586
|
placeholder?: string;
|
|
1568
1587
|
/** Per-type settings; the save schema enforces that each is present on the type needing it. */
|
|
@@ -1630,6 +1649,7 @@ interface ComponentSubField {
|
|
|
1630
1649
|
/** The same editor hints as the prop above, one level down. @see ComponentPropDef */
|
|
1631
1650
|
required?: boolean;
|
|
1632
1651
|
helpText?: string;
|
|
1652
|
+
helpSource?: "auto" | "human" | "agent";
|
|
1633
1653
|
placeholder?: string;
|
|
1634
1654
|
options?: string[];
|
|
1635
1655
|
/** CANONICAL. A nested `group`/`table`'s own sub-shape. */
|
|
@@ -1723,6 +1743,10 @@ interface Component {
|
|
|
1723
1743
|
*/
|
|
1724
1744
|
interface DeliveryComponent {
|
|
1725
1745
|
id: string;
|
|
1746
|
+
/** The project the component belongs to. */
|
|
1747
|
+
projectId?: string | null;
|
|
1748
|
+
/** The component's preview image in the editor's library, when it has one. */
|
|
1749
|
+
thumbnail?: string | null;
|
|
1726
1750
|
name: string;
|
|
1727
1751
|
slug: string;
|
|
1728
1752
|
category: ComponentCategory;
|
|
@@ -1978,7 +2002,25 @@ interface DeliveryEntry<T = Record<string, unknown>> {
|
|
|
1978
2002
|
status: "draft" | "published";
|
|
1979
2003
|
publishedAt: string | null;
|
|
1980
2004
|
updatedAt: string | null;
|
|
2005
|
+
/**
|
|
2006
|
+
* The entry's language (`null`: the site's default) and, on a translation, the id of the entry it
|
|
2007
|
+
* translates. Served on every entry since localization shipped; absent from this type until the
|
|
2008
|
+
* contract test (backend · src/__tests__/contracts/delivery-types.test.ts) held the two together.
|
|
2009
|
+
*/
|
|
2010
|
+
locale?: string | null;
|
|
2011
|
+
translationOf?: string | null;
|
|
2012
|
+
/** Single-entry read only: the other languages of this entry. */
|
|
2013
|
+
translations?: Array<{
|
|
2014
|
+
id: string;
|
|
2015
|
+
locale: string | null;
|
|
2016
|
+
slug: string;
|
|
2017
|
+
}>;
|
|
1981
2018
|
data: T;
|
|
2019
|
+
/** Only on a campaign entry: the account's section plan (ABM). */
|
|
2020
|
+
_abm?: {
|
|
2021
|
+
campaignId: string;
|
|
2022
|
+
layout: unknown;
|
|
2023
|
+
};
|
|
1982
2024
|
/**
|
|
1983
2025
|
* The entry's SEO, ready for `<head>`: its collection template's meta and JSON-LD with
|
|
1984
2026
|
* `{{field}}` tokens already resolved for this entry, the entry's own values merged over it
|
|
@@ -2075,6 +2117,9 @@ interface DeliveryPage {
|
|
|
2075
2117
|
layout?: DeliveredLayout | null;
|
|
2076
2118
|
updatedAt: string | null;
|
|
2077
2119
|
publishedAt: string | null;
|
|
2120
|
+
/** The page's language (`null`: the site's default) and, on a translation, the page it translates. */
|
|
2121
|
+
locale?: string | null;
|
|
2122
|
+
translationOf?: string | null;
|
|
2078
2123
|
}
|
|
2079
2124
|
/** Generic paginated list envelope (the `data` of a list response). */
|
|
2080
2125
|
interface DeliveryList<T> {
|
|
@@ -2085,6 +2130,8 @@ interface DeliveryList<T> {
|
|
|
2085
2130
|
totalPages: number;
|
|
2086
2131
|
hasNextPage: boolean;
|
|
2087
2132
|
hasPreviousPage: boolean;
|
|
2133
|
+
/** Entry lists only: the project the read was addressed to, when one was named or implied. */
|
|
2134
|
+
projectId?: string | null;
|
|
2088
2135
|
}
|
|
2089
2136
|
|
|
2090
2137
|
/**
|