/* * 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 { AuthStartRequestDeliveryScanNotification, AuthStartRequestDeliveryScanNotification$inboundSchema, AuthStartRequestDeliveryScanNotification$Outbound, AuthStartRequestDeliveryScanNotification$outboundSchema, } from "./authstartrequestdeliveryscannotification.js"; export type AuthStartRequestDeliveryScan = { notification: AuthStartRequestDeliveryScanNotification; }; /** @internal */ export const AuthStartRequestDeliveryScan$inboundSchema: z.ZodType< AuthStartRequestDeliveryScan, z.ZodTypeDef, unknown > = z.object({ notification: AuthStartRequestDeliveryScanNotification$inboundSchema, }); /** @internal */ export type AuthStartRequestDeliveryScan$Outbound = { notification: AuthStartRequestDeliveryScanNotification$Outbound; }; /** @internal */ export const AuthStartRequestDeliveryScan$outboundSchema: z.ZodType< AuthStartRequestDeliveryScan$Outbound, z.ZodTypeDef, AuthStartRequestDeliveryScan > = z.object({ notification: AuthStartRequestDeliveryScanNotification$outboundSchema, }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AuthStartRequestDeliveryScan$ { /** @deprecated use `AuthStartRequestDeliveryScan$inboundSchema` instead. */ export const inboundSchema = AuthStartRequestDeliveryScan$inboundSchema; /** @deprecated use `AuthStartRequestDeliveryScan$outboundSchema` instead. */ export const outboundSchema = AuthStartRequestDeliveryScan$outboundSchema; /** @deprecated use `AuthStartRequestDeliveryScan$Outbound` instead. */ export type Outbound = AuthStartRequestDeliveryScan$Outbound; } export function authStartRequestDeliveryScanToJSON( authStartRequestDeliveryScan: AuthStartRequestDeliveryScan, ): string { return JSON.stringify( AuthStartRequestDeliveryScan$outboundSchema.parse( authStartRequestDeliveryScan, ), ); } export function authStartRequestDeliveryScanFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AuthStartRequestDeliveryScan$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AuthStartRequestDeliveryScan' from JSON`, ); }