/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 760e99ef9483 */ 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 AgentsUsageByDepartmentInsight = { /** * Name of the department */ department?: string | undefined; /** * Percentage of employees in the department who have used agents at least once over the specified time period. */ agentAdoptionRate?: number | undefined; /** * Total number of users in this department who have used any agent over the specified time period. */ userCount?: number | undefined; /** * Total number of runs in this department over the specified time period. */ runCount?: number | undefined; /** * ID of the agent to be shown in the agent column in this department over the specified time period. */ agentId?: string | undefined; /** * Name of the agent to be shown in the agent column in this department over the specified time period. */ agentName?: string | undefined; /** * Defines how to render an icon */ icon?: IconConfig | undefined; /** * Indicates whether the agent has been deleted */ isDeleted?: boolean | undefined; }; /** @internal */ export const AgentsUsageByDepartmentInsight$inboundSchema: z.ZodType< AgentsUsageByDepartmentInsight, z.ZodTypeDef, unknown > = z.object({ department: z.string().optional(), agentAdoptionRate: z.number().optional(), userCount: z.number().int().optional(), runCount: z.number().int().optional(), agentId: z.string().optional(), agentName: z.string().optional(), icon: IconConfig$inboundSchema.optional(), isDeleted: z.boolean().optional(), }); export function agentsUsageByDepartmentInsightFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AgentsUsageByDepartmentInsight$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AgentsUsageByDepartmentInsight' from JSON`, ); }