increase 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +10 -0
- package/.prettierrc +6 -0
- package/.stats.yml +1 -0
- package/LICENSE +201 -0
- package/README.md +211 -0
- package/api.md +477 -0
- package/bin/check-test-server +50 -0
- package/build +12 -0
- package/check-version.ts +15 -0
- package/core.ts +908 -0
- package/dist/cjs/check-version.d.ts +1 -0
- package/dist/cjs/check-version.js +21 -0
- package/dist/cjs/check-version.js.map +1 -0
- package/dist/cjs/core.d.ts +262 -0
- package/dist/cjs/core.js +978 -0
- package/dist/cjs/core.js.map +1 -0
- package/dist/cjs/fetch-polyfill.d.ts +5 -0
- package/dist/cjs/fetch-polyfill.js +55 -0
- package/dist/cjs/fetch-polyfill.js.map +1 -0
- package/dist/cjs/index.d.ts +201 -0
- package/dist/cjs/index.js +180 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/pagination.d.ts +28 -0
- package/dist/cjs/pagination.js +30 -0
- package/dist/cjs/pagination.js.map +1 -0
- package/dist/cjs/resource.d.ts +11 -0
- package/dist/cjs/resource.js +17 -0
- package/dist/cjs/resource.js.map +1 -0
- package/dist/cjs/resources/account-numbers.d.ts +103 -0
- package/dist/cjs/resources/account-numbers.js +37 -0
- package/dist/cjs/resources/account-numbers.js.map +1 -0
- package/dist/cjs/resources/account-statements.d.ts +99 -0
- package/dist/cjs/resources/account-statements.js +25 -0
- package/dist/cjs/resources/account-statements.js.map +1 -0
- package/dist/cjs/resources/account-transfers.d.ts +189 -0
- package/dist/cjs/resources/account-transfers.js +43 -0
- package/dist/cjs/resources/account-transfers.js.map +1 -0
- package/dist/cjs/resources/accounts.d.ts +133 -0
- package/dist/cjs/resources/accounts.js +43 -0
- package/dist/cjs/resources/accounts.js.map +1 -0
- package/dist/cjs/resources/ach-prenotifications.d.ts +188 -0
- package/dist/cjs/resources/ach-prenotifications.js +35 -0
- package/dist/cjs/resources/ach-prenotifications.js.map +1 -0
- package/dist/cjs/resources/ach-transfers.d.ts +375 -0
- package/dist/cjs/resources/ach-transfers.js +43 -0
- package/dist/cjs/resources/ach-transfers.js.map +1 -0
- package/dist/cjs/resources/card-disputes.d.ts +143 -0
- package/dist/cjs/resources/card-disputes.js +31 -0
- package/dist/cjs/resources/card-disputes.js.map +1 -0
- package/dist/cjs/resources/card-profiles.d.ts +183 -0
- package/dist/cjs/resources/card-profiles.js +31 -0
- package/dist/cjs/resources/card-profiles.js.map +1 -0
- package/dist/cjs/resources/cards.d.ts +316 -0
- package/dist/cjs/resources/cards.js +43 -0
- package/dist/cjs/resources/cards.js.map +1 -0
- package/dist/cjs/resources/check-deposits.d.ts +241 -0
- package/dist/cjs/resources/check-deposits.js +31 -0
- package/dist/cjs/resources/check-deposits.js.map +1 -0
- package/dist/cjs/resources/check-transfers.d.ts +331 -0
- package/dist/cjs/resources/check-transfers.js +49 -0
- package/dist/cjs/resources/check-transfers.js.map +1 -0
- package/dist/cjs/resources/declined-transactions.d.ts +424 -0
- package/dist/cjs/resources/declined-transactions.js +29 -0
- package/dist/cjs/resources/declined-transactions.js.map +1 -0
- package/dist/cjs/resources/digital-wallet-tokens.d.ts +85 -0
- package/dist/cjs/resources/digital-wallet-tokens.js +29 -0
- package/dist/cjs/resources/digital-wallet-tokens.js.map +1 -0
- package/dist/cjs/resources/documents.d.ts +87 -0
- package/dist/cjs/resources/documents.js +25 -0
- package/dist/cjs/resources/documents.js.map +1 -0
- package/dist/cjs/resources/entities/entities.d.ts +1383 -0
- package/dist/cjs/resources/entities/entities.js +36 -0
- package/dist/cjs/resources/entities/entities.js.map +1 -0
- package/dist/cjs/resources/entities/index.d.ts +2 -0
- package/dist/cjs/resources/entities/index.js +12 -0
- package/dist/cjs/resources/entities/index.js.map +1 -0
- package/dist/cjs/resources/entities/supplemental-documents.d.ts +19 -0
- package/dist/cjs/resources/entities/supplemental-documents.js +15 -0
- package/dist/cjs/resources/entities/supplemental-documents.js.map +1 -0
- package/dist/cjs/resources/event-subscriptions.d.ts +196 -0
- package/dist/cjs/resources/event-subscriptions.js +37 -0
- package/dist/cjs/resources/event-subscriptions.js.map +1 -0
- package/dist/cjs/resources/events.d.ts +183 -0
- package/dist/cjs/resources/events.js +25 -0
- package/dist/cjs/resources/events.js.map +1 -0
- package/dist/cjs/resources/external-accounts.d.ts +121 -0
- package/dist/cjs/resources/external-accounts.js +37 -0
- package/dist/cjs/resources/external-accounts.js.map +1 -0
- package/dist/cjs/resources/files.d.ts +148 -0
- package/dist/cjs/resources/files.js +34 -0
- package/dist/cjs/resources/files.js.map +1 -0
- package/dist/cjs/resources/groups.d.ts +37 -0
- package/dist/cjs/resources/groups.js +15 -0
- package/dist/cjs/resources/groups.js.map +1 -0
- package/dist/cjs/resources/inbound-ach-transfer-returns.d.ts +106 -0
- package/dist/cjs/resources/inbound-ach-transfer-returns.js +35 -0
- package/dist/cjs/resources/inbound-ach-transfer-returns.js.map +1 -0
- package/dist/cjs/resources/inbound-wire-drawdown-requests.d.ts +124 -0
- package/dist/cjs/resources/inbound-wire-drawdown-requests.js +29 -0
- package/dist/cjs/resources/inbound-wire-drawdown-requests.js.map +1 -0
- package/dist/cjs/resources/index.d.ts +163 -0
- package/dist/cjs/resources/index.js +478 -0
- package/dist/cjs/resources/index.js.map +1 -0
- package/dist/cjs/resources/limits.d.ts +105 -0
- package/dist/cjs/resources/limits.js +37 -0
- package/dist/cjs/resources/limits.js.map +1 -0
- package/dist/cjs/resources/oauth-connections.d.ts +50 -0
- package/dist/cjs/resources/oauth-connections.js +25 -0
- package/dist/cjs/resources/oauth-connections.js.map +1 -0
- package/dist/cjs/resources/pending-transactions.d.ts +397 -0
- package/dist/cjs/resources/pending-transactions.js +29 -0
- package/dist/cjs/resources/pending-transactions.js.map +1 -0
- package/dist/cjs/resources/real-time-decisions.d.ts +289 -0
- package/dist/cjs/resources/real-time-decisions.js +21 -0
- package/dist/cjs/resources/real-time-decisions.js.map +1 -0
- package/dist/cjs/resources/routing-numbers.d.ts +49 -0
- package/dist/cjs/resources/routing-numbers.js +21 -0
- package/dist/cjs/resources/routing-numbers.js.map +1 -0
- package/dist/cjs/resources/shared.d.ts +15 -0
- package/dist/cjs/resources/shared.js +4 -0
- package/dist/cjs/resources/shared.js.map +1 -0
- package/dist/cjs/resources/simulations/account-statements.d.ts +19 -0
- package/dist/cjs/resources/simulations/account-statements.js +16 -0
- package/dist/cjs/resources/simulations/account-statements.js.map +1 -0
- package/dist/cjs/resources/simulations/account-transfers.d.ts +15 -0
- package/dist/cjs/resources/simulations/account-transfers.js +18 -0
- package/dist/cjs/resources/simulations/account-transfers.js.map +1 -0
- package/dist/cjs/resources/simulations/ach-transfers.d.ts +1488 -0
- package/dist/cjs/resources/simulations/ach-transfers.js +39 -0
- package/dist/cjs/resources/simulations/ach-transfers.js.map +1 -0
- package/dist/cjs/resources/simulations/card-disputes.d.ts +26 -0
- package/dist/cjs/resources/simulations/card-disputes.js +18 -0
- package/dist/cjs/resources/simulations/card-disputes.js.map +1 -0
- package/dist/cjs/resources/simulations/card-refunds.d.ts +20 -0
- package/dist/cjs/resources/simulations/card-refunds.js +16 -0
- package/dist/cjs/resources/simulations/card-refunds.js.map +1 -0
- package/dist/cjs/resources/simulations/cards.d.ts +793 -0
- package/dist/cjs/resources/simulations/cards.js +31 -0
- package/dist/cjs/resources/simulations/cards.js.map +1 -0
- package/dist/cjs/resources/simulations/check-deposits.d.ts +30 -0
- package/dist/cjs/resources/simulations/check-deposits.js +31 -0
- package/dist/cjs/resources/simulations/check-deposits.js.map +1 -0
- package/dist/cjs/resources/simulations/check-transfers.d.ts +22 -0
- package/dist/cjs/resources/simulations/check-transfers.js +24 -0
- package/dist/cjs/resources/simulations/check-transfers.js.map +1 -0
- package/dist/cjs/resources/simulations/digital-wallet-token-requests.d.ts +43 -0
- package/dist/cjs/resources/simulations/digital-wallet-token-requests.js +16 -0
- package/dist/cjs/resources/simulations/digital-wallet-token-requests.js.map +1 -0
- package/dist/cjs/resources/simulations/documents.d.ts +18 -0
- package/dist/cjs/resources/simulations/documents.js +15 -0
- package/dist/cjs/resources/simulations/documents.js.map +1 -0
- package/dist/cjs/resources/simulations/inbound-wire-drawdown-requests.d.ts +101 -0
- package/dist/cjs/resources/simulations/inbound-wire-drawdown-requests.js +16 -0
- package/dist/cjs/resources/simulations/inbound-wire-drawdown-requests.js.map +1 -0
- package/dist/cjs/resources/simulations/index.d.ts +20 -0
- package/dist/cjs/resources/simulations/index.js +4 -0
- package/dist/cjs/resources/simulations/index.js.map +1 -0
- package/dist/cjs/resources/simulations/real-time-payments-transfers.d.ts +1431 -0
- package/dist/cjs/resources/simulations/real-time-payments-transfers.js +16 -0
- package/dist/cjs/resources/simulations/real-time-payments-transfers.js.map +1 -0
- package/dist/cjs/resources/simulations/simulations.d.ts +29 -0
- package/dist/cjs/resources/simulations/simulations.js +44 -0
- package/dist/cjs/resources/simulations/simulations.js.map +1 -0
- package/dist/cjs/resources/simulations/wire-transfers.d.ts +1104 -0
- package/dist/cjs/resources/simulations/wire-transfers.js +15 -0
- package/dist/cjs/resources/simulations/wire-transfers.js.map +1 -0
- package/dist/cjs/resources/transactions.d.ts +1101 -0
- package/dist/cjs/resources/transactions.js +25 -0
- package/dist/cjs/resources/transactions.js.map +1 -0
- package/dist/cjs/resources/wire-drawdown-requests.d.ts +148 -0
- package/dist/cjs/resources/wire-drawdown-requests.js +35 -0
- package/dist/cjs/resources/wire-drawdown-requests.js.map +1 -0
- package/dist/cjs/resources/wire-transfers.d.ts +310 -0
- package/dist/cjs/resources/wire-transfers.js +60 -0
- package/dist/cjs/resources/wire-transfers.js.map +1 -0
- package/dist/cjs/tests/api-resources/account-numbers.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/account-numbers.test.js +104 -0
- package/dist/cjs/tests/api-resources/account-numbers.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/account-statements.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/account-statements.test.js +101 -0
- package/dist/cjs/tests/api-resources/account-statements.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/account-transfers.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/account-transfers.test.js +146 -0
- package/dist/cjs/tests/api-resources/account-transfers.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/accounts.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/accounts.test.js +119 -0
- package/dist/cjs/tests/api-resources/accounts.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/ach-prenotifications.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/ach-prenotifications.test.js +125 -0
- package/dist/cjs/tests/api-resources/ach-prenotifications.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/ach-transfers.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/ach-transfers.test.js +159 -0
- package/dist/cjs/tests/api-resources/ach-transfers.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/card-disputes.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/card-disputes.test.js +108 -0
- package/dist/cjs/tests/api-resources/card-disputes.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/card-profiles.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/card-profiles.test.js +97 -0
- package/dist/cjs/tests/api-resources/card-profiles.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/cards.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/cards.test.js +138 -0
- package/dist/cjs/tests/api-resources/cards.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/check-deposits.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/check-deposits.test.js +113 -0
- package/dist/cjs/tests/api-resources/check-deposits.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/check-transfers.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/check-transfers.test.js +172 -0
- package/dist/cjs/tests/api-resources/check-transfers.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/declined-transactions.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/declined-transactions.test.js +105 -0
- package/dist/cjs/tests/api-resources/declined-transactions.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/digital-wallet-tokens.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/digital-wallet-tokens.test.js +103 -0
- package/dist/cjs/tests/api-resources/digital-wallet-tokens.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/documents.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/documents.test.js +101 -0
- package/dist/cjs/tests/api-resources/documents.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/entities/entities.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/entities/entities.test.js +280 -0
- package/dist/cjs/tests/api-resources/entities/entities.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/entities/supplemental-documents.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/entities/supplemental-documents.test.js +49 -0
- package/dist/cjs/tests/api-resources/entities/supplemental-documents.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/event-subscriptions.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/event-subscriptions.test.js +109 -0
- package/dist/cjs/tests/api-resources/event-subscriptions.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/events.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/events.test.js +101 -0
- package/dist/cjs/tests/api-resources/events.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/external-accounts.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/external-accounts.test.js +113 -0
- package/dist/cjs/tests/api-resources/external-accounts.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/files.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/files.test.js +117 -0
- package/dist/cjs/tests/api-resources/files.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/groups.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/groups.test.js +54 -0
- package/dist/cjs/tests/api-resources/groups.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/inbound-ach-transfer-returns.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/inbound-ach-transfer-returns.test.js +90 -0
- package/dist/cjs/tests/api-resources/inbound-ach-transfer-returns.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/inbound-wire-drawdown-requests.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/inbound-wire-drawdown-requests.test.js +83 -0
- package/dist/cjs/tests/api-resources/inbound-wire-drawdown-requests.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/limits.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/limits.test.js +100 -0
- package/dist/cjs/tests/api-resources/limits.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/oauth-connections.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/oauth-connections.test.js +78 -0
- package/dist/cjs/tests/api-resources/oauth-connections.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/pending-transactions.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/pending-transactions.test.js +97 -0
- package/dist/cjs/tests/api-resources/pending-transactions.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/real-time-decisions.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/real-time-decisions.test.js +71 -0
- package/dist/cjs/tests/api-resources/real-time-decisions.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/routing-numbers.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/routing-numbers.test.js +55 -0
- package/dist/cjs/tests/api-resources/routing-numbers.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/simulations/account-statements.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/simulations/account-statements.test.js +49 -0
- package/dist/cjs/tests/api-resources/simulations/account-statements.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/simulations/account-transfers.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/simulations/account-transfers.test.js +60 -0
- package/dist/cjs/tests/api-resources/simulations/account-transfers.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/simulations/ach-transfers.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/simulations/ach-transfers.test.js +92 -0
- package/dist/cjs/tests/api-resources/simulations/ach-transfers.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/simulations/card-disputes.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/simulations/card-disputes.test.js +56 -0
- package/dist/cjs/tests/api-resources/simulations/card-disputes.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/simulations/card-refunds.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/simulations/card-refunds.test.js +49 -0
- package/dist/cjs/tests/api-resources/simulations/card-refunds.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/simulations/cards.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/simulations/cards.test.js +70 -0
- package/dist/cjs/tests/api-resources/simulations/cards.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/simulations/check-deposits.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/simulations/check-deposits.test.js +86 -0
- package/dist/cjs/tests/api-resources/simulations/check-deposits.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/simulations/check-transfers.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/simulations/check-transfers.test.js +73 -0
- package/dist/cjs/tests/api-resources/simulations/check-transfers.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/simulations/digital-wallet-token-requests.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/simulations/digital-wallet-token-requests.test.js +49 -0
- package/dist/cjs/tests/api-resources/simulations/digital-wallet-token-requests.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/simulations/documents.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/simulations/documents.test.js +49 -0
- package/dist/cjs/tests/api-resources/simulations/documents.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/simulations/inbound-wire-drawdown-requests.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/simulations/inbound-wire-drawdown-requests.test.js +81 -0
- package/dist/cjs/tests/api-resources/simulations/inbound-wire-drawdown-requests.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/simulations/real-time-payments-transfers.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/simulations/real-time-payments-transfers.test.js +62 -0
- package/dist/cjs/tests/api-resources/simulations/real-time-payments-transfers.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/simulations/wire-transfers.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/simulations/wire-transfers.test.js +70 -0
- package/dist/cjs/tests/api-resources/simulations/wire-transfers.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/transactions.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/transactions.test.js +109 -0
- package/dist/cjs/tests/api-resources/transactions.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/wire-drawdown-requests.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/wire-drawdown-requests.test.js +110 -0
- package/dist/cjs/tests/api-resources/wire-drawdown-requests.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/wire-transfers.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/wire-transfers.test.js +184 -0
- package/dist/cjs/tests/api-resources/wire-transfers.test.js.map +1 -0
- package/dist/cjs/tests/form.test.d.ts +1 -0
- package/dist/cjs/tests/form.test.js +60 -0
- package/dist/cjs/tests/form.test.js.map +1 -0
- package/dist/cjs/tests/index.test.d.ts +1 -0
- package/dist/cjs/tests/index.test.js +44 -0
- package/dist/cjs/tests/index.test.js.map +1 -0
- package/dist/cjs/tests/responses.test.d.ts +1 -0
- package/dist/cjs/tests/responses.test.js +59 -0
- package/dist/cjs/tests/responses.test.js.map +1 -0
- package/dist/cjs/version.d.ts +1 -0
- package/dist/cjs/version.js +5 -0
- package/dist/cjs/version.js.map +1 -0
- package/fetch-polyfill.ts +69 -0
- package/index.ts +276 -0
- package/jest.config.js +8 -0
- package/package.json +47 -0
- package/pagination.ts +58 -0
- package/resource.ts +24 -0
- package/resources/account-numbers.ts +141 -0
- package/resources/account-statements.ts +132 -0
- package/resources/account-transfers.ts +244 -0
- package/resources/accounts.ts +179 -0
- package/resources/ach-prenotifications.ts +242 -0
- package/resources/ach-transfers.ts +465 -0
- package/resources/card-disputes.ts +187 -0
- package/resources/card-profiles.ts +236 -0
- package/resources/cards.ts +398 -0
- package/resources/check-deposits.ts +303 -0
- package/resources/check-transfers.ts +422 -0
- package/resources/declined-transactions.ts +547 -0
- package/resources/digital-wallet-tokens.ts +115 -0
- package/resources/documents.ts +119 -0
- package/resources/entities/entities.ts +1668 -0
- package/resources/entities/index.ts +4 -0
- package/resources/entities/supplemental-documents.ts +25 -0
- package/resources/event-subscriptions.ts +232 -0
- package/resources/events.ts +215 -0
- package/resources/external-accounts.ts +162 -0
- package/resources/files.ts +188 -0
- package/resources/groups.ts +47 -0
- package/resources/inbound-ach-transfer-returns.ts +142 -0
- package/resources/inbound-wire-drawdown-requests.ts +168 -0
- package/resources/index.ts +165 -0
- package/resources/limits.ts +144 -0
- package/resources/oauth-connections.ts +74 -0
- package/resources/pending-transactions.ts +491 -0
- package/resources/real-time-decisions.ts +345 -0
- package/resources/routing-numbers.ts +62 -0
- package/resources/shared.ts +17 -0
- package/resources/simulations/account-statements.ts +25 -0
- package/resources/simulations/account-transfers.ts +20 -0
- package/resources/simulations/ach-transfers.ts +1873 -0
- package/resources/simulations/card-disputes.ts +33 -0
- package/resources/simulations/card-refunds.ts +26 -0
- package/resources/simulations/cards.ts +979 -0
- package/resources/simulations/check-deposits.ts +41 -0
- package/resources/simulations/check-transfers.ts +30 -0
- package/resources/simulations/digital-wallet-token-requests.ts +52 -0
- package/resources/simulations/documents.ts +24 -0
- package/resources/simulations/inbound-wire-drawdown-requests.ts +126 -0
- package/resources/simulations/index.ts +22 -0
- package/resources/simulations/real-time-payments-transfers.ts +1809 -0
- package/resources/simulations/simulations.ts +32 -0
- package/resources/simulations/wire-transfers.ts +1391 -0
- package/resources/transactions.ts +1393 -0
- package/resources/wire-drawdown-requests.ts +195 -0
- package/resources/wire-transfers.ts +399 -0
- package/tests/api-resources/account-numbers.test.ts +67 -0
- package/tests/api-resources/account-statements.test.ts +64 -0
- package/tests/api-resources/account-transfers.test.ts +109 -0
- package/tests/api-resources/accounts.test.ts +82 -0
- package/tests/api-resources/ach-prenotifications.test.ts +86 -0
- package/tests/api-resources/ach-transfers.test.ts +120 -0
- package/tests/api-resources/card-disputes.test.ts +71 -0
- package/tests/api-resources/card-profiles.test.ts +60 -0
- package/tests/api-resources/cards.test.ts +101 -0
- package/tests/api-resources/check-deposits.test.ts +74 -0
- package/tests/api-resources/check-transfers.test.ts +135 -0
- package/tests/api-resources/declined-transactions.test.ts +68 -0
- package/tests/api-resources/digital-wallet-tokens.test.ts +64 -0
- package/tests/api-resources/documents.test.ts +64 -0
- package/tests/api-resources/entities/entities.test.ts +243 -0
- package/tests/api-resources/entities/supplemental-documents.test.ts +12 -0
- package/tests/api-resources/event-subscriptions.test.ts +69 -0
- package/tests/api-resources/events.test.ts +64 -0
- package/tests/api-resources/external-accounts.test.ts +76 -0
- package/tests/api-resources/files.test.ts +81 -0
- package/tests/api-resources/groups.test.ts +17 -0
- package/tests/api-resources/inbound-ach-transfer-returns.test.ts +53 -0
- package/tests/api-resources/inbound-wire-drawdown-requests.test.ts +46 -0
- package/tests/api-resources/limits.test.ts +63 -0
- package/tests/api-resources/oauth-connections.test.ts +41 -0
- package/tests/api-resources/pending-transactions.test.ts +58 -0
- package/tests/api-resources/real-time-decisions.test.ts +34 -0
- package/tests/api-resources/routing-numbers.test.ts +18 -0
- package/tests/api-resources/simulations/account-statements.test.ts +12 -0
- package/tests/api-resources/simulations/account-transfers.test.ts +23 -0
- package/tests/api-resources/simulations/ach-transfers.test.ts +52 -0
- package/tests/api-resources/simulations/card-disputes.test.ts +19 -0
- package/tests/api-resources/simulations/card-refunds.test.ts +12 -0
- package/tests/api-resources/simulations/cards.test.ts +33 -0
- package/tests/api-resources/simulations/check-deposits.test.ts +49 -0
- package/tests/api-resources/simulations/check-transfers.test.ts +34 -0
- package/tests/api-resources/simulations/digital-wallet-token-requests.test.ts +12 -0
- package/tests/api-resources/simulations/documents.test.ts +12 -0
- package/tests/api-resources/simulations/inbound-wire-drawdown-requests.test.ts +44 -0
- package/tests/api-resources/simulations/real-time-payments-transfers.test.ts +25 -0
- package/tests/api-resources/simulations/wire-transfers.test.ts +33 -0
- package/tests/api-resources/transactions.test.ts +70 -0
- package/tests/api-resources/wire-drawdown-requests.test.ts +73 -0
- package/tests/api-resources/wire-transfers.test.ts +147 -0
- package/tests/form.test.ts +27 -0
- package/tests/index.test.ts +47 -0
- package/tests/responses.test.ts +25 -0
- package/tsconfig.cjs.json +8 -0
- package/tsconfig.json +37 -0
- package/typings/digest-fetch/index.d.ts +33 -0
- package/version.ts +1 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
+
|
|
3
|
+
import Increase from '~/index';
|
|
4
|
+
const increase = new Increase({ apiKey: 'something1234', baseURL: 'http://127.0.0.1:4010' });
|
|
5
|
+
|
|
6
|
+
describe('resource wire_drawdown_requests', () => {
|
|
7
|
+
// Prism tests are broken
|
|
8
|
+
test.skip('create: only required params', async () => {
|
|
9
|
+
const response = await increase.wireDrawdownRequests.create({
|
|
10
|
+
account_number_id: 'account_number_v18nkfqm6afpsrvy82b2',
|
|
11
|
+
amount: 10000,
|
|
12
|
+
message_to_recipient: 'Invoice 29582',
|
|
13
|
+
recipient_account_number: '987654321',
|
|
14
|
+
recipient_routing_number: '101050001',
|
|
15
|
+
recipient_name: 'Ian Crease',
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
// Prism tests are broken
|
|
20
|
+
test.skip('create: required and optional params', async () => {
|
|
21
|
+
const response = await increase.wireDrawdownRequests.create({
|
|
22
|
+
account_number_id: 'account_number_v18nkfqm6afpsrvy82b2',
|
|
23
|
+
amount: 10000,
|
|
24
|
+
message_to_recipient: 'Invoice 29582',
|
|
25
|
+
recipient_account_number: '987654321',
|
|
26
|
+
recipient_routing_number: '101050001',
|
|
27
|
+
recipient_name: 'Ian Crease',
|
|
28
|
+
recipient_address_line1: '33 Liberty Street',
|
|
29
|
+
recipient_address_line2: 'New York, NY, 10045',
|
|
30
|
+
recipient_address_line3: 'x',
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
test('retrieve', async () => {
|
|
35
|
+
const response = await increase.wireDrawdownRequests.retrieve(
|
|
36
|
+
'wire_drawdown_request_q6lmocus3glo0lr2bfv3',
|
|
37
|
+
);
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
test('retrieve: request options instead of params are passed correctly', async () => {
|
|
41
|
+
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
|
|
42
|
+
await expect(
|
|
43
|
+
increase.wireDrawdownRequests.retrieve('wire_drawdown_request_q6lmocus3glo0lr2bfv3', {
|
|
44
|
+
path: '/_stainless_unknown_path',
|
|
45
|
+
}),
|
|
46
|
+
).rejects.toThrow(Increase.NotFoundError);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
test('list: only required params', async () => {
|
|
50
|
+
const response = await increase.wireDrawdownRequests.list();
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
test('list: required and optional params', async () => {
|
|
54
|
+
const response = await increase.wireDrawdownRequests.list({ cursor: 'string', limit: 0 });
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
test('list: request options instead of params are passed correctly', async () => {
|
|
58
|
+
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
|
|
59
|
+
await expect(increase.wireDrawdownRequests.list({ path: '/_stainless_unknown_path' })).rejects.toThrow(
|
|
60
|
+
Increase.NotFoundError,
|
|
61
|
+
);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
test('list: request options and params are passed correctly', async () => {
|
|
65
|
+
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
|
|
66
|
+
await expect(
|
|
67
|
+
increase.wireDrawdownRequests.list(
|
|
68
|
+
{ cursor: 'string', limit: 0 },
|
|
69
|
+
{ path: '/_stainless_unknown_path' },
|
|
70
|
+
),
|
|
71
|
+
).rejects.toThrow(Increase.NotFoundError);
|
|
72
|
+
});
|
|
73
|
+
});
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
+
|
|
3
|
+
import Increase from '~/index';
|
|
4
|
+
const increase = new Increase({ apiKey: 'something1234', baseURL: 'http://127.0.0.1:4010' });
|
|
5
|
+
|
|
6
|
+
describe('resource wire_transfers', () => {
|
|
7
|
+
test('create: only required params', async () => {
|
|
8
|
+
const response = await increase.wireTransfers.create({
|
|
9
|
+
account_id: 'account_in71c4amph0vgo2qllky',
|
|
10
|
+
amount: 100,
|
|
11
|
+
message_to_recipient: 'New account transfer',
|
|
12
|
+
beneficiary_name: 'Ian Crease',
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
test('create: required and optional params', async () => {
|
|
17
|
+
const response = await increase.wireTransfers.create({
|
|
18
|
+
account_id: 'account_in71c4amph0vgo2qllky',
|
|
19
|
+
account_number: '987654321',
|
|
20
|
+
routing_number: '101050001',
|
|
21
|
+
external_account_id: 'string',
|
|
22
|
+
amount: 100,
|
|
23
|
+
message_to_recipient: 'New account transfer',
|
|
24
|
+
beneficiary_name: 'Ian Crease',
|
|
25
|
+
beneficiary_address_line1: '33 Liberty Street',
|
|
26
|
+
beneficiary_address_line2: 'New York',
|
|
27
|
+
beneficiary_address_line3: 'NY 10045',
|
|
28
|
+
require_approval: true,
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
test('retrieve', async () => {
|
|
33
|
+
const response = await increase.wireTransfers.retrieve('wire_transfer_5akynk7dqsq25qwk9q2u');
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
test('retrieve: request options instead of params are passed correctly', async () => {
|
|
37
|
+
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
|
|
38
|
+
await expect(
|
|
39
|
+
increase.wireTransfers.retrieve('wire_transfer_5akynk7dqsq25qwk9q2u', {
|
|
40
|
+
path: '/_stainless_unknown_path',
|
|
41
|
+
}),
|
|
42
|
+
).rejects.toThrow(Increase.NotFoundError);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
test('list: only required params', async () => {
|
|
46
|
+
const response = await increase.wireTransfers.list();
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
test('list: required and optional params', async () => {
|
|
50
|
+
const response = await increase.wireTransfers.list({
|
|
51
|
+
cursor: 'string',
|
|
52
|
+
limit: 0,
|
|
53
|
+
account_id: 'string',
|
|
54
|
+
external_account_id: 'string',
|
|
55
|
+
created_at: {
|
|
56
|
+
after: '2019-12-27T18:11:19.117Z',
|
|
57
|
+
before: '2019-12-27T18:11:19.117Z',
|
|
58
|
+
on_or_after: '2019-12-27T18:11:19.117Z',
|
|
59
|
+
on_or_before: '2019-12-27T18:11:19.117Z',
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
test('list: request options instead of params are passed correctly', async () => {
|
|
65
|
+
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
|
|
66
|
+
await expect(increase.wireTransfers.list({ path: '/_stainless_unknown_path' })).rejects.toThrow(
|
|
67
|
+
Increase.NotFoundError,
|
|
68
|
+
);
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
test('list: request options and params are passed correctly', async () => {
|
|
72
|
+
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
|
|
73
|
+
await expect(
|
|
74
|
+
increase.wireTransfers.list(
|
|
75
|
+
{
|
|
76
|
+
cursor: 'string',
|
|
77
|
+
limit: 0,
|
|
78
|
+
account_id: 'string',
|
|
79
|
+
external_account_id: 'string',
|
|
80
|
+
created_at: {
|
|
81
|
+
after: '2019-12-27T18:11:19.117Z',
|
|
82
|
+
before: '2019-12-27T18:11:19.117Z',
|
|
83
|
+
on_or_after: '2019-12-27T18:11:19.117Z',
|
|
84
|
+
on_or_before: '2019-12-27T18:11:19.117Z',
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
{ path: '/_stainless_unknown_path' },
|
|
88
|
+
),
|
|
89
|
+
).rejects.toThrow(Increase.NotFoundError);
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
test('approve', async () => {
|
|
93
|
+
const response = await increase.wireTransfers.approve('wire_transfer_5akynk7dqsq25qwk9q2u');
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
test('approve: request options instead of params are passed correctly', async () => {
|
|
97
|
+
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
|
|
98
|
+
await expect(
|
|
99
|
+
increase.wireTransfers.approve('wire_transfer_5akynk7dqsq25qwk9q2u', {
|
|
100
|
+
path: '/_stainless_unknown_path',
|
|
101
|
+
}),
|
|
102
|
+
).rejects.toThrow(Increase.NotFoundError);
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
test('cancel', async () => {
|
|
106
|
+
const response = await increase.wireTransfers.cancel('wire_transfer_5akynk7dqsq25qwk9q2u');
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
test('cancel: request options instead of params are passed correctly', async () => {
|
|
110
|
+
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
|
|
111
|
+
await expect(
|
|
112
|
+
increase.wireTransfers.cancel('wire_transfer_5akynk7dqsq25qwk9q2u', {
|
|
113
|
+
path: '/_stainless_unknown_path',
|
|
114
|
+
}),
|
|
115
|
+
).rejects.toThrow(Increase.NotFoundError);
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
// Prism tests are broken
|
|
119
|
+
test.skip('reverse', async () => {
|
|
120
|
+
const response = await increase.wireTransfers.reverse('wire_transfer_5akynk7dqsq25qwk9q2u');
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
// Prism tests are broken
|
|
124
|
+
test.skip('reverse: request options instead of params are passed correctly', async () => {
|
|
125
|
+
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
|
|
126
|
+
await expect(
|
|
127
|
+
increase.wireTransfers.reverse('wire_transfer_5akynk7dqsq25qwk9q2u', {
|
|
128
|
+
path: '/_stainless_unknown_path',
|
|
129
|
+
}),
|
|
130
|
+
).rejects.toThrow(Increase.NotFoundError);
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
// Prism tests are broken
|
|
134
|
+
test.skip('submit', async () => {
|
|
135
|
+
const response = await increase.wireTransfers.submit('wire_transfer_5akynk7dqsq25qwk9q2u');
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
// Prism tests are broken
|
|
139
|
+
test.skip('submit: request options instead of params are passed correctly', async () => {
|
|
140
|
+
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
|
|
141
|
+
await expect(
|
|
142
|
+
increase.wireTransfers.submit('wire_transfer_5akynk7dqsq25qwk9q2u', {
|
|
143
|
+
path: '/_stainless_unknown_path',
|
|
144
|
+
}),
|
|
145
|
+
).rejects.toThrow(Increase.NotFoundError);
|
|
146
|
+
});
|
|
147
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { multipartFormRequestOptions } from '~/core';
|
|
2
|
+
import { Blob } from 'formdata-node';
|
|
3
|
+
import { fileFromPath } from 'formdata-node/file-from-path';
|
|
4
|
+
|
|
5
|
+
describe('form data validation', () => {
|
|
6
|
+
test('valid values do not error', async () => {
|
|
7
|
+
multipartFormRequestOptions({
|
|
8
|
+
body: {
|
|
9
|
+
foo: 'foo',
|
|
10
|
+
string: 1,
|
|
11
|
+
bool: true,
|
|
12
|
+
file: await fileFromPath('README.md'),
|
|
13
|
+
blob: new Blob(['Some content'], { type: 'text/plain' }),
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
test('null', async () => {
|
|
19
|
+
expect(() =>
|
|
20
|
+
multipartFormRequestOptions({
|
|
21
|
+
body: {
|
|
22
|
+
null: null,
|
|
23
|
+
},
|
|
24
|
+
}),
|
|
25
|
+
).toThrow(TypeError);
|
|
26
|
+
});
|
|
27
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
+
|
|
3
|
+
import Increase from '../index';
|
|
4
|
+
|
|
5
|
+
describe('instantiate client', () => {
|
|
6
|
+
const env = process.env;
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
jest.resetModules();
|
|
10
|
+
process.env = { ...env };
|
|
11
|
+
|
|
12
|
+
console.warn = jest.fn();
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
afterEach(() => {
|
|
16
|
+
process.env = env;
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
test('with minimal arguments', () => {
|
|
20
|
+
// set API Key via env var
|
|
21
|
+
process.env['INCREASE_API_KEY'] = 'env var api key';
|
|
22
|
+
const client = new Increase();
|
|
23
|
+
expect(client.apiKey).toBe('env var api key');
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
test('with apiKey argument', () => {
|
|
27
|
+
process.env['INCREASE_API_KEY'] = 'env var api key';
|
|
28
|
+
|
|
29
|
+
const client = new Increase({ apiKey: 'another api key' });
|
|
30
|
+
expect(client.apiKey).toBe('another api key');
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
test('with options argument', () => {
|
|
34
|
+
process.env['INCREASE_API_KEY'] = 'env var api key';
|
|
35
|
+
|
|
36
|
+
// apiKey
|
|
37
|
+
const client = new Increase({ apiKey: 'my api key' });
|
|
38
|
+
expect(client.apiKey).toBe('my api key');
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
test('with disabled authentication', () => {
|
|
42
|
+
// fails if no API Key provided
|
|
43
|
+
expect(() => {
|
|
44
|
+
new Increase();
|
|
45
|
+
}).toThrow();
|
|
46
|
+
});
|
|
47
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { createResponseHeaders } from '~/core';
|
|
2
|
+
import { Headers } from 'node-fetch';
|
|
3
|
+
|
|
4
|
+
describe('response parsing', () => {
|
|
5
|
+
// TODO: test unicode characters
|
|
6
|
+
test('headers are case agnostic', async () => {
|
|
7
|
+
const headers = createResponseHeaders(new Headers({ 'Content-Type': 'foo', Accept: 'text/plain' }));
|
|
8
|
+
expect(headers['content-type']).toEqual('foo');
|
|
9
|
+
expect(headers['Content-type']).toEqual('foo');
|
|
10
|
+
expect(headers['Content-Type']).toEqual('foo');
|
|
11
|
+
expect(headers['accept']).toEqual('text/plain');
|
|
12
|
+
expect(headers['Accept']).toEqual('text/plain');
|
|
13
|
+
expect(headers['Hello-World']).toBeUndefined();
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
test('duplicate headers are concatenated', () => {
|
|
17
|
+
const headers = createResponseHeaders(
|
|
18
|
+
new Headers([
|
|
19
|
+
['Content-Type', 'text/xml'],
|
|
20
|
+
['Content-Type', 'application/json'],
|
|
21
|
+
]),
|
|
22
|
+
);
|
|
23
|
+
expect(headers['content-type']).toBe('text/xml, application/json');
|
|
24
|
+
});
|
|
25
|
+
});
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es2019",
|
|
4
|
+
"lib": ["es2020"],
|
|
5
|
+
"module": "commonjs",
|
|
6
|
+
"moduleResolution": "node",
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"rootDir": "./",
|
|
9
|
+
"baseUrl": "./",
|
|
10
|
+
"paths": {
|
|
11
|
+
"~/*": ["*"],
|
|
12
|
+
"digest-fetch": ["./typings/digest-fetch"]
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
"declaration": true,
|
|
16
|
+
"outDir": "dist",
|
|
17
|
+
"pretty": true,
|
|
18
|
+
"sourceMap": true,
|
|
19
|
+
|
|
20
|
+
"forceConsistentCasingInFileNames": true,
|
|
21
|
+
|
|
22
|
+
"strict": true,
|
|
23
|
+
"noImplicitAny": true,
|
|
24
|
+
"strictNullChecks": true,
|
|
25
|
+
"strictFunctionTypes": true,
|
|
26
|
+
"strictBindCallApply": true,
|
|
27
|
+
"strictPropertyInitialization": true,
|
|
28
|
+
"noImplicitThis": true,
|
|
29
|
+
"alwaysStrict": true,
|
|
30
|
+
"exactOptionalPropertyTypes": true,
|
|
31
|
+
"noUncheckedIndexedAccess": true,
|
|
32
|
+
"noImplicitOverride": true,
|
|
33
|
+
"noPropertyAccessFromIndexSignature": true,
|
|
34
|
+
|
|
35
|
+
"skipLibCheck": true
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
declare module 'digest-fetch';
|
|
2
|
+
|
|
3
|
+
import type { RequestInfo, RequestInit, Response } from 'node-fetch';
|
|
4
|
+
|
|
5
|
+
type Algorithm = 'MD5' | 'MD5-sess';
|
|
6
|
+
|
|
7
|
+
type Options = {
|
|
8
|
+
algorithm?: Algorithm;
|
|
9
|
+
statusCode?: number;
|
|
10
|
+
cnonceSize?: number;
|
|
11
|
+
basic?: boolean;
|
|
12
|
+
precomputeHash?: boolean;
|
|
13
|
+
logger?: typeof console;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
class DigestClient {
|
|
17
|
+
user: string;
|
|
18
|
+
password: string;
|
|
19
|
+
|
|
20
|
+
private nonceRaw: string;
|
|
21
|
+
private logger?: typeof console;
|
|
22
|
+
private precomputedHash?: boolean;
|
|
23
|
+
private statusCode?: number;
|
|
24
|
+
private basic: boolean;
|
|
25
|
+
private cnonceSize: number;
|
|
26
|
+
private hasAuth: boolean;
|
|
27
|
+
private digest: { nc: number; algorithm: Algorithm; realm: string };
|
|
28
|
+
|
|
29
|
+
constructor(user: string, password: string, options: Options = {});
|
|
30
|
+
async fetch(url: RequestInfo, options: RequestInit = {}): Promise<Response>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default DigestClient;
|
package/version.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const VERSION = '0.1.0';
|