/* * 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"; /** * The amount of the transfer being deposited into the customer's account in USD */ export type IctDepositAmount = { /** * 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 name of the program the ICT deposit is associated with */ export enum IctDepositProgram { IctProgramUnspecified = "ICT_PROGRAM_UNSPECIFIED", BrokerPartner = "BROKER_PARTNER", DepositOnly = "DEPOSIT_ONLY", BankingPartner = "BANKING_PARTNER", MoneyTransmitter = "MONEY_TRANSMITTER", WithdrawalOnly = "WITHDRAWAL_ONLY", DigitalPartner = "DIGITAL_PARTNER", } /** * The name of the program the ICT deposit is associated with */ export type IctDepositProgramOpen = OpenEnum; /** * The type of retirement contribution. */ export enum IctDepositType { TypeUnspecified = "TYPE_UNSPECIFIED", Regular = "REGULAR", Employee = "EMPLOYEE", Employer = "EMPLOYER", Recharacterization = "RECHARACTERIZATION", Rollover60Day = "ROLLOVER_60_DAY", RolloverDirect = "ROLLOVER_DIRECT", Transfer = "TRANSFER", TrusteeFee = "TRUSTEE_FEE", Conversion = "CONVERSION", Repayment = "REPAYMENT", ContributionNonReportable = "CONTRIBUTION_NON_REPORTABLE", } /** * The type of retirement contribution. */ export type IctDepositTypeOpen = OpenEnum; /** * Retirement contribution details for deposit to retirement account */ export type IctDepositRetirementContribution = { /** * Tax year for which the contribution is applied. Current year is always valid; prior year is only valid before tax deadline. Must be in "YYYY" format. */ taxYear?: number | undefined; /** * The type of retirement contribution. */ type?: IctDepositTypeOpen | undefined; }; /** * The high level state of a transfer, one of: * * @remarks * - `PROCESSING` - The transfer is being processed and will be posted if successful. * - `PENDING_REVIEW` - The transfer is pending review and will continue processing if approved. * - `POSTED` - The transfer has been posted to the ledger and will be completed at the end of the processing window if not canceled first. * - `COMPLETED` - The transfer has been batched and completed. * - `REJECTED` - The transfer was rejected. * - `CANCELED` - The transfer was canceled. * - `RETURNED` - The transfer was returned. * - `POSTPONED` - The transfer is postponed and will resume processing during the next processing window. */ export enum IctDepositStateState { StateUnspecified = "STATE_UNSPECIFIED", Processing = "PROCESSING", PendingReview = "PENDING_REVIEW", Posted = "POSTED", Completed = "COMPLETED", Rejected = "REJECTED", Canceled = "CANCELED", Returned = "RETURNED", Postponed = "POSTPONED", } /** * The high level state of a transfer, one of: * * @remarks * - `PROCESSING` - The transfer is being processed and will be posted if successful. * - `PENDING_REVIEW` - The transfer is pending review and will continue processing if approved. * - `POSTED` - The transfer has been posted to the ledger and will be completed at the end of the processing window if not canceled first. * - `COMPLETED` - The transfer has been batched and completed. * - `REJECTED` - The transfer was rejected. * - `CANCELED` - The transfer was canceled. * - `RETURNED` - The transfer was returned. * - `POSTPONED` - The transfer is postponed and will resume processing during the next processing window. */ export type IctDepositStateStateOpen = OpenEnum; /** * The state of the ICT deposit */ export type IctDepositState = { /** * The user or service that triggered the state update. */ actor?: string | undefined; /** * Additional description of the transfer state. */ message?: string | undefined; /** * Additional metadata relating to the transfer state. Included data depends on the state, e.g.: * * @remarks * - Rejection reasons are included when the `state` is `REJECTED` * - Reason and comment are included when `state` is `CANCELED` */ metadata?: { [k: string]: any } | null | undefined; /** * The high level state of a transfer, one of: * * @remarks * - `PROCESSING` - The transfer is being processed and will be posted if successful. * - `PENDING_REVIEW` - The transfer is pending review and will continue processing if approved. * - `POSTED` - The transfer has been posted to the ledger and will be completed at the end of the processing window if not canceled first. * - `COMPLETED` - The transfer has been batched and completed. * - `REJECTED` - The transfer was rejected. * - `CANCELED` - The transfer was canceled. * - `RETURNED` - The transfer was returned. * - `POSTPONED` - The transfer is postponed and will resume processing during the next processing window. */ state?: IctDepositStateStateOpen | undefined; /** * The time of the state update. */ updateTime?: Date | null | undefined; }; /** * The high level state of a transfer, one of: * * @remarks * - `PROCESSING` - The transfer is being processed and will be posted if successful. * - `PENDING_REVIEW` - The transfer is pending review and will continue processing if approved. * - `POSTED` - The transfer has been posted to the ledger and will be completed at the end of the processing window if not canceled first. * - `COMPLETED` - The transfer has been batched and completed. * - `REJECTED` - The transfer was rejected. * - `CANCELED` - The transfer was canceled. * - `RETURNED` - The transfer was returned. * - `POSTPONED` - The transfer is postponed and will resume processing during the next processing window. */ export enum IctDepositTransferStateState { StateUnspecified = "STATE_UNSPECIFIED", Processing = "PROCESSING", PendingReview = "PENDING_REVIEW", Posted = "POSTED", Completed = "COMPLETED", Rejected = "REJECTED", Canceled = "CANCELED", Returned = "RETURNED", Postponed = "POSTPONED", } /** * The high level state of a transfer, one of: * * @remarks * - `PROCESSING` - The transfer is being processed and will be posted if successful. * - `PENDING_REVIEW` - The transfer is pending review and will continue processing if approved. * - `POSTED` - The transfer has been posted to the ledger and will be completed at the end of the processing window if not canceled first. * - `COMPLETED` - The transfer has been batched and completed. * - `REJECTED` - The transfer was rejected. * - `CANCELED` - The transfer was canceled. * - `RETURNED` - The transfer was returned. * - `POSTPONED` - The transfer is postponed and will resume processing during the next processing window. */ export type IctDepositTransferStateStateOpen = OpenEnum< typeof IctDepositTransferStateState >; /** * Deprecated: use state instead * * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible. */ export type TransferState = { /** * The user or service that triggered the state update. */ actor?: string | undefined; /** * Additional description of the transfer state. */ message?: string | undefined; /** * Additional metadata relating to the transfer state. Included data depends on the state, e.g.: * * @remarks * - Rejection reasons are included when the `state` is `REJECTED` * - Reason and comment are included when `state` is `CANCELED` */ metadata?: { [k: string]: any } | null | undefined; /** * The high level state of a transfer, one of: * * @remarks * - `PROCESSING` - The transfer is being processed and will be posted if successful. * - `PENDING_REVIEW` - The transfer is pending review and will continue processing if approved. * - `POSTED` - The transfer has been posted to the ledger and will be completed at the end of the processing window if not canceled first. * - `COMPLETED` - The transfer has been batched and completed. * - `REJECTED` - The transfer was rejected. * - `CANCELED` - The transfer was canceled. * - `RETURNED` - The transfer was returned. * - `POSTPONED` - The transfer is postponed and will resume processing during the next processing window. */ state?: IctDepositTransferStateStateOpen | undefined; /** * The time of the state update. */ updateTime?: Date | null | undefined; }; /** * The address of the entity */ export type IctDepositTravelRuleEntityOriginatingPartyAddress = { /** * 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; }; /** * An entity originating party */ export type EntityOriginatingParty = { /** * The address of the entity */ address?: | IctDepositTravelRuleEntityOriginatingPartyAddress | null | undefined; /** * The tax identification number of the entity */ taxId?: string | undefined; /** * The name of the entity */ title?: string | undefined; }; /** * The address of the entity */ export type IctDepositAddress = { /** * 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; }; /** * An entity recipient party */ export type EntityRecipientParty = { /** * The address of the entity */ address?: IctDepositAddress | null | undefined; /** * The tax identification number of the entity */ taxId?: string | undefined; /** * The name of the entity */ title?: string | undefined; }; /** * The address of the party */ export type IctDepositTravelRuleAddress = { /** * 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; }; /** * An individual originating party */ export type IndividualOriginatingParty = { /** * The address of the party */ address?: IctDepositTravelRuleAddress | null | undefined; /** * The last name of the party */ familyName?: string | undefined; /** * The first name of the party as well as any non-primary given names (e.g. middle names) */ givenNames?: Array | undefined; }; /** * The address of the party */ export type IctDepositTravelRuleIndividualRecipientPartyAddress = { /** * 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; }; /** * An individual recipient party */ export type IndividualRecipientParty = { /** * The address of the party */ address?: | IctDepositTravelRuleIndividualRecipientPartyAddress | null | undefined; /** * The last name of the party */ familyName?: string | undefined; /** * The first name of the party as well as any non-primary given names (e.g. middle names) */ givenNames?: Array | undefined; }; /** * The name of the external financial institution and account that is the source of the funds */ export type OriginatingInstitution = { /** * Account id at institution */ accountId?: string | undefined; /** * Name of the institution */ title?: string | undefined; }; /** * The name and account id of institution receiving the funds. Always 'Apex Clearing' and investor account id for ICT deposits; */ export type RecipientInstitution = { /** * Account id at institution */ accountId?: string | undefined; /** * Name of the institution */ title?: string | undefined; }; /** * The travel rule information for the ICT deposit */ export type TravelRule = { /** * An entity originating party */ entityOriginatingParty?: EntityOriginatingParty | null | undefined; /** * An entity recipient party */ entityRecipientParty?: EntityRecipientParty | null | undefined; /** * An individual originating party */ individualOriginatingParty?: IndividualOriginatingParty | null | undefined; /** * An individual recipient party */ individualRecipientParty?: IndividualRecipientParty | null | undefined; /** * The name of the external financial institution and account that is the source of the funds */ originatingInstitution?: OriginatingInstitution | null | undefined; /** * The name and account id of institution receiving the funds. Always 'Apex Clearing' and investor account id for ICT deposits; */ recipientInstitution?: RecipientInstitution | null | undefined; }; /** * An Instant Cash Transfer. Funds are moved from a configured Firm account to a customer's brokerage account. */ export type IctDeposit = { /** * The amount of the transfer being deposited into the customer's account in USD */ amount?: IctDepositAmount | null | undefined; /** * External identifier supplied by the API caller. Each request must have a unique pairing of client_transfer_id and account. */ clientTransferId?: string | undefined; /** * Full name of the ICT deposit resource, which contains account id and ICT deposit id */ name?: string | undefined; /** * The name of the program the ICT deposit is associated with */ program?: IctDepositProgramOpen | undefined; /** * Retirement contribution details for deposit to retirement account */ retirementContribution?: IctDepositRetirementContribution | null | undefined; /** * The state of the ICT deposit */ state?: IctDepositState | null | undefined; /** * Deprecated: use state instead * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ transferState?: TransferState | null | undefined; /** * The travel rule information for the ICT deposit */ travelRule?: TravelRule | null | undefined; }; /** @internal */ export const IctDepositAmount$inboundSchema: z.ZodType< IctDepositAmount, z.ZodTypeDef, unknown > = z.object({ value: z.string().optional(), }); /** @internal */ export type IctDepositAmount$Outbound = { value?: string | undefined; }; /** @internal */ export const IctDepositAmount$outboundSchema: z.ZodType< IctDepositAmount$Outbound, z.ZodTypeDef, IctDepositAmount > = 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 IctDepositAmount$ { /** @deprecated use `IctDepositAmount$inboundSchema` instead. */ export const inboundSchema = IctDepositAmount$inboundSchema; /** @deprecated use `IctDepositAmount$outboundSchema` instead. */ export const outboundSchema = IctDepositAmount$outboundSchema; /** @deprecated use `IctDepositAmount$Outbound` instead. */ export type Outbound = IctDepositAmount$Outbound; } export function ictDepositAmountToJSON( ictDepositAmount: IctDepositAmount, ): string { return JSON.stringify( IctDepositAmount$outboundSchema.parse(ictDepositAmount), ); } export function ictDepositAmountFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IctDepositAmount$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IctDepositAmount' from JSON`, ); } /** @internal */ export const IctDepositProgram$inboundSchema: z.ZodType< IctDepositProgramOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(IctDepositProgram), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const IctDepositProgram$outboundSchema: z.ZodType< IctDepositProgramOpen, z.ZodTypeDef, IctDepositProgramOpen > = z.union([ z.nativeEnum(IctDepositProgram), 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 IctDepositProgram$ { /** @deprecated use `IctDepositProgram$inboundSchema` instead. */ export const inboundSchema = IctDepositProgram$inboundSchema; /** @deprecated use `IctDepositProgram$outboundSchema` instead. */ export const outboundSchema = IctDepositProgram$outboundSchema; } /** @internal */ export const IctDepositType$inboundSchema: z.ZodType< IctDepositTypeOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(IctDepositType), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const IctDepositType$outboundSchema: z.ZodType< IctDepositTypeOpen, z.ZodTypeDef, IctDepositTypeOpen > = z.union([ z.nativeEnum(IctDepositType), 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 IctDepositType$ { /** @deprecated use `IctDepositType$inboundSchema` instead. */ export const inboundSchema = IctDepositType$inboundSchema; /** @deprecated use `IctDepositType$outboundSchema` instead. */ export const outboundSchema = IctDepositType$outboundSchema; } /** @internal */ export const IctDepositRetirementContribution$inboundSchema: z.ZodType< IctDepositRetirementContribution, z.ZodTypeDef, unknown > = z.object({ tax_year: z.number().int().optional(), type: IctDepositType$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "tax_year": "taxYear", }); }); /** @internal */ export type IctDepositRetirementContribution$Outbound = { tax_year?: number | undefined; type?: string | undefined; }; /** @internal */ export const IctDepositRetirementContribution$outboundSchema: z.ZodType< IctDepositRetirementContribution$Outbound, z.ZodTypeDef, IctDepositRetirementContribution > = z.object({ taxYear: z.number().int().optional(), type: IctDepositType$outboundSchema.optional(), }).transform((v) => { return remap$(v, { taxYear: "tax_year", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IctDepositRetirementContribution$ { /** @deprecated use `IctDepositRetirementContribution$inboundSchema` instead. */ export const inboundSchema = IctDepositRetirementContribution$inboundSchema; /** @deprecated use `IctDepositRetirementContribution$outboundSchema` instead. */ export const outboundSchema = IctDepositRetirementContribution$outboundSchema; /** @deprecated use `IctDepositRetirementContribution$Outbound` instead. */ export type Outbound = IctDepositRetirementContribution$Outbound; } export function ictDepositRetirementContributionToJSON( ictDepositRetirementContribution: IctDepositRetirementContribution, ): string { return JSON.stringify( IctDepositRetirementContribution$outboundSchema.parse( ictDepositRetirementContribution, ), ); } export function ictDepositRetirementContributionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IctDepositRetirementContribution$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IctDepositRetirementContribution' from JSON`, ); } /** @internal */ export const IctDepositStateState$inboundSchema: z.ZodType< IctDepositStateStateOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(IctDepositStateState), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const IctDepositStateState$outboundSchema: z.ZodType< IctDepositStateStateOpen, z.ZodTypeDef, IctDepositStateStateOpen > = z.union([ z.nativeEnum(IctDepositStateState), 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 IctDepositStateState$ { /** @deprecated use `IctDepositStateState$inboundSchema` instead. */ export const inboundSchema = IctDepositStateState$inboundSchema; /** @deprecated use `IctDepositStateState$outboundSchema` instead. */ export const outboundSchema = IctDepositStateState$outboundSchema; } /** @internal */ export const IctDepositState$inboundSchema: z.ZodType< IctDepositState, z.ZodTypeDef, unknown > = z.object({ actor: z.string().optional(), message: z.string().optional(), metadata: z.nullable(z.record(z.any())).optional(), state: IctDepositStateState$inboundSchema.optional(), update_time: z.nullable( z.string().datetime({ offset: true }).transform(v => new Date(v)), ).optional(), }).transform((v) => { return remap$(v, { "update_time": "updateTime", }); }); /** @internal */ export type IctDepositState$Outbound = { actor?: string | undefined; message?: string | undefined; metadata?: { [k: string]: any } | null | undefined; state?: string | undefined; update_time?: string | null | undefined; }; /** @internal */ export const IctDepositState$outboundSchema: z.ZodType< IctDepositState$Outbound, z.ZodTypeDef, IctDepositState > = z.object({ actor: z.string().optional(), message: z.string().optional(), metadata: z.nullable(z.record(z.any())).optional(), state: IctDepositStateState$outboundSchema.optional(), updateTime: z.nullable(z.date().transform(v => v.toISOString())).optional(), }).transform((v) => { return remap$(v, { updateTime: "update_time", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IctDepositState$ { /** @deprecated use `IctDepositState$inboundSchema` instead. */ export const inboundSchema = IctDepositState$inboundSchema; /** @deprecated use `IctDepositState$outboundSchema` instead. */ export const outboundSchema = IctDepositState$outboundSchema; /** @deprecated use `IctDepositState$Outbound` instead. */ export type Outbound = IctDepositState$Outbound; } export function ictDepositStateToJSON( ictDepositState: IctDepositState, ): string { return JSON.stringify(IctDepositState$outboundSchema.parse(ictDepositState)); } export function ictDepositStateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IctDepositState$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IctDepositState' from JSON`, ); } /** @internal */ export const IctDepositTransferStateState$inboundSchema: z.ZodType< IctDepositTransferStateStateOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(IctDepositTransferStateState), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const IctDepositTransferStateState$outboundSchema: z.ZodType< IctDepositTransferStateStateOpen, z.ZodTypeDef, IctDepositTransferStateStateOpen > = z.union([ z.nativeEnum(IctDepositTransferStateState), 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 IctDepositTransferStateState$ { /** @deprecated use `IctDepositTransferStateState$inboundSchema` instead. */ export const inboundSchema = IctDepositTransferStateState$inboundSchema; /** @deprecated use `IctDepositTransferStateState$outboundSchema` instead. */ export const outboundSchema = IctDepositTransferStateState$outboundSchema; } /** @internal */ export const TransferState$inboundSchema: z.ZodType< TransferState, z.ZodTypeDef, unknown > = z.object({ actor: z.string().optional(), message: z.string().optional(), metadata: z.nullable(z.record(z.any())).optional(), state: IctDepositTransferStateState$inboundSchema.optional(), update_time: z.nullable( z.string().datetime({ offset: true }).transform(v => new Date(v)), ).optional(), }).transform((v) => { return remap$(v, { "update_time": "updateTime", }); }); /** @internal */ export type TransferState$Outbound = { actor?: string | undefined; message?: string | undefined; metadata?: { [k: string]: any } | null | undefined; state?: string | undefined; update_time?: string | null | undefined; }; /** @internal */ export const TransferState$outboundSchema: z.ZodType< TransferState$Outbound, z.ZodTypeDef, TransferState > = z.object({ actor: z.string().optional(), message: z.string().optional(), metadata: z.nullable(z.record(z.any())).optional(), state: IctDepositTransferStateState$outboundSchema.optional(), updateTime: z.nullable(z.date().transform(v => v.toISOString())).optional(), }).transform((v) => { return remap$(v, { updateTime: "update_time", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TransferState$ { /** @deprecated use `TransferState$inboundSchema` instead. */ export const inboundSchema = TransferState$inboundSchema; /** @deprecated use `TransferState$outboundSchema` instead. */ export const outboundSchema = TransferState$outboundSchema; /** @deprecated use `TransferState$Outbound` instead. */ export type Outbound = TransferState$Outbound; } export function transferStateToJSON(transferState: TransferState): string { return JSON.stringify(TransferState$outboundSchema.parse(transferState)); } export function transferStateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TransferState$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TransferState' from JSON`, ); } /** @internal */ export const IctDepositTravelRuleEntityOriginatingPartyAddress$inboundSchema: z.ZodType< IctDepositTravelRuleEntityOriginatingPartyAddress, 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 IctDepositTravelRuleEntityOriginatingPartyAddress$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 IctDepositTravelRuleEntityOriginatingPartyAddress$outboundSchema: z.ZodType< IctDepositTravelRuleEntityOriginatingPartyAddress$Outbound, z.ZodTypeDef, IctDepositTravelRuleEntityOriginatingPartyAddress > = 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 IctDepositTravelRuleEntityOriginatingPartyAddress$ { /** @deprecated use `IctDepositTravelRuleEntityOriginatingPartyAddress$inboundSchema` instead. */ export const inboundSchema = IctDepositTravelRuleEntityOriginatingPartyAddress$inboundSchema; /** @deprecated use `IctDepositTravelRuleEntityOriginatingPartyAddress$outboundSchema` instead. */ export const outboundSchema = IctDepositTravelRuleEntityOriginatingPartyAddress$outboundSchema; /** @deprecated use `IctDepositTravelRuleEntityOriginatingPartyAddress$Outbound` instead. */ export type Outbound = IctDepositTravelRuleEntityOriginatingPartyAddress$Outbound; } export function ictDepositTravelRuleEntityOriginatingPartyAddressToJSON( ictDepositTravelRuleEntityOriginatingPartyAddress: IctDepositTravelRuleEntityOriginatingPartyAddress, ): string { return JSON.stringify( IctDepositTravelRuleEntityOriginatingPartyAddress$outboundSchema.parse( ictDepositTravelRuleEntityOriginatingPartyAddress, ), ); } export function ictDepositTravelRuleEntityOriginatingPartyAddressFromJSON( jsonString: string, ): SafeParseResult< IctDepositTravelRuleEntityOriginatingPartyAddress, SDKValidationError > { return safeParse( jsonString, (x) => IctDepositTravelRuleEntityOriginatingPartyAddress$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'IctDepositTravelRuleEntityOriginatingPartyAddress' from JSON`, ); } /** @internal */ export const EntityOriginatingParty$inboundSchema: z.ZodType< EntityOriginatingParty, z.ZodTypeDef, unknown > = z.object({ address: z.nullable( z.lazy(() => IctDepositTravelRuleEntityOriginatingPartyAddress$inboundSchema ), ).optional(), tax_id: z.string().optional(), title: z.string().optional(), }).transform((v) => { return remap$(v, { "tax_id": "taxId", }); }); /** @internal */ export type EntityOriginatingParty$Outbound = { address?: | IctDepositTravelRuleEntityOriginatingPartyAddress$Outbound | null | undefined; tax_id?: string | undefined; title?: string | undefined; }; /** @internal */ export const EntityOriginatingParty$outboundSchema: z.ZodType< EntityOriginatingParty$Outbound, z.ZodTypeDef, EntityOriginatingParty > = z.object({ address: z.nullable( z.lazy(() => IctDepositTravelRuleEntityOriginatingPartyAddress$outboundSchema ), ).optional(), taxId: z.string().optional(), title: z.string().optional(), }).transform((v) => { return remap$(v, { taxId: "tax_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace EntityOriginatingParty$ { /** @deprecated use `EntityOriginatingParty$inboundSchema` instead. */ export const inboundSchema = EntityOriginatingParty$inboundSchema; /** @deprecated use `EntityOriginatingParty$outboundSchema` instead. */ export const outboundSchema = EntityOriginatingParty$outboundSchema; /** @deprecated use `EntityOriginatingParty$Outbound` instead. */ export type Outbound = EntityOriginatingParty$Outbound; } export function entityOriginatingPartyToJSON( entityOriginatingParty: EntityOriginatingParty, ): string { return JSON.stringify( EntityOriginatingParty$outboundSchema.parse(entityOriginatingParty), ); } export function entityOriginatingPartyFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => EntityOriginatingParty$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EntityOriginatingParty' from JSON`, ); } /** @internal */ export const IctDepositAddress$inboundSchema: z.ZodType< IctDepositAddress, 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 IctDepositAddress$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 IctDepositAddress$outboundSchema: z.ZodType< IctDepositAddress$Outbound, z.ZodTypeDef, IctDepositAddress > = 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 IctDepositAddress$ { /** @deprecated use `IctDepositAddress$inboundSchema` instead. */ export const inboundSchema = IctDepositAddress$inboundSchema; /** @deprecated use `IctDepositAddress$outboundSchema` instead. */ export const outboundSchema = IctDepositAddress$outboundSchema; /** @deprecated use `IctDepositAddress$Outbound` instead. */ export type Outbound = IctDepositAddress$Outbound; } export function ictDepositAddressToJSON( ictDepositAddress: IctDepositAddress, ): string { return JSON.stringify( IctDepositAddress$outboundSchema.parse(ictDepositAddress), ); } export function ictDepositAddressFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IctDepositAddress$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IctDepositAddress' from JSON`, ); } /** @internal */ export const EntityRecipientParty$inboundSchema: z.ZodType< EntityRecipientParty, z.ZodTypeDef, unknown > = z.object({ address: z.nullable(z.lazy(() => IctDepositAddress$inboundSchema)).optional(), tax_id: z.string().optional(), title: z.string().optional(), }).transform((v) => { return remap$(v, { "tax_id": "taxId", }); }); /** @internal */ export type EntityRecipientParty$Outbound = { address?: IctDepositAddress$Outbound | null | undefined; tax_id?: string | undefined; title?: string | undefined; }; /** @internal */ export const EntityRecipientParty$outboundSchema: z.ZodType< EntityRecipientParty$Outbound, z.ZodTypeDef, EntityRecipientParty > = z.object({ address: z.nullable(z.lazy(() => IctDepositAddress$outboundSchema)) .optional(), taxId: z.string().optional(), title: z.string().optional(), }).transform((v) => { return remap$(v, { taxId: "tax_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace EntityRecipientParty$ { /** @deprecated use `EntityRecipientParty$inboundSchema` instead. */ export const inboundSchema = EntityRecipientParty$inboundSchema; /** @deprecated use `EntityRecipientParty$outboundSchema` instead. */ export const outboundSchema = EntityRecipientParty$outboundSchema; /** @deprecated use `EntityRecipientParty$Outbound` instead. */ export type Outbound = EntityRecipientParty$Outbound; } export function entityRecipientPartyToJSON( entityRecipientParty: EntityRecipientParty, ): string { return JSON.stringify( EntityRecipientParty$outboundSchema.parse(entityRecipientParty), ); } export function entityRecipientPartyFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => EntityRecipientParty$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EntityRecipientParty' from JSON`, ); } /** @internal */ export const IctDepositTravelRuleAddress$inboundSchema: z.ZodType< IctDepositTravelRuleAddress, 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 IctDepositTravelRuleAddress$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 IctDepositTravelRuleAddress$outboundSchema: z.ZodType< IctDepositTravelRuleAddress$Outbound, z.ZodTypeDef, IctDepositTravelRuleAddress > = 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 IctDepositTravelRuleAddress$ { /** @deprecated use `IctDepositTravelRuleAddress$inboundSchema` instead. */ export const inboundSchema = IctDepositTravelRuleAddress$inboundSchema; /** @deprecated use `IctDepositTravelRuleAddress$outboundSchema` instead. */ export const outboundSchema = IctDepositTravelRuleAddress$outboundSchema; /** @deprecated use `IctDepositTravelRuleAddress$Outbound` instead. */ export type Outbound = IctDepositTravelRuleAddress$Outbound; } export function ictDepositTravelRuleAddressToJSON( ictDepositTravelRuleAddress: IctDepositTravelRuleAddress, ): string { return JSON.stringify( IctDepositTravelRuleAddress$outboundSchema.parse( ictDepositTravelRuleAddress, ), ); } export function ictDepositTravelRuleAddressFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IctDepositTravelRuleAddress$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IctDepositTravelRuleAddress' from JSON`, ); } /** @internal */ export const IndividualOriginatingParty$inboundSchema: z.ZodType< IndividualOriginatingParty, z.ZodTypeDef, unknown > = z.object({ address: z.nullable(z.lazy(() => IctDepositTravelRuleAddress$inboundSchema)) .optional(), family_name: z.string().optional(), given_names: z.array(z.string()).optional(), }).transform((v) => { return remap$(v, { "family_name": "familyName", "given_names": "givenNames", }); }); /** @internal */ export type IndividualOriginatingParty$Outbound = { address?: IctDepositTravelRuleAddress$Outbound | null | undefined; family_name?: string | undefined; given_names?: Array | undefined; }; /** @internal */ export const IndividualOriginatingParty$outboundSchema: z.ZodType< IndividualOriginatingParty$Outbound, z.ZodTypeDef, IndividualOriginatingParty > = z.object({ address: z.nullable(z.lazy(() => IctDepositTravelRuleAddress$outboundSchema)) .optional(), familyName: z.string().optional(), givenNames: z.array(z.string()).optional(), }).transform((v) => { return remap$(v, { familyName: "family_name", givenNames: "given_names", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IndividualOriginatingParty$ { /** @deprecated use `IndividualOriginatingParty$inboundSchema` instead. */ export const inboundSchema = IndividualOriginatingParty$inboundSchema; /** @deprecated use `IndividualOriginatingParty$outboundSchema` instead. */ export const outboundSchema = IndividualOriginatingParty$outboundSchema; /** @deprecated use `IndividualOriginatingParty$Outbound` instead. */ export type Outbound = IndividualOriginatingParty$Outbound; } export function individualOriginatingPartyToJSON( individualOriginatingParty: IndividualOriginatingParty, ): string { return JSON.stringify( IndividualOriginatingParty$outboundSchema.parse(individualOriginatingParty), ); } export function individualOriginatingPartyFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IndividualOriginatingParty$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IndividualOriginatingParty' from JSON`, ); } /** @internal */ export const IctDepositTravelRuleIndividualRecipientPartyAddress$inboundSchema: z.ZodType< IctDepositTravelRuleIndividualRecipientPartyAddress, 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 IctDepositTravelRuleIndividualRecipientPartyAddress$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 IctDepositTravelRuleIndividualRecipientPartyAddress$outboundSchema: z.ZodType< IctDepositTravelRuleIndividualRecipientPartyAddress$Outbound, z.ZodTypeDef, IctDepositTravelRuleIndividualRecipientPartyAddress > = 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 IctDepositTravelRuleIndividualRecipientPartyAddress$ { /** @deprecated use `IctDepositTravelRuleIndividualRecipientPartyAddress$inboundSchema` instead. */ export const inboundSchema = IctDepositTravelRuleIndividualRecipientPartyAddress$inboundSchema; /** @deprecated use `IctDepositTravelRuleIndividualRecipientPartyAddress$outboundSchema` instead. */ export const outboundSchema = IctDepositTravelRuleIndividualRecipientPartyAddress$outboundSchema; /** @deprecated use `IctDepositTravelRuleIndividualRecipientPartyAddress$Outbound` instead. */ export type Outbound = IctDepositTravelRuleIndividualRecipientPartyAddress$Outbound; } export function ictDepositTravelRuleIndividualRecipientPartyAddressToJSON( ictDepositTravelRuleIndividualRecipientPartyAddress: IctDepositTravelRuleIndividualRecipientPartyAddress, ): string { return JSON.stringify( IctDepositTravelRuleIndividualRecipientPartyAddress$outboundSchema.parse( ictDepositTravelRuleIndividualRecipientPartyAddress, ), ); } export function ictDepositTravelRuleIndividualRecipientPartyAddressFromJSON( jsonString: string, ): SafeParseResult< IctDepositTravelRuleIndividualRecipientPartyAddress, SDKValidationError > { return safeParse( jsonString, (x) => IctDepositTravelRuleIndividualRecipientPartyAddress$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'IctDepositTravelRuleIndividualRecipientPartyAddress' from JSON`, ); } /** @internal */ export const IndividualRecipientParty$inboundSchema: z.ZodType< IndividualRecipientParty, z.ZodTypeDef, unknown > = z.object({ address: z.nullable( z.lazy(() => IctDepositTravelRuleIndividualRecipientPartyAddress$inboundSchema ), ).optional(), family_name: z.string().optional(), given_names: z.array(z.string()).optional(), }).transform((v) => { return remap$(v, { "family_name": "familyName", "given_names": "givenNames", }); }); /** @internal */ export type IndividualRecipientParty$Outbound = { address?: | IctDepositTravelRuleIndividualRecipientPartyAddress$Outbound | null | undefined; family_name?: string | undefined; given_names?: Array | undefined; }; /** @internal */ export const IndividualRecipientParty$outboundSchema: z.ZodType< IndividualRecipientParty$Outbound, z.ZodTypeDef, IndividualRecipientParty > = z.object({ address: z.nullable( z.lazy(() => IctDepositTravelRuleIndividualRecipientPartyAddress$outboundSchema ), ).optional(), familyName: z.string().optional(), givenNames: z.array(z.string()).optional(), }).transform((v) => { return remap$(v, { familyName: "family_name", givenNames: "given_names", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IndividualRecipientParty$ { /** @deprecated use `IndividualRecipientParty$inboundSchema` instead. */ export const inboundSchema = IndividualRecipientParty$inboundSchema; /** @deprecated use `IndividualRecipientParty$outboundSchema` instead. */ export const outboundSchema = IndividualRecipientParty$outboundSchema; /** @deprecated use `IndividualRecipientParty$Outbound` instead. */ export type Outbound = IndividualRecipientParty$Outbound; } export function individualRecipientPartyToJSON( individualRecipientParty: IndividualRecipientParty, ): string { return JSON.stringify( IndividualRecipientParty$outboundSchema.parse(individualRecipientParty), ); } export function individualRecipientPartyFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IndividualRecipientParty$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IndividualRecipientParty' from JSON`, ); } /** @internal */ export const OriginatingInstitution$inboundSchema: z.ZodType< OriginatingInstitution, z.ZodTypeDef, unknown > = z.object({ account_id: z.string().optional(), title: z.string().optional(), }).transform((v) => { return remap$(v, { "account_id": "accountId", }); }); /** @internal */ export type OriginatingInstitution$Outbound = { account_id?: string | undefined; title?: string | undefined; }; /** @internal */ export const OriginatingInstitution$outboundSchema: z.ZodType< OriginatingInstitution$Outbound, z.ZodTypeDef, OriginatingInstitution > = z.object({ accountId: z.string().optional(), title: z.string().optional(), }).transform((v) => { return remap$(v, { accountId: "account_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace OriginatingInstitution$ { /** @deprecated use `OriginatingInstitution$inboundSchema` instead. */ export const inboundSchema = OriginatingInstitution$inboundSchema; /** @deprecated use `OriginatingInstitution$outboundSchema` instead. */ export const outboundSchema = OriginatingInstitution$outboundSchema; /** @deprecated use `OriginatingInstitution$Outbound` instead. */ export type Outbound = OriginatingInstitution$Outbound; } export function originatingInstitutionToJSON( originatingInstitution: OriginatingInstitution, ): string { return JSON.stringify( OriginatingInstitution$outboundSchema.parse(originatingInstitution), ); } export function originatingInstitutionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => OriginatingInstitution$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OriginatingInstitution' from JSON`, ); } /** @internal */ export const RecipientInstitution$inboundSchema: z.ZodType< RecipientInstitution, z.ZodTypeDef, unknown > = z.object({ account_id: z.string().optional(), title: z.string().optional(), }).transform((v) => { return remap$(v, { "account_id": "accountId", }); }); /** @internal */ export type RecipientInstitution$Outbound = { account_id?: string | undefined; title?: string | undefined; }; /** @internal */ export const RecipientInstitution$outboundSchema: z.ZodType< RecipientInstitution$Outbound, z.ZodTypeDef, RecipientInstitution > = z.object({ accountId: z.string().optional(), title: z.string().optional(), }).transform((v) => { return remap$(v, { accountId: "account_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace RecipientInstitution$ { /** @deprecated use `RecipientInstitution$inboundSchema` instead. */ export const inboundSchema = RecipientInstitution$inboundSchema; /** @deprecated use `RecipientInstitution$outboundSchema` instead. */ export const outboundSchema = RecipientInstitution$outboundSchema; /** @deprecated use `RecipientInstitution$Outbound` instead. */ export type Outbound = RecipientInstitution$Outbound; } export function recipientInstitutionToJSON( recipientInstitution: RecipientInstitution, ): string { return JSON.stringify( RecipientInstitution$outboundSchema.parse(recipientInstitution), ); } export function recipientInstitutionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => RecipientInstitution$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RecipientInstitution' from JSON`, ); } /** @internal */ export const TravelRule$inboundSchema: z.ZodType< TravelRule, z.ZodTypeDef, unknown > = z.object({ entity_originating_party: z.nullable( z.lazy(() => EntityOriginatingParty$inboundSchema), ).optional(), entity_recipient_party: z.nullable( z.lazy(() => EntityRecipientParty$inboundSchema), ).optional(), individual_originating_party: z.nullable( z.lazy(() => IndividualOriginatingParty$inboundSchema), ).optional(), individual_recipient_party: z.nullable( z.lazy(() => IndividualRecipientParty$inboundSchema), ).optional(), originating_institution: z.nullable( z.lazy(() => OriginatingInstitution$inboundSchema), ).optional(), recipient_institution: z.nullable( z.lazy(() => RecipientInstitution$inboundSchema), ).optional(), }).transform((v) => { return remap$(v, { "entity_originating_party": "entityOriginatingParty", "entity_recipient_party": "entityRecipientParty", "individual_originating_party": "individualOriginatingParty", "individual_recipient_party": "individualRecipientParty", "originating_institution": "originatingInstitution", "recipient_institution": "recipientInstitution", }); }); /** @internal */ export type TravelRule$Outbound = { entity_originating_party?: EntityOriginatingParty$Outbound | null | undefined; entity_recipient_party?: EntityRecipientParty$Outbound | null | undefined; individual_originating_party?: | IndividualOriginatingParty$Outbound | null | undefined; individual_recipient_party?: | IndividualRecipientParty$Outbound | null | undefined; originating_institution?: OriginatingInstitution$Outbound | null | undefined; recipient_institution?: RecipientInstitution$Outbound | null | undefined; }; /** @internal */ export const TravelRule$outboundSchema: z.ZodType< TravelRule$Outbound, z.ZodTypeDef, TravelRule > = z.object({ entityOriginatingParty: z.nullable( z.lazy(() => EntityOriginatingParty$outboundSchema), ).optional(), entityRecipientParty: z.nullable( z.lazy(() => EntityRecipientParty$outboundSchema), ).optional(), individualOriginatingParty: z.nullable( z.lazy(() => IndividualOriginatingParty$outboundSchema), ).optional(), individualRecipientParty: z.nullable( z.lazy(() => IndividualRecipientParty$outboundSchema), ).optional(), originatingInstitution: z.nullable( z.lazy(() => OriginatingInstitution$outboundSchema), ).optional(), recipientInstitution: z.nullable( z.lazy(() => RecipientInstitution$outboundSchema), ).optional(), }).transform((v) => { return remap$(v, { entityOriginatingParty: "entity_originating_party", entityRecipientParty: "entity_recipient_party", individualOriginatingParty: "individual_originating_party", individualRecipientParty: "individual_recipient_party", originatingInstitution: "originating_institution", recipientInstitution: "recipient_institution", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TravelRule$ { /** @deprecated use `TravelRule$inboundSchema` instead. */ export const inboundSchema = TravelRule$inboundSchema; /** @deprecated use `TravelRule$outboundSchema` instead. */ export const outboundSchema = TravelRule$outboundSchema; /** @deprecated use `TravelRule$Outbound` instead. */ export type Outbound = TravelRule$Outbound; } export function travelRuleToJSON(travelRule: TravelRule): string { return JSON.stringify(TravelRule$outboundSchema.parse(travelRule)); } export function travelRuleFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TravelRule$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TravelRule' from JSON`, ); } /** @internal */ export const IctDeposit$inboundSchema: z.ZodType< IctDeposit, z.ZodTypeDef, unknown > = z.object({ amount: z.nullable(z.lazy(() => IctDepositAmount$inboundSchema)).optional(), client_transfer_id: z.string().optional(), name: z.string().optional(), program: IctDepositProgram$inboundSchema.optional(), retirement_contribution: z.nullable( z.lazy(() => IctDepositRetirementContribution$inboundSchema), ).optional(), state: z.nullable(z.lazy(() => IctDepositState$inboundSchema)).optional(), transfer_state: z.nullable(z.lazy(() => TransferState$inboundSchema)) .optional(), travel_rule: z.nullable(z.lazy(() => TravelRule$inboundSchema)).optional(), }).transform((v) => { return remap$(v, { "client_transfer_id": "clientTransferId", "retirement_contribution": "retirementContribution", "transfer_state": "transferState", "travel_rule": "travelRule", }); }); /** @internal */ export type IctDeposit$Outbound = { amount?: IctDepositAmount$Outbound | null | undefined; client_transfer_id?: string | undefined; name?: string | undefined; program?: string | undefined; retirement_contribution?: | IctDepositRetirementContribution$Outbound | null | undefined; state?: IctDepositState$Outbound | null | undefined; transfer_state?: TransferState$Outbound | null | undefined; travel_rule?: TravelRule$Outbound | null | undefined; }; /** @internal */ export const IctDeposit$outboundSchema: z.ZodType< IctDeposit$Outbound, z.ZodTypeDef, IctDeposit > = z.object({ amount: z.nullable(z.lazy(() => IctDepositAmount$outboundSchema)).optional(), clientTransferId: z.string().optional(), name: z.string().optional(), program: IctDepositProgram$outboundSchema.optional(), retirementContribution: z.nullable( z.lazy(() => IctDepositRetirementContribution$outboundSchema), ).optional(), state: z.nullable(z.lazy(() => IctDepositState$outboundSchema)).optional(), transferState: z.nullable(z.lazy(() => TransferState$outboundSchema)) .optional(), travelRule: z.nullable(z.lazy(() => TravelRule$outboundSchema)).optional(), }).transform((v) => { return remap$(v, { clientTransferId: "client_transfer_id", retirementContribution: "retirement_contribution", transferState: "transfer_state", travelRule: "travel_rule", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IctDeposit$ { /** @deprecated use `IctDeposit$inboundSchema` instead. */ export const inboundSchema = IctDeposit$inboundSchema; /** @deprecated use `IctDeposit$outboundSchema` instead. */ export const outboundSchema = IctDeposit$outboundSchema; /** @deprecated use `IctDeposit$Outbound` instead. */ export type Outbound = IctDeposit$Outbound; } export function ictDepositToJSON(ictDeposit: IctDeposit): string { return JSON.stringify(IctDeposit$outboundSchema.parse(ictDeposit)); } export function ictDepositFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IctDeposit$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IctDeposit' from JSON`, ); }