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>

56 lines 3.66 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 { smartUnion } from "../types/smartUnion.js"; import { Active$inboundSchema, } from "./getsecurityfirewallconfiglogheaderssecurityresponse200applicationjsonresponsebodydraftrules2.js"; import { Draft$inboundSchema, GetSecurityFirewallConfigSecurityChanges$inboundSchema, GetSecurityFirewallConfigSecurityCrs$inboundSchema, GetSecurityFirewallConfigSecurityIps$inboundSchema, GetSecurityFirewallConfigSecurityResponseConditions$inboundSchema, GetSecurityFirewallConfigSecurityResponseManagedRules$inboundSchema, GetSecurityFirewallConfigSecurityResponseRules$inboundSchema, GetSecurityFirewallConfigSecurityResponseRulesets$inboundSchema, } from "./getsecurityfirewallconfigsecurityresponsemanagedrules.js"; export const GetSecurityFirewallConfigLogHeadersSecurityResponse2 = { Wildcard: "*", }; /** @internal */ export const GetSecurityFirewallConfigLogHeadersSecurityResponse2$inboundSchema = z.nativeEnum(GetSecurityFirewallConfigLogHeadersSecurityResponse2); /** @internal */ export const GetSecurityFirewallConfigSecurityResponseLogHeaders$inboundSchema = smartUnion([ z.array(types.string()), GetSecurityFirewallConfigLogHeadersSecurityResponse2$inboundSchema, ]); export function getSecurityFirewallConfigSecurityResponseLogHeadersFromJSON(jsonString) { return safeParse(jsonString, (x) => GetSecurityFirewallConfigSecurityResponseLogHeaders$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigSecurityResponseLogHeaders' from JSON`); } /** @internal */ export const GetSecurityFirewallConfigVersions$inboundSchema = z.object({ ownerId: types.string(), projectKey: types.string(), id: types.string(), version: types.number(), updatedAt: types.string(), firewallEnabled: types.boolean(), crs: types.optional(GetSecurityFirewallConfigSecurityCrs$inboundSchema), rules: z.array(GetSecurityFirewallConfigSecurityResponseRules$inboundSchema), ips: z.array(GetSecurityFirewallConfigSecurityIps$inboundSchema), rulesets: types.optional(GetSecurityFirewallConfigSecurityResponseRulesets$inboundSchema), conditions: types.optional(z.array(GetSecurityFirewallConfigSecurityResponseConditions$inboundSchema)), changes: z.array(GetSecurityFirewallConfigSecurityChanges$inboundSchema), managedRules: types.optional(GetSecurityFirewallConfigSecurityResponseManagedRules$inboundSchema), botIdEnabled: types.optional(types.boolean()), logHeaders: types.optional(smartUnion([ z.array(types.string()), GetSecurityFirewallConfigLogHeadersSecurityResponse2$inboundSchema, ])), }); export function getSecurityFirewallConfigVersionsFromJSON(jsonString) { return safeParse(jsonString, (x) => GetSecurityFirewallConfigVersions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigVersions' from JSON`); } /** @internal */ export const GetSecurityFirewallConfigResponseBody$inboundSchema = z.object({ active: types.nullable(Active$inboundSchema), draft: types.nullable(Draft$inboundSchema), versions: z.array(z.lazy(() => GetSecurityFirewallConfigVersions$inboundSchema)), }); export function getSecurityFirewallConfigResponseBodyFromJSON(jsonString) { return safeParse(jsonString, (x) => GetSecurityFirewallConfigResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallConfigResponseBody' from JSON`); } //# sourceMappingURL=getsecurityfirewallconfigresponsebody.js.map