/* * 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"; import { SessionRecord, SessionRecord$inboundSchema, SessionRecord$Outbound, SessionRecord$outboundSchema, } from "./sessionrecord.js"; export type TerminateSessionResponse = { session: SessionRecord; }; /** @internal */ export const TerminateSessionResponse$inboundSchema: z.ZodType< TerminateSessionResponse, z.ZodTypeDef, unknown > = z.object({ session: SessionRecord$inboundSchema, }); /** @internal */ export type TerminateSessionResponse$Outbound = { session: SessionRecord$Outbound; }; /** @internal */ export const TerminateSessionResponse$outboundSchema: z.ZodType< TerminateSessionResponse$Outbound, z.ZodTypeDef, TerminateSessionResponse > = z.object({ session: SessionRecord$outboundSchema, }); export function terminateSessionResponseToJSON( terminateSessionResponse: TerminateSessionResponse, ): string { return JSON.stringify( TerminateSessionResponse$outboundSchema.parse(terminateSessionResponse), ); } export function terminateSessionResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TerminateSessionResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TerminateSessionResponse' from JSON`, ); }