/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 269ef7b97388 */ 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"; /** * Describes the response body of the /getdocumentcount API call */ export type GetDocumentCountResponse = { /** * Number of documents corresponding to the specified custom datasource. */ documentCount?: number | undefined; }; /** @internal */ export const GetDocumentCountResponse$inboundSchema: z.ZodType< GetDocumentCountResponse, z.ZodTypeDef, unknown > = z.object({ documentCount: z.number().int().optional(), }); export function getDocumentCountResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GetDocumentCountResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetDocumentCountResponse' from JSON`, ); }