@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.
Files changed (135) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/client.d.mts +6 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -6
  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/account-programs.d.mts +21 -16
  10. package/resources/account-programs.d.mts.map +1 -1
  11. package/resources/account-programs.d.ts +21 -16
  12. package/resources/account-programs.d.ts.map +1 -1
  13. package/resources/account-programs.js +2 -2
  14. package/resources/account-programs.js.map +1 -1
  15. package/resources/account-programs.mjs +2 -2
  16. package/resources/account-programs.mjs.map +1 -1
  17. package/resources/accounts.d.mts +21 -6
  18. package/resources/accounts.d.mts.map +1 -1
  19. package/resources/accounts.d.ts +21 -6
  20. package/resources/accounts.d.ts.map +1 -1
  21. package/resources/accounts.js +2 -2
  22. package/resources/accounts.js.map +1 -1
  23. package/resources/accounts.mjs +2 -2
  24. package/resources/accounts.mjs.map +1 -1
  25. package/resources/counterparties.d.mts +16 -16
  26. package/resources/counterparties.d.mts.map +1 -1
  27. package/resources/counterparties.d.ts +16 -16
  28. package/resources/counterparties.d.ts.map +1 -1
  29. package/resources/deposits.d.mts +10 -0
  30. package/resources/deposits.d.mts.map +1 -1
  31. package/resources/deposits.d.ts +10 -0
  32. package/resources/deposits.d.ts.map +1 -1
  33. package/resources/events.d.mts +3 -3
  34. package/resources/events.d.mts.map +1 -1
  35. package/resources/events.d.ts +3 -3
  36. package/resources/events.d.ts.map +1 -1
  37. package/resources/index.d.mts +3 -3
  38. package/resources/index.d.mts.map +1 -1
  39. package/resources/index.d.ts +3 -3
  40. package/resources/index.d.ts.map +1 -1
  41. package/resources/index.js.map +1 -1
  42. package/resources/index.mjs.map +1 -1
  43. package/resources/payouts.d.mts +22 -406
  44. package/resources/payouts.d.mts.map +1 -1
  45. package/resources/payouts.d.ts +22 -406
  46. package/resources/payouts.d.ts.map +1 -1
  47. package/resources/payouts.js +2 -4
  48. package/resources/payouts.js.map +1 -1
  49. package/resources/payouts.mjs +2 -4
  50. package/resources/payouts.mjs.map +1 -1
  51. package/resources/simulations/account-programs.d.mts +9 -75
  52. package/resources/simulations/account-programs.d.mts.map +1 -1
  53. package/resources/simulations/account-programs.d.ts +9 -75
  54. package/resources/simulations/account-programs.d.ts.map +1 -1
  55. package/resources/simulations/account-programs.js +0 -2
  56. package/resources/simulations/account-programs.js.map +1 -1
  57. package/resources/simulations/account-programs.mjs +0 -2
  58. package/resources/simulations/account-programs.mjs.map +1 -1
  59. package/resources/simulations/accounts.d.mts +9 -70
  60. package/resources/simulations/accounts.d.mts.map +1 -1
  61. package/resources/simulations/accounts.d.ts +9 -70
  62. package/resources/simulations/accounts.d.ts.map +1 -1
  63. package/resources/simulations/accounts.js +0 -1
  64. package/resources/simulations/accounts.js.map +1 -1
  65. package/resources/simulations/accounts.mjs +0 -1
  66. package/resources/simulations/accounts.mjs.map +1 -1
  67. package/resources/simulations/conversions.d.mts +54 -0
  68. package/resources/simulations/conversions.d.mts.map +1 -0
  69. package/resources/simulations/conversions.d.ts +54 -0
  70. package/resources/simulations/conversions.d.ts.map +1 -0
  71. package/resources/simulations/conversions.js +39 -0
  72. package/resources/simulations/conversions.js.map +1 -0
  73. package/resources/simulations/conversions.mjs +35 -0
  74. package/resources/simulations/conversions.mjs.map +1 -0
  75. package/resources/simulations/deposits.d.mts +14 -30
  76. package/resources/simulations/deposits.d.mts.map +1 -1
  77. package/resources/simulations/deposits.d.ts +14 -30
  78. package/resources/simulations/deposits.d.ts.map +1 -1
  79. package/resources/simulations/index.d.mts +1 -0
  80. package/resources/simulations/index.d.mts.map +1 -1
  81. package/resources/simulations/index.d.ts +1 -0
  82. package/resources/simulations/index.d.ts.map +1 -1
  83. package/resources/simulations/index.js +3 -1
  84. package/resources/simulations/index.js.map +1 -1
  85. package/resources/simulations/index.mjs +1 -0
  86. package/resources/simulations/index.mjs.map +1 -1
  87. package/resources/simulations/payouts.d.mts +4 -18
  88. package/resources/simulations/payouts.d.mts.map +1 -1
  89. package/resources/simulations/payouts.d.ts +4 -18
  90. package/resources/simulations/payouts.d.ts.map +1 -1
  91. package/resources/simulations/simulations.d.mts +4 -0
  92. package/resources/simulations/simulations.d.mts.map +1 -1
  93. package/resources/simulations/simulations.d.ts +4 -0
  94. package/resources/simulations/simulations.d.ts.map +1 -1
  95. package/resources/simulations/simulations.js +4 -0
  96. package/resources/simulations/simulations.js.map +1 -1
  97. package/resources/simulations/simulations.mjs +4 -0
  98. package/resources/simulations/simulations.mjs.map +1 -1
  99. package/resources/transactions.d.mts +60 -0
  100. package/resources/transactions.d.mts.map +1 -1
  101. package/resources/transactions.d.ts +60 -0
  102. package/resources/transactions.d.ts.map +1 -1
  103. package/resources/webhook-subscriptions.d.mts +9 -9
  104. package/resources/webhook-subscriptions.d.mts.map +1 -1
  105. package/resources/webhook-subscriptions.d.ts +9 -9
  106. package/resources/webhook-subscriptions.d.ts.map +1 -1
  107. package/resources/webhook-subscriptions.js +1 -1
  108. package/resources/webhook-subscriptions.mjs +1 -1
  109. package/resources/webhooks.d.mts +245 -30
  110. package/resources/webhooks.d.mts.map +1 -1
  111. package/resources/webhooks.d.ts +245 -30
  112. package/resources/webhooks.d.ts.map +1 -1
  113. package/src/client.ts +16 -8
  114. package/src/resources/account-programs.ts +29 -18
  115. package/src/resources/accounts.ts +29 -6
  116. package/src/resources/counterparties.ts +16 -16
  117. package/src/resources/deposits.ts +12 -0
  118. package/src/resources/events.ts +18 -12
  119. package/src/resources/index.ts +8 -4
  120. package/src/resources/payouts.ts +36 -1993
  121. package/src/resources/simulations/account-programs.ts +10 -91
  122. package/src/resources/simulations/accounts.ts +10 -85
  123. package/src/resources/simulations/conversions.ts +70 -0
  124. package/src/resources/simulations/deposits.ts +27 -35
  125. package/src/resources/simulations/index.ts +1 -0
  126. package/src/resources/simulations/payouts.ts +4 -22
  127. package/src/resources/simulations/simulations.ts +10 -0
  128. package/src/resources/transactions.ts +70 -0
  129. package/src/resources/webhook-subscriptions.ts +49 -33
  130. package/src/resources/webhooks.ts +360 -36
  131. package/src/version.ts +1 -1
  132. package/version.d.mts +1 -1
  133. package/version.d.ts +1 -1
  134. package/version.js +1 -1
  135. package/version.mjs +1 -1
@@ -56,6 +56,13 @@ export interface TransactionRetrieveResponse {
56
56
  */
57
57
  counterparty: TransactionRetrieveResponse.Counterparty | null;
58
58
 
59
+ /**
60
+ * ID of the counterparty this transaction is associated with, or null when none
61
+ * was resolved. Correlates with the counterparties API and a payout's
62
+ * counterparty_id.
63
+ */
64
+ counterparty_id: string | null;
65
+
59
66
  /**
60
67
  * Currency code (ISO 4217 or crypto).
61
68
  */
@@ -88,11 +95,23 @@ export interface TransactionRetrieveResponse {
88
95
  */
89
96
  side: 'credit' | 'debit';
90
97
 
98
+ /**
99
+ * The resource that originated this transaction, or null when it does not map to a
100
+ * retrievable resource.
101
+ */
102
+ source: TransactionRetrieveResponse.Source | null;
103
+
91
104
  /**
92
105
  * State of the transaction. Transactions are by definition booked.
93
106
  */
94
107
  status: 'booked';
95
108
 
109
+ /**
110
+ * Reference used to track the payment across the payment network, such as the UETR
111
+ * for SWIFT payments.
112
+ */
113
+ tracking_reference: string | null;
114
+
96
115
  /**
97
116
  * Transaction hash for crypto transactions, or null when not known. Only
98
117
  * blockchain rails support this field.
@@ -537,6 +556,22 @@ export namespace TransactionRetrieveResponse {
537
556
  state: string | null;
538
557
  }
539
558
  }
559
+
560
+ /**
561
+ * The resource that originated this transaction, or null when it does not map to a
562
+ * retrievable resource.
563
+ */
564
+ export interface Source {
565
+ /**
566
+ * Identifier of the originating resource, retrievable on its own endpoint.
567
+ */
568
+ id: string;
569
+
570
+ /**
571
+ * Type of the resource that originated this transaction.
572
+ */
573
+ type: 'deposit' | 'payout' | 'return';
574
+ }
540
575
  }
541
576
 
542
577
  export interface TransactionListResponse {
@@ -565,6 +600,13 @@ export interface TransactionListResponse {
565
600
  */
566
601
  counterparty: TransactionListResponse.Counterparty | null;
567
602
 
603
+ /**
604
+ * ID of the counterparty this transaction is associated with, or null when none
605
+ * was resolved. Correlates with the counterparties API and a payout's
606
+ * counterparty_id.
607
+ */
608
+ counterparty_id: string | null;
609
+
568
610
  /**
569
611
  * Currency code (ISO 4217 or crypto).
570
612
  */
@@ -597,11 +639,23 @@ export interface TransactionListResponse {
597
639
  */
598
640
  side: 'credit' | 'debit';
599
641
 
642
+ /**
643
+ * The resource that originated this transaction, or null when it does not map to a
644
+ * retrievable resource.
645
+ */
646
+ source: TransactionListResponse.Source | null;
647
+
600
648
  /**
601
649
  * State of the transaction. Transactions are by definition booked.
602
650
  */
603
651
  status: 'booked';
604
652
 
653
+ /**
654
+ * Reference used to track the payment across the payment network, such as the UETR
655
+ * for SWIFT payments.
656
+ */
657
+ tracking_reference: string | null;
658
+
605
659
  /**
606
660
  * Transaction hash for crypto transactions, or null when not known. Only
607
661
  * blockchain rails support this field.
@@ -1046,6 +1100,22 @@ export namespace TransactionListResponse {
1046
1100
  state: string | null;
1047
1101
  }
1048
1102
  }
1103
+
1104
+ /**
1105
+ * The resource that originated this transaction, or null when it does not map to a
1106
+ * retrievable resource.
1107
+ */
1108
+ export interface Source {
1109
+ /**
1110
+ * Identifier of the originating resource, retrievable on its own endpoint.
1111
+ */
1112
+ id: string;
1113
+
1114
+ /**
1115
+ * Type of the resource that originated this transaction.
1116
+ */
1117
+ type: 'deposit' | 'payout' | 'return';
1118
+ }
1049
1119
  }
1050
1120
 
1051
1121
  export interface TransactionListParams extends CursorPageParams {
@@ -14,7 +14,7 @@ export class WebhookSubscriptions extends APIResource {
14
14
  * ```ts
15
15
  * const webhookSubscription =
16
16
  * await client.webhookSubscriptions.create({
17
- * events: ['payout.paid'],
17
+ * events: ['payout.sent'],
18
18
  * url: 'https://sandbox.example.com/webhooks/augustus',
19
19
  * });
20
20
  * ```
@@ -133,15 +133,17 @@ export interface WebhookSubscriptionCreateResponse {
133
133
  * Event types this subscription receives.
134
134
  */
135
135
  events: Array<
136
- | 'payout.created'
137
136
  | 'payout.initiated'
138
- | 'payout.paid'
137
+ | 'payout.submitted'
138
+ | 'payout.sent'
139
139
  | 'payout.failed'
140
+ | 'payout.returned'
140
141
  | 'return.initiated'
141
- | 'return.paid'
142
+ | 'return.submitted'
143
+ | 'return.sent'
142
144
  | 'return.failed'
143
145
  | 'return.returned'
144
- | 'deposit.received'
146
+ | 'deposit.settled'
145
147
  | 'conversion.created'
146
148
  | 'conversion.completed'
147
149
  | 'conversion.failed'
@@ -180,15 +182,17 @@ export interface WebhookSubscriptionRetrieveResponse {
180
182
  * Event types this subscription receives.
181
183
  */
182
184
  events: Array<
183
- | 'payout.created'
184
185
  | 'payout.initiated'
185
- | 'payout.paid'
186
+ | 'payout.submitted'
187
+ | 'payout.sent'
186
188
  | 'payout.failed'
189
+ | 'payout.returned'
187
190
  | 'return.initiated'
188
- | 'return.paid'
191
+ | 'return.submitted'
192
+ | 'return.sent'
189
193
  | 'return.failed'
190
194
  | 'return.returned'
191
- | 'deposit.received'
195
+ | 'deposit.settled'
192
196
  | 'conversion.created'
193
197
  | 'conversion.completed'
194
198
  | 'conversion.failed'
@@ -227,15 +231,17 @@ export interface WebhookSubscriptionUpdateResponse {
227
231
  * Event types this subscription receives.
228
232
  */
229
233
  events: Array<
230
- | 'payout.created'
231
234
  | 'payout.initiated'
232
- | 'payout.paid'
235
+ | 'payout.submitted'
236
+ | 'payout.sent'
233
237
  | 'payout.failed'
238
+ | 'payout.returned'
234
239
  | 'return.initiated'
235
- | 'return.paid'
240
+ | 'return.submitted'
241
+ | 'return.sent'
236
242
  | 'return.failed'
237
243
  | 'return.returned'
238
- | 'deposit.received'
244
+ | 'deposit.settled'
239
245
  | 'conversion.created'
240
246
  | 'conversion.completed'
241
247
  | 'conversion.failed'
@@ -274,15 +280,17 @@ export interface WebhookSubscriptionListResponse {
274
280
  * Event types this subscription receives.
275
281
  */
276
282
  events: Array<
277
- | 'payout.created'
278
283
  | 'payout.initiated'
279
- | 'payout.paid'
284
+ | 'payout.submitted'
285
+ | 'payout.sent'
280
286
  | 'payout.failed'
287
+ | 'payout.returned'
281
288
  | 'return.initiated'
282
- | 'return.paid'
289
+ | 'return.submitted'
290
+ | 'return.sent'
283
291
  | 'return.failed'
284
292
  | 'return.returned'
285
- | 'deposit.received'
293
+ | 'deposit.settled'
286
294
  | 'conversion.created'
287
295
  | 'conversion.completed'
288
296
  | 'conversion.failed'
@@ -321,15 +329,17 @@ export interface WebhookSubscriptionDeleteResponse {
321
329
  * Event types this subscription receives.
322
330
  */
323
331
  events: Array<
324
- | 'payout.created'
325
332
  | 'payout.initiated'
326
- | 'payout.paid'
333
+ | 'payout.submitted'
334
+ | 'payout.sent'
327
335
  | 'payout.failed'
336
+ | 'payout.returned'
328
337
  | 'return.initiated'
329
- | 'return.paid'
338
+ | 'return.submitted'
339
+ | 'return.sent'
330
340
  | 'return.failed'
331
341
  | 'return.returned'
332
- | 'deposit.received'
342
+ | 'deposit.settled'
333
343
  | 'conversion.created'
334
344
  | 'conversion.completed'
335
345
  | 'conversion.failed'
@@ -380,15 +390,17 @@ export interface WebhookSubscriptionSendTestEventResponse {
380
390
  * Event type.
381
391
  */
382
392
  event_type:
383
- | 'payout.created'
384
393
  | 'payout.initiated'
385
- | 'payout.paid'
394
+ | 'payout.submitted'
395
+ | 'payout.sent'
386
396
  | 'payout.failed'
397
+ | 'payout.returned'
387
398
  | 'return.initiated'
388
- | 'return.paid'
399
+ | 'return.submitted'
400
+ | 'return.sent'
389
401
  | 'return.failed'
390
402
  | 'return.returned'
391
- | 'deposit.received'
403
+ | 'deposit.settled'
392
404
  | 'conversion.created'
393
405
  | 'conversion.completed'
394
406
  | 'conversion.failed'
@@ -407,15 +419,17 @@ export interface WebhookSubscriptionCreateParams {
407
419
  * Event types to subscribe to. Use ["*"] for all events.
408
420
  */
409
421
  events: Array<
410
- | 'payout.created'
411
422
  | 'payout.initiated'
412
- | 'payout.paid'
423
+ | 'payout.submitted'
424
+ | 'payout.sent'
413
425
  | 'payout.failed'
426
+ | 'payout.returned'
414
427
  | 'return.initiated'
415
- | 'return.paid'
428
+ | 'return.submitted'
429
+ | 'return.sent'
416
430
  | 'return.failed'
417
431
  | 'return.returned'
418
- | 'deposit.received'
432
+ | 'deposit.settled'
419
433
  | 'conversion.created'
420
434
  | 'conversion.completed'
421
435
  | 'conversion.failed'
@@ -436,15 +450,17 @@ export interface WebhookSubscriptionUpdateParams {
436
450
  * events.
437
451
  */
438
452
  events?: Array<
439
- | 'payout.created'
440
453
  | 'payout.initiated'
441
- | 'payout.paid'
454
+ | 'payout.submitted'
455
+ | 'payout.sent'
442
456
  | 'payout.failed'
457
+ | 'payout.returned'
443
458
  | 'return.initiated'
444
- | 'return.paid'
459
+ | 'return.submitted'
460
+ | 'return.sent'
445
461
  | 'return.failed'
446
462
  | 'return.returned'
447
- | 'deposit.received'
463
+ | 'deposit.settled'
448
464
  | 'conversion.created'
449
465
  | 'conversion.completed'
450
466
  | 'conversion.failed'