/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 74579d5007d8 */ 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"; /** * Signature region. ``content`` is the transcribed name when legible, else ``""``. */ export type OCRSignatureBlock = { topLeftX: number; topLeftY: number; bottomRightX: number; bottomRightY: number; /** * Text/markdown/html content of this block */ content: string; type: "signature"; }; /** @internal */ export const OCRSignatureBlock$inboundSchema: z.ZodType< OCRSignatureBlock, unknown > = 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("signature"), }).transform((v) => { return remap$(v, { "top_left_x": "topLeftX", "top_left_y": "topLeftY", "bottom_right_x": "bottomRightX", "bottom_right_y": "bottomRightY", }); }); export function ocrSignatureBlockFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => OCRSignatureBlock$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OCRSignatureBlock' from JSON`, ); }