increase 0.4.0 → 0.6.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/_shims/agent.d.ts +9 -0
- package/_shims/agent.d.ts.map +1 -0
- package/_shims/agent.js +14 -0
- package/_shims/agent.js.map +1 -0
- package/_shims/agent.mjs +10 -0
- package/_shims/agent.mjs.map +1 -0
- package/_shims/agent.node.d.ts +7 -0
- package/_shims/agent.node.d.ts.map +1 -0
- package/_shims/agent.node.js +28 -0
- package/_shims/agent.node.js.map +1 -0
- package/_shims/agent.node.mjs +16 -0
- package/_shims/agent.node.mjs.map +1 -0
- package/_shims/fetch.d.ts +52 -0
- package/_shims/fetch.js +13 -0
- package/_shims/fetch.mjs +15 -0
- package/_shims/fetch.node.d.ts +53 -0
- package/_shims/fetch.node.js +12 -0
- package/_shims/fetch.node.mjs +14 -0
- package/_shims/fileFromPath.d.ts +22 -0
- package/_shims/fileFromPath.d.ts.map +1 -0
- package/_shims/fileFromPath.js +16 -0
- package/_shims/fileFromPath.js.map +1 -0
- package/_shims/fileFromPath.mjs +12 -0
- package/_shims/fileFromPath.mjs.map +1 -0
- package/_shims/fileFromPath.node.d.ts +17 -0
- package/_shims/fileFromPath.node.d.ts.map +1 -0
- package/_shims/fileFromPath.node.js +17 -0
- package/_shims/fileFromPath.node.js.map +1 -0
- package/_shims/fileFromPath.node.mjs +13 -0
- package/_shims/fileFromPath.node.mjs.map +1 -0
- package/_shims/formdata.d.ts +43 -0
- package/_shims/formdata.js +9 -0
- package/_shims/formdata.mjs +11 -0
- package/_shims/formdata.node.d.ts +44 -0
- package/_shims/formdata.node.js +11 -0
- package/_shims/formdata.node.mjs +9 -0
- package/_shims/getMultipartRequestOptions.d.ts +10 -0
- package/_shims/getMultipartRequestOptions.d.ts.map +1 -0
- package/_shims/getMultipartRequestOptions.js +12 -0
- package/_shims/getMultipartRequestOptions.js.map +1 -0
- package/_shims/getMultipartRequestOptions.mjs +8 -0
- package/_shims/getMultipartRequestOptions.mjs.map +1 -0
- package/_shims/getMultipartRequestOptions.node.d.ts +10 -0
- package/_shims/getMultipartRequestOptions.node.d.ts.map +1 -0
- package/_shims/getMultipartRequestOptions.node.js +22 -0
- package/_shims/getMultipartRequestOptions.node.js.map +1 -0
- package/_shims/getMultipartRequestOptions.node.mjs +18 -0
- package/_shims/getMultipartRequestOptions.node.mjs.map +1 -0
- package/_shims/node-readable.d.ts +23 -0
- package/_shims/node-readable.d.ts.map +1 -0
- package/_shims/node-readable.js +11 -0
- package/_shims/node-readable.js.map +1 -0
- package/_shims/node-readable.mjs +7 -0
- package/_shims/node-readable.mjs.map +1 -0
- package/_shims/node-readable.node.d.ts +8 -0
- package/_shims/node-readable.node.d.ts.map +1 -0
- package/_shims/node-readable.node.js +9 -0
- package/_shims/node-readable.node.js.map +1 -0
- package/_shims/node-readable.node.mjs +5 -0
- package/_shims/node-readable.node.mjs.map +1 -0
- package/core.d.ts +226 -0
- package/core.d.ts.map +1 -0
- package/core.js +683 -0
- package/core.js.map +1 -0
- package/core.mjs +587 -0
- package/core.mjs.map +1 -0
- package/error.d.ts +208 -0
- package/error.d.ts.map +1 -0
- package/error.js +326 -0
- package/error.js.map +1 -0
- package/error.mjs +277 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +344 -0
- package/index.d.ts +344 -0
- package/index.d.ts.map +1 -0
- package/index.js +285 -0
- package/index.js.map +1 -0
- package/index.mjs +216 -0
- package/index.mjs.map +1 -0
- package/package.json +57 -20
- package/pagination.d.ts +34 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +30 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +26 -0
- package/pagination.mjs.map +1 -0
- package/resource.d.ts +12 -0
- package/resource.d.ts.map +1 -0
- package/resource.js.map +1 -0
- package/resource.mjs +13 -0
- package/resource.mjs.map +1 -0
- package/resources/account-numbers.d.ts +151 -0
- package/resources/account-numbers.d.ts.map +1 -0
- package/resources/account-numbers.js +38 -0
- package/resources/account-numbers.js.map +1 -0
- package/resources/account-numbers.mjs +33 -0
- package/resources/account-numbers.mjs.map +1 -0
- package/resources/account-statements.d.ts +108 -0
- package/resources/account-statements.d.ts.map +1 -0
- package/resources/account-statements.js +28 -0
- package/resources/account-statements.js.map +1 -0
- package/resources/account-statements.mjs +21 -0
- package/resources/account-statements.mjs.map +1 -0
- package/resources/account-transfers.d.ts +218 -0
- package/resources/account-transfers.d.ts.map +1 -0
- package/resources/account-transfers.js +46 -0
- package/resources/account-transfers.js.map +1 -0
- package/resources/account-transfers.mjs +39 -0
- package/resources/account-transfers.mjs.map +1 -0
- package/resources/accounts.d.ts +178 -0
- package/resources/accounts.d.ts.map +1 -0
- package/resources/accounts.js +44 -0
- package/resources/accounts.js.map +1 -0
- package/resources/accounts.mjs +39 -0
- package/resources/accounts.mjs.map +1 -0
- package/resources/ach-prenotifications.d.ts +216 -0
- package/resources/ach-prenotifications.d.ts.map +1 -0
- package/resources/ach-prenotifications.js +34 -0
- package/resources/ach-prenotifications.js.map +1 -0
- package/resources/ach-prenotifications.mjs +27 -0
- package/resources/ach-prenotifications.mjs.map +1 -0
- package/resources/ach-transfers.d.ts +640 -0
- package/resources/ach-transfers.d.ts.map +1 -0
- package/resources/ach-transfers.js +44 -0
- package/resources/ach-transfers.js.map +1 -0
- package/resources/ach-transfers.mjs +39 -0
- package/resources/ach-transfers.mjs.map +1 -0
- package/resources/balance-lookups.d.ts +52 -0
- package/resources/balance-lookups.d.ts.map +1 -0
- package/resources/balance-lookups.js +16 -0
- package/resources/balance-lookups.js.map +1 -0
- package/resources/balance-lookups.mjs +12 -0
- package/resources/balance-lookups.mjs.map +1 -0
- package/resources/bookkeeping-accounts.d.ts +86 -0
- package/resources/bookkeeping-accounts.d.ts.map +1 -0
- package/resources/bookkeeping-accounts.js +28 -0
- package/resources/bookkeeping-accounts.js.map +1 -0
- package/resources/bookkeeping-accounts.mjs +21 -0
- package/resources/bookkeeping-accounts.mjs.map +1 -0
- package/resources/bookkeeping-entries.d.ts +51 -0
- package/resources/bookkeeping-entries.d.ts.map +1 -0
- package/resources/bookkeeping-entries.js +22 -0
- package/resources/bookkeeping-entries.js.map +1 -0
- package/resources/bookkeeping-entries.mjs +15 -0
- package/resources/bookkeeping-entries.mjs.map +1 -0
- package/resources/bookkeeping-entry-sets.d.ts +88 -0
- package/resources/bookkeeping-entry-sets.d.ts.map +1 -0
- package/resources/bookkeeping-entry-sets.js +18 -0
- package/resources/bookkeeping-entry-sets.js.map +1 -0
- package/resources/bookkeeping-entry-sets.mjs +12 -0
- package/resources/bookkeeping-entry-sets.mjs.map +1 -0
- package/resources/card-disputes.d.ts +167 -0
- package/resources/card-disputes.d.ts.map +1 -0
- package/resources/card-disputes.js +32 -0
- package/resources/card-disputes.js.map +1 -0
- package/resources/card-disputes.mjs +27 -0
- package/resources/card-disputes.mjs.map +1 -0
- package/resources/card-profiles.d.ts +214 -0
- package/resources/card-profiles.d.ts.map +1 -0
- package/resources/card-profiles.js +32 -0
- package/resources/card-profiles.js.map +1 -0
- package/resources/card-profiles.mjs +27 -0
- package/resources/card-profiles.mjs.map +1 -0
- package/resources/cards.d.ts +364 -0
- package/resources/cards.d.ts.map +1 -0
- package/resources/cards.js +44 -0
- package/resources/cards.js.map +1 -0
- package/resources/cards.mjs +39 -0
- package/resources/cards.mjs.map +1 -0
- package/resources/check-deposits.d.ts +324 -0
- package/resources/check-deposits.d.ts.map +1 -0
- package/resources/check-deposits.js +32 -0
- package/resources/check-deposits.js.map +1 -0
- package/resources/check-deposits.mjs +27 -0
- package/resources/check-deposits.mjs.map +1 -0
- package/resources/check-transfers.d.ts +454 -0
- package/resources/check-transfers.d.ts.map +1 -0
- package/resources/check-transfers.js +50 -0
- package/resources/check-transfers.js.map +1 -0
- package/resources/check-transfers.mjs +45 -0
- package/resources/check-transfers.mjs.map +1 -0
- package/resources/declined-transactions.d.ts +633 -0
- package/resources/declined-transactions.d.ts.map +1 -0
- package/resources/declined-transactions.js +28 -0
- package/resources/declined-transactions.js.map +1 -0
- package/resources/declined-transactions.mjs +21 -0
- package/resources/declined-transactions.mjs.map +1 -0
- package/resources/digital-wallet-tokens.d.ts +103 -0
- package/resources/digital-wallet-tokens.d.ts.map +1 -0
- package/resources/digital-wallet-tokens.js +28 -0
- package/resources/digital-wallet-tokens.js.map +1 -0
- package/resources/digital-wallet-tokens.mjs +21 -0
- package/resources/digital-wallet-tokens.mjs.map +1 -0
- package/resources/documents.d.ts +103 -0
- package/resources/documents.d.ts.map +1 -0
- package/resources/documents.js +26 -0
- package/resources/documents.js.map +1 -0
- package/resources/documents.mjs +21 -0
- package/resources/documents.mjs.map +1 -0
- package/resources/entities/entities.d.ts +1734 -0
- package/resources/entities/entities.d.ts.map +1 -0
- package/resources/entities/entities.js +81 -0
- package/resources/entities/entities.js.map +1 -0
- package/resources/entities/entities.mjs +36 -0
- package/resources/entities/entities.mjs.map +1 -0
- package/resources/entities/index.d.ts +9 -0
- package/resources/entities/index.d.ts.map +1 -0
- package/resources/entities/index.js +35 -0
- package/resources/entities/index.js.map +1 -0
- package/resources/entities/index.mjs +4 -0
- package/resources/entities/index.mjs.map +1 -0
- package/resources/entities/supplemental-documents.d.ts +64 -0
- package/resources/entities/supplemental-documents.d.ts.map +1 -0
- package/resources/entities/supplemental-documents.js +30 -0
- package/resources/entities/supplemental-documents.js.map +1 -0
- package/resources/entities/supplemental-documents.mjs +23 -0
- package/resources/entities/supplemental-documents.mjs.map +1 -0
- package/resources/event-subscriptions.d.ts +373 -0
- package/resources/event-subscriptions.d.ts.map +1 -0
- package/resources/event-subscriptions.js +40 -0
- package/resources/event-subscriptions.js.map +1 -0
- package/resources/event-subscriptions.mjs +33 -0
- package/resources/event-subscriptions.mjs.map +1 -0
- package/resources/events.d.ts +271 -0
- package/resources/events.d.ts.map +1 -0
- package/resources/events.js +26 -0
- package/resources/events.js.map +1 -0
- package/resources/events.mjs +21 -0
- package/resources/events.mjs.map +1 -0
- package/resources/exports.d.ts +182 -0
- package/resources/exports.d.ts.map +1 -0
- package/resources/exports.js +32 -0
- package/resources/exports.js.map +1 -0
- package/resources/exports.mjs +27 -0
- package/resources/exports.mjs.map +1 -0
- package/resources/external-accounts.d.ts +153 -0
- package/resources/external-accounts.d.ts.map +1 -0
- package/resources/external-accounts.js +40 -0
- package/resources/external-accounts.js.map +1 -0
- package/resources/external-accounts.mjs +33 -0
- package/resources/external-accounts.mjs.map +1 -0
- package/resources/files.d.ts +217 -0
- package/resources/files.d.ts.map +1 -0
- package/resources/files.js +35 -0
- package/resources/files.js.map +1 -0
- package/resources/files.mjs +30 -0
- package/resources/files.mjs.map +1 -0
- package/resources/groups.d.ts +48 -0
- package/resources/groups.d.ts.map +1 -0
- package/resources/groups.js +16 -0
- package/resources/groups.js.map +1 -0
- package/resources/groups.mjs +12 -0
- package/resources/groups.mjs.map +1 -0
- package/resources/inbound-ach-transfer-returns.d.ts +159 -0
- package/resources/inbound-ach-transfer-returns.d.ts.map +1 -0
- package/resources/inbound-ach-transfer-returns.js +37 -0
- package/resources/inbound-ach-transfer-returns.js.map +1 -0
- package/resources/inbound-ach-transfer-returns.mjs +30 -0
- package/resources/inbound-ach-transfer-returns.mjs.map +1 -0
- package/resources/inbound-wire-drawdown-requests.d.ts +133 -0
- package/resources/inbound-wire-drawdown-requests.d.ts.map +1 -0
- package/resources/inbound-wire-drawdown-requests.js +32 -0
- package/resources/inbound-wire-drawdown-requests.js.map +1 -0
- package/resources/inbound-wire-drawdown-requests.mjs +26 -0
- package/resources/inbound-wire-drawdown-requests.mjs.map +1 -0
- package/resources/index.d.ts +200 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +569 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +44 -0
- package/resources/index.mjs.map +1 -0
- package/resources/limits.d.ts +152 -0
- package/resources/limits.d.ts.map +1 -0
- package/resources/limits.js +38 -0
- package/resources/limits.js.map +1 -0
- package/resources/limits.mjs +33 -0
- package/resources/limits.mjs.map +1 -0
- package/resources/oauth-connections.d.ts +62 -0
- package/resources/oauth-connections.d.ts.map +1 -0
- package/resources/oauth-connections.js +28 -0
- package/resources/oauth-connections.js.map +1 -0
- package/resources/oauth-connections.mjs +21 -0
- package/resources/oauth-connections.mjs.map +1 -0
- package/resources/pending-transactions.d.ts +594 -0
- package/resources/pending-transactions.d.ts.map +1 -0
- package/resources/pending-transactions.js +28 -0
- package/resources/pending-transactions.js.map +1 -0
- package/resources/pending-transactions.mjs +21 -0
- package/resources/pending-transactions.mjs.map +1 -0
- package/resources/programs.d.ts +56 -0
- package/resources/programs.d.ts.map +1 -0
- package/resources/programs.js +26 -0
- package/resources/programs.js.map +1 -0
- package/resources/programs.mjs +21 -0
- package/resources/programs.mjs.map +1 -0
- package/resources/real-time-decisions.d.ts +400 -0
- package/resources/real-time-decisions.d.ts.map +1 -0
- package/resources/real-time-decisions.js +24 -0
- package/resources/real-time-decisions.js.map +1 -0
- package/resources/real-time-decisions.mjs +18 -0
- package/resources/real-time-decisions.mjs.map +1 -0
- package/resources/real-time-payments-transfers.d.ts +363 -0
- package/resources/real-time-payments-transfers.d.ts.map +1 -0
- package/resources/real-time-payments-transfers.js +37 -0
- package/resources/real-time-payments-transfers.js.map +1 -0
- package/resources/real-time-payments-transfers.mjs +30 -0
- package/resources/real-time-payments-transfers.mjs.map +1 -0
- package/resources/routing-numbers.d.ts +67 -0
- package/resources/routing-numbers.d.ts.map +1 -0
- package/resources/routing-numbers.js +22 -0
- package/resources/routing-numbers.js.map +1 -0
- package/resources/routing-numbers.mjs +17 -0
- package/resources/routing-numbers.mjs.map +1 -0
- package/resources/shared.d.ts +29 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +3 -0
- package/resources/shared.mjs.map +1 -0
- package/resources/simulations/account-statements.d.ts +24 -0
- package/resources/simulations/account-statements.d.ts.map +1 -0
- package/resources/simulations/account-statements.js +19 -0
- package/resources/simulations/account-statements.js.map +1 -0
- package/resources/simulations/account-statements.mjs +13 -0
- package/resources/simulations/account-statements.mjs.map +1 -0
- package/resources/simulations/account-transfers.d.ts +16 -0
- package/resources/simulations/account-transfers.d.ts.map +1 -0
- package/resources/simulations/account-transfers.js +18 -0
- package/resources/simulations/account-transfers.js.map +1 -0
- package/resources/simulations/account-transfers.mjs +14 -0
- package/resources/simulations/account-transfers.mjs.map +1 -0
- package/resources/simulations/ach-transfers.d.ts +2439 -0
- package/resources/simulations/ach-transfers.d.ts.map +1 -0
- package/resources/simulations/ach-transfers.js +40 -0
- package/resources/simulations/ach-transfers.js.map +1 -0
- package/resources/simulations/ach-transfers.mjs +36 -0
- package/resources/simulations/ach-transfers.mjs.map +1 -0
- package/resources/simulations/card-disputes.d.ts +35 -0
- package/resources/simulations/card-disputes.d.ts.map +1 -0
- package/resources/simulations/card-disputes.js +19 -0
- package/resources/simulations/card-disputes.js.map +1 -0
- package/resources/simulations/card-disputes.mjs +15 -0
- package/resources/simulations/card-disputes.mjs.map +1 -0
- package/resources/simulations/card-profiles.d.ts +17 -0
- package/resources/simulations/card-profiles.d.ts.map +1 -0
- package/resources/simulations/card-profiles.js +19 -0
- package/resources/simulations/card-profiles.js.map +1 -0
- package/resources/simulations/card-profiles.mjs +15 -0
- package/resources/simulations/card-profiles.mjs.map +1 -0
- package/resources/simulations/card-refunds.d.ts +25 -0
- package/resources/simulations/card-refunds.d.ts.map +1 -0
- package/resources/simulations/card-refunds.js +17 -0
- package/resources/simulations/card-refunds.js.map +1 -0
- package/resources/simulations/card-refunds.mjs +13 -0
- package/resources/simulations/card-refunds.mjs.map +1 -0
- package/resources/simulations/cards.d.ts +1180 -0
- package/resources/simulations/cards.d.ts.map +1 -0
- package/resources/simulations/cards.js +32 -0
- package/resources/simulations/cards.js.map +1 -0
- package/resources/simulations/cards.mjs +28 -0
- package/resources/simulations/cards.mjs.map +1 -0
- package/resources/simulations/check-deposits.d.ts +31 -0
- package/resources/simulations/check-deposits.d.ts.map +1 -0
- package/resources/simulations/check-deposits.js +31 -0
- package/resources/simulations/check-deposits.js.map +1 -0
- package/resources/simulations/check-deposits.mjs +27 -0
- package/resources/simulations/check-deposits.mjs.map +1 -0
- package/resources/simulations/check-transfers.d.ts +23 -0
- package/resources/simulations/check-transfers.d.ts.map +1 -0
- package/resources/simulations/check-transfers.js +24 -0
- package/resources/simulations/check-transfers.js.map +1 -0
- package/resources/simulations/check-transfers.mjs +20 -0
- package/resources/simulations/check-transfers.mjs.map +1 -0
- package/resources/simulations/digital-wallet-token-requests.d.ts +56 -0
- package/resources/simulations/digital-wallet-token-requests.d.ts.map +1 -0
- package/resources/simulations/digital-wallet-token-requests.js +20 -0
- package/resources/simulations/digital-wallet-token-requests.js.map +1 -0
- package/resources/simulations/digital-wallet-token-requests.mjs +13 -0
- package/resources/simulations/digital-wallet-token-requests.mjs.map +1 -0
- package/resources/simulations/documents.d.ts +23 -0
- package/resources/simulations/documents.d.ts.map +1 -0
- package/resources/simulations/documents.js +16 -0
- package/resources/simulations/documents.js.map +1 -0
- package/resources/simulations/documents.mjs +12 -0
- package/resources/simulations/documents.mjs.map +1 -0
- package/resources/simulations/inbound-wire-drawdown-requests.d.ts +106 -0
- package/resources/simulations/inbound-wire-drawdown-requests.d.ts.map +1 -0
- package/resources/simulations/inbound-wire-drawdown-requests.js +20 -0
- package/resources/simulations/inbound-wire-drawdown-requests.js.map +1 -0
- package/resources/simulations/inbound-wire-drawdown-requests.mjs +15 -0
- package/resources/simulations/inbound-wire-drawdown-requests.mjs.map +1 -0
- package/resources/simulations/index.d.ts +39 -0
- package/resources/simulations/index.d.ts.map +1 -0
- package/resources/simulations/index.js +141 -0
- package/resources/simulations/index.js.map +1 -0
- package/resources/simulations/index.mjs +19 -0
- package/resources/simulations/index.mjs.map +1 -0
- package/resources/simulations/interest-payments.d.ts +1591 -0
- package/resources/simulations/interest-payments.d.ts.map +1 -0
- package/resources/simulations/interest-payments.js +19 -0
- package/resources/simulations/interest-payments.js.map +1 -0
- package/resources/simulations/interest-payments.mjs +13 -0
- package/resources/simulations/interest-payments.mjs.map +1 -0
- package/resources/simulations/programs.d.ts +25 -0
- package/resources/simulations/programs.d.ts.map +1 -0
- package/resources/simulations/programs.js +18 -0
- package/resources/simulations/programs.js.map +1 -0
- package/resources/simulations/programs.mjs +14 -0
- package/resources/simulations/programs.mjs.map +1 -0
- package/resources/simulations/real-time-payments-transfers.d.ts +2289 -0
- package/resources/simulations/real-time-payments-transfers.d.ts.map +1 -0
- package/resources/simulations/real-time-payments-transfers.js +30 -0
- package/resources/simulations/real-time-payments-transfers.js.map +1 -0
- package/resources/simulations/real-time-payments-transfers.mjs +24 -0
- package/resources/simulations/real-time-payments-transfers.mjs.map +1 -0
- package/resources/simulations/simulations.d.ts +76 -0
- package/resources/simulations/simulations.d.ts.map +1 -0
- package/resources/simulations/simulations.js +109 -0
- package/resources/simulations/simulations.js.map +1 -0
- package/resources/simulations/simulations.mjs +59 -0
- package/resources/simulations/simulations.mjs.map +1 -0
- package/resources/simulations/wire-transfers.d.ts +1657 -0
- package/resources/simulations/wire-transfers.d.ts.map +1 -0
- package/resources/simulations/wire-transfers.js +16 -0
- package/resources/simulations/wire-transfers.js.map +1 -0
- package/resources/simulations/wire-transfers.mjs +12 -0
- package/resources/simulations/wire-transfers.mjs.map +1 -0
- package/resources/transactions.d.ts +1646 -0
- package/resources/transactions.d.ts.map +1 -0
- package/resources/transactions.js +26 -0
- package/resources/transactions.js.map +1 -0
- package/resources/transactions.mjs +21 -0
- package/resources/transactions.mjs.map +1 -0
- package/resources/wire-drawdown-requests.d.ts +169 -0
- package/resources/wire-drawdown-requests.d.ts.map +1 -0
- package/resources/wire-drawdown-requests.js +34 -0
- package/resources/wire-drawdown-requests.js.map +1 -0
- package/resources/wire-drawdown-requests.mjs +27 -0
- package/resources/wire-drawdown-requests.mjs.map +1 -0
- package/resources/wire-transfers.d.ts +370 -0
- package/resources/wire-transfers.d.ts.map +1 -0
- package/resources/wire-transfers.js +61 -0
- package/resources/wire-transfers.js.map +1 -0
- package/resources/wire-transfers.mjs +56 -0
- package/resources/wire-transfers.mjs.map +1 -0
- package/src/_shims/agent.node.ts +22 -0
- package/src/_shims/agent.ts +12 -0
- package/src/_shims/fetch.d.ts +52 -0
- package/src/_shims/fetch.js +13 -0
- package/src/_shims/fetch.mjs +15 -0
- package/src/_shims/fetch.node.d.ts +53 -0
- package/src/_shims/fetch.node.js +12 -0
- package/src/_shims/fetch.node.mjs +14 -0
- package/src/_shims/fileFromPath.node.ts +29 -0
- package/src/_shims/fileFromPath.ts +29 -0
- package/src/_shims/formdata.d.ts +43 -0
- package/src/_shims/formdata.js +9 -0
- package/src/_shims/formdata.mjs +11 -0
- package/src/_shims/formdata.node.d.ts +44 -0
- package/src/_shims/formdata.node.js +11 -0
- package/src/_shims/formdata.node.mjs +9 -0
- package/src/_shims/getMultipartRequestOptions.node.ts +25 -0
- package/src/_shims/getMultipartRequestOptions.ts +14 -0
- package/src/_shims/node-readable.node.ts +10 -0
- package/src/_shims/node-readable.ts +30 -0
- package/src/core.ts +783 -0
- package/src/error.ts +505 -0
- package/src/index.ts +443 -0
- package/src/pagination.ts +64 -0
- package/src/resources/account-numbers.ts +193 -0
- package/src/resources/account-statements.ts +140 -0
- package/src/resources/account-transfers.ts +273 -0
- package/src/resources/accounts.ts +228 -0
- package/src/resources/ach-prenotifications.ts +269 -0
- package/src/resources/ach-transfers.ts +732 -0
- package/src/resources/balance-lookups.ts +63 -0
- package/src/resources/bookkeeping-accounts.ts +114 -0
- package/src/resources/bookkeeping-entries.ts +71 -0
- package/src/resources/bookkeeping-entry-sets.ts +106 -0
- package/src/resources/card-disputes.ts +210 -0
- package/src/resources/card-profiles.ts +266 -0
- package/src/resources/cards.ts +445 -0
- package/src/resources/check-deposits.ts +385 -0
- package/src/resources/check-transfers.ts +556 -0
- package/src/resources/declined-transactions.ts +764 -0
- package/src/resources/digital-wallet-tokens.ts +132 -0
- package/src/resources/documents.ts +134 -0
- package/src/resources/entities/entities.ts +2025 -0
- package/src/resources/entities/index.ts +10 -0
- package/src/resources/entities/supplemental-documents.ts +81 -0
- package/src/resources/event-subscriptions.ts +408 -0
- package/src/resources/events.ts +302 -0
- package/src/resources/exports.ts +225 -0
- package/src/resources/external-accounts.ts +193 -0
- package/src/resources/files.ts +255 -0
- package/src/resources/groups.ts +58 -0
- package/src/resources/inbound-ach-transfer-returns.ts +194 -0
- package/src/resources/inbound-wire-drawdown-requests.ts +176 -0
- package/src/resources/index.ts +194 -0
- package/src/resources/limits.ts +190 -0
- package/src/resources/oauth-connections.ts +85 -0
- package/src/resources/pending-transactions.ts +688 -0
- package/src/resources/programs.ts +79 -0
- package/src/resources/real-time-decisions.ts +456 -0
- package/src/resources/real-time-payments-transfers.ts +428 -0
- package/src/resources/routing-numbers.ts +80 -0
- package/src/resources/shared.ts +30 -0
- package/src/resources/simulations/account-statements.ts +30 -0
- package/src/resources/simulations/account-transfers.ts +20 -0
- package/src/resources/simulations/ach-transfers.ts +2826 -0
- package/src/resources/simulations/card-disputes.ts +42 -0
- package/src/resources/simulations/card-profiles.ts +21 -0
- package/src/resources/simulations/card-refunds.ts +31 -0
- package/src/resources/simulations/cards.ts +1372 -0
- package/src/resources/simulations/check-deposits.ts +41 -0
- package/src/resources/simulations/check-transfers.ts +30 -0
- package/src/resources/simulations/digital-wallet-token-requests.ts +65 -0
- package/src/resources/simulations/documents.ts +29 -0
- package/src/resources/simulations/inbound-wire-drawdown-requests.ts +131 -0
- package/src/resources/simulations/index.ts +40 -0
- package/src/resources/simulations/interest-payments.ts +1858 -0
- package/src/resources/simulations/programs.ts +31 -0
- package/src/resources/simulations/real-time-payments-transfers.ts +2677 -0
- package/src/resources/simulations/simulations.ts +94 -0
- package/src/resources/simulations/wire-transfers.ts +1937 -0
- package/src/resources/transactions.ts +1930 -0
- package/src/resources/wire-drawdown-requests.ts +215 -0
- package/src/resources/wire-transfers.ts +462 -0
- package/src/streaming.ts +204 -0
- package/src/uploads.ts +248 -0
- package/src/version.ts +1 -0
- package/streaming.d.ts +14 -0
- package/streaming.d.ts.map +1 -0
- package/streaming.js +155 -0
- package/streaming.js.map +1 -0
- package/streaming.mjs +151 -0
- package/streaming.mjs.map +1 -0
- package/uploads.d.ts +90 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +207 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +174 -0
- package/uploads.mjs.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
- package/.eslintrc.js +0 -10
- package/.prettierignore +0 -1
- package/.prettierrc +0 -6
- package/.release-please-manifest.json +0 -3
- package/.stats.yml +0 -1
- package/CHANGELOG.md +0 -130
- package/LICENSE +0 -201
- package/README.md +0 -225
- package/api.md +0 -576
- package/bin/check-release-environment +0 -25
- package/bin/check-test-server +0 -50
- package/bin/publish-npm +0 -6
- package/build +0 -12
- package/check-version.ts +0 -18
- package/core.ts +0 -814
- package/dist/cjs/check-version.d.ts +0 -2
- package/dist/cjs/check-version.d.ts.map +0 -1
- package/dist/cjs/check-version.js +0 -23
- package/dist/cjs/check-version.js.map +0 -1
- package/dist/cjs/core.d.ts +0 -232
- package/dist/cjs/core.d.ts.map +0 -1
- package/dist/cjs/core.js +0 -854
- package/dist/cjs/core.js.map +0 -1
- package/dist/cjs/error.d.ts +0 -208
- package/dist/cjs/error.d.ts.map +0 -1
- package/dist/cjs/error.js +0 -326
- package/dist/cjs/error.js.map +0 -1
- package/dist/cjs/examples/api-error.d.ts +0 -3
- package/dist/cjs/examples/api-error.d.ts.map +0 -1
- package/dist/cjs/examples/api-error.js +0 -92
- package/dist/cjs/examples/api-error.js.map +0 -1
- package/dist/cjs/fetch-polyfill.d.ts +0 -6
- package/dist/cjs/fetch-polyfill.d.ts.map +0 -1
- package/dist/cjs/fetch-polyfill.js +0 -57
- package/dist/cjs/fetch-polyfill.js.map +0 -1
- package/dist/cjs/index.d.ts +0 -261
- package/dist/cjs/index.d.ts.map +0 -1
- package/dist/cjs/index.js +0 -237
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/pagination.d.ts +0 -32
- package/dist/cjs/pagination.d.ts.map +0 -1
- package/dist/cjs/pagination.js +0 -30
- package/dist/cjs/pagination.js.map +0 -1
- package/dist/cjs/resource.d.ts +0 -12
- package/dist/cjs/resource.d.ts.map +0 -1
- package/dist/cjs/resource.js.map +0 -1
- package/dist/cjs/resources/account-numbers.d.ts +0 -129
- package/dist/cjs/resources/account-numbers.d.ts.map +0 -1
- package/dist/cjs/resources/account-numbers.js +0 -37
- package/dist/cjs/resources/account-numbers.js.map +0 -1
- package/dist/cjs/resources/account-statements.d.ts +0 -100
- package/dist/cjs/resources/account-statements.d.ts.map +0 -1
- package/dist/cjs/resources/account-statements.js +0 -25
- package/dist/cjs/resources/account-statements.js.map +0 -1
- package/dist/cjs/resources/account-transfers.d.ts +0 -198
- package/dist/cjs/resources/account-transfers.d.ts.map +0 -1
- package/dist/cjs/resources/account-transfers.js +0 -43
- package/dist/cjs/resources/account-transfers.js.map +0 -1
- package/dist/cjs/resources/accounts.d.ts +0 -155
- package/dist/cjs/resources/accounts.d.ts.map +0 -1
- package/dist/cjs/resources/accounts.js +0 -43
- package/dist/cjs/resources/accounts.js.map +0 -1
- package/dist/cjs/resources/ach-prenotifications.d.ts +0 -192
- package/dist/cjs/resources/ach-prenotifications.d.ts.map +0 -1
- package/dist/cjs/resources/ach-prenotifications.js +0 -35
- package/dist/cjs/resources/ach-prenotifications.js.map +0 -1
- package/dist/cjs/resources/ach-transfers.d.ts +0 -455
- package/dist/cjs/resources/ach-transfers.d.ts.map +0 -1
- package/dist/cjs/resources/ach-transfers.js +0 -43
- package/dist/cjs/resources/ach-transfers.js.map +0 -1
- package/dist/cjs/resources/balance-lookups.d.ts +0 -47
- package/dist/cjs/resources/balance-lookups.d.ts.map +0 -1
- package/dist/cjs/resources/balance-lookups.js +0 -15
- package/dist/cjs/resources/balance-lookups.js.map +0 -1
- package/dist/cjs/resources/bookkeeping-accounts.d.ts +0 -71
- package/dist/cjs/resources/bookkeeping-accounts.d.ts.map +0 -1
- package/dist/cjs/resources/bookkeeping-accounts.js +0 -29
- package/dist/cjs/resources/bookkeeping-accounts.js.map +0 -1
- package/dist/cjs/resources/bookkeeping-entries.d.ts +0 -43
- package/dist/cjs/resources/bookkeeping-entries.d.ts.map +0 -1
- package/dist/cjs/resources/bookkeeping-entries.js +0 -19
- package/dist/cjs/resources/bookkeeping-entries.js.map +0 -1
- package/dist/cjs/resources/bookkeeping-entry-sets.d.ts +0 -83
- package/dist/cjs/resources/bookkeeping-entry-sets.d.ts.map +0 -1
- package/dist/cjs/resources/bookkeeping-entry-sets.js +0 -15
- package/dist/cjs/resources/bookkeeping-entry-sets.js.map +0 -1
- package/dist/cjs/resources/card-disputes.d.ts +0 -153
- package/dist/cjs/resources/card-disputes.d.ts.map +0 -1
- package/dist/cjs/resources/card-disputes.js +0 -31
- package/dist/cjs/resources/card-disputes.js.map +0 -1
- package/dist/cjs/resources/card-profiles.d.ts +0 -199
- package/dist/cjs/resources/card-profiles.d.ts.map +0 -1
- package/dist/cjs/resources/card-profiles.js +0 -31
- package/dist/cjs/resources/card-profiles.js.map +0 -1
- package/dist/cjs/resources/cards.d.ts +0 -345
- package/dist/cjs/resources/cards.d.ts.map +0 -1
- package/dist/cjs/resources/cards.js +0 -43
- package/dist/cjs/resources/cards.js.map +0 -1
- package/dist/cjs/resources/check-deposits.d.ts +0 -256
- package/dist/cjs/resources/check-deposits.d.ts.map +0 -1
- package/dist/cjs/resources/check-deposits.js +0 -31
- package/dist/cjs/resources/check-deposits.js.map +0 -1
- package/dist/cjs/resources/check-transfers.d.ts +0 -430
- package/dist/cjs/resources/check-transfers.d.ts.map +0 -1
- package/dist/cjs/resources/check-transfers.js +0 -49
- package/dist/cjs/resources/check-transfers.js.map +0 -1
- package/dist/cjs/resources/declined-transactions.d.ts +0 -486
- package/dist/cjs/resources/declined-transactions.d.ts.map +0 -1
- package/dist/cjs/resources/declined-transactions.js +0 -29
- package/dist/cjs/resources/declined-transactions.js.map +0 -1
- package/dist/cjs/resources/digital-wallet-tokens.d.ts +0 -86
- package/dist/cjs/resources/digital-wallet-tokens.d.ts.map +0 -1
- package/dist/cjs/resources/digital-wallet-tokens.js +0 -29
- package/dist/cjs/resources/digital-wallet-tokens.js.map +0 -1
- package/dist/cjs/resources/documents.d.ts +0 -188
- package/dist/cjs/resources/documents.d.ts.map +0 -1
- package/dist/cjs/resources/documents.js +0 -25
- package/dist/cjs/resources/documents.js.map +0 -1
- package/dist/cjs/resources/entities/entities.d.ts +0 -1610
- package/dist/cjs/resources/entities/entities.d.ts.map +0 -1
- package/dist/cjs/resources/entities/entities.js +0 -36
- package/dist/cjs/resources/entities/entities.js.map +0 -1
- package/dist/cjs/resources/entities/index.d.ts +0 -8
- package/dist/cjs/resources/entities/index.d.ts.map +0 -1
- package/dist/cjs/resources/entities/index.js +0 -19
- package/dist/cjs/resources/entities/index.js.map +0 -1
- package/dist/cjs/resources/entities/supplemental-documents.d.ts +0 -55
- package/dist/cjs/resources/entities/supplemental-documents.d.ts.map +0 -1
- package/dist/cjs/resources/entities/supplemental-documents.js +0 -28
- package/dist/cjs/resources/entities/supplemental-documents.js.map +0 -1
- package/dist/cjs/resources/event-subscriptions.d.ts +0 -201
- package/dist/cjs/resources/event-subscriptions.d.ts.map +0 -1
- package/dist/cjs/resources/event-subscriptions.js +0 -37
- package/dist/cjs/resources/event-subscriptions.js.map +0 -1
- package/dist/cjs/resources/events.d.ts +0 -189
- package/dist/cjs/resources/events.d.ts.map +0 -1
- package/dist/cjs/resources/events.js +0 -25
- package/dist/cjs/resources/events.js.map +0 -1
- package/dist/cjs/resources/exports.d.ts +0 -162
- package/dist/cjs/resources/exports.d.ts.map +0 -1
- package/dist/cjs/resources/exports.js +0 -31
- package/dist/cjs/resources/exports.js.map +0 -1
- package/dist/cjs/resources/external-accounts.d.ts +0 -123
- package/dist/cjs/resources/external-accounts.d.ts.map +0 -1
- package/dist/cjs/resources/external-accounts.js +0 -37
- package/dist/cjs/resources/external-accounts.js.map +0 -1
- package/dist/cjs/resources/files.d.ts +0 -154
- package/dist/cjs/resources/files.d.ts.map +0 -1
- package/dist/cjs/resources/files.js +0 -34
- package/dist/cjs/resources/files.js.map +0 -1
- package/dist/cjs/resources/groups.d.ts +0 -38
- package/dist/cjs/resources/groups.d.ts.map +0 -1
- package/dist/cjs/resources/groups.js +0 -15
- package/dist/cjs/resources/groups.js.map +0 -1
- package/dist/cjs/resources/inbound-ach-transfer-returns.d.ts +0 -110
- package/dist/cjs/resources/inbound-ach-transfer-returns.d.ts.map +0 -1
- package/dist/cjs/resources/inbound-ach-transfer-returns.js +0 -35
- package/dist/cjs/resources/inbound-ach-transfer-returns.js.map +0 -1
- package/dist/cjs/resources/inbound-wire-drawdown-requests.d.ts +0 -125
- package/dist/cjs/resources/inbound-wire-drawdown-requests.d.ts.map +0 -1
- package/dist/cjs/resources/inbound-wire-drawdown-requests.js +0 -29
- package/dist/cjs/resources/inbound-wire-drawdown-requests.js.map +0 -1
- package/dist/cjs/resources/index.d.ts +0 -192
- package/dist/cjs/resources/index.d.ts.map +0 -1
- package/dist/cjs/resources/index.js +0 -569
- package/dist/cjs/resources/index.js.map +0 -1
- package/dist/cjs/resources/limits.d.ts +0 -106
- package/dist/cjs/resources/limits.d.ts.map +0 -1
- package/dist/cjs/resources/limits.js +0 -37
- package/dist/cjs/resources/limits.js.map +0 -1
- package/dist/cjs/resources/oauth-connections.d.ts +0 -51
- package/dist/cjs/resources/oauth-connections.d.ts.map +0 -1
- package/dist/cjs/resources/oauth-connections.js +0 -25
- package/dist/cjs/resources/oauth-connections.js.map +0 -1
- package/dist/cjs/resources/pending-transactions.d.ts +0 -476
- package/dist/cjs/resources/pending-transactions.d.ts.map +0 -1
- package/dist/cjs/resources/pending-transactions.js +0 -29
- package/dist/cjs/resources/pending-transactions.js.map +0 -1
- package/dist/cjs/resources/programs.d.ts +0 -48
- package/dist/cjs/resources/programs.d.ts.map +0 -1
- package/dist/cjs/resources/programs.js +0 -25
- package/dist/cjs/resources/programs.js.map +0 -1
- package/dist/cjs/resources/real-time-decisions.d.ts +0 -325
- package/dist/cjs/resources/real-time-decisions.d.ts.map +0 -1
- package/dist/cjs/resources/real-time-decisions.js +0 -21
- package/dist/cjs/resources/real-time-decisions.js.map +0 -1
- package/dist/cjs/resources/real-time-payments-transfers.d.ts +0 -287
- package/dist/cjs/resources/real-time-payments-transfers.d.ts.map +0 -1
- package/dist/cjs/resources/real-time-payments-transfers.js +0 -35
- package/dist/cjs/resources/real-time-payments-transfers.js.map +0 -1
- package/dist/cjs/resources/routing-numbers.d.ts +0 -50
- package/dist/cjs/resources/routing-numbers.d.ts.map +0 -1
- package/dist/cjs/resources/routing-numbers.js +0 -21
- package/dist/cjs/resources/routing-numbers.js.map +0 -1
- package/dist/cjs/resources/shared.d.ts +0 -16
- package/dist/cjs/resources/shared.d.ts.map +0 -1
- package/dist/cjs/resources/shared.js.map +0 -1
- package/dist/cjs/resources/simulations/account-statements.d.ts +0 -20
- package/dist/cjs/resources/simulations/account-statements.d.ts.map +0 -1
- package/dist/cjs/resources/simulations/account-statements.js +0 -16
- package/dist/cjs/resources/simulations/account-statements.js.map +0 -1
- package/dist/cjs/resources/simulations/account-transfers.d.ts +0 -16
- package/dist/cjs/resources/simulations/account-transfers.d.ts.map +0 -1
- package/dist/cjs/resources/simulations/account-transfers.js +0 -18
- package/dist/cjs/resources/simulations/account-transfers.js.map +0 -1
- package/dist/cjs/resources/simulations/ach-transfers.d.ts +0 -1801
- package/dist/cjs/resources/simulations/ach-transfers.d.ts.map +0 -1
- package/dist/cjs/resources/simulations/ach-transfers.js +0 -39
- package/dist/cjs/resources/simulations/ach-transfers.js.map +0 -1
- package/dist/cjs/resources/simulations/card-disputes.d.ts +0 -27
- package/dist/cjs/resources/simulations/card-disputes.d.ts.map +0 -1
- package/dist/cjs/resources/simulations/card-disputes.js +0 -18
- package/dist/cjs/resources/simulations/card-disputes.js.map +0 -1
- package/dist/cjs/resources/simulations/card-refunds.d.ts +0 -21
- package/dist/cjs/resources/simulations/card-refunds.d.ts.map +0 -1
- package/dist/cjs/resources/simulations/card-refunds.js +0 -16
- package/dist/cjs/resources/simulations/card-refunds.js.map +0 -1
- package/dist/cjs/resources/simulations/cards.d.ts +0 -925
- package/dist/cjs/resources/simulations/cards.d.ts.map +0 -1
- package/dist/cjs/resources/simulations/cards.js +0 -31
- package/dist/cjs/resources/simulations/cards.js.map +0 -1
- package/dist/cjs/resources/simulations/check-deposits.d.ts +0 -31
- package/dist/cjs/resources/simulations/check-deposits.d.ts.map +0 -1
- package/dist/cjs/resources/simulations/check-deposits.js +0 -31
- package/dist/cjs/resources/simulations/check-deposits.js.map +0 -1
- package/dist/cjs/resources/simulations/check-transfers.d.ts +0 -38
- package/dist/cjs/resources/simulations/check-transfers.d.ts.map +0 -1
- package/dist/cjs/resources/simulations/check-transfers.js +0 -34
- package/dist/cjs/resources/simulations/check-transfers.js.map +0 -1
- package/dist/cjs/resources/simulations/digital-wallet-token-requests.d.ts +0 -44
- package/dist/cjs/resources/simulations/digital-wallet-token-requests.d.ts.map +0 -1
- package/dist/cjs/resources/simulations/digital-wallet-token-requests.js +0 -16
- package/dist/cjs/resources/simulations/digital-wallet-token-requests.js.map +0 -1
- package/dist/cjs/resources/simulations/documents.d.ts +0 -19
- package/dist/cjs/resources/simulations/documents.d.ts.map +0 -1
- package/dist/cjs/resources/simulations/documents.js +0 -15
- package/dist/cjs/resources/simulations/documents.js.map +0 -1
- package/dist/cjs/resources/simulations/inbound-wire-drawdown-requests.d.ts +0 -102
- package/dist/cjs/resources/simulations/inbound-wire-drawdown-requests.d.ts.map +0 -1
- package/dist/cjs/resources/simulations/inbound-wire-drawdown-requests.js +0 -16
- package/dist/cjs/resources/simulations/inbound-wire-drawdown-requests.js.map +0 -1
- package/dist/cjs/resources/simulations/index.d.ts +0 -25
- package/dist/cjs/resources/simulations/index.d.ts.map +0 -1
- package/dist/cjs/resources/simulations/index.js +0 -4
- package/dist/cjs/resources/simulations/index.js.map +0 -1
- package/dist/cjs/resources/simulations/interest-payments.d.ts +0 -1237
- package/dist/cjs/resources/simulations/interest-payments.d.ts.map +0 -1
- package/dist/cjs/resources/simulations/interest-payments.js +0 -16
- package/dist/cjs/resources/simulations/interest-payments.js.map +0 -1
- package/dist/cjs/resources/simulations/programs.d.ts +0 -21
- package/dist/cjs/resources/simulations/programs.d.ts.map +0 -1
- package/dist/cjs/resources/simulations/programs.js +0 -17
- package/dist/cjs/resources/simulations/programs.js.map +0 -1
- package/dist/cjs/resources/simulations/real-time-payments-transfers.d.ts +0 -1746
- package/dist/cjs/resources/simulations/real-time-payments-transfers.d.ts.map +0 -1
- package/dist/cjs/resources/simulations/real-time-payments-transfers.js +0 -27
- package/dist/cjs/resources/simulations/real-time-payments-transfers.js.map +0 -1
- package/dist/cjs/resources/simulations/simulations.d.ts +0 -34
- package/dist/cjs/resources/simulations/simulations.d.ts.map +0 -1
- package/dist/cjs/resources/simulations/simulations.js +0 -48
- package/dist/cjs/resources/simulations/simulations.js.map +0 -1
- package/dist/cjs/resources/simulations/wire-transfers.d.ts +0 -1303
- package/dist/cjs/resources/simulations/wire-transfers.d.ts.map +0 -1
- package/dist/cjs/resources/simulations/wire-transfers.js +0 -15
- package/dist/cjs/resources/simulations/wire-transfers.js.map +0 -1
- package/dist/cjs/resources/transactions.d.ts +0 -1289
- package/dist/cjs/resources/transactions.d.ts.map +0 -1
- package/dist/cjs/resources/transactions.js +0 -25
- package/dist/cjs/resources/transactions.js.map +0 -1
- package/dist/cjs/resources/wire-drawdown-requests.d.ts +0 -153
- package/dist/cjs/resources/wire-drawdown-requests.d.ts.map +0 -1
- package/dist/cjs/resources/wire-drawdown-requests.js +0 -35
- package/dist/cjs/resources/wire-drawdown-requests.js.map +0 -1
- package/dist/cjs/resources/wire-transfers.d.ts +0 -345
- package/dist/cjs/resources/wire-transfers.d.ts.map +0 -1
- package/dist/cjs/resources/wire-transfers.js +0 -60
- package/dist/cjs/resources/wire-transfers.js.map +0 -1
- package/dist/cjs/streaming.d.ts +0 -13
- package/dist/cjs/streaming.d.ts.map +0 -1
- package/dist/cjs/streaming.js +0 -282
- package/dist/cjs/streaming.js.map +0 -1
- package/dist/cjs/tests/api-resources/account-numbers.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/account-numbers.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/account-numbers.test.js +0 -101
- package/dist/cjs/tests/api-resources/account-numbers.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/account-statements.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/account-statements.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/account-statements.test.js +0 -88
- package/dist/cjs/tests/api-resources/account-statements.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/account-transfers.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/account-transfers.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/account-transfers.test.js +0 -133
- package/dist/cjs/tests/api-resources/account-transfers.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/accounts.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/accounts.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/accounts.test.js +0 -118
- package/dist/cjs/tests/api-resources/accounts.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/ach-prenotifications.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/ach-prenotifications.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/ach-prenotifications.test.js +0 -113
- package/dist/cjs/tests/api-resources/ach-prenotifications.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/ach-transfers.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/ach-transfers.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/ach-transfers.test.js +0 -145
- package/dist/cjs/tests/api-resources/ach-transfers.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/balance-lookups.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/balance-lookups.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/balance-lookups.test.js +0 -55
- package/dist/cjs/tests/api-resources/balance-lookups.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/bookkeeping-accounts.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/bookkeeping-accounts.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/bookkeeping-accounts.test.js +0 -78
- package/dist/cjs/tests/api-resources/bookkeeping-accounts.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/bookkeeping-entries.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/bookkeeping-entries.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/bookkeeping-entries.test.js +0 -65
- package/dist/cjs/tests/api-resources/bookkeeping-entries.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/bookkeeping-entry-sets.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/bookkeeping-entry-sets.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/bookkeeping-entry-sets.test.js +0 -66
- package/dist/cjs/tests/api-resources/bookkeeping-entry-sets.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/card-disputes.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/card-disputes.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/card-disputes.test.js +0 -102
- package/dist/cjs/tests/api-resources/card-disputes.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/card-profiles.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/card-profiles.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/card-profiles.test.js +0 -106
- package/dist/cjs/tests/api-resources/card-profiles.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/cards.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/cards.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/cards.test.js +0 -116
- package/dist/cjs/tests/api-resources/cards.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/check-deposits.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/check-deposits.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/check-deposits.test.js +0 -110
- package/dist/cjs/tests/api-resources/check-deposits.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/check-transfers.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/check-transfers.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/check-transfers.test.js +0 -159
- package/dist/cjs/tests/api-resources/check-transfers.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/declined-transactions.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/declined-transactions.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/declined-transactions.test.js +0 -91
- package/dist/cjs/tests/api-resources/declined-transactions.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/digital-wallet-tokens.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/digital-wallet-tokens.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/digital-wallet-tokens.test.js +0 -90
- package/dist/cjs/tests/api-resources/digital-wallet-tokens.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/documents.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/documents.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/documents.test.js +0 -93
- package/dist/cjs/tests/api-resources/documents.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/entities/entities.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/entities/entities.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/entities/entities.test.js +0 -289
- package/dist/cjs/tests/api-resources/entities/entities.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/entities/supplemental-documents.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/entities/supplemental-documents.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/entities/supplemental-documents.test.js +0 -68
- package/dist/cjs/tests/api-resources/entities/supplemental-documents.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/event-subscriptions.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/event-subscriptions.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/event-subscriptions.test.js +0 -99
- package/dist/cjs/tests/api-resources/event-subscriptions.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/events.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/events.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/events.test.js +0 -87
- package/dist/cjs/tests/api-resources/events.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/exports.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/exports.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/exports.test.js +0 -101
- package/dist/cjs/tests/api-resources/exports.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/external-accounts.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/external-accounts.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/external-accounts.test.js +0 -99
- package/dist/cjs/tests/api-resources/external-accounts.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/files.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/files.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/files.test.js +0 -104
- package/dist/cjs/tests/api-resources/files.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/groups.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/groups.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/groups.test.js +0 -55
- package/dist/cjs/tests/api-resources/groups.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/inbound-ach-transfer-returns.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/inbound-ach-transfer-returns.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/inbound-ach-transfer-returns.test.js +0 -94
- package/dist/cjs/tests/api-resources/inbound-ach-transfer-returns.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/inbound-wire-drawdown-requests.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/inbound-wire-drawdown-requests.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/inbound-wire-drawdown-requests.test.js +0 -80
- package/dist/cjs/tests/api-resources/inbound-wire-drawdown-requests.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/limits.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/limits.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/limits.test.js +0 -97
- package/dist/cjs/tests/api-resources/limits.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/oauth-connections.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/oauth-connections.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/oauth-connections.test.js +0 -75
- package/dist/cjs/tests/api-resources/oauth-connections.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/pending-transactions.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/pending-transactions.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/pending-transactions.test.js +0 -93
- package/dist/cjs/tests/api-resources/pending-transactions.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/programs.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/programs.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/programs.test.js +0 -73
- package/dist/cjs/tests/api-resources/programs.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/real-time-decisions.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/real-time-decisions.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/real-time-decisions.test.js +0 -61
- package/dist/cjs/tests/api-resources/real-time-decisions.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/real-time-payments-transfers.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/real-time-payments-transfers.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/real-time-payments-transfers.test.js +0 -113
- package/dist/cjs/tests/api-resources/real-time-payments-transfers.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/routing-numbers.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/routing-numbers.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/routing-numbers.test.js +0 -56
- package/dist/cjs/tests/api-resources/routing-numbers.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/account-statements.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/simulations/account-statements.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/account-statements.test.js +0 -52
- package/dist/cjs/tests/api-resources/simulations/account-statements.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/account-transfers.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/simulations/account-transfers.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/account-transfers.test.js +0 -61
- package/dist/cjs/tests/api-resources/simulations/account-transfers.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/ach-transfers.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/simulations/ach-transfers.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/ach-transfers.test.js +0 -86
- package/dist/cjs/tests/api-resources/simulations/ach-transfers.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/card-disputes.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/simulations/card-disputes.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/card-disputes.test.js +0 -57
- package/dist/cjs/tests/api-resources/simulations/card-disputes.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/card-refunds.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/simulations/card-refunds.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/card-refunds.test.js +0 -52
- package/dist/cjs/tests/api-resources/simulations/card-refunds.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/cards.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/simulations/cards.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/cards.test.js +0 -72
- package/dist/cjs/tests/api-resources/simulations/cards.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/check-deposits.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/simulations/check-deposits.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/check-deposits.test.js +0 -87
- package/dist/cjs/tests/api-resources/simulations/check-deposits.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/check-transfers.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/simulations/check-transfers.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/check-transfers.test.js +0 -92
- package/dist/cjs/tests/api-resources/simulations/check-transfers.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/digital-wallet-token-requests.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/simulations/digital-wallet-token-requests.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/digital-wallet-token-requests.test.js +0 -52
- package/dist/cjs/tests/api-resources/simulations/digital-wallet-token-requests.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/documents.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/simulations/documents.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/documents.test.js +0 -52
- package/dist/cjs/tests/api-resources/simulations/documents.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/inbound-wire-drawdown-requests.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/simulations/inbound-wire-drawdown-requests.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/inbound-wire-drawdown-requests.test.js +0 -82
- package/dist/cjs/tests/api-resources/simulations/inbound-wire-drawdown-requests.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/interest-payments.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/simulations/interest-payments.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/interest-payments.test.js +0 -58
- package/dist/cjs/tests/api-resources/simulations/interest-payments.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/programs.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/simulations/programs.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/programs.test.js +0 -52
- package/dist/cjs/tests/api-resources/simulations/programs.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/real-time-payments-transfers.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/simulations/real-time-payments-transfers.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/real-time-payments-transfers.test.js +0 -70
- package/dist/cjs/tests/api-resources/simulations/real-time-payments-transfers.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/wire-transfers.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/simulations/wire-transfers.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/simulations/wire-transfers.test.js +0 -71
- package/dist/cjs/tests/api-resources/simulations/wire-transfers.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/transactions.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/transactions.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/transactions.test.js +0 -92
- package/dist/cjs/tests/api-resources/transactions.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/wire-drawdown-requests.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/wire-drawdown-requests.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/wire-drawdown-requests.test.js +0 -107
- package/dist/cjs/tests/api-resources/wire-drawdown-requests.test.js.map +0 -1
- package/dist/cjs/tests/api-resources/wire-transfers.test.d.ts +0 -2
- package/dist/cjs/tests/api-resources/wire-transfers.test.d.ts.map +0 -1
- package/dist/cjs/tests/api-resources/wire-transfers.test.js +0 -170
- package/dist/cjs/tests/api-resources/wire-transfers.test.js.map +0 -1
- package/dist/cjs/tests/form.test.d.ts +0 -2
- package/dist/cjs/tests/form.test.d.ts.map +0 -1
- package/dist/cjs/tests/form.test.js +0 -61
- package/dist/cjs/tests/form.test.js.map +0 -1
- package/dist/cjs/tests/index.test.d.ts +0 -2
- package/dist/cjs/tests/index.test.d.ts.map +0 -1
- package/dist/cjs/tests/index.test.js +0 -113
- package/dist/cjs/tests/index.test.js.map +0 -1
- package/dist/cjs/tests/responses.test.d.ts +0 -2
- package/dist/cjs/tests/responses.test.d.ts.map +0 -1
- package/dist/cjs/tests/responses.test.js +0 -60
- package/dist/cjs/tests/responses.test.js.map +0 -1
- package/dist/cjs/version.d.ts +0 -2
- package/dist/cjs/version.d.ts.map +0 -1
- package/dist/cjs/version.js +0 -5
- package/dist/cjs/version.js.map +0 -1
- package/error.ts +0 -505
- package/examples/api-error.ts +0 -21
- package/fetch-polyfill.ts +0 -69
- package/index.ts +0 -349
- package/jest.config.js +0 -8
- package/pagination.ts +0 -61
- package/release-please-config.json +0 -61
- package/resources/account-numbers.ts +0 -170
- package/resources/account-statements.ts +0 -131
- package/resources/account-transfers.ts +0 -252
- package/resources/accounts.ts +0 -204
- package/resources/ach-prenotifications.ts +0 -244
- package/resources/ach-transfers.ts +0 -546
- package/resources/balance-lookups.ts +0 -57
- package/resources/bookkeeping-accounts.ts +0 -98
- package/resources/bookkeeping-entries.ts +0 -62
- package/resources/bookkeeping-entry-sets.ts +0 -100
- package/resources/card-disputes.ts +0 -195
- package/resources/card-profiles.ts +0 -250
- package/resources/cards.ts +0 -425
- package/resources/check-deposits.ts +0 -316
- package/resources/check-transfers.ts +0 -532
- package/resources/declined-transactions.ts +0 -616
- package/resources/digital-wallet-tokens.ts +0 -114
- package/resources/documents.ts +0 -218
- package/resources/entities/entities.ts +0 -1899
- package/resources/entities/index.ts +0 -9
- package/resources/entities/supplemental-documents.ts +0 -71
- package/resources/event-subscriptions.ts +0 -235
- package/resources/events.ts +0 -219
- package/resources/exports.ts +0 -204
- package/resources/external-accounts.ts +0 -162
- package/resources/files.ts +0 -192
- package/resources/groups.ts +0 -47
- package/resources/inbound-ach-transfer-returns.ts +0 -144
- package/resources/inbound-wire-drawdown-requests.ts +0 -167
- package/resources/index.ts +0 -193
- package/resources/limits.ts +0 -143
- package/resources/oauth-connections.ts +0 -73
- package/resources/pending-transactions.ts +0 -569
- package/resources/programs.ts +0 -70
- package/resources/real-time-decisions.ts +0 -380
- package/resources/real-time-payments-transfers.ts +0 -351
- package/resources/routing-numbers.ts +0 -62
- package/resources/shared.ts +0 -17
- package/resources/simulations/account-statements.ts +0 -25
- package/resources/simulations/account-transfers.ts +0 -20
- package/resources/simulations/ach-transfers.ts +0 -2185
- package/resources/simulations/card-disputes.ts +0 -33
- package/resources/simulations/card-refunds.ts +0 -26
- package/resources/simulations/cards.ts +0 -1116
- package/resources/simulations/check-deposits.ts +0 -41
- package/resources/simulations/check-transfers.ts +0 -49
- package/resources/simulations/digital-wallet-token-requests.ts +0 -52
- package/resources/simulations/documents.ts +0 -24
- package/resources/simulations/inbound-wire-drawdown-requests.ts +0 -126
- package/resources/simulations/index.ts +0 -26
- package/resources/simulations/interest-payments.ts +0 -1501
- package/resources/simulations/programs.ts +0 -26
- package/resources/simulations/real-time-payments-transfers.ts +0 -2131
- package/resources/simulations/simulations.ts +0 -36
- package/resources/simulations/wire-transfers.ts +0 -1580
- package/resources/transactions.ts +0 -1570
- package/resources/wire-drawdown-requests.ts +0 -198
- package/resources/wire-transfers.ts +0 -436
- package/streaming.ts +0 -199
- package/tests/api-resources/account-numbers.test.ts +0 -64
- package/tests/api-resources/account-statements.test.ts +0 -51
- package/tests/api-resources/account-transfers.test.ts +0 -96
- package/tests/api-resources/accounts.test.ts +0 -81
- package/tests/api-resources/ach-prenotifications.test.ts +0 -74
- package/tests/api-resources/ach-transfers.test.ts +0 -106
- package/tests/api-resources/balance-lookups.test.ts +0 -18
- package/tests/api-resources/bookkeeping-accounts.test.ts +0 -38
- package/tests/api-resources/bookkeeping-entries.test.ts +0 -25
- package/tests/api-resources/bookkeeping-entry-sets.test.ts +0 -29
- package/tests/api-resources/card-disputes.test.ts +0 -65
- package/tests/api-resources/card-profiles.test.ts +0 -69
- package/tests/api-resources/cards.test.ts +0 -79
- package/tests/api-resources/check-deposits.test.ts +0 -71
- package/tests/api-resources/check-transfers.test.ts +0 -122
- package/tests/api-resources/declined-transactions.test.ts +0 -54
- package/tests/api-resources/digital-wallet-tokens.test.ts +0 -51
- package/tests/api-resources/documents.test.ts +0 -52
- package/tests/api-resources/entities/entities.test.ts +0 -249
- package/tests/api-resources/entities/supplemental-documents.test.ts +0 -31
- package/tests/api-resources/event-subscriptions.test.ts +0 -59
- package/tests/api-resources/events.test.ts +0 -50
- package/tests/api-resources/exports.test.ts +0 -64
- package/tests/api-resources/external-accounts.test.ts +0 -62
- package/tests/api-resources/files.test.ts +0 -67
- package/tests/api-resources/groups.test.ts +0 -18
- package/tests/api-resources/inbound-ach-transfer-returns.test.ts +0 -57
- package/tests/api-resources/inbound-wire-drawdown-requests.test.ts +0 -43
- package/tests/api-resources/limits.test.ts +0 -60
- package/tests/api-resources/oauth-connections.test.ts +0 -38
- package/tests/api-resources/pending-transactions.test.ts +0 -54
- package/tests/api-resources/programs.test.ts +0 -36
- package/tests/api-resources/real-time-decisions.test.ts +0 -24
- package/tests/api-resources/real-time-payments-transfers.test.ts +0 -76
- package/tests/api-resources/routing-numbers.test.ts +0 -19
- package/tests/api-resources/simulations/account-statements.test.ts +0 -15
- package/tests/api-resources/simulations/account-transfers.test.ts +0 -24
- package/tests/api-resources/simulations/ach-transfers.test.ts +0 -46
- package/tests/api-resources/simulations/card-disputes.test.ts +0 -20
- package/tests/api-resources/simulations/card-refunds.test.ts +0 -15
- package/tests/api-resources/simulations/cards.test.ts +0 -35
- package/tests/api-resources/simulations/check-deposits.test.ts +0 -50
- package/tests/api-resources/simulations/check-transfers.test.ts +0 -47
- package/tests/api-resources/simulations/digital-wallet-token-requests.test.ts +0 -15
- package/tests/api-resources/simulations/documents.test.ts +0 -15
- package/tests/api-resources/simulations/inbound-wire-drawdown-requests.test.ts +0 -45
- package/tests/api-resources/simulations/interest-payments.test.ts +0 -15
- package/tests/api-resources/simulations/programs.test.ts +0 -15
- package/tests/api-resources/simulations/real-time-payments-transfers.test.ts +0 -33
- package/tests/api-resources/simulations/wire-transfers.test.ts +0 -34
- package/tests/api-resources/transactions.test.ts +0 -53
- package/tests/api-resources/wire-drawdown-requests.test.ts +0 -70
- package/tests/api-resources/wire-transfers.test.ts +0 -133
- package/tests/form.test.ts +0 -27
- package/tests/index.test.ts +0 -83
- package/tests/responses.test.ts +0 -25
- package/tsconfig.cjs.json +0 -8
- package/tsconfig.json +0 -39
- package/typings/digest-fetch/index.d.ts +0 -33
- package/version.ts +0 -1
- /package/{dist/cjs/resource.js → resource.js} +0 -0
- /package/{dist/cjs/resources → resources}/shared.js +0 -0
- /package/{resource.ts → src/resource.ts} +0 -0
package/src/streaming.ts
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import type { Response } from 'increase/_shims/fetch';
|
|
2
|
+
import { APIResponse, Headers, createResponseHeaders } from './core';
|
|
3
|
+
|
|
4
|
+
type ServerSentEvent = {
|
|
5
|
+
event: string | null;
|
|
6
|
+
data: string;
|
|
7
|
+
raw: string[];
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
class SSEDecoder {
|
|
11
|
+
private data: string[];
|
|
12
|
+
private event: string | null;
|
|
13
|
+
private chunks: string[];
|
|
14
|
+
|
|
15
|
+
constructor() {
|
|
16
|
+
this.event = null;
|
|
17
|
+
this.data = [];
|
|
18
|
+
this.chunks = [];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
decode(line: string) {
|
|
22
|
+
if (line.endsWith('\r')) {
|
|
23
|
+
line = line.substring(0, line.length - 1);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (!line) {
|
|
27
|
+
// empty line and we didn't previously encounter any messages
|
|
28
|
+
if (!this.event && !this.data.length) return null;
|
|
29
|
+
|
|
30
|
+
const sse: ServerSentEvent = {
|
|
31
|
+
event: this.event,
|
|
32
|
+
data: this.data.join('\n'),
|
|
33
|
+
raw: this.chunks,
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
this.event = null;
|
|
37
|
+
this.data = [];
|
|
38
|
+
this.chunks = [];
|
|
39
|
+
|
|
40
|
+
return sse;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
this.chunks.push(line);
|
|
44
|
+
|
|
45
|
+
if (line.startsWith(':')) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
let [fieldname, _, value] = partition(line, ':');
|
|
50
|
+
|
|
51
|
+
if (value.startsWith(' ')) {
|
|
52
|
+
value = value.substring(1);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (fieldname === 'event') {
|
|
56
|
+
this.event = value;
|
|
57
|
+
} else if (fieldname === 'data') {
|
|
58
|
+
this.data.push(value);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export class Stream<Item> implements AsyncIterable<Item>, APIResponse<Stream<Item>> {
|
|
66
|
+
/** @deprecated - please use the async iterator instead. We plan to add additional helper methods shortly. */
|
|
67
|
+
response: Response;
|
|
68
|
+
/** @deprecated - we plan to add a different way to access raw response information shortly. */
|
|
69
|
+
responseHeaders: Headers;
|
|
70
|
+
controller: AbortController;
|
|
71
|
+
|
|
72
|
+
private decoder: SSEDecoder;
|
|
73
|
+
|
|
74
|
+
constructor(response: Response, controller: AbortController) {
|
|
75
|
+
this.response = response;
|
|
76
|
+
this.controller = controller;
|
|
77
|
+
this.decoder = new SSEDecoder();
|
|
78
|
+
this.responseHeaders = createResponseHeaders(response.headers);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
private async *iterMessages(): AsyncGenerator<ServerSentEvent, void, unknown> {
|
|
82
|
+
if (!this.response.body) {
|
|
83
|
+
this.controller.abort();
|
|
84
|
+
throw new Error(`Attempted to iterate over a response with no body`);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const lineDecoder = new LineDecoder();
|
|
88
|
+
|
|
89
|
+
// @ts-ignore
|
|
90
|
+
for await (const chunk of this.response.body) {
|
|
91
|
+
let text;
|
|
92
|
+
if (chunk instanceof Buffer) {
|
|
93
|
+
text = chunk.toString();
|
|
94
|
+
} else if ((chunk as any) instanceof Uint8Array) {
|
|
95
|
+
text = Buffer.from(chunk).toString();
|
|
96
|
+
} else {
|
|
97
|
+
text = chunk;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
for (const line of lineDecoder.decode(text)) {
|
|
101
|
+
const sse = this.decoder.decode(line);
|
|
102
|
+
if (sse) yield sse;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
for (const line of lineDecoder.flush()) {
|
|
107
|
+
const sse = this.decoder.decode(line);
|
|
108
|
+
if (sse) yield sse;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
async *[Symbol.asyncIterator](): AsyncIterator<Item, any, undefined> {
|
|
113
|
+
try {
|
|
114
|
+
for await (const sse of this.iterMessages()) {
|
|
115
|
+
try {
|
|
116
|
+
yield JSON.parse(sse.data);
|
|
117
|
+
} catch (e) {
|
|
118
|
+
console.error(`Could not parse message into JSON:`, sse.data);
|
|
119
|
+
console.error(`From chunk:`, sse.raw);
|
|
120
|
+
throw e;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
} catch (e) {
|
|
124
|
+
// If the user calls `stream.controller.abort()`, we should exit without throwing.
|
|
125
|
+
if (e instanceof Error && e.name === 'AbortError') return;
|
|
126
|
+
throw e;
|
|
127
|
+
} finally {
|
|
128
|
+
// If the user `break`s, abort the ongoing request.
|
|
129
|
+
this.controller.abort();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
const NEWLINE_CHARS = '\n\r\x0b\x0c\x1c\x1d\x1e\x85\u2028\u2029';
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* A re-implementation of httpx's `LineDecoder` in Python that handles incrementally
|
|
138
|
+
* reading lines from text.
|
|
139
|
+
*
|
|
140
|
+
* https://github.com/encode/httpx/blob/920333ea98118e9cf617f246905d7b202510941c/httpx/_decoders.py#L258
|
|
141
|
+
*/
|
|
142
|
+
class LineDecoder {
|
|
143
|
+
buffer: string[];
|
|
144
|
+
trailingCR: boolean;
|
|
145
|
+
|
|
146
|
+
constructor() {
|
|
147
|
+
this.buffer = [];
|
|
148
|
+
this.trailingCR = false;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
decode(text: string): string[] {
|
|
152
|
+
if (this.trailingCR) {
|
|
153
|
+
text = '\r' + text;
|
|
154
|
+
this.trailingCR = false;
|
|
155
|
+
}
|
|
156
|
+
if (text.endsWith('\r')) {
|
|
157
|
+
this.trailingCR = true;
|
|
158
|
+
text = text.slice(0, -1);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (!text) {
|
|
162
|
+
return [];
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
const trailing_newline = NEWLINE_CHARS.includes(text.slice(-1));
|
|
166
|
+
let lines = text.split(/\r\n|[\n\r\x0b\x0c\x1c\x1d\x1e\x85\u2028\u2029]/g);
|
|
167
|
+
|
|
168
|
+
if (lines.length === 1 && !trailing_newline) {
|
|
169
|
+
this.buffer.push(lines[0]!);
|
|
170
|
+
return [];
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
if (this.buffer.length > 0) {
|
|
174
|
+
lines = [this.buffer.join('') + lines[0], ...lines.slice(1)];
|
|
175
|
+
this.buffer = [];
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
if (!trailing_newline) {
|
|
179
|
+
this.buffer = [lines.pop() || ''];
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
return lines;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
flush(): string[] {
|
|
186
|
+
if (!this.buffer.length && !this.trailingCR) {
|
|
187
|
+
return [];
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
const lines = [this.buffer.join('')];
|
|
191
|
+
this.buffer = [];
|
|
192
|
+
this.trailingCR = false;
|
|
193
|
+
return lines;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
function partition(str: string, delimiter: string): [string, string, string] {
|
|
198
|
+
const index = str.indexOf(delimiter);
|
|
199
|
+
if (index !== -1) {
|
|
200
|
+
return [str.substring(0, index), delimiter, str.substring(index + delimiter.length)];
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
return [str, '', ''];
|
|
204
|
+
}
|
package/src/uploads.ts
ADDED
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import { type RequestOptions } from './core';
|
|
2
|
+
import { type Readable } from 'increase/_shims/node-readable';
|
|
3
|
+
import { type BodyInit } from 'increase/_shims/fetch';
|
|
4
|
+
import { FormData, File, type FilePropertyBag } from 'increase/_shims/formdata';
|
|
5
|
+
import { getMultipartRequestOptions } from 'increase/_shims/getMultipartRequestOptions';
|
|
6
|
+
import { fileFromPath } from 'increase/_shims/fileFromPath';
|
|
7
|
+
import { type FsReadStream, isFsReadStream } from 'increase/_shims/node-readable';
|
|
8
|
+
|
|
9
|
+
export { fileFromPath };
|
|
10
|
+
|
|
11
|
+
export type BlobPart = string | ArrayBuffer | ArrayBufferView | BlobLike | Uint8Array | DataView;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Typically, this is a native "File" class.
|
|
15
|
+
*
|
|
16
|
+
* We provide the {@link toFile} utility to convert a variety of objects
|
|
17
|
+
* into the File class.
|
|
18
|
+
*
|
|
19
|
+
* For convenience, you can also pass a fetch Response, or in Node,
|
|
20
|
+
* the result of fs.createReadStream().
|
|
21
|
+
*/
|
|
22
|
+
export type Uploadable = FileLike | ResponseLike | FsReadStream;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Intended to match web.Blob, node.Blob, node-fetch.Blob, etc.
|
|
26
|
+
*/
|
|
27
|
+
export interface BlobLike {
|
|
28
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */
|
|
29
|
+
readonly size: number;
|
|
30
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */
|
|
31
|
+
readonly type: string;
|
|
32
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
33
|
+
text(): Promise<string>;
|
|
34
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
35
|
+
slice(start?: number, end?: number): BlobLike;
|
|
36
|
+
// unfortunately @types/node-fetch@^2.6.4 doesn't type the arrayBuffer method
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Intended to match web.File, node.File, node-fetch.File, etc.
|
|
41
|
+
*/
|
|
42
|
+
export interface FileLike extends BlobLike {
|
|
43
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */
|
|
44
|
+
readonly lastModified: number;
|
|
45
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */
|
|
46
|
+
readonly name: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Intended to match web.Response, node.Response, node-fetch.Response, etc.
|
|
51
|
+
*/
|
|
52
|
+
export interface ResponseLike {
|
|
53
|
+
url: string;
|
|
54
|
+
blob(): Promise<BlobLike>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export const isResponseLike = (value: any): value is ResponseLike =>
|
|
58
|
+
value != null &&
|
|
59
|
+
typeof value === 'object' &&
|
|
60
|
+
typeof value.url === 'string' &&
|
|
61
|
+
typeof value.blob === 'function';
|
|
62
|
+
|
|
63
|
+
export const isFileLike = (value: any): value is FileLike =>
|
|
64
|
+
value != null &&
|
|
65
|
+
typeof value === 'object' &&
|
|
66
|
+
typeof value.name === 'string' &&
|
|
67
|
+
typeof value.lastModified === 'number' &&
|
|
68
|
+
isBlobLike(value);
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* The BlobLike type omits arrayBuffer() because @types/node-fetch@^2.6.4 lacks it; but this check
|
|
72
|
+
* adds the arrayBuffer() method type because it is available and used at runtime
|
|
73
|
+
*/
|
|
74
|
+
export const isBlobLike = (value: any): value is BlobLike & { arrayBuffer(): Promise<ArrayBuffer> } =>
|
|
75
|
+
value != null &&
|
|
76
|
+
typeof value === 'object' &&
|
|
77
|
+
typeof value.size === 'number' &&
|
|
78
|
+
typeof value.type === 'string' &&
|
|
79
|
+
typeof value.text === 'function' &&
|
|
80
|
+
typeof value.slice === 'function' &&
|
|
81
|
+
typeof value.arrayBuffer === 'function';
|
|
82
|
+
|
|
83
|
+
export const isUploadable = (value: any): value is Uploadable => {
|
|
84
|
+
return isFileLike(value) || isResponseLike(value) || isFsReadStream(value);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export type ToFileInput = Uploadable | Exclude<BlobPart, string> | AsyncIterable<BlobPart>;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats
|
|
91
|
+
* @param bits the raw content of the file. Can be an {@link Uploadable}, {@link BlobPart}, or {@link AsyncIterable} of {@link BlobPart}s
|
|
92
|
+
* @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible
|
|
93
|
+
* @param {Object=} options additional properties
|
|
94
|
+
* @param {string=} options.type the MIME type of the content
|
|
95
|
+
* @param {number=} options.lastModified the last modified timestamp
|
|
96
|
+
* @returns a {@link File} with the given properties
|
|
97
|
+
*/
|
|
98
|
+
export async function toFile(
|
|
99
|
+
value: ToFileInput,
|
|
100
|
+
name?: string | null | undefined,
|
|
101
|
+
options: FilePropertyBag | undefined = {},
|
|
102
|
+
): Promise<FileLike> {
|
|
103
|
+
if (isResponseLike(value)) {
|
|
104
|
+
const blob = await value.blob();
|
|
105
|
+
name ||= new URL(value.url).pathname.split(/[\\/]/).pop() ?? 'unknown_file';
|
|
106
|
+
|
|
107
|
+
return new File([blob as any], name, options);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const bits = await getBytes(value);
|
|
111
|
+
|
|
112
|
+
name ||= getName(value) ?? 'unknown_file';
|
|
113
|
+
|
|
114
|
+
if (!options.type) {
|
|
115
|
+
const type = (bits[0] as any)?.type;
|
|
116
|
+
if (typeof type === 'string') {
|
|
117
|
+
options = { ...options, type };
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
return new File(bits, name, options);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
async function getBytes(value: ToFileInput): Promise<Array<BlobPart>> {
|
|
125
|
+
if (value instanceof Promise) return getBytes(await (value as any));
|
|
126
|
+
|
|
127
|
+
let parts: Array<BlobPart> = [];
|
|
128
|
+
if (
|
|
129
|
+
typeof value === 'string' ||
|
|
130
|
+
ArrayBuffer.isView(value) || // includes Uint8Array, Buffer, etc.
|
|
131
|
+
value instanceof ArrayBuffer
|
|
132
|
+
) {
|
|
133
|
+
parts.push(value);
|
|
134
|
+
} else if (isBlobLike(value)) {
|
|
135
|
+
parts.push(await value.arrayBuffer());
|
|
136
|
+
} else if (
|
|
137
|
+
isAsyncIterableIterator(value) // includes Readable, ReadableStream, etc.
|
|
138
|
+
) {
|
|
139
|
+
for await (const chunk of value) {
|
|
140
|
+
parts.push(chunk as BlobPart); // TODO, consider validating?
|
|
141
|
+
}
|
|
142
|
+
} else {
|
|
143
|
+
throw new Error(
|
|
144
|
+
`Unexpected data type: ${typeof value}; constructor: ${
|
|
145
|
+
value?.constructor?.name
|
|
146
|
+
}; props: ${propsForError(value)}`,
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
return parts;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function propsForError(value: any): string {
|
|
154
|
+
const props = Object.getOwnPropertyNames(value);
|
|
155
|
+
return `[${props.map((p) => `"${p}"`).join(', ')}]`;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function getName(value: any): string | undefined {
|
|
159
|
+
return (
|
|
160
|
+
getStringFromMaybeBuffer(value.name) ||
|
|
161
|
+
getStringFromMaybeBuffer(value.filename) ||
|
|
162
|
+
// For fs.ReadStream
|
|
163
|
+
getStringFromMaybeBuffer(value.path)?.split(/[\\/]/).pop()
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
const getStringFromMaybeBuffer = (x: string | Buffer | unknown): string | undefined => {
|
|
168
|
+
if (typeof x === 'string') return x;
|
|
169
|
+
if (typeof Buffer !== 'undefined' && x instanceof Buffer) return String(x);
|
|
170
|
+
return undefined;
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
const isAsyncIterableIterator = (value: any): value is AsyncIterableIterator<unknown> =>
|
|
174
|
+
value != null && typeof value === 'object' && typeof value[Symbol.asyncIterator] === 'function';
|
|
175
|
+
|
|
176
|
+
export class MultipartBody {
|
|
177
|
+
constructor(public body: Readable | BodyInit) {}
|
|
178
|
+
get [Symbol.toStringTag](): string {
|
|
179
|
+
return 'MultipartBody';
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export const isMultipartBody = (body: any): body is MultipartBody =>
|
|
184
|
+
body && typeof body === 'object' && body.body && body[Symbol.toStringTag] === 'MultipartBody';
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Returns a multipart/form-data request if any part of the given request body contains a File / Blob value.
|
|
188
|
+
* Otherwise returns the request as is.
|
|
189
|
+
*/
|
|
190
|
+
export const maybeMultipartFormRequestOptions = async <T extends {} = Record<string, unknown>>(
|
|
191
|
+
opts: RequestOptions<T>,
|
|
192
|
+
): Promise<RequestOptions<T | MultipartBody>> => {
|
|
193
|
+
if (!hasUploadableValue(opts.body)) return opts;
|
|
194
|
+
|
|
195
|
+
const form = await createForm(opts.body);
|
|
196
|
+
return getMultipartRequestOptions(form, opts);
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
export const multipartFormRequestOptions = async <T extends {} = Record<string, unknown>>(
|
|
200
|
+
opts: RequestOptions<T>,
|
|
201
|
+
): Promise<RequestOptions<T | MultipartBody>> => {
|
|
202
|
+
const form = await createForm(opts.body);
|
|
203
|
+
return getMultipartRequestOptions(form, opts);
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
export const createForm = async <T = Record<string, unknown>>(body: T | undefined): Promise<FormData> => {
|
|
207
|
+
const form = new FormData();
|
|
208
|
+
await Promise.all(Object.entries(body || {}).map(([key, value]) => addFormValue(form, key, value)));
|
|
209
|
+
return form;
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
const hasUploadableValue = (value: unknown): boolean => {
|
|
213
|
+
if (isUploadable(value)) return true;
|
|
214
|
+
if (Array.isArray(value)) return value.some(hasUploadableValue);
|
|
215
|
+
if (value && typeof value === 'object') {
|
|
216
|
+
for (const k in value) {
|
|
217
|
+
if (hasUploadableValue((value as any)[k])) return true;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
return false;
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
const addFormValue = async (form: FormData, key: string, value: unknown): Promise<void> => {
|
|
224
|
+
if (value === undefined) return;
|
|
225
|
+
if (value == null) {
|
|
226
|
+
throw new TypeError(
|
|
227
|
+
`Received null for "${key}"; to pass null in FormData, you must use the string 'null'`,
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
// TODO: make nested formats configurable
|
|
232
|
+
if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
|
|
233
|
+
form.append(key, value);
|
|
234
|
+
} else if (isUploadable(value)) {
|
|
235
|
+
const file = await toFile(value);
|
|
236
|
+
form.append(key, file);
|
|
237
|
+
} else if (Array.isArray(value)) {
|
|
238
|
+
await Promise.all(value.map((entry) => addFormValue(form, key + '[]', entry)));
|
|
239
|
+
} else if (typeof value === 'object') {
|
|
240
|
+
await Promise.all(
|
|
241
|
+
Object.entries(value).map(([name, prop]) => addFormValue(form, `${key}[${name}]`, prop)),
|
|
242
|
+
);
|
|
243
|
+
} else {
|
|
244
|
+
throw new TypeError(
|
|
245
|
+
`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${value} instead`,
|
|
246
|
+
);
|
|
247
|
+
}
|
|
248
|
+
};
|
package/src/version.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const VERSION = '0.6.0'; // x-release-please-version
|
package/streaming.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Response } from 'increase/_shims/fetch';
|
|
2
|
+
import { APIResponse, Headers } from './core.js';
|
|
3
|
+
export declare class Stream<Item> implements AsyncIterable<Item>, APIResponse<Stream<Item>> {
|
|
4
|
+
/** @deprecated - please use the async iterator instead. We plan to add additional helper methods shortly. */
|
|
5
|
+
response: Response;
|
|
6
|
+
/** @deprecated - we plan to add a different way to access raw response information shortly. */
|
|
7
|
+
responseHeaders: Headers;
|
|
8
|
+
controller: AbortController;
|
|
9
|
+
private decoder;
|
|
10
|
+
constructor(response: Response, controller: AbortController);
|
|
11
|
+
private iterMessages;
|
|
12
|
+
[Symbol.asyncIterator](): AsyncIterator<Item, any, undefined>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=streaming.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["src/streaming.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,OAAO,EAAyB,MAAM,QAAQ,CAAC;AA+DrE,qBAAa,MAAM,CAAC,IAAI,CAAE,YAAW,aAAa,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACjF,6GAA6G;IAC7G,QAAQ,EAAE,QAAQ,CAAC;IACnB,+FAA+F;IAC/F,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,eAAe,CAAC;IAE5B,OAAO,CAAC,OAAO,CAAa;gBAEhB,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe;YAO5C,YAAY;IA+BpB,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,SAAS,CAAC;CAoBrE"}
|
package/streaming.js
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
|
+
exports.Stream = void 0;
|
|
4
|
+
const core_1 = require('./core.js');
|
|
5
|
+
class SSEDecoder {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.event = null;
|
|
8
|
+
this.data = [];
|
|
9
|
+
this.chunks = [];
|
|
10
|
+
}
|
|
11
|
+
decode(line) {
|
|
12
|
+
if (line.endsWith('\r')) {
|
|
13
|
+
line = line.substring(0, line.length - 1);
|
|
14
|
+
}
|
|
15
|
+
if (!line) {
|
|
16
|
+
// empty line and we didn't previously encounter any messages
|
|
17
|
+
if (!this.event && !this.data.length) return null;
|
|
18
|
+
const sse = {
|
|
19
|
+
event: this.event,
|
|
20
|
+
data: this.data.join('\n'),
|
|
21
|
+
raw: this.chunks,
|
|
22
|
+
};
|
|
23
|
+
this.event = null;
|
|
24
|
+
this.data = [];
|
|
25
|
+
this.chunks = [];
|
|
26
|
+
return sse;
|
|
27
|
+
}
|
|
28
|
+
this.chunks.push(line);
|
|
29
|
+
if (line.startsWith(':')) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
let [fieldname, _, value] = partition(line, ':');
|
|
33
|
+
if (value.startsWith(' ')) {
|
|
34
|
+
value = value.substring(1);
|
|
35
|
+
}
|
|
36
|
+
if (fieldname === 'event') {
|
|
37
|
+
this.event = value;
|
|
38
|
+
} else if (fieldname === 'data') {
|
|
39
|
+
this.data.push(value);
|
|
40
|
+
}
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
class Stream {
|
|
45
|
+
constructor(response, controller) {
|
|
46
|
+
this.response = response;
|
|
47
|
+
this.controller = controller;
|
|
48
|
+
this.decoder = new SSEDecoder();
|
|
49
|
+
this.responseHeaders = (0, core_1.createResponseHeaders)(response.headers);
|
|
50
|
+
}
|
|
51
|
+
async *iterMessages() {
|
|
52
|
+
if (!this.response.body) {
|
|
53
|
+
this.controller.abort();
|
|
54
|
+
throw new Error(`Attempted to iterate over a response with no body`);
|
|
55
|
+
}
|
|
56
|
+
const lineDecoder = new LineDecoder();
|
|
57
|
+
// @ts-ignore
|
|
58
|
+
for await (const chunk of this.response.body) {
|
|
59
|
+
let text;
|
|
60
|
+
if (chunk instanceof Buffer) {
|
|
61
|
+
text = chunk.toString();
|
|
62
|
+
} else if (chunk instanceof Uint8Array) {
|
|
63
|
+
text = Buffer.from(chunk).toString();
|
|
64
|
+
} else {
|
|
65
|
+
text = chunk;
|
|
66
|
+
}
|
|
67
|
+
for (const line of lineDecoder.decode(text)) {
|
|
68
|
+
const sse = this.decoder.decode(line);
|
|
69
|
+
if (sse) yield sse;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
for (const line of lineDecoder.flush()) {
|
|
73
|
+
const sse = this.decoder.decode(line);
|
|
74
|
+
if (sse) yield sse;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
async *[Symbol.asyncIterator]() {
|
|
78
|
+
try {
|
|
79
|
+
for await (const sse of this.iterMessages()) {
|
|
80
|
+
try {
|
|
81
|
+
yield JSON.parse(sse.data);
|
|
82
|
+
} catch (e) {
|
|
83
|
+
console.error(`Could not parse message into JSON:`, sse.data);
|
|
84
|
+
console.error(`From chunk:`, sse.raw);
|
|
85
|
+
throw e;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
} catch (e) {
|
|
89
|
+
// If the user calls `stream.controller.abort()`, we should exit without throwing.
|
|
90
|
+
if (e instanceof Error && e.name === 'AbortError') return;
|
|
91
|
+
throw e;
|
|
92
|
+
} finally {
|
|
93
|
+
// If the user `break`s, abort the ongoing request.
|
|
94
|
+
this.controller.abort();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
exports.Stream = Stream;
|
|
99
|
+
const NEWLINE_CHARS = '\n\r\x0b\x0c\x1c\x1d\x1e\x85\u2028\u2029';
|
|
100
|
+
/**
|
|
101
|
+
* A re-implementation of httpx's `LineDecoder` in Python that handles incrementally
|
|
102
|
+
* reading lines from text.
|
|
103
|
+
*
|
|
104
|
+
* https://github.com/encode/httpx/blob/920333ea98118e9cf617f246905d7b202510941c/httpx/_decoders.py#L258
|
|
105
|
+
*/
|
|
106
|
+
class LineDecoder {
|
|
107
|
+
constructor() {
|
|
108
|
+
this.buffer = [];
|
|
109
|
+
this.trailingCR = false;
|
|
110
|
+
}
|
|
111
|
+
decode(text) {
|
|
112
|
+
if (this.trailingCR) {
|
|
113
|
+
text = '\r' + text;
|
|
114
|
+
this.trailingCR = false;
|
|
115
|
+
}
|
|
116
|
+
if (text.endsWith('\r')) {
|
|
117
|
+
this.trailingCR = true;
|
|
118
|
+
text = text.slice(0, -1);
|
|
119
|
+
}
|
|
120
|
+
if (!text) {
|
|
121
|
+
return [];
|
|
122
|
+
}
|
|
123
|
+
const trailing_newline = NEWLINE_CHARS.includes(text.slice(-1));
|
|
124
|
+
let lines = text.split(/\r\n|[\n\r\x0b\x0c\x1c\x1d\x1e\x85\u2028\u2029]/g);
|
|
125
|
+
if (lines.length === 1 && !trailing_newline) {
|
|
126
|
+
this.buffer.push(lines[0]);
|
|
127
|
+
return [];
|
|
128
|
+
}
|
|
129
|
+
if (this.buffer.length > 0) {
|
|
130
|
+
lines = [this.buffer.join('') + lines[0], ...lines.slice(1)];
|
|
131
|
+
this.buffer = [];
|
|
132
|
+
}
|
|
133
|
+
if (!trailing_newline) {
|
|
134
|
+
this.buffer = [lines.pop() || ''];
|
|
135
|
+
}
|
|
136
|
+
return lines;
|
|
137
|
+
}
|
|
138
|
+
flush() {
|
|
139
|
+
if (!this.buffer.length && !this.trailingCR) {
|
|
140
|
+
return [];
|
|
141
|
+
}
|
|
142
|
+
const lines = [this.buffer.join('')];
|
|
143
|
+
this.buffer = [];
|
|
144
|
+
this.trailingCR = false;
|
|
145
|
+
return lines;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
function partition(str, delimiter) {
|
|
149
|
+
const index = str.indexOf(delimiter);
|
|
150
|
+
if (index !== -1) {
|
|
151
|
+
return [str.substring(0, index), delimiter, str.substring(index + delimiter.length)];
|
|
152
|
+
}
|
|
153
|
+
return [str, '', ''];
|
|
154
|
+
}
|
|
155
|
+
//# sourceMappingURL=streaming.js.map
|
package/streaming.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streaming.js","sourceRoot":"","sources":["src/streaming.ts"],"names":[],"mappings":"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"}
|