/* * 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 WaitAction = { type: "wait"; }; /** @internal */ export const WaitAction$inboundSchema: z.ZodType< WaitAction, z.ZodTypeDef, unknown > = z.object({ type: z.literal("wait"), }); /** @internal */ export type WaitAction$Outbound = { type: "wait"; }; /** @internal */ export const WaitAction$outboundSchema: z.ZodType< WaitAction$Outbound, z.ZodTypeDef, WaitAction > = z.object({ type: z.literal("wait"), }); export function waitActionToJSON(waitAction: WaitAction): string { return JSON.stringify(WaitAction$outboundSchema.parse(waitAction)); } export function waitActionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => WaitAction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WaitAction' from JSON`, ); }