modern-treasury 2.0.0 → 2.2.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.
Files changed (172) hide show
  1. package/CHANGELOG.md +135 -0
  2. package/LICENSE +7 -0
  3. package/README.md +273 -0
  4. package/_shims/fetch.js +1 -1
  5. package/_shims/formdata.node.d.ts +1 -0
  6. package/core.d.ts +19 -11
  7. package/core.d.ts.map +1 -1
  8. package/core.js +122 -72
  9. package/core.js.map +1 -1
  10. package/core.mjs +112 -32
  11. package/core.mjs.map +1 -1
  12. package/error.d.ts +5 -0
  13. package/error.d.ts.map +1 -1
  14. package/error.js +20 -3
  15. package/error.js.map +1 -1
  16. package/error.mjs +18 -3
  17. package/error.mjs.map +1 -1
  18. package/index.d.mts +17 -8
  19. package/index.d.ts +17 -8
  20. package/index.d.ts.map +1 -1
  21. package/index.js +36 -20
  22. package/index.js.map +1 -1
  23. package/index.mjs +35 -20
  24. package/index.mjs.map +1 -1
  25. package/package.json +5 -5
  26. package/resources/account-collection-flows.d.ts +11 -11
  27. package/resources/account-collection-flows.d.ts.map +1 -1
  28. package/resources/account-collection-flows.js +4 -4
  29. package/resources/account-collection-flows.mjs +2 -2
  30. package/resources/account-details.d.ts.map +1 -1
  31. package/resources/connections.d.ts.map +1 -1
  32. package/resources/counterparties.d.ts.map +1 -1
  33. package/resources/documents.d.ts +2 -5
  34. package/resources/documents.d.ts.map +1 -1
  35. package/resources/documents.js +1 -7
  36. package/resources/documents.js.map +1 -1
  37. package/resources/documents.mjs +1 -7
  38. package/resources/documents.mjs.map +1 -1
  39. package/resources/events.d.ts.map +1 -1
  40. package/resources/expected-payments.d.ts.map +1 -1
  41. package/resources/external-accounts.d.ts.map +1 -1
  42. package/resources/incoming-payment-details.d.ts.map +1 -1
  43. package/resources/index.d.ts +2 -2
  44. package/resources/index.js +3 -3
  45. package/resources/index.mjs +1 -1
  46. package/resources/internal-accounts/balance-reports.d.ts.map +1 -1
  47. package/resources/internal-accounts/internal-accounts.d.ts +5 -4
  48. package/resources/internal-accounts/internal-accounts.d.ts.map +1 -1
  49. package/resources/internal-accounts/internal-accounts.js.map +1 -1
  50. package/resources/internal-accounts/internal-accounts.mjs.map +1 -1
  51. package/resources/invoices/invoices.d.ts +102 -5
  52. package/resources/invoices/invoices.d.ts.map +1 -1
  53. package/resources/invoices/invoices.js.map +1 -1
  54. package/resources/invoices/invoices.mjs.map +1 -1
  55. package/resources/invoices/line-items.d.ts +41 -0
  56. package/resources/invoices/line-items.d.ts.map +1 -1
  57. package/resources/invoices/line-items.js.map +1 -1
  58. package/resources/invoices/line-items.mjs.map +1 -1
  59. package/resources/ledger-account-categories.d.ts.map +1 -1
  60. package/resources/ledger-account-payouts.d.ts.map +1 -1
  61. package/resources/ledger-account-statements.d.ts.map +1 -1
  62. package/resources/ledger-accounts.d.ts +23 -16
  63. package/resources/ledger-accounts.d.ts.map +1 -1
  64. package/resources/ledger-accounts.js.map +1 -1
  65. package/resources/ledger-accounts.mjs.map +1 -1
  66. package/resources/ledger-entries.d.ts.map +1 -1
  67. package/resources/ledger-event-handlers.d.ts +4 -0
  68. package/resources/ledger-event-handlers.d.ts.map +1 -1
  69. package/resources/ledger-event-handlers.js.map +1 -1
  70. package/resources/ledger-event-handlers.mjs.map +1 -1
  71. package/resources/ledger-transactions/ledger-transactions.d.ts +8 -3
  72. package/resources/ledger-transactions/ledger-transactions.d.ts.map +1 -1
  73. package/resources/ledger-transactions/ledger-transactions.js.map +1 -1
  74. package/resources/ledger-transactions/ledger-transactions.mjs.map +1 -1
  75. package/resources/ledger-transactions/versions.d.ts.map +1 -1
  76. package/resources/ledgerable-events.d.ts +0 -16
  77. package/resources/ledgerable-events.d.ts.map +1 -1
  78. package/resources/ledgerable-events.js.map +1 -1
  79. package/resources/ledgerable-events.mjs.map +1 -1
  80. package/resources/ledgers.d.ts.map +1 -1
  81. package/resources/line-items.d.ts.map +1 -1
  82. package/resources/paper-items.d.ts.map +1 -1
  83. package/resources/payment-flows.d.ts.map +1 -1
  84. package/resources/payment-orders/payment-orders.d.ts +32 -6
  85. package/resources/payment-orders/payment-orders.d.ts.map +1 -1
  86. package/resources/payment-orders/payment-orders.js.map +1 -1
  87. package/resources/payment-orders/payment-orders.mjs.map +1 -1
  88. package/resources/payment-orders/reversals.d.ts +8 -3
  89. package/resources/payment-orders/reversals.d.ts.map +1 -1
  90. package/resources/payment-orders/reversals.js.map +1 -1
  91. package/resources/payment-orders/reversals.mjs.map +1 -1
  92. package/resources/payment-references.d.ts.map +1 -1
  93. package/resources/returns.d.ts.map +1 -1
  94. package/resources/routing-details.d.ts.map +1 -1
  95. package/resources/top-level.d.ts.map +1 -1
  96. package/resources/transactions/line-items.d.ts.map +1 -1
  97. package/resources/transactions/transactions.d.ts.map +1 -1
  98. package/resources/transactions/transactions.js.map +1 -1
  99. package/resources/validations.d.ts.map +1 -1
  100. package/resources/virtual-accounts.d.ts +59 -3
  101. package/resources/virtual-accounts.d.ts.map +1 -1
  102. package/resources/virtual-accounts.js +1 -4
  103. package/resources/virtual-accounts.js.map +1 -1
  104. package/resources/virtual-accounts.mjs +1 -4
  105. package/resources/virtual-accounts.mjs.map +1 -1
  106. package/src/_shims/fetch.deno.ts +23 -0
  107. package/src/_shims/fetch.js +1 -1
  108. package/src/_shims/fileFromPath.node.ts +1 -1
  109. package/src/_shims/fileFromPath.ts +1 -1
  110. package/src/_shims/formdata.deno.ts +16 -0
  111. package/src/_shims/formdata.node.d.ts +1 -0
  112. package/src/_shims/getMultipartRequestOptions.node.ts +1 -1
  113. package/src/_shims/getMultipartRequestOptions.ts +1 -1
  114. package/src/core.ts +123 -34
  115. package/src/error.ts +19 -1
  116. package/src/index.ts +47 -28
  117. package/src/resources/account-collection-flows.ts +19 -19
  118. package/src/resources/account-details.ts +6 -6
  119. package/src/resources/connections.ts +5 -5
  120. package/src/resources/counterparties.ts +8 -8
  121. package/src/resources/documents.ts +9 -18
  122. package/src/resources/events.ts +5 -5
  123. package/src/resources/expected-payments.ts +6 -6
  124. package/src/resources/external-accounts.ts +8 -8
  125. package/src/resources/incoming-payment-details.ts +7 -7
  126. package/src/resources/index.ts +2 -2
  127. package/src/resources/internal-accounts/balance-reports.ts +6 -6
  128. package/src/resources/internal-accounts/internal-accounts.ts +15 -14
  129. package/src/resources/invoices/invoices.ts +121 -13
  130. package/src/resources/invoices/line-items.ts +51 -6
  131. package/src/resources/ledger-account-categories.ts +5 -5
  132. package/src/resources/ledger-account-payouts.ts +5 -5
  133. package/src/resources/ledger-account-statements.ts +3 -3
  134. package/src/resources/ledger-accounts.ts +29 -21
  135. package/src/resources/ledger-entries.ts +5 -5
  136. package/src/resources/ledger-event-handlers.ts +10 -5
  137. package/src/resources/ledger-transactions/ledger-transactions.ts +15 -9
  138. package/src/resources/ledger-transactions/versions.ts +5 -5
  139. package/src/resources/ledgerable-events.ts +3 -23
  140. package/src/resources/ledgers.ts +5 -5
  141. package/src/resources/line-items.ts +5 -5
  142. package/src/resources/paper-items.ts +6 -6
  143. package/src/resources/payment-flows.ts +5 -5
  144. package/src/resources/payment-orders/payment-orders.ts +45 -15
  145. package/src/resources/payment-orders/reversals.ts +14 -8
  146. package/src/resources/payment-references.ts +5 -5
  147. package/src/resources/returns.ts +6 -6
  148. package/src/resources/routing-details.ts +6 -6
  149. package/src/resources/top-level.ts +1 -1
  150. package/src/resources/transactions/line-items.ts +5 -5
  151. package/src/resources/transactions/transactions.ts +6 -6
  152. package/src/resources/validations.ts +3 -3
  153. package/src/resources/virtual-accounts.ts +72 -14
  154. package/src/resources/webhooks.ts +3 -3
  155. package/src/uploads.ts +16 -14
  156. package/src/version.ts +1 -1
  157. package/uploads.d.ts +6 -5
  158. package/uploads.d.ts.map +1 -1
  159. package/uploads.js +4 -3
  160. package/uploads.js.map +1 -1
  161. package/uploads.mjs +4 -3
  162. package/uploads.mjs.map +1 -1
  163. package/version.d.ts +1 -1
  164. package/version.js +1 -1
  165. package/version.mjs +1 -1
  166. package/src/streaming.ts +0 -204
  167. package/streaming.d.ts +0 -14
  168. package/streaming.d.ts.map +0 -1
  169. package/streaming.js +0 -155
  170. package/streaming.js.map +0 -1
  171. package/streaming.mjs +0 -151
  172. package/streaming.mjs.map +0 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,135 @@
1
+ # Changelog
2
+
3
+ ## [2.2.0](https://github.com/Modern-Treasury/modern-treasury-node/compare/v2.1.0...v3.0.0) (2023-08-01)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * **types:** rename account connection flow to account collection flow ([#164](https://github.com/Modern-Treasury/modern-treasury-node/issues/164))
9
+ * **api:** update parameters for virtual account create request ([#157](https://github.com/Modern-Treasury/modern-treasury-node/issues/157))
10
+
11
+ ### Features
12
+
13
+ * **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))
14
+ * **api:** updates ([#166](https://github.com/Modern-Treasury/modern-treasury-node/issues/166)) ([40a3e9e](https://github.com/Modern-Treasury/modern-treasury-node/commit/40a3e9e734d709269fc28319e64fe72d6fb85d61))
15
+ * **api:** updates ([#171](https://github.com/Modern-Treasury/modern-treasury-node/issues/171)) ([c47cae2](https://github.com/Modern-Treasury/modern-treasury-node/commit/c47cae26e89f158823963f826176635cc073ad9d))
16
+ * **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))
17
+ * **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))
18
+ * **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))
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * **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))
24
+ * **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))
25
+ * **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))
26
+ * **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))
27
+ * 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))
28
+ * 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))
29
+ * 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))
30
+ * 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))
31
+
32
+
33
+ ### Refactors
34
+
35
+ * 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))
36
+ * **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))
37
+ * 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))
38
+
39
+
40
+ ### Chores
41
+
42
+ * **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))
43
+ * **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))
44
+ * **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))
45
+ * **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))
46
+
47
+ ## [2.1.0](https://github.com/Modern-Treasury/modern-treasury-node/compare/v2.0.0...v2.1.0) (2023-07-13)
48
+
49
+
50
+ ### Features
51
+
52
+ * **client:** add support for passing a `signal` request option ([#148](https://github.com/Modern-Treasury/modern-treasury-node/issues/148)) ([33236e6](https://github.com/Modern-Treasury/modern-treasury-node/commit/33236e6ff2e4f02882fc6717bccee5e51867f0e5))
53
+ * **client:** improve timeout handling to reuse agent ([#140](https://github.com/Modern-Treasury/modern-treasury-node/issues/140)) ([afa8b25](https://github.com/Modern-Treasury/modern-treasury-node/commit/afa8b257c3175b22bf647efe88139638f7fa92d4))
54
+ * **client:** support passing a custom `fetch` function ([#144](https://github.com/Modern-Treasury/modern-treasury-node/issues/144)) ([d32ecbc](https://github.com/Modern-Treasury/modern-treasury-node/commit/d32ecbc8b8ae4288c61c5dd10e236f1883bf21b6))
55
+ * improvements to ecosystem compatibility ([#151](https://github.com/Modern-Treasury/modern-treasury-node/issues/151)) ([9a0343e](https://github.com/Modern-Treasury/modern-treasury-node/commit/9a0343ed4d9310337b6e54c3a63deccea65ca2eb))
56
+
57
+
58
+ ### Bug Fixes
59
+
60
+ * **client:** properly handle multi-byte characters in Content-Length ([#145](https://github.com/Modern-Treasury/modern-treasury-node/issues/145)) ([6adf4d8](https://github.com/Modern-Treasury/modern-treasury-node/commit/6adf4d877326e5f57a29101bf05df74fded4bddf))
61
+ * fix errors in package source files when users go to definition in VSCode ([#139](https://github.com/Modern-Treasury/modern-treasury-node/issues/139)) ([148fefe](https://github.com/Modern-Treasury/modern-treasury-node/commit/148fefee55106352d2ce236515ed1e645392b410))
62
+ * include README.md, LICENSE and CHANGELOG.md in published package ([#136](https://github.com/Modern-Treasury/modern-treasury-node/issues/136)) ([e372a1b](https://github.com/Modern-Treasury/modern-treasury-node/commit/e372a1b207fff03bf89f69f14b81f2c065a66c98))
63
+ * **streaming:** do not abort successfully completed streams ([#147](https://github.com/Modern-Treasury/modern-treasury-node/issues/147)) ([5f7f44e](https://github.com/Modern-Treasury/modern-treasury-node/commit/5f7f44e456a3569225f138de56937eaccb25a225))
64
+ * **streaming:** fix response body streaming in non-Chrome environments ([#142](https://github.com/Modern-Treasury/modern-treasury-node/issues/142)) ([cb86104](https://github.com/Modern-Treasury/modern-treasury-node/commit/cb8610457076d6b0e6203f00d086f827da626279))
65
+ * **streaming:** polyfill ReadableStream async iterator and text decoding ([#135](https://github.com/Modern-Treasury/modern-treasury-node/issues/135)) ([1da7d67](https://github.com/Modern-Treasury/modern-treasury-node/commit/1da7d67eb8ca03b32a77f3dfe687e24c9640f06b))
66
+ * support `PromiseLike` input to `toFile` ([#138](https://github.com/Modern-Treasury/modern-treasury-node/issues/138)) ([f157769](https://github.com/Modern-Treasury/modern-treasury-node/commit/f157769ae96eb269697d3491e9bddfbf19377b54))
67
+
68
+
69
+ ### Refactors
70
+
71
+ * improve streaming implementation ([#137](https://github.com/Modern-Treasury/modern-treasury-node/issues/137)) ([6716dd2](https://github.com/Modern-Treasury/modern-treasury-node/commit/6716dd2f9e6cba2696f851d6b977cadd5787281f))
72
+ * **streaming:** make response body streaming polyfill more spec-compliant ([#143](https://github.com/Modern-Treasury/modern-treasury-node/issues/143)) ([9f62d25](https://github.com/Modern-Treasury/modern-treasury-node/commit/9f62d2571bb1c15b844f080af9d1c2485cbba4cd))
73
+
74
+
75
+ ### Documentation
76
+
77
+ * **readme:** improvements to formatting code snippets ([#149](https://github.com/Modern-Treasury/modern-treasury-node/issues/149)) ([699a630](https://github.com/Modern-Treasury/modern-treasury-node/commit/699a630ca581d0dee599509b972fc44e58d1c9b1))
78
+ * **readme:** minor improvements ([#146](https://github.com/Modern-Treasury/modern-treasury-node/issues/146)) ([09c7bb5](https://github.com/Modern-Treasury/modern-treasury-node/commit/09c7bb514f4894336604cd6e408e0506c1c17e26))
79
+
80
+
81
+ ### Chores
82
+
83
+ * **internal:** fix release please version config ([#134](https://github.com/Modern-Treasury/modern-treasury-node/issues/134)) ([1cc2a12](https://github.com/Modern-Treasury/modern-treasury-node/commit/1cc2a1231e6818f7012f2aec653dc9e28d769620))
84
+ * **internal:** remove unused streaming implementation ([#150](https://github.com/Modern-Treasury/modern-treasury-node/issues/150)) ([3665f89](https://github.com/Modern-Treasury/modern-treasury-node/commit/3665f89da6595ab76b4a57721a646f75c1b1e7d0))
85
+
86
+ ## [2.0.0](https://github.com/Modern-Treasury/modern-treasury-node/compare/v1.7.0...v2.0.0) (2023-07-07)
87
+
88
+
89
+ ### ⚠ BREAKING CHANGES
90
+
91
+ * import issue with ESM ([#125](https://github.com/Modern-Treasury/modern-treasury-node/issues/125))
92
+ * **api:** move some positional params to named params + updates ([#114](https://github.com/Modern-Treasury/modern-treasury-node/issues/114))
93
+ * **types:** singularize array item types ([#113](https://github.com/Modern-Treasury/modern-treasury-node/issues/113))
94
+
95
+ ### Features
96
+
97
+ * **client:** add support for `defaultQuery` option ([#123](https://github.com/Modern-Treasury/modern-treasury-node/issues/123)) ([11b4a99](https://github.com/Modern-Treasury/modern-treasury-node/commit/11b4a996d71f3408ca0abeedba00ae0256cf8b41))
98
+ * support ESM and web platform runtimes; easier file uploads ([#115](https://github.com/Modern-Treasury/modern-treasury-node/issues/115)) ([3731360](https://github.com/Modern-Treasury/modern-treasury-node/commit/37313602c902d97e711b665ae13e3c9cd99b8b67))
99
+ * **types:** export nested types through the root client export ([#112](https://github.com/Modern-Treasury/modern-treasury-node/issues/112)) ([7c397ec](https://github.com/Modern-Treasury/modern-treasury-node/commit/7c397ecca2980a4ad27c64aeab56d6bab443bd48))
100
+
101
+
102
+ ### Bug Fixes
103
+
104
+ * import issue with ESM ([#125](https://github.com/Modern-Treasury/modern-treasury-node/issues/125)) ([fd9dd7f](https://github.com/Modern-Treasury/modern-treasury-node/commit/fd9dd7fd5f1a8bddbc413a860e39ab1e3575421e))
105
+ * **types:** remove incorrect duplicated `Promise` from some return types ([#119](https://github.com/Modern-Treasury/modern-treasury-node/issues/119)) ([46c1cfd](https://github.com/Modern-Treasury/modern-treasury-node/commit/46c1cfdd2f6d3054196d294ca1089277bd67a1ba))
106
+
107
+
108
+ ### Styles
109
+
110
+ * minor reordering of types and properties ([#116](https://github.com/Modern-Treasury/modern-treasury-node/issues/116)) ([80e1369](https://github.com/Modern-Treasury/modern-treasury-node/commit/80e13698da0bee33c8b9faffd28503334e725eff))
111
+
112
+
113
+ ### Refactors
114
+
115
+ * **api:** move some positional params to named params + updates ([#114](https://github.com/Modern-Treasury/modern-treasury-node/issues/114)) ([dd9e4af](https://github.com/Modern-Treasury/modern-treasury-node/commit/dd9e4af80440725bc11e9e009e1775d2f81e1d88))
116
+ * mark `.responseHeaders` and `.response` as deprecated ([#128](https://github.com/Modern-Treasury/modern-treasury-node/issues/128)) ([08503ba](https://github.com/Modern-Treasury/modern-treasury-node/commit/08503ba167a477b9e257547673c007fb83db01fe))
117
+ * move to src directory, improve ecosystem compatibility ([#122](https://github.com/Modern-Treasury/modern-treasury-node/issues/122)) ([3fddc74](https://github.com/Modern-Treasury/modern-treasury-node/commit/3fddc743cb10ecc842214932368f586c3540a75d))
118
+ * **types:** singularize array item types ([#113](https://github.com/Modern-Treasury/modern-treasury-node/issues/113)) ([22e8dc7](https://github.com/Modern-Treasury/modern-treasury-node/commit/22e8dc72138abd4b5bc95fb9d4892e84d9658868))
119
+
120
+
121
+ ### Chores
122
+
123
+ * **internal:** fix tsc usage ([#127](https://github.com/Modern-Treasury/modern-treasury-node/issues/127)) ([3f2b143](https://github.com/Modern-Treasury/modern-treasury-node/commit/3f2b143e18f1b0a5d95b74aae7d3a018ae2f1682))
124
+ * set `noEmit: true` in `tsconfig.json`, since it's for typechecking only ([#129](https://github.com/Modern-Treasury/modern-treasury-node/issues/129)) ([74e846d](https://github.com/Modern-Treasury/modern-treasury-node/commit/74e846d399b88ea0e002f20828378b2807cd34a9))
125
+ * speed up build script slightly ([#117](https://github.com/Modern-Treasury/modern-treasury-node/issues/117)) ([b5a2349](https://github.com/Modern-Treasury/modern-treasury-node/commit/b5a234978a1279b20fd9646e88f921b3dbeb010f))
126
+ * sync latest changes ([#109](https://github.com/Modern-Treasury/modern-treasury-node/issues/109)) ([5e5ddc5](https://github.com/Modern-Treasury/modern-treasury-node/commit/5e5ddc5b9ff9fdf8558f49494279e433467e758b))
127
+
128
+
129
+ ### Documentation
130
+
131
+ * **api.md:** add context to types exported in a different resource ([#130](https://github.com/Modern-Treasury/modern-treasury-node/issues/130)) ([b409bd3](https://github.com/Modern-Treasury/modern-treasury-node/commit/b409bd3065b23ac3709f83f6feeef1653c946290))
132
+ * **api.md:** fix links not referencing `src` directory ([#124](https://github.com/Modern-Treasury/modern-treasury-node/issues/124)) ([5c29ed7](https://github.com/Modern-Treasury/modern-treasury-node/commit/5c29ed7505d376efb5d5621cca0040e04452d0ec))
133
+ * **api.md:** minor restructuring ([#120](https://github.com/Modern-Treasury/modern-treasury-node/issues/120)) ([e769fa6](https://github.com/Modern-Treasury/modern-treasury-node/commit/e769fa6b380b27a70476590610237cea1231c8f6))
134
+ * **client:** improve documentation for client options ([#126](https://github.com/Modern-Treasury/modern-treasury-node/issues/126)) ([4fc3b3c](https://github.com/Modern-Treasury/modern-treasury-node/commit/4fc3b3c3b7958b0dbbb2cb7fed6930f21b6cb8f9))
135
+ * rearrange sections in api.md ([#118](https://github.com/Modern-Treasury/modern-treasury-node/issues/118)) ([49ec081](https://github.com/Modern-Treasury/modern-treasury-node/commit/49ec0811327849d5f76ed0abf62f9d6a9005ace3))
package/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright 2023 Modern Treasury
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,273 @@
1
+ # Modern Treasury Node API Library
2
+
3
+ [![NPM version](https://img.shields.io/npm/v/modern-treasury.svg)](https://npmjs.org/package/modern-treasury)
4
+
5
+ The Modern Treasury Node library provides convenient access to the Modern Treasury REST API from applications written in server-side JavaScript.
6
+ It includes TypeScript definitions for all request params and response fields.
7
+
8
+ ## Documentation
9
+
10
+ The API documentation can be found [here](https://docs.moderntreasury.com).
11
+
12
+ ## Installation
13
+
14
+ ```sh
15
+ npm install --save modern-treasury
16
+ # or
17
+ yarn add modern-treasury
18
+ ```
19
+
20
+ ## Usage
21
+
22
+ ```js
23
+ import ModernTreasury from 'modern-treasury';
24
+
25
+ const modernTreasury = new ModernTreasury({
26
+ apiKey: 'my api key', // defaults to process.env["MODERN_TREASURY_API_KEY"]
27
+ organizationId: 'my-organization-ID',
28
+ });
29
+
30
+ async function main() {
31
+ const externalAccount = await modernTreasury.externalAccounts.create({
32
+ counterparty_id: '9eba513a-53fd-4d6d-ad52-ccce122ab92a',
33
+ name: 'my bank',
34
+ });
35
+
36
+ console.log(externalAccount.id);
37
+ }
38
+
39
+ main();
40
+ ```
41
+
42
+ ### Usage with TypeScript
43
+
44
+ Importing, instantiating, and interacting with the library are the same as above.
45
+ If you like, you may reference our types directly:
46
+
47
+ ```ts
48
+ import ModernTreasury from 'modern-treasury';
49
+
50
+ const modernTreasury = new ModernTreasury({
51
+ apiKey: 'my api key', // defaults to process.env["MODERN_TREASURY_API_KEY"]
52
+ organizationId: 'my-organization-ID',
53
+ });
54
+
55
+ async function main() {
56
+ const params: ModernTreasury.ExternalAccountCreateParams = {
57
+ counterparty_id: '9eba513a-53fd-4d6d-ad52-ccce122ab92a',
58
+ name: 'my bank',
59
+ };
60
+ const externalAccount: ModernTreasury.ExternalAccount = await modernTreasury.externalAccounts.create(
61
+ params,
62
+ );
63
+ }
64
+
65
+ main();
66
+ ```
67
+
68
+ Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
69
+
70
+ ## File Uploads
71
+
72
+ Request parameters that correspond to file uploads can be passed in many different forms:
73
+
74
+ - `File` (or an object with the same structure)
75
+ - a `fetch` `Response` (or an object with the same structure)
76
+ - an `fs.ReadStream`
77
+ - the return value of our `toFile` helper
78
+
79
+ ```ts
80
+ import fs from 'fs';
81
+ import fetch from 'node-fetch';
82
+ import ModernTreasury, { toFile } from 'modern-treasury';
83
+
84
+ const modernTreasury = new ModernTreasury();
85
+
86
+ // If you have access to Node `fs` we recommend using `fs.createReadStream()`:
87
+ await modernTreasury.documents.create({
88
+ documentable_id: '24c6b7a3-02...',
89
+ documentable_type: 'counterparties',
90
+ file: fs.createReadStream('my/file.txt'),
91
+ });
92
+
93
+ // Or if you have the web `File` API you can pass a `File` instance:
94
+ await modernTreasury.documents.create({
95
+ documentable_id: '24c6b7a3-02...',
96
+ documentable_type: 'counterparties',
97
+ file: new File(['my bytes'], 'file.txt'),
98
+ });
99
+
100
+ // You can also pass a `fetch` `Response`:
101
+ await modernTreasury.documents.create({
102
+ documentable_id: '24c6b7a3-02...',
103
+ documentable_type: 'counterparties',
104
+ file: await fetch('https://somesite/file.txt'),
105
+ });
106
+
107
+ // Finally, if none of the above are convenient, you can use our `toFile` helper:
108
+ await modernTreasury.documents.create({
109
+ documentable_id: '24c6b7a3-02...',
110
+ documentable_type: 'counterparties',
111
+ file: await toFile(Buffer.from('my bytes'), 'file.txt'),
112
+ });
113
+ await modernTreasury.documents.create({
114
+ documentable_id: '24c6b7a3-02...',
115
+ documentable_type: 'counterparties',
116
+ file: await toFile(new Uint8Array([0, 1, 2]), 'file.txt'),
117
+ });
118
+ ```
119
+
120
+ ## Handling errors
121
+
122
+ When the library is unable to connect to the API,
123
+ or if the API returns a non-success status code (i.e., 4xx or 5xx response),
124
+ a subclass of `APIError` will be thrown:
125
+
126
+ ```ts
127
+ async function main() {
128
+ const externalAccount = await modernTreasury.externalAccounts
129
+ .create({ counterparty_id: 'missing' })
130
+ .catch((err) => {
131
+ if (err instanceof ModernTreasury.APIError) {
132
+ console.log(err.status); // 400
133
+ console.log(err.name); // BadRequestError
134
+
135
+ console.log(err.headers); // {server: 'nginx', ...}
136
+ } else {
137
+ throw err;
138
+ }
139
+ });
140
+ }
141
+
142
+ main();
143
+ ```
144
+
145
+ Error codes are as followed:
146
+
147
+ | Status Code | Error Type |
148
+ | ----------- | -------------------------- |
149
+ | 400 | `BadRequestError` |
150
+ | 401 | `AuthenticationError` |
151
+ | 403 | `PermissionDeniedError` |
152
+ | 404 | `NotFoundError` |
153
+ | 422 | `UnprocessableEntityError` |
154
+ | 429 | `RateLimitError` |
155
+ | >=500 | `InternalServerError` |
156
+ | N/A | `APIConnectionError` |
157
+
158
+ ### Retries
159
+
160
+ Certain errors will be automatically retried 2 times by default, with a short exponential backoff.
161
+ Connection errors (for example, due to a network connectivity problem), 409 Conflict, 429 Rate Limit,
162
+ and >=500 Internal errors will all be retried by default.
163
+
164
+ You can use the `maxRetries` option to configure or disable this:
165
+
166
+ <!-- prettier-ignore -->
167
+ ```js
168
+ // Configure the default for all requests:
169
+ const modernTreasury = new ModernTreasury({
170
+ maxRetries: 0, // default is 2
171
+ organizationId: 'my-organization-ID',
172
+ });
173
+
174
+ // Or, configure per-request:
175
+ await modernTreasury.externalAccounts.list({
176
+ maxRetries: 5,
177
+ });
178
+ ```
179
+
180
+ ### Timeouts
181
+
182
+ Requests time out after 60 seconds by default. You can configure this with a `timeout` option:
183
+
184
+ <!-- prettier-ignore -->
185
+ ```ts
186
+ // Configure the default for all requests:
187
+ const modernTreasury = new ModernTreasury({
188
+ timeout: 20 * 1000, // 20 seconds (default is 60s)
189
+ organizationId: 'my-organization-ID',
190
+ });
191
+
192
+ // Override per-request:
193
+ await modernTreasury.externalAccounts.list({ party_name: 'my bank' }, {
194
+ timeout: 5 * 1000,
195
+ });
196
+ ```
197
+
198
+ On timeout, an `APIConnectionTimeoutError` is thrown.
199
+
200
+ Note that requests which time out will be [retried twice by default](#retries).
201
+
202
+ ## Auto-pagination
203
+
204
+ List methods in the ModernTreasury API are paginated.
205
+ You can use `for await … of` syntax to iterate through items across all pages:
206
+
207
+ ```ts
208
+ async function fetchAllExternalAccounts(params) {
209
+ const allExternalAccounts = [];
210
+ // Automatically fetches more pages as needed.
211
+ for await (const externalAccount of modernTreasury.externalAccounts.list()) {
212
+ allExternalAccounts.push(externalAccount);
213
+ }
214
+ return allExternalAccounts;
215
+ }
216
+ ```
217
+
218
+ Alternatively, you can make request a single page at a time:
219
+
220
+ ```ts
221
+ let page = await modernTreasury.externalAccounts.list();
222
+ for (const externalAccount of page.items) {
223
+ console.log(externalAccount);
224
+ }
225
+
226
+ // Convenience methods are provided for manually paginating:
227
+ while (page.hasNextPage()) {
228
+ page = page.getNextPage();
229
+ // ...
230
+ }
231
+ ```
232
+
233
+ ## Configuring an HTTP(S) Agent (e.g., for proxies)
234
+
235
+ 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.
236
+
237
+ If you would like to disable or customize this behavior, for example to use the API behind a proxy, you can pass an `httpAgent` which is used for all requests (be they http or https), for example:
238
+
239
+ <!-- prettier-ignore -->
240
+ ```ts
241
+ import http from 'http';
242
+ import HttpsProxyAgent from 'https-proxy-agent';
243
+
244
+ // Configure the default for all requests:
245
+ const modernTreasury = new ModernTreasury({
246
+ httpAgent: new HttpsProxyAgent(process.env.PROXY_URL),
247
+ organizationId: 'my-organization-ID',
248
+ });
249
+
250
+ // Override per-request:
251
+ await modernTreasury.externalAccounts.list({
252
+ baseURL: 'http://localhost:8080/test-api',
253
+ httpAgent: new http.Agent({ keepAlive: false }),
254
+ })
255
+ ```
256
+
257
+ ## Status
258
+
259
+ This package is in beta. Its internals and interfaces are not stable
260
+ and subject to change without a major semver bump;
261
+ please reach out if you rely on any undocumented behavior.
262
+
263
+ 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
+
265
+ ## Requirements
266
+
267
+ The following runtimes are supported:
268
+
269
+ - Node.js 16 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.
270
+ - Deno v1.28.0 or higher (experimental).
271
+ Use `import ModernTreasury from "npm:modern-treasury"`.
272
+
273
+ If you are interested in other runtime environments, please open or upvote an issue on GitHub.
package/_shims/fetch.js CHANGED
@@ -10,4 +10,4 @@ exports.Request = Request;
10
10
  exports.Response = Response;
11
11
  exports.Headers = Headers;
12
12
 
13
- exports.isPolyfilled = true;
13
+ exports.isPolyfilled = false;
@@ -10,6 +10,7 @@ type EndingType = 'native' | 'transparent';
10
10
 
11
11
  export interface BlobPropertyBag {
12
12
  endings?: EndingType;
13
+ /** MIME type, e.g., "text/plain" */
13
14
  type?: string;
14
15
  }
15
16
 
package/core.d.ts CHANGED
@@ -1,4 +1,3 @@
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';
@@ -9,7 +8,7 @@ export {
9
8
  createForm,
10
9
  type Uploadable,
11
10
  } from './uploads.js';
12
- type Fetch = (url: RequestInfo, init?: RequestInit) => Promise<Response>;
11
+ export type Fetch = (url: RequestInfo, init?: RequestInit) => Promise<Response>;
13
12
  export declare abstract class APIClient {
14
13
  baseURL: string;
15
14
  maxRetries: number;
@@ -22,11 +21,13 @@ export declare abstract class APIClient {
22
21
  maxRetries,
23
22
  timeout, // 60s
24
23
  httpAgent,
24
+ fetch: overridenFetch,
25
25
  }: {
26
26
  baseURL: string;
27
27
  maxRetries?: number | undefined;
28
28
  timeout: number | undefined;
29
29
  httpAgent: Agent | undefined;
30
+ fetch: Fetch | undefined;
30
31
  });
31
32
  protected authHeaders(): Headers;
32
33
  /**
@@ -43,15 +44,6 @@ export declare abstract class APIClient {
43
44
  * Override this to add your own headers validation:
44
45
  */
45
46
  protected validateHeaders(headers: Headers, customHeaders: Headers): void;
46
- /**
47
- * Override this to add your own qs.stringify options, for example:
48
- *
49
- * {
50
- * ...super.qsOptions(),
51
- * strictNullHandling: true,
52
- * }
53
- */
54
- protected qsOptions(): qs.IStringifyOptions | undefined;
55
47
  protected defaultIdempotencyKey(): string;
56
48
  get<Req extends {}, Rsp>(path: string, opts?: RequestOptions<Req>): Promise<Rsp>;
57
49
  post<Req extends {}, Rsp>(path: string, opts?: RequestOptions<Req>): Promise<Rsp>;
@@ -63,6 +55,7 @@ export declare abstract class APIClient {
63
55
  Page: new (...args: any[]) => PageClass,
64
56
  opts?: RequestOptions<any>,
65
57
  ): PagePromise<PageClass>;
58
+ private calculateContentLength;
66
59
  buildRequest<Req extends {}>(
67
60
  options: FinalRequestOptions<Req>,
68
61
  ): {
@@ -99,6 +92,7 @@ export declare abstract class APIClient {
99
92
  options: FinalRequestOptions,
100
93
  ): PagePromise<PageClass>;
101
94
  buildURL<Req>(path: string, query: Req | undefined): string;
95
+ protected stringifyQuery(query: Record<string, unknown>): string;
102
96
  fetchWithTimeout(
103
97
  url: RequestInfo,
104
98
  init: RequestInit | undefined,
@@ -196,6 +190,7 @@ export type RequestOptions<Req extends {} = Record<string, unknown> | Readable>
196
190
  stream?: boolean | undefined;
197
191
  timeout?: number;
198
192
  httpAgent?: Agent;
193
+ signal?: AbortSignal | undefined | null;
199
194
  idempotencyKey?: string;
200
195
  };
201
196
  export declare const isRequestOptions: (
@@ -212,9 +207,18 @@ export type APIResponse<T> = T & {
212
207
  export declare const safeJSON: (text: string) => any;
213
208
  export declare const castToError: (err: any) => Error;
214
209
  export declare const ensurePresent: <T>(value: T | null | undefined) => T;
210
+ /**
211
+ * Read an environment variable.
212
+ *
213
+ * Will return an empty string if the environment variable doesn't exist or cannot be accessed.
214
+ */
215
+ export declare const readEnv: (env: string) => string | undefined;
215
216
  export declare const coerceInteger: (value: unknown) => number;
216
217
  export declare const coerceFloat: (value: unknown) => number;
217
218
  export declare const coerceBoolean: (value: unknown) => boolean;
219
+ export declare const maybeCoerceInteger: (value: unknown) => number | undefined;
220
+ export declare const maybeCoerceFloat: (value: unknown) => number | undefined;
221
+ export declare const maybeCoerceBoolean: (value: unknown) => boolean | undefined;
218
222
  export declare function isEmptyObj(obj: Object | null | undefined): boolean;
219
223
  export declare function hasOwn(obj: Object, key: string): boolean;
220
224
  export interface HeadersProtocol {
@@ -223,4 +227,8 @@ export interface HeadersProtocol {
223
227
  export type HeadersLike = Record<string, string | string[] | undefined> | HeadersProtocol;
224
228
  export declare const isHeadersProtocol: (headers: any) => headers is HeadersProtocol;
225
229
  export declare const getHeader: (headers: HeadersLike, key: string) => string | null | undefined;
230
+ /**
231
+ * Encodes a string to Base64 format.
232
+ */
233
+ export declare const toBase64: (str: string | null | undefined) => string;
226
234
  //# sourceMappingURL=core.d.ts.map
package/core.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["src/core.ts"],"names":[],"mappings":";;;;AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAGzB,OAAO,EAAE,QAAQ,EAAiD,MAAM,SAAS,CAAC;AAClF,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;AAEtC,OAAO,EACL,gCAAgC,EAChC,2BAA2B,EAC3B,UAAU,EACV,KAAK,UAAU,GAChB,MAAM,WAAW,CAAC;AAInB,KAAK,KAAK,GAAG,CAAC,GAAG,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEzE,8BAA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