/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ 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 WebhookDataBalanceUpdated = { accountID: string; walletID: string; }; /** @internal */ export const WebhookDataBalanceUpdated$inboundSchema: z.ZodType< WebhookDataBalanceUpdated, z.ZodTypeDef, unknown > = z.object({ accountID: z.string(), walletID: z.string(), }); /** @internal */ export type WebhookDataBalanceUpdated$Outbound = { accountID: string; walletID: string; }; /** @internal */ export const WebhookDataBalanceUpdated$outboundSchema: z.ZodType< WebhookDataBalanceUpdated$Outbound, z.ZodTypeDef, WebhookDataBalanceUpdated > = z.object({ accountID: z.string(), walletID: z.string(), }); export function webhookDataBalanceUpdatedToJSON( webhookDataBalanceUpdated: WebhookDataBalanceUpdated, ): string { return JSON.stringify( WebhookDataBalanceUpdated$outboundSchema.parse(webhookDataBalanceUpdated), ); } export function webhookDataBalanceUpdatedFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => WebhookDataBalanceUpdated$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WebhookDataBalanceUpdated' from JSON`, ); }