/* * 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 "./sdkvalidationerror.js"; export type TranscriptionWord = { /** * The text content of the word. */ word: string; /** * Start time of the word in seconds. */ start: number; /** * End time of the word in seconds. */ end: number; }; /** @internal */ export const TranscriptionWord$inboundSchema: z.ZodType< TranscriptionWord, z.ZodTypeDef, unknown > = z.object({ word: z.string(), start: z.number(), end: z.number(), }); /** @internal */ export type TranscriptionWord$Outbound = { word: string; start: number; end: number; }; /** @internal */ export const TranscriptionWord$outboundSchema: z.ZodType< TranscriptionWord$Outbound, z.ZodTypeDef, TranscriptionWord > = z.object({ word: z.string(), start: z.number(), end: z.number(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TranscriptionWord$ { /** @deprecated use `TranscriptionWord$inboundSchema` instead. */ export const inboundSchema = TranscriptionWord$inboundSchema; /** @deprecated use `TranscriptionWord$outboundSchema` instead. */ export const outboundSchema = TranscriptionWord$outboundSchema; /** @deprecated use `TranscriptionWord$Outbound` instead. */ export type Outbound = TranscriptionWord$Outbound; } export function transcriptionWordToJSON( transcriptionWord: TranscriptionWord, ): string { return JSON.stringify( TranscriptionWord$outboundSchema.parse(transcriptionWord), ); } export function transcriptionWordFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TranscriptionWord$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TranscriptionWord' from JSON`, ); }