@hollware/core 0.6.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 +561 -7
- package/dist/index.mjs +992 -117
- package/package.json +2 -1
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
|
-
|
|
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
|
|
318
|
-
*
|
|
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
|
|
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
|
-
/**
|
|
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 {
|
|
@@ -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<{
|
|
@@ -768,6 +784,7 @@ declare const siteDescription: z.ZodObject<{
|
|
|
768
784
|
key: z.ZodString;
|
|
769
785
|
locales: z.ZodArray<z.ZodString>;
|
|
770
786
|
defaultLocale: z.ZodString;
|
|
787
|
+
url: z.ZodNullable<z.ZodString>;
|
|
771
788
|
styleGuide: z.ZodNullable<z.ZodString>;
|
|
772
789
|
collections: z.ZodArray<z.ZodObject<{
|
|
773
790
|
name: z.ZodString;
|
|
@@ -836,6 +853,79 @@ export declare const REFUSAL_CONTRACT_IDS: readonly string[];
|
|
|
836
853
|
*/
|
|
837
854
|
export declare function describeBuiltInContracts(): ContractDescription[];
|
|
838
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
|
|
839
929
|
//#region src/contracts/opt-in.d.ts
|
|
840
930
|
/**
|
|
841
931
|
* The built-in contracts a collection opts into by listing them in its `contracts`, and the
|
|
@@ -845,6 +935,8 @@ export declare function describeBuiltInContracts(): ContractDescription[];
|
|
|
845
935
|
interface BuiltInOptions {
|
|
846
936
|
/** `error` unless given: an error blocks publishing, a warning has to be acknowledged. */
|
|
847
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;
|
|
848
940
|
}
|
|
849
941
|
/**
|
|
850
942
|
* Every locale of the site has an entry in the translation group of this one. It reads the group
|
|
@@ -890,9 +982,13 @@ interface CustomContractOptions<Frontmatter> {
|
|
|
890
982
|
*/
|
|
891
983
|
declare function custom<Frontmatter = Record<string, unknown>>(options: CustomContractOptions<Frontmatter>): Contract<Frontmatter>;
|
|
892
984
|
export declare const contracts: {
|
|
985
|
+
readonly bannedWords: typeof bannedWords;
|
|
893
986
|
readonly custom: typeof custom;
|
|
987
|
+
readonly fieldLength: typeof fieldLength;
|
|
988
|
+
readonly fieldPattern: typeof fieldPattern;
|
|
894
989
|
readonly imagesHaveAlt: typeof imagesHaveAlt;
|
|
895
990
|
readonly internalLinksResolve: typeof internalLinksResolve;
|
|
991
|
+
readonly requiredToPublish: typeof requiredToPublish;
|
|
896
992
|
readonly translationPair: typeof translationPair;
|
|
897
993
|
};
|
|
898
994
|
//#endregion
|
|
@@ -1018,6 +1114,132 @@ export declare const SITE_KEY_MAX_LENGTH = 64;
|
|
|
1018
1114
|
/** Whether a value is a site key: a string that fits `SITE_KEY_PATTERN` and is not too long. */
|
|
1019
1115
|
export declare function isSiteKey(value: unknown): value is string;
|
|
1020
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
|
|
1021
1243
|
//#region src/errors.d.ts
|
|
1022
1244
|
/**
|
|
1023
1245
|
* The errors of an operation that are none of its outcomes: the caller asked for something it
|
|
@@ -1076,6 +1298,8 @@ export declare const ID_PREFIXES: {
|
|
|
1076
1298
|
readonly reviewComment: 'rvc';
|
|
1077
1299
|
readonly schedule: 'sch';
|
|
1078
1300
|
readonly session: 'ses';
|
|
1301
|
+
readonly siteChange: 'sit';
|
|
1302
|
+
readonly siteSecret: 'sec';
|
|
1079
1303
|
readonly token: 'tok';
|
|
1080
1304
|
readonly user: 'usr';
|
|
1081
1305
|
};
|
|
@@ -1189,6 +1413,7 @@ export declare const describeSite: OperationSpec<"describe_site", z.ZodObject<{}
|
|
|
1189
1413
|
key: z.ZodString;
|
|
1190
1414
|
locales: z.ZodArray<z.ZodString>;
|
|
1191
1415
|
defaultLocale: z.ZodString;
|
|
1416
|
+
url: z.ZodNullable<z.ZodString>;
|
|
1192
1417
|
styleGuide: z.ZodNullable<z.ZodString>;
|
|
1193
1418
|
collections: z.ZodArray<z.ZodObject<{
|
|
1194
1419
|
name: z.ZodString;
|
|
@@ -1251,6 +1476,7 @@ export declare const listEntries: OperationSpec<"list_entries", z.ZodObject<{
|
|
|
1251
1476
|
tags: z.ZodArray<z.ZodString>;
|
|
1252
1477
|
hasUnpublishedChanges: z.ZodBoolean;
|
|
1253
1478
|
publishedAt: z.ZodNullable<z.ZodString>;
|
|
1479
|
+
scheduledAt: z.ZodNullable<z.ZodString>;
|
|
1254
1480
|
updatedAt: z.ZodString;
|
|
1255
1481
|
}, z.core.$strip>>;
|
|
1256
1482
|
nextCursor: z.ZodNullable<z.ZodString>;
|
|
@@ -1291,6 +1517,7 @@ export declare const search: OperationSpec<"search", z.ZodObject<{
|
|
|
1291
1517
|
tags: z.ZodArray<z.ZodString>;
|
|
1292
1518
|
hasUnpublishedChanges: z.ZodBoolean;
|
|
1293
1519
|
publishedAt: z.ZodNullable<z.ZodString>;
|
|
1520
|
+
scheduledAt: z.ZodNullable<z.ZodString>;
|
|
1294
1521
|
updatedAt: z.ZodString;
|
|
1295
1522
|
}, z.core.$strip>;
|
|
1296
1523
|
snippet: z.ZodString;
|
|
@@ -1329,6 +1556,7 @@ export declare const getEntry: OperationSpec<"get_entry", z.ZodObject<{
|
|
|
1329
1556
|
tags: z.ZodArray<z.ZodString>;
|
|
1330
1557
|
hasUnpublishedChanges: z.ZodBoolean;
|
|
1331
1558
|
publishedAt: z.ZodNullable<z.ZodString>;
|
|
1559
|
+
scheduledAt: z.ZodNullable<z.ZodString>;
|
|
1332
1560
|
updatedAt: z.ZodString;
|
|
1333
1561
|
revision: z.ZodString;
|
|
1334
1562
|
verdict: z.ZodObject<{
|
|
@@ -1423,6 +1651,7 @@ export declare const getEntry: OperationSpec<"get_entry", z.ZodObject<{
|
|
|
1423
1651
|
tags: z.ZodArray<z.ZodString>;
|
|
1424
1652
|
hasUnpublishedChanges: z.ZodBoolean;
|
|
1425
1653
|
publishedAt: z.ZodNullable<z.ZodString>;
|
|
1654
|
+
scheduledAt: z.ZodNullable<z.ZodString>;
|
|
1426
1655
|
updatedAt: z.ZodString;
|
|
1427
1656
|
}, z.core.$strip>>>;
|
|
1428
1657
|
}, z.core.$strip>>;
|
|
@@ -1450,6 +1679,7 @@ export declare const getTranslations: OperationSpec<"get_translations", z.ZodObj
|
|
|
1450
1679
|
tags: z.ZodArray<z.ZodString>;
|
|
1451
1680
|
hasUnpublishedChanges: z.ZodBoolean;
|
|
1452
1681
|
publishedAt: z.ZodNullable<z.ZodString>;
|
|
1682
|
+
scheduledAt: z.ZodNullable<z.ZodString>;
|
|
1453
1683
|
updatedAt: z.ZodString;
|
|
1454
1684
|
}, z.core.$strip>>>;
|
|
1455
1685
|
}, z.core.$strip>>;
|
|
@@ -1479,6 +1709,7 @@ export declare const createDraft: OperationSpec<"create_draft", z.ZodObject<{
|
|
|
1479
1709
|
tags: z.ZodArray<z.ZodString>;
|
|
1480
1710
|
hasUnpublishedChanges: z.ZodBoolean;
|
|
1481
1711
|
publishedAt: z.ZodNullable<z.ZodString>;
|
|
1712
|
+
scheduledAt: z.ZodNullable<z.ZodString>;
|
|
1482
1713
|
updatedAt: z.ZodString;
|
|
1483
1714
|
}, z.core.$strip>>;
|
|
1484
1715
|
verdict: z.ZodOptional<z.ZodObject<{
|
|
@@ -1540,6 +1771,7 @@ export declare const updateDraft: OperationSpec<"update_draft", z.ZodObject<{
|
|
|
1540
1771
|
tags: z.ZodArray<z.ZodString>;
|
|
1541
1772
|
hasUnpublishedChanges: z.ZodBoolean;
|
|
1542
1773
|
publishedAt: z.ZodNullable<z.ZodString>;
|
|
1774
|
+
scheduledAt: z.ZodNullable<z.ZodString>;
|
|
1543
1775
|
updatedAt: z.ZodString;
|
|
1544
1776
|
}, z.core.$strip>>;
|
|
1545
1777
|
verdict: z.ZodOptional<z.ZodObject<{
|
|
@@ -1655,6 +1887,7 @@ export declare const publish: OperationSpec<"publish", z.ZodObject<{
|
|
|
1655
1887
|
tags: z.ZodArray<z.ZodString>;
|
|
1656
1888
|
hasUnpublishedChanges: z.ZodBoolean;
|
|
1657
1889
|
publishedAt: z.ZodNullable<z.ZodString>;
|
|
1890
|
+
scheduledAt: z.ZodNullable<z.ZodString>;
|
|
1658
1891
|
updatedAt: z.ZodString;
|
|
1659
1892
|
}, z.core.$strip>>;
|
|
1660
1893
|
verdict: z.ZodOptional<z.ZodObject<{
|
|
@@ -1733,6 +1966,7 @@ export declare const unpublish: OperationSpec<"unpublish", z.ZodObject<{
|
|
|
1733
1966
|
tags: z.ZodArray<z.ZodString>;
|
|
1734
1967
|
hasUnpublishedChanges: z.ZodBoolean;
|
|
1735
1968
|
publishedAt: z.ZodNullable<z.ZodString>;
|
|
1969
|
+
scheduledAt: z.ZodNullable<z.ZodString>;
|
|
1736
1970
|
updatedAt: z.ZodString;
|
|
1737
1971
|
}, z.core.$strip>>;
|
|
1738
1972
|
}, z.core.$strip>>;
|
|
@@ -1780,6 +2014,7 @@ export declare const listReviews: OperationSpec<"list_reviews", z.ZodObject<{
|
|
|
1780
2014
|
tags: z.ZodArray<z.ZodString>;
|
|
1781
2015
|
hasUnpublishedChanges: z.ZodBoolean;
|
|
1782
2016
|
publishedAt: z.ZodNullable<z.ZodString>;
|
|
2017
|
+
scheduledAt: z.ZodNullable<z.ZodString>;
|
|
1783
2018
|
updatedAt: z.ZodString;
|
|
1784
2019
|
}, z.core.$strip>;
|
|
1785
2020
|
comments: z.ZodArray<z.ZodObject<{
|
|
@@ -1839,6 +2074,7 @@ export declare const approveReview: OperationSpec<"approve_review", z.ZodObject<
|
|
|
1839
2074
|
tags: z.ZodArray<z.ZodString>;
|
|
1840
2075
|
hasUnpublishedChanges: z.ZodBoolean;
|
|
1841
2076
|
publishedAt: z.ZodNullable<z.ZodString>;
|
|
2077
|
+
scheduledAt: z.ZodNullable<z.ZodString>;
|
|
1842
2078
|
updatedAt: z.ZodString;
|
|
1843
2079
|
}, z.core.$strip>>;
|
|
1844
2080
|
verdict: z.ZodOptional<z.ZodObject<{
|
|
@@ -1903,6 +2139,7 @@ export declare const requestReview: OperationSpec<"request_review", z.ZodObject<
|
|
|
1903
2139
|
tags: z.ZodArray<z.ZodString>;
|
|
1904
2140
|
hasUnpublishedChanges: z.ZodBoolean;
|
|
1905
2141
|
publishedAt: z.ZodNullable<z.ZodString>;
|
|
2142
|
+
scheduledAt: z.ZodNullable<z.ZodString>;
|
|
1906
2143
|
updatedAt: z.ZodString;
|
|
1907
2144
|
}, z.core.$strip>>;
|
|
1908
2145
|
verdict: z.ZodOptional<z.ZodObject<{
|
|
@@ -2030,6 +2267,7 @@ export declare const contentStats: OperationSpec<"content_stats", z.ZodObject<{
|
|
|
2030
2267
|
tags: z.ZodArray<z.ZodString>;
|
|
2031
2268
|
hasUnpublishedChanges: z.ZodBoolean;
|
|
2032
2269
|
publishedAt: z.ZodNullable<z.ZodString>;
|
|
2270
|
+
scheduledAt: z.ZodNullable<z.ZodString>;
|
|
2033
2271
|
updatedAt: z.ZodString;
|
|
2034
2272
|
}, z.core.$strip>>;
|
|
2035
2273
|
}, z.core.$strip>>>;
|
|
@@ -2082,6 +2320,7 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
|
|
|
2082
2320
|
tags: z.ZodArray<z.ZodString>;
|
|
2083
2321
|
hasUnpublishedChanges: z.ZodBoolean;
|
|
2084
2322
|
publishedAt: z.ZodNullable<z.ZodString>;
|
|
2323
|
+
scheduledAt: z.ZodNullable<z.ZodString>;
|
|
2085
2324
|
updatedAt: z.ZodString;
|
|
2086
2325
|
}, z.core.$strip>>;
|
|
2087
2326
|
verdict: z.ZodOptional<z.ZodObject<{
|
|
@@ -2159,6 +2398,7 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
|
|
|
2159
2398
|
tags: z.ZodArray<z.ZodString>;
|
|
2160
2399
|
hasUnpublishedChanges: z.ZodBoolean;
|
|
2161
2400
|
publishedAt: z.ZodNullable<z.ZodString>;
|
|
2401
|
+
scheduledAt: z.ZodNullable<z.ZodString>;
|
|
2162
2402
|
updatedAt: z.ZodString;
|
|
2163
2403
|
}, z.core.$strip>>;
|
|
2164
2404
|
}, z.core.$strip>>>;
|
|
@@ -2188,6 +2428,7 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
|
|
|
2188
2428
|
tags: z.ZodArray<z.ZodString>;
|
|
2189
2429
|
hasUnpublishedChanges: z.ZodBoolean;
|
|
2190
2430
|
publishedAt: z.ZodNullable<z.ZodString>;
|
|
2431
|
+
scheduledAt: z.ZodNullable<z.ZodString>;
|
|
2191
2432
|
updatedAt: z.ZodString;
|
|
2192
2433
|
}, z.core.$strip>>;
|
|
2193
2434
|
verdict: z.ZodOptional<z.ZodObject<{
|
|
@@ -2220,6 +2461,72 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
|
|
|
2220
2461
|
}, z.core.$strip>>;
|
|
2221
2462
|
contractsHash: z.ZodString;
|
|
2222
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>;
|
|
2223
2530
|
}, z.core.$strip>>, OperationSpec<"describe_site", z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
|
|
2224
2531
|
outcome: z.ZodEnum<{
|
|
2225
2532
|
ok: "ok";
|
|
@@ -2228,6 +2535,7 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
|
|
|
2228
2535
|
key: z.ZodString;
|
|
2229
2536
|
locales: z.ZodArray<z.ZodString>;
|
|
2230
2537
|
defaultLocale: z.ZodString;
|
|
2538
|
+
url: z.ZodNullable<z.ZodString>;
|
|
2231
2539
|
styleGuide: z.ZodNullable<z.ZodString>;
|
|
2232
2540
|
collections: z.ZodArray<z.ZodObject<{
|
|
2233
2541
|
name: z.ZodString;
|
|
@@ -2290,6 +2598,7 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
|
|
|
2290
2598
|
tags: z.ZodArray<z.ZodString>;
|
|
2291
2599
|
hasUnpublishedChanges: z.ZodBoolean;
|
|
2292
2600
|
publishedAt: z.ZodNullable<z.ZodString>;
|
|
2601
|
+
scheduledAt: z.ZodNullable<z.ZodString>;
|
|
2293
2602
|
updatedAt: z.ZodString;
|
|
2294
2603
|
revision: z.ZodString;
|
|
2295
2604
|
verdict: z.ZodObject<{
|
|
@@ -2384,8 +2693,62 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
|
|
|
2384
2693
|
tags: z.ZodArray<z.ZodString>;
|
|
2385
2694
|
hasUnpublishedChanges: z.ZodBoolean;
|
|
2386
2695
|
publishedAt: z.ZodNullable<z.ZodString>;
|
|
2696
|
+
scheduledAt: z.ZodNullable<z.ZodString>;
|
|
2387
2697
|
updatedAt: z.ZodString;
|
|
2388
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>>;
|
|
2389
2752
|
}, z.core.$strip>>, OperationSpec<"get_translations", z.ZodObject<{
|
|
2390
2753
|
collection: z.ZodString;
|
|
2391
2754
|
translationGroup: z.ZodString;
|
|
@@ -2410,6 +2773,7 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
|
|
|
2410
2773
|
tags: z.ZodArray<z.ZodString>;
|
|
2411
2774
|
hasUnpublishedChanges: z.ZodBoolean;
|
|
2412
2775
|
publishedAt: z.ZodNullable<z.ZodString>;
|
|
2776
|
+
scheduledAt: z.ZodNullable<z.ZodString>;
|
|
2413
2777
|
updatedAt: z.ZodString;
|
|
2414
2778
|
}, z.core.$strip>>>;
|
|
2415
2779
|
}, z.core.$strip>>, OperationSpec<"list_entries", z.ZodObject<{
|
|
@@ -2443,6 +2807,7 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
|
|
|
2443
2807
|
tags: z.ZodArray<z.ZodString>;
|
|
2444
2808
|
hasUnpublishedChanges: z.ZodBoolean;
|
|
2445
2809
|
publishedAt: z.ZodNullable<z.ZodString>;
|
|
2810
|
+
scheduledAt: z.ZodNullable<z.ZodString>;
|
|
2446
2811
|
updatedAt: z.ZodString;
|
|
2447
2812
|
}, z.core.$strip>>;
|
|
2448
2813
|
nextCursor: z.ZodNullable<z.ZodString>;
|
|
@@ -2490,6 +2855,7 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
|
|
|
2490
2855
|
tags: z.ZodArray<z.ZodString>;
|
|
2491
2856
|
hasUnpublishedChanges: z.ZodBoolean;
|
|
2492
2857
|
publishedAt: z.ZodNullable<z.ZodString>;
|
|
2858
|
+
scheduledAt: z.ZodNullable<z.ZodString>;
|
|
2493
2859
|
updatedAt: z.ZodString;
|
|
2494
2860
|
}, z.core.$strip>;
|
|
2495
2861
|
comments: z.ZodArray<z.ZodObject<{
|
|
@@ -2501,6 +2867,15 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
|
|
|
2501
2867
|
at: z.ZodString;
|
|
2502
2868
|
}, z.core.$strip>>;
|
|
2503
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>;
|
|
2504
2879
|
}, z.core.$strip>>, OperationSpec<"publish", z.ZodObject<{
|
|
2505
2880
|
id: z.ZodString;
|
|
2506
2881
|
version: z.ZodNumber;
|
|
@@ -2539,6 +2914,7 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
|
|
|
2539
2914
|
tags: z.ZodArray<z.ZodString>;
|
|
2540
2915
|
hasUnpublishedChanges: z.ZodBoolean;
|
|
2541
2916
|
publishedAt: z.ZodNullable<z.ZodString>;
|
|
2917
|
+
scheduledAt: z.ZodNullable<z.ZodString>;
|
|
2542
2918
|
updatedAt: z.ZodString;
|
|
2543
2919
|
}, z.core.$strip>>;
|
|
2544
2920
|
verdict: z.ZodOptional<z.ZodObject<{
|
|
@@ -2650,6 +3026,7 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
|
|
|
2650
3026
|
tags: z.ZodArray<z.ZodString>;
|
|
2651
3027
|
hasUnpublishedChanges: z.ZodBoolean;
|
|
2652
3028
|
publishedAt: z.ZodNullable<z.ZodString>;
|
|
3029
|
+
scheduledAt: z.ZodNullable<z.ZodString>;
|
|
2653
3030
|
updatedAt: z.ZodString;
|
|
2654
3031
|
}, z.core.$strip>>;
|
|
2655
3032
|
verdict: z.ZodOptional<z.ZodObject<{
|
|
@@ -2703,6 +3080,13 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
|
|
|
2703
3080
|
decidedAt: z.ZodNullable<z.ZodString>;
|
|
2704
3081
|
note: z.ZodNullable<z.ZodString>;
|
|
2705
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
|
+
}>;
|
|
2706
3090
|
}, z.core.$strip>>, OperationSpec<"search", z.ZodObject<{
|
|
2707
3091
|
query: z.ZodString;
|
|
2708
3092
|
collection: z.ZodOptional<z.ZodString>;
|
|
@@ -2739,11 +3123,69 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
|
|
|
2739
3123
|
tags: z.ZodArray<z.ZodString>;
|
|
2740
3124
|
hasUnpublishedChanges: z.ZodBoolean;
|
|
2741
3125
|
publishedAt: z.ZodNullable<z.ZodString>;
|
|
3126
|
+
scheduledAt: z.ZodNullable<z.ZodString>;
|
|
2742
3127
|
updatedAt: z.ZodString;
|
|
2743
3128
|
}, z.core.$strip>;
|
|
2744
3129
|
snippet: z.ZodString;
|
|
2745
3130
|
score: z.ZodNumber;
|
|
2746
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>;
|
|
2747
3189
|
}, z.core.$strip>>, OperationSpec<"unpublish", z.ZodObject<{
|
|
2748
3190
|
id: z.ZodString;
|
|
2749
3191
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -2767,6 +3209,7 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
|
|
|
2767
3209
|
tags: z.ZodArray<z.ZodString>;
|
|
2768
3210
|
hasUnpublishedChanges: z.ZodBoolean;
|
|
2769
3211
|
publishedAt: z.ZodNullable<z.ZodString>;
|
|
3212
|
+
scheduledAt: z.ZodNullable<z.ZodString>;
|
|
2770
3213
|
updatedAt: z.ZodString;
|
|
2771
3214
|
}, z.core.$strip>>;
|
|
2772
3215
|
}, z.core.$strip>>, OperationSpec<"update_draft", z.ZodObject<{
|
|
@@ -2797,6 +3240,7 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
|
|
|
2797
3240
|
tags: z.ZodArray<z.ZodString>;
|
|
2798
3241
|
hasUnpublishedChanges: z.ZodBoolean;
|
|
2799
3242
|
publishedAt: z.ZodNullable<z.ZodString>;
|
|
3243
|
+
scheduledAt: z.ZodNullable<z.ZodString>;
|
|
2800
3244
|
updatedAt: z.ZodString;
|
|
2801
3245
|
}, z.core.$strip>>;
|
|
2802
3246
|
verdict: z.ZodOptional<z.ZodObject<{
|
|
@@ -2833,6 +3277,81 @@ export declare const OPERATIONS: readonly [OperationSpec<"approve_review", z.Zod
|
|
|
2833
3277
|
currentVersion: z.ZodNumber;
|
|
2834
3278
|
headRevision: z.ZodString;
|
|
2835
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>;
|
|
2836
3355
|
}, z.core.$strip>>, OperationSpec<"validate", z.ZodObject<{
|
|
2837
3356
|
collection: z.ZodString;
|
|
2838
3357
|
locale: z.ZodString;
|
|
@@ -2968,7 +3487,42 @@ export declare function chunksOf(entry: {
|
|
|
2968
3487
|
readonly document: EntryDocument;
|
|
2969
3488
|
}): Chunk[];
|
|
2970
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
|
|
2971
3525
|
//#region src/index.d.ts
|
|
2972
3526
|
export declare const name = "@hollware/core";
|
|
2973
3527
|
//#endregion
|
|
2974
|
-
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 };
|