@hollware/core 0.5.0 → 0.8.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.mts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as z from "zod";
2
+ import "@cfworker/json-schema";
2
3
  import { MarkdownDocument } from "comark";
3
4
  import { StandardJSONSchemaV1, StandardSchemaV1 } from "@standard-schema/spec";
4
5
  //#region src/markdown/types.d.ts
@@ -217,6 +218,14 @@ interface Contract<Frontmatter = Record<string, unknown>> {
217
218
  readonly phases?: readonly Phase[];
218
219
  /** What the rule asks for, as `describe_site` shows it to agents. */
219
220
  readonly description: string;
221
+ /**
222
+ * The rule of the catalog this contract is, with its parameters (ADR-033): what a site's
223
+ * definition stores for it. A contract of the site's own code has none.
224
+ */
225
+ readonly rule?: {
226
+ readonly name: string;
227
+ readonly params: Readonly<Record<string, unknown>>;
228
+ };
220
229
  /** The problems it finds; an empty list passes. */
221
230
  check(context: ContractContext<Frontmatter>): readonly ContractFinding[] | Promise<readonly ContractFinding[]>;
222
231
  }
@@ -303,7 +312,8 @@ interface SiteDefinition {
303
312
  readonly webhooks?: readonly {
304
313
  readonly name: string;
305
314
  readonly url: string;
306
- readonly secret: string;
315
+ /** The Worker secret that signs; Hollware's own sealed one when it is left out. */
316
+ readonly secret?: string;
307
317
  }[];
308
318
  /** Tells IndexNow the URLs that changed; `key` names the Worker secret with the key. */
309
319
  readonly indexNow?: {
@@ -314,10 +324,11 @@ interface SiteDefinition {
314
324
  /** What `hollware.config.ts` exports. */
315
325
  interface HollwareConfig {
316
326
  /**
317
- * The sites, by key. The key is the site's id in the database, so it never changes once
318
- * content exists. v0.1 serves exactly one site per deployment.
327
+ * The sites of 0.x, by key: since ADR-033 the sites live in D1, and these move there on the
328
+ * first request of a deployment whose D1 has no definition for them. The key is the site's id
329
+ * in the database, so it never changes once content exists.
319
330
  */
320
- readonly sites: Readonly<Record<string, SiteDefinition>>;
331
+ readonly sites?: Readonly<Record<string, SiteDefinition>>;
321
332
  /** How MCP clients and the admin get tokens (ADR-026). */
322
333
  readonly auth?: AuthDefinition;
323
334
  }
@@ -359,11 +370,14 @@ interface ResolvedSite {
359
370
  };
360
371
  readonly events: ResolvedEvents;
361
372
  }
362
- /** A webhook of a site; `secret` names the Worker secret that signs its deliveries. */
373
+ /**
374
+ * A webhook of a site. `secret` names the Worker secret that signs its deliveries; `null` when the
375
+ * secret is Hollware's own, made by `make_webhook_secret` and sealed in the database (ADR-033).
376
+ */
363
377
  interface ResolvedWebhook {
364
378
  readonly name: string;
365
379
  readonly url: string;
366
- readonly secret: string;
380
+ readonly secret: string | null;
367
381
  }
368
382
  /** Who hears about the publications of a site. */
369
383
  interface ResolvedEvents {
@@ -439,7 +453,7 @@ export declare const DEFAULT_MAX_MARKDOWN_BYTES = 524288;
439
453
  */
440
454
  export declare const MAX_MARKDOWN_BYTES_CEILING = 786432;
441
455
  declare namespace schemas_d_exports {
442
- export { acknowledgedWarning, collectionDescription, collectionName, componentDescription, conflict, contractDescription, document, entry, entryId, entryStatus, entrySummary, format, locale, markdown, phase, publication, review, reviewId, reviewStatus, revisionId, searchMode, severity, siteDescription, slug, verdict, version, violation };
456
+ export { acknowledgedWarning, collectionDescription, collectionName, componentDescription, conflict, contractDescription, document, entry, entryId, entryStatus, entrySummary, format, locale, markdown, phase, publication, review, reviewComment, reviewId, reviewStatus, revisionId, searchMode, severity, siteDescription, slug, verdict, version, violation };
443
457
  }
444
458
  /**
445
459
  * The pieces the operation schemas share. Their descriptions become the JSON Schema that agents
@@ -526,6 +540,7 @@ declare const entrySummary: z.ZodObject<{
526
540
  tags: z.ZodArray<z.ZodString>;
527
541
  hasUnpublishedChanges: z.ZodBoolean;
528
542
  publishedAt: z.ZodNullable<z.ZodString>;
543
+ scheduledAt: z.ZodNullable<z.ZodString>;
529
544
  updatedAt: z.ZodString;
530
545
  }, z.core.$strip>;
531
546
  declare const publication: z.ZodObject<{
@@ -588,6 +603,7 @@ declare const entry: z.ZodObject<{
588
603
  tags: z.ZodArray<z.ZodString>;
589
604
  hasUnpublishedChanges: z.ZodBoolean;
590
605
  publishedAt: z.ZodNullable<z.ZodString>;
606
+ scheduledAt: z.ZodNullable<z.ZodString>;
591
607
  updatedAt: z.ZodString;
592
608
  revision: z.ZodString;
593
609
  verdict: z.ZodObject<{
@@ -694,6 +710,15 @@ declare const review: z.ZodObject<{
694
710
  decidedAt: z.ZodNullable<z.ZodString>;
695
711
  note: z.ZodNullable<z.ZodString>;
696
712
  }, z.core.$strip>;
713
+ /** A comment on a review (v0.6), by a person or by the agent of one. */
714
+ declare const reviewComment: z.ZodObject<{
715
+ id: z.ZodString;
716
+ author: z.ZodString;
717
+ authorName: z.ZodNullable<z.ZodString>;
718
+ client: z.ZodNullable<z.ZodString>;
719
+ body: z.ZodString;
720
+ at: z.ZodString;
721
+ }, z.core.$strip>;
697
722
  declare const conflict: z.ZodObject<{
698
723
  currentVersion: z.ZodNumber;
699
724
  headRevision: z.ZodString;
@@ -759,6 +784,7 @@ declare const siteDescription: z.ZodObject<{
759
784
  key: z.ZodString;
760
785
  locales: z.ZodArray<z.ZodString>;
761
786
  defaultLocale: z.ZodString;
787
+ url: z.ZodNullable<z.ZodString>;
762
788
  styleGuide: z.ZodNullable<z.ZodString>;
763
789
  collections: z.ZodArray<z.ZodObject<{
764
790
  name: z.ZodString;
@@ -827,6 +853,79 @@ export declare const REFUSAL_CONTRACT_IDS: readonly string[];
827
853
  */
828
854
  export declare function describeBuiltInContracts(): ContractDescription[];
829
855
  //#endregion
856
+ //#region src/contracts/catalog.d.ts
857
+ /** A rule of the catalog. */
858
+ interface CatalogRule {
859
+ readonly name: string;
860
+ readonly description: string;
861
+ readonly params: z.ZodType<Readonly<Record<string, unknown>>>;
862
+ make(params: Readonly<Record<string, unknown>>, severity: Severity, id?: string): Contract<unknown>;
863
+ }
864
+ export declare const CATALOG: readonly CatalogRule[];
865
+ /** A rule of the catalog by its name, or `undefined`. */
866
+ export declare function catalogRule(name: string): CatalogRule | undefined;
867
+ /** The catalog as `describe_site` shows it: each rule with the JSON Schema of its parameters. */
868
+ export declare function describeCatalog(): {
869
+ name: string;
870
+ description: string;
871
+ params: Record<string, unknown>;
872
+ }[];
873
+ //#endregion
874
+ //#region src/contracts/hash.d.ts
875
+ /**
876
+ * `contractsHash` (ADR-004): what a revision was checked against, in a short string. A stored
877
+ * verdict says which rules it answered to, and a changed rule shows as another hash.
878
+ */
879
+ /**
880
+ * JSON with the keys of every object in order and no spaces, so that equal values always give
881
+ * the same text. Arrays keep their order, which means something there. An `undefined` member is
882
+ * left out, as `JSON.stringify` does.
883
+ */
884
+ export declare function canonicalJson(value: unknown): string;
885
+ //#endregion
886
+ //#region src/contracts/rules.d.ts
887
+ /**
888
+ * The generic rules of the catalog (ADR-033): what a site asks of its entries without writing
889
+ * code, each one data with parameters. A rule reads a field of the frontmatter by its name, at
890
+ * the top of it; one that is absent or of another type is the schema's to report, so the rule
891
+ * passes it.
892
+ */
893
+ interface RuleOptions {
894
+ readonly severity?: Severity;
895
+ /** The id of the contract, when a collection has this rule twice: `field-length` otherwise. */
896
+ readonly id?: string;
897
+ }
898
+ interface FieldLengthParams {
899
+ readonly field: string;
900
+ readonly min?: number;
901
+ readonly max?: number;
902
+ /** A field whose presence lifts the rule: a title may be long when a `seoTitle` is given. */
903
+ readonly unless?: string;
904
+ }
905
+ /** A text, or a list, of a field has between `min` and `max` characters or items. */
906
+ declare function fieldLength(params: FieldLengthParams, options?: RuleOptions): Contract<unknown>;
907
+ interface FieldPatternParams {
908
+ readonly field: string;
909
+ /** A regular expression (Unicode) the whole text must match. */
910
+ readonly pattern: string;
911
+ /** What the pattern asks for, in words: `a slug of lowercase words`. */
912
+ readonly description: string;
913
+ }
914
+ /** A text field matches a pattern. */
915
+ declare function fieldPattern(params: FieldPatternParams, options?: RuleOptions): Contract<unknown>;
916
+ interface RequiredToPublishParams {
917
+ readonly fields: readonly string[];
918
+ }
919
+ /** Fields a draft may lack and a published entry must have, with something in them. */
920
+ declare function requiredToPublish(params: RequiredToPublishParams, options?: RuleOptions): Contract<unknown>;
921
+ interface BannedWordsParams {
922
+ readonly words: readonly string[];
923
+ /** Why the words are out, for the fix: `the brand is spelled Hollware`. */
924
+ readonly reason?: string;
925
+ }
926
+ /** Words that may appear neither in a text field of the frontmatter nor in the body. */
927
+ declare function bannedWords(params: BannedWordsParams, options?: RuleOptions): Contract<unknown>;
928
+ //#endregion
830
929
  //#region src/contracts/opt-in.d.ts
831
930
  /**
832
931
  * The built-in contracts a collection opts into by listing them in its `contracts`, and the
@@ -836,6 +935,8 @@ export declare function describeBuiltInContracts(): ContractDescription[];
836
935
  interface BuiltInOptions {
837
936
  /** `error` unless given: an error blocks publishing, a warning has to be acknowledged. */
838
937
  readonly severity?: Severity;
938
+ /** The id of the contract, when a collection lists the rule twice; the rule's name otherwise. */
939
+ readonly id?: string;
839
940
  }
840
941
  /**
841
942
  * Every locale of the site has an entry in the translation group of this one. It reads the group
@@ -881,9 +982,13 @@ interface CustomContractOptions<Frontmatter> {
881
982
  */
882
983
  declare function custom<Frontmatter = Record<string, unknown>>(options: CustomContractOptions<Frontmatter>): Contract<Frontmatter>;
883
984
  export declare const contracts: {
985
+ readonly bannedWords: typeof bannedWords;
884
986
  readonly custom: typeof custom;
987
+ readonly fieldLength: typeof fieldLength;
988
+ readonly fieldPattern: typeof fieldPattern;
885
989
  readonly imagesHaveAlt: typeof imagesHaveAlt;
886
990
  readonly internalLinksResolve: typeof internalLinksResolve;
991
+ readonly requiredToPublish: typeof requiredToPublish;
887
992
  readonly translationPair: typeof translationPair;
888
993
  };
889
994
  //#endregion
@@ -1009,6 +1114,132 @@ export declare const SITE_KEY_MAX_LENGTH = 64;
1009
1114
  /** Whether a value is a site key: a string that fits `SITE_KEY_PATTERN` and is not too long. */
1010
1115
  export declare function isSiteKey(value: unknown): value is string;
1011
1116
  //#endregion
1117
+ //#region src/structure/compile.d.ts
1118
+ /** The definitions of the sites, read from D1 as JSON, checked and resolved. */
1119
+ export declare function compileSites(definitions: Readonly<Record<string, unknown>>): ResolvedConfig;
1120
+ //#endregion
1121
+ //#region src/structure/definition.d.ts
1122
+ export declare const ruleDefinition: z.ZodObject<{
1123
+ rule: z.ZodString;
1124
+ severity: z.ZodDefault<z.ZodEnum<{
1125
+ error: "error";
1126
+ warning: "warning";
1127
+ }>>;
1128
+ params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1129
+ id: z.ZodOptional<z.ZodString>;
1130
+ }, z.core.$strict>;
1131
+ export declare const componentDefinitionData: z.ZodObject<{
1132
+ props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1133
+ description: z.ZodOptional<z.ZodString>;
1134
+ example: z.ZodOptional<z.ZodString>;
1135
+ }, z.core.$strict>;
1136
+ export declare const collectionDefinitionData: z.ZodObject<{
1137
+ schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1138
+ routes: z.ZodRecord<z.ZodString, z.ZodString>;
1139
+ translationGroupField: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1140
+ tagsField: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1141
+ sortByField: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1142
+ components: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
1143
+ props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1144
+ description: z.ZodOptional<z.ZodString>;
1145
+ example: z.ZodOptional<z.ZodString>;
1146
+ }, z.core.$strict>>>;
1147
+ rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
1148
+ rule: z.ZodString;
1149
+ severity: z.ZodDefault<z.ZodEnum<{
1150
+ error: "error";
1151
+ warning: "warning";
1152
+ }>>;
1153
+ params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1154
+ id: z.ZodOptional<z.ZodString>;
1155
+ }, z.core.$strict>>>;
1156
+ maxMarkdownBytes: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1157
+ styleGuide: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1158
+ }, z.core.$strict>;
1159
+ export declare const webhookDefinition: z.ZodObject<{
1160
+ name: z.ZodString;
1161
+ url: z.ZodString;
1162
+ secret: z.ZodOptional<z.ZodString>;
1163
+ }, z.core.$strict>;
1164
+ export declare const siteDefinitionData: z.ZodObject<{
1165
+ locales: z.ZodArray<z.ZodString>;
1166
+ defaultLocale: z.ZodString;
1167
+ url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1168
+ styleGuide: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1169
+ cors: z.ZodDefault<z.ZodObject<{
1170
+ origins: z.ZodArray<z.ZodString>;
1171
+ }, z.core.$strict>>;
1172
+ events: z.ZodDefault<z.ZodObject<{
1173
+ webhooks: z.ZodDefault<z.ZodArray<z.ZodObject<{
1174
+ name: z.ZodString;
1175
+ url: z.ZodString;
1176
+ secret: z.ZodOptional<z.ZodString>;
1177
+ }, z.core.$strict>>>;
1178
+ indexNow: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1179
+ key: z.ZodString;
1180
+ }, z.core.$strict>>>;
1181
+ }, z.core.$strict>>;
1182
+ collections: z.ZodRecord<z.ZodString, z.ZodObject<{
1183
+ schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1184
+ routes: z.ZodRecord<z.ZodString, z.ZodString>;
1185
+ translationGroupField: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1186
+ tagsField: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1187
+ sortByField: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1188
+ components: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
1189
+ props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1190
+ description: z.ZodOptional<z.ZodString>;
1191
+ example: z.ZodOptional<z.ZodString>;
1192
+ }, z.core.$strict>>>;
1193
+ rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
1194
+ rule: z.ZodString;
1195
+ severity: z.ZodDefault<z.ZodEnum<{
1196
+ error: "error";
1197
+ warning: "warning";
1198
+ }>>;
1199
+ params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1200
+ id: z.ZodOptional<z.ZodString>;
1201
+ }, z.core.$strict>>>;
1202
+ maxMarkdownBytes: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1203
+ styleGuide: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1204
+ }, z.core.$strict>>;
1205
+ }, z.core.$strict>;
1206
+ type RuleDefinition = z.output<typeof ruleDefinition>;
1207
+ type CollectionDefinitionData = z.output<typeof collectionDefinitionData>;
1208
+ type SiteDefinitionData = z.output<typeof siteDefinitionData>;
1209
+ /** A definition as a person or an agent writes it, with the defaults left out. */
1210
+ type SiteDefinitionInput = z.input<typeof siteDefinitionData>;
1211
+ //#endregion
1212
+ //#region src/structure/from-config.d.ts
1213
+ /** Every site of the config as a definition, or a `ConfigError` with what keeps one from moving. */
1214
+ export declare function definitionsFromConfig(config: HollwareConfig): Record<string, SiteDefinitionInput>;
1215
+ //#endregion
1216
+ //#region src/structure/json-schema.d.ts
1217
+ /**
1218
+ * A JSON Schema stored in D1 (ADR-033) as the schema of a collection or of a component's props:
1219
+ * validated by `@cfworker/json-schema`, which runs in Workers without `eval`, and seen by the
1220
+ * rest of Hollware as any Standard Schema, so that the schema contract, its fixes and
1221
+ * `describe_site` treat it as they treat a Zod schema. It accepts the value as it is: a JSON
1222
+ * Schema returns no other value than the one it checked.
1223
+ */
1224
+ type JsonObject = Record<string, unknown>;
1225
+ /** A JSON Schema (draft 2020-12) as a schema of Hollware. */
1226
+ export declare function describedSchemaOf(schema: JsonObject): DescribedSchema;
1227
+ //#endregion
1228
+ //#region src/structure/presets.d.ts
1229
+ /**
1230
+ * Where a new collection or site starts (ADR-033), in the admin and in `hollware init`: a blog, docs, or nothing. Each is a definition
1231
+ * the person then changes, with a route per locale that the collection's name begins.
1232
+ */
1233
+ type Definition = SiteDefinitionData;
1234
+ type CollectionDefinition$1 = CollectionDefinitionData;
1235
+ export declare const PRESETS: readonly ['blog', 'docs', 'empty'];
1236
+ type Preset = (typeof PRESETS)[number];
1237
+ /** The path of an entry in each locale: the default one at the root, the others under theirs. */
1238
+ export declare function routesFor(name: string, locales: readonly string[], defaultLocale: string): Record<string, string>;
1239
+ export declare function collectionPreset(preset: Preset, name: string, locales: readonly string[], defaultLocale: string): CollectionDefinition$1;
1240
+ /** A new site: its locales, and one collection from the preset. */
1241
+ export declare function sitePreset(preset: Preset, locales: readonly string[], defaultLocale: string): Definition;
1242
+ //#endregion
1012
1243
  //#region src/errors.d.ts
1013
1244
  /**
1014
1245
  * The errors of an operation that are none of its outcomes: the caller asked for something it
@@ -1064,8 +1295,11 @@ export declare const ID_PREFIXES: {
1064
1295
  readonly revision: 'rev';
1065
1296
  readonly revisionTag: 'tag';
1066
1297
  readonly review: 'rvw';
1298
+ readonly reviewComment: 'rvc';
1067
1299
  readonly schedule: 'sch';
1068
1300
  readonly session: 'ses';
1301
+ readonly siteChange: 'sit';
1302
+ readonly siteSecret: 'sec';
1069
1303
  readonly token: 'tok';
1070
1304
  readonly user: 'usr';
1071
1305
  };
@@ -1179,6 +1413,7 @@ export declare const describeSite: OperationSpec<"describe_site", z.ZodObject<{}
1179
1413
  key: z.ZodString;
1180
1414
  locales: z.ZodArray<z.ZodString>;
1181
1415
  defaultLocale: z.ZodString;
1416
+ url: z.ZodNullable<z.ZodString>;
1182
1417
  styleGuide: z.ZodNullable<z.ZodString>;
1183
1418
  collections: z.ZodArray<z.ZodObject<{
1184
1419
  name: z.ZodString;
@@ -1241,6 +1476,7 @@ export declare const listEntries: OperationSpec<"list_entries", z.ZodObject<{
1241
1476
  tags: z.ZodArray<z.ZodString>;
1242
1477
  hasUnpublishedChanges: z.ZodBoolean;
1243
1478
  publishedAt: z.ZodNullable<z.ZodString>;
1479
+ scheduledAt: z.ZodNullable<z.ZodString>;
1244
1480
  updatedAt: z.ZodString;
1245
1481
  }, z.core.$strip>>;
1246
1482
  nextCursor: z.ZodNullable<z.ZodString>;
@@ -1281,6 +1517,7 @@ export declare const search: OperationSpec<"search", z.ZodObject<{
1281
1517
  tags: z.ZodArray<z.ZodString>;
1282
1518
  hasUnpublishedChanges: z.ZodBoolean;
1283
1519
  publishedAt: z.ZodNullable<z.ZodString>;
1520
+ scheduledAt: z.ZodNullable<z.ZodString>;
1284
1521
  updatedAt: z.ZodString;
1285
1522
  }, z.core.$strip>;
1286
1523
  snippet: z.ZodString;
@@ -1319,6 +1556,7 @@ export declare const getEntry: OperationSpec<"get_entry", z.ZodObject<{
1319
1556
  tags: z.ZodArray<z.ZodString>;
1320
1557
  hasUnpublishedChanges: z.ZodBoolean;
1321
1558
  publishedAt: z.ZodNullable<z.ZodString>;
1559
+ scheduledAt: z.ZodNullable<z.ZodString>;
1322
1560
  updatedAt: z.ZodString;
1323
1561
  revision: z.ZodString;
1324
1562
  verdict: z.ZodObject<{
@@ -1413,6 +1651,7 @@ export declare const getEntry: OperationSpec<"get_entry", z.ZodObject<{
1413
1651
  tags: z.ZodArray<z.ZodString>;
1414
1652
  hasUnpublishedChanges: z.ZodBoolean;
1415
1653
  publishedAt: z.ZodNullable<z.ZodString>;
1654
+ scheduledAt: z.ZodNullable<z.ZodString>;
1416
1655
  updatedAt: z.ZodString;
1417
1656
  }, z.core.$strip>>>;
1418
1657
  }, z.core.$strip>>;
@@ -1440,6 +1679,7 @@ export declare const getTranslations: OperationSpec<"get_translations", z.ZodObj
1440
1679
  tags: z.ZodArray<z.ZodString>;
1441
1680
  hasUnpublishedChanges: z.ZodBoolean;
1442
1681
  publishedAt: z.ZodNullable<z.ZodString>;
1682
+ scheduledAt: z.ZodNullable<z.ZodString>;
1443
1683
  updatedAt: z.ZodString;
1444
1684
  }, z.core.$strip>>>;
1445
1685
  }, z.core.$strip>>;
@@ -1469,6 +1709,7 @@ export declare const createDraft: OperationSpec<"create_draft", z.ZodObject<{
1469
1709
  tags: z.ZodArray<z.ZodString>;
1470
1710
  hasUnpublishedChanges: z.ZodBoolean;
1471
1711
  publishedAt: z.ZodNullable<z.ZodString>;
1712
+ scheduledAt: z.ZodNullable<z.ZodString>;
1472
1713
  updatedAt: z.ZodString;
1473
1714
  }, z.core.$strip>>;
1474
1715
  verdict: z.ZodOptional<z.ZodObject<{
@@ -1530,6 +1771,7 @@ export declare const updateDraft: OperationSpec<"update_draft", z.ZodObject<{
1530
1771
  tags: z.ZodArray<z.ZodString>;
1531
1772
  hasUnpublishedChanges: z.ZodBoolean;
1532
1773
  publishedAt: z.ZodNullable<z.ZodString>;
1774
+ scheduledAt: z.ZodNullable<z.ZodString>;
1533
1775
  updatedAt: z.ZodString;
1534
1776
  }, z.core.$strip>>;
1535
1777
  verdict: z.ZodOptional<z.ZodObject<{
@@ -1645,6 +1887,7 @@ export declare const publish: OperationSpec<"publish", z.ZodObject<{
1645
1887
  tags: z.ZodArray<z.ZodString>;
1646
1888
  hasUnpublishedChanges: z.ZodBoolean;
1647
1889
  publishedAt: z.ZodNullable<z.ZodString>;
1890
+ scheduledAt: z.ZodNullable<z.ZodString>;
1648
1891
  updatedAt: z.ZodString;
1649
1892
  }, z.core.$strip>>;
1650
1893
  verdict: z.ZodOptional<z.ZodObject<{
@@ -1723,6 +1966,7 @@ export declare const unpublish: OperationSpec<"unpublish", z.ZodObject<{
1723
1966
  tags: z.ZodArray<z.ZodString>;
1724
1967
  hasUnpublishedChanges: z.ZodBoolean;
1725
1968
  publishedAt: z.ZodNullable<z.ZodString>;
1969
+ scheduledAt: z.ZodNullable<z.ZodString>;
1726
1970
  updatedAt: z.ZodString;
1727
1971
  }, z.core.$strip>>;
1728
1972
  }, z.core.$strip>>;
@@ -1770,8 +2014,17 @@ export declare const listReviews: OperationSpec<"list_reviews", z.ZodObject<{
1770
2014
  tags: z.ZodArray<z.ZodString>;
1771
2015
  hasUnpublishedChanges: z.ZodBoolean;
1772
2016
  publishedAt: z.ZodNullable<z.ZodString>;
2017
+ scheduledAt: z.ZodNullable<z.ZodString>;
1773
2018
  updatedAt: z.ZodString;
1774
2019
  }, z.core.$strip>;
2020
+ comments: z.ZodArray<z.ZodObject<{
2021
+ id: z.ZodString;
2022
+ author: z.ZodString;
2023
+ authorName: z.ZodNullable<z.ZodString>;
2024
+ client: z.ZodNullable<z.ZodString>;
2025
+ body: z.ZodString;
2026
+ at: z.ZodString;
2027
+ }, z.core.$strip>>;
1775
2028
  }, z.core.$strip>>;
1776
2029
  }, z.core.$strip>>;
1777
2030
  export declare const approveReview: OperationSpec<"approve_review", z.ZodObject<{
@@ -1821,6 +2074,7 @@ export declare const approveReview: OperationSpec<"approve_review", z.ZodObject<
1821
2074
  tags: z.ZodArray<z.ZodString>;
1822
2075
  hasUnpublishedChanges: z.ZodBoolean;
1823
2076
  publishedAt: z.ZodNullable<z.ZodString>;
2077
+ scheduledAt: z.ZodNullable<z.ZodString>;
1824
2078
  updatedAt: z.ZodString;
1825
2079
  }, z.core.$strip>>;
1826
2080
  verdict: z.ZodOptional<z.ZodObject<{
@@ -1854,6 +2108,110 @@ export declare const approveReview: OperationSpec<"approve_review", z.ZodObject<
1854
2108
  contractsHash: z.ZodString;
1855
2109
  }, z.core.$strip>>;
1856
2110
  }, z.core.$strip>>;
2111
+ export declare const requestReview: OperationSpec<"request_review", z.ZodObject<{
2112
+ id: z.ZodString;
2113
+ version: z.ZodNumber;
2114
+ acknowledgeWarnings: z.ZodDefault<z.ZodArray<z.ZodObject<{
2115
+ contract: z.ZodString;
2116
+ path: z.ZodString;
2117
+ }, z.core.$strip>>>;
2118
+ }, z.core.$strict>, z.ZodObject<{
2119
+ outcome: z.ZodEnum<{
2120
+ blocked: "blocked";
2121
+ conflict: "conflict";
2122
+ needs_acknowledgement: "needs_acknowledgement";
2123
+ not_found: "not_found";
2124
+ pending_review: "pending_review";
2125
+ }>;
2126
+ entry: z.ZodOptional<z.ZodObject<{
2127
+ id: z.ZodString;
2128
+ collection: z.ZodString;
2129
+ locale: z.ZodString;
2130
+ slug: z.ZodString;
2131
+ translationGroup: z.ZodNullable<z.ZodString>;
2132
+ status: z.ZodEnum<{
2133
+ draft: "draft";
2134
+ published: "published";
2135
+ scheduled: "scheduled";
2136
+ }>;
2137
+ version: z.ZodNumber;
2138
+ frontmatter: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2139
+ tags: z.ZodArray<z.ZodString>;
2140
+ hasUnpublishedChanges: z.ZodBoolean;
2141
+ publishedAt: z.ZodNullable<z.ZodString>;
2142
+ scheduledAt: z.ZodNullable<z.ZodString>;
2143
+ updatedAt: z.ZodString;
2144
+ }, z.core.$strip>>;
2145
+ verdict: z.ZodOptional<z.ZodObject<{
2146
+ ok: z.ZodBoolean;
2147
+ phase: z.ZodEnum<{
2148
+ publish: "publish";
2149
+ write: "write";
2150
+ }>;
2151
+ errors: z.ZodArray<z.ZodObject<{
2152
+ contract: z.ZodString;
2153
+ severity: z.ZodEnum<{
2154
+ error: "error";
2155
+ warning: "warning";
2156
+ }>;
2157
+ path: z.ZodString;
2158
+ message: z.ZodString;
2159
+ fix: z.ZodString;
2160
+ line: z.ZodOptional<z.ZodNumber>;
2161
+ }, z.core.$strip>>;
2162
+ warnings: z.ZodArray<z.ZodObject<{
2163
+ contract: z.ZodString;
2164
+ severity: z.ZodEnum<{
2165
+ error: "error";
2166
+ warning: "warning";
2167
+ }>;
2168
+ path: z.ZodString;
2169
+ message: z.ZodString;
2170
+ fix: z.ZodString;
2171
+ line: z.ZodOptional<z.ZodNumber>;
2172
+ }, z.core.$strip>>;
2173
+ contractsHash: z.ZodString;
2174
+ }, z.core.$strip>>;
2175
+ conflict: z.ZodOptional<z.ZodObject<{
2176
+ currentVersion: z.ZodNumber;
2177
+ headRevision: z.ZodString;
2178
+ }, z.core.$strip>>;
2179
+ review: z.ZodOptional<z.ZodObject<{
2180
+ id: z.ZodString;
2181
+ entryId: z.ZodString;
2182
+ revision: z.ZodString;
2183
+ status: z.ZodEnum<{
2184
+ approved: "approved";
2185
+ cancelled: "cancelled";
2186
+ changes_requested: "changes_requested";
2187
+ pending: "pending";
2188
+ }>;
2189
+ requestedBy: z.ZodString;
2190
+ requestedByName: z.ZodNullable<z.ZodString>;
2191
+ requestedAt: z.ZodString;
2192
+ decidedBy: z.ZodNullable<z.ZodString>;
2193
+ decidedAt: z.ZodNullable<z.ZodString>;
2194
+ note: z.ZodNullable<z.ZodString>;
2195
+ }, z.core.$strip>>;
2196
+ }, z.core.$strip>>;
2197
+ export declare const commentReview: OperationSpec<"comment_review", z.ZodObject<{
2198
+ id: z.ZodString;
2199
+ body: z.ZodString;
2200
+ }, z.core.$strict>, z.ZodObject<{
2201
+ outcome: z.ZodEnum<{
2202
+ commented: "commented";
2203
+ not_found: "not_found";
2204
+ not_pending: "not_pending";
2205
+ }>;
2206
+ comment: z.ZodOptional<z.ZodObject<{
2207
+ id: z.ZodString;
2208
+ author: z.ZodString;
2209
+ authorName: z.ZodNullable<z.ZodString>;
2210
+ client: z.ZodNullable<z.ZodString>;
2211
+ body: z.ZodString;
2212
+ at: z.ZodString;
2213
+ }, z.core.$strip>>;
2214
+ }, z.core.$strip>>;
1857
2215
  export declare const requestChanges: OperationSpec<"request_changes", z.ZodObject<{
1858
2216
  id: z.ZodString;
1859
2217
  note: z.ZodString;
@@ -1909,6 +2267,7 @@ export declare const contentStats: OperationSpec<"content_stats", z.ZodObject<{
1909
2267
  tags: z.ZodArray<z.ZodString>;
1910
2268
  hasUnpublishedChanges: z.ZodBoolean;
1911
2269
  publishedAt: z.ZodNullable<z.ZodString>;
2270
+ scheduledAt: z.ZodNullable<z.ZodString>;
1912
2271
  updatedAt: z.ZodString;
1913
2272
  }, z.core.$strip>>;
1914
2273
  }, z.core.$strip>>>;
@@ -1961,6 +2320,7 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
1961
2320
  tags: z.ZodArray<z.ZodString>;
1962
2321
  hasUnpublishedChanges: z.ZodBoolean;
1963
2322
  publishedAt: z.ZodNullable<z.ZodString>;
2323
+ scheduledAt: z.ZodNullable<z.ZodString>;
1964
2324
  updatedAt: z.ZodString;
1965
2325
  }, z.core.$strip>>;
1966
2326
  verdict: z.ZodOptional<z.ZodObject<{
@@ -1993,6 +2353,23 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
1993
2353
  }, z.core.$strip>>;
1994
2354
  contractsHash: z.ZodString;
1995
2355
  }, z.core.$strip>>;
2356
+ }, z.core.$strip>>, OperationSpec<"comment_review", z.ZodObject<{
2357
+ id: z.ZodString;
2358
+ body: z.ZodString;
2359
+ }, z.core.$strict>, z.ZodObject<{
2360
+ outcome: z.ZodEnum<{
2361
+ commented: "commented";
2362
+ not_found: "not_found";
2363
+ not_pending: "not_pending";
2364
+ }>;
2365
+ comment: z.ZodOptional<z.ZodObject<{
2366
+ id: z.ZodString;
2367
+ author: z.ZodString;
2368
+ authorName: z.ZodNullable<z.ZodString>;
2369
+ client: z.ZodNullable<z.ZodString>;
2370
+ body: z.ZodString;
2371
+ at: z.ZodString;
2372
+ }, z.core.$strip>>;
1996
2373
  }, z.core.$strip>>, OperationSpec<"content_stats", z.ZodObject<{
1997
2374
  days: z.ZodDefault<z.ZodNumber>;
1998
2375
  limit: z.ZodDefault<z.ZodNumber>;
@@ -2021,6 +2398,7 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
2021
2398
  tags: z.ZodArray<z.ZodString>;
2022
2399
  hasUnpublishedChanges: z.ZodBoolean;
2023
2400
  publishedAt: z.ZodNullable<z.ZodString>;
2401
+ scheduledAt: z.ZodNullable<z.ZodString>;
2024
2402
  updatedAt: z.ZodString;
2025
2403
  }, z.core.$strip>>;
2026
2404
  }, z.core.$strip>>>;
@@ -2050,6 +2428,7 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
2050
2428
  tags: z.ZodArray<z.ZodString>;
2051
2429
  hasUnpublishedChanges: z.ZodBoolean;
2052
2430
  publishedAt: z.ZodNullable<z.ZodString>;
2431
+ scheduledAt: z.ZodNullable<z.ZodString>;
2053
2432
  updatedAt: z.ZodString;
2054
2433
  }, z.core.$strip>>;
2055
2434
  verdict: z.ZodOptional<z.ZodObject<{
@@ -2082,6 +2461,72 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
2082
2461
  }, z.core.$strip>>;
2083
2462
  contractsHash: z.ZodString;
2084
2463
  }, z.core.$strip>>;
2464
+ }, z.core.$strip>>, OperationSpec<"create_site", z.ZodObject<{
2465
+ key: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
2466
+ definition: z.ZodObject<{
2467
+ locales: z.ZodArray<z.ZodString>;
2468
+ defaultLocale: z.ZodString;
2469
+ url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2470
+ styleGuide: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2471
+ cors: z.ZodDefault<z.ZodObject<{
2472
+ origins: z.ZodArray<z.ZodString>;
2473
+ }, z.core.$strict>>;
2474
+ events: z.ZodDefault<z.ZodObject<{
2475
+ webhooks: z.ZodDefault<z.ZodArray<z.ZodObject<{
2476
+ name: z.ZodString;
2477
+ url: z.ZodString;
2478
+ secret: z.ZodOptional<z.ZodString>;
2479
+ }, z.core.$strict>>>;
2480
+ indexNow: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2481
+ key: z.ZodString;
2482
+ }, z.core.$strict>>>;
2483
+ }, z.core.$strict>>;
2484
+ collections: z.ZodRecord<z.ZodString, z.ZodObject<{
2485
+ schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2486
+ routes: z.ZodRecord<z.ZodString, z.ZodString>;
2487
+ translationGroupField: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2488
+ tagsField: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2489
+ sortByField: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2490
+ components: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
2491
+ props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2492
+ description: z.ZodOptional<z.ZodString>;
2493
+ example: z.ZodOptional<z.ZodString>;
2494
+ }, z.core.$strict>>>;
2495
+ rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
2496
+ rule: z.ZodString;
2497
+ severity: z.ZodDefault<z.ZodEnum<{
2498
+ error: "error";
2499
+ warning: "warning";
2500
+ }>>;
2501
+ params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2502
+ id: z.ZodOptional<z.ZodString>;
2503
+ }, z.core.$strict>>>;
2504
+ maxMarkdownBytes: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
2505
+ styleGuide: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2506
+ }, z.core.$strict>>;
2507
+ }, z.core.$strict>;
2508
+ }, z.core.$strict>, z.ZodObject<{
2509
+ outcome: z.ZodEnum<{
2510
+ created: "created";
2511
+ invalid: "invalid";
2512
+ taken: "taken";
2513
+ }>;
2514
+ version: z.ZodOptional<z.ZodNumber>;
2515
+ problems: z.ZodOptional<z.ZodArray<z.ZodObject<{
2516
+ path: z.ZodString;
2517
+ message: z.ZodString;
2518
+ fix: z.ZodString;
2519
+ }, z.core.$strip>>>;
2520
+ }, z.core.$strip>>, OperationSpec<"delete_site", z.ZodObject<{
2521
+ key: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
2522
+ confirm: z.ZodDefault<z.ZodBoolean>;
2523
+ }, z.core.$strict>, z.ZodObject<{
2524
+ outcome: z.ZodEnum<{
2525
+ needs_confirmation: "needs_confirmation";
2526
+ not_found: "not_found";
2527
+ trashed: "trashed";
2528
+ }>;
2529
+ entries: z.ZodOptional<z.ZodNumber>;
2085
2530
  }, z.core.$strip>>, OperationSpec<"describe_site", z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
2086
2531
  outcome: z.ZodEnum<{
2087
2532
  ok: "ok";
@@ -2090,6 +2535,7 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
2090
2535
  key: z.ZodString;
2091
2536
  locales: z.ZodArray<z.ZodString>;
2092
2537
  defaultLocale: z.ZodString;
2538
+ url: z.ZodNullable<z.ZodString>;
2093
2539
  styleGuide: z.ZodNullable<z.ZodString>;
2094
2540
  collections: z.ZodArray<z.ZodObject<{
2095
2541
  name: z.ZodString;
@@ -2152,6 +2598,7 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
2152
2598
  tags: z.ZodArray<z.ZodString>;
2153
2599
  hasUnpublishedChanges: z.ZodBoolean;
2154
2600
  publishedAt: z.ZodNullable<z.ZodString>;
2601
+ scheduledAt: z.ZodNullable<z.ZodString>;
2155
2602
  updatedAt: z.ZodString;
2156
2603
  revision: z.ZodString;
2157
2604
  verdict: z.ZodObject<{
@@ -2246,8 +2693,62 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
2246
2693
  tags: z.ZodArray<z.ZodString>;
2247
2694
  hasUnpublishedChanges: z.ZodBoolean;
2248
2695
  publishedAt: z.ZodNullable<z.ZodString>;
2696
+ scheduledAt: z.ZodNullable<z.ZodString>;
2249
2697
  updatedAt: z.ZodString;
2250
2698
  }, z.core.$strip>>>;
2699
+ }, z.core.$strip>>, OperationSpec<"get_structure", z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
2700
+ outcome: z.ZodEnum<{
2701
+ ok: "ok";
2702
+ }>;
2703
+ site: z.ZodString;
2704
+ version: z.ZodNumber;
2705
+ definition: z.ZodObject<{
2706
+ locales: z.ZodArray<z.ZodString>;
2707
+ defaultLocale: z.ZodString;
2708
+ url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2709
+ styleGuide: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2710
+ cors: z.ZodDefault<z.ZodObject<{
2711
+ origins: z.ZodArray<z.ZodString>;
2712
+ }, z.core.$strict>>;
2713
+ events: z.ZodDefault<z.ZodObject<{
2714
+ webhooks: z.ZodDefault<z.ZodArray<z.ZodObject<{
2715
+ name: z.ZodString;
2716
+ url: z.ZodString;
2717
+ secret: z.ZodOptional<z.ZodString>;
2718
+ }, z.core.$strict>>>;
2719
+ indexNow: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2720
+ key: z.ZodString;
2721
+ }, z.core.$strict>>>;
2722
+ }, z.core.$strict>>;
2723
+ collections: z.ZodRecord<z.ZodString, z.ZodObject<{
2724
+ schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2725
+ routes: z.ZodRecord<z.ZodString, z.ZodString>;
2726
+ translationGroupField: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2727
+ tagsField: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2728
+ sortByField: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2729
+ components: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
2730
+ props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2731
+ description: z.ZodOptional<z.ZodString>;
2732
+ example: z.ZodOptional<z.ZodString>;
2733
+ }, z.core.$strict>>>;
2734
+ rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
2735
+ rule: z.ZodString;
2736
+ severity: z.ZodDefault<z.ZodEnum<{
2737
+ error: "error";
2738
+ warning: "warning";
2739
+ }>>;
2740
+ params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2741
+ id: z.ZodOptional<z.ZodString>;
2742
+ }, z.core.$strict>>>;
2743
+ maxMarkdownBytes: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
2744
+ styleGuide: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2745
+ }, z.core.$strict>>;
2746
+ }, z.core.$strict>;
2747
+ catalog: z.ZodArray<z.ZodObject<{
2748
+ name: z.ZodString;
2749
+ description: z.ZodString;
2750
+ params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2751
+ }, z.core.$strip>>;
2251
2752
  }, z.core.$strip>>, OperationSpec<"get_translations", z.ZodObject<{
2252
2753
  collection: z.ZodString;
2253
2754
  translationGroup: z.ZodString;
@@ -2272,6 +2773,7 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
2272
2773
  tags: z.ZodArray<z.ZodString>;
2273
2774
  hasUnpublishedChanges: z.ZodBoolean;
2274
2775
  publishedAt: z.ZodNullable<z.ZodString>;
2776
+ scheduledAt: z.ZodNullable<z.ZodString>;
2275
2777
  updatedAt: z.ZodString;
2276
2778
  }, z.core.$strip>>>;
2277
2779
  }, z.core.$strip>>, OperationSpec<"list_entries", z.ZodObject<{
@@ -2305,6 +2807,7 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
2305
2807
  tags: z.ZodArray<z.ZodString>;
2306
2808
  hasUnpublishedChanges: z.ZodBoolean;
2307
2809
  publishedAt: z.ZodNullable<z.ZodString>;
2810
+ scheduledAt: z.ZodNullable<z.ZodString>;
2308
2811
  updatedAt: z.ZodString;
2309
2812
  }, z.core.$strip>>;
2310
2813
  nextCursor: z.ZodNullable<z.ZodString>;
@@ -2352,9 +2855,27 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
2352
2855
  tags: z.ZodArray<z.ZodString>;
2353
2856
  hasUnpublishedChanges: z.ZodBoolean;
2354
2857
  publishedAt: z.ZodNullable<z.ZodString>;
2858
+ scheduledAt: z.ZodNullable<z.ZodString>;
2355
2859
  updatedAt: z.ZodString;
2356
2860
  }, z.core.$strip>;
2861
+ comments: z.ZodArray<z.ZodObject<{
2862
+ id: z.ZodString;
2863
+ author: z.ZodString;
2864
+ authorName: z.ZodNullable<z.ZodString>;
2865
+ client: z.ZodNullable<z.ZodString>;
2866
+ body: z.ZodString;
2867
+ at: z.ZodString;
2868
+ }, z.core.$strip>>;
2357
2869
  }, z.core.$strip>>;
2870
+ }, z.core.$strip>>, OperationSpec<"make_webhook_secret", z.ZodObject<{
2871
+ webhook: z.ZodString;
2872
+ }, z.core.$strict>, z.ZodObject<{
2873
+ outcome: z.ZodEnum<{
2874
+ made: "made";
2875
+ not_found: "not_found";
2876
+ unavailable: "unavailable";
2877
+ }>;
2878
+ secret: z.ZodOptional<z.ZodString>;
2358
2879
  }, z.core.$strip>>, OperationSpec<"publish", z.ZodObject<{
2359
2880
  id: z.ZodString;
2360
2881
  version: z.ZodNumber;
@@ -2393,6 +2914,7 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
2393
2914
  tags: z.ZodArray<z.ZodString>;
2394
2915
  hasUnpublishedChanges: z.ZodBoolean;
2395
2916
  publishedAt: z.ZodNullable<z.ZodString>;
2917
+ scheduledAt: z.ZodNullable<z.ZodString>;
2396
2918
  updatedAt: z.ZodString;
2397
2919
  }, z.core.$strip>>;
2398
2920
  verdict: z.ZodOptional<z.ZodObject<{
@@ -2473,6 +2995,98 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
2473
2995
  decidedAt: z.ZodNullable<z.ZodString>;
2474
2996
  note: z.ZodNullable<z.ZodString>;
2475
2997
  }, z.core.$strip>>;
2998
+ }, z.core.$strip>>, OperationSpec<"request_review", z.ZodObject<{
2999
+ id: z.ZodString;
3000
+ version: z.ZodNumber;
3001
+ acknowledgeWarnings: z.ZodDefault<z.ZodArray<z.ZodObject<{
3002
+ contract: z.ZodString;
3003
+ path: z.ZodString;
3004
+ }, z.core.$strip>>>;
3005
+ }, z.core.$strict>, z.ZodObject<{
3006
+ outcome: z.ZodEnum<{
3007
+ blocked: "blocked";
3008
+ conflict: "conflict";
3009
+ needs_acknowledgement: "needs_acknowledgement";
3010
+ not_found: "not_found";
3011
+ pending_review: "pending_review";
3012
+ }>;
3013
+ entry: z.ZodOptional<z.ZodObject<{
3014
+ id: z.ZodString;
3015
+ collection: z.ZodString;
3016
+ locale: z.ZodString;
3017
+ slug: z.ZodString;
3018
+ translationGroup: z.ZodNullable<z.ZodString>;
3019
+ status: z.ZodEnum<{
3020
+ draft: "draft";
3021
+ published: "published";
3022
+ scheduled: "scheduled";
3023
+ }>;
3024
+ version: z.ZodNumber;
3025
+ frontmatter: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3026
+ tags: z.ZodArray<z.ZodString>;
3027
+ hasUnpublishedChanges: z.ZodBoolean;
3028
+ publishedAt: z.ZodNullable<z.ZodString>;
3029
+ scheduledAt: z.ZodNullable<z.ZodString>;
3030
+ updatedAt: z.ZodString;
3031
+ }, z.core.$strip>>;
3032
+ verdict: z.ZodOptional<z.ZodObject<{
3033
+ ok: z.ZodBoolean;
3034
+ phase: z.ZodEnum<{
3035
+ publish: "publish";
3036
+ write: "write";
3037
+ }>;
3038
+ errors: z.ZodArray<z.ZodObject<{
3039
+ contract: z.ZodString;
3040
+ severity: z.ZodEnum<{
3041
+ error: "error";
3042
+ warning: "warning";
3043
+ }>;
3044
+ path: z.ZodString;
3045
+ message: z.ZodString;
3046
+ fix: z.ZodString;
3047
+ line: z.ZodOptional<z.ZodNumber>;
3048
+ }, z.core.$strip>>;
3049
+ warnings: z.ZodArray<z.ZodObject<{
3050
+ contract: z.ZodString;
3051
+ severity: z.ZodEnum<{
3052
+ error: "error";
3053
+ warning: "warning";
3054
+ }>;
3055
+ path: z.ZodString;
3056
+ message: z.ZodString;
3057
+ fix: z.ZodString;
3058
+ line: z.ZodOptional<z.ZodNumber>;
3059
+ }, z.core.$strip>>;
3060
+ contractsHash: z.ZodString;
3061
+ }, z.core.$strip>>;
3062
+ conflict: z.ZodOptional<z.ZodObject<{
3063
+ currentVersion: z.ZodNumber;
3064
+ headRevision: z.ZodString;
3065
+ }, z.core.$strip>>;
3066
+ review: z.ZodOptional<z.ZodObject<{
3067
+ id: z.ZodString;
3068
+ entryId: z.ZodString;
3069
+ revision: z.ZodString;
3070
+ status: z.ZodEnum<{
3071
+ approved: "approved";
3072
+ cancelled: "cancelled";
3073
+ changes_requested: "changes_requested";
3074
+ pending: "pending";
3075
+ }>;
3076
+ requestedBy: z.ZodString;
3077
+ requestedByName: z.ZodNullable<z.ZodString>;
3078
+ requestedAt: z.ZodString;
3079
+ decidedBy: z.ZodNullable<z.ZodString>;
3080
+ decidedAt: z.ZodNullable<z.ZodString>;
3081
+ note: z.ZodNullable<z.ZodString>;
3082
+ }, z.core.$strip>>;
3083
+ }, z.core.$strip>>, OperationSpec<"restore_site", z.ZodObject<{
3084
+ key: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
3085
+ }, z.core.$strict>, z.ZodObject<{
3086
+ outcome: z.ZodEnum<{
3087
+ not_found: "not_found";
3088
+ restored: "restored";
3089
+ }>;
2476
3090
  }, z.core.$strip>>, OperationSpec<"search", z.ZodObject<{
2477
3091
  query: z.ZodString;
2478
3092
  collection: z.ZodOptional<z.ZodString>;
@@ -2509,11 +3123,69 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
2509
3123
  tags: z.ZodArray<z.ZodString>;
2510
3124
  hasUnpublishedChanges: z.ZodBoolean;
2511
3125
  publishedAt: z.ZodNullable<z.ZodString>;
3126
+ scheduledAt: z.ZodNullable<z.ZodString>;
2512
3127
  updatedAt: z.ZodString;
2513
3128
  }, z.core.$strip>;
2514
3129
  snippet: z.ZodString;
2515
3130
  score: z.ZodNumber;
2516
3131
  }, z.core.$strip>>;
3132
+ }, z.core.$strip>>, OperationSpec<"set_collection", z.ZodObject<{
3133
+ version: z.ZodNumber;
3134
+ name: z.ZodString;
3135
+ collection: z.ZodNullable<z.ZodObject<{
3136
+ schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3137
+ routes: z.ZodRecord<z.ZodString, z.ZodString>;
3138
+ translationGroupField: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3139
+ tagsField: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3140
+ sortByField: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3141
+ components: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
3142
+ props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3143
+ description: z.ZodOptional<z.ZodString>;
3144
+ example: z.ZodOptional<z.ZodString>;
3145
+ }, z.core.$strict>>>;
3146
+ rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
3147
+ rule: z.ZodString;
3148
+ severity: z.ZodDefault<z.ZodEnum<{
3149
+ error: "error";
3150
+ warning: "warning";
3151
+ }>>;
3152
+ params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3153
+ id: z.ZodOptional<z.ZodString>;
3154
+ }, z.core.$strict>>>;
3155
+ maxMarkdownBytes: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
3156
+ styleGuide: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3157
+ }, z.core.$strict>>;
3158
+ confirm: z.ZodDefault<z.ZodBoolean>;
3159
+ }, z.core.$strict>, z.ZodObject<{
3160
+ outcome: z.ZodEnum<{
3161
+ conflict: "conflict";
3162
+ invalid: "invalid";
3163
+ needs_confirmation: "needs_confirmation";
3164
+ unchanged: "unchanged";
3165
+ updated: "updated";
3166
+ }>;
3167
+ version: z.ZodOptional<z.ZodNumber>;
3168
+ problems: z.ZodOptional<z.ZodArray<z.ZodObject<{
3169
+ path: z.ZodString;
3170
+ message: z.ZodString;
3171
+ fix: z.ZodString;
3172
+ }, z.core.$strip>>>;
3173
+ impact: z.ZodOptional<z.ZodObject<{
3174
+ removedCollections: z.ZodArray<z.ZodObject<{
3175
+ name: z.ZodString;
3176
+ entries: z.ZodNumber;
3177
+ }, z.core.$strip>>;
3178
+ removedLocales: z.ZodArray<z.ZodObject<{
3179
+ locale: z.ZodString;
3180
+ entries: z.ZodNumber;
3181
+ }, z.core.$strip>>;
3182
+ refused: z.ZodArray<z.ZodObject<{
3183
+ collection: z.ZodString;
3184
+ entries: z.ZodNumber;
3185
+ examples: z.ZodArray<z.ZodString>;
3186
+ }, z.core.$strip>>;
3187
+ }, z.core.$strip>>;
3188
+ currentVersion: z.ZodOptional<z.ZodNumber>;
2517
3189
  }, z.core.$strip>>, OperationSpec<"unpublish", z.ZodObject<{
2518
3190
  id: z.ZodString;
2519
3191
  }, z.core.$strict>, z.ZodObject<{
@@ -2537,6 +3209,7 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
2537
3209
  tags: z.ZodArray<z.ZodString>;
2538
3210
  hasUnpublishedChanges: z.ZodBoolean;
2539
3211
  publishedAt: z.ZodNullable<z.ZodString>;
3212
+ scheduledAt: z.ZodNullable<z.ZodString>;
2540
3213
  updatedAt: z.ZodString;
2541
3214
  }, z.core.$strip>>;
2542
3215
  }, z.core.$strip>>, OperationSpec<"update_draft", z.ZodObject<{
@@ -2567,6 +3240,7 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
2567
3240
  tags: z.ZodArray<z.ZodString>;
2568
3241
  hasUnpublishedChanges: z.ZodBoolean;
2569
3242
  publishedAt: z.ZodNullable<z.ZodString>;
3243
+ scheduledAt: z.ZodNullable<z.ZodString>;
2570
3244
  updatedAt: z.ZodString;
2571
3245
  }, z.core.$strip>>;
2572
3246
  verdict: z.ZodOptional<z.ZodObject<{
@@ -2603,6 +3277,81 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
2603
3277
  currentVersion: z.ZodNumber;
2604
3278
  headRevision: z.ZodString;
2605
3279
  }, z.core.$strip>>;
3280
+ }, z.core.$strip>>, OperationSpec<"update_site", z.ZodObject<{
3281
+ version: z.ZodNumber;
3282
+ definition: z.ZodObject<{
3283
+ locales: z.ZodArray<z.ZodString>;
3284
+ defaultLocale: z.ZodString;
3285
+ url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3286
+ styleGuide: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3287
+ cors: z.ZodDefault<z.ZodObject<{
3288
+ origins: z.ZodArray<z.ZodString>;
3289
+ }, z.core.$strict>>;
3290
+ events: z.ZodDefault<z.ZodObject<{
3291
+ webhooks: z.ZodDefault<z.ZodArray<z.ZodObject<{
3292
+ name: z.ZodString;
3293
+ url: z.ZodString;
3294
+ secret: z.ZodOptional<z.ZodString>;
3295
+ }, z.core.$strict>>>;
3296
+ indexNow: z.ZodDefault<z.ZodNullable<z.ZodObject<{
3297
+ key: z.ZodString;
3298
+ }, z.core.$strict>>>;
3299
+ }, z.core.$strict>>;
3300
+ collections: z.ZodRecord<z.ZodString, z.ZodObject<{
3301
+ schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3302
+ routes: z.ZodRecord<z.ZodString, z.ZodString>;
3303
+ translationGroupField: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3304
+ tagsField: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3305
+ sortByField: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3306
+ components: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
3307
+ props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3308
+ description: z.ZodOptional<z.ZodString>;
3309
+ example: z.ZodOptional<z.ZodString>;
3310
+ }, z.core.$strict>>>;
3311
+ rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
3312
+ rule: z.ZodString;
3313
+ severity: z.ZodDefault<z.ZodEnum<{
3314
+ error: "error";
3315
+ warning: "warning";
3316
+ }>>;
3317
+ params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3318
+ id: z.ZodOptional<z.ZodString>;
3319
+ }, z.core.$strict>>>;
3320
+ maxMarkdownBytes: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
3321
+ styleGuide: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3322
+ }, z.core.$strict>>;
3323
+ }, z.core.$strict>;
3324
+ confirm: z.ZodDefault<z.ZodBoolean>;
3325
+ }, z.core.$strict>, z.ZodObject<{
3326
+ outcome: z.ZodEnum<{
3327
+ conflict: "conflict";
3328
+ invalid: "invalid";
3329
+ needs_confirmation: "needs_confirmation";
3330
+ unchanged: "unchanged";
3331
+ updated: "updated";
3332
+ }>;
3333
+ version: z.ZodOptional<z.ZodNumber>;
3334
+ problems: z.ZodOptional<z.ZodArray<z.ZodObject<{
3335
+ path: z.ZodString;
3336
+ message: z.ZodString;
3337
+ fix: z.ZodString;
3338
+ }, z.core.$strip>>>;
3339
+ impact: z.ZodOptional<z.ZodObject<{
3340
+ removedCollections: z.ZodArray<z.ZodObject<{
3341
+ name: z.ZodString;
3342
+ entries: z.ZodNumber;
3343
+ }, z.core.$strip>>;
3344
+ removedLocales: z.ZodArray<z.ZodObject<{
3345
+ locale: z.ZodString;
3346
+ entries: z.ZodNumber;
3347
+ }, z.core.$strip>>;
3348
+ refused: z.ZodArray<z.ZodObject<{
3349
+ collection: z.ZodString;
3350
+ entries: z.ZodNumber;
3351
+ examples: z.ZodArray<z.ZodString>;
3352
+ }, z.core.$strip>>;
3353
+ }, z.core.$strip>>;
3354
+ currentVersion: z.ZodOptional<z.ZodNumber>;
2606
3355
  }, z.core.$strip>>, OperationSpec<"validate", z.ZodObject<{
2607
3356
  collection: z.ZodString;
2608
3357
  locale: z.ZodString;
@@ -2738,7 +3487,42 @@ export declare function chunksOf(entry: {
2738
3487
  readonly document: EntryDocument;
2739
3488
  }): Chunk[];
2740
3489
  //#endregion
3490
+ //#region src/cache.d.ts
3491
+ /**
3492
+ * The cache tags of Hollware's content (S8): one name for each thing a page can show, so that a
3493
+ * site tags each page with what it read and purges, when an event says what changed, the pages
3494
+ * that showed it. Hollware puts the tags an event invalidates in its payload; `@hollware/nuxt`
3495
+ * tags its pages with the same functions. A tag is at most 1,024 characters of printable ASCII
3496
+ * with no space or comma, which every cache that purges by tag takes.
3497
+ *
3498
+ * - `entry:<id>`: a page that shows the entry, its own or one that embeds it;
3499
+ * - `list:<collection>:<locale>`: a page that lists the entries of a collection in a locale, and
3500
+ * `list:<collection>:*` one that lists them in every locale;
3501
+ * - `group:<collection>:<group>`: a page that links to the translations of a group;
3502
+ * - `site`: a page that shows the structure of the site, such as its navigation.
3503
+ */
3504
+ export declare const SITE_TAG = "site";
3505
+ export declare function entryTag(id: string): string;
3506
+ export declare function listTag(collection: string, locale: string): string;
3507
+ export declare function groupTag(collection: string, group: string): string;
3508
+ /** The locale of a list of every locale. */
3509
+ export declare const EVERY_LOCALE = "*";
3510
+ /** What a summary of an entry says that tags derive from. */
3511
+ interface TaggedEntry {
3512
+ readonly id: string;
3513
+ readonly collection: string;
3514
+ readonly locale: string;
3515
+ readonly translationGroup: string | null;
3516
+ }
3517
+ /** The tags of a page that shows these entries, each its own. */
3518
+ export declare function tagsOfEntries(entries: readonly TaggedEntry[]): string[];
3519
+ /**
3520
+ * The tags an event about an entry invalidates: the pages that show it, the lists of its
3521
+ * collection in its locale and in every locale, and the pages that link to its translations.
3522
+ */
3523
+ export declare function tagsOfChange(entry: TaggedEntry): string[];
3524
+ //#endregion
2741
3525
  //#region src/index.d.ts
2742
3526
  export declare const name = "@hollware/core";
2743
3527
  //#endregion
2744
- export { type AcknowledgedWarning, type AuthDefinition, type BuiltInContractId, type BuiltInOptions, type Chunk, type CollectionDefinition, type ComponentDefinition, type ComponentUse, type ConfigProblem, type Contract, type ContractContext, type ContractDescription, type ContractFinding, type ContractText, type CustomContractOptions, type DescribedSchema, type DisallowedMarker, type Effect, type EntryDocument, type EntryFacts, type EntryLookup, type EntryRef, type ErrorCode, type ExtractedContent, type Heading, type HollwareConfig, type IdPrefix, type ImageRef, type LinkRef, type LinkTarget, type Operation, type OperationByName, type OperationName, type OperationSpec, type OutcomeInfo, type OutcomeOf, type Phase, type ProcessMarkdown, type ProcessMarkdownOptions, type ProcessResult, type ProcessedMarkdown, type RenderHtml, type ResolveConfig, type ResolvedAuth, type ResolvedCollection, type ResolvedConfig, type ResolvedSite, type RunContractsInput, type SchemaOutput, type Scope, type Severity, type SiteDefinition, type SiteDescription, type Verdict, type Violation, schemas_d_exports as schemas };
3528
+ export { type AcknowledgedWarning, type AuthDefinition, type BuiltInContractId, type BuiltInOptions, type CatalogRule, type Chunk, type CollectionDefinition, type CollectionDefinitionData, type ComponentDefinition, type ComponentUse, type ConfigProblem, type Contract, type ContractContext, type ContractDescription, type ContractFinding, type ContractText, type CustomContractOptions, type DescribedSchema, type DisallowedMarker, type Effect, type EntryDocument, type EntryFacts, type EntryLookup, type EntryRef, type ErrorCode, type ExtractedContent, type Heading, type HollwareConfig, type IdPrefix, type ImageRef, type LinkRef, type LinkTarget, type Operation, type OperationByName, type OperationName, type OperationSpec, type OutcomeInfo, type OutcomeOf, type Phase, type Preset, type ProcessMarkdown, type ProcessMarkdownOptions, type ProcessResult, type ProcessedMarkdown, type RenderHtml, type ResolveConfig, type ResolvedAuth, type ResolvedCollection, type ResolvedConfig, type ResolvedSite, type RuleDefinition, type RunContractsInput, type SchemaOutput, type Scope, type Severity, type SiteDefinition, type SiteDefinitionData, type SiteDefinitionInput, type SiteDescription, type TaggedEntry, type Verdict, type Violation, schemas_d_exports as schemas };