@augustusbank/typescript-sdk 0.22.0 → 0.22.1
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 +19 -0
- package/client.d.mts +6 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -6
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/account-programs.d.mts +21 -16
- package/resources/account-programs.d.mts.map +1 -1
- package/resources/account-programs.d.ts +21 -16
- package/resources/account-programs.d.ts.map +1 -1
- package/resources/account-programs.js +2 -2
- package/resources/account-programs.js.map +1 -1
- package/resources/account-programs.mjs +2 -2
- package/resources/account-programs.mjs.map +1 -1
- package/resources/accounts.d.mts +21 -6
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +21 -6
- package/resources/accounts.d.ts.map +1 -1
- package/resources/accounts.js +2 -2
- package/resources/accounts.js.map +1 -1
- package/resources/accounts.mjs +2 -2
- package/resources/accounts.mjs.map +1 -1
- package/resources/counterparties.d.mts +16 -16
- package/resources/counterparties.d.mts.map +1 -1
- package/resources/counterparties.d.ts +16 -16
- package/resources/counterparties.d.ts.map +1 -1
- package/resources/deposits.d.mts +10 -0
- package/resources/deposits.d.mts.map +1 -1
- package/resources/deposits.d.ts +10 -0
- package/resources/deposits.d.ts.map +1 -1
- package/resources/events.d.mts +3 -3
- package/resources/events.d.mts.map +1 -1
- package/resources/events.d.ts +3 -3
- package/resources/events.d.ts.map +1 -1
- package/resources/index.d.mts +3 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/payouts.d.mts +22 -406
- package/resources/payouts.d.mts.map +1 -1
- package/resources/payouts.d.ts +22 -406
- package/resources/payouts.d.ts.map +1 -1
- package/resources/payouts.js +2 -4
- package/resources/payouts.js.map +1 -1
- package/resources/payouts.mjs +2 -4
- package/resources/payouts.mjs.map +1 -1
- package/resources/simulations/account-programs.d.mts +9 -75
- package/resources/simulations/account-programs.d.mts.map +1 -1
- package/resources/simulations/account-programs.d.ts +9 -75
- package/resources/simulations/account-programs.d.ts.map +1 -1
- package/resources/simulations/account-programs.js +0 -2
- package/resources/simulations/account-programs.js.map +1 -1
- package/resources/simulations/account-programs.mjs +0 -2
- package/resources/simulations/account-programs.mjs.map +1 -1
- package/resources/simulations/accounts.d.mts +9 -70
- package/resources/simulations/accounts.d.mts.map +1 -1
- package/resources/simulations/accounts.d.ts +9 -70
- package/resources/simulations/accounts.d.ts.map +1 -1
- package/resources/simulations/accounts.js +0 -1
- package/resources/simulations/accounts.js.map +1 -1
- package/resources/simulations/accounts.mjs +0 -1
- package/resources/simulations/accounts.mjs.map +1 -1
- package/resources/simulations/conversions.d.mts +54 -0
- package/resources/simulations/conversions.d.mts.map +1 -0
- package/resources/simulations/conversions.d.ts +54 -0
- package/resources/simulations/conversions.d.ts.map +1 -0
- package/resources/simulations/conversions.js +39 -0
- package/resources/simulations/conversions.js.map +1 -0
- package/resources/simulations/conversions.mjs +35 -0
- package/resources/simulations/conversions.mjs.map +1 -0
- package/resources/simulations/deposits.d.mts +14 -30
- package/resources/simulations/deposits.d.mts.map +1 -1
- package/resources/simulations/deposits.d.ts +14 -30
- package/resources/simulations/deposits.d.ts.map +1 -1
- package/resources/simulations/index.d.mts +1 -0
- package/resources/simulations/index.d.mts.map +1 -1
- package/resources/simulations/index.d.ts +1 -0
- package/resources/simulations/index.d.ts.map +1 -1
- package/resources/simulations/index.js +3 -1
- package/resources/simulations/index.js.map +1 -1
- package/resources/simulations/index.mjs +1 -0
- package/resources/simulations/index.mjs.map +1 -1
- package/resources/simulations/payouts.d.mts +4 -18
- package/resources/simulations/payouts.d.mts.map +1 -1
- package/resources/simulations/payouts.d.ts +4 -18
- package/resources/simulations/payouts.d.ts.map +1 -1
- package/resources/simulations/simulations.d.mts +4 -0
- package/resources/simulations/simulations.d.mts.map +1 -1
- package/resources/simulations/simulations.d.ts +4 -0
- package/resources/simulations/simulations.d.ts.map +1 -1
- package/resources/simulations/simulations.js +4 -0
- package/resources/simulations/simulations.js.map +1 -1
- package/resources/simulations/simulations.mjs +4 -0
- package/resources/simulations/simulations.mjs.map +1 -1
- package/resources/transactions.d.mts +60 -0
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +60 -0
- package/resources/transactions.d.ts.map +1 -1
- package/resources/webhook-subscriptions.d.mts +9 -9
- package/resources/webhook-subscriptions.d.mts.map +1 -1
- package/resources/webhook-subscriptions.d.ts +9 -9
- package/resources/webhook-subscriptions.d.ts.map +1 -1
- package/resources/webhook-subscriptions.js +1 -1
- package/resources/webhook-subscriptions.mjs +1 -1
- package/resources/webhooks.d.mts +245 -30
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +245 -30
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +16 -8
- package/src/resources/account-programs.ts +29 -18
- package/src/resources/accounts.ts +29 -6
- package/src/resources/counterparties.ts +16 -16
- package/src/resources/deposits.ts +12 -0
- package/src/resources/events.ts +18 -12
- package/src/resources/index.ts +8 -4
- package/src/resources/payouts.ts +36 -1993
- package/src/resources/simulations/account-programs.ts +10 -91
- package/src/resources/simulations/accounts.ts +10 -85
- package/src/resources/simulations/conversions.ts +70 -0
- package/src/resources/simulations/deposits.ts +27 -35
- package/src/resources/simulations/index.ts +1 -0
- package/src/resources/simulations/payouts.ts +4 -22
- package/src/resources/simulations/simulations.ts +10 -0
- package/src/resources/transactions.ts +70 -0
- package/src/resources/webhook-subscriptions.ts +49 -33
- package/src/resources/webhooks.ts +360 -36
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -15,7 +15,6 @@ export class AccountPrograms extends APIResource {
|
|
|
15
15
|
* const accountProgram =
|
|
16
16
|
* await client.simulations.accountPrograms.create({
|
|
17
17
|
* label: 'x',
|
|
18
|
-
* type: 'fbo-program',
|
|
19
18
|
* });
|
|
20
19
|
* ```
|
|
21
20
|
*/
|
|
@@ -62,7 +61,6 @@ export class AccountPrograms extends APIResource {
|
|
|
62
61
|
* {
|
|
63
62
|
* destination: {
|
|
64
63
|
* account_holder_name: 'Acme Sandbox Ltd.',
|
|
65
|
-
* bic: 'COBADEFFXXX',
|
|
66
64
|
* iban: 'DE89370400440532013000',
|
|
67
65
|
* type: 'iban',
|
|
68
66
|
* },
|
|
@@ -117,22 +115,6 @@ export interface AccountProgramCreateResponse {
|
|
|
117
115
|
*/
|
|
118
116
|
account_program_id: string;
|
|
119
117
|
|
|
120
|
-
/**
|
|
121
|
-
* Account program lifecycle event submitted to the sandbox.
|
|
122
|
-
*/
|
|
123
|
-
event: 'create' | 'freeze' | 'unfreeze' | 'close' | 'drain';
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* Payouts created by a drain event. Feed each id to
|
|
127
|
-
* `POST /v1/simulations/payouts/{id}/send` to settle. `null` for non-drain events.
|
|
128
|
-
*/
|
|
129
|
-
payout_ids: Array<string> | null;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Whether the simulation submission was successful.
|
|
133
|
-
*/
|
|
134
|
-
success: boolean;
|
|
135
|
-
|
|
136
118
|
/**
|
|
137
119
|
* Resource type discriminator.
|
|
138
120
|
*/
|
|
@@ -145,22 +127,6 @@ export interface AccountProgramCloseResponse {
|
|
|
145
127
|
*/
|
|
146
128
|
account_program_id: string;
|
|
147
129
|
|
|
148
|
-
/**
|
|
149
|
-
* Account program lifecycle event submitted to the sandbox.
|
|
150
|
-
*/
|
|
151
|
-
event: 'create' | 'freeze' | 'unfreeze' | 'close' | 'drain';
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Payouts created by a drain event. Feed each id to
|
|
155
|
-
* `POST /v1/simulations/payouts/{id}/send` to settle. `null` for non-drain events.
|
|
156
|
-
*/
|
|
157
|
-
payout_ids: Array<string> | null;
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* Whether the simulation submission was successful.
|
|
161
|
-
*/
|
|
162
|
-
success: boolean;
|
|
163
|
-
|
|
164
130
|
/**
|
|
165
131
|
* Resource type discriminator.
|
|
166
132
|
*/
|
|
@@ -174,20 +140,10 @@ export interface AccountProgramDrainResponse {
|
|
|
174
140
|
account_program_id: string;
|
|
175
141
|
|
|
176
142
|
/**
|
|
177
|
-
*
|
|
143
|
+
* Payouts created by the drain. Feed each id to
|
|
144
|
+
* `POST /v1/simulations/payouts/{id}/send` to settle.
|
|
178
145
|
*/
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* Payouts created by a drain event. Feed each id to
|
|
183
|
-
* `POST /v1/simulations/payouts/{id}/send` to settle. `null` for non-drain events.
|
|
184
|
-
*/
|
|
185
|
-
payout_ids: Array<string> | null;
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* Whether the simulation submission was successful.
|
|
189
|
-
*/
|
|
190
|
-
success: boolean;
|
|
146
|
+
payout_ids: Array<string>;
|
|
191
147
|
|
|
192
148
|
/**
|
|
193
149
|
* Resource type discriminator.
|
|
@@ -201,22 +157,6 @@ export interface AccountProgramFreezeResponse {
|
|
|
201
157
|
*/
|
|
202
158
|
account_program_id: string;
|
|
203
159
|
|
|
204
|
-
/**
|
|
205
|
-
* Account program lifecycle event submitted to the sandbox.
|
|
206
|
-
*/
|
|
207
|
-
event: 'create' | 'freeze' | 'unfreeze' | 'close' | 'drain';
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* Payouts created by a drain event. Feed each id to
|
|
211
|
-
* `POST /v1/simulations/payouts/{id}/send` to settle. `null` for non-drain events.
|
|
212
|
-
*/
|
|
213
|
-
payout_ids: Array<string> | null;
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* Whether the simulation submission was successful.
|
|
217
|
-
*/
|
|
218
|
-
success: boolean;
|
|
219
|
-
|
|
220
160
|
/**
|
|
221
161
|
* Resource type discriminator.
|
|
222
162
|
*/
|
|
@@ -229,22 +169,6 @@ export interface AccountProgramUnfreezeResponse {
|
|
|
229
169
|
*/
|
|
230
170
|
account_program_id: string;
|
|
231
171
|
|
|
232
|
-
/**
|
|
233
|
-
* Account program lifecycle event submitted to the sandbox.
|
|
234
|
-
*/
|
|
235
|
-
event: 'create' | 'freeze' | 'unfreeze' | 'close' | 'drain';
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
* Payouts created by a drain event. Feed each id to
|
|
239
|
-
* `POST /v1/simulations/payouts/{id}/send` to settle. `null` for non-drain events.
|
|
240
|
-
*/
|
|
241
|
-
payout_ids: Array<string> | null;
|
|
242
|
-
|
|
243
|
-
/**
|
|
244
|
-
* Whether the simulation submission was successful.
|
|
245
|
-
*/
|
|
246
|
-
success: boolean;
|
|
247
|
-
|
|
248
172
|
/**
|
|
249
173
|
* Resource type discriminator.
|
|
250
174
|
*/
|
|
@@ -256,11 +180,6 @@ export interface AccountProgramCreateParams {
|
|
|
256
180
|
* Human-readable label for the account program.
|
|
257
181
|
*/
|
|
258
182
|
label: string;
|
|
259
|
-
|
|
260
|
-
/**
|
|
261
|
-
* Account program type.
|
|
262
|
-
*/
|
|
263
|
-
type: 'fbo-program' | 'fbo-sponsored';
|
|
264
183
|
}
|
|
265
184
|
|
|
266
185
|
export interface AccountProgramCloseParams {
|
|
@@ -276,23 +195,18 @@ export interface AccountProgramDrainParams {
|
|
|
276
195
|
* under the program is drained.
|
|
277
196
|
*/
|
|
278
197
|
destination:
|
|
279
|
-
| AccountProgramDrainParams.
|
|
198
|
+
| AccountProgramDrainParams.IbanFinancialAddressRequest
|
|
280
199
|
| AccountProgramDrainParams.SortCodeFinancialAddress
|
|
281
200
|
| AccountProgramDrainParams.AbaFinancialAddress;
|
|
282
201
|
}
|
|
283
202
|
|
|
284
203
|
export namespace AccountProgramDrainParams {
|
|
285
|
-
export interface
|
|
204
|
+
export interface IbanFinancialAddressRequest {
|
|
286
205
|
/**
|
|
287
206
|
* Name of the account holder.
|
|
288
207
|
*/
|
|
289
208
|
account_holder_name: string;
|
|
290
209
|
|
|
291
|
-
/**
|
|
292
|
-
* Bank Identifier Code, or null if not provided.
|
|
293
|
-
*/
|
|
294
|
-
bic: string | null;
|
|
295
|
-
|
|
296
210
|
/**
|
|
297
211
|
* International Bank Account Number.
|
|
298
212
|
*/
|
|
@@ -302,6 +216,11 @@ export namespace AccountProgramDrainParams {
|
|
|
302
216
|
* Discriminator for IBAN financial address.
|
|
303
217
|
*/
|
|
304
218
|
type: 'iban';
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Bank Identifier Code. Optional; omit or send null if not provided.
|
|
222
|
+
*/
|
|
223
|
+
bic?: string | null;
|
|
305
224
|
}
|
|
306
225
|
|
|
307
226
|
export interface SortCodeFinancialAddress {
|
|
@@ -50,7 +50,6 @@ export class Accounts extends APIResource {
|
|
|
50
50
|
* {
|
|
51
51
|
* destination: {
|
|
52
52
|
* account_holder_name: 'Acme Sandbox Ltd.',
|
|
53
|
-
* bic: 'COBADEFFXXX',
|
|
54
53
|
* iban: 'DE89370400440532013000',
|
|
55
54
|
* type: 'iban',
|
|
56
55
|
* },
|
|
@@ -99,22 +98,6 @@ export interface AccountCreateResponse {
|
|
|
99
98
|
*/
|
|
100
99
|
account_id: string;
|
|
101
100
|
|
|
102
|
-
/**
|
|
103
|
-
* Account lifecycle event submitted to the sandbox.
|
|
104
|
-
*/
|
|
105
|
-
event: 'create' | 'freeze' | 'unfreeze' | 'close' | 'drain';
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Payout created by a drain event. Feed to
|
|
109
|
-
* `POST /v1/simulations/payouts/{id}/send` to settle. `null` for non-drain events.
|
|
110
|
-
*/
|
|
111
|
-
payout_id: string | null;
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Whether the simulation submission was successful.
|
|
115
|
-
*/
|
|
116
|
-
success: boolean;
|
|
117
|
-
|
|
118
101
|
/**
|
|
119
102
|
* Resource type discriminator.
|
|
120
103
|
*/
|
|
@@ -127,22 +110,6 @@ export interface AccountCloseResponse {
|
|
|
127
110
|
*/
|
|
128
111
|
account_id: string;
|
|
129
112
|
|
|
130
|
-
/**
|
|
131
|
-
* Account lifecycle event submitted to the sandbox.
|
|
132
|
-
*/
|
|
133
|
-
event: 'create' | 'freeze' | 'unfreeze' | 'close' | 'drain';
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* Payout created by a drain event. Feed to
|
|
137
|
-
* `POST /v1/simulations/payouts/{id}/send` to settle. `null` for non-drain events.
|
|
138
|
-
*/
|
|
139
|
-
payout_id: string | null;
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Whether the simulation submission was successful.
|
|
143
|
-
*/
|
|
144
|
-
success: boolean;
|
|
145
|
-
|
|
146
113
|
/**
|
|
147
114
|
* Resource type discriminator.
|
|
148
115
|
*/
|
|
@@ -156,20 +123,10 @@ export interface AccountDrainResponse {
|
|
|
156
123
|
account_id: string;
|
|
157
124
|
|
|
158
125
|
/**
|
|
159
|
-
*
|
|
160
|
-
|
|
161
|
-
event: 'create' | 'freeze' | 'unfreeze' | 'close' | 'drain';
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Payout created by a drain event. Feed to
|
|
165
|
-
* `POST /v1/simulations/payouts/{id}/send` to settle. `null` for non-drain events.
|
|
166
|
-
*/
|
|
167
|
-
payout_id: string | null;
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Whether the simulation submission was successful.
|
|
126
|
+
* Payout created by the drain. Feed to `POST /v1/simulations/payouts/{id}/send` to
|
|
127
|
+
* settle.
|
|
171
128
|
*/
|
|
172
|
-
|
|
129
|
+
payout_id: string;
|
|
173
130
|
|
|
174
131
|
/**
|
|
175
132
|
* Resource type discriminator.
|
|
@@ -183,22 +140,6 @@ export interface AccountFreezeResponse {
|
|
|
183
140
|
*/
|
|
184
141
|
account_id: string;
|
|
185
142
|
|
|
186
|
-
/**
|
|
187
|
-
* Account lifecycle event submitted to the sandbox.
|
|
188
|
-
*/
|
|
189
|
-
event: 'create' | 'freeze' | 'unfreeze' | 'close' | 'drain';
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
* Payout created by a drain event. Feed to
|
|
193
|
-
* `POST /v1/simulations/payouts/{id}/send` to settle. `null` for non-drain events.
|
|
194
|
-
*/
|
|
195
|
-
payout_id: string | null;
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* Whether the simulation submission was successful.
|
|
199
|
-
*/
|
|
200
|
-
success: boolean;
|
|
201
|
-
|
|
202
143
|
/**
|
|
203
144
|
* Resource type discriminator.
|
|
204
145
|
*/
|
|
@@ -211,22 +152,6 @@ export interface AccountUnfreezeResponse {
|
|
|
211
152
|
*/
|
|
212
153
|
account_id: string;
|
|
213
154
|
|
|
214
|
-
/**
|
|
215
|
-
* Account lifecycle event submitted to the sandbox.
|
|
216
|
-
*/
|
|
217
|
-
event: 'create' | 'freeze' | 'unfreeze' | 'close' | 'drain';
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* Payout created by a drain event. Feed to
|
|
221
|
-
* `POST /v1/simulations/payouts/{id}/send` to settle. `null` for non-drain events.
|
|
222
|
-
*/
|
|
223
|
-
payout_id: string | null;
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Whether the simulation submission was successful.
|
|
227
|
-
*/
|
|
228
|
-
success: boolean;
|
|
229
|
-
|
|
230
155
|
/**
|
|
231
156
|
* Resource type discriminator.
|
|
232
157
|
*/
|
|
@@ -253,23 +178,18 @@ export interface AccountDrainParams {
|
|
|
253
178
|
* drained.
|
|
254
179
|
*/
|
|
255
180
|
destination:
|
|
256
|
-
| AccountDrainParams.
|
|
181
|
+
| AccountDrainParams.IbanFinancialAddressRequest
|
|
257
182
|
| AccountDrainParams.SortCodeFinancialAddress
|
|
258
183
|
| AccountDrainParams.AbaFinancialAddress;
|
|
259
184
|
}
|
|
260
185
|
|
|
261
186
|
export namespace AccountDrainParams {
|
|
262
|
-
export interface
|
|
187
|
+
export interface IbanFinancialAddressRequest {
|
|
263
188
|
/**
|
|
264
189
|
* Name of the account holder.
|
|
265
190
|
*/
|
|
266
191
|
account_holder_name: string;
|
|
267
192
|
|
|
268
|
-
/**
|
|
269
|
-
* Bank Identifier Code, or null if not provided.
|
|
270
|
-
*/
|
|
271
|
-
bic: string | null;
|
|
272
|
-
|
|
273
193
|
/**
|
|
274
194
|
* International Bank Account Number.
|
|
275
195
|
*/
|
|
@@ -279,6 +199,11 @@ export namespace AccountDrainParams {
|
|
|
279
199
|
* Discriminator for IBAN financial address.
|
|
280
200
|
*/
|
|
281
201
|
type: 'iban';
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Bank Identifier Code. Optional; omit or send null if not provided.
|
|
205
|
+
*/
|
|
206
|
+
bic?: string | null;
|
|
282
207
|
}
|
|
283
208
|
|
|
284
209
|
export interface SortCodeFinancialAddress {
|
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
import { path } from '../../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class Conversions extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Releases a controlled (sandbox) conversion paused at its first step so it runs
|
|
11
|
+
* to completion normally. This endpoint is unavailable in live production.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const response =
|
|
16
|
+
* await client.simulations.conversions.complete(
|
|
17
|
+
* '550e8400-e29b-41d4-a716-446655440006',
|
|
18
|
+
* );
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
complete(id: string, options?: RequestOptions): APIPromise<ConversionCompleteResponse> {
|
|
22
|
+
return this._client.post(path`/v1/simulations/conversions/${id}/complete`, options);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Fails a controlled (sandbox) conversion paused at its first step, before any
|
|
27
|
+
* funds move. This endpoint is unavailable in live production.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const response = await client.simulations.conversions.fail(
|
|
32
|
+
* '550e8400-e29b-41d4-a716-446655440006',
|
|
33
|
+
* );
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
fail(id: string, options?: RequestOptions): APIPromise<ConversionFailResponse> {
|
|
37
|
+
return this._client.post(path`/v1/simulations/conversions/${id}/fail`, options);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface ConversionCompleteResponse {
|
|
42
|
+
/**
|
|
43
|
+
* Conversion whose execution is being simulated.
|
|
44
|
+
*/
|
|
45
|
+
conversion_id: string;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Resource type discriminator.
|
|
49
|
+
*/
|
|
50
|
+
type: 'conversion_simulation';
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface ConversionFailResponse {
|
|
54
|
+
/**
|
|
55
|
+
* Conversion whose execution is being simulated.
|
|
56
|
+
*/
|
|
57
|
+
conversion_id: string;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Resource type discriminator.
|
|
61
|
+
*/
|
|
62
|
+
type: 'conversion_simulation';
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export declare namespace Conversions {
|
|
66
|
+
export {
|
|
67
|
+
type ConversionCompleteResponse as ConversionCompleteResponse,
|
|
68
|
+
type ConversionFailResponse as ConversionFailResponse,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
@@ -29,36 +29,10 @@ export interface DepositCreateResponse {
|
|
|
29
29
|
*/
|
|
30
30
|
account_id: string;
|
|
31
31
|
|
|
32
|
-
/**
|
|
33
|
-
* Simulated amount as a decimal string.
|
|
34
|
-
*/
|
|
35
|
-
amount: string;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Currency of the receiving account.
|
|
39
|
-
*/
|
|
40
|
-
currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Payment rail the simulated deposit arrived on, or null when not known.
|
|
44
|
-
*/
|
|
45
|
-
rail: 'sepa' | 'sepa_instant' | 'faster_payments' | 'ach' | 'fedwire' | 'swift' | null;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Whether the simulation submission was successful.
|
|
49
|
-
*/
|
|
50
|
-
success: boolean;
|
|
51
|
-
|
|
52
32
|
/**
|
|
53
33
|
* Resource type discriminator.
|
|
54
34
|
*/
|
|
55
35
|
type: 'deposit_simulation';
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* ISO 20022 unstructured remittance information (<RmtInf>/<Ustrd>), or null when
|
|
59
|
-
* omitted.
|
|
60
|
-
*/
|
|
61
|
-
unstructured_remittance_information: string | null;
|
|
62
36
|
}
|
|
63
37
|
|
|
64
38
|
export interface DepositCreateParams {
|
|
@@ -78,14 +52,32 @@ export interface DepositCreateParams {
|
|
|
78
52
|
currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
|
|
79
53
|
|
|
80
54
|
/**
|
|
81
|
-
* Sender of the simulated deposit.
|
|
55
|
+
* Sender of the simulated deposit. Mutually exclusive with `counterparty_id`.
|
|
82
56
|
*/
|
|
83
57
|
counterparty?: DepositCreateParams.Counterparty;
|
|
84
58
|
|
|
59
|
+
/**
|
|
60
|
+
* ID of an existing counterparty to use as the sender of the simulated deposit.
|
|
61
|
+
* Mutually exclusive with `counterparty`.
|
|
62
|
+
*/
|
|
63
|
+
counterparty_id?: string;
|
|
64
|
+
|
|
85
65
|
/**
|
|
86
66
|
* Payment rail the simulated deposit arrives on.
|
|
87
67
|
*/
|
|
88
|
-
rail?:
|
|
68
|
+
rail?:
|
|
69
|
+
| 'sepa'
|
|
70
|
+
| 'sepa_instant'
|
|
71
|
+
| 'faster_payments'
|
|
72
|
+
| 'swift'
|
|
73
|
+
| 'ach'
|
|
74
|
+
| 'fedwire'
|
|
75
|
+
| 'ethereum'
|
|
76
|
+
| 'ethereum_sepolia'
|
|
77
|
+
| 'solana'
|
|
78
|
+
| 'solana_devnet'
|
|
79
|
+
| 'polygon'
|
|
80
|
+
| 'polygon_amoy';
|
|
89
81
|
|
|
90
82
|
/**
|
|
91
83
|
* Unstructured remittance information attached to the transfer. Not all rails
|
|
@@ -96,7 +88,7 @@ export interface DepositCreateParams {
|
|
|
96
88
|
|
|
97
89
|
export namespace DepositCreateParams {
|
|
98
90
|
/**
|
|
99
|
-
* Sender of the simulated deposit.
|
|
91
|
+
* Sender of the simulated deposit. Mutually exclusive with `counterparty_id`.
|
|
100
92
|
*/
|
|
101
93
|
export interface Counterparty {
|
|
102
94
|
/**
|
|
@@ -505,19 +497,19 @@ export namespace DepositCreateParams {
|
|
|
505
497
|
line_1: string;
|
|
506
498
|
|
|
507
499
|
/**
|
|
508
|
-
*
|
|
500
|
+
* Postal or ZIP code.
|
|
509
501
|
*/
|
|
510
|
-
|
|
502
|
+
postal_code: string;
|
|
511
503
|
|
|
512
504
|
/**
|
|
513
|
-
*
|
|
505
|
+
* Secondary street address. Optional; omit or send null if not recorded.
|
|
514
506
|
*/
|
|
515
|
-
|
|
507
|
+
line_2?: string | null;
|
|
516
508
|
|
|
517
509
|
/**
|
|
518
|
-
* State, province, or region
|
|
510
|
+
* State, province, or region. Optional; omit or send null if not recorded.
|
|
519
511
|
*/
|
|
520
|
-
state
|
|
512
|
+
state?: string | null;
|
|
521
513
|
}
|
|
522
514
|
}
|
|
523
515
|
}
|
|
@@ -22,6 +22,7 @@ export {
|
|
|
22
22
|
type AccountCloseParams,
|
|
23
23
|
type AccountDrainParams,
|
|
24
24
|
} from './accounts';
|
|
25
|
+
export { Conversions, type ConversionCompleteResponse, type ConversionFailResponse } from './conversions';
|
|
25
26
|
export { Deposits, type DepositCreateResponse, type DepositCreateParams } from './deposits';
|
|
26
27
|
export {
|
|
27
28
|
Payouts,
|
|
@@ -39,21 +39,11 @@ export class Payouts extends APIResource {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
export interface PayoutRejectResponse {
|
|
42
|
-
/**
|
|
43
|
-
* Payout lifecycle event submitted to the sandbox provider.
|
|
44
|
-
*/
|
|
45
|
-
event: 'send' | 'reject' | 'return';
|
|
46
|
-
|
|
47
42
|
/**
|
|
48
43
|
* Payout whose lifecycle is being simulated.
|
|
49
44
|
*/
|
|
50
45
|
payout_id: string;
|
|
51
46
|
|
|
52
|
-
/**
|
|
53
|
-
* Whether the simulation submission was successful.
|
|
54
|
-
*/
|
|
55
|
-
success: boolean;
|
|
56
|
-
|
|
57
47
|
/**
|
|
58
48
|
* Resource type discriminator.
|
|
59
49
|
*/
|
|
@@ -61,21 +51,11 @@ export interface PayoutRejectResponse {
|
|
|
61
51
|
}
|
|
62
52
|
|
|
63
53
|
export interface PayoutSendResponse {
|
|
64
|
-
/**
|
|
65
|
-
* Payout lifecycle event submitted to the sandbox provider.
|
|
66
|
-
*/
|
|
67
|
-
event: 'send' | 'reject' | 'return';
|
|
68
|
-
|
|
69
54
|
/**
|
|
70
55
|
* Payout whose lifecycle is being simulated.
|
|
71
56
|
*/
|
|
72
57
|
payout_id: string;
|
|
73
58
|
|
|
74
|
-
/**
|
|
75
|
-
* Whether the simulation submission was successful.
|
|
76
|
-
*/
|
|
77
|
-
success: boolean;
|
|
78
|
-
|
|
79
59
|
/**
|
|
80
60
|
* Resource type discriminator.
|
|
81
61
|
*/
|
|
@@ -84,9 +64,11 @@ export interface PayoutSendResponse {
|
|
|
84
64
|
|
|
85
65
|
export interface PayoutRejectParams {
|
|
86
66
|
/**
|
|
87
|
-
* Reason the sandbox provider rejects the payout.
|
|
67
|
+
* Reason the sandbox provider rejects the payout. Use `invalid_routing_number` for
|
|
68
|
+
* domestic rails and `invalid_account_format` for a SWIFT correspondent rejecting
|
|
69
|
+
* on the beneficiary details.
|
|
88
70
|
*/
|
|
89
|
-
reason: 'invalid_routing_number';
|
|
71
|
+
reason: 'invalid_routing_number' | 'invalid_account_format';
|
|
90
72
|
}
|
|
91
73
|
|
|
92
74
|
export declare namespace Payouts {
|
|
@@ -25,6 +25,8 @@ import {
|
|
|
25
25
|
AccountUnfreezeResponse,
|
|
26
26
|
Accounts,
|
|
27
27
|
} from './accounts';
|
|
28
|
+
import * as ConversionsAPI from './conversions';
|
|
29
|
+
import { ConversionCompleteResponse, ConversionFailResponse, Conversions } from './conversions';
|
|
28
30
|
import * as DepositsAPI from './deposits';
|
|
29
31
|
import { DepositCreateParams, DepositCreateResponse, Deposits } from './deposits';
|
|
30
32
|
import * as PayoutsAPI from './payouts';
|
|
@@ -32,12 +34,14 @@ import { PayoutRejectParams, PayoutRejectResponse, PayoutSendResponse, Payouts }
|
|
|
32
34
|
|
|
33
35
|
export class Simulations extends APIResource {
|
|
34
36
|
deposits: DepositsAPI.Deposits = new DepositsAPI.Deposits(this._client);
|
|
37
|
+
conversions: ConversionsAPI.Conversions = new ConversionsAPI.Conversions(this._client);
|
|
35
38
|
payouts: PayoutsAPI.Payouts = new PayoutsAPI.Payouts(this._client);
|
|
36
39
|
accountPrograms: AccountProgramsAPI.AccountPrograms = new AccountProgramsAPI.AccountPrograms(this._client);
|
|
37
40
|
accounts: AccountsAPI.Accounts = new AccountsAPI.Accounts(this._client);
|
|
38
41
|
}
|
|
39
42
|
|
|
40
43
|
Simulations.Deposits = Deposits;
|
|
44
|
+
Simulations.Conversions = Conversions;
|
|
41
45
|
Simulations.Payouts = Payouts;
|
|
42
46
|
Simulations.AccountPrograms = AccountPrograms;
|
|
43
47
|
Simulations.Accounts = Accounts;
|
|
@@ -49,6 +53,12 @@ export declare namespace Simulations {
|
|
|
49
53
|
type DepositCreateParams as DepositCreateParams,
|
|
50
54
|
};
|
|
51
55
|
|
|
56
|
+
export {
|
|
57
|
+
Conversions as Conversions,
|
|
58
|
+
type ConversionCompleteResponse as ConversionCompleteResponse,
|
|
59
|
+
type ConversionFailResponse as ConversionFailResponse,
|
|
60
|
+
};
|
|
61
|
+
|
|
52
62
|
export {
|
|
53
63
|
Payouts as Payouts,
|
|
54
64
|
type PayoutRejectResponse as PayoutRejectResponse,
|