/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: ad6cbfb6f8bd */ 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"; import { DebugDocumentResponse, DebugDocumentResponse$inboundSchema, } from "./debugdocumentresponse.js"; /** * Describes the response body of a single document in the /debug/{datasource}/documents API call */ export type DebugDocumentsResponseItem = { /** * Id of the document */ docId?: string | undefined; /** * objectType of the document */ objectType?: string | undefined; /** * Describes the response body of the /debug/{datasource}/document API call */ debugInfo?: DebugDocumentResponse | undefined; }; /** @internal */ export const DebugDocumentsResponseItem$inboundSchema: z.ZodType< DebugDocumentsResponseItem, z.ZodTypeDef, unknown > = z.object({ docId: z.string().optional(), objectType: z.string().optional(), debugInfo: DebugDocumentResponse$inboundSchema.optional(), }); export function debugDocumentsResponseItemFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DebugDocumentsResponseItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DebugDocumentsResponseItem' from JSON`, ); }