@peasant-labs/schema 0.26.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.
@@ -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
- }).strict();
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,7 +367,7 @@ 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
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. */
@@ -1,4 +1,4 @@
1
1
  export declare const VillageAPIVersion: "0.24.0";
2
- export declare const PeasantLocalAPIVersion: "0.16.0";
3
- export declare const TypesVersion: "0.27.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.16.0";
4
- export const TypesVersion = "0.27.0";
3
+ export const PeasantLocalAPIVersion = "0.17.0";
4
+ export const TypesVersion = "0.28.0";
5
5
  export const MetadataSchemaVersion = 11;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peasant-labs/schema",
3
- "version": "0.26.0",
3
+ "version": "0.27.0",
4
4
  "description": "Generated TypeScript contract bindings for the peasant-labs schema module",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {