modern-treasury 2.7.2 → 2.9.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 (329) hide show
  1. package/CHANGELOG.md +57 -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 +25 -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 +75 -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 +3 -1
  275. package/src/_shims/index.mjs +1 -1
  276. package/src/_shims/node-runtime.ts +4 -0
  277. package/src/_shims/node-types.d.ts +1 -1
  278. package/src/_shims/registry.ts +3 -0
  279. package/src/_shims/web-runtime.ts +12 -0
  280. package/src/_shims/web-types.d.ts +2 -1
  281. package/src/core.ts +39 -21
  282. package/src/error.ts +15 -5
  283. package/src/index.ts +23 -17
  284. package/src/resources/account-collection-flows.ts +12 -12
  285. package/src/resources/account-details.ts +10 -12
  286. package/src/resources/connections.ts +8 -10
  287. package/src/resources/counterparties.ts +32 -26
  288. package/src/resources/documents.ts +13 -12
  289. package/src/resources/events.ts +8 -10
  290. package/src/resources/expected-payments.ts +37 -18
  291. package/src/resources/external-accounts.ts +30 -24
  292. package/src/resources/incoming-payment-details.ts +17 -17
  293. package/src/resources/index.ts +3 -5
  294. package/src/resources/internal-accounts/balance-reports.ts +9 -11
  295. package/src/resources/internal-accounts/internal-accounts.ts +32 -27
  296. package/src/resources/invoices/invoices.ts +56 -35
  297. package/src/resources/invoices/line-items.ts +10 -12
  298. package/src/resources/ledger-account-balance-monitors.ts +10 -12
  299. package/src/resources/ledger-account-categories.ts +14 -15
  300. package/src/resources/ledger-account-payouts.ts +23 -12
  301. package/src/resources/ledger-account-statements.ts +9 -8
  302. package/src/resources/ledger-accounts.ts +14 -15
  303. package/src/resources/ledger-entries.ts +12 -13
  304. package/src/resources/ledger-event-handlers.ts +53 -336
  305. package/src/resources/ledger-transactions/ledger-transactions.ts +22 -24
  306. package/src/resources/ledger-transactions/versions.ts +10 -11
  307. package/src/resources/ledgerable-events.ts +6 -51
  308. package/src/resources/ledgers.ts +10 -12
  309. package/src/resources/line-items.ts +9 -11
  310. package/src/resources/paper-items.ts +9 -11
  311. package/src/resources/payment-flows.ts +10 -12
  312. package/src/resources/payment-orders/payment-orders.ts +110 -56
  313. package/src/resources/payment-orders/reversals.ts +11 -12
  314. package/src/resources/payment-references.ts +8 -10
  315. package/src/resources/returns.ts +16 -18
  316. package/src/resources/routing-details.ts +26 -14
  317. package/src/resources/shared.ts +2 -0
  318. package/src/resources/top-level.ts +2 -2
  319. package/src/resources/transactions/line-items.ts +14 -10
  320. package/src/resources/transactions/transactions.ts +35 -35
  321. package/src/resources/validations.ts +19 -13
  322. package/src/resources/virtual-accounts.ts +22 -17
  323. package/src/resources/webhooks.ts +6 -5
  324. package/src/shims/node.ts +1 -1
  325. package/src/shims/web.ts +1 -1
  326. package/src/version.ts +1 -1
  327. package/version.d.ts +1 -1
  328. package/version.js +1 -1
  329. package/version.mjs +1 -1
@@ -1,201 +1,42 @@
1
1
  import * as Core from 'modern-treasury/core';
2
2
  import { APIResource } from 'modern-treasury/resource';
3
- import * as API from "./index.js";
4
- import { Page, PageParams } from 'modern-treasury/pagination';
3
+ import * as LedgerEventHandlersAPI from 'modern-treasury/resources/ledger-event-handlers';
4
+ import { Page, type PageParams } from 'modern-treasury/pagination';
5
5
  export declare class LedgerEventHandlers extends APIResource {
6
6
  /**
7
7
  * create ledger_event_handler
8
8
  */
9
- create(params: LedgerEventHandlerCreateParams, options?: Core.RequestOptions): Core.APIPromise<LedgerEventHandlerCreateResponse>;
9
+ create(params: LedgerEventHandlerCreateParams, options?: Core.RequestOptions): Core.APIPromise<LedgerEventHandler>;
10
10
  /**
11
11
  * Get details on a single ledger event handler.
12
12
  */
13
- retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<LedgerEventHandlerRetrieveResponse>;
13
+ retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<LedgerEventHandler>;
14
14
  /**
15
15
  * Get a list of ledger event handlers.
16
16
  */
17
- list(query?: LedgerEventHandlerListParams, options?: Core.RequestOptions): Core.PagePromise<LedgerEventHandlerListResponsesPage, LedgerEventHandlerListResponse>;
18
- list(options?: Core.RequestOptions): Core.PagePromise<LedgerEventHandlerListResponsesPage, LedgerEventHandlerListResponse>;
17
+ list(query?: LedgerEventHandlerListParams, options?: Core.RequestOptions): Core.PagePromise<LedgerEventHandlersPage, LedgerEventHandler>;
18
+ list(options?: Core.RequestOptions): Core.PagePromise<LedgerEventHandlersPage, LedgerEventHandler>;
19
19
  /**
20
20
  * Archive a ledger event handler.
21
21
  */
22
- del(id: string, options?: Core.RequestOptions): Core.APIPromise<LedgerEventHandlerDeleteResponse>;
22
+ del(id: string, options?: Core.RequestOptions): Core.APIPromise<LedgerEventHandler>;
23
23
  }
24
- export declare class LedgerEventHandlerListResponsesPage extends Page<LedgerEventHandlerListResponse> {
24
+ export declare class LedgerEventHandlersPage extends Page<LedgerEventHandler> {
25
25
  }
26
- type _LedgerEventHandlerListResponsesPage = LedgerEventHandlerListResponsesPage;
27
- export interface LedgerEventHandlerCreateResponse {
26
+ export interface LedgerEventHandler {
28
27
  id: string;
29
- conditions: LedgerEventHandlerCreateResponse.Conditions | null;
28
+ conditions: LedgerEventHandler.Conditions | null;
30
29
  created_at: string;
31
30
  /**
32
31
  * An optional description.
33
32
  */
34
33
  description: string | null;
35
34
  discarded_at: string | null;
36
- ledger_transaction_template: LedgerEventHandlerCreateResponse.LedgerTransactionTemplate;
37
35
  /**
38
- * This field will be true if this object exists in the live environment or false
39
- * if it exists in the test environment.
40
- */
41
- live_mode: boolean;
42
- /**
43
- * Additional data represented as key-value pairs. Both the key and value must be
44
- * strings.
45
- */
46
- metadata: Record<string, string> | null;
47
- /**
48
- * Name of the ledger event handler.
49
- */
50
- name: string;
51
- object: string;
52
- updated_at: string;
53
- }
54
- export declare namespace LedgerEventHandlerCreateResponse {
55
- interface Conditions {
56
- /**
57
- * The field you're fetching from the `ledgerable_event`.
58
- */
59
- field: string;
60
- /**
61
- * What the operator between the `field` and `value` is. Currently only supports
62
- * `equals`.
63
- */
64
- operator: string;
65
- /**
66
- * What raw string you are comparing the `field` against.
67
- */
68
- value: string;
69
- }
70
- interface LedgerTransactionTemplate {
71
- /**
72
- * An optional description for internal use.
73
- */
74
- description: string | null;
75
- /**
76
- * The timestamp (ISO8601 format) at which the ledger transaction happened for
77
- * reporting purposes.
78
- */
79
- effective_at: string | null;
80
- /**
81
- * An array of ledger entry objects.
82
- */
83
- ledger_entries: Array<LedgerTransactionTemplate.LedgerEntry>;
84
- /**
85
- * Additional data represented as key-value pairs. Both the key and value must be
86
- * strings.
87
- */
88
- metadata: Record<string, string> | null;
89
- }
90
- namespace LedgerTransactionTemplate {
91
- interface LedgerEntry {
92
- /**
93
- * The field you're fetching from the `ledgerable_event`.
94
- */
95
- amount: string;
96
- /**
97
- * What the operator between the `field` and `value` is. Currently only supports
98
- * `equals`.
99
- */
100
- direction: string;
101
- /**
102
- * What raw string you are comparing the `field` against.
103
- */
104
- ledger_account_id: string;
105
- }
106
- }
107
- }
108
- export interface LedgerEventHandlerRetrieveResponse {
109
- id: string;
110
- conditions: LedgerEventHandlerRetrieveResponse.Conditions | null;
111
- created_at: string;
112
- /**
113
- * An optional description.
114
- */
115
- description: string | null;
116
- discarded_at: string | null;
117
- ledger_transaction_template: LedgerEventHandlerRetrieveResponse.LedgerTransactionTemplate;
118
- /**
119
- * This field will be true if this object exists in the live environment or false
120
- * if it exists in the test environment.
121
- */
122
- live_mode: boolean;
123
- /**
124
- * Additional data represented as key-value pairs. Both the key and value must be
125
- * strings.
126
- */
127
- metadata: Record<string, string> | null;
128
- /**
129
- * Name of the ledger event handler.
130
- */
131
- name: string;
132
- object: string;
133
- updated_at: string;
134
- }
135
- export declare namespace LedgerEventHandlerRetrieveResponse {
136
- interface Conditions {
137
- /**
138
- * The field you're fetching from the `ledgerable_event`.
139
- */
140
- field: string;
141
- /**
142
- * What the operator between the `field` and `value` is. Currently only supports
143
- * `equals`.
144
- */
145
- operator: string;
146
- /**
147
- * What raw string you are comparing the `field` against.
148
- */
149
- value: string;
150
- }
151
- interface LedgerTransactionTemplate {
152
- /**
153
- * An optional description for internal use.
154
- */
155
- description: string | null;
156
- /**
157
- * The timestamp (ISO8601 format) at which the ledger transaction happened for
158
- * reporting purposes.
159
- */
160
- effective_at: string | null;
161
- /**
162
- * An array of ledger entry objects.
163
- */
164
- ledger_entries: Array<LedgerTransactionTemplate.LedgerEntry>;
165
- /**
166
- * Additional data represented as key-value pairs. Both the key and value must be
167
- * strings.
168
- */
169
- metadata: Record<string, string> | null;
170
- }
171
- namespace LedgerTransactionTemplate {
172
- interface LedgerEntry {
173
- /**
174
- * The field you're fetching from the `ledgerable_event`.
175
- */
176
- amount: string;
177
- /**
178
- * What the operator between the `field` and `value` is. Currently only supports
179
- * `equals`.
180
- */
181
- direction: string;
182
- /**
183
- * What raw string you are comparing the `field` against.
184
- */
185
- ledger_account_id: string;
186
- }
187
- }
188
- }
189
- export interface LedgerEventHandlerListResponse {
190
- id: string;
191
- conditions: LedgerEventHandlerListResponse.Conditions | null;
192
- created_at: string;
193
- /**
194
- * An optional description.
36
+ * The id of the ledger that this event handler belongs to.
195
37
  */
196
- description: string | null;
197
- discarded_at: string | null;
198
- ledger_transaction_template: LedgerEventHandlerListResponse.LedgerTransactionTemplate;
38
+ ledger_id: string | null;
39
+ ledger_transaction_template: LedgerEventHandler.LedgerTransactionTemplate;
199
40
  /**
200
41
  * This field will be true if this object exists in the live environment or false
201
42
  * if it exists in the test environment.
@@ -212,20 +53,20 @@ export interface LedgerEventHandlerListResponse {
212
53
  name: string;
213
54
  object: string;
214
55
  updated_at: string;
56
+ variables: Record<string, LedgerEventHandlerVariable> | null;
215
57
  }
216
- export declare namespace LedgerEventHandlerListResponse {
58
+ export declare namespace LedgerEventHandler {
217
59
  interface Conditions {
218
60
  /**
219
- * The field you're fetching from the `ledgerable_event`.
61
+ * The LHS of the conditional.
220
62
  */
221
63
  field: string;
222
64
  /**
223
- * What the operator between the `field` and `value` is. Currently only supports
224
- * `equals`.
65
+ * What the operator between the `field` and `value` is.
225
66
  */
226
67
  operator: string;
227
68
  /**
228
- * What raw string you are comparing the `field` against.
69
+ * The RHS of the conditional.
229
70
  */
230
71
  value: string;
231
72
  }
@@ -244,109 +85,50 @@ export declare namespace LedgerEventHandlerListResponse {
244
85
  */
245
86
  ledger_entries: Array<LedgerTransactionTemplate.LedgerEntry>;
246
87
  /**
247
- * Additional data represented as key-value pairs. Both the key and value must be
248
- * strings.
88
+ * To post a ledger transaction at creation, use `posted`.
249
89
  */
250
- metadata: Record<string, string> | null;
90
+ status: string | null;
251
91
  }
252
92
  namespace LedgerTransactionTemplate {
253
93
  interface LedgerEntry {
254
94
  /**
255
- * The field you're fetching from the `ledgerable_event`.
95
+ * The LHS of the conditional.
256
96
  */
257
97
  amount: string;
258
98
  /**
259
- * What the operator between the `field` and `value` is. Currently only supports
260
- * `equals`.
99
+ * What the operator between the `field` and `value` is.
261
100
  */
262
101
  direction: string;
263
102
  /**
264
- * What raw string you are comparing the `field` against.
103
+ * The RHS of the conditional.
265
104
  */
266
105
  ledger_account_id: string;
267
106
  }
268
107
  }
269
108
  }
270
- export interface LedgerEventHandlerDeleteResponse {
271
- id: string;
272
- conditions: LedgerEventHandlerDeleteResponse.Conditions | null;
273
- created_at: string;
109
+ export interface LedgerEventHandlerVariable {
110
+ query: LedgerEventHandlerVariable.Query;
274
111
  /**
275
- * An optional description.
112
+ * The type of object this variable is. Currently, only "ledger_account" is
113
+ * supported.
276
114
  */
277
- description: string | null;
278
- discarded_at: string | null;
279
- ledger_transaction_template: LedgerEventHandlerDeleteResponse.LedgerTransactionTemplate;
280
- /**
281
- * This field will be true if this object exists in the live environment or false
282
- * if it exists in the test environment.
283
- */
284
- live_mode: boolean;
285
- /**
286
- * Additional data represented as key-value pairs. Both the key and value must be
287
- * strings.
288
- */
289
- metadata: Record<string, string> | null;
290
- /**
291
- * Name of the ledger event handler.
292
- */
293
- name: string;
294
- object: string;
295
- updated_at: string;
115
+ type: string;
296
116
  }
297
- export declare namespace LedgerEventHandlerDeleteResponse {
298
- interface Conditions {
117
+ export declare namespace LedgerEventHandlerVariable {
118
+ interface Query {
299
119
  /**
300
- * The field you're fetching from the `ledgerable_event`.
120
+ * The LHS of the conditional.
301
121
  */
302
122
  field: string;
303
123
  /**
304
- * What the operator between the `field` and `value` is. Currently only supports
305
- * `equals`.
124
+ * What the operator between the `field` and `value` is.
306
125
  */
307
126
  operator: string;
308
127
  /**
309
- * What raw string you are comparing the `field` against.
128
+ * The RHS of the conditional.
310
129
  */
311
130
  value: string;
312
131
  }
313
- interface LedgerTransactionTemplate {
314
- /**
315
- * An optional description for internal use.
316
- */
317
- description: string | null;
318
- /**
319
- * The timestamp (ISO8601 format) at which the ledger transaction happened for
320
- * reporting purposes.
321
- */
322
- effective_at: string | null;
323
- /**
324
- * An array of ledger entry objects.
325
- */
326
- ledger_entries: Array<LedgerTransactionTemplate.LedgerEntry>;
327
- /**
328
- * Additional data represented as key-value pairs. Both the key and value must be
329
- * strings.
330
- */
331
- metadata: Record<string, string> | null;
332
- }
333
- namespace LedgerTransactionTemplate {
334
- interface LedgerEntry {
335
- /**
336
- * The field you're fetching from the `ledgerable_event`.
337
- */
338
- amount: string;
339
- /**
340
- * What the operator between the `field` and `value` is. Currently only supports
341
- * `equals`.
342
- */
343
- direction: string;
344
- /**
345
- * What raw string you are comparing the `field` against.
346
- */
347
- ledger_account_id: string;
348
- }
349
- }
350
132
  }
351
133
  export interface LedgerEventHandlerCreateParams {
352
134
  ledger_transaction_template: LedgerEventHandlerCreateParams.LedgerTransactionTemplate;
@@ -368,6 +150,7 @@ export interface LedgerEventHandlerCreateParams {
368
150
  * strings.
369
151
  */
370
152
  metadata?: Record<string, string> | null;
153
+ variables?: Record<string, LedgerEventHandlerVariable> | null;
371
154
  }
372
155
  export declare namespace LedgerEventHandlerCreateParams {
373
156
  interface LedgerTransactionTemplate {
@@ -385,40 +168,37 @@ export declare namespace LedgerEventHandlerCreateParams {
385
168
  */
386
169
  ledger_entries: Array<LedgerTransactionTemplate.LedgerEntry>;
387
170
  /**
388
- * Additional data represented as key-value pairs. Both the key and value must be
389
- * strings.
171
+ * To post a ledger transaction at creation, use `posted`.
390
172
  */
391
- metadata: Record<string, string> | null;
173
+ status: string | null;
392
174
  }
393
175
  namespace LedgerTransactionTemplate {
394
176
  interface LedgerEntry {
395
177
  /**
396
- * The field you're fetching from the `ledgerable_event`.
178
+ * The LHS of the conditional.
397
179
  */
398
180
  amount: string;
399
181
  /**
400
- * What the operator between the `field` and `value` is. Currently only supports
401
- * `equals`.
182
+ * What the operator between the `field` and `value` is.
402
183
  */
403
184
  direction: string;
404
185
  /**
405
- * What raw string you are comparing the `field` against.
186
+ * The RHS of the conditional.
406
187
  */
407
188
  ledger_account_id: string;
408
189
  }
409
190
  }
410
191
  interface Conditions {
411
192
  /**
412
- * The field you're fetching from the `ledgerable_event`.
193
+ * The LHS of the conditional.
413
194
  */
414
195
  field: string;
415
196
  /**
416
- * What the operator between the `field` and `value` is. Currently only supports
417
- * `equals`.
197
+ * What the operator between the `field` and `value` is.
418
198
  */
419
199
  operator: string;
420
200
  /**
421
- * What raw string you are comparing the `field` against.
201
+ * The RHS of the conditional.
422
202
  */
423
203
  value: string;
424
204
  }
@@ -439,13 +219,10 @@ export interface LedgerEventHandlerListParams extends PageParams {
439
219
  name?: string;
440
220
  }
441
221
  export declare namespace LedgerEventHandlers {
442
- export import LedgerEventHandlerCreateResponse = API.LedgerEventHandlerCreateResponse;
443
- export import LedgerEventHandlerRetrieveResponse = API.LedgerEventHandlerRetrieveResponse;
444
- export import LedgerEventHandlerListResponse = API.LedgerEventHandlerListResponse;
445
- export import LedgerEventHandlerDeleteResponse = API.LedgerEventHandlerDeleteResponse;
446
- type LedgerEventHandlerListResponsesPage = _LedgerEventHandlerListResponsesPage;
447
- export import LedgerEventHandlerCreateParams = API.LedgerEventHandlerCreateParams;
448
- export import LedgerEventHandlerListParams = API.LedgerEventHandlerListParams;
222
+ export import LedgerEventHandler = LedgerEventHandlersAPI.LedgerEventHandler;
223
+ export import LedgerEventHandlerVariable = LedgerEventHandlersAPI.LedgerEventHandlerVariable;
224
+ export import LedgerEventHandlersPage = LedgerEventHandlersAPI.LedgerEventHandlersPage;
225
+ export import LedgerEventHandlerCreateParams = LedgerEventHandlersAPI.LedgerEventHandlerCreateParams;
226
+ export import LedgerEventHandlerListParams = LedgerEventHandlersAPI.LedgerEventHandlerListParams;
449
227
  }
450
- export {};
451
228
  //# sourceMappingURL=ledger-event-handlers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ledger-event-handlers.d.ts","sourceRoot":"","sources":["../src/resources/ledger-event-handlers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,KAAK,GAAG,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAE9D,qBAAa,mBAAoB,SAAQ,WAAW;IAClD;;OAEG;IACH,MAAM,CACJ,MAAM,EAAE,8BAA8B,EACtC,OAAO,CAAC,EAAE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WAEG;QACH,KAAK,EAAE,MAAM,CAAC;KACf;CACF;AAED,MAAM,WAAW,4BAA6B,SAAQ,UAAU;IAC9D;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEpC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAElC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,yBAAiB,mBAAmB,CAAC;IACnC,MAAM,QAAQ,kBAAkB,GAAG,sBAAsB,CAAC,kBAAkB,CAAC;IAC7E,MAAM,QAAQ,0BAA0B,GAAG,sBAAsB,CAAC,0BAA0B,CAAC;IAC7F,MAAM,QAAQ,uBAAuB,GAAG,sBAAsB,CAAC,uBAAuB,CAAC;IACvF,MAAM,QAAQ,8BAA8B,GAAG,sBAAsB,CAAC,8BAA8B,CAAC;IACrG,MAAM,QAAQ,4BAA4B,GAAG,sBAAsB,CAAC,4BAA4B,CAAC;CAClG"}
@@ -1,9 +1,33 @@
1
1
  "use strict";
2
2
  // File generated from our OpenAPI spec by Stainless.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || function (mod) {
20
+ if (mod && mod.__esModule) return mod;
21
+ var result = {};
22
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
+ __setModuleDefault(result, mod);
24
+ return result;
25
+ };
3
26
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.LedgerEventHandlerListResponsesPage = exports.LedgerEventHandlers = void 0;
27
+ exports.LedgerEventHandlersPage = exports.LedgerEventHandlers = void 0;
5
28
  const resource_1 = require("modern-treasury/resource");
6
29
  const core_1 = require("modern-treasury/core");
30
+ const LedgerEventHandlersAPI = __importStar(require("modern-treasury/resources/ledger-event-handlers"));
7
31
  const pagination_1 = require("modern-treasury/pagination");
8
32
  class LedgerEventHandlers extends resource_1.APIResource {
9
33
  /**
@@ -31,10 +55,7 @@ class LedgerEventHandlers extends resource_1.APIResource {
31
55
  if ((0, core_1.isRequestOptions)(query)) {
32
56
  return this.list({}, query);
33
57
  }
34
- return this.getAPIList('/api/ledger_event_handlers', LedgerEventHandlerListResponsesPage, {
35
- query,
36
- ...options,
37
- });
58
+ return this.getAPIList('/api/ledger_event_handlers', LedgerEventHandlersPage, { query, ...options });
38
59
  }
39
60
  /**
40
61
  * Archive a ledger event handler.
@@ -44,9 +65,10 @@ class LedgerEventHandlers extends resource_1.APIResource {
44
65
  }
45
66
  }
46
67
  exports.LedgerEventHandlers = LedgerEventHandlers;
47
- class LedgerEventHandlerListResponsesPage extends pagination_1.Page {
68
+ class LedgerEventHandlersPage extends pagination_1.Page {
48
69
  }
49
- exports.LedgerEventHandlerListResponsesPage = LedgerEventHandlerListResponsesPage;
70
+ exports.LedgerEventHandlersPage = LedgerEventHandlersPage;
50
71
  (function (LedgerEventHandlers) {
72
+ LedgerEventHandlers.LedgerEventHandlersPage = LedgerEventHandlersAPI.LedgerEventHandlersPage;
51
73
  })(LedgerEventHandlers = exports.LedgerEventHandlers || (exports.LedgerEventHandlers = {}));
52
74
  //# sourceMappingURL=ledger-event-handlers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ledger-event-handlers.js","sourceR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CAAC,8BAA8B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;CACF;AArDD,kDAqDC;AAED,MAAa,uBAAwB,SAAQ,iBAAwB;CAAG;AAAxE,0DAAwE;AAqPxE,WAAiB,mBAAmB;IAGpB,2CAAuB,GAAG,sBAAsB,CAAC,uBAAuB,CAAC;AAGzF,CAAC,EANgB,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAMnC"}
@@ -1,6 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless.
2
2
  import { APIResource } from 'modern-treasury/resource';
3
3
  import { isRequestOptions } from 'modern-treasury/core';
4
+ import * as LedgerEventHandlersAPI from 'modern-treasury/resources/ledger-event-handlers';
4
5
  import { Page } from 'modern-treasury/pagination';
5
6
  export class LedgerEventHandlers extends APIResource {
6
7
  /**
@@ -28,10 +29,7 @@ export class LedgerEventHandlers extends APIResource {
28
29
  if (isRequestOptions(query)) {
29
30
  return this.list({}, query);
30
31
  }
31
- return this.getAPIList('/api/ledger_event_handlers', LedgerEventHandlerListResponsesPage, {
32
- query,
33
- ...options,
34
- });
32
+ return this.getAPIList('/api/ledger_event_handlers', LedgerEventHandlersPage, { query, ...options });
35
33
  }
36
34
  /**
37
35
  * Archive a ledger event handler.
@@ -40,8 +38,9 @@ export class LedgerEventHandlers extends APIResource {
40
38
  return this.delete(`/api/ledger_event_handlers/${id}`, options);
41
39
  }
42
40
  }
43
- export class LedgerEventHandlerListResponsesPage extends Page {
41
+ export class LedgerEventHandlersPage extends Page {
44
42
  }
45
43
  (function (LedgerEventHandlers) {
44
+ LedgerEventHandlers.LedgerEventHandlersPage = LedgerEventHandlersAPI.LedgerEventHandlersPage;
46
45
  })(LedgerEventHandlers || (LedgerEventHandlers = {}));
47
46
  //# sourceMappingURL=ledger-event-handlers.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ledger-event-handlers.mjs","sourceRoot":"","sources":["../src/resources/ledger-event-handlers.ts"],"names":[],"mappings":"AA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U,EAAE,OAA6B;QAC3C,OAAO,IAAI,CAAC,MAAM,CAAC,8BAA8B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;CACF;AAED,MAAM,OAAO,uBAAwB,SAAQ,IAAwB;CAAG;AAqPxE,WAAiB,mBAAmB;IAGpB,2CAAuB,GAAG,sBAAsB,CAAC,uBAAuB,CAAC;AAGzF,CAAC,EANgB,mBAAmB,KAAnB,mBAAmB,QAMnC"}
@@ -1,11 +1,12 @@
1
1
  import * as Core from 'modern-treasury/core';
2
2
  import { APIResource } from 'modern-treasury/resource';
3
- import * as LedgerEntries from 'modern-treasury/resources/ledger-entries';
4
- import { Versions } from "./versions.js";
5
- import * as API from "./index.js";
6
- import { Page, PageParams } from 'modern-treasury/pagination';
3
+ import * as LedgerTransactionsAPI from 'modern-treasury/resources/ledger-transactions/ledger-transactions';
4
+ import * as LedgerEntriesAPI from 'modern-treasury/resources/ledger-entries';
5
+ import * as Shared from 'modern-treasury/resources/shared';
6
+ import * as VersionsAPI from 'modern-treasury/resources/ledger-transactions/versions';
7
+ import { Page, type PageParams } from 'modern-treasury/pagination';
7
8
  export declare class LedgerTransactions extends APIResource {
8
- versions: Versions;
9
+ versions: VersionsAPI.Versions;
9
10
  /**
10
11
  * Create a ledger transaction.
11
12
  */
@@ -32,7 +33,6 @@ export declare class LedgerTransactions extends APIResource {
32
33
  }
33
34
  export declare class LedgerTransactionsPage extends Page<LedgerTransaction> {
34
35
  }
35
- type _LedgerTransactionsPage = LedgerTransactionsPage;
36
36
  export interface LedgerTransaction {
37
37
  id: string;
38
38
  created_at: string;
@@ -58,7 +58,7 @@ export interface LedgerTransaction {
58
58
  /**
59
59
  * An array of ledger entry objects.
60
60
  */
61
- ledger_entries: Array<LedgerEntries.LedgerEntry>;
61
+ ledger_entries: Array<LedgerEntriesAPI.LedgerEntry>;
62
62
  /**
63
63
  * The ID of the ledger this ledger transaction belongs to.
64
64
  */
@@ -158,7 +158,7 @@ export declare namespace LedgerTransactionCreateParams {
158
158
  * `debit` pulls money from someone else's account to your own. Note that wire,
159
159
  * rtp, and check payments will always be `credit`.
160
160
  */
161
- direction: 'credit' | 'debit';
161
+ direction: Shared.TransactionDirection;
162
162
  /**
163
163
  * The ledger account that this ledger entry is associated with.
164
164
  */
@@ -237,7 +237,7 @@ export declare namespace LedgerTransactionUpdateParams {
237
237
  * `debit` pulls money from someone else's account to your own. Note that wire,
238
238
  * rtp, and check payments will always be `credit`.
239
239
  */
240
- direction: 'credit' | 'debit';
240
+ direction: Shared.TransactionDirection;
241
241
  /**
242
242
  * The ledger account that this ledger entry is associated with.
243
243
  */
@@ -380,16 +380,15 @@ export interface LedgerTransactionCreateReversalParams {
380
380
  status?: 'archived' | 'pending' | 'posted';
381
381
  }
382
382
  export declare namespace LedgerTransactions {
383
- export import LedgerTransaction = API.LedgerTransaction;
384
- type LedgerTransactionsPage = _LedgerTransactionsPage;
385
- export import LedgerTransactionCreateParams = API.LedgerTransactionCreateParams;
386
- export import LedgerTransactionUpdateParams = API.LedgerTransactionUpdateParams;
387
- export import LedgerTransactionListParams = API.LedgerTransactionListParams;
388
- export import LedgerTransactionCreateReversalParams = API.LedgerTransactionCreateReversalParams;
389
- export import Versions = API.Versions;
390
- export import LedgerTransactionVersion = API.LedgerTransactionVersion;
391
- export import LedgerTransactionVersionsPage = API.LedgerTransactionVersionsPage;
392
- export import VersionListParams = API.VersionListParams;
383
+ export import LedgerTransaction = LedgerTransactionsAPI.LedgerTransaction;
384
+ export import LedgerTransactionsPage = LedgerTransactionsAPI.LedgerTransactionsPage;
385
+ export import LedgerTransactionCreateParams = LedgerTransactionsAPI.LedgerTransactionCreateParams;
386
+ export import LedgerTransactionUpdateParams = LedgerTransactionsAPI.LedgerTransactionUpdateParams;
387
+ export import LedgerTransactionListParams = LedgerTransactionsAPI.LedgerTransactionListParams;
388
+ export import LedgerTransactionCreateReversalParams = LedgerTransactionsAPI.LedgerTransactionCreateReversalParams;
389
+ export import Versions = VersionsAPI.Versions;
390
+ export import LedgerTransactionVersion = VersionsAPI.LedgerTransactionVersion;
391
+ export import LedgerTransactionVersionsPage = VersionsAPI.LedgerTransactionVersionsPage;
392
+ export import VersionListParams = VersionsAPI.VersionListParams;
393
393
  }
394
- export {};
395
394
  //# sourceMappingURL=ledger-transactions.d.ts.map