/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: eb57fc7b77ca */ 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 DatasourceObjectTypeDocumentCountEntry = { /** * The object type of the document */ objectType?: string | undefined; /** * The number of documents of the corresponding objectType */ count?: number | undefined; }; /** @internal */ export const DatasourceObjectTypeDocumentCountEntry$inboundSchema: z.ZodType< DatasourceObjectTypeDocumentCountEntry, z.ZodTypeDef, unknown > = z.object({ objectType: z.string().optional(), count: z.number().int().optional(), }); export function datasourceObjectTypeDocumentCountEntryFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DatasourceObjectTypeDocumentCountEntry$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DatasourceObjectTypeDocumentCountEntry' from JSON`, ); }