@getivy/node-sdk 2.7.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 +145 -0
- package/README.md +2 -2
- 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/internal/tslib.js +17 -17
- 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/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/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/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/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/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/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/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/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/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/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/transactions.d.mts +2 -2
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +2 -2
- package/resources/transactions.d.ts.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/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 +2 -2
- package/src/resources/webhook/subscription.ts +37 -12
- package/src/version.ts +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
package/src/resources/fx.ts
DELETED
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../core/resource';
|
|
4
|
-
import { APIPromise } from '../core/api-promise';
|
|
5
|
-
import { RequestOptions } from '../internal/request-options';
|
|
6
|
-
|
|
7
|
-
export class Fx extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Retrieve the details of a past fx transfer using the fxId.
|
|
10
|
-
*/
|
|
11
|
-
retrieve(body: FxRetrieveParams, options?: RequestOptions): APIPromise<FxRetrieveResponse> {
|
|
12
|
-
return this._client.post('/api/service/fx/retrieve', { body, ...options });
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Execute a standalone foreign exchange transaction.
|
|
17
|
-
*/
|
|
18
|
-
execute(body: FxExecuteParams, options?: RequestOptions): APIPromise<FxExecuteResponse> {
|
|
19
|
-
return this._client.post('/api/service/fx/execute', { body, ...options });
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Retrieve the current exchange rate for a given currency pair. The rate is not
|
|
24
|
-
* guaranteed for any following transactions.
|
|
25
|
-
*/
|
|
26
|
-
retrieveRate(body: FxRetrieveRateParams, options?: RequestOptions): APIPromise<FxRetrieveRateResponse> {
|
|
27
|
-
return this._client.post('/api/service/fx/retrieve-rate', { body, ...options });
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface FxRetrieveResponse {
|
|
32
|
-
/**
|
|
33
|
-
* The fxId attached to the transfer.
|
|
34
|
-
*/
|
|
35
|
-
id: string;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* The exchange rate for the given currency pair.
|
|
39
|
-
*/
|
|
40
|
-
rate: string;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* The source currency code
|
|
44
|
-
*/
|
|
45
|
-
sourceCurrency: 'EUR' | 'GBP' | 'USDC';
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* The status of the FX transaction.
|
|
49
|
-
*/
|
|
50
|
-
status: 'initiated' | 'succeeded' | 'failed';
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* The target currency code
|
|
54
|
-
*/
|
|
55
|
-
targetCurrency: 'EUR' | 'GBP' | 'USDC';
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Additional metadata.
|
|
59
|
-
*/
|
|
60
|
-
metadata?: { [key: string]: unknown };
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* The amount of source currency to convert.
|
|
64
|
-
*/
|
|
65
|
-
sourceAmount?: string;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* The amount of the target currency for the given source amount.
|
|
69
|
-
*/
|
|
70
|
-
targetAmount?: string;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export interface FxExecuteResponse {
|
|
74
|
-
/**
|
|
75
|
-
* The fxId attached to the transfer.
|
|
76
|
-
*/
|
|
77
|
-
id: string;
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* The exchange rate for the given currency pair.
|
|
81
|
-
*/
|
|
82
|
-
rate: string;
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* The source currency code
|
|
86
|
-
*/
|
|
87
|
-
sourceCurrency: 'EUR' | 'GBP' | 'USDC';
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* The status of the FX transaction.
|
|
91
|
-
*/
|
|
92
|
-
status: 'initiated' | 'succeeded' | 'failed';
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* The target currency code
|
|
96
|
-
*/
|
|
97
|
-
targetCurrency: 'EUR' | 'GBP' | 'USDC';
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Additional metadata.
|
|
101
|
-
*/
|
|
102
|
-
metadata?: { [key: string]: unknown };
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* The amount of source currency to convert.
|
|
106
|
-
*/
|
|
107
|
-
sourceAmount?: string;
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* The amount of the target currency for the given source amount.
|
|
111
|
-
*/
|
|
112
|
-
targetAmount?: string;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export interface FxRetrieveRateResponse {
|
|
116
|
-
/**
|
|
117
|
-
* The current exchange rate for the given currency pair.
|
|
118
|
-
*/
|
|
119
|
-
rate: string;
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* The amount of source currency to convert. Only returned if the source amount is
|
|
123
|
-
* provided.
|
|
124
|
-
*/
|
|
125
|
-
sourceAmount?: string;
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* The amount of the target currency for the given source amount. Only returned if
|
|
129
|
-
* the source amount is provided.
|
|
130
|
-
*/
|
|
131
|
-
targetAmount?: string;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
export interface FxRetrieveParams {
|
|
135
|
-
/**
|
|
136
|
-
* The fxId attached to the transfer.
|
|
137
|
-
*/
|
|
138
|
-
fxId: string;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
export interface FxExecuteParams {
|
|
142
|
-
/**
|
|
143
|
-
* The source account id.
|
|
144
|
-
*/
|
|
145
|
-
sourceAccountId: string;
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* The amount of source currency to convert. Minimum: 10
|
|
149
|
-
*/
|
|
150
|
-
sourceAmount: string;
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* The target account id.
|
|
154
|
-
*/
|
|
155
|
-
targetAccountId: string;
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* Deprecated: use the Idempotency-Key request header instead.
|
|
159
|
-
*/
|
|
160
|
-
idempotencyKey?: string;
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Additional metadata.
|
|
164
|
-
*/
|
|
165
|
-
metadata?: { [key: string]: unknown };
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
export interface FxRetrieveRateParams {
|
|
169
|
-
/**
|
|
170
|
-
* The source currency code.
|
|
171
|
-
*/
|
|
172
|
-
sourceCurrency: 'EUR' | 'GBP' | 'USDC';
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* The target currency code.
|
|
176
|
-
*/
|
|
177
|
-
targetCurrency: 'EUR' | 'GBP' | 'USDC';
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* The amount of source currency to convert. If not provided, only the rate will be
|
|
181
|
-
* returned. Decimal places should be separated by a dot.
|
|
182
|
-
*/
|
|
183
|
-
sourceAmount?: string;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
export declare namespace Fx {
|
|
187
|
-
export {
|
|
188
|
-
type FxRetrieveResponse as FxRetrieveResponse,
|
|
189
|
-
type FxExecuteResponse as FxExecuteResponse,
|
|
190
|
-
type FxRetrieveRateResponse as FxRetrieveRateResponse,
|
|
191
|
-
type FxRetrieveParams as FxRetrieveParams,
|
|
192
|
-
type FxExecuteParams as FxExecuteParams,
|
|
193
|
-
type FxRetrieveRateParams as FxRetrieveRateParams,
|
|
194
|
-
};
|
|
195
|
-
}
|