@paddle/paddle-node-sdk 0.2.2 → 0.2.4

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 (113) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +14 -14
  3. package/dist/entities/address/address.d.ts +2 -1
  4. package/dist/entities/address/address.js +2 -0
  5. package/dist/entities/business/business.d.ts +2 -1
  6. package/dist/entities/business/business.js +1 -0
  7. package/dist/entities/customer/customer.d.ts +2 -1
  8. package/dist/entities/customer/customer.js +2 -0
  9. package/dist/entities/discount/discount.d.ts +2 -1
  10. package/dist/entities/discount/discount.js +2 -0
  11. package/dist/entities/event-types/event-type.d.ts +9 -0
  12. package/dist/entities/event-types/event-type.js +12 -0
  13. package/dist/entities/event-types/index.d.ts +1 -0
  14. package/dist/entities/event-types/index.js +17 -0
  15. package/dist/entities/events/event-collection.d.ts +2 -2
  16. package/dist/entities/index.d.ts +3 -0
  17. package/dist/entities/index.js +3 -0
  18. package/dist/entities/notification-settings/index.d.ts +1 -0
  19. package/dist/entities/notification-settings/index.js +17 -0
  20. package/dist/entities/notification-settings/notification-settings.d.ts +15 -0
  21. package/dist/entities/notification-settings/notification-settings.js +18 -0
  22. package/dist/entities/notifications/index.d.ts +5 -0
  23. package/dist/entities/notifications/index.js +21 -0
  24. package/dist/entities/notifications/notification-collection.d.ts +6 -0
  25. package/dist/entities/notifications/notification-collection.js +11 -0
  26. package/dist/entities/notifications/notification-log-collection.d.ts +6 -0
  27. package/dist/entities/notifications/notification-log-collection.js +11 -0
  28. package/dist/entities/notifications/notification-log.d.ts +8 -0
  29. package/dist/entities/notifications/notification-log.js +14 -0
  30. package/dist/entities/notifications/notification.d.ts +18 -0
  31. package/dist/entities/notifications/notification.js +22 -0
  32. package/dist/entities/notifications/replay-notification.d.ts +5 -0
  33. package/dist/entities/notifications/replay-notification.js +9 -0
  34. package/dist/entities/shared/transaction-payout-totals.d.ts +1 -0
  35. package/dist/entities/shared/transaction-payout-totals.js +1 -0
  36. package/dist/entities/shared/transaction-totals.d.ts +1 -0
  37. package/dist/entities/shared/transaction-totals.js +1 -0
  38. package/dist/entities/subscription/subscription-includes.d.ts +2 -1
  39. package/dist/entities/subscription/subscription-includes.js +1 -0
  40. package/dist/entities/subscription/subscription-preview.d.ts +2 -1
  41. package/dist/entities/subscription/subscription-preview.js +1 -0
  42. package/dist/entities/subscription/subscription-scheduled-change.d.ts +2 -2
  43. package/dist/entities/subscription/subscription.d.ts +2 -1
  44. package/dist/entities/subscription/subscription.js +1 -0
  45. package/dist/enums/index.d.ts +2 -0
  46. package/dist/enums/index.js +2 -0
  47. package/dist/enums/notification/index.d.ts +2 -0
  48. package/dist/enums/notification/index.js +18 -0
  49. package/dist/enums/notification/notification-status.d.ts +1 -0
  50. package/dist/enums/notification/notification-status.js +2 -0
  51. package/dist/enums/notification/origin.d.ts +1 -0
  52. package/dist/enums/notification/origin.js +2 -0
  53. package/dist/enums/notification-settings/index.d.ts +1 -0
  54. package/dist/enums/notification-settings/index.js +17 -0
  55. package/dist/enums/notification-settings/notification-settings-type.d.ts +1 -0
  56. package/dist/enums/notification-settings/notification-settings-type.js +2 -0
  57. package/dist/internal/api/client.d.ts +2 -0
  58. package/dist/internal/api/client.js +14 -0
  59. package/dist/notifications/helpers/webhooks.d.ts +2 -2
  60. package/dist/notifications/helpers/webhooks.js +3 -1
  61. package/dist/paddle.d.ts +4 -1
  62. package/dist/paddle.js +3 -0
  63. package/dist/resources/event-types/index.d.ts +5 -0
  64. package/dist/resources/event-types/index.js +27 -0
  65. package/dist/resources/index.d.ts +3 -0
  66. package/dist/resources/index.js +3 -0
  67. package/dist/resources/notification-settings/index.d.ts +11 -0
  68. package/dist/resources/notification-settings/index.js +84 -0
  69. package/dist/resources/notification-settings/operations/create-notification-settings-request-body.d.ts +10 -0
  70. package/dist/resources/notification-settings/operations/create-notification-settings-request-body.js +2 -0
  71. package/dist/resources/notification-settings/operations/index.d.ts +2 -0
  72. package/dist/resources/notification-settings/operations/index.js +18 -0
  73. package/dist/resources/notification-settings/operations/update-notification-settings-request-body.d.ts +9 -0
  74. package/dist/resources/notification-settings/operations/update-notification-settings-request-body.js +2 -0
  75. package/dist/resources/notifications/index.d.ts +10 -0
  76. package/dist/resources/notifications/index.js +69 -0
  77. package/dist/resources/notifications/operations/index.d.ts +2 -0
  78. package/dist/resources/notifications/operations/index.js +18 -0
  79. package/dist/resources/notifications/operations/list-notification-log-query-parameters.d.ts +4 -0
  80. package/dist/resources/notifications/operations/list-notification-log-query-parameters.js +2 -0
  81. package/dist/resources/notifications/operations/list-notification-query-parameters.d.ts +12 -0
  82. package/dist/resources/notifications/operations/list-notification-query-parameters.js +2 -0
  83. package/dist/resources/transactions/operations/list-transaction-query-parameters.d.ts +2 -1
  84. package/dist/types/address/address-response.d.ts +2 -1
  85. package/dist/types/business/business-response.d.ts +2 -1
  86. package/dist/types/customer/customer-response.d.ts +2 -1
  87. package/dist/types/discount/discount-response.d.ts +2 -1
  88. package/dist/types/event-types/event-type-response.d.ts +7 -0
  89. package/dist/types/event-types/event-type-response.js +2 -0
  90. package/dist/types/event-types/index.d.ts +1 -0
  91. package/dist/types/event-types/index.js +17 -0
  92. package/dist/types/index.d.ts +3 -0
  93. package/dist/types/index.js +3 -0
  94. package/dist/types/notification-settings/index.d.ts +1 -0
  95. package/dist/types/notification-settings/index.js +17 -0
  96. package/dist/types/notification-settings/notification-settings-response.d.ts +13 -0
  97. package/dist/types/notification-settings/notification-settings-response.js +2 -0
  98. package/dist/types/notifications/index.d.ts +3 -0
  99. package/dist/types/notifications/index.js +19 -0
  100. package/dist/types/notifications/notification-log.d.ts +7 -0
  101. package/dist/types/notifications/notification-log.js +2 -0
  102. package/dist/types/notifications/notification.d.ts +17 -0
  103. package/dist/types/notifications/notification.js +2 -0
  104. package/dist/types/notifications/replay-notification.d.ts +3 -0
  105. package/dist/types/notifications/replay-notification.js +2 -0
  106. package/dist/types/shared/transaction-payout-totals-response.d.ts +1 -0
  107. package/dist/types/shared/transaction-totals-response.d.ts +1 -0
  108. package/dist/types/subscription/subscription-preview-response.d.ts +2 -1
  109. package/dist/types/subscription/subscription-response.d.ts +2 -1
  110. package/dist/types/subscription/subscription-scheduled-change-response.d.ts +2 -2
  111. package/dist/version.d.ts +1 -1
  112. package/dist/version.js +1 -1
  113. package/package.json +1 -1
@@ -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("./notification-settings-response"), exports);
@@ -0,0 +1,13 @@
1
+ import { type NotificationSettingsType } from '../../enums';
2
+ import { type IEventTypeResponse } from '../event-types';
3
+ export interface INotificationSettingsResponse {
4
+ id: string;
5
+ description: string;
6
+ type: NotificationSettingsType;
7
+ destination: string;
8
+ active: boolean;
9
+ api_version: number;
10
+ include_sensitive_fields: boolean;
11
+ subscribed_events: IEventTypeResponse[];
12
+ endpoint_secret_key: string;
13
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export * from './notification';
2
+ export * from './notification-log';
3
+ export * from './replay-notification';
@@ -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("./notification"), exports);
18
+ __exportStar(require("./notification-log"), exports);
19
+ __exportStar(require("./replay-notification"), exports);
@@ -0,0 +1,7 @@
1
+ export interface INotificationLogResponse {
2
+ id: string;
3
+ response_code: number;
4
+ response_content_type?: string | null;
5
+ response_body: string;
6
+ attempted_at: string;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,17 @@
1
+ import { type NotificationStatus, type Origin } from '../../enums';
2
+ import type { IEvents } from '../events';
3
+ import { type IEventName } from '../../notifications';
4
+ export interface INotificationResponse {
5
+ id: string;
6
+ type: IEventName;
7
+ status: NotificationStatus;
8
+ payload: IEvents;
9
+ occurred_at: string;
10
+ delivered_at?: null | string;
11
+ replayed_at?: null | string;
12
+ origin: Origin;
13
+ last_attempt_at?: null | string;
14
+ retry_at?: null | string;
15
+ times_attempted: number;
16
+ notification_setting_id: string;
17
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export interface IReplayNotificationResponse {
2
+ notification_id: string;
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -7,6 +7,7 @@ export interface ITransactionPayoutTotalsResponse {
7
7
  credit: string;
8
8
  balance: string;
9
9
  grand_total: string;
10
+ credit_to_balance: string;
10
11
  fee: string;
11
12
  earnings: string;
12
13
  currency_code: PayoutCurrencyCode;
@@ -5,6 +5,7 @@ export interface ITransactionTotalsResponse {
5
5
  tax: string;
6
6
  total: string;
7
7
  credit: string;
8
+ credit_to_balance: string;
8
9
  balance: string;
9
10
  grand_total: string;
10
11
  fee?: string | null;
@@ -1,4 +1,4 @@
1
- import { type ISubscriptionDiscountResponse, type IBillingDetailsResponse, type ITimePeriod, type ISubscriptionScheduledChangeResponse, type ISubscriptionItemResponse, type ICustomData, type INextTransactionResponse, type ITransactionDetailsPreviewResponse, type ISubscriptionTimePeriodResponse, type ISubscriptionManagementResponse, type ISubscriptionPreviewUpdateSummary } from '../index';
1
+ import { type ISubscriptionDiscountResponse, type IBillingDetailsResponse, type ITimePeriod, type ISubscriptionScheduledChangeResponse, type ISubscriptionItemResponse, type ICustomData, type INextTransactionResponse, type ITransactionDetailsPreviewResponse, type ISubscriptionTimePeriodResponse, type ISubscriptionManagementResponse, type ISubscriptionPreviewUpdateSummary, type IImportMetaResponse } from '../index';
2
2
  import { type CurrencyCode, type CollectionMode, type SubscriptionStatus } from '../../enums';
3
3
  export interface ISubscriptionPreviewResponse {
4
4
  status: SubscriptionStatus;
@@ -26,4 +26,5 @@ export interface ISubscriptionPreviewResponse {
26
26
  next_transaction?: INextTransactionResponse | null;
27
27
  recurring_transaction_details?: ITransactionDetailsPreviewResponse | null;
28
28
  update_summary?: ISubscriptionPreviewUpdateSummary | null;
29
+ import_meta?: IImportMetaResponse | null;
29
30
  }
@@ -1,4 +1,4 @@
1
- import { type IBillingDetailsResponse, type ICustomData, type INextTransactionResponse, type ISubscriptionDiscountResponse, type ISubscriptionItemResponse, type ISubscriptionManagementResponse, type ISubscriptionScheduledChangeResponse, type ISubscriptionTimePeriodResponse, type ITimePeriod, type ITransactionDetailsPreviewResponse } from '../index';
1
+ import { type IBillingDetailsResponse, type ICustomData, type IImportMetaResponse, type INextTransactionResponse, type ISubscriptionDiscountResponse, type ISubscriptionItemResponse, type ISubscriptionManagementResponse, type ISubscriptionScheduledChangeResponse, type ISubscriptionTimePeriodResponse, type ITimePeriod, type ITransactionDetailsPreviewResponse } from '../index';
2
2
  import { type CollectionMode, type CurrencyCode, type SubscriptionStatus } from '../../enums';
3
3
  export interface ISubscriptionResponse {
4
4
  id: string;
@@ -25,4 +25,5 @@ export interface ISubscriptionResponse {
25
25
  custom_data?: ICustomData | null;
26
26
  next_transaction?: INextTransactionResponse | null;
27
27
  recurring_transaction_details?: ITransactionDetailsPreviewResponse | null;
28
+ import_meta?: IImportMetaResponse | null;
28
29
  }
@@ -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.2";
1
+ export declare const SDK_VERSION = "0.2.4";
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.2';
4
+ exports.SDK_VERSION = '0.2.4';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paddle/paddle-node-sdk",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "A NodeJS SDK for Paddle Billing API",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",