/* * 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"; export type CustomMappingInput = { /** * Target Field Mapping value */ value?: string | undefined; }; /** @internal */ export const CustomMappingInput$inboundSchema: z.ZodType< CustomMappingInput, z.ZodTypeDef, unknown > = z.object({ value: z.string().optional(), }); /** @internal */ export type CustomMappingInput$Outbound = { value?: string | undefined; }; /** @internal */ export const CustomMappingInput$outboundSchema: z.ZodType< CustomMappingInput$Outbound, z.ZodTypeDef, CustomMappingInput > = z.object({ value: 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 CustomMappingInput$ { /** @deprecated use `CustomMappingInput$inboundSchema` instead. */ export const inboundSchema = CustomMappingInput$inboundSchema; /** @deprecated use `CustomMappingInput$outboundSchema` instead. */ export const outboundSchema = CustomMappingInput$outboundSchema; /** @deprecated use `CustomMappingInput$Outbound` instead. */ export type Outbound = CustomMappingInput$Outbound; } export function customMappingInputToJSON( customMappingInput: CustomMappingInput, ): string { return JSON.stringify( CustomMappingInput$outboundSchema.parse(customMappingInput), ); } export function customMappingInputFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CustomMappingInput$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CustomMappingInput' from JSON`, ); }