@naturalpay/sdk 0.3.0 → 0.4.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 +13 -0
- package/client.d.mts +22 -10
- package/client.d.mts.map +1 -1
- package/client.d.ts +22 -10
- package/client.d.ts.map +1 -1
- package/client.js +14 -2
- package/client.js.map +1 -1
- package/client.mjs +15 -3
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/api-keys.d.mts +16 -2
- package/resources/api-keys.d.mts.map +1 -1
- package/resources/api-keys.d.ts +16 -2
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/api-keys.js +7 -4
- package/resources/api-keys.js.map +1 -1
- package/resources/api-keys.mjs +7 -4
- package/resources/api-keys.mjs.map +1 -1
- package/resources/escalations.d.mts +1124 -0
- package/resources/escalations.d.mts.map +1 -0
- package/resources/escalations.d.ts +1124 -0
- package/resources/escalations.d.ts.map +1 -0
- package/resources/escalations.js +110 -0
- package/resources/escalations.js.map +1 -0
- package/resources/escalations.mjs +106 -0
- package/resources/escalations.mjs.map +1 -0
- package/resources/index.d.mts +6 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +6 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -1
- package/resources/index.mjs.map +1 -1
- package/resources/invitations.d.mts +16 -7
- package/resources/invitations.d.mts.map +1 -1
- package/resources/invitations.d.ts +16 -7
- package/resources/invitations.d.ts.map +1 -1
- package/resources/invitations.js +6 -4
- package/resources/invitations.js.map +1 -1
- package/resources/invitations.mjs +6 -4
- package/resources/invitations.mjs.map +1 -1
- package/resources/parties.d.mts +53 -26
- package/resources/parties.d.mts.map +1 -1
- package/resources/parties.d.ts +53 -26
- package/resources/parties.d.ts.map +1 -1
- package/resources/parties.js +27 -1
- package/resources/parties.js.map +1 -1
- package/resources/parties.mjs +27 -1
- package/resources/parties.mjs.map +1 -1
- package/resources/payment-requests.d.mts +738 -33
- package/resources/payment-requests.d.mts.map +1 -1
- package/resources/payment-requests.d.ts +738 -33
- package/resources/payment-requests.d.ts.map +1 -1
- package/resources/payment-requests.js +82 -1
- package/resources/payment-requests.js.map +1 -1
- package/resources/payment-requests.mjs +82 -1
- package/resources/payment-requests.mjs.map +1 -1
- package/resources/payments.d.mts +390 -24
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +390 -24
- package/resources/payments.d.ts.map +1 -1
- package/resources/payments.js +53 -3
- package/resources/payments.js.map +1 -1
- package/resources/payments.mjs +53 -3
- package/resources/payments.mjs.map +1 -1
- package/resources/transactions.d.mts +50 -118
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +50 -118
- package/resources/transactions.d.ts.map +1 -1
- package/resources/transactions.js +2 -2
- package/resources/transactions.mjs +2 -2
- package/resources/transfers.d.mts +1030 -0
- package/resources/transfers.d.mts.map +1 -0
- package/resources/transfers.d.ts +1030 -0
- package/resources/transfers.d.ts.map +1 -0
- package/resources/transfers.js +114 -0
- package/resources/transfers.js.map +1 -0
- package/resources/transfers.mjs +110 -0
- package/resources/transfers.mjs.map +1 -0
- package/resources/wallet.d.mts +1 -189
- package/resources/wallet.d.mts.map +1 -1
- package/resources/wallet.d.ts +1 -189
- package/resources/wallet.d.ts.map +1 -1
- package/resources/wallet.js +0 -66
- package/resources/wallet.js.map +1 -1
- package/resources/wallet.mjs +0 -66
- package/resources/wallet.mjs.map +1 -1
- package/resources/webhooks.d.mts +7 -7
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +7 -7
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +87 -11
- package/src/resources/api-keys.ts +26 -4
- package/src/resources/escalations.ts +1422 -0
- package/src/resources/index.ts +39 -5
- package/src/resources/invitations.ts +26 -10
- package/src/resources/parties.ts +85 -30
- package/src/resources/payment-requests.ts +949 -58
- package/src/resources/payments.ts +518 -23
- package/src/resources/transactions.ts +50 -136
- package/src/resources/transfers.ts +1338 -0
- package/src/resources/wallet.ts +0 -268
- package/src/resources/webhooks.ts +7 -0
- 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
|
@@ -0,0 +1,1030 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
+
/**
|
|
5
|
+
* Deposit and withdrawal operations
|
|
6
|
+
*/
|
|
7
|
+
export declare class Transfers extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* List deposits and withdrawals for the authenticated party.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const transfers = await client.transfers.list();
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
list(params?: TransferListParams | null | undefined, options?: RequestOptions): APIPromise<TransferListResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Get a deposit or withdrawal by ID.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const transfer = await client.transfers.get(
|
|
23
|
+
* 'trf_ecc2efdd09bd231a9ad9bd2aada37aa7',
|
|
24
|
+
* );
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
get(transferID: string, params?: TransferGetParams | null | undefined, options?: RequestOptions): APIPromise<TransferGetResponse>;
|
|
28
|
+
/**
|
|
29
|
+
* Initiate a wallet deposit.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const response = await client.transfers.initiateDeposit({
|
|
34
|
+
* amount: 1,
|
|
35
|
+
* externalAccountId: 'eac_ecc2efdd09bd231a9ad9bd2aada37aa7',
|
|
36
|
+
* 'Idempotency-Key': 'Idempotency-Key',
|
|
37
|
+
* });
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
initiateDeposit(params: TransferInitiateDepositParams, options?: RequestOptions): APIPromise<TransferInitiateDepositResponse>;
|
|
41
|
+
/**
|
|
42
|
+
* Initiate a wallet withdrawal.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const response = await client.transfers.initiateWithdrawal({
|
|
47
|
+
* amount: 1,
|
|
48
|
+
* externalAccountId: 'eac_ecc2efdd09bd231a9ad9bd2aada37aa7',
|
|
49
|
+
* 'Idempotency-Key': 'Idempotency-Key',
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
initiateWithdrawal(params: TransferInitiateWithdrawalParams, options?: RequestOptions): APIPromise<TransferInitiateWithdrawalResponse>;
|
|
54
|
+
}
|
|
55
|
+
export interface TransferListResponse {
|
|
56
|
+
data: Array<TransferListResponse.Data>;
|
|
57
|
+
meta: TransferListResponse.Meta;
|
|
58
|
+
}
|
|
59
|
+
export declare namespace TransferListResponse {
|
|
60
|
+
interface Data {
|
|
61
|
+
id: string;
|
|
62
|
+
/**
|
|
63
|
+
* Resource attributes
|
|
64
|
+
*/
|
|
65
|
+
attributes: Data.Attributes;
|
|
66
|
+
/**
|
|
67
|
+
* Resource relationships
|
|
68
|
+
*/
|
|
69
|
+
relationships: Data.Relationships;
|
|
70
|
+
type: string;
|
|
71
|
+
}
|
|
72
|
+
namespace Data {
|
|
73
|
+
/**
|
|
74
|
+
* Resource attributes
|
|
75
|
+
*/
|
|
76
|
+
interface Attributes {
|
|
77
|
+
/**
|
|
78
|
+
* Amount in cents
|
|
79
|
+
*/
|
|
80
|
+
amount: number;
|
|
81
|
+
/**
|
|
82
|
+
* When this transfer was created
|
|
83
|
+
*/
|
|
84
|
+
createdAt: string;
|
|
85
|
+
/**
|
|
86
|
+
* Currency code
|
|
87
|
+
*/
|
|
88
|
+
currency: string;
|
|
89
|
+
/**
|
|
90
|
+
* Transfer description
|
|
91
|
+
*/
|
|
92
|
+
description: string | null;
|
|
93
|
+
/**
|
|
94
|
+
* Expected availability time, when known
|
|
95
|
+
*/
|
|
96
|
+
expectedAvailableAt: string | null;
|
|
97
|
+
/**
|
|
98
|
+
* Masked external account display
|
|
99
|
+
*/
|
|
100
|
+
externalAccountDisplayMask: string | null;
|
|
101
|
+
/**
|
|
102
|
+
* Failure details when this transfer failed.
|
|
103
|
+
*/
|
|
104
|
+
failure: Attributes.Failure | null;
|
|
105
|
+
/**
|
|
106
|
+
* Return details when this transfer was returned.
|
|
107
|
+
*/
|
|
108
|
+
return: Attributes.Return | null;
|
|
109
|
+
/**
|
|
110
|
+
* When this transfer settled
|
|
111
|
+
*/
|
|
112
|
+
settledAt: string | null;
|
|
113
|
+
/**
|
|
114
|
+
* Transfer status
|
|
115
|
+
*/
|
|
116
|
+
status: 'CREATED' | 'APPROVAL_DENIED' | 'PROCESSING' | 'IN_REVIEW' | 'COMPLETED' | 'FAILED' | 'RETURNED' | 'CANCELLED';
|
|
117
|
+
/**
|
|
118
|
+
* When this transfer was submitted
|
|
119
|
+
*/
|
|
120
|
+
submittedAt: string | null;
|
|
121
|
+
/**
|
|
122
|
+
* Transfer type
|
|
123
|
+
*/
|
|
124
|
+
type: 'deposit' | 'withdrawal';
|
|
125
|
+
/**
|
|
126
|
+
* When this transfer was last updated
|
|
127
|
+
*/
|
|
128
|
+
updatedAt: string | null;
|
|
129
|
+
}
|
|
130
|
+
namespace Attributes {
|
|
131
|
+
/**
|
|
132
|
+
* Failure details when this transfer failed.
|
|
133
|
+
*/
|
|
134
|
+
interface Failure {
|
|
135
|
+
/**
|
|
136
|
+
* Failure code, when available
|
|
137
|
+
*/
|
|
138
|
+
code: string | null;
|
|
139
|
+
/**
|
|
140
|
+
* Failure reason, when available
|
|
141
|
+
*/
|
|
142
|
+
reason: string | null;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Return details when this transfer was returned.
|
|
146
|
+
*/
|
|
147
|
+
interface Return {
|
|
148
|
+
/**
|
|
149
|
+
* Return code, when available
|
|
150
|
+
*/
|
|
151
|
+
code: string | null;
|
|
152
|
+
/**
|
|
153
|
+
* Return reason, when available
|
|
154
|
+
*/
|
|
155
|
+
reason: string | null;
|
|
156
|
+
/**
|
|
157
|
+
* When this transfer returned
|
|
158
|
+
*/
|
|
159
|
+
returnedAt: string | null;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Resource relationships
|
|
164
|
+
*/
|
|
165
|
+
interface Relationships {
|
|
166
|
+
/**
|
|
167
|
+
* External account used for this transfer, when available.
|
|
168
|
+
*/
|
|
169
|
+
externalAccount: Relationships.ExternalAccount;
|
|
170
|
+
/**
|
|
171
|
+
* Party that owns the transfer
|
|
172
|
+
*/
|
|
173
|
+
party: Relationships.Party;
|
|
174
|
+
/**
|
|
175
|
+
* Primary transaction row for this transfer, when available.
|
|
176
|
+
*/
|
|
177
|
+
transaction: Relationships.Transaction;
|
|
178
|
+
/**
|
|
179
|
+
* Wallet for this transfer
|
|
180
|
+
*/
|
|
181
|
+
wallet: Relationships.Wallet;
|
|
182
|
+
}
|
|
183
|
+
namespace Relationships {
|
|
184
|
+
/**
|
|
185
|
+
* External account used for this transfer, when available.
|
|
186
|
+
*/
|
|
187
|
+
interface ExternalAccount {
|
|
188
|
+
/**
|
|
189
|
+
* Related resource identifier
|
|
190
|
+
*/
|
|
191
|
+
data: ExternalAccount.Data | null;
|
|
192
|
+
}
|
|
193
|
+
namespace ExternalAccount {
|
|
194
|
+
/**
|
|
195
|
+
* Related resource identifier
|
|
196
|
+
*/
|
|
197
|
+
interface Data {
|
|
198
|
+
id: string;
|
|
199
|
+
/**
|
|
200
|
+
* Resource type
|
|
201
|
+
*/
|
|
202
|
+
type: string;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Party that owns the transfer
|
|
207
|
+
*/
|
|
208
|
+
interface Party {
|
|
209
|
+
/**
|
|
210
|
+
* Related resource identifier
|
|
211
|
+
*/
|
|
212
|
+
data: Party.Data;
|
|
213
|
+
}
|
|
214
|
+
namespace Party {
|
|
215
|
+
/**
|
|
216
|
+
* Related resource identifier
|
|
217
|
+
*/
|
|
218
|
+
interface Data {
|
|
219
|
+
id: string;
|
|
220
|
+
/**
|
|
221
|
+
* Resource type
|
|
222
|
+
*/
|
|
223
|
+
type: string;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Primary transaction row for this transfer, when available.
|
|
228
|
+
*/
|
|
229
|
+
interface Transaction {
|
|
230
|
+
/**
|
|
231
|
+
* Related resource identifier
|
|
232
|
+
*/
|
|
233
|
+
data: Transaction.Data | null;
|
|
234
|
+
}
|
|
235
|
+
namespace Transaction {
|
|
236
|
+
/**
|
|
237
|
+
* Related resource identifier
|
|
238
|
+
*/
|
|
239
|
+
interface Data {
|
|
240
|
+
id: string;
|
|
241
|
+
/**
|
|
242
|
+
* Resource type
|
|
243
|
+
*/
|
|
244
|
+
type: string;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Wallet for this transfer
|
|
249
|
+
*/
|
|
250
|
+
interface Wallet {
|
|
251
|
+
/**
|
|
252
|
+
* Related resource identifier
|
|
253
|
+
*/
|
|
254
|
+
data: Wallet.Data;
|
|
255
|
+
}
|
|
256
|
+
namespace Wallet {
|
|
257
|
+
/**
|
|
258
|
+
* Related resource identifier
|
|
259
|
+
*/
|
|
260
|
+
interface Data {
|
|
261
|
+
id: string;
|
|
262
|
+
/**
|
|
263
|
+
* Resource type
|
|
264
|
+
*/
|
|
265
|
+
type: string;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
interface Meta {
|
|
271
|
+
pagination: Meta.Pagination;
|
|
272
|
+
}
|
|
273
|
+
namespace Meta {
|
|
274
|
+
interface Pagination {
|
|
275
|
+
hasMore: boolean;
|
|
276
|
+
nextCursor: string | null;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
export interface TransferGetResponse {
|
|
281
|
+
data: TransferGetResponse.Data;
|
|
282
|
+
}
|
|
283
|
+
export declare namespace TransferGetResponse {
|
|
284
|
+
interface Data {
|
|
285
|
+
id: string;
|
|
286
|
+
/**
|
|
287
|
+
* Resource attributes
|
|
288
|
+
*/
|
|
289
|
+
attributes: Data.Attributes;
|
|
290
|
+
/**
|
|
291
|
+
* Resource relationships
|
|
292
|
+
*/
|
|
293
|
+
relationships: Data.Relationships;
|
|
294
|
+
type: string;
|
|
295
|
+
}
|
|
296
|
+
namespace Data {
|
|
297
|
+
/**
|
|
298
|
+
* Resource attributes
|
|
299
|
+
*/
|
|
300
|
+
interface Attributes {
|
|
301
|
+
/**
|
|
302
|
+
* Amount in cents
|
|
303
|
+
*/
|
|
304
|
+
amount: number;
|
|
305
|
+
/**
|
|
306
|
+
* When this transfer was created
|
|
307
|
+
*/
|
|
308
|
+
createdAt: string;
|
|
309
|
+
/**
|
|
310
|
+
* Currency code
|
|
311
|
+
*/
|
|
312
|
+
currency: string;
|
|
313
|
+
/**
|
|
314
|
+
* Transfer description
|
|
315
|
+
*/
|
|
316
|
+
description: string | null;
|
|
317
|
+
/**
|
|
318
|
+
* Expected availability time, when known
|
|
319
|
+
*/
|
|
320
|
+
expectedAvailableAt: string | null;
|
|
321
|
+
/**
|
|
322
|
+
* Masked external account display
|
|
323
|
+
*/
|
|
324
|
+
externalAccountDisplayMask: string | null;
|
|
325
|
+
/**
|
|
326
|
+
* Failure details when this transfer failed.
|
|
327
|
+
*/
|
|
328
|
+
failure: Attributes.Failure | null;
|
|
329
|
+
/**
|
|
330
|
+
* Return details when this transfer was returned.
|
|
331
|
+
*/
|
|
332
|
+
return: Attributes.Return | null;
|
|
333
|
+
/**
|
|
334
|
+
* When this transfer settled
|
|
335
|
+
*/
|
|
336
|
+
settledAt: string | null;
|
|
337
|
+
/**
|
|
338
|
+
* Transfer status
|
|
339
|
+
*/
|
|
340
|
+
status: 'CREATED' | 'APPROVAL_DENIED' | 'PROCESSING' | 'IN_REVIEW' | 'COMPLETED' | 'FAILED' | 'RETURNED' | 'CANCELLED';
|
|
341
|
+
/**
|
|
342
|
+
* When this transfer was submitted
|
|
343
|
+
*/
|
|
344
|
+
submittedAt: string | null;
|
|
345
|
+
/**
|
|
346
|
+
* Transfer type
|
|
347
|
+
*/
|
|
348
|
+
type: 'deposit' | 'withdrawal';
|
|
349
|
+
/**
|
|
350
|
+
* When this transfer was last updated
|
|
351
|
+
*/
|
|
352
|
+
updatedAt: string | null;
|
|
353
|
+
}
|
|
354
|
+
namespace Attributes {
|
|
355
|
+
/**
|
|
356
|
+
* Failure details when this transfer failed.
|
|
357
|
+
*/
|
|
358
|
+
interface Failure {
|
|
359
|
+
/**
|
|
360
|
+
* Failure code, when available
|
|
361
|
+
*/
|
|
362
|
+
code: string | null;
|
|
363
|
+
/**
|
|
364
|
+
* Failure reason, when available
|
|
365
|
+
*/
|
|
366
|
+
reason: string | null;
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* Return details when this transfer was returned.
|
|
370
|
+
*/
|
|
371
|
+
interface Return {
|
|
372
|
+
/**
|
|
373
|
+
* Return code, when available
|
|
374
|
+
*/
|
|
375
|
+
code: string | null;
|
|
376
|
+
/**
|
|
377
|
+
* Return reason, when available
|
|
378
|
+
*/
|
|
379
|
+
reason: string | null;
|
|
380
|
+
/**
|
|
381
|
+
* When this transfer returned
|
|
382
|
+
*/
|
|
383
|
+
returnedAt: string | null;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Resource relationships
|
|
388
|
+
*/
|
|
389
|
+
interface Relationships {
|
|
390
|
+
/**
|
|
391
|
+
* External account used for this transfer, when available.
|
|
392
|
+
*/
|
|
393
|
+
externalAccount: Relationships.ExternalAccount;
|
|
394
|
+
/**
|
|
395
|
+
* Party that owns the transfer
|
|
396
|
+
*/
|
|
397
|
+
party: Relationships.Party;
|
|
398
|
+
/**
|
|
399
|
+
* Primary transaction row for this transfer, when available.
|
|
400
|
+
*/
|
|
401
|
+
transaction: Relationships.Transaction;
|
|
402
|
+
/**
|
|
403
|
+
* Wallet for this transfer
|
|
404
|
+
*/
|
|
405
|
+
wallet: Relationships.Wallet;
|
|
406
|
+
}
|
|
407
|
+
namespace Relationships {
|
|
408
|
+
/**
|
|
409
|
+
* External account used for this transfer, when available.
|
|
410
|
+
*/
|
|
411
|
+
interface ExternalAccount {
|
|
412
|
+
/**
|
|
413
|
+
* Related resource identifier
|
|
414
|
+
*/
|
|
415
|
+
data: ExternalAccount.Data | null;
|
|
416
|
+
}
|
|
417
|
+
namespace ExternalAccount {
|
|
418
|
+
/**
|
|
419
|
+
* Related resource identifier
|
|
420
|
+
*/
|
|
421
|
+
interface Data {
|
|
422
|
+
id: string;
|
|
423
|
+
/**
|
|
424
|
+
* Resource type
|
|
425
|
+
*/
|
|
426
|
+
type: string;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Party that owns the transfer
|
|
431
|
+
*/
|
|
432
|
+
interface Party {
|
|
433
|
+
/**
|
|
434
|
+
* Related resource identifier
|
|
435
|
+
*/
|
|
436
|
+
data: Party.Data;
|
|
437
|
+
}
|
|
438
|
+
namespace Party {
|
|
439
|
+
/**
|
|
440
|
+
* Related resource identifier
|
|
441
|
+
*/
|
|
442
|
+
interface Data {
|
|
443
|
+
id: string;
|
|
444
|
+
/**
|
|
445
|
+
* Resource type
|
|
446
|
+
*/
|
|
447
|
+
type: string;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* Primary transaction row for this transfer, when available.
|
|
452
|
+
*/
|
|
453
|
+
interface Transaction {
|
|
454
|
+
/**
|
|
455
|
+
* Related resource identifier
|
|
456
|
+
*/
|
|
457
|
+
data: Transaction.Data | null;
|
|
458
|
+
}
|
|
459
|
+
namespace Transaction {
|
|
460
|
+
/**
|
|
461
|
+
* Related resource identifier
|
|
462
|
+
*/
|
|
463
|
+
interface Data {
|
|
464
|
+
id: string;
|
|
465
|
+
/**
|
|
466
|
+
* Resource type
|
|
467
|
+
*/
|
|
468
|
+
type: string;
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* Wallet for this transfer
|
|
473
|
+
*/
|
|
474
|
+
interface Wallet {
|
|
475
|
+
/**
|
|
476
|
+
* Related resource identifier
|
|
477
|
+
*/
|
|
478
|
+
data: Wallet.Data;
|
|
479
|
+
}
|
|
480
|
+
namespace Wallet {
|
|
481
|
+
/**
|
|
482
|
+
* Related resource identifier
|
|
483
|
+
*/
|
|
484
|
+
interface Data {
|
|
485
|
+
id: string;
|
|
486
|
+
/**
|
|
487
|
+
* Resource type
|
|
488
|
+
*/
|
|
489
|
+
type: string;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
export interface TransferInitiateDepositResponse {
|
|
496
|
+
data: TransferInitiateDepositResponse.Data;
|
|
497
|
+
}
|
|
498
|
+
export declare namespace TransferInitiateDepositResponse {
|
|
499
|
+
interface Data {
|
|
500
|
+
id: string;
|
|
501
|
+
/**
|
|
502
|
+
* Resource attributes
|
|
503
|
+
*/
|
|
504
|
+
attributes: Data.Attributes;
|
|
505
|
+
/**
|
|
506
|
+
* Resource relationships
|
|
507
|
+
*/
|
|
508
|
+
relationships: Data.Relationships;
|
|
509
|
+
type: string;
|
|
510
|
+
}
|
|
511
|
+
namespace Data {
|
|
512
|
+
/**
|
|
513
|
+
* Resource attributes
|
|
514
|
+
*/
|
|
515
|
+
interface Attributes {
|
|
516
|
+
/**
|
|
517
|
+
* Amount in cents
|
|
518
|
+
*/
|
|
519
|
+
amount: number;
|
|
520
|
+
/**
|
|
521
|
+
* When this transfer was created
|
|
522
|
+
*/
|
|
523
|
+
createdAt: string;
|
|
524
|
+
/**
|
|
525
|
+
* Currency code
|
|
526
|
+
*/
|
|
527
|
+
currency: string;
|
|
528
|
+
/**
|
|
529
|
+
* Transfer description
|
|
530
|
+
*/
|
|
531
|
+
description: string | null;
|
|
532
|
+
/**
|
|
533
|
+
* Expected availability time, when known
|
|
534
|
+
*/
|
|
535
|
+
expectedAvailableAt: string | null;
|
|
536
|
+
/**
|
|
537
|
+
* Masked external account display
|
|
538
|
+
*/
|
|
539
|
+
externalAccountDisplayMask: string | null;
|
|
540
|
+
/**
|
|
541
|
+
* Failure details when this transfer failed.
|
|
542
|
+
*/
|
|
543
|
+
failure: Attributes.Failure | null;
|
|
544
|
+
/**
|
|
545
|
+
* Return details when this transfer was returned.
|
|
546
|
+
*/
|
|
547
|
+
return: Attributes.Return | null;
|
|
548
|
+
/**
|
|
549
|
+
* When this transfer settled
|
|
550
|
+
*/
|
|
551
|
+
settledAt: string | null;
|
|
552
|
+
/**
|
|
553
|
+
* Transfer status
|
|
554
|
+
*/
|
|
555
|
+
status: 'CREATED' | 'APPROVAL_DENIED' | 'PROCESSING' | 'IN_REVIEW' | 'COMPLETED' | 'FAILED' | 'RETURNED' | 'CANCELLED';
|
|
556
|
+
/**
|
|
557
|
+
* When this transfer was submitted
|
|
558
|
+
*/
|
|
559
|
+
submittedAt: string | null;
|
|
560
|
+
/**
|
|
561
|
+
* Transfer type
|
|
562
|
+
*/
|
|
563
|
+
type: 'deposit' | 'withdrawal';
|
|
564
|
+
/**
|
|
565
|
+
* When this transfer was last updated
|
|
566
|
+
*/
|
|
567
|
+
updatedAt: string | null;
|
|
568
|
+
}
|
|
569
|
+
namespace Attributes {
|
|
570
|
+
/**
|
|
571
|
+
* Failure details when this transfer failed.
|
|
572
|
+
*/
|
|
573
|
+
interface Failure {
|
|
574
|
+
/**
|
|
575
|
+
* Failure code, when available
|
|
576
|
+
*/
|
|
577
|
+
code: string | null;
|
|
578
|
+
/**
|
|
579
|
+
* Failure reason, when available
|
|
580
|
+
*/
|
|
581
|
+
reason: string | null;
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* Return details when this transfer was returned.
|
|
585
|
+
*/
|
|
586
|
+
interface Return {
|
|
587
|
+
/**
|
|
588
|
+
* Return code, when available
|
|
589
|
+
*/
|
|
590
|
+
code: string | null;
|
|
591
|
+
/**
|
|
592
|
+
* Return reason, when available
|
|
593
|
+
*/
|
|
594
|
+
reason: string | null;
|
|
595
|
+
/**
|
|
596
|
+
* When this transfer returned
|
|
597
|
+
*/
|
|
598
|
+
returnedAt: string | null;
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
/**
|
|
602
|
+
* Resource relationships
|
|
603
|
+
*/
|
|
604
|
+
interface Relationships {
|
|
605
|
+
/**
|
|
606
|
+
* External account used for this transfer, when available.
|
|
607
|
+
*/
|
|
608
|
+
externalAccount: Relationships.ExternalAccount;
|
|
609
|
+
/**
|
|
610
|
+
* Party that owns the transfer
|
|
611
|
+
*/
|
|
612
|
+
party: Relationships.Party;
|
|
613
|
+
/**
|
|
614
|
+
* Primary transaction row for this transfer, when available.
|
|
615
|
+
*/
|
|
616
|
+
transaction: Relationships.Transaction;
|
|
617
|
+
/**
|
|
618
|
+
* Wallet for this transfer
|
|
619
|
+
*/
|
|
620
|
+
wallet: Relationships.Wallet;
|
|
621
|
+
}
|
|
622
|
+
namespace Relationships {
|
|
623
|
+
/**
|
|
624
|
+
* External account used for this transfer, when available.
|
|
625
|
+
*/
|
|
626
|
+
interface ExternalAccount {
|
|
627
|
+
/**
|
|
628
|
+
* Related resource identifier
|
|
629
|
+
*/
|
|
630
|
+
data: ExternalAccount.Data | null;
|
|
631
|
+
}
|
|
632
|
+
namespace ExternalAccount {
|
|
633
|
+
/**
|
|
634
|
+
* Related resource identifier
|
|
635
|
+
*/
|
|
636
|
+
interface Data {
|
|
637
|
+
id: string;
|
|
638
|
+
/**
|
|
639
|
+
* Resource type
|
|
640
|
+
*/
|
|
641
|
+
type: string;
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
/**
|
|
645
|
+
* Party that owns the transfer
|
|
646
|
+
*/
|
|
647
|
+
interface Party {
|
|
648
|
+
/**
|
|
649
|
+
* Related resource identifier
|
|
650
|
+
*/
|
|
651
|
+
data: Party.Data;
|
|
652
|
+
}
|
|
653
|
+
namespace Party {
|
|
654
|
+
/**
|
|
655
|
+
* Related resource identifier
|
|
656
|
+
*/
|
|
657
|
+
interface Data {
|
|
658
|
+
id: string;
|
|
659
|
+
/**
|
|
660
|
+
* Resource type
|
|
661
|
+
*/
|
|
662
|
+
type: string;
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
/**
|
|
666
|
+
* Primary transaction row for this transfer, when available.
|
|
667
|
+
*/
|
|
668
|
+
interface Transaction {
|
|
669
|
+
/**
|
|
670
|
+
* Related resource identifier
|
|
671
|
+
*/
|
|
672
|
+
data: Transaction.Data | null;
|
|
673
|
+
}
|
|
674
|
+
namespace Transaction {
|
|
675
|
+
/**
|
|
676
|
+
* Related resource identifier
|
|
677
|
+
*/
|
|
678
|
+
interface Data {
|
|
679
|
+
id: string;
|
|
680
|
+
/**
|
|
681
|
+
* Resource type
|
|
682
|
+
*/
|
|
683
|
+
type: string;
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
/**
|
|
687
|
+
* Wallet for this transfer
|
|
688
|
+
*/
|
|
689
|
+
interface Wallet {
|
|
690
|
+
/**
|
|
691
|
+
* Related resource identifier
|
|
692
|
+
*/
|
|
693
|
+
data: Wallet.Data;
|
|
694
|
+
}
|
|
695
|
+
namespace Wallet {
|
|
696
|
+
/**
|
|
697
|
+
* Related resource identifier
|
|
698
|
+
*/
|
|
699
|
+
interface Data {
|
|
700
|
+
id: string;
|
|
701
|
+
/**
|
|
702
|
+
* Resource type
|
|
703
|
+
*/
|
|
704
|
+
type: string;
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
export interface TransferInitiateWithdrawalResponse {
|
|
711
|
+
data: TransferInitiateWithdrawalResponse.Data;
|
|
712
|
+
}
|
|
713
|
+
export declare namespace TransferInitiateWithdrawalResponse {
|
|
714
|
+
interface Data {
|
|
715
|
+
id: string;
|
|
716
|
+
/**
|
|
717
|
+
* Resource attributes
|
|
718
|
+
*/
|
|
719
|
+
attributes: Data.Attributes;
|
|
720
|
+
/**
|
|
721
|
+
* Resource relationships
|
|
722
|
+
*/
|
|
723
|
+
relationships: Data.Relationships;
|
|
724
|
+
type: string;
|
|
725
|
+
}
|
|
726
|
+
namespace Data {
|
|
727
|
+
/**
|
|
728
|
+
* Resource attributes
|
|
729
|
+
*/
|
|
730
|
+
interface Attributes {
|
|
731
|
+
/**
|
|
732
|
+
* Amount in cents
|
|
733
|
+
*/
|
|
734
|
+
amount: number;
|
|
735
|
+
/**
|
|
736
|
+
* When this transfer was created
|
|
737
|
+
*/
|
|
738
|
+
createdAt: string;
|
|
739
|
+
/**
|
|
740
|
+
* Currency code
|
|
741
|
+
*/
|
|
742
|
+
currency: string;
|
|
743
|
+
/**
|
|
744
|
+
* Transfer description
|
|
745
|
+
*/
|
|
746
|
+
description: string | null;
|
|
747
|
+
/**
|
|
748
|
+
* Expected availability time, when known
|
|
749
|
+
*/
|
|
750
|
+
expectedAvailableAt: string | null;
|
|
751
|
+
/**
|
|
752
|
+
* Masked external account display
|
|
753
|
+
*/
|
|
754
|
+
externalAccountDisplayMask: string | null;
|
|
755
|
+
/**
|
|
756
|
+
* Failure details when this transfer failed.
|
|
757
|
+
*/
|
|
758
|
+
failure: Attributes.Failure | null;
|
|
759
|
+
/**
|
|
760
|
+
* Return details when this transfer was returned.
|
|
761
|
+
*/
|
|
762
|
+
return: Attributes.Return | null;
|
|
763
|
+
/**
|
|
764
|
+
* When this transfer settled
|
|
765
|
+
*/
|
|
766
|
+
settledAt: string | null;
|
|
767
|
+
/**
|
|
768
|
+
* Transfer status
|
|
769
|
+
*/
|
|
770
|
+
status: 'CREATED' | 'APPROVAL_DENIED' | 'PROCESSING' | 'IN_REVIEW' | 'COMPLETED' | 'FAILED' | 'RETURNED' | 'CANCELLED';
|
|
771
|
+
/**
|
|
772
|
+
* When this transfer was submitted
|
|
773
|
+
*/
|
|
774
|
+
submittedAt: string | null;
|
|
775
|
+
/**
|
|
776
|
+
* Transfer type
|
|
777
|
+
*/
|
|
778
|
+
type: 'deposit' | 'withdrawal';
|
|
779
|
+
/**
|
|
780
|
+
* When this transfer was last updated
|
|
781
|
+
*/
|
|
782
|
+
updatedAt: string | null;
|
|
783
|
+
}
|
|
784
|
+
namespace Attributes {
|
|
785
|
+
/**
|
|
786
|
+
* Failure details when this transfer failed.
|
|
787
|
+
*/
|
|
788
|
+
interface Failure {
|
|
789
|
+
/**
|
|
790
|
+
* Failure code, when available
|
|
791
|
+
*/
|
|
792
|
+
code: string | null;
|
|
793
|
+
/**
|
|
794
|
+
* Failure reason, when available
|
|
795
|
+
*/
|
|
796
|
+
reason: string | null;
|
|
797
|
+
}
|
|
798
|
+
/**
|
|
799
|
+
* Return details when this transfer was returned.
|
|
800
|
+
*/
|
|
801
|
+
interface Return {
|
|
802
|
+
/**
|
|
803
|
+
* Return code, when available
|
|
804
|
+
*/
|
|
805
|
+
code: string | null;
|
|
806
|
+
/**
|
|
807
|
+
* Return reason, when available
|
|
808
|
+
*/
|
|
809
|
+
reason: string | null;
|
|
810
|
+
/**
|
|
811
|
+
* When this transfer returned
|
|
812
|
+
*/
|
|
813
|
+
returnedAt: string | null;
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
/**
|
|
817
|
+
* Resource relationships
|
|
818
|
+
*/
|
|
819
|
+
interface Relationships {
|
|
820
|
+
/**
|
|
821
|
+
* External account used for this transfer, when available.
|
|
822
|
+
*/
|
|
823
|
+
externalAccount: Relationships.ExternalAccount;
|
|
824
|
+
/**
|
|
825
|
+
* Party that owns the transfer
|
|
826
|
+
*/
|
|
827
|
+
party: Relationships.Party;
|
|
828
|
+
/**
|
|
829
|
+
* Primary transaction row for this transfer, when available.
|
|
830
|
+
*/
|
|
831
|
+
transaction: Relationships.Transaction;
|
|
832
|
+
/**
|
|
833
|
+
* Wallet for this transfer
|
|
834
|
+
*/
|
|
835
|
+
wallet: Relationships.Wallet;
|
|
836
|
+
}
|
|
837
|
+
namespace Relationships {
|
|
838
|
+
/**
|
|
839
|
+
* External account used for this transfer, when available.
|
|
840
|
+
*/
|
|
841
|
+
interface ExternalAccount {
|
|
842
|
+
/**
|
|
843
|
+
* Related resource identifier
|
|
844
|
+
*/
|
|
845
|
+
data: ExternalAccount.Data | null;
|
|
846
|
+
}
|
|
847
|
+
namespace ExternalAccount {
|
|
848
|
+
/**
|
|
849
|
+
* Related resource identifier
|
|
850
|
+
*/
|
|
851
|
+
interface Data {
|
|
852
|
+
id: string;
|
|
853
|
+
/**
|
|
854
|
+
* Resource type
|
|
855
|
+
*/
|
|
856
|
+
type: string;
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
/**
|
|
860
|
+
* Party that owns the transfer
|
|
861
|
+
*/
|
|
862
|
+
interface Party {
|
|
863
|
+
/**
|
|
864
|
+
* Related resource identifier
|
|
865
|
+
*/
|
|
866
|
+
data: Party.Data;
|
|
867
|
+
}
|
|
868
|
+
namespace Party {
|
|
869
|
+
/**
|
|
870
|
+
* Related resource identifier
|
|
871
|
+
*/
|
|
872
|
+
interface Data {
|
|
873
|
+
id: string;
|
|
874
|
+
/**
|
|
875
|
+
* Resource type
|
|
876
|
+
*/
|
|
877
|
+
type: string;
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
/**
|
|
881
|
+
* Primary transaction row for this transfer, when available.
|
|
882
|
+
*/
|
|
883
|
+
interface Transaction {
|
|
884
|
+
/**
|
|
885
|
+
* Related resource identifier
|
|
886
|
+
*/
|
|
887
|
+
data: Transaction.Data | null;
|
|
888
|
+
}
|
|
889
|
+
namespace Transaction {
|
|
890
|
+
/**
|
|
891
|
+
* Related resource identifier
|
|
892
|
+
*/
|
|
893
|
+
interface Data {
|
|
894
|
+
id: string;
|
|
895
|
+
/**
|
|
896
|
+
* Resource type
|
|
897
|
+
*/
|
|
898
|
+
type: string;
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
/**
|
|
902
|
+
* Wallet for this transfer
|
|
903
|
+
*/
|
|
904
|
+
interface Wallet {
|
|
905
|
+
/**
|
|
906
|
+
* Related resource identifier
|
|
907
|
+
*/
|
|
908
|
+
data: Wallet.Data;
|
|
909
|
+
}
|
|
910
|
+
namespace Wallet {
|
|
911
|
+
/**
|
|
912
|
+
* Related resource identifier
|
|
913
|
+
*/
|
|
914
|
+
interface Data {
|
|
915
|
+
id: string;
|
|
916
|
+
/**
|
|
917
|
+
* Resource type
|
|
918
|
+
*/
|
|
919
|
+
type: string;
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
export interface TransferListParams {
|
|
926
|
+
/**
|
|
927
|
+
* Query param: Pagination cursor from previous response
|
|
928
|
+
*/
|
|
929
|
+
cursor?: string;
|
|
930
|
+
/**
|
|
931
|
+
* Query param: Results per page
|
|
932
|
+
*/
|
|
933
|
+
limit?: number;
|
|
934
|
+
/**
|
|
935
|
+
* Query param: Party ID for delegated transfer lookup
|
|
936
|
+
*/
|
|
937
|
+
partyId?: string;
|
|
938
|
+
/**
|
|
939
|
+
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
940
|
+
*/
|
|
941
|
+
'X-Agent-ID'?: string;
|
|
942
|
+
/**
|
|
943
|
+
* Header param: Required when X-Agent-ID is present. Session or conversation ID
|
|
944
|
+
* for agent observability.
|
|
945
|
+
*/
|
|
946
|
+
'X-Instance-ID'?: string;
|
|
947
|
+
}
|
|
948
|
+
export interface TransferGetParams {
|
|
949
|
+
/**
|
|
950
|
+
* Query param: Party ID for delegated transfer lookup
|
|
951
|
+
*/
|
|
952
|
+
partyId?: string;
|
|
953
|
+
/**
|
|
954
|
+
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
955
|
+
*/
|
|
956
|
+
'X-Agent-ID'?: string;
|
|
957
|
+
/**
|
|
958
|
+
* Header param: Required when X-Agent-ID is present. Session or conversation ID
|
|
959
|
+
* for agent observability.
|
|
960
|
+
*/
|
|
961
|
+
'X-Instance-ID'?: string;
|
|
962
|
+
}
|
|
963
|
+
export interface TransferInitiateDepositParams {
|
|
964
|
+
/**
|
|
965
|
+
* Body param: Amount in cents
|
|
966
|
+
*/
|
|
967
|
+
amount: number;
|
|
968
|
+
/**
|
|
969
|
+
* Body param: External account ID (eac\_\*)
|
|
970
|
+
*/
|
|
971
|
+
externalAccountId: string;
|
|
972
|
+
/**
|
|
973
|
+
* Header param: Unique key for idempotent request handling. If a request with the
|
|
974
|
+
* same key was already processed, the original response is returned.
|
|
975
|
+
*/
|
|
976
|
+
'Idempotency-Key': string;
|
|
977
|
+
/**
|
|
978
|
+
* Body param: Currency code
|
|
979
|
+
*/
|
|
980
|
+
currency?: string;
|
|
981
|
+
/**
|
|
982
|
+
* Body param: Deposit description
|
|
983
|
+
*/
|
|
984
|
+
description?: string;
|
|
985
|
+
/**
|
|
986
|
+
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
987
|
+
*/
|
|
988
|
+
'X-Agent-ID'?: string;
|
|
989
|
+
/**
|
|
990
|
+
* Header param: Required when X-Agent-ID is present. Session or conversation ID
|
|
991
|
+
* for agent observability.
|
|
992
|
+
*/
|
|
993
|
+
'X-Instance-ID'?: string;
|
|
994
|
+
}
|
|
995
|
+
export interface TransferInitiateWithdrawalParams {
|
|
996
|
+
/**
|
|
997
|
+
* Body param: Amount in cents
|
|
998
|
+
*/
|
|
999
|
+
amount: number;
|
|
1000
|
+
/**
|
|
1001
|
+
* Body param: External account ID (eac\_\*)
|
|
1002
|
+
*/
|
|
1003
|
+
externalAccountId: string;
|
|
1004
|
+
/**
|
|
1005
|
+
* Header param: Unique key for idempotent request handling. If a request with the
|
|
1006
|
+
* same key was already processed, the original response is returned.
|
|
1007
|
+
*/
|
|
1008
|
+
'Idempotency-Key': string;
|
|
1009
|
+
/**
|
|
1010
|
+
* Body param: Currency code
|
|
1011
|
+
*/
|
|
1012
|
+
currency?: string;
|
|
1013
|
+
/**
|
|
1014
|
+
* Body param: Withdrawal description
|
|
1015
|
+
*/
|
|
1016
|
+
description?: string;
|
|
1017
|
+
/**
|
|
1018
|
+
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
1019
|
+
*/
|
|
1020
|
+
'X-Agent-ID'?: string;
|
|
1021
|
+
/**
|
|
1022
|
+
* Header param: Required when X-Agent-ID is present. Session or conversation ID
|
|
1023
|
+
* for agent observability.
|
|
1024
|
+
*/
|
|
1025
|
+
'X-Instance-ID'?: string;
|
|
1026
|
+
}
|
|
1027
|
+
export declare namespace Transfers {
|
|
1028
|
+
export { type TransferListResponse as TransferListResponse, type TransferGetResponse as TransferGetResponse, type TransferInitiateDepositResponse as TransferInitiateDepositResponse, type TransferInitiateWithdrawalResponse as TransferInitiateWithdrawalResponse, type TransferListParams as TransferListParams, type TransferGetParams as TransferGetParams, type TransferInitiateDepositParams as TransferInitiateDepositParams, type TransferInitiateWithdrawalParams as TransferInitiateWithdrawalParams, };
|
|
1029
|
+
}
|
|
1030
|
+
//# sourceMappingURL=transfers.d.ts.map
|