/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ 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 { PageInfo, PageInfo$inboundSchema } from "./pageinfo.js"; import { Vendor, Vendor$inboundSchema } from "./vendor.js"; export type PaginatedResponseVendorResults = { data: Array; /** * Provides information about the pagination of a dataset. */ pageInfo: PageInfo; }; export type PaginatedResponseVendor = { results: PaginatedResponseVendorResults; }; /** @internal */ export const PaginatedResponseVendorResults$inboundSchema: z.ZodType< PaginatedResponseVendorResults, z.ZodTypeDef, unknown > = z.object({ data: z.array(Vendor$inboundSchema), pageInfo: PageInfo$inboundSchema, }); export function paginatedResponseVendorResultsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PaginatedResponseVendorResults$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PaginatedResponseVendorResults' from JSON`, ); } /** @internal */ export const PaginatedResponseVendor$inboundSchema: z.ZodType< PaginatedResponseVendor, z.ZodTypeDef, unknown > = z.object({ results: z.lazy(() => PaginatedResponseVendorResults$inboundSchema), }); export function paginatedResponseVendorFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PaginatedResponseVendor$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PaginatedResponseVendor' from JSON`, ); }