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.
- package/CHANGELOG.md +57 -0
- package/README.md +5 -8
- package/_shims/auto/types.d.ts +3 -1
- package/_shims/index.d.ts +2 -0
- package/_shims/node-runtime.d.ts.map +1 -1
- package/_shims/node-runtime.js +3 -0
- package/_shims/node-runtime.js.map +1 -1
- package/_shims/node-runtime.mjs +2 -0
- package/_shims/node-runtime.mjs.map +1 -1
- package/_shims/node-types.d.ts +1 -1
- package/_shims/registry.d.ts +2 -0
- package/_shims/registry.d.ts.map +1 -1
- package/_shims/registry.js +3 -1
- package/_shims/registry.js.map +1 -1
- package/_shims/registry.mjs +2 -0
- package/_shims/registry.mjs.map +1 -1
- package/_shims/web-runtime.d.ts.map +1 -1
- package/_shims/web-runtime.js +8 -0
- package/_shims/web-runtime.js.map +1 -1
- package/_shims/web-runtime.mjs +8 -0
- package/_shims/web-runtime.mjs.map +1 -1
- package/_shims/web-types.d.ts +2 -1
- package/core.d.ts +1 -1
- package/core.d.ts.map +1 -1
- package/core.js +38 -23
- package/core.js.map +1 -1
- package/core.mjs +36 -21
- package/core.mjs.map +1 -1
- package/error.d.ts.map +1 -1
- package/error.js +14 -4
- package/error.js.map +1 -1
- package/error.mjs +14 -4
- package/error.mjs.map +1 -1
- package/index.d.mts +20 -14
- package/index.d.ts +20 -14
- package/index.d.ts.map +1 -1
- package/index.js +6 -6
- package/index.js.map +1 -1
- package/index.mjs +6 -6
- package/index.mjs.map +1 -1
- package/package.json +3 -2
- package/resources/account-collection-flows.d.ts +9 -11
- package/resources/account-collection-flows.d.ts.map +1 -1
- package/resources/account-collection-flows.js +25 -0
- package/resources/account-collection-flows.js.map +1 -1
- package/resources/account-collection-flows.mjs +2 -0
- package/resources/account-collection-flows.mjs.map +1 -1
- package/resources/account-details.d.ts +6 -8
- package/resources/account-details.d.ts.map +1 -1
- package/resources/account-details.js +25 -0
- package/resources/account-details.js.map +1 -1
- package/resources/account-details.mjs +2 -0
- package/resources/account-details.mjs.map +1 -1
- package/resources/connections.d.ts +5 -7
- package/resources/connections.d.ts.map +1 -1
- package/resources/connections.js +25 -0
- package/resources/connections.js.map +1 -1
- package/resources/connections.mjs +2 -0
- package/resources/connections.mjs.map +1 -1
- package/resources/counterparties.d.ts +22 -23
- package/resources/counterparties.d.ts.map +1 -1
- package/resources/counterparties.js +25 -0
- package/resources/counterparties.js.map +1 -1
- package/resources/counterparties.mjs +2 -0
- package/resources/counterparties.mjs.map +1 -1
- package/resources/documents.d.ts +9 -11
- package/resources/documents.d.ts.map +1 -1
- package/resources/documents.js +25 -0
- package/resources/documents.js.map +1 -1
- package/resources/documents.mjs +2 -0
- package/resources/documents.mjs.map +1 -1
- package/resources/events.d.ts +5 -7
- package/resources/events.d.ts.map +1 -1
- package/resources/events.js +25 -0
- package/resources/events.js.map +1 -1
- package/resources/events.mjs +2 -0
- package/resources/events.mjs.map +1 -1
- package/resources/expected-payments.d.ts +26 -16
- package/resources/expected-payments.d.ts.map +1 -1
- package/resources/expected-payments.js +25 -0
- package/resources/expected-payments.js.map +1 -1
- package/resources/expected-payments.mjs +2 -0
- package/resources/expected-payments.mjs.map +1 -1
- package/resources/external-accounts.d.ts +18 -20
- package/resources/external-accounts.d.ts.map +1 -1
- package/resources/external-accounts.js +25 -0
- package/resources/external-accounts.js.map +1 -1
- package/resources/external-accounts.mjs +2 -0
- package/resources/external-accounts.mjs.map +1 -1
- package/resources/incoming-payment-details.d.ts +12 -14
- package/resources/incoming-payment-details.d.ts.map +1 -1
- package/resources/incoming-payment-details.js +25 -0
- package/resources/incoming-payment-details.js.map +1 -1
- package/resources/incoming-payment-details.mjs +2 -0
- package/resources/incoming-payment-details.mjs.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +2 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/internal-accounts/balance-reports.d.ts +5 -7
- package/resources/internal-accounts/balance-reports.d.ts.map +1 -1
- package/resources/internal-accounts/balance-reports.js +25 -0
- package/resources/internal-accounts/balance-reports.js.map +1 -1
- package/resources/internal-accounts/balance-reports.mjs +2 -0
- package/resources/internal-accounts/balance-reports.mjs.map +1 -1
- package/resources/internal-accounts/internal-accounts.d.ts +25 -23
- package/resources/internal-accounts/internal-accounts.d.ts.map +1 -1
- package/resources/internal-accounts/internal-accounts.js +6 -5
- package/resources/internal-accounts/internal-accounts.js.map +1 -1
- package/resources/internal-accounts/internal-accounts.mjs +6 -5
- package/resources/internal-accounts/internal-accounts.mjs.map +1 -1
- package/resources/invoices/invoices.d.ts +39 -26
- package/resources/invoices/invoices.d.ts.map +1 -1
- package/resources/invoices/invoices.js +6 -5
- package/resources/invoices/invoices.js.map +1 -1
- package/resources/invoices/invoices.mjs +6 -5
- package/resources/invoices/invoices.mjs.map +1 -1
- package/resources/invoices/line-items.d.ts +7 -9
- package/resources/invoices/line-items.d.ts.map +1 -1
- package/resources/invoices/line-items.js +25 -0
- package/resources/invoices/line-items.js.map +1 -1
- package/resources/invoices/line-items.mjs +2 -0
- package/resources/invoices/line-items.mjs.map +1 -1
- package/resources/ledger-account-balance-monitors.d.ts +7 -9
- package/resources/ledger-account-balance-monitors.d.ts.map +1 -1
- package/resources/ledger-account-balance-monitors.js +25 -0
- package/resources/ledger-account-balance-monitors.js.map +1 -1
- package/resources/ledger-account-balance-monitors.mjs +2 -0
- package/resources/ledger-account-balance-monitors.mjs.map +1 -1
- package/resources/ledger-account-categories.d.ts +11 -12
- package/resources/ledger-account-categories.d.ts.map +1 -1
- package/resources/ledger-account-categories.js +25 -0
- package/resources/ledger-account-categories.js.map +1 -1
- package/resources/ledger-account-categories.mjs +2 -0
- package/resources/ledger-account-categories.mjs.map +1 -1
- package/resources/ledger-account-payouts.d.ts +17 -9
- package/resources/ledger-account-payouts.d.ts.map +1 -1
- package/resources/ledger-account-payouts.js +25 -0
- package/resources/ledger-account-payouts.js.map +1 -1
- package/resources/ledger-account-payouts.mjs +2 -0
- package/resources/ledger-account-payouts.mjs.map +1 -1
- package/resources/ledger-account-statements.d.ts +7 -6
- package/resources/ledger-account-statements.d.ts.map +1 -1
- package/resources/ledger-account-statements.js.map +1 -1
- package/resources/ledger-account-statements.mjs.map +1 -1
- package/resources/ledger-accounts.d.ts +11 -12
- package/resources/ledger-accounts.d.ts.map +1 -1
- package/resources/ledger-accounts.js +25 -0
- package/resources/ledger-accounts.js.map +1 -1
- package/resources/ledger-accounts.mjs +2 -0
- package/resources/ledger-accounts.mjs.map +1 -1
- package/resources/ledger-entries.d.ts +9 -10
- package/resources/ledger-entries.d.ts.map +1 -1
- package/resources/ledger-entries.js +25 -0
- package/resources/ledger-entries.js.map +1 -1
- package/resources/ledger-entries.mjs +2 -0
- package/resources/ledger-entries.mjs.map +1 -1
- package/resources/ledger-event-handlers.d.ts +47 -270
- package/resources/ledger-event-handlers.d.ts.map +1 -1
- package/resources/ledger-event-handlers.js +29 -7
- package/resources/ledger-event-handlers.js.map +1 -1
- package/resources/ledger-event-handlers.mjs +4 -5
- package/resources/ledger-event-handlers.mjs.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.d.ts +19 -20
- package/resources/ledger-transactions/ledger-transactions.d.ts.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.js +6 -5
- package/resources/ledger-transactions/ledger-transactions.js.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.mjs +6 -5
- package/resources/ledger-transactions/ledger-transactions.mjs.map +1 -1
- package/resources/ledger-transactions/versions.d.ts +7 -8
- package/resources/ledger-transactions/versions.d.ts.map +1 -1
- package/resources/ledger-transactions/versions.js +25 -0
- package/resources/ledger-transactions/versions.js.map +1 -1
- package/resources/ledger-transactions/versions.mjs +2 -0
- package/resources/ledger-transactions/versions.mjs.map +1 -1
- package/resources/ledgerable-events.d.ts +4 -41
- package/resources/ledgerable-events.d.ts.map +1 -1
- package/resources/ledgerable-events.js +1 -2
- package/resources/ledgerable-events.js.map +1 -1
- package/resources/ledgerable-events.mjs +1 -2
- package/resources/ledgerable-events.mjs.map +1 -1
- package/resources/ledgers.d.ts +7 -9
- package/resources/ledgers.d.ts.map +1 -1
- package/resources/ledgers.js +25 -0
- package/resources/ledgers.js.map +1 -1
- package/resources/ledgers.mjs +2 -0
- package/resources/ledgers.mjs.map +1 -1
- package/resources/line-items.d.ts +6 -8
- package/resources/line-items.d.ts.map +1 -1
- package/resources/line-items.js +25 -0
- package/resources/line-items.js.map +1 -1
- package/resources/line-items.mjs +2 -0
- package/resources/line-items.mjs.map +1 -1
- package/resources/paper-items.d.ts +5 -7
- package/resources/paper-items.d.ts.map +1 -1
- package/resources/paper-items.js +25 -0
- package/resources/paper-items.js.map +1 -1
- package/resources/paper-items.mjs +2 -0
- package/resources/paper-items.mjs.map +1 -1
- package/resources/payment-flows.d.ts +7 -9
- package/resources/payment-flows.d.ts.map +1 -1
- package/resources/payment-flows.js +25 -0
- package/resources/payment-flows.js.map +1 -1
- package/resources/payment-flows.mjs +2 -0
- package/resources/payment-flows.mjs.map +1 -1
- package/resources/payment-orders/payment-orders.d.ts +75 -50
- package/resources/payment-orders/payment-orders.d.ts.map +1 -1
- package/resources/payment-orders/payment-orders.js +6 -5
- package/resources/payment-orders/payment-orders.js.map +1 -1
- package/resources/payment-orders/payment-orders.mjs +6 -5
- package/resources/payment-orders/payment-orders.mjs.map +1 -1
- package/resources/payment-orders/reversals.d.ts +8 -9
- package/resources/payment-orders/reversals.d.ts.map +1 -1
- package/resources/payment-orders/reversals.js +25 -0
- package/resources/payment-orders/reversals.js.map +1 -1
- package/resources/payment-orders/reversals.mjs +2 -0
- package/resources/payment-orders/reversals.mjs.map +1 -1
- package/resources/payment-references.d.ts +5 -7
- package/resources/payment-references.d.ts.map +1 -1
- package/resources/payment-references.js +25 -0
- package/resources/payment-references.js.map +1 -1
- package/resources/payment-references.mjs +2 -0
- package/resources/payment-references.mjs.map +1 -1
- package/resources/returns.d.ts +11 -13
- package/resources/returns.d.ts.map +1 -1
- package/resources/returns.js +25 -0
- package/resources/returns.js.map +1 -1
- package/resources/returns.mjs +2 -0
- package/resources/returns.mjs.map +1 -1
- package/resources/routing-details.d.ts +16 -14
- package/resources/routing-details.d.ts.map +1 -1
- package/resources/routing-details.js +25 -0
- package/resources/routing-details.js.map +1 -1
- package/resources/routing-details.mjs +2 -0
- package/resources/routing-details.mjs.map +1 -1
- package/resources/shared.d.ts +1 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/top-level.d.ts +2 -2
- package/resources/top-level.d.ts.map +1 -1
- package/resources/transactions/line-items.d.ts +10 -7
- package/resources/transactions/line-items.d.ts.map +1 -1
- package/resources/transactions/line-items.js +25 -0
- package/resources/transactions/line-items.js.map +1 -1
- package/resources/transactions/line-items.mjs +2 -0
- package/resources/transactions/line-items.mjs.map +1 -1
- package/resources/transactions/transactions.d.ts +28 -30
- package/resources/transactions/transactions.d.ts.map +1 -1
- package/resources/transactions/transactions.js +6 -5
- package/resources/transactions/transactions.js.map +1 -1
- package/resources/transactions/transactions.mjs +6 -5
- package/resources/transactions/transactions.mjs.map +1 -1
- package/resources/validations.d.ts +14 -14
- package/resources/validations.d.ts.map +1 -1
- package/resources/validations.js.map +1 -1
- package/resources/validations.mjs.map +1 -1
- package/resources/virtual-accounts.d.ts +16 -16
- package/resources/virtual-accounts.d.ts.map +1 -1
- package/resources/virtual-accounts.js +25 -0
- package/resources/virtual-accounts.js.map +1 -1
- package/resources/virtual-accounts.mjs +2 -0
- package/resources/virtual-accounts.mjs.map +1 -1
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +2 -2
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +3 -3
- package/resources/webhooks.mjs.map +1 -1
- package/shims/node.d.ts +1 -1
- package/shims/node.d.ts.map +1 -1
- package/shims/web.d.ts +1 -1
- package/shims/web.d.ts.map +1 -1
- package/src/_shims/auto/types.d.ts +3 -1
- package/src/_shims/index.d.ts +3 -1
- package/src/_shims/index.mjs +1 -1
- package/src/_shims/node-runtime.ts +4 -0
- package/src/_shims/node-types.d.ts +1 -1
- package/src/_shims/registry.ts +3 -0
- package/src/_shims/web-runtime.ts +12 -0
- package/src/_shims/web-types.d.ts +2 -1
- package/src/core.ts +39 -21
- package/src/error.ts +15 -5
- package/src/index.ts +23 -17
- package/src/resources/account-collection-flows.ts +12 -12
- package/src/resources/account-details.ts +10 -12
- package/src/resources/connections.ts +8 -10
- package/src/resources/counterparties.ts +32 -26
- package/src/resources/documents.ts +13 -12
- package/src/resources/events.ts +8 -10
- package/src/resources/expected-payments.ts +37 -18
- package/src/resources/external-accounts.ts +30 -24
- package/src/resources/incoming-payment-details.ts +17 -17
- package/src/resources/index.ts +3 -5
- package/src/resources/internal-accounts/balance-reports.ts +9 -11
- package/src/resources/internal-accounts/internal-accounts.ts +32 -27
- package/src/resources/invoices/invoices.ts +56 -35
- package/src/resources/invoices/line-items.ts +10 -12
- package/src/resources/ledger-account-balance-monitors.ts +10 -12
- package/src/resources/ledger-account-categories.ts +14 -15
- package/src/resources/ledger-account-payouts.ts +23 -12
- package/src/resources/ledger-account-statements.ts +9 -8
- package/src/resources/ledger-accounts.ts +14 -15
- package/src/resources/ledger-entries.ts +12 -13
- package/src/resources/ledger-event-handlers.ts +53 -336
- package/src/resources/ledger-transactions/ledger-transactions.ts +22 -24
- package/src/resources/ledger-transactions/versions.ts +10 -11
- package/src/resources/ledgerable-events.ts +6 -51
- package/src/resources/ledgers.ts +10 -12
- package/src/resources/line-items.ts +9 -11
- package/src/resources/paper-items.ts +9 -11
- package/src/resources/payment-flows.ts +10 -12
- package/src/resources/payment-orders/payment-orders.ts +110 -56
- package/src/resources/payment-orders/reversals.ts +11 -12
- package/src/resources/payment-references.ts +8 -10
- package/src/resources/returns.ts +16 -18
- package/src/resources/routing-details.ts +26 -14
- package/src/resources/shared.ts +2 -0
- package/src/resources/top-level.ts +2 -2
- package/src/resources/transactions/line-items.ts +14 -10
- package/src/resources/transactions/transactions.ts +35 -35
- package/src/resources/validations.ts +19 -13
- package/src/resources/virtual-accounts.ts +22 -17
- package/src/resources/webhooks.ts +6 -5
- package/src/shims/node.ts +1 -1
- package/src/shims/web.ts +1 -1
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from "../
|
|
4
|
-
import { APIResource } from "../
|
|
5
|
-
import { isRequestOptions } from "../
|
|
6
|
-
import * as
|
|
7
|
-
import * as
|
|
8
|
-
import { Page, PageParams } from "../
|
|
3
|
+
import * as Core from "../core";
|
|
4
|
+
import { APIResource } from "../resource";
|
|
5
|
+
import { isRequestOptions } from "../core";
|
|
6
|
+
import * as RoutingDetailsAPI from "./routing-details";
|
|
7
|
+
import * as Shared from "./shared";
|
|
8
|
+
import { Page, type PageParams } from "../pagination";
|
|
9
9
|
|
|
10
10
|
export class RoutingDetails extends APIResource {
|
|
11
11
|
/**
|
|
@@ -89,8 +89,6 @@ export class RoutingDetails extends APIResource {
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
export class RoutingDetailsPage extends Page<RoutingDetail> {}
|
|
92
|
-
// alias so we can export it in the namespace
|
|
93
|
-
type _RoutingDetailsPage = RoutingDetailsPage;
|
|
94
92
|
|
|
95
93
|
export interface RoutingDetail {
|
|
96
94
|
id: string;
|
|
@@ -124,6 +122,7 @@ export interface RoutingDetail {
|
|
|
124
122
|
| 'bacs'
|
|
125
123
|
| 'book'
|
|
126
124
|
| 'card'
|
|
125
|
+
| 'chats'
|
|
127
126
|
| 'check'
|
|
128
127
|
| 'cross_border'
|
|
129
128
|
| 'eft'
|
|
@@ -131,11 +130,13 @@ export interface RoutingDetail {
|
|
|
131
130
|
| 'masav'
|
|
132
131
|
| 'neft'
|
|
133
132
|
| 'nics'
|
|
133
|
+
| 'nz_becs'
|
|
134
134
|
| 'provxchange'
|
|
135
135
|
| 'rtp'
|
|
136
136
|
| 'se_bankgirot'
|
|
137
137
|
| 'sen'
|
|
138
138
|
| 'sepa'
|
|
139
|
+
| 'sg_giro'
|
|
139
140
|
| 'sic'
|
|
140
141
|
| 'signet'
|
|
141
142
|
| 'wire'
|
|
@@ -148,7 +149,9 @@ export interface RoutingDetail {
|
|
|
148
149
|
routing_number: string;
|
|
149
150
|
|
|
150
151
|
/**
|
|
151
|
-
*
|
|
152
|
+
* The type of routing number. See
|
|
153
|
+
* https://docs.moderntreasury.com/platform/reference/routing-detail-object for
|
|
154
|
+
* more details.
|
|
152
155
|
*/
|
|
153
156
|
routing_number_type:
|
|
154
157
|
| 'aba'
|
|
@@ -158,9 +161,11 @@ export interface RoutingDetail {
|
|
|
158
161
|
| 'chips'
|
|
159
162
|
| 'cnaps'
|
|
160
163
|
| 'gb_sort_code'
|
|
164
|
+
| 'hk_interbank_clearing_code'
|
|
161
165
|
| 'in_ifsc'
|
|
162
166
|
| 'jp_zengin_code'
|
|
163
167
|
| 'my_branch_code'
|
|
168
|
+
| 'nz_national_clearing_code'
|
|
164
169
|
| 'se_bankgiro_clearing_code'
|
|
165
170
|
| 'swift';
|
|
166
171
|
|
|
@@ -216,7 +221,9 @@ export interface RoutingDetailCreateParams {
|
|
|
216
221
|
routing_number: string;
|
|
217
222
|
|
|
218
223
|
/**
|
|
219
|
-
*
|
|
224
|
+
* The type of routing number. See
|
|
225
|
+
* https://docs.moderntreasury.com/platform/reference/routing-detail-object for
|
|
226
|
+
* more details.
|
|
220
227
|
*/
|
|
221
228
|
routing_number_type:
|
|
222
229
|
| 'aba'
|
|
@@ -226,9 +233,11 @@ export interface RoutingDetailCreateParams {
|
|
|
226
233
|
| 'chips'
|
|
227
234
|
| 'cnaps'
|
|
228
235
|
| 'gb_sort_code'
|
|
236
|
+
| 'hk_interbank_clearing_code'
|
|
229
237
|
| 'in_ifsc'
|
|
230
238
|
| 'jp_zengin_code'
|
|
231
239
|
| 'my_branch_code'
|
|
240
|
+
| 'nz_national_clearing_code'
|
|
232
241
|
| 'se_bankgiro_clearing_code'
|
|
233
242
|
| 'swift';
|
|
234
243
|
|
|
@@ -242,6 +251,7 @@ export interface RoutingDetailCreateParams {
|
|
|
242
251
|
| 'bacs'
|
|
243
252
|
| 'book'
|
|
244
253
|
| 'card'
|
|
254
|
+
| 'chats'
|
|
245
255
|
| 'check'
|
|
246
256
|
| 'cross_border'
|
|
247
257
|
| 'eft'
|
|
@@ -249,11 +259,13 @@ export interface RoutingDetailCreateParams {
|
|
|
249
259
|
| 'masav'
|
|
250
260
|
| 'neft'
|
|
251
261
|
| 'nics'
|
|
262
|
+
| 'nz_becs'
|
|
252
263
|
| 'provxchange'
|
|
253
264
|
| 'rtp'
|
|
254
265
|
| 'se_bankgirot'
|
|
255
266
|
| 'sen'
|
|
256
267
|
| 'sepa'
|
|
268
|
+
| 'sg_giro'
|
|
257
269
|
| 'sic'
|
|
258
270
|
| 'signet'
|
|
259
271
|
| 'wire'
|
|
@@ -264,8 +276,8 @@ export interface RoutingDetailCreateParams {
|
|
|
264
276
|
export interface RoutingDetailListParams extends PageParams {}
|
|
265
277
|
|
|
266
278
|
export namespace RoutingDetails {
|
|
267
|
-
export import RoutingDetail =
|
|
268
|
-
export
|
|
269
|
-
export import RoutingDetailCreateParams =
|
|
270
|
-
export import RoutingDetailListParams =
|
|
279
|
+
export import RoutingDetail = RoutingDetailsAPI.RoutingDetail;
|
|
280
|
+
export import RoutingDetailsPage = RoutingDetailsAPI.RoutingDetailsPage;
|
|
281
|
+
export import RoutingDetailCreateParams = RoutingDetailsAPI.RoutingDetailCreateParams;
|
|
282
|
+
export import RoutingDetailListParams = RoutingDetailsAPI.RoutingDetailListParams;
|
|
271
283
|
}
|
package/src/resources/shared.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as
|
|
3
|
+
import * as TopLevelAPI from "./top-level";
|
|
4
4
|
|
|
5
5
|
export interface PingResponse {
|
|
6
6
|
ping: string;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export namespace TopLevel {
|
|
10
|
-
export import PingResponse =
|
|
10
|
+
export import PingResponse = TopLevelAPI.PingResponse;
|
|
11
11
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from "../../
|
|
4
|
-
import { APIResource } from "../../
|
|
5
|
-
import { isRequestOptions } from "../../
|
|
6
|
-
import * as
|
|
7
|
-
import { Page, PageParams } from "../../
|
|
3
|
+
import * as Core from "../../core";
|
|
4
|
+
import { APIResource } from "../../resource";
|
|
5
|
+
import { isRequestOptions } from "../../core";
|
|
6
|
+
import * as LineItemsAPI from "./line-items";
|
|
7
|
+
import { Page, type PageParams } from "../../pagination";
|
|
8
8
|
|
|
9
9
|
export class LineItems extends APIResource {
|
|
10
10
|
/**
|
|
@@ -34,8 +34,6 @@ export class LineItems extends APIResource {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
export class TransactionLineItemsPage extends Page<TransactionLineItem> {}
|
|
37
|
-
// alias so we can export it in the namespace
|
|
38
|
-
type _TransactionLineItemsPage = TransactionLineItemsPage;
|
|
39
37
|
|
|
40
38
|
export interface TransactionLineItem {
|
|
41
39
|
id: string;
|
|
@@ -77,6 +75,12 @@ export interface TransactionLineItem {
|
|
|
77
75
|
|
|
78
76
|
object: string;
|
|
79
77
|
|
|
78
|
+
/**
|
|
79
|
+
* Describes whether this line item should be counted towards the corresponding
|
|
80
|
+
* transaction’s reconciliation.
|
|
81
|
+
*/
|
|
82
|
+
reconcilable: boolean;
|
|
83
|
+
|
|
80
84
|
/**
|
|
81
85
|
* If a matching object exists in Modern Treasury, the ID will be populated here,
|
|
82
86
|
* otherwise `null`.
|
|
@@ -119,7 +123,7 @@ export interface LineItemListParams extends PageParams {
|
|
|
119
123
|
}
|
|
120
124
|
|
|
121
125
|
export namespace LineItems {
|
|
122
|
-
export import TransactionLineItem =
|
|
123
|
-
export
|
|
124
|
-
export import LineItemListParams =
|
|
126
|
+
export import TransactionLineItem = LineItemsAPI.TransactionLineItem;
|
|
127
|
+
export import TransactionLineItemsPage = LineItemsAPI.TransactionLineItemsPage;
|
|
128
|
+
export import LineItemListParams = LineItemsAPI.LineItemListParams;
|
|
125
129
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from "../../
|
|
4
|
-
import { APIResource } from "../../
|
|
5
|
-
import { isRequestOptions } from "../../
|
|
6
|
-
import * as
|
|
7
|
-
import
|
|
8
|
-
import * as
|
|
9
|
-
import { Page, PageParams } from "../../
|
|
3
|
+
import * as Core from "../../core";
|
|
4
|
+
import { APIResource } from "../../resource";
|
|
5
|
+
import { isRequestOptions } from "../../core";
|
|
6
|
+
import * as TransactionsAPI from "./transactions";
|
|
7
|
+
import * as Shared from "../shared";
|
|
8
|
+
import * as LineItemsAPI from "./line-items";
|
|
9
|
+
import { Page, type PageParams } from "../../pagination";
|
|
10
10
|
|
|
11
11
|
export class Transactions extends APIResource {
|
|
12
|
-
lineItems: LineItems = new LineItems(this.client);
|
|
12
|
+
lineItems: LineItemsAPI.LineItems = new LineItemsAPI.LineItems(this.client);
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Get details on a single transaction.
|
|
@@ -58,8 +58,6 @@ export class Transactions extends APIResource {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
export class TransactionsPage extends Page<Transaction> {}
|
|
61
|
-
// alias so we can export it in the namespace
|
|
62
|
-
type _TransactionsPage = TransactionsPage;
|
|
63
61
|
|
|
64
62
|
export interface Transaction {
|
|
65
63
|
id: string;
|
|
@@ -88,17 +86,6 @@ export interface Transaction {
|
|
|
88
86
|
*/
|
|
89
87
|
currency: Shared.Currency | null;
|
|
90
88
|
|
|
91
|
-
/**
|
|
92
|
-
* This field contains additional information that the bank provided about the
|
|
93
|
-
* transaction. This is structured data. Some of the data in here might overlap
|
|
94
|
-
* with what is in the `vendor_description`. For example, the OBI could be a part
|
|
95
|
-
* of the vendor description, and it would also be included in here. The attributes
|
|
96
|
-
* that are passed through the details field will vary based on your banking
|
|
97
|
-
* partner. Currently, the following keys may be in the details object:
|
|
98
|
-
* `originator_name`, `originator_to_beneficiary_information`.
|
|
99
|
-
*/
|
|
100
|
-
details: Record<string, string>;
|
|
101
|
-
|
|
102
89
|
/**
|
|
103
90
|
* Either `credit` or `debit`.
|
|
104
91
|
*/
|
|
@@ -147,6 +134,7 @@ export interface Transaction {
|
|
|
147
134
|
| 'bacs'
|
|
148
135
|
| 'book'
|
|
149
136
|
| 'card'
|
|
137
|
+
| 'chats'
|
|
150
138
|
| 'check'
|
|
151
139
|
| 'cross_border'
|
|
152
140
|
| 'eft'
|
|
@@ -154,11 +142,13 @@ export interface Transaction {
|
|
|
154
142
|
| 'masav'
|
|
155
143
|
| 'neft'
|
|
156
144
|
| 'nics'
|
|
145
|
+
| 'nz_becs'
|
|
157
146
|
| 'provxchange'
|
|
158
147
|
| 'rtp'
|
|
159
148
|
| 'se_bankgirot'
|
|
160
149
|
| 'sen'
|
|
161
150
|
| 'sepa'
|
|
151
|
+
| 'sg_giro'
|
|
162
152
|
| 'sic'
|
|
163
153
|
| 'signet'
|
|
164
154
|
| 'wire'
|
|
@@ -207,15 +197,26 @@ export interface Transaction {
|
|
|
207
197
|
vendor_customer_id: string | null;
|
|
208
198
|
|
|
209
199
|
/**
|
|
210
|
-
*
|
|
211
|
-
|
|
200
|
+
* An identifier given to this transaction by the bank.
|
|
201
|
+
*/
|
|
202
|
+
vendor_id: string | null;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* This field contains additional information that the bank provided about the
|
|
206
|
+
* transaction. This is structured data. Some of the data in here might overlap
|
|
207
|
+
* with what is in the `vendor_description`. For example, the OBI could be a part
|
|
208
|
+
* of the vendor description, and it would also be included in here. The attributes
|
|
209
|
+
* that are passed through the details field will vary based on your banking
|
|
210
|
+
* partner. Currently, the following keys may be in the details object:
|
|
211
|
+
* `originator_name`, `originator_to_beneficiary_information`.
|
|
212
212
|
*/
|
|
213
|
-
|
|
213
|
+
details?: Record<string, string>;
|
|
214
214
|
|
|
215
215
|
/**
|
|
216
|
-
*
|
|
216
|
+
* The transaction detail text that often appears in on your bank statement and in
|
|
217
|
+
* your banking portal.
|
|
217
218
|
*/
|
|
218
|
-
|
|
219
|
+
vendor_description?: string | null;
|
|
219
220
|
}
|
|
220
221
|
|
|
221
222
|
export interface TransactionUpdateParams {
|
|
@@ -280,13 +281,12 @@ export interface TransactionListParams extends PageParams {
|
|
|
280
281
|
}
|
|
281
282
|
|
|
282
283
|
export namespace Transactions {
|
|
283
|
-
export import Transaction =
|
|
284
|
-
export
|
|
285
|
-
export import TransactionUpdateParams =
|
|
286
|
-
export import TransactionListParams =
|
|
287
|
-
|
|
288
|
-
export import
|
|
289
|
-
export import
|
|
290
|
-
export import
|
|
291
|
-
export import LineItemListParams = API.LineItemListParams;
|
|
284
|
+
export import Transaction = TransactionsAPI.Transaction;
|
|
285
|
+
export import TransactionsPage = TransactionsAPI.TransactionsPage;
|
|
286
|
+
export import TransactionUpdateParams = TransactionsAPI.TransactionUpdateParams;
|
|
287
|
+
export import TransactionListParams = TransactionsAPI.TransactionListParams;
|
|
288
|
+
export import LineItems = LineItemsAPI.LineItems;
|
|
289
|
+
export import TransactionLineItem = LineItemsAPI.TransactionLineItem;
|
|
290
|
+
export import TransactionLineItemsPage = LineItemsAPI.TransactionLineItemsPage;
|
|
291
|
+
export import LineItemListParams = LineItemsAPI.LineItemListParams;
|
|
292
292
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from "../
|
|
4
|
-
import { APIResource } from "../
|
|
5
|
-
import * as
|
|
3
|
+
import * as Core from "../core";
|
|
4
|
+
import { APIResource } from "../resource";
|
|
5
|
+
import * as ValidationsAPI from "./validations";
|
|
6
6
|
|
|
7
7
|
export class Validations extends APIResource {
|
|
8
8
|
/**
|
|
@@ -34,10 +34,10 @@ export interface RoutingNumberLookupRequest {
|
|
|
34
34
|
routing_number?: string;
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* mode we currently only support `aba` and `swift` with
|
|
40
|
-
* '123456789' and 'GRINUST0XXX' respectively.
|
|
37
|
+
* The type of routing number. See
|
|
38
|
+
* https://docs.moderntreasury.com/platform/reference/routing-detail-object for
|
|
39
|
+
* more details. In sandbox mode we currently only support `aba` and `swift` with
|
|
40
|
+
* routing numbers '123456789' and 'GRINUST0XXX' respectively.
|
|
41
41
|
*/
|
|
42
42
|
routing_number_type?:
|
|
43
43
|
| 'aba'
|
|
@@ -45,6 +45,7 @@ export interface RoutingNumberLookupRequest {
|
|
|
45
45
|
| 'ca_cpa'
|
|
46
46
|
| 'gb_sort_code'
|
|
47
47
|
| 'in_ifsc'
|
|
48
|
+
| 'nz_national_clearing_code'
|
|
48
49
|
| 'se_bankgiro_clearing_code'
|
|
49
50
|
| 'swift';
|
|
50
51
|
|
|
@@ -65,6 +66,7 @@ export interface RoutingNumberLookupRequest {
|
|
|
65
66
|
| 'bacs'
|
|
66
67
|
| 'book'
|
|
67
68
|
| 'card'
|
|
69
|
+
| 'chats'
|
|
68
70
|
| 'check'
|
|
69
71
|
| 'cross_border'
|
|
70
72
|
| 'eft'
|
|
@@ -72,11 +74,13 @@ export interface RoutingNumberLookupRequest {
|
|
|
72
74
|
| 'masav'
|
|
73
75
|
| 'neft'
|
|
74
76
|
| 'nics'
|
|
77
|
+
| 'nz_becs'
|
|
75
78
|
| 'provxchange'
|
|
76
79
|
| 'rtp'
|
|
77
80
|
| 'se_bankgirot'
|
|
78
81
|
| 'sen'
|
|
79
82
|
| 'sepa'
|
|
83
|
+
| 'sg_giro'
|
|
80
84
|
| 'sic'
|
|
81
85
|
| 'signet'
|
|
82
86
|
| 'wire'
|
|
@@ -122,10 +126,10 @@ export interface ValidationValidateRoutingNumberParams {
|
|
|
122
126
|
routing_number: string;
|
|
123
127
|
|
|
124
128
|
/**
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
* mode we currently only support `aba` and `swift` with
|
|
128
|
-
* '123456789' and 'GRINUST0XXX' respectively.
|
|
129
|
+
* The type of routing number. See
|
|
130
|
+
* https://docs.moderntreasury.com/platform/reference/routing-detail-object for
|
|
131
|
+
* more details. In sandbox mode we currently only support `aba` and `swift` with
|
|
132
|
+
* routing numbers '123456789' and 'GRINUST0XXX' respectively.
|
|
129
133
|
*/
|
|
130
134
|
routing_number_type:
|
|
131
135
|
| 'aba'
|
|
@@ -135,14 +139,16 @@ export interface ValidationValidateRoutingNumberParams {
|
|
|
135
139
|
| 'chips'
|
|
136
140
|
| 'cnaps'
|
|
137
141
|
| 'gb_sort_code'
|
|
142
|
+
| 'hk_interbank_clearing_code'
|
|
138
143
|
| 'in_ifsc'
|
|
139
144
|
| 'jp_zengin_code'
|
|
140
145
|
| 'my_branch_code'
|
|
146
|
+
| 'nz_national_clearing_code'
|
|
141
147
|
| 'se_bankgiro_clearing_code'
|
|
142
148
|
| 'swift';
|
|
143
149
|
}
|
|
144
150
|
|
|
145
151
|
export namespace Validations {
|
|
146
|
-
export import RoutingNumberLookupRequest =
|
|
147
|
-
export import ValidationValidateRoutingNumberParams =
|
|
152
|
+
export import RoutingNumberLookupRequest = ValidationsAPI.RoutingNumberLookupRequest;
|
|
153
|
+
export import ValidationValidateRoutingNumberParams = ValidationsAPI.ValidationValidateRoutingNumberParams;
|
|
148
154
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from "../
|
|
4
|
-
import { APIResource } from "../
|
|
5
|
-
import { isRequestOptions } from "../
|
|
6
|
-
import * as
|
|
7
|
-
import * as
|
|
8
|
-
import * as
|
|
9
|
-
import { Page, PageParams } from "../
|
|
3
|
+
import * as Core from "../core";
|
|
4
|
+
import { APIResource } from "../resource";
|
|
5
|
+
import { isRequestOptions } from "../core";
|
|
6
|
+
import * as VirtualAccountsAPI from "./virtual-accounts";
|
|
7
|
+
import * as AccountDetailsAPI from "./account-details";
|
|
8
|
+
import * as RoutingDetailsAPI from "./routing-details";
|
|
9
|
+
import { Page, type PageParams } from "../pagination";
|
|
10
10
|
|
|
11
11
|
export class VirtualAccounts extends APIResource {
|
|
12
12
|
/**
|
|
@@ -81,8 +81,6 @@ export class VirtualAccounts extends APIResource {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
export class VirtualAccountsPage extends Page<VirtualAccount> {}
|
|
84
|
-
// alias so we can export it in the namespace
|
|
85
|
-
type _VirtualAccountsPage = VirtualAccountsPage;
|
|
86
84
|
|
|
87
85
|
export interface VirtualAccount {
|
|
88
86
|
id: string;
|
|
@@ -90,7 +88,7 @@ export interface VirtualAccount {
|
|
|
90
88
|
/**
|
|
91
89
|
* An array of account detail objects.
|
|
92
90
|
*/
|
|
93
|
-
account_details: Array<
|
|
91
|
+
account_details: Array<AccountDetailsAPI.AccountDetail>;
|
|
94
92
|
|
|
95
93
|
/**
|
|
96
94
|
* The ID of a counterparty that the virtual account belongs to. Optional.
|
|
@@ -148,7 +146,7 @@ export interface VirtualAccount {
|
|
|
148
146
|
* An array of routing detail objects. These will be the routing details of the
|
|
149
147
|
* internal account.
|
|
150
148
|
*/
|
|
151
|
-
routing_details: Array<
|
|
149
|
+
routing_details: Array<RoutingDetailsAPI.RoutingDetail>;
|
|
152
150
|
|
|
153
151
|
updated_at: string;
|
|
154
152
|
}
|
|
@@ -226,7 +224,9 @@ export namespace VirtualAccountCreateParams {
|
|
|
226
224
|
routing_number: string;
|
|
227
225
|
|
|
228
226
|
/**
|
|
229
|
-
*
|
|
227
|
+
* The type of routing number. See
|
|
228
|
+
* https://docs.moderntreasury.com/platform/reference/routing-detail-object for
|
|
229
|
+
* more details.
|
|
230
230
|
*/
|
|
231
231
|
routing_number_type:
|
|
232
232
|
| 'aba'
|
|
@@ -236,9 +236,11 @@ export namespace VirtualAccountCreateParams {
|
|
|
236
236
|
| 'chips'
|
|
237
237
|
| 'cnaps'
|
|
238
238
|
| 'gb_sort_code'
|
|
239
|
+
| 'hk_interbank_clearing_code'
|
|
239
240
|
| 'in_ifsc'
|
|
240
241
|
| 'jp_zengin_code'
|
|
241
242
|
| 'my_branch_code'
|
|
243
|
+
| 'nz_national_clearing_code'
|
|
242
244
|
| 'se_bankgiro_clearing_code'
|
|
243
245
|
| 'swift';
|
|
244
246
|
|
|
@@ -252,6 +254,7 @@ export namespace VirtualAccountCreateParams {
|
|
|
252
254
|
| 'bacs'
|
|
253
255
|
| 'book'
|
|
254
256
|
| 'card'
|
|
257
|
+
| 'chats'
|
|
255
258
|
| 'check'
|
|
256
259
|
| 'cross_border'
|
|
257
260
|
| 'eft'
|
|
@@ -259,11 +262,13 @@ export namespace VirtualAccountCreateParams {
|
|
|
259
262
|
| 'masav'
|
|
260
263
|
| 'neft'
|
|
261
264
|
| 'nics'
|
|
265
|
+
| 'nz_becs'
|
|
262
266
|
| 'provxchange'
|
|
263
267
|
| 'rtp'
|
|
264
268
|
| 'se_bankgirot'
|
|
265
269
|
| 'sen'
|
|
266
270
|
| 'sepa'
|
|
271
|
+
| 'sg_giro'
|
|
267
272
|
| 'sic'
|
|
268
273
|
| 'signet'
|
|
269
274
|
| 'wire'
|
|
@@ -294,9 +299,9 @@ export interface VirtualAccountListParams extends PageParams {
|
|
|
294
299
|
}
|
|
295
300
|
|
|
296
301
|
export namespace VirtualAccounts {
|
|
297
|
-
export import VirtualAccount =
|
|
298
|
-
export
|
|
299
|
-
export import VirtualAccountCreateParams =
|
|
300
|
-
export import VirtualAccountUpdateParams =
|
|
301
|
-
export import VirtualAccountListParams =
|
|
302
|
+
export import VirtualAccount = VirtualAccountsAPI.VirtualAccount;
|
|
303
|
+
export import VirtualAccountsPage = VirtualAccountsAPI.VirtualAccountsPage;
|
|
304
|
+
export import VirtualAccountCreateParams = VirtualAccountsAPI.VirtualAccountCreateParams;
|
|
305
|
+
export import VirtualAccountUpdateParams = VirtualAccountsAPI.VirtualAccountUpdateParams;
|
|
306
|
+
export import VirtualAccountListParams = VirtualAccountsAPI.VirtualAccountListParams;
|
|
302
307
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from "../
|
|
3
|
+
import { APIResource } from "../resource";
|
|
4
4
|
import { createHmac } from 'crypto';
|
|
5
|
-
import type { HeadersLike } from "../
|
|
6
|
-
import {
|
|
5
|
+
import type { HeadersLike } from "../core";
|
|
6
|
+
import { getRequiredHeader } from "../core";
|
|
7
7
|
|
|
8
8
|
export class Webhooks extends APIResource {
|
|
9
9
|
/**
|
|
@@ -40,8 +40,9 @@ export class Webhooks extends APIResource {
|
|
|
40
40
|
opts?: { key?: string | null | undefined },
|
|
41
41
|
): boolean {
|
|
42
42
|
const signature = this.getSignature(payload, opts);
|
|
43
|
-
const expectedSignature =
|
|
44
|
-
|
|
43
|
+
const expectedSignature =
|
|
44
|
+
typeof headers === 'string' ? headers : getRequiredHeader(headers, 'X-Signature');
|
|
45
|
+
if (!expectedSignature) throw new Error('Could not find X-Signature header');
|
|
45
46
|
return signature === expectedSignature;
|
|
46
47
|
}
|
|
47
48
|
}
|
package/src/shims/node.ts
CHANGED
package/src/shims/web.ts
CHANGED
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '2.
|
|
1
|
+
export const VERSION = '2.9.0'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.
|
|
1
|
+
export declare const VERSION = "2.9.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '2.
|
|
1
|
+
export const VERSION = '2.9.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|