modern-treasury 2.1.0 → 2.3.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/CHANGELOG.md +88 -0
- package/README.md +41 -15
- package/_shims/ReadableStream.d.ts +38 -0
- package/_shims/ReadableStream.js +5 -0
- package/_shims/ReadableStream.mjs +7 -0
- package/_shims/ReadableStream.node.d.ts +6 -0
- package/_shims/ReadableStream.node.d.ts.map +1 -0
- package/_shims/ReadableStream.node.js +14 -0
- package/_shims/ReadableStream.node.js.map +1 -0
- package/_shims/ReadableStream.node.mjs +3 -0
- package/_shims/ReadableStream.node.mjs.map +1 -0
- package/_shims/fetch.d.ts +8 -1
- package/_shims/fetch.js +1 -1
- package/_shims/fetch.node.d.ts +11 -1
- package/_shims/formdata.node.d.ts +1 -0
- package/core.d.ts +87 -38
- package/core.d.ts.map +1 -1
- package/core.js +245 -114
- package/core.js.map +1 -1
- package/core.mjs +231 -74
- package/core.mjs.map +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.js +12 -3
- package/error.js.map +1 -1
- package/error.mjs +12 -3
- package/error.mjs.map +1 -1
- package/index.d.mts +9 -10
- package/index.d.ts +9 -10
- package/index.d.ts.map +1 -1
- package/index.js +32 -20
- package/index.js.map +1 -1
- package/index.mjs +32 -20
- package/index.mjs.map +1 -1
- package/package.json +5 -5
- package/pagination.d.ts +2 -2
- package/pagination.d.ts.map +1 -1
- package/pagination.js +5 -5
- package/pagination.js.map +1 -1
- package/pagination.mjs +5 -5
- package/pagination.mjs.map +1 -1
- package/resources/account-collection-flows.d.ts +11 -11
- package/resources/account-collection-flows.d.ts.map +1 -1
- package/resources/account-collection-flows.js +4 -4
- package/resources/account-collection-flows.mjs +2 -2
- package/resources/account-details.d.ts +5 -5
- package/resources/account-details.d.ts.map +1 -1
- package/resources/connections.d.ts +5 -2
- package/resources/connections.d.ts.map +1 -1
- package/resources/connections.js.map +1 -1
- package/resources/connections.mjs.map +1 -1
- package/resources/counterparties.d.ts +11 -11
- package/resources/counterparties.d.ts.map +1 -1
- package/resources/counterparties.js.map +1 -1
- package/resources/counterparties.mjs.map +1 -1
- package/resources/documents.d.ts +6 -9
- package/resources/documents.d.ts.map +1 -1
- package/resources/documents.js +3 -9
- package/resources/documents.js.map +1 -1
- package/resources/documents.mjs +3 -9
- package/resources/documents.mjs.map +1 -1
- package/resources/events.d.ts +3 -3
- package/resources/events.d.ts.map +1 -1
- package/resources/expected-payments.d.ts +7 -7
- package/resources/expected-payments.d.ts.map +1 -1
- package/resources/external-accounts.d.ts +10 -10
- package/resources/external-accounts.d.ts.map +1 -1
- package/resources/incoming-payment-details.d.ts +11 -7
- package/resources/incoming-payment-details.d.ts.map +1 -1
- package/resources/incoming-payment-details.js.map +1 -1
- package/resources/incoming-payment-details.mjs.map +1 -1
- package/resources/index.d.ts +2 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/internal-accounts/balance-reports.d.ts +6 -3
- package/resources/internal-accounts/balance-reports.d.ts.map +1 -1
- package/resources/internal-accounts/balance-reports.js.map +1 -1
- package/resources/internal-accounts/balance-reports.mjs.map +1 -1
- package/resources/internal-accounts/internal-accounts.d.ts +11 -10
- package/resources/internal-accounts/internal-accounts.d.ts.map +1 -1
- package/resources/internal-accounts/internal-accounts.js.map +1 -1
- package/resources/internal-accounts/internal-accounts.mjs.map +1 -1
- package/resources/invoices/invoices.d.ts +147 -17
- package/resources/invoices/invoices.d.ts.map +1 -1
- package/resources/invoices/invoices.js.map +1 -1
- package/resources/invoices/invoices.mjs.map +1 -1
- package/resources/invoices/line-items.d.ts +23 -130
- package/resources/invoices/line-items.d.ts.map +1 -1
- package/resources/invoices/line-items.js.map +1 -1
- package/resources/invoices/line-items.mjs.map +1 -1
- package/resources/ledger-account-categories.d.ts +39 -74
- package/resources/ledger-account-categories.d.ts.map +1 -1
- package/resources/ledger-account-categories.js +11 -13
- package/resources/ledger-account-categories.js.map +1 -1
- package/resources/ledger-account-categories.mjs +11 -13
- package/resources/ledger-account-categories.mjs.map +1 -1
- package/resources/ledger-account-payouts.d.ts +22 -6
- package/resources/ledger-account-payouts.d.ts.map +1 -1
- package/resources/ledger-account-payouts.js.map +1 -1
- package/resources/ledger-account-payouts.mjs.map +1 -1
- package/resources/ledger-account-statements.d.ts +2 -2
- package/resources/ledger-account-statements.d.ts.map +1 -1
- package/resources/ledger-accounts.d.ts +40 -28
- package/resources/ledger-accounts.d.ts.map +1 -1
- package/resources/ledger-accounts.js.map +1 -1
- package/resources/ledger-accounts.mjs.map +1 -1
- package/resources/ledger-entries.d.ts +20 -6
- package/resources/ledger-entries.d.ts.map +1 -1
- package/resources/ledger-entries.js.map +1 -1
- package/resources/ledger-entries.mjs.map +1 -1
- package/resources/ledger-event-handlers.d.ts +11 -8
- package/resources/ledger-event-handlers.d.ts.map +1 -1
- package/resources/ledger-event-handlers.js.map +1 -1
- package/resources/ledger-event-handlers.mjs.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.d.ts +40 -18
- package/resources/ledger-transactions/ledger-transactions.d.ts.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.js +3 -3
- package/resources/ledger-transactions/ledger-transactions.js.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.mjs +3 -3
- package/resources/ledger-transactions/ledger-transactions.mjs.map +1 -1
- package/resources/ledger-transactions/versions.d.ts +4 -2
- package/resources/ledger-transactions/versions.d.ts.map +1 -1
- package/resources/ledger-transactions/versions.js.map +1 -1
- package/resources/ledger-transactions/versions.mjs.map +1 -1
- package/resources/ledgerable-events.d.ts +2 -18
- package/resources/ledgerable-events.d.ts.map +1 -1
- package/resources/ledgerable-events.js.map +1 -1
- package/resources/ledgerable-events.mjs.map +1 -1
- package/resources/ledgers.d.ts +12 -11
- package/resources/ledgers.d.ts.map +1 -1
- package/resources/ledgers.js.map +1 -1
- package/resources/ledgers.mjs.map +1 -1
- package/resources/line-items.d.ts +5 -5
- package/resources/line-items.d.ts.map +1 -1
- package/resources/paper-items.d.ts +6 -3
- package/resources/paper-items.d.ts.map +1 -1
- package/resources/paper-items.js.map +1 -1
- package/resources/paper-items.mjs.map +1 -1
- package/resources/payment-flows.d.ts +9 -9
- package/resources/payment-flows.d.ts.map +1 -1
- package/resources/payment-flows.js.map +1 -1
- package/resources/payment-flows.mjs.map +1 -1
- package/resources/payment-orders/payment-orders.d.ts +56 -24
- package/resources/payment-orders/payment-orders.d.ts.map +1 -1
- package/resources/payment-orders/payment-orders.js +3 -5
- package/resources/payment-orders/payment-orders.js.map +1 -1
- package/resources/payment-orders/payment-orders.mjs +3 -5
- package/resources/payment-orders/payment-orders.mjs.map +1 -1
- package/resources/payment-orders/reversals.d.ts +19 -9
- package/resources/payment-orders/reversals.d.ts.map +1 -1
- package/resources/payment-orders/reversals.js.map +1 -1
- package/resources/payment-orders/reversals.mjs.map +1 -1
- package/resources/payment-references.d.ts +3 -3
- package/resources/payment-references.d.ts.map +1 -1
- package/resources/returns.d.ts +7 -4
- package/resources/returns.d.ts.map +1 -1
- package/resources/returns.js.map +1 -1
- package/resources/returns.mjs.map +1 -1
- package/resources/routing-details.d.ts +5 -5
- package/resources/routing-details.d.ts.map +1 -1
- package/resources/top-level.d.ts.map +1 -1
- package/resources/transactions/line-items.d.ts +5 -2
- package/resources/transactions/line-items.d.ts.map +1 -1
- package/resources/transactions/line-items.js.map +1 -1
- package/resources/transactions/line-items.mjs.map +1 -1
- package/resources/transactions/transactions.d.ts +8 -5
- package/resources/transactions/transactions.d.ts.map +1 -1
- package/resources/transactions/transactions.js.map +1 -1
- package/resources/transactions/transactions.mjs.map +1 -1
- package/resources/validations.d.ts +1 -1
- package/resources/validations.d.ts.map +1 -1
- package/resources/virtual-accounts.d.ts +65 -12
- package/resources/virtual-accounts.d.ts.map +1 -1
- package/resources/virtual-accounts.js +1 -4
- package/resources/virtual-accounts.js.map +1 -1
- package/resources/virtual-accounts.mjs +1 -4
- package/resources/virtual-accounts.mjs.map +1 -1
- package/src/_shims/ReadableStream.d.ts +38 -0
- package/src/_shims/ReadableStream.js +5 -0
- package/src/_shims/ReadableStream.mjs +7 -0
- package/src/_shims/ReadableStream.node.ts +6 -0
- package/src/_shims/fetch.d.ts +8 -1
- package/src/_shims/fetch.deno.ts +23 -0
- package/src/_shims/fetch.js +1 -1
- package/src/_shims/fetch.node.d.ts +11 -1
- package/src/_shims/formdata.deno.ts +16 -0
- package/src/_shims/formdata.node.d.ts +1 -0
- package/src/core.ts +302 -93
- package/src/error.ts +11 -1
- package/src/index.ts +36 -29
- package/src/pagination.ts +6 -6
- package/src/resources/account-collection-flows.ts +15 -15
- package/src/resources/account-details.ts +7 -7
- package/src/resources/connections.ts +7 -4
- package/src/resources/counterparties.ts +14 -14
- package/src/resources/documents.ts +10 -22
- package/src/resources/events.ts +5 -5
- package/src/resources/expected-payments.ts +10 -10
- package/src/resources/external-accounts.ts +14 -14
- package/src/resources/incoming-payment-details.ts +16 -11
- package/src/resources/index.ts +2 -3
- package/src/resources/internal-accounts/balance-reports.ts +8 -5
- package/src/resources/internal-accounts/internal-accounts.ts +15 -14
- package/src/resources/invoices/invoices.ts +168 -20
- package/src/resources/invoices/line-items.ts +26 -163
- package/src/resources/ledger-account-categories.ts +48 -92
- package/src/resources/ledger-account-payouts.ts +28 -9
- package/src/resources/ledger-account-statements.ts +3 -3
- package/src/resources/ledger-accounts.ts +46 -32
- package/src/resources/ledger-entries.ts +25 -9
- package/src/resources/ledger-event-handlers.ts +14 -13
- package/src/resources/ledger-transactions/ledger-transactions.ts +53 -26
- package/src/resources/ledger-transactions/versions.ts +6 -4
- package/src/resources/ledgerable-events.ts +3 -23
- package/src/resources/ledgers.ts +16 -14
- package/src/resources/line-items.ts +8 -8
- package/src/resources/paper-items.ts +8 -5
- package/src/resources/payment-flows.ts +12 -12
- package/src/resources/payment-orders/payment-orders.ts +70 -37
- package/src/resources/payment-orders/reversals.ts +24 -12
- package/src/resources/payment-references.ts +5 -5
- package/src/resources/returns.ts +9 -6
- package/src/resources/routing-details.ts +7 -7
- package/src/resources/top-level.ts +1 -1
- package/src/resources/transactions/line-items.ts +7 -4
- package/src/resources/transactions/transactions.ts +11 -8
- package/src/resources/validations.ts +2 -2
- package/src/resources/virtual-accounts.ts +74 -19
- package/src/uploads.ts +11 -10
- package/src/version.ts +1 -1
- package/uploads.d.ts +5 -4
- package/uploads.d.ts.map +1 -1
- package/uploads.js +4 -4
- package/uploads.js.map +1 -1
- package/uploads.mjs +4 -4
- package/uploads.mjs.map +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,93 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.3.0](https://github.com/Modern-Treasury/modern-treasury-node/compare/v2.2.0...v2.3.0) (2023-08-15)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* **client:** support accessing raw response + remove deprecated features ([#191](https://github.com/Modern-Treasury/modern-treasury-node/issues/191))
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* allow a default timeout to be set for clients ([#196](https://github.com/Modern-Treasury/modern-treasury-node/issues/196)) ([5403497](https://github.com/Modern-Treasury/modern-treasury-node/commit/54034973c70908750a4cc53130782d247bde6e5f))
|
|
13
|
+
* **api:** add `metadata` in several places it was missing; add `description` ([#179](https://github.com/Modern-Treasury/modern-treasury-node/issues/179)) ([639f25b](https://github.com/Modern-Treasury/modern-treasury-node/commit/639f25ba064edf2ab637f572a803fd3b7d59087b))
|
|
14
|
+
* **api:** support multiple `id`s in `ledger` `retrieve`/`list` endpoints ([#194](https://github.com/Modern-Treasury/modern-treasury-node/issues/194)) ([a8a1a87](https://github.com/Modern-Treasury/modern-treasury-node/commit/a8a1a879d41da3cefce4acdfa5f4951e01a0399c))
|
|
15
|
+
* **api:** updates ([#180](https://github.com/Modern-Treasury/modern-treasury-node/issues/180)) ([24c193d](https://github.com/Modern-Treasury/modern-treasury-node/commit/24c193d346a555d5274de5ba94dfc3ce756d1c8e))
|
|
16
|
+
* **client:** detect browser usage ([#182](https://github.com/Modern-Treasury/modern-treasury-node/issues/182)) ([f571e78](https://github.com/Modern-Treasury/modern-treasury-node/commit/f571e786840477c48411e227f015ddceeac5e239))
|
|
17
|
+
* **client:** support accessing raw response + remove deprecated features ([#191](https://github.com/Modern-Treasury/modern-treasury-node/issues/191)) ([ca27da3](https://github.com/Modern-Treasury/modern-treasury-node/commit/ca27da367bb37e7045b15ccc01fccebeafdc9ce9))
|
|
18
|
+
* **streaming:** add `.toReadableStream()` method ([#185](https://github.com/Modern-Treasury/modern-treasury-node/issues/185)) ([7765c7b](https://github.com/Modern-Treasury/modern-treasury-node/commit/7765c7b08ab0c873da97af25cd6b4c35a967ab7f))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* **client:** fix array query param serialization ([#195](https://github.com/Modern-Treasury/modern-treasury-node/issues/195)) ([c091449](https://github.com/Modern-Treasury/modern-treasury-node/commit/c091449e81b50a16f05cf06c822251d2c0154f48))
|
|
24
|
+
* remove redundant `Content-Type` header param ([#190](https://github.com/Modern-Treasury/modern-treasury-node/issues/190)) ([0dedec0](https://github.com/Modern-Treasury/modern-treasury-node/commit/0dedec00c9daec61162ad04548287b7cb7581e29))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Documentation
|
|
28
|
+
|
|
29
|
+
* **api:** improve custom method arguments ([#184](https://github.com/Modern-Treasury/modern-treasury-node/issues/184)) ([ea440fd](https://github.com/Modern-Treasury/modern-treasury-node/commit/ea440fd721ef06b2b9e75293da3aee4bb3f91748))
|
|
30
|
+
* **readme:** minor updates ([#192](https://github.com/Modern-Treasury/modern-treasury-node/issues/192)) ([94a83be](https://github.com/Modern-Treasury/modern-treasury-node/commit/94a83bec5981737f9186850c8ec8ecab0e9db27c))
|
|
31
|
+
* **readme:** remove beta status + document versioning policy ([#181](https://github.com/Modern-Treasury/modern-treasury-node/issues/181)) ([5a7f4a4](https://github.com/Modern-Treasury/modern-treasury-node/commit/5a7f4a4a43f4e20f3012ca9ba39d1803ad4bcc45))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Chores
|
|
35
|
+
|
|
36
|
+
* assign default reviewers to release PRs ([#197](https://github.com/Modern-Treasury/modern-treasury-node/issues/197)) ([ef8f6b0](https://github.com/Modern-Treasury/modern-treasury-node/commit/ef8f6b07e4ec54b107f80d1e87221a28fdfda349))
|
|
37
|
+
* **internal:** change jest exclude patterns ([#189](https://github.com/Modern-Treasury/modern-treasury-node/issues/189)) ([2f59bf2](https://github.com/Modern-Treasury/modern-treasury-node/commit/2f59bf2c195abb237839b8a8b2e9b744b7c6c0bc))
|
|
38
|
+
* **internal:** conditionally include bin during build output ([#193](https://github.com/Modern-Treasury/modern-treasury-node/issues/193)) ([7dfe154](https://github.com/Modern-Treasury/modern-treasury-node/commit/7dfe154c8c49d319d5e98be7f380c209f796772c))
|
|
39
|
+
* **internal:** fix deno build ([#177](https://github.com/Modern-Treasury/modern-treasury-node/issues/177)) ([f04bfc3](https://github.com/Modern-Treasury/modern-treasury-node/commit/f04bfc305c3e5430284502d0fdbdb4578f1f28d8))
|
|
40
|
+
* **internal:** fix error happening in CloudFlare pages ([#198](https://github.com/Modern-Treasury/modern-treasury-node/issues/198)) ([5fa6d25](https://github.com/Modern-Treasury/modern-treasury-node/commit/5fa6d25ec13fc37d70da3be68792eecf2d4f4d99))
|
|
41
|
+
* **internal:** improve error message when option is missing ([#199](https://github.com/Modern-Treasury/modern-treasury-node/issues/199)) ([db2e836](https://github.com/Modern-Treasury/modern-treasury-node/commit/db2e836f9d046ec1cc517afe20fda116f0b9f4d8))
|
|
42
|
+
* **internal:** remove deno build ([#183](https://github.com/Modern-Treasury/modern-treasury-node/issues/183)) ([3db3231](https://github.com/Modern-Treasury/modern-treasury-node/commit/3db3231509cfc949fdd672ec54d48d4f96a315ac))
|
|
43
|
+
* **internal:** update eslint ([#187](https://github.com/Modern-Treasury/modern-treasury-node/issues/187)) ([0d185b0](https://github.com/Modern-Treasury/modern-treasury-node/commit/0d185b0a0935704ab3ce5098743db28eee36ff02))
|
|
44
|
+
* **internal:** update tsconfig-paths dep ([#188](https://github.com/Modern-Treasury/modern-treasury-node/issues/188)) ([9370fe5](https://github.com/Modern-Treasury/modern-treasury-node/commit/9370fe52fdf84e3d0737629eaf5714d6563bbb08))
|
|
45
|
+
* **internal:** update typescript ([#186](https://github.com/Modern-Treasury/modern-treasury-node/issues/186)) ([7186ad6](https://github.com/Modern-Treasury/modern-treasury-node/commit/7186ad6e0ba1fb096cfad4852b9670e2b43f9113))
|
|
46
|
+
|
|
47
|
+
## [2.2.0](https://github.com/Modern-Treasury/modern-treasury-node/compare/v2.1.0...v3.0.0) (2023-08-01)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### ⚠ BREAKING CHANGES
|
|
51
|
+
|
|
52
|
+
* **types:** rename account connection flow to account collection flow ([#164](https://github.com/Modern-Treasury/modern-treasury-node/issues/164))
|
|
53
|
+
* **api:** update parameters for virtual account create request ([#157](https://github.com/Modern-Treasury/modern-treasury-node/issues/157))
|
|
54
|
+
|
|
55
|
+
### Features
|
|
56
|
+
|
|
57
|
+
* **api:** update parameters for virtual account create request ([#157](https://github.com/Modern-Treasury/modern-treasury-node/issues/157)) ([1e5aebe](https://github.com/Modern-Treasury/modern-treasury-node/commit/1e5aebe5378c24a9400f12736643427941aee98f))
|
|
58
|
+
* **api:** updates ([#166](https://github.com/Modern-Treasury/modern-treasury-node/issues/166)) ([40a3e9e](https://github.com/Modern-Treasury/modern-treasury-node/commit/40a3e9e734d709269fc28319e64fe72d6fb85d61))
|
|
59
|
+
* **api:** updates ([#171](https://github.com/Modern-Treasury/modern-treasury-node/issues/171)) ([c47cae2](https://github.com/Modern-Treasury/modern-treasury-node/commit/c47cae26e89f158823963f826176635cc073ad9d))
|
|
60
|
+
* **client:** export ClientOptions interface ([#161](https://github.com/Modern-Treasury/modern-treasury-node/issues/161)) ([cfc1517](https://github.com/Modern-Treasury/modern-treasury-node/commit/cfc1517a8531fdb29d8581f930ddf199b4e6f9c2))
|
|
61
|
+
* **streaming:** make requests immediately throw an error if an aborted signal is passed in ([#163](https://github.com/Modern-Treasury/modern-treasury-node/issues/163)) ([3282c5d](https://github.com/Modern-Treasury/modern-treasury-node/commit/3282c5d492c0a59c6e57ad4ccd1cf17ee3dac3c1))
|
|
62
|
+
* **test:** unskip file uploads tests ([#175](https://github.com/Modern-Treasury/modern-treasury-node/issues/175)) ([8117843](https://github.com/Modern-Treasury/modern-treasury-node/commit/81178432e87c937dd0937d815de90d7ccdda4dd4))
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### Bug Fixes
|
|
66
|
+
|
|
67
|
+
* **api:** add response body to `virtualAccounts.retrieve()` and update resources ([#155](https://github.com/Modern-Treasury/modern-treasury-node/issues/155)) ([b5464dd](https://github.com/Modern-Treasury/modern-treasury-node/commit/b5464dd14855278c5c829f1c664e43465344636e))
|
|
68
|
+
* **client:** fix errors with file uploads in the browser ([#162](https://github.com/Modern-Treasury/modern-treasury-node/issues/162)) ([a2dda93](https://github.com/Modern-Treasury/modern-treasury-node/commit/a2dda93f6af6fc6e8442352b0b06f8ef49e21e6c))
|
|
69
|
+
* **client:** handle undefined process in more places ([#170](https://github.com/Modern-Treasury/modern-treasury-node/issues/170)) ([5d0a45b](https://github.com/Modern-Treasury/modern-treasury-node/commit/5d0a45b774996f02e67e8eec43e256121d1d74b3))
|
|
70
|
+
* **client:** set client options argument as optional ([#168](https://github.com/Modern-Treasury/modern-treasury-node/issues/168)) ([9f2ac54](https://github.com/Modern-Treasury/modern-treasury-node/commit/9f2ac54ce3fddbf620e252812c3f1f16a1dcbd7e))
|
|
71
|
+
* fix error in environments without `TextEncoder` ([#158](https://github.com/Modern-Treasury/modern-treasury-node/issues/158)) ([1dba8bc](https://github.com/Modern-Treasury/modern-treasury-node/commit/1dba8bc1fba59451bd0c94cd00f503080339b7ec))
|
|
72
|
+
* fix errors with "named" client export in CJS ([#156](https://github.com/Modern-Treasury/modern-treasury-node/issues/156)) ([31b4844](https://github.com/Modern-Treasury/modern-treasury-node/commit/31b48446dd720f3b05810434cc4645d05c4b49fd))
|
|
73
|
+
* fix export map order ([#160](https://github.com/Modern-Treasury/modern-treasury-node/issues/160)) ([b47d673](https://github.com/Modern-Treasury/modern-treasury-node/commit/b47d6734e844d5b0c50ffe00d3c198a98517d938))
|
|
74
|
+
* fix undefined message in errors ([#169](https://github.com/Modern-Treasury/modern-treasury-node/issues/169)) ([4c914f4](https://github.com/Modern-Treasury/modern-treasury-node/commit/4c914f4c4c6a87a1be0ee5ae035ef83cb2cbec3e))
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
### Refactors
|
|
78
|
+
|
|
79
|
+
* create build for deno.land ([#174](https://github.com/Modern-Treasury/modern-treasury-node/issues/174)) ([bb9f890](https://github.com/Modern-Treasury/modern-treasury-node/commit/bb9f890d8daa6e972b010249620b8988ed65df6c))
|
|
80
|
+
* **types:** rename account connection flow to account collection flow ([#164](https://github.com/Modern-Treasury/modern-treasury-node/issues/164)) ([12ae4aa](https://github.com/Modern-Treasury/modern-treasury-node/commit/12ae4aac4820b17be6229efed5ec4d9cee67d802))
|
|
81
|
+
* use destructuring arguments in client constructor and respect false values ([#172](https://github.com/Modern-Treasury/modern-treasury-node/issues/172)) ([2efa6bd](https://github.com/Modern-Treasury/modern-treasury-node/commit/2efa6bd41d784b78d8433e9092c636dd41e988c1))
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
### Chores
|
|
85
|
+
|
|
86
|
+
* **internal:** allow the build script to be run without yarn installed ([#173](https://github.com/Modern-Treasury/modern-treasury-node/issues/173)) ([c57d134](https://github.com/Modern-Treasury/modern-treasury-node/commit/c57d134106e05d7fa24d790254877d9fc2ae573e))
|
|
87
|
+
* **internal:** fix deno build ([#176](https://github.com/Modern-Treasury/modern-treasury-node/issues/176)) ([660c841](https://github.com/Modern-Treasury/modern-treasury-node/commit/660c8416c8ac208e0e06a17ab7a86eefb16cc521))
|
|
88
|
+
* **internal:** let `toFile` helper accept promises to objects with name/type properties ([#153](https://github.com/Modern-Treasury/modern-treasury-node/issues/153)) ([0965670](https://github.com/Modern-Treasury/modern-treasury-node/commit/096567096abdce934a7f050a35f6fce604a8fb44))
|
|
89
|
+
* **internal:** restructure code to stringify query ([#159](https://github.com/Modern-Treasury/modern-treasury-node/issues/159)) ([82dae5b](https://github.com/Modern-Treasury/modern-treasury-node/commit/82dae5b5a15beb25407c1369865a8d4d74769c06))
|
|
90
|
+
|
|
3
91
|
## [2.1.0](https://github.com/Modern-Treasury/modern-treasury-node/compare/v2.0.0...v2.1.0) (2023-07-13)
|
|
4
92
|
|
|
5
93
|
|
package/README.md
CHANGED
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://npmjs.org/package/modern-treasury)
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
It includes TypeScript definitions for all request params and response fields.
|
|
7
|
-
|
|
8
|
-
## Documentation
|
|
5
|
+
This library provides convenient access to the Modern Treasury Node REST API from server-side TypeScript or JavaScript.
|
|
9
6
|
|
|
10
7
|
The API documentation can be found [here](https://docs.moderntreasury.com).
|
|
11
8
|
|
|
@@ -39,10 +36,9 @@ async function main() {
|
|
|
39
36
|
main();
|
|
40
37
|
```
|
|
41
38
|
|
|
42
|
-
###
|
|
39
|
+
### Request & Response types
|
|
43
40
|
|
|
44
|
-
|
|
45
|
-
If you like, you may reference our types directly:
|
|
41
|
+
This library includes TypeScript definitions for all request params and response fields. You may import and use them like so:
|
|
46
42
|
|
|
47
43
|
```ts
|
|
48
44
|
import ModernTreasury from 'modern-treasury';
|
|
@@ -179,13 +175,13 @@ await modernTreasury.externalAccounts.list({
|
|
|
179
175
|
|
|
180
176
|
### Timeouts
|
|
181
177
|
|
|
182
|
-
Requests time out after
|
|
178
|
+
Requests time out after 1 minute by default. You can configure this with a `timeout` option:
|
|
183
179
|
|
|
184
180
|
<!-- prettier-ignore -->
|
|
185
181
|
```ts
|
|
186
182
|
// Configure the default for all requests:
|
|
187
183
|
const modernTreasury = new ModernTreasury({
|
|
188
|
-
timeout: 20 * 1000, // 20 seconds (default is
|
|
184
|
+
timeout: 20 * 1000, // 20 seconds (default is 1 minute)
|
|
189
185
|
organizationId: 'my-organization-ID',
|
|
190
186
|
});
|
|
191
187
|
|
|
@@ -230,6 +226,30 @@ while (page.hasNextPage()) {
|
|
|
230
226
|
}
|
|
231
227
|
```
|
|
232
228
|
|
|
229
|
+
## Advanced Usage
|
|
230
|
+
|
|
231
|
+
### Accessing raw Response data (e.g., headers)
|
|
232
|
+
|
|
233
|
+
The "raw" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.
|
|
234
|
+
|
|
235
|
+
You can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.
|
|
236
|
+
|
|
237
|
+
```ts
|
|
238
|
+
const modernTreasury = new ModernTreasury();
|
|
239
|
+
|
|
240
|
+
const response = await modernTreasury.externalAccounts
|
|
241
|
+
.create({ counterparty_id: '9eba513a-53fd-4d6d-ad52-ccce122ab92a', name: 'my bank' })
|
|
242
|
+
.asResponse();
|
|
243
|
+
console.log(response.headers.get('X-My-Header'));
|
|
244
|
+
console.log(response.statusText); // access the underlying Response object
|
|
245
|
+
|
|
246
|
+
const { data: externalAccounts, response: raw } = await modernTreasury.externalAccounts
|
|
247
|
+
.create({ counterparty_id: '9eba513a-53fd-4d6d-ad52-ccce122ab92a', name: 'my bank' })
|
|
248
|
+
.withResponse();
|
|
249
|
+
console.log(raw.headers.get('X-My-Header'));
|
|
250
|
+
console.log(externalAccounts.id);
|
|
251
|
+
```
|
|
252
|
+
|
|
233
253
|
## Configuring an HTTP(S) Agent (e.g., for proxies)
|
|
234
254
|
|
|
235
255
|
By default, this library uses a stable agent for all http/https requests to reuse TCP connections, eliminating many TCP & TLS handshakes and shaving around 100ms off most requests.
|
|
@@ -254,11 +274,15 @@ await modernTreasury.externalAccounts.list({
|
|
|
254
274
|
})
|
|
255
275
|
```
|
|
256
276
|
|
|
257
|
-
##
|
|
277
|
+
## Semantic Versioning
|
|
278
|
+
|
|
279
|
+
This package generally attempts to follow [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
|
|
280
|
+
|
|
281
|
+
1. Changes that only affect static types, without breaking runtime behavior.
|
|
282
|
+
2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals)_.
|
|
283
|
+
3. Changes that we do not expect to impact the vast majority of users in practice.
|
|
258
284
|
|
|
259
|
-
|
|
260
|
-
and subject to change without a major semver bump;
|
|
261
|
-
please reach out if you rely on any undocumented behavior.
|
|
285
|
+
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
|
|
262
286
|
|
|
263
287
|
We are keen for your feedback; please open an [issue](https://www.github.com/Modern-Treasury/modern-treasury-node/issues) with questions, bugs, or suggestions.
|
|
264
288
|
|
|
@@ -267,7 +291,9 @@ We are keen for your feedback; please open an [issue](https://www.github.com/Mod
|
|
|
267
291
|
The following runtimes are supported:
|
|
268
292
|
|
|
269
293
|
- Node.js 16 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.
|
|
270
|
-
- Deno v1.28.0 or higher
|
|
271
|
-
|
|
294
|
+
- Deno v1.28.0 or higher, using `import ModernTreasury from "npm:modern-treasury"`.
|
|
295
|
+
Deno Deploy is not yet supported.
|
|
296
|
+
- Cloudflare Workers.
|
|
297
|
+
- Vercel Edge Runtime.
|
|
272
298
|
|
|
273
299
|
If you are interested in other runtime environments, please open or upvote an issue on GitHub.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Disclaimer: modules in _shims aren't intended to be imported by SDK users.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* >>> Confused? <<<
|
|
7
|
+
*
|
|
8
|
+
* If you're getting errors from these types, try adding "lib": ["DOM"]
|
|
9
|
+
* to your tsconfig.json, or otherwise configure the appropriate builtin
|
|
10
|
+
* `ReadableStream` type for your environment.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
type _ReadableStream<R = any> = unknown extends ReadableStream ? never : ReadableStream<R>;
|
|
15
|
+
declare const _ReadableStream: {
|
|
16
|
+
prototype: _ReadableStream;
|
|
17
|
+
new (
|
|
18
|
+
underlyingSource: _UnderlyingByteSource,
|
|
19
|
+
strategy?: { highWaterMark?: number },
|
|
20
|
+
): _ReadableStream<Uint8Array>;
|
|
21
|
+
new <R = any>(
|
|
22
|
+
underlyingSource: _UnderlyingDefaultSource<R>,
|
|
23
|
+
strategy?: _QueuingStrategy<R>,
|
|
24
|
+
): _ReadableStream<R>;
|
|
25
|
+
new <R = any>(underlyingSource?: _UnderlyingSource<R>, strategy?: _QueuingStrategy<R>): _ReadableStream<R>;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
type _UnderlyingSource<R = any> = unknown extends UnderlyingSource ? never : UnderlyingSource<R>;
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
type _UnderlyingByteSource = unknown extends UnderlyingByteSource ? never : UnderlyingByteSource;
|
|
32
|
+
type _UnderlyingDefaultSource<R = any> =
|
|
33
|
+
// @ts-ignore
|
|
34
|
+
unknown extends UnderlyingDefaultSource ? never : UnderlyingDefaultSource<R>;
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
type _QueuingStrategy<R = any> = unknown extends QueuingStrategy ? never : QueuingStrategy<R>;
|
|
37
|
+
|
|
38
|
+
export { _ReadableStream as ReadableStream };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReadableStream.node.d.ts","sourceRoot":"","sources":["../src/_shims/ReadableStream.node.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
|
+
exports.ReadableStream = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Disclaimer: modules in _shims aren't intended to be imported by SDK users.
|
|
6
|
+
*/
|
|
7
|
+
const web_streams_polyfill_1 = require('web-streams-polyfill');
|
|
8
|
+
Object.defineProperty(exports, 'ReadableStream', {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () {
|
|
11
|
+
return web_streams_polyfill_1.ReadableStream;
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=ReadableStream.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReadableStream.node.js","sourceRoot":"","sources":["../src/_shims/ReadableStream.node.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,+DAAsD;AAE7C,+FAFA,qCAAc,OAEA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReadableStream.node.mjs","sourceRoot":"","sources":["../src/_shims/ReadableStream.node.ts"],"names":[],"mappings":"OAGO,EAAE,cAAc,EAAE,MAAM,sBAAsB;AAErD,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
package/_shims/fetch.d.ts
CHANGED
|
@@ -26,6 +26,8 @@ type _Response = unknown extends Response ? never : Response;
|
|
|
26
26
|
// @ts-ignore
|
|
27
27
|
type _ResponseInit = unknown extends ResponseInit ? never : ResponseInit;
|
|
28
28
|
// @ts-ignore
|
|
29
|
+
type _ResponseType = unknown extends ResponseType ? never : ResponseType;
|
|
30
|
+
// @ts-ignore
|
|
29
31
|
type _BodyInit = unknown extends BodyInit ? never : BodyInit;
|
|
30
32
|
// @ts-ignore
|
|
31
33
|
type _Headers = unknown extends Headers ? never : Headers;
|
|
@@ -49,4 +51,9 @@ declare const _Headers: {
|
|
|
49
51
|
export const isPolyfilled = false;
|
|
50
52
|
|
|
51
53
|
export { _fetch as fetch, _Request as Request, _Response as Response, _Headers as Headers };
|
|
52
|
-
export type {
|
|
54
|
+
export type {
|
|
55
|
+
_RequestInit as RequestInit,
|
|
56
|
+
_RequestInfo as RequestInfo,
|
|
57
|
+
_ResponseType as ResponseType,
|
|
58
|
+
_BodyInit as BodyInit,
|
|
59
|
+
};
|
package/_shims/fetch.js
CHANGED
package/_shims/fetch.node.d.ts
CHANGED
|
@@ -26,6 +26,11 @@ type _RequestInit = unknown extends RequestInit ? nf.RequestInit : RequestInit;
|
|
|
26
26
|
type _Response = unknown extends Response ? nf.Response : Response;
|
|
27
27
|
// @ts-ignore
|
|
28
28
|
type _ResponseInit = unknown extends ResponseInit ? nf.ResponseInit : ResponseInit;
|
|
29
|
+
type _ResponseType =
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
unknown extends ResponseType ? 'basic' | 'cors' | 'default' | 'error' | 'opaque' | 'opaqueredirect'
|
|
32
|
+
: // @ts-ignore
|
|
33
|
+
ResponseType;
|
|
29
34
|
// @ts-ignore
|
|
30
35
|
type _BodyInit = unknown extends BodyInit ? nf.BodyInit : BodyInit;
|
|
31
36
|
// @ts-ignore
|
|
@@ -50,4 +55,9 @@ declare const _Headers: {
|
|
|
50
55
|
export const isPolyfilled = false;
|
|
51
56
|
|
|
52
57
|
export { _fetch as fetch, _Request as Request, _Response as Response, _Headers as Headers };
|
|
53
|
-
export type {
|
|
58
|
+
export type {
|
|
59
|
+
_RequestInit as RequestInit,
|
|
60
|
+
_RequestInfo as RequestInfo,
|
|
61
|
+
_ResponseType as ResponseType,
|
|
62
|
+
_BodyInit as BodyInit,
|
|
63
|
+
};
|
package/core.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as qs from 'qs';
|
|
2
1
|
import { APIError } from './error.js';
|
|
3
2
|
import type { Readable } from 'modern-treasury/_shims/node-readable';
|
|
4
3
|
import { type Agent } from 'modern-treasury/_shims/agent';
|
|
5
4
|
import { type RequestInfo, type RequestInit, type Response } from 'modern-treasury/_shims/fetch';
|
|
5
|
+
export { type Response };
|
|
6
6
|
export {
|
|
7
7
|
maybeMultipartFormRequestOptions,
|
|
8
8
|
multipartFormRequestOptions,
|
|
@@ -10,6 +10,53 @@ export {
|
|
|
10
10
|
type Uploadable,
|
|
11
11
|
} from './uploads.js';
|
|
12
12
|
export type Fetch = (url: RequestInfo, init?: RequestInit) => Promise<Response>;
|
|
13
|
+
type PromiseOrValue<T> = T | Promise<T>;
|
|
14
|
+
type APIResponseProps = {
|
|
15
|
+
response: Response;
|
|
16
|
+
options: FinalRequestOptions;
|
|
17
|
+
controller: AbortController;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* A subclass of `Promise` providing additional helper methods
|
|
21
|
+
* for interacting with the SDK.
|
|
22
|
+
*/
|
|
23
|
+
export declare class APIPromise<T> extends Promise<T> {
|
|
24
|
+
private responsePromise;
|
|
25
|
+
private parseResponse;
|
|
26
|
+
private parsedPromise;
|
|
27
|
+
constructor(
|
|
28
|
+
responsePromise: Promise<APIResponseProps>,
|
|
29
|
+
parseResponse?: (props: APIResponseProps) => PromiseOrValue<T>,
|
|
30
|
+
);
|
|
31
|
+
_thenUnwrap<U>(transform: (data: T) => U): APIPromise<U>;
|
|
32
|
+
/**
|
|
33
|
+
* Gets the raw `Response` instance instead of parsing the response
|
|
34
|
+
* data.
|
|
35
|
+
*
|
|
36
|
+
* If you want to parse the response body but still get the `Response`
|
|
37
|
+
* instance, you can use {@link withResponse()}.
|
|
38
|
+
*/
|
|
39
|
+
asResponse(): Promise<Response>;
|
|
40
|
+
/**
|
|
41
|
+
* Gets the parsed response data and the raw `Response` instance.
|
|
42
|
+
*
|
|
43
|
+
* If you just want to get the raw `Response` instance without parsing it,
|
|
44
|
+
* you can use {@link asResponse()}.
|
|
45
|
+
*/
|
|
46
|
+
withResponse(): Promise<{
|
|
47
|
+
data: T;
|
|
48
|
+
response: Response;
|
|
49
|
+
}>;
|
|
50
|
+
private parse;
|
|
51
|
+
then<TResult1 = T, TResult2 = never>(
|
|
52
|
+
onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null,
|
|
53
|
+
onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null,
|
|
54
|
+
): Promise<TResult1 | TResult2>;
|
|
55
|
+
catch<TResult = never>(
|
|
56
|
+
onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null,
|
|
57
|
+
): Promise<T | TResult>;
|
|
58
|
+
finally(onfinally?: (() => void) | undefined | null): Promise<T>;
|
|
59
|
+
}
|
|
13
60
|
export declare abstract class APIClient {
|
|
14
61
|
baseURL: string;
|
|
15
62
|
maxRetries: number;
|
|
@@ -20,7 +67,7 @@ export declare abstract class APIClient {
|
|
|
20
67
|
constructor({
|
|
21
68
|
baseURL,
|
|
22
69
|
maxRetries,
|
|
23
|
-
timeout, //
|
|
70
|
+
timeout, // 1 minute
|
|
24
71
|
httpAgent,
|
|
25
72
|
fetch: overridenFetch,
|
|
26
73
|
}: {
|
|
@@ -45,26 +92,18 @@ export declare abstract class APIClient {
|
|
|
45
92
|
* Override this to add your own headers validation:
|
|
46
93
|
*/
|
|
47
94
|
protected validateHeaders(headers: Headers, customHeaders: Headers): void;
|
|
48
|
-
/**
|
|
49
|
-
* Override this to add your own qs.stringify options, for example:
|
|
50
|
-
*
|
|
51
|
-
* {
|
|
52
|
-
* ...super.qsOptions(),
|
|
53
|
-
* strictNullHandling: true,
|
|
54
|
-
* }
|
|
55
|
-
*/
|
|
56
|
-
protected qsOptions(): qs.IStringifyOptions | undefined;
|
|
57
95
|
protected defaultIdempotencyKey(): string;
|
|
58
|
-
get<Req extends {}, Rsp>(path: string, opts?: RequestOptions<Req
|
|
59
|
-
post<Req extends {}, Rsp>(path: string, opts?: RequestOptions<Req
|
|
60
|
-
patch<Req extends {}, Rsp>(path: string, opts?: RequestOptions<Req
|
|
61
|
-
put<Req extends {}, Rsp>(path: string, opts?: RequestOptions<Req
|
|
62
|
-
delete<Req extends {}, Rsp>(path: string, opts?: RequestOptions<Req
|
|
96
|
+
get<Req extends {}, Rsp>(path: string, opts?: PromiseOrValue<RequestOptions<Req>>): APIPromise<Rsp>;
|
|
97
|
+
post<Req extends {}, Rsp>(path: string, opts?: PromiseOrValue<RequestOptions<Req>>): APIPromise<Rsp>;
|
|
98
|
+
patch<Req extends {}, Rsp>(path: string, opts?: PromiseOrValue<RequestOptions<Req>>): APIPromise<Rsp>;
|
|
99
|
+
put<Req extends {}, Rsp>(path: string, opts?: PromiseOrValue<RequestOptions<Req>>): APIPromise<Rsp>;
|
|
100
|
+
delete<Req extends {}, Rsp>(path: string, opts?: PromiseOrValue<RequestOptions<Req>>): APIPromise<Rsp>;
|
|
101
|
+
private methodRequest;
|
|
63
102
|
getAPIList<Item, PageClass extends AbstractPage<Item> = AbstractPage<Item>>(
|
|
64
103
|
path: string,
|
|
65
104
|
Page: new (...args: any[]) => PageClass,
|
|
66
105
|
opts?: RequestOptions<any>,
|
|
67
|
-
): PagePromise<PageClass>;
|
|
106
|
+
): PagePromise<PageClass, Item>;
|
|
68
107
|
private calculateContentLength;
|
|
69
108
|
buildRequest<Req extends {}>(
|
|
70
109
|
options: FinalRequestOptions<Req>,
|
|
@@ -94,14 +133,16 @@ export declare abstract class APIClient {
|
|
|
94
133
|
headers: Headers | undefined,
|
|
95
134
|
): APIError;
|
|
96
135
|
request<Req extends {}, Rsp>(
|
|
97
|
-
options: FinalRequestOptions<Req
|
|
98
|
-
|
|
99
|
-
):
|
|
136
|
+
options: PromiseOrValue<FinalRequestOptions<Req>>,
|
|
137
|
+
remainingRetries?: number | null,
|
|
138
|
+
): APIPromise<Rsp>;
|
|
139
|
+
private makeRequest;
|
|
100
140
|
requestAPIList<Item = unknown, PageClass extends AbstractPage<Item> = AbstractPage<Item>>(
|
|
101
141
|
Page: new (...args: ConstructorParameters<typeof AbstractPage>) => PageClass,
|
|
102
142
|
options: FinalRequestOptions,
|
|
103
|
-
): PagePromise<PageClass>;
|
|
143
|
+
): PagePromise<PageClass, Item>;
|
|
104
144
|
buildURL<Req>(path: string, query: Req | undefined): string;
|
|
145
|
+
protected stringifyQuery(query: Record<string, unknown>): string;
|
|
105
146
|
fetchWithTimeout(
|
|
106
147
|
url: RequestInfo,
|
|
107
148
|
init: RequestInit | undefined,
|
|
@@ -113,7 +154,6 @@ export declare abstract class APIClient {
|
|
|
113
154
|
private retryRequest;
|
|
114
155
|
private calculateRetryTimeoutSeconds;
|
|
115
156
|
private getUserAgent;
|
|
116
|
-
private debug;
|
|
117
157
|
}
|
|
118
158
|
export declare class APIResource {
|
|
119
159
|
protected client: APIClient;
|
|
@@ -135,7 +175,9 @@ export type PageInfo =
|
|
|
135
175
|
export declare abstract class AbstractPage<Item> implements AsyncIterable<Item> {
|
|
136
176
|
#private;
|
|
137
177
|
protected options: FinalRequestOptions;
|
|
138
|
-
|
|
178
|
+
protected response: Response;
|
|
179
|
+
protected body: unknown;
|
|
180
|
+
constructor(client: APIClient, response: Response, body: unknown, options: FinalRequestOptions);
|
|
139
181
|
/**
|
|
140
182
|
* @deprecated Use nextPageInfo instead
|
|
141
183
|
*/
|
|
@@ -147,27 +189,27 @@ export declare abstract class AbstractPage<Item> implements AsyncIterable<Item>
|
|
|
147
189
|
iterPages(): AsyncGenerator<AbstractPage<Item>, void, unknown>;
|
|
148
190
|
[Symbol.asyncIterator](): AsyncGenerator<Awaited<Item>, void, unknown>;
|
|
149
191
|
}
|
|
192
|
+
/**
|
|
193
|
+
* This subclass of Promise will resolve to an instantiated Page once the request completes.
|
|
194
|
+
*
|
|
195
|
+
* It also implements AsyncIterable to allow auto-paginating iteration on an unawaited list call, eg:
|
|
196
|
+
*
|
|
197
|
+
* for await (const item of client.items.list()) {
|
|
198
|
+
* console.log(item)
|
|
199
|
+
* }
|
|
200
|
+
*/
|
|
150
201
|
export declare class PagePromise<
|
|
151
202
|
PageClass extends AbstractPage<Item>,
|
|
152
203
|
Item = ReturnType<PageClass['getPaginatedItems']>[number],
|
|
153
204
|
>
|
|
154
|
-
extends
|
|
205
|
+
extends APIPromise<PageClass>
|
|
155
206
|
implements AsyncIterable<Item>
|
|
156
207
|
{
|
|
157
|
-
/**
|
|
158
|
-
* This subclass of Promise will resolve to an instantiated Page once the request completes.
|
|
159
|
-
*/
|
|
160
208
|
constructor(
|
|
161
209
|
client: APIClient,
|
|
162
|
-
|
|
163
|
-
options: FinalRequestOptions,
|
|
210
|
+
request: Promise<APIResponseProps>,
|
|
164
211
|
Page: new (...args: ConstructorParameters<typeof AbstractPage>) => PageClass,
|
|
165
212
|
);
|
|
166
|
-
/**
|
|
167
|
-
* Enable subclassing Promise.
|
|
168
|
-
* Ref: https://stackoverflow.com/a/60328122
|
|
169
|
-
*/
|
|
170
|
-
static get [Symbol.species](): PromiseConstructor;
|
|
171
213
|
/**
|
|
172
214
|
* Allow auto-paginating iteration on an unawaited list call, eg:
|
|
173
215
|
*
|
|
@@ -209,18 +251,25 @@ export type FinalRequestOptions<Req extends {} = Record<string, unknown> | Reada
|
|
|
209
251
|
method: HTTPMethod;
|
|
210
252
|
path: string;
|
|
211
253
|
};
|
|
212
|
-
export type APIResponse<T> = T & {
|
|
213
|
-
/** @deprecated - we plan to add a different way to access raw response information shortly. */
|
|
214
|
-
responseHeaders: Headers;
|
|
215
|
-
};
|
|
216
254
|
export declare const safeJSON: (text: string) => any;
|
|
217
255
|
export declare const castToError: (err: any) => Error;
|
|
218
256
|
export declare const ensurePresent: <T>(value: T | null | undefined) => T;
|
|
257
|
+
/**
|
|
258
|
+
* Read an environment variable.
|
|
259
|
+
*
|
|
260
|
+
* Will return undefined if the environment variable doesn't exist or cannot be accessed.
|
|
261
|
+
*/
|
|
262
|
+
export declare const readEnv: (env: string) => string | undefined;
|
|
219
263
|
export declare const coerceInteger: (value: unknown) => number;
|
|
220
264
|
export declare const coerceFloat: (value: unknown) => number;
|
|
221
265
|
export declare const coerceBoolean: (value: unknown) => boolean;
|
|
266
|
+
export declare const maybeCoerceInteger: (value: unknown) => number | undefined;
|
|
267
|
+
export declare const maybeCoerceFloat: (value: unknown) => number | undefined;
|
|
268
|
+
export declare const maybeCoerceBoolean: (value: unknown) => boolean | undefined;
|
|
222
269
|
export declare function isEmptyObj(obj: Object | null | undefined): boolean;
|
|
223
270
|
export declare function hasOwn(obj: Object, key: string): boolean;
|
|
271
|
+
export declare function debug(action: string, ...args: any[]): void;
|
|
272
|
+
export declare const isRunningInBrowser: () => boolean;
|
|
224
273
|
export interface HeadersProtocol {
|
|
225
274
|
get: (header: string) => string | null | undefined;
|
|
226
275
|
}
|
package/core.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["src/core.ts"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["src/core.ts"],"names":[],"mappings":";;;;AACA,OAAO,EAAE,QAAQ,EAAoE,MAAM,SAAS,CAAC;AACrG,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAmB,KAAK,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACd,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,KAAK,QAAQ,EAAE,CAAC;AAEzB,OAAO,EACL,gCAAgC,EAChC,2BAA2B,EAC3B,UAAU,EACV,KAAK,UAAU,GAChB,MAAM,WAAW,CAAC;AAInB,MAAM,MAAM,KAAK,GAAG,CAAC,GAAG,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CA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