/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type Highlight = { /** * The label of the bookmark this highlight was created from. */ type: string; /** * A short summary of the highlighted moment. */ summary: string | null; /** * The full text of the highlight. Only present when it differs from `summary`. */ text?: string | undefined; /** * Start of the highlight, in seconds from the start of the recording. */ startTime: number; /** * End of the highlight, in seconds from the start of the recording. */ endTime: number; }; /** @internal */ export const Highlight$inboundSchema: z.ZodType< Highlight, z.ZodTypeDef, unknown > = z.object({ type: z.string(), summary: z.nullable(z.string()), text: z.string().optional(), start_time: z.number(), end_time: z.number(), }).transform((v) => { return remap$(v, { "start_time": "startTime", "end_time": "endTime", }); }); export function highlightFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Highlight$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Highlight' from JSON`, ); }