/* * 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 { CreditGrantApplicationResponse, CreditGrantApplicationResponse$inboundSchema, } from "./credit-grant-application-response.js"; import { PaginationResponse, PaginationResponse$inboundSchema, } from "./pagination-response.js"; import { SDKValidationError } from "./sdk-validation-error.js"; export type ListCreditGrantApplicationsResponse = { items?: Array | undefined; pagination?: PaginationResponse | undefined; }; /** @internal */ export const ListCreditGrantApplicationsResponse$inboundSchema: z.ZodMiniType< ListCreditGrantApplicationsResponse, unknown > = z.object({ items: types.optional(z.array(CreditGrantApplicationResponse$inboundSchema)), pagination: types.optional(PaginationResponse$inboundSchema), }); export function listCreditGrantApplicationsResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ListCreditGrantApplicationsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListCreditGrantApplicationsResponse' from JSON`, ); }