/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 75b65be6e79c */ 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 { Person, Person$inboundSchema } from "./person.js"; export type PerUserAssistantInsight = { person?: Person | undefined; /** * Total number of chat messages sent by this user over the specified time period. */ numChatMessages?: number | undefined; /** * Total number of summarized items by this user over the specified time period. */ numSummarizations?: number | undefined; /** * Total number of AI Answers interacted with by this user over the specified time period. */ numAiAnswers?: number | undefined; /** * Total number of Gleanbot responses marked useful by this user over the specified time period. */ numGleanbotInteractions?: number | undefined; /** * Total number of days this user was active on the Assistant over the specified time period. */ numDaysActive?: number | undefined; }; /** @internal */ export const PerUserAssistantInsight$inboundSchema: z.ZodType< PerUserAssistantInsight, z.ZodTypeDef, unknown > = z.object({ person: Person$inboundSchema.optional(), numChatMessages: z.number().int().optional(), numSummarizations: z.number().int().optional(), numAiAnswers: z.number().int().optional(), numGleanbotInteractions: z.number().int().optional(), numDaysActive: z.number().int().optional(), }); export function perUserAssistantInsightFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PerUserAssistantInsight$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PerUserAssistantInsight' from JSON`, ); }