/* * 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 { catchUnrecognizedEnum, OpenEnum, Unrecognized, } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { PhoneNumber, PhoneNumber$inboundSchema, PhoneNumber$Outbound, PhoneNumber$outboundSchema, } from "./phonenumber.js"; /** * The current price of one unit of the asset in USD. */ export type CurrentPrice = { /** * The decimal value, as a string; Refer to [Google’s Decimal type protocol buffer](https://github.com/googleapis/googleapis/blob/40203ca1880849480bbff7b8715491060bbccdf1/google/type/decimal.proto#L33) for details */ value?: string | undefined; }; /** * The issuer’s mailing address. */ export type AlternativeInvestmentMailingAddress = { /** * Unstructured address lines describing the lower levels of an address. * * @remarks * * Because values in address_lines do not have type information and may sometimes contain multiple values in a single field (e.g. "Austin, TX"), it is important that the line order is clear. The order of address lines should be "envelope order" for the country/region of the address. In places where this can vary (e.g. Japan), address_language is used to make it explicit (e.g. "ja" for large-to-small ordering and "ja-Latn" or "en" for small-to-large). This way, the most specific line of an address can be selected based on the language. * * The minimum permitted structural representation of an address consists of a region_code with all remaining information placed in the address_lines. It would be possible to format such an address very approximately without geocoding, but no semantic reasoning could be made about any of the address components until it was at least partially resolved. * * Creating an address only containing a region_code and address_lines, and then geocoding is the recommended way to handle completely unstructured addresses (as opposed to guessing which parts of the address should be localities or administrative areas). */ addressLines?: Array | undefined; /** * Optional. Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state, a province, an oblast, or a prefecture. Specifically, for Spain this is the province and not the autonomous community (e.g. "Barcelona" and not "Catalonia"). Many countries don't use an administrative area in postal addresses. E.g. in Switzerland this should be left unpopulated. */ administrativeArea?: string | undefined; /** * Optional. BCP-47 language code of the contents of this address (if known). This is often the UI language of the input form or is expected to match one of the languages used in the address' country/region, or their transliterated equivalents. This can affect formatting in certain countries, but is not critical to the correctness of the data and will never affect any validation or other non-formatting related operations. * * @remarks * * If this value is not known, it should be omitted (rather than specifying a possibly incorrect default). * * Examples: "zh-Hant", "ja", "ja-Latn", "en". */ languageCode?: string | undefined; /** * Optional. Generally refers to the city/town portion of the address. Examples: US city, IT comune, UK post town. In regions of the world where localities are not well defined or do not fit into this structure well, leave locality empty and use address_lines. */ locality?: string | undefined; /** * Optional. The name of the organization at the address. */ organization?: string | undefined; /** * Optional. Postal code of the address. Not all countries use or require postal codes to be present, but where they are used, they may trigger additional validation with other parts of the address (e.g. state/zip validation in the U.S.A.). */ postalCode?: string | undefined; /** * Optional. The recipient at the address. This field may, under certain circumstances, contain multiline information. For example, it might contain "care of" information. */ recipients?: Array | undefined; /** * Required. CLDR region code of the country/region of the address. This is never inferred and it is up to the user to ensure the value is correct. See http://cldr.unicode.org/ and http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. Example: "CH" for Switzerland. */ regionCode?: string | undefined; /** * The schema revision of the `PostalAddress`. This must be set to 0, which is the latest revision. * * @remarks * * All new revisions **must** be backward compatible with old revisions. */ revision?: number | undefined; /** * Optional. Additional, country-specific, sorting code. This is not used in most regions. Where it is used, the value is either a string like "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number alone, representing the "sector code" (Jamaica), "delivery area indicator" (Malawi) or "post office indicator" (e.g. Côte d'Ivoire). */ sortingCode?: string | undefined; /** * Optional. Sublocality of the address. For example, this can be neighborhoods, boroughs, districts. */ sublocality?: string | undefined; }; /** * The issuer’s physical address. */ export type PhysicalAddress = { /** * Unstructured address lines describing the lower levels of an address. * * @remarks * * Because values in address_lines do not have type information and may sometimes contain multiple values in a single field (e.g. "Austin, TX"), it is important that the line order is clear. The order of address lines should be "envelope order" for the country/region of the address. In places where this can vary (e.g. Japan), address_language is used to make it explicit (e.g. "ja" for large-to-small ordering and "ja-Latn" or "en" for small-to-large). This way, the most specific line of an address can be selected based on the language. * * The minimum permitted structural representation of an address consists of a region_code with all remaining information placed in the address_lines. It would be possible to format such an address very approximately without geocoding, but no semantic reasoning could be made about any of the address components until it was at least partially resolved. * * Creating an address only containing a region_code and address_lines, and then geocoding is the recommended way to handle completely unstructured addresses (as opposed to guessing which parts of the address should be localities or administrative areas). */ addressLines?: Array | undefined; /** * Optional. Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state, a province, an oblast, or a prefecture. Specifically, for Spain this is the province and not the autonomous community (e.g. "Barcelona" and not "Catalonia"). Many countries don't use an administrative area in postal addresses. E.g. in Switzerland this should be left unpopulated. */ administrativeArea?: string | undefined; /** * Optional. BCP-47 language code of the contents of this address (if known). This is often the UI language of the input form or is expected to match one of the languages used in the address' country/region, or their transliterated equivalents. This can affect formatting in certain countries, but is not critical to the correctness of the data and will never affect any validation or other non-formatting related operations. * * @remarks * * If this value is not known, it should be omitted (rather than specifying a possibly incorrect default). * * Examples: "zh-Hant", "ja", "ja-Latn", "en". */ languageCode?: string | undefined; /** * Optional. Generally refers to the city/town portion of the address. Examples: US city, IT comune, UK post town. In regions of the world where localities are not well defined or do not fit into this structure well, leave locality empty and use address_lines. */ locality?: string | undefined; /** * Optional. The name of the organization at the address. */ organization?: string | undefined; /** * Optional. Postal code of the address. Not all countries use or require postal codes to be present, but where they are used, they may trigger additional validation with other parts of the address (e.g. state/zip validation in the U.S.A.). */ postalCode?: string | undefined; /** * Optional. The recipient at the address. This field may, under certain circumstances, contain multiline information. For example, it might contain "care of" information. */ recipients?: Array | undefined; /** * Required. CLDR region code of the country/region of the address. This is never inferred and it is up to the user to ensure the value is correct. See http://cldr.unicode.org/ and http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. Example: "CH" for Switzerland. */ regionCode?: string | undefined; /** * The schema revision of the `PostalAddress`. This must be set to 0, which is the latest revision. * * @remarks * * All new revisions **must** be backward compatible with old revisions. */ revision?: number | undefined; /** * Optional. Additional, country-specific, sorting code. This is not used in most regions. Where it is used, the value is either a string like "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number alone, representing the "sector code" (Jamaica), "delivery area indicator" (Malawi) or "post office indicator" (e.g. Côte d'Ivoire). */ sortingCode?: string | undefined; /** * Optional. Sublocality of the address. For example, this can be neighborhoods, boroughs, districts. */ sublocality?: string | undefined; }; /** * The issuer’s registration type. */ export enum AlternativeInvestmentRegistrationType { RegistrationTypeUnspecified = "REGISTRATION_TYPE_UNSPECIFIED", Other = "OTHER", BrokerDealer = "BROKER_DEALER", ExemptReportingAdvisor = "EXEMPT_REPORTING_ADVISOR", Ria = "RIA", } /** * The issuer’s registration type. */ export type AlternativeInvestmentRegistrationTypeOpen = OpenEnum< typeof AlternativeInvestmentRegistrationType >; /** * The issuer type. */ export enum AlternativeInvestmentIssuerType { TypeUnspecified = "TYPE_UNSPECIFIED", Corporation = "CORPORATION", Llc = "LLC", LimitedPartnership = "LIMITED_PARTNERSHIP", GeneralPartnership = "GENERAL_PARTNERSHIP", Trust = "TRUST", Ltd = "LTD", NoLienLetter = "NO_LIEN_LETTER", EntityFormation = "ENTITY_FORMATION", } /** * The issuer type. */ export type AlternativeInvestmentIssuerTypeOpen = OpenEnum< typeof AlternativeInvestmentIssuerType >; /** * The issuer entity of the alternative investment asset. */ export type Issuer = { /** * A description of the issuer. */ description?: string | undefined; /** * The issuer’s email addresses. */ emails?: Array | undefined; /** * The issuer’s administrative area of incorporation. */ incorporatedAdministrativeArea?: string | undefined; /** * The issuer’s region of incorporation. */ incorporatedRegionCode?: string | undefined; /** * The issuer’s mailing address. */ mailingAddress?: AlternativeInvestmentMailingAddress | null | undefined; /** * The issuer’s Manager CRDs. */ managerCrds?: Array | undefined; /** * The issuer’s phone numbers. */ phoneNumbers?: Array | undefined; /** * The issuer’s physical address. */ physicalAddress?: PhysicalAddress | null | undefined; /** * The issuer’s registration type. */ registrationType?: AlternativeInvestmentRegistrationTypeOpen | undefined; /** * The issuer’s title. */ title?: string | undefined; /** * The issuer type. */ type?: AlternativeInvestmentIssuerTypeOpen | undefined; }; /** * The minimum purchase amount required for an initial order of this asset. Value is in USD. */ export type MinimumInitialSubscriptionAmount = { /** * The decimal value, as a string; Refer to [Google’s Decimal type protocol buffer](https://github.com/googleapis/googleapis/blob/40203ca1880849480bbff7b8715491060bbccdf1/google/type/decimal.proto#L33) for details */ value?: string | undefined; }; /** * The minimum purchase amount required for subsequent orders of this asset. Value is in USD. */ export type MinimumSubsequentSubscriptionAmount = { /** * The decimal value, as a string; Refer to [Google’s Decimal type protocol buffer](https://github.com/googleapis/googleapis/blob/40203ca1880849480bbff7b8715491060bbccdf1/google/type/decimal.proto#L33) for details */ value?: string | undefined; }; /** * The fee amount charged per share of the Alternative Investment in USD. This is included in current price. */ export type PerShareFeeAmount = { /** * The decimal value, as a string; Refer to [Google’s Decimal type protocol buffer](https://github.com/googleapis/googleapis/blob/40203ca1880849480bbff7b8715491060bbccdf1/google/type/decimal.proto#L33) for details */ value?: string | undefined; }; /** * Indicates the current state of the asset record. The record state identifies which record types the asset allows. */ export enum RecordState { RecordStateUnspecified = "RECORD_STATE_UNSPECIFIED", Active = "ACTIVE", Frozen = "FROZEN", Inactive = "INACTIVE", } /** * Indicates the current state of the asset record. The record state identifies which record types the asset allows. */ export type RecordStateOpen = OpenEnum; /** * Indicates how frequently an account can redeem the asset. */ export enum RedemptionFrequency { FrequencyUnspecified = "FREQUENCY_UNSPECIFIED", Daily = "DAILY", Weekly = "WEEKLY", BiWeekly = "BI_WEEKLY", Monthly = "MONTHLY", Quarterly = "QUARTERLY", BiAnnually = "BI_ANNUALLY", Annually = "ANNUALLY", } /** * Indicates how frequently an account can redeem the asset. */ export type RedemptionFrequencyOpen = OpenEnum; /** * The asset’s state in the Apex alternative investment platform. */ export enum AlternativeInvestmentState { StateUnspecified = "STATE_UNSPECIFIED", Open = "OPEN", Closed = "CLOSED", } /** * The asset’s state in the Apex alternative investment platform. */ export type AlternativeInvestmentStateOpen = OpenEnum< typeof AlternativeInvestmentState >; /** * The asset’s strategy as specified by the issuer. */ export enum Strategy { StrategyUnspecified = "STRATEGY_UNSPECIFIED", MergerArbitrage = "MERGER_ARBITRAGE", Activist = "ACTIVIST", Macro = "MACRO", GlobalMacro = "GLOBAL_MACRO", LongShort = "LONG_SHORT", MarketNeutral = "MARKET_NEUTRAL", DedicatedShort = "DEDICATED_SHORT", FixedIncome = "FIXED_INCOME", EquityHedge = "EQUITY_HEDGE", RelativeValue = "RELATIVE_VALUE", EventDriven = "EVENT_DRIVEN", VariableEquity = "VARIABLE_EQUITY", CommodityTrading = "COMMODITY_TRADING", CtaManagedFutures = "CTA_MANAGED_FUTURES", Other = "OTHER", } /** * The asset’s strategy as specified by the issuer. */ export type StrategyOpen = OpenEnum; /** * Indicates how frequently the asset will accept subscriptions (that is, how often an account is allowed to buy the asset). */ export enum SubscriptionFrequency { FrequencyUnspecified = "FREQUENCY_UNSPECIFIED", Daily = "DAILY", Weekly = "WEEKLY", BiWeekly = "BI_WEEKLY", Monthly = "MONTHLY", Quarterly = "QUARTERLY", BiAnnually = "BI_ANNUALLY", Annually = "ANNUALLY", } /** * Indicates how frequently the asset will accept subscriptions (that is, how often an account is allowed to buy the asset). */ export type SubscriptionFrequencyOpen = OpenEnum; /** * The process used for subscriptions orders of this asset. */ export enum SubscriptionOrderProcess { SubscriptionOrderProcessUnspecified = "SUBSCRIPTION_ORDER_PROCESS_UNSPECIFIED", SettlementPostNavCalculation = "SETTLEMENT_POST_NAV_CALCULATION", SettlementPreNavCalculation = "SETTLEMENT_PRE_NAV_CALCULATION", EscrowTrade = "ESCROW_TRADE", CommitmentDrawDown = "COMMITMENT_DRAW_DOWN", } /** * The process used for subscriptions orders of this asset. */ export type SubscriptionOrderProcessOpen = OpenEnum< typeof SubscriptionOrderProcess >; /** * The asset’s tax reporting structure. */ export enum TaxReportingStructure { TaxReportingStructureUnspecified = "TAX_REPORTING_STRUCTURE_UNSPECIFIED", TaxReportingStructure1099 = "TAX_REPORTING_STRUCTURE_1099", TaxReportingStructureK1 = "TAX_REPORTING_STRUCTURE_K1", TaxReportingStructureOther = "TAX_REPORTING_STRUCTURE_OTHER", } /** * The asset’s tax reporting structure. */ export type TaxReportingStructureOpen = OpenEnum; /** * The type of alternative investment asset. */ export enum AlternativeInvestmentType { TypeUnspecified = "TYPE_UNSPECIFIED", HedgeFund = "HEDGE_FUND", FundOfFunds = "FUND_OF_FUNDS", PrivateEquityFund = "PRIVATE_EQUITY_FUND", ManagedDebtFund = "MANAGED_DEBT_FUND", PrivateDebtFund = "PRIVATE_DEBT_FUND", ManagedCurrencyFund = "MANAGED_CURRENCY_FUND", CommodityPoolFund = "COMMODITY_POOL_FUND", Reit = "REIT", ManagedFutureFund = "MANAGED_FUTURE_FUND", OtherType = "OTHER_TYPE", BusinessDevelopmentCorporation = "BUSINESS_DEVELOPMENT_CORPORATION", RegisteredHedgeFund = "REGISTERED_HEDGE_FUND", OilAndGasPublic = "OIL_AND_GAS_PUBLIC", OilAndGasPrivate = "OIL_AND_GAS_PRIVATE", EquipmentLeasingPublic = "EQUIPMENT_LEASING_PUBLIC", EquipmentLeasingPrivate = "EQUIPMENT_LEASING_PRIVATE", FuturesPublic = "FUTURES_PUBLIC", FuturesPrivate = "FUTURES_PRIVATE", NotesPublic = "NOTES_PUBLIC", NotesPrivate = "NOTES_PRIVATE", RealEstatePublic = "REAL_ESTATE_PUBLIC", RealEstatePrivate = "REAL_ESTATE_PRIVATE", ClosedEndManagementInvestmentCompany = "CLOSED_END_MANAGEMENT_INVESTMENT_COMPANY", } /** * The type of alternative investment asset. */ export type AlternativeInvestmentTypeOpen = OpenEnum< typeof AlternativeInvestmentType >; /** * An alternative investment is a financial asset that does not fall into one of the conventional investment categories. */ export type AlternativeInvestment = { /** * The ID of the alternative asset specified in the request. */ assetId?: string | undefined; /** * Indicates whether the asset allows cash distributions. If `TRUE` the alternative order request can specify `CASH` as the `distribution type`. */ cashDistributionAllowed?: boolean | undefined; /** * The current price of one unit of the asset in USD. */ currentPrice?: CurrentPrice | null | undefined; /** * The CUSIP of the asset. It is a nine-character alphanumeric identifier used to uniquely identify securities, particularly in the United States and Canada. * * @remarks * * A true CUSIP consists of: - A six-character identifier for the issuer (company, municipality, etc.). - A two-character identifier for the type of security (equity, debt, etc.) and the specific issue within the issuer. - A single check digit. * * Many alternative investments assets do not have a true CUSIP. In such cases, the system generates a synthetic CUSIP when the asset is created. */ cusip?: string | undefined; /** * A plain-text description of the asset, specified by the issuer. */ description?: string | undefined; /** * Indicates whether the asset distributes a dividend. */ dividendEnabled?: boolean | undefined; /** * Indicates whether the asset allows initial subscriptions to new investors. */ initialSubscriptionAllowed?: boolean | undefined; /** * The ISIN of the asset. It is a twelve-character alphanumeric code used to uniquely identify a security globally, as well as facilitate clearing, reporting, and settlement of trades defined by [ISO 6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number). * * @remarks * * An ISIN consists of: - A two-letter country code. - A nine-character alphanumeric security identifier (National Securities Identifying Number or NSIN). - A single check digit. * * Not all alternative investment assets have an ISIN. */ isin?: string | undefined; /** * The issuer entity of the alternative investment asset. */ issuer?: Issuer | null | undefined; /** * The Unicode CLDR region code of the issuing region (ex: US). */ issuingRegionCode?: string | undefined; /** * The maximum number of shares allowed to purchase in a single order for this asset. */ maximumSubscriptionQuantity?: number | undefined; /** * The minimum purchase amount required for an initial order of this asset. Value is in USD. */ minimumInitialSubscriptionAmount?: | MinimumInitialSubscriptionAmount | null | undefined; /** * The minimum number of shares allowed to purchase in a single order for this asset. */ minimumSubscriptionQuantity?: number | undefined; /** * The minimum purchase amount required for subsequent orders of this asset. Value is in USD. */ minimumSubsequentSubscriptionAmount?: | MinimumSubsequentSubscriptionAmount | null | undefined; /** * The system-generated resource name of the alternative investment asset. Format: assets/{asset}/alternativeInvestment Note that `{asset}` will be the `asset_id` value. */ name?: string | undefined; /** * Indicates whether non-retirement accounts (ex: individual) are eligible to hold the alternative investment asset. - If `TRUE` then non-retirement accounts are eligible to hold the asset. - If `FALSE` then non-retirement accounts are not eligible to hold the asset. */ nonRetirementEligible?: boolean | undefined; /** * The fee amount charged per share of the Alternative Investment in USD. This is included in current price. */ perShareFeeAmount?: PerShareFeeAmount | null | undefined; /** * The ID of the Pre IPO Company associated with the Alternative Investment. Not all Alternative Investments are associated with a Pre IPO Company. */ preIpoCompanyId?: string | undefined; /** * Indicates the current state of the asset record. The record state identifies which record types the asset allows. */ recordState?: RecordStateOpen | undefined; /** * Indicates whether the asset is allowed to be redeemed. */ redeemable?: boolean | undefined; /** * Indicates how frequently an account can redeem the asset. */ redemptionFrequency?: RedemptionFrequencyOpen | undefined; /** * Indicates whether the asset allows reinvestment distributions. * * @remarks * * If `TRUE` the alternative order request can specify `REINVESTMENT` as the `distribution type`. */ reinvestmentDistributionAllowed?: boolean | undefined; /** * Indicates whether retirement accounts (ex: IRA) are eligible to hold the asset. - If `TRUE` then retirement accounts are eligible to hold the asset. - If `FALSE` then retirement accounts are not eligible to hold the asset. */ retirementEligible?: boolean | undefined; /** * The asset’s designated share class. */ shareClass?: string | undefined; /** * The asset’s state in the Apex alternative investment platform. */ state?: AlternativeInvestmentStateOpen | undefined; /** * The asset’s strategy as specified by the issuer. */ strategy?: StrategyOpen | undefined; /** * Indicates how frequently the asset will accept subscriptions (that is, how often an account is allowed to buy the asset). */ subscriptionFrequency?: SubscriptionFrequencyOpen | undefined; /** * The process used for subscriptions orders of this asset. */ subscriptionOrderProcess?: SubscriptionOrderProcessOpen | undefined; /** * Indicates whether the asset allows subsequent purchase orders for existing investors. */ subsequentSubscriptionAllowed?: boolean | undefined; /** * The asset’s tax reporting structure. */ taxReportingStructure?: TaxReportingStructureOpen | undefined; /** * The name of the asset, in plain text, as specified by the issuer. */ title?: string | undefined; /** * The type of alternative investment asset. */ type?: AlternativeInvestmentTypeOpen | undefined; }; /** @internal */ export const CurrentPrice$inboundSchema: z.ZodType< CurrentPrice, z.ZodTypeDef, unknown > = z.object({ value: z.string().optional(), }); /** @internal */ export type CurrentPrice$Outbound = { value?: string | undefined; }; /** @internal */ export const CurrentPrice$outboundSchema: z.ZodType< CurrentPrice$Outbound, z.ZodTypeDef, CurrentPrice > = 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 CurrentPrice$ { /** @deprecated use `CurrentPrice$inboundSchema` instead. */ export const inboundSchema = CurrentPrice$inboundSchema; /** @deprecated use `CurrentPrice$outboundSchema` instead. */ export const outboundSchema = CurrentPrice$outboundSchema; /** @deprecated use `CurrentPrice$Outbound` instead. */ export type Outbound = CurrentPrice$Outbound; } export function currentPriceToJSON(currentPrice: CurrentPrice): string { return JSON.stringify(CurrentPrice$outboundSchema.parse(currentPrice)); } export function currentPriceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CurrentPrice$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CurrentPrice' from JSON`, ); } /** @internal */ export const AlternativeInvestmentMailingAddress$inboundSchema: z.ZodType< AlternativeInvestmentMailingAddress, z.ZodTypeDef, unknown > = z.object({ address_lines: z.array(z.string()).optional(), administrative_area: z.string().optional(), language_code: z.string().optional(), locality: z.string().optional(), organization: z.string().optional(), postal_code: z.string().optional(), recipients: z.array(z.string()).optional(), region_code: z.string().optional(), revision: z.number().int().optional(), sorting_code: z.string().optional(), sublocality: z.string().optional(), }).transform((v) => { return remap$(v, { "address_lines": "addressLines", "administrative_area": "administrativeArea", "language_code": "languageCode", "postal_code": "postalCode", "region_code": "regionCode", "sorting_code": "sortingCode", }); }); /** @internal */ export type AlternativeInvestmentMailingAddress$Outbound = { address_lines?: Array | undefined; administrative_area?: string | undefined; language_code?: string | undefined; locality?: string | undefined; organization?: string | undefined; postal_code?: string | undefined; recipients?: Array | undefined; region_code?: string | undefined; revision?: number | undefined; sorting_code?: string | undefined; sublocality?: string | undefined; }; /** @internal */ export const AlternativeInvestmentMailingAddress$outboundSchema: z.ZodType< AlternativeInvestmentMailingAddress$Outbound, z.ZodTypeDef, AlternativeInvestmentMailingAddress > = z.object({ addressLines: z.array(z.string()).optional(), administrativeArea: z.string().optional(), languageCode: z.string().optional(), locality: z.string().optional(), organization: z.string().optional(), postalCode: z.string().optional(), recipients: z.array(z.string()).optional(), regionCode: z.string().optional(), revision: z.number().int().optional(), sortingCode: z.string().optional(), sublocality: z.string().optional(), }).transform((v) => { return remap$(v, { addressLines: "address_lines", administrativeArea: "administrative_area", languageCode: "language_code", postalCode: "postal_code", regionCode: "region_code", sortingCode: "sorting_code", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AlternativeInvestmentMailingAddress$ { /** @deprecated use `AlternativeInvestmentMailingAddress$inboundSchema` instead. */ export const inboundSchema = AlternativeInvestmentMailingAddress$inboundSchema; /** @deprecated use `AlternativeInvestmentMailingAddress$outboundSchema` instead. */ export const outboundSchema = AlternativeInvestmentMailingAddress$outboundSchema; /** @deprecated use `AlternativeInvestmentMailingAddress$Outbound` instead. */ export type Outbound = AlternativeInvestmentMailingAddress$Outbound; } export function alternativeInvestmentMailingAddressToJSON( alternativeInvestmentMailingAddress: AlternativeInvestmentMailingAddress, ): string { return JSON.stringify( AlternativeInvestmentMailingAddress$outboundSchema.parse( alternativeInvestmentMailingAddress, ), ); } export function alternativeInvestmentMailingAddressFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AlternativeInvestmentMailingAddress$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AlternativeInvestmentMailingAddress' from JSON`, ); } /** @internal */ export const PhysicalAddress$inboundSchema: z.ZodType< PhysicalAddress, z.ZodTypeDef, unknown > = z.object({ address_lines: z.array(z.string()).optional(), administrative_area: z.string().optional(), language_code: z.string().optional(), locality: z.string().optional(), organization: z.string().optional(), postal_code: z.string().optional(), recipients: z.array(z.string()).optional(), region_code: z.string().optional(), revision: z.number().int().optional(), sorting_code: z.string().optional(), sublocality: z.string().optional(), }).transform((v) => { return remap$(v, { "address_lines": "addressLines", "administrative_area": "administrativeArea", "language_code": "languageCode", "postal_code": "postalCode", "region_code": "regionCode", "sorting_code": "sortingCode", }); }); /** @internal */ export type PhysicalAddress$Outbound = { address_lines?: Array | undefined; administrative_area?: string | undefined; language_code?: string | undefined; locality?: string | undefined; organization?: string | undefined; postal_code?: string | undefined; recipients?: Array | undefined; region_code?: string | undefined; revision?: number | undefined; sorting_code?: string | undefined; sublocality?: string | undefined; }; /** @internal */ export const PhysicalAddress$outboundSchema: z.ZodType< PhysicalAddress$Outbound, z.ZodTypeDef, PhysicalAddress > = z.object({ addressLines: z.array(z.string()).optional(), administrativeArea: z.string().optional(), languageCode: z.string().optional(), locality: z.string().optional(), organization: z.string().optional(), postalCode: z.string().optional(), recipients: z.array(z.string()).optional(), regionCode: z.string().optional(), revision: z.number().int().optional(), sortingCode: z.string().optional(), sublocality: z.string().optional(), }).transform((v) => { return remap$(v, { addressLines: "address_lines", administrativeArea: "administrative_area", languageCode: "language_code", postalCode: "postal_code", regionCode: "region_code", sortingCode: "sorting_code", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PhysicalAddress$ { /** @deprecated use `PhysicalAddress$inboundSchema` instead. */ export const inboundSchema = PhysicalAddress$inboundSchema; /** @deprecated use `PhysicalAddress$outboundSchema` instead. */ export const outboundSchema = PhysicalAddress$outboundSchema; /** @deprecated use `PhysicalAddress$Outbound` instead. */ export type Outbound = PhysicalAddress$Outbound; } export function physicalAddressToJSON( physicalAddress: PhysicalAddress, ): string { return JSON.stringify(PhysicalAddress$outboundSchema.parse(physicalAddress)); } export function physicalAddressFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PhysicalAddress$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PhysicalAddress' from JSON`, ); } /** @internal */ export const AlternativeInvestmentRegistrationType$inboundSchema: z.ZodType< AlternativeInvestmentRegistrationTypeOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(AlternativeInvestmentRegistrationType), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const AlternativeInvestmentRegistrationType$outboundSchema: z.ZodType< AlternativeInvestmentRegistrationTypeOpen, z.ZodTypeDef, AlternativeInvestmentRegistrationTypeOpen > = z.union([ z.nativeEnum(AlternativeInvestmentRegistrationType), z.string().and(z.custom>()), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AlternativeInvestmentRegistrationType$ { /** @deprecated use `AlternativeInvestmentRegistrationType$inboundSchema` instead. */ export const inboundSchema = AlternativeInvestmentRegistrationType$inboundSchema; /** @deprecated use `AlternativeInvestmentRegistrationType$outboundSchema` instead. */ export const outboundSchema = AlternativeInvestmentRegistrationType$outboundSchema; } /** @internal */ export const AlternativeInvestmentIssuerType$inboundSchema: z.ZodType< AlternativeInvestmentIssuerTypeOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(AlternativeInvestmentIssuerType), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const AlternativeInvestmentIssuerType$outboundSchema: z.ZodType< AlternativeInvestmentIssuerTypeOpen, z.ZodTypeDef, AlternativeInvestmentIssuerTypeOpen > = z.union([ z.nativeEnum(AlternativeInvestmentIssuerType), z.string().and(z.custom>()), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AlternativeInvestmentIssuerType$ { /** @deprecated use `AlternativeInvestmentIssuerType$inboundSchema` instead. */ export const inboundSchema = AlternativeInvestmentIssuerType$inboundSchema; /** @deprecated use `AlternativeInvestmentIssuerType$outboundSchema` instead. */ export const outboundSchema = AlternativeInvestmentIssuerType$outboundSchema; } /** @internal */ export const Issuer$inboundSchema: z.ZodType = z .object({ description: z.string().optional(), emails: z.array(z.string()).optional(), incorporated_administrative_area: z.string().optional(), incorporated_region_code: z.string().optional(), mailing_address: z.nullable( z.lazy(() => AlternativeInvestmentMailingAddress$inboundSchema), ).optional(), manager_crds: z.array(z.string()).optional(), phone_numbers: z.array(PhoneNumber$inboundSchema).optional(), physical_address: z.nullable(z.lazy(() => PhysicalAddress$inboundSchema)) .optional(), registration_type: AlternativeInvestmentRegistrationType$inboundSchema .optional(), title: z.string().optional(), type: AlternativeInvestmentIssuerType$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "incorporated_administrative_area": "incorporatedAdministrativeArea", "incorporated_region_code": "incorporatedRegionCode", "mailing_address": "mailingAddress", "manager_crds": "managerCrds", "phone_numbers": "phoneNumbers", "physical_address": "physicalAddress", "registration_type": "registrationType", }); }); /** @internal */ export type Issuer$Outbound = { description?: string | undefined; emails?: Array | undefined; incorporated_administrative_area?: string | undefined; incorporated_region_code?: string | undefined; mailing_address?: | AlternativeInvestmentMailingAddress$Outbound | null | undefined; manager_crds?: Array | undefined; phone_numbers?: Array | undefined; physical_address?: PhysicalAddress$Outbound | null | undefined; registration_type?: string | undefined; title?: string | undefined; type?: string | undefined; }; /** @internal */ export const Issuer$outboundSchema: z.ZodType< Issuer$Outbound, z.ZodTypeDef, Issuer > = z.object({ description: z.string().optional(), emails: z.array(z.string()).optional(), incorporatedAdministrativeArea: z.string().optional(), incorporatedRegionCode: z.string().optional(), mailingAddress: z.nullable( z.lazy(() => AlternativeInvestmentMailingAddress$outboundSchema), ).optional(), managerCrds: z.array(z.string()).optional(), phoneNumbers: z.array(PhoneNumber$outboundSchema).optional(), physicalAddress: z.nullable(z.lazy(() => PhysicalAddress$outboundSchema)) .optional(), registrationType: AlternativeInvestmentRegistrationType$outboundSchema .optional(), title: z.string().optional(), type: AlternativeInvestmentIssuerType$outboundSchema.optional(), }).transform((v) => { return remap$(v, { incorporatedAdministrativeArea: "incorporated_administrative_area", incorporatedRegionCode: "incorporated_region_code", mailingAddress: "mailing_address", managerCrds: "manager_crds", phoneNumbers: "phone_numbers", physicalAddress: "physical_address", registrationType: "registration_type", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Issuer$ { /** @deprecated use `Issuer$inboundSchema` instead. */ export const inboundSchema = Issuer$inboundSchema; /** @deprecated use `Issuer$outboundSchema` instead. */ export const outboundSchema = Issuer$outboundSchema; /** @deprecated use `Issuer$Outbound` instead. */ export type Outbound = Issuer$Outbound; } export function issuerToJSON(issuer: Issuer): string { return JSON.stringify(Issuer$outboundSchema.parse(issuer)); } export function issuerFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Issuer$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Issuer' from JSON`, ); } /** @internal */ export const MinimumInitialSubscriptionAmount$inboundSchema: z.ZodType< MinimumInitialSubscriptionAmount, z.ZodTypeDef, unknown > = z.object({ value: z.string().optional(), }); /** @internal */ export type MinimumInitialSubscriptionAmount$Outbound = { value?: string | undefined; }; /** @internal */ export const MinimumInitialSubscriptionAmount$outboundSchema: z.ZodType< MinimumInitialSubscriptionAmount$Outbound, z.ZodTypeDef, MinimumInitialSubscriptionAmount > = 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 MinimumInitialSubscriptionAmount$ { /** @deprecated use `MinimumInitialSubscriptionAmount$inboundSchema` instead. */ export const inboundSchema = MinimumInitialSubscriptionAmount$inboundSchema; /** @deprecated use `MinimumInitialSubscriptionAmount$outboundSchema` instead. */ export const outboundSchema = MinimumInitialSubscriptionAmount$outboundSchema; /** @deprecated use `MinimumInitialSubscriptionAmount$Outbound` instead. */ export type Outbound = MinimumInitialSubscriptionAmount$Outbound; } export function minimumInitialSubscriptionAmountToJSON( minimumInitialSubscriptionAmount: MinimumInitialSubscriptionAmount, ): string { return JSON.stringify( MinimumInitialSubscriptionAmount$outboundSchema.parse( minimumInitialSubscriptionAmount, ), ); } export function minimumInitialSubscriptionAmountFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => MinimumInitialSubscriptionAmount$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MinimumInitialSubscriptionAmount' from JSON`, ); } /** @internal */ export const MinimumSubsequentSubscriptionAmount$inboundSchema: z.ZodType< MinimumSubsequentSubscriptionAmount, z.ZodTypeDef, unknown > = z.object({ value: z.string().optional(), }); /** @internal */ export type MinimumSubsequentSubscriptionAmount$Outbound = { value?: string | undefined; }; /** @internal */ export const MinimumSubsequentSubscriptionAmount$outboundSchema: z.ZodType< MinimumSubsequentSubscriptionAmount$Outbound, z.ZodTypeDef, MinimumSubsequentSubscriptionAmount > = 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 MinimumSubsequentSubscriptionAmount$ { /** @deprecated use `MinimumSubsequentSubscriptionAmount$inboundSchema` instead. */ export const inboundSchema = MinimumSubsequentSubscriptionAmount$inboundSchema; /** @deprecated use `MinimumSubsequentSubscriptionAmount$outboundSchema` instead. */ export const outboundSchema = MinimumSubsequentSubscriptionAmount$outboundSchema; /** @deprecated use `MinimumSubsequentSubscriptionAmount$Outbound` instead. */ export type Outbound = MinimumSubsequentSubscriptionAmount$Outbound; } export function minimumSubsequentSubscriptionAmountToJSON( minimumSubsequentSubscriptionAmount: MinimumSubsequentSubscriptionAmount, ): string { return JSON.stringify( MinimumSubsequentSubscriptionAmount$outboundSchema.parse( minimumSubsequentSubscriptionAmount, ), ); } export function minimumSubsequentSubscriptionAmountFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => MinimumSubsequentSubscriptionAmount$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MinimumSubsequentSubscriptionAmount' from JSON`, ); } /** @internal */ export const PerShareFeeAmount$inboundSchema: z.ZodType< PerShareFeeAmount, z.ZodTypeDef, unknown > = z.object({ value: z.string().optional(), }); /** @internal */ export type PerShareFeeAmount$Outbound = { value?: string | undefined; }; /** @internal */ export const PerShareFeeAmount$outboundSchema: z.ZodType< PerShareFeeAmount$Outbound, z.ZodTypeDef, PerShareFeeAmount > = 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 PerShareFeeAmount$ { /** @deprecated use `PerShareFeeAmount$inboundSchema` instead. */ export const inboundSchema = PerShareFeeAmount$inboundSchema; /** @deprecated use `PerShareFeeAmount$outboundSchema` instead. */ export const outboundSchema = PerShareFeeAmount$outboundSchema; /** @deprecated use `PerShareFeeAmount$Outbound` instead. */ export type Outbound = PerShareFeeAmount$Outbound; } export function perShareFeeAmountToJSON( perShareFeeAmount: PerShareFeeAmount, ): string { return JSON.stringify( PerShareFeeAmount$outboundSchema.parse(perShareFeeAmount), ); } export function perShareFeeAmountFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PerShareFeeAmount$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PerShareFeeAmount' from JSON`, ); } /** @internal */ export const RecordState$inboundSchema: z.ZodType< RecordStateOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(RecordState), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const RecordState$outboundSchema: z.ZodType< RecordStateOpen, z.ZodTypeDef, RecordStateOpen > = z.union([ z.nativeEnum(RecordState), z.string().and(z.custom>()), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace RecordState$ { /** @deprecated use `RecordState$inboundSchema` instead. */ export const inboundSchema = RecordState$inboundSchema; /** @deprecated use `RecordState$outboundSchema` instead. */ export const outboundSchema = RecordState$outboundSchema; } /** @internal */ export const RedemptionFrequency$inboundSchema: z.ZodType< RedemptionFrequencyOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(RedemptionFrequency), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const RedemptionFrequency$outboundSchema: z.ZodType< RedemptionFrequencyOpen, z.ZodTypeDef, RedemptionFrequencyOpen > = z.union([ z.nativeEnum(RedemptionFrequency), z.string().and(z.custom>()), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace RedemptionFrequency$ { /** @deprecated use `RedemptionFrequency$inboundSchema` instead. */ export const inboundSchema = RedemptionFrequency$inboundSchema; /** @deprecated use `RedemptionFrequency$outboundSchema` instead. */ export const outboundSchema = RedemptionFrequency$outboundSchema; } /** @internal */ export const AlternativeInvestmentState$inboundSchema: z.ZodType< AlternativeInvestmentStateOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(AlternativeInvestmentState), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const AlternativeInvestmentState$outboundSchema: z.ZodType< AlternativeInvestmentStateOpen, z.ZodTypeDef, AlternativeInvestmentStateOpen > = z.union([ z.nativeEnum(AlternativeInvestmentState), z.string().and(z.custom>()), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AlternativeInvestmentState$ { /** @deprecated use `AlternativeInvestmentState$inboundSchema` instead. */ export const inboundSchema = AlternativeInvestmentState$inboundSchema; /** @deprecated use `AlternativeInvestmentState$outboundSchema` instead. */ export const outboundSchema = AlternativeInvestmentState$outboundSchema; } /** @internal */ export const Strategy$inboundSchema: z.ZodType< StrategyOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(Strategy), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const Strategy$outboundSchema: z.ZodType< StrategyOpen, z.ZodTypeDef, StrategyOpen > = z.union([ z.nativeEnum(Strategy), z.string().and(z.custom>()), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Strategy$ { /** @deprecated use `Strategy$inboundSchema` instead. */ export const inboundSchema = Strategy$inboundSchema; /** @deprecated use `Strategy$outboundSchema` instead. */ export const outboundSchema = Strategy$outboundSchema; } /** @internal */ export const SubscriptionFrequency$inboundSchema: z.ZodType< SubscriptionFrequencyOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(SubscriptionFrequency), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const SubscriptionFrequency$outboundSchema: z.ZodType< SubscriptionFrequencyOpen, z.ZodTypeDef, SubscriptionFrequencyOpen > = z.union([ z.nativeEnum(SubscriptionFrequency), z.string().and(z.custom>()), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SubscriptionFrequency$ { /** @deprecated use `SubscriptionFrequency$inboundSchema` instead. */ export const inboundSchema = SubscriptionFrequency$inboundSchema; /** @deprecated use `SubscriptionFrequency$outboundSchema` instead. */ export const outboundSchema = SubscriptionFrequency$outboundSchema; } /** @internal */ export const SubscriptionOrderProcess$inboundSchema: z.ZodType< SubscriptionOrderProcessOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(SubscriptionOrderProcess), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const SubscriptionOrderProcess$outboundSchema: z.ZodType< SubscriptionOrderProcessOpen, z.ZodTypeDef, SubscriptionOrderProcessOpen > = z.union([ z.nativeEnum(SubscriptionOrderProcess), z.string().and(z.custom>()), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SubscriptionOrderProcess$ { /** @deprecated use `SubscriptionOrderProcess$inboundSchema` instead. */ export const inboundSchema = SubscriptionOrderProcess$inboundSchema; /** @deprecated use `SubscriptionOrderProcess$outboundSchema` instead. */ export const outboundSchema = SubscriptionOrderProcess$outboundSchema; } /** @internal */ export const TaxReportingStructure$inboundSchema: z.ZodType< TaxReportingStructureOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(TaxReportingStructure), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const TaxReportingStructure$outboundSchema: z.ZodType< TaxReportingStructureOpen, z.ZodTypeDef, TaxReportingStructureOpen > = z.union([ z.nativeEnum(TaxReportingStructure), z.string().and(z.custom>()), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TaxReportingStructure$ { /** @deprecated use `TaxReportingStructure$inboundSchema` instead. */ export const inboundSchema = TaxReportingStructure$inboundSchema; /** @deprecated use `TaxReportingStructure$outboundSchema` instead. */ export const outboundSchema = TaxReportingStructure$outboundSchema; } /** @internal */ export const AlternativeInvestmentType$inboundSchema: z.ZodType< AlternativeInvestmentTypeOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(AlternativeInvestmentType), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const AlternativeInvestmentType$outboundSchema: z.ZodType< AlternativeInvestmentTypeOpen, z.ZodTypeDef, AlternativeInvestmentTypeOpen > = z.union([ z.nativeEnum(AlternativeInvestmentType), z.string().and(z.custom>()), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AlternativeInvestmentType$ { /** @deprecated use `AlternativeInvestmentType$inboundSchema` instead. */ export const inboundSchema = AlternativeInvestmentType$inboundSchema; /** @deprecated use `AlternativeInvestmentType$outboundSchema` instead. */ export const outboundSchema = AlternativeInvestmentType$outboundSchema; } /** @internal */ export const AlternativeInvestment$inboundSchema: z.ZodType< AlternativeInvestment, z.ZodTypeDef, unknown > = z.object({ asset_id: z.string().optional(), cash_distribution_allowed: z.boolean().optional(), current_price: z.nullable(z.lazy(() => CurrentPrice$inboundSchema)) .optional(), cusip: z.string().optional(), description: z.string().optional(), dividend_enabled: z.boolean().optional(), initial_subscription_allowed: z.boolean().optional(), isin: z.string().optional(), issuer: z.nullable(z.lazy(() => Issuer$inboundSchema)).optional(), issuing_region_code: z.string().optional(), maximum_subscription_quantity: z.number().int().optional(), minimum_initial_subscription_amount: z.nullable( z.lazy(() => MinimumInitialSubscriptionAmount$inboundSchema), ).optional(), minimum_subscription_quantity: z.number().int().optional(), minimum_subsequent_subscription_amount: z.nullable( z.lazy(() => MinimumSubsequentSubscriptionAmount$inboundSchema), ).optional(), name: z.string().optional(), non_retirement_eligible: z.boolean().optional(), per_share_fee_amount: z.nullable( z.lazy(() => PerShareFeeAmount$inboundSchema), ).optional(), pre_ipo_company_id: z.string().optional(), record_state: RecordState$inboundSchema.optional(), redeemable: z.boolean().optional(), redemption_frequency: RedemptionFrequency$inboundSchema.optional(), reinvestment_distribution_allowed: z.boolean().optional(), retirement_eligible: z.boolean().optional(), share_class: z.string().optional(), state: AlternativeInvestmentState$inboundSchema.optional(), strategy: Strategy$inboundSchema.optional(), subscription_frequency: SubscriptionFrequency$inboundSchema.optional(), subscription_order_process: SubscriptionOrderProcess$inboundSchema.optional(), subsequent_subscription_allowed: z.boolean().optional(), tax_reporting_structure: TaxReportingStructure$inboundSchema.optional(), title: z.string().optional(), type: AlternativeInvestmentType$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "asset_id": "assetId", "cash_distribution_allowed": "cashDistributionAllowed", "current_price": "currentPrice", "dividend_enabled": "dividendEnabled", "initial_subscription_allowed": "initialSubscriptionAllowed", "issuing_region_code": "issuingRegionCode", "maximum_subscription_quantity": "maximumSubscriptionQuantity", "minimum_initial_subscription_amount": "minimumInitialSubscriptionAmount", "minimum_subscription_quantity": "minimumSubscriptionQuantity", "minimum_subsequent_subscription_amount": "minimumSubsequentSubscriptionAmount", "non_retirement_eligible": "nonRetirementEligible", "per_share_fee_amount": "perShareFeeAmount", "pre_ipo_company_id": "preIpoCompanyId", "record_state": "recordState", "redemption_frequency": "redemptionFrequency", "reinvestment_distribution_allowed": "reinvestmentDistributionAllowed", "retirement_eligible": "retirementEligible", "share_class": "shareClass", "subscription_frequency": "subscriptionFrequency", "subscription_order_process": "subscriptionOrderProcess", "subsequent_subscription_allowed": "subsequentSubscriptionAllowed", "tax_reporting_structure": "taxReportingStructure", }); }); /** @internal */ export type AlternativeInvestment$Outbound = { asset_id?: string | undefined; cash_distribution_allowed?: boolean | undefined; current_price?: CurrentPrice$Outbound | null | undefined; cusip?: string | undefined; description?: string | undefined; dividend_enabled?: boolean | undefined; initial_subscription_allowed?: boolean | undefined; isin?: string | undefined; issuer?: Issuer$Outbound | null | undefined; issuing_region_code?: string | undefined; maximum_subscription_quantity?: number | undefined; minimum_initial_subscription_amount?: | MinimumInitialSubscriptionAmount$Outbound | null | undefined; minimum_subscription_quantity?: number | undefined; minimum_subsequent_subscription_amount?: | MinimumSubsequentSubscriptionAmount$Outbound | null | undefined; name?: string | undefined; non_retirement_eligible?: boolean | undefined; per_share_fee_amount?: PerShareFeeAmount$Outbound | null | undefined; pre_ipo_company_id?: string | undefined; record_state?: string | undefined; redeemable?: boolean | undefined; redemption_frequency?: string | undefined; reinvestment_distribution_allowed?: boolean | undefined; retirement_eligible?: boolean | undefined; share_class?: string | undefined; state?: string | undefined; strategy?: string | undefined; subscription_frequency?: string | undefined; subscription_order_process?: string | undefined; subsequent_subscription_allowed?: boolean | undefined; tax_reporting_structure?: string | undefined; title?: string | undefined; type?: string | undefined; }; /** @internal */ export const AlternativeInvestment$outboundSchema: z.ZodType< AlternativeInvestment$Outbound, z.ZodTypeDef, AlternativeInvestment > = z.object({ assetId: z.string().optional(), cashDistributionAllowed: z.boolean().optional(), currentPrice: z.nullable(z.lazy(() => CurrentPrice$outboundSchema)) .optional(), cusip: z.string().optional(), description: z.string().optional(), dividendEnabled: z.boolean().optional(), initialSubscriptionAllowed: z.boolean().optional(), isin: z.string().optional(), issuer: z.nullable(z.lazy(() => Issuer$outboundSchema)).optional(), issuingRegionCode: z.string().optional(), maximumSubscriptionQuantity: z.number().int().optional(), minimumInitialSubscriptionAmount: z.nullable( z.lazy(() => MinimumInitialSubscriptionAmount$outboundSchema), ).optional(), minimumSubscriptionQuantity: z.number().int().optional(), minimumSubsequentSubscriptionAmount: z.nullable( z.lazy(() => MinimumSubsequentSubscriptionAmount$outboundSchema), ).optional(), name: z.string().optional(), nonRetirementEligible: z.boolean().optional(), perShareFeeAmount: z.nullable(z.lazy(() => PerShareFeeAmount$outboundSchema)) .optional(), preIpoCompanyId: z.string().optional(), recordState: RecordState$outboundSchema.optional(), redeemable: z.boolean().optional(), redemptionFrequency: RedemptionFrequency$outboundSchema.optional(), reinvestmentDistributionAllowed: z.boolean().optional(), retirementEligible: z.boolean().optional(), shareClass: z.string().optional(), state: AlternativeInvestmentState$outboundSchema.optional(), strategy: Strategy$outboundSchema.optional(), subscriptionFrequency: SubscriptionFrequency$outboundSchema.optional(), subscriptionOrderProcess: SubscriptionOrderProcess$outboundSchema.optional(), subsequentSubscriptionAllowed: z.boolean().optional(), taxReportingStructure: TaxReportingStructure$outboundSchema.optional(), title: z.string().optional(), type: AlternativeInvestmentType$outboundSchema.optional(), }).transform((v) => { return remap$(v, { assetId: "asset_id", cashDistributionAllowed: "cash_distribution_allowed", currentPrice: "current_price", dividendEnabled: "dividend_enabled", initialSubscriptionAllowed: "initial_subscription_allowed", issuingRegionCode: "issuing_region_code", maximumSubscriptionQuantity: "maximum_subscription_quantity", minimumInitialSubscriptionAmount: "minimum_initial_subscription_amount", minimumSubscriptionQuantity: "minimum_subscription_quantity", minimumSubsequentSubscriptionAmount: "minimum_subsequent_subscription_amount", nonRetirementEligible: "non_retirement_eligible", perShareFeeAmount: "per_share_fee_amount", preIpoCompanyId: "pre_ipo_company_id", recordState: "record_state", redemptionFrequency: "redemption_frequency", reinvestmentDistributionAllowed: "reinvestment_distribution_allowed", retirementEligible: "retirement_eligible", shareClass: "share_class", subscriptionFrequency: "subscription_frequency", subscriptionOrderProcess: "subscription_order_process", subsequentSubscriptionAllowed: "subsequent_subscription_allowed", taxReportingStructure: "tax_reporting_structure", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AlternativeInvestment$ { /** @deprecated use `AlternativeInvestment$inboundSchema` instead. */ export const inboundSchema = AlternativeInvestment$inboundSchema; /** @deprecated use `AlternativeInvestment$outboundSchema` instead. */ export const outboundSchema = AlternativeInvestment$outboundSchema; /** @deprecated use `AlternativeInvestment$Outbound` instead. */ export type Outbound = AlternativeInvestment$Outbound; } export function alternativeInvestmentToJSON( alternativeInvestment: AlternativeInvestment, ): string { return JSON.stringify( AlternativeInvestment$outboundSchema.parse(alternativeInvestment), ); } export function alternativeInvestmentFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AlternativeInvestment$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AlternativeInvestment' from JSON`, ); }