/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: d1a410abe708 */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type DocumentContent = { /** * The plaintext content of the document. */ fullTextList?: Array | undefined; }; /** @internal */ export const DocumentContent$inboundSchema: z.ZodType< DocumentContent, z.ZodTypeDef, unknown > = z.object({ fullTextList: z.array(z.string()).optional(), }); /** @internal */ export type DocumentContent$Outbound = { fullTextList?: Array | undefined; }; /** @internal */ export const DocumentContent$outboundSchema: z.ZodType< DocumentContent$Outbound, z.ZodTypeDef, DocumentContent > = z.object({ fullTextList: z.array(z.string()).optional(), }); export function documentContentToJSON( documentContent: DocumentContent, ): string { return JSON.stringify(DocumentContent$outboundSchema.parse(documentContent)); } export function documentContentFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DocumentContent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DocumentContent' from JSON`, ); }