/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type Security = { auth: string; }; /** @internal */ export const Security$inboundSchema: z.ZodType< Security, z.ZodTypeDef, unknown > = z.object({ auth: z.string(), }); /** @internal */ export type Security$Outbound = { auth: string; }; /** @internal */ export const Security$outboundSchema: z.ZodType< Security$Outbound, z.ZodTypeDef, Security > = z.object({ auth: z.string(), }); export function securityToJSON(security: Security): string { return JSON.stringify(Security$outboundSchema.parse(security)); } export function securityFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Security$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Security' from JSON`, ); }