/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Request to cancel an existing bank relationship. */ export type CancelBankRelationshipRequestCreate = { /** * Comment when canceling the bank relationship. */ comment: string; /** * The name of the bank relationship to be canceled. */ name: string; }; /** @internal */ export const CancelBankRelationshipRequestCreate$inboundSchema: z.ZodType< CancelBankRelationshipRequestCreate, z.ZodTypeDef, unknown > = z.object({ comment: z.string(), name: z.string(), }); /** @internal */ export type CancelBankRelationshipRequestCreate$Outbound = { comment: string; name: string; }; /** @internal */ export const CancelBankRelationshipRequestCreate$outboundSchema: z.ZodType< CancelBankRelationshipRequestCreate$Outbound, z.ZodTypeDef, CancelBankRelationshipRequestCreate > = z.object({ comment: z.string(), name: z.string(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CancelBankRelationshipRequestCreate$ { /** @deprecated use `CancelBankRelationshipRequestCreate$inboundSchema` instead. */ export const inboundSchema = CancelBankRelationshipRequestCreate$inboundSchema; /** @deprecated use `CancelBankRelationshipRequestCreate$outboundSchema` instead. */ export const outboundSchema = CancelBankRelationshipRequestCreate$outboundSchema; /** @deprecated use `CancelBankRelationshipRequestCreate$Outbound` instead. */ export type Outbound = CancelBankRelationshipRequestCreate$Outbound; } export function cancelBankRelationshipRequestCreateToJSON( cancelBankRelationshipRequestCreate: CancelBankRelationshipRequestCreate, ): string { return JSON.stringify( CancelBankRelationshipRequestCreate$outboundSchema.parse( cancelBankRelationshipRequestCreate, ), ); } export function cancelBankRelationshipRequestCreateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CancelBankRelationshipRequestCreate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CancelBankRelationshipRequestCreate' from JSON`, ); }