/* * 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 withdrawn from the customer's account in USD. A value should not be provided if the withdrawal is a full disbursement. */ export type IctWithdrawalAmount = { /** * 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 that the ICT withdrawal is associated with. */ export enum IctWithdrawalProgram { 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 that the ICT withdrawal is associated with. */ export type IctWithdrawalProgramOpen = OpenEnum; /** * Fixed USD amount to withhold for taxes. */ export type IctWithdrawalRetirementDistributionAmount = { /** * 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; }; /** * Percentage of total disbursement amount to withhold for taxes. */ export type IctWithdrawalPercentage = { /** * 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 federal tax withholding. */ export type IctWithdrawalFederalTaxWithholding = { /** * Fixed USD amount to withhold for taxes. */ amount?: IctWithdrawalRetirementDistributionAmount | null | undefined; /** * Percentage of total disbursement amount to withhold for taxes. */ percentage?: IctWithdrawalPercentage | null | undefined; }; /** * Fixed USD amount to withhold for taxes. */ export type IctWithdrawalRetirementDistributionStateTaxWithholdingAmount = { /** * 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; }; /** * Percentage of total disbursement amount to withhold for taxes. */ export type IctWithdrawalRetirementDistributionPercentage = { /** * 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 state tax withholding. */ export type IctWithdrawalStateTaxWithholding = { /** * Fixed USD amount to withhold for taxes. */ amount?: | IctWithdrawalRetirementDistributionStateTaxWithholdingAmount | null | undefined; /** * Percentage of total disbursement amount to withhold for taxes. */ percentage?: IctWithdrawalRetirementDistributionPercentage | null | undefined; }; /** * The type of retirement distribution. */ export enum IctWithdrawalType { TypeUnspecified = "TYPE_UNSPECIFIED", Normal = "NORMAL", Disability = "DISABILITY", Sosepp = "SOSEPP", Premature = "PREMATURE", Death = "DEATH", ExcessContributionRemovalBeforeTaxDeadline = "EXCESS_CONTRIBUTION_REMOVAL_BEFORE_TAX_DEADLINE", ExcessContributionRemovalAfterTaxDeadline = "EXCESS_CONTRIBUTION_REMOVAL_AFTER_TAX_DEADLINE", RolloverToQualifiedPlan = "ROLLOVER_TO_QUALIFIED_PLAN", RolloverToIra = "ROLLOVER_TO_IRA", DistributionTransfer = "DISTRIBUTION_TRANSFER", RecharacterizationPriorYear = "RECHARACTERIZATION_PRIOR_YEAR", RecharacterizationCurrentYear = "RECHARACTERIZATION_CURRENT_YEAR", DistributionConversion = "DISTRIBUTION_CONVERSION", ManagementFee = "MANAGEMENT_FEE", PlanLoan401K = "PLAN_LOAN_401K", PrematureSimpleIraLessThan2Years = "PREMATURE_SIMPLE_IRA_LESS_THAN_2_YEARS", NormalRothIraGreaterThan5Years = "NORMAL_ROTH_IRA_GREATER_THAN_5_YEARS", NetIncomeAttributable = "NET_INCOME_ATTRIBUTABLE", Revocation = "REVOCATION", NonReportable = "NON_REPORTABLE", QualifiedCharitableDistribution = "QUALIFIED_CHARITABLE_DISTRIBUTION", } /** * The type of retirement distribution. */ export type IctWithdrawalTypeOpen = OpenEnum; /** * Retirement distribution details for withdrawal from retirement account */ export type IctWithdrawalRetirementDistribution = { /** * The federal tax withholding. */ federalTaxWithholding?: IctWithdrawalFederalTaxWithholding | null | undefined; /** * The institution receiving retirement funds when performing a transfer to an identical retirement account type at a different financial institution. This is required for check and wire withdrawals because we can't always identify the institution using the transfer instructions. For cash journals this value will default to "Apex Clearing", regardless of what is passed in here */ receivingInstitution?: string | undefined; /** * The state tax withholding. */ stateTaxWithholding?: IctWithdrawalStateTaxWithholding | null | undefined; /** * Whether or not this distribution has a state withholding waiver. */ stateWithholdingWaiver?: boolean | undefined; /** * Tax year for which the distribution is applied. */ taxYear?: number | undefined; /** * The type of retirement distribution. */ type?: IctWithdrawalTypeOpen | 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 IctWithdrawalStateState { 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 IctWithdrawalStateStateOpen = OpenEnum< typeof IctWithdrawalStateState >; /** * The state of the ICT withdrawal */ export type IctWithdrawalState = { /** * 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?: IctWithdrawalStateStateOpen | 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 IctWithdrawalTransferStateState { 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 IctWithdrawalTransferStateStateOpen = OpenEnum< typeof IctWithdrawalTransferStateState >; /** * 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 IctWithdrawalTransferState = { /** * 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?: IctWithdrawalTransferStateStateOpen | undefined; /** * The time of the state update. */ updateTime?: Date | null | undefined; }; /** * The address of the entity */ export type IctWithdrawalAddress = { /** * 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 IctWithdrawalEntityOriginatingParty = { /** * The address of the entity */ address?: IctWithdrawalAddress | 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 IctWithdrawalTravelRuleAddress = { /** * 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 IctWithdrawalEntityRecipientParty = { /** * The address of the entity */ address?: IctWithdrawalTravelRuleAddress | 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 IctWithdrawalTravelRuleIndividualOriginatingPartyAddress = { /** * 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 IctWithdrawalIndividualOriginatingParty = { /** * The address of the party */ address?: | IctWithdrawalTravelRuleIndividualOriginatingPartyAddress | 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 IctWithdrawalTravelRuleIndividualRecipientPartyAddress = { /** * 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 IctWithdrawalIndividualRecipientParty = { /** * The address of the party */ address?: | IctWithdrawalTravelRuleIndividualRecipientPartyAddress | 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 and account id of institution sourcing the funds. Always 'Apex Clearing' and investor account id for ICT withdrawals; */ export type IctWithdrawalOriginatingInstitution = { /** * Account id at institution */ accountId?: string | undefined; /** * Name of the institution */ title?: string | undefined; }; /** * The name and account id of the external financial institution that will take receipt of the funds. */ export type IctWithdrawalRecipientInstitution = { /** * Account id at institution */ accountId?: string | undefined; /** * Name of the institution */ title?: string | undefined; }; /** * The travel rule information for the ICT withdrawal */ export type IctWithdrawalTravelRule = { /** * An entity originating party */ entityOriginatingParty?: | IctWithdrawalEntityOriginatingParty | null | undefined; /** * An entity originating party */ entityRecipientParty?: IctWithdrawalEntityRecipientParty | null | undefined; /** * An individual originating party */ individualOriginatingParty?: | IctWithdrawalIndividualOriginatingParty | null | undefined; /** * An individual recipient party */ individualRecipientParty?: | IctWithdrawalIndividualRecipientParty | null | undefined; /** * The name and account id of institution sourcing the funds. Always 'Apex Clearing' and investor account id for ICT withdrawals; */ originatingInstitution?: | IctWithdrawalOriginatingInstitution | null | undefined; /** * The name and account id of the external financial institution that will take receipt of the funds. */ recipientInstitution?: IctWithdrawalRecipientInstitution | null | undefined; }; /** * An Instant Cash Transfer. Funds are moved from a customer's brokerage account to a configured Firm account. */ export type IctWithdrawal = { /** * The amount of the transfer being withdrawn from the customer's account in USD. A value should not be provided if the withdrawal is a full disbursement. */ amount?: IctWithdrawalAmount | 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 withdrawal resource, which contains account id and ICT withdrawal id */ name?: string | undefined; /** * The name of the program that the ICT withdrawal is associated with. */ program?: IctWithdrawalProgramOpen | undefined; /** * Retirement distribution details for withdrawal from retirement account */ retirementDistribution?: | IctWithdrawalRetirementDistribution | null | undefined; /** * The state of the ICT withdrawal */ state?: IctWithdrawalState | 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?: IctWithdrawalTransferState | null | undefined; /** * The travel rule information for the ICT withdrawal */ travelRule?: IctWithdrawalTravelRule | null | undefined; }; /** @internal */ export const IctWithdrawalAmount$inboundSchema: z.ZodType< IctWithdrawalAmount, z.ZodTypeDef, unknown > = z.object({ value: z.string().optional(), }); /** @internal */ export type IctWithdrawalAmount$Outbound = { value?: string | undefined; }; /** @internal */ export const IctWithdrawalAmount$outboundSchema: z.ZodType< IctWithdrawalAmount$Outbound, z.ZodTypeDef, IctWithdrawalAmount > = 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 IctWithdrawalAmount$ { /** @deprecated use `IctWithdrawalAmount$inboundSchema` instead. */ export const inboundSchema = IctWithdrawalAmount$inboundSchema; /** @deprecated use `IctWithdrawalAmount$outboundSchema` instead. */ export const outboundSchema = IctWithdrawalAmount$outboundSchema; /** @deprecated use `IctWithdrawalAmount$Outbound` instead. */ export type Outbound = IctWithdrawalAmount$Outbound; } export function ictWithdrawalAmountToJSON( ictWithdrawalAmount: IctWithdrawalAmount, ): string { return JSON.stringify( IctWithdrawalAmount$outboundSchema.parse(ictWithdrawalAmount), ); } export function ictWithdrawalAmountFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IctWithdrawalAmount$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IctWithdrawalAmount' from JSON`, ); } /** @internal */ export const IctWithdrawalProgram$inboundSchema: z.ZodType< IctWithdrawalProgramOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(IctWithdrawalProgram), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const IctWithdrawalProgram$outboundSchema: z.ZodType< IctWithdrawalProgramOpen, z.ZodTypeDef, IctWithdrawalProgramOpen > = z.union([ z.nativeEnum(IctWithdrawalProgram), 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 IctWithdrawalProgram$ { /** @deprecated use `IctWithdrawalProgram$inboundSchema` instead. */ export const inboundSchema = IctWithdrawalProgram$inboundSchema; /** @deprecated use `IctWithdrawalProgram$outboundSchema` instead. */ export const outboundSchema = IctWithdrawalProgram$outboundSchema; } /** @internal */ export const IctWithdrawalRetirementDistributionAmount$inboundSchema: z.ZodType< IctWithdrawalRetirementDistributionAmount, z.ZodTypeDef, unknown > = z.object({ value: z.string().optional(), }); /** @internal */ export type IctWithdrawalRetirementDistributionAmount$Outbound = { value?: string | undefined; }; /** @internal */ export const IctWithdrawalRetirementDistributionAmount$outboundSchema: z.ZodType< IctWithdrawalRetirementDistributionAmount$Outbound, z.ZodTypeDef, IctWithdrawalRetirementDistributionAmount > = 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 IctWithdrawalRetirementDistributionAmount$ { /** @deprecated use `IctWithdrawalRetirementDistributionAmount$inboundSchema` instead. */ export const inboundSchema = IctWithdrawalRetirementDistributionAmount$inboundSchema; /** @deprecated use `IctWithdrawalRetirementDistributionAmount$outboundSchema` instead. */ export const outboundSchema = IctWithdrawalRetirementDistributionAmount$outboundSchema; /** @deprecated use `IctWithdrawalRetirementDistributionAmount$Outbound` instead. */ export type Outbound = IctWithdrawalRetirementDistributionAmount$Outbound; } export function ictWithdrawalRetirementDistributionAmountToJSON( ictWithdrawalRetirementDistributionAmount: IctWithdrawalRetirementDistributionAmount, ): string { return JSON.stringify( IctWithdrawalRetirementDistributionAmount$outboundSchema.parse( ictWithdrawalRetirementDistributionAmount, ), ); } export function ictWithdrawalRetirementDistributionAmountFromJSON( jsonString: string, ): SafeParseResult< IctWithdrawalRetirementDistributionAmount, SDKValidationError > { return safeParse( jsonString, (x) => IctWithdrawalRetirementDistributionAmount$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'IctWithdrawalRetirementDistributionAmount' from JSON`, ); } /** @internal */ export const IctWithdrawalPercentage$inboundSchema: z.ZodType< IctWithdrawalPercentage, z.ZodTypeDef, unknown > = z.object({ value: z.string().optional(), }); /** @internal */ export type IctWithdrawalPercentage$Outbound = { value?: string | undefined; }; /** @internal */ export const IctWithdrawalPercentage$outboundSchema: z.ZodType< IctWithdrawalPercentage$Outbound, z.ZodTypeDef, IctWithdrawalPercentage > = 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 IctWithdrawalPercentage$ { /** @deprecated use `IctWithdrawalPercentage$inboundSchema` instead. */ export const inboundSchema = IctWithdrawalPercentage$inboundSchema; /** @deprecated use `IctWithdrawalPercentage$outboundSchema` instead. */ export const outboundSchema = IctWithdrawalPercentage$outboundSchema; /** @deprecated use `IctWithdrawalPercentage$Outbound` instead. */ export type Outbound = IctWithdrawalPercentage$Outbound; } export function ictWithdrawalPercentageToJSON( ictWithdrawalPercentage: IctWithdrawalPercentage, ): string { return JSON.stringify( IctWithdrawalPercentage$outboundSchema.parse(ictWithdrawalPercentage), ); } export function ictWithdrawalPercentageFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IctWithdrawalPercentage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IctWithdrawalPercentage' from JSON`, ); } /** @internal */ export const IctWithdrawalFederalTaxWithholding$inboundSchema: z.ZodType< IctWithdrawalFederalTaxWithholding, z.ZodTypeDef, unknown > = z.object({ amount: z.nullable( z.lazy(() => IctWithdrawalRetirementDistributionAmount$inboundSchema), ).optional(), percentage: z.nullable(z.lazy(() => IctWithdrawalPercentage$inboundSchema)) .optional(), }); /** @internal */ export type IctWithdrawalFederalTaxWithholding$Outbound = { amount?: | IctWithdrawalRetirementDistributionAmount$Outbound | null | undefined; percentage?: IctWithdrawalPercentage$Outbound | null | undefined; }; /** @internal */ export const IctWithdrawalFederalTaxWithholding$outboundSchema: z.ZodType< IctWithdrawalFederalTaxWithholding$Outbound, z.ZodTypeDef, IctWithdrawalFederalTaxWithholding > = z.object({ amount: z.nullable( z.lazy(() => IctWithdrawalRetirementDistributionAmount$outboundSchema), ).optional(), percentage: z.nullable(z.lazy(() => IctWithdrawalPercentage$outboundSchema)) .optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IctWithdrawalFederalTaxWithholding$ { /** @deprecated use `IctWithdrawalFederalTaxWithholding$inboundSchema` instead. */ export const inboundSchema = IctWithdrawalFederalTaxWithholding$inboundSchema; /** @deprecated use `IctWithdrawalFederalTaxWithholding$outboundSchema` instead. */ export const outboundSchema = IctWithdrawalFederalTaxWithholding$outboundSchema; /** @deprecated use `IctWithdrawalFederalTaxWithholding$Outbound` instead. */ export type Outbound = IctWithdrawalFederalTaxWithholding$Outbound; } export function ictWithdrawalFederalTaxWithholdingToJSON( ictWithdrawalFederalTaxWithholding: IctWithdrawalFederalTaxWithholding, ): string { return JSON.stringify( IctWithdrawalFederalTaxWithholding$outboundSchema.parse( ictWithdrawalFederalTaxWithholding, ), ); } export function ictWithdrawalFederalTaxWithholdingFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IctWithdrawalFederalTaxWithholding$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IctWithdrawalFederalTaxWithholding' from JSON`, ); } /** @internal */ export const IctWithdrawalRetirementDistributionStateTaxWithholdingAmount$inboundSchema: z.ZodType< IctWithdrawalRetirementDistributionStateTaxWithholdingAmount, z.ZodTypeDef, unknown > = z.object({ value: z.string().optional(), }); /** @internal */ export type IctWithdrawalRetirementDistributionStateTaxWithholdingAmount$Outbound = { value?: string | undefined; }; /** @internal */ export const IctWithdrawalRetirementDistributionStateTaxWithholdingAmount$outboundSchema: z.ZodType< IctWithdrawalRetirementDistributionStateTaxWithholdingAmount$Outbound, z.ZodTypeDef, IctWithdrawalRetirementDistributionStateTaxWithholdingAmount > = 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 IctWithdrawalRetirementDistributionStateTaxWithholdingAmount$ { /** @deprecated use `IctWithdrawalRetirementDistributionStateTaxWithholdingAmount$inboundSchema` instead. */ export const inboundSchema = IctWithdrawalRetirementDistributionStateTaxWithholdingAmount$inboundSchema; /** @deprecated use `IctWithdrawalRetirementDistributionStateTaxWithholdingAmount$outboundSchema` instead. */ export const outboundSchema = IctWithdrawalRetirementDistributionStateTaxWithholdingAmount$outboundSchema; /** @deprecated use `IctWithdrawalRetirementDistributionStateTaxWithholdingAmount$Outbound` instead. */ export type Outbound = IctWithdrawalRetirementDistributionStateTaxWithholdingAmount$Outbound; } export function ictWithdrawalRetirementDistributionStateTaxWithholdingAmountToJSON( ictWithdrawalRetirementDistributionStateTaxWithholdingAmount: IctWithdrawalRetirementDistributionStateTaxWithholdingAmount, ): string { return JSON.stringify( IctWithdrawalRetirementDistributionStateTaxWithholdingAmount$outboundSchema .parse(ictWithdrawalRetirementDistributionStateTaxWithholdingAmount), ); } export function ictWithdrawalRetirementDistributionStateTaxWithholdingAmountFromJSON( jsonString: string, ): SafeParseResult< IctWithdrawalRetirementDistributionStateTaxWithholdingAmount, SDKValidationError > { return safeParse( jsonString, (x) => IctWithdrawalRetirementDistributionStateTaxWithholdingAmount$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'IctWithdrawalRetirementDistributionStateTaxWithholdingAmount' from JSON`, ); } /** @internal */ export const IctWithdrawalRetirementDistributionPercentage$inboundSchema: z.ZodType< IctWithdrawalRetirementDistributionPercentage, z.ZodTypeDef, unknown > = z.object({ value: z.string().optional(), }); /** @internal */ export type IctWithdrawalRetirementDistributionPercentage$Outbound = { value?: string | undefined; }; /** @internal */ export const IctWithdrawalRetirementDistributionPercentage$outboundSchema: z.ZodType< IctWithdrawalRetirementDistributionPercentage$Outbound, z.ZodTypeDef, IctWithdrawalRetirementDistributionPercentage > = 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 IctWithdrawalRetirementDistributionPercentage$ { /** @deprecated use `IctWithdrawalRetirementDistributionPercentage$inboundSchema` instead. */ export const inboundSchema = IctWithdrawalRetirementDistributionPercentage$inboundSchema; /** @deprecated use `IctWithdrawalRetirementDistributionPercentage$outboundSchema` instead. */ export const outboundSchema = IctWithdrawalRetirementDistributionPercentage$outboundSchema; /** @deprecated use `IctWithdrawalRetirementDistributionPercentage$Outbound` instead. */ export type Outbound = IctWithdrawalRetirementDistributionPercentage$Outbound; } export function ictWithdrawalRetirementDistributionPercentageToJSON( ictWithdrawalRetirementDistributionPercentage: IctWithdrawalRetirementDistributionPercentage, ): string { return JSON.stringify( IctWithdrawalRetirementDistributionPercentage$outboundSchema.parse( ictWithdrawalRetirementDistributionPercentage, ), ); } export function ictWithdrawalRetirementDistributionPercentageFromJSON( jsonString: string, ): SafeParseResult< IctWithdrawalRetirementDistributionPercentage, SDKValidationError > { return safeParse( jsonString, (x) => IctWithdrawalRetirementDistributionPercentage$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'IctWithdrawalRetirementDistributionPercentage' from JSON`, ); } /** @internal */ export const IctWithdrawalStateTaxWithholding$inboundSchema: z.ZodType< IctWithdrawalStateTaxWithholding, z.ZodTypeDef, unknown > = z.object({ amount: z.nullable( z.lazy(() => IctWithdrawalRetirementDistributionStateTaxWithholdingAmount$inboundSchema ), ).optional(), percentage: z.nullable( z.lazy(() => IctWithdrawalRetirementDistributionPercentage$inboundSchema), ).optional(), }); /** @internal */ export type IctWithdrawalStateTaxWithholding$Outbound = { amount?: | IctWithdrawalRetirementDistributionStateTaxWithholdingAmount$Outbound | null | undefined; percentage?: | IctWithdrawalRetirementDistributionPercentage$Outbound | null | undefined; }; /** @internal */ export const IctWithdrawalStateTaxWithholding$outboundSchema: z.ZodType< IctWithdrawalStateTaxWithholding$Outbound, z.ZodTypeDef, IctWithdrawalStateTaxWithholding > = z.object({ amount: z.nullable( z.lazy(() => IctWithdrawalRetirementDistributionStateTaxWithholdingAmount$outboundSchema ), ).optional(), percentage: z.nullable( z.lazy(() => IctWithdrawalRetirementDistributionPercentage$outboundSchema), ).optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IctWithdrawalStateTaxWithholding$ { /** @deprecated use `IctWithdrawalStateTaxWithholding$inboundSchema` instead. */ export const inboundSchema = IctWithdrawalStateTaxWithholding$inboundSchema; /** @deprecated use `IctWithdrawalStateTaxWithholding$outboundSchema` instead. */ export const outboundSchema = IctWithdrawalStateTaxWithholding$outboundSchema; /** @deprecated use `IctWithdrawalStateTaxWithholding$Outbound` instead. */ export type Outbound = IctWithdrawalStateTaxWithholding$Outbound; } export function ictWithdrawalStateTaxWithholdingToJSON( ictWithdrawalStateTaxWithholding: IctWithdrawalStateTaxWithholding, ): string { return JSON.stringify( IctWithdrawalStateTaxWithholding$outboundSchema.parse( ictWithdrawalStateTaxWithholding, ), ); } export function ictWithdrawalStateTaxWithholdingFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IctWithdrawalStateTaxWithholding$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IctWithdrawalStateTaxWithholding' from JSON`, ); } /** @internal */ export const IctWithdrawalType$inboundSchema: z.ZodType< IctWithdrawalTypeOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(IctWithdrawalType), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const IctWithdrawalType$outboundSchema: z.ZodType< IctWithdrawalTypeOpen, z.ZodTypeDef, IctWithdrawalTypeOpen > = z.union([ z.nativeEnum(IctWithdrawalType), 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 IctWithdrawalType$ { /** @deprecated use `IctWithdrawalType$inboundSchema` instead. */ export const inboundSchema = IctWithdrawalType$inboundSchema; /** @deprecated use `IctWithdrawalType$outboundSchema` instead. */ export const outboundSchema = IctWithdrawalType$outboundSchema; } /** @internal */ export const IctWithdrawalRetirementDistribution$inboundSchema: z.ZodType< IctWithdrawalRetirementDistribution, z.ZodTypeDef, unknown > = z.object({ federal_tax_withholding: z.nullable( z.lazy(() => IctWithdrawalFederalTaxWithholding$inboundSchema), ).optional(), receiving_institution: z.string().optional(), state_tax_withholding: z.nullable( z.lazy(() => IctWithdrawalStateTaxWithholding$inboundSchema), ).optional(), state_withholding_waiver: z.boolean().optional(), tax_year: z.number().int().optional(), type: IctWithdrawalType$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "federal_tax_withholding": "federalTaxWithholding", "receiving_institution": "receivingInstitution", "state_tax_withholding": "stateTaxWithholding", "state_withholding_waiver": "stateWithholdingWaiver", "tax_year": "taxYear", }); }); /** @internal */ export type IctWithdrawalRetirementDistribution$Outbound = { federal_tax_withholding?: | IctWithdrawalFederalTaxWithholding$Outbound | null | undefined; receiving_institution?: string | undefined; state_tax_withholding?: | IctWithdrawalStateTaxWithholding$Outbound | null | undefined; state_withholding_waiver?: boolean | undefined; tax_year?: number | undefined; type?: string | undefined; }; /** @internal */ export const IctWithdrawalRetirementDistribution$outboundSchema: z.ZodType< IctWithdrawalRetirementDistribution$Outbound, z.ZodTypeDef, IctWithdrawalRetirementDistribution > = z.object({ federalTaxWithholding: z.nullable( z.lazy(() => IctWithdrawalFederalTaxWithholding$outboundSchema), ).optional(), receivingInstitution: z.string().optional(), stateTaxWithholding: z.nullable( z.lazy(() => IctWithdrawalStateTaxWithholding$outboundSchema), ).optional(), stateWithholdingWaiver: z.boolean().optional(), taxYear: z.number().int().optional(), type: IctWithdrawalType$outboundSchema.optional(), }).transform((v) => { return remap$(v, { federalTaxWithholding: "federal_tax_withholding", receivingInstitution: "receiving_institution", stateTaxWithholding: "state_tax_withholding", stateWithholdingWaiver: "state_withholding_waiver", 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 IctWithdrawalRetirementDistribution$ { /** @deprecated use `IctWithdrawalRetirementDistribution$inboundSchema` instead. */ export const inboundSchema = IctWithdrawalRetirementDistribution$inboundSchema; /** @deprecated use `IctWithdrawalRetirementDistribution$outboundSchema` instead. */ export const outboundSchema = IctWithdrawalRetirementDistribution$outboundSchema; /** @deprecated use `IctWithdrawalRetirementDistribution$Outbound` instead. */ export type Outbound = IctWithdrawalRetirementDistribution$Outbound; } export function ictWithdrawalRetirementDistributionToJSON( ictWithdrawalRetirementDistribution: IctWithdrawalRetirementDistribution, ): string { return JSON.stringify( IctWithdrawalRetirementDistribution$outboundSchema.parse( ictWithdrawalRetirementDistribution, ), ); } export function ictWithdrawalRetirementDistributionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IctWithdrawalRetirementDistribution$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IctWithdrawalRetirementDistribution' from JSON`, ); } /** @internal */ export const IctWithdrawalStateState$inboundSchema: z.ZodType< IctWithdrawalStateStateOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(IctWithdrawalStateState), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const IctWithdrawalStateState$outboundSchema: z.ZodType< IctWithdrawalStateStateOpen, z.ZodTypeDef, IctWithdrawalStateStateOpen > = z.union([ z.nativeEnum(IctWithdrawalStateState), 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 IctWithdrawalStateState$ { /** @deprecated use `IctWithdrawalStateState$inboundSchema` instead. */ export const inboundSchema = IctWithdrawalStateState$inboundSchema; /** @deprecated use `IctWithdrawalStateState$outboundSchema` instead. */ export const outboundSchema = IctWithdrawalStateState$outboundSchema; } /** @internal */ export const IctWithdrawalState$inboundSchema: z.ZodType< IctWithdrawalState, z.ZodTypeDef, unknown > = z.object({ actor: z.string().optional(), message: z.string().optional(), metadata: z.nullable(z.record(z.any())).optional(), state: IctWithdrawalStateState$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 IctWithdrawalState$Outbound = { actor?: string | undefined; message?: string | undefined; metadata?: { [k: string]: any } | null | undefined; state?: string | undefined; update_time?: string | null | undefined; }; /** @internal */ export const IctWithdrawalState$outboundSchema: z.ZodType< IctWithdrawalState$Outbound, z.ZodTypeDef, IctWithdrawalState > = z.object({ actor: z.string().optional(), message: z.string().optional(), metadata: z.nullable(z.record(z.any())).optional(), state: IctWithdrawalStateState$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 IctWithdrawalState$ { /** @deprecated use `IctWithdrawalState$inboundSchema` instead. */ export const inboundSchema = IctWithdrawalState$inboundSchema; /** @deprecated use `IctWithdrawalState$outboundSchema` instead. */ export const outboundSchema = IctWithdrawalState$outboundSchema; /** @deprecated use `IctWithdrawalState$Outbound` instead. */ export type Outbound = IctWithdrawalState$Outbound; } export function ictWithdrawalStateToJSON( ictWithdrawalState: IctWithdrawalState, ): string { return JSON.stringify( IctWithdrawalState$outboundSchema.parse(ictWithdrawalState), ); } export function ictWithdrawalStateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IctWithdrawalState$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IctWithdrawalState' from JSON`, ); } /** @internal */ export const IctWithdrawalTransferStateState$inboundSchema: z.ZodType< IctWithdrawalTransferStateStateOpen, z.ZodTypeDef, unknown > = z .union([ z.nativeEnum(IctWithdrawalTransferStateState), z.string().transform(catchUnrecognizedEnum), ]); /** @internal */ export const IctWithdrawalTransferStateState$outboundSchema: z.ZodType< IctWithdrawalTransferStateStateOpen, z.ZodTypeDef, IctWithdrawalTransferStateStateOpen > = z.union([ z.nativeEnum(IctWithdrawalTransferStateState), 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 IctWithdrawalTransferStateState$ { /** @deprecated use `IctWithdrawalTransferStateState$inboundSchema` instead. */ export const inboundSchema = IctWithdrawalTransferStateState$inboundSchema; /** @deprecated use `IctWithdrawalTransferStateState$outboundSchema` instead. */ export const outboundSchema = IctWithdrawalTransferStateState$outboundSchema; } /** @internal */ export const IctWithdrawalTransferState$inboundSchema: z.ZodType< IctWithdrawalTransferState, z.ZodTypeDef, unknown > = z.object({ actor: z.string().optional(), message: z.string().optional(), metadata: z.nullable(z.record(z.any())).optional(), state: IctWithdrawalTransferStateState$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 IctWithdrawalTransferState$Outbound = { actor?: string | undefined; message?: string | undefined; metadata?: { [k: string]: any } | null | undefined; state?: string | undefined; update_time?: string | null | undefined; }; /** @internal */ export const IctWithdrawalTransferState$outboundSchema: z.ZodType< IctWithdrawalTransferState$Outbound, z.ZodTypeDef, IctWithdrawalTransferState > = z.object({ actor: z.string().optional(), message: z.string().optional(), metadata: z.nullable(z.record(z.any())).optional(), state: IctWithdrawalTransferStateState$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 IctWithdrawalTransferState$ { /** @deprecated use `IctWithdrawalTransferState$inboundSchema` instead. */ export const inboundSchema = IctWithdrawalTransferState$inboundSchema; /** @deprecated use `IctWithdrawalTransferState$outboundSchema` instead. */ export const outboundSchema = IctWithdrawalTransferState$outboundSchema; /** @deprecated use `IctWithdrawalTransferState$Outbound` instead. */ export type Outbound = IctWithdrawalTransferState$Outbound; } export function ictWithdrawalTransferStateToJSON( ictWithdrawalTransferState: IctWithdrawalTransferState, ): string { return JSON.stringify( IctWithdrawalTransferState$outboundSchema.parse(ictWithdrawalTransferState), ); } export function ictWithdrawalTransferStateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IctWithdrawalTransferState$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IctWithdrawalTransferState' from JSON`, ); } /** @internal */ export const IctWithdrawalAddress$inboundSchema: z.ZodType< IctWithdrawalAddress, 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 IctWithdrawalAddress$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 IctWithdrawalAddress$outboundSchema: z.ZodType< IctWithdrawalAddress$Outbound, z.ZodTypeDef, IctWithdrawalAddress > = 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 IctWithdrawalAddress$ { /** @deprecated use `IctWithdrawalAddress$inboundSchema` instead. */ export const inboundSchema = IctWithdrawalAddress$inboundSchema; /** @deprecated use `IctWithdrawalAddress$outboundSchema` instead. */ export const outboundSchema = IctWithdrawalAddress$outboundSchema; /** @deprecated use `IctWithdrawalAddress$Outbound` instead. */ export type Outbound = IctWithdrawalAddress$Outbound; } export function ictWithdrawalAddressToJSON( ictWithdrawalAddress: IctWithdrawalAddress, ): string { return JSON.stringify( IctWithdrawalAddress$outboundSchema.parse(ictWithdrawalAddress), ); } export function ictWithdrawalAddressFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IctWithdrawalAddress$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IctWithdrawalAddress' from JSON`, ); } /** @internal */ export const IctWithdrawalEntityOriginatingParty$inboundSchema: z.ZodType< IctWithdrawalEntityOriginatingParty, z.ZodTypeDef, unknown > = z.object({ address: z.nullable(z.lazy(() => IctWithdrawalAddress$inboundSchema)) .optional(), tax_id: z.string().optional(), title: z.string().optional(), }).transform((v) => { return remap$(v, { "tax_id": "taxId", }); }); /** @internal */ export type IctWithdrawalEntityOriginatingParty$Outbound = { address?: IctWithdrawalAddress$Outbound | null | undefined; tax_id?: string | undefined; title?: string | undefined; }; /** @internal */ export const IctWithdrawalEntityOriginatingParty$outboundSchema: z.ZodType< IctWithdrawalEntityOriginatingParty$Outbound, z.ZodTypeDef, IctWithdrawalEntityOriginatingParty > = z.object({ address: z.nullable(z.lazy(() => IctWithdrawalAddress$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 IctWithdrawalEntityOriginatingParty$ { /** @deprecated use `IctWithdrawalEntityOriginatingParty$inboundSchema` instead. */ export const inboundSchema = IctWithdrawalEntityOriginatingParty$inboundSchema; /** @deprecated use `IctWithdrawalEntityOriginatingParty$outboundSchema` instead. */ export const outboundSchema = IctWithdrawalEntityOriginatingParty$outboundSchema; /** @deprecated use `IctWithdrawalEntityOriginatingParty$Outbound` instead. */ export type Outbound = IctWithdrawalEntityOriginatingParty$Outbound; } export function ictWithdrawalEntityOriginatingPartyToJSON( ictWithdrawalEntityOriginatingParty: IctWithdrawalEntityOriginatingParty, ): string { return JSON.stringify( IctWithdrawalEntityOriginatingParty$outboundSchema.parse( ictWithdrawalEntityOriginatingParty, ), ); } export function ictWithdrawalEntityOriginatingPartyFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IctWithdrawalEntityOriginatingParty$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IctWithdrawalEntityOriginatingParty' from JSON`, ); } /** @internal */ export const IctWithdrawalTravelRuleAddress$inboundSchema: z.ZodType< IctWithdrawalTravelRuleAddress, 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 IctWithdrawalTravelRuleAddress$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 IctWithdrawalTravelRuleAddress$outboundSchema: z.ZodType< IctWithdrawalTravelRuleAddress$Outbound, z.ZodTypeDef, IctWithdrawalTravelRuleAddress > = 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 IctWithdrawalTravelRuleAddress$ { /** @deprecated use `IctWithdrawalTravelRuleAddress$inboundSchema` instead. */ export const inboundSchema = IctWithdrawalTravelRuleAddress$inboundSchema; /** @deprecated use `IctWithdrawalTravelRuleAddress$outboundSchema` instead. */ export const outboundSchema = IctWithdrawalTravelRuleAddress$outboundSchema; /** @deprecated use `IctWithdrawalTravelRuleAddress$Outbound` instead. */ export type Outbound = IctWithdrawalTravelRuleAddress$Outbound; } export function ictWithdrawalTravelRuleAddressToJSON( ictWithdrawalTravelRuleAddress: IctWithdrawalTravelRuleAddress, ): string { return JSON.stringify( IctWithdrawalTravelRuleAddress$outboundSchema.parse( ictWithdrawalTravelRuleAddress, ), ); } export function ictWithdrawalTravelRuleAddressFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IctWithdrawalTravelRuleAddress$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IctWithdrawalTravelRuleAddress' from JSON`, ); } /** @internal */ export const IctWithdrawalEntityRecipientParty$inboundSchema: z.ZodType< IctWithdrawalEntityRecipientParty, z.ZodTypeDef, unknown > = z.object({ address: z.nullable( z.lazy(() => IctWithdrawalTravelRuleAddress$inboundSchema), ).optional(), tax_id: z.string().optional(), title: z.string().optional(), }).transform((v) => { return remap$(v, { "tax_id": "taxId", }); }); /** @internal */ export type IctWithdrawalEntityRecipientParty$Outbound = { address?: IctWithdrawalTravelRuleAddress$Outbound | null | undefined; tax_id?: string | undefined; title?: string | undefined; }; /** @internal */ export const IctWithdrawalEntityRecipientParty$outboundSchema: z.ZodType< IctWithdrawalEntityRecipientParty$Outbound, z.ZodTypeDef, IctWithdrawalEntityRecipientParty > = z.object({ address: z.nullable( z.lazy(() => IctWithdrawalTravelRuleAddress$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 IctWithdrawalEntityRecipientParty$ { /** @deprecated use `IctWithdrawalEntityRecipientParty$inboundSchema` instead. */ export const inboundSchema = IctWithdrawalEntityRecipientParty$inboundSchema; /** @deprecated use `IctWithdrawalEntityRecipientParty$outboundSchema` instead. */ export const outboundSchema = IctWithdrawalEntityRecipientParty$outboundSchema; /** @deprecated use `IctWithdrawalEntityRecipientParty$Outbound` instead. */ export type Outbound = IctWithdrawalEntityRecipientParty$Outbound; } export function ictWithdrawalEntityRecipientPartyToJSON( ictWithdrawalEntityRecipientParty: IctWithdrawalEntityRecipientParty, ): string { return JSON.stringify( IctWithdrawalEntityRecipientParty$outboundSchema.parse( ictWithdrawalEntityRecipientParty, ), ); } export function ictWithdrawalEntityRecipientPartyFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IctWithdrawalEntityRecipientParty$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IctWithdrawalEntityRecipientParty' from JSON`, ); } /** @internal */ export const IctWithdrawalTravelRuleIndividualOriginatingPartyAddress$inboundSchema: z.ZodType< IctWithdrawalTravelRuleIndividualOriginatingPartyAddress, 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 IctWithdrawalTravelRuleIndividualOriginatingPartyAddress$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 IctWithdrawalTravelRuleIndividualOriginatingPartyAddress$outboundSchema: z.ZodType< IctWithdrawalTravelRuleIndividualOriginatingPartyAddress$Outbound, z.ZodTypeDef, IctWithdrawalTravelRuleIndividualOriginatingPartyAddress > = 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 IctWithdrawalTravelRuleIndividualOriginatingPartyAddress$ { /** @deprecated use `IctWithdrawalTravelRuleIndividualOriginatingPartyAddress$inboundSchema` instead. */ export const inboundSchema = IctWithdrawalTravelRuleIndividualOriginatingPartyAddress$inboundSchema; /** @deprecated use `IctWithdrawalTravelRuleIndividualOriginatingPartyAddress$outboundSchema` instead. */ export const outboundSchema = IctWithdrawalTravelRuleIndividualOriginatingPartyAddress$outboundSchema; /** @deprecated use `IctWithdrawalTravelRuleIndividualOriginatingPartyAddress$Outbound` instead. */ export type Outbound = IctWithdrawalTravelRuleIndividualOriginatingPartyAddress$Outbound; } export function ictWithdrawalTravelRuleIndividualOriginatingPartyAddressToJSON( ictWithdrawalTravelRuleIndividualOriginatingPartyAddress: IctWithdrawalTravelRuleIndividualOriginatingPartyAddress, ): string { return JSON.stringify( IctWithdrawalTravelRuleIndividualOriginatingPartyAddress$outboundSchema .parse(ictWithdrawalTravelRuleIndividualOriginatingPartyAddress), ); } export function ictWithdrawalTravelRuleIndividualOriginatingPartyAddressFromJSON( jsonString: string, ): SafeParseResult< IctWithdrawalTravelRuleIndividualOriginatingPartyAddress, SDKValidationError > { return safeParse( jsonString, (x) => IctWithdrawalTravelRuleIndividualOriginatingPartyAddress$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'IctWithdrawalTravelRuleIndividualOriginatingPartyAddress' from JSON`, ); } /** @internal */ export const IctWithdrawalIndividualOriginatingParty$inboundSchema: z.ZodType< IctWithdrawalIndividualOriginatingParty, z.ZodTypeDef, unknown > = z.object({ address: z.nullable( z.lazy(() => IctWithdrawalTravelRuleIndividualOriginatingPartyAddress$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 IctWithdrawalIndividualOriginatingParty$Outbound = { address?: | IctWithdrawalTravelRuleIndividualOriginatingPartyAddress$Outbound | null | undefined; family_name?: string | undefined; given_names?: Array | undefined; }; /** @internal */ export const IctWithdrawalIndividualOriginatingParty$outboundSchema: z.ZodType< IctWithdrawalIndividualOriginatingParty$Outbound, z.ZodTypeDef, IctWithdrawalIndividualOriginatingParty > = z.object({ address: z.nullable( z.lazy(() => IctWithdrawalTravelRuleIndividualOriginatingPartyAddress$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 IctWithdrawalIndividualOriginatingParty$ { /** @deprecated use `IctWithdrawalIndividualOriginatingParty$inboundSchema` instead. */ export const inboundSchema = IctWithdrawalIndividualOriginatingParty$inboundSchema; /** @deprecated use `IctWithdrawalIndividualOriginatingParty$outboundSchema` instead. */ export const outboundSchema = IctWithdrawalIndividualOriginatingParty$outboundSchema; /** @deprecated use `IctWithdrawalIndividualOriginatingParty$Outbound` instead. */ export type Outbound = IctWithdrawalIndividualOriginatingParty$Outbound; } export function ictWithdrawalIndividualOriginatingPartyToJSON( ictWithdrawalIndividualOriginatingParty: IctWithdrawalIndividualOriginatingParty, ): string { return JSON.stringify( IctWithdrawalIndividualOriginatingParty$outboundSchema.parse( ictWithdrawalIndividualOriginatingParty, ), ); } export function ictWithdrawalIndividualOriginatingPartyFromJSON( jsonString: string, ): SafeParseResult< IctWithdrawalIndividualOriginatingParty, SDKValidationError > { return safeParse( jsonString, (x) => IctWithdrawalIndividualOriginatingParty$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'IctWithdrawalIndividualOriginatingParty' from JSON`, ); } /** @internal */ export const IctWithdrawalTravelRuleIndividualRecipientPartyAddress$inboundSchema: z.ZodType< IctWithdrawalTravelRuleIndividualRecipientPartyAddress, 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 IctWithdrawalTravelRuleIndividualRecipientPartyAddress$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 IctWithdrawalTravelRuleIndividualRecipientPartyAddress$outboundSchema: z.ZodType< IctWithdrawalTravelRuleIndividualRecipientPartyAddress$Outbound, z.ZodTypeDef, IctWithdrawalTravelRuleIndividualRecipientPartyAddress > = 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 IctWithdrawalTravelRuleIndividualRecipientPartyAddress$ { /** @deprecated use `IctWithdrawalTravelRuleIndividualRecipientPartyAddress$inboundSchema` instead. */ export const inboundSchema = IctWithdrawalTravelRuleIndividualRecipientPartyAddress$inboundSchema; /** @deprecated use `IctWithdrawalTravelRuleIndividualRecipientPartyAddress$outboundSchema` instead. */ export const outboundSchema = IctWithdrawalTravelRuleIndividualRecipientPartyAddress$outboundSchema; /** @deprecated use `IctWithdrawalTravelRuleIndividualRecipientPartyAddress$Outbound` instead. */ export type Outbound = IctWithdrawalTravelRuleIndividualRecipientPartyAddress$Outbound; } export function ictWithdrawalTravelRuleIndividualRecipientPartyAddressToJSON( ictWithdrawalTravelRuleIndividualRecipientPartyAddress: IctWithdrawalTravelRuleIndividualRecipientPartyAddress, ): string { return JSON.stringify( IctWithdrawalTravelRuleIndividualRecipientPartyAddress$outboundSchema.parse( ictWithdrawalTravelRuleIndividualRecipientPartyAddress, ), ); } export function ictWithdrawalTravelRuleIndividualRecipientPartyAddressFromJSON( jsonString: string, ): SafeParseResult< IctWithdrawalTravelRuleIndividualRecipientPartyAddress, SDKValidationError > { return safeParse( jsonString, (x) => IctWithdrawalTravelRuleIndividualRecipientPartyAddress$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'IctWithdrawalTravelRuleIndividualRecipientPartyAddress' from JSON`, ); } /** @internal */ export const IctWithdrawalIndividualRecipientParty$inboundSchema: z.ZodType< IctWithdrawalIndividualRecipientParty, z.ZodTypeDef, unknown > = z.object({ address: z.nullable( z.lazy(() => IctWithdrawalTravelRuleIndividualRecipientPartyAddress$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 IctWithdrawalIndividualRecipientParty$Outbound = { address?: | IctWithdrawalTravelRuleIndividualRecipientPartyAddress$Outbound | null | undefined; family_name?: string | undefined; given_names?: Array | undefined; }; /** @internal */ export const IctWithdrawalIndividualRecipientParty$outboundSchema: z.ZodType< IctWithdrawalIndividualRecipientParty$Outbound, z.ZodTypeDef, IctWithdrawalIndividualRecipientParty > = z.object({ address: z.nullable( z.lazy(() => IctWithdrawalTravelRuleIndividualRecipientPartyAddress$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 IctWithdrawalIndividualRecipientParty$ { /** @deprecated use `IctWithdrawalIndividualRecipientParty$inboundSchema` instead. */ export const inboundSchema = IctWithdrawalIndividualRecipientParty$inboundSchema; /** @deprecated use `IctWithdrawalIndividualRecipientParty$outboundSchema` instead. */ export const outboundSchema = IctWithdrawalIndividualRecipientParty$outboundSchema; /** @deprecated use `IctWithdrawalIndividualRecipientParty$Outbound` instead. */ export type Outbound = IctWithdrawalIndividualRecipientParty$Outbound; } export function ictWithdrawalIndividualRecipientPartyToJSON( ictWithdrawalIndividualRecipientParty: IctWithdrawalIndividualRecipientParty, ): string { return JSON.stringify( IctWithdrawalIndividualRecipientParty$outboundSchema.parse( ictWithdrawalIndividualRecipientParty, ), ); } export function ictWithdrawalIndividualRecipientPartyFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IctWithdrawalIndividualRecipientParty$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IctWithdrawalIndividualRecipientParty' from JSON`, ); } /** @internal */ export const IctWithdrawalOriginatingInstitution$inboundSchema: z.ZodType< IctWithdrawalOriginatingInstitution, 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 IctWithdrawalOriginatingInstitution$Outbound = { account_id?: string | undefined; title?: string | undefined; }; /** @internal */ export const IctWithdrawalOriginatingInstitution$outboundSchema: z.ZodType< IctWithdrawalOriginatingInstitution$Outbound, z.ZodTypeDef, IctWithdrawalOriginatingInstitution > = 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 IctWithdrawalOriginatingInstitution$ { /** @deprecated use `IctWithdrawalOriginatingInstitution$inboundSchema` instead. */ export const inboundSchema = IctWithdrawalOriginatingInstitution$inboundSchema; /** @deprecated use `IctWithdrawalOriginatingInstitution$outboundSchema` instead. */ export const outboundSchema = IctWithdrawalOriginatingInstitution$outboundSchema; /** @deprecated use `IctWithdrawalOriginatingInstitution$Outbound` instead. */ export type Outbound = IctWithdrawalOriginatingInstitution$Outbound; } export function ictWithdrawalOriginatingInstitutionToJSON( ictWithdrawalOriginatingInstitution: IctWithdrawalOriginatingInstitution, ): string { return JSON.stringify( IctWithdrawalOriginatingInstitution$outboundSchema.parse( ictWithdrawalOriginatingInstitution, ), ); } export function ictWithdrawalOriginatingInstitutionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IctWithdrawalOriginatingInstitution$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IctWithdrawalOriginatingInstitution' from JSON`, ); } /** @internal */ export const IctWithdrawalRecipientInstitution$inboundSchema: z.ZodType< IctWithdrawalRecipientInstitution, 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 IctWithdrawalRecipientInstitution$Outbound = { account_id?: string | undefined; title?: string | undefined; }; /** @internal */ export const IctWithdrawalRecipientInstitution$outboundSchema: z.ZodType< IctWithdrawalRecipientInstitution$Outbound, z.ZodTypeDef, IctWithdrawalRecipientInstitution > = 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 IctWithdrawalRecipientInstitution$ { /** @deprecated use `IctWithdrawalRecipientInstitution$inboundSchema` instead. */ export const inboundSchema = IctWithdrawalRecipientInstitution$inboundSchema; /** @deprecated use `IctWithdrawalRecipientInstitution$outboundSchema` instead. */ export const outboundSchema = IctWithdrawalRecipientInstitution$outboundSchema; /** @deprecated use `IctWithdrawalRecipientInstitution$Outbound` instead. */ export type Outbound = IctWithdrawalRecipientInstitution$Outbound; } export function ictWithdrawalRecipientInstitutionToJSON( ictWithdrawalRecipientInstitution: IctWithdrawalRecipientInstitution, ): string { return JSON.stringify( IctWithdrawalRecipientInstitution$outboundSchema.parse( ictWithdrawalRecipientInstitution, ), ); } export function ictWithdrawalRecipientInstitutionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IctWithdrawalRecipientInstitution$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IctWithdrawalRecipientInstitution' from JSON`, ); } /** @internal */ export const IctWithdrawalTravelRule$inboundSchema: z.ZodType< IctWithdrawalTravelRule, z.ZodTypeDef, unknown > = z.object({ entity_originating_party: z.nullable( z.lazy(() => IctWithdrawalEntityOriginatingParty$inboundSchema), ).optional(), entity_recipient_party: z.nullable( z.lazy(() => IctWithdrawalEntityRecipientParty$inboundSchema), ).optional(), individual_originating_party: z.nullable( z.lazy(() => IctWithdrawalIndividualOriginatingParty$inboundSchema), ).optional(), individual_recipient_party: z.nullable( z.lazy(() => IctWithdrawalIndividualRecipientParty$inboundSchema), ).optional(), originating_institution: z.nullable( z.lazy(() => IctWithdrawalOriginatingInstitution$inboundSchema), ).optional(), recipient_institution: z.nullable( z.lazy(() => IctWithdrawalRecipientInstitution$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 IctWithdrawalTravelRule$Outbound = { entity_originating_party?: | IctWithdrawalEntityOriginatingParty$Outbound | null | undefined; entity_recipient_party?: | IctWithdrawalEntityRecipientParty$Outbound | null | undefined; individual_originating_party?: | IctWithdrawalIndividualOriginatingParty$Outbound | null | undefined; individual_recipient_party?: | IctWithdrawalIndividualRecipientParty$Outbound | null | undefined; originating_institution?: | IctWithdrawalOriginatingInstitution$Outbound | null | undefined; recipient_institution?: | IctWithdrawalRecipientInstitution$Outbound | null | undefined; }; /** @internal */ export const IctWithdrawalTravelRule$outboundSchema: z.ZodType< IctWithdrawalTravelRule$Outbound, z.ZodTypeDef, IctWithdrawalTravelRule > = z.object({ entityOriginatingParty: z.nullable( z.lazy(() => IctWithdrawalEntityOriginatingParty$outboundSchema), ).optional(), entityRecipientParty: z.nullable( z.lazy(() => IctWithdrawalEntityRecipientParty$outboundSchema), ).optional(), individualOriginatingParty: z.nullable( z.lazy(() => IctWithdrawalIndividualOriginatingParty$outboundSchema), ).optional(), individualRecipientParty: z.nullable( z.lazy(() => IctWithdrawalIndividualRecipientParty$outboundSchema), ).optional(), originatingInstitution: z.nullable( z.lazy(() => IctWithdrawalOriginatingInstitution$outboundSchema), ).optional(), recipientInstitution: z.nullable( z.lazy(() => IctWithdrawalRecipientInstitution$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 IctWithdrawalTravelRule$ { /** @deprecated use `IctWithdrawalTravelRule$inboundSchema` instead. */ export const inboundSchema = IctWithdrawalTravelRule$inboundSchema; /** @deprecated use `IctWithdrawalTravelRule$outboundSchema` instead. */ export const outboundSchema = IctWithdrawalTravelRule$outboundSchema; /** @deprecated use `IctWithdrawalTravelRule$Outbound` instead. */ export type Outbound = IctWithdrawalTravelRule$Outbound; } export function ictWithdrawalTravelRuleToJSON( ictWithdrawalTravelRule: IctWithdrawalTravelRule, ): string { return JSON.stringify( IctWithdrawalTravelRule$outboundSchema.parse(ictWithdrawalTravelRule), ); } export function ictWithdrawalTravelRuleFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IctWithdrawalTravelRule$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IctWithdrawalTravelRule' from JSON`, ); } /** @internal */ export const IctWithdrawal$inboundSchema: z.ZodType< IctWithdrawal, z.ZodTypeDef, unknown > = z.object({ amount: z.nullable(z.lazy(() => IctWithdrawalAmount$inboundSchema)) .optional(), client_transfer_id: z.string().optional(), name: z.string().optional(), program: IctWithdrawalProgram$inboundSchema.optional(), retirement_distribution: z.nullable( z.lazy(() => IctWithdrawalRetirementDistribution$inboundSchema), ).optional(), state: z.nullable(z.lazy(() => IctWithdrawalState$inboundSchema)).optional(), transfer_state: z.nullable( z.lazy(() => IctWithdrawalTransferState$inboundSchema), ).optional(), travel_rule: z.nullable(z.lazy(() => IctWithdrawalTravelRule$inboundSchema)) .optional(), }).transform((v) => { return remap$(v, { "client_transfer_id": "clientTransferId", "retirement_distribution": "retirementDistribution", "transfer_state": "transferState", "travel_rule": "travelRule", }); }); /** @internal */ export type IctWithdrawal$Outbound = { amount?: IctWithdrawalAmount$Outbound | null | undefined; client_transfer_id?: string | undefined; name?: string | undefined; program?: string | undefined; retirement_distribution?: | IctWithdrawalRetirementDistribution$Outbound | null | undefined; state?: IctWithdrawalState$Outbound | null | undefined; transfer_state?: IctWithdrawalTransferState$Outbound | null | undefined; travel_rule?: IctWithdrawalTravelRule$Outbound | null | undefined; }; /** @internal */ export const IctWithdrawal$outboundSchema: z.ZodType< IctWithdrawal$Outbound, z.ZodTypeDef, IctWithdrawal > = z.object({ amount: z.nullable(z.lazy(() => IctWithdrawalAmount$outboundSchema)) .optional(), clientTransferId: z.string().optional(), name: z.string().optional(), program: IctWithdrawalProgram$outboundSchema.optional(), retirementDistribution: z.nullable( z.lazy(() => IctWithdrawalRetirementDistribution$outboundSchema), ).optional(), state: z.nullable(z.lazy(() => IctWithdrawalState$outboundSchema)).optional(), transferState: z.nullable( z.lazy(() => IctWithdrawalTransferState$outboundSchema), ).optional(), travelRule: z.nullable(z.lazy(() => IctWithdrawalTravelRule$outboundSchema)) .optional(), }).transform((v) => { return remap$(v, { clientTransferId: "client_transfer_id", retirementDistribution: "retirement_distribution", 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 IctWithdrawal$ { /** @deprecated use `IctWithdrawal$inboundSchema` instead. */ export const inboundSchema = IctWithdrawal$inboundSchema; /** @deprecated use `IctWithdrawal$outboundSchema` instead. */ export const outboundSchema = IctWithdrawal$outboundSchema; /** @deprecated use `IctWithdrawal$Outbound` instead. */ export type Outbound = IctWithdrawal$Outbound; } export function ictWithdrawalToJSON(ictWithdrawal: IctWithdrawal): string { return JSON.stringify(IctWithdrawal$outboundSchema.parse(ictWithdrawal)); } export function ictWithdrawalFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IctWithdrawal$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IctWithdrawal' from JSON`, ); }