@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.
Files changed (139) hide show
  1. package/CHANGELOG.md +145 -0
  2. package/README.md +2 -2
  3. package/bin/migration-config.json +1 -1
  4. package/client.d.mts +10 -4
  5. package/client.d.mts.map +1 -1
  6. package/client.d.ts +10 -4
  7. package/client.d.ts.map +1 -1
  8. package/client.js +21 -7
  9. package/client.js.map +1 -1
  10. package/client.mjs +21 -7
  11. package/client.mjs.map +1 -1
  12. package/internal/tslib.js +17 -17
  13. package/internal/utils/log.d.mts.map +1 -1
  14. package/internal/utils/log.d.ts.map +1 -1
  15. package/internal/utils/log.js +4 -1
  16. package/internal/utils/log.js.map +1 -1
  17. package/internal/utils/log.mjs +4 -1
  18. package/internal/utils/log.mjs.map +1 -1
  19. package/lib/request-signing.d.mts +6 -0
  20. package/lib/request-signing.d.mts.map +1 -0
  21. package/lib/request-signing.d.ts +6 -0
  22. package/lib/request-signing.d.ts.map +1 -0
  23. package/lib/request-signing.js +113 -0
  24. package/lib/request-signing.js.map +1 -0
  25. package/lib/request-signing.mjs +109 -0
  26. package/lib/request-signing.mjs.map +1 -0
  27. package/package.json +16 -4
  28. package/resources/banks.d.mts +12 -14
  29. package/resources/banks.d.mts.map +1 -1
  30. package/resources/banks.d.ts +12 -14
  31. package/resources/banks.d.ts.map +1 -1
  32. package/resources/beneficiary-payouts.d.mts +2 -2
  33. package/resources/beneficiary-payouts.d.mts.map +1 -1
  34. package/resources/beneficiary-payouts.d.ts +2 -2
  35. package/resources/beneficiary-payouts.d.ts.map +1 -1
  36. package/resources/capabilities.d.mts +8 -1
  37. package/resources/capabilities.d.mts.map +1 -1
  38. package/resources/capabilities.d.ts +8 -1
  39. package/resources/capabilities.d.ts.map +1 -1
  40. package/resources/capabilities.js +7 -0
  41. package/resources/capabilities.js.map +1 -1
  42. package/resources/capabilities.mjs +7 -0
  43. package/resources/capabilities.mjs.map +1 -1
  44. package/resources/checkoutsession.d.mts +18 -10
  45. package/resources/checkoutsession.d.mts.map +1 -1
  46. package/resources/checkoutsession.d.ts +18 -10
  47. package/resources/checkoutsession.d.ts.map +1 -1
  48. package/resources/checkoutsession.js +3 -2
  49. package/resources/checkoutsession.js.map +1 -1
  50. package/resources/checkoutsession.mjs +3 -2
  51. package/resources/checkoutsession.mjs.map +1 -1
  52. package/resources/counterparties.d.mts +956 -0
  53. package/resources/counterparties.d.mts.map +1 -0
  54. package/resources/counterparties.d.ts +956 -0
  55. package/resources/counterparties.d.ts.map +1 -0
  56. package/resources/counterparties.js +41 -0
  57. package/resources/counterparties.js.map +1 -0
  58. package/resources/counterparties.mjs +37 -0
  59. package/resources/counterparties.mjs.map +1 -0
  60. package/resources/customers.d.mts +6 -6
  61. package/resources/customers.d.mts.map +1 -1
  62. package/resources/customers.d.ts +6 -6
  63. package/resources/customers.d.ts.map +1 -1
  64. package/resources/deposits.d.mts +21 -7
  65. package/resources/deposits.d.mts.map +1 -1
  66. package/resources/deposits.d.ts +21 -7
  67. package/resources/deposits.d.ts.map +1 -1
  68. package/resources/index.d.mts +1 -1
  69. package/resources/index.d.mts.map +1 -1
  70. package/resources/index.d.ts +1 -1
  71. package/resources/index.d.ts.map +1 -1
  72. package/resources/index.js +3 -3
  73. package/resources/index.js.map +1 -1
  74. package/resources/index.mjs +1 -1
  75. package/resources/index.mjs.map +1 -1
  76. package/resources/orders.d.mts +102 -39
  77. package/resources/orders.d.mts.map +1 -1
  78. package/resources/orders.d.ts +102 -39
  79. package/resources/orders.d.ts.map +1 -1
  80. package/resources/payouts.d.mts +82 -21
  81. package/resources/payouts.d.mts.map +1 -1
  82. package/resources/payouts.d.ts +82 -21
  83. package/resources/payouts.d.ts.map +1 -1
  84. package/resources/refunds.d.mts +1 -1
  85. package/resources/refunds.d.mts.map +1 -1
  86. package/resources/refunds.d.ts +1 -1
  87. package/resources/refunds.d.ts.map +1 -1
  88. package/resources/returns.d.mts +2 -2
  89. package/resources/returns.d.mts.map +1 -1
  90. package/resources/returns.d.ts +2 -2
  91. package/resources/returns.d.ts.map +1 -1
  92. package/resources/subaccounts.d.mts +4 -4
  93. package/resources/subaccounts.d.mts.map +1 -1
  94. package/resources/subaccounts.d.ts +4 -4
  95. package/resources/subaccounts.d.ts.map +1 -1
  96. package/resources/transactions.d.mts +2 -2
  97. package/resources/transactions.d.mts.map +1 -1
  98. package/resources/transactions.d.ts +2 -2
  99. package/resources/transactions.d.ts.map +1 -1
  100. package/resources/webhook/subscription.d.mts +12 -12
  101. package/resources/webhook/subscription.d.mts.map +1 -1
  102. package/resources/webhook/subscription.d.ts +12 -12
  103. package/resources/webhook/subscription.d.ts.map +1 -1
  104. package/src/client.ts +51 -22
  105. package/src/internal/utils/log.ts +3 -0
  106. package/src/lib/request-signing.ts +139 -0
  107. package/src/resources/banks.ts +21 -11
  108. package/src/resources/beneficiary-payouts.ts +2 -2
  109. package/src/resources/capabilities.ts +8 -1
  110. package/src/resources/checkoutsession.ts +31 -10
  111. package/src/resources/counterparties.ts +3073 -0
  112. package/src/resources/customers.ts +3509 -3509
  113. package/src/resources/deposits.ts +52 -6
  114. package/src/resources/index.ts +13 -9
  115. package/src/resources/orders.ts +222 -36
  116. package/src/resources/payouts.ts +396 -17
  117. package/src/resources/refunds.ts +1 -1
  118. package/src/resources/returns.ts +2 -2
  119. package/src/resources/subaccounts.ts +4 -4
  120. package/src/resources/transactions.ts +2 -2
  121. package/src/resources/webhook/subscription.ts +37 -12
  122. package/src/version.ts +1 -1
  123. package/version.d.mts +1 -1
  124. package/version.d.mts.map +1 -1
  125. package/version.d.ts +1 -1
  126. package/version.d.ts.map +1 -1
  127. package/version.js +1 -1
  128. package/version.js.map +1 -1
  129. package/version.mjs +1 -1
  130. package/version.mjs.map +1 -1
  131. package/resources/fx.d.mts +0 -155
  132. package/resources/fx.d.mts.map +0 -1
  133. package/resources/fx.d.ts +0 -155
  134. package/resources/fx.d.ts.map +0 -1
  135. package/resources/fx.js +0 -28
  136. package/resources/fx.js.map +0 -1
  137. package/resources/fx.mjs +0 -24
  138. package/resources/fx.mjs.map +0 -1
  139. package/src/resources/fx.ts +0 -195
@@ -47,7 +47,7 @@ export class Subscription extends APIResource {
47
47
  export interface SubscriptionCreateResponse {
48
48
  id: unknown;
49
49
 
50
- createdAt: unknown;
50
+ createdAt: string;
51
51
 
52
52
  events: Array<
53
53
  | 'test'
@@ -61,7 +61,6 @@ export interface SubscriptionCreateResponse {
61
61
  | 'refund.succeeded'
62
62
  | 'refund.failed'
63
63
  | 'payout_report_requested'
64
- | 'data_session_completed'
65
64
  | 'checkout_session_created'
66
65
  | 'checkout_session_updated'
67
66
  | 'checkout_session_expired'
@@ -82,13 +81,19 @@ export interface SubscriptionCreateResponse {
82
81
  | 'fx.initiated'
83
82
  | 'fx.succeeded'
84
83
  | 'fx.failed'
84
+ | 'counterparty.updated'
85
+ | 'counterparty.pending'
86
+ | 'counterparty.active'
87
+ | 'counterparty.rejected'
88
+ | 'counterparty.blocked'
89
+ | 'counterparty.unblocked'
85
90
  >;
86
91
 
87
92
  merchant: unknown;
88
93
 
89
94
  merchantApp: unknown;
90
95
 
91
- updatedAt: unknown;
96
+ updatedAt: string;
92
97
 
93
98
  url: string;
94
99
  }
@@ -96,7 +101,7 @@ export interface SubscriptionCreateResponse {
96
101
  export interface SubscriptionUpdateResponse {
97
102
  id: unknown;
98
103
 
99
- createdAt: unknown;
104
+ createdAt: string;
100
105
 
101
106
  events: Array<
102
107
  | 'test'
@@ -110,7 +115,6 @@ export interface SubscriptionUpdateResponse {
110
115
  | 'refund.succeeded'
111
116
  | 'refund.failed'
112
117
  | 'payout_report_requested'
113
- | 'data_session_completed'
114
118
  | 'checkout_session_created'
115
119
  | 'checkout_session_updated'
116
120
  | 'checkout_session_expired'
@@ -131,13 +135,19 @@ export interface SubscriptionUpdateResponse {
131
135
  | 'fx.initiated'
132
136
  | 'fx.succeeded'
133
137
  | 'fx.failed'
138
+ | 'counterparty.updated'
139
+ | 'counterparty.pending'
140
+ | 'counterparty.active'
141
+ | 'counterparty.rejected'
142
+ | 'counterparty.blocked'
143
+ | 'counterparty.unblocked'
134
144
  >;
135
145
 
136
146
  merchant: unknown;
137
147
 
138
148
  merchantApp: unknown;
139
149
 
140
- updatedAt: unknown;
150
+ updatedAt: string;
141
151
 
142
152
  url: string;
143
153
  }
@@ -168,7 +178,7 @@ export namespace SubscriptionListResponse {
168
178
  export interface Item {
169
179
  id: unknown;
170
180
 
171
- createdAt: unknown;
181
+ createdAt: string;
172
182
 
173
183
  events: Array<
174
184
  | 'test'
@@ -182,7 +192,6 @@ export namespace SubscriptionListResponse {
182
192
  | 'refund.succeeded'
183
193
  | 'refund.failed'
184
194
  | 'payout_report_requested'
185
- | 'data_session_completed'
186
195
  | 'checkout_session_created'
187
196
  | 'checkout_session_updated'
188
197
  | 'checkout_session_expired'
@@ -203,13 +212,19 @@ export namespace SubscriptionListResponse {
203
212
  | 'fx.initiated'
204
213
  | 'fx.succeeded'
205
214
  | 'fx.failed'
215
+ | 'counterparty.updated'
216
+ | 'counterparty.pending'
217
+ | 'counterparty.active'
218
+ | 'counterparty.rejected'
219
+ | 'counterparty.blocked'
220
+ | 'counterparty.unblocked'
206
221
  >;
207
222
 
208
223
  merchant: unknown;
209
224
 
210
225
  merchantApp: unknown;
211
226
 
212
- updatedAt: unknown;
227
+ updatedAt: string;
213
228
 
214
229
  url: string;
215
230
  }
@@ -231,7 +246,7 @@ export interface SubscriptionPingResponse {
231
246
  /**
232
247
  * The timestamp when the ping was executed
233
248
  */
234
- date: unknown;
249
+ date: string;
235
250
 
236
251
  /**
237
252
  * The response from the webhook endpoint
@@ -270,7 +285,6 @@ export interface SubscriptionCreateParams {
270
285
  | 'refund.succeeded'
271
286
  | 'refund.failed'
272
287
  | 'payout_report_requested'
273
- | 'data_session_completed'
274
288
  | 'checkout_session_created'
275
289
  | 'checkout_session_updated'
276
290
  | 'checkout_session_expired'
@@ -291,6 +305,12 @@ export interface SubscriptionCreateParams {
291
305
  | 'fx.initiated'
292
306
  | 'fx.succeeded'
293
307
  | 'fx.failed'
308
+ | 'counterparty.updated'
309
+ | 'counterparty.pending'
310
+ | 'counterparty.active'
311
+ | 'counterparty.rejected'
312
+ | 'counterparty.blocked'
313
+ | 'counterparty.unblocked'
294
314
  >;
295
315
  }
296
316
 
@@ -315,7 +335,6 @@ export interface SubscriptionUpdateParams {
315
335
  | 'refund.succeeded'
316
336
  | 'refund.failed'
317
337
  | 'payout_report_requested'
318
- | 'data_session_completed'
319
338
  | 'checkout_session_created'
320
339
  | 'checkout_session_updated'
321
340
  | 'checkout_session_expired'
@@ -336,6 +355,12 @@ export interface SubscriptionUpdateParams {
336
355
  | 'fx.initiated'
337
356
  | 'fx.succeeded'
338
357
  | 'fx.failed'
358
+ | 'counterparty.updated'
359
+ | 'counterparty.pending'
360
+ | 'counterparty.active'
361
+ | 'counterparty.rejected'
362
+ | 'counterparty.blocked'
363
+ | 'counterparty.unblocked'
339
364
  >;
340
365
 
341
366
  /**
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '2.7.0'; // x-release-please-version
1
+ export const VERSION = '2.20.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.7.0";
1
+ export declare const VERSION = "2.20.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.mts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAC"}
1
+ {"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"}
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.7.0";
1
+ export declare const VERSION = "2.20.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"}
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '2.7.0'; // x-release-please-version
4
+ exports.VERSION = '2.20.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,OAAO,CAAC,CAAC,2BAA2B"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,QAAQ,CAAC,CAAC,2BAA2B"}
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '2.7.0'; // x-release-please-version
1
+ export const VERSION = '2.20.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map
package/version.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,2BAA2B"}
1
+ {"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,2BAA2B"}
@@ -1,155 +0,0 @@
1
- import { APIResource } from "../core/resource.mjs";
2
- import { APIPromise } from "../core/api-promise.mjs";
3
- import { RequestOptions } from "../internal/request-options.mjs";
4
- export declare class Fx extends APIResource {
5
- /**
6
- * Retrieve the details of a past fx transfer using the fxId.
7
- */
8
- retrieve(body: FxRetrieveParams, options?: RequestOptions): APIPromise<FxRetrieveResponse>;
9
- /**
10
- * Execute a standalone foreign exchange transaction.
11
- */
12
- execute(body: FxExecuteParams, options?: RequestOptions): APIPromise<FxExecuteResponse>;
13
- /**
14
- * Retrieve the current exchange rate for a given currency pair. The rate is not
15
- * guaranteed for any following transactions.
16
- */
17
- retrieveRate(body: FxRetrieveRateParams, options?: RequestOptions): APIPromise<FxRetrieveRateResponse>;
18
- }
19
- export interface FxRetrieveResponse {
20
- /**
21
- * The fxId attached to the transfer.
22
- */
23
- id: string;
24
- /**
25
- * The exchange rate for the given currency pair.
26
- */
27
- rate: string;
28
- /**
29
- * The source currency code
30
- */
31
- sourceCurrency: 'EUR' | 'GBP' | 'USDC';
32
- /**
33
- * The status of the FX transaction.
34
- */
35
- status: 'initiated' | 'succeeded' | 'failed';
36
- /**
37
- * The target currency code
38
- */
39
- targetCurrency: 'EUR' | 'GBP' | 'USDC';
40
- /**
41
- * Additional metadata.
42
- */
43
- metadata?: {
44
- [key: string]: unknown;
45
- };
46
- /**
47
- * The amount of source currency to convert.
48
- */
49
- sourceAmount?: string;
50
- /**
51
- * The amount of the target currency for the given source amount.
52
- */
53
- targetAmount?: string;
54
- }
55
- export interface FxExecuteResponse {
56
- /**
57
- * The fxId attached to the transfer.
58
- */
59
- id: string;
60
- /**
61
- * The exchange rate for the given currency pair.
62
- */
63
- rate: string;
64
- /**
65
- * The source currency code
66
- */
67
- sourceCurrency: 'EUR' | 'GBP' | 'USDC';
68
- /**
69
- * The status of the FX transaction.
70
- */
71
- status: 'initiated' | 'succeeded' | 'failed';
72
- /**
73
- * The target currency code
74
- */
75
- targetCurrency: 'EUR' | 'GBP' | 'USDC';
76
- /**
77
- * Additional metadata.
78
- */
79
- metadata?: {
80
- [key: string]: unknown;
81
- };
82
- /**
83
- * The amount of source currency to convert.
84
- */
85
- sourceAmount?: string;
86
- /**
87
- * The amount of the target currency for the given source amount.
88
- */
89
- targetAmount?: string;
90
- }
91
- export interface FxRetrieveRateResponse {
92
- /**
93
- * The current exchange rate for the given currency pair.
94
- */
95
- rate: string;
96
- /**
97
- * The amount of source currency to convert. Only returned if the source amount is
98
- * provided.
99
- */
100
- sourceAmount?: string;
101
- /**
102
- * The amount of the target currency for the given source amount. Only returned if
103
- * the source amount is provided.
104
- */
105
- targetAmount?: string;
106
- }
107
- export interface FxRetrieveParams {
108
- /**
109
- * The fxId attached to the transfer.
110
- */
111
- fxId: string;
112
- }
113
- export interface FxExecuteParams {
114
- /**
115
- * The source account id.
116
- */
117
- sourceAccountId: string;
118
- /**
119
- * The amount of source currency to convert. Minimum: 10
120
- */
121
- sourceAmount: string;
122
- /**
123
- * The target account id.
124
- */
125
- targetAccountId: string;
126
- /**
127
- * Deprecated: use the Idempotency-Key request header instead.
128
- */
129
- idempotencyKey?: string;
130
- /**
131
- * Additional metadata.
132
- */
133
- metadata?: {
134
- [key: string]: unknown;
135
- };
136
- }
137
- export interface FxRetrieveRateParams {
138
- /**
139
- * The source currency code.
140
- */
141
- sourceCurrency: 'EUR' | 'GBP' | 'USDC';
142
- /**
143
- * The target currency code.
144
- */
145
- targetCurrency: 'EUR' | 'GBP' | 'USDC';
146
- /**
147
- * The amount of source currency to convert. If not provided, only the rate will be
148
- * returned. Decimal places should be separated by a dot.
149
- */
150
- sourceAmount?: string;
151
- }
152
- export declare namespace Fx {
153
- export { type FxRetrieveResponse as FxRetrieveResponse, type FxExecuteResponse as FxExecuteResponse, type FxRetrieveRateResponse as FxRetrieveRateResponse, type FxRetrieveParams as FxRetrieveParams, type FxExecuteParams as FxExecuteParams, type FxRetrieveRateParams as FxRetrieveRateParams, };
154
- }
155
- //# sourceMappingURL=fx.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fx.d.mts","sourceRoot":"","sources":["../src/resources/fx.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,O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,eAAe,EACvC,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
package/resources/fx.d.ts DELETED
@@ -1,155 +0,0 @@
1
- import { APIResource } from "../core/resource.js";
2
- import { APIPromise } from "../core/api-promise.js";
3
- import { RequestOptions } from "../internal/request-options.js";
4
- export declare class Fx extends APIResource {
5
- /**
6
- * Retrieve the details of a past fx transfer using the fxId.
7
- */
8
- retrieve(body: FxRetrieveParams, options?: RequestOptions): APIPromise<FxRetrieveResponse>;
9
- /**
10
- * Execute a standalone foreign exchange transaction.
11
- */
12
- execute(body: FxExecuteParams, options?: RequestOptions): APIPromise<FxExecuteResponse>;
13
- /**
14
- * Retrieve the current exchange rate for a given currency pair. The rate is not
15
- * guaranteed for any following transactions.
16
- */
17
- retrieveRate(body: FxRetrieveRateParams, options?: RequestOptions): APIPromise<FxRetrieveRateResponse>;
18
- }
19
- export interface FxRetrieveResponse {
20
- /**
21
- * The fxId attached to the transfer.
22
- */
23
- id: string;
24
- /**
25
- * The exchange rate for the given currency pair.
26
- */
27
- rate: string;
28
- /**
29
- * The source currency code
30
- */
31
- sourceCurrency: 'EUR' | 'GBP' | 'USDC';
32
- /**
33
- * The status of the FX transaction.
34
- */
35
- status: 'initiated' | 'succeeded' | 'failed';
36
- /**
37
- * The target currency code
38
- */
39
- targetCurrency: 'EUR' | 'GBP' | 'USDC';
40
- /**
41
- * Additional metadata.
42
- */
43
- metadata?: {
44
- [key: string]: unknown;
45
- };
46
- /**
47
- * The amount of source currency to convert.
48
- */
49
- sourceAmount?: string;
50
- /**
51
- * The amount of the target currency for the given source amount.
52
- */
53
- targetAmount?: string;
54
- }
55
- export interface FxExecuteResponse {
56
- /**
57
- * The fxId attached to the transfer.
58
- */
59
- id: string;
60
- /**
61
- * The exchange rate for the given currency pair.
62
- */
63
- rate: string;
64
- /**
65
- * The source currency code
66
- */
67
- sourceCurrency: 'EUR' | 'GBP' | 'USDC';
68
- /**
69
- * The status of the FX transaction.
70
- */
71
- status: 'initiated' | 'succeeded' | 'failed';
72
- /**
73
- * The target currency code
74
- */
75
- targetCurrency: 'EUR' | 'GBP' | 'USDC';
76
- /**
77
- * Additional metadata.
78
- */
79
- metadata?: {
80
- [key: string]: unknown;
81
- };
82
- /**
83
- * The amount of source currency to convert.
84
- */
85
- sourceAmount?: string;
86
- /**
87
- * The amount of the target currency for the given source amount.
88
- */
89
- targetAmount?: string;
90
- }
91
- export interface FxRetrieveRateResponse {
92
- /**
93
- * The current exchange rate for the given currency pair.
94
- */
95
- rate: string;
96
- /**
97
- * The amount of source currency to convert. Only returned if the source amount is
98
- * provided.
99
- */
100
- sourceAmount?: string;
101
- /**
102
- * The amount of the target currency for the given source amount. Only returned if
103
- * the source amount is provided.
104
- */
105
- targetAmount?: string;
106
- }
107
- export interface FxRetrieveParams {
108
- /**
109
- * The fxId attached to the transfer.
110
- */
111
- fxId: string;
112
- }
113
- export interface FxExecuteParams {
114
- /**
115
- * The source account id.
116
- */
117
- sourceAccountId: string;
118
- /**
119
- * The amount of source currency to convert. Minimum: 10
120
- */
121
- sourceAmount: string;
122
- /**
123
- * The target account id.
124
- */
125
- targetAccountId: string;
126
- /**
127
- * Deprecated: use the Idempotency-Key request header instead.
128
- */
129
- idempotencyKey?: string;
130
- /**
131
- * Additional metadata.
132
- */
133
- metadata?: {
134
- [key: string]: unknown;
135
- };
136
- }
137
- export interface FxRetrieveRateParams {
138
- /**
139
- * The source currency code.
140
- */
141
- sourceCurrency: 'EUR' | 'GBP' | 'USDC';
142
- /**
143
- * The target currency code.
144
- */
145
- targetCurrency: 'EUR' | 'GBP' | 'USDC';
146
- /**
147
- * The amount of source currency to convert. If not provided, only the rate will be
148
- * returned. Decimal places should be separated by a dot.
149
- */
150
- sourceAmount?: string;
151
- }
152
- export declare namespace Fx {
153
- export { type FxRetrieveResponse as FxRetrieveResponse, type FxExecuteResponse as FxExecuteResponse, type FxRetrieveRateResponse as FxRetrieveRateResponse, type FxRetrieveParams as FxRetrieveParams, type FxExecuteParams as FxExecuteParams, type FxRetrieveRateParams as FxRetrieveRateParams, };
154
- }
155
- //# sourceMappingURL=fx.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fx.d.ts","sourceRoot":"","sources":["../src/resources/fx.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D,qBAAa,EAAG,SAAQ,WAAW;IACjC;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,kBAAkB,CAAC;IAI1F;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iBAAiB,CAAC;IAIvF;;;OAGG;IACH,YAAY,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;CAGvG;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,cAAc,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;IAEvC;;OAEG;IACH,MAAM,EAAE,WAAW,GAAG,WAAW,GAAG,QAAQ,CAAC;IAE7C;;OAEG;IACH,cAAc,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;IAEvC;;OAEG;IACH,QAAQ,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAEtC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,EAAE,E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,MAAM,CAAC,OAAO,WAAW,EAAE,CAAC;IAC1B,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
package/resources/fx.js DELETED
@@ -1,28 +0,0 @@
1
- "use strict";
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Fx = void 0;
5
- const resource_1 = require("../core/resource.js");
6
- class Fx extends resource_1.APIResource {
7
- /**
8
- * Retrieve the details of a past fx transfer using the fxId.
9
- */
10
- retrieve(body, options) {
11
- return this._client.post('/api/service/fx/retrieve', { body, ...options });
12
- }
13
- /**
14
- * Execute a standalone foreign exchange transaction.
15
- */
16
- execute(body, options) {
17
- return this._client.post('/api/service/fx/execute', { body, ...options });
18
- }
19
- /**
20
- * Retrieve the current exchange rate for a given currency pair. The rate is not
21
- * guaranteed for any following transactions.
22
- */
23
- retrieveRate(body, options) {
24
- return this._client.post('/api/service/fx/retrieve-rate', { body, ...options });
25
- }
26
- }
27
- exports.Fx = Fx;
28
- //# sourceMappingURL=fx.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fx.js","sourceRoot":"","sources":["../src/resources/fx.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,EAAG,SAAQ,sBAAW;IACjC;;OAEG;IACH,QAAQ,CAAC,IAAsB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,IAAqB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;;OAGG;IACH,YAAY,CAAC,IAA0B,EAAE,OAAwB;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,+BAA+B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;CACF;AAtBD,gBAsBC"}
package/resources/fx.mjs DELETED
@@ -1,24 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../core/resource.mjs";
3
- export class Fx extends APIResource {
4
- /**
5
- * Retrieve the details of a past fx transfer using the fxId.
6
- */
7
- retrieve(body, options) {
8
- return this._client.post('/api/service/fx/retrieve', { body, ...options });
9
- }
10
- /**
11
- * Execute a standalone foreign exchange transaction.
12
- */
13
- execute(body, options) {
14
- return this._client.post('/api/service/fx/execute', { body, ...options });
15
- }
16
- /**
17
- * Retrieve the current exchange rate for a given currency pair. The rate is not
18
- * guaranteed for any following transactions.
19
- */
20
- retrieveRate(body, options) {
21
- return this._client.post('/api/service/fx/retrieve-rate', { body, ...options });
22
- }
23
- }
24
- //# sourceMappingURL=fx.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fx.mjs","sourceRoot":"","sources":["../src/resources/fx.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C,MAAM,OAAO,EAAG,SAAQ,WAAW;IACjC;;OAEG;IACH,QAAQ,CAAC,IAAsB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,IAAqB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;;OAGG;IACH,YAAY,CAAC,IAA0B,EAAE,OAAwB;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,+BAA+B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;CACF"}