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
@@ -1,9 +1,9 @@
1
1
  // File generated from our OpenAPI spec by Stainless.
2
- import { APIResource } from 'modern-treasury/resource';
3
- import { isRequestOptions } from 'modern-treasury/core';
2
+ import { APIResource } from 'modern-treasury/resource.mjs';
3
+ import { isRequestOptions } from 'modern-treasury/core.mjs';
4
4
  import { LineItems } from './line-items.mjs';
5
5
  import * as API from './index.mjs';
6
- import { Page } from 'modern-treasury/pagination';
6
+ import { Page } from 'modern-treasury/pagination.mjs';
7
7
  export class Invoices extends APIResource {
8
8
  constructor() {
9
9
  super(...arguments);
@@ -13,12 +13,18 @@ export class Invoices extends APIResource {
13
13
  * create invoice
14
14
  */
15
15
  create(params, options) {
16
+ // @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
16
17
  const { 'Idempotency-Key': idempotencyKey, ...body } = params;
18
+ if (idempotencyKey) {
19
+ console.warn(
20
+ "The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
21
+ );
22
+ }
17
23
  return this.post('/api/invoices', {
18
24
  body,
19
25
  ...options,
20
26
  headers: {
21
- 'Idempotency-Key': idempotencyKey || '',
27
+ 'Idempotency-Key': idempotencyKey,
22
28
  ...(options === null || options === void 0 ? void 0 : options.headers),
23
29
  },
24
30
  });
@@ -1 +1 @@
1
- {"version":3,"file":"invoices.mjs","sourceRoot":"","sources":["../../src/resources/invoices/invoices.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,0BAA0B;OAC/C,EAAE,gBAAgB,EAAE,MAAM,sBAAsB;OAGhD,EAAE,SAAS,EAAE;OACb,KAAK,GAAG;OACR,EAAE,IAAI,EAAc,MAAM,4BAA4B;AAE7D,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,cAAS,GAAc,IAAI,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAuDpD,CAAC;IArDC;;OAEG;IACH,MAAM,CAAC,MAA2B,EAAE,OAA6B;QAC/D,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,OAAO,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE;YAChC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,iBAAiB,EAAE,cAAc,IAAI,EAAE,EAAE,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,EAAE;SAC1E,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAA6B;QAChD,OAAO,IAAI,CAAC,GAAG,CAAC,iBAAiB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;IAWD,MAAM,CACJ,EAAU,EACV,OAAkD,EAAE,EACpD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,IAAI,CAAC,EAAE;YAC1B,OAAO,IAAI,CAAC,MAAM,C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as Core from 'modern-treasury/core';
2
2
  import { APIResource } from 'modern-treasury/resource';
3
- import * as Shared from 'modern-treasury/resources/shared';
4
3
  import * as API from './index.js';
5
4
  import { Page, PageParams } from 'modern-treasury/pagination';
6
5
  export declare class LineItems extends APIResource {
@@ -11,15 +10,11 @@ export declare class LineItems extends APIResource {
11
10
  invoiceId: string,
12
11
  params: LineItemCreateParams,
13
12
  options?: Core.RequestOptions,
14
- ): Promise<Core.APIResponse<InvoiceLineItem>>;
13
+ ): Core.APIPromise<InvoiceLineItem>;
15
14
  /**
16
15
  * get invoice_line_item
17
16
  */
18
- retrieve(
19
- invoiceId: string,
20
- id: string,
21
- options?: Core.RequestOptions,
22
- ): Promise<Core.APIResponse<InvoiceLineItem>>;
17
+ retrieve(invoiceId: string, id: string, options?: Core.RequestOptions): Core.APIPromise<InvoiceLineItem>;
23
18
  /**
24
19
  * update invoice_line_item
25
20
  */
@@ -28,12 +23,8 @@ export declare class LineItems extends APIResource {
28
23
  id: string,
29
24
  body?: LineItemUpdateParams,
30
25
  options?: Core.RequestOptions,
31
- ): Promise<Core.APIResponse<InvoiceLineItem>>;
32
- update(
33
- invoiceId: string,
34
- id: string,
35
- options?: Core.RequestOptions,
36
- ): Promise<Core.APIResponse<InvoiceLineItem>>;
26
+ ): Core.APIPromise<InvoiceLineItem>;
27
+ update(invoiceId: string, id: string, options?: Core.RequestOptions): Core.APIPromise<InvoiceLineItem>;
37
28
  /**
38
29
  * list invoice_line_items
39
30
  */
@@ -41,16 +32,15 @@ export declare class LineItems extends APIResource {
41
32
  invoiceId: string,
42
33
  query?: LineItemListParams,
43
34
  options?: Core.RequestOptions,
44
- ): Core.PagePromise<InvoiceLineItemsPage>;
45
- list(invoiceId: string, options?: Core.RequestOptions): Core.PagePromise<InvoiceLineItemsPage>;
35
+ ): Core.PagePromise<InvoiceLineItemsPage, InvoiceLineItem>;
36
+ list(
37
+ invoiceId: string,
38
+ options?: Core.RequestOptions,
39
+ ): Core.PagePromise<InvoiceLineItemsPage, InvoiceLineItem>;
46
40
  /**
47
41
  * delete invoice_line_item
48
42
  */
49
- del(
50
- invoiceId: string,
51
- id: string,
52
- options?: Core.RequestOptions,
53
- ): Promise<Core.APIResponse<InvoiceLineItem>>;
43
+ del(invoiceId: string, id: string, options?: Core.RequestOptions): Core.APIPromise<InvoiceLineItem>;
54
44
  }
55
45
  export declare class InvoiceLineItemsPage extends Page<InvoiceLineItem> {}
56
46
  type _InvoiceLineItemsPage = InvoiceLineItemsPage;
@@ -96,198 +86,55 @@ export interface InvoiceLineItem {
96
86
  }
97
87
  export interface LineItemCreateParams {
98
88
  /**
99
- * Body param: The name of the line item, typically a product or SKU name.
89
+ * The name of the line item, typically a product or SKU name.
100
90
  */
101
91
  name: string;
102
92
  /**
103
- * Body param: The cost per unit of the product or service that this line item is
104
- * for, specified in the invoice currency's smallest unit.
93
+ * The cost per unit of the product or service that this line item is for,
94
+ * specified in the invoice currency's smallest unit.
105
95
  */
106
96
  unit_amount: number;
107
97
  /**
108
- * Body param: An optional free-form description of the line item.
98
+ * An optional free-form description of the line item.
109
99
  */
110
100
  description?: string;
111
101
  /**
112
- * Body param: Either `debit` or `credit`. `debit` indicates that a client owes the
113
- * business money and increases the invoice's `total_amount` due. `credit` has the
114
- * opposite intention and effect.
102
+ * Either `debit` or `credit`. `debit` indicates that a client owes the business
103
+ * money and increases the invoice's `total_amount` due. `credit` has the opposite
104
+ * intention and effect.
115
105
  */
116
106
  direction?: string;
117
107
  /**
118
- * Body param: The number of units of a product or service that this line item is
119
- * for. Must be a whole number. Defaults to 1 if not provided.
108
+ * The number of units of a product or service that this line item is for. Must be
109
+ * a whole number. Defaults to 1 if not provided.
120
110
  */
121
111
  quantity?: number;
122
- /**
123
- * Header param: This key should be something unique, preferably something like an
124
- * UUID.
125
- */
126
- 'Idempotency-Key'?: string;
127
112
  }
128
113
  export interface LineItemUpdateParams {
129
114
  /**
130
- * The invoicer's contact details displayed at the top of the invoice.
131
- */
132
- contact_details?: Array<LineItemUpdateParams.ContactDetail>;
133
- /**
134
- * The counterparty's billing address.
135
- */
136
- counterparty_billing_address?: LineItemUpdateParams.CounterpartyBillingAddress | null;
137
- /**
138
- * The ID of the counterparty receiving the invoice.
139
- */
140
- counterparty_id?: string;
141
- /**
142
- * The counterparty's shipping address where physical goods should be delivered.
143
- */
144
- counterparty_shipping_address?: LineItemUpdateParams.CounterpartyShippingAddress | null;
145
- /**
146
- * Currency that the invoice is denominated in. Defaults to `USD` if not provided.
147
- */
148
- currency?: Shared.Currency | null;
149
- /**
150
- * A free-form description of the invoice.
115
+ * An optional free-form description of the line item.
151
116
  */
152
117
  description?: string;
153
118
  /**
154
- * A future date by when the invoice needs to be paid.
155
- */
156
- due_date?: string;
157
- /**
158
- * The invoice issuer's business address.
159
- */
160
- invoicer_address?: LineItemUpdateParams.InvoicerAddress | null;
161
- /**
162
- * The ID of the internal account the invoice should be paid to.
163
- */
164
- originating_account_id?: string;
165
- /**
166
- * Date transactions are to be posted to the participants' account. Defaults to the
167
- * current business day or the next business day if the current day is a bank
168
- * holiday or weekend. Format: yyyy-mm-dd.
169
- */
170
- payment_effective_date?: string;
171
- /**
172
- * The method by which the invoice can be paid. `ui` will show the embedded payment
173
- * collection flow. `automatic` will automatically initiate payment based upon the
174
- * account details of the receiving_account id.\nIf the invoice amount is positive,
175
- * the automatically initiated payment order's direction will be debit. If the
176
- * invoice amount is negative, the automatically initiated payment order's
177
- * direction will be credit. One of `manual`, `ui`, or `automatic`.
178
- */
179
- payment_method?: 'ui' | 'manual' | 'automatic';
180
- /**
181
- * One of `ach`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`, `bacs`,
182
- * `au_becs`, `interac`, `signet`, `provexchange`.
183
- */
184
- payment_type?:
185
- | 'ach'
186
- | 'au_becs'
187
- | 'bacs'
188
- | 'book'
189
- | 'card'
190
- | 'check'
191
- | 'eft'
192
- | 'cross_border'
193
- | 'interac'
194
- | 'masav'
195
- | 'neft'
196
- | 'provxchange'
197
- | 'rtp'
198
- | 'sen'
199
- | 'sepa'
200
- | 'signet'
201
- | 'wire';
202
- /**
203
- * The receiving account ID. Can be an `external_account`.
119
+ * Either `debit` or `credit`. `debit` indicates that a client owes the business
120
+ * money and increases the invoice's `total_amount` due. `credit` has the opposite
121
+ * intention and effect.
204
122
  */
205
- receiving_account_id?: string;
206
- }
207
- export declare namespace LineItemUpdateParams {
208
- interface ContactDetail {
209
- id: string;
210
- contact_identifier: string;
211
- contact_identifier_type: 'email' | 'phone_number' | 'website';
212
- created_at: string;
213
- discarded_at: string | null;
214
- /**
215
- * This field will be true if this object exists in the live environment or false
216
- * if it exists in the test environment.
217
- */
218
- live_mode: boolean;
219
- object: string;
220
- updated_at: string;
221
- }
123
+ direction?: string;
222
124
  /**
223
- * The counterparty's billing address.
125
+ * The name of the line item, typically a product or SKU name.
224
126
  */
225
- interface CounterpartyBillingAddress {
226
- /**
227
- * Country code conforms to [ISO 3166-1 alpha-2]
228
- */
229
- country: string;
230
- line1: string;
231
- /**
232
- * Locality or City.
233
- */
234
- locality: string;
235
- /**
236
- * The postal code of the address.
237
- */
238
- postal_code: string;
239
- /**
240
- * Region or State.
241
- */
242
- region: string;
243
- line2?: string;
244
- }
127
+ name?: string;
245
128
  /**
246
- * The counterparty's shipping address where physical goods should be delivered.
129
+ * The number of units of a product or service that this line item is for. Must be
130
+ * a whole number. Defaults to 1 if not provided.
247
131
  */
248
- interface CounterpartyShippingAddress {
249
- /**
250
- * Country code conforms to [ISO 3166-1 alpha-2]
251
- */
252
- country: string;
253
- line1: string;
254
- /**
255
- * Locality or City.
256
- */
257
- locality: string;
258
- /**
259
- * The postal code of the address.
260
- */
261
- postal_code: string;
262
- /**
263
- * Region or State.
264
- */
265
- region: string;
266
- line2?: string;
267
- }
132
+ quantity?: number;
268
133
  /**
269
- * The invoice issuer's business address.
134
+ * The cost per unit of the product or service that this line item is for,
135
+ * specified in the invoice currency's smallest unit.
270
136
  */
271
- interface InvoicerAddress {
272
- /**
273
- * Country code conforms to [ISO 3166-1 alpha-2]
274
- */
275
- country: string;
276
- line1: string;
277
- /**
278
- * Locality or City.
279
- */
280
- locality: string;
281
- /**
282
- * The postal code of the address.
283
- */
284
- postal_code: string;
285
- /**
286
- * Region or State.
287
- */
288
- region: string;
289
- line2?: string;
290
- }
137
+ unit_amount?: number;
291
138
  }
292
139
  export interface LineItemListParams extends PageParams {}
293
140
  export declare namespace LineItems {
@@ -1 +1 @@
1
- {"version":3,"file":"line-items.d.ts","sourceRoot":"","sources":["../../src/resources/invoices/line-items.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,KAAK,MAAM,MAAM,kCAAkC,CAAC;AAC3D,OAAO,KAAK,GAAG,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAE9D,qBAAa,SAAU,SAAQ,WAAW;IACxC;;OAEG;IACH,MAAM,CACJ,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,oBAAoB,EAC5B,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;IAS7C;;OAEG;IACH,QAAQ,CACN,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;IAI7C;;OAEG;IACH,MAAM,CACJ,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,MAAM,EACV,IAAI,CAAC,EAAE,oBAAoB,EAC3B,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;IAC7C,MAAM,CACJ,SAAS,EAAE,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;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,kBAAmB,SAAQ,UAAU;CAAG;AAEzD,yBAAiB,SAAS,CAAC;IACzB,MAAM,QAAQ,eAAe,GAAG,GAAG,CAAC,eAAe,CAAC;IACpD,KAAY,oBAAoB,GAAG,qBAAqB,CAAC;IACzD,MAAM,QAAQ,oBAAoB,GAAG,GAAG,CAAC,oBAAoB,CAAC;IAC9D,MAAM,QAAQ,oBAAoB,GAAG,GAAG,CAAC,oBAAoB,CAAC;IAC9D,MAAM,QAAQ,kBAAkB,GAAG,GAAG,CAAC,kBAAkB,CAAC;CAC3D"}
@@ -2,20 +2,26 @@
2
2
  // File generated from our OpenAPI spec by Stainless.
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
  exports.InvoiceLineItemsPage = exports.LineItems = void 0;
5
- const resource_1 = require('modern-treasury/resource');
6
- const core_1 = require('modern-treasury/core');
7
- const pagination_1 = require('modern-treasury/pagination');
5
+ const resource_1 = require('modern-treasury/resource.js');
6
+ const core_1 = require('modern-treasury/core.js');
7
+ const pagination_1 = require('modern-treasury/pagination.js');
8
8
  class LineItems extends resource_1.APIResource {
9
9
  /**
10
10
  * create invoice_line_item
11
11
  */
12
12
  create(invoiceId, params, options) {
13
+ // @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
13
14
  const { 'Idempotency-Key': idempotencyKey, ...body } = params;
15
+ if (idempotencyKey) {
16
+ console.warn(
17
+ "The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
18
+ );
19
+ }
14
20
  return this.post(`/api/invoices/${invoiceId}/invoice_line_items`, {
15
21
  body,
16
22
  ...options,
17
23
  headers: {
18
- 'Idempotency-Key': idempotencyKey || '',
24
+ 'Idempotency-Key': idempotencyKey,
19
25
  ...(options === null || options === void 0 ? void 0 : options.headers),
20
26
  },
21
27
  });
@@ -1 +1 @@
1
- {"version":3,"file":"line-items.js","sourceRoot":"","sources":["../../src/resources/invoices/line-items.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAGrD,uDAAuD;AACvD,+CAAwD;AAGxD,2DAA8D;AAE9D,MAAa,SAAU,SAAQ,sBAAW;IACxC;;OAEG;IACH,MAAM,CACJ,SAAiB,EACjB,MAA4B,EAC5B,OAA6B;QAE7B,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,OAAO,IAAI,CAAC,IAAI,CAAC,iBAAiB,SAAS,qBAAqB,EAAE;YAChE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,iBAAiB,EAAE,cAAc,IAAI,EAAE,EAAE,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,EAAE;SAC1E,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,QAAQ,CACN,SAAiB,EACjB,EAAU,EACV,OAA6B;QAE7B,OAAO,IAAI,CAAC,GAAG,CAAC,iBAAiB,SAAS,uBAAuB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAClF,CAAC;IAgBD,MAAM,CACJ,SAAiB,EACjB,EAAU,EACV,OAAmD,EAAE,EACrD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,IAAI,CAAC,EAAE;YA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AC,MAAM,CAAC,iBAAiB,SAAS,uBAAuB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACrF,CAAC;CACF;AApFD,8BAoFC;AAED,MAAa,oBAAqB,SAAQ,iBAAqB;CAAG;AAAlE,oDAAkE;AAuHlE,WAAiB,SAAS;AAM1B,CAAC,EANgB,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAMzB"}
@@ -1,18 +1,24 @@
1
1
  // File generated from our OpenAPI spec by Stainless.
2
- import { APIResource } from 'modern-treasury/resource';
3
- import { isRequestOptions } from 'modern-treasury/core';
4
- import { Page } from 'modern-treasury/pagination';
2
+ import { APIResource } from 'modern-treasury/resource.mjs';
3
+ import { isRequestOptions } from 'modern-treasury/core.mjs';
4
+ import { Page } from 'modern-treasury/pagination.mjs';
5
5
  export class LineItems extends APIResource {
6
6
  /**
7
7
  * create invoice_line_item
8
8
  */
9
9
  create(invoiceId, params, options) {
10
+ // @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
10
11
  const { 'Idempotency-Key': idempotencyKey, ...body } = params;
12
+ if (idempotencyKey) {
13
+ console.warn(
14
+ "The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
15
+ );
16
+ }
11
17
  return this.post(`/api/invoices/${invoiceId}/invoice_line_items`, {
12
18
  body,
13
19
  ...options,
14
20
  headers: {
15
- 'Idempotency-Key': idempotencyKey || '',
21
+ 'Idempotency-Key': idempotencyKey,
16
22
  ...(options === null || options === void 0 ? void 0 : options.headers),
17
23
  },
18
24
  });
@@ -1 +1 @@
1
- {"version":3,"file":"line-items.mjs","sourceRoot":"","sources":["../../src/resources/invoices/line-items.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,0BAA0B;OAC/C,EAAE,gBAAgB,EAAE,MAAM,sBAAsB;OAGhD,EAAE,IAAI,EAAc,MAAM,4BAA4B;AAE7D,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;OAEG;IACH,MAAM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