/* * 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"; /** * Response object returned after successfully deleting a response. */ export type DeleteResponseObject = { /** * The unique identifier of the deleted response. */ id: string; /** * The object type, always 'response' for response deletions. */ object: "response"; /** * Confirmation flag indicating whether the response was successfully deleted. Always true on successful deletion. */ deleted: boolean; }; /** @internal */ export const DeleteResponseObject$inboundSchema: z.ZodType< DeleteResponseObject, z.ZodTypeDef, unknown > = z.object({ id: z.string(), object: z.literal("response"), deleted: z.boolean(), }); /** @internal */ export type DeleteResponseObject$Outbound = { id: string; object: "response"; deleted: boolean; }; /** @internal */ export const DeleteResponseObject$outboundSchema: z.ZodType< DeleteResponseObject$Outbound, z.ZodTypeDef, DeleteResponseObject > = z.object({ id: z.string(), object: z.literal("response"), deleted: z.boolean(), }); export function deleteResponseObjectToJSON( deleteResponseObject: DeleteResponseObject, ): string { return JSON.stringify( DeleteResponseObject$outboundSchema.parse(deleteResponseObject), ); } export function deleteResponseObjectFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeleteResponseObject$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteResponseObject' from JSON`, ); }