/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { AlertSettings, AlertSettings$inboundSchema, } from "./alert-settings.js"; import { SDKValidationError } from "./sdk-validation-error.js"; export type AlertInfo = { alertSettings?: AlertSettings | undefined; timestamp?: string | undefined; valueAtTime?: Date | undefined; }; /** @internal */ export const AlertInfo$inboundSchema: z.ZodMiniType = z .pipe( z.object({ alert_settings: types.optional(AlertSettings$inboundSchema), timestamp: types.optional(types.string()), value_at_time: types.optional(types.date()), }), z.transform((v) => { return remap$(v, { "alert_settings": "alertSettings", "value_at_time": "valueAtTime", }); }), ); export function alertInfoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AlertInfo$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AlertInfo' from JSON`, ); }