@paddle/paddle-node-sdk 0.2.1 → 0.2.3

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 (223) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +57 -18
  3. package/dist/entities/discount/discount.d.ts +1 -1
  4. package/dist/entities/discount/discount.js +2 -1
  5. package/dist/entities/event-types/event-type.d.ts +9 -0
  6. package/dist/entities/event-types/event-type.js +12 -0
  7. package/dist/entities/event-types/index.d.ts +1 -0
  8. package/dist/entities/event-types/index.js +17 -0
  9. package/dist/entities/events/event-collection.d.ts +6 -0
  10. package/dist/entities/events/event-collection.js +11 -0
  11. package/dist/entities/events/event.d.ts +9 -0
  12. package/dist/entities/events/event.js +14 -0
  13. package/dist/entities/events/index.d.ts +1 -0
  14. package/dist/entities/events/index.js +17 -0
  15. package/dist/entities/index.d.ts +5 -0
  16. package/dist/entities/index.js +5 -0
  17. package/dist/entities/notification-settings/index.d.ts +1 -0
  18. package/dist/entities/notification-settings/index.js +17 -0
  19. package/dist/entities/notification-settings/notification-settings.d.ts +15 -0
  20. package/dist/entities/notification-settings/notification-settings.js +18 -0
  21. package/dist/entities/notifications/index.d.ts +5 -0
  22. package/dist/entities/notifications/index.js +21 -0
  23. package/dist/entities/notifications/notification-collection.d.ts +6 -0
  24. package/dist/entities/notifications/notification-collection.js +11 -0
  25. package/dist/entities/notifications/notification-log-collection.d.ts +6 -0
  26. package/dist/entities/notifications/notification-log-collection.js +11 -0
  27. package/dist/entities/notifications/notification-log.d.ts +8 -0
  28. package/dist/entities/notifications/notification-log.js +14 -0
  29. package/dist/entities/notifications/notification.d.ts +18 -0
  30. package/dist/entities/notifications/notification.js +22 -0
  31. package/dist/entities/notifications/replay-notification.d.ts +5 -0
  32. package/dist/entities/notifications/replay-notification.js +9 -0
  33. package/dist/entities/payout/index.d.ts +1 -0
  34. package/dist/entities/payout/index.js +17 -0
  35. package/dist/entities/payout/payout.d.ts +9 -0
  36. package/dist/entities/payout/payout.js +12 -0
  37. package/dist/entities/subscription/index.d.ts +1 -0
  38. package/dist/entities/subscription/index.js +1 -0
  39. package/dist/entities/subscription/subscription-notification.d.ts +28 -0
  40. package/dist/entities/subscription/subscription-notification.js +35 -0
  41. package/dist/entities/subscription/subscription-scheduled-change.d.ts +2 -2
  42. package/dist/enums/index.d.ts +3 -0
  43. package/dist/enums/index.js +3 -0
  44. package/dist/enums/notification/index.d.ts +2 -0
  45. package/dist/enums/notification/index.js +18 -0
  46. package/dist/enums/notification/notification-status.d.ts +1 -0
  47. package/dist/enums/notification/notification-status.js +2 -0
  48. package/dist/enums/notification/origin.d.ts +1 -0
  49. package/dist/enums/notification/origin.js +2 -0
  50. package/dist/enums/notification-settings/index.d.ts +1 -0
  51. package/dist/enums/notification-settings/index.js +17 -0
  52. package/dist/enums/notification-settings/notification-settings-type.d.ts +1 -0
  53. package/dist/enums/notification-settings/notification-settings-type.js +2 -0
  54. package/dist/enums/payout/index.d.ts +1 -0
  55. package/dist/enums/payout/index.js +17 -0
  56. package/dist/enums/payout/payout-status.d.ts +1 -0
  57. package/dist/enums/payout/payout-status.js +2 -0
  58. package/dist/internal/api/client.d.ts +2 -0
  59. package/dist/internal/api/client.js +14 -0
  60. package/dist/notifications/events/address/address-created-event.d.ts +9 -0
  61. package/dist/notifications/events/address/address-created-event.js +14 -0
  62. package/dist/notifications/events/address/address-updated-event.d.ts +9 -0
  63. package/dist/notifications/events/address/address-updated-event.js +14 -0
  64. package/dist/notifications/events/address/index.d.ts +2 -0
  65. package/dist/notifications/events/address/index.js +18 -0
  66. package/dist/notifications/events/adjustment/adjustment-created-event.d.ts +9 -0
  67. package/dist/notifications/events/adjustment/adjustment-created-event.js +14 -0
  68. package/dist/notifications/events/adjustment/adjustment-updated-event.d.ts +9 -0
  69. package/dist/notifications/events/adjustment/adjustment-updated-event.js +14 -0
  70. package/dist/notifications/events/adjustment/index.d.ts +2 -0
  71. package/dist/notifications/events/adjustment/index.js +18 -0
  72. package/dist/notifications/events/business/business-created-event.d.ts +9 -0
  73. package/dist/notifications/events/business/business-created-event.js +14 -0
  74. package/dist/notifications/events/business/business-updated-event.d.ts +9 -0
  75. package/dist/notifications/events/business/business-updated-event.js +14 -0
  76. package/dist/notifications/events/business/index.d.ts +2 -0
  77. package/dist/notifications/events/business/index.js +18 -0
  78. package/dist/notifications/events/customer/customer-created-event.d.ts +9 -0
  79. package/dist/notifications/events/customer/customer-created-event.js +14 -0
  80. package/dist/notifications/events/customer/customer-updated-event.d.ts +9 -0
  81. package/dist/notifications/events/customer/customer-updated-event.js +14 -0
  82. package/dist/notifications/events/customer/index.d.ts +2 -0
  83. package/dist/notifications/events/customer/index.js +18 -0
  84. package/dist/notifications/events/discount/discount-created-event.d.ts +9 -0
  85. package/dist/notifications/events/discount/discount-created-event.js +14 -0
  86. package/dist/notifications/events/discount/discount-imported-event.d.ts +9 -0
  87. package/dist/notifications/events/discount/discount-imported-event.js +14 -0
  88. package/dist/notifications/events/discount/discount-updated-event.d.ts +9 -0
  89. package/dist/notifications/events/discount/discount-updated-event.js +14 -0
  90. package/dist/notifications/events/discount/index.d.ts +3 -0
  91. package/dist/notifications/events/discount/index.js +19 -0
  92. package/dist/notifications/events/index.d.ts +10 -0
  93. package/dist/notifications/events/index.js +26 -0
  94. package/dist/notifications/events/payout/index.d.ts +2 -0
  95. package/dist/notifications/events/payout/index.js +18 -0
  96. package/dist/notifications/events/payout/payout-created-event.d.ts +9 -0
  97. package/dist/notifications/events/payout/payout-created-event.js +14 -0
  98. package/dist/notifications/events/payout/payout-paid-event.d.ts +9 -0
  99. package/dist/notifications/events/payout/payout-paid-event.js +14 -0
  100. package/dist/notifications/events/price/index.d.ts +2 -0
  101. package/dist/notifications/events/price/index.js +18 -0
  102. package/dist/notifications/events/price/price-created-event.d.ts +9 -0
  103. package/dist/notifications/events/price/price-created-event.js +14 -0
  104. package/dist/notifications/events/price/price-updated-event.d.ts +9 -0
  105. package/dist/notifications/events/price/price-updated-event.js +14 -0
  106. package/dist/notifications/events/product/index.d.ts +2 -0
  107. package/dist/notifications/events/product/index.js +18 -0
  108. package/dist/notifications/events/product/product-created-event.d.ts +9 -0
  109. package/dist/notifications/events/product/product-created-event.js +14 -0
  110. package/dist/notifications/events/product/product-updated-event.d.ts +9 -0
  111. package/dist/notifications/events/product/product-updated-event.js +14 -0
  112. package/dist/notifications/events/subscription/index.d.ts +9 -0
  113. package/dist/notifications/events/subscription/index.js +25 -0
  114. package/dist/notifications/events/subscription/subscription-activated-event.d.ts +9 -0
  115. package/dist/notifications/events/subscription/subscription-activated-event.js +14 -0
  116. package/dist/notifications/events/subscription/subscription-canceled-event.d.ts +9 -0
  117. package/dist/notifications/events/subscription/subscription-canceled-event.js +14 -0
  118. package/dist/notifications/events/subscription/subscription-created-event.d.ts +9 -0
  119. package/dist/notifications/events/subscription/subscription-created-event.js +14 -0
  120. package/dist/notifications/events/subscription/subscription-imported-event.d.ts +9 -0
  121. package/dist/notifications/events/subscription/subscription-imported-event.js +14 -0
  122. package/dist/notifications/events/subscription/subscription-past-due-event.d.ts +9 -0
  123. package/dist/notifications/events/subscription/subscription-past-due-event.js +14 -0
  124. package/dist/notifications/events/subscription/subscription-paused-event.d.ts +9 -0
  125. package/dist/notifications/events/subscription/subscription-paused-event.js +14 -0
  126. package/dist/notifications/events/subscription/subscription-resumed-event.d.ts +9 -0
  127. package/dist/notifications/events/subscription/subscription-resumed-event.js +14 -0
  128. package/dist/notifications/events/subscription/subscription-trialing-event.d.ts +9 -0
  129. package/dist/notifications/events/subscription/subscription-trialing-event.js +14 -0
  130. package/dist/notifications/events/subscription/subscription-updated-event.d.ts +9 -0
  131. package/dist/notifications/events/subscription/subscription-updated-event.js +14 -0
  132. package/dist/notifications/events/transaction/index.d.ts +9 -0
  133. package/dist/notifications/events/transaction/index.js +25 -0
  134. package/dist/notifications/events/transaction/transaction-billed-event.d.ts +9 -0
  135. package/dist/notifications/events/transaction/transaction-billed-event.js +14 -0
  136. package/dist/notifications/events/transaction/transaction-canceled-event.d.ts +9 -0
  137. package/dist/notifications/events/transaction/transaction-canceled-event.js +14 -0
  138. package/dist/notifications/events/transaction/transaction-completed-event.d.ts +9 -0
  139. package/dist/notifications/events/transaction/transaction-completed-event.js +14 -0
  140. package/dist/notifications/events/transaction/transaction-created-event.d.ts +9 -0
  141. package/dist/notifications/events/transaction/transaction-created-event.js +14 -0
  142. package/dist/notifications/events/transaction/transaction-paid-event.d.ts +9 -0
  143. package/dist/notifications/events/transaction/transaction-paid-event.js +14 -0
  144. package/dist/notifications/events/transaction/transaction-past-due-event.d.ts +9 -0
  145. package/dist/notifications/events/transaction/transaction-past-due-event.js +14 -0
  146. package/dist/notifications/events/transaction/transaction-payment-failed-event.d.ts +9 -0
  147. package/dist/notifications/events/transaction/transaction-payment-failed-event.js +14 -0
  148. package/dist/notifications/events/transaction/transaction-ready-event.d.ts +9 -0
  149. package/dist/notifications/events/transaction/transaction-ready-event.js +14 -0
  150. package/dist/notifications/events/transaction/transaction-updated-event.d.ts +9 -0
  151. package/dist/notifications/events/transaction/transaction-updated-event.js +14 -0
  152. package/dist/notifications/helpers/index.d.ts +3 -0
  153. package/dist/notifications/helpers/index.js +19 -0
  154. package/dist/notifications/helpers/types.d.ts +40 -0
  155. package/dist/notifications/helpers/types.js +41 -0
  156. package/dist/notifications/{validator/notifications-validator.d.ts → helpers/webhooks-validator.d.ts} +1 -1
  157. package/dist/notifications/{validator/notifications-validator.js → helpers/webhooks-validator.js} +6 -6
  158. package/dist/notifications/helpers/webhooks.d.ts +7 -0
  159. package/dist/notifications/helpers/webhooks.js +100 -0
  160. package/dist/notifications/index.d.ts +2 -1
  161. package/dist/notifications/index.js +2 -1
  162. package/dist/paddle.d.ts +9 -2
  163. package/dist/paddle.js +8 -1
  164. package/dist/resources/event-types/index.d.ts +5 -0
  165. package/dist/resources/event-types/index.js +27 -0
  166. package/dist/resources/events/index.d.ts +7 -0
  167. package/dist/resources/events/index.js +30 -0
  168. package/dist/resources/events/operations/index.d.ts +1 -0
  169. package/dist/resources/events/operations/index.js +17 -0
  170. package/dist/resources/events/operations/list-events-query-parameters.d.ts +5 -0
  171. package/dist/resources/events/operations/list-events-query-parameters.js +2 -0
  172. package/dist/resources/index.d.ts +3 -0
  173. package/dist/resources/index.js +3 -0
  174. package/dist/resources/notification-settings/index.d.ts +11 -0
  175. package/dist/resources/notification-settings/index.js +84 -0
  176. package/dist/resources/notification-settings/operations/create-notification-settings-request-body.d.ts +10 -0
  177. package/dist/resources/notification-settings/operations/create-notification-settings-request-body.js +2 -0
  178. package/dist/resources/notification-settings/operations/index.d.ts +2 -0
  179. package/dist/resources/notification-settings/operations/index.js +18 -0
  180. package/dist/resources/notification-settings/operations/update-notification-settings-request-body.d.ts +9 -0
  181. package/dist/resources/notification-settings/operations/update-notification-settings-request-body.js +2 -0
  182. package/dist/resources/notifications/index.d.ts +10 -0
  183. package/dist/resources/notifications/index.js +69 -0
  184. package/dist/resources/notifications/operations/index.d.ts +2 -0
  185. package/dist/resources/notifications/operations/index.js +18 -0
  186. package/dist/resources/notifications/operations/list-notification-log-query-parameters.d.ts +4 -0
  187. package/dist/resources/notifications/operations/list-notification-log-query-parameters.js +2 -0
  188. package/dist/resources/notifications/operations/list-notification-query-parameters.d.ts +12 -0
  189. package/dist/resources/notifications/operations/list-notification-query-parameters.js +2 -0
  190. package/dist/types/event-types/event-type-response.d.ts +7 -0
  191. package/dist/types/event-types/event-type-response.js +2 -0
  192. package/dist/types/event-types/index.d.ts +1 -0
  193. package/dist/types/event-types/index.js +17 -0
  194. package/dist/types/events/events-response.d.ts +125 -0
  195. package/dist/types/events/events-response.js +2 -0
  196. package/dist/types/events/index.d.ts +1 -0
  197. package/dist/types/events/index.js +17 -0
  198. package/dist/types/index.d.ts +5 -0
  199. package/dist/types/index.js +5 -0
  200. package/dist/types/notification-settings/index.d.ts +1 -0
  201. package/dist/types/notification-settings/index.js +17 -0
  202. package/dist/types/notification-settings/notification-settings-response.d.ts +13 -0
  203. package/dist/types/notification-settings/notification-settings-response.js +2 -0
  204. package/dist/types/notifications/index.d.ts +3 -0
  205. package/dist/types/notifications/index.js +19 -0
  206. package/dist/types/notifications/notification-log.d.ts +7 -0
  207. package/dist/types/notifications/notification-log.js +2 -0
  208. package/dist/types/notifications/notification.d.ts +17 -0
  209. package/dist/types/notifications/notification.js +2 -0
  210. package/dist/types/notifications/replay-notification.d.ts +3 -0
  211. package/dist/types/notifications/replay-notification.js +2 -0
  212. package/dist/types/payout/index.d.ts +1 -0
  213. package/dist/types/payout/index.js +17 -0
  214. package/dist/types/payout/payout-response.d.ts +7 -0
  215. package/dist/types/payout/payout-response.js +2 -0
  216. package/dist/types/subscription/index.d.ts +1 -0
  217. package/dist/types/subscription/index.js +1 -0
  218. package/dist/types/subscription/subscription-notification-response.d.ts +28 -0
  219. package/dist/types/subscription/subscription-notification-response.js +2 -0
  220. package/dist/types/subscription/subscription-scheduled-change-response.d.ts +2 -2
  221. package/dist/version.d.ts +1 -1
  222. package/dist/version.js +1 -1
  223. package/package.json +1 -1
@@ -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 });
@@ -1,6 +1,6 @@
1
- import { type AdjustmentAction } from '../../enums';
1
+ import { type ScheduledChangeAction } from '../../enums';
2
2
  export interface ISubscriptionScheduledChangeResponse {
3
- action: AdjustmentAction;
3
+ action: ScheduledChangeAction;
4
4
  effective_at: string;
5
5
  resume_at?: string | null;
6
6
  }
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.3";
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.3';
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.3",
4
4
  "description": "A NodeJS SDK for Paddle Billing API",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",