@naturalpay/sdk 0.9.0 → 0.11.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 (113) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/agents.d.mts +33 -26
  10. package/resources/agents.d.mts.map +1 -1
  11. package/resources/agents.d.ts +33 -26
  12. package/resources/agents.d.ts.map +1 -1
  13. package/resources/agents.js +1 -1
  14. package/resources/agents.mjs +1 -1
  15. package/resources/api-keys.d.mts +16 -16
  16. package/resources/api-keys.d.mts.map +1 -1
  17. package/resources/api-keys.d.ts +16 -16
  18. package/resources/api-keys.d.ts.map +1 -1
  19. package/resources/approvals.d.mts +16 -16
  20. package/resources/approvals.d.mts.map +1 -1
  21. package/resources/approvals.d.ts +16 -16
  22. package/resources/approvals.d.ts.map +1 -1
  23. package/resources/counterparties.d.mts +1 -1
  24. package/resources/counterparties.d.mts.map +1 -1
  25. package/resources/counterparties.d.ts +1 -1
  26. package/resources/counterparties.d.ts.map +1 -1
  27. package/resources/customers.d.mts +6 -6
  28. package/resources/customers.d.mts.map +1 -1
  29. package/resources/customers.d.ts +6 -6
  30. package/resources/customers.d.ts.map +1 -1
  31. package/resources/external-accounts.d.mts +4 -4
  32. package/resources/external-accounts.d.mts.map +1 -1
  33. package/resources/external-accounts.d.ts +4 -4
  34. package/resources/external-accounts.d.ts.map +1 -1
  35. package/resources/index.d.mts +1 -1
  36. package/resources/index.d.mts.map +1 -1
  37. package/resources/index.d.ts +1 -1
  38. package/resources/index.d.ts.map +1 -1
  39. package/resources/index.js.map +1 -1
  40. package/resources/index.mjs.map +1 -1
  41. package/resources/invitations.d.mts +3 -3
  42. package/resources/invitations.d.mts.map +1 -1
  43. package/resources/invitations.d.ts +3 -3
  44. package/resources/invitations.d.ts.map +1 -1
  45. package/resources/parties.d.mts +4 -4
  46. package/resources/parties.d.mts.map +1 -1
  47. package/resources/parties.d.ts +4 -4
  48. package/resources/parties.d.ts.map +1 -1
  49. package/resources/payment-requests.d.mts +374 -82
  50. package/resources/payment-requests.d.mts.map +1 -1
  51. package/resources/payment-requests.d.ts +374 -82
  52. package/resources/payment-requests.d.ts.map +1 -1
  53. package/resources/payment-requests.js +35 -48
  54. package/resources/payment-requests.js.map +1 -1
  55. package/resources/payment-requests.mjs +35 -48
  56. package/resources/payment-requests.mjs.map +1 -1
  57. package/resources/payments.d.mts +433 -44
  58. package/resources/payments.d.mts.map +1 -1
  59. package/resources/payments.d.ts +433 -44
  60. package/resources/payments.d.ts.map +1 -1
  61. package/resources/payments.js +40 -22
  62. package/resources/payments.js.map +1 -1
  63. package/resources/payments.mjs +40 -22
  64. package/resources/payments.mjs.map +1 -1
  65. package/resources/transactions.d.mts +26 -28
  66. package/resources/transactions.d.mts.map +1 -1
  67. package/resources/transactions.d.ts +26 -28
  68. package/resources/transactions.d.ts.map +1 -1
  69. package/resources/transactions.js +6 -18
  70. package/resources/transactions.js.map +1 -1
  71. package/resources/transactions.mjs +6 -18
  72. package/resources/transactions.mjs.map +1 -1
  73. package/resources/transfers.d.mts +64 -57
  74. package/resources/transfers.d.mts.map +1 -1
  75. package/resources/transfers.d.ts +64 -57
  76. package/resources/transfers.d.ts.map +1 -1
  77. package/resources/transfers.js +20 -29
  78. package/resources/transfers.js.map +1 -1
  79. package/resources/transfers.mjs +20 -29
  80. package/resources/transfers.mjs.map +1 -1
  81. package/resources/wallet.d.mts +4 -4
  82. package/resources/wallet.d.mts.map +1 -1
  83. package/resources/wallet.d.ts +4 -4
  84. package/resources/wallet.d.ts.map +1 -1
  85. package/resources/webhooks.d.mts +12 -12
  86. package/resources/webhooks.d.mts.map +1 -1
  87. package/resources/webhooks.d.ts +12 -12
  88. package/resources/webhooks.d.ts.map +1 -1
  89. package/src/client.ts +4 -0
  90. package/src/resources/agents.ts +39 -26
  91. package/src/resources/api-keys.ts +16 -16
  92. package/src/resources/approvals.ts +16 -16
  93. package/src/resources/counterparties.ts +1 -1
  94. package/src/resources/customers.ts +6 -6
  95. package/src/resources/external-accounts.ts +4 -4
  96. package/src/resources/index.ts +2 -0
  97. package/src/resources/invitations.ts +3 -3
  98. package/src/resources/parties.ts +4 -4
  99. package/src/resources/payment-requests.ts +484 -126
  100. package/src/resources/payments.ts +531 -67
  101. package/src/resources/transactions.ts +32 -49
  102. package/src/resources/transfers.ts +72 -88
  103. package/src/resources/wallet.ts +4 -4
  104. package/src/resources/webhooks.ts +12 -12
  105. package/src/version.ts +1 -1
  106. package/version.d.mts +1 -1
  107. package/version.d.mts.map +1 -1
  108. package/version.d.ts +1 -1
  109. package/version.d.ts.map +1 -1
  110. package/version.js +1 -1
  111. package/version.js.map +1 -1
  112. package/version.mjs +1 -1
  113. package/version.mjs.map +1 -1
@@ -143,7 +143,7 @@ export namespace APIKeyCreateResponse {
143
143
  /**
144
144
  * Resource type
145
145
  */
146
- type: string;
146
+ type: 'apiKey';
147
147
  }
148
148
 
149
149
  export namespace Data {
@@ -157,8 +157,8 @@ export namespace APIKeyCreateResponse {
157
157
  apiKey: string;
158
158
 
159
159
  /**
160
- * Non-secret prefix of the API key, e.g. `sk_ntl_live_abc123`. The middle segment
161
- * encodes the environment; the final segment is random.
160
+ * Non-secret prefix of the API key, e.g. `sk_ntl_live_abc123`. The final segment
161
+ * is random.
162
162
  */
163
163
  apiKeyPrefix: string;
164
164
 
@@ -239,7 +239,7 @@ export namespace APIKeyCreateResponse {
239
239
  /**
240
240
  * Resource type
241
241
  */
242
- type: string;
242
+ type: 'party';
243
243
  }
244
244
  }
245
245
  }
@@ -272,7 +272,7 @@ export namespace APIKeyListResponse {
272
272
  /**
273
273
  * Resource type
274
274
  */
275
- type: string;
275
+ type: 'apiKey';
276
276
  }
277
277
 
278
278
  export namespace Data {
@@ -281,8 +281,8 @@ export namespace APIKeyListResponse {
281
281
  */
282
282
  export interface Attributes {
283
283
  /**
284
- * Non-secret prefix of the API key, e.g. `sk_ntl_live_abc123`. The middle segment
285
- * encodes the environment; the final segment is random.
284
+ * Non-secret prefix of the API key, e.g. `sk_ntl_live_abc123`. The final segment
285
+ * is random.
286
286
  */
287
287
  apiKeyPrefix: string;
288
288
 
@@ -363,7 +363,7 @@ export namespace APIKeyListResponse {
363
363
  /**
364
364
  * Resource type
365
365
  */
366
- type: string;
366
+ type: 'party';
367
367
  }
368
368
  }
369
369
  }
@@ -406,7 +406,7 @@ export namespace APIKeyGetResponse {
406
406
  /**
407
407
  * Resource type
408
408
  */
409
- type: string;
409
+ type: 'apiKey';
410
410
  }
411
411
 
412
412
  export namespace Data {
@@ -415,8 +415,8 @@ export namespace APIKeyGetResponse {
415
415
  */
416
416
  export interface Attributes {
417
417
  /**
418
- * Non-secret prefix of the API key, e.g. `sk_ntl_live_abc123`. The middle segment
419
- * encodes the environment; the final segment is random.
418
+ * Non-secret prefix of the API key, e.g. `sk_ntl_live_abc123`. The final segment
419
+ * is random.
420
420
  */
421
421
  apiKeyPrefix: string;
422
422
 
@@ -497,7 +497,7 @@ export namespace APIKeyGetResponse {
497
497
  /**
498
498
  * Resource type
499
499
  */
500
- type: string;
500
+ type: 'party';
501
501
  }
502
502
  }
503
503
  }
@@ -530,7 +530,7 @@ export namespace APIKeyRevokeResponse {
530
530
  /**
531
531
  * Resource type
532
532
  */
533
- type: string;
533
+ type: 'apiKey';
534
534
  }
535
535
 
536
536
  export namespace Data {
@@ -539,8 +539,8 @@ export namespace APIKeyRevokeResponse {
539
539
  */
540
540
  export interface Attributes {
541
541
  /**
542
- * Non-secret prefix of the API key, e.g. `sk_ntl_live_abc123`. The middle segment
543
- * encodes the environment; the final segment is random.
542
+ * Non-secret prefix of the API key, e.g. `sk_ntl_live_abc123`. The final segment
543
+ * is random.
544
544
  */
545
545
  apiKeyPrefix: string;
546
546
 
@@ -621,7 +621,7 @@ export namespace APIKeyRevokeResponse {
621
621
  /**
622
622
  * Resource type
623
623
  */
624
- type: string;
624
+ type: 'party';
625
625
  }
626
626
  }
627
627
  }
@@ -116,7 +116,7 @@ export namespace ApprovalListResponse {
116
116
  /**
117
117
  * Resource type
118
118
  */
119
- type: string;
119
+ type: 'approval';
120
120
  }
121
121
 
122
122
  export namespace Data {
@@ -172,9 +172,9 @@ export namespace ApprovalListResponse {
172
172
  */
173
173
  limitAmount: number;
174
174
 
175
- limitType: string;
175
+ limitType: 'perTransactionAmount';
176
176
 
177
- type: string;
177
+ type: 'limitExceeded';
178
178
  }
179
179
 
180
180
  /**
@@ -189,7 +189,7 @@ export namespace ApprovalListResponse {
189
189
  /**
190
190
  * Product execution type under approval
191
191
  */
192
- type: 'payment' | 'paymentRequestFulfillment' | 'deposit' | 'withdrawal';
192
+ type: 'payment' | 'deposit' | 'withdrawal';
193
193
  }
194
194
  }
195
195
  }
@@ -226,7 +226,7 @@ export namespace ApprovalApproveResponse {
226
226
  /**
227
227
  * Resource type
228
228
  */
229
- type: string;
229
+ type: 'approval';
230
230
  }
231
231
 
232
232
  export namespace Data {
@@ -282,9 +282,9 @@ export namespace ApprovalApproveResponse {
282
282
  */
283
283
  limitAmount: number;
284
284
 
285
- limitType: string;
285
+ limitType: 'perTransactionAmount';
286
286
 
287
- type: string;
287
+ type: 'limitExceeded';
288
288
  }
289
289
 
290
290
  /**
@@ -299,7 +299,7 @@ export namespace ApprovalApproveResponse {
299
299
  /**
300
300
  * Product execution type under approval
301
301
  */
302
- type: 'payment' | 'paymentRequestFulfillment' | 'deposit' | 'withdrawal';
302
+ type: 'payment' | 'deposit' | 'withdrawal';
303
303
  }
304
304
  }
305
305
  }
@@ -324,7 +324,7 @@ export namespace ApprovalDenyResponse {
324
324
  /**
325
325
  * Resource type
326
326
  */
327
- type: string;
327
+ type: 'approval';
328
328
  }
329
329
 
330
330
  export namespace Data {
@@ -380,9 +380,9 @@ export namespace ApprovalDenyResponse {
380
380
  */
381
381
  limitAmount: number;
382
382
 
383
- limitType: string;
383
+ limitType: 'perTransactionAmount';
384
384
 
385
- type: string;
385
+ type: 'limitExceeded';
386
386
  }
387
387
 
388
388
  /**
@@ -397,7 +397,7 @@ export namespace ApprovalDenyResponse {
397
397
  /**
398
398
  * Product execution type under approval
399
399
  */
400
- type: 'payment' | 'paymentRequestFulfillment' | 'deposit' | 'withdrawal';
400
+ type: 'payment' | 'deposit' | 'withdrawal';
401
401
  }
402
402
  }
403
403
  }
@@ -422,7 +422,7 @@ export namespace ApprovalGetResponse {
422
422
  /**
423
423
  * Resource type
424
424
  */
425
- type: string;
425
+ type: 'approval';
426
426
  }
427
427
 
428
428
  export namespace Data {
@@ -478,9 +478,9 @@ export namespace ApprovalGetResponse {
478
478
  */
479
479
  limitAmount: number;
480
480
 
481
- limitType: string;
481
+ limitType: 'perTransactionAmount';
482
482
 
483
- type: string;
483
+ type: 'limitExceeded';
484
484
  }
485
485
 
486
486
  /**
@@ -495,7 +495,7 @@ export namespace ApprovalGetResponse {
495
495
  /**
496
496
  * Product execution type under approval
497
497
  */
498
- type: 'payment' | 'paymentRequestFulfillment' | 'deposit' | 'withdrawal';
498
+ type: 'payment' | 'deposit' | 'withdrawal';
499
499
  }
500
500
  }
501
501
  }
@@ -52,7 +52,7 @@ export namespace CounterpartyListResponse {
52
52
  /**
53
53
  * Resource type
54
54
  */
55
- type: string;
55
+ type: 'party';
56
56
  }
57
57
 
58
58
  export namespace Data {
@@ -82,7 +82,7 @@ export namespace CustomerListResponse {
82
82
  /**
83
83
  * Resource type
84
84
  */
85
- type: string;
85
+ type: 'customer';
86
86
  }
87
87
 
88
88
  export namespace Data {
@@ -150,7 +150,7 @@ export namespace CustomerListResponse {
150
150
  /**
151
151
  * Resource type
152
152
  */
153
- type: string;
153
+ type: 'agent';
154
154
  }
155
155
 
156
156
  export namespace Data {
@@ -221,7 +221,7 @@ export namespace CustomerListResponse {
221
221
  /**
222
222
  * Resource type
223
223
  */
224
- type: string;
224
+ type: 'delegation';
225
225
  }
226
226
 
227
227
  export namespace Data {
@@ -292,7 +292,7 @@ export namespace CustomerGetResponse {
292
292
  /**
293
293
  * Resource type
294
294
  */
295
- type: string;
295
+ type: 'customer';
296
296
  }
297
297
 
298
298
  export namespace Data {
@@ -360,7 +360,7 @@ export namespace CustomerGetResponse {
360
360
  /**
361
361
  * Resource type
362
362
  */
363
- type: string;
363
+ type: 'agent';
364
364
  }
365
365
 
366
366
  export namespace Data {
@@ -431,7 +431,7 @@ export namespace CustomerGetResponse {
431
431
  /**
432
432
  * Resource type
433
433
  */
434
- type: string;
434
+ type: 'delegation';
435
435
  }
436
436
 
437
437
  export namespace Data {
@@ -79,7 +79,7 @@ export namespace ExternalAccountListResponse {
79
79
  /**
80
80
  * Resource type
81
81
  */
82
- type: string;
82
+ type: 'externalAccount';
83
83
  }
84
84
 
85
85
  export namespace Data {
@@ -149,7 +149,7 @@ export namespace ExternalAccountListResponse {
149
149
  /**
150
150
  * Resource type
151
151
  */
152
- type: string;
152
+ type: 'party';
153
153
  }
154
154
  }
155
155
  }
@@ -194,7 +194,7 @@ export namespace ExternalAccountRemoveResponse {
194
194
  /**
195
195
  * Resource type
196
196
  */
197
- type: string;
197
+ type: 'externalAccount';
198
198
  }
199
199
 
200
200
  export namespace Data {
@@ -264,7 +264,7 @@ export namespace ExternalAccountRemoveResponse {
264
264
  /**
265
265
  * Resource type
266
266
  */
267
- type: string;
267
+ type: 'party';
268
268
  }
269
269
  }
270
270
  }
@@ -97,9 +97,11 @@ export {
97
97
  Payments,
98
98
  type PaymentCreateResponse,
99
99
  type PaymentListResponse,
100
+ type PaymentCancelResponse,
100
101
  type PaymentGetResponse,
101
102
  type PaymentCreateParams,
102
103
  type PaymentListParams,
104
+ type PaymentCancelParams,
103
105
  type PaymentGetParams,
104
106
  } from './payments';
105
107
  export {
@@ -125,7 +125,7 @@ export namespace InvitationCreateResponse {
125
125
  /**
126
126
  * Resource type
127
127
  */
128
- type: string;
128
+ type: 'invitation';
129
129
  }
130
130
 
131
131
  export namespace Data {
@@ -214,7 +214,7 @@ export namespace InvitationListResponse {
214
214
  /**
215
215
  * Resource type
216
216
  */
217
- type: string;
217
+ type: 'invitation';
218
218
  }
219
219
 
220
220
  export namespace Data {
@@ -288,7 +288,7 @@ export namespace InvitationRevokeResponse {
288
288
  /**
289
289
  * Resource type
290
290
  */
291
- type: string;
291
+ type: 'invitation';
292
292
  }
293
293
 
294
294
  export namespace Data {
@@ -138,7 +138,7 @@ export namespace PartyUpdateResponse {
138
138
  /**
139
139
  * Resource type
140
140
  */
141
- type: string;
141
+ type: 'party';
142
142
  }
143
143
 
144
144
  export namespace Data {
@@ -253,7 +253,7 @@ export namespace PartyGetResponse {
253
253
  /**
254
254
  * Resource type
255
255
  */
256
- type: string;
256
+ type: 'party';
257
257
  }
258
258
 
259
259
  export namespace Data {
@@ -370,7 +370,7 @@ export namespace PartyListMembersResponse {
370
370
  /**
371
371
  * Resource type
372
372
  */
373
- type: string;
373
+ type: 'user';
374
374
  }
375
375
 
376
376
  export namespace Data {
@@ -449,7 +449,7 @@ export namespace PartyRemoveMemberResponse {
449
449
  /**
450
450
  * Resource type
451
451
  */
452
- type: string;
452
+ type: 'user';
453
453
  }
454
454
 
455
455
  export interface Meta {