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