/* * 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 { SDKValidationError } from "./errors/sdk-validation-error.js"; export type AgentListData = { id: number; workspaceId: string; name: string; slug: string; description: string | null; systemPrompt: string; model: string; maxTurns: number; permissionMode: string; allowedTools: Array | null; disallowedTools: Array | null; status: string; isPublic: boolean; metadata: { [k: string]: any } | null; tags: Array | null; createdBy: string | null; createdAt: Date; updatedAt: Date; }; export type AgentList = { data: Array; total: number; limit: number; offset: number; }; /** @internal */ export const AgentListData$inboundSchema: z.ZodMiniType< AgentListData, unknown > = z.object({ id: types.number(), workspaceId: types.string(), name: types.string(), slug: types.string(), description: types.nullable(types.string()), systemPrompt: types.string(), model: types.string(), maxTurns: types.number(), permissionMode: types.string(), allowedTools: types.nullable(z.array(types.string())), disallowedTools: types.nullable(z.array(types.string())), status: types.string(), isPublic: types.boolean(), metadata: types.nullable(z.record(z.string(), z.any())), tags: types.nullable(z.array(types.string())), createdBy: types.nullable(types.string()), createdAt: types.date(), updatedAt: types.date(), }); export function agentListDataFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AgentListData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AgentListData' from JSON`, ); } /** @internal */ export const AgentList$inboundSchema: z.ZodMiniType = z .object({ data: z.array(z.lazy(() => AgentListData$inboundSchema)), total: types.number(), limit: types.number(), offset: types.number(), }); export function agentListFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AgentList$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AgentList' from JSON`, ); }