@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
|
@@ -7,11 +7,11 @@ import { RequestOptions } from '../internal/request-options';
|
|
|
7
7
|
import { path } from '../internal/utils/path';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Transaction activity and history operations
|
|
11
11
|
*/
|
|
12
12
|
export class Transactions extends APIResource {
|
|
13
13
|
/**
|
|
14
|
-
* List transactions visible to your party
|
|
14
|
+
* List transactions visible to your party.
|
|
15
15
|
*/
|
|
16
16
|
list(
|
|
17
17
|
params: TransactionListParams | null | undefined = {},
|
|
@@ -85,23 +85,11 @@ export namespace TransactionListResponse {
|
|
|
85
85
|
* Resource attributes
|
|
86
86
|
*/
|
|
87
87
|
export interface Attributes {
|
|
88
|
-
/**
|
|
89
|
-
* Agent that initiated this transaction. Null when initiated by a human user.
|
|
90
|
-
*/
|
|
91
|
-
agentId: string | null;
|
|
92
|
-
|
|
93
88
|
/**
|
|
94
89
|
* Amount in cents
|
|
95
90
|
*/
|
|
96
91
|
amount: number;
|
|
97
92
|
|
|
98
|
-
/**
|
|
99
|
-
* Classification from your party's perspective. Derived from transactionType +
|
|
100
|
-
* direction: "sent"/"received" for wallet-to-wallet payments (OUTBOUND/INBOUND),
|
|
101
|
-
* "deposit"/"withdrawal" for external transfers (INBOUND/OUTBOUND).
|
|
102
|
-
*/
|
|
103
|
-
category: 'sent' | 'received' | 'deposit' | 'withdrawal';
|
|
104
|
-
|
|
105
93
|
/**
|
|
106
94
|
* When this transaction was created
|
|
107
95
|
*/
|
|
@@ -112,11 +100,6 @@ export namespace TransactionListResponse {
|
|
|
112
100
|
*/
|
|
113
101
|
currency: string;
|
|
114
102
|
|
|
115
|
-
/**
|
|
116
|
-
* Customer name if delegated
|
|
117
|
-
*/
|
|
118
|
-
customerName: string | null;
|
|
119
|
-
|
|
120
103
|
/**
|
|
121
104
|
* Payment description
|
|
122
105
|
*/
|
|
@@ -128,41 +111,11 @@ export namespace TransactionListResponse {
|
|
|
128
111
|
direction: 'INBOUND' | 'OUTBOUND';
|
|
129
112
|
|
|
130
113
|
/**
|
|
131
|
-
*
|
|
132
|
-
|
|
133
|
-
disputeId: string | null;
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* Pending escalation ID when this transaction requires approval
|
|
137
|
-
*/
|
|
138
|
-
escalationId: string | null;
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* Projected funds-available time for transfers (deposits/withdrawals). Null when
|
|
142
|
-
* no MMR settlement projection has arrived yet, and null for payments.
|
|
114
|
+
* Projected funds-available time for transfers. Null when no projection exists and
|
|
115
|
+
* null for payments.
|
|
143
116
|
*/
|
|
144
117
|
expectedAvailableAt: string | null;
|
|
145
118
|
|
|
146
|
-
/**
|
|
147
|
-
* Display name of the user or agent that initiated this transaction
|
|
148
|
-
*/
|
|
149
|
-
initiatorName: string | null;
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* True if this is a delegated customer payment
|
|
153
|
-
*/
|
|
154
|
-
isDelegated: boolean;
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Recipient display name
|
|
158
|
-
*/
|
|
159
|
-
recipientName: string | null;
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Sender display name
|
|
163
|
-
*/
|
|
164
|
-
senderName: string | null;
|
|
165
|
-
|
|
166
119
|
/**
|
|
167
120
|
* Transaction status
|
|
168
121
|
*/
|
|
@@ -189,19 +142,21 @@ export namespace TransactionListResponse {
|
|
|
189
142
|
destinationParty: Relationships.DestinationParty;
|
|
190
143
|
|
|
191
144
|
/**
|
|
192
|
-
*
|
|
145
|
+
* Source party
|
|
193
146
|
*/
|
|
194
|
-
|
|
147
|
+
sourceParty: Relationships.SourceParty;
|
|
195
148
|
|
|
196
149
|
/**
|
|
197
|
-
*
|
|
150
|
+
* Payment that produced this transaction. Present only when the authenticated
|
|
151
|
+
* caller can access the payment resource.
|
|
198
152
|
*/
|
|
199
|
-
|
|
153
|
+
payment?: Relationships.Payment;
|
|
200
154
|
|
|
201
155
|
/**
|
|
202
|
-
*
|
|
156
|
+
* Transfer that produced this transaction. Present only when the authenticated
|
|
157
|
+
* caller can access the transfer resource.
|
|
203
158
|
*/
|
|
204
|
-
|
|
159
|
+
transfer?: Relationships.Transfer;
|
|
205
160
|
}
|
|
206
161
|
|
|
207
162
|
export namespace Relationships {
|
|
@@ -230,16 +185,16 @@ export namespace TransactionListResponse {
|
|
|
230
185
|
}
|
|
231
186
|
|
|
232
187
|
/**
|
|
233
|
-
*
|
|
188
|
+
* Source party
|
|
234
189
|
*/
|
|
235
|
-
export interface
|
|
190
|
+
export interface SourceParty {
|
|
236
191
|
/**
|
|
237
192
|
* Related resource identifier
|
|
238
193
|
*/
|
|
239
|
-
data:
|
|
194
|
+
data: SourceParty.Data | null;
|
|
240
195
|
}
|
|
241
196
|
|
|
242
|
-
export namespace
|
|
197
|
+
export namespace SourceParty {
|
|
243
198
|
/**
|
|
244
199
|
* Related resource identifier
|
|
245
200
|
*/
|
|
@@ -254,16 +209,17 @@ export namespace TransactionListResponse {
|
|
|
254
209
|
}
|
|
255
210
|
|
|
256
211
|
/**
|
|
257
|
-
*
|
|
212
|
+
* Payment that produced this transaction. Present only when the authenticated
|
|
213
|
+
* caller can access the payment resource.
|
|
258
214
|
*/
|
|
259
|
-
export interface
|
|
215
|
+
export interface Payment {
|
|
260
216
|
/**
|
|
261
217
|
* Related resource identifier
|
|
262
218
|
*/
|
|
263
|
-
data:
|
|
219
|
+
data: Payment.Data;
|
|
264
220
|
}
|
|
265
221
|
|
|
266
|
-
export namespace
|
|
222
|
+
export namespace Payment {
|
|
267
223
|
/**
|
|
268
224
|
* Related resource identifier
|
|
269
225
|
*/
|
|
@@ -278,16 +234,17 @@ export namespace TransactionListResponse {
|
|
|
278
234
|
}
|
|
279
235
|
|
|
280
236
|
/**
|
|
281
|
-
*
|
|
237
|
+
* Transfer that produced this transaction. Present only when the authenticated
|
|
238
|
+
* caller can access the transfer resource.
|
|
282
239
|
*/
|
|
283
|
-
export interface
|
|
240
|
+
export interface Transfer {
|
|
284
241
|
/**
|
|
285
242
|
* Related resource identifier
|
|
286
243
|
*/
|
|
287
|
-
data:
|
|
244
|
+
data: Transfer.Data;
|
|
288
245
|
}
|
|
289
246
|
|
|
290
|
-
export namespace
|
|
247
|
+
export namespace Transfer {
|
|
291
248
|
/**
|
|
292
249
|
* Related resource identifier
|
|
293
250
|
*/
|
|
@@ -345,23 +302,11 @@ export namespace TransactionGetResponse {
|
|
|
345
302
|
* Resource attributes
|
|
346
303
|
*/
|
|
347
304
|
export interface Attributes {
|
|
348
|
-
/**
|
|
349
|
-
* Agent that initiated this transaction. Null when initiated by a human user.
|
|
350
|
-
*/
|
|
351
|
-
agentId: string | null;
|
|
352
|
-
|
|
353
305
|
/**
|
|
354
306
|
* Amount in cents
|
|
355
307
|
*/
|
|
356
308
|
amount: number;
|
|
357
309
|
|
|
358
|
-
/**
|
|
359
|
-
* Classification from your party's perspective. Derived from transactionType +
|
|
360
|
-
* direction: "sent"/"received" for wallet-to-wallet payments (OUTBOUND/INBOUND),
|
|
361
|
-
* "deposit"/"withdrawal" for external transfers (INBOUND/OUTBOUND).
|
|
362
|
-
*/
|
|
363
|
-
category: 'sent' | 'received' | 'deposit' | 'withdrawal';
|
|
364
|
-
|
|
365
310
|
/**
|
|
366
311
|
* When this transaction was created
|
|
367
312
|
*/
|
|
@@ -372,11 +317,6 @@ export namespace TransactionGetResponse {
|
|
|
372
317
|
*/
|
|
373
318
|
currency: string;
|
|
374
319
|
|
|
375
|
-
/**
|
|
376
|
-
* Customer name if delegated
|
|
377
|
-
*/
|
|
378
|
-
customerName: string | null;
|
|
379
|
-
|
|
380
320
|
/**
|
|
381
321
|
* Payment description
|
|
382
322
|
*/
|
|
@@ -388,41 +328,11 @@ export namespace TransactionGetResponse {
|
|
|
388
328
|
direction: 'INBOUND' | 'OUTBOUND';
|
|
389
329
|
|
|
390
330
|
/**
|
|
391
|
-
*
|
|
392
|
-
|
|
393
|
-
disputeId: string | null;
|
|
394
|
-
|
|
395
|
-
/**
|
|
396
|
-
* Pending escalation ID when this transaction requires approval
|
|
397
|
-
*/
|
|
398
|
-
escalationId: string | null;
|
|
399
|
-
|
|
400
|
-
/**
|
|
401
|
-
* Projected funds-available time for transfers (deposits/withdrawals). Null when
|
|
402
|
-
* no MMR settlement projection has arrived yet, and null for payments.
|
|
331
|
+
* Projected funds-available time for transfers. Null when no projection exists and
|
|
332
|
+
* null for payments.
|
|
403
333
|
*/
|
|
404
334
|
expectedAvailableAt: string | null;
|
|
405
335
|
|
|
406
|
-
/**
|
|
407
|
-
* Display name of the user or agent that initiated this transaction
|
|
408
|
-
*/
|
|
409
|
-
initiatorName: string | null;
|
|
410
|
-
|
|
411
|
-
/**
|
|
412
|
-
* True if this is a delegated customer payment
|
|
413
|
-
*/
|
|
414
|
-
isDelegated: boolean;
|
|
415
|
-
|
|
416
|
-
/**
|
|
417
|
-
* Recipient display name
|
|
418
|
-
*/
|
|
419
|
-
recipientName: string | null;
|
|
420
|
-
|
|
421
|
-
/**
|
|
422
|
-
* Sender display name
|
|
423
|
-
*/
|
|
424
|
-
senderName: string | null;
|
|
425
|
-
|
|
426
336
|
/**
|
|
427
337
|
* Transaction status
|
|
428
338
|
*/
|
|
@@ -449,19 +359,21 @@ export namespace TransactionGetResponse {
|
|
|
449
359
|
destinationParty: Relationships.DestinationParty;
|
|
450
360
|
|
|
451
361
|
/**
|
|
452
|
-
*
|
|
362
|
+
* Source party
|
|
453
363
|
*/
|
|
454
|
-
|
|
364
|
+
sourceParty: Relationships.SourceParty;
|
|
455
365
|
|
|
456
366
|
/**
|
|
457
|
-
*
|
|
367
|
+
* Payment that produced this transaction. Present only when the authenticated
|
|
368
|
+
* caller can access the payment resource.
|
|
458
369
|
*/
|
|
459
|
-
|
|
370
|
+
payment?: Relationships.Payment;
|
|
460
371
|
|
|
461
372
|
/**
|
|
462
|
-
*
|
|
373
|
+
* Transfer that produced this transaction. Present only when the authenticated
|
|
374
|
+
* caller can access the transfer resource.
|
|
463
375
|
*/
|
|
464
|
-
|
|
376
|
+
transfer?: Relationships.Transfer;
|
|
465
377
|
}
|
|
466
378
|
|
|
467
379
|
export namespace Relationships {
|
|
@@ -490,16 +402,16 @@ export namespace TransactionGetResponse {
|
|
|
490
402
|
}
|
|
491
403
|
|
|
492
404
|
/**
|
|
493
|
-
*
|
|
405
|
+
* Source party
|
|
494
406
|
*/
|
|
495
|
-
export interface
|
|
407
|
+
export interface SourceParty {
|
|
496
408
|
/**
|
|
497
409
|
* Related resource identifier
|
|
498
410
|
*/
|
|
499
|
-
data:
|
|
411
|
+
data: SourceParty.Data | null;
|
|
500
412
|
}
|
|
501
413
|
|
|
502
|
-
export namespace
|
|
414
|
+
export namespace SourceParty {
|
|
503
415
|
/**
|
|
504
416
|
* Related resource identifier
|
|
505
417
|
*/
|
|
@@ -514,16 +426,17 @@ export namespace TransactionGetResponse {
|
|
|
514
426
|
}
|
|
515
427
|
|
|
516
428
|
/**
|
|
517
|
-
*
|
|
429
|
+
* Payment that produced this transaction. Present only when the authenticated
|
|
430
|
+
* caller can access the payment resource.
|
|
518
431
|
*/
|
|
519
|
-
export interface
|
|
432
|
+
export interface Payment {
|
|
520
433
|
/**
|
|
521
434
|
* Related resource identifier
|
|
522
435
|
*/
|
|
523
|
-
data:
|
|
436
|
+
data: Payment.Data;
|
|
524
437
|
}
|
|
525
438
|
|
|
526
|
-
export namespace
|
|
439
|
+
export namespace Payment {
|
|
527
440
|
/**
|
|
528
441
|
* Related resource identifier
|
|
529
442
|
*/
|
|
@@ -538,16 +451,17 @@ export namespace TransactionGetResponse {
|
|
|
538
451
|
}
|
|
539
452
|
|
|
540
453
|
/**
|
|
541
|
-
*
|
|
454
|
+
* Transfer that produced this transaction. Present only when the authenticated
|
|
455
|
+
* caller can access the transfer resource.
|
|
542
456
|
*/
|
|
543
|
-
export interface
|
|
457
|
+
export interface Transfer {
|
|
544
458
|
/**
|
|
545
459
|
* Related resource identifier
|
|
546
460
|
*/
|
|
547
|
-
data:
|
|
461
|
+
data: Transfer.Data;
|
|
548
462
|
}
|
|
549
463
|
|
|
550
|
-
export namespace
|
|
464
|
+
export namespace Transfer {
|
|
551
465
|
/**
|
|
552
466
|
* Related resource identifier
|
|
553
467
|
*/
|