modern-treasury 2.2.0 → 2.4.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 (373) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/README.md +43 -15
  3. package/_shims/ReadableStream-node.d.ts +6 -0
  4. package/_shims/ReadableStream-node.d.ts.map +1 -0
  5. package/_shims/ReadableStream-node.js +14 -0
  6. package/_shims/ReadableStream-node.js.map +1 -0
  7. package/_shims/ReadableStream-node.mjs +3 -0
  8. package/_shims/ReadableStream-node.mjs.map +1 -0
  9. package/_shims/ReadableStream.d.ts +38 -0
  10. package/_shims/ReadableStream.js +5 -0
  11. package/_shims/ReadableStream.mjs +7 -0
  12. package/_shims/{agent.node.d.ts → agent-node.d.ts} +1 -1
  13. package/_shims/agent-node.d.ts.map +1 -0
  14. package/_shims/{agent.node.js → agent-node.js} +1 -1
  15. package/_shims/{agent.node.js.map → agent-node.js.map} +1 -1
  16. package/_shims/{agent.node.mjs → agent-node.mjs} +1 -1
  17. package/_shims/{agent.node.mjs.map → agent-node.mjs.map} +1 -1
  18. package/_shims/agent.d.ts +1 -1
  19. package/_shims/agent.js +1 -1
  20. package/_shims/agent.mjs +1 -1
  21. package/_shims/{fetch.node.d.ts → fetch-node.d.ts} +12 -1
  22. package/_shims/fetch.d.ts +9 -1
  23. package/_shims/{fileFromPath.node.d.ts → fileFromPath-node.d.ts} +2 -2
  24. package/_shims/{fileFromPath.node.d.ts.map → fileFromPath-node.d.ts.map} +1 -1
  25. package/_shims/{fileFromPath.node.js → fileFromPath-node.js} +1 -1
  26. package/_shims/{fileFromPath.node.js.map → fileFromPath-node.js.map} +1 -1
  27. package/_shims/{fileFromPath.node.mjs → fileFromPath-node.mjs} +1 -1
  28. package/_shims/{fileFromPath.node.mjs.map → fileFromPath-node.mjs.map} +1 -1
  29. package/_shims/fileFromPath.d.ts +2 -2
  30. package/_shims/fileFromPath.d.ts.map +1 -1
  31. package/_shims/fileFromPath.js +1 -1
  32. package/_shims/fileFromPath.mjs +1 -1
  33. package/_shims/form-data.js +17 -0
  34. package/_shims/form-data.mjs +20 -0
  35. package/_shims/{getMultipartRequestOptions.node.d.ts → getMultipartRequestOptions-node.d.ts} +2 -2
  36. package/_shims/getMultipartRequestOptions-node.d.ts.map +1 -0
  37. package/_shims/{getMultipartRequestOptions.node.js → getMultipartRequestOptions-node.js} +1 -1
  38. package/_shims/{getMultipartRequestOptions.node.js.map → getMultipartRequestOptions-node.js.map} +1 -1
  39. package/_shims/{getMultipartRequestOptions.node.mjs → getMultipartRequestOptions-node.mjs} +1 -1
  40. package/_shims/{getMultipartRequestOptions.node.mjs.map → getMultipartRequestOptions-node.mjs.map} +1 -1
  41. package/_shims/getMultipartRequestOptions.d.ts +1 -1
  42. package/_shims/getMultipartRequestOptions.d.ts.map +1 -1
  43. package/_shims/{node-readable.node.d.ts → node-readable-node.d.ts} +1 -1
  44. package/_shims/{node-readable.node.d.ts.map → node-readable-node.d.ts.map} +1 -1
  45. package/_shims/{node-readable.node.js → node-readable-node.js} +1 -1
  46. package/_shims/node-readable-node.js.map +1 -0
  47. package/_shims/{node-readable.node.mjs → node-readable-node.mjs} +1 -1
  48. package/_shims/node-readable-node.mjs.map +1 -0
  49. package/core.d.ts +91 -34
  50. package/core.d.ts.map +1 -1
  51. package/core.js +201 -70
  52. package/core.js.map +1 -1
  53. package/core.mjs +195 -70
  54. package/core.mjs.map +1 -1
  55. package/index.d.mts +19 -7
  56. package/index.d.ts +19 -7
  57. package/index.d.ts.map +1 -1
  58. package/index.js +23 -9
  59. package/index.js.map +1 -1
  60. package/index.mjs +23 -9
  61. package/index.mjs.map +1 -1
  62. package/package.json +32 -9
  63. package/pagination.d.ts +2 -2
  64. package/pagination.d.ts.map +1 -1
  65. package/pagination.js +5 -5
  66. package/pagination.js.map +1 -1
  67. package/pagination.mjs +5 -5
  68. package/pagination.mjs.map +1 -1
  69. package/resources/account-collection-flows.d.ts +8 -33
  70. package/resources/account-collection-flows.d.ts.map +1 -1
  71. package/resources/account-collection-flows.js +22 -17
  72. package/resources/account-collection-flows.js.map +1 -1
  73. package/resources/account-collection-flows.mjs +22 -17
  74. package/resources/account-collection-flows.mjs.map +1 -1
  75. package/resources/account-details.d.ts +8 -13
  76. package/resources/account-details.d.ts.map +1 -1
  77. package/resources/account-details.js +10 -4
  78. package/resources/account-details.js.map +1 -1
  79. package/resources/account-details.mjs +10 -4
  80. package/resources/account-details.mjs.map +1 -1
  81. package/resources/connections.d.ts +5 -2
  82. package/resources/connections.d.ts.map +1 -1
  83. package/resources/connections.js +3 -3
  84. package/resources/connections.js.map +1 -1
  85. package/resources/connections.mjs +3 -3
  86. package/resources/connections.mjs.map +1 -1
  87. package/resources/counterparties.d.ts +37 -51
  88. package/resources/counterparties.d.ts.map +1 -1
  89. package/resources/counterparties.js +17 -5
  90. package/resources/counterparties.js.map +1 -1
  91. package/resources/counterparties.mjs +17 -5
  92. package/resources/counterparties.mjs.map +1 -1
  93. package/resources/documents.d.ts +6 -17
  94. package/resources/documents.d.ts.map +1 -1
  95. package/resources/documents.js +13 -7
  96. package/resources/documents.js.map +1 -1
  97. package/resources/documents.mjs +13 -7
  98. package/resources/documents.mjs.map +1 -1
  99. package/resources/events.d.ts +3 -3
  100. package/resources/events.d.ts.map +1 -1
  101. package/resources/events.js +3 -3
  102. package/resources/events.mjs +3 -3
  103. package/resources/expected-payments.d.ts +30 -39
  104. package/resources/expected-payments.d.ts.map +1 -1
  105. package/resources/expected-payments.js +10 -4
  106. package/resources/expected-payments.js.map +1 -1
  107. package/resources/expected-payments.mjs +10 -4
  108. package/resources/expected-payments.mjs.map +1 -1
  109. package/resources/external-accounts.d.ts +27 -61
  110. package/resources/external-accounts.d.ts.map +1 -1
  111. package/resources/external-accounts.js +24 -6
  112. package/resources/external-accounts.js.map +1 -1
  113. package/resources/external-accounts.mjs +24 -6
  114. package/resources/external-accounts.mjs.map +1 -1
  115. package/resources/incoming-payment-details.d.ts +20 -21
  116. package/resources/incoming-payment-details.d.ts.map +1 -1
  117. package/resources/incoming-payment-details.js +10 -4
  118. package/resources/incoming-payment-details.js.map +1 -1
  119. package/resources/incoming-payment-details.mjs +10 -4
  120. package/resources/incoming-payment-details.mjs.map +1 -1
  121. package/resources/index.d.ts +0 -3
  122. package/resources/index.d.ts.map +1 -1
  123. package/resources/index.js.map +1 -1
  124. package/resources/index.mjs.map +1 -1
  125. package/resources/internal-accounts/balance-reports.d.ts +6 -3
  126. package/resources/internal-accounts/balance-reports.d.ts.map +1 -1
  127. package/resources/internal-accounts/balance-reports.js +3 -3
  128. package/resources/internal-accounts/balance-reports.js.map +1 -1
  129. package/resources/internal-accounts/balance-reports.mjs +3 -3
  130. package/resources/internal-accounts/balance-reports.mjs.map +1 -1
  131. package/resources/internal-accounts/internal-accounts.d.ts +16 -21
  132. package/resources/internal-accounts/internal-accounts.d.ts.map +1 -1
  133. package/resources/internal-accounts/internal-accounts.js +10 -4
  134. package/resources/internal-accounts/internal-accounts.js.map +1 -1
  135. package/resources/internal-accounts/internal-accounts.mjs +10 -4
  136. package/resources/internal-accounts/internal-accounts.mjs.map +1 -1
  137. package/resources/invoices/invoices.d.ts +67 -42
  138. package/resources/invoices/invoices.d.ts.map +1 -1
  139. package/resources/invoices/invoices.js +10 -4
  140. package/resources/invoices/invoices.js.map +1 -1
  141. package/resources/invoices/invoices.mjs +10 -4
  142. package/resources/invoices/invoices.mjs.map +1 -1
  143. package/resources/invoices/line-items.d.ts +32 -185
  144. package/resources/invoices/line-items.d.ts.map +1 -1
  145. package/resources/invoices/line-items.js +10 -4
  146. package/resources/invoices/line-items.js.map +1 -1
  147. package/resources/invoices/line-items.mjs +10 -4
  148. package/resources/invoices/line-items.mjs.map +1 -1
  149. package/resources/ledger-account-categories.d.ts +47 -87
  150. package/resources/ledger-account-categories.d.ts.map +1 -1
  151. package/resources/ledger-account-categories.js +21 -17
  152. package/resources/ledger-account-categories.js.map +1 -1
  153. package/resources/ledger-account-categories.mjs +21 -17
  154. package/resources/ledger-account-categories.mjs.map +1 -1
  155. package/resources/ledger-account-payouts.d.ts +33 -22
  156. package/resources/ledger-account-payouts.d.ts.map +1 -1
  157. package/resources/ledger-account-payouts.js +10 -4
  158. package/resources/ledger-account-payouts.js.map +1 -1
  159. package/resources/ledger-account-payouts.mjs +10 -4
  160. package/resources/ledger-account-payouts.mjs.map +1 -1
  161. package/resources/ledger-account-statements.d.ts +11 -16
  162. package/resources/ledger-account-statements.d.ts.map +1 -1
  163. package/resources/ledger-account-statements.js +8 -2
  164. package/resources/ledger-account-statements.js.map +1 -1
  165. package/resources/ledger-account-statements.mjs +8 -2
  166. package/resources/ledger-account-statements.mjs.map +1 -1
  167. package/resources/ledger-accounts.d.ts +30 -30
  168. package/resources/ledger-accounts.d.ts.map +1 -1
  169. package/resources/ledger-accounts.js +10 -4
  170. package/resources/ledger-accounts.js.map +1 -1
  171. package/resources/ledger-accounts.mjs +10 -4
  172. package/resources/ledger-accounts.mjs.map +1 -1
  173. package/resources/ledger-entries.d.ts +20 -6
  174. package/resources/ledger-entries.d.ts.map +1 -1
  175. package/resources/ledger-entries.js +3 -3
  176. package/resources/ledger-entries.js.map +1 -1
  177. package/resources/ledger-entries.mjs +3 -3
  178. package/resources/ledger-entries.mjs.map +1 -1
  179. package/resources/ledger-event-handlers.d.ts +12 -24
  180. package/resources/ledger-event-handlers.d.ts.map +1 -1
  181. package/resources/ledger-event-handlers.js +10 -4
  182. package/resources/ledger-event-handlers.js.map +1 -1
  183. package/resources/ledger-event-handlers.mjs +10 -4
  184. package/resources/ledger-event-handlers.mjs.map +1 -1
  185. package/resources/ledger-transactions/ledger-transactions.d.ts +48 -37
  186. package/resources/ledger-transactions/ledger-transactions.d.ts.map +1 -1
  187. package/resources/ledger-transactions/ledger-transactions.js +13 -7
  188. package/resources/ledger-transactions/ledger-transactions.js.map +1 -1
  189. package/resources/ledger-transactions/ledger-transactions.mjs +13 -7
  190. package/resources/ledger-transactions/ledger-transactions.mjs.map +1 -1
  191. package/resources/ledger-transactions/versions.d.ts +4 -2
  192. package/resources/ledger-transactions/versions.d.ts.map +1 -1
  193. package/resources/ledger-transactions/versions.js +3 -3
  194. package/resources/ledger-transactions/versions.js.map +1 -1
  195. package/resources/ledger-transactions/versions.mjs +3 -3
  196. package/resources/ledger-transactions/versions.mjs.map +1 -1
  197. package/resources/ledgerable-events.d.ts +13 -18
  198. package/resources/ledgerable-events.d.ts.map +1 -1
  199. package/resources/ledgerable-events.js +8 -2
  200. package/resources/ledgerable-events.js.map +1 -1
  201. package/resources/ledgerable-events.mjs +8 -2
  202. package/resources/ledgerable-events.mjs.map +1 -1
  203. package/resources/ledgers.d.ts +16 -20
  204. package/resources/ledgers.d.ts.map +1 -1
  205. package/resources/ledgers.js +10 -4
  206. package/resources/ledgers.js.map +1 -1
  207. package/resources/ledgers.mjs +10 -4
  208. package/resources/ledgers.mjs.map +1 -1
  209. package/resources/line-items.d.ts +5 -5
  210. package/resources/line-items.d.ts.map +1 -1
  211. package/resources/line-items.js +3 -3
  212. package/resources/line-items.mjs +3 -3
  213. package/resources/paper-items.d.ts +6 -3
  214. package/resources/paper-items.d.ts.map +1 -1
  215. package/resources/paper-items.js +3 -3
  216. package/resources/paper-items.js.map +1 -1
  217. package/resources/paper-items.mjs +3 -3
  218. package/resources/paper-items.mjs.map +1 -1
  219. package/resources/payment-flows.d.ts +18 -42
  220. package/resources/payment-flows.d.ts.map +1 -1
  221. package/resources/payment-flows.js +22 -17
  222. package/resources/payment-flows.js.map +1 -1
  223. package/resources/payment-flows.mjs +22 -17
  224. package/resources/payment-flows.mjs.map +1 -1
  225. package/resources/payment-orders/payment-orders.d.ts +172 -191
  226. package/resources/payment-orders/payment-orders.d.ts.map +1 -1
  227. package/resources/payment-orders/payment-orders.js +21 -11
  228. package/resources/payment-orders/payment-orders.js.map +1 -1
  229. package/resources/payment-orders/payment-orders.mjs +21 -11
  230. package/resources/payment-orders/payment-orders.mjs.map +1 -1
  231. package/resources/payment-orders/reversals.d.ts +21 -22
  232. package/resources/payment-orders/reversals.d.ts.map +1 -1
  233. package/resources/payment-orders/reversals.js +10 -4
  234. package/resources/payment-orders/reversals.js.map +1 -1
  235. package/resources/payment-orders/reversals.mjs +10 -4
  236. package/resources/payment-orders/reversals.mjs.map +1 -1
  237. package/resources/payment-references.d.ts +3 -3
  238. package/resources/payment-references.d.ts.map +1 -1
  239. package/resources/payment-references.js +3 -3
  240. package/resources/payment-references.mjs +3 -3
  241. package/resources/returns.d.ts +16 -19
  242. package/resources/returns.d.ts.map +1 -1
  243. package/resources/returns.js +10 -4
  244. package/resources/returns.js.map +1 -1
  245. package/resources/returns.mjs +10 -4
  246. package/resources/returns.mjs.map +1 -1
  247. package/resources/routing-details.d.ts +9 -15
  248. package/resources/routing-details.d.ts.map +1 -1
  249. package/resources/routing-details.js +10 -4
  250. package/resources/routing-details.js.map +1 -1
  251. package/resources/routing-details.mjs +10 -4
  252. package/resources/routing-details.mjs.map +1 -1
  253. package/resources/transactions/line-items.d.ts +5 -2
  254. package/resources/transactions/line-items.d.ts.map +1 -1
  255. package/resources/transactions/line-items.js +3 -3
  256. package/resources/transactions/line-items.js.map +1 -1
  257. package/resources/transactions/line-items.mjs +3 -3
  258. package/resources/transactions/line-items.mjs.map +1 -1
  259. package/resources/transactions/transactions.d.ts +8 -5
  260. package/resources/transactions/transactions.d.ts.map +1 -1
  261. package/resources/transactions/transactions.js +3 -3
  262. package/resources/transactions/transactions.js.map +1 -1
  263. package/resources/transactions/transactions.mjs +3 -3
  264. package/resources/transactions/transactions.mjs.map +1 -1
  265. package/resources/validations.d.ts +1 -1
  266. package/resources/validations.d.ts.map +1 -1
  267. package/resources/validations.js +1 -1
  268. package/resources/validations.mjs +1 -1
  269. package/resources/virtual-accounts.d.ts +19 -28
  270. package/resources/virtual-accounts.d.ts.map +1 -1
  271. package/resources/virtual-accounts.js +10 -4
  272. package/resources/virtual-accounts.js.map +1 -1
  273. package/resources/virtual-accounts.mjs +10 -4
  274. package/resources/virtual-accounts.mjs.map +1 -1
  275. package/resources/webhooks.js +2 -2
  276. package/resources/webhooks.mjs +2 -2
  277. package/src/_shims/ReadableStream-node.ts +6 -0
  278. package/src/_shims/ReadableStream.d.ts +38 -0
  279. package/src/_shims/ReadableStream.js +5 -0
  280. package/src/_shims/ReadableStream.mjs +7 -0
  281. package/src/_shims/agent.ts +1 -1
  282. package/src/_shims/{fetch.node.d.ts → fetch-node.d.ts} +20 -9
  283. package/src/_shims/fetch.d.ts +18 -10
  284. package/src/_shims/{fileFromPath.node.ts → fileFromPath-node.ts} +1 -1
  285. package/src/_shims/fileFromPath.ts +2 -2
  286. package/src/_shims/{formdata.node.d.ts → form-data-node.d.ts} +4 -4
  287. package/src/_shims/{formdata.d.ts → form-data.d.ts} +4 -4
  288. package/src/_shims/form-data.js +17 -0
  289. package/src/_shims/form-data.mjs +20 -0
  290. package/src/_shims/{getMultipartRequestOptions.node.ts → getMultipartRequestOptions-node.ts} +3 -3
  291. package/src/_shims/getMultipartRequestOptions.ts +3 -3
  292. package/src/core.ts +275 -97
  293. package/src/error.ts +1 -1
  294. package/src/index.ts +31 -18
  295. package/src/pagination.ts +6 -6
  296. package/src/resource.ts +1 -1
  297. package/src/resources/account-collection-flows.ts +29 -57
  298. package/src/resources/account-details.ts +22 -22
  299. package/src/resources/connections.ts +11 -8
  300. package/src/resources/counterparties.ts +61 -65
  301. package/src/resources/documents.ts +21 -30
  302. package/src/resources/events.ts +9 -9
  303. package/src/resources/expected-payments.ts +45 -49
  304. package/src/resources/external-accounts.ts +59 -78
  305. package/src/resources/incoming-payment-details.ts +38 -33
  306. package/src/resources/index.ts +39 -36
  307. package/src/resources/internal-accounts/balance-reports.ts +13 -10
  308. package/src/resources/internal-accounts/index.ts +2 -2
  309. package/src/resources/internal-accounts/internal-accounts.ts +35 -35
  310. package/src/resources/invoices/index.ts +2 -2
  311. package/src/resources/invoices/invoices.ts +91 -54
  312. package/src/resources/invoices/line-items.ts +46 -228
  313. package/src/resources/ledger-account-categories.ts +67 -111
  314. package/src/resources/ledger-account-payouts.ts +49 -30
  315. package/src/resources/ledger-account-statements.ts +21 -21
  316. package/src/resources/ledger-accounts.ts +46 -40
  317. package/src/resources/ledger-entries.ts +29 -13
  318. package/src/resources/ledger-event-handlers.ts +25 -35
  319. package/src/resources/ledger-transactions/index.ts +2 -2
  320. package/src/resources/ledger-transactions/ledger-transactions.ts +73 -53
  321. package/src/resources/ledger-transactions/versions.ts +10 -8
  322. package/src/resources/ledgerable-events.ts +23 -23
  323. package/src/resources/ledgers.ts +31 -29
  324. package/src/resources/line-items.ts +12 -12
  325. package/src/resources/paper-items.ts +13 -10
  326. package/src/resources/payment-flows.ts +39 -66
  327. package/src/resources/payment-orders/index.ts +2 -2
  328. package/src/resources/payment-orders/payment-orders.ts +204 -216
  329. package/src/resources/payment-orders/reversals.ts +36 -31
  330. package/src/resources/payment-references.ts +9 -9
  331. package/src/resources/returns.ts +30 -28
  332. package/src/resources/routing-details.ts +23 -24
  333. package/src/resources/top-level.ts +1 -1
  334. package/src/resources/transactions/index.ts +7 -2
  335. package/src/resources/transactions/line-items.ts +11 -8
  336. package/src/resources/transactions/transactions.ts +17 -14
  337. package/src/resources/validations.ts +4 -4
  338. package/src/resources/virtual-accounts.ts +35 -39
  339. package/src/resources/webhooks.ts +3 -3
  340. package/src/tsconfig.json +11 -0
  341. package/src/uploads.ts +6 -6
  342. package/src/version.ts +1 -1
  343. package/uploads.d.ts +1 -1
  344. package/uploads.d.ts.map +1 -1
  345. package/uploads.js +7 -7
  346. package/uploads.js.map +1 -1
  347. package/uploads.mjs +4 -4
  348. package/uploads.mjs.map +1 -1
  349. package/version.d.ts +1 -1
  350. package/version.js +1 -1
  351. package/version.mjs +1 -1
  352. package/_shims/agent.node.d.ts.map +0 -1
  353. package/_shims/formdata.js +0 -9
  354. package/_shims/formdata.mjs +0 -11
  355. package/_shims/getMultipartRequestOptions.node.d.ts.map +0 -1
  356. package/_shims/node-readable.node.js.map +0 -1
  357. package/_shims/node-readable.node.mjs.map +0 -1
  358. package/src/_shims/fetch.deno.ts +0 -23
  359. package/src/_shims/formdata.deno.ts +0 -16
  360. package/src/_shims/formdata.js +0 -9
  361. package/src/_shims/formdata.mjs +0 -11
  362. /package/_shims/{fetch.node.js → fetch-node.js} +0 -0
  363. /package/_shims/{fetch.node.mjs → fetch-node.mjs} +0 -0
  364. /package/_shims/{formdata.node.d.ts → form-data-node.d.ts} +0 -0
  365. /package/_shims/{formdata.node.js → form-data-node.js} +0 -0
  366. /package/_shims/{formdata.node.mjs → form-data-node.mjs} +0 -0
  367. /package/_shims/{formdata.d.ts → form-data.d.ts} +0 -0
  368. /package/src/_shims/{agent.node.ts → agent-node.ts} +0 -0
  369. /package/src/_shims/{fetch.node.js → fetch-node.js} +0 -0
  370. /package/src/_shims/{fetch.node.mjs → fetch-node.mjs} +0 -0
  371. /package/src/_shims/{formdata.node.js → form-data-node.js} +0 -0
  372. /package/src/_shims/{formdata.node.mjs → form-data-node.mjs} +0 -0
  373. /package/src/_shims/{node-readable.node.ts → node-readable-node.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,80 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.4.0 (2023-09-05)
4
+
5
+ Full Changelog: [v2.3.0...v2.4.0](https://github.com/Modern-Treasury/modern-treasury-node/compare/v2.3.0...v2.4.0)
6
+
7
+ ### Features
8
+
9
+ * **client:** improve compatibility with Bun ([#204](https://github.com/Modern-Treasury/modern-treasury-node/issues/204)) ([1248e3a](https://github.com/Modern-Treasury/modern-treasury-node/commit/1248e3afb21ce1a2cdf1524094f4a2ecd4718c45))
10
+ * **docs:** add documentation to the client constructor ([#203](https://github.com/Modern-Treasury/modern-treasury-node/issues/203)) ([e558d7b](https://github.com/Modern-Treasury/modern-treasury-node/commit/e558d7b0fcaa7cd3be30b224058d56c3b3f4e882))
11
+ * **package:** add Bun export map ([#215](https://github.com/Modern-Treasury/modern-treasury-node/issues/215)) ([e796a08](https://github.com/Modern-Treasury/modern-treasury-node/commit/e796a0801f5b6d18d9b3fc67db290af0e67fbb23))
12
+ * **types:** export RequestOptions type ([#209](https://github.com/Modern-Treasury/modern-treasury-node/issues/209)) ([0b46351](https://github.com/Modern-Treasury/modern-treasury-node/commit/0b463516c8fe941cb66adb56ab9f922e43ffeca8))
13
+ * **types:** remove incorrectly included Idempotency-Key param ([#218](https://github.com/Modern-Treasury/modern-treasury-node/issues/218)) ([905b43e](https://github.com/Modern-Treasury/modern-treasury-node/commit/905b43e16f599be6ec6f542da435ea68ecca5334))
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * **client:** fix TS errors that appear when users Go to Source in VSCode ([#219](https://github.com/Modern-Treasury/modern-treasury-node/issues/219)) ([de2b2a1](https://github.com/Modern-Treasury/modern-treasury-node/commit/de2b2a17f7b5d2ae7c8af4154fca52c371cfa9a2))
19
+ * **client:** fix TypeError when a request gets retried ([#201](https://github.com/Modern-Treasury/modern-treasury-node/issues/201)) ([ad59570](https://github.com/Modern-Treasury/modern-treasury-node/commit/ad59570a2801c4d393b3802decd880e1743f05a7))
20
+ * **client:** handle case where the client is instantiated with a undefined baseURL ([#220](https://github.com/Modern-Treasury/modern-treasury-node/issues/220)) ([894890e](https://github.com/Modern-Treasury/modern-treasury-node/commit/894890e6c584c607092f71eeb9ad31a2fa5e3706))
21
+ * **client:** use explicit file extensions in _shims imports ([#217](https://github.com/Modern-Treasury/modern-treasury-node/issues/217)) ([15df031](https://github.com/Modern-Treasury/modern-treasury-node/commit/15df03142c07c7ab1d2a0d983df67c8fb23bbdeb))
22
+ * **core:** fix navigator check for strange environments ([#207](https://github.com/Modern-Treasury/modern-treasury-node/issues/207)) ([2b6e569](https://github.com/Modern-Treasury/modern-treasury-node/commit/2b6e5695c924f779825de7464c3d9aba821ab266))
23
+ * **types:** improve getNextPage() return type ([#214](https://github.com/Modern-Treasury/modern-treasury-node/issues/214)) ([eb7e51f](https://github.com/Modern-Treasury/modern-treasury-node/commit/eb7e51fbf51ce3771a382cee983f540c089bea18))
24
+
25
+
26
+ ### Chores
27
+
28
+ * **ci:** setup workflows to create releases and release PRs ([#212](https://github.com/Modern-Treasury/modern-treasury-node/issues/212)) ([fb97629](https://github.com/Modern-Treasury/modern-treasury-node/commit/fb9762939152c2752365ac4b044851f07bc69b70))
29
+ * **internal:** add helper method ([#211](https://github.com/Modern-Treasury/modern-treasury-node/issues/211)) ([a9d85e6](https://github.com/Modern-Treasury/modern-treasury-node/commit/a9d85e6edf6cf503b29c51e704514cbd952556fb))
30
+ * **internal:** add missing eslint-plugin-prettier ([#206](https://github.com/Modern-Treasury/modern-treasury-node/issues/206)) ([baa9264](https://github.com/Modern-Treasury/modern-treasury-node/commit/baa926436226ba74cafc24937261e10d853fb0db))
31
+ * **internal:** export HeadersInit type shim ([#210](https://github.com/Modern-Treasury/modern-treasury-node/issues/210)) ([a5e0cfe](https://github.com/Modern-Treasury/modern-treasury-node/commit/a5e0cfe4b3025d5263b5739d6a59bb5f519628a8))
32
+ * **internal:** minor reformatting of code ([#205](https://github.com/Modern-Treasury/modern-treasury-node/issues/205)) ([709c87f](https://github.com/Modern-Treasury/modern-treasury-node/commit/709c87ffe9130a6191ed145a57c0f16398a62bb8))
33
+
34
+ ## [2.3.0](https://github.com/Modern-Treasury/modern-treasury-node/compare/v2.2.0...v2.3.0) (2023-08-15)
35
+
36
+
37
+ ### ⚠ BREAKING CHANGES
38
+
39
+ * **client:** support accessing raw response + remove deprecated features ([#191](https://github.com/Modern-Treasury/modern-treasury-node/issues/191))
40
+
41
+ ### Features
42
+
43
+ * 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))
44
+ * **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))
45
+ * **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))
46
+ * **api:** updates ([#180](https://github.com/Modern-Treasury/modern-treasury-node/issues/180)) ([24c193d](https://github.com/Modern-Treasury/modern-treasury-node/commit/24c193d346a555d5274de5ba94dfc3ce756d1c8e))
47
+ * **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))
48
+ * **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))
49
+ * **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))
50
+
51
+
52
+ ### Bug Fixes
53
+
54
+ * **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))
55
+ * 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))
56
+
57
+
58
+ ### Documentation
59
+
60
+ * **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))
61
+ * **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))
62
+ * **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))
63
+
64
+
65
+ ### Chores
66
+
67
+ * 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))
68
+ * **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))
69
+ * **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))
70
+ * **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))
71
+ * **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))
72
+ * **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))
73
+ * **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))
74
+ * **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))
75
+ * **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))
76
+ * **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))
77
+
3
78
  ## [2.2.0](https://github.com/Modern-Treasury/modern-treasury-node/compare/v2.1.0...v3.0.0) (2023-08-01)
4
79
 
5
80
 
package/README.md CHANGED
@@ -2,10 +2,7 @@
2
2
 
3
3
  [![NPM version](https://img.shields.io/npm/v/modern-treasury.svg)](https://npmjs.org/package/modern-treasury)
4
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
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
- ### Usage with TypeScript
39
+ ### Request & Response types
43
40
 
44
- Importing, instantiating, and interacting with the library are the same as above.
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 60 seconds by default. You can configure this with a `timeout` option:
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 60s)
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,20 +274,28 @@ await modernTreasury.externalAccounts.list({
254
274
  })
255
275
  ```
256
276
 
257
- ## Status
277
+ ## Semantic Versioning
258
278
 
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.
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.
284
+
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
 
265
289
  ## Requirements
266
290
 
291
+ TypeScript >= 4.5 is supported.
292
+
267
293
  The following runtimes are supported:
268
294
 
269
295
  - 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"`.
296
+ - Deno v1.28.0 or higher, using `import ModernTreasury from "npm:modern-treasury"`.
297
+ Deno Deploy is not yet supported.
298
+ - Cloudflare Workers.
299
+ - Vercel Edge Runtime.
272
300
 
273
301
  If you are interested in other runtime environments, please open or upvote an issue on GitHub.
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Disclaimer: modules in _shims aren't intended to be imported by SDK users.
3
+ */
4
+ import { ReadableStream } from 'web-streams-polyfill';
5
+ export { ReadableStream };
6
+ //# sourceMappingURL=ReadableStream-node.d.ts.map
@@ -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,3 @@
1
+ import { ReadableStream } from 'web-streams-polyfill';
2
+ export { ReadableStream };
3
+ //# sourceMappingURL=ReadableStream-node.mjs.map
@@ -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"}
@@ -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,5 @@
1
+ /**
2
+ * Disclaimer: modules in _shims aren't intended to be imported by SDK users.
3
+ */
4
+
5
+ exports.ReadableStream = ReadableStream;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Disclaimer: modules in _shims aren't intended to be imported by SDK users.
3
+ */
4
+
5
+ const _ReadableStream = ReadableStream;
6
+
7
+ export { _ReadableStream as ReadableStream };
@@ -4,4 +4,4 @@
4
4
  import type { Agent } from 'node:http';
5
5
  export type { Agent };
6
6
  export declare const getDefaultAgent: (url: string) => Agent | undefined;
7
- //# sourceMappingURL=agent.node.d.ts.map
7
+ //# sourceMappingURL=agent-node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-node.d.ts","sourceRoot":"","sources":["../src/_shims/agent-node.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAGvC,YAAY,EAAE,KAAK,EAAE,CAAC;AAUtB,eAAO,MAAM,eAAe,QAAS,MAAM,KAAG,KAAK,GAAG,SAGrD,CAAC"}
@@ -25,4 +25,4 @@ const getDefaultAgent = (url) => {
25
25
  return defaultHttpAgent;
26
26
  };
27
27
  exports.getDefaultAgent = getDefaultAgent;
28
- //# sourceMappingURL=agent.node.js.map
28
+ //# sourceMappingURL=agent-node.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent.node.js","sourceRoot":"","sources":["../src/_shims/agent.node.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;AAEH,oEAA4C;AAE5C,uDAA8E;AAI9E,MAAM,gBAAgB,GAAU,IAAI,wBAAc,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;AAChG,MAAM,iBAAiB,GAAU,IAAI,wBAAc,CAAC,UAAU,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;AAE5G,oCAAoC;AACpC,IAAI,OAAO,eAAe,KAAK,WAAW,EAAE;IAC1C,eAAe,GAAG,kCAAwD,CAAC;CAC5E;AAEM,MAAM,eAAe,GAAG,CAAC,GAAW,EAAqB,EAAE;IAChE,IAAI,iBAAiB,IAAI,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC;QAAE,OAAO,iBAAiB,CAAC;IAC3E,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC;AAHW,QAAA,eAAe,mBAG1B"}
1
+ {"version":3,"file":"agent-node.js","sourceRoot":"","sources":["../src/_shims/agent-node.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;AAEH,oEAA4C;AAE5C,uDAA8E;AAI9E,MAAM,gBAAgB,GAAU,IAAI,wBAAc,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;AAChG,MAAM,iBAAiB,GAAU,IAAI,wBAAc,CAAC,UAAU,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;AAE5G,oCAAoC;AACpC,IAAI,OAAO,eAAe,KAAK,WAAW,EAAE;IAC1C,eAAe,GAAG,kCAAwD,CAAC;CAC5E;AAEM,MAAM,eAAe,GAAG,CAAC,GAAW,EAAqB,EAAE;IAChE,IAAI,iBAAiB,IAAI,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC;QAAE,OAAO,iBAAiB,CAAC;IAC3E,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC;AAHW,QAAA,eAAe,mBAG1B"}
@@ -13,4 +13,4 @@ export const getDefaultAgent = (url) => {
13
13
  if (defaultHttpsAgent && url.startsWith('https')) return defaultHttpsAgent;
14
14
  return defaultHttpAgent;
15
15
  };
16
- //# sourceMappingURL=agent.node.mjs.map
16
+ //# sourceMappingURL=agent-node.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent.node.mjs","sourceRoot":"","sources":["../src/_shims/agent.node.ts"],"names":[],"mappings":"AAAA;;GAEG;OAEI,cAAc,MAAM,gBAAgB;OAEpC,EAAE,eAAe,IAAI,uBAAuB,EAAE,MAAM,kBAAkB;AAI7E,MAAM,gBAAgB,GAAU,IAAI,cAAc,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;AAChG,MAAM,iBAAiB,GAAU,IAAI,cAAc,CAAC,UAAU,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;AAE5G,oCAAoC;AACpC,IAAI,OAAO,eAAe,KAAK,WAAW,EAAE;IAC1C,eAAe,GAAG,uBAAwD,CAAC;CAC5E;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,GAAW,EAAqB,EAAE;IAChE,IAAI,iBAAiB,IAAI,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC;QAAE,OAAO,iBAAiB,CAAC;IAC3E,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC"}
1
+ {"version":3,"file":"agent-node.mjs","sourceRoot":"","sources":["../src/_shims/agent-node.ts"],"names":[],"mappings":"AAAA;;GAEG;OAEI,cAAc,MAAM,gBAAgB;OAEpC,EAAE,eAAe,IAAI,uBAAuB,EAAE,MAAM,kBAAkB;AAI7E,MAAM,gBAAgB,GAAU,IAAI,cAAc,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;AAChG,MAAM,iBAAiB,GAAU,IAAI,cAAc,CAAC,UAAU,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;AAE5G,oCAAoC;AACpC,IAAI,OAAO,eAAe,KAAK,WAAW,EAAE;IAC1C,eAAe,GAAG,uBAAwD,CAAC;CAC5E;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,GAAW,EAAqB,EAAE;IAChE,IAAI,iBAAiB,IAAI,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC;QAAE,OAAO,iBAAiB,CAAC;IAC3E,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC"}
package/_shims/agent.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Disclaimer: modules in _shims aren't intended to be imported by SDK users.
3
3
  *
4
4
  * This is a stub for non-node environments.
5
- * In node environments, it gets replaced agent.node.ts by the package export map
5
+ * In node environments, it gets replaced agent-node.ts by the package export map
6
6
  */
7
7
  export type Agent = any;
8
8
  export declare const getDefaultAgent: (url: string) => any;
package/_shims/agent.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * Disclaimer: modules in _shims aren't intended to be imported by SDK users.
4
4
  *
5
5
  * This is a stub for non-node environments.
6
- * In node environments, it gets replaced agent.node.ts by the package export map
6
+ * In node environments, it gets replaced agent-node.ts by the package export map
7
7
  */
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
  exports.getDefaultAgent = void 0;
package/_shims/agent.mjs CHANGED
@@ -2,7 +2,7 @@
2
2
  * Disclaimer: modules in _shims aren't intended to be imported by SDK users.
3
3
  *
4
4
  * This is a stub for non-node environments.
5
- * In node environments, it gets replaced agent.node.ts by the package export map
5
+ * In node environments, it gets replaced agent-node.ts by the package export map
6
6
  */
7
7
  export const getDefaultAgent = (url) => {
8
8
  return undefined;
@@ -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,10 @@ 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 { _RequestInit as RequestInit, _RequestInfo as RequestInfo, _BodyInit as BodyInit };
58
+ export type {
59
+ _RequestInit as RequestInit,
60
+ _RequestInfo as RequestInfo,
61
+ _ResponseType as ResponseType,
62
+ _BodyInit as BodyInit,
63
+ _HeadersInit as HeadersInit,
64
+ };
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,10 @@ 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 { _RequestInit as RequestInit, _RequestInfo as RequestInfo, _BodyInit as BodyInit };
54
+ export type {
55
+ _RequestInit as RequestInit,
56
+ _RequestInfo as RequestInfo,
57
+ _ResponseType as ResponseType,
58
+ _BodyInit as BodyInit,
59
+ _HeadersInit as HeadersInit,
60
+ };
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Disclaimer: modules in _shims aren't intended to be imported by SDK users.
3
3
  */
4
- import type { File, FilePropertyBag } from './formdata.node.js';
4
+ import type { File, FilePropertyBag } from './form-data-node.js';
5
5
  export type FileFromPathOptions = Omit<FilePropertyBag, 'lastModified'>;
6
6
  /**
7
7
  * @deprecated use fs.createReadStream('./my/file.txt') instead
@@ -14,4 +14,4 @@ export declare function fileFromPath(
14
14
  filename?: string,
15
15
  options?: FileFromPathOptions,
16
16
  ): Promise<File>;
17
- //# sourceMappingURL=fileFromPath.node.d.ts.map
17
+ //# sourceMappingURL=fileFromPath-node.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fileFromPath.node.d.ts","sourceRoot":"","sources":["../src/_shims/fileFromPath.node.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAE7D,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC;AAIxE;;GAEG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAChE,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACnF,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAC/F,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,QAAQ,CAAC,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,IAAI,CAAC,CAAC"}
1
+ {"version":3,"file":"fileFromPath-node.d.ts","sourceRoot":"","sources":["../src/_shims/fileFromPath-node.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAE9D,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC;AAIxE;;GAEG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAChE,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACnF,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAC/F,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,QAAQ,CAAC,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,IAAI,CAAC,CAAC"}
@@ -14,4 +14,4 @@ async function fileFromPath(path, ...args) {
14
14
  return await (0, file_from_path_1.fileFromPath)(path, ...args);
15
15
  }
16
16
  exports.fileFromPath = fileFromPath;
17
- //# sourceMappingURL=fileFromPath.node.js.map
17
+ //# sourceMappingURL=fileFromPath-node.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fileFromPath.node.js","sourceRoot":"","sources":["../src/_shims/fileFromPath.node.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,iEAA6E;AAK7E,IAAI,MAAM,GAAG,KAAK,CAAC;AAaZ,KAAK,UAAU,YAAY,CAAC,IAAY,EAAE,GAAG,IAAW;IAC7D,IAAI,CAAC,MAAM,EAAE;QACX,OAAO,CAAC,IAAI,CAAC,uDAAuD,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACrG,MAAM,GAAG,IAAI,CAAC;KACf;IACD,OAAO,MAAM,IAAA,6BAAa,EAAC,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;AAC5C,CAAC;AAND,oCAMC"}
1
+ {"version":3,"file":"fileFromPath-node.js","sourceRoot":"","sources":["../src/_shims/fileFromPath-node.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,iEAA6E;AAK7E,IAAI,MAAM,GAAG,KAAK,CAAC;AAaZ,KAAK,UAAU,YAAY,CAAC,IAAY,EAAE,GAAG,IAAW;IAC7D,IAAI,CAAC,MAAM,EAAE;QACX,OAAO,CAAC,IAAI,CAAC,uDAAuD,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACrG,MAAM,GAAG,IAAI,CAAC;KACf;IACD,OAAO,MAAM,IAAA,6BAAa,EAAC,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;AAC5C,CAAC;AAND,oCAMC"}
@@ -10,4 +10,4 @@ export async function fileFromPath(path, ...args) {
10
10
  }
11
11
  return await _fileFromPath(path, ...args);
12
12
  }
13
- //# sourceMappingURL=fileFromPath.node.mjs.map
13
+ //# sourceMappingURL=fileFromPath-node.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"fileFromPath.node.mjs","sourceRoot":"","sources":["../src/_shims/fileFromPath.node.ts"],"names":[],"mappings":"AAAA;;GAEG;OAEI,EAAE,YAAY,IAAI,aAAa,EAAE,MAAM,8BAA8B;AAK5E,IAAI,MAAM,GAAG,KAAK,CAAC;AAanB,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,IAAY,EAAE,GAAG,IAAW;IAC7D,IAAI,CAAC,MAAM,EAAE;QACX,OAAO,CAAC,IAAI,CAAC,uDAAuD,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACrG,MAAM,GAAG,IAAI,CAAC;KACf;IACD,OAAO,MAAM,aAAa,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;AAC5C,CAAC"}
1
+ {"version":3,"file":"fileFromPath-node.mjs","sourceRoot":"","sources":["../src/_shims/fileFromPath-node.ts"],"names":[],"mappings":"AAAA;;GAEG;OAEI,EAAE,YAAY,IAAI,aAAa,EAAE,MAAM,8BAA8B;AAK5E,IAAI,MAAM,GAAG,KAAK,CAAC;AAanB,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,IAAY,EAAE,GAAG,IAAW;IAC7D,IAAI,CAAC,MAAM,EAAE;QACX,OAAO,CAAC,IAAI,CAAC,uDAAuD,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACrG,MAAM,GAAG,IAAI,CAAC;KACf;IACD,OAAO,MAAM,aAAa,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;AAC5C,CAAC"}
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * Disclaimer: modules in _shims aren't intended to be imported by SDK users.
3
3
  *
4
- * This is a stub that gets replaced by fileFromPath.node.js for node environments
4
+ * This is a stub that gets replaced by fileFromPath-node.js for node environments
5
5
  * in the package export map
6
6
  */
7
- import type { FilePropertyBag, File } from './formdata.js';
7
+ import type { FilePropertyBag, File } from './form-data.js';
8
8
  export type FileFromPathOptions = Omit<FilePropertyBag, 'lastModified'>;
9
9
  /**
10
10
  * This is a stub for non-node environments that just throws an error.
@@ -1 +1 @@
1
- {"version":3,"file":"fileFromPath.d.ts","sourceRoot":"","sources":["../src/_shims/fileFromPath.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAExD,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC;AAExE;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAChE,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACnF,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAC/F,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,QAAQ,CAAC,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,IAAI,CAAC,CAAC"}
1
+ {"version":3,"file":"fileFromPath.d.ts","sourceRoot":"","sources":["../src/_shims/fileFromPath.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEzD,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC;AAExE;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAChE,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACnF,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAC/F,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,QAAQ,CAAC,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,IAAI,CAAC,CAAC"}
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * Disclaimer: modules in _shims aren't intended to be imported by SDK users.
4
4
  *
5
- * This is a stub that gets replaced by fileFromPath.node.js for node environments
5
+ * This is a stub that gets replaced by fileFromPath-node.js for node environments
6
6
  * in the package export map
7
7
  */
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Disclaimer: modules in _shims aren't intended to be imported by SDK users.
3
3
  *
4
- * This is a stub that gets replaced by fileFromPath.node.js for node environments
4
+ * This is a stub that gets replaced by fileFromPath-node.js for node environments
5
5
  * in the package export map
6
6
  */
7
7
  export async function fileFromPath() {
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Disclaimer: modules in _shims aren't intended to be imported by SDK users.
3
+ */
4
+
5
+ exports.FormData = FormData;
6
+ exports.Blob = Blob;
7
+ exports.File =
8
+ typeof File !== 'undefined' ? File : (
9
+ // Bun doesn't implement File yet, so just make a shim that throws a helpful error message
10
+ class File extends Blob {
11
+ constructor() {
12
+ throw new Error(`file uploads aren't supported in this environment yet as 'File' is not defined`);
13
+ }
14
+ }
15
+ );
16
+
17
+ exports.isPolyfilled = false;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Disclaimer: modules in _shims aren't intended to be imported by SDK users.
3
+ */
4
+
5
+ const _FormData = FormData;
6
+ const _Blob = Blob;
7
+
8
+ const _File =
9
+ typeof File !== 'undefined' ? File : (
10
+ // Bun doesn't implement File yet, so just make a shim that throws a helpful error message
11
+ class File extends Blob {
12
+ constructor() {
13
+ throw new Error(`file uploads aren't supported in this environment yet as 'File' is not defined`);
14
+ }
15
+ }
16
+ );
17
+
18
+ export { _FormData as FormData, _File as File, _Blob as Blob };
19
+
20
+ export const isPolyfilled = false;
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * Disclaimer: modules in _shims aren't intended to be imported by SDK users.
3
3
  */
4
- import { FormData } from './formdata.node.js';
4
+ import { FormData } from './form-data-node.js';
5
5
  import type { RequestOptions } from '../core.js';
6
6
  export declare function getMultipartRequestOptions<T extends {} = Record<string, unknown>>(
7
7
  form: FormData,
8
8
  opts: RequestOptions<T>,
9
9
  ): Promise<RequestOptions<T>>;
10
- //# sourceMappingURL=getMultipartRequestOptions.node.d.ts.map
10
+ //# sourceMappingURL=getMultipartRequestOptions-node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getMultipartRequestOptions-node.d.ts","sourceRoot":"","sources":["../src/_shims/getMultipartRequestOptions-node.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAK9C,wBAAsB,0BAA0B,CAAC,CAAC,SAAS,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACrF,IAAI,EAAE,QAAQ,EACd,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,GACtB,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAW5B"}
@@ -19,4 +19,4 @@ async function getMultipartRequestOptions(form, opts) {
19
19
  return { ...opts, body: body, headers };
20
20
  }
21
21
  exports.getMultipartRequestOptions = getMultipartRequestOptions;
22
- //# sourceMappingURL=getMultipartRequestOptions.node.js.map
22
+ //# sourceMappingURL=getMultipartRequestOptions-node.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getMultipartRequestOptions.node.js","sourceRoot":"","sources":["../src/_shims/getMultipartRequestOptions.node.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAIH,6CAAuC;AACvC,yDAAoD;AACpD,2CAA2C;AAEpC,KAAK,UAAU,0BAA0B,CAC9C,IAAc,EACd,IAAuB;IAEvB,MAAM,OAAO,GAAG,IAAI,mCAAe,CAAC,IAAI,CAAC,CAAC;IAC1C,MAAM,QAAQ,GAAG,sBAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACxC,MAAM,IAAI,GAAG,IAAI,uBAAa,CAAC,QAAQ,CAAC,CAAC;IACzC,MAAM,OAAO,GAAG;QACd,GAAG,IAAI,CAAC,OAAO;QACf,GAAG,OAAO,CAAC,OAAO;QAClB,gBAAgB,EAAE,OAAO,CAAC,aAAa;KACxC,CAAC;IAEF,OAAO,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,IAAW,EAAE,OAAO,EAAE,CAAC;AACjD,CAAC;AAdD,gEAcC"}
1
+ {"version":3,"file":"getMultipartRequestOptions-node.js","sourceRoot":"","sources":["../src/_shims/getMultipartRequestOptions-node.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAIH,6CAAuC;AACvC,yDAAoD;AACpD,2CAA2C;AAEpC,KAAK,UAAU,0BAA0B,CAC9C,IAAc,EACd,IAAuB;IAEvB,MAAM,OAAO,GAAG,IAAI,mCAAe,CAAC,IAAI,CAAC,CAAC;IAC1C,MAAM,QAAQ,GAAG,sBAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACxC,MAAM,IAAI,GAAG,IAAI,uBAAa,CAAC,QAAQ,CAAC,CAAC;IACzC,MAAM,OAAO,GAAG;QACd,GAAG,IAAI,CAAC,OAAO;QACf,GAAG,OAAO,CAAC,OAAO;QAClB,gBAAgB,EAAE,OAAO,CAAC,aAAa;KACxC,CAAC;IAEF,OAAO,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,IAAW,EAAE,OAAO,EAAE,CAAC;AACjD,CAAC;AAdD,gEAcC"}
@@ -15,4 +15,4 @@ export async function getMultipartRequestOptions(form, opts) {
15
15
  };
16
16
  return { ...opts, body: body, headers };
17
17
  }
18
- //# sourceMappingURL=getMultipartRequestOptions.node.mjs.map
18
+ //# sourceMappingURL=getMultipartRequestOptions-node.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"getMultipartRequestOptions.node.mjs","sourceRoot":"","sources":["../src/_shims/getMultipartRequestOptions.node.ts"],"names":[],"mappings":"AAAA;;GAEG;OAII,EAAE,QAAQ,EAAE,MAAM,aAAa;OAC/B,EAAE,eAAe,EAAE,MAAM,mBAAmB;OAC5C,EAAE,aAAa,EAAE;AAExB,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,IAAc,EACd,IAAuB;IAEvB,MAAM,OAAO,GAAG,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;IAC1C,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACxC,MAAM,IAAI,GAAG,IAAI,aAAa,CAAC,QAAQ,CAAC,CAAC;IACzC,MAAM,OAAO,GAAG;QACd,GAAG,IAAI,CAAC,OAAO;QACf,GAAG,OAAO,CAAC,OAAO;QAClB,gBAAgB,EAAE,OAAO,CAAC,aAAa;KACxC,CAAC;IAEF,OAAO,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,IAAW,EAAE,OAAO,EAAE,CAAC;AACjD,CAAC"}
1
+ {"version":3,"file":"getMultipartRequestOptions-node.mjs","sourceRoot":"","sources":["../src/_shims/getMultipartRequestOptions-node.ts"],"names":[],"mappings":"AAAA;;GAEG;OAII,EAAE,QAAQ,EAAE,MAAM,aAAa;OAC/B,EAAE,eAAe,EAAE,MAAM,mBAAmB;OAC5C,EAAE,aAAa,EAAE;AAExB,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,IAAc,EACd,IAAuB;IAEvB,MAAM,OAAO,GAAG,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;IAC1C,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACxC,MAAM,IAAI,GAAG,IAAI,aAAa,CAAC,QAAQ,CAAC,CAAC;IACzC,MAAM,OAAO,GAAG;QACd,GAAG,IAAI,CAAC,OAAO;QACf,GAAG,OAAO,CAAC,OAAO;QAClB,gBAAgB,EAAE,OAAO,CAAC,aAAa;KACxC,CAAC;IAEF,OAAO,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,IAAW,EAAE,OAAO,EAAE,CAAC;AACjD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Disclaimer: modules in _shims aren't intended to be imported by SDK users.
3
3
  */
4
- import { FormData } from './formdata.js';
4
+ import { FormData } from './form-data.js';
5
5
  import type { RequestOptions } from '../core.js';
6
6
  export declare function getMultipartRequestOptions<T extends {} = Record<string, unknown>>(
7
7
  form: FormData,
@@ -1 +1 @@
1
- {"version":3,"file":"getMultipartRequestOptions.d.ts","sourceRoot":"","sources":["../src/_shims/getMultipartRequestOptions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG9C,wBAAsB,0BAA0B,CAAC,CAAC,SAAS,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACrF,IAAI,EAAE,QAAQ,EACd,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,GACtB,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAE5B"}
1
+ {"version":3,"file":"getMultipartRequestOptions.d.ts","sourceRoot":"","sources":["../src/_shims/getMultipartRequestOptions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG9C,wBAAsB,0BAA0B,CAAC,CAAC,SAAS,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACrF,IAAI,EAAE,QAAQ,EACd,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,GACtB,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAE5B"}
@@ -5,4 +5,4 @@ export type { Readable } from 'node:stream';
5
5
  import { ReadStream as FsReadStream } from 'node:fs';
6
6
  export type { FsReadStream };
7
7
  export declare function isFsReadStream(value: any): value is FsReadStream;
8
- //# sourceMappingURL=node-readable.node.d.ts.map
8
+ //# sourceMappingURL=node-readable-node.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"node-readable.node.d.ts","sourceRoot":"","sources":["../src/_shims/node-readable.node.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,UAAU,IAAI,YAAY,EAAE,MAAM,SAAS,CAAC;AACrD,YAAY,EAAE,YAAY,EAAE,CAAC;AAE7B,wBAAgB,cAAc,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,YAAY,CAEhE"}
1
+ {"version":3,"file":"node-readable-node.d.ts","sourceRoot":"","sources":["../src/_shims/node-readable-node.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,UAAU,IAAI,YAAY,EAAE,MAAM,SAAS,CAAC;AACrD,YAAY,EAAE,YAAY,EAAE,CAAC;AAE7B,wBAAgB,cAAc,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,YAAY,CAEhE"}