/* * 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 { Mode, Mode$inboundSchema, Mode$outboundSchema } from "./mode.js"; /** * The account that created the onboarding invite. */ export type OnboardingPartnerAccount = { /** * The account ID of the partner that created the invite. */ accountID: string; /** * The operating mode for an account. */ accountMode: Mode; /** * The name of the Moov account used to create the onboarding invite. */ displayName: string; }; /** @internal */ export const OnboardingPartnerAccount$inboundSchema: z.ZodType< OnboardingPartnerAccount, z.ZodTypeDef, unknown > = z.object({ accountID: z.string(), accountMode: Mode$inboundSchema, displayName: z.string(), }); /** @internal */ export type OnboardingPartnerAccount$Outbound = { accountID: string; accountMode: string; displayName: string; }; /** @internal */ export const OnboardingPartnerAccount$outboundSchema: z.ZodType< OnboardingPartnerAccount$Outbound, z.ZodTypeDef, OnboardingPartnerAccount > = z.object({ accountID: z.string(), accountMode: Mode$outboundSchema, displayName: z.string(), }); export function onboardingPartnerAccountToJSON( onboardingPartnerAccount: OnboardingPartnerAccount, ): string { return JSON.stringify( OnboardingPartnerAccount$outboundSchema.parse(onboardingPartnerAccount), ); } export function onboardingPartnerAccountFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => OnboardingPartnerAccount$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OnboardingPartnerAccount' from JSON`, ); }