UNPKG

@vercel/sdk

Version:

<p align="center"> <a href="https://vercel.com"> <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96"> <h3 align="center">Vercel</h3> </a> <p align="center">Develop. Preview. Ship.</p> </p>

29 lines 1.26 kB
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../lib/schemas.js"; import * as types from "../types/primitives.js"; import { SandboxInjectionRule$inboundSchema, } from "./sandboxinjectionrule.js"; /** * The network policy mode. - 'allow-all': All traffic is allowed. - 'deny-all': All traffic is blocked. - 'custom': Traffic is controlled by explicit allow/deny rules. */ export const Mode = { AllowAll: "allow-all", Custom: "custom", DenyAll: "deny-all", }; /** @internal */ export const Mode$inboundSchema = z.nativeEnum(Mode); /** @internal */ export const SandboxNetworkPolicy$inboundSchema = z.object({ mode: Mode$inboundSchema, allowedDomains: types.optional(z.array(types.string())), allowedCIDRs: types.optional(z.array(types.string())), deniedCIDRs: types.optional(z.array(types.string())), injectionRules: types.optional(z.array(SandboxInjectionRule$inboundSchema)), }); export function sandboxNetworkPolicyFromJSON(jsonString) { return safeParse(jsonString, (x) => SandboxNetworkPolicy$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SandboxNetworkPolicy' from JSON`); } //# sourceMappingURL=sandboxnetworkpolicy.js.map