@getivy/node-sdk 2.6.0 → 2.20.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 +164 -0
- package/README.md +2 -2
- package/api-promise.d.mts +1 -0
- package/api-promise.d.mts.map +1 -1
- package/api-promise.d.ts +1 -0
- package/api-promise.d.ts.map +1 -1
- package/api-promise.mjs +1 -0
- package/api-promise.mjs.map +1 -1
- package/bin/migration-config.json +1 -1
- package/client.d.mts +10 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +10 -4
- package/client.d.ts.map +1 -1
- package/client.js +21 -7
- package/client.js.map +1 -1
- package/client.mjs +21 -7
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/uploads.d.mts.map +1 -1
- package/core/uploads.d.ts.map +1 -1
- package/core/uploads.mjs.map +1 -1
- package/error.d.mts +1 -0
- package/error.d.mts.map +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.mjs +1 -0
- package/error.mjs.map +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.mjs.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.d.mts +6 -0
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +6 -0
- package/internal/shims.d.ts.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/tslib.js +17 -17
- package/internal/types.d.mts +4 -4
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +4 -4
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +4 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +4 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts.map +1 -1
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.mjs.map +1 -1
- package/lib/request-signing.d.mts +6 -0
- package/lib/request-signing.d.mts.map +1 -0
- package/lib/request-signing.d.ts +6 -0
- package/lib/request-signing.d.ts.map +1 -0
- package/lib/request-signing.js +113 -0
- package/lib/request-signing.js.map +1 -0
- package/lib/request-signing.mjs +109 -0
- package/lib/request-signing.mjs.map +1 -0
- package/package.json +16 -4
- package/resource.d.mts +1 -0
- package/resource.d.mts.map +1 -1
- package/resource.d.ts +1 -0
- package/resource.d.ts.map +1 -1
- package/resource.mjs +1 -0
- package/resource.mjs.map +1 -1
- package/resources/balance.d.mts.map +1 -1
- package/resources/balance.d.ts.map +1 -1
- package/resources/balance.mjs.map +1 -1
- package/resources/banks.d.mts +12 -14
- package/resources/banks.d.mts.map +1 -1
- package/resources/banks.d.ts +12 -14
- package/resources/banks.d.ts.map +1 -1
- package/resources/banks.mjs.map +1 -1
- package/resources/beneficiary-payouts.d.mts +2 -2
- package/resources/beneficiary-payouts.d.mts.map +1 -1
- package/resources/beneficiary-payouts.d.ts +2 -2
- package/resources/beneficiary-payouts.d.ts.map +1 -1
- package/resources/beneficiary-payouts.mjs.map +1 -1
- package/resources/capabilities.d.mts +8 -1
- package/resources/capabilities.d.mts.map +1 -1
- package/resources/capabilities.d.ts +8 -1
- package/resources/capabilities.d.ts.map +1 -1
- package/resources/capabilities.js +7 -0
- package/resources/capabilities.js.map +1 -1
- package/resources/capabilities.mjs +7 -0
- package/resources/capabilities.mjs.map +1 -1
- package/resources/checkoutsession.d.mts +18 -10
- package/resources/checkoutsession.d.mts.map +1 -1
- package/resources/checkoutsession.d.ts +18 -10
- package/resources/checkoutsession.d.ts.map +1 -1
- package/resources/checkoutsession.js +3 -2
- package/resources/checkoutsession.js.map +1 -1
- package/resources/checkoutsession.mjs +3 -2
- package/resources/checkoutsession.mjs.map +1 -1
- package/resources/counterparties.d.mts +956 -0
- package/resources/counterparties.d.mts.map +1 -0
- package/resources/counterparties.d.ts +956 -0
- package/resources/counterparties.d.ts.map +1 -0
- package/resources/counterparties.js +41 -0
- package/resources/counterparties.js.map +1 -0
- package/resources/counterparties.mjs +37 -0
- package/resources/counterparties.mjs.map +1 -0
- package/resources/customers.d.mts +6 -6
- package/resources/customers.d.mts.map +1 -1
- package/resources/customers.d.ts +6 -6
- package/resources/customers.d.ts.map +1 -1
- package/resources/customers.mjs.map +1 -1
- package/resources/deposits.d.mts +21 -7
- package/resources/deposits.d.mts.map +1 -1
- package/resources/deposits.d.ts +21 -7
- package/resources/deposits.d.ts.map +1 -1
- package/resources/deposits.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/orders.d.mts +102 -39
- package/resources/orders.d.mts.map +1 -1
- package/resources/orders.d.ts +102 -39
- package/resources/orders.d.ts.map +1 -1
- package/resources/orders.mjs.map +1 -1
- package/resources/payee.d.mts.map +1 -1
- package/resources/payee.d.ts.map +1 -1
- package/resources/payee.mjs.map +1 -1
- package/resources/payouts.d.mts +82 -21
- package/resources/payouts.d.mts.map +1 -1
- package/resources/payouts.d.ts +82 -21
- package/resources/payouts.d.ts.map +1 -1
- package/resources/payouts.mjs.map +1 -1
- package/resources/refunds.d.mts +1 -1
- package/resources/refunds.d.mts.map +1 -1
- package/resources/refunds.d.ts +1 -1
- package/resources/refunds.d.ts.map +1 -1
- package/resources/refunds.mjs.map +1 -1
- package/resources/returns.d.mts +2 -2
- package/resources/returns.d.mts.map +1 -1
- package/resources/returns.d.ts +2 -2
- package/resources/returns.d.ts.map +1 -1
- package/resources/returns.mjs.map +1 -1
- package/resources/subaccounts.d.mts +4 -4
- package/resources/subaccounts.d.mts.map +1 -1
- package/resources/subaccounts.d.ts +4 -4
- package/resources/subaccounts.d.ts.map +1 -1
- package/resources/subaccounts.mjs.map +1 -1
- package/resources/transactions.d.mts +3 -3
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +3 -3
- package/resources/transactions.d.ts.map +1 -1
- package/resources/transactions.mjs.map +1 -1
- package/resources/webhook/index.d.mts.map +1 -1
- package/resources/webhook/index.d.ts.map +1 -1
- package/resources/webhook/index.mjs.map +1 -1
- package/resources/webhook/subscription.d.mts +12 -12
- package/resources/webhook/subscription.d.mts.map +1 -1
- package/resources/webhook/subscription.d.ts +12 -12
- package/resources/webhook/subscription.d.ts.map +1 -1
- package/resources/webhook/subscription.mjs.map +1 -1
- package/resources/webhook/webhook.d.mts.map +1 -1
- package/resources/webhook/webhook.d.ts.map +1 -1
- package/resources/webhook/webhook.mjs.map +1 -1
- package/resources/webhook.d.mts.map +1 -1
- package/resources/webhook.d.ts.map +1 -1
- package/resources/webhook.mjs.map +1 -1
- package/resources.d.mts.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.mjs.map +1 -1
- package/src/client.ts +51 -22
- package/src/internal/utils/log.ts +3 -0
- package/src/lib/request-signing.ts +139 -0
- package/src/resources/banks.ts +21 -11
- package/src/resources/beneficiary-payouts.ts +2 -2
- package/src/resources/capabilities.ts +8 -1
- package/src/resources/checkoutsession.ts +31 -10
- package/src/resources/counterparties.ts +3073 -0
- package/src/resources/customers.ts +3509 -3509
- package/src/resources/deposits.ts +52 -6
- package/src/resources/index.ts +13 -9
- package/src/resources/orders.ts +222 -36
- package/src/resources/payouts.ts +396 -17
- package/src/resources/refunds.ts +1 -1
- package/src/resources/returns.ts +2 -2
- package/src/resources/subaccounts.ts +4 -4
- package/src/resources/transactions.ts +5 -2
- package/src/resources/webhook/subscription.ts +37 -12
- package/src/version.ts +1 -1
- package/uploads.d.mts +1 -0
- package/uploads.d.mts.map +1 -1
- package/uploads.d.ts +1 -0
- package/uploads.d.ts.map +1 -1
- package/uploads.mjs +1 -0
- package/uploads.mjs.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/resources/fx.d.mts +0 -155
- package/resources/fx.d.mts.map +0 -1
- package/resources/fx.d.ts +0 -155
- package/resources/fx.d.ts.map +0 -1
- package/resources/fx.js +0 -28
- package/resources/fx.js.map +0 -1
- package/resources/fx.mjs +0 -24
- package/resources/fx.mjs.map +0 -1
- package/src/resources/fx.ts +0 -195
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { appendSignature, createSignature, type Signer } from 'http-message-sig';
|
|
2
|
+
|
|
3
|
+
type SigningKey = Awaited<ReturnType<typeof globalThis.crypto.subtle.importKey>>;
|
|
4
|
+
|
|
5
|
+
type SigningCredentials = {
|
|
6
|
+
keyId: string;
|
|
7
|
+
signer: Signer;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
function base64(bytes: Uint8Array): string {
|
|
11
|
+
return btoa(Array.from(bytes, (byte) => String.fromCharCode(byte)).join(''));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function base64url(bytes: Uint8Array): string {
|
|
15
|
+
return base64(bytes).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
async function importPrivateKey(bytes: Uint8Array<ArrayBuffer>): Promise<SigningKey> {
|
|
19
|
+
try {
|
|
20
|
+
return await crypto.subtle.importKey('pkcs8', bytes, 'Ed25519', true, ['sign']);
|
|
21
|
+
} catch {
|
|
22
|
+
return crypto.subtle.importKey('pkcs8', bytes, { name: 'ECDSA', namedCurve: 'P-256' }, true, ['sign']);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
async function signingCredentials(pem: string): Promise<SigningCredentials> {
|
|
27
|
+
if (!globalThis.crypto?.subtle) {
|
|
28
|
+
throw new Error('Request signing requires Web Crypto support.');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const match = /^-----BEGIN PRIVATE KEY-----\s+([A-Za-z0-9+/=\s]+)-----END PRIVATE KEY-----$/.exec(
|
|
32
|
+
pem.trim(),
|
|
33
|
+
);
|
|
34
|
+
const encoded = match?.[1];
|
|
35
|
+
if (!encoded) {
|
|
36
|
+
throw new Error('Request signing requires an unencrypted PKCS#8 Ed25519 or P-256 private PEM key.');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
let key: SigningKey;
|
|
40
|
+
try {
|
|
41
|
+
const bytes = Uint8Array.from(atob(encoded.replace(/\s/g, '')), (character) => character.charCodeAt(0));
|
|
42
|
+
key = await importPrivateKey(bytes);
|
|
43
|
+
} catch {
|
|
44
|
+
throw new Error(
|
|
45
|
+
'Request signing requires a valid Ed25519 or P-256 private key. Check that this runtime supports the key algorithm in Web Crypto.',
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const jwk = await crypto.subtle.exportKey('jwk', key);
|
|
50
|
+
const isEd25519 = key.algorithm.name === 'Ed25519';
|
|
51
|
+
const members =
|
|
52
|
+
isEd25519 ? { crv: jwk.crv, kty: jwk.kty, x: jwk.x } : { crv: jwk.crv, kty: jwk.kty, x: jwk.x, y: jwk.y };
|
|
53
|
+
const digest = await crypto.subtle.digest('SHA-256', new TextEncoder().encode(JSON.stringify(members)));
|
|
54
|
+
|
|
55
|
+
const algorithm = isEd25519 ? { name: 'Ed25519' } : { name: 'ECDSA', hash: 'SHA-256' };
|
|
56
|
+
return {
|
|
57
|
+
keyId: base64url(new Uint8Array(digest)),
|
|
58
|
+
signer: {
|
|
59
|
+
algorithm: isEd25519 ? 'ed25519' : 'ecdsa-p256-sha256',
|
|
60
|
+
async sign(bytes) {
|
|
61
|
+
return new Uint8Array(await crypto.subtle.sign(algorithm, key, new Uint8Array(bytes)));
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export class RequestSigner {
|
|
68
|
+
#privateKey: string;
|
|
69
|
+
#credentials: Promise<SigningCredentials> | undefined;
|
|
70
|
+
|
|
71
|
+
constructor(privateKey: string) {
|
|
72
|
+
this.#privateKey = privateKey;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
async sign(
|
|
76
|
+
request: RequestInit,
|
|
77
|
+
url: string,
|
|
78
|
+
authorizationHeader: 'authorization' | 'x-ivy-api-key',
|
|
79
|
+
): Promise<void> {
|
|
80
|
+
const target = new URL(url);
|
|
81
|
+
if (target.hash || target.username || target.password || !['http:', 'https:'].includes(target.protocol)) {
|
|
82
|
+
throw new Error('Request signing requires an HTTP URL without credentials or a fragment.');
|
|
83
|
+
}
|
|
84
|
+
if (request.body != null && typeof request.body !== 'string') {
|
|
85
|
+
throw new Error('Request signing supports only serialized JSON request bodies.');
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const headers = new Headers(request.headers);
|
|
89
|
+
const contentType = headers.get('content-type');
|
|
90
|
+
if (
|
|
91
|
+
(contentType !== null && !/^application\/json\s*(;|$)/i.test(contentType.trim())) ||
|
|
92
|
+
(request.body && !contentType)
|
|
93
|
+
) {
|
|
94
|
+
throw new Error('Request signing requires application/json for requests with a body.');
|
|
95
|
+
}
|
|
96
|
+
const encoding = headers.get('content-encoding');
|
|
97
|
+
if (encoding !== null && encoding.trim().toLowerCase() !== 'identity') {
|
|
98
|
+
throw new Error('Request signing does not support encoded request bodies.');
|
|
99
|
+
}
|
|
100
|
+
if (!headers.get(authorizationHeader)?.trim()) {
|
|
101
|
+
throw new Error('Request signing requires the API authentication header.');
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const credentials = await (this.#credentials ??= signingCredentials(this.#privateKey));
|
|
105
|
+
const body = new TextEncoder().encode(request.body ?? '');
|
|
106
|
+
const digest = await crypto.subtle.digest('SHA-256', body);
|
|
107
|
+
headers.set('content-digest', `sha-256=:${base64(new Uint8Array(digest))}:`);
|
|
108
|
+
|
|
109
|
+
const components = ['@method', '@target-uri', authorizationHeader];
|
|
110
|
+
for (const name of ['content-type', 'content-digest', 'idempotency-key', 'api-version']) {
|
|
111
|
+
if (headers.has(name)) components.push(name);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
headers.delete('signature');
|
|
115
|
+
headers.delete('signature-input');
|
|
116
|
+
const fields = await createSignature(
|
|
117
|
+
{
|
|
118
|
+
kind: 'request',
|
|
119
|
+
method: (request.method ?? 'GET').toUpperCase(),
|
|
120
|
+
targetUri: target.href,
|
|
121
|
+
fields: Array.from(headers, ([name, value]) => ({ name, value })),
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
label: 'sig1',
|
|
125
|
+
components,
|
|
126
|
+
parameters: {
|
|
127
|
+
created: Math.floor(Date.now() / 1000),
|
|
128
|
+
nonce: base64url(crypto.getRandomValues(new Uint8Array(24))),
|
|
129
|
+
keyid: credentials.keyId,
|
|
130
|
+
tag: 'api-request',
|
|
131
|
+
},
|
|
132
|
+
signer: credentials.signer,
|
|
133
|
+
},
|
|
134
|
+
);
|
|
135
|
+
|
|
136
|
+
request.headers = appendSignature(headers, fields);
|
|
137
|
+
request.redirect = 'error';
|
|
138
|
+
}
|
|
139
|
+
}
|
package/src/resources/banks.ts
CHANGED
|
@@ -316,6 +316,10 @@ export interface BankRetrieveResponse {
|
|
|
316
316
|
| 'SWIFT'
|
|
317
317
|
| 'INTERNAL'
|
|
318
318
|
| 'TARGET'
|
|
319
|
+
| 'ACH'
|
|
320
|
+
| 'FEDWIRE'
|
|
321
|
+
| 'FEDNOW'
|
|
322
|
+
| 'RTP'
|
|
319
323
|
>;
|
|
320
324
|
|
|
321
325
|
/**
|
|
@@ -326,7 +330,7 @@ export interface BankRetrieveResponse {
|
|
|
326
330
|
/**
|
|
327
331
|
* The capabilities of the bank.
|
|
328
332
|
*/
|
|
329
|
-
capabilities?: Array<'
|
|
333
|
+
capabilities?: Array<'pis'>;
|
|
330
334
|
|
|
331
335
|
group?: string;
|
|
332
336
|
|
|
@@ -650,6 +654,10 @@ export namespace BankListResponse {
|
|
|
650
654
|
| 'SWIFT'
|
|
651
655
|
| 'INTERNAL'
|
|
652
656
|
| 'TARGET'
|
|
657
|
+
| 'ACH'
|
|
658
|
+
| 'FEDWIRE'
|
|
659
|
+
| 'FEDNOW'
|
|
660
|
+
| 'RTP'
|
|
653
661
|
>;
|
|
654
662
|
|
|
655
663
|
/**
|
|
@@ -660,7 +668,7 @@ export namespace BankListResponse {
|
|
|
660
668
|
/**
|
|
661
669
|
* The capabilities of the bank.
|
|
662
670
|
*/
|
|
663
|
-
capabilities?: Array<'
|
|
671
|
+
capabilities?: Array<'pis'>;
|
|
664
672
|
|
|
665
673
|
group?: string;
|
|
666
674
|
|
|
@@ -985,6 +993,10 @@ export namespace BankSearchResponse {
|
|
|
985
993
|
| 'SWIFT'
|
|
986
994
|
| 'INTERNAL'
|
|
987
995
|
| 'TARGET'
|
|
996
|
+
| 'ACH'
|
|
997
|
+
| 'FEDWIRE'
|
|
998
|
+
| 'FEDNOW'
|
|
999
|
+
| 'RTP'
|
|
988
1000
|
>;
|
|
989
1001
|
|
|
990
1002
|
/**
|
|
@@ -995,7 +1007,7 @@ export namespace BankSearchResponse {
|
|
|
995
1007
|
/**
|
|
996
1008
|
* The capabilities of the bank.
|
|
997
1009
|
*/
|
|
998
|
-
capabilities?: Array<'
|
|
1010
|
+
capabilities?: Array<'pis'>;
|
|
999
1011
|
|
|
1000
1012
|
group?: string;
|
|
1001
1013
|
|
|
@@ -1020,10 +1032,9 @@ export interface BankRetrieveParams {
|
|
|
1020
1032
|
|
|
1021
1033
|
export interface BankListParams {
|
|
1022
1034
|
/**
|
|
1023
|
-
* Filter banks with provided capability
|
|
1024
|
-
* payment products.
|
|
1035
|
+
* Filter banks with the provided payment capability.
|
|
1025
1036
|
*/
|
|
1026
|
-
capability?: '
|
|
1037
|
+
capability?: 'pis';
|
|
1027
1038
|
|
|
1028
1039
|
/**
|
|
1029
1040
|
* ISO 4217 currency code. Filter banks with provided currency only.
|
|
@@ -1299,7 +1310,7 @@ export interface BankListParams {
|
|
|
1299
1310
|
/**
|
|
1300
1311
|
* The internal checkout session id. For internal use only.
|
|
1301
1312
|
*/
|
|
1302
|
-
sessionId?:
|
|
1313
|
+
sessionId?: string;
|
|
1303
1314
|
|
|
1304
1315
|
/**
|
|
1305
1316
|
* The number of banks to skip
|
|
@@ -1309,10 +1320,9 @@ export interface BankListParams {
|
|
|
1309
1320
|
|
|
1310
1321
|
export interface BankSearchParams {
|
|
1311
1322
|
/**
|
|
1312
|
-
* Filter banks with provided capability
|
|
1313
|
-
* payment products.
|
|
1323
|
+
* Filter banks with the provided payment capability.
|
|
1314
1324
|
*/
|
|
1315
|
-
capability?: '
|
|
1325
|
+
capability?: 'pis';
|
|
1316
1326
|
|
|
1317
1327
|
/**
|
|
1318
1328
|
* ISO 4217 currency code. Filter banks with provided currency only.
|
|
@@ -1595,7 +1605,7 @@ export interface BankSearchParams {
|
|
|
1595
1605
|
/**
|
|
1596
1606
|
* The internal checkout session id. For internal use only.
|
|
1597
1607
|
*/
|
|
1598
|
-
sessionId?:
|
|
1608
|
+
sessionId?: string;
|
|
1599
1609
|
|
|
1600
1610
|
/**
|
|
1601
1611
|
* The number of banks to skip
|
|
@@ -36,7 +36,7 @@ export namespace BeneficiaryPayoutCreateResponse {
|
|
|
36
36
|
/**
|
|
37
37
|
* The creation timestamp of the payout
|
|
38
38
|
*/
|
|
39
|
-
createdAt:
|
|
39
|
+
createdAt: string;
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* The currency of the balance which was settled to the beneficiary bank account or
|
|
@@ -67,7 +67,7 @@ export namespace BeneficiaryPayoutCreateResponse {
|
|
|
67
67
|
/**
|
|
68
68
|
* The current status of the payout
|
|
69
69
|
*/
|
|
70
|
-
status: 'paid' | 'pending' | 'in_transit' | 'failed' | 'canceled';
|
|
70
|
+
status: 'paid' | 'pending' | 'in_transit' | 'failed' | 'returned' | 'canceled';
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
73
|
* The type of payout
|
|
@@ -8,6 +8,13 @@ export class Capabilities extends APIResource {
|
|
|
8
8
|
/**
|
|
9
9
|
* Retrieve the capabilities of your Ivy account. The capabilities are broken down
|
|
10
10
|
* by market and by product.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const capability = await client.capabilities.retrieve({
|
|
15
|
+
* market: 'DE',
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
11
18
|
*/
|
|
12
19
|
retrieve(body: CapabilityRetrieveParams, options?: RequestOptions): APIPromise<CapabilityRetrieveResponse> {
|
|
13
20
|
return this._client.post('/api/service/merchant/capabilities/details', { body, ...options });
|
|
@@ -15,7 +22,7 @@ export class Capabilities extends APIResource {
|
|
|
15
22
|
}
|
|
16
23
|
|
|
17
24
|
export interface CapabilityRetrieveResponse {
|
|
18
|
-
capabilities?: Array<'
|
|
25
|
+
capabilities?: Array<'pis'>;
|
|
19
26
|
}
|
|
20
27
|
|
|
21
28
|
export interface CapabilityRetrieveParams {
|
|
@@ -7,8 +7,9 @@ import { RequestOptions } from '../internal/request-options';
|
|
|
7
7
|
export class Checkoutsession extends APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Creates a Checkout Session for the merchant corresponding to the given API key.
|
|
10
|
-
* See
|
|
11
|
-
*
|
|
10
|
+
* See
|
|
11
|
+
* [the guide](https://docs.augustus.com/docs/pay-by-bank/instant-bank-transfer)
|
|
12
|
+
* for more information.
|
|
12
13
|
*/
|
|
13
14
|
create(
|
|
14
15
|
body: CheckoutsessionCreateParams,
|
|
@@ -329,7 +330,7 @@ export interface CheckoutsessionCreateResponse {
|
|
|
329
330
|
|
|
330
331
|
completeCallbackUrl?: string;
|
|
331
332
|
|
|
332
|
-
createdAt?:
|
|
333
|
+
createdAt?: string;
|
|
333
334
|
|
|
334
335
|
customer?: CheckoutsessionCreateResponse.Customer;
|
|
335
336
|
|
|
@@ -627,7 +628,7 @@ export interface CheckoutsessionCreateResponse {
|
|
|
627
628
|
|
|
628
629
|
subaccountId?: string;
|
|
629
630
|
|
|
630
|
-
updatedAt?:
|
|
631
|
+
updatedAt?: string;
|
|
631
632
|
}
|
|
632
633
|
|
|
633
634
|
export namespace CheckoutsessionCreateResponse {
|
|
@@ -1818,7 +1819,7 @@ export interface CheckoutsessionRetrieveResponse {
|
|
|
1818
1819
|
|
|
1819
1820
|
completeCallbackUrl?: string;
|
|
1820
1821
|
|
|
1821
|
-
createdAt?:
|
|
1822
|
+
createdAt?: string;
|
|
1822
1823
|
|
|
1823
1824
|
customer?: CheckoutsessionRetrieveResponse.Customer;
|
|
1824
1825
|
|
|
@@ -2116,7 +2117,7 @@ export interface CheckoutsessionRetrieveResponse {
|
|
|
2116
2117
|
|
|
2117
2118
|
subaccountId?: string;
|
|
2118
2119
|
|
|
2119
|
-
updatedAt?:
|
|
2120
|
+
updatedAt?: string;
|
|
2120
2121
|
}
|
|
2121
2122
|
|
|
2122
2123
|
export namespace CheckoutsessionRetrieveResponse {
|
|
@@ -3307,7 +3308,7 @@ export interface CheckoutsessionExpireResponse {
|
|
|
3307
3308
|
|
|
3308
3309
|
completeCallbackUrl?: string;
|
|
3309
3310
|
|
|
3310
|
-
createdAt?:
|
|
3311
|
+
createdAt?: string;
|
|
3311
3312
|
|
|
3312
3313
|
customer?: CheckoutsessionExpireResponse.Customer;
|
|
3313
3314
|
|
|
@@ -3605,7 +3606,7 @@ export interface CheckoutsessionExpireResponse {
|
|
|
3605
3606
|
|
|
3606
3607
|
subaccountId?: string;
|
|
3607
3608
|
|
|
3608
|
-
updatedAt?:
|
|
3609
|
+
updatedAt?: string;
|
|
3609
3610
|
}
|
|
3610
3611
|
|
|
3611
3612
|
export namespace CheckoutsessionExpireResponse {
|
|
@@ -5511,7 +5512,7 @@ export namespace CheckoutsessionCreateParams {
|
|
|
5511
5512
|
}
|
|
5512
5513
|
|
|
5513
5514
|
export interface FinancialAddress {
|
|
5514
|
-
type: 'iban' | 'sort_code' | 'bank_code' | 'bban' | 'wallet' | 'aba';
|
|
5515
|
+
type: 'iban' | 'sort_code' | 'bank_code' | 'bban' | 'wallet' | 'aba' | 'bic';
|
|
5515
5516
|
|
|
5516
5517
|
aba?: FinancialAddress.Aba;
|
|
5517
5518
|
|
|
@@ -5519,6 +5520,8 @@ export namespace CheckoutsessionCreateParams {
|
|
|
5519
5520
|
|
|
5520
5521
|
bban?: FinancialAddress.Bban;
|
|
5521
5522
|
|
|
5523
|
+
bic?: FinancialAddress.Bic;
|
|
5524
|
+
|
|
5522
5525
|
iban?: FinancialAddress.Iban;
|
|
5523
5526
|
|
|
5524
5527
|
sortCode?: FinancialAddress.SortCode;
|
|
@@ -5551,6 +5554,16 @@ export namespace CheckoutsessionCreateParams {
|
|
|
5551
5554
|
bic?: string;
|
|
5552
5555
|
}
|
|
5553
5556
|
|
|
5557
|
+
export interface Bic {
|
|
5558
|
+
accountHolderName: string;
|
|
5559
|
+
|
|
5560
|
+
accountNumber: string;
|
|
5561
|
+
|
|
5562
|
+
bic: string;
|
|
5563
|
+
|
|
5564
|
+
localBankCode?: string;
|
|
5565
|
+
}
|
|
5566
|
+
|
|
5554
5567
|
export interface Iban {
|
|
5555
5568
|
accountHolderName: string;
|
|
5556
5569
|
|
|
@@ -5576,7 +5589,15 @@ export namespace CheckoutsessionCreateParams {
|
|
|
5576
5589
|
/**
|
|
5577
5590
|
* The blockchain network
|
|
5578
5591
|
*/
|
|
5579
|
-
blockchain:
|
|
5592
|
+
blockchain:
|
|
5593
|
+
| 'BTC'
|
|
5594
|
+
| 'BTC-TESTNET4'
|
|
5595
|
+
| 'ETH'
|
|
5596
|
+
| 'ETH-SEPOLIA'
|
|
5597
|
+
| 'SOL'
|
|
5598
|
+
| 'SOL-DEVNET'
|
|
5599
|
+
| 'MATIC'
|
|
5600
|
+
| 'MATIC-AMOY';
|
|
5580
5601
|
}
|
|
5581
5602
|
}
|
|
5582
5603
|
}
|