/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 1f7440448eb1 */ 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 { DebugDocumentsResponseItem, DebugDocumentsResponseItem$inboundSchema, } from "./debugdocumentsresponseitem.js"; /** * Describes the response body of a single document in the /debug/{datasource}/documents API call */ export type DebugDocumentsResponse = { /** * List of document ids/urls and their debug information */ documentStatuses?: Array | undefined; }; /** @internal */ export const DebugDocumentsResponse$inboundSchema: z.ZodType< DebugDocumentsResponse, z.ZodTypeDef, unknown > = z.object({ documentStatuses: z.array(DebugDocumentsResponseItem$inboundSchema) .optional(), }); export function debugDocumentsResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DebugDocumentsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DebugDocumentsResponse' from JSON`, ); }