@peasant-labs/schema 0.25.0 → 0.27.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/internal/generated/contract/zod.gen.d.ts +4 -3
- package/dist/internal/generated/contract/zod.gen.js +11 -3
- package/dist/internal/generated/local-api.d.ts +3 -3
- package/dist/internal/generated/versions.gen.d.ts +2 -2
- package/dist/internal/generated/versions.gen.js +2 -2
- package/package.json +1 -1
|
@@ -9507,11 +9507,12 @@ export declare const zAutoPublishRuleRequest: z.ZodObject<{
|
|
|
9507
9507
|
"pre-push": "pre-push";
|
|
9508
9508
|
"post-commit": "post-commit";
|
|
9509
9509
|
}>>;
|
|
9510
|
-
kind: z.ZodEnum<{
|
|
9510
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
9511
9511
|
folder: "folder";
|
|
9512
9512
|
remote: "remote";
|
|
9513
|
-
}
|
|
9514
|
-
match: z.ZodString
|
|
9513
|
+
}>>;
|
|
9514
|
+
match: z.ZodOptional<z.ZodString>;
|
|
9515
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
9515
9516
|
}, z.core.$strict>;
|
|
9516
9517
|
export type AutoPublishRuleRequest = z.infer<typeof zAutoPublishRuleRequest>;
|
|
9517
9518
|
export declare const zLocalPublicationAudienceMember: z.ZodObject<{
|
|
@@ -2936,9 +2936,17 @@ export const zAutoPublishRule = z.object({
|
|
|
2936
2936
|
export const zAutoPublishRuleRequest = z.object({
|
|
2937
2937
|
collectives: z.array(zVillageUUID),
|
|
2938
2938
|
events: z.array(zAutoPublishEvent),
|
|
2939
|
-
kind: zAutoPublishRuleKind,
|
|
2940
|
-
match: z.string().min(1)
|
|
2941
|
-
|
|
2939
|
+
kind: zAutoPublishRuleKind.optional(),
|
|
2940
|
+
match: z.string().min(1).optional(),
|
|
2941
|
+
sessionId: zSessionID.optional()
|
|
2942
|
+
}).strict().superRefine((value, context) => {
|
|
2943
|
+
const sessionTarget = value.sessionId !== undefined;
|
|
2944
|
+
const patternTarget = value.kind !== undefined && value.match !== undefined;
|
|
2945
|
+
const anyPatternField = value.kind !== undefined || value.match !== undefined;
|
|
2946
|
+
if (sessionTarget ? anyPatternField : !patternTarget) {
|
|
2947
|
+
context.addIssue({ code: "custom", message: "name exactly one session or explicit pattern target" });
|
|
2948
|
+
}
|
|
2949
|
+
});
|
|
2942
2950
|
export const zLocalPublicationAudienceMember = z.object({
|
|
2943
2951
|
collectiveId: zVillageUUID,
|
|
2944
2952
|
name: z.string(),
|
|
@@ -367,10 +367,10 @@ export interface paths {
|
|
|
367
367
|
cookie?: never;
|
|
368
368
|
};
|
|
369
369
|
get?: never;
|
|
370
|
-
/** @description Create or replace one auto-publish rule. Saving a rule installs nothing: the response lists the recorded repositories the rule matches and each one's hook state per event, and installAutoPublishHooks installs in one repository at a time. 400 when the rule is invalid, for example a match pattern the server cannot read for its kind. Returns 403 with a JSON error, and changes nothing, when the request did not come from this local server: its Host header does not name a loopback address, or a browser sent it from another origin. */
|
|
370
|
+
/** @description Create or replace one auto-publish rule. Supply either kind and match for an explicit pattern, or sessionId alone to resolve a stored session to its current Git repository and save an escaped exact-folder rule. The target modes are mutually exclusive. A session without a resolvable existing directory is refused before saving, without remote or process-directory fallback. Saving a rule installs nothing: the response lists the recorded repositories the rule matches and each one's hook state per event, and installAutoPublishHooks installs in one repository at a time. 400 when the rule is invalid, for example a match pattern the server cannot read for its kind. Returns 403 with a JSON error, and changes nothing, when the request did not come from this local server: its Host header does not name a loopback address, or a browser sent it from another origin. */
|
|
371
371
|
put: operations["saveAutoPublishRule"];
|
|
372
372
|
post?: never;
|
|
373
|
-
/** @description Remove one auto-publish rule.
|
|
373
|
+
/** @description Remove one auto-publish rule. The response reports the hooks of the repositories it matched as they are. Hook files are retained, but rule-required hooks stop publishing unless another active rule covers the repository and event. Paused rules grant no publishing consent. Separately installed terminal hooks keep their independent consent. 404 when no rule has this identifier. Returns 403 with a JSON error, and changes nothing, when the request did not come from this local server: its Host header does not name a loopback address, or a browser sent it from another origin. */
|
|
374
374
|
delete: operations["deleteAutoPublishRule"];
|
|
375
375
|
options?: never;
|
|
376
376
|
head?: never;
|
|
@@ -386,7 +386,7 @@ export interface paths {
|
|
|
386
386
|
};
|
|
387
387
|
get?: never;
|
|
388
388
|
put?: never;
|
|
389
|
-
/** @description Install the rule's hooks, one per rule event, in one recorded repository the rule matches. Events are independent: the response reports each event's hook, and a blocked hook carries the remedy, because Peasant never overwrites a hook it does not manage. 400 when the path is not a recorded repository the rule matches, so nothing is installed in an unrecorded repository; 404 when no rule has this identifier. Returns 403 with a JSON error, and changes nothing, when the request did not come from this local server: its Host header does not name a loopback address, or a browser sent it from another origin. */
|
|
389
|
+
/** @description Install the rule's hooks, one per rule event, in one recorded repository the rule matches. Installed hooks require an active auto-publish rule for that repository and event each time they run; removing or pausing the last binding stops publication without removing the hook files. Events are independent: the response reports each event's hook, and a blocked hook carries the remedy, because Peasant never overwrites a hook it does not manage. 400 when the path is not a recorded repository the rule matches, so nothing is installed in an unrecorded repository; 404 when no rule has this identifier. Returns 403 with a JSON error, and changes nothing, when the request did not come from this local server: its Host header does not name a loopback address, or a browser sent it from another origin. */
|
|
390
390
|
post: operations["installAutoPublishHooks"];
|
|
391
391
|
delete?: never;
|
|
392
392
|
options?: never;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const VillageAPIVersion: "0.24.0";
|
|
2
|
-
export declare const PeasantLocalAPIVersion: "0.
|
|
3
|
-
export declare const TypesVersion: "0.
|
|
2
|
+
export declare const PeasantLocalAPIVersion: "0.17.0";
|
|
3
|
+
export declare const TypesVersion: "0.28.0";
|
|
4
4
|
export declare const MetadataSchemaVersion: 11;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Code generated from the canonical Go/OpenAPI contract. DO NOT EDIT.
|
|
2
2
|
export const VillageAPIVersion = "0.24.0";
|
|
3
|
-
export const PeasantLocalAPIVersion = "0.
|
|
4
|
-
export const TypesVersion = "0.
|
|
3
|
+
export const PeasantLocalAPIVersion = "0.17.0";
|
|
4
|
+
export const TypesVersion = "0.28.0";
|
|
5
5
|
export const MetadataSchemaVersion = 11;
|