/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 4e5ad5e88bbe */ 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 { AgentsTimeSavedInsight, AgentsTimeSavedInsight$inboundSchema, } from "./agentstimesavedinsight.js"; import { AgentsUsageByDepartmentInsight, AgentsUsageByDepartmentInsight$inboundSchema, } from "./agentsusagebydepartmentinsight.js"; import { AgentUsersInsight, AgentUsersInsight$inboundSchema, } from "./agentusersinsight.js"; import { LabeledCountInfo, LabeledCountInfo$inboundSchema, } from "./labeledcountinfo.js"; import { PerAgentInsight, PerAgentInsight$inboundSchema, } from "./peragentinsight.js"; export type AgentsInsightsV2Response = { /** * Number of current Monthly Active Users, in the specified departments. */ monthlyActiveUsers?: number | undefined; /** * Number of current Weekly Active Users, in the specified departments. */ weeklyActiveUsers?: number | undefined; monthlyActiveUserTimeseries?: LabeledCountInfo | undefined; weeklyActiveUserTimeseries?: LabeledCountInfo | undefined; dailyActiveUserTimeseries?: LabeledCountInfo | undefined; /** * Total number of shared agents. */ sharedAgentsCount?: number | undefined; topAgentsInsights?: Array | undefined; agentsUsageByDepartmentInsights?: | Array | undefined; agentUsersInsights?: Array | undefined; /** * Insights for agents time saved over the specified time period. */ agentsTimeSavedInsights?: Array | undefined; dailyAgentRunsTimeseries?: LabeledCountInfo | undefined; successfulRunsTimeseries?: LabeledCountInfo | undefined; failedRunsTimeseries?: LabeledCountInfo | undefined; pausedRunsTimeseries?: LabeledCountInfo | undefined; upvotesTimeseries?: LabeledCountInfo | undefined; downvotesTimeseries?: LabeledCountInfo | undefined; }; /** @internal */ export const AgentsInsightsV2Response$inboundSchema: z.ZodType< AgentsInsightsV2Response, z.ZodTypeDef, unknown > = z.object({ monthlyActiveUsers: z.number().int().optional(), weeklyActiveUsers: z.number().int().optional(), monthlyActiveUserTimeseries: LabeledCountInfo$inboundSchema.optional(), weeklyActiveUserTimeseries: LabeledCountInfo$inboundSchema.optional(), dailyActiveUserTimeseries: LabeledCountInfo$inboundSchema.optional(), sharedAgentsCount: z.number().int().optional(), topAgentsInsights: z.array(PerAgentInsight$inboundSchema).optional(), agentsUsageByDepartmentInsights: z.array( AgentsUsageByDepartmentInsight$inboundSchema, ).optional(), agentUsersInsights: z.array(AgentUsersInsight$inboundSchema).optional(), agentsTimeSavedInsights: z.array(AgentsTimeSavedInsight$inboundSchema) .optional(), dailyAgentRunsTimeseries: LabeledCountInfo$inboundSchema.optional(), successfulRunsTimeseries: LabeledCountInfo$inboundSchema.optional(), failedRunsTimeseries: LabeledCountInfo$inboundSchema.optional(), pausedRunsTimeseries: LabeledCountInfo$inboundSchema.optional(), upvotesTimeseries: LabeledCountInfo$inboundSchema.optional(), downvotesTimeseries: LabeledCountInfo$inboundSchema.optional(), }); export function agentsInsightsV2ResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AgentsInsightsV2Response$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AgentsInsightsV2Response' from JSON`, ); }