@cloudhal/core-contracts 0.3.12 → 0.4.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/src/generated/index.d.ts +1 -1
- package/dist/src/generated/index.js +1 -1
- package/dist/src/generated/schemas.d.ts +106 -2
- package/dist/src/generated/schemas.js +60 -1
- package/dist/src/generated/site.d.ts +32 -1
- package/dist/src/generated/site.js +32 -1
- package/dist/src/generated/validators.js +1615 -1299
- package/package.json +1 -1
- package/schemas/site.schema.json +38 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Source: packages/core-contracts/schemas/*.schema.json (run `pnpm gen`)
|
|
4
4
|
*/
|
|
5
5
|
export type { SchemaVersion, Id, Slug, Revision, Timestamp, Project, Metadata } from "./project.js";
|
|
6
|
-
export type { Locale, Section, BodyProfile, ActorKind, BodyBlocks, SurfaceComponentId, Path, Section1, TimeZone, Site, Domain, Localization, CollectionSettings, ThemeRef, Design, Brand, ImageRef, SocialLink, Chrome, ChromeHeader, HeaderAction, ChromeFooter, FooterColumn, HeroSection, Link, RichTextSection, BodyBlock, Actor, ImageSection, ContentListSection, ComponentSection, SurfaceSection, SurfaceComponent, Announcement, Consent } from "./site.js";
|
|
6
|
+
export type { Locale, Section, BodyProfile, ActorKind, BodyBlocks, SurfaceComponentId, Path, Section1, TimeZone, Site, Domain, Localization, CollectionSettings, CollectionLabel, ThemeRef, Design, Brand, ImageRef, SocialLink, Chrome, ChromeHeader, HeaderAction, ChromeFooter, FooterColumn, HeroSection, Link, RichTextSection, BodyBlock, Actor, ImageSection, ContentListSection, ComponentSection, SurfaceSection, SurfaceComponent, Announcement, Consent } from "./site.js";
|
|
7
7
|
export type { PublishStatus, TranslationMethod, MotionLevel, Page, Seo, Availability, Translation } from "./page.js";
|
|
8
8
|
export type { ContentEntry, Body, TermAssignment, Correction } from "./content-entry.js";
|
|
9
9
|
export type { Snapshot, NodeRef, ChangeSummary } from "./snapshot.js";
|
|
@@ -146,10 +146,11 @@ export declare const SiteSchema: {
|
|
|
146
146
|
};
|
|
147
147
|
readonly collections: {
|
|
148
148
|
readonly type: "object";
|
|
149
|
-
readonly description: "RFC-0038
|
|
149
|
+
readonly description: "RFC-0038, RFC-0040: the site's declared collections and their settings, keyed by collection (ContentEntry.collection). A key here declares the collection, even with no settings ({}). A collection with entries but no key is inferred and uses the defaults.";
|
|
150
150
|
readonly propertyNames: {
|
|
151
151
|
readonly $ref: "#/$defs/Slug";
|
|
152
152
|
};
|
|
153
|
+
readonly maxProperties: 50;
|
|
153
154
|
readonly additionalProperties: {
|
|
154
155
|
readonly $ref: "#/$defs/CollectionSettings";
|
|
155
156
|
};
|
|
@@ -451,6 +452,27 @@ export declare const SiteSchema: {
|
|
|
451
452
|
};
|
|
452
453
|
};
|
|
453
454
|
};
|
|
455
|
+
readonly CollectionLabel: {
|
|
456
|
+
readonly type: "object";
|
|
457
|
+
readonly additionalProperties: false;
|
|
458
|
+
readonly required: readonly ["singular", "plural"];
|
|
459
|
+
readonly properties: {
|
|
460
|
+
readonly singular: {
|
|
461
|
+
readonly type: "string";
|
|
462
|
+
readonly minLength: 1;
|
|
463
|
+
readonly maxLength: 100;
|
|
464
|
+
};
|
|
465
|
+
readonly plural: {
|
|
466
|
+
readonly type: "string";
|
|
467
|
+
readonly minLength: 1;
|
|
468
|
+
readonly maxLength: 100;
|
|
469
|
+
};
|
|
470
|
+
readonly description: {
|
|
471
|
+
readonly type: "string";
|
|
472
|
+
readonly maxLength: 1000;
|
|
473
|
+
};
|
|
474
|
+
};
|
|
475
|
+
};
|
|
454
476
|
readonly CollectionSettings: {
|
|
455
477
|
readonly type: "object";
|
|
456
478
|
readonly additionalProperties: false;
|
|
@@ -460,6 +482,36 @@ export declare const SiteSchema: {
|
|
|
460
482
|
readonly description: "RFC-0038: where the collection's entries live, as a template with a closed token set. Version 1: one or more fixed lower-case path segments followed by /{slug}, e.g. /blog/{slug}. Absent means /<collection>/{slug}.";
|
|
461
483
|
readonly pattern: "^(/[a-z0-9]+(-[a-z0-9]+)*)+/\\{slug\\}$";
|
|
462
484
|
};
|
|
485
|
+
readonly labels: {
|
|
486
|
+
readonly type: "object";
|
|
487
|
+
readonly description: "RFC-0040: display names per locale (Studio, agents, themes). Absent or missing a locale: the default locale's, then the key.";
|
|
488
|
+
readonly propertyNames: {
|
|
489
|
+
readonly $ref: "#/$defs/Locale";
|
|
490
|
+
};
|
|
491
|
+
readonly minProperties: 1;
|
|
492
|
+
readonly additionalProperties: {
|
|
493
|
+
readonly $ref: "#/$defs/CollectionLabel";
|
|
494
|
+
};
|
|
495
|
+
};
|
|
496
|
+
readonly icon: {
|
|
497
|
+
readonly type: "string";
|
|
498
|
+
readonly description: "RFC-0040: a name from Studio's closed icon set (e.g. calendar, briefcase, users). Unknown names show the default icon. Never a URL or markup.";
|
|
499
|
+
readonly pattern: "^[a-z0-9]+(-[a-z0-9]+)*$";
|
|
500
|
+
readonly maxLength: 40;
|
|
501
|
+
};
|
|
502
|
+
readonly feed: {
|
|
503
|
+
readonly type: "boolean";
|
|
504
|
+
readonly description: "RFC-0040: entries appear in the site's RSS feeds. Absent: true.";
|
|
505
|
+
};
|
|
506
|
+
readonly sitemap: {
|
|
507
|
+
readonly type: "boolean";
|
|
508
|
+
readonly description: "RFC-0040: published entries appear in sitemap.xml. Absent: true.";
|
|
509
|
+
};
|
|
510
|
+
readonly sort: {
|
|
511
|
+
readonly type: "string";
|
|
512
|
+
readonly description: "RFC-0040: default order where none is given (Studio's list, entry queries without sort, MCP list_entries). Absent: newest.";
|
|
513
|
+
readonly enum: readonly ["newest", "oldest", "title"];
|
|
514
|
+
};
|
|
463
515
|
};
|
|
464
516
|
};
|
|
465
517
|
readonly Consent: {
|
|
@@ -5973,10 +6025,11 @@ export declare const schemas: {
|
|
|
5973
6025
|
};
|
|
5974
6026
|
readonly collections: {
|
|
5975
6027
|
readonly type: "object";
|
|
5976
|
-
readonly description: "RFC-0038
|
|
6028
|
+
readonly description: "RFC-0038, RFC-0040: the site's declared collections and their settings, keyed by collection (ContentEntry.collection). A key here declares the collection, even with no settings ({}). A collection with entries but no key is inferred and uses the defaults.";
|
|
5977
6029
|
readonly propertyNames: {
|
|
5978
6030
|
readonly $ref: "#/$defs/Slug";
|
|
5979
6031
|
};
|
|
6032
|
+
readonly maxProperties: 50;
|
|
5980
6033
|
readonly additionalProperties: {
|
|
5981
6034
|
readonly $ref: "#/$defs/CollectionSettings";
|
|
5982
6035
|
};
|
|
@@ -6278,6 +6331,27 @@ export declare const schemas: {
|
|
|
6278
6331
|
};
|
|
6279
6332
|
};
|
|
6280
6333
|
};
|
|
6334
|
+
readonly CollectionLabel: {
|
|
6335
|
+
readonly type: "object";
|
|
6336
|
+
readonly additionalProperties: false;
|
|
6337
|
+
readonly required: readonly ["singular", "plural"];
|
|
6338
|
+
readonly properties: {
|
|
6339
|
+
readonly singular: {
|
|
6340
|
+
readonly type: "string";
|
|
6341
|
+
readonly minLength: 1;
|
|
6342
|
+
readonly maxLength: 100;
|
|
6343
|
+
};
|
|
6344
|
+
readonly plural: {
|
|
6345
|
+
readonly type: "string";
|
|
6346
|
+
readonly minLength: 1;
|
|
6347
|
+
readonly maxLength: 100;
|
|
6348
|
+
};
|
|
6349
|
+
readonly description: {
|
|
6350
|
+
readonly type: "string";
|
|
6351
|
+
readonly maxLength: 1000;
|
|
6352
|
+
};
|
|
6353
|
+
};
|
|
6354
|
+
};
|
|
6281
6355
|
readonly CollectionSettings: {
|
|
6282
6356
|
readonly type: "object";
|
|
6283
6357
|
readonly additionalProperties: false;
|
|
@@ -6287,6 +6361,36 @@ export declare const schemas: {
|
|
|
6287
6361
|
readonly description: "RFC-0038: where the collection's entries live, as a template with a closed token set. Version 1: one or more fixed lower-case path segments followed by /{slug}, e.g. /blog/{slug}. Absent means /<collection>/{slug}.";
|
|
6288
6362
|
readonly pattern: "^(/[a-z0-9]+(-[a-z0-9]+)*)+/\\{slug\\}$";
|
|
6289
6363
|
};
|
|
6364
|
+
readonly labels: {
|
|
6365
|
+
readonly type: "object";
|
|
6366
|
+
readonly description: "RFC-0040: display names per locale (Studio, agents, themes). Absent or missing a locale: the default locale's, then the key.";
|
|
6367
|
+
readonly propertyNames: {
|
|
6368
|
+
readonly $ref: "#/$defs/Locale";
|
|
6369
|
+
};
|
|
6370
|
+
readonly minProperties: 1;
|
|
6371
|
+
readonly additionalProperties: {
|
|
6372
|
+
readonly $ref: "#/$defs/CollectionLabel";
|
|
6373
|
+
};
|
|
6374
|
+
};
|
|
6375
|
+
readonly icon: {
|
|
6376
|
+
readonly type: "string";
|
|
6377
|
+
readonly description: "RFC-0040: a name from Studio's closed icon set (e.g. calendar, briefcase, users). Unknown names show the default icon. Never a URL or markup.";
|
|
6378
|
+
readonly pattern: "^[a-z0-9]+(-[a-z0-9]+)*$";
|
|
6379
|
+
readonly maxLength: 40;
|
|
6380
|
+
};
|
|
6381
|
+
readonly feed: {
|
|
6382
|
+
readonly type: "boolean";
|
|
6383
|
+
readonly description: "RFC-0040: entries appear in the site's RSS feeds. Absent: true.";
|
|
6384
|
+
};
|
|
6385
|
+
readonly sitemap: {
|
|
6386
|
+
readonly type: "boolean";
|
|
6387
|
+
readonly description: "RFC-0040: published entries appear in sitemap.xml. Absent: true.";
|
|
6388
|
+
};
|
|
6389
|
+
readonly sort: {
|
|
6390
|
+
readonly type: "string";
|
|
6391
|
+
readonly description: "RFC-0040: default order where none is given (Studio's list, entry queries without sort, MCP list_entries). Absent: newest.";
|
|
6392
|
+
readonly enum: readonly ["newest", "oldest", "title"];
|
|
6393
|
+
};
|
|
6290
6394
|
};
|
|
6291
6395
|
};
|
|
6292
6396
|
readonly Consent: {
|
|
@@ -176,10 +176,11 @@ export const SiteSchema = {
|
|
|
176
176
|
},
|
|
177
177
|
"collections": {
|
|
178
178
|
"type": "object",
|
|
179
|
-
"description": "RFC-0038
|
|
179
|
+
"description": "RFC-0038, RFC-0040: the site's declared collections and their settings, keyed by collection (ContentEntry.collection). A key here declares the collection, even with no settings ({}). A collection with entries but no key is inferred and uses the defaults.",
|
|
180
180
|
"propertyNames": {
|
|
181
181
|
"$ref": "#/$defs/Slug"
|
|
182
182
|
},
|
|
183
|
+
"maxProperties": 50,
|
|
183
184
|
"additionalProperties": {
|
|
184
185
|
"$ref": "#/$defs/CollectionSettings"
|
|
185
186
|
}
|
|
@@ -558,6 +559,30 @@ export const SiteSchema = {
|
|
|
558
559
|
}
|
|
559
560
|
}
|
|
560
561
|
},
|
|
562
|
+
"CollectionLabel": {
|
|
563
|
+
"type": "object",
|
|
564
|
+
"additionalProperties": false,
|
|
565
|
+
"required": [
|
|
566
|
+
"singular",
|
|
567
|
+
"plural"
|
|
568
|
+
],
|
|
569
|
+
"properties": {
|
|
570
|
+
"singular": {
|
|
571
|
+
"type": "string",
|
|
572
|
+
"minLength": 1,
|
|
573
|
+
"maxLength": 100
|
|
574
|
+
},
|
|
575
|
+
"plural": {
|
|
576
|
+
"type": "string",
|
|
577
|
+
"minLength": 1,
|
|
578
|
+
"maxLength": 100
|
|
579
|
+
},
|
|
580
|
+
"description": {
|
|
581
|
+
"type": "string",
|
|
582
|
+
"maxLength": 1000
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
},
|
|
561
586
|
"CollectionSettings": {
|
|
562
587
|
"type": "object",
|
|
563
588
|
"additionalProperties": false,
|
|
@@ -566,6 +591,40 @@ export const SiteSchema = {
|
|
|
566
591
|
"type": "string",
|
|
567
592
|
"description": "RFC-0038: where the collection's entries live, as a template with a closed token set. Version 1: one or more fixed lower-case path segments followed by /{slug}, e.g. /blog/{slug}. Absent means /<collection>/{slug}.",
|
|
568
593
|
"pattern": "^(/[a-z0-9]+(-[a-z0-9]+)*)+/\\{slug\\}$"
|
|
594
|
+
},
|
|
595
|
+
"labels": {
|
|
596
|
+
"type": "object",
|
|
597
|
+
"description": "RFC-0040: display names per locale (Studio, agents, themes). Absent or missing a locale: the default locale's, then the key.",
|
|
598
|
+
"propertyNames": {
|
|
599
|
+
"$ref": "#/$defs/Locale"
|
|
600
|
+
},
|
|
601
|
+
"minProperties": 1,
|
|
602
|
+
"additionalProperties": {
|
|
603
|
+
"$ref": "#/$defs/CollectionLabel"
|
|
604
|
+
}
|
|
605
|
+
},
|
|
606
|
+
"icon": {
|
|
607
|
+
"type": "string",
|
|
608
|
+
"description": "RFC-0040: a name from Studio's closed icon set (e.g. calendar, briefcase, users). Unknown names show the default icon. Never a URL or markup.",
|
|
609
|
+
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
|
|
610
|
+
"maxLength": 40
|
|
611
|
+
},
|
|
612
|
+
"feed": {
|
|
613
|
+
"type": "boolean",
|
|
614
|
+
"description": "RFC-0040: entries appear in the site's RSS feeds. Absent: true."
|
|
615
|
+
},
|
|
616
|
+
"sitemap": {
|
|
617
|
+
"type": "boolean",
|
|
618
|
+
"description": "RFC-0040: published entries appear in sitemap.xml. Absent: true."
|
|
619
|
+
},
|
|
620
|
+
"sort": {
|
|
621
|
+
"type": "string",
|
|
622
|
+
"description": "RFC-0040: default order where none is given (Studio's list, entry queries without sort, MCP list_entries). Absent: newest.",
|
|
623
|
+
"enum": [
|
|
624
|
+
"newest",
|
|
625
|
+
"oldest",
|
|
626
|
+
"title"
|
|
627
|
+
]
|
|
569
628
|
}
|
|
570
629
|
}
|
|
571
630
|
},
|
|
@@ -121,7 +121,7 @@ export interface Site {
|
|
|
121
121
|
homePageId?: Id;
|
|
122
122
|
localization?: Localization;
|
|
123
123
|
/**
|
|
124
|
-
* RFC-0038
|
|
124
|
+
* RFC-0038, RFC-0040: the site's declared collections and their settings, keyed by collection (ContentEntry.collection). A key here declares the collection, even with no settings ({}). A collection with entries but no key is inferred and uses the defaults.
|
|
125
125
|
*/
|
|
126
126
|
collections?: {
|
|
127
127
|
[k: string]: CollectionSettings | undefined;
|
|
@@ -192,6 +192,37 @@ export interface CollectionSettings {
|
|
|
192
192
|
* RFC-0038: where the collection's entries live, as a template with a closed token set. Version 1: one or more fixed lower-case path segments followed by /{slug}, e.g. /blog/{slug}. Absent means /<collection>/{slug}.
|
|
193
193
|
*/
|
|
194
194
|
permalink?: string;
|
|
195
|
+
/**
|
|
196
|
+
* RFC-0040: display names per locale (Studio, agents, themes). Absent or missing a locale: the default locale's, then the key.
|
|
197
|
+
*/
|
|
198
|
+
labels?: {
|
|
199
|
+
[k: string]: CollectionLabel | undefined;
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* RFC-0040: a name from Studio's closed icon set (e.g. calendar, briefcase, users). Unknown names show the default icon. Never a URL or markup.
|
|
203
|
+
*/
|
|
204
|
+
icon?: string;
|
|
205
|
+
/**
|
|
206
|
+
* RFC-0040: entries appear in the site's RSS feeds. Absent: true.
|
|
207
|
+
*/
|
|
208
|
+
feed?: boolean;
|
|
209
|
+
/**
|
|
210
|
+
* RFC-0040: published entries appear in sitemap.xml. Absent: true.
|
|
211
|
+
*/
|
|
212
|
+
sitemap?: boolean;
|
|
213
|
+
/**
|
|
214
|
+
* RFC-0040: default order where none is given (Studio's list, entry queries without sort, MCP list_entries). Absent: newest.
|
|
215
|
+
*/
|
|
216
|
+
sort?: "newest" | "oldest" | "title";
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* This interface was referenced by `Site`'s JSON-Schema
|
|
220
|
+
* via the `definition` "CollectionLabel".
|
|
221
|
+
*/
|
|
222
|
+
export interface CollectionLabel {
|
|
223
|
+
singular: string;
|
|
224
|
+
plural: string;
|
|
225
|
+
description?: string;
|
|
195
226
|
}
|
|
196
227
|
/**
|
|
197
228
|
* Theme (a.k.a. Experience) applied by the renderer. Config is theme-defined and validated by the theme's own schema, not here.
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
|
|
138
138
|
|
|
139
139
|
|
|
140
|
-
|
|
140
|
+
|
|
141
141
|
|
|
142
142
|
|
|
143
143
|
|
|
@@ -208,6 +208,37 @@
|
|
|
208
208
|
|
|
209
209
|
|
|
210
210
|
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* This interface was referenced by `Site`'s JSON-Schema
|
|
236
|
+
* via the `definition` "CollectionLabel".
|
|
237
|
+
*/
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
211
242
|
|
|
212
243
|
/**
|
|
213
244
|
* Theme (a.k.a. Experience) applied by the renderer. Config is theme-defined and validated by the theme's own schema, not here.
|