/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 4aa531d7c0f7 */ 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"; export type InsightsSearchSummary = { /** * 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; /** * Total number of searches by users over the specified time period. */ numSearches?: number | undefined; /** * Total number of distinct users who searched over the specified time period. */ numSearchUsers?: number | undefined; }; /** @internal */ export const InsightsSearchSummary$inboundSchema: z.ZodType< InsightsSearchSummary, z.ZodTypeDef, unknown > = z.object({ monthlyActiveUsers: z.number().int().optional(), weeklyActiveUsers: z.number().int().optional(), numSearches: z.number().int().optional(), numSearchUsers: z.number().int().optional(), }); export function insightsSearchSummaryFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => InsightsSearchSummary$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InsightsSearchSummary' from JSON`, ); }