/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { CustomerResponse, CustomerResponse$inboundSchema, } from "./customer-response.js"; import { PaginationResponse, PaginationResponse$inboundSchema, } from "./pagination-response.js"; import { SDKValidationError } from "./sdk-validation-error.js"; /** * Response object for listing customers with pagination */ export type ListCustomersResponse = { items?: Array | undefined; pagination?: PaginationResponse | undefined; }; /** @internal */ export const ListCustomersResponse$inboundSchema: z.ZodMiniType< ListCustomersResponse, unknown > = z.object({ items: types.optional(z.array(CustomerResponse$inboundSchema)), pagination: types.optional(PaginationResponse$inboundSchema), }); export function listCustomersResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ListCustomersResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListCustomersResponse' from JSON`, ); }