@paxosglobal/sdk 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +268 -0
- package/CHANGELOG.md +35 -0
- package/LICENSE +191 -0
- package/README.md +445 -2
- package/dist/auth.d.ts +60 -0
- package/dist/auth.js +248 -0
- package/dist/auth.js.map +1 -0
- package/dist/client.d.ts +353 -0
- package/dist/client.js +967 -0
- package/dist/client.js.map +1 -0
- package/dist/constants.d.ts +16 -0
- package/dist/constants.js +17 -0
- package/dist/constants.js.map +1 -0
- package/dist/decimal-fields.d.ts +16 -0
- package/dist/decimal-fields.js +570 -0
- package/dist/decimal-fields.js.map +1 -0
- package/dist/decimal.d.ts +25 -0
- package/dist/decimal.js +93 -0
- package/dist/decimal.js.map +1 -0
- package/dist/decode.d.ts +34 -0
- package/dist/decode.js +118 -0
- package/dist/decode.js.map +1 -0
- package/dist/enums.d.ts +1080 -0
- package/dist/enums.js +1031 -0
- package/dist/enums.js.map +1 -0
- package/dist/errors.d.ts +142 -0
- package/dist/errors.js +261 -0
- package/dist/errors.js.map +1 -0
- package/dist/generated-types.d.ts +13629 -0
- package/dist/generated-types.js +3 -0
- package/dist/generated-types.js.map +1 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -0
- package/dist/models.d.ts +299 -0
- package/dist/models.js +3 -0
- package/dist/models.js.map +1 -0
- package/dist/paxos-client.d.ts +107 -0
- package/dist/paxos-client.js +157 -0
- package/dist/paxos-client.js.map +1 -0
- package/dist/query-keys.d.ts +1 -0
- package/dist/query-keys.js +31 -0
- package/dist/query-keys.js.map +1 -0
- package/dist/response-defaults.d.ts +2 -0
- package/dist/response-defaults.js +109 -0
- package/dist/response-defaults.js.map +1 -0
- package/dist/services/account-members.d.ts +32 -0
- package/dist/services/account-members.js +46 -0
- package/dist/services/account-members.js.map +1 -0
- package/dist/services/accounts.d.ts +74 -0
- package/dist/services/accounts.js +71 -0
- package/dist/services/accounts.js.map +1 -0
- package/dist/services/address-verification.d.ts +72 -0
- package/dist/services/address-verification.js +64 -0
- package/dist/services/address-verification.js.map +1 -0
- package/dist/services/api-credentials.d.ts +44 -0
- package/dist/services/api-credentials.js +42 -0
- package/dist/services/api-credentials.js.map +1 -0
- package/dist/services/claims.d.ts +68 -0
- package/dist/services/claims.js +67 -0
- package/dist/services/claims.js.map +1 -0
- package/dist/services/cross-chain-transfer.d.ts +71 -0
- package/dist/services/cross-chain-transfer.js +68 -0
- package/dist/services/cross-chain-transfer.js.map +1 -0
- package/dist/services/crypto-deposits.d.ts +30 -0
- package/dist/services/crypto-deposits.js +39 -0
- package/dist/services/crypto-deposits.js.map +1 -0
- package/dist/services/crypto-withdrawals.d.ts +60 -0
- package/dist/services/crypto-withdrawals.js +42 -0
- package/dist/services/crypto-withdrawals.js.map +1 -0
- package/dist/services/deposit-addresses.d.ts +54 -0
- package/dist/services/deposit-addresses.js +36 -0
- package/dist/services/deposit-addresses.js.map +1 -0
- package/dist/services/events.d.ts +53 -0
- package/dist/services/events.js +39 -0
- package/dist/services/events.js.map +1 -0
- package/dist/services/exchange.d.ts +52 -0
- package/dist/services/exchange.js +30 -0
- package/dist/services/exchange.js.map +1 -0
- package/dist/services/fees.d.ts +15 -0
- package/dist/services/fees.js +24 -0
- package/dist/services/fees.js.map +1 -0
- package/dist/services/fiat-transfers.d.ts +133 -0
- package/dist/services/fiat-transfers.js +127 -0
- package/dist/services/fiat-transfers.js.map +1 -0
- package/dist/services/identity-controls.d.ts +43 -0
- package/dist/services/identity-controls.js +42 -0
- package/dist/services/identity-controls.js.map +1 -0
- package/dist/services/identity-documents.d.ts +45 -0
- package/dist/services/identity-documents.js +50 -0
- package/dist/services/identity-documents.js.map +1 -0
- package/dist/services/identity.d.ts +122 -0
- package/dist/services/identity.js +66 -0
- package/dist/services/identity.js.map +1 -0
- package/dist/services/index.d.ts +89 -0
- package/dist/services/index.js +55 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/institution-members.d.ts +30 -0
- package/dist/services/institution-members.js +44 -0
- package/dist/services/institution-members.js.map +1 -0
- package/dist/services/internal-transfers.d.ts +15 -0
- package/dist/services/internal-transfers.js +26 -0
- package/dist/services/internal-transfers.js.map +1 -0
- package/dist/services/issuer-quotes.d.ts +72 -0
- package/dist/services/issuer-quotes.js +66 -0
- package/dist/services/issuer-quotes.js.map +1 -0
- package/dist/services/limits.d.ts +20 -0
- package/dist/services/limits.js +23 -0
- package/dist/services/limits.js.map +1 -0
- package/dist/services/market-data.d.ts +15 -0
- package/dist/services/market-data.js +23 -0
- package/dist/services/market-data.js.map +1 -0
- package/dist/services/monitoring-addresses.d.ts +64 -0
- package/dist/services/monitoring-addresses.js +68 -0
- package/dist/services/monitoring-addresses.js.map +1 -0
- package/dist/services/orchestration-rules.d.ts +53 -0
- package/dist/services/orchestration-rules.js +47 -0
- package/dist/services/orchestration-rules.js.map +1 -0
- package/dist/services/orchestrations.d.ts +70 -0
- package/dist/services/orchestrations.js +45 -0
- package/dist/services/orchestrations.js.map +1 -0
- package/dist/services/orders.d.ts +86 -0
- package/dist/services/orders.js +67 -0
- package/dist/services/orders.js.map +1 -0
- package/dist/services/paxos-transfers.d.ts +24 -0
- package/dist/services/paxos-transfers.js +35 -0
- package/dist/services/paxos-transfers.js.map +1 -0
- package/dist/services/payments.d.ts +46 -0
- package/dist/services/payments.js +35 -0
- package/dist/services/payments.js.map +1 -0
- package/dist/services/payout-groups.d.ts +59 -0
- package/dist/services/payout-groups.js +59 -0
- package/dist/services/payout-groups.js.map +1 -0
- package/dist/services/pricing.d.ts +67 -0
- package/dist/services/pricing.js +42 -0
- package/dist/services/pricing.js.map +1 -0
- package/dist/services/profiles.d.ts +106 -0
- package/dist/services/profiles.js +84 -0
- package/dist/services/profiles.js.map +1 -0
- package/dist/services/quote-executions.d.ts +51 -0
- package/dist/services/quote-executions.js +41 -0
- package/dist/services/quote-executions.js.map +1 -0
- package/dist/services/quotes.d.ts +44 -0
- package/dist/services/quotes.js +48 -0
- package/dist/services/quotes.js.map +1 -0
- package/dist/services/reward-addresses.d.ts +80 -0
- package/dist/services/reward-addresses.js +79 -0
- package/dist/services/reward-addresses.js.map +1 -0
- package/dist/services/rewards-statements.d.ts +35 -0
- package/dist/services/rewards-statements.js +32 -0
- package/dist/services/rewards-statements.js.map +1 -0
- package/dist/services/rewards.d.ts +34 -0
- package/dist/services/rewards.js +37 -0
- package/dist/services/rewards.js.map +1 -0
- package/dist/services/sandbox-deposits.d.ts +15 -0
- package/dist/services/sandbox-deposits.js +22 -0
- package/dist/services/sandbox-deposits.js.map +1 -0
- package/dist/services/sandbox-fiat-transfers.d.ts +15 -0
- package/dist/services/sandbox-fiat-transfers.js +24 -0
- package/dist/services/sandbox-fiat-transfers.js.map +1 -0
- package/dist/services/sandbox-identity.d.ts +39 -0
- package/dist/services/sandbox-identity.js +60 -0
- package/dist/services/sandbox-identity.js.map +1 -0
- package/dist/services/settlement.d.ts +76 -0
- package/dist/services/settlement.js +79 -0
- package/dist/services/settlement.js.map +1 -0
- package/dist/services/stablecoin-conversion.d.ts +70 -0
- package/dist/services/stablecoin-conversion.js +65 -0
- package/dist/services/stablecoin-conversion.js.map +1 -0
- package/dist/services/statements.d.ts +44 -0
- package/dist/services/statements.js +35 -0
- package/dist/services/statements.js.map +1 -0
- package/dist/services/tax-documentation.d.ts +21 -0
- package/dist/services/tax-documentation.js +33 -0
- package/dist/services/tax-documentation.js.map +1 -0
- package/dist/services/tax-forms.d.ts +45 -0
- package/dist/services/tax-forms.js +38 -0
- package/dist/services/tax-forms.js.map +1 -0
- package/dist/services/transfers.d.ts +96 -0
- package/dist/services/transfers.js +37 -0
- package/dist/services/transfers.js.map +1 -0
- package/dist/services/travel-rule.d.ts +32 -0
- package/dist/services/travel-rule.js +30 -0
- package/dist/services/travel-rule.js.map +1 -0
- package/dist/services/user-audit-logs.d.ts +45 -0
- package/dist/services/user-audit-logs.js +27 -0
- package/dist/services/user-audit-logs.js.map +1 -0
- package/dist/services/webhooks.d.ts +58 -0
- package/dist/services/webhooks.js +42 -0
- package/dist/services/webhooks.js.map +1 -0
- package/dist/signing.d.ts +33 -0
- package/dist/signing.js +186 -0
- package/dist/signing.js.map +1 -0
- package/dist/testing/fixtures.d.ts +40 -0
- package/dist/testing/fixtures.js +131 -0
- package/dist/testing/fixtures.js.map +1 -0
- package/dist/testing/index.d.ts +28 -0
- package/dist/testing/index.js +28 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/mock-server.d.ts +121 -0
- package/dist/testing/mock-server.js +276 -0
- package/dist/testing/mock-server.js.map +1 -0
- package/dist/timeouts.d.ts +13 -0
- package/dist/timeouts.js +71 -0
- package/dist/timeouts.js.map +1 -0
- package/dist/types.d.ts +6 -0
- package/dist/types.js +7 -0
- package/dist/types.js.map +1 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +2 -0
- package/dist/version.js.map +1 -0
- package/package.json +67 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decimal-fields.js","sourceRoot":"","sources":["../src/decimal-fields.ts"],"names":[],"mappings":"AAAA,oEAAoE;AAEpE;;;;GAIG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAkD;IACrF,kBAAkB,EAAE,IAAI,GAAG,CAAC,CAAC,yBAAyB,EAAE,iBAAiB,EAAE,yBAAyB,CAAC,CAAC;IACtG,kBAAkB,EAAE,IAAI,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC;IACxC,iBAAiB,EAAE,IAAI,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;IACtC,gBAAgB,EAAE,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IACrE,KAAK,EAAE,IAAI,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;IAC1B,gCAAgC,EAAE,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,O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AAiB,EAAE,kBAAkB,CAAC,CAAC;CAC/D,CAAC","sourcesContent":["// Code generated from the Paxos OpenAPI specification. DO NOT EDIT.\n\n/**\n * Per-schema map of field names that represent monetary/decimal values in\n * the API. These fields are transmitted as strings on the wire but should\n * be treated as decimal values for precision.\n */\nexport const DECIMAL_FIELDS_BY_SCHEMA: Readonly<Record<string, ReadonlySet<string>>> = {\n AssetRewardDetails: new Set([\"est_next_accrual_amount\", \"lifetime_earned\", \"total_available_rewards\"]),\n AttributionAddress: new Set([\"balance\"]),\n BalanceTypeAmount: new Set([\"amount\"]),\n CandlestickPrice: new Set([\"close\", \"high\", \"low\", \"open\", \"volume\"]),\n Claim: new Set([\"amount\"]),\n CreateCryptoWithdrawalFeeRequest: new Set([\"amount\", \"total\"]),\n CreateCryptoWithdrawalRequest: new Set([\"amount\", \"total\"]),\n CreateFiatWithdrawalRequest: new Set([\"amount\", \"total\"]),\n CreateInternalTransferRequest: new Set([\"amount\"]),\n CreateIssuerQuoteRequest: new Set([\"base_amount\"]),\n CreateIssuerQuoteResponse: new Set([\"fee\", \"price\", \"quantity\", \"quote_amount\"]),\n CreateObligationRequest: new Set([\"amount\"]),\n CreateOrchestrationRequest: new Set([\"source_amount\"]),\n CreateOrderRequest: new Set([\"base_amount\", \"price\", \"quote_amount\", \"stop_price\"]),\n CreatePaxosTransferRequest: new Set([\"amount\"]),\n CreateQuoteExecutionRequest: new Set([\"base_amount\", \"quote_amount\"]),\n CreateSandboxDepositRequest: new Set([\"amount\"]),\n CreateStablecoinConversionRequest: new Set([\"amount\"]),\n CrossChainAttestation: new Set([\"burn_amount\", \"minted_amount\"]),\n CrossChainFees: new Set([\"forwarding_fee\", \"transfer_fee\"]),\n CrossChainMintAuthorization: new Set([\"mint_amount\"]),\n CrossChainTransfer: new Set([\"burn_amount\", \"minted_amount\"]),\n CrossChainTransferForwarding: new Set([\"fee\"]),\n CryptoWithdrawalFee: new Set([\"amount\", \"fee\", \"total\"]),\n Execution: new Set([\"amount\", \"commission\", \"gross_trade_amount\", \"price\", \"rebate\"]),\n GetIssuerQuoteSettlementAvailabilityResponse: new Set([\"buy_quantity\", \"sell_quantity\"]),\n GetRewardDetailsResponse: new Set([\"est_next_accrual_amount\", \"lifetime_earned\", \"total_available_rewards\"]),\n HistoricalPrice: new Set([\"average_price\"]),\n InitiateSandboxFiatDepositRequest: new Set([\"amount\"]),\n InstitutionMember: new Set([\"ownership\"]),\n IssuerQuoteExecution: new Set([\"fee\", \"principal\", \"token_fee\", \"token_price\", \"token_principal\"]),\n MarketDetails: new Set([\"max_base_amount\", \"max_quote_amount\", \"min_base_amount\", \"min_quote_amount\", \"tick_rate\"]),\n Obligation: new Set([\"amount\"]),\n Orchestration: new Set([\"source_amount\"]),\n Order: new Set([\n \"amount_filled\",\n \"base_amount\",\n \"price\",\n \"quote_amount\",\n \"stop_price\",\n \"volume_weighted_average_price\",\n ]),\n Payment: new Set([\"payment_amount\"]),\n PayoutGroup: new Set([\"balance\"]),\n Pricing: new Set([\"current_price\", \"yesterday_price\"]),\n ProfileBalance: new Set([\"available\", \"trading\"]),\n Quote: new Set([\"price\"]),\n QuoteExecution: new Set([\"base_amount\", \"price\", \"quote_amount\"]),\n RewardRate: new Set([\"rate\"]),\n RewardsStatement: new Set([\"avg_daily_balance\", \"total_accrued\"]),\n SmallDepositVerification: new Set([\"amount\"]),\n StablecoinConversion: new Set([\"amount\"]),\n StatementBalance: new Set([\"amount_paid\", \"total_amount_owed\"]),\n Transfer: new Set([\"amount\", \"fee\", \"notional_value\", \"total\"]),\n TransferLimit: new Set([\"limit\", \"remaining\"]),\n W8BenETaxDocumentation: new Set([\"withholding_rate\"]),\n W8BenTaxDocumentation: new Set([\"withholding_rate\"]),\n};\n\n/**\n * Per-schema map of fields that reference another schema, directly or via\n * an array, used to resolve the schema of a nested object/array when\n * recursing during decimal conversion.\n */\nexport const NESTED_SCHEMA_REFS: Readonly<Record<string, Readonly<Record<string, string>>>> = {\n Account: { members: \"AccountMember\" },\n AddAccountMembersRequest: { members: \"AccountMember\" },\n AddAccountMembersResponse: { members: \"AccountMember\" },\n AddInstitutionMembersRequest: { members: \"InstitutionMember\" },\n AddInstitutionMembersResponse: { members: \"InstitutionMember\" },\n AddressInfo: { individual_info: \"IndividualInfo\", institution_info: \"InstitutionInfo\" },\n AttributionAddressError: { address: \"BatchCreateAttributionAddressOutput\" },\n BatchCreateAttributionAddressesRequest: { addresses: \"BatchCreateAttributionAddressInput\" },\n BatchCreateAttributionAddressesResponse: {\n failed_addresses: \"AttributionAddressError\",\n successful_addresses: \"BatchCreateAttributionAddressOutput\",\n },\n Beneficiary: { institution_details: \"BeneficiaryInstitution\", person_details: \"BeneficiaryPerson\" },\n BeneficiaryInstitution: { physical_address: \"GeographicAddress\" },\n BeneficiaryPerson: { physical_address: \"GeographicAddress\" },\n CreateAccountRequest: { account: \"Account\" },\n CreateAttributionAddressRequest: { address: \"AttributionAddress\" },\n CreateAttributionAddressResponse: { address: \"AttributionAddress\" },\n CreateClaimScheduleResponse: { claim_schedule: \"ClaimSchedule\" },\n CreateCryptoWithdrawalRequest: { beneficiary: \"CryptoWithdrawalBeneficiary\" },\n CreateFiatAccountRequest: {\n fiat_account_owner: \"FiatAccountOwner\",\n fiat_network_instructions: \"FiatNetworkInstructions\",\n },\n CreateIdentityRequest: {\n customer_due_diligence: \"CustomerDueDiligence\",\n institution_details: \"InstitutionDetails\",\n institution_members: \"InstitutionMember\",\n person_details: \"PersonDetails\",\n tax_details: \"TaxDetail\",\n },\n CreateMonitoringAddressResponse: { address: \"MonitoringAddress\" },\n CreateOrchestrationRequest: {\n destination: \"CreateOrchestrationRequestDestination\",\n source: \"CreateOrchestrationRequestSource\",\n },\n CreateOrchestrationRequestDestination: {\n crypto: \"CreateOrchestrationRequestCryptoDestination\",\n fiat: \"CreateOrchestrationRequestFiatDestination\",\n profile: \"CreateOrchestrationRequestProfileDestination\",\n },\n CreateOrchestrationRequestSource: { profile: \"CreateOrchestrationRequestProfileSource\" },\n CreateOrchestrationRuleRequest: {\n destination: \"CreateOrchestrationRuleRequestDestination\",\n source: \"CreateOrchestrationRuleRequestSource\",\n },\n CreateOrchestrationRuleRequestDestination: {\n crypto: \"CreateOrchestrationRuleRequestCryptoDestination\",\n fiat: \"CreateOrchestrationRuleRequestFiatDestination\",\n profile: \"CreateOrchestrationRuleRequestProfileDestination\",\n },\n CreateOrchestrationRuleRequestSource: {\n crypto: \"CreateOrchestrationRuleRequestCryptoSource\",\n fiat: \"CreateOrchestrationRuleRequestFiatSource\",\n },\n CreateOrchestrationRuleResponse: { rule: \"OrchestrationRule\" },\n CreatePayoutGroupRequest: { schedule: \"ClaimScheduleConfig\" },\n CreatePayoutGroupResponse: { group: \"PayoutGroup\" },\n CreateTaxDocumentationRequest: { tax_documentation: \"TaxDocumentationPayload\" },\n CreateTransactionRequest: { legs: \"CreateObligationRequest\" },\n CrossChainAttestation: {\n authorization: \"CrossChainMintAuthorization\",\n status_details: \"CrossChainAttestationStatusDetails\",\n },\n CrossChainTransfer: {\n forwarding: \"CrossChainTransferForwarding\",\n status_details: \"CrossChainAttestationStatusDetails\",\n },\n CryptoDestinationAddress: { travelrule_metadata: \"CryptoDestinationAddressTravelruleMetadata\" },\n CryptoDestinationAddressTravelruleMetadata: { beneficiary: \"Beneficiary\", vasp: \"CryptoDestinationAddressVasp\" },\n CryptoWithdrawalBeneficiary: {\n institution_details: \"CryptoWithdrawalBeneficiaryInstitution\",\n person_details: \"CryptoWithdrawalBeneficiaryPerson\",\n },\n DeleteApiCredentialsResponse: { credentials: \"FirstPartyClient\" },\n DeleteOrchestrationRuleResponse: { rule: \"OrchestrationRule\" },\n DeliveryHistorySummary: { attempts: \"DeliveryAttempt\" },\n FiatAccount: { fiat_account_owner: \"FiatAccountOwner\", fiat_network_instructions: \"FiatNetworkInstructions\" },\n FiatAccountOwner: {\n institution_details: \"FiatAccountOwnerInstitutionDetails\",\n person_details: \"FiatAccountOwnerPersonDetails\",\n },\n FiatDepositInstructions: {\n fiat_account_owner: \"FiatAccountOwner\",\n fiat_network_instructions: \"FiatNetworkInstructions\",\n },\n FiatNetworkInstructions: {\n cbit: \"FiatNetworkInstructionsCbit\",\n cubix: \"FiatNetworkInstructionsCubix\",\n dbs_act: \"FiatNetworkInstructionsDbsAct\",\n rtp: \"FiatNetworkInstructionsRtp\",\n scb: \"FiatNetworkInstructionsScb\",\n wire: \"FiatNetworkInstructionsWire\",\n },\n FiatNetworkInstructionsRtp: {\n fiat_account_owner_address: \"MailingAddress\",\n routing_details: \"FiatNetworkInstructionsRtpRoutingDetails\",\n },\n FiatNetworkInstructionsRtpRoutingDetails: { bank_address: \"MailingAddress\" },\n FiatNetworkInstructionsWire: {\n fiat_account_owner_address: \"MailingAddress\",\n intermediary_routing_details: \"FiatNetworkInstructionsWireRoutingDetails\",\n routing_details: \"FiatNetworkInstructionsWireRoutingDetails\",\n },\n FiatNetworkInstructionsWireRoutingDetails: { bank_address: \"MailingAddress\" },\n FirstPartyClient: { client_public_keys: \"ClientPublicKey\" },\n GetMonitoringAddressResponse: { address: \"MonitoringAddress\" },\n GetRewardDetailsResponse: { asset_details: \"AssetRewardDetails\", rates: \"RewardRate\" },\n GetRewardsRatesResponse: { rates: \"RewardRate\" },\n GetRewardsStatementResponse: { statement: \"RewardsStatement\" },\n GetVaspResponse: { vasp: \"Vasp\" },\n Identity: {\n customer_due_diligence: \"CustomerDueDiligence\",\n institution_details: \"InstitutionDetails\",\n institution_members: \"InstitutionMember\",\n person_details: \"PersonDetails\",\n status_details: \"IdentityStatusDetails\",\n tax_details: \"TaxDetail\",\n },\n IdentityRequirement: { errors: \"IdentityRequirementError\" },\n IdentityStatusDetails: { active_controls: \"IdentityControl\", requirements: \"IdentityRequirement\" },\n InitiateSandboxFiatDepositRequest: {\n fiat_account_owner: \"FiatAccountOwner\",\n fiat_network_instructions: \"FiatNetworkInstructions\",\n },\n InstitutionDetails: { business_address: \"IdentityMailingAddress\", incorporation_address: \"IdentityMailingAddress\" },\n ListAccountsResponse: { items: \"Account\" },\n ListApiCredentialsResponse: { items: \"FirstPartyClient\" },\n ListAttributionAddressesResponse: { items: \"AttributionAddress\" },\n ListClaimSchedulesResponse: { items: \"ClaimSchedule\" },\n ListClaimsResponse: { items: \"Claim\" },\n ListCrossChainAttestationsResponse: { items: \"CrossChainAttestation\" },\n ListCrossChainTransfersResponse: { items: \"CrossChainTransfer\" },\n ListCryptoDestinationAddressesResponse: { addresses: \"CryptoDestinationAddress\" },\n ListDeliveryHistoriesResponse: { items: \"DeliveryHistorySummary\" },\n ListDepositAddressesResponse: { items: \"DepositAddress\" },\n ListEventsResponse: { events: \"Event\" },\n ListExecutionsResponse: { items: \"Execution\" },\n ListFiatAccountsResponse: { items: \"FiatAccount\" },\n ListFiatDepositInstructionsResponse: { items: \"FiatDepositInstructions\" },\n ListHistoricalCandlesResponse: { items: \"CandlestickPrice\" },\n ListHistoricalPricesResponse: { items: \"HistoricalPrice\" },\n ListIdentitiesResponse: { items: \"Identity\" },\n ListIdentityControlsResponse: { items: \"IdentityControl\" },\n ListIdentityDocumentsResponse: { documents: \"DocumentDescription\" },\n ListIssuerQuoteExecutionsResponse: { issuer_quote_executions: \"IssuerQuoteExecution\" },\n ListMarketsResponse: { markets: \"MarketDetails\" },\n ListMonitoringAddressResponse: { addresses: \"MonitoringAddress\" },\n ListOrchestrationRulesResponse: { items: \"OrchestrationRule\", rules: \"OrchestrationRule\" },\n ListOrchestrationsResponse: { items: \"Orchestration\", orchestrations: \"Orchestration\" },\n ListOrdersResponse: { items: \"Order\" },\n ListPaymentsResponse: { payments: \"Payment\" },\n ListPayoutGroupsResponse: { items: \"PayoutGroup\" },\n ListPricesResponse: { items: \"Pricing\" },\n ListProfileBalancesResponse: { items: \"ProfileBalance\" },\n ListProfilesResponse: { items: \"Profile\" },\n ListQuoteExecutionsResponse: { items: \"QuoteExecution\" },\n ListQuotesResponse: { items: \"Quote\" },\n ListRewardsStatementsResponse: { items: \"RewardsStatement\" },\n ListStablecoinConversionsResponse: { items: \"StablecoinConversion\" },\n ListStatementsResponse: { statements: \"Statement\" },\n ListTaxFormRevisionsResponse: { tax_form_urls: \"TaxFormURL\" },\n ListTaxFormsResponse: { tax_form_urls: \"TaxFormURL\" },\n ListTransactionsResponse: { items: \"Transaction\" },\n ListTransferLimitsResponse: { items: \"TransferLimit\" },\n ListTransfersResponse: { items: \"Transfer\" },\n ListUserAuditLogsResponse: { items: \"UserAuditLog\" },\n ListVaspsResponse: { items: \"Vasp\" },\n ListVerificationsResponse: { items: \"Verification\" },\n ListWebhooksResponse: { items: \"Webhook\" },\n MarketDetails: { market_status: \"MarketStatus\" },\n MarketStatus: { scheduled_maintenance: \"ScheduledMaintenance\" },\n Orchestration: {\n destination: \"OrchestrationDestination\",\n destination_transfer: \"TransferDetails\",\n fail_reason: \"FailReason\",\n source: \"OrchestrationSource\",\n source_transfer: \"TransferDetails\",\n status_details: \"OrchestrationStatusDetails\",\n },\n OrchestrationDestination: {\n crypto: \"OrchestrationCryptoDestination\",\n fiat: \"OrchestrationFiatDestination\",\n profile: \"OrchestrationProfileDestination\",\n },\n OrchestrationRule: { destination: \"OrchestrationRuleDestination\", source: \"OrchestrationRuleSource\" },\n OrchestrationRuleDestination: {\n crypto: \"OrchestrationRuleCryptoDestination\",\n fiat: \"OrchestrationRuleFiatDestination\",\n profile: \"OrchestrationRuleProfileDestination\",\n },\n OrchestrationRuleSource: {\n crypto: \"OrchestrationRuleCryptoSource\",\n fiat: \"OrchestrationRuleFiatSource\",\n profile: \"OrchestrationRuleProfileSource\",\n },\n OrchestrationSource: {\n crypto: \"OrchestrationCryptoSource\",\n fiat: \"OrchestrationFiatSource\",\n profile: \"OrchestrationProfileSource\",\n },\n OrchestrationStatusDetails: {\n conversion_failed: \"ConversionFailed\",\n conversion_in_progress: \"ConversionInProgress\",\n destination_transfer_failed: \"DestinationTransferFailed\",\n destination_transfer_in_progress: \"DestinationTransferInProgress\",\n pending_customer_approval: \"PendingCustomerApproval\",\n policy_rejected: \"PolicyRejected\",\n travel_rule_info_required: \"TravelRuleInfoRequired\",\n },\n PersonDetails: { address: \"IdentityMailingAddress\" },\n ProfileBalance: { balances: \"BalanceTypeAmount\" },\n PutCryptoDestinationAddressRequest: { travelrule_metadata: \"PutCryptoDestinationAddressRequestTravelruleMetadata\" },\n PutCryptoDestinationAddressRequestTravelruleMetadata: {\n beneficiary: \"Beneficiary\",\n vasp: \"PutCryptoDestinationAddressRequestVasp\",\n },\n PutCryptoDestinationAddressResponse: { address: \"CryptoDestinationAddress\" },\n RewardsStatement: { files: \"RewardsStatementFile\" },\n SandboxSetIdentityStatusRequest: { admin_disabled: \"SetDisable\", user_disabled: \"SetDisable\" },\n Statement: { files: \"StatementFile\", statement_balances: \"StatementBalance\" },\n TaxDocumentation: { tax_documentation: \"TaxDocumentationPayload\" },\n TaxDocumentationPayload: {\n w_8ben: \"W8BenTaxDocumentation\",\n w_8ben_e: \"W8BenETaxDocumentation\",\n w_9: \"W9TaxDocumentation\",\n },\n Transaction: { legs: \"Obligation\" },\n Transfer: {\n auto_conversion: \"AutoConversion\",\n secondary_status: \"SecondaryStatus\",\n status_details: \"TransferStatusDetails\",\n },\n TransferStatusDetails: {\n invalid_destination_address: \"InvalidDestinationAddress\",\n max_rent_exceeded: \"MaxRentExceeded\",\n missing_trustline: \"MissingTrustline\",\n pending_customer_approval: \"PendingCustomerApproval\",\n policy_rejected: \"PolicyRejected\",\n stale_fee_quote: \"StaleFeeQuote\",\n },\n UpdateAccountRequest: { account: \"Account\" },\n UpdateAttributionAddressResponse: { address: \"AttributionAddress\" },\n UpdateClaimScheduleResponse: { claim_schedule: \"ClaimSchedule\" },\n UpdateCryptoDepositRequest: { originator_address_info: \"AddressInfo\" },\n UpdateFiatAccountRequest: {\n fiat_account_owner: \"FiatAccountOwner\",\n fiat_network_instructions: \"UpdateFiatAccountRequestUpdateFiatNetworkInstructions\",\n },\n UpdateFiatAccountRequestUpdateFiatNetworkInstructions: { wire: \"UpdateFiatNetworkInstructionsUpdateWire\" },\n UpdateFiatNetworkInstructionsUpdateWire: {\n fiat_account_owner_address: \"MailingAddress\",\n intermediary_routing_details: \"UpdateWireUpdateRoutingDetails\",\n routing_details: \"UpdateWireUpdateRoutingDetails\",\n },\n UpdateIdentityRequest: {\n customer_due_diligence: \"CustomerDueDiligence\",\n institution_details: \"InstitutionDetails\",\n person_details: \"PersonDetails\",\n tax_details: \"TaxDetail\",\n },\n UpdateMonitoringAddressResponse: { address: \"MonitoringAddress\" },\n UpdatePayoutGroupResponse: { group: \"PayoutGroup\" },\n UpdateWireUpdateRoutingDetails: { bank_address: \"MailingAddress\" },\n UserAuditLog: { user: \"User\" },\n Verification: {\n manual_verification: \"ManualVerification\",\n signature_verification: \"SignatureVerification\",\n small_deposit_verification: \"SmallDepositVerification\",\n },\n W8BenETaxDocumentation: { mailing_address: \"IdentityMailingAddress\", permanent_address: \"IdentityMailingAddress\" },\n W8BenTaxDocumentation: { mailing_address: \"IdentityMailingAddress\", permanent_address: \"IdentityMailingAddress\" },\n W9TaxDocumentation: { address: \"IdentityMailingAddress\" },\n};\n\nexport const ARRAY_FIELDS_BY_SCHEMA: Readonly<Record<string, ReadonlySet<string>>> = {\n Account: new Set([\"members\"]),\n AccountMember: new Set([\"roles\"]),\n AddAccountMembersResponse: new Set([\"members\"]),\n AddInstitutionMembersResponse: new Set([\"members\"]),\n BatchCreateAttributionAddressesResponse: new Set([\"failed_addresses\", \"successful_addresses\"]),\n Claim: new Set([\"addresses\"]),\n ClaimSchedule: new Set([\"days_of_month\", \"days_of_week\"]),\n CustomerDueDiligence: new Set([\"aliases\", \"customer_regions\"]),\n DeliveryHistorySummary: new Set([\"attempts\"]),\n DepositAddress: new Set([\"compatible_crypto_networks\"]),\n DocumentDescription: new Set([\"document_types\"]),\n FirstPartyClient: new Set([\"client_public_keys\", \"client_scopes\", \"ip_allowlist\"]),\n GetRewardDetailsResponse: new Set([\"asset_details\", \"rates\"]),\n GetRewardsRatesResponse: new Set([\"rates\"]),\n Identity: new Set([\"institution_members\", \"tax_details\"]),\n IdentityRequirement: new Set([\"errors\"]),\n IdentityStatusDetails: new Set([\"active_controls\", \"requirements\"]),\n InstitutionMember: new Set([\"roles\"]),\n ListAccountsResponse: new Set([\"items\"]),\n ListApiCredentialsResponse: new Set([\"items\"]),\n ListAttributionAddressesResponse: new Set([\"items\"]),\n ListClaimSchedulesResponse: new Set([\"items\"]),\n ListClaimsResponse: new Set([\"items\"]),\n ListCrossChainAttestationsResponse: new Set([\"items\"]),\n ListCrossChainTransfersResponse: new Set([\"items\"]),\n ListCryptoDestinationAddressesResponse: new Set([\"addresses\"]),\n ListDeliveryHistoriesResponse: new Set([\"items\"]),\n ListDepositAddressesResponse: new Set([\"items\"]),\n ListEventsResponse: new Set([\"events\"]),\n ListExecutionsResponse: new Set([\"items\"]),\n ListFiatAccountsResponse: new Set([\"items\"]),\n ListFiatDepositInstructionsResponse: new Set([\"items\"]),\n ListHistoricalCandlesResponse: new Set([\"items\"]),\n ListHistoricalPricesResponse: new Set([\"items\"]),\n ListIdentitiesResponse: new Set([\"items\"]),\n ListIdentityControlsResponse: new Set([\"items\"]),\n ListIdentityDocumentsResponse: new Set([\"documents\", \"pending_documents\"]),\n ListIssuerQuoteExecutionsResponse: new Set([\"issuer_quote_executions\"]),\n ListMarketsResponse: new Set([\"markets\"]),\n ListMonitoringAddressResponse: new Set([\"addresses\"]),\n ListOrchestrationRulesResponse: new Set([\"items\", \"rules\"]),\n ListOrchestrationsResponse: new Set([\"items\", \"orchestrations\"]),\n ListOrdersResponse: new Set([\"items\"]),\n ListPaymentsResponse: new Set([\"payments\"]),\n ListPayoutGroupsResponse: new Set([\"items\"]),\n ListPricesResponse: new Set([\"items\"]),\n ListProfileBalancesResponse: new Set([\"items\"]),\n ListProfilesResponse: new Set([\"items\"]),\n ListQuoteExecutionsResponse: new Set([\"items\"]),\n ListQuotesResponse: new Set([\"items\"]),\n ListRewardsStatementsResponse: new Set([\"items\"]),\n ListStablecoinConversionsResponse: new Set([\"items\"]),\n ListStatementsResponse: new Set([\"statements\"]),\n ListTaxFormRevisionsResponse: new Set([\"tax_form_urls\"]),\n ListTaxFormsResponse: new Set([\"tax_form_urls\"]),\n ListTransactionsResponse: new Set([\"items\"]),\n ListTransferLimitsResponse: new Set([\"items\"]),\n ListTransfersResponse: new Set([\"items\"]),\n ListUserAuditLogsResponse: new Set([\"items\"]),\n ListVaspsResponse: new Set([\"items\"]),\n ListVerificationsResponse: new Set([\"items\"]),\n ListWebhooksResponse: new Set([\"items\"]),\n MarketStatus: new Set([\"scheduled_maintenance\"]),\n PersonDetails: new Set([\"passthrough_verification_fields\"]),\n ProfileBalance: new Set([\"balances\"]),\n RewardRate: new Set([\"networks\"]),\n RewardsStatement: new Set([\"files\"]),\n Statement: new Set([\"files\", \"statement_balances\"]),\n Transaction: new Set([\"legs\"]),\n TransferLimit: new Set([\"transfer_types\"]),\n Webhook: new Set([\"event_types\"]),\n};\n\nexport const MAP_FIELDS_BY_SCHEMA: Readonly<Record<string, ReadonlySet<string>>> = {\n Account: new Set([\"metadata\"]),\n DepositAddress: new Set([\"metadata\"]),\n Event: new Set([\"object\"]),\n FiatAccount: new Set([\"metadata\"]),\n FiatDepositInstructions: new Set([\"metadata\"]),\n Identity: new Set([\"metadata\"]),\n Orchestration: new Set([\"metadata\"]),\n Order: new Set([\"metadata\"]),\n QuoteExecution: new Set([\"metadata\"]),\n StablecoinConversion: new Set([\"metadata\"]),\n Statement: new Set([\"data\", \"metadata\"]),\n Transfer: new Set([\"metadata\"]),\n UserAuditLog: new Set([\"request_payload\", \"response_payload\"]),\n};\n\nexport const ENUM_FIELDS_BY_SCHEMA: Readonly<Record<string, Readonly<Record<string, \"scalar\" | \"list\" | \"map\">>>> = {\n Account: { summary_status: \"scalar\", type: \"scalar\" },\n AccountMember: { roles: \"list\", type: \"scalar\" },\n AttributionAddress: { ledger: \"scalar\" },\n BatchCreateAttributionAddressOutput: { ledger: \"scalar\" },\n Claim: { claim_type: \"scalar\", onchain_status: \"scalar\" },\n ClaimSchedule: { schedule_type: \"scalar\" },\n ConversionInProgress: { awaiting_action_from: \"scalar\" },\n CreateIssuerQuoteResponse: { side: \"scalar\" },\n CrossChainAttestation: { destination_network: \"scalar\", source_network: \"scalar\", status: \"scalar\" },\n CrossChainAttestationStatusDetails: { code: \"scalar\" },\n CrossChainTransfer: { destination_network: \"scalar\", source_network: \"scalar\", status: \"scalar\" },\n CryptoDestinationAddress: { crypto_network: \"scalar\", status: \"scalar\" },\n CryptoDestinationAddressTravelruleMetadata: { custodian_type: \"scalar\" },\n CryptoWithdrawalFee: { crypto_network: \"scalar\" },\n CustomerDueDiligence: {\n customer_regions: \"list\",\n employment_industry_sector: \"scalar\",\n employment_status: \"scalar\",\n estimated_net_worth: \"scalar\",\n estimated_yearly_income: \"scalar\",\n expected_transfer_value: \"scalar\",\n industry_sector: \"scalar\",\n merchant_funding_source: \"scalar\",\n purpose_of_account: \"scalar\",\n source_of_funds: \"scalar\",\n source_of_wealth: \"scalar\",\n },\n DeliveryAttempt: { status: \"scalar\" },\n DeliveryHistorySummary: { delivery_status: \"scalar\" },\n DepositAddress: { compatible_crypto_networks: \"list\", conversion_target_asset: \"scalar\", crypto_network: \"scalar\" },\n DestinationTransferInProgress: { awaiting_action_from: \"scalar\" },\n DocumentDescription: { document_types: \"list\", status: \"scalar\" },\n Execution: { market: \"scalar\", side: \"scalar\" },\n FiatAccount: { status: \"scalar\" },\n FiatDepositInstructions: { status: \"scalar\" },\n FiatNetworkInstructionsWireRoutingDetails: { routing_number_type: \"scalar\" },\n FirstPartyClient: { status: \"scalar\" },\n Identity: { status: \"scalar\", summary_status: \"scalar\", summary_tin_verification_status: \"scalar\", type: \"scalar\" },\n IdentityControl: { reason_code: \"scalar\", set_by: \"scalar\", type: \"scalar\" },\n IdentityRequirement: { awaiting_action_from: \"scalar\", status: \"scalar\", type: \"scalar\" },\n IdentityRequirementError: { code: \"scalar\" },\n InstitutionDetails: {\n additional_screening_status: \"scalar\",\n cip_id_type: \"scalar\",\n document_verification_status: \"scalar\",\n institution_sub_type: \"scalar\",\n institution_type: \"scalar\",\n regulation_status: \"scalar\",\n sanctions_verification_status: \"scalar\",\n trading_type: \"scalar\",\n },\n InstitutionMember: { roles: \"list\", summary_status: \"scalar\" },\n IssuerQuoteExecution: { status: \"scalar\" },\n ListHistoricalCandlesResponse: { increment: \"scalar\", market: \"scalar\" },\n ListIdentityDocumentsResponse: { pending_documents: \"list\" },\n MarketDetails: { market: \"scalar\" },\n MarketStatus: { buy_reason: \"scalar\", buy_status: \"scalar\", sell_reason: \"scalar\", sell_status: \"scalar\" },\n MonitoringAddress: { crypto_network: \"scalar\" },\n Obligation: { direction: \"scalar\" },\n Orchestration: { status: \"scalar\" },\n OrchestrationRule: { status: \"scalar\" },\n Order: { market: \"scalar\", side: \"scalar\", status: \"scalar\", time_in_force: \"scalar\", type: \"scalar\" },\n Payment: { payment_status: \"scalar\", payment_type: \"scalar\", product: \"scalar\" },\n PayoutGroup: { onchain_status: \"scalar\" },\n PendingCustomerApproval: { awaiting_action_from: \"scalar\" },\n PersonDetails: {\n additional_screening_status: \"scalar\",\n cip_id_type: \"scalar\",\n govt_id_type: \"scalar\",\n id_verification_status: \"scalar\",\n passthrough_verification_fields: \"list\",\n passthrough_verification_status: \"scalar\",\n passthrough_verifier_type: \"scalar\",\n sanctions_verification_status: \"scalar\",\n verifier_type: \"scalar\",\n },\n Pricing: { market: \"scalar\" },\n Profile: { type: \"scalar\" },\n Quote: { market: \"scalar\", side: \"scalar\" },\n QuoteExecution: { market: \"scalar\", side: \"scalar\", status: \"scalar\" },\n RewardRate: { jurisdiction: \"scalar\", tier: \"scalar\" },\n RewardsStatement: { status: \"scalar\", type: \"scalar\" },\n RewardsStatementFile: { format: \"scalar\" },\n ScheduledMaintenance: { recurrence: \"scalar\" },\n SecondaryStatus: { name: \"scalar\" },\n Statement: { product: \"scalar\", status: \"scalar\", type: \"scalar\" },\n TaxDetail: { tin_verification_status: \"scalar\" },\n TaxDocumentation: { form_type: \"scalar\" },\n TaxFormURL: { type: \"scalar\" },\n Transaction: { status: \"scalar\" },\n Transfer: { crypto_network: \"scalar\", direction: \"scalar\", status: \"scalar\", type: \"scalar\" },\n TransferDetails: { status: \"scalar\" },\n TransferLimit: { transfer_types: \"list\" },\n TravelRuleInfoRequired: { awaiting_action_from: \"scalar\" },\n Verification: { status: \"scalar\", verification_method: \"scalar\" },\n W8BenETaxDocumentation: {\n completed_for: \"scalar\",\n income_type: \"scalar\",\n limitation_on_benefits: \"scalar\",\n tax_classification: \"scalar\",\n },\n W8BenTaxDocumentation: { completed_for: \"scalar\", income_type: \"scalar\" },\n W9TaxDocumentation: { completed_for: \"scalar\", tax_classification: \"scalar\", tin_type: \"scalar\" },\n Webhook: { auth_type: \"scalar\", status: \"scalar\" },\n};\n\nexport const REQUEST_MAP_FIELDS_BY_SCHEMA: Readonly<Record<string, ReadonlySet<string>>> = {\n Account: new Set([\"metadata\"]),\n CreateCryptoWithdrawalRequest: new Set([\"metadata\"]),\n CreateDepositAddressRequest: new Set([\"metadata\"]),\n CreateFiatAccountRequest: new Set([\"metadata\"]),\n CreateFiatDepositInstructionsRequest: new Set([\"metadata\"]),\n CreateFiatWithdrawalRequest: new Set([\"metadata\"]),\n CreateIdentityRequest: new Set([\"metadata\"]),\n CreateInternalTransferRequest: new Set([\"metadata\", \"recipient_metadata\"]),\n CreateOrchestrationRequest: new Set([\"metadata\"]),\n CreateOrderRequest: new Set([\"metadata\"]),\n CreatePaxosTransferRequest: new Set([\"metadata\", \"recipient_metadata\"]),\n CreateQuoteExecutionRequest: new Set([\"metadata\"]),\n CreateStablecoinConversionRequest: new Set([\"metadata\"]),\n DepositAddress: new Set([\"metadata\"]),\n Event: new Set([\"object\"]),\n FiatAccount: new Set([\"metadata\"]),\n FiatDepositInstructions: new Set([\"metadata\"]),\n Identity: new Set([\"metadata\"]),\n Orchestration: new Set([\"metadata\"]),\n Order: new Set([\"metadata\"]),\n Problem: new Set([\"meta\"]),\n QuoteExecution: new Set([\"metadata\"]),\n StablecoinConversion: new Set([\"metadata\"]),\n Statement: new Set([\"data\", \"metadata\"]),\n Transfer: new Set([\"metadata\"]),\n UpdateFiatAccountRequest: new Set([\"metadata\"]),\n UpdateIdentityRequest: new Set([\"metadata\"]),\n UserAuditLog: new Set([\"request_payload\", \"response_payload\"]),\n};\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Decimal conversion for the Paxos TypeScript SDK.
|
|
3
|
+
*
|
|
4
|
+
* The wire format represents monetary/decimal values as strings for
|
|
5
|
+
* precision. `Decimal` (from decimal.js) is the SDK's decimal type, and
|
|
6
|
+
* `convertRequestDecimals` turns request decimals back into validated strings,
|
|
7
|
+
* using the per-schema field maps in decimal-fields.ts (generated from the
|
|
8
|
+
* OpenAPI spec) to know which fields are decimal. Responses are decoded in
|
|
9
|
+
* decode.ts.
|
|
10
|
+
*/
|
|
11
|
+
import { Decimal as BaseDecimal } from "decimal.js";
|
|
12
|
+
export declare const MAX_DECIMAL_EXPONENT = 1000;
|
|
13
|
+
export declare const Decimal: typeof BaseDecimal;
|
|
14
|
+
export type Decimal = BaseDecimal;
|
|
15
|
+
export type FieldsBySchema = Readonly<Record<string, ReadonlySet<string>>>;
|
|
16
|
+
export type NestedSchemaRefs = Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
17
|
+
/**
|
|
18
|
+
* Prepare a request body for JSON encoding. Fields the spec marks decimal on
|
|
19
|
+
* `schemaKey` (following `nestedSchemaRefs` into nested objects and arrays)
|
|
20
|
+
* must be a `Decimal` or a finite decimal string, and are emitted as plain
|
|
21
|
+
* non-exponent strings; anything else (numbers, bigint, NaN, garbage strings)
|
|
22
|
+
* throws a TypeError or RangeError naming the field. Stray `Decimal` values
|
|
23
|
+
* elsewhere are still stringified so they never serialize as `{s,e,d}`.
|
|
24
|
+
*/
|
|
25
|
+
export declare function convertRequestDecimals(obj: unknown, schemaKey?: string, fieldsBySchema?: FieldsBySchema, nestedSchemaRefs?: NestedSchemaRefs, path?: string): unknown;
|
package/dist/decimal.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Decimal conversion for the Paxos TypeScript SDK.
|
|
3
|
+
*
|
|
4
|
+
* The wire format represents monetary/decimal values as strings for
|
|
5
|
+
* precision. `Decimal` (from decimal.js) is the SDK's decimal type, and
|
|
6
|
+
* `convertRequestDecimals` turns request decimals back into validated strings,
|
|
7
|
+
* using the per-schema field maps in decimal-fields.ts (generated from the
|
|
8
|
+
* OpenAPI spec) to know which fields are decimal. Responses are decoded in
|
|
9
|
+
* decode.ts.
|
|
10
|
+
*/
|
|
11
|
+
import { Decimal as BaseDecimal } from "decimal.js";
|
|
12
|
+
import { DECIMAL_FIELDS_BY_SCHEMA, NESTED_SCHEMA_REFS } from "./decimal-fields.js";
|
|
13
|
+
export const MAX_DECIMAL_EXPONENT = 1000;
|
|
14
|
+
export const Decimal = /* @__PURE__ */ BaseDecimal.clone({
|
|
15
|
+
precision: MAX_DECIMAL_EXPONENT,
|
|
16
|
+
toExpNeg: -(MAX_DECIMAL_EXPONENT + 1),
|
|
17
|
+
toExpPos: MAX_DECIMAL_EXPONENT + 1,
|
|
18
|
+
});
|
|
19
|
+
const DECIMAL_STRING = /^[+-]?(?:[0-9]+\.?[0-9]*|\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;
|
|
20
|
+
function describeType(value) {
|
|
21
|
+
return typeof value === "object" && value !== null ? (value.constructor?.name ?? "object") : typeof value;
|
|
22
|
+
}
|
|
23
|
+
function plainForm(decimal, path) {
|
|
24
|
+
if (Math.abs(decimal.e) > MAX_DECIMAL_EXPONENT) {
|
|
25
|
+
throw new RangeError(`${path}: decimal magnitude must be within 10^+-${MAX_DECIMAL_EXPONENT}`);
|
|
26
|
+
}
|
|
27
|
+
return decimal.toFixed();
|
|
28
|
+
}
|
|
29
|
+
function toWireDecimal(value, path) {
|
|
30
|
+
if (Decimal.isDecimal(value)) {
|
|
31
|
+
let decimal;
|
|
32
|
+
try {
|
|
33
|
+
decimal = value instanceof Decimal ? value : new Decimal(String(value));
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
throw new RangeError(`${path}: object is not a valid Decimal`);
|
|
37
|
+
}
|
|
38
|
+
if (!decimal.isFinite())
|
|
39
|
+
throw new RangeError(`${path}: Decimal must be finite, got ${decimal.toString()}`);
|
|
40
|
+
return plainForm(decimal, path);
|
|
41
|
+
}
|
|
42
|
+
if (typeof value === "string") {
|
|
43
|
+
if (!DECIMAL_STRING.test(value)) {
|
|
44
|
+
throw new RangeError(`${path}: expected a finite decimal number string, got ${JSON.stringify(value)}`);
|
|
45
|
+
}
|
|
46
|
+
let parsed;
|
|
47
|
+
try {
|
|
48
|
+
parsed = new Decimal(value);
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
throw new RangeError(`${path}: decimal string is out of range, got ${JSON.stringify(value)}`);
|
|
52
|
+
}
|
|
53
|
+
if (!parsed.isFinite() || (parsed.isZero() && /[1-9]/.test(value.split(/[eE]/)[0]))) {
|
|
54
|
+
throw new RangeError(`${path}: decimal magnitude must be within 10^+-${MAX_DECIMAL_EXPONENT}`);
|
|
55
|
+
}
|
|
56
|
+
return plainForm(parsed, path);
|
|
57
|
+
}
|
|
58
|
+
throw new TypeError(`${path}: expected a Decimal or a numeric string, got ${describeType(value)}`);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Prepare a request body for JSON encoding. Fields the spec marks decimal on
|
|
62
|
+
* `schemaKey` (following `nestedSchemaRefs` into nested objects and arrays)
|
|
63
|
+
* must be a `Decimal` or a finite decimal string, and are emitted as plain
|
|
64
|
+
* non-exponent strings; anything else (numbers, bigint, NaN, garbage strings)
|
|
65
|
+
* throws a TypeError or RangeError naming the field. Stray `Decimal` values
|
|
66
|
+
* elsewhere are still stringified so they never serialize as `{s,e,d}`.
|
|
67
|
+
*/
|
|
68
|
+
export function convertRequestDecimals(obj, schemaKey, fieldsBySchema = DECIMAL_FIELDS_BY_SCHEMA, nestedSchemaRefs = NESTED_SCHEMA_REFS, path = "") {
|
|
69
|
+
if (obj === null || obj === undefined)
|
|
70
|
+
return obj;
|
|
71
|
+
if (Decimal.isDecimal(obj))
|
|
72
|
+
return toWireDecimal(obj, path || "body");
|
|
73
|
+
if (Array.isArray(obj)) {
|
|
74
|
+
return obj.map((item, i) => convertRequestDecimals(item, schemaKey, fieldsBySchema, nestedSchemaRefs, `${path}[${i}]`));
|
|
75
|
+
}
|
|
76
|
+
if (typeof obj === "object") {
|
|
77
|
+
const decimalFields = schemaKey ? fieldsBySchema[schemaKey] : undefined;
|
|
78
|
+
const nestedRefs = schemaKey ? nestedSchemaRefs[schemaKey] : undefined;
|
|
79
|
+
const result = {};
|
|
80
|
+
for (const [key, val] of Object.entries(obj)) {
|
|
81
|
+
const childPath = path ? `${path}.${key}` : key;
|
|
82
|
+
if (decimalFields?.has(key) && val !== null && val !== undefined) {
|
|
83
|
+
result[key] = toWireDecimal(val, childPath);
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
result[key] = convertRequestDecimals(val, nestedRefs?.[key], fieldsBySchema, nestedSchemaRefs, childPath);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return result;
|
|
90
|
+
}
|
|
91
|
+
return obj;
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=decimal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decimal.js","sourceRoot":"","sources":["../src/decimal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEnF,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAEzC,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAA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M,CAAC;IAChB,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["/**\n * Decimal conversion for the Paxos TypeScript SDK.\n *\n * The wire format represents monetary/decimal values as strings for\n * precision. `Decimal` (from decimal.js) is the SDK's decimal type, and\n * `convertRequestDecimals` turns request decimals back into validated strings,\n * using the per-schema field maps in decimal-fields.ts (generated from the\n * OpenAPI spec) to know which fields are decimal. Responses are decoded in\n * decode.ts.\n */\n\nimport { Decimal as BaseDecimal } from \"decimal.js\";\nimport { DECIMAL_FIELDS_BY_SCHEMA, NESTED_SCHEMA_REFS } from \"./decimal-fields.js\";\n\nexport const MAX_DECIMAL_EXPONENT = 1000;\n\nexport const Decimal = /* @__PURE__ */ BaseDecimal.clone({\n precision: MAX_DECIMAL_EXPONENT,\n toExpNeg: -(MAX_DECIMAL_EXPONENT + 1),\n toExpPos: MAX_DECIMAL_EXPONENT + 1,\n});\nexport type Decimal = BaseDecimal;\n\nexport type FieldsBySchema = Readonly<Record<string, ReadonlySet<string>>>;\nexport type NestedSchemaRefs = Readonly<Record<string, Readonly<Record<string, string>>>>;\n\nconst DECIMAL_STRING = /^[+-]?(?:[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;\n\nfunction describeType(value: unknown): string {\n return typeof value === \"object\" && value !== null ? (value.constructor?.name ?? \"object\") : typeof value;\n}\n\nfunction plainForm(decimal: Decimal, path: string): string {\n if (Math.abs(decimal.e) > MAX_DECIMAL_EXPONENT) {\n throw new RangeError(`${path}: decimal magnitude must be within 10^+-${MAX_DECIMAL_EXPONENT}`);\n }\n return decimal.toFixed();\n}\n\nfunction toWireDecimal(value: unknown, path: string): string {\n if (Decimal.isDecimal(value)) {\n let decimal: Decimal;\n try {\n decimal = value instanceof Decimal ? value : new Decimal(String(value));\n } catch {\n throw new RangeError(`${path}: object is not a valid Decimal`);\n }\n if (!decimal.isFinite()) throw new RangeError(`${path}: Decimal must be finite, got ${decimal.toString()}`);\n return plainForm(decimal, path);\n }\n if (typeof value === \"string\") {\n if (!DECIMAL_STRING.test(value)) {\n throw new RangeError(`${path}: expected a finite decimal number string, got ${JSON.stringify(value)}`);\n }\n let parsed: Decimal;\n try {\n parsed = new Decimal(value);\n } catch {\n throw new RangeError(`${path}: decimal string is out of range, got ${JSON.stringify(value)}`);\n }\n if (!parsed.isFinite() || (parsed.isZero() && /[1-9]/.test(value.split(/[eE]/)[0]))) {\n throw new RangeError(`${path}: decimal magnitude must be within 10^+-${MAX_DECIMAL_EXPONENT}`);\n }\n return plainForm(parsed, path);\n }\n throw new TypeError(`${path}: expected a Decimal or a numeric string, got ${describeType(value)}`);\n}\n\n/**\n * Prepare a request body for JSON encoding. Fields the spec marks decimal on\n * `schemaKey` (following `nestedSchemaRefs` into nested objects and arrays)\n * must be a `Decimal` or a finite decimal string, and are emitted as plain\n * non-exponent strings; anything else (numbers, bigint, NaN, garbage strings)\n * throws a TypeError or RangeError naming the field. Stray `Decimal` values\n * elsewhere are still stringified so they never serialize as `{s,e,d}`.\n */\nexport function convertRequestDecimals(\n obj: unknown,\n schemaKey?: string,\n fieldsBySchema: FieldsBySchema = DECIMAL_FIELDS_BY_SCHEMA,\n nestedSchemaRefs: NestedSchemaRefs = NESTED_SCHEMA_REFS,\n path = \"\",\n): unknown {\n if (obj === null || obj === undefined) return obj;\n if (Decimal.isDecimal(obj)) return toWireDecimal(obj, path || \"body\");\n if (Array.isArray(obj)) {\n return obj.map((item, i) =>\n convertRequestDecimals(item, schemaKey, fieldsBySchema, nestedSchemaRefs, `${path}[${i}]`),\n );\n }\n if (typeof obj === \"object\") {\n const decimalFields = schemaKey ? fieldsBySchema[schemaKey] : undefined;\n const nestedRefs = schemaKey ? nestedSchemaRefs[schemaKey] : undefined;\n const result: Record<string, unknown> = {};\n for (const [key, val] of Object.entries(obj as Record<string, unknown>)) {\n const childPath = path ? `${path}.${key}` : key;\n if (decimalFields?.has(key) && val !== null && val !== undefined) {\n result[key] = toWireDecimal(val, childPath);\n } else {\n result[key] = convertRequestDecimals(val, nestedRefs?.[key], fieldsBySchema, nestedSchemaRefs, childPath);\n }\n }\n return result;\n }\n return obj;\n}\n"]}
|
package/dist/decode.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response decoding for the Paxos TypeScript SDK.
|
|
3
|
+
*
|
|
4
|
+
* One recursive pass over a parsed response, driven by the per-schema tables
|
|
5
|
+
* generated from the OpenAPI spec: decimal strings become `Decimal`, enum
|
|
6
|
+
* values are checked, and fields the API omitted at their zero value are
|
|
7
|
+
* filled in.
|
|
8
|
+
*/
|
|
9
|
+
import { type FieldsBySchema, type NestedSchemaRefs } from "./decimal.js";
|
|
10
|
+
import { type DefaultKind } from "./response-defaults.js";
|
|
11
|
+
type EnumKind = "scalar" | "list" | "map";
|
|
12
|
+
type EnumFields = Readonly<Record<string, Readonly<Record<string, EnumKind>>>>;
|
|
13
|
+
type DefaultsBySchema = Readonly<Record<string, Readonly<Record<string, DefaultKind>>>>;
|
|
14
|
+
interface Tables {
|
|
15
|
+
readonly decimals: FieldsBySchema;
|
|
16
|
+
readonly nested: NestedSchemaRefs;
|
|
17
|
+
readonly arrays: FieldsBySchema;
|
|
18
|
+
readonly maps: FieldsBySchema;
|
|
19
|
+
readonly enums: EnumFields;
|
|
20
|
+
readonly defaults: DefaultsBySchema;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Recursively decode a parsed response for `schemaKey`: convert the fields
|
|
24
|
+
* the spec marks decimal, validate enum fields, fill required fields the API
|
|
25
|
+
* omitted at their zero value, and follow `nestedSchemaRefs` into the schema
|
|
26
|
+
* of each nested value.
|
|
27
|
+
*
|
|
28
|
+
* A schema key is required because a field name alone doesn't say whether
|
|
29
|
+
* it's decimal -- the same name can be decimal on one schema and a plain
|
|
30
|
+
* string on another. The tables default to the generated spec-wide maps;
|
|
31
|
+
* tests override individual tables to exercise the lookup logic in isolation.
|
|
32
|
+
*/
|
|
33
|
+
export declare function decodeResponse<T>(obj: unknown, schemaKey?: string, overrides?: Partial<Tables>): T;
|
|
34
|
+
export {};
|
package/dist/decode.js
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response decoding for the Paxos TypeScript SDK.
|
|
3
|
+
*
|
|
4
|
+
* One recursive pass over a parsed response, driven by the per-schema tables
|
|
5
|
+
* generated from the OpenAPI spec: decimal strings become `Decimal`, enum
|
|
6
|
+
* values are checked, and fields the API omitted at their zero value are
|
|
7
|
+
* filled in.
|
|
8
|
+
*/
|
|
9
|
+
import { ARRAY_FIELDS_BY_SCHEMA, DECIMAL_FIELDS_BY_SCHEMA, ENUM_FIELDS_BY_SCHEMA, MAP_FIELDS_BY_SCHEMA, NESTED_SCHEMA_REFS, } from "./decimal-fields.js";
|
|
10
|
+
import { Decimal, MAX_DECIMAL_EXPONENT } from "./decimal.js";
|
|
11
|
+
import { RESPONSE_DEFAULTS } from "./response-defaults.js";
|
|
12
|
+
/**
|
|
13
|
+
* Recursively decode a parsed response for `schemaKey`: convert the fields
|
|
14
|
+
* the spec marks decimal, validate enum fields, fill required fields the API
|
|
15
|
+
* omitted at their zero value, and follow `nestedSchemaRefs` into the schema
|
|
16
|
+
* of each nested value.
|
|
17
|
+
*
|
|
18
|
+
* A schema key is required because a field name alone doesn't say whether
|
|
19
|
+
* it's decimal -- the same name can be decimal on one schema and a plain
|
|
20
|
+
* string on another. The tables default to the generated spec-wide maps;
|
|
21
|
+
* tests override individual tables to exercise the lookup logic in isolation.
|
|
22
|
+
*/
|
|
23
|
+
export function decodeResponse(obj, schemaKey, overrides = {}) {
|
|
24
|
+
const tables = {
|
|
25
|
+
decimals: DECIMAL_FIELDS_BY_SCHEMA,
|
|
26
|
+
nested: NESTED_SCHEMA_REFS,
|
|
27
|
+
arrays: ARRAY_FIELDS_BY_SCHEMA,
|
|
28
|
+
maps: MAP_FIELDS_BY_SCHEMA,
|
|
29
|
+
enums: ENUM_FIELDS_BY_SCHEMA,
|
|
30
|
+
defaults: RESPONSE_DEFAULTS,
|
|
31
|
+
...overrides,
|
|
32
|
+
};
|
|
33
|
+
return decode(obj, schemaKey, tables);
|
|
34
|
+
}
|
|
35
|
+
function decode(value, schemaKey, tables) {
|
|
36
|
+
if (value === null || value === undefined)
|
|
37
|
+
return value;
|
|
38
|
+
if (Array.isArray(value))
|
|
39
|
+
return value.map((item) => decode(item, schemaKey, tables));
|
|
40
|
+
if (typeof value !== "object")
|
|
41
|
+
return value;
|
|
42
|
+
const result = decodeFields(value, schemaKey, tables);
|
|
43
|
+
if (schemaKey)
|
|
44
|
+
applyDefaults(result, schemaKey, tables);
|
|
45
|
+
return result;
|
|
46
|
+
}
|
|
47
|
+
function decodeFields(obj, schemaKey, tables) {
|
|
48
|
+
const decimalFields = schemaKey ? tables.decimals[schemaKey] : undefined;
|
|
49
|
+
const nestedRefs = schemaKey ? tables.nested[schemaKey] : undefined;
|
|
50
|
+
const enumFields = schemaKey ? tables.enums[schemaKey] : undefined;
|
|
51
|
+
const result = {};
|
|
52
|
+
for (const [key, val] of Object.entries(obj)) {
|
|
53
|
+
const enumKind = enumFields && Object.hasOwn(enumFields, key) ? enumFields[key] : undefined;
|
|
54
|
+
if (enumKind && val !== null && val !== undefined)
|
|
55
|
+
checkEnumValue(key, enumKind, val);
|
|
56
|
+
if (decimalFields?.has(key) && typeof val === "number") {
|
|
57
|
+
throw new RangeError(`${key}: decimal response field must be a string`);
|
|
58
|
+
}
|
|
59
|
+
if (decimalFields?.has(key) && typeof val === "string") {
|
|
60
|
+
const decimal = new Decimal(val);
|
|
61
|
+
if (!decimal.isFinite())
|
|
62
|
+
throw new RangeError(`${key}: decimal must be finite`);
|
|
63
|
+
if (Math.abs(decimal.e) > MAX_DECIMAL_EXPONENT) {
|
|
64
|
+
throw new RangeError(`${key}: decimal magnitude must be within 10^+-${MAX_DECIMAL_EXPONENT}`);
|
|
65
|
+
}
|
|
66
|
+
setOwn(result, key, decimal);
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
const nestedKey = nestedRefs && Object.hasOwn(nestedRefs, key) ? nestedRefs[key] : undefined;
|
|
70
|
+
setOwn(result, key, decode(val, nestedKey, tables));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return result;
|
|
74
|
+
}
|
|
75
|
+
function applyDefaults(obj, schemaKey, tables) {
|
|
76
|
+
for (const [key, kind] of Object.entries(tables.defaults[schemaKey] ?? {})) {
|
|
77
|
+
if (!Object.hasOwn(obj, key))
|
|
78
|
+
setOwn(obj, key, zeroValue(kind));
|
|
79
|
+
}
|
|
80
|
+
for (const key of tables.arrays[schemaKey] ?? []) {
|
|
81
|
+
if (obj[key] == null)
|
|
82
|
+
obj[key] = [];
|
|
83
|
+
}
|
|
84
|
+
for (const key of tables.maps[schemaKey] ?? []) {
|
|
85
|
+
if (obj[key] == null)
|
|
86
|
+
obj[key] = {};
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function zeroValue(kind) {
|
|
90
|
+
switch (kind) {
|
|
91
|
+
case "decimal":
|
|
92
|
+
return new Decimal(0);
|
|
93
|
+
case "string":
|
|
94
|
+
return "";
|
|
95
|
+
case "number":
|
|
96
|
+
return 0;
|
|
97
|
+
case "boolean":
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
function setOwn(target, key, value) {
|
|
102
|
+
Object.defineProperty(target, key, { value, enumerable: true, writable: true, configurable: true });
|
|
103
|
+
}
|
|
104
|
+
function checkEnumValue(key, kind, val) {
|
|
105
|
+
const values = kind === "scalar"
|
|
106
|
+
? [val]
|
|
107
|
+
: kind === "list"
|
|
108
|
+
? Array.isArray(val)
|
|
109
|
+
? val
|
|
110
|
+
: undefined
|
|
111
|
+
: typeof val === "object" && !Array.isArray(val)
|
|
112
|
+
? Object.values(val)
|
|
113
|
+
: undefined;
|
|
114
|
+
if (!values || values.some((v) => typeof v !== "string")) {
|
|
115
|
+
throw new TypeError(`${key}: enum response field must be a string${kind === "scalar" ? "" : ` ${kind}`}`);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=decode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decode.js","sourceRoot":"","sources":["../src/decode.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAA8C,MAAM,cAAc,CAAC;AACzG,OAAO,EAAE,iBAAiB,EAAoB,MAAM,wBAAwB,CAAC;AAe7E;;;;;;;;;;GAUG;AACH,MAAM,UAAU,cAAc,CAAI,GAAY,EAAE,SAAkB,EAAE,YAA6B,EAAE;IACjG,MAAM,MAAM,GAAW;QACrB,QAAQ,EAAE,wBAAwB;QAClC,MAAM,EAAE,kBAAkB;QAC1B,MAAM,EAAE,sBAAsB;QAC9B,IAAI,EAAE,oBAAoB;QAC1B,KAAK,EAAE,qBAAqB;QAC5B,QAAQ,EAAE,iBAAiB;QAC3B,GAAG,SAAS;KACb,CAAC;IACF,OAAO,MAAM,CAAC,GAAG,EAAE,SAAS,EAAE,MAAM,CAAM,CAAC;AAC7C,CAAC;AAED,SAAS,MAAM,CAAC,KAAc,EAAE,SAA6B,EAAE,MAAc;IAC3E,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IACxD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;IACtF,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,MAAM,MAAM,GAAG,YAAY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AAC,SAAS,CAAC;IACpB,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,EAAE,CAAC;QACzD,MAAM,IAAI,SAAS,CAAC,GAAG,GAAG,yCAAyC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC,CAAC;IAC5G,CAAC;AACH,CAAC","sourcesContent":["/**\n * Response decoding for the Paxos TypeScript SDK.\n *\n * One recursive pass over a parsed response, driven by the per-schema tables\n * generated from the OpenAPI spec: decimal strings become `Decimal`, enum\n * values are checked, and fields the API omitted at their zero value are\n * filled in.\n */\n\nimport {\n ARRAY_FIELDS_BY_SCHEMA,\n DECIMAL_FIELDS_BY_SCHEMA,\n ENUM_FIELDS_BY_SCHEMA,\n MAP_FIELDS_BY_SCHEMA,\n NESTED_SCHEMA_REFS,\n} from \"./decimal-fields.js\";\nimport { Decimal, MAX_DECIMAL_EXPONENT, type FieldsBySchema, type NestedSchemaRefs } from \"./decimal.js\";\nimport { RESPONSE_DEFAULTS, type DefaultKind } from \"./response-defaults.js\";\n\ntype EnumKind = \"scalar\" | \"list\" | \"map\";\ntype EnumFields = Readonly<Record<string, Readonly<Record<string, EnumKind>>>>;\ntype DefaultsBySchema = Readonly<Record<string, Readonly<Record<string, DefaultKind>>>>;\n\ninterface Tables {\n readonly decimals: FieldsBySchema;\n readonly nested: NestedSchemaRefs;\n readonly arrays: FieldsBySchema;\n readonly maps: FieldsBySchema;\n readonly enums: EnumFields;\n readonly defaults: DefaultsBySchema;\n}\n\n/**\n * Recursively decode a parsed response for `schemaKey`: convert the fields\n * the spec marks decimal, validate enum fields, fill required fields the API\n * omitted at their zero value, and follow `nestedSchemaRefs` into the schema\n * of each nested value.\n *\n * A schema key is required because a field name alone doesn't say whether\n * it's decimal -- the same name can be decimal on one schema and a plain\n * string on another. The tables default to the generated spec-wide maps;\n * tests override individual tables to exercise the lookup logic in isolation.\n */\nexport function decodeResponse<T>(obj: unknown, schemaKey?: string, overrides: Partial<Tables> = {}): T {\n const tables: Tables = {\n decimals: DECIMAL_FIELDS_BY_SCHEMA,\n nested: NESTED_SCHEMA_REFS,\n arrays: ARRAY_FIELDS_BY_SCHEMA,\n maps: MAP_FIELDS_BY_SCHEMA,\n enums: ENUM_FIELDS_BY_SCHEMA,\n defaults: RESPONSE_DEFAULTS,\n ...overrides,\n };\n return decode(obj, schemaKey, tables) as T;\n}\n\nfunction decode(value: unknown, schemaKey: string | undefined, tables: Tables): unknown {\n if (value === null || value === undefined) return value;\n if (Array.isArray(value)) return value.map((item) => decode(item, schemaKey, tables));\n if (typeof value !== \"object\") return value;\n const result = decodeFields(value as Record<string, unknown>, schemaKey, tables);\n if (schemaKey) applyDefaults(result, schemaKey, tables);\n return result;\n}\n\nfunction decodeFields(\n obj: Record<string, unknown>,\n schemaKey: string | undefined,\n tables: Tables,\n): Record<string, unknown> {\n const decimalFields = schemaKey ? tables.decimals[schemaKey] : undefined;\n const nestedRefs = schemaKey ? tables.nested[schemaKey] : undefined;\n const enumFields = schemaKey ? tables.enums[schemaKey] : undefined;\n const result: Record<string, unknown> = {};\n for (const [key, val] of Object.entries(obj)) {\n const enumKind = enumFields && Object.hasOwn(enumFields, key) ? enumFields[key] : undefined;\n if (enumKind && val !== null && val !== undefined) checkEnumValue(key, enumKind, val);\n if (decimalFields?.has(key) && typeof val === \"number\") {\n throw new RangeError(`${key}: decimal response field must be a string`);\n }\n if (decimalFields?.has(key) && typeof val === \"string\") {\n const decimal = new Decimal(val);\n if (!decimal.isFinite()) throw new RangeError(`${key}: decimal must be finite`);\n if (Math.abs(decimal.e) > MAX_DECIMAL_EXPONENT) {\n throw new RangeError(`${key}: decimal magnitude must be within 10^+-${MAX_DECIMAL_EXPONENT}`);\n }\n setOwn(result, key, decimal);\n } else {\n const nestedKey = nestedRefs && Object.hasOwn(nestedRefs, key) ? nestedRefs[key] : undefined;\n setOwn(result, key, decode(val, nestedKey, tables));\n }\n }\n return result;\n}\n\nfunction applyDefaults(obj: Record<string, unknown>, schemaKey: string, tables: Tables): void {\n for (const [key, kind] of Object.entries(tables.defaults[schemaKey] ?? {})) {\n if (!Object.hasOwn(obj, key)) setOwn(obj, key, zeroValue(kind));\n }\n for (const key of tables.arrays[schemaKey] ?? []) {\n if (obj[key] == null) obj[key] = [];\n }\n for (const key of tables.maps[schemaKey] ?? []) {\n if (obj[key] == null) obj[key] = {};\n }\n}\n\nfunction zeroValue(kind: DefaultKind): unknown {\n switch (kind) {\n case \"decimal\":\n return new Decimal(0);\n case \"string\":\n return \"\";\n case \"number\":\n return 0;\n case \"boolean\":\n return false;\n }\n}\n\nfunction setOwn(target: Record<string, unknown>, key: string, value: unknown): void {\n Object.defineProperty(target, key, { value, enumerable: true, writable: true, configurable: true });\n}\n\nfunction checkEnumValue(key: string, kind: EnumKind, val: unknown): void {\n const values =\n kind === \"scalar\"\n ? [val]\n : kind === \"list\"\n ? Array.isArray(val)\n ? val\n : undefined\n : typeof val === \"object\" && !Array.isArray(val)\n ? Object.values(val as Record<string, unknown>)\n : undefined;\n if (!values || values.some((v) => typeof v !== \"string\")) {\n throw new TypeError(`${key}: enum response field must be a string${kind === \"scalar\" ? \"\" : ` ${kind}`}`);\n }\n}\n"]}
|