/* * 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 WebhookDtoWalletAlertInfo = { alertSettings?: AlertSettings | undefined; alertType?: string | undefined; creditBalance?: number | undefined; currentBalance?: number | undefined; state?: string | undefined; }; /** @internal */ export const WebhookDtoWalletAlertInfo$inboundSchema: z.ZodMiniType< WebhookDtoWalletAlertInfo, unknown > = z.pipe( z.object({ alert_settings: types.optional(AlertSettings$inboundSchema), alert_type: types.optional(types.string()), credit_balance: types.optional(types.number()), current_balance: types.optional(types.number()), state: types.optional(types.string()), }), z.transform((v) => { return remap$(v, { "alert_settings": "alertSettings", "alert_type": "alertType", "credit_balance": "creditBalance", "current_balance": "currentBalance", }); }), ); export function webhookDtoWalletAlertInfoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => WebhookDtoWalletAlertInfo$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WebhookDtoWalletAlertInfo' from JSON`, ); }