/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 490fa376a908 */ 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 { IconConfig, IconConfig$inboundSchema } from "./iconconfig.js"; export type PerAgentInsight = { /** * Agent ID */ agentId?: string | undefined; /** * Agent name */ agentName?: string | undefined; /** * Defines how to render an icon */ icon?: IconConfig | undefined; /** * Indicates whether the agent has been deleted */ isDeleted?: boolean | undefined; /** * Total number of users for this agent over the specified time period. */ userCount?: number | undefined; /** * Total number of runs for this agent over the specified time period. */ runCount?: number | undefined; /** * Total number of upvotes for this agent over the specified time period. */ upvoteCount?: number | undefined; /** * Total number of downvotes for this agent over the specified time period. */ downvoteCount?: number | undefined; }; /** @internal */ export const PerAgentInsight$inboundSchema: z.ZodType< PerAgentInsight, z.ZodTypeDef, unknown > = z.object({ agentId: z.string().optional(), agentName: z.string().optional(), icon: IconConfig$inboundSchema.optional(), isDeleted: z.boolean().optional(), userCount: z.number().int().optional(), runCount: z.number().int().optional(), upvoteCount: z.number().int().optional(), downvoteCount: z.number().int().optional(), }); export function perAgentInsightFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PerAgentInsight$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PerAgentInsight' from JSON`, ); }