dodopayments 2.25.1 → 2.26.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 (117) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/client.d.mts +3 -3
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +3 -3
  5. package/client.d.ts.map +1 -1
  6. package/client.js +1 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs +1 -1
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/balances.d.mts +2 -2
  12. package/resources/balances.d.mts.map +1 -1
  13. package/resources/balances.d.ts +2 -2
  14. package/resources/balances.d.ts.map +1 -1
  15. package/resources/index.d.mts +2 -2
  16. package/resources/index.d.mts.map +1 -1
  17. package/resources/index.d.ts +2 -2
  18. package/resources/index.d.ts.map +1 -1
  19. package/resources/index.js +1 -1
  20. package/resources/index.js.map +1 -1
  21. package/resources/index.mjs +1 -1
  22. package/resources/index.mjs.map +1 -1
  23. package/resources/payouts/breakup/breakup.d.mts +38 -0
  24. package/resources/payouts/breakup/breakup.d.mts.map +1 -0
  25. package/resources/payouts/breakup/breakup.d.ts +38 -0
  26. package/resources/payouts/breakup/breakup.d.ts.map +1 -0
  27. package/resources/payouts/breakup/breakup.js +27 -0
  28. package/resources/payouts/breakup/breakup.js.map +1 -0
  29. package/resources/payouts/breakup/breakup.mjs +22 -0
  30. package/resources/payouts/breakup/breakup.mjs.map +1 -0
  31. package/resources/payouts/breakup/details.d.mts +72 -0
  32. package/resources/payouts/breakup/details.d.mts.map +1 -0
  33. package/resources/payouts/breakup/details.d.ts +72 -0
  34. package/resources/payouts/breakup/details.d.ts.map +1 -0
  35. package/resources/payouts/breakup/details.js +33 -0
  36. package/resources/payouts/breakup/details.js.map +1 -0
  37. package/resources/payouts/breakup/details.mjs +29 -0
  38. package/resources/payouts/breakup/details.mjs.map +1 -0
  39. package/resources/payouts/breakup/index.d.mts +3 -0
  40. package/resources/payouts/breakup/index.d.mts.map +1 -0
  41. package/resources/payouts/breakup/index.d.ts +3 -0
  42. package/resources/payouts/breakup/index.d.ts.map +1 -0
  43. package/resources/payouts/breakup/index.js +9 -0
  44. package/resources/payouts/breakup/index.js.map +1 -0
  45. package/resources/payouts/breakup/index.mjs +4 -0
  46. package/resources/payouts/breakup/index.mjs.map +1 -0
  47. package/resources/payouts/breakup.d.mts +2 -0
  48. package/resources/payouts/breakup.d.mts.map +1 -0
  49. package/resources/payouts/breakup.d.ts +2 -0
  50. package/resources/payouts/breakup.d.ts.map +1 -0
  51. package/resources/payouts/breakup.js +6 -0
  52. package/resources/payouts/breakup.js.map +1 -0
  53. package/resources/payouts/breakup.mjs +3 -0
  54. package/resources/payouts/breakup.mjs.map +1 -0
  55. package/resources/payouts/index.d.mts +3 -0
  56. package/resources/payouts/index.d.mts.map +1 -0
  57. package/resources/payouts/index.d.ts +3 -0
  58. package/resources/payouts/index.d.ts.map +1 -0
  59. package/resources/payouts/index.js +9 -0
  60. package/resources/payouts/index.js.map +1 -0
  61. package/resources/payouts/index.mjs +4 -0
  62. package/resources/payouts/index.mjs.map +1 -0
  63. package/resources/payouts/payouts.d.mts +88 -0
  64. package/resources/payouts/payouts.d.mts.map +1 -0
  65. package/resources/payouts/payouts.d.ts +88 -0
  66. package/resources/payouts/payouts.d.ts.map +1 -0
  67. package/resources/payouts/payouts.js +24 -0
  68. package/resources/payouts/payouts.js.map +1 -0
  69. package/resources/payouts/payouts.mjs +19 -0
  70. package/resources/payouts/payouts.mjs.map +1 -0
  71. package/resources/payouts.d.mts +1 -83
  72. package/resources/payouts.d.mts.map +1 -1
  73. package/resources/payouts.d.ts +1 -83
  74. package/resources/payouts.d.ts.map +1 -1
  75. package/resources/payouts.js +2 -12
  76. package/resources/payouts.js.map +1 -1
  77. package/resources/payouts.mjs +1 -10
  78. package/resources/payouts.mjs.map +1 -1
  79. package/resources/subscriptions.d.mts +1 -0
  80. package/resources/subscriptions.d.mts.map +1 -1
  81. package/resources/subscriptions.d.ts +1 -0
  82. package/resources/subscriptions.d.ts.map +1 -1
  83. package/resources/webhook-events.d.mts +20 -2
  84. package/resources/webhook-events.d.mts.map +1 -1
  85. package/resources/webhook-events.d.ts +20 -2
  86. package/resources/webhook-events.d.ts.map +1 -1
  87. package/resources/webhooks/index.d.mts +1 -1
  88. package/resources/webhooks/index.d.mts.map +1 -1
  89. package/resources/webhooks/index.d.ts +1 -1
  90. package/resources/webhooks/index.d.ts.map +1 -1
  91. package/resources/webhooks/index.js.map +1 -1
  92. package/resources/webhooks/index.mjs.map +1 -1
  93. package/resources/webhooks/webhooks.d.mts +259 -3
  94. package/resources/webhooks/webhooks.d.mts.map +1 -1
  95. package/resources/webhooks/webhooks.d.ts +259 -3
  96. package/resources/webhooks/webhooks.d.ts.map +1 -1
  97. package/resources/webhooks/webhooks.js.map +1 -1
  98. package/resources/webhooks/webhooks.mjs.map +1 -1
  99. package/src/client.ts +14 -6
  100. package/src/resources/balances.ts +6 -2
  101. package/src/resources/index.ts +5 -1
  102. package/src/resources/payouts/breakup/breakup.ts +61 -0
  103. package/src/resources/payouts/breakup/details.ts +111 -0
  104. package/src/resources/payouts/breakup/index.ts +9 -0
  105. package/src/resources/payouts/breakup.ts +3 -0
  106. package/src/resources/payouts/index.ts +9 -0
  107. package/src/resources/payouts/payouts.ts +129 -0
  108. package/src/resources/payouts.ts +1 -119
  109. package/src/resources/subscriptions.ts +6 -0
  110. package/src/resources/webhook-events.ts +42 -2
  111. package/src/resources/webhooks/index.ts +4 -0
  112. package/src/resources/webhooks/webhooks.ts +348 -0
  113. package/src/version.ts +1 -1
  114. package/version.d.mts +1 -1
  115. package/version.d.ts +1 -1
  116. package/version.js +1 -1
  117. package/version.mjs +1 -1
@@ -143,6 +143,92 @@ export interface WebhookRetrieveSecretResponse {
143
143
  secret: string;
144
144
  }
145
145
 
146
+ export interface AbandonedCheckoutDetectedWebhookEvent {
147
+ /**
148
+ * The business identifier
149
+ */
150
+ business_id: string;
151
+
152
+ /**
153
+ * Webhook payload for abandoned_checkout.detected and abandoned_checkout.recovered
154
+ * events
155
+ */
156
+ data: AbandonedCheckoutDetectedWebhookEvent.Data;
157
+
158
+ /**
159
+ * The timestamp of when the event occurred
160
+ */
161
+ timestamp: string;
162
+
163
+ /**
164
+ * The event type
165
+ */
166
+ type: 'abandoned_checkout.detected';
167
+ }
168
+
169
+ export namespace AbandonedCheckoutDetectedWebhookEvent {
170
+ /**
171
+ * Webhook payload for abandoned_checkout.detected and abandoned_checkout.recovered
172
+ * events
173
+ */
174
+ export interface Data {
175
+ abandoned_at: string;
176
+
177
+ abandonment_reason: 'payment_failed' | 'checkout_incomplete';
178
+
179
+ customer_id: string;
180
+
181
+ payment_id: string;
182
+
183
+ status: 'abandoned' | 'recovering' | 'recovered' | 'exhausted' | 'opted_out';
184
+
185
+ recovered_payment_id?: string | null;
186
+ }
187
+ }
188
+
189
+ export interface AbandonedCheckoutRecoveredWebhookEvent {
190
+ /**
191
+ * The business identifier
192
+ */
193
+ business_id: string;
194
+
195
+ /**
196
+ * Webhook payload for abandoned_checkout.detected and abandoned_checkout.recovered
197
+ * events
198
+ */
199
+ data: AbandonedCheckoutRecoveredWebhookEvent.Data;
200
+
201
+ /**
202
+ * The timestamp of when the event occurred
203
+ */
204
+ timestamp: string;
205
+
206
+ /**
207
+ * The event type
208
+ */
209
+ type: 'abandoned_checkout.recovered';
210
+ }
211
+
212
+ export namespace AbandonedCheckoutRecoveredWebhookEvent {
213
+ /**
214
+ * Webhook payload for abandoned_checkout.detected and abandoned_checkout.recovered
215
+ * events
216
+ */
217
+ export interface Data {
218
+ abandoned_at: string;
219
+
220
+ abandonment_reason: 'payment_failed' | 'checkout_incomplete';
221
+
222
+ customer_id: string;
223
+
224
+ payment_id: string;
225
+
226
+ status: 'abandoned' | 'recovering' | 'recovered' | 'exhausted' | 'opted_out';
227
+
228
+ recovered_payment_id?: string | null;
229
+ }
230
+ }
231
+
146
232
  export interface CreditAddedWebhookEvent {
147
233
  /**
148
234
  * The business identifier
@@ -475,6 +561,88 @@ export interface DisputeWonWebhookEvent {
475
561
  type: 'dispute.won';
476
562
  }
477
563
 
564
+ export interface DunningRecoveredWebhookEvent {
565
+ /**
566
+ * The business identifier
567
+ */
568
+ business_id: string;
569
+
570
+ /**
571
+ * Webhook payload for dunning.started and dunning.recovered events
572
+ */
573
+ data: DunningRecoveredWebhookEvent.Data;
574
+
575
+ /**
576
+ * The timestamp of when the event occurred
577
+ */
578
+ timestamp: string;
579
+
580
+ /**
581
+ * The event type
582
+ */
583
+ type: 'dunning.recovered';
584
+ }
585
+
586
+ export namespace DunningRecoveredWebhookEvent {
587
+ /**
588
+ * Webhook payload for dunning.started and dunning.recovered events
589
+ */
590
+ export interface Data {
591
+ created_at: string;
592
+
593
+ customer_id: string;
594
+
595
+ status: 'recovering' | 'recovered' | 'exhausted';
596
+
597
+ subscription_id: string;
598
+
599
+ trigger_state: 'on_hold' | 'cancelled';
600
+
601
+ payment_id?: string | null;
602
+ }
603
+ }
604
+
605
+ export interface DunningStartedWebhookEvent {
606
+ /**
607
+ * The business identifier
608
+ */
609
+ business_id: string;
610
+
611
+ /**
612
+ * Webhook payload for dunning.started and dunning.recovered events
613
+ */
614
+ data: DunningStartedWebhookEvent.Data;
615
+
616
+ /**
617
+ * The timestamp of when the event occurred
618
+ */
619
+ timestamp: string;
620
+
621
+ /**
622
+ * The event type
623
+ */
624
+ type: 'dunning.started';
625
+ }
626
+
627
+ export namespace DunningStartedWebhookEvent {
628
+ /**
629
+ * Webhook payload for dunning.started and dunning.recovered events
630
+ */
631
+ export interface Data {
632
+ created_at: string;
633
+
634
+ customer_id: string;
635
+
636
+ status: 'recovering' | 'recovered' | 'exhausted';
637
+
638
+ subscription_id: string;
639
+
640
+ trigger_state: 'on_hold' | 'cancelled';
641
+
642
+ payment_id?: string | null;
643
+ }
644
+ }
645
+
478
646
  export interface LicenseKeyCreatedWebhookEvent {
479
647
  /**
480
648
  * The business identifier
@@ -784,6 +952,92 @@ export interface SubscriptionUpdatedWebhookEvent {
784
952
  type: 'subscription.updated';
785
953
  }
786
954
 
955
+ export interface AbandonedCheckoutDetectedWebhookEvent {
956
+ /**
957
+ * The business identifier
958
+ */
959
+ business_id: string;
960
+
961
+ /**
962
+ * Webhook payload for abandoned_checkout.detected and abandoned_checkout.recovered
963
+ * events
964
+ */
965
+ data: AbandonedCheckoutDetectedWebhookEvent.Data;
966
+
967
+ /**
968
+ * The timestamp of when the event occurred
969
+ */
970
+ timestamp: string;
971
+
972
+ /**
973
+ * The event type
974
+ */
975
+ type: 'abandoned_checkout.detected';
976
+ }
977
+
978
+ export namespace AbandonedCheckoutDetectedWebhookEvent {
979
+ /**
980
+ * Webhook payload for abandoned_checkout.detected and abandoned_checkout.recovered
981
+ * events
982
+ */
983
+ export interface Data {
984
+ abandoned_at: string;
985
+
986
+ abandonment_reason: 'payment_failed' | 'checkout_incomplete';
987
+
988
+ customer_id: string;
989
+
990
+ payment_id: string;
991
+
992
+ status: 'abandoned' | 'recovering' | 'recovered' | 'exhausted' | 'opted_out';
993
+
994
+ recovered_payment_id?: string | null;
995
+ }
996
+ }
997
+
998
+ export interface AbandonedCheckoutRecoveredWebhookEvent {
999
+ /**
1000
+ * The business identifier
1001
+ */
1002
+ business_id: string;
1003
+
1004
+ /**
1005
+ * Webhook payload for abandoned_checkout.detected and abandoned_checkout.recovered
1006
+ * events
1007
+ */
1008
+ data: AbandonedCheckoutRecoveredWebhookEvent.Data;
1009
+
1010
+ /**
1011
+ * The timestamp of when the event occurred
1012
+ */
1013
+ timestamp: string;
1014
+
1015
+ /**
1016
+ * The event type
1017
+ */
1018
+ type: 'abandoned_checkout.recovered';
1019
+ }
1020
+
1021
+ export namespace AbandonedCheckoutRecoveredWebhookEvent {
1022
+ /**
1023
+ * Webhook payload for abandoned_checkout.detected and abandoned_checkout.recovered
1024
+ * events
1025
+ */
1026
+ export interface Data {
1027
+ abandoned_at: string;
1028
+
1029
+ abandonment_reason: 'payment_failed' | 'checkout_incomplete';
1030
+
1031
+ customer_id: string;
1032
+
1033
+ payment_id: string;
1034
+
1035
+ status: 'abandoned' | 'recovering' | 'recovered' | 'exhausted' | 'opted_out';
1036
+
1037
+ recovered_payment_id?: string | null;
1038
+ }
1039
+ }
1040
+
787
1041
  export interface CreditAddedWebhookEvent {
788
1042
  /**
789
1043
  * The business identifier
@@ -1116,6 +1370,88 @@ export interface DisputeWonWebhookEvent {
1116
1370
  type: 'dispute.won';
1117
1371
  }
1118
1372
 
1373
+ export interface DunningRecoveredWebhookEvent {
1374
+ /**
1375
+ * The business identifier
1376
+ */
1377
+ business_id: string;
1378
+
1379
+ /**
1380
+ * Webhook payload for dunning.started and dunning.recovered events
1381
+ */
1382
+ data: DunningRecoveredWebhookEvent.Data;
1383
+
1384
+ /**
1385
+ * The timestamp of when the event occurred
1386
+ */
1387
+ timestamp: string;
1388
+
1389
+ /**
1390
+ * The event type
1391
+ */
1392
+ type: 'dunning.recovered';
1393
+ }
1394
+
1395
+ export namespace DunningRecoveredWebhookEvent {
1396
+ /**
1397
+ * Webhook payload for dunning.started and dunning.recovered events
1398
+ */
1399
+ export interface Data {
1400
+ created_at: string;
1401
+
1402
+ customer_id: string;
1403
+
1404
+ status: 'recovering' | 'recovered' | 'exhausted';
1405
+
1406
+ subscription_id: string;
1407
+
1408
+ trigger_state: 'on_hold' | 'cancelled';
1409
+
1410
+ payment_id?: string | null;
1411
+ }
1412
+ }
1413
+
1414
+ export interface DunningStartedWebhookEvent {
1415
+ /**
1416
+ * The business identifier
1417
+ */
1418
+ business_id: string;
1419
+
1420
+ /**
1421
+ * Webhook payload for dunning.started and dunning.recovered events
1422
+ */
1423
+ data: DunningStartedWebhookEvent.Data;
1424
+
1425
+ /**
1426
+ * The timestamp of when the event occurred
1427
+ */
1428
+ timestamp: string;
1429
+
1430
+ /**
1431
+ * The event type
1432
+ */
1433
+ type: 'dunning.started';
1434
+ }
1435
+
1436
+ export namespace DunningStartedWebhookEvent {
1437
+ /**
1438
+ * Webhook payload for dunning.started and dunning.recovered events
1439
+ */
1440
+ export interface Data {
1441
+ created_at: string;
1442
+
1443
+ customer_id: string;
1444
+
1445
+ status: 'recovering' | 'recovered' | 'exhausted';
1446
+
1447
+ subscription_id: string;
1448
+
1449
+ trigger_state: 'on_hold' | 'cancelled';
1450
+
1451
+ payment_id?: string | null;
1452
+ }
1453
+ }
1454
+
1119
1455
  export interface LicenseKeyCreatedWebhookEvent {
1120
1456
  /**
1121
1457
  * The business identifier
@@ -1426,6 +1762,8 @@ export interface SubscriptionUpdatedWebhookEvent {
1426
1762
  }
1427
1763
 
1428
1764
  export type UnsafeUnwrapWebhookEvent =
1765
+ | AbandonedCheckoutDetectedWebhookEvent
1766
+ | AbandonedCheckoutRecoveredWebhookEvent
1429
1767
  | CreditAddedWebhookEvent
1430
1768
  | CreditBalanceLowWebhookEvent
1431
1769
  | CreditDeductedWebhookEvent
@@ -1441,6 +1779,8 @@ export type UnsafeUnwrapWebhookEvent =
1441
1779
  | DisputeLostWebhookEvent
1442
1780
  | DisputeOpenedWebhookEvent
1443
1781
  | DisputeWonWebhookEvent
1782
+ | DunningRecoveredWebhookEvent
1783
+ | DunningStartedWebhookEvent
1444
1784
  | LicenseKeyCreatedWebhookEvent
1445
1785
  | PaymentCancelledWebhookEvent
1446
1786
  | PaymentFailedWebhookEvent
@@ -1458,6 +1798,8 @@ export type UnsafeUnwrapWebhookEvent =
1458
1798
  | SubscriptionUpdatedWebhookEvent;
1459
1799
 
1460
1800
  export type UnwrapWebhookEvent =
1801
+ | AbandonedCheckoutDetectedWebhookEvent
1802
+ | AbandonedCheckoutRecoveredWebhookEvent
1461
1803
  | CreditAddedWebhookEvent
1462
1804
  | CreditBalanceLowWebhookEvent
1463
1805
  | CreditDeductedWebhookEvent
@@ -1473,6 +1815,8 @@ export type UnwrapWebhookEvent =
1473
1815
  | DisputeLostWebhookEvent
1474
1816
  | DisputeOpenedWebhookEvent
1475
1817
  | DisputeWonWebhookEvent
1818
+ | DunningRecoveredWebhookEvent
1819
+ | DunningStartedWebhookEvent
1476
1820
  | LicenseKeyCreatedWebhookEvent
1477
1821
  | PaymentCancelledWebhookEvent
1478
1822
  | PaymentFailedWebhookEvent
@@ -1571,6 +1915,8 @@ export declare namespace Webhooks {
1571
1915
  export {
1572
1916
  type WebhookDetails as WebhookDetails,
1573
1917
  type WebhookRetrieveSecretResponse as WebhookRetrieveSecretResponse,
1918
+ type AbandonedCheckoutDetectedWebhookEvent as AbandonedCheckoutDetectedWebhookEvent,
1919
+ type AbandonedCheckoutRecoveredWebhookEvent as AbandonedCheckoutRecoveredWebhookEvent,
1574
1920
  type CreditAddedWebhookEvent as CreditAddedWebhookEvent,
1575
1921
  type CreditBalanceLowWebhookEvent as CreditBalanceLowWebhookEvent,
1576
1922
  type CreditDeductedWebhookEvent as CreditDeductedWebhookEvent,
@@ -1586,6 +1932,8 @@ export declare namespace Webhooks {
1586
1932
  type DisputeLostWebhookEvent as DisputeLostWebhookEvent,
1587
1933
  type DisputeOpenedWebhookEvent as DisputeOpenedWebhookEvent,
1588
1934
  type DisputeWonWebhookEvent as DisputeWonWebhookEvent,
1935
+ type DunningRecoveredWebhookEvent as DunningRecoveredWebhookEvent,
1936
+ type DunningStartedWebhookEvent as DunningStartedWebhookEvent,
1589
1937
  type LicenseKeyCreatedWebhookEvent as LicenseKeyCreatedWebhookEvent,
1590
1938
  type PaymentCancelledWebhookEvent as PaymentCancelledWebhookEvent,
1591
1939
  type PaymentFailedWebhookEvent as PaymentFailedWebhookEvent,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '2.25.1'; // x-release-please-version
1
+ export const VERSION = '2.26.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.25.1";
1
+ export declare const VERSION = "2.26.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.25.1";
1
+ export declare const VERSION = "2.26.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '2.25.1'; // x-release-please-version
4
+ exports.VERSION = '2.26.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '2.25.1'; // x-release-please-version
1
+ export const VERSION = '2.26.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map