/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: f71fd6f6fbd4 */ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { Agent, Agent$inboundSchema } from "./agent.js"; export type AgentListPage = { object: "list"; data: Array; nextPageToken?: string | null | undefined; }; /** @internal */ export const AgentListPage$inboundSchema: z.ZodType = z .object({ object: z.literal("list").default("list"), data: z.array(Agent$inboundSchema), next_page_token: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "next_page_token": "nextPageToken", }); }); export function agentListPageFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AgentListPage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AgentListPage' from JSON`, ); }