increase 0.22.0 → 0.23.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 +21 -0
- package/_shims/index.d.ts +1 -1
- package/_shims/registry.d.ts +1 -1
- package/_shims/registry.d.ts.map +1 -1
- package/core.d.ts +12 -12
- package/core.d.ts.map +1 -1
- package/core.js +39 -13
- package/core.js.map +1 -1
- package/core.mjs +39 -13
- package/core.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/account-numbers.d.ts +7 -0
- package/resources/account-numbers.d.ts.map +1 -1
- package/resources/account-numbers.js.map +1 -1
- package/resources/account-numbers.mjs.map +1 -1
- package/resources/simulations/ach-transfers.d.ts +40 -0
- package/resources/simulations/ach-transfers.d.ts.map +1 -1
- package/resources/simulations/ach-transfers.js.map +1 -1
- package/resources/simulations/ach-transfers.mjs.map +1 -1
- package/resources/simulations/interest-payments.d.ts +40 -0
- package/resources/simulations/interest-payments.d.ts.map +1 -1
- package/resources/simulations/interest-payments.js.map +1 -1
- package/resources/simulations/interest-payments.mjs.map +1 -1
- package/resources/simulations/real-time-payments-transfers.d.ts +40 -0
- package/resources/simulations/real-time-payments-transfers.d.ts.map +1 -1
- package/resources/simulations/real-time-payments-transfers.js.map +1 -1
- package/resources/simulations/real-time-payments-transfers.mjs.map +1 -1
- package/resources/simulations/wire-transfers.d.ts +40 -0
- package/resources/simulations/wire-transfers.d.ts.map +1 -1
- package/resources/simulations/wire-transfers.js.map +1 -1
- package/resources/simulations/wire-transfers.mjs.map +1 -1
- package/resources/transactions.d.ts +40 -0
- package/resources/transactions.d.ts.map +1 -1
- package/resources/transactions.js.map +1 -1
- package/resources/transactions.mjs.map +1 -1
- package/src/_shims/index.d.ts +1 -1
- package/src/_shims/node-runtime.ts +1 -1
- package/src/_shims/registry.ts +1 -1
- package/src/_shims/web-runtime.ts +1 -1
- package/src/core.ts +65 -30
- package/src/resources/account-numbers.ts +8 -0
- package/src/resources/simulations/ach-transfers.ts +45 -0
- package/src/resources/simulations/interest-payments.ts +45 -0
- package/src/resources/simulations/real-time-payments-transfers.ts +45 -0
- package/src/resources/simulations/wire-transfers.ts +45 -0
- package/src/resources/transactions.ts +45 -0
- package/src/uploads.ts +2 -2
- package/src/version.ts +1 -1
- package/uploads.d.ts +2 -2
- package/uploads.d.ts.map +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -43,7 +43,7 @@ async function fileFromPath(path: string, ...args: any[]): Promise<File> {
|
|
|
43
43
|
const defaultHttpAgent: Agent = new KeepAliveAgent({ keepAlive: true, timeout: 5 * 60 * 1000 });
|
|
44
44
|
const defaultHttpsAgent: Agent = new KeepAliveAgent.HttpsAgent({ keepAlive: true, timeout: 5 * 60 * 1000 });
|
|
45
45
|
|
|
46
|
-
async function getMultipartRequestOptions<T
|
|
46
|
+
async function getMultipartRequestOptions<T = Record<string, unknown>>(
|
|
47
47
|
form: fd.FormData,
|
|
48
48
|
opts: RequestOptions<T>,
|
|
49
49
|
): Promise<RequestOptions<T>> {
|
package/src/_shims/registry.ts
CHANGED
|
@@ -13,7 +13,7 @@ export interface Shims {
|
|
|
13
13
|
Blob: any;
|
|
14
14
|
File: any;
|
|
15
15
|
ReadableStream: any;
|
|
16
|
-
getMultipartRequestOptions: <T
|
|
16
|
+
getMultipartRequestOptions: <T = Record<string, unknown>>(
|
|
17
17
|
form: Shims['FormData'],
|
|
18
18
|
opts: RequestOptions<T>,
|
|
19
19
|
) => Promise<RequestOptions<T>>;
|
|
@@ -84,7 +84,7 @@ export function getRuntime({ manuallyImported }: { manuallyImported?: boolean }
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
),
|
|
87
|
-
getMultipartRequestOptions: async <T
|
|
87
|
+
getMultipartRequestOptions: async <T = Record<string, unknown>>(
|
|
88
88
|
// @ts-ignore
|
|
89
89
|
form: FormData,
|
|
90
90
|
opts: RequestOptions<T>,
|
package/src/core.ts
CHANGED
|
@@ -208,27 +208,27 @@ export abstract class APIClient {
|
|
|
208
208
|
return `stainless-node-retry-${uuid4()}`;
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
get<Req
|
|
211
|
+
get<Req, Rsp>(path: string, opts?: PromiseOrValue<RequestOptions<Req>>): APIPromise<Rsp> {
|
|
212
212
|
return this.methodRequest('get', path, opts);
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
post<Req
|
|
215
|
+
post<Req, Rsp>(path: string, opts?: PromiseOrValue<RequestOptions<Req>>): APIPromise<Rsp> {
|
|
216
216
|
return this.methodRequest('post', path, opts);
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
patch<Req
|
|
219
|
+
patch<Req, Rsp>(path: string, opts?: PromiseOrValue<RequestOptions<Req>>): APIPromise<Rsp> {
|
|
220
220
|
return this.methodRequest('patch', path, opts);
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
put<Req
|
|
223
|
+
put<Req, Rsp>(path: string, opts?: PromiseOrValue<RequestOptions<Req>>): APIPromise<Rsp> {
|
|
224
224
|
return this.methodRequest('put', path, opts);
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
delete<Req
|
|
227
|
+
delete<Req, Rsp>(path: string, opts?: PromiseOrValue<RequestOptions<Req>>): APIPromise<Rsp> {
|
|
228
228
|
return this.methodRequest('delete', path, opts);
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
private methodRequest<Req
|
|
231
|
+
private methodRequest<Req, Rsp>(
|
|
232
232
|
method: HTTPMethod,
|
|
233
233
|
path: string,
|
|
234
234
|
opts?: PromiseOrValue<RequestOptions<Req>>,
|
|
@@ -260,9 +260,7 @@ export abstract class APIClient {
|
|
|
260
260
|
return null;
|
|
261
261
|
}
|
|
262
262
|
|
|
263
|
-
buildRequest<Req
|
|
264
|
-
options: FinalRequestOptions<Req>,
|
|
265
|
-
): { req: RequestInit; url: string; timeout: number } {
|
|
263
|
+
buildRequest<Req>(options: FinalRequestOptions<Req>): { req: RequestInit; url: string; timeout: number } {
|
|
266
264
|
const { method, path, query, headers: headers = {} } = options;
|
|
267
265
|
|
|
268
266
|
const body =
|
|
@@ -292,18 +290,7 @@ export abstract class APIClient {
|
|
|
292
290
|
headers[this.idempotencyHeader] = options.idempotencyKey;
|
|
293
291
|
}
|
|
294
292
|
|
|
295
|
-
const reqHeaders
|
|
296
|
-
...(contentLength && { 'Content-Length': contentLength }),
|
|
297
|
-
...this.defaultHeaders(options),
|
|
298
|
-
...headers,
|
|
299
|
-
};
|
|
300
|
-
// let builtin fetch set the Content-Type for multipart bodies
|
|
301
|
-
if (isMultipartBody(options.body) && shimsKind !== 'node') {
|
|
302
|
-
delete reqHeaders['Content-Type'];
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
// Strip any headers being explicitly omitted with null
|
|
306
|
-
Object.keys(reqHeaders).forEach((key) => reqHeaders[key] === null && delete reqHeaders[key]);
|
|
293
|
+
const reqHeaders = this.buildHeaders({ options, headers, contentLength });
|
|
307
294
|
|
|
308
295
|
const req: RequestInit = {
|
|
309
296
|
method,
|
|
@@ -315,9 +302,35 @@ export abstract class APIClient {
|
|
|
315
302
|
signal: options.signal ?? null,
|
|
316
303
|
};
|
|
317
304
|
|
|
305
|
+
return { req, url, timeout };
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
private buildHeaders({
|
|
309
|
+
options,
|
|
310
|
+
headers,
|
|
311
|
+
contentLength,
|
|
312
|
+
}: {
|
|
313
|
+
options: FinalRequestOptions;
|
|
314
|
+
headers: Record<string, string | null | undefined>;
|
|
315
|
+
contentLength: string | null | undefined;
|
|
316
|
+
}): Record<string, string> {
|
|
317
|
+
const reqHeaders: Record<string, string> = {};
|
|
318
|
+
if (contentLength) {
|
|
319
|
+
reqHeaders['content-length'] = contentLength;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
const defaultHeaders = this.defaultHeaders(options);
|
|
323
|
+
applyHeadersMut(reqHeaders, defaultHeaders);
|
|
324
|
+
applyHeadersMut(reqHeaders, headers);
|
|
325
|
+
|
|
326
|
+
// let builtin fetch set the Content-Type for multipart bodies
|
|
327
|
+
if (isMultipartBody(options.body) && shimsKind !== 'node') {
|
|
328
|
+
delete reqHeaders['content-type'];
|
|
329
|
+
}
|
|
330
|
+
|
|
318
331
|
this.validateHeaders(reqHeaders, headers);
|
|
319
332
|
|
|
320
|
-
return
|
|
333
|
+
return reqHeaders;
|
|
321
334
|
}
|
|
322
335
|
|
|
323
336
|
/**
|
|
@@ -349,15 +362,15 @@ export abstract class APIClient {
|
|
|
349
362
|
return APIError.generate(status, error, message, headers);
|
|
350
363
|
}
|
|
351
364
|
|
|
352
|
-
request<Req
|
|
365
|
+
request<Req, Rsp>(
|
|
353
366
|
options: PromiseOrValue<FinalRequestOptions<Req>>,
|
|
354
367
|
remainingRetries: number | null = null,
|
|
355
368
|
): APIPromise<Rsp> {
|
|
356
369
|
return new APIPromise(this.makeRequest(options, remainingRetries));
|
|
357
370
|
}
|
|
358
371
|
|
|
359
|
-
private async makeRequest(
|
|
360
|
-
optionsInput: PromiseOrValue<FinalRequestOptions
|
|
372
|
+
private async makeRequest<Req>(
|
|
373
|
+
optionsInput: PromiseOrValue<FinalRequestOptions<Req>>,
|
|
361
374
|
retriesRemaining: number | null,
|
|
362
375
|
): Promise<APIResponseProps> {
|
|
363
376
|
const options = await optionsInput;
|
|
@@ -419,7 +432,7 @@ export abstract class APIClient {
|
|
|
419
432
|
return new PagePromise<PageClass, Item>(this, request, Page);
|
|
420
433
|
}
|
|
421
434
|
|
|
422
|
-
buildURL<Req
|
|
435
|
+
buildURL<Req>(path: string, query: Req | null | undefined): string {
|
|
423
436
|
const url =
|
|
424
437
|
isAbsoluteURL(path) ?
|
|
425
438
|
new URL(path)
|
|
@@ -593,7 +606,7 @@ export abstract class AbstractPage<Item> implements AsyncIterable<Item> {
|
|
|
593
606
|
);
|
|
594
607
|
}
|
|
595
608
|
const nextOptions = { ...this.options };
|
|
596
|
-
if ('params' in nextInfo) {
|
|
609
|
+
if ('params' in nextInfo && typeof nextOptions.query === 'object') {
|
|
597
610
|
nextOptions.query = { ...nextOptions.query, ...nextInfo.params };
|
|
598
611
|
} else if ('url' in nextInfo) {
|
|
599
612
|
const params = [...Object.entries(nextOptions.query || {}), ...nextInfo.url.searchParams.entries()];
|
|
@@ -691,7 +704,7 @@ export type Headers = Record<string, string | null | undefined>;
|
|
|
691
704
|
export type DefaultQuery = Record<string, string | undefined>;
|
|
692
705
|
export type KeysEnum<T> = { [P in keyof Required<T>]: true };
|
|
693
706
|
|
|
694
|
-
export type RequestOptions<Req
|
|
707
|
+
export type RequestOptions<Req = unknown | Record<string, unknown> | Readable> = {
|
|
695
708
|
method?: HTTPMethod;
|
|
696
709
|
path?: string;
|
|
697
710
|
query?: Req | undefined;
|
|
@@ -728,7 +741,7 @@ const requestOptionsKeys: KeysEnum<RequestOptions> = {
|
|
|
728
741
|
__binaryResponse: true,
|
|
729
742
|
};
|
|
730
743
|
|
|
731
|
-
export const isRequestOptions = (obj: unknown): obj is RequestOptions
|
|
744
|
+
export const isRequestOptions = (obj: unknown): obj is RequestOptions => {
|
|
732
745
|
return (
|
|
733
746
|
typeof obj === 'object' &&
|
|
734
747
|
obj !== null &&
|
|
@@ -737,7 +750,7 @@ export const isRequestOptions = (obj: unknown): obj is RequestOptions<Record<str
|
|
|
737
750
|
);
|
|
738
751
|
};
|
|
739
752
|
|
|
740
|
-
export type FinalRequestOptions<Req
|
|
753
|
+
export type FinalRequestOptions<Req = unknown | Record<string, unknown> | Readable> = RequestOptions<Req> & {
|
|
741
754
|
method: HTTPMethod;
|
|
742
755
|
path: string;
|
|
743
756
|
};
|
|
@@ -1004,6 +1017,28 @@ export function hasOwn(obj: Object, key: string): boolean {
|
|
|
1004
1017
|
return Object.prototype.hasOwnProperty.call(obj, key);
|
|
1005
1018
|
}
|
|
1006
1019
|
|
|
1020
|
+
/**
|
|
1021
|
+
* Copies headers from "newHeaders" onto "targetHeaders",
|
|
1022
|
+
* using lower-case for all properties,
|
|
1023
|
+
* ignoring any keys with undefined values,
|
|
1024
|
+
* and deleting any keys with null values.
|
|
1025
|
+
*/
|
|
1026
|
+
function applyHeadersMut(targetHeaders: Headers, newHeaders: Headers): void {
|
|
1027
|
+
for (const k in newHeaders) {
|
|
1028
|
+
if (!hasOwn(newHeaders, k)) continue;
|
|
1029
|
+
const lowerKey = k.toLowerCase();
|
|
1030
|
+
if (!lowerKey) continue;
|
|
1031
|
+
|
|
1032
|
+
const val = newHeaders[k];
|
|
1033
|
+
|
|
1034
|
+
if (val === null) {
|
|
1035
|
+
delete targetHeaders[lowerKey];
|
|
1036
|
+
} else if (val !== undefined) {
|
|
1037
|
+
targetHeaders[lowerKey] = val;
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1007
1042
|
export function debug(action: string, ...args: any[]) {
|
|
1008
1043
|
if (typeof process !== 'undefined' && process.env['DEBUG'] === 'true') {
|
|
1009
1044
|
console.log(`Increase:DEBUG:${action}`, ...args);
|
|
@@ -249,6 +249,14 @@ export interface AccountNumberListParams extends PageParams {
|
|
|
249
249
|
*/
|
|
250
250
|
account_id?: string;
|
|
251
251
|
|
|
252
|
+
/**
|
|
253
|
+
* The ACH Debit status to retrieve Account Numbers for.
|
|
254
|
+
*
|
|
255
|
+
* - `allowed` - ACH Debits are allowed.
|
|
256
|
+
* - `blocked` - ACH Debits are blocked.
|
|
257
|
+
*/
|
|
258
|
+
ach_debit_status?: 'allowed' | 'blocked';
|
|
259
|
+
|
|
252
260
|
created_at?: AccountNumberListParams.CreatedAt;
|
|
253
261
|
|
|
254
262
|
/**
|
|
@@ -3644,6 +3644,11 @@ export namespace ACHTransferSimulation {
|
|
|
3644
3644
|
* response if and only if `category` is equal to `inbound_ach_transfer`.
|
|
3645
3645
|
*/
|
|
3646
3646
|
export interface InboundACHTransfer {
|
|
3647
|
+
/**
|
|
3648
|
+
* Additional information sent from the originator.
|
|
3649
|
+
*/
|
|
3650
|
+
addenda: InboundACHTransfer.Addenda | null;
|
|
3651
|
+
|
|
3647
3652
|
/**
|
|
3648
3653
|
* The amount in the minor unit of the destination account currency. For dollars,
|
|
3649
3654
|
* for example, this is cents.
|
|
@@ -3702,6 +3707,46 @@ export namespace ACHTransferSimulation {
|
|
|
3702
3707
|
transfer_id: string;
|
|
3703
3708
|
}
|
|
3704
3709
|
|
|
3710
|
+
export namespace InboundACHTransfer {
|
|
3711
|
+
/**
|
|
3712
|
+
* Additional information sent from the originator.
|
|
3713
|
+
*/
|
|
3714
|
+
export interface Addenda {
|
|
3715
|
+
/**
|
|
3716
|
+
* The type of addendum.
|
|
3717
|
+
*
|
|
3718
|
+
* - `freeform` - Unstructured addendum.
|
|
3719
|
+
*/
|
|
3720
|
+
category: 'freeform';
|
|
3721
|
+
|
|
3722
|
+
/**
|
|
3723
|
+
* Unstructured `payment_related_information` passed through by the originator.
|
|
3724
|
+
*/
|
|
3725
|
+
freeform: Addenda.Freeform | null;
|
|
3726
|
+
}
|
|
3727
|
+
|
|
3728
|
+
export namespace Addenda {
|
|
3729
|
+
/**
|
|
3730
|
+
* Unstructured `payment_related_information` passed through by the originator.
|
|
3731
|
+
*/
|
|
3732
|
+
export interface Freeform {
|
|
3733
|
+
/**
|
|
3734
|
+
* Each entry represents an addendum received from the originator.
|
|
3735
|
+
*/
|
|
3736
|
+
entries: Array<Freeform.Entry>;
|
|
3737
|
+
}
|
|
3738
|
+
|
|
3739
|
+
export namespace Freeform {
|
|
3740
|
+
export interface Entry {
|
|
3741
|
+
/**
|
|
3742
|
+
* The payment related information passed in the addendum.
|
|
3743
|
+
*/
|
|
3744
|
+
payment_related_information: string;
|
|
3745
|
+
}
|
|
3746
|
+
}
|
|
3747
|
+
}
|
|
3748
|
+
}
|
|
3749
|
+
|
|
3705
3750
|
/**
|
|
3706
3751
|
* An Inbound Check object. This field will be present in the JSON response if and
|
|
3707
3752
|
* only if `category` is equal to `inbound_check`.
|
|
@@ -2426,6 +2426,11 @@ export namespace InterestPaymentSimulationResult {
|
|
|
2426
2426
|
* response if and only if `category` is equal to `inbound_ach_transfer`.
|
|
2427
2427
|
*/
|
|
2428
2428
|
export interface InboundACHTransfer {
|
|
2429
|
+
/**
|
|
2430
|
+
* Additional information sent from the originator.
|
|
2431
|
+
*/
|
|
2432
|
+
addenda: InboundACHTransfer.Addenda | null;
|
|
2433
|
+
|
|
2429
2434
|
/**
|
|
2430
2435
|
* The amount in the minor unit of the destination account currency. For dollars,
|
|
2431
2436
|
* for example, this is cents.
|
|
@@ -2484,6 +2489,46 @@ export namespace InterestPaymentSimulationResult {
|
|
|
2484
2489
|
transfer_id: string;
|
|
2485
2490
|
}
|
|
2486
2491
|
|
|
2492
|
+
export namespace InboundACHTransfer {
|
|
2493
|
+
/**
|
|
2494
|
+
* Additional information sent from the originator.
|
|
2495
|
+
*/
|
|
2496
|
+
export interface Addenda {
|
|
2497
|
+
/**
|
|
2498
|
+
* The type of addendum.
|
|
2499
|
+
*
|
|
2500
|
+
* - `freeform` - Unstructured addendum.
|
|
2501
|
+
*/
|
|
2502
|
+
category: 'freeform';
|
|
2503
|
+
|
|
2504
|
+
/**
|
|
2505
|
+
* Unstructured `payment_related_information` passed through by the originator.
|
|
2506
|
+
*/
|
|
2507
|
+
freeform: Addenda.Freeform | null;
|
|
2508
|
+
}
|
|
2509
|
+
|
|
2510
|
+
export namespace Addenda {
|
|
2511
|
+
/**
|
|
2512
|
+
* Unstructured `payment_related_information` passed through by the originator.
|
|
2513
|
+
*/
|
|
2514
|
+
export interface Freeform {
|
|
2515
|
+
/**
|
|
2516
|
+
* Each entry represents an addendum received from the originator.
|
|
2517
|
+
*/
|
|
2518
|
+
entries: Array<Freeform.Entry>;
|
|
2519
|
+
}
|
|
2520
|
+
|
|
2521
|
+
export namespace Freeform {
|
|
2522
|
+
export interface Entry {
|
|
2523
|
+
/**
|
|
2524
|
+
* The payment related information passed in the addendum.
|
|
2525
|
+
*/
|
|
2526
|
+
payment_related_information: string;
|
|
2527
|
+
}
|
|
2528
|
+
}
|
|
2529
|
+
}
|
|
2530
|
+
}
|
|
2531
|
+
|
|
2487
2532
|
/**
|
|
2488
2533
|
* An Inbound Check object. This field will be present in the JSON response if and
|
|
2489
2534
|
* only if `category` is equal to `inbound_check`.
|
|
@@ -3624,6 +3624,11 @@ export namespace InboundRealTimePaymentsTransferSimulationResult {
|
|
|
3624
3624
|
* response if and only if `category` is equal to `inbound_ach_transfer`.
|
|
3625
3625
|
*/
|
|
3626
3626
|
export interface InboundACHTransfer {
|
|
3627
|
+
/**
|
|
3628
|
+
* Additional information sent from the originator.
|
|
3629
|
+
*/
|
|
3630
|
+
addenda: InboundACHTransfer.Addenda | null;
|
|
3631
|
+
|
|
3627
3632
|
/**
|
|
3628
3633
|
* The amount in the minor unit of the destination account currency. For dollars,
|
|
3629
3634
|
* for example, this is cents.
|
|
@@ -3682,6 +3687,46 @@ export namespace InboundRealTimePaymentsTransferSimulationResult {
|
|
|
3682
3687
|
transfer_id: string;
|
|
3683
3688
|
}
|
|
3684
3689
|
|
|
3690
|
+
export namespace InboundACHTransfer {
|
|
3691
|
+
/**
|
|
3692
|
+
* Additional information sent from the originator.
|
|
3693
|
+
*/
|
|
3694
|
+
export interface Addenda {
|
|
3695
|
+
/**
|
|
3696
|
+
* The type of addendum.
|
|
3697
|
+
*
|
|
3698
|
+
* - `freeform` - Unstructured addendum.
|
|
3699
|
+
*/
|
|
3700
|
+
category: 'freeform';
|
|
3701
|
+
|
|
3702
|
+
/**
|
|
3703
|
+
* Unstructured `payment_related_information` passed through by the originator.
|
|
3704
|
+
*/
|
|
3705
|
+
freeform: Addenda.Freeform | null;
|
|
3706
|
+
}
|
|
3707
|
+
|
|
3708
|
+
export namespace Addenda {
|
|
3709
|
+
/**
|
|
3710
|
+
* Unstructured `payment_related_information` passed through by the originator.
|
|
3711
|
+
*/
|
|
3712
|
+
export interface Freeform {
|
|
3713
|
+
/**
|
|
3714
|
+
* Each entry represents an addendum received from the originator.
|
|
3715
|
+
*/
|
|
3716
|
+
entries: Array<Freeform.Entry>;
|
|
3717
|
+
}
|
|
3718
|
+
|
|
3719
|
+
export namespace Freeform {
|
|
3720
|
+
export interface Entry {
|
|
3721
|
+
/**
|
|
3722
|
+
* The payment related information passed in the addendum.
|
|
3723
|
+
*/
|
|
3724
|
+
payment_related_information: string;
|
|
3725
|
+
}
|
|
3726
|
+
}
|
|
3727
|
+
}
|
|
3728
|
+
}
|
|
3729
|
+
|
|
3685
3730
|
/**
|
|
3686
3731
|
* An Inbound Check object. This field will be present in the JSON response if and
|
|
3687
3732
|
* only if `category` is equal to `inbound_check`.
|
|
@@ -2427,6 +2427,11 @@ export namespace WireTransferSimulation {
|
|
|
2427
2427
|
* response if and only if `category` is equal to `inbound_ach_transfer`.
|
|
2428
2428
|
*/
|
|
2429
2429
|
export interface InboundACHTransfer {
|
|
2430
|
+
/**
|
|
2431
|
+
* Additional information sent from the originator.
|
|
2432
|
+
*/
|
|
2433
|
+
addenda: InboundACHTransfer.Addenda | null;
|
|
2434
|
+
|
|
2430
2435
|
/**
|
|
2431
2436
|
* The amount in the minor unit of the destination account currency. For dollars,
|
|
2432
2437
|
* for example, this is cents.
|
|
@@ -2485,6 +2490,46 @@ export namespace WireTransferSimulation {
|
|
|
2485
2490
|
transfer_id: string;
|
|
2486
2491
|
}
|
|
2487
2492
|
|
|
2493
|
+
export namespace InboundACHTransfer {
|
|
2494
|
+
/**
|
|
2495
|
+
* Additional information sent from the originator.
|
|
2496
|
+
*/
|
|
2497
|
+
export interface Addenda {
|
|
2498
|
+
/**
|
|
2499
|
+
* The type of addendum.
|
|
2500
|
+
*
|
|
2501
|
+
* - `freeform` - Unstructured addendum.
|
|
2502
|
+
*/
|
|
2503
|
+
category: 'freeform';
|
|
2504
|
+
|
|
2505
|
+
/**
|
|
2506
|
+
* Unstructured `payment_related_information` passed through by the originator.
|
|
2507
|
+
*/
|
|
2508
|
+
freeform: Addenda.Freeform | null;
|
|
2509
|
+
}
|
|
2510
|
+
|
|
2511
|
+
export namespace Addenda {
|
|
2512
|
+
/**
|
|
2513
|
+
* Unstructured `payment_related_information` passed through by the originator.
|
|
2514
|
+
*/
|
|
2515
|
+
export interface Freeform {
|
|
2516
|
+
/**
|
|
2517
|
+
* Each entry represents an addendum received from the originator.
|
|
2518
|
+
*/
|
|
2519
|
+
entries: Array<Freeform.Entry>;
|
|
2520
|
+
}
|
|
2521
|
+
|
|
2522
|
+
export namespace Freeform {
|
|
2523
|
+
export interface Entry {
|
|
2524
|
+
/**
|
|
2525
|
+
* The payment related information passed in the addendum.
|
|
2526
|
+
*/
|
|
2527
|
+
payment_related_information: string;
|
|
2528
|
+
}
|
|
2529
|
+
}
|
|
2530
|
+
}
|
|
2531
|
+
}
|
|
2532
|
+
|
|
2488
2533
|
/**
|
|
2489
2534
|
* An Inbound Check object. This field will be present in the JSON response if and
|
|
2490
2535
|
* only if `category` is equal to `inbound_check`.
|
|
@@ -2426,6 +2426,11 @@ export namespace Transaction {
|
|
|
2426
2426
|
* response if and only if `category` is equal to `inbound_ach_transfer`.
|
|
2427
2427
|
*/
|
|
2428
2428
|
export interface InboundACHTransfer {
|
|
2429
|
+
/**
|
|
2430
|
+
* Additional information sent from the originator.
|
|
2431
|
+
*/
|
|
2432
|
+
addenda: InboundACHTransfer.Addenda | null;
|
|
2433
|
+
|
|
2429
2434
|
/**
|
|
2430
2435
|
* The amount in the minor unit of the destination account currency. For dollars,
|
|
2431
2436
|
* for example, this is cents.
|
|
@@ -2484,6 +2489,46 @@ export namespace Transaction {
|
|
|
2484
2489
|
transfer_id: string;
|
|
2485
2490
|
}
|
|
2486
2491
|
|
|
2492
|
+
export namespace InboundACHTransfer {
|
|
2493
|
+
/**
|
|
2494
|
+
* Additional information sent from the originator.
|
|
2495
|
+
*/
|
|
2496
|
+
export interface Addenda {
|
|
2497
|
+
/**
|
|
2498
|
+
* The type of addendum.
|
|
2499
|
+
*
|
|
2500
|
+
* - `freeform` - Unstructured addendum.
|
|
2501
|
+
*/
|
|
2502
|
+
category: 'freeform';
|
|
2503
|
+
|
|
2504
|
+
/**
|
|
2505
|
+
* Unstructured `payment_related_information` passed through by the originator.
|
|
2506
|
+
*/
|
|
2507
|
+
freeform: Addenda.Freeform | null;
|
|
2508
|
+
}
|
|
2509
|
+
|
|
2510
|
+
export namespace Addenda {
|
|
2511
|
+
/**
|
|
2512
|
+
* Unstructured `payment_related_information` passed through by the originator.
|
|
2513
|
+
*/
|
|
2514
|
+
export interface Freeform {
|
|
2515
|
+
/**
|
|
2516
|
+
* Each entry represents an addendum received from the originator.
|
|
2517
|
+
*/
|
|
2518
|
+
entries: Array<Freeform.Entry>;
|
|
2519
|
+
}
|
|
2520
|
+
|
|
2521
|
+
export namespace Freeform {
|
|
2522
|
+
export interface Entry {
|
|
2523
|
+
/**
|
|
2524
|
+
* The payment related information passed in the addendum.
|
|
2525
|
+
*/
|
|
2526
|
+
payment_related_information: string;
|
|
2527
|
+
}
|
|
2528
|
+
}
|
|
2529
|
+
}
|
|
2530
|
+
}
|
|
2531
|
+
|
|
2487
2532
|
/**
|
|
2488
2533
|
* An Inbound Check object. This field will be present in the JSON response if and
|
|
2489
2534
|
* only if `category` is equal to `inbound_check`.
|
package/src/uploads.ts
CHANGED
|
@@ -184,7 +184,7 @@ export const isMultipartBody = (body: any): body is MultipartBody =>
|
|
|
184
184
|
* Returns a multipart/form-data request if any part of the given request body contains a File / Blob value.
|
|
185
185
|
* Otherwise returns the request as is.
|
|
186
186
|
*/
|
|
187
|
-
export const maybeMultipartFormRequestOptions = async <T
|
|
187
|
+
export const maybeMultipartFormRequestOptions = async <T = Record<string, unknown>>(
|
|
188
188
|
opts: RequestOptions<T>,
|
|
189
189
|
): Promise<RequestOptions<T | MultipartBody>> => {
|
|
190
190
|
if (!hasUploadableValue(opts.body)) return opts;
|
|
@@ -193,7 +193,7 @@ export const maybeMultipartFormRequestOptions = async <T extends {} = Record<str
|
|
|
193
193
|
return getMultipartRequestOptions(form, opts);
|
|
194
194
|
};
|
|
195
195
|
|
|
196
|
-
export const multipartFormRequestOptions = async <T
|
|
196
|
+
export const multipartFormRequestOptions = async <T = Record<string, unknown>>(
|
|
197
197
|
opts: RequestOptions<T>,
|
|
198
198
|
): Promise<RequestOptions<T | MultipartBody>> => {
|
|
199
199
|
const form = await createForm(opts.body);
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.23.0'; // x-release-please-version
|
package/uploads.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ export declare const isMultipartBody: (body: any) => body is MultipartBody;
|
|
|
69
69
|
* Returns a multipart/form-data request if any part of the given request body contains a File / Blob value.
|
|
70
70
|
* Otherwise returns the request as is.
|
|
71
71
|
*/
|
|
72
|
-
export declare const maybeMultipartFormRequestOptions: <T
|
|
73
|
-
export declare const multipartFormRequestOptions: <T
|
|
72
|
+
export declare const maybeMultipartFormRequestOptions: <T = Record<string, unknown>>(opts: RequestOptions<T>) => Promise<RequestOptions<MultipartBody | T>>;
|
|
73
|
+
export declare const multipartFormRequestOptions: <T = Record<string, unknown>>(opts: RequestOptions<T>) => Promise<RequestOptions<MultipartBody | T>>;
|
|
74
74
|
export declare const createForm: <T = Record<string, unknown>>(body: T | undefined) => Promise<FormData>;
|
|
75
75
|
//# sourceMappingURL=uploads.d.ts.map
|
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,EACL,QAAQ,EAER,KAAK,IAAI,EACT,KAAK,eAAe,EAEpB,KAAK,YAAY,EAElB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,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,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.23.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.23.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|