/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import * as types from "../types/primitives.js"; import { SDKValidationError } from "./errors/sdk-validation-error.js"; export type StatsTodayResponse = { activeStreams: number; /** * Validated plays (>= 2 min) */ todayPlays: number; /** * Hours watched today */ watchTimeHours: number; alertsLast24h: number; activeUsersToday: number; timestamp: Date; }; /** @internal */ export const StatsTodayResponse$inboundSchema: z.ZodMiniType< StatsTodayResponse, unknown > = z.object({ activeStreams: types.number(), todayPlays: types.number(), watchTimeHours: types.number(), alertsLast24h: types.number(), activeUsersToday: types.number(), timestamp: types.date(), }); export function statsTodayResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => StatsTodayResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StatsTodayResponse' from JSON`, ); }