@paddle/paddle-node-sdk 0.2.0 → 0.2.2

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 (201) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +90 -11
  3. package/dist/entities/discount/discount.d.ts +1 -1
  4. package/dist/entities/discount/discount.js +2 -1
  5. package/dist/entities/events/event-collection.d.ts +6 -0
  6. package/dist/entities/events/event-collection.js +11 -0
  7. package/dist/entities/events/event.d.ts +9 -0
  8. package/dist/entities/events/event.js +14 -0
  9. package/dist/entities/events/index.d.ts +1 -0
  10. package/dist/entities/events/index.js +17 -0
  11. package/dist/entities/index.d.ts +2 -0
  12. package/dist/entities/index.js +2 -0
  13. package/dist/entities/payout/index.d.ts +1 -0
  14. package/dist/entities/payout/index.js +17 -0
  15. package/dist/entities/payout/payout.d.ts +9 -0
  16. package/dist/entities/payout/payout.js +12 -0
  17. package/dist/entities/pricing-preview/index.d.ts +4 -0
  18. package/dist/entities/pricing-preview/index.js +20 -0
  19. package/dist/entities/pricing-preview/pricing-preview-details.d.ts +6 -0
  20. package/dist/entities/pricing-preview/pricing-preview-details.js +10 -0
  21. package/dist/entities/pricing-preview/pricing-preview-discounts.d.ts +8 -0
  22. package/dist/entities/pricing-preview/pricing-preview-discounts.js +12 -0
  23. package/dist/entities/pricing-preview/pricing-preview-line-item.d.ts +17 -0
  24. package/dist/entities/pricing-preview/pricing-preview-line-item.js +21 -0
  25. package/dist/entities/pricing-preview/pricing-preview.d.ts +15 -0
  26. package/dist/entities/pricing-preview/pricing-preview.js +19 -0
  27. package/dist/entities/subscription/index.d.ts +1 -0
  28. package/dist/entities/subscription/index.js +1 -0
  29. package/dist/entities/subscription/subscription-notification.d.ts +28 -0
  30. package/dist/entities/subscription/subscription-notification.js +35 -0
  31. package/dist/enums/index.d.ts +1 -0
  32. package/dist/enums/index.js +1 -0
  33. package/dist/enums/payout/index.d.ts +1 -0
  34. package/dist/enums/payout/index.js +17 -0
  35. package/dist/enums/payout/payout-status.d.ts +1 -0
  36. package/dist/enums/payout/payout-status.js +2 -0
  37. package/dist/notifications/events/address/address-created-event.d.ts +9 -0
  38. package/dist/notifications/events/address/address-created-event.js +14 -0
  39. package/dist/notifications/events/address/address-updated-event.d.ts +9 -0
  40. package/dist/notifications/events/address/address-updated-event.js +14 -0
  41. package/dist/notifications/events/address/index.d.ts +2 -0
  42. package/dist/notifications/events/address/index.js +18 -0
  43. package/dist/notifications/events/adjustment/adjustment-created-event.d.ts +9 -0
  44. package/dist/notifications/events/adjustment/adjustment-created-event.js +14 -0
  45. package/dist/notifications/events/adjustment/adjustment-updated-event.d.ts +9 -0
  46. package/dist/notifications/events/adjustment/adjustment-updated-event.js +14 -0
  47. package/dist/notifications/events/adjustment/index.d.ts +2 -0
  48. package/dist/notifications/events/adjustment/index.js +18 -0
  49. package/dist/notifications/events/business/business-created-event.d.ts +9 -0
  50. package/dist/notifications/events/business/business-created-event.js +14 -0
  51. package/dist/notifications/events/business/business-updated-event.d.ts +9 -0
  52. package/dist/notifications/events/business/business-updated-event.js +14 -0
  53. package/dist/notifications/events/business/index.d.ts +2 -0
  54. package/dist/notifications/events/business/index.js +18 -0
  55. package/dist/notifications/events/customer/customer-created-event.d.ts +9 -0
  56. package/dist/notifications/events/customer/customer-created-event.js +14 -0
  57. package/dist/notifications/events/customer/customer-updated-event.d.ts +9 -0
  58. package/dist/notifications/events/customer/customer-updated-event.js +14 -0
  59. package/dist/notifications/events/customer/index.d.ts +2 -0
  60. package/dist/notifications/events/customer/index.js +18 -0
  61. package/dist/notifications/events/discount/discount-created-event.d.ts +9 -0
  62. package/dist/notifications/events/discount/discount-created-event.js +14 -0
  63. package/dist/notifications/events/discount/discount-imported-event.d.ts +9 -0
  64. package/dist/notifications/events/discount/discount-imported-event.js +14 -0
  65. package/dist/notifications/events/discount/discount-updated-event.d.ts +9 -0
  66. package/dist/notifications/events/discount/discount-updated-event.js +14 -0
  67. package/dist/notifications/events/discount/index.d.ts +3 -0
  68. package/dist/notifications/events/discount/index.js +19 -0
  69. package/dist/notifications/events/index.d.ts +10 -0
  70. package/dist/notifications/events/index.js +26 -0
  71. package/dist/notifications/events/payout/index.d.ts +2 -0
  72. package/dist/notifications/events/payout/index.js +18 -0
  73. package/dist/notifications/events/payout/payout-created-event.d.ts +9 -0
  74. package/dist/notifications/events/payout/payout-created-event.js +14 -0
  75. package/dist/notifications/events/payout/payout-paid-event.d.ts +9 -0
  76. package/dist/notifications/events/payout/payout-paid-event.js +14 -0
  77. package/dist/notifications/events/price/index.d.ts +2 -0
  78. package/dist/notifications/events/price/index.js +18 -0
  79. package/dist/notifications/events/price/price-created-event.d.ts +9 -0
  80. package/dist/notifications/events/price/price-created-event.js +14 -0
  81. package/dist/notifications/events/price/price-updated-event.d.ts +9 -0
  82. package/dist/notifications/events/price/price-updated-event.js +14 -0
  83. package/dist/notifications/events/product/index.d.ts +2 -0
  84. package/dist/notifications/events/product/index.js +18 -0
  85. package/dist/notifications/events/product/product-created-event.d.ts +9 -0
  86. package/dist/notifications/events/product/product-created-event.js +14 -0
  87. package/dist/notifications/events/product/product-updated-event.d.ts +9 -0
  88. package/dist/notifications/events/product/product-updated-event.js +14 -0
  89. package/dist/notifications/events/subscription/index.d.ts +9 -0
  90. package/dist/notifications/events/subscription/index.js +25 -0
  91. package/dist/notifications/events/subscription/subscription-activated-event.d.ts +9 -0
  92. package/dist/notifications/events/subscription/subscription-activated-event.js +14 -0
  93. package/dist/notifications/events/subscription/subscription-canceled-event.d.ts +9 -0
  94. package/dist/notifications/events/subscription/subscription-canceled-event.js +14 -0
  95. package/dist/notifications/events/subscription/subscription-created-event.d.ts +9 -0
  96. package/dist/notifications/events/subscription/subscription-created-event.js +14 -0
  97. package/dist/notifications/events/subscription/subscription-imported-event.d.ts +9 -0
  98. package/dist/notifications/events/subscription/subscription-imported-event.js +14 -0
  99. package/dist/notifications/events/subscription/subscription-past-due-event.d.ts +9 -0
  100. package/dist/notifications/events/subscription/subscription-past-due-event.js +14 -0
  101. package/dist/notifications/events/subscription/subscription-paused-event.d.ts +9 -0
  102. package/dist/notifications/events/subscription/subscription-paused-event.js +14 -0
  103. package/dist/notifications/events/subscription/subscription-resumed-event.d.ts +9 -0
  104. package/dist/notifications/events/subscription/subscription-resumed-event.js +14 -0
  105. package/dist/notifications/events/subscription/subscription-trialing-event.d.ts +9 -0
  106. package/dist/notifications/events/subscription/subscription-trialing-event.js +14 -0
  107. package/dist/notifications/events/subscription/subscription-updated-event.d.ts +9 -0
  108. package/dist/notifications/events/subscription/subscription-updated-event.js +14 -0
  109. package/dist/notifications/events/transaction/index.d.ts +9 -0
  110. package/dist/notifications/events/transaction/index.js +25 -0
  111. package/dist/notifications/events/transaction/transaction-billed-event.d.ts +9 -0
  112. package/dist/notifications/events/transaction/transaction-billed-event.js +14 -0
  113. package/dist/notifications/events/transaction/transaction-canceled-event.d.ts +9 -0
  114. package/dist/notifications/events/transaction/transaction-canceled-event.js +14 -0
  115. package/dist/notifications/events/transaction/transaction-completed-event.d.ts +9 -0
  116. package/dist/notifications/events/transaction/transaction-completed-event.js +14 -0
  117. package/dist/notifications/events/transaction/transaction-created-event.d.ts +9 -0
  118. package/dist/notifications/events/transaction/transaction-created-event.js +14 -0
  119. package/dist/notifications/events/transaction/transaction-paid-event.d.ts +9 -0
  120. package/dist/notifications/events/transaction/transaction-paid-event.js +14 -0
  121. package/dist/notifications/events/transaction/transaction-past-due-event.d.ts +9 -0
  122. package/dist/notifications/events/transaction/transaction-past-due-event.js +14 -0
  123. package/dist/notifications/events/transaction/transaction-payment-failed-event.d.ts +9 -0
  124. package/dist/notifications/events/transaction/transaction-payment-failed-event.js +14 -0
  125. package/dist/notifications/events/transaction/transaction-ready-event.d.ts +9 -0
  126. package/dist/notifications/events/transaction/transaction-ready-event.js +14 -0
  127. package/dist/notifications/events/transaction/transaction-updated-event.d.ts +9 -0
  128. package/dist/notifications/events/transaction/transaction-updated-event.js +14 -0
  129. package/dist/notifications/helpers/index.d.ts +3 -0
  130. package/dist/notifications/helpers/index.js +19 -0
  131. package/dist/notifications/helpers/types.d.ts +40 -0
  132. package/dist/notifications/helpers/types.js +41 -0
  133. package/dist/notifications/{validator/notifications-validator.d.ts → helpers/webhooks-validator.d.ts} +1 -1
  134. package/dist/notifications/{validator/notifications-validator.js → helpers/webhooks-validator.js} +6 -6
  135. package/dist/notifications/helpers/webhooks.d.ts +7 -0
  136. package/dist/notifications/helpers/webhooks.js +98 -0
  137. package/dist/notifications/index.d.ts +2 -1
  138. package/dist/notifications/index.js +2 -1
  139. package/dist/paddle.d.ts +7 -2
  140. package/dist/paddle.js +6 -1
  141. package/dist/resources/addresses/index.d.ts +2 -1
  142. package/dist/resources/addresses/index.js +10 -7
  143. package/dist/resources/adjustments/index.d.ts +1 -1
  144. package/dist/resources/adjustments/index.js +2 -4
  145. package/dist/resources/businesses/index.d.ts +2 -1
  146. package/dist/resources/businesses/index.js +10 -7
  147. package/dist/resources/customers/index.d.ts +2 -1
  148. package/dist/resources/customers/index.js +7 -4
  149. package/dist/resources/discounts/index.d.ts +2 -1
  150. package/dist/resources/discounts/index.js +7 -4
  151. package/dist/resources/events/index.d.ts +7 -0
  152. package/dist/resources/events/index.js +30 -0
  153. package/dist/resources/events/operations/index.d.ts +1 -0
  154. package/dist/resources/events/operations/index.js +17 -0
  155. package/dist/resources/events/operations/list-events-query-parameters.d.ts +5 -0
  156. package/dist/resources/events/operations/list-events-query-parameters.js +2 -0
  157. package/dist/resources/index.d.ts +1 -0
  158. package/dist/resources/index.js +1 -0
  159. package/dist/resources/prices/index.d.ts +2 -1
  160. package/dist/resources/prices/index.js +7 -4
  161. package/dist/resources/pricing-preview/index.d.ts +7 -0
  162. package/dist/resources/pricing-preview/index.js +42 -0
  163. package/dist/resources/pricing-preview/operations/index.d.ts +1 -0
  164. package/dist/resources/pricing-preview/operations/index.js +17 -0
  165. package/dist/resources/pricing-preview/operations/pricing-preview-request-body.d.ts +17 -0
  166. package/dist/resources/pricing-preview/operations/pricing-preview-request-body.js +2 -0
  167. package/dist/resources/products/index.d.ts +2 -1
  168. package/dist/resources/products/index.js +7 -4
  169. package/dist/resources/subscriptions/index.d.ts +1 -1
  170. package/dist/resources/subscriptions/index.js +2 -4
  171. package/dist/resources/transactions/index.d.ts +1 -1
  172. package/dist/resources/transactions/index.js +2 -4
  173. package/dist/types/events/events-response.d.ts +125 -0
  174. package/dist/types/events/events-response.js +2 -0
  175. package/dist/types/events/index.d.ts +1 -0
  176. package/dist/types/events/index.js +17 -0
  177. package/dist/types/index.d.ts +3 -0
  178. package/dist/types/index.js +3 -0
  179. package/dist/types/payout/index.d.ts +1 -0
  180. package/dist/types/payout/index.js +17 -0
  181. package/dist/types/payout/payout-response.d.ts +7 -0
  182. package/dist/types/payout/payout-response.js +2 -0
  183. package/dist/types/pricing-preview/index.d.ts +5 -0
  184. package/dist/types/pricing-preview/index.js +21 -0
  185. package/dist/types/pricing-preview/pricing-preview-details-response.d.ts +4 -0
  186. package/dist/types/pricing-preview/pricing-preview-details-response.js +2 -0
  187. package/dist/types/pricing-preview/pricing-preview-discounts-response.d.ts +6 -0
  188. package/dist/types/pricing-preview/pricing-preview-discounts-response.js +2 -0
  189. package/dist/types/pricing-preview/pricing-preview-item-response.d.ts +4 -0
  190. package/dist/types/pricing-preview/pricing-preview-item-response.js +2 -0
  191. package/dist/types/pricing-preview/pricing-preview-line-item-response.d.ts +15 -0
  192. package/dist/types/pricing-preview/pricing-preview-line-item-response.js +2 -0
  193. package/dist/types/pricing-preview/pricing-preview-response.d.ts +15 -0
  194. package/dist/types/pricing-preview/pricing-preview-response.js +2 -0
  195. package/dist/types/subscription/index.d.ts +1 -0
  196. package/dist/types/subscription/index.js +1 -0
  197. package/dist/types/subscription/subscription-notification-response.d.ts +28 -0
  198. package/dist/types/subscription/subscription-notification-response.js +2 -0
  199. package/dist/version.d.ts +1 -1
  200. package/dist/version.js +1 -1
  201. package/package.json +1 -1
@@ -0,0 +1,9 @@
1
+ import { Event } from '../../../entities/events/event';
2
+ import { Product } from '../../../entities';
3
+ import { EventName } from '../../helpers';
4
+ import { type IEventsResponse, type IProductResponse } from '../../../types';
5
+ export declare class ProductUpdatedEvent extends Event {
6
+ readonly eventType = EventName.ProductUpdated;
7
+ readonly data: Product;
8
+ constructor(response: IEventsResponse<IProductResponse>);
9
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProductUpdatedEvent = void 0;
4
+ const event_1 = require("../../../entities/events/event");
5
+ const entities_1 = require("../../../entities");
6
+ const helpers_1 = require("../../helpers");
7
+ class ProductUpdatedEvent extends event_1.Event {
8
+ constructor(response) {
9
+ super(response);
10
+ this.eventType = helpers_1.EventName.ProductUpdated;
11
+ this.data = new entities_1.Product(response.data);
12
+ }
13
+ }
14
+ exports.ProductUpdatedEvent = ProductUpdatedEvent;
@@ -0,0 +1,9 @@
1
+ export * from './subscription-activated-event';
2
+ export * from './subscription-canceled-event';
3
+ export * from './subscription-created-event';
4
+ export * from './subscription-imported-event';
5
+ export * from './subscription-past-due-event';
6
+ export * from './subscription-paused-event';
7
+ export * from './subscription-resumed-event';
8
+ export * from './subscription-trialing-event';
9
+ export * from './subscription-updated-event';
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./subscription-activated-event"), exports);
18
+ __exportStar(require("./subscription-canceled-event"), exports);
19
+ __exportStar(require("./subscription-created-event"), exports);
20
+ __exportStar(require("./subscription-imported-event"), exports);
21
+ __exportStar(require("./subscription-past-due-event"), exports);
22
+ __exportStar(require("./subscription-paused-event"), exports);
23
+ __exportStar(require("./subscription-resumed-event"), exports);
24
+ __exportStar(require("./subscription-trialing-event"), exports);
25
+ __exportStar(require("./subscription-updated-event"), exports);
@@ -0,0 +1,9 @@
1
+ import { Event } from '../../../entities/events/event';
2
+ import { SubscriptionNotification } from '../../../entities';
3
+ import { EventName } from '../../helpers';
4
+ import { type IEventsResponse, type ISubscriptionNotificationResponse } from '../../../types';
5
+ export declare class SubscriptionActivatedEvent extends Event {
6
+ readonly eventType = EventName.SubscriptionActivated;
7
+ readonly data: Omit<SubscriptionNotification, 'transactionId'>;
8
+ constructor(response: IEventsResponse<ISubscriptionNotificationResponse>);
9
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionActivatedEvent = void 0;
4
+ const event_1 = require("../../../entities/events/event");
5
+ const entities_1 = require("../../../entities");
6
+ const helpers_1 = require("../../helpers");
7
+ class SubscriptionActivatedEvent extends event_1.Event {
8
+ constructor(response) {
9
+ super(response);
10
+ this.eventType = helpers_1.EventName.SubscriptionActivated;
11
+ this.data = new entities_1.SubscriptionNotification(response.data);
12
+ }
13
+ }
14
+ exports.SubscriptionActivatedEvent = SubscriptionActivatedEvent;
@@ -0,0 +1,9 @@
1
+ import { Event } from '../../../entities/events/event';
2
+ import { SubscriptionNotification } from '../../../entities';
3
+ import { EventName } from '../../helpers';
4
+ import { type IEventsResponse, type ISubscriptionNotificationResponse } from '../../../types';
5
+ export declare class SubscriptionCanceledEvent extends Event {
6
+ readonly eventType = EventName.SubscriptionCanceled;
7
+ readonly data: Omit<SubscriptionNotification, 'transactionId'>;
8
+ constructor(response: IEventsResponse<ISubscriptionNotificationResponse>);
9
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionCanceledEvent = void 0;
4
+ const event_1 = require("../../../entities/events/event");
5
+ const entities_1 = require("../../../entities");
6
+ const helpers_1 = require("../../helpers");
7
+ class SubscriptionCanceledEvent extends event_1.Event {
8
+ constructor(response) {
9
+ super(response);
10
+ this.eventType = helpers_1.EventName.SubscriptionCanceled;
11
+ this.data = new entities_1.SubscriptionNotification(response.data);
12
+ }
13
+ }
14
+ exports.SubscriptionCanceledEvent = SubscriptionCanceledEvent;
@@ -0,0 +1,9 @@
1
+ import { Event } from '../../../entities/events/event';
2
+ import { SubscriptionNotification } from '../../../entities';
3
+ import { EventName } from '../../helpers';
4
+ import { type IEventsResponse, type ISubscriptionNotificationResponse } from '../../../types';
5
+ export declare class SubscriptionCreatedEvent extends Event {
6
+ readonly eventType = EventName.SubscriptionCreated;
7
+ readonly data: SubscriptionNotification;
8
+ constructor(response: IEventsResponse<ISubscriptionNotificationResponse>);
9
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionCreatedEvent = void 0;
4
+ const event_1 = require("../../../entities/events/event");
5
+ const entities_1 = require("../../../entities");
6
+ const helpers_1 = require("../../helpers");
7
+ class SubscriptionCreatedEvent extends event_1.Event {
8
+ constructor(response) {
9
+ super(response);
10
+ this.eventType = helpers_1.EventName.SubscriptionCreated;
11
+ this.data = new entities_1.SubscriptionNotification(response.data);
12
+ }
13
+ }
14
+ exports.SubscriptionCreatedEvent = SubscriptionCreatedEvent;
@@ -0,0 +1,9 @@
1
+ import { Event } from '../../../entities/events/event';
2
+ import { SubscriptionNotification } from '../../../entities';
3
+ import { EventName } from '../../helpers';
4
+ import { type IEventsResponse, type ISubscriptionNotificationResponse } from '../../../types';
5
+ export declare class SubscriptionImportedEvent extends Event {
6
+ readonly eventType = EventName.SubscriptionImported;
7
+ readonly data: Omit<SubscriptionNotification, 'transactionId'>;
8
+ constructor(response: IEventsResponse<ISubscriptionNotificationResponse>);
9
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionImportedEvent = void 0;
4
+ const event_1 = require("../../../entities/events/event");
5
+ const entities_1 = require("../../../entities");
6
+ const helpers_1 = require("../../helpers");
7
+ class SubscriptionImportedEvent extends event_1.Event {
8
+ constructor(response) {
9
+ super(response);
10
+ this.eventType = helpers_1.EventName.SubscriptionImported;
11
+ this.data = new entities_1.SubscriptionNotification(response.data);
12
+ }
13
+ }
14
+ exports.SubscriptionImportedEvent = SubscriptionImportedEvent;
@@ -0,0 +1,9 @@
1
+ import { Event } from '../../../entities/events/event';
2
+ import { SubscriptionNotification } from '../../../entities';
3
+ import { EventName } from '../../helpers';
4
+ import { type IEventsResponse, type ISubscriptionNotificationResponse } from '../../../types';
5
+ export declare class SubscriptionPastDueEvent extends Event {
6
+ readonly eventType = EventName.SubscriptionPastDue;
7
+ readonly data: Omit<SubscriptionNotification, 'transactionId'>;
8
+ constructor(response: IEventsResponse<ISubscriptionNotificationResponse>);
9
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionPastDueEvent = void 0;
4
+ const event_1 = require("../../../entities/events/event");
5
+ const entities_1 = require("../../../entities");
6
+ const helpers_1 = require("../../helpers");
7
+ class SubscriptionPastDueEvent extends event_1.Event {
8
+ constructor(response) {
9
+ super(response);
10
+ this.eventType = helpers_1.EventName.SubscriptionPastDue;
11
+ this.data = new entities_1.SubscriptionNotification(response.data);
12
+ }
13
+ }
14
+ exports.SubscriptionPastDueEvent = SubscriptionPastDueEvent;
@@ -0,0 +1,9 @@
1
+ import { Event } from '../../../entities/events/event';
2
+ import { SubscriptionNotification } from '../../../entities';
3
+ import { EventName } from '../../helpers';
4
+ import { type IEventsResponse, type ISubscriptionNotificationResponse } from '../../../types';
5
+ export declare class SubscriptionPausedEvent extends Event {
6
+ readonly eventType = EventName.SubscriptionPaused;
7
+ readonly data: Omit<SubscriptionNotification, 'transactionId'>;
8
+ constructor(response: IEventsResponse<ISubscriptionNotificationResponse>);
9
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionPausedEvent = void 0;
4
+ const event_1 = require("../../../entities/events/event");
5
+ const entities_1 = require("../../../entities");
6
+ const helpers_1 = require("../../helpers");
7
+ class SubscriptionPausedEvent extends event_1.Event {
8
+ constructor(response) {
9
+ super(response);
10
+ this.eventType = helpers_1.EventName.SubscriptionPaused;
11
+ this.data = new entities_1.SubscriptionNotification(response.data);
12
+ }
13
+ }
14
+ exports.SubscriptionPausedEvent = SubscriptionPausedEvent;
@@ -0,0 +1,9 @@
1
+ import { Event } from '../../../entities/events/event';
2
+ import { SubscriptionNotification } from '../../../entities';
3
+ import { EventName } from '../../helpers';
4
+ import { type IEventsResponse, type ISubscriptionNotificationResponse } from '../../../types';
5
+ export declare class SubscriptionResumedEvent extends Event {
6
+ readonly eventType = EventName.SubscriptionResumed;
7
+ readonly data: Omit<SubscriptionNotification, 'transactionId'>;
8
+ constructor(response: IEventsResponse<ISubscriptionNotificationResponse>);
9
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionResumedEvent = void 0;
4
+ const event_1 = require("../../../entities/events/event");
5
+ const entities_1 = require("../../../entities");
6
+ const helpers_1 = require("../../helpers");
7
+ class SubscriptionResumedEvent extends event_1.Event {
8
+ constructor(response) {
9
+ super(response);
10
+ this.eventType = helpers_1.EventName.SubscriptionResumed;
11
+ this.data = new entities_1.SubscriptionNotification(response.data);
12
+ }
13
+ }
14
+ exports.SubscriptionResumedEvent = SubscriptionResumedEvent;
@@ -0,0 +1,9 @@
1
+ import { Event } from '../../../entities/events/event';
2
+ import { SubscriptionNotification } from '../../../entities';
3
+ import { EventName } from '../../helpers';
4
+ import { type IEventsResponse, type ISubscriptionNotificationResponse } from '../../../types';
5
+ export declare class SubscriptionTrialingEvent extends Event {
6
+ readonly eventType = EventName.SubscriptionTrialing;
7
+ readonly data: Omit<SubscriptionNotification, 'transactionId'>;
8
+ constructor(response: IEventsResponse<ISubscriptionNotificationResponse>);
9
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionTrialingEvent = void 0;
4
+ const event_1 = require("../../../entities/events/event");
5
+ const entities_1 = require("../../../entities");
6
+ const helpers_1 = require("../../helpers");
7
+ class SubscriptionTrialingEvent extends event_1.Event {
8
+ constructor(response) {
9
+ super(response);
10
+ this.eventType = helpers_1.EventName.SubscriptionTrialing;
11
+ this.data = new entities_1.SubscriptionNotification(response.data);
12
+ }
13
+ }
14
+ exports.SubscriptionTrialingEvent = SubscriptionTrialingEvent;
@@ -0,0 +1,9 @@
1
+ import { Event } from '../../../entities/events/event';
2
+ import { SubscriptionNotification } from '../../../entities';
3
+ import { EventName } from '../../helpers';
4
+ import { type IEventsResponse, type ISubscriptionNotificationResponse } from '../../../types';
5
+ export declare class SubscriptionUpdatedEvent extends Event {
6
+ readonly eventType = EventName.SubscriptionUpdated;
7
+ readonly data: Omit<SubscriptionNotification, 'transactionId'>;
8
+ constructor(response: IEventsResponse<ISubscriptionNotificationResponse>);
9
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionUpdatedEvent = void 0;
4
+ const event_1 = require("../../../entities/events/event");
5
+ const entities_1 = require("../../../entities");
6
+ const helpers_1 = require("../../helpers");
7
+ class SubscriptionUpdatedEvent extends event_1.Event {
8
+ constructor(response) {
9
+ super(response);
10
+ this.eventType = helpers_1.EventName.SubscriptionUpdated;
11
+ this.data = new entities_1.SubscriptionNotification(response.data);
12
+ }
13
+ }
14
+ exports.SubscriptionUpdatedEvent = SubscriptionUpdatedEvent;
@@ -0,0 +1,9 @@
1
+ export * from './transaction-billed-event';
2
+ export * from './transaction-canceled-event';
3
+ export * from './transaction-created-event';
4
+ export * from './transaction-completed-event';
5
+ export * from './transaction-paid-event';
6
+ export * from './transaction-past-due-event';
7
+ export * from './transaction-payment-failed-event';
8
+ export * from './transaction-ready-event';
9
+ export * from './transaction-updated-event';
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./transaction-billed-event"), exports);
18
+ __exportStar(require("./transaction-canceled-event"), exports);
19
+ __exportStar(require("./transaction-created-event"), exports);
20
+ __exportStar(require("./transaction-completed-event"), exports);
21
+ __exportStar(require("./transaction-paid-event"), exports);
22
+ __exportStar(require("./transaction-past-due-event"), exports);
23
+ __exportStar(require("./transaction-payment-failed-event"), exports);
24
+ __exportStar(require("./transaction-ready-event"), exports);
25
+ __exportStar(require("./transaction-updated-event"), exports);
@@ -0,0 +1,9 @@
1
+ import { Event } from '../../../entities/events/event';
2
+ import { Transaction } from '../../../entities';
3
+ import { EventName } from '../../helpers';
4
+ import { type IEventsResponse, type ITransactionResponse } from '../../../types';
5
+ export declare class TransactionBilledEvent extends Event {
6
+ readonly eventType = EventName.TransactionBilled;
7
+ readonly data: Transaction;
8
+ constructor(response: IEventsResponse<ITransactionResponse>);
9
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactionBilledEvent = void 0;
4
+ const event_1 = require("../../../entities/events/event");
5
+ const entities_1 = require("../../../entities");
6
+ const helpers_1 = require("../../helpers");
7
+ class TransactionBilledEvent extends event_1.Event {
8
+ constructor(response) {
9
+ super(response);
10
+ this.eventType = helpers_1.EventName.TransactionBilled;
11
+ this.data = new entities_1.Transaction(response.data);
12
+ }
13
+ }
14
+ exports.TransactionBilledEvent = TransactionBilledEvent;
@@ -0,0 +1,9 @@
1
+ import { Event } from '../../../entities/events/event';
2
+ import { Transaction } from '../../../entities';
3
+ import { EventName } from '../../helpers';
4
+ import { type IEventsResponse, type ITransactionResponse } from '../../../types';
5
+ export declare class TransactionCanceledEvent extends Event {
6
+ readonly eventType = EventName.TransactionCanceled;
7
+ readonly data: Transaction;
8
+ constructor(response: IEventsResponse<ITransactionResponse>);
9
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactionCanceledEvent = void 0;
4
+ const event_1 = require("../../../entities/events/event");
5
+ const entities_1 = require("../../../entities");
6
+ const helpers_1 = require("../../helpers");
7
+ class TransactionCanceledEvent extends event_1.Event {
8
+ constructor(response) {
9
+ super(response);
10
+ this.eventType = helpers_1.EventName.TransactionCanceled;
11
+ this.data = new entities_1.Transaction(response.data);
12
+ }
13
+ }
14
+ exports.TransactionCanceledEvent = TransactionCanceledEvent;
@@ -0,0 +1,9 @@
1
+ import { Event } from '../../../entities/events/event';
2
+ import { Transaction } from '../../../entities';
3
+ import { EventName } from '../../helpers';
4
+ import { type IEventsResponse, type ITransactionResponse } from '../../../types';
5
+ export declare class TransactionCompletedEvent extends Event {
6
+ readonly eventType = EventName.TransactionCompleted;
7
+ readonly data: Transaction;
8
+ constructor(response: IEventsResponse<ITransactionResponse>);
9
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactionCompletedEvent = void 0;
4
+ const event_1 = require("../../../entities/events/event");
5
+ const entities_1 = require("../../../entities");
6
+ const helpers_1 = require("../../helpers");
7
+ class TransactionCompletedEvent extends event_1.Event {
8
+ constructor(response) {
9
+ super(response);
10
+ this.eventType = helpers_1.EventName.TransactionCompleted;
11
+ this.data = new entities_1.Transaction(response.data);
12
+ }
13
+ }
14
+ exports.TransactionCompletedEvent = TransactionCompletedEvent;
@@ -0,0 +1,9 @@
1
+ import { Event } from '../../../entities/events/event';
2
+ import { Transaction } from '../../../entities';
3
+ import { EventName } from '../../helpers';
4
+ import { type IEventsResponse, type ITransactionResponse } from '../../../types';
5
+ export declare class TransactionCreatedEvent extends Event {
6
+ readonly eventType = EventName.TransactionCreated;
7
+ readonly data: Transaction;
8
+ constructor(response: IEventsResponse<ITransactionResponse>);
9
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactionCreatedEvent = void 0;
4
+ const event_1 = require("../../../entities/events/event");
5
+ const entities_1 = require("../../../entities");
6
+ const helpers_1 = require("../../helpers");
7
+ class TransactionCreatedEvent extends event_1.Event {
8
+ constructor(response) {
9
+ super(response);
10
+ this.eventType = helpers_1.EventName.TransactionCreated;
11
+ this.data = new entities_1.Transaction(response.data);
12
+ }
13
+ }
14
+ exports.TransactionCreatedEvent = TransactionCreatedEvent;
@@ -0,0 +1,9 @@
1
+ import { Event } from '../../../entities/events/event';
2
+ import { Transaction } from '../../../entities';
3
+ import { EventName } from '../../helpers';
4
+ import { type IEventsResponse, type ITransactionResponse } from '../../../types';
5
+ export declare class TransactionPaidEvent extends Event {
6
+ readonly eventType = EventName.TransactionPaid;
7
+ readonly data: Transaction;
8
+ constructor(response: IEventsResponse<ITransactionResponse>);
9
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactionPaidEvent = void 0;
4
+ const event_1 = require("../../../entities/events/event");
5
+ const entities_1 = require("../../../entities");
6
+ const helpers_1 = require("../../helpers");
7
+ class TransactionPaidEvent extends event_1.Event {
8
+ constructor(response) {
9
+ super(response);
10
+ this.eventType = helpers_1.EventName.TransactionPaid;
11
+ this.data = new entities_1.Transaction(response.data);
12
+ }
13
+ }
14
+ exports.TransactionPaidEvent = TransactionPaidEvent;
@@ -0,0 +1,9 @@
1
+ import { Event } from '../../../entities/events/event';
2
+ import { Transaction } from '../../../entities';
3
+ import { EventName } from '../../helpers';
4
+ import { type IEventsResponse, type ITransactionResponse } from '../../../types';
5
+ export declare class TransactionPastDueEvent extends Event {
6
+ readonly eventType = EventName.TransactionPastDue;
7
+ readonly data: Transaction;
8
+ constructor(response: IEventsResponse<ITransactionResponse>);
9
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactionPastDueEvent = void 0;
4
+ const event_1 = require("../../../entities/events/event");
5
+ const entities_1 = require("../../../entities");
6
+ const helpers_1 = require("../../helpers");
7
+ class TransactionPastDueEvent extends event_1.Event {
8
+ constructor(response) {
9
+ super(response);
10
+ this.eventType = helpers_1.EventName.TransactionPastDue;
11
+ this.data = new entities_1.Transaction(response.data);
12
+ }
13
+ }
14
+ exports.TransactionPastDueEvent = TransactionPastDueEvent;
@@ -0,0 +1,9 @@
1
+ import { Event } from '../../../entities/events/event';
2
+ import { Transaction } from '../../../entities';
3
+ import { EventName } from '../../helpers';
4
+ import { type IEventsResponse, type ITransactionResponse } from '../../../types';
5
+ export declare class TransactionPaymentFailedEvent extends Event {
6
+ readonly eventType = EventName.TransactionPaymentFailed;
7
+ readonly data: Transaction;
8
+ constructor(response: IEventsResponse<ITransactionResponse>);
9
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactionPaymentFailedEvent = void 0;
4
+ const event_1 = require("../../../entities/events/event");
5
+ const entities_1 = require("../../../entities");
6
+ const helpers_1 = require("../../helpers");
7
+ class TransactionPaymentFailedEvent extends event_1.Event {
8
+ constructor(response) {
9
+ super(response);
10
+ this.eventType = helpers_1.EventName.TransactionPaymentFailed;
11
+ this.data = new entities_1.Transaction(response.data);
12
+ }
13
+ }
14
+ exports.TransactionPaymentFailedEvent = TransactionPaymentFailedEvent;
@@ -0,0 +1,9 @@
1
+ import { Event } from '../../../entities/events/event';
2
+ import { Transaction } from '../../../entities';
3
+ import { EventName } from '../../helpers';
4
+ import { type IEventsResponse, type ITransactionResponse } from '../../../types';
5
+ export declare class TransactionReadyEvent extends Event {
6
+ readonly eventType = EventName.TransactionReady;
7
+ readonly data: Transaction;
8
+ constructor(response: IEventsResponse<ITransactionResponse>);
9
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactionReadyEvent = void 0;
4
+ const event_1 = require("../../../entities/events/event");
5
+ const entities_1 = require("../../../entities");
6
+ const helpers_1 = require("../../helpers");
7
+ class TransactionReadyEvent extends event_1.Event {
8
+ constructor(response) {
9
+ super(response);
10
+ this.eventType = helpers_1.EventName.TransactionReady;
11
+ this.data = new entities_1.Transaction(response.data);
12
+ }
13
+ }
14
+ exports.TransactionReadyEvent = TransactionReadyEvent;
@@ -0,0 +1,9 @@
1
+ import { Event } from '../../../entities/events/event';
2
+ import { Transaction } from '../../../entities';
3
+ import { EventName } from '../../helpers';
4
+ import { type IEventsResponse, type ITransactionResponse } from '../../../types';
5
+ export declare class TransactionUpdatedEvent extends Event {
6
+ readonly eventType = EventName.TransactionUpdated;
7
+ readonly data: Transaction;
8
+ constructor(response: IEventsResponse<ITransactionResponse>);
9
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactionUpdatedEvent = void 0;
4
+ const event_1 = require("../../../entities/events/event");
5
+ const entities_1 = require("../../../entities");
6
+ const helpers_1 = require("../../helpers");
7
+ class TransactionUpdatedEvent extends event_1.Event {
8
+ constructor(response) {
9
+ super(response);
10
+ this.eventType = helpers_1.EventName.TransactionUpdated;
11
+ this.data = new entities_1.Transaction(response.data);
12
+ }
13
+ }
14
+ exports.TransactionUpdatedEvent = TransactionUpdatedEvent;
@@ -0,0 +1,3 @@
1
+ export * from './types';
2
+ export * from './webhooks';
3
+ export * from './webhooks-validator';
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./types"), exports);
18
+ __exportStar(require("./webhooks"), exports);
19
+ __exportStar(require("./webhooks-validator"), exports);