/* * 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 { AccountAccessService, AccountAccessService$inboundSchema, } from "./accountaccessservice.js"; import { PageInfo, PageInfo$inboundSchema } from "./pageinfo.js"; export type PaginatedResponseAccountAccessServiceResults = { data: Array; /** * Provides information about the pagination of a dataset. */ pageInfo: PageInfo; }; export type PaginatedResponseAccountAccessService = { results: PaginatedResponseAccountAccessServiceResults; }; /** @internal */ export const PaginatedResponseAccountAccessServiceResults$inboundSchema: z.ZodType< PaginatedResponseAccountAccessServiceResults, z.ZodTypeDef, unknown > = z.object({ data: z.array(AccountAccessService$inboundSchema), pageInfo: PageInfo$inboundSchema, }); export function paginatedResponseAccountAccessServiceResultsFromJSON( jsonString: string, ): SafeParseResult< PaginatedResponseAccountAccessServiceResults, SDKValidationError > { return safeParse( jsonString, (x) => PaginatedResponseAccountAccessServiceResults$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PaginatedResponseAccountAccessServiceResults' from JSON`, ); } /** @internal */ export const PaginatedResponseAccountAccessService$inboundSchema: z.ZodType< PaginatedResponseAccountAccessService, z.ZodTypeDef, unknown > = z.object({ results: z.lazy(() => PaginatedResponseAccountAccessServiceResults$inboundSchema ), }); export function paginatedResponseAccountAccessServiceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PaginatedResponseAccountAccessService$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PaginatedResponseAccountAccessService' from JSON`, ); }