@paddle/paddle-node-sdk 0.2.1 → 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 (153) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +43 -4
  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/subscription/index.d.ts +1 -0
  18. package/dist/entities/subscription/index.js +1 -0
  19. package/dist/entities/subscription/subscription-notification.d.ts +28 -0
  20. package/dist/entities/subscription/subscription-notification.js +35 -0
  21. package/dist/enums/index.d.ts +1 -0
  22. package/dist/enums/index.js +1 -0
  23. package/dist/enums/payout/index.d.ts +1 -0
  24. package/dist/enums/payout/index.js +17 -0
  25. package/dist/enums/payout/payout-status.d.ts +1 -0
  26. package/dist/enums/payout/payout-status.js +2 -0
  27. package/dist/notifications/events/address/address-created-event.d.ts +9 -0
  28. package/dist/notifications/events/address/address-created-event.js +14 -0
  29. package/dist/notifications/events/address/address-updated-event.d.ts +9 -0
  30. package/dist/notifications/events/address/address-updated-event.js +14 -0
  31. package/dist/notifications/events/address/index.d.ts +2 -0
  32. package/dist/notifications/events/address/index.js +18 -0
  33. package/dist/notifications/events/adjustment/adjustment-created-event.d.ts +9 -0
  34. package/dist/notifications/events/adjustment/adjustment-created-event.js +14 -0
  35. package/dist/notifications/events/adjustment/adjustment-updated-event.d.ts +9 -0
  36. package/dist/notifications/events/adjustment/adjustment-updated-event.js +14 -0
  37. package/dist/notifications/events/adjustment/index.d.ts +2 -0
  38. package/dist/notifications/events/adjustment/index.js +18 -0
  39. package/dist/notifications/events/business/business-created-event.d.ts +9 -0
  40. package/dist/notifications/events/business/business-created-event.js +14 -0
  41. package/dist/notifications/events/business/business-updated-event.d.ts +9 -0
  42. package/dist/notifications/events/business/business-updated-event.js +14 -0
  43. package/dist/notifications/events/business/index.d.ts +2 -0
  44. package/dist/notifications/events/business/index.js +18 -0
  45. package/dist/notifications/events/customer/customer-created-event.d.ts +9 -0
  46. package/dist/notifications/events/customer/customer-created-event.js +14 -0
  47. package/dist/notifications/events/customer/customer-updated-event.d.ts +9 -0
  48. package/dist/notifications/events/customer/customer-updated-event.js +14 -0
  49. package/dist/notifications/events/customer/index.d.ts +2 -0
  50. package/dist/notifications/events/customer/index.js +18 -0
  51. package/dist/notifications/events/discount/discount-created-event.d.ts +9 -0
  52. package/dist/notifications/events/discount/discount-created-event.js +14 -0
  53. package/dist/notifications/events/discount/discount-imported-event.d.ts +9 -0
  54. package/dist/notifications/events/discount/discount-imported-event.js +14 -0
  55. package/dist/notifications/events/discount/discount-updated-event.d.ts +9 -0
  56. package/dist/notifications/events/discount/discount-updated-event.js +14 -0
  57. package/dist/notifications/events/discount/index.d.ts +3 -0
  58. package/dist/notifications/events/discount/index.js +19 -0
  59. package/dist/notifications/events/index.d.ts +10 -0
  60. package/dist/notifications/events/index.js +26 -0
  61. package/dist/notifications/events/payout/index.d.ts +2 -0
  62. package/dist/notifications/events/payout/index.js +18 -0
  63. package/dist/notifications/events/payout/payout-created-event.d.ts +9 -0
  64. package/dist/notifications/events/payout/payout-created-event.js +14 -0
  65. package/dist/notifications/events/payout/payout-paid-event.d.ts +9 -0
  66. package/dist/notifications/events/payout/payout-paid-event.js +14 -0
  67. package/dist/notifications/events/price/index.d.ts +2 -0
  68. package/dist/notifications/events/price/index.js +18 -0
  69. package/dist/notifications/events/price/price-created-event.d.ts +9 -0
  70. package/dist/notifications/events/price/price-created-event.js +14 -0
  71. package/dist/notifications/events/price/price-updated-event.d.ts +9 -0
  72. package/dist/notifications/events/price/price-updated-event.js +14 -0
  73. package/dist/notifications/events/product/index.d.ts +2 -0
  74. package/dist/notifications/events/product/index.js +18 -0
  75. package/dist/notifications/events/product/product-created-event.d.ts +9 -0
  76. package/dist/notifications/events/product/product-created-event.js +14 -0
  77. package/dist/notifications/events/product/product-updated-event.d.ts +9 -0
  78. package/dist/notifications/events/product/product-updated-event.js +14 -0
  79. package/dist/notifications/events/subscription/index.d.ts +9 -0
  80. package/dist/notifications/events/subscription/index.js +25 -0
  81. package/dist/notifications/events/subscription/subscription-activated-event.d.ts +9 -0
  82. package/dist/notifications/events/subscription/subscription-activated-event.js +14 -0
  83. package/dist/notifications/events/subscription/subscription-canceled-event.d.ts +9 -0
  84. package/dist/notifications/events/subscription/subscription-canceled-event.js +14 -0
  85. package/dist/notifications/events/subscription/subscription-created-event.d.ts +9 -0
  86. package/dist/notifications/events/subscription/subscription-created-event.js +14 -0
  87. package/dist/notifications/events/subscription/subscription-imported-event.d.ts +9 -0
  88. package/dist/notifications/events/subscription/subscription-imported-event.js +14 -0
  89. package/dist/notifications/events/subscription/subscription-past-due-event.d.ts +9 -0
  90. package/dist/notifications/events/subscription/subscription-past-due-event.js +14 -0
  91. package/dist/notifications/events/subscription/subscription-paused-event.d.ts +9 -0
  92. package/dist/notifications/events/subscription/subscription-paused-event.js +14 -0
  93. package/dist/notifications/events/subscription/subscription-resumed-event.d.ts +9 -0
  94. package/dist/notifications/events/subscription/subscription-resumed-event.js +14 -0
  95. package/dist/notifications/events/subscription/subscription-trialing-event.d.ts +9 -0
  96. package/dist/notifications/events/subscription/subscription-trialing-event.js +14 -0
  97. package/dist/notifications/events/subscription/subscription-updated-event.d.ts +9 -0
  98. package/dist/notifications/events/subscription/subscription-updated-event.js +14 -0
  99. package/dist/notifications/events/transaction/index.d.ts +9 -0
  100. package/dist/notifications/events/transaction/index.js +25 -0
  101. package/dist/notifications/events/transaction/transaction-billed-event.d.ts +9 -0
  102. package/dist/notifications/events/transaction/transaction-billed-event.js +14 -0
  103. package/dist/notifications/events/transaction/transaction-canceled-event.d.ts +9 -0
  104. package/dist/notifications/events/transaction/transaction-canceled-event.js +14 -0
  105. package/dist/notifications/events/transaction/transaction-completed-event.d.ts +9 -0
  106. package/dist/notifications/events/transaction/transaction-completed-event.js +14 -0
  107. package/dist/notifications/events/transaction/transaction-created-event.d.ts +9 -0
  108. package/dist/notifications/events/transaction/transaction-created-event.js +14 -0
  109. package/dist/notifications/events/transaction/transaction-paid-event.d.ts +9 -0
  110. package/dist/notifications/events/transaction/transaction-paid-event.js +14 -0
  111. package/dist/notifications/events/transaction/transaction-past-due-event.d.ts +9 -0
  112. package/dist/notifications/events/transaction/transaction-past-due-event.js +14 -0
  113. package/dist/notifications/events/transaction/transaction-payment-failed-event.d.ts +9 -0
  114. package/dist/notifications/events/transaction/transaction-payment-failed-event.js +14 -0
  115. package/dist/notifications/events/transaction/transaction-ready-event.d.ts +9 -0
  116. package/dist/notifications/events/transaction/transaction-ready-event.js +14 -0
  117. package/dist/notifications/events/transaction/transaction-updated-event.d.ts +9 -0
  118. package/dist/notifications/events/transaction/transaction-updated-event.js +14 -0
  119. package/dist/notifications/helpers/index.d.ts +3 -0
  120. package/dist/notifications/helpers/index.js +19 -0
  121. package/dist/notifications/helpers/types.d.ts +40 -0
  122. package/dist/notifications/helpers/types.js +41 -0
  123. package/dist/notifications/{validator/notifications-validator.d.ts → helpers/webhooks-validator.d.ts} +1 -1
  124. package/dist/notifications/{validator/notifications-validator.js → helpers/webhooks-validator.js} +6 -6
  125. package/dist/notifications/helpers/webhooks.d.ts +7 -0
  126. package/dist/notifications/helpers/webhooks.js +98 -0
  127. package/dist/notifications/index.d.ts +2 -1
  128. package/dist/notifications/index.js +2 -1
  129. package/dist/paddle.d.ts +5 -1
  130. package/dist/paddle.js +5 -1
  131. package/dist/resources/events/index.d.ts +7 -0
  132. package/dist/resources/events/index.js +30 -0
  133. package/dist/resources/events/operations/index.d.ts +1 -0
  134. package/dist/resources/events/operations/index.js +17 -0
  135. package/dist/resources/events/operations/list-events-query-parameters.d.ts +5 -0
  136. package/dist/resources/events/operations/list-events-query-parameters.js +2 -0
  137. package/dist/types/events/events-response.d.ts +125 -0
  138. package/dist/types/events/events-response.js +2 -0
  139. package/dist/types/events/index.d.ts +1 -0
  140. package/dist/types/events/index.js +17 -0
  141. package/dist/types/index.d.ts +2 -0
  142. package/dist/types/index.js +2 -0
  143. package/dist/types/payout/index.d.ts +1 -0
  144. package/dist/types/payout/index.js +17 -0
  145. package/dist/types/payout/payout-response.d.ts +7 -0
  146. package/dist/types/payout/payout-response.js +2 -0
  147. package/dist/types/subscription/index.d.ts +1 -0
  148. package/dist/types/subscription/index.js +1 -0
  149. package/dist/types/subscription/subscription-notification-response.d.ts +28 -0
  150. package/dist/types/subscription/subscription-notification-response.js +2 -0
  151. package/dist/version.d.ts +1 -1
  152. package/dist/version.js +1 -1
  153. package/package.json +1 -1
package/dist/paddle.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import { AddressesResource, AdjustmentsResource, BusinessesResource, CustomersResource, DiscountsResource, PricesResource, PricingPreviewResource, ProductsResource, SubscriptionsResource, TransactionsResource } from './resources';
2
2
  import { type PaddleOptions } from './internal';
3
+ import { EventsResource } from './resources/events';
4
+ import { Webhooks } from './notifications';
3
5
  export declare class Paddle {
4
6
  private readonly client;
5
7
  private readonly defaultPaddleOptions;
@@ -13,5 +15,7 @@ export declare class Paddle {
13
15
  discounts: DiscountsResource;
14
16
  subscriptions: SubscriptionsResource;
15
17
  pricingPreview: PricingPreviewResource;
16
- constructor(apiKey: string, options: PaddleOptions);
18
+ events: EventsResource;
19
+ webhooks: Webhooks;
20
+ constructor(apiKey: string, options?: PaddleOptions);
17
21
  }
package/dist/paddle.js CHANGED
@@ -4,12 +4,14 @@ exports.Paddle = void 0;
4
4
  const client_1 = require("./internal/api/client");
5
5
  const resources_1 = require("./resources");
6
6
  const internal_1 = require("./internal");
7
+ const events_1 = require("./resources/events");
8
+ const notifications_1 = require("./notifications");
7
9
  class Paddle {
8
10
  constructor(apiKey, options) {
9
11
  this.defaultPaddleOptions = {
10
12
  environment: internal_1.Environment.production,
11
13
  };
12
- this.client = new client_1.Client(apiKey, Object.assign(Object.assign({}, this.defaultPaddleOptions), options));
14
+ this.client = new client_1.Client(apiKey, options ? Object.assign(Object.assign({}, this.defaultPaddleOptions), options) : Object.assign({}, this.defaultPaddleOptions));
13
15
  this.products = new resources_1.ProductsResource(this.client);
14
16
  this.prices = new resources_1.PricesResource(this.client);
15
17
  this.transactions = new resources_1.TransactionsResource(this.client);
@@ -20,6 +22,8 @@ class Paddle {
20
22
  this.discounts = new resources_1.DiscountsResource(this.client);
21
23
  this.subscriptions = new resources_1.SubscriptionsResource(this.client);
22
24
  this.pricingPreview = new resources_1.PricingPreviewResource(this.client);
25
+ this.events = new events_1.EventsResource(this.client);
26
+ this.webhooks = new notifications_1.Webhooks();
23
27
  }
24
28
  }
25
29
  exports.Paddle = Paddle;
@@ -0,0 +1,7 @@
1
+ import { BaseResource } from '../../internal/base';
2
+ import { type ListEventsQueryParameters } from './operations';
3
+ import { EventCollection } from '../../entities';
4
+ export * from './operations';
5
+ export declare class EventsResource extends BaseResource {
6
+ list(queryParams?: ListEventsQueryParameters): EventCollection;
7
+ }
@@ -0,0 +1,30 @@
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
+ exports.EventsResource = void 0;
18
+ const base_1 = require("../../internal/base");
19
+ const entities_1 = require("../../entities");
20
+ const EventPaths = {
21
+ list: '/events',
22
+ };
23
+ __exportStar(require("./operations"), exports);
24
+ class EventsResource extends base_1.BaseResource {
25
+ list(queryParams) {
26
+ const queryParameters = new base_1.QueryParameters(queryParams);
27
+ return new entities_1.EventCollection(this.client, EventPaths.list + queryParameters.toQueryString());
28
+ }
29
+ }
30
+ exports.EventsResource = EventsResource;
@@ -0,0 +1 @@
1
+ export * from './list-events-query-parameters';
@@ -0,0 +1,17 @@
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("./list-events-query-parameters"), exports);
@@ -0,0 +1,5 @@
1
+ export interface ListEventsQueryParameters {
2
+ after?: string;
3
+ orderBy?: string;
4
+ perPage?: number;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,125 @@
1
+ import { type IAddressResponse } from '../address';
2
+ import { type IBusinessResponse } from '../business';
3
+ import { type EventName } from '../../notifications';
4
+ import { type IAdjustmentResponse } from '../adjustment';
5
+ import { type ICustomerResponse } from '../customer';
6
+ import { type IDiscountResponse } from '../discount';
7
+ import { type IPriceResponse } from '../price';
8
+ import { type IProductResponse } from '../product';
9
+ import { type ISubscriptionNotificationResponse } from '../subscription';
10
+ import { type ITransactionResponse } from '../transaction';
11
+ import { type IPayoutResponse } from '../payout';
12
+ export interface IEventsResponse<T = object> {
13
+ event_id: string;
14
+ notification_id: string;
15
+ event_type: string;
16
+ occurred_at: string;
17
+ data: T;
18
+ }
19
+ interface IAddressCreated extends IEventsResponse<IAddressResponse> {
20
+ event_type: EventName.AddressCreated;
21
+ }
22
+ interface IAddressUpdated extends IEventsResponse<IAddressResponse> {
23
+ event_type: EventName.AddressUpdated;
24
+ }
25
+ interface IAdjustmentCreated extends IEventsResponse<IAdjustmentResponse> {
26
+ event_type: EventName.AdjustmentCreated;
27
+ }
28
+ interface IAdjustmentUpdated extends IEventsResponse<IAdjustmentResponse> {
29
+ event_type: EventName.AdjustmentUpdated;
30
+ }
31
+ interface IBusinessCreated extends IEventsResponse<IBusinessResponse> {
32
+ event_type: EventName.BusinessCreated;
33
+ }
34
+ interface IBusinessUpdated extends IEventsResponse<IBusinessResponse> {
35
+ event_type: EventName.BusinessUpdated;
36
+ }
37
+ interface ICustomerCreated extends IEventsResponse<ICustomerResponse> {
38
+ event_type: EventName.CustomerCreated;
39
+ }
40
+ interface ICustomerUpdated extends IEventsResponse<ICustomerResponse> {
41
+ event_type: EventName.CustomerUpdated;
42
+ }
43
+ interface IDiscountCreated extends IEventsResponse<IDiscountResponse> {
44
+ event_type: EventName.DiscountCreated;
45
+ }
46
+ interface IDiscountUpdated extends IEventsResponse<IDiscountResponse> {
47
+ event_type: EventName.DiscountUpdated;
48
+ }
49
+ interface IDiscountImported extends IEventsResponse<IDiscountResponse> {
50
+ event_type: EventName.DiscountImported;
51
+ }
52
+ interface IPayoutCreated extends IEventsResponse<IPayoutResponse> {
53
+ event_type: EventName.PayoutCreated;
54
+ }
55
+ interface IPayoutPaid extends IEventsResponse<IPayoutResponse> {
56
+ event_type: EventName.PayoutPaid;
57
+ }
58
+ interface IPriceCreated extends IEventsResponse<IPriceResponse> {
59
+ event_type: EventName.PriceCreated;
60
+ }
61
+ interface IPriceUpdated extends IEventsResponse<IPriceResponse> {
62
+ event_type: EventName.PriceUpdated;
63
+ }
64
+ interface IProductCreated extends IEventsResponse<IProductResponse> {
65
+ event_type: EventName.ProductCreated;
66
+ }
67
+ interface IProductUpdated extends IEventsResponse<IProductResponse> {
68
+ event_type: EventName.ProductUpdated;
69
+ }
70
+ interface ISubscriptionActivated extends IEventsResponse<ISubscriptionNotificationResponse> {
71
+ event_type: EventName.SubscriptionActivated;
72
+ }
73
+ interface ISubscriptionCanceled extends IEventsResponse<ISubscriptionNotificationResponse> {
74
+ event_type: EventName.SubscriptionCanceled;
75
+ }
76
+ interface ISubscriptionCreated extends IEventsResponse<ISubscriptionNotificationResponse> {
77
+ event_type: EventName.SubscriptionCreated;
78
+ }
79
+ interface ISubscriptionImported extends IEventsResponse<ISubscriptionNotificationResponse> {
80
+ event_type: EventName.SubscriptionImported;
81
+ }
82
+ interface ISubscriptionPastDue extends IEventsResponse<ISubscriptionNotificationResponse> {
83
+ event_type: EventName.SubscriptionPastDue;
84
+ }
85
+ interface ISubscriptionPaused extends IEventsResponse<ISubscriptionNotificationResponse> {
86
+ event_type: EventName.SubscriptionPaused;
87
+ }
88
+ interface ISubscriptionResumed extends IEventsResponse<ISubscriptionNotificationResponse> {
89
+ event_type: EventName.SubscriptionResumed;
90
+ }
91
+ interface ISubscriptionTrialing extends IEventsResponse<ISubscriptionNotificationResponse> {
92
+ event_type: EventName.SubscriptionTrialing;
93
+ }
94
+ interface ISubscriptionUpdated extends IEventsResponse<ISubscriptionNotificationResponse> {
95
+ event_type: EventName.SubscriptionUpdated;
96
+ }
97
+ interface ITransactionBilled extends IEventsResponse<ITransactionResponse> {
98
+ event_type: EventName.TransactionBilled;
99
+ }
100
+ interface ITransactionCanceled extends IEventsResponse<ITransactionResponse> {
101
+ event_type: EventName.TransactionCanceled;
102
+ }
103
+ interface ITransactionCompleted extends IEventsResponse<ITransactionResponse> {
104
+ event_type: EventName.TransactionCompleted;
105
+ }
106
+ interface ITransactionCreated extends IEventsResponse<ITransactionResponse> {
107
+ event_type: EventName.TransactionCreated;
108
+ }
109
+ interface ITransactionPaid extends IEventsResponse<ITransactionResponse> {
110
+ event_type: EventName.TransactionPaid;
111
+ }
112
+ interface ITransactionPastDue extends IEventsResponse<ITransactionResponse> {
113
+ event_type: EventName.TransactionPastDue;
114
+ }
115
+ interface ITransactionPaymentFailed extends IEventsResponse<ITransactionResponse> {
116
+ event_type: EventName.TransactionPaymentFailed;
117
+ }
118
+ interface ITransactionReady extends IEventsResponse<ITransactionResponse> {
119
+ event_type: EventName.TransactionReady;
120
+ }
121
+ interface ITransactionUpdated extends IEventsResponse<ITransactionResponse> {
122
+ event_type: EventName.TransactionUpdated;
123
+ }
124
+ export type IEvents = IAddressCreated | IAddressUpdated | IAdjustmentCreated | IAdjustmentUpdated | IBusinessCreated | IBusinessUpdated | ICustomerCreated | ICustomerUpdated | IDiscountCreated | IDiscountUpdated | IDiscountImported | IPayoutCreated | IPayoutPaid | IPriceCreated | IPriceUpdated | IProductCreated | IProductUpdated | ISubscriptionActivated | ISubscriptionCanceled | ISubscriptionCreated | ISubscriptionImported | ISubscriptionPastDue | ISubscriptionPaused | ISubscriptionResumed | ISubscriptionTrialing | ISubscriptionUpdated | ITransactionBilled | ITransactionCanceled | ITransactionCompleted | ITransactionCreated | ITransactionPaid | ITransactionPastDue | ITransactionPaymentFailed | ITransactionReady | ITransactionUpdated;
125
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from './events-response';
@@ -0,0 +1,17 @@
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("./events-response"), exports);
@@ -9,3 +9,5 @@ export * from './subscription';
9
9
  export * from './address';
10
10
  export * from './discount';
11
11
  export * from './pricing-preview';
12
+ export * from './events';
13
+ export * from './payout';
@@ -25,3 +25,5 @@ __exportStar(require("./subscription"), exports);
25
25
  __exportStar(require("./address"), exports);
26
26
  __exportStar(require("./discount"), exports);
27
27
  __exportStar(require("./pricing-preview"), exports);
28
+ __exportStar(require("./events"), exports);
29
+ __exportStar(require("./payout"), exports);
@@ -0,0 +1 @@
1
+ export * from './payout-response';
@@ -0,0 +1,17 @@
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("./payout-response"), exports);
@@ -0,0 +1,7 @@
1
+ import { type CurrencyCode, type PayoutStatus } from '../../enums';
2
+ export interface IPayoutResponse {
3
+ id: string;
4
+ status: PayoutStatus;
5
+ amount: string;
6
+ currency_code: CurrencyCode;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -11,3 +11,4 @@ export * from './subscription-response';
11
11
  export * from './subscription-preview-response';
12
12
  export * from './subscription-preview-update-summary';
13
13
  export * from './subscription-result-response';
14
+ export * from './subscription-notification-response';
@@ -27,3 +27,4 @@ __exportStar(require("./subscription-response"), exports);
27
27
  __exportStar(require("./subscription-preview-response"), exports);
28
28
  __exportStar(require("./subscription-preview-update-summary"), exports);
29
29
  __exportStar(require("./subscription-result-response"), exports);
30
+ __exportStar(require("./subscription-notification-response"), exports);
@@ -0,0 +1,28 @@
1
+ import { type IBillingDetailsResponse, type ICustomData, type INextTransactionResponse, type ISubscriptionDiscountResponse, type ISubscriptionItemResponse, type ISubscriptionScheduledChangeResponse, type ISubscriptionTimePeriodResponse, type ITimePeriod, type ITransactionDetailsPreviewResponse } from '../index';
2
+ import { type CollectionMode, type CurrencyCode, type SubscriptionStatus } from '../../enums';
3
+ export interface ISubscriptionNotificationResponse {
4
+ id: string;
5
+ status: SubscriptionStatus;
6
+ transaction_id: string;
7
+ customer_id: string;
8
+ address_id: string;
9
+ business_id?: string | null;
10
+ currency_code: CurrencyCode;
11
+ created_at: string;
12
+ updated_at: string;
13
+ started_at?: string | null;
14
+ first_billed_at?: string | null;
15
+ next_billed_at?: string | null;
16
+ paused_at?: string | null;
17
+ canceled_at?: string | null;
18
+ discount?: ISubscriptionDiscountResponse | null;
19
+ collection_mode: CollectionMode;
20
+ billing_details?: IBillingDetailsResponse | null;
21
+ current_billing_period?: ISubscriptionTimePeriodResponse | null;
22
+ billing_cycle: ITimePeriod;
23
+ scheduled_change?: ISubscriptionScheduledChangeResponse | null;
24
+ items: ISubscriptionItemResponse[];
25
+ custom_data?: ICustomData | null;
26
+ next_transaction?: INextTransactionResponse | null;
27
+ recurring_transaction_details?: ITransactionDetailsPreviewResponse | null;
28
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.2.1";
1
+ export declare const SDK_VERSION = "0.2.2";
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = '0.2.1';
4
+ exports.SDK_VERSION = '0.2.2';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paddle/paddle-node-sdk",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "A NodeJS SDK for Paddle Billing API",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",