/* * 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"; import { PendingInvestorAction, PendingInvestorAction$inboundSchema, PendingInvestorAction$Outbound, PendingInvestorAction$outboundSchema, } from "./pendinginvestoraction.js"; /** * Response to RetrievePendingInvestorActions request. */ export type RetrievePendingInvestorActionsResponse = { /** * The ID of the account specified in the request. */ accountId?: string | undefined; /** * The ID for the alternative investment order resource. */ alternativeOrderId?: string | undefined; /** * The object containing the pending action URIs that provide access to the document that is awaiting signature and the id of the responsible party. */ pendingInvestorActions?: Array | undefined; }; /** @internal */ export const RetrievePendingInvestorActionsResponse$inboundSchema: z.ZodType< RetrievePendingInvestorActionsResponse, z.ZodTypeDef, unknown > = z.object({ account_id: z.string().optional(), alternative_order_id: z.string().optional(), pending_investor_actions: z.array(PendingInvestorAction$inboundSchema) .optional(), }).transform((v) => { return remap$(v, { "account_id": "accountId", "alternative_order_id": "alternativeOrderId", "pending_investor_actions": "pendingInvestorActions", }); }); /** @internal */ export type RetrievePendingInvestorActionsResponse$Outbound = { account_id?: string | undefined; alternative_order_id?: string | undefined; pending_investor_actions?: Array | undefined; }; /** @internal */ export const RetrievePendingInvestorActionsResponse$outboundSchema: z.ZodType< RetrievePendingInvestorActionsResponse$Outbound, z.ZodTypeDef, RetrievePendingInvestorActionsResponse > = z.object({ accountId: z.string().optional(), alternativeOrderId: z.string().optional(), pendingInvestorActions: z.array(PendingInvestorAction$outboundSchema) .optional(), }).transform((v) => { return remap$(v, { accountId: "account_id", alternativeOrderId: "alternative_order_id", pendingInvestorActions: "pending_investor_actions", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace RetrievePendingInvestorActionsResponse$ { /** @deprecated use `RetrievePendingInvestorActionsResponse$inboundSchema` instead. */ export const inboundSchema = RetrievePendingInvestorActionsResponse$inboundSchema; /** @deprecated use `RetrievePendingInvestorActionsResponse$outboundSchema` instead. */ export const outboundSchema = RetrievePendingInvestorActionsResponse$outboundSchema; /** @deprecated use `RetrievePendingInvestorActionsResponse$Outbound` instead. */ export type Outbound = RetrievePendingInvestorActionsResponse$Outbound; } export function retrievePendingInvestorActionsResponseToJSON( retrievePendingInvestorActionsResponse: RetrievePendingInvestorActionsResponse, ): string { return JSON.stringify( RetrievePendingInvestorActionsResponse$outboundSchema.parse( retrievePendingInvestorActionsResponse, ), ); } export function retrievePendingInvestorActionsResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => RetrievePendingInvestorActionsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrievePendingInvestorActionsResponse' from JSON`, ); }