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
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../../core';
|
|
4
|
-
import { APIResource } from '../../resource';
|
|
5
|
-
import { isRequestOptions } from '../../core';
|
|
6
|
-
import * as API from './index';
|
|
7
|
-
import { Page, PageParams } from '../../pagination';
|
|
3
|
+
import * as Core from '../../core.js';
|
|
4
|
+
import { APIResource } from '../../resource.js';
|
|
5
|
+
import { isRequestOptions } from '../../core.js';
|
|
6
|
+
import * as API from './index.js';
|
|
7
|
+
import { Page, PageParams } from '../../pagination.js';
|
|
8
8
|
|
|
9
9
|
export class Reversals extends APIResource {
|
|
10
10
|
/**
|
|
@@ -15,11 +15,17 @@ export class Reversals extends APIResource {
|
|
|
15
15
|
params: ReversalCreateParams,
|
|
16
16
|
options?: Core.RequestOptions,
|
|
17
17
|
): Core.APIPromise<Reversal> {
|
|
18
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
18
19
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
20
|
+
if (idempotencyKey) {
|
|
21
|
+
console.warn(
|
|
22
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
23
|
+
);
|
|
24
|
+
}
|
|
19
25
|
return this.post(`/api/payment_orders/${paymentOrderId}/reversals`, {
|
|
20
26
|
body,
|
|
21
27
|
...options,
|
|
22
|
-
headers: { 'Idempotency-Key': idempotencyKey
|
|
28
|
+
headers: { 'Idempotency-Key': idempotencyKey, ...options?.headers },
|
|
23
29
|
});
|
|
24
30
|
}
|
|
25
31
|
|
|
@@ -106,8 +112,8 @@ export interface Reversal {
|
|
|
106
112
|
|
|
107
113
|
export interface ReversalCreateParams {
|
|
108
114
|
/**
|
|
109
|
-
*
|
|
110
|
-
* `
|
|
115
|
+
* The reason for the reversal. Must be one of `duplicate`, `incorrect_amount`,
|
|
116
|
+
* `incorrect_receiving_account`, `date_earlier_than_intended`,
|
|
111
117
|
* `date_later_than_intended`.
|
|
112
118
|
*/
|
|
113
119
|
reason:
|
|
@@ -118,24 +124,17 @@ export interface ReversalCreateParams {
|
|
|
118
124
|
| 'date_later_than_intended';
|
|
119
125
|
|
|
120
126
|
/**
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
* the reversal.
|
|
127
|
+
* Specifies a ledger transaction object that will be created with the reversal. If
|
|
128
|
+
* the ledger transaction cannot be created, then the reversal creation will fail.
|
|
129
|
+
* The resulting ledger transaction will mirror the status of the reversal.
|
|
125
130
|
*/
|
|
126
131
|
ledger_transaction?: ReversalCreateParams.LedgerTransaction;
|
|
127
132
|
|
|
128
133
|
/**
|
|
129
|
-
*
|
|
130
|
-
*
|
|
134
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
135
|
+
* strings.
|
|
131
136
|
*/
|
|
132
137
|
metadata?: Record<string, string>;
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Header param: This key should be something unique, preferably something like an
|
|
136
|
-
* UUID.
|
|
137
|
-
*/
|
|
138
|
-
'Idempotency-Key'?: string;
|
|
139
138
|
}
|
|
140
139
|
|
|
141
140
|
export namespace ReversalCreateParams {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../core';
|
|
4
|
-
import { APIResource } from '../resource';
|
|
5
|
-
import { isRequestOptions } from '../core';
|
|
6
|
-
import * as API from './index';
|
|
7
|
-
import { Page, PageParams } from '../pagination';
|
|
3
|
+
import * as Core from '../core.js';
|
|
4
|
+
import { APIResource } from '../resource.js';
|
|
5
|
+
import { isRequestOptions } from '../core.js';
|
|
6
|
+
import * as API from './index.js';
|
|
7
|
+
import { Page, PageParams } from '../pagination.js';
|
|
8
8
|
|
|
9
9
|
export class PaymentReferences extends APIResource {
|
|
10
10
|
/**
|
package/src/resources/returns.ts
CHANGED
|
@@ -1,22 +1,28 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../core';
|
|
4
|
-
import { APIResource } from '../resource';
|
|
5
|
-
import { isRequestOptions } from '../core';
|
|
6
|
-
import * as Shared from './shared';
|
|
7
|
-
import * as API from './index';
|
|
8
|
-
import { Page, PageParams } from '../pagination';
|
|
3
|
+
import * as Core from '../core.js';
|
|
4
|
+
import { APIResource } from '../resource.js';
|
|
5
|
+
import { isRequestOptions } from '../core.js';
|
|
6
|
+
import * as Shared from './shared.js';
|
|
7
|
+
import * as API from './index.js';
|
|
8
|
+
import { Page, PageParams } from '../pagination.js';
|
|
9
9
|
|
|
10
10
|
export class Returns extends APIResource {
|
|
11
11
|
/**
|
|
12
12
|
* Create a return.
|
|
13
13
|
*/
|
|
14
14
|
create(params: ReturnCreateParams, options?: Core.RequestOptions): Core.APIPromise<ReturnObject> {
|
|
15
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
15
16
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
17
|
+
if (idempotencyKey) {
|
|
18
|
+
console.warn(
|
|
19
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
20
|
+
);
|
|
21
|
+
}
|
|
16
22
|
return this.post('/api/returns', {
|
|
17
23
|
body,
|
|
18
24
|
...options,
|
|
19
|
-
headers: { 'Idempotency-Key': idempotencyKey
|
|
25
|
+
headers: { 'Idempotency-Key': idempotencyKey, ...options?.headers },
|
|
20
26
|
});
|
|
21
27
|
}
|
|
22
28
|
|
|
@@ -304,25 +310,24 @@ export namespace ReturnObject {
|
|
|
304
310
|
|
|
305
311
|
export interface ReturnCreateParams {
|
|
306
312
|
/**
|
|
307
|
-
*
|
|
313
|
+
* The ID of the object being returned or `null`.
|
|
308
314
|
*/
|
|
309
315
|
returnable_id: string | null;
|
|
310
316
|
|
|
311
317
|
/**
|
|
312
|
-
*
|
|
318
|
+
* The type of object being returned. Currently, this may only be
|
|
313
319
|
* incoming_payment_detail.
|
|
314
320
|
*/
|
|
315
321
|
returnable_type: 'incoming_payment_detail';
|
|
316
322
|
|
|
317
323
|
/**
|
|
318
|
-
*
|
|
319
|
-
*
|
|
324
|
+
* Some returns may include additional information from the bank. In these cases,
|
|
325
|
+
* this string will be present.
|
|
320
326
|
*/
|
|
321
327
|
additional_information?: string | null;
|
|
322
328
|
|
|
323
329
|
/**
|
|
324
|
-
*
|
|
325
|
-
* code.
|
|
330
|
+
* The return code. For ACH returns, this is the required ACH return code.
|
|
326
331
|
*/
|
|
327
332
|
code?:
|
|
328
333
|
| '901'
|
|
@@ -371,22 +376,16 @@ export interface ReturnCreateParams {
|
|
|
371
376
|
| null;
|
|
372
377
|
|
|
373
378
|
/**
|
|
374
|
-
*
|
|
375
|
-
*
|
|
379
|
+
* If the return code is `R14` or `R15` this is the date the deceased counterparty
|
|
380
|
+
* passed away.
|
|
376
381
|
*/
|
|
377
382
|
date_of_death?: string | null;
|
|
378
383
|
|
|
379
384
|
/**
|
|
380
|
-
*
|
|
381
|
-
*
|
|
385
|
+
* An optional description of the reason for the return. This is for internal usage
|
|
386
|
+
* and will not be transmitted to the bank.”
|
|
382
387
|
*/
|
|
383
388
|
reason?: string | null;
|
|
384
|
-
|
|
385
|
-
/**
|
|
386
|
-
* Header param: This key should be something unique, preferably something like an
|
|
387
|
-
* UUID.
|
|
388
|
-
*/
|
|
389
|
-
'Idempotency-Key'?: string;
|
|
390
389
|
}
|
|
391
390
|
|
|
392
391
|
export interface ReturnListParams extends PageParams {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../core';
|
|
4
|
-
import { APIResource } from '../resource';
|
|
5
|
-
import { isRequestOptions } from '../core';
|
|
6
|
-
import * as Shared from './shared';
|
|
7
|
-
import * as API from './index';
|
|
8
|
-
import { Page, PageParams } from '../pagination';
|
|
3
|
+
import * as Core from '../core.js';
|
|
4
|
+
import { APIResource } from '../resource.js';
|
|
5
|
+
import { isRequestOptions } from '../core.js';
|
|
6
|
+
import * as Shared from './shared.js';
|
|
7
|
+
import * as API from './index.js';
|
|
8
|
+
import { Page, PageParams } from '../pagination.js';
|
|
9
9
|
|
|
10
10
|
export class RoutingDetails extends APIResource {
|
|
11
11
|
/**
|
|
@@ -17,11 +17,17 @@ export class RoutingDetails extends APIResource {
|
|
|
17
17
|
params: RoutingDetailCreateParams,
|
|
18
18
|
options?: Core.RequestOptions,
|
|
19
19
|
): Core.APIPromise<RoutingDetail> {
|
|
20
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
20
21
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
22
|
+
if (idempotencyKey) {
|
|
23
|
+
console.warn(
|
|
24
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
25
|
+
);
|
|
26
|
+
}
|
|
21
27
|
return this.post(`/api/${accountsType}/${accountId}/routing_details`, {
|
|
22
28
|
body,
|
|
23
29
|
...options,
|
|
24
|
-
headers: { 'Idempotency-Key': idempotencyKey
|
|
30
|
+
headers: { 'Idempotency-Key': idempotencyKey, ...options?.headers },
|
|
25
31
|
});
|
|
26
32
|
}
|
|
27
33
|
|
|
@@ -199,13 +205,12 @@ export namespace RoutingDetail {
|
|
|
199
205
|
|
|
200
206
|
export interface RoutingDetailCreateParams {
|
|
201
207
|
/**
|
|
202
|
-
*
|
|
208
|
+
* The routing number of the bank.
|
|
203
209
|
*/
|
|
204
210
|
routing_number: string;
|
|
205
211
|
|
|
206
212
|
/**
|
|
207
|
-
*
|
|
208
|
-
* `in_ifsc`, `cnaps`.
|
|
213
|
+
* One of `aba`, `swift`, `ca_cpa`, `au_bsb`, `gb_sort_code`, `in_ifsc`, `cnaps`.
|
|
209
214
|
*/
|
|
210
215
|
routing_number_type:
|
|
211
216
|
| 'aba'
|
|
@@ -220,8 +225,8 @@ export interface RoutingDetailCreateParams {
|
|
|
220
225
|
| 'swift';
|
|
221
226
|
|
|
222
227
|
/**
|
|
223
|
-
*
|
|
224
|
-
*
|
|
228
|
+
* If the routing detail is to be used for a specific payment type this field will
|
|
229
|
+
* be populated, otherwise null.
|
|
225
230
|
*/
|
|
226
231
|
payment_type?:
|
|
227
232
|
| 'ach'
|
|
@@ -242,12 +247,6 @@ export interface RoutingDetailCreateParams {
|
|
|
242
247
|
| 'signet'
|
|
243
248
|
| 'wire'
|
|
244
249
|
| null;
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
* Header param: This key should be something unique, preferably something like an
|
|
248
|
-
* UUID.
|
|
249
|
-
*/
|
|
250
|
-
'Idempotency-Key'?: string;
|
|
251
250
|
}
|
|
252
251
|
|
|
253
252
|
export interface RoutingDetailListParams extends PageParams {}
|
|
@@ -6,5 +6,10 @@ export {
|
|
|
6
6
|
TransactionListParams,
|
|
7
7
|
TransactionsPage,
|
|
8
8
|
Transactions,
|
|
9
|
-
} from './transactions';
|
|
10
|
-
export {
|
|
9
|
+
} from './transactions.js';
|
|
10
|
+
export {
|
|
11
|
+
TransactionLineItem,
|
|
12
|
+
LineItemListParams,
|
|
13
|
+
TransactionLineItemsPage,
|
|
14
|
+
LineItems,
|
|
15
|
+
} from './line-items.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../../core';
|
|
4
|
-
import { APIResource } from '../../resource';
|
|
5
|
-
import { isRequestOptions } from '../../core';
|
|
6
|
-
import * as API from './index';
|
|
7
|
-
import { Page, PageParams } from '../../pagination';
|
|
3
|
+
import * as Core from '../../core.js';
|
|
4
|
+
import { APIResource } from '../../resource.js';
|
|
5
|
+
import { isRequestOptions } from '../../core.js';
|
|
6
|
+
import * as API from './index.js';
|
|
7
|
+
import { Page, PageParams } from '../../pagination.js';
|
|
8
8
|
|
|
9
9
|
export class LineItems extends APIResource {
|
|
10
10
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../../core';
|
|
4
|
-
import { APIResource } from '../../resource';
|
|
5
|
-
import { isRequestOptions } from '../../core';
|
|
6
|
-
import * as Shared from '../shared';
|
|
7
|
-
import { LineItems } from './line-items';
|
|
8
|
-
import * as API from './index';
|
|
9
|
-
import { Page, PageParams } from '../../pagination';
|
|
3
|
+
import * as Core from '../../core.js';
|
|
4
|
+
import { APIResource } from '../../resource.js';
|
|
5
|
+
import { isRequestOptions } from '../../core.js';
|
|
6
|
+
import * as Shared from '../shared.js';
|
|
7
|
+
import { LineItems } from './line-items.js';
|
|
8
|
+
import * as API from './index.js';
|
|
9
|
+
import { Page, PageParams } from '../../pagination.js';
|
|
10
10
|
|
|
11
11
|
export class Transactions extends APIResource {
|
|
12
12
|
lineItems: LineItems = new LineItems(this.client);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../core';
|
|
4
|
-
import { APIResource } from '../resource';
|
|
5
|
-
import * as API from './index';
|
|
3
|
+
import * as Core from '../core.js';
|
|
4
|
+
import { APIResource } from '../resource.js';
|
|
5
|
+
import * as API from './index.js';
|
|
6
6
|
|
|
7
7
|
export class Validations extends APIResource {
|
|
8
8
|
/**
|
|
@@ -1,23 +1,29 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../core';
|
|
4
|
-
import { APIResource } from '../resource';
|
|
5
|
-
import { isRequestOptions } from '../core';
|
|
6
|
-
import * as AccountDetails from './account-details';
|
|
7
|
-
import * as RoutingDetails from './routing-details';
|
|
8
|
-
import * as API from './index';
|
|
9
|
-
import { Page, PageParams } from '../pagination';
|
|
3
|
+
import * as Core from '../core.js';
|
|
4
|
+
import { APIResource } from '../resource.js';
|
|
5
|
+
import { isRequestOptions } from '../core.js';
|
|
6
|
+
import * as AccountDetails from './account-details.js';
|
|
7
|
+
import * as RoutingDetails from './routing-details.js';
|
|
8
|
+
import * as API from './index.js';
|
|
9
|
+
import { Page, PageParams } from '../pagination.js';
|
|
10
10
|
|
|
11
11
|
export class VirtualAccounts extends APIResource {
|
|
12
12
|
/**
|
|
13
13
|
* create virtual_account
|
|
14
14
|
*/
|
|
15
15
|
create(params: VirtualAccountCreateParams, options?: Core.RequestOptions): Core.APIPromise<VirtualAccount> {
|
|
16
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
16
17
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
18
|
+
if (idempotencyKey) {
|
|
19
|
+
console.warn(
|
|
20
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
21
|
+
);
|
|
22
|
+
}
|
|
17
23
|
return this.post('/api/virtual_accounts', {
|
|
18
24
|
body,
|
|
19
25
|
...options,
|
|
20
|
-
headers: { 'Idempotency-Key': idempotencyKey
|
|
26
|
+
headers: { 'Idempotency-Key': idempotencyKey, ...options?.headers },
|
|
21
27
|
});
|
|
22
28
|
}
|
|
23
29
|
|
|
@@ -149,61 +155,54 @@ export interface VirtualAccount {
|
|
|
149
155
|
|
|
150
156
|
export interface VirtualAccountCreateParams {
|
|
151
157
|
/**
|
|
152
|
-
*
|
|
153
|
-
* associated with.
|
|
158
|
+
* The ID of the internal account that this virtual account is associated with.
|
|
154
159
|
*/
|
|
155
160
|
internal_account_id: string;
|
|
156
161
|
|
|
157
162
|
/**
|
|
158
|
-
*
|
|
163
|
+
* The name of the virtual account.
|
|
159
164
|
*/
|
|
160
165
|
name: string;
|
|
161
166
|
|
|
162
167
|
/**
|
|
163
|
-
*
|
|
168
|
+
* An array of account detail objects.
|
|
164
169
|
*/
|
|
165
170
|
account_details?: Array<VirtualAccountCreateParams.AccountDetail>;
|
|
166
171
|
|
|
167
172
|
/**
|
|
168
|
-
*
|
|
173
|
+
* The ID of the counterparty that the virtual account belongs to.
|
|
169
174
|
*/
|
|
170
175
|
counterparty_id?: string;
|
|
171
176
|
|
|
172
177
|
/**
|
|
173
|
-
*
|
|
174
|
-
*
|
|
178
|
+
* The ID of a credit normal ledger account. When money leaves the virtual account,
|
|
179
|
+
* this ledger account will be credited. Must be accompanied by a
|
|
175
180
|
* debit_ledger_account_id if present.
|
|
176
181
|
*/
|
|
177
182
|
credit_ledger_account_id?: string;
|
|
178
183
|
|
|
179
184
|
/**
|
|
180
|
-
*
|
|
181
|
-
*
|
|
185
|
+
* The ID of a debit normal ledger account. When money enters the virtual account,
|
|
186
|
+
* this ledger account will be debited. Must be accompanied by a
|
|
182
187
|
* credit_ledger_account_id if present.
|
|
183
188
|
*/
|
|
184
189
|
debit_ledger_account_id?: string;
|
|
185
190
|
|
|
186
191
|
/**
|
|
187
|
-
*
|
|
192
|
+
* An optional description for internal use.
|
|
188
193
|
*/
|
|
189
194
|
description?: string;
|
|
190
195
|
|
|
191
196
|
/**
|
|
192
|
-
*
|
|
193
|
-
*
|
|
197
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
198
|
+
* strings.
|
|
194
199
|
*/
|
|
195
200
|
metadata?: Record<string, string>;
|
|
196
201
|
|
|
197
202
|
/**
|
|
198
|
-
*
|
|
203
|
+
* An array of routing detail objects.
|
|
199
204
|
*/
|
|
200
205
|
routing_details?: Array<VirtualAccountCreateParams.RoutingDetail>;
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* Header param: This key should be something unique, preferably something like an
|
|
204
|
-
* UUID.
|
|
205
|
-
*/
|
|
206
|
-
'Idempotency-Key'?: string;
|
|
207
206
|
}
|
|
208
207
|
|
|
209
208
|
export namespace VirtualAccountCreateParams {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '../resource';
|
|
3
|
+
import { APIResource } from '../resource.js';
|
|
4
4
|
import { createHmac } from 'crypto';
|
|
5
|
-
import type { HeadersLike } from '../core';
|
|
6
|
-
import { getHeader } from '../core';
|
|
5
|
+
import type { HeadersLike } from '../core.js';
|
|
6
|
+
import { getHeader } from '../core.js';
|
|
7
7
|
|
|
8
8
|
export class Webhooks extends APIResource {
|
|
9
9
|
/**
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
// this config is included in the published src directory to prevent TS errors
|
|
3
|
+
// from appearing when users go to source, and VSCode opens the source .ts file
|
|
4
|
+
// via declaration maps
|
|
5
|
+
"include": ["index.ts"],
|
|
6
|
+
"compilerOptions": {
|
|
7
|
+
"target": "es2015",
|
|
8
|
+
"lib": ["DOM"],
|
|
9
|
+
"moduleResolution": "node"
|
|
10
|
+
}
|
|
11
|
+
}
|
package/src/uploads.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type RequestOptions } from './core';
|
|
2
|
-
import { type Readable } from './_shims/node-readable';
|
|
1
|
+
import { type RequestOptions } from './core.js';
|
|
2
|
+
import { type Readable } from './_shims/node-readable.js';
|
|
3
3
|
import { type BodyInit } from './_shims/fetch.js';
|
|
4
|
-
import { FormData, File, type Blob, type FilePropertyBag } from './_shims/
|
|
5
|
-
import { getMultipartRequestOptions } from './_shims/getMultipartRequestOptions';
|
|
6
|
-
import { fileFromPath } from './_shims/fileFromPath';
|
|
7
|
-
import { type FsReadStream, isFsReadStream } from './_shims/node-readable';
|
|
4
|
+
import { FormData, File, type Blob, type FilePropertyBag } from './_shims/form-data.js';
|
|
5
|
+
import { getMultipartRequestOptions } from './_shims/getMultipartRequestOptions.js';
|
|
6
|
+
import { fileFromPath } from './_shims/fileFromPath.js';
|
|
7
|
+
import { type FsReadStream, isFsReadStream } from './_shims/node-readable.js';
|
|
8
8
|
|
|
9
9
|
export { fileFromPath };
|
|
10
10
|
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '2.
|
|
1
|
+
export const VERSION = '2.4.0'; // x-release-please-version
|
package/uploads.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type RequestOptions } from './core.js';
|
|
2
2
|
import { type Readable } from 'modern-treasury/_shims/node-readable';
|
|
3
3
|
import { type BodyInit } from 'modern-treasury/_shims/fetch';
|
|
4
|
-
import { FormData, type Blob, type FilePropertyBag } from 'modern-treasury/_shims/
|
|
4
|
+
import { FormData, type Blob, type FilePropertyBag } from 'modern-treasury/_shims/form-data';
|
|
5
5
|
import { fileFromPath } from 'modern-treasury/_shims/fileFromPath';
|
|
6
6
|
import { type FsReadStream } from 'modern-treasury/_shims/node-readable';
|
|
7
7
|
export { fileFromPath };
|
package/uploads.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAQ,KAAK,IAAI,EAAE,KAAK,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAQ,KAAK,IAAI,EAAE,KAAK,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEnG,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,KAAK,YAAY,EAAkB,MAAM,sCAAsC,CAAC;AAEzF,OAAO,EAAE,YAAY,EAAE,CAAC;AAExB,KAAK,YAAY,GAAG,MAAM,GAA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Y,CAAC,CAAC;AAEnG;;;;;;;;GAQG;AACH,wBAAsB,MAAM,CAC1B,KAAK,EAAE,WAAW,GAAG,WAAW,CAAC,WAAW,CAAC,EAC7C,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,OAAO,GAAE,eAAe,GAAG,SAAc,GACxC,OAAO,CAAC,QAAQ,CAAC,CAuBnB;AAoDD,qBAAa,aAAa;IACL,IAAI,EAAE,QAAQ,GAAG,QAAQ;gBAAzB,IAAI,EAAE,QAAQ,GAAG,QAAQ;IAC5C,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,MAAM,CAEjC;CACF;AAED,eAAO,MAAM,eAAe,SAAU,GAAG,0BACsD,CAAC;AAEhG;;;GAGG;AACH,eAAO,MAAM,gCAAgC,iHAO5C,CAAC;AAEF,eAAO,MAAM,2BAA2B,iHAKvC,CAAC;AAEF,eAAO,MAAM,UAAU,wDAA6D,QAAQ,QAAQ,CAInG,CAAC"}
|
package/uploads.js
CHANGED
|
@@ -12,16 +12,16 @@ exports.createForm =
|
|
|
12
12
|
exports.isResponseLike =
|
|
13
13
|
exports.fileFromPath =
|
|
14
14
|
void 0;
|
|
15
|
-
const
|
|
16
|
-
const getMultipartRequestOptions_1 = require('modern-treasury/_shims/getMultipartRequestOptions');
|
|
17
|
-
const fileFromPath_1 = require('modern-treasury/_shims/fileFromPath');
|
|
15
|
+
const form_data_1 = require('modern-treasury/_shims/form-data.js');
|
|
16
|
+
const getMultipartRequestOptions_1 = require('modern-treasury/_shims/getMultipartRequestOptions.js');
|
|
17
|
+
const fileFromPath_1 = require('modern-treasury/_shims/fileFromPath.js');
|
|
18
18
|
Object.defineProperty(exports, 'fileFromPath', {
|
|
19
19
|
enumerable: true,
|
|
20
20
|
get: function () {
|
|
21
21
|
return fileFromPath_1.fileFromPath;
|
|
22
22
|
},
|
|
23
23
|
});
|
|
24
|
-
const node_readable_1 = require('modern-treasury/_shims/node-readable');
|
|
24
|
+
const node_readable_1 = require('modern-treasury/_shims/node-readable.js');
|
|
25
25
|
const isResponseLike = (value) =>
|
|
26
26
|
value != null &&
|
|
27
27
|
typeof value === 'object' &&
|
|
@@ -76,7 +76,7 @@ async function toFile(value, name, options = {}) {
|
|
|
76
76
|
(_a = new URL(value.url).pathname.split(/[\\/]/).pop()) !== null && _a !== void 0 ?
|
|
77
77
|
_a
|
|
78
78
|
: 'unknown_file');
|
|
79
|
-
return new
|
|
79
|
+
return new form_data_1.File([blob], name, options);
|
|
80
80
|
}
|
|
81
81
|
const bits = await getBytes(value);
|
|
82
82
|
name || (name = (_b = getName(value)) !== null && _b !== void 0 ? _b : 'unknown_file');
|
|
@@ -86,7 +86,7 @@ async function toFile(value, name, options = {}) {
|
|
|
86
86
|
options = { ...options, type };
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
return new
|
|
89
|
+
return new form_data_1.File(bits, name, options);
|
|
90
90
|
}
|
|
91
91
|
exports.toFile = toFile;
|
|
92
92
|
async function getBytes(value) {
|
|
@@ -165,7 +165,7 @@ const multipartFormRequestOptions = async (opts) => {
|
|
|
165
165
|
};
|
|
166
166
|
exports.multipartFormRequestOptions = multipartFormRequestOptions;
|
|
167
167
|
const createForm = async (body) => {
|
|
168
|
-
const form = new
|
|
168
|
+
const form = new form_data_1.FormData();
|
|
169
169
|
await Promise.all(Object.entries(body || {}).map(([key, value]) => addFormValue(form, key, value)));
|
|
170
170
|
return form;
|
|
171
171
|
};
|
package/uploads.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploads.js","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":";;;AAGA,
|
|
1
|
+
{"version":3,"file":"uploads.js","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":";;;AAGA,gEAAmG;AACnG,kGAA+F;AAC/F,sEAAmE;AAG1D,6FAHA,2BAAY,OAGA;AAFrB,wEAAyF;AAmDlF,MAAM,cAAc,GAAG,CAAC,KAAU,EA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CAAC,CAAC;KAChC;SAAM,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QAC/B,MAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;KAChF;SAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QACpC,MAAM,OAAO,CAAC,GAAG,CACf,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI,IAAI,GAAG,EAAE,IAAI,CAAC,CAAC,CACzF,CAAC;KACH;SAAM;QACL,MAAM,IAAI,SAAS,CACjB,wGAAwG,KAAK,UAAU,CACxH,CAAC;KACH;AACH,CAAC,CAAC"}
|
package/uploads.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FormData, File } from 'modern-treasury/_shims/
|
|
2
|
-
import { getMultipartRequestOptions } from 'modern-treasury/_shims/getMultipartRequestOptions';
|
|
3
|
-
import { fileFromPath } from 'modern-treasury/_shims/fileFromPath';
|
|
4
|
-
import { isFsReadStream } from 'modern-treasury/_shims/node-readable';
|
|
1
|
+
import { FormData, File } from 'modern-treasury/_shims/form-data.mjs';
|
|
2
|
+
import { getMultipartRequestOptions } from 'modern-treasury/_shims/getMultipartRequestOptions.mjs';
|
|
3
|
+
import { fileFromPath } from 'modern-treasury/_shims/fileFromPath.mjs';
|
|
4
|
+
import { isFsReadStream } from 'modern-treasury/_shims/node-readable.mjs';
|
|
5
5
|
export { fileFromPath };
|
|
6
6
|
export const isResponseLike = (value) =>
|
|
7
7
|
value != null &&
|
package/uploads.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploads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