/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { WithdrawalScheduleDetailsUpdate, WithdrawalScheduleDetailsUpdate$inboundSchema, WithdrawalScheduleDetailsUpdate$Outbound, WithdrawalScheduleDetailsUpdate$outboundSchema, } from "./withdrawalscheduledetailsupdate.js"; /** * A withdrawal transfer schedule using the Check mechanism */ export type CheckWithdrawalScheduleUpdate = { /** * Details of withdrawal schedule transfers */ scheduleDetails?: WithdrawalScheduleDetailsUpdate | undefined; }; /** @internal */ export const CheckWithdrawalScheduleUpdate$inboundSchema: z.ZodType< CheckWithdrawalScheduleUpdate, z.ZodTypeDef, unknown > = z.object({ schedule_details: WithdrawalScheduleDetailsUpdate$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "schedule_details": "scheduleDetails", }); }); /** @internal */ export type CheckWithdrawalScheduleUpdate$Outbound = { schedule_details?: WithdrawalScheduleDetailsUpdate$Outbound | undefined; }; /** @internal */ export const CheckWithdrawalScheduleUpdate$outboundSchema: z.ZodType< CheckWithdrawalScheduleUpdate$Outbound, z.ZodTypeDef, CheckWithdrawalScheduleUpdate > = z.object({ scheduleDetails: WithdrawalScheduleDetailsUpdate$outboundSchema.optional(), }).transform((v) => { return remap$(v, { scheduleDetails: "schedule_details", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CheckWithdrawalScheduleUpdate$ { /** @deprecated use `CheckWithdrawalScheduleUpdate$inboundSchema` instead. */ export const inboundSchema = CheckWithdrawalScheduleUpdate$inboundSchema; /** @deprecated use `CheckWithdrawalScheduleUpdate$outboundSchema` instead. */ export const outboundSchema = CheckWithdrawalScheduleUpdate$outboundSchema; /** @deprecated use `CheckWithdrawalScheduleUpdate$Outbound` instead. */ export type Outbound = CheckWithdrawalScheduleUpdate$Outbound; } export function checkWithdrawalScheduleUpdateToJSON( checkWithdrawalScheduleUpdate: CheckWithdrawalScheduleUpdate, ): string { return JSON.stringify( CheckWithdrawalScheduleUpdate$outboundSchema.parse( checkWithdrawalScheduleUpdate, ), ); } export function checkWithdrawalScheduleUpdateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CheckWithdrawalScheduleUpdate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CheckWithdrawalScheduleUpdate' from JSON`, ); }