modern-treasury 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/README.md +2 -0
- package/_shims/{ReadableStream.node.d.ts → ReadableStream-node.d.ts} +1 -1
- package/_shims/ReadableStream-node.d.ts.map +1 -0
- package/_shims/{ReadableStream.node.js → ReadableStream-node.js} +1 -1
- package/_shims/ReadableStream-node.js.map +1 -0
- package/_shims/{ReadableStream.node.mjs → ReadableStream-node.mjs} +1 -1
- package/_shims/ReadableStream-node.mjs.map +1 -0
- package/_shims/{agent.node.d.ts → agent-node.d.ts} +1 -1
- package/_shims/agent-node.d.ts.map +1 -0
- package/_shims/{agent.node.js → agent-node.js} +1 -1
- package/_shims/{agent.node.js.map → agent-node.js.map} +1 -1
- package/_shims/{agent.node.mjs → agent-node.mjs} +1 -1
- package/_shims/{agent.node.mjs.map → agent-node.mjs.map} +1 -1
- package/_shims/agent.d.ts +1 -1
- package/_shims/agent.js +1 -1
- package/_shims/agent.mjs +1 -1
- package/{src/_shims/fetch.node.d.ts → _shims/fetch-node.d.ts} +1 -0
- package/_shims/fetch.d.ts +1 -0
- package/_shims/{fileFromPath.node.d.ts → fileFromPath-node.d.ts} +2 -2
- package/_shims/{fileFromPath.node.d.ts.map → fileFromPath-node.d.ts.map} +1 -1
- package/_shims/{fileFromPath.node.js → fileFromPath-node.js} +1 -1
- package/_shims/{fileFromPath.node.js.map → fileFromPath-node.js.map} +1 -1
- package/_shims/{fileFromPath.node.mjs → fileFromPath-node.mjs} +1 -1
- package/_shims/{fileFromPath.node.mjs.map → fileFromPath-node.mjs.map} +1 -1
- package/_shims/fileFromPath.d.ts +2 -2
- package/_shims/fileFromPath.d.ts.map +1 -1
- package/_shims/fileFromPath.js +1 -1
- package/_shims/fileFromPath.mjs +1 -1
- package/_shims/form-data.js +17 -0
- package/_shims/form-data.mjs +20 -0
- package/_shims/{getMultipartRequestOptions.node.d.ts → getMultipartRequestOptions-node.d.ts} +2 -2
- package/_shims/getMultipartRequestOptions-node.d.ts.map +1 -0
- package/_shims/{getMultipartRequestOptions.node.js → getMultipartRequestOptions-node.js} +1 -1
- package/_shims/{getMultipartRequestOptions.node.js.map → getMultipartRequestOptions-node.js.map} +1 -1
- package/_shims/{getMultipartRequestOptions.node.mjs → getMultipartRequestOptions-node.mjs} +1 -1
- package/_shims/{getMultipartRequestOptions.node.mjs.map → getMultipartRequestOptions-node.mjs.map} +1 -1
- package/_shims/getMultipartRequestOptions.d.ts +1 -1
- package/_shims/getMultipartRequestOptions.d.ts.map +1 -1
- package/_shims/{node-readable.node.d.ts → node-readable-node.d.ts} +1 -1
- package/_shims/{node-readable.node.d.ts.map → node-readable-node.d.ts.map} +1 -1
- package/_shims/{node-readable.node.js → node-readable-node.js} +1 -1
- package/_shims/node-readable-node.js.map +1 -0
- package/_shims/{node-readable.node.mjs → node-readable-node.mjs} +1 -1
- package/_shims/node-readable-node.mjs.map +1 -0
- package/core.d.ts +13 -5
- package/core.d.ts.map +1 -1
- package/core.js +17 -10
- package/core.js.map +1 -1
- package/core.mjs +17 -10
- package/core.mjs.map +1 -1
- package/index.d.mts +18 -5
- package/index.d.ts +18 -5
- package/index.d.ts.map +1 -1
- package/index.js +21 -7
- package/index.js.map +1 -1
- package/index.mjs +21 -7
- package/index.mjs.map +1 -1
- package/package.json +32 -9
- package/resources/account-collection-flows.d.ts +3 -28
- package/resources/account-collection-flows.d.ts.map +1 -1
- package/resources/account-collection-flows.js +22 -17
- package/resources/account-collection-flows.js.map +1 -1
- package/resources/account-collection-flows.mjs +22 -17
- package/resources/account-collection-flows.mjs.map +1 -1
- package/resources/account-details.d.ts +3 -8
- package/resources/account-details.d.ts.map +1 -1
- package/resources/account-details.js +10 -4
- package/resources/account-details.js.map +1 -1
- package/resources/account-details.mjs +10 -4
- package/resources/account-details.mjs.map +1 -1
- package/resources/connections.js +3 -3
- package/resources/connections.mjs +3 -3
- package/resources/counterparties.d.ts +26 -40
- package/resources/counterparties.d.ts.map +1 -1
- package/resources/counterparties.js +17 -5
- package/resources/counterparties.js.map +1 -1
- package/resources/counterparties.mjs +17 -5
- package/resources/counterparties.mjs.map +1 -1
- package/resources/documents.d.ts +2 -13
- package/resources/documents.d.ts.map +1 -1
- package/resources/documents.js +11 -5
- package/resources/documents.js.map +1 -1
- package/resources/documents.mjs +11 -5
- package/resources/documents.mjs.map +1 -1
- package/resources/events.js +3 -3
- package/resources/events.mjs +3 -3
- package/resources/expected-payments.d.ts +23 -32
- package/resources/expected-payments.d.ts.map +1 -1
- package/resources/expected-payments.js +10 -4
- package/resources/expected-payments.js.map +1 -1
- package/resources/expected-payments.mjs +10 -4
- package/resources/expected-payments.mjs.map +1 -1
- package/resources/external-accounts.d.ts +17 -51
- package/resources/external-accounts.d.ts.map +1 -1
- package/resources/external-accounts.js +24 -6
- package/resources/external-accounts.js.map +1 -1
- package/resources/external-accounts.mjs +24 -6
- package/resources/external-accounts.mjs.map +1 -1
- package/resources/incoming-payment-details.d.ts +10 -15
- package/resources/incoming-payment-details.d.ts.map +1 -1
- package/resources/incoming-payment-details.js +10 -4
- package/resources/incoming-payment-details.js.map +1 -1
- package/resources/incoming-payment-details.mjs +10 -4
- package/resources/incoming-payment-details.mjs.map +1 -1
- package/resources/index.d.ts +0 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/internal-accounts/balance-reports.js +3 -3
- package/resources/internal-accounts/balance-reports.mjs +3 -3
- package/resources/internal-accounts/internal-accounts.d.ts +10 -15
- package/resources/internal-accounts/internal-accounts.d.ts.map +1 -1
- package/resources/internal-accounts/internal-accounts.js +10 -4
- package/resources/internal-accounts/internal-accounts.js.map +1 -1
- package/resources/internal-accounts/internal-accounts.mjs +10 -4
- package/resources/internal-accounts/internal-accounts.mjs.map +1 -1
- package/resources/invoices/invoices.d.ts +24 -32
- package/resources/invoices/invoices.d.ts.map +1 -1
- package/resources/invoices/invoices.js +10 -4
- package/resources/invoices/invoices.js.map +1 -1
- package/resources/invoices/invoices.mjs +10 -4
- package/resources/invoices/invoices.mjs.map +1 -1
- package/resources/invoices/line-items.d.ts +9 -14
- package/resources/invoices/line-items.d.ts.map +1 -1
- package/resources/invoices/line-items.js +10 -4
- package/resources/invoices/line-items.js.map +1 -1
- package/resources/invoices/line-items.mjs +10 -4
- package/resources/invoices/line-items.mjs.map +1 -1
- package/resources/ledger-account-categories.d.ts +8 -13
- package/resources/ledger-account-categories.d.ts.map +1 -1
- package/resources/ledger-account-categories.js +10 -4
- package/resources/ledger-account-categories.js.map +1 -1
- package/resources/ledger-account-categories.mjs +10 -4
- package/resources/ledger-account-categories.mjs.map +1 -1
- package/resources/ledger-account-payouts.d.ts +14 -19
- package/resources/ledger-account-payouts.d.ts.map +1 -1
- package/resources/ledger-account-payouts.js +10 -4
- package/resources/ledger-account-payouts.js.map +1 -1
- package/resources/ledger-account-payouts.mjs +10 -4
- package/resources/ledger-account-payouts.mjs.map +1 -1
- package/resources/ledger-account-statements.d.ts +9 -14
- package/resources/ledger-account-statements.d.ts.map +1 -1
- package/resources/ledger-account-statements.js +8 -2
- package/resources/ledger-account-statements.js.map +1 -1
- package/resources/ledger-account-statements.mjs +8 -2
- package/resources/ledger-account-statements.mjs.map +1 -1
- package/resources/ledger-accounts.d.ts +13 -18
- package/resources/ledger-accounts.d.ts.map +1 -1
- package/resources/ledger-accounts.js +10 -4
- package/resources/ledger-accounts.js.map +1 -1
- package/resources/ledger-accounts.mjs +10 -4
- package/resources/ledger-accounts.mjs.map +1 -1
- package/resources/ledger-entries.js +3 -3
- package/resources/ledger-entries.mjs +3 -3
- package/resources/ledger-event-handlers.d.ts +5 -16
- package/resources/ledger-event-handlers.d.ts.map +1 -1
- package/resources/ledger-event-handlers.js +10 -4
- package/resources/ledger-event-handlers.js.map +1 -1
- package/resources/ledger-event-handlers.mjs +10 -4
- package/resources/ledger-event-handlers.mjs.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.d.ts +16 -22
- package/resources/ledger-transactions/ledger-transactions.d.ts.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.js +10 -4
- package/resources/ledger-transactions/ledger-transactions.js.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.mjs +10 -4
- package/resources/ledger-transactions/ledger-transactions.mjs.map +1 -1
- package/resources/ledger-transactions/versions.js +3 -3
- package/resources/ledger-transactions/versions.mjs +3 -3
- package/resources/ledgerable-events.d.ts +11 -16
- package/resources/ledgerable-events.d.ts.map +1 -1
- package/resources/ledgerable-events.js +8 -2
- package/resources/ledgerable-events.js.map +1 -1
- package/resources/ledgerable-events.mjs +8 -2
- package/resources/ledgerable-events.mjs.map +1 -1
- package/resources/ledgers.d.ts +4 -9
- package/resources/ledgers.d.ts.map +1 -1
- package/resources/ledgers.js +10 -4
- package/resources/ledgers.js.map +1 -1
- package/resources/ledgers.mjs +10 -4
- package/resources/ledgers.mjs.map +1 -1
- package/resources/line-items.js +3 -3
- package/resources/line-items.mjs +3 -3
- package/resources/paper-items.js +3 -3
- package/resources/paper-items.mjs +3 -3
- package/resources/payment-flows.d.ts +10 -34
- package/resources/payment-flows.d.ts.map +1 -1
- package/resources/payment-flows.js +22 -17
- package/resources/payment-flows.js.map +1 -1
- package/resources/payment-flows.mjs +22 -17
- package/resources/payment-flows.mjs.map +1 -1
- package/resources/payment-orders/payment-orders.d.ts +142 -167
- package/resources/payment-orders/payment-orders.d.ts.map +1 -1
- package/resources/payment-orders/payment-orders.js +18 -6
- package/resources/payment-orders/payment-orders.js.map +1 -1
- package/resources/payment-orders/payment-orders.mjs +18 -6
- package/resources/payment-orders/payment-orders.mjs.map +1 -1
- package/resources/payment-orders/reversals.d.ts +7 -13
- package/resources/payment-orders/reversals.d.ts.map +1 -1
- package/resources/payment-orders/reversals.js +10 -4
- package/resources/payment-orders/reversals.js.map +1 -1
- package/resources/payment-orders/reversals.mjs +10 -4
- package/resources/payment-orders/reversals.mjs.map +1 -1
- package/resources/payment-references.js +3 -3
- package/resources/payment-references.mjs +3 -3
- package/resources/returns.d.ts +9 -15
- package/resources/returns.d.ts.map +1 -1
- package/resources/returns.js +10 -4
- package/resources/returns.js.map +1 -1
- package/resources/returns.mjs +10 -4
- package/resources/returns.mjs.map +1 -1
- package/resources/routing-details.d.ts +4 -10
- package/resources/routing-details.d.ts.map +1 -1
- package/resources/routing-details.js +10 -4
- package/resources/routing-details.js.map +1 -1
- package/resources/routing-details.mjs +10 -4
- package/resources/routing-details.mjs.map +1 -1
- package/resources/transactions/line-items.js +3 -3
- package/resources/transactions/line-items.mjs +3 -3
- package/resources/transactions/transactions.js +3 -3
- package/resources/transactions/transactions.mjs +3 -3
- package/resources/validations.js +1 -1
- package/resources/validations.mjs +1 -1
- package/resources/virtual-accounts.d.ts +12 -18
- package/resources/virtual-accounts.d.ts.map +1 -1
- package/resources/virtual-accounts.js +10 -4
- package/resources/virtual-accounts.js.map +1 -1
- package/resources/virtual-accounts.mjs +10 -4
- package/resources/virtual-accounts.mjs.map +1 -1
- package/resources/webhooks.js +2 -2
- package/resources/webhooks.mjs +2 -2
- package/src/_shims/ReadableStream.d.ts +5 -5
- package/src/_shims/agent.ts +1 -1
- package/{_shims/fetch.node.d.ts → src/_shims/fetch-node.d.ts} +9 -8
- package/src/_shims/fetch.d.ts +11 -10
- package/src/_shims/{fileFromPath.node.ts → fileFromPath-node.ts} +1 -1
- package/src/_shims/fileFromPath.ts +2 -2
- package/src/_shims/{formdata.node.d.ts → form-data-node.d.ts} +4 -4
- package/src/_shims/{formdata.d.ts → form-data.d.ts} +4 -4
- package/src/_shims/form-data.js +17 -0
- package/src/_shims/form-data.mjs +20 -0
- package/src/_shims/{getMultipartRequestOptions.node.ts → getMultipartRequestOptions-node.ts} +3 -3
- package/src/_shims/getMultipartRequestOptions.ts +3 -3
- package/src/core.ts +35 -22
- package/src/error.ts +1 -1
- package/src/index.ts +27 -13
- package/src/pagination.ts +1 -1
- package/src/resource.ts +1 -1
- package/src/resources/account-collection-flows.ts +24 -52
- package/src/resources/account-details.ts +16 -16
- package/src/resources/connections.ts +5 -5
- package/src/resources/counterparties.ts +48 -52
- package/src/resources/documents.ts +15 -21
- package/src/resources/events.ts +5 -5
- package/src/resources/expected-payments.ts +36 -40
- package/src/resources/external-accounts.ts +46 -65
- package/src/resources/incoming-payment-details.ts +24 -24
- package/src/resources/index.ts +39 -35
- package/src/resources/internal-accounts/balance-reports.ts +6 -6
- package/src/resources/internal-accounts/index.ts +2 -2
- package/src/resources/internal-accounts/internal-accounts.ts +27 -27
- package/src/resources/invoices/index.ts +2 -2
- package/src/resources/invoices/invoices.ts +39 -42
- package/src/resources/invoices/line-items.ts +21 -21
- package/src/resources/ledger-account-categories.ts +20 -20
- package/src/resources/ledger-account-payouts.ts +26 -26
- package/src/resources/ledger-account-statements.ts +19 -19
- package/src/resources/ledger-accounts.ts +25 -25
- package/src/resources/ledger-entries.ts +5 -5
- package/src/resources/ledger-event-handlers.ts +17 -23
- package/src/resources/ledger-transactions/index.ts +2 -2
- package/src/resources/ledger-transactions/ledger-transactions.ts +30 -31
- package/src/resources/ledger-transactions/versions.ts +5 -5
- package/src/resources/ledgerable-events.ts +21 -21
- package/src/resources/ledgers.ts +16 -16
- package/src/resources/line-items.ts +5 -5
- package/src/resources/paper-items.ts +6 -6
- package/src/resources/payment-flows.ts +31 -58
- package/src/resources/payment-orders/index.ts +2 -2
- package/src/resources/payment-orders/payment-orders.ts +166 -181
- package/src/resources/payment-orders/reversals.ts +19 -20
- package/src/resources/payment-references.ts +5 -5
- package/src/resources/returns.ts +22 -23
- package/src/resources/routing-details.ts +17 -18
- package/src/resources/top-level.ts +1 -1
- package/src/resources/transactions/index.ts +7 -2
- package/src/resources/transactions/line-items.ts +5 -5
- package/src/resources/transactions/transactions.ts +7 -7
- package/src/resources/validations.ts +3 -3
- package/src/resources/virtual-accounts.ts +26 -27
- package/src/resources/webhooks.ts +3 -3
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +6 -6
- package/src/version.ts +1 -1
- package/uploads.d.ts +1 -1
- package/uploads.d.ts.map +1 -1
- package/uploads.js +7 -7
- package/uploads.js.map +1 -1
- package/uploads.mjs +4 -4
- package/uploads.mjs.map +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/_shims/ReadableStream.node.d.ts.map +0 -1
- package/_shims/ReadableStream.node.js.map +0 -1
- package/_shims/ReadableStream.node.mjs.map +0 -1
- package/_shims/agent.node.d.ts.map +0 -1
- package/_shims/formdata.js +0 -9
- package/_shims/formdata.mjs +0 -11
- package/_shims/getMultipartRequestOptions.node.d.ts.map +0 -1
- package/_shims/node-readable.node.js.map +0 -1
- package/_shims/node-readable.node.mjs.map +0 -1
- package/src/_shims/fetch.deno.ts +0 -23
- package/src/_shims/formdata.deno.ts +0 -16
- package/src/_shims/formdata.js +0 -9
- package/src/_shims/formdata.mjs +0 -11
- /package/_shims/{fetch.node.js → fetch-node.js} +0 -0
- /package/_shims/{fetch.node.mjs → fetch-node.mjs} +0 -0
- /package/_shims/{formdata.node.d.ts → form-data-node.d.ts} +0 -0
- /package/_shims/{formdata.node.js → form-data-node.js} +0 -0
- /package/_shims/{formdata.node.mjs → form-data-node.mjs} +0 -0
- /package/_shims/{formdata.d.ts → form-data.d.ts} +0 -0
- /package/src/_shims/{ReadableStream.node.ts → ReadableStream-node.ts} +0 -0
- /package/src/_shims/{agent.node.ts → agent-node.ts} +0 -0
- /package/src/_shims/{fetch.node.js → fetch-node.js} +0 -0
- /package/src/_shims/{fetch.node.mjs → fetch-node.mjs} +0 -0
- /package/src/_shims/{formdata.node.js → form-data-node.js} +0 -0
- /package/src/_shims/{formdata.node.mjs → form-data-node.mjs} +0 -0
- /package/src/_shims/{node-readable.node.ts → node-readable-node.ts} +0 -0
package/index.mjs
CHANGED
|
@@ -6,10 +6,24 @@ import * as API from './resources/index.mjs';
|
|
|
6
6
|
import * as Errors from './error.mjs';
|
|
7
7
|
import * as Uploads from './uploads.mjs';
|
|
8
8
|
import * as qs from 'qs';
|
|
9
|
-
/**
|
|
9
|
+
/** API Client for interfacing with the Modern Treasury API. */
|
|
10
10
|
export class ModernTreasury extends Core.APIClient {
|
|
11
|
+
/**
|
|
12
|
+
* API Client for interfacing with the Modern Treasury API.
|
|
13
|
+
*
|
|
14
|
+
* @param {string} [opts.apiKey=process.env['MODERN_TREASURY_API_KEY']] - The API Key to send to the API.
|
|
15
|
+
* @param {string} [opts.baseURL] - Override the default base URL for the API.
|
|
16
|
+
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
17
|
+
* @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
|
|
18
|
+
* @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
19
|
+
* @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
|
|
20
|
+
* @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
|
|
21
|
+
* @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
22
|
+
* @param {string} [opts.organizationId]
|
|
23
|
+
* @param {string | null} [opts.webhookKey]
|
|
24
|
+
*/
|
|
11
25
|
constructor(_b) {
|
|
12
|
-
var _c, _d;
|
|
26
|
+
var _c, _d, _e;
|
|
13
27
|
var {
|
|
14
28
|
apiKey = Core.readEnv('MODERN_TREASURY_API_KEY'),
|
|
15
29
|
organizationId = Core.readEnv('MODERN_TREASURY_ORGANIZATION_ID'),
|
|
@@ -30,12 +44,12 @@ export class ModernTreasury extends Core.APIClient {
|
|
|
30
44
|
apiKey,
|
|
31
45
|
organizationId,
|
|
32
46
|
webhookKey,
|
|
33
|
-
baseURL: `https://app.moderntreasury.com`,
|
|
34
47
|
...opts,
|
|
48
|
+
baseURL: (_d = opts.baseURL) !== null && _d !== void 0 ? _d : `https://app.moderntreasury.com`,
|
|
35
49
|
};
|
|
36
50
|
super({
|
|
37
51
|
baseURL: options.baseURL,
|
|
38
|
-
timeout: (
|
|
52
|
+
timeout: (_e = options.timeout) !== null && _e !== void 0 ? _e : 60000 /* 1 minute */,
|
|
39
53
|
httpAgent: options.httpAgent,
|
|
40
54
|
maxRetries: options.maxRetries,
|
|
41
55
|
fetch: options.fetch,
|
|
@@ -87,13 +101,13 @@ export class ModernTreasury extends Core.APIClient {
|
|
|
87
101
|
defaultQuery() {
|
|
88
102
|
return this._options.defaultQuery;
|
|
89
103
|
}
|
|
90
|
-
defaultHeaders() {
|
|
104
|
+
defaultHeaders(opts) {
|
|
91
105
|
return {
|
|
92
|
-
...super.defaultHeaders(),
|
|
106
|
+
...super.defaultHeaders(opts),
|
|
93
107
|
...this._options.defaultHeaders,
|
|
94
108
|
};
|
|
95
109
|
}
|
|
96
|
-
authHeaders() {
|
|
110
|
+
authHeaders(opts) {
|
|
97
111
|
const credentials = `${this.organizationId}:${this.apiKey}`;
|
|
98
112
|
const Authorization = `Basic ${Core.toBase64(credentials)}`;
|
|
99
113
|
return { Authorization };
|
package/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,qDAAqD;;OAE9C,KAAK,IAAI;OACT,KAAK,UAAU;OACf,KAAK,GAAG;OACR,KAAK,MAAM;OAEX,KAAK,OAAO;OACZ,KAAK,EAAE,MAAM,IAAI;AAmExB
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,qDAAqD;;OAE9C,KAAK,IAAI;OACT,KAAK,UAAU;OACf,KAAK,GAAG;OACR,KAAK,MAAM;OAEX,KAAK,OAAO;OACZ,KAAK,EAAE,MAAM,IAAI;AAmExB,+DAA+D;AAC/D,MAAM,OAAO,cAAe,SAAQ,IAAI,CAAC,SAAS;IAOhD;;;;;;;;;;;;;OAaG;IACH,YAAY,EAKS;;YALT,EACV,MAAM,GAAG,IA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AAgB,CAAC;IAIxC,0BAAW,GAAG,GAAG,CAAC,WAAW,CAAC;IAI9B,yBAAU,GAAG,GAAG,CAAC,UAAU,CAAC;IAE5B,6BAAc,GAAG,GAAG,CAAC,cAAc,CAAC;IAGpC,uBAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;IAExB,8BAAe,GAAG,GAAG,CAAC,eAAe,CAAC;IAEtC,kCAAmB,GAAG,GAAG,CAAC,mBAAmB,CAAC;AAQ9D,CAAC,EA3NgB,cAAc,KAAd,cAAc,QA2N9B;AAED,eAAe,cAAc,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "modern-treasury",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "Client library for the ModernTreasury API",
|
|
5
5
|
"author": "Modern Treasury <sdk-feedback@moderntreasury.com>",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -10,36 +10,59 @@
|
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"private": false,
|
|
12
12
|
"exports": {
|
|
13
|
-
"./_shims
|
|
13
|
+
"./_shims/*.mjs": {
|
|
14
14
|
"deno": {
|
|
15
|
+
"types": "./_shims/*.d.ts",
|
|
16
|
+
"default": "./_shims/*.mjs"
|
|
17
|
+
},
|
|
18
|
+
"bun": {
|
|
15
19
|
"types": "./_shims/*.d.ts",
|
|
16
20
|
"require": "./_shims/*.js",
|
|
17
21
|
"default": "./_shims/*.mjs"
|
|
18
22
|
},
|
|
19
23
|
"browser": {
|
|
20
24
|
"types": "./_shims/*.d.ts",
|
|
21
|
-
"require": "./_shims/*.js",
|
|
22
25
|
"default": "./_shims/*.mjs"
|
|
23
26
|
},
|
|
24
27
|
"worker": {
|
|
25
28
|
"types": "./_shims/*.d.ts",
|
|
26
|
-
"require": "./_shims/*.js",
|
|
27
29
|
"default": "./_shims/*.mjs"
|
|
28
30
|
},
|
|
29
31
|
"workerd": {
|
|
30
32
|
"types": "./_shims/*.d.ts",
|
|
31
|
-
"require": "./_shims/*.js",
|
|
32
33
|
"default": "./_shims/*.mjs"
|
|
33
34
|
},
|
|
34
35
|
"node": {
|
|
35
|
-
"types": "./_shims
|
|
36
|
-
"
|
|
37
|
-
"default": "./_shims/*.node.mjs"
|
|
36
|
+
"types": "./_shims/*-node.d.ts",
|
|
37
|
+
"default": "./_shims/*-node.mjs"
|
|
38
38
|
},
|
|
39
39
|
"types": "./_shims/*.d.ts",
|
|
40
|
-
"require": "./_shims/*.js",
|
|
41
40
|
"default": "./_shims/*.mjs"
|
|
42
41
|
},
|
|
42
|
+
"./_shims/*.js": {
|
|
43
|
+
"deno": {
|
|
44
|
+
"types": "./_shims/*.d.ts",
|
|
45
|
+
"default": "./_shims/*.js"
|
|
46
|
+
},
|
|
47
|
+
"browser": {
|
|
48
|
+
"types": "./_shims/*.d.ts",
|
|
49
|
+
"default": "./_shims/*.js"
|
|
50
|
+
},
|
|
51
|
+
"worker": {
|
|
52
|
+
"types": "./_shims/*.d.ts",
|
|
53
|
+
"default": "./_shims/*.js"
|
|
54
|
+
},
|
|
55
|
+
"workerd": {
|
|
56
|
+
"types": "./_shims/*.d.ts",
|
|
57
|
+
"default": "./_shims/*.js"
|
|
58
|
+
},
|
|
59
|
+
"node": {
|
|
60
|
+
"types": "./_shims/*-node.d.ts",
|
|
61
|
+
"default": "./_shims/*-node.js"
|
|
62
|
+
},
|
|
63
|
+
"types": "./_shims/*.d.ts",
|
|
64
|
+
"default": "./_shims/*.js"
|
|
65
|
+
},
|
|
43
66
|
".": {
|
|
44
67
|
"require": {
|
|
45
68
|
"types": "./index.d.ts",
|
|
@@ -13,11 +13,6 @@ export declare class AccountCollectionFlows extends APIResource {
|
|
|
13
13
|
/**
|
|
14
14
|
* get account_collection_flow
|
|
15
15
|
*/
|
|
16
|
-
retrieve(
|
|
17
|
-
id: string,
|
|
18
|
-
query?: AccountCollectionFlowRetrieveParams,
|
|
19
|
-
options?: Core.RequestOptions,
|
|
20
|
-
): Core.APIPromise<AccountCollectionFlow>;
|
|
21
16
|
retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<AccountCollectionFlow>;
|
|
22
17
|
/**
|
|
23
18
|
* update account_collection_flow
|
|
@@ -71,36 +66,17 @@ export interface AccountCollectionFlow {
|
|
|
71
66
|
}
|
|
72
67
|
export interface AccountCollectionFlowCreateParams {
|
|
73
68
|
/**
|
|
74
|
-
*
|
|
69
|
+
* Required.
|
|
75
70
|
*/
|
|
76
71
|
counterparty_id: string;
|
|
77
|
-
/**
|
|
78
|
-
* Body param:
|
|
79
|
-
*/
|
|
80
72
|
payment_types: Array<string>;
|
|
81
|
-
/**
|
|
82
|
-
* Header param: This key should be something unique, preferably something like an
|
|
83
|
-
* UUID.
|
|
84
|
-
*/
|
|
85
|
-
'Idempotency-Key'?: string;
|
|
86
|
-
}
|
|
87
|
-
export interface AccountCollectionFlowRetrieveParams {
|
|
88
|
-
/**
|
|
89
|
-
* This key should be something unique, preferably something like an UUID.
|
|
90
|
-
*/
|
|
91
|
-
'Idempotency-Key'?: string;
|
|
92
73
|
}
|
|
93
74
|
export interface AccountCollectionFlowUpdateParams {
|
|
94
75
|
/**
|
|
95
|
-
*
|
|
96
|
-
*
|
|
76
|
+
* Required. The updated status of the account collection flow. Can only be used to
|
|
77
|
+
* mark a flow as `cancelled`.
|
|
97
78
|
*/
|
|
98
79
|
status: 'cancelled';
|
|
99
|
-
/**
|
|
100
|
-
* Header param: This key should be something unique, preferably something like an
|
|
101
|
-
* UUID.
|
|
102
|
-
*/
|
|
103
|
-
'Idempotency-Key'?: string;
|
|
104
80
|
}
|
|
105
81
|
export interface AccountCollectionFlowListParams extends PageParams {
|
|
106
82
|
client_token?: string;
|
|
@@ -112,7 +88,6 @@ export declare namespace AccountCollectionFlows {
|
|
|
112
88
|
export import AccountCollectionFlow = API.AccountCollectionFlow;
|
|
113
89
|
type AccountCollectionFlowsPage = _AccountCollectionFlowsPage;
|
|
114
90
|
export import AccountCollectionFlowCreateParams = API.AccountCollectionFlowCreateParams;
|
|
115
|
-
export import AccountCollectionFlowRetrieveParams = API.AccountCollectionFlowRetrieveParams;
|
|
116
91
|
export import AccountCollectionFlowUpdateParams = API.AccountCollectionFlowUpdateParams;
|
|
117
92
|
export import AccountCollectionFlowListParams = API.AccountCollectionFlowListParams;
|
|
118
93
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-collection-flows.d.ts","sourceRoot":"","sources":["../src/resources/account-collection-flows.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,sBAAuB,SAAQ,WAAW;IACrD;;OAEG;IACH,MAAM,CACJ,MAAM,EAAE,iCAAiC,EACzC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"account-collection-flows.d.ts","sourceRoot":"","sources":["../src/resources/account-collection-flows.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,sBAAuB,SAAQ,WAAW;IACrD;;OAEG;IACH,MAAM,CACJ,MAAM,EAAE,iCAAiC,EACzC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,qBAAqB,CAAC;IAezC;;OAEG;IACH,QAAQ,CAAC,EAAE,E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AAM,CAAC;IAExB,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,iCAAiC;IAChD;;;OAGG;IACH,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,MAAM,WAAW,+BAAgC,SAAQ,UAAU;IACjE,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,yBAAiB,sBAAsB,CAAC;IACtC,MAAM,QAAQ,qBAAqB,GAAG,GAAG,CAAC,qBAAqB,CAAC;IAChE,KAAY,0BAA0B,GAAG,2BAA2B,CAAC;IACrE,MAAM,QAAQ,iCAAiC,GAAG,GAAG,CAAC,iCAAiC,CAAC;IACxF,MAAM,QAAQ,iCAAiC,GAAG,GAAG,CAAC,iCAAiC,CAAC;IACxF,MAAM,QAAQ,+BAA+B,GAAG,GAAG,CAAC,+BAA+B,CAAC;CACrF"}
|
|
@@ -2,47 +2,52 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless.
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
exports.AccountCollectionFlowsPage = exports.AccountCollectionFlows = void 0;
|
|
5
|
-
const resource_1 = require('modern-treasury/resource');
|
|
6
|
-
const core_1 = require('modern-treasury/core');
|
|
7
|
-
const pagination_1 = require('modern-treasury/pagination');
|
|
5
|
+
const resource_1 = require('modern-treasury/resource.js');
|
|
6
|
+
const core_1 = require('modern-treasury/core.js');
|
|
7
|
+
const pagination_1 = require('modern-treasury/pagination.js');
|
|
8
8
|
class AccountCollectionFlows extends resource_1.APIResource {
|
|
9
9
|
/**
|
|
10
10
|
* create account_collection_flow
|
|
11
11
|
*/
|
|
12
12
|
create(params, options) {
|
|
13
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
13
14
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
15
|
+
if (idempotencyKey) {
|
|
16
|
+
console.warn(
|
|
17
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
18
|
+
);
|
|
19
|
+
}
|
|
14
20
|
return this.post('/api/account_collection_flows', {
|
|
15
21
|
body,
|
|
16
22
|
...options,
|
|
17
23
|
headers: {
|
|
18
|
-
'Idempotency-Key': idempotencyKey
|
|
24
|
+
'Idempotency-Key': idempotencyKey,
|
|
19
25
|
...(options === null || options === void 0 ? void 0 : options.headers),
|
|
20
26
|
},
|
|
21
27
|
});
|
|
22
28
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return this.get(`/api/account_collection_flows/${id}`, {
|
|
29
|
-
...options,
|
|
30
|
-
headers: {
|
|
31
|
-
'Idempotency-Key': idempotencyKey || '',
|
|
32
|
-
...(options === null || options === void 0 ? void 0 : options.headers),
|
|
33
|
-
},
|
|
34
|
-
});
|
|
29
|
+
/**
|
|
30
|
+
* get account_collection_flow
|
|
31
|
+
*/
|
|
32
|
+
retrieve(id, options) {
|
|
33
|
+
return this.get(`/api/account_collection_flows/${id}`, options);
|
|
35
34
|
}
|
|
36
35
|
/**
|
|
37
36
|
* update account_collection_flow
|
|
38
37
|
*/
|
|
39
38
|
update(id, params, options) {
|
|
39
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
40
40
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
41
|
+
if (idempotencyKey) {
|
|
42
|
+
console.warn(
|
|
43
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
44
|
+
);
|
|
45
|
+
}
|
|
41
46
|
return this.patch(`/api/account_collection_flows/${id}`, {
|
|
42
47
|
body,
|
|
43
48
|
...options,
|
|
44
49
|
headers: {
|
|
45
|
-
'Idempotency-Key': idempotencyKey
|
|
50
|
+
'Idempotency-Key': idempotencyKey,
|
|
46
51
|
...(options === null || options === void 0 ? void 0 : options.headers),
|
|
47
52
|
},
|
|
48
53
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-collection-flows.js","sourceRoot":"","sources":["../src/resources/account-collection-flows.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAGrD,uDAAuD;AACvD,+CAAwD;AAExD,2DAA8D;AAE9D,MAAa,sBAAuB,SAAQ,sBAAW;IACrD;;OAEG;IACH,MAAM,CACJ,MAAyC,EACzC,OAA6B;QAE7B,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,OAAO,IAAI,CAAC,IAAI,CAAC,+BAA+B,EAAE;YAChD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,iBAAiB,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"account-collection-flows.js","sourceRoot":"","sources":["../src/resources/account-collection-flows.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAGrD,uDAAuD;AACvD,+CAAwD;AAExD,2DAA8D;AAE9D,MAAa,sBAAuB,SAAQ,sBAAW;IACrD;;OAEG;IACH,MAAM,CACJ,MAAyC,EACzC,OAA6B;QAE7B,qGAAqG;QACrG,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,IAAI,cAAc,EAAE;YAClB,OAAO,CAAC,IAAI,CACV,sGAAsG,CACvG,CAAC;SACH;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,+BAA+B,EAAE;YAChD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,EAAE;SACpE,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAA6B;QAChD,OAAO,IAAI,CAAC,GAAG,CAAC,iCAAiC,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,EAAU,EACV,MAAyC,EACzC,OAA6B;QAE7B,qGAAqG;QACrG,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,IAAI,cAAc,EAAE;YAClB,OAAO,CAAC,IAAI,CACV,sGAAsG,CACvG,CAAC;SACH;QACD,OAAO,IAAI,CAAC,KAAK,CAAC,iCAAiC,EAAE,EAAE,EAAE;YACvD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,EAAE;SACpE,CAAC,CAAC;IACL,CAAC;IAUD,IAAI,CACF,QAA+D,EAAE,EACjE,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,UAAU,CAAC,+BAA+B,EAAE,0BAA0B,EAAE;YAClF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAvED,wDAuEC;AAED,MAAa,0BAA2B,SAAQ,iBAA2B;CAAG;AAA9E,gEAA8E;AAwE9E,WAAiB,sBAAsB;AAMvC,CAAC,EANgB,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAMtC"}
|
|
@@ -1,45 +1,50 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
-
import { APIResource } from 'modern-treasury/resource';
|
|
3
|
-
import { isRequestOptions } from 'modern-treasury/core';
|
|
4
|
-
import { Page } from 'modern-treasury/pagination';
|
|
2
|
+
import { APIResource } from 'modern-treasury/resource.mjs';
|
|
3
|
+
import { isRequestOptions } from 'modern-treasury/core.mjs';
|
|
4
|
+
import { Page } from 'modern-treasury/pagination.mjs';
|
|
5
5
|
export class AccountCollectionFlows extends APIResource {
|
|
6
6
|
/**
|
|
7
7
|
* create account_collection_flow
|
|
8
8
|
*/
|
|
9
9
|
create(params, options) {
|
|
10
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
10
11
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
12
|
+
if (idempotencyKey) {
|
|
13
|
+
console.warn(
|
|
14
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
15
|
+
);
|
|
16
|
+
}
|
|
11
17
|
return this.post('/api/account_collection_flows', {
|
|
12
18
|
body,
|
|
13
19
|
...options,
|
|
14
20
|
headers: {
|
|
15
|
-
'Idempotency-Key': idempotencyKey
|
|
21
|
+
'Idempotency-Key': idempotencyKey,
|
|
16
22
|
...(options === null || options === void 0 ? void 0 : options.headers),
|
|
17
23
|
},
|
|
18
24
|
});
|
|
19
25
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return this.get(`/api/account_collection_flows/${id}`, {
|
|
26
|
-
...options,
|
|
27
|
-
headers: {
|
|
28
|
-
'Idempotency-Key': idempotencyKey || '',
|
|
29
|
-
...(options === null || options === void 0 ? void 0 : options.headers),
|
|
30
|
-
},
|
|
31
|
-
});
|
|
26
|
+
/**
|
|
27
|
+
* get account_collection_flow
|
|
28
|
+
*/
|
|
29
|
+
retrieve(id, options) {
|
|
30
|
+
return this.get(`/api/account_collection_flows/${id}`, options);
|
|
32
31
|
}
|
|
33
32
|
/**
|
|
34
33
|
* update account_collection_flow
|
|
35
34
|
*/
|
|
36
35
|
update(id, params, options) {
|
|
36
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
37
37
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
38
|
+
if (idempotencyKey) {
|
|
39
|
+
console.warn(
|
|
40
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
41
|
+
);
|
|
42
|
+
}
|
|
38
43
|
return this.patch(`/api/account_collection_flows/${id}`, {
|
|
39
44
|
body,
|
|
40
45
|
...options,
|
|
41
46
|
headers: {
|
|
42
|
-
'Idempotency-Key': idempotencyKey
|
|
47
|
+
'Idempotency-Key': idempotencyKey,
|
|
43
48
|
...(options === null || options === void 0 ? void 0 : options.headers),
|
|
44
49
|
},
|
|
45
50
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-collection-flows.mjs","sourceRoot":"","sources":["../src/resources/account-collection-flows.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,0BAA0B;OAC/C,EAAE,gBAAgB,EAAE,MAAM,sBAAsB;OAEhD,EAAE,IAAI,EAAc,MAAM,4BAA4B;AAE7D,MAAM,OAAO,sBAAuB,SAAQ,WAAW;IACrD;;OAEG;IACH,MAAM,CACJ,MAAyC,EACzC,OAA6B;QAE7B,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,OAAO,IAAI,CAAC,IAAI,CAAC,+BAA+B,EAAE;YAChD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,iBAAiB,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"account-collection-flows.mjs","sourceRoot":"","sources":["../src/resources/account-collection-flows.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,0BAA0B;OAC/C,EAAE,gBAAgB,EAAE,MAAM,sBAAsB;OAEhD,EAAE,IAAI,EAAc,MAAM,4BAA4B;AAE7D,MAAM,OAAO,sBAAuB,SAAQ,WAAW;IACrD;;OAEG;IACH,MAAM,CACJ,MAAyC,EACzC,OAA6B;QAE7B,qGAAqG;QACrG,MAAM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CAAC;IACL,CAAC;CACF;AAED,MAAM,OAAO,0BAA2B,SAAQ,IAA2B;CAAG;AAwE9E,WAAiB,sBAAsB;AAMvC,CAAC,EANgB,sBAAsB,KAAtB,sBAAsB,QAMtC"}
|
|
@@ -75,19 +75,14 @@ export interface AccountDetail {
|
|
|
75
75
|
}
|
|
76
76
|
export interface AccountDetailCreateParams {
|
|
77
77
|
/**
|
|
78
|
-
*
|
|
78
|
+
* The account number for the bank account.
|
|
79
79
|
*/
|
|
80
80
|
account_number: string;
|
|
81
81
|
/**
|
|
82
|
-
*
|
|
83
|
-
*
|
|
82
|
+
* One of `iban`, `clabe`, `wallet_address`, or `other`. Use `other` if the bank
|
|
83
|
+
* account number is in a generic format.
|
|
84
84
|
*/
|
|
85
85
|
account_number_type?: 'clabe' | 'iban' | 'other' | 'pan' | 'wallet_address';
|
|
86
|
-
/**
|
|
87
|
-
* Header param: This key should be something unique, preferably something like an
|
|
88
|
-
* UUID.
|
|
89
|
-
*/
|
|
90
|
-
'Idempotency-Key'?: string;
|
|
91
86
|
}
|
|
92
87
|
export interface AccountDetailListParams extends PageParams {}
|
|
93
88
|
export declare namespace AccountDetails {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-details.d.ts","sourceRoot":"","sources":["../src/resources/account-details.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,KAAK,MAAM,MAAM,kCAAkC,CAAC;AAC3D,OAAO,KAAK,GAAG,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAE9D,qBAAa,cAAe,SAAQ,WAAW;IAC7C;;OAEG;IACH,MAAM,CACJ,YAAY,EAAE,mBAAmB,EACjC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,yBAAyB,EACjC,OAAO,CAAC,EAAE,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
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
exports.AccountDetailsPage = exports.AccountDetails = void 0;
|
|
5
|
-
const resource_1 = require('modern-treasury/resource');
|
|
6
|
-
const core_1 = require('modern-treasury/core');
|
|
7
|
-
const pagination_1 = require('modern-treasury/pagination');
|
|
5
|
+
const resource_1 = require('modern-treasury/resource.js');
|
|
6
|
+
const core_1 = require('modern-treasury/core.js');
|
|
7
|
+
const pagination_1 = require('modern-treasury/pagination.js');
|
|
8
8
|
class AccountDetails extends resource_1.APIResource {
|
|
9
9
|
/**
|
|
10
10
|
* Create an account detail for an external account.
|
|
11
11
|
*/
|
|
12
12
|
create(accountsType, accountId, params, options) {
|
|
13
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
13
14
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
15
|
+
if (idempotencyKey) {
|
|
16
|
+
console.warn(
|
|
17
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
18
|
+
);
|
|
19
|
+
}
|
|
14
20
|
return this.post(`/api/${accountsType}/${accountId}/account_details`, {
|
|
15
21
|
body,
|
|
16
22
|
...options,
|
|
17
23
|
headers: {
|
|
18
|
-
'Idempotency-Key': idempotencyKey
|
|
24
|
+
'Idempotency-Key': idempotencyKey,
|
|
19
25
|
...(options === null || options === void 0 ? void 0 : options.headers),
|
|
20
26
|
},
|
|
21
27
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-details.js","sourceRoot":"","sources":["../src/resources/account-details.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAGrD,uDAAuD;AACvD,+CAAwD;AAGxD,2DAA8D;AAE9D,MAAa,cAAe,SAAQ,sBAAW;IAC7C;;OAEG;IACH,MAAM,CACJ,YAAiC,EACjC,SAAiB,EACjB,MAAiC,EACjC,OAA6B;QAE7B,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,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AK,CAAC,CAAC;SACtD;QACD,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,YAAY,IAAI,SAAS,kBAAkB,EAAE,kBAAkB,EAAE;YAC9F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,GAAG,CACD,YAAiC,EACjC,SAAiB,EACjB,EAAU,EACV,OAA6B;QAE7B,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,YAAY,IAAI,SAAS,oBAAoB,EAAE,EAAE,EAAE;YAC5E,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,EAAE;SAC7C,CAAC,CAAC;IACL,CAAC;CACF;AA/ED,wCA+EC;AAED,MAAa,kBAAmB,SAAQ,iBAAmB;CAAG;AAA9D,gDAA8D;AAqD9D,WAAiB,cAAc;AAK/B,CAAC,EALgB,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAK9B"}
|
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
-
import { APIResource } from 'modern-treasury/resource';
|
|
3
|
-
import { isRequestOptions } from 'modern-treasury/core';
|
|
4
|
-
import { Page } from 'modern-treasury/pagination';
|
|
2
|
+
import { APIResource } from 'modern-treasury/resource.mjs';
|
|
3
|
+
import { isRequestOptions } from 'modern-treasury/core.mjs';
|
|
4
|
+
import { Page } from 'modern-treasury/pagination.mjs';
|
|
5
5
|
export class AccountDetails extends APIResource {
|
|
6
6
|
/**
|
|
7
7
|
* Create an account detail for an external account.
|
|
8
8
|
*/
|
|
9
9
|
create(accountsType, accountId, params, options) {
|
|
10
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
10
11
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
12
|
+
if (idempotencyKey) {
|
|
13
|
+
console.warn(
|
|
14
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
15
|
+
);
|
|
16
|
+
}
|
|
11
17
|
return this.post(`/api/${accountsType}/${accountId}/account_details`, {
|
|
12
18
|
body,
|
|
13
19
|
...options,
|
|
14
20
|
headers: {
|
|
15
|
-
'Idempotency-Key': idempotencyKey
|
|
21
|
+
'Idempotency-Key': idempotencyKey,
|
|
16
22
|
...(options === null || options === void 0 ? void 0 : options.headers),
|
|
17
23
|
},
|
|
18
24
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-details.mjs","sourceRoot":"","sources":["../src/resources/account-details.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,0BAA0B;OAC/C,EAAE,gBAAgB,EAAE,MAAM,sBAAsB;OAGhD,EAAE,IAAI,EAAc,MAAM,4BAA4B;AAE7D,MAAM,OAAO,cAAe,SAAQ,WAAW;IAC7C;;OAEG;IACH,MAAM,CACJ,YAAiC,EACjC,SAAiB,EACjB,MAAiC,EACjC,OAA6B;QAE7B,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,YAAY,IAAI,SAAS,kBAAkB,EAAE;YACpE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,iBAAiB,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"account-details.mjs","sourceRoot":"","sources":["../src/resources/account-details.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,0BAA0B;OAC/C,EAAE,gBAAgB,EAAE,MAAM,sBAAsB;OAGhD,EAAE,IAAI,EAAc,MAAM,4BAA4B;AAE7D,MAAM,OAAO,cAAe,SAAQ,WAAW;IAC7C;;OAEG;IACH,MAAM,CACJ,YAAiC,EACjC,SAAiB,EACjB,MAAiC,EACjC,OAA6B;QAE7B,qG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O,EAAE;SAC7C,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,OAAO,kBAAmB,SAAQ,IAAmB;CAAG;AAqD9D,WAAiB,cAAc;AAK/B,CAAC,EALgB,cAAc,KAAd,cAAc,QAK9B"}
|
package/resources/connections.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless.
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
exports.ConnectionsPage = exports.Connections = void 0;
|
|
5
|
-
const resource_1 = require('modern-treasury/resource');
|
|
6
|
-
const core_1 = require('modern-treasury/core');
|
|
7
|
-
const pagination_1 = require('modern-treasury/pagination');
|
|
5
|
+
const resource_1 = require('modern-treasury/resource.js');
|
|
6
|
+
const core_1 = require('modern-treasury/core.js');
|
|
7
|
+
const pagination_1 = require('modern-treasury/pagination.js');
|
|
8
8
|
class Connections extends resource_1.APIResource {
|
|
9
9
|
list(query = {}, options) {
|
|
10
10
|
if ((0, core_1.isRequestOptions)(query)) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
-
import { APIResource } from 'modern-treasury/resource';
|
|
3
|
-
import { isRequestOptions } from 'modern-treasury/core';
|
|
4
|
-
import { Page } from 'modern-treasury/pagination';
|
|
2
|
+
import { APIResource } from 'modern-treasury/resource.mjs';
|
|
3
|
+
import { isRequestOptions } from 'modern-treasury/core.mjs';
|
|
4
|
+
import { Page } from 'modern-treasury/pagination.mjs';
|
|
5
5
|
export class Connections extends APIResource {
|
|
6
6
|
list(query = {}, options) {
|
|
7
7
|
if (isRequestOptions(query)) {
|