@zapier/policy-schema 0.10.0 → 0.11.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.cjs CHANGED
@@ -142,7 +142,6 @@ var OperatorSchema = zod.z.enum([
142
142
  var ConditionValueSchema = JsonValueSchema;
143
143
  var V1StatementSchema = zod.z.object({
144
144
  id: zod.z.string().optional(),
145
- label: zod.z.string().optional(),
146
145
  effect: zod.z.enum(["allow", "deny"]),
147
146
  permissions: zod.z.array(zod.z.string()).min(1),
148
147
  resources: zod.z.array(zod.z.string()).min(1),
@@ -150,7 +149,6 @@ var V1StatementSchema = zod.z.object({
150
149
  }).strict();
151
150
  var V2StatementSchema = zod.z.object({
152
151
  id: zod.z.string().optional(),
153
- label: zod.z.string().optional(),
154
152
  effect: zod.z.enum(["allow", "ask", "deny"]),
155
153
  permissions: zod.z.array(zod.z.string()).min(1),
156
154
  resources: zod.z.array(zod.z.string()).min(1),
@@ -185,11 +183,7 @@ function getOpenApiSchema() {
185
183
  properties: {
186
184
  id: {
187
185
  type: "string",
188
- description: "Optional identifier for debugging and provenance. Included in statementHash for override targeting."
189
- },
190
- label: {
191
- type: "string",
192
- description: "Optional human-readable description of the statement. Excluded from statementHash for override targeting."
186
+ description: "Optional identifier for debugging and provenance. Included in canonical hash."
193
187
  },
194
188
  effect: {
195
189
  type: "string",
package/dist/index.d.cts CHANGED
@@ -22,7 +22,6 @@ interface Condition {
22
22
  type Effect = "allow" | "ask" | "deny";
23
23
  interface Statement {
24
24
  id?: string;
25
- label?: string;
26
25
  effect: Effect;
27
26
  permissions: string[];
28
27
  resources: string[];
@@ -219,7 +218,6 @@ declare const ConditionValueSchema: z.ZodType<JsonValue, unknown, z.core.$ZodTyp
219
218
  /** Statement schema accepting the union of all effects (use PolicySchema for version-aware validation). */
220
219
  declare const StatementSchema: z.ZodObject<{
221
220
  id: z.ZodOptional<z.ZodString>;
222
- label: z.ZodOptional<z.ZodString>;
223
221
  effect: z.ZodEnum<{
224
222
  allow: "allow";
225
223
  ask: "ask";
@@ -282,7 +280,6 @@ declare const PolicySchema: z.ZodUnion<readonly [z.ZodObject<{
282
280
  version: z.ZodLiteral<1>;
283
281
  statements: z.ZodArray<z.ZodObject<{
284
282
  id: z.ZodOptional<z.ZodString>;
285
- label: z.ZodOptional<z.ZodString>;
286
283
  effect: z.ZodEnum<{
287
284
  allow: "allow";
288
285
  deny: "deny";
@@ -344,7 +341,6 @@ declare const PolicySchema: z.ZodUnion<readonly [z.ZodObject<{
344
341
  version: z.ZodLiteral<2>;
345
342
  statements: z.ZodArray<z.ZodObject<{
346
343
  id: z.ZodOptional<z.ZodString>;
347
- label: z.ZodOptional<z.ZodString>;
348
344
  effect: z.ZodEnum<{
349
345
  allow: "allow";
350
346
  ask: "ask";
package/dist/index.d.ts CHANGED
@@ -22,7 +22,6 @@ interface Condition {
22
22
  type Effect = "allow" | "ask" | "deny";
23
23
  interface Statement {
24
24
  id?: string;
25
- label?: string;
26
25
  effect: Effect;
27
26
  permissions: string[];
28
27
  resources: string[];
@@ -219,7 +218,6 @@ declare const ConditionValueSchema: z.ZodType<JsonValue, unknown, z.core.$ZodTyp
219
218
  /** Statement schema accepting the union of all effects (use PolicySchema for version-aware validation). */
220
219
  declare const StatementSchema: z.ZodObject<{
221
220
  id: z.ZodOptional<z.ZodString>;
222
- label: z.ZodOptional<z.ZodString>;
223
221
  effect: z.ZodEnum<{
224
222
  allow: "allow";
225
223
  ask: "ask";
@@ -282,7 +280,6 @@ declare const PolicySchema: z.ZodUnion<readonly [z.ZodObject<{
282
280
  version: z.ZodLiteral<1>;
283
281
  statements: z.ZodArray<z.ZodObject<{
284
282
  id: z.ZodOptional<z.ZodString>;
285
- label: z.ZodOptional<z.ZodString>;
286
283
  effect: z.ZodEnum<{
287
284
  allow: "allow";
288
285
  deny: "deny";
@@ -344,7 +341,6 @@ declare const PolicySchema: z.ZodUnion<readonly [z.ZodObject<{
344
341
  version: z.ZodLiteral<2>;
345
342
  statements: z.ZodArray<z.ZodObject<{
346
343
  id: z.ZodOptional<z.ZodString>;
347
- label: z.ZodOptional<z.ZodString>;
348
344
  effect: z.ZodEnum<{
349
345
  allow: "allow";
350
346
  ask: "ask";
package/dist/index.mjs CHANGED
@@ -140,7 +140,6 @@ var OperatorSchema = z.enum([
140
140
  var ConditionValueSchema = JsonValueSchema;
141
141
  var V1StatementSchema = z.object({
142
142
  id: z.string().optional(),
143
- label: z.string().optional(),
144
143
  effect: z.enum(["allow", "deny"]),
145
144
  permissions: z.array(z.string()).min(1),
146
145
  resources: z.array(z.string()).min(1),
@@ -148,7 +147,6 @@ var V1StatementSchema = z.object({
148
147
  }).strict();
149
148
  var V2StatementSchema = z.object({
150
149
  id: z.string().optional(),
151
- label: z.string().optional(),
152
150
  effect: z.enum(["allow", "ask", "deny"]),
153
151
  permissions: z.array(z.string()).min(1),
154
152
  resources: z.array(z.string()).min(1),
@@ -183,11 +181,7 @@ function getOpenApiSchema() {
183
181
  properties: {
184
182
  id: {
185
183
  type: "string",
186
- description: "Optional identifier for debugging and provenance. Included in statementHash for override targeting."
187
- },
188
- label: {
189
- type: "string",
190
- description: "Optional human-readable description of the statement. Excluded from statementHash for override targeting."
184
+ description: "Optional identifier for debugging and provenance. Included in canonical hash."
191
185
  },
192
186
  effect: {
193
187
  type: "string",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zapier/policy-schema",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "Zod schemas and TypeScript types for the Zapier policy engine",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -30,8 +30,8 @@
30
30
  "publishConfig": {
31
31
  "access": "public"
32
32
  },
33
- "dependencies": {
34
- "zod": "4.3.6"
33
+ "peerDependencies": {
34
+ "zod": "^4.0.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "^22.0.0",
@@ -39,7 +39,8 @@
39
39
  "tsx": "^4.0.0",
40
40
  "tsup": "^8.0.0",
41
41
  "typescript": "^5.7.0",
42
- "vitest": "^3.0.0"
42
+ "vitest": "^3.0.0",
43
+ "zod": "^4.0.0"
43
44
  },
44
45
  "scripts": {
45
46
  "build": "tsup",