/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 3a73614fc034 */ import * as z from "zod/v4"; import { safeParse } from "../../lib/schemas.js"; import * as openEnums from "../../types/enums.js"; import { OpenEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Format of the table */ export const Format = { Markdown: "markdown", Html: "html", } as const; /** * Format of the table */ export type Format = OpenEnum; export type OCRTableObject = { /** * Table ID for extracted table in a page */ id: string; /** * Content of the table in the given format */ content: string; /** * Format of the table */ format: Format; }; /** @internal */ export const Format$inboundSchema: z.ZodType = openEnums .inboundSchema(Format); /** @internal */ export const OCRTableObject$inboundSchema: z.ZodType = z.object({ id: z.string(), content: z.string(), format: Format$inboundSchema, }); export function ocrTableObjectFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => OCRTableObject$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OCRTableObject' from JSON`, ); }