/* * 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 WebhookDataBankAccountDeleted = { bankAccountID: string; accountID: string; }; /** @internal */ export const WebhookDataBankAccountDeleted$inboundSchema: z.ZodType< WebhookDataBankAccountDeleted, z.ZodTypeDef, unknown > = z.object({ bankAccountID: z.string(), accountID: z.string(), }); /** @internal */ export type WebhookDataBankAccountDeleted$Outbound = { bankAccountID: string; accountID: string; }; /** @internal */ export const WebhookDataBankAccountDeleted$outboundSchema: z.ZodType< WebhookDataBankAccountDeleted$Outbound, z.ZodTypeDef, WebhookDataBankAccountDeleted > = z.object({ bankAccountID: z.string(), accountID: z.string(), }); export function webhookDataBankAccountDeletedToJSON( webhookDataBankAccountDeleted: WebhookDataBankAccountDeleted, ): string { return JSON.stringify( WebhookDataBankAccountDeleted$outboundSchema.parse( webhookDataBankAccountDeleted, ), ); } export function webhookDataBankAccountDeletedFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => WebhookDataBankAccountDeleted$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WebhookDataBankAccountDeleted' from JSON`, ); }