modern-treasury 2.7.2 → 2.8.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 (328) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +5 -8
  3. package/_shims/auto/types.d.ts +3 -1
  4. package/_shims/index.d.ts +2 -0
  5. package/_shims/node-runtime.d.ts.map +1 -1
  6. package/_shims/node-runtime.js +3 -0
  7. package/_shims/node-runtime.js.map +1 -1
  8. package/_shims/node-runtime.mjs +2 -0
  9. package/_shims/node-runtime.mjs.map +1 -1
  10. package/_shims/node-types.d.ts +1 -1
  11. package/_shims/registry.d.ts +2 -0
  12. package/_shims/registry.d.ts.map +1 -1
  13. package/_shims/registry.js +3 -1
  14. package/_shims/registry.js.map +1 -1
  15. package/_shims/registry.mjs +2 -0
  16. package/_shims/registry.mjs.map +1 -1
  17. package/_shims/web-runtime.d.ts.map +1 -1
  18. package/_shims/web-runtime.js +8 -0
  19. package/_shims/web-runtime.js.map +1 -1
  20. package/_shims/web-runtime.mjs +8 -0
  21. package/_shims/web-runtime.mjs.map +1 -1
  22. package/_shims/web-types.d.ts +2 -1
  23. package/core.d.ts +1 -1
  24. package/core.d.ts.map +1 -1
  25. package/core.js +38 -23
  26. package/core.js.map +1 -1
  27. package/core.mjs +36 -21
  28. package/core.mjs.map +1 -1
  29. package/error.d.ts.map +1 -1
  30. package/error.js +14 -4
  31. package/error.js.map +1 -1
  32. package/error.mjs +14 -4
  33. package/error.mjs.map +1 -1
  34. package/index.d.mts +20 -14
  35. package/index.d.ts +20 -14
  36. package/index.d.ts.map +1 -1
  37. package/index.js +6 -6
  38. package/index.js.map +1 -1
  39. package/index.mjs +6 -6
  40. package/index.mjs.map +1 -1
  41. package/package.json +3 -2
  42. package/resources/account-collection-flows.d.ts +9 -11
  43. package/resources/account-collection-flows.d.ts.map +1 -1
  44. package/resources/account-collection-flows.js +25 -0
  45. package/resources/account-collection-flows.js.map +1 -1
  46. package/resources/account-collection-flows.mjs +2 -0
  47. package/resources/account-collection-flows.mjs.map +1 -1
  48. package/resources/account-details.d.ts +6 -8
  49. package/resources/account-details.d.ts.map +1 -1
  50. package/resources/account-details.js +25 -0
  51. package/resources/account-details.js.map +1 -1
  52. package/resources/account-details.mjs +2 -0
  53. package/resources/account-details.mjs.map +1 -1
  54. package/resources/connections.d.ts +5 -7
  55. package/resources/connections.d.ts.map +1 -1
  56. package/resources/connections.js +25 -0
  57. package/resources/connections.js.map +1 -1
  58. package/resources/connections.mjs +2 -0
  59. package/resources/connections.mjs.map +1 -1
  60. package/resources/counterparties.d.ts +22 -23
  61. package/resources/counterparties.d.ts.map +1 -1
  62. package/resources/counterparties.js +25 -0
  63. package/resources/counterparties.js.map +1 -1
  64. package/resources/counterparties.mjs +2 -0
  65. package/resources/counterparties.mjs.map +1 -1
  66. package/resources/documents.d.ts +9 -11
  67. package/resources/documents.d.ts.map +1 -1
  68. package/resources/documents.js +25 -0
  69. package/resources/documents.js.map +1 -1
  70. package/resources/documents.mjs +2 -0
  71. package/resources/documents.mjs.map +1 -1
  72. package/resources/events.d.ts +5 -7
  73. package/resources/events.d.ts.map +1 -1
  74. package/resources/events.js +25 -0
  75. package/resources/events.js.map +1 -1
  76. package/resources/events.mjs +2 -0
  77. package/resources/events.mjs.map +1 -1
  78. package/resources/expected-payments.d.ts +26 -16
  79. package/resources/expected-payments.d.ts.map +1 -1
  80. package/resources/expected-payments.js +25 -0
  81. package/resources/expected-payments.js.map +1 -1
  82. package/resources/expected-payments.mjs +2 -0
  83. package/resources/expected-payments.mjs.map +1 -1
  84. package/resources/external-accounts.d.ts +18 -20
  85. package/resources/external-accounts.d.ts.map +1 -1
  86. package/resources/external-accounts.js +25 -0
  87. package/resources/external-accounts.js.map +1 -1
  88. package/resources/external-accounts.mjs +2 -0
  89. package/resources/external-accounts.mjs.map +1 -1
  90. package/resources/incoming-payment-details.d.ts +12 -14
  91. package/resources/incoming-payment-details.d.ts.map +1 -1
  92. package/resources/incoming-payment-details.js +25 -0
  93. package/resources/incoming-payment-details.js.map +1 -1
  94. package/resources/incoming-payment-details.mjs +2 -0
  95. package/resources/incoming-payment-details.mjs.map +1 -1
  96. package/resources/index.d.ts +1 -1
  97. package/resources/index.d.ts.map +1 -1
  98. package/resources/index.js +2 -2
  99. package/resources/index.js.map +1 -1
  100. package/resources/index.mjs +1 -1
  101. package/resources/index.mjs.map +1 -1
  102. package/resources/internal-accounts/balance-reports.d.ts +5 -7
  103. package/resources/internal-accounts/balance-reports.d.ts.map +1 -1
  104. package/resources/internal-accounts/balance-reports.js +25 -0
  105. package/resources/internal-accounts/balance-reports.js.map +1 -1
  106. package/resources/internal-accounts/balance-reports.mjs +2 -0
  107. package/resources/internal-accounts/balance-reports.mjs.map +1 -1
  108. package/resources/internal-accounts/internal-accounts.d.ts +21 -23
  109. package/resources/internal-accounts/internal-accounts.d.ts.map +1 -1
  110. package/resources/internal-accounts/internal-accounts.js +6 -5
  111. package/resources/internal-accounts/internal-accounts.js.map +1 -1
  112. package/resources/internal-accounts/internal-accounts.mjs +6 -5
  113. package/resources/internal-accounts/internal-accounts.mjs.map +1 -1
  114. package/resources/invoices/invoices.d.ts +39 -26
  115. package/resources/invoices/invoices.d.ts.map +1 -1
  116. package/resources/invoices/invoices.js +6 -5
  117. package/resources/invoices/invoices.js.map +1 -1
  118. package/resources/invoices/invoices.mjs +6 -5
  119. package/resources/invoices/invoices.mjs.map +1 -1
  120. package/resources/invoices/line-items.d.ts +7 -9
  121. package/resources/invoices/line-items.d.ts.map +1 -1
  122. package/resources/invoices/line-items.js +25 -0
  123. package/resources/invoices/line-items.js.map +1 -1
  124. package/resources/invoices/line-items.mjs +2 -0
  125. package/resources/invoices/line-items.mjs.map +1 -1
  126. package/resources/ledger-account-balance-monitors.d.ts +7 -9
  127. package/resources/ledger-account-balance-monitors.d.ts.map +1 -1
  128. package/resources/ledger-account-balance-monitors.js +25 -0
  129. package/resources/ledger-account-balance-monitors.js.map +1 -1
  130. package/resources/ledger-account-balance-monitors.mjs +2 -0
  131. package/resources/ledger-account-balance-monitors.mjs.map +1 -1
  132. package/resources/ledger-account-categories.d.ts +11 -12
  133. package/resources/ledger-account-categories.d.ts.map +1 -1
  134. package/resources/ledger-account-categories.js +25 -0
  135. package/resources/ledger-account-categories.js.map +1 -1
  136. package/resources/ledger-account-categories.mjs +2 -0
  137. package/resources/ledger-account-categories.mjs.map +1 -1
  138. package/resources/ledger-account-payouts.d.ts +17 -9
  139. package/resources/ledger-account-payouts.d.ts.map +1 -1
  140. package/resources/ledger-account-payouts.js +25 -0
  141. package/resources/ledger-account-payouts.js.map +1 -1
  142. package/resources/ledger-account-payouts.mjs +2 -0
  143. package/resources/ledger-account-payouts.mjs.map +1 -1
  144. package/resources/ledger-account-statements.d.ts +7 -6
  145. package/resources/ledger-account-statements.d.ts.map +1 -1
  146. package/resources/ledger-account-statements.js.map +1 -1
  147. package/resources/ledger-account-statements.mjs.map +1 -1
  148. package/resources/ledger-accounts.d.ts +11 -12
  149. package/resources/ledger-accounts.d.ts.map +1 -1
  150. package/resources/ledger-accounts.js +25 -0
  151. package/resources/ledger-accounts.js.map +1 -1
  152. package/resources/ledger-accounts.mjs +2 -0
  153. package/resources/ledger-accounts.mjs.map +1 -1
  154. package/resources/ledger-entries.d.ts +9 -10
  155. package/resources/ledger-entries.d.ts.map +1 -1
  156. package/resources/ledger-entries.js +25 -0
  157. package/resources/ledger-entries.js.map +1 -1
  158. package/resources/ledger-entries.mjs +2 -0
  159. package/resources/ledger-entries.mjs.map +1 -1
  160. package/resources/ledger-event-handlers.d.ts +47 -270
  161. package/resources/ledger-event-handlers.d.ts.map +1 -1
  162. package/resources/ledger-event-handlers.js +29 -7
  163. package/resources/ledger-event-handlers.js.map +1 -1
  164. package/resources/ledger-event-handlers.mjs +4 -5
  165. package/resources/ledger-event-handlers.mjs.map +1 -1
  166. package/resources/ledger-transactions/ledger-transactions.d.ts +19 -20
  167. package/resources/ledger-transactions/ledger-transactions.d.ts.map +1 -1
  168. package/resources/ledger-transactions/ledger-transactions.js +6 -5
  169. package/resources/ledger-transactions/ledger-transactions.js.map +1 -1
  170. package/resources/ledger-transactions/ledger-transactions.mjs +6 -5
  171. package/resources/ledger-transactions/ledger-transactions.mjs.map +1 -1
  172. package/resources/ledger-transactions/versions.d.ts +7 -8
  173. package/resources/ledger-transactions/versions.d.ts.map +1 -1
  174. package/resources/ledger-transactions/versions.js +25 -0
  175. package/resources/ledger-transactions/versions.js.map +1 -1
  176. package/resources/ledger-transactions/versions.mjs +2 -0
  177. package/resources/ledger-transactions/versions.mjs.map +1 -1
  178. package/resources/ledgerable-events.d.ts +4 -41
  179. package/resources/ledgerable-events.d.ts.map +1 -1
  180. package/resources/ledgerable-events.js +1 -2
  181. package/resources/ledgerable-events.js.map +1 -1
  182. package/resources/ledgerable-events.mjs +1 -2
  183. package/resources/ledgerable-events.mjs.map +1 -1
  184. package/resources/ledgers.d.ts +7 -9
  185. package/resources/ledgers.d.ts.map +1 -1
  186. package/resources/ledgers.js +25 -0
  187. package/resources/ledgers.js.map +1 -1
  188. package/resources/ledgers.mjs +2 -0
  189. package/resources/ledgers.mjs.map +1 -1
  190. package/resources/line-items.d.ts +6 -8
  191. package/resources/line-items.d.ts.map +1 -1
  192. package/resources/line-items.js +25 -0
  193. package/resources/line-items.js.map +1 -1
  194. package/resources/line-items.mjs +2 -0
  195. package/resources/line-items.mjs.map +1 -1
  196. package/resources/paper-items.d.ts +5 -7
  197. package/resources/paper-items.d.ts.map +1 -1
  198. package/resources/paper-items.js +25 -0
  199. package/resources/paper-items.js.map +1 -1
  200. package/resources/paper-items.mjs +2 -0
  201. package/resources/paper-items.mjs.map +1 -1
  202. package/resources/payment-flows.d.ts +7 -9
  203. package/resources/payment-flows.d.ts.map +1 -1
  204. package/resources/payment-flows.js +25 -0
  205. package/resources/payment-flows.js.map +1 -1
  206. package/resources/payment-flows.mjs +2 -0
  207. package/resources/payment-flows.mjs.map +1 -1
  208. package/resources/payment-orders/payment-orders.d.ts +61 -50
  209. package/resources/payment-orders/payment-orders.d.ts.map +1 -1
  210. package/resources/payment-orders/payment-orders.js +6 -5
  211. package/resources/payment-orders/payment-orders.js.map +1 -1
  212. package/resources/payment-orders/payment-orders.mjs +6 -5
  213. package/resources/payment-orders/payment-orders.mjs.map +1 -1
  214. package/resources/payment-orders/reversals.d.ts +8 -9
  215. package/resources/payment-orders/reversals.d.ts.map +1 -1
  216. package/resources/payment-orders/reversals.js +25 -0
  217. package/resources/payment-orders/reversals.js.map +1 -1
  218. package/resources/payment-orders/reversals.mjs +2 -0
  219. package/resources/payment-orders/reversals.mjs.map +1 -1
  220. package/resources/payment-references.d.ts +5 -7
  221. package/resources/payment-references.d.ts.map +1 -1
  222. package/resources/payment-references.js +25 -0
  223. package/resources/payment-references.js.map +1 -1
  224. package/resources/payment-references.mjs +2 -0
  225. package/resources/payment-references.mjs.map +1 -1
  226. package/resources/returns.d.ts +11 -13
  227. package/resources/returns.d.ts.map +1 -1
  228. package/resources/returns.js +25 -0
  229. package/resources/returns.js.map +1 -1
  230. package/resources/returns.mjs +2 -0
  231. package/resources/returns.mjs.map +1 -1
  232. package/resources/routing-details.d.ts +16 -14
  233. package/resources/routing-details.d.ts.map +1 -1
  234. package/resources/routing-details.js +25 -0
  235. package/resources/routing-details.js.map +1 -1
  236. package/resources/routing-details.mjs +2 -0
  237. package/resources/routing-details.mjs.map +1 -1
  238. package/resources/shared.d.ts +1 -0
  239. package/resources/shared.d.ts.map +1 -1
  240. package/resources/top-level.d.ts +2 -2
  241. package/resources/top-level.d.ts.map +1 -1
  242. package/resources/transactions/line-items.d.ts +10 -7
  243. package/resources/transactions/line-items.d.ts.map +1 -1
  244. package/resources/transactions/line-items.js +25 -0
  245. package/resources/transactions/line-items.js.map +1 -1
  246. package/resources/transactions/line-items.mjs +2 -0
  247. package/resources/transactions/line-items.mjs.map +1 -1
  248. package/resources/transactions/transactions.d.ts +28 -30
  249. package/resources/transactions/transactions.d.ts.map +1 -1
  250. package/resources/transactions/transactions.js +6 -5
  251. package/resources/transactions/transactions.js.map +1 -1
  252. package/resources/transactions/transactions.mjs +6 -5
  253. package/resources/transactions/transactions.mjs.map +1 -1
  254. package/resources/validations.d.ts +14 -14
  255. package/resources/validations.d.ts.map +1 -1
  256. package/resources/validations.js.map +1 -1
  257. package/resources/validations.mjs.map +1 -1
  258. package/resources/virtual-accounts.d.ts +16 -16
  259. package/resources/virtual-accounts.d.ts.map +1 -1
  260. package/resources/virtual-accounts.js +25 -0
  261. package/resources/virtual-accounts.js.map +1 -1
  262. package/resources/virtual-accounts.mjs +2 -0
  263. package/resources/virtual-accounts.mjs.map +1 -1
  264. package/resources/webhooks.d.ts.map +1 -1
  265. package/resources/webhooks.js +2 -2
  266. package/resources/webhooks.js.map +1 -1
  267. package/resources/webhooks.mjs +3 -3
  268. package/resources/webhooks.mjs.map +1 -1
  269. package/shims/node.d.ts +1 -1
  270. package/shims/node.d.ts.map +1 -1
  271. package/shims/web.d.ts +1 -1
  272. package/shims/web.d.ts.map +1 -1
  273. package/src/_shims/auto/types.d.ts +3 -1
  274. package/src/_shims/index.d.ts +2 -0
  275. package/src/_shims/node-runtime.ts +4 -0
  276. package/src/_shims/node-types.d.ts +1 -1
  277. package/src/_shims/registry.ts +3 -0
  278. package/src/_shims/web-runtime.ts +12 -0
  279. package/src/_shims/web-types.d.ts +2 -1
  280. package/src/core.ts +39 -21
  281. package/src/error.ts +15 -5
  282. package/src/index.ts +23 -17
  283. package/src/resources/account-collection-flows.ts +9 -9
  284. package/src/resources/account-details.ts +6 -8
  285. package/src/resources/connections.ts +5 -7
  286. package/src/resources/counterparties.ts +28 -23
  287. package/src/resources/documents.ts +9 -8
  288. package/src/resources/events.ts +5 -7
  289. package/src/resources/expected-payments.ts +31 -14
  290. package/src/resources/external-accounts.ts +24 -20
  291. package/src/resources/incoming-payment-details.ts +13 -13
  292. package/src/resources/index.ts +3 -5
  293. package/src/resources/internal-accounts/balance-reports.ts +5 -7
  294. package/src/resources/internal-accounts/internal-accounts.ts +22 -23
  295. package/src/resources/invoices/invoices.ts +44 -71
  296. package/src/resources/invoices/line-items.ts +7 -9
  297. package/src/resources/ledger-account-balance-monitors.ts +7 -9
  298. package/src/resources/ledger-account-categories.ts +11 -12
  299. package/src/resources/ledger-account-payouts.ts +20 -9
  300. package/src/resources/ledger-account-statements.ts +7 -6
  301. package/src/resources/ledger-accounts.ts +11 -12
  302. package/src/resources/ledger-entries.ts +9 -10
  303. package/src/resources/ledger-event-handlers.ts +50 -333
  304. package/src/resources/ledger-transactions/ledger-transactions.ts +19 -21
  305. package/src/resources/ledger-transactions/versions.ts +7 -8
  306. package/src/resources/ledgerable-events.ts +4 -49
  307. package/src/resources/ledgers.ts +7 -9
  308. package/src/resources/line-items.ts +6 -8
  309. package/src/resources/paper-items.ts +5 -7
  310. package/src/resources/payment-flows.ts +7 -9
  311. package/src/resources/payment-orders/payment-orders.ts +84 -51
  312. package/src/resources/payment-orders/reversals.ts +8 -9
  313. package/src/resources/payment-references.ts +5 -7
  314. package/src/resources/returns.ts +12 -14
  315. package/src/resources/routing-details.ts +20 -10
  316. package/src/resources/shared.ts +2 -0
  317. package/src/resources/top-level.ts +2 -2
  318. package/src/resources/transactions/line-items.ts +11 -7
  319. package/src/resources/transactions/transactions.ts +30 -31
  320. package/src/resources/validations.ts +16 -11
  321. package/src/resources/virtual-accounts.ts +18 -14
  322. package/src/resources/webhooks.ts +4 -3
  323. package/src/shims/node.ts +1 -1
  324. package/src/shims/web.ts +1 -1
  325. package/src/version.ts +1 -1
  326. package/version.d.ts +1 -1
  327. package/version.js +1 -1
  328. package/version.mjs +1 -1
@@ -3,11 +3,11 @@
3
3
  import * as Core from "../treasury/core";
4
4
  import { APIResource } from "../treasury/resource";
5
5
  import { isRequestOptions } from "../treasury/core";
6
- import * as AccountDetails from "../treasury/resources/account-details";
7
- import * as RoutingDetails from "../treasury/resources/routing-details";
6
+ import * as ExternalAccountsAPI from "../treasury/resources/external-accounts";
7
+ import * as AccountDetailsAPI from "../treasury/resources/account-details";
8
+ import * as RoutingDetailsAPI from "../treasury/resources/routing-details";
8
9
  import * as Shared from "../treasury/resources/shared";
9
- import * as API from './index';
10
- import { Page, PageParams } from "../treasury/pagination";
10
+ import { Page, type PageParams } from "../treasury/pagination";
11
11
 
12
12
  export class ExternalAccounts extends APIResource {
13
13
  /**
@@ -141,13 +141,11 @@ export class ExternalAccounts extends APIResource {
141
141
  }
142
142
 
143
143
  export class ExternalAccountsPage extends Page<ExternalAccount> {}
144
- // alias so we can export it in the namespace
145
- type _ExternalAccountsPage = ExternalAccountsPage;
146
144
 
147
145
  export interface ExternalAccount {
148
146
  id: string;
149
147
 
150
- account_details: Array<AccountDetails.AccountDetail>;
148
+ account_details: Array<AccountDetailsAPI.AccountDetail>;
151
149
 
152
150
  /**
153
151
  * Can be `checking`, `savings` or `other`.
@@ -203,7 +201,7 @@ export interface ExternalAccount {
203
201
  */
204
202
  party_type: 'business' | 'individual' | null;
205
203
 
206
- routing_details: Array<RoutingDetails.RoutingDetail>;
204
+ routing_details: Array<RoutingDetailsAPI.RoutingDetail>;
207
205
 
208
206
  updated_at: string;
209
207
 
@@ -387,7 +385,7 @@ export namespace ExternalAccountCreateParams {
387
385
  /**
388
386
  * The normal balance of the ledger account.
389
387
  */
390
- normal_balance: 'credit' | 'debit';
388
+ normal_balance: Shared.TransactionDirection;
391
389
 
392
390
  /**
393
391
  * The currency exponent of the ledger account.
@@ -460,30 +458,34 @@ export namespace ExternalAccountCreateParams {
460
458
  | 'chips'
461
459
  | 'cnaps'
462
460
  | 'gb_sort_code'
461
+ | 'hk_interbank_clearing_code'
463
462
  | 'in_ifsc'
464
463
  | 'my_branch_code'
464
+ | 'nz_national_clearing_code'
465
465
  | 'swift'
466
466
  | 'jp_zengin_code';
467
467
 
468
468
  payment_type?:
469
469
  | 'ach'
470
470
  | 'au_becs'
471
- | 'se_bankgirot'
472
471
  | 'bacs'
473
472
  | 'book'
474
473
  | 'card'
474
+ | 'chats'
475
475
  | 'check'
476
- | 'eft'
477
476
  | 'cross_border'
477
+ | 'eft'
478
478
  | 'interac'
479
479
  | 'masav'
480
480
  | 'neft'
481
481
  | 'nics'
482
+ | 'nz_becs'
482
483
  | 'provxchange'
483
484
  | 'rtp'
485
+ | 'se_bankgirot'
484
486
  | 'sen'
485
- | 'sic'
486
487
  | 'sepa'
488
+ | 'sic'
487
489
  | 'signet'
488
490
  | 'wire'
489
491
  | 'zengin';
@@ -587,6 +589,7 @@ export interface ExternalAccountVerifyParams {
587
589
  | 'bacs'
588
590
  | 'book'
589
591
  | 'card'
592
+ | 'chats'
590
593
  | 'check'
591
594
  | 'cross_border'
592
595
  | 'eft'
@@ -594,6 +597,7 @@ export interface ExternalAccountVerifyParams {
594
597
  | 'masav'
595
598
  | 'neft'
596
599
  | 'nics'
600
+ | 'nz_becs'
597
601
  | 'provxchange'
598
602
  | 'rtp'
599
603
  | 'se_bankgirot'
@@ -611,12 +615,12 @@ export interface ExternalAccountVerifyParams {
611
615
  }
612
616
 
613
617
  export namespace ExternalAccounts {
614
- export import ExternalAccount = API.ExternalAccount;
615
- export import ExternalAccountType = API.ExternalAccountType;
616
- export type ExternalAccountsPage = _ExternalAccountsPage;
617
- export import ExternalAccountCreateParams = API.ExternalAccountCreateParams;
618
- export import ExternalAccountUpdateParams = API.ExternalAccountUpdateParams;
619
- export import ExternalAccountListParams = API.ExternalAccountListParams;
620
- export import ExternalAccountCompleteVerificationParams = API.ExternalAccountCompleteVerificationParams;
621
- export import ExternalAccountVerifyParams = API.ExternalAccountVerifyParams;
618
+ export import ExternalAccount = ExternalAccountsAPI.ExternalAccount;
619
+ export import ExternalAccountType = ExternalAccountsAPI.ExternalAccountType;
620
+ export import ExternalAccountsPage = ExternalAccountsAPI.ExternalAccountsPage;
621
+ export import ExternalAccountCreateParams = ExternalAccountsAPI.ExternalAccountCreateParams;
622
+ export import ExternalAccountUpdateParams = ExternalAccountsAPI.ExternalAccountUpdateParams;
623
+ export import ExternalAccountListParams = ExternalAccountsAPI.ExternalAccountListParams;
624
+ export import ExternalAccountCompleteVerificationParams = ExternalAccountsAPI.ExternalAccountCompleteVerificationParams;
625
+ export import ExternalAccountVerifyParams = ExternalAccountsAPI.ExternalAccountVerifyParams;
622
626
  }
@@ -3,10 +3,10 @@
3
3
  import * as Core from "../treasury/core";
4
4
  import { APIResource } from "../treasury/resource";
5
5
  import { isRequestOptions } from "../treasury/core";
6
+ import * as IncomingPaymentDetailsAPI from "../treasury/resources/incoming-payment-details";
6
7
  import * as Shared from "../treasury/resources/shared";
7
- import * as VirtualAccounts from "../treasury/resources/virtual-accounts";
8
- import * as API from './index';
9
- import { Page, PageParams } from "../treasury/pagination";
8
+ import * as VirtualAccountsAPI from "../treasury/resources/virtual-accounts";
9
+ import { Page, type PageParams } from "../treasury/pagination";
10
10
 
11
11
  export class IncomingPaymentDetails extends APIResource {
12
12
  /**
@@ -88,8 +88,6 @@ export class IncomingPaymentDetails extends APIResource {
88
88
  }
89
89
 
90
90
  export class IncomingPaymentDetailsPage extends Page<IncomingPaymentDetail> {}
91
- // alias so we can export it in the namespace
92
- type _IncomingPaymentDetailsPage = IncomingPaymentDetailsPage;
93
91
 
94
92
  export interface IncomingPaymentDetail {
95
93
  id: string;
@@ -120,7 +118,7 @@ export interface IncomingPaymentDetail {
120
118
  /**
121
119
  * One of `credit` or `debit`.
122
120
  */
123
- direction: 'credit' | 'debit';
121
+ direction: Shared.TransactionDirection;
124
122
 
125
123
  /**
126
124
  * The ID of the Internal Account for the incoming payment detail. This is always
@@ -175,9 +173,11 @@ export interface IncomingPaymentDetail {
175
173
  | 'chips'
176
174
  | 'cnaps'
177
175
  | 'gb_sort_code'
176
+ | 'hk_interbank_clearing_code'
178
177
  | 'in_ifsc'
179
178
  | 'jp_zengin_code'
180
179
  | 'my_branch_code'
180
+ | 'nz_national_clearing_code'
181
181
  | 'se_bankgiro_clearing_code'
182
182
  | 'swift'
183
183
  | null;
@@ -215,7 +215,7 @@ export interface IncomingPaymentDetail {
215
215
  * If the incoming payment detail is in a virtual account, the serialized virtual
216
216
  * account object.
217
217
  */
218
- virtual_account: VirtualAccounts.VirtualAccount | null;
218
+ virtual_account: VirtualAccountsAPI.VirtualAccount | null;
219
219
 
220
220
  /**
221
221
  * If the incoming payment detail is in a virtual account, the ID of the Virtual
@@ -253,7 +253,7 @@ export interface IncomingPaymentDetailListParams extends PageParams {
253
253
  /**
254
254
  * One of `credit` or `debit`.
255
255
  */
256
- direction?: 'credit' | 'debit';
256
+ direction?: Shared.TransactionDirection;
257
257
 
258
258
  /**
259
259
  * For example, if you want to query for records with metadata key `Type` and value
@@ -326,9 +326,9 @@ export interface IncomingPaymentDetailCreateAsyncParams {
326
326
  }
327
327
 
328
328
  export namespace IncomingPaymentDetails {
329
- export import IncomingPaymentDetail = API.IncomingPaymentDetail;
330
- export type IncomingPaymentDetailsPage = _IncomingPaymentDetailsPage;
331
- export import IncomingPaymentDetailUpdateParams = API.IncomingPaymentDetailUpdateParams;
332
- export import IncomingPaymentDetailListParams = API.IncomingPaymentDetailListParams;
333
- export import IncomingPaymentDetailCreateAsyncParams = API.IncomingPaymentDetailCreateAsyncParams;
329
+ export import IncomingPaymentDetail = IncomingPaymentDetailsAPI.IncomingPaymentDetail;
330
+ export import IncomingPaymentDetailsPage = IncomingPaymentDetailsAPI.IncomingPaymentDetailsPage;
331
+ export import IncomingPaymentDetailUpdateParams = IncomingPaymentDetailsAPI.IncomingPaymentDetailUpdateParams;
332
+ export import IncomingPaymentDetailListParams = IncomingPaymentDetailsAPI.IncomingPaymentDetailListParams;
333
+ export import IncomingPaymentDetailCreateAsyncParams = IncomingPaymentDetailsAPI.IncomingPaymentDetailCreateAsyncParams;
334
334
  }
@@ -129,13 +129,11 @@ export {
129
129
  LedgerEntries,
130
130
  } from './ledger-entries';
131
131
  export {
132
- LedgerEventHandlerCreateResponse,
133
- LedgerEventHandlerRetrieveResponse,
134
- LedgerEventHandlerListResponse,
135
- LedgerEventHandlerDeleteResponse,
132
+ LedgerEventHandler,
133
+ LedgerEventHandlerVariable,
136
134
  LedgerEventHandlerCreateParams,
137
135
  LedgerEventHandlerListParams,
138
- LedgerEventHandlerListResponsesPage,
136
+ LedgerEventHandlersPage,
139
137
  LedgerEventHandlers,
140
138
  } from './ledger-event-handlers';
141
139
  export {
@@ -3,9 +3,9 @@
3
3
  import * as Core from "../../treasury/core";
4
4
  import { APIResource } from "../../treasury/resource";
5
5
  import { isRequestOptions } from "../../treasury/core";
6
+ import * as BalanceReportsAPI from "../../treasury/resources/internal-accounts/balance-reports";
6
7
  import * as Shared from "../../treasury/resources/shared";
7
- import * as API from './index';
8
- import { Page, PageParams } from "../../treasury/pagination";
8
+ import { Page, type PageParams } from "../../treasury/pagination";
9
9
 
10
10
  export class BalanceReports extends APIResource {
11
11
  /**
@@ -48,8 +48,6 @@ export class BalanceReports extends APIResource {
48
48
  }
49
49
 
50
50
  export class BalanceReportsPage extends Page<BalanceReport> {}
51
- // alias so we can export it in the namespace
52
- type _BalanceReportsPage = BalanceReportsPage;
53
51
 
54
52
  export interface BalanceReport {
55
53
  id: string;
@@ -182,7 +180,7 @@ export interface BalanceReportListParams extends PageParams {
182
180
  }
183
181
 
184
182
  export namespace BalanceReports {
185
- export import BalanceReport = API.BalanceReport;
186
- export type BalanceReportsPage = _BalanceReportsPage;
187
- export import BalanceReportListParams = API.BalanceReportListParams;
183
+ export import BalanceReport = BalanceReportsAPI.BalanceReport;
184
+ export import BalanceReportsPage = BalanceReportsAPI.BalanceReportsPage;
185
+ export import BalanceReportListParams = BalanceReportsAPI.BalanceReportListParams;
188
186
  }
@@ -3,16 +3,16 @@
3
3
  import * as Core from "../../treasury/core";
4
4
  import { APIResource } from "../../treasury/resource";
5
5
  import { isRequestOptions } from "../../treasury/core";
6
- import * as AccountDetails from "../../treasury/resources/account-details";
7
- import * as Connections from "../../treasury/resources/connections";
6
+ import * as InternalAccountsAPI from "../../treasury/resources/internal-accounts/internal-accounts";
7
+ import * as AccountDetailsAPI from "../../treasury/resources/account-details";
8
+ import * as ConnectionsAPI from "../../treasury/resources/connections";
9
+ import * as RoutingDetailsAPI from "../../treasury/resources/routing-details";
8
10
  import * as Shared from "../../treasury/resources/shared";
9
- import * as RoutingDetails from "../../treasury/resources/routing-details";
10
- import { BalanceReports } from './balance-reports';
11
- import * as API from './index';
12
- import { Page, PageParams } from "../../treasury/pagination";
11
+ import * as BalanceReportsAPI from "../../treasury/resources/internal-accounts/balance-reports";
12
+ import { Page, type PageParams } from "../../treasury/pagination";
13
13
 
14
14
  export class InternalAccounts extends APIResource {
15
- balanceReports: BalanceReports = new BalanceReports(this.client);
15
+ balanceReports: BalanceReportsAPI.BalanceReports = new BalanceReportsAPI.BalanceReports(this.client);
16
16
 
17
17
  /**
18
18
  * create internal account
@@ -82,8 +82,6 @@ export class InternalAccounts extends APIResource {
82
82
  }
83
83
 
84
84
  export class InternalAccountsPage extends Page<InternalAccount> {}
85
- // alias so we can export it in the namespace
86
- type _InternalAccountsPage = InternalAccountsPage;
87
85
 
88
86
  export interface InternalAccount {
89
87
  id: string;
@@ -91,7 +89,7 @@ export interface InternalAccount {
91
89
  /**
92
90
  * An array of account detail objects.
93
91
  */
94
- account_details: Array<AccountDetails.AccountDetail>;
92
+ account_details: Array<AccountDetailsAPI.AccountDetail>;
95
93
 
96
94
  /**
97
95
  * Can be checking, savings or other.
@@ -101,7 +99,7 @@ export interface InternalAccount {
101
99
  /**
102
100
  * Specifies which financial institution the accounts belong to.
103
101
  */
104
- connection: Connections.Connection;
102
+ connection: ConnectionsAPI.Connection;
105
103
 
106
104
  /**
107
105
  * The Counterparty associated to this account.
@@ -163,7 +161,7 @@ export interface InternalAccount {
163
161
  /**
164
162
  * An array of routing detail objects.
165
163
  */
166
- routing_details: Array<RoutingDetails.RoutingDetail>;
164
+ routing_details: Array<RoutingDetailsAPI.RoutingDetail>;
167
165
 
168
166
  updated_at: string;
169
167
  }
@@ -332,7 +330,7 @@ export interface InternalAccountListParams extends PageParams {
332
330
  /**
333
331
  * The direction of payments that can be made by internal account.
334
332
  */
335
- payment_direction?: 'credit' | 'debit';
333
+ payment_direction?: Shared.TransactionDirection;
336
334
 
337
335
  /**
338
336
  * The type of payment that can be made by the internal account.
@@ -343,6 +341,7 @@ export interface InternalAccountListParams extends PageParams {
343
341
  | 'bacs'
344
342
  | 'book'
345
343
  | 'card'
344
+ | 'chats'
346
345
  | 'check'
347
346
  | 'cross_border'
348
347
  | 'eft'
@@ -350,6 +349,7 @@ export interface InternalAccountListParams extends PageParams {
350
349
  | 'masav'
351
350
  | 'neft'
352
351
  | 'nics'
352
+ | 'nz_becs'
353
353
  | 'provxchange'
354
354
  | 'rtp'
355
355
  | 'se_bankgirot'
@@ -362,14 +362,13 @@ export interface InternalAccountListParams extends PageParams {
362
362
  }
363
363
 
364
364
  export namespace InternalAccounts {
365
- export import InternalAccount = API.InternalAccount;
366
- export type InternalAccountsPage = _InternalAccountsPage;
367
- export import InternalAccountCreateParams = API.InternalAccountCreateParams;
368
- export import InternalAccountUpdateParams = API.InternalAccountUpdateParams;
369
- export import InternalAccountListParams = API.InternalAccountListParams;
370
-
371
- export import BalanceReports = API.BalanceReports;
372
- export import BalanceReport = API.BalanceReport;
373
- export import BalanceReportsPage = API.BalanceReportsPage;
374
- export import BalanceReportListParams = API.BalanceReportListParams;
365
+ export import InternalAccount = InternalAccountsAPI.InternalAccount;
366
+ export import InternalAccountsPage = InternalAccountsAPI.InternalAccountsPage;
367
+ export import InternalAccountCreateParams = InternalAccountsAPI.InternalAccountCreateParams;
368
+ export import InternalAccountUpdateParams = InternalAccountsAPI.InternalAccountUpdateParams;
369
+ export import InternalAccountListParams = InternalAccountsAPI.InternalAccountListParams;
370
+ export import BalanceReports = BalanceReportsAPI.BalanceReports;
371
+ export import BalanceReport = BalanceReportsAPI.BalanceReport;
372
+ export import BalanceReportsPage = BalanceReportsAPI.BalanceReportsPage;
373
+ export import BalanceReportListParams = BalanceReportsAPI.BalanceReportListParams;
375
374
  }
@@ -3,14 +3,15 @@
3
3
  import * as Core from "../../treasury/core";
4
4
  import { APIResource } from "../../treasury/resource";
5
5
  import { isRequestOptions } from "../../treasury/core";
6
+ import * as InvoicesAPI from "../../treasury/resources/invoices/invoices";
7
+ import * as ExpectedPaymentsAPI from "../../treasury/resources/expected-payments";
6
8
  import * as Shared from "../../treasury/resources/shared";
7
- import * as PaymentOrders from "../../treasury/resources/payment-orders/index";
8
- import { LineItems } from './line-items';
9
- import * as API from './index';
10
- import { Page, PageParams } from "../../treasury/pagination";
9
+ import * as LineItemsAPI from "../../treasury/resources/invoices/line-items";
10
+ import * as PaymentOrdersAPI from "../../treasury/resources/payment-orders/payment-orders";
11
+ import { Page, type PageParams } from "../../treasury/pagination";
11
12
 
12
13
  export class Invoices extends APIResource {
13
- lineItems: LineItems = new LineItems(this.client);
14
+ lineItems: LineItemsAPI.LineItems = new LineItemsAPI.LineItems(this.client);
14
15
 
15
16
  /**
16
17
  * create invoice
@@ -80,12 +81,22 @@ export class Invoices extends APIResource {
80
81
  }
81
82
 
82
83
  export class InvoicesPage extends Page<Invoice> {}
83
- // alias so we can export it in the namespace
84
- type _InvoicesPage = InvoicesPage;
85
84
 
86
85
  export interface Invoice {
87
86
  id: string;
88
87
 
88
+ /**
89
+ * Amount paid on the invoice in specified currency's smallest unit, e.g., $10 USD
90
+ * would be represented as 1000.
91
+ */
92
+ amount_paid: number;
93
+
94
+ /**
95
+ * Amount remaining due on the invoice in specified currency's smallest unit, e.g.,
96
+ * $10 USD would be represented as 1000.
97
+ */
98
+ amount_remaining: number;
99
+
89
100
  /**
90
101
  * The invoicer's contact details displayed at the top of the invoice.
91
102
  */
@@ -123,6 +134,11 @@ export interface Invoice {
123
134
  */
124
135
  due_date: string;
125
136
 
137
+ /**
138
+ * The expected payments created for an unpaid invoice.
139
+ */
140
+ expected_payments: Array<ExpectedPaymentsAPI.ExpectedPayment>;
141
+
126
142
  /**
127
143
  * The URL of the hosted web UI where the invoice can be viewed.
128
144
  */
@@ -181,7 +197,7 @@ export interface Invoice {
181
197
  * The payment orders created for paying the invoice through the invoice payment
182
198
  * UI.
183
199
  */
184
- payment_orders: Array<PaymentOrders.PaymentOrder>;
200
+ payment_orders: Array<PaymentOrdersAPI.PaymentOrder>;
185
201
 
186
202
  /**
187
203
  * One of `ach` or `eft`.
@@ -213,7 +229,7 @@ export interface Invoice {
213
229
  /**
214
230
  * The status of the invoice.
215
231
  */
216
- status: 'draft' | 'paid' | 'payment_pending' | 'unpaid' | 'voided';
232
+ status: 'draft' | 'paid' | 'partially_paid' | 'payment_pending' | 'unpaid' | 'voided';
217
233
 
218
234
  /**
219
235
  * Total amount due in specified currency's smallest unit, e.g., $10 USD would be
@@ -423,31 +439,10 @@ export interface InvoiceCreateParams {
423
439
 
424
440
  /**
425
441
  * One of `ach`, `bankgirot`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`,
426
- * `bacs`, `au_becs`, `interac`, `neft`, `nics`, `sic`, `signet`, `provexchange`,
427
- * `zengin`.
428
- */
429
- payment_type?:
430
- | 'ach'
431
- | 'au_becs'
432
- | 'se_bankgirot'
433
- | 'bacs'
434
- | 'book'
435
- | 'card'
436
- | 'check'
437
- | 'eft'
438
- | 'cross_border'
439
- | 'interac'
440
- | 'masav'
441
- | 'neft'
442
- | 'nics'
443
- | 'provxchange'
444
- | 'rtp'
445
- | 'sen'
446
- | 'sic'
447
- | 'sepa'
448
- | 'signet'
449
- | 'wire'
450
- | 'zengin';
442
+ * `bacs`, `au_becs`, `interac`, `neft`, `nics`, `nz_national_clearing_code`,
443
+ * `sic`, `signet`, `provexchange`, `zengin`.
444
+ */
445
+ payment_type?: PaymentOrdersAPI.PaymentOrderType;
451
446
 
452
447
  /**
453
448
  * The receiving account ID. Can be an `external_account`.
@@ -661,31 +656,10 @@ export interface InvoiceUpdateParams {
661
656
 
662
657
  /**
663
658
  * One of `ach`, `bankgirot`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`,
664
- * `bacs`, `au_becs`, `interac`, `neft`, `nics`, `sic`, `signet`, `provexchange`,
665
- * `zengin`.
666
- */
667
- payment_type?:
668
- | 'ach'
669
- | 'au_becs'
670
- | 'se_bankgirot'
671
- | 'bacs'
672
- | 'book'
673
- | 'card'
674
- | 'check'
675
- | 'eft'
676
- | 'cross_border'
677
- | 'interac'
678
- | 'masav'
679
- | 'neft'
680
- | 'nics'
681
- | 'provxchange'
682
- | 'rtp'
683
- | 'sen'
684
- | 'sic'
685
- | 'sepa'
686
- | 'signet'
687
- | 'wire'
688
- | 'zengin';
659
+ * `bacs`, `au_becs`, `interac`, `neft`, `nics`, `nz_national_clearing_code`,
660
+ * `sic`, `signet`, `provexchange`, `zengin`.
661
+ */
662
+ payment_type?: PaymentOrdersAPI.PaymentOrderType;
689
663
 
690
664
  /**
691
665
  * The receiving account ID. Can be an `external_account`.
@@ -831,16 +805,15 @@ export namespace InvoiceUpdateParams {
831
805
  export interface InvoiceListParams extends PageParams {}
832
806
 
833
807
  export namespace Invoices {
834
- export import Invoice = API.Invoice;
835
- export type InvoicesPage = _InvoicesPage;
836
- export import InvoiceCreateParams = API.InvoiceCreateParams;
837
- export import InvoiceUpdateParams = API.InvoiceUpdateParams;
838
- export import InvoiceListParams = API.InvoiceListParams;
839
-
840
- export import LineItems = API.LineItems;
841
- export import InvoiceLineItem = API.InvoiceLineItem;
842
- export import InvoiceLineItemsPage = API.InvoiceLineItemsPage;
843
- export import LineItemCreateParams = API.LineItemCreateParams;
844
- export import LineItemUpdateParams = API.LineItemUpdateParams;
845
- export import LineItemListParams = API.LineItemListParams;
808
+ export import Invoice = InvoicesAPI.Invoice;
809
+ export import InvoicesPage = InvoicesAPI.InvoicesPage;
810
+ export import InvoiceCreateParams = InvoicesAPI.InvoiceCreateParams;
811
+ export import InvoiceUpdateParams = InvoicesAPI.InvoiceUpdateParams;
812
+ export import InvoiceListParams = InvoicesAPI.InvoiceListParams;
813
+ export import LineItems = LineItemsAPI.LineItems;
814
+ export import InvoiceLineItem = LineItemsAPI.InvoiceLineItem;
815
+ export import InvoiceLineItemsPage = LineItemsAPI.InvoiceLineItemsPage;
816
+ export import LineItemCreateParams = LineItemsAPI.LineItemCreateParams;
817
+ export import LineItemUpdateParams = LineItemsAPI.LineItemUpdateParams;
818
+ export import LineItemListParams = LineItemsAPI.LineItemListParams;
846
819
  }
@@ -3,8 +3,8 @@
3
3
  import * as Core from "../../treasury/core";
4
4
  import { APIResource } from "../../treasury/resource";
5
5
  import { isRequestOptions } from "../../treasury/core";
6
- import * as API from './index';
7
- import { Page, PageParams } from "../../treasury/pagination";
6
+ import * as LineItemsAPI from "../../treasury/resources/invoices/line-items";
7
+ import { Page, type PageParams } from "../../treasury/pagination";
8
8
 
9
9
  export class LineItems extends APIResource {
10
10
  /**
@@ -93,8 +93,6 @@ export class LineItems extends APIResource {
93
93
  }
94
94
 
95
95
  export class InvoiceLineItemsPage extends Page<InvoiceLineItem> {}
96
- // alias so we can export it in the namespace
97
- type _InvoiceLineItemsPage = InvoiceLineItemsPage;
98
96
 
99
97
  export interface InvoiceLineItem {
100
98
  id: string;
@@ -212,9 +210,9 @@ export interface LineItemUpdateParams {
212
210
  export interface LineItemListParams extends PageParams {}
213
211
 
214
212
  export namespace LineItems {
215
- export import InvoiceLineItem = API.InvoiceLineItem;
216
- export type InvoiceLineItemsPage = _InvoiceLineItemsPage;
217
- export import LineItemCreateParams = API.LineItemCreateParams;
218
- export import LineItemUpdateParams = API.LineItemUpdateParams;
219
- export import LineItemListParams = API.LineItemListParams;
213
+ export import InvoiceLineItem = LineItemsAPI.InvoiceLineItem;
214
+ export import InvoiceLineItemsPage = LineItemsAPI.InvoiceLineItemsPage;
215
+ export import LineItemCreateParams = LineItemsAPI.LineItemCreateParams;
216
+ export import LineItemUpdateParams = LineItemsAPI.LineItemUpdateParams;
217
+ export import LineItemListParams = LineItemsAPI.LineItemListParams;
220
218
  }
@@ -3,8 +3,8 @@
3
3
  import * as Core from "../treasury/core";
4
4
  import { APIResource } from "../treasury/resource";
5
5
  import { isRequestOptions } from "../treasury/core";
6
- import * as API from './index';
7
- import { Page, PageParams } from "../treasury/pagination";
6
+ import * as LedgerAccountBalanceMonitorsAPI from "../treasury/resources/ledger-account-balance-monitors";
7
+ import { Page, type PageParams } from "../treasury/pagination";
8
8
 
9
9
  export class LedgerAccountBalanceMonitors extends APIResource {
10
10
  /**
@@ -87,8 +87,6 @@ export class LedgerAccountBalanceMonitors extends APIResource {
87
87
  }
88
88
 
89
89
  export class LedgerAccountBalanceMonitorsPage extends Page<LedgerAccountBalanceMonitor> {}
90
- // alias so we can export it in the namespace
91
- type _LedgerAccountBalanceMonitorsPage = LedgerAccountBalanceMonitorsPage;
92
90
 
93
91
  export interface LedgerAccountBalanceMonitor {
94
92
  id: string;
@@ -355,9 +353,9 @@ export interface LedgerAccountBalanceMonitorListParams extends PageParams {
355
353
  }
356
354
 
357
355
  export namespace LedgerAccountBalanceMonitors {
358
- export import LedgerAccountBalanceMonitor = API.LedgerAccountBalanceMonitor;
359
- export type LedgerAccountBalanceMonitorsPage = _LedgerAccountBalanceMonitorsPage;
360
- export import LedgerAccountBalanceMonitorCreateParams = API.LedgerAccountBalanceMonitorCreateParams;
361
- export import LedgerAccountBalanceMonitorUpdateParams = API.LedgerAccountBalanceMonitorUpdateParams;
362
- export import LedgerAccountBalanceMonitorListParams = API.LedgerAccountBalanceMonitorListParams;
356
+ export import LedgerAccountBalanceMonitor = LedgerAccountBalanceMonitorsAPI.LedgerAccountBalanceMonitor;
357
+ export import LedgerAccountBalanceMonitorsPage = LedgerAccountBalanceMonitorsAPI.LedgerAccountBalanceMonitorsPage;
358
+ export import LedgerAccountBalanceMonitorCreateParams = LedgerAccountBalanceMonitorsAPI.LedgerAccountBalanceMonitorCreateParams;
359
+ export import LedgerAccountBalanceMonitorUpdateParams = LedgerAccountBalanceMonitorsAPI.LedgerAccountBalanceMonitorUpdateParams;
360
+ export import LedgerAccountBalanceMonitorListParams = LedgerAccountBalanceMonitorsAPI.LedgerAccountBalanceMonitorListParams;
363
361
  }
@@ -3,8 +3,9 @@
3
3
  import * as Core from "../treasury/core";
4
4
  import { APIResource } from "../treasury/resource";
5
5
  import { isRequestOptions } from "../treasury/core";
6
- import * as API from './index';
7
- import { Page, PageParams } from "../treasury/pagination";
6
+ import * as LedgerAccountCategoriesAPI from "../treasury/resources/ledger-account-categories";
7
+ import * as Shared from "../treasury/resources/shared";
8
+ import { Page, type PageParams } from "../treasury/pagination";
8
9
 
9
10
  export class LedgerAccountCategories extends APIResource {
10
11
  /**
@@ -150,8 +151,6 @@ export class LedgerAccountCategories extends APIResource {
150
151
  }
151
152
 
152
153
  export class LedgerAccountCategoriesPage extends Page<LedgerAccountCategory> {}
153
- // alias so we can export it in the namespace
154
- type _LedgerAccountCategoriesPage = LedgerAccountCategoriesPage;
155
154
 
156
155
  export interface LedgerAccountCategory {
157
156
  id: string;
@@ -199,7 +198,7 @@ export interface LedgerAccountCategory {
199
198
  /**
200
199
  * The normal balance of the ledger account category.
201
200
  */
202
- normal_balance: 'credit' | 'debit';
201
+ normal_balance: Shared.TransactionDirection;
203
202
 
204
203
  object: string;
205
204
 
@@ -322,7 +321,7 @@ export interface LedgerAccountCategoryCreateParams {
322
321
  /**
323
322
  * The normal balance of the ledger account category.
324
323
  */
325
- normal_balance: 'credit' | 'debit';
324
+ normal_balance: Shared.TransactionDirection;
326
325
 
327
326
  /**
328
327
  * The currency exponent of the ledger account category.
@@ -430,10 +429,10 @@ export namespace LedgerAccountCategoryListParams {
430
429
  }
431
430
 
432
431
  export namespace LedgerAccountCategories {
433
- export import LedgerAccountCategory = API.LedgerAccountCategory;
434
- export type LedgerAccountCategoriesPage = _LedgerAccountCategoriesPage;
435
- export import LedgerAccountCategoryCreateParams = API.LedgerAccountCategoryCreateParams;
436
- export import LedgerAccountCategoryRetrieveParams = API.LedgerAccountCategoryRetrieveParams;
437
- export import LedgerAccountCategoryUpdateParams = API.LedgerAccountCategoryUpdateParams;
438
- export import LedgerAccountCategoryListParams = API.LedgerAccountCategoryListParams;
432
+ export import LedgerAccountCategory = LedgerAccountCategoriesAPI.LedgerAccountCategory;
433
+ export import LedgerAccountCategoriesPage = LedgerAccountCategoriesAPI.LedgerAccountCategoriesPage;
434
+ export import LedgerAccountCategoryCreateParams = LedgerAccountCategoriesAPI.LedgerAccountCategoryCreateParams;
435
+ export import LedgerAccountCategoryRetrieveParams = LedgerAccountCategoriesAPI.LedgerAccountCategoryRetrieveParams;
436
+ export import LedgerAccountCategoryUpdateParams = LedgerAccountCategoriesAPI.LedgerAccountCategoryUpdateParams;
437
+ export import LedgerAccountCategoryListParams = LedgerAccountCategoriesAPI.LedgerAccountCategoryListParams;
439
438
  }