/* * 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"; /** * Confirmation that a speech history item was deleted. */ export type SpeechHistoryDeletionStatus = { /** * The ID of the deleted history item. */ id: string; /** * The object type of the deleted item. */ object: string; /** * Always true when deletion succeeds. */ deleted: true; }; /** @internal */ export const SpeechHistoryDeletionStatus$inboundSchema: z.ZodType< SpeechHistoryDeletionStatus, z.ZodTypeDef, unknown > = z.object({ id: z.string(), object: z.string(), deleted: z.literal(true), }); /** @internal */ export type SpeechHistoryDeletionStatus$Outbound = { id: string; object: string; deleted: true; }; /** @internal */ export const SpeechHistoryDeletionStatus$outboundSchema: z.ZodType< SpeechHistoryDeletionStatus$Outbound, z.ZodTypeDef, SpeechHistoryDeletionStatus > = z.object({ id: z.string(), object: z.string(), deleted: z.literal(true), }); export function speechHistoryDeletionStatusToJSON( speechHistoryDeletionStatus: SpeechHistoryDeletionStatus, ): string { return JSON.stringify( SpeechHistoryDeletionStatus$outboundSchema.parse( speechHistoryDeletionStatus, ), ); } export function speechHistoryDeletionStatusFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => SpeechHistoryDeletionStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SpeechHistoryDeletionStatus' from JSON`, ); }