/* * 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"; /** * A pending investor action required for an alternative order. */ export type PendingInvestorAction = { /** * The link to the document that requires action. Using this link will open the document in a new window or browser tab. */ actionUri?: string | undefined; /** * The link to the document that requires action, suitable for embedding via iframe. */ actionUriEmbeddable?: string | undefined; /** * The description of the action. */ description?: string | undefined; /** * The ID of the party responsible for performing the action. */ partyId?: string | undefined; }; /** @internal */ export const PendingInvestorAction$inboundSchema: z.ZodType< PendingInvestorAction, z.ZodTypeDef, unknown > = z.object({ action_uri: z.string().optional(), action_uri_embeddable: z.string().optional(), description: z.string().optional(), party_id: z.string().optional(), }).transform((v) => { return remap$(v, { "action_uri": "actionUri", "action_uri_embeddable": "actionUriEmbeddable", "party_id": "partyId", }); }); /** @internal */ export type PendingInvestorAction$Outbound = { action_uri?: string | undefined; action_uri_embeddable?: string | undefined; description?: string | undefined; party_id?: string | undefined; }; /** @internal */ export const PendingInvestorAction$outboundSchema: z.ZodType< PendingInvestorAction$Outbound, z.ZodTypeDef, PendingInvestorAction > = z.object({ actionUri: z.string().optional(), actionUriEmbeddable: z.string().optional(), description: z.string().optional(), partyId: z.string().optional(), }).transform((v) => { return remap$(v, { actionUri: "action_uri", actionUriEmbeddable: "action_uri_embeddable", partyId: "party_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PendingInvestorAction$ { /** @deprecated use `PendingInvestorAction$inboundSchema` instead. */ export const inboundSchema = PendingInvestorAction$inboundSchema; /** @deprecated use `PendingInvestorAction$outboundSchema` instead. */ export const outboundSchema = PendingInvestorAction$outboundSchema; /** @deprecated use `PendingInvestorAction$Outbound` instead. */ export type Outbound = PendingInvestorAction$Outbound; } export function pendingInvestorActionToJSON( pendingInvestorAction: PendingInvestorAction, ): string { return JSON.stringify( PendingInvestorAction$outboundSchema.parse(pendingInvestorAction), ); } export function pendingInvestorActionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PendingInvestorAction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PendingInvestorAction' from JSON`, ); }