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