/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { AuthStartRequestDeliveryPush, AuthStartRequestDeliveryPush$inboundSchema, AuthStartRequestDeliveryPush$Outbound, AuthStartRequestDeliveryPush$outboundSchema, } from "./authstartrequestdeliverypush.js"; import { AuthStartRequestDeliveryScan, AuthStartRequestDeliveryScan$inboundSchema, AuthStartRequestDeliveryScan$Outbound, AuthStartRequestDeliveryScan$outboundSchema, } from "./authstartrequestdeliveryscan.js"; export type AuthStartRequestDelivery = { push?: AuthStartRequestDeliveryPush | undefined; scan?: AuthStartRequestDeliveryScan | undefined; }; /** @internal */ export const AuthStartRequestDelivery$inboundSchema: z.ZodType< AuthStartRequestDelivery, z.ZodTypeDef, unknown > = z.object({ push: AuthStartRequestDeliveryPush$inboundSchema.optional(), scan: AuthStartRequestDeliveryScan$inboundSchema.optional(), }); /** @internal */ export type AuthStartRequestDelivery$Outbound = { push?: AuthStartRequestDeliveryPush$Outbound | undefined; scan?: AuthStartRequestDeliveryScan$Outbound | undefined; }; /** @internal */ export const AuthStartRequestDelivery$outboundSchema: z.ZodType< AuthStartRequestDelivery$Outbound, z.ZodTypeDef, AuthStartRequestDelivery > = z.object({ push: AuthStartRequestDeliveryPush$outboundSchema.optional(), scan: AuthStartRequestDeliveryScan$outboundSchema.optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AuthStartRequestDelivery$ { /** @deprecated use `AuthStartRequestDelivery$inboundSchema` instead. */ export const inboundSchema = AuthStartRequestDelivery$inboundSchema; /** @deprecated use `AuthStartRequestDelivery$outboundSchema` instead. */ export const outboundSchema = AuthStartRequestDelivery$outboundSchema; /** @deprecated use `AuthStartRequestDelivery$Outbound` instead. */ export type Outbound = AuthStartRequestDelivery$Outbound; } export function authStartRequestDeliveryToJSON( authStartRequestDelivery: AuthStartRequestDelivery, ): string { return JSON.stringify( AuthStartRequestDelivery$outboundSchema.parse(authStartRequestDelivery), ); } export function authStartRequestDeliveryFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AuthStartRequestDelivery$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AuthStartRequestDelivery' from JSON`, ); }