/* * 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"; import { BusinessPresence, BusinessPresence$inboundSchema, BusinessPresence$outboundSchema, } from "./businesspresence.js"; import { CollectFunds, CollectFunds$inboundSchema, CollectFunds$Outbound, CollectFunds$outboundSchema, } from "./collectfunds.js"; import { GeographicReach, GeographicReach$inboundSchema, GeographicReach$outboundSchema, } from "./geographicreach.js"; import { MoneyTransfer, MoneyTransfer$inboundSchema, MoneyTransfer$Outbound, MoneyTransfer$outboundSchema, } from "./moneytransfer.js"; import { PendingLitigation, PendingLitigation$inboundSchema, PendingLitigation$outboundSchema, } from "./pendinglitigation.js"; import { SendFunds, SendFunds$inboundSchema, SendFunds$Outbound, SendFunds$outboundSchema, } from "./sendfunds.js"; import { SubmissionIntent, SubmissionIntent$inboundSchema, SubmissionIntent$outboundSchema, } from "./submissionintent.js"; import { VolumeShareByCustomerType, VolumeShareByCustomerType$inboundSchema, VolumeShareByCustomerType$Outbound, VolumeShareByCustomerType$outboundSchema, } from "./volumesharebycustomertype.js"; export type UpsertUnderwriting = { geographicReach?: GeographicReach | undefined; businessPresence?: BusinessPresence | undefined; pendingLitigation?: PendingLitigation | undefined; volumeShareByCustomerType?: VolumeShareByCustomerType | undefined; collectFunds?: CollectFunds | undefined; moneyTransfer?: MoneyTransfer | undefined; sendFunds?: SendFunds | undefined; submissionIntent?: SubmissionIntent | undefined; }; /** @internal */ export const UpsertUnderwriting$inboundSchema: z.ZodType< UpsertUnderwriting, z.ZodTypeDef, unknown > = z.object({ geographicReach: GeographicReach$inboundSchema.optional(), businessPresence: BusinessPresence$inboundSchema.optional(), pendingLitigation: PendingLitigation$inboundSchema.optional(), volumeShareByCustomerType: VolumeShareByCustomerType$inboundSchema.optional(), collectFunds: CollectFunds$inboundSchema.optional(), moneyTransfer: MoneyTransfer$inboundSchema.optional(), sendFunds: SendFunds$inboundSchema.optional(), submissionIntent: SubmissionIntent$inboundSchema.optional(), }); /** @internal */ export type UpsertUnderwriting$Outbound = { geographicReach?: string | undefined; businessPresence?: string | undefined; pendingLitigation?: string | undefined; volumeShareByCustomerType?: VolumeShareByCustomerType$Outbound | undefined; collectFunds?: CollectFunds$Outbound | undefined; moneyTransfer?: MoneyTransfer$Outbound | undefined; sendFunds?: SendFunds$Outbound | undefined; submissionIntent?: string | undefined; }; /** @internal */ export const UpsertUnderwriting$outboundSchema: z.ZodType< UpsertUnderwriting$Outbound, z.ZodTypeDef, UpsertUnderwriting > = z.object({ geographicReach: GeographicReach$outboundSchema.optional(), businessPresence: BusinessPresence$outboundSchema.optional(), pendingLitigation: PendingLitigation$outboundSchema.optional(), volumeShareByCustomerType: VolumeShareByCustomerType$outboundSchema .optional(), collectFunds: CollectFunds$outboundSchema.optional(), moneyTransfer: MoneyTransfer$outboundSchema.optional(), sendFunds: SendFunds$outboundSchema.optional(), submissionIntent: SubmissionIntent$outboundSchema.optional(), }); export function upsertUnderwritingToJSON( upsertUnderwriting: UpsertUnderwriting, ): string { return JSON.stringify( UpsertUnderwriting$outboundSchema.parse(upsertUnderwriting), ); } export function upsertUnderwritingFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => UpsertUnderwriting$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpsertUnderwriting' from JSON`, ); }