/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: a1f132923b60 */ 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 AgentsTimeSavedInsight = { /** * 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 runs for this agent over the specified time period. */ runCount?: number | undefined; /** * Average minutes saved per run for this agent over the specified time period. */ minsPerRun?: number | undefined; /** * Total number of users who provided feedback on time saved for this agent over the specified time period. */ feedbackUserCount?: number | undefined; }; /** @internal */ export const AgentsTimeSavedInsight$inboundSchema: z.ZodType< AgentsTimeSavedInsight, z.ZodTypeDef, unknown > = z.object({ agentId: z.string().optional(), agentName: z.string().optional(), icon: IconConfig$inboundSchema.optional(), isDeleted: z.boolean().optional(), runCount: z.number().int().optional(), minsPerRun: z.number().optional(), feedbackUserCount: z.number().int().optional(), }); export function agentsTimeSavedInsightFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AgentsTimeSavedInsight$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AgentsTimeSavedInsight' from JSON`, ); }