/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 82a21e71c4a1 */ import * as z from "zod/v4"; 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 OCRHeaderBlock = { topLeftX: number; topLeftY: number; bottomRightX: number; bottomRightY: number; /** * Text/markdown/html content of this block */ content: string; type: "header"; }; /** @internal */ export const OCRHeaderBlock$inboundSchema: z.ZodType = z.object({ top_left_x: z.int(), top_left_y: z.int(), bottom_right_x: z.int(), bottom_right_y: z.int(), content: z.string(), type: z.literal("header"), }).transform((v) => { return remap$(v, { "top_left_x": "topLeftX", "top_left_y": "topLeftY", "bottom_right_x": "bottomRightX", "bottom_right_y": "bottomRightY", }); }); export function ocrHeaderBlockFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => OCRHeaderBlock$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OCRHeaderBlock' from JSON`, ); }