You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@zapier/policy-schema

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zapier/policy-schema - npm Package Compare versions

Comparing version
0.3.0
to
0.4.0
+11
-0
dist/index.cjs

@@ -44,2 +44,7 @@ 'use strict';

}).strict();
var MatchesUrlConditionSchema = zod.z.object({
path: PathSchema,
operator: zod.z.literal("matches_url"),
value: zod.z.string()
}).strict();
var ValuesInConditionSchema = zod.z.object({

@@ -76,2 +81,4 @@ path: PathSchema,

RangeConditionSchema,
// URL operators
MatchesUrlConditionSchema,
// Array operators

@@ -93,2 +100,3 @@ ValuesInConditionSchema,

var ArrayOperatorSchema = zod.z.enum(["values_in"]);
var UrlOperatorSchema = zod.z.enum(["matches_url"]);
var OtherOperatorSchema = zod.z.enum(["exists", "keys_in", "size"]);

@@ -103,2 +111,4 @@ var OperatorSchema = zod.z.enum([

"range",
// URL
"matches_url",
// Array

@@ -139,1 +149,2 @@ "values_in",

exports.StatementSchema = StatementSchema;
exports.UrlOperatorSchema = UrlOperatorSchema;
+19
-2

@@ -5,4 +5,5 @@ import { z } from 'zod';

type ArrayOperator = "values_in";
type UrlOperator = "matches_url";
type OtherOperator = "exists" | "keys_in" | "size";
type Operator = ScalarOperator | ArrayOperator | OtherOperator;
type Operator = ScalarOperator | ArrayOperator | UrlOperator | OtherOperator;
type RangeValue = {

@@ -91,2 +92,6 @@ min?: number;

path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
operator: z.ZodLiteral<"matches_url">;
value: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
operator: z.ZodLiteral<"values_in">;

@@ -120,2 +125,5 @@ value: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;

}>;
declare const UrlOperatorSchema: z.ZodEnum<{
matches_url: "matches_url";
}>;
declare const OtherOperatorSchema: z.ZodEnum<{

@@ -137,2 +145,3 @@ exists: "exists";

values_in: "values_in";
matches_url: "matches_url";
}>;

@@ -182,2 +191,6 @@ declare const ConditionValueSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>, z.ZodObject<{

path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
operator: z.ZodLiteral<"matches_url">;
value: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
operator: z.ZodLiteral<"values_in">;

@@ -239,2 +252,6 @@ value: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;

path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
operator: z.ZodLiteral<"matches_url">;
value: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
operator: z.ZodLiteral<"values_in">;

@@ -260,2 +277,2 @@ value: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;

export { type ArrayOperator, ArrayOperatorSchema, type Condition, ConditionSchema, type ConditionValue, ConditionValueSchema, type Effect, type Operator, OperatorSchema, type OtherOperator, OtherOperatorSchema, type ParsedUrl, type Policy, type PolicyHttpRequest, type PolicyRequest, type PolicyResult, PolicySchema, type RangeValue, RangeValueSchema, type ScalarOperator, ScalarOperatorSchema, type SizeValue, SizeValueSchema, type Statement, StatementSchema };
export { type ArrayOperator, ArrayOperatorSchema, type Condition, ConditionSchema, type ConditionValue, ConditionValueSchema, type Effect, type Operator, OperatorSchema, type OtherOperator, OtherOperatorSchema, type ParsedUrl, type Policy, type PolicyHttpRequest, type PolicyRequest, type PolicyResult, PolicySchema, type RangeValue, RangeValueSchema, type ScalarOperator, ScalarOperatorSchema, type SizeValue, SizeValueSchema, type Statement, StatementSchema, type UrlOperator, UrlOperatorSchema };

@@ -5,4 +5,5 @@ import { z } from 'zod';

type ArrayOperator = "values_in";
type UrlOperator = "matches_url";
type OtherOperator = "exists" | "keys_in" | "size";
type Operator = ScalarOperator | ArrayOperator | OtherOperator;
type Operator = ScalarOperator | ArrayOperator | UrlOperator | OtherOperator;
type RangeValue = {

@@ -91,2 +92,6 @@ min?: number;

path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
operator: z.ZodLiteral<"matches_url">;
value: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
operator: z.ZodLiteral<"values_in">;

@@ -120,2 +125,5 @@ value: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;

}>;
declare const UrlOperatorSchema: z.ZodEnum<{
matches_url: "matches_url";
}>;
declare const OtherOperatorSchema: z.ZodEnum<{

@@ -137,2 +145,3 @@ exists: "exists";

values_in: "values_in";
matches_url: "matches_url";
}>;

@@ -182,2 +191,6 @@ declare const ConditionValueSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>, z.ZodObject<{

path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
operator: z.ZodLiteral<"matches_url">;
value: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
operator: z.ZodLiteral<"values_in">;

@@ -239,2 +252,6 @@ value: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;

path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
operator: z.ZodLiteral<"matches_url">;
value: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
operator: z.ZodLiteral<"values_in">;

@@ -260,2 +277,2 @@ value: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;

export { type ArrayOperator, ArrayOperatorSchema, type Condition, ConditionSchema, type ConditionValue, ConditionValueSchema, type Effect, type Operator, OperatorSchema, type OtherOperator, OtherOperatorSchema, type ParsedUrl, type Policy, type PolicyHttpRequest, type PolicyRequest, type PolicyResult, PolicySchema, type RangeValue, RangeValueSchema, type ScalarOperator, ScalarOperatorSchema, type SizeValue, SizeValueSchema, type Statement, StatementSchema };
export { type ArrayOperator, ArrayOperatorSchema, type Condition, ConditionSchema, type ConditionValue, ConditionValueSchema, type Effect, type Operator, OperatorSchema, type OtherOperator, OtherOperatorSchema, type ParsedUrl, type Policy, type PolicyHttpRequest, type PolicyRequest, type PolicyResult, PolicySchema, type RangeValue, RangeValueSchema, type ScalarOperator, ScalarOperatorSchema, type SizeValue, SizeValueSchema, type Statement, StatementSchema, type UrlOperator, UrlOperatorSchema };

@@ -42,2 +42,7 @@ import { z } from 'zod';

}).strict();
var MatchesUrlConditionSchema = z.object({
path: PathSchema,
operator: z.literal("matches_url"),
value: z.string()
}).strict();
var ValuesInConditionSchema = z.object({

@@ -74,2 +79,4 @@ path: PathSchema,

RangeConditionSchema,
// URL operators
MatchesUrlConditionSchema,
// Array operators

@@ -91,2 +98,3 @@ ValuesInConditionSchema,

var ArrayOperatorSchema = z.enum(["values_in"]);
var UrlOperatorSchema = z.enum(["matches_url"]);
var OtherOperatorSchema = z.enum(["exists", "keys_in", "size"]);

@@ -101,2 +109,4 @@ var OperatorSchema = z.enum([

"range",
// URL
"matches_url",
// Array

@@ -127,2 +137,2 @@ "values_in",

export { ArrayOperatorSchema, ConditionSchema, ConditionValueSchema, OperatorSchema, OtherOperatorSchema, PolicySchema, RangeValueSchema, ScalarOperatorSchema, SizeValueSchema, StatementSchema };
export { ArrayOperatorSchema, ConditionSchema, ConditionValueSchema, OperatorSchema, OtherOperatorSchema, PolicySchema, RangeValueSchema, ScalarOperatorSchema, SizeValueSchema, StatementSchema, UrlOperatorSchema };
+1
-1
{
"name": "@zapier/policy-schema",
"version": "0.3.0",
"version": "0.4.0",
"description": "Zod schemas and TypeScript types for the Zapier policy engine",

@@ -5,0 +5,0 @@ "type": "module",