/* * 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 fee */ export type CancelFeeRequestCreate = { /** * The name of the fee to cancel */ name: string; /** * The optional reason about why the fee is being canceled */ reason?: string | undefined; }; /** @internal */ export const CancelFeeRequestCreate$inboundSchema: z.ZodType< CancelFeeRequestCreate, z.ZodTypeDef, unknown > = z.object({ name: z.string(), reason: z.string().optional(), }); /** @internal */ export type CancelFeeRequestCreate$Outbound = { name: string; reason?: string | undefined; }; /** @internal */ export const CancelFeeRequestCreate$outboundSchema: z.ZodType< CancelFeeRequestCreate$Outbound, z.ZodTypeDef, CancelFeeRequestCreate > = z.object({ name: z.string(), reason: z.string().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CancelFeeRequestCreate$ { /** @deprecated use `CancelFeeRequestCreate$inboundSchema` instead. */ export const inboundSchema = CancelFeeRequestCreate$inboundSchema; /** @deprecated use `CancelFeeRequestCreate$outboundSchema` instead. */ export const outboundSchema = CancelFeeRequestCreate$outboundSchema; /** @deprecated use `CancelFeeRequestCreate$Outbound` instead. */ export type Outbound = CancelFeeRequestCreate$Outbound; } export function cancelFeeRequestCreateToJSON( cancelFeeRequestCreate: CancelFeeRequestCreate, ): string { return JSON.stringify( CancelFeeRequestCreate$outboundSchema.parse(cancelFeeRequestCreate), ); } export function cancelFeeRequestCreateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CancelFeeRequestCreate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CancelFeeRequestCreate' from JSON`, ); }