@paddle/paddle-node-sdk 3.4.0 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/dist/cjs/entities/price/price.js +1 -1
  2. package/dist/cjs/entities/shared/index.js +1 -0
  3. package/dist/cjs/entities/shared/transaction-payout-totals.js +2 -0
  4. package/dist/cjs/entities/shared/transaction-totals-adjusted.js +2 -0
  5. package/dist/cjs/entities/shared/transaction-totals.js +2 -0
  6. package/dist/cjs/entities/shared/trial-period.js +14 -0
  7. package/dist/cjs/enums/api-key-exposure/action-taken.js +2 -0
  8. package/dist/cjs/enums/api-key-exposure/index.js +19 -0
  9. package/dist/cjs/enums/api-key-exposure/risk-level.js +2 -0
  10. package/dist/cjs/enums/api-key-exposure/source.js +2 -0
  11. package/dist/cjs/enums/index.js +1 -0
  12. package/dist/cjs/notifications/entities/api-key-exposure/api-key-exposure-notification.js +24 -0
  13. package/dist/cjs/notifications/entities/api-key-exposure/index.js +17 -0
  14. package/dist/cjs/notifications/entities/index.js +1 -0
  15. package/dist/cjs/notifications/entities/payout/payout-notification.js +2 -0
  16. package/dist/cjs/notifications/entities/price/price-notification.js +1 -1
  17. package/dist/cjs/notifications/entities/shared/index.js +1 -0
  18. package/dist/cjs/notifications/entities/shared/transaction-payout-totals-notification.js +2 -0
  19. package/dist/cjs/notifications/entities/shared/transaction-totals-adjusted-notification.js +2 -0
  20. package/dist/cjs/notifications/entities/shared/transaction-totals-notification.js +2 -0
  21. package/dist/cjs/notifications/entities/shared/trial-period-notification.js +14 -0
  22. package/dist/cjs/notifications/entities/subscription/subscription-price-notification.js +1 -1
  23. package/dist/cjs/notifications/events/api-key-exposure/api-key-exposure-created-event.js +15 -0
  24. package/dist/cjs/notifications/events/api-key-exposure/index.js +17 -0
  25. package/dist/cjs/notifications/events/index.js +1 -0
  26. package/dist/cjs/notifications/helpers/types.js +1 -0
  27. package/dist/cjs/notifications/helpers/webhooks.js +2 -0
  28. package/dist/cjs/notifications/types/api-key-exposure/api-key-exposure-notification-response.js +2 -0
  29. package/dist/cjs/notifications/types/api-key-exposure/index.js +17 -0
  30. package/dist/cjs/notifications/types/index.js +1 -0
  31. package/dist/cjs/notifications/types/shared/index.js +2 -0
  32. package/dist/cjs/notifications/types/shared/trial-period-notification-response.js +2 -0
  33. package/dist/cjs/notifications/types/shared/trial-period-notification.js +2 -0
  34. package/dist/cjs/types/shared/index.js +2 -0
  35. package/dist/cjs/types/shared/trial-period-response.js +2 -0
  36. package/dist/cjs/types/shared/trial-period.js +2 -0
  37. package/dist/cjs/version.js +1 -1
  38. package/dist/esm/entities/price/price.js +2 -2
  39. package/dist/esm/entities/shared/index.js +1 -0
  40. package/dist/esm/entities/shared/transaction-payout-totals.js +2 -0
  41. package/dist/esm/entities/shared/transaction-totals-adjusted.js +2 -0
  42. package/dist/esm/entities/shared/transaction-totals.js +2 -0
  43. package/dist/esm/entities/shared/trial-period.js +10 -0
  44. package/dist/esm/enums/api-key-exposure/action-taken.js +1 -0
  45. package/dist/esm/enums/api-key-exposure/index.js +3 -0
  46. package/dist/esm/enums/api-key-exposure/risk-level.js +1 -0
  47. package/dist/esm/enums/api-key-exposure/source.js +1 -0
  48. package/dist/esm/enums/index.js +1 -0
  49. package/dist/esm/notifications/entities/api-key-exposure/api-key-exposure-notification.js +20 -0
  50. package/dist/esm/notifications/entities/api-key-exposure/index.js +1 -0
  51. package/dist/esm/notifications/entities/index.js +1 -0
  52. package/dist/esm/notifications/entities/payout/payout-notification.js +2 -0
  53. package/dist/esm/notifications/entities/price/price-notification.js +2 -2
  54. package/dist/esm/notifications/entities/shared/index.js +1 -0
  55. package/dist/esm/notifications/entities/shared/transaction-payout-totals-notification.js +2 -0
  56. package/dist/esm/notifications/entities/shared/transaction-totals-adjusted-notification.js +2 -0
  57. package/dist/esm/notifications/entities/shared/transaction-totals-notification.js +2 -0
  58. package/dist/esm/notifications/entities/shared/trial-period-notification.js +10 -0
  59. package/dist/esm/notifications/entities/subscription/subscription-price-notification.js +2 -2
  60. package/dist/esm/notifications/events/api-key-exposure/api-key-exposure-created-event.js +11 -0
  61. package/dist/esm/notifications/events/api-key-exposure/index.js +1 -0
  62. package/dist/esm/notifications/events/index.js +1 -0
  63. package/dist/esm/notifications/helpers/types.js +1 -0
  64. package/dist/esm/notifications/helpers/webhooks.js +3 -1
  65. package/dist/esm/notifications/types/api-key-exposure/api-key-exposure-notification-response.js +1 -0
  66. package/dist/esm/notifications/types/api-key-exposure/index.js +1 -0
  67. package/dist/esm/notifications/types/index.js +1 -0
  68. package/dist/esm/notifications/types/shared/index.js +2 -0
  69. package/dist/esm/notifications/types/shared/trial-period-notification-response.js +1 -0
  70. package/dist/esm/notifications/types/shared/trial-period-notification.js +1 -0
  71. package/dist/esm/types/shared/index.js +2 -0
  72. package/dist/esm/types/shared/trial-period-response.js +1 -0
  73. package/dist/esm/types/shared/trial-period.js +1 -0
  74. package/dist/esm/version.js +1 -1
  75. package/dist/tsconfig.cjs.tsbuildinfo +1 -1
  76. package/dist/tsconfig.esm.tsbuildinfo +1 -1
  77. package/dist/tsconfig.types.tsbuildinfo +1 -1
  78. package/dist/types/entities/price/price.d.ts +2 -2
  79. package/dist/types/entities/shared/index.d.ts +1 -0
  80. package/dist/types/entities/shared/transaction-payout-totals.d.ts +1 -0
  81. package/dist/types/entities/shared/transaction-totals-adjusted.d.ts +1 -0
  82. package/dist/types/entities/shared/transaction-totals.d.ts +1 -0
  83. package/dist/types/entities/shared/trial-period.d.ts +8 -0
  84. package/dist/types/enums/api-key-exposure/action-taken.d.ts +1 -0
  85. package/dist/types/enums/api-key-exposure/index.d.ts +3 -0
  86. package/dist/types/enums/api-key-exposure/risk-level.d.ts +1 -0
  87. package/dist/types/enums/api-key-exposure/source.d.ts +1 -0
  88. package/dist/types/enums/index.d.ts +1 -0
  89. package/dist/types/enums/payment-method/type.d.ts +1 -1
  90. package/dist/types/enums/report/report-filter-name.d.ts +1 -1
  91. package/dist/types/enums/report/report-type.d.ts +1 -1
  92. package/dist/types/enums/shared/available-payment-methods.d.ts +1 -1
  93. package/dist/types/enums/shared/payment-type.d.ts +1 -1
  94. package/dist/types/enums/shared/tax-mode.d.ts +1 -1
  95. package/dist/types/notifications/entities/api-key-exposure/api-key-exposure-notification.d.ts +13 -0
  96. package/dist/types/notifications/entities/api-key-exposure/index.d.ts +1 -0
  97. package/dist/types/notifications/entities/index.d.ts +1 -0
  98. package/dist/types/notifications/entities/payout/payout-notification.d.ts +1 -0
  99. package/dist/types/notifications/entities/price/price-notification.d.ts +2 -2
  100. package/dist/types/notifications/entities/shared/index.d.ts +1 -0
  101. package/dist/types/notifications/entities/shared/transaction-payout-totals-notification.d.ts +1 -0
  102. package/dist/types/notifications/entities/shared/transaction-totals-adjusted-notification.d.ts +1 -0
  103. package/dist/types/notifications/entities/shared/transaction-totals-notification.d.ts +1 -0
  104. package/dist/types/notifications/entities/shared/trial-period-notification.d.ts +8 -0
  105. package/dist/types/notifications/entities/subscription/subscription-price-notification.d.ts +2 -2
  106. package/dist/types/notifications/events/api-key-exposure/api-key-exposure-created-event.d.ts +10 -0
  107. package/dist/types/notifications/events/api-key-exposure/index.d.ts +1 -0
  108. package/dist/types/notifications/events/index.d.ts +1 -0
  109. package/dist/types/notifications/helpers/types.d.ts +4 -3
  110. package/dist/types/notifications/types/api-key-exposure/api-key-exposure-notification-response.d.ts +11 -0
  111. package/dist/types/notifications/types/api-key-exposure/index.d.ts +1 -0
  112. package/dist/types/notifications/types/index.d.ts +1 -0
  113. package/dist/types/notifications/types/payout/payout-notification-response.d.ts +1 -0
  114. package/dist/types/notifications/types/price/price-notification-response.d.ts +2 -2
  115. package/dist/types/notifications/types/shared/index.d.ts +2 -0
  116. package/dist/types/notifications/types/shared/shared-price-notification-response.d.ts +2 -1
  117. package/dist/types/notifications/types/shared/transaction-payout-totals-notification-response.d.ts +1 -0
  118. package/dist/types/notifications/types/shared/transaction-totals-adjusted-notification-response.d.ts +1 -0
  119. package/dist/types/notifications/types/shared/transaction-totals-notification-response.d.ts +1 -0
  120. package/dist/types/notifications/types/shared/trial-period-notification-response.d.ts +4 -0
  121. package/dist/types/notifications/types/shared/trial-period-notification.d.ts +4 -0
  122. package/dist/types/notifications/types/subscription/subscription-price-notification-response.d.ts +2 -2
  123. package/dist/types/resources/prices/operations/create-price-request-body.d.ts +2 -2
  124. package/dist/types/resources/prices/operations/update-price-request-body.d.ts +2 -2
  125. package/dist/types/types/events/events-response.d.ts +5 -2
  126. package/dist/types/types/price/non-catalog-price-request.d.ts +2 -2
  127. package/dist/types/types/price/price-response.d.ts +2 -2
  128. package/dist/types/types/shared/index.d.ts +2 -0
  129. package/dist/types/types/shared/transaction-payout-totals-response.d.ts +1 -0
  130. package/dist/types/types/shared/transaction-totals-adjusted-response.d.ts +1 -0
  131. package/dist/types/types/shared/transaction-totals-response.d.ts +1 -0
  132. package/dist/types/types/shared/trial-period-response.d.ts +4 -0
  133. package/dist/types/types/shared/trial-period.d.ts +4 -0
  134. package/dist/types/version.d.ts +1 -1
  135. package/package.json +1 -1
@@ -29,7 +29,7 @@ class Price {
29
29
  this.type = price.type;
30
30
  this.name = price.name ? price.name : null;
31
31
  this.billingCycle = price.billing_cycle ? new index_js_1.TimePeriod(price.billing_cycle) : null;
32
- this.trialPeriod = price.trial_period ? new index_js_1.TimePeriod(price.trial_period) : null;
32
+ this.trialPeriod = price.trial_period ? new index_js_1.TrialPeriod(price.trial_period) : null;
33
33
  this.taxMode = price.tax_mode;
34
34
  this.unitPrice = new index_js_1.Money(price.unit_price);
35
35
  this.unitPriceOverrides =
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./time-period.js"), exports);
18
+ __exportStar(require("./trial-period.js"), exports);
18
19
  __exportStar(require("./money.js"), exports);
19
20
  __exportStar(require("./unit-price-override.js"), exports);
20
21
  __exportStar(require("./billing-details.js"), exports);
@@ -10,6 +10,7 @@ class TransactionPayoutTotals {
10
10
  creditToBalance;
11
11
  balance;
12
12
  grandTotal;
13
+ grandTotalTax;
13
14
  fee;
14
15
  earnings;
15
16
  currencyCode;
@@ -24,6 +25,7 @@ class TransactionPayoutTotals {
24
25
  this.creditToBalance = transactionPayoutTotals.credit_to_balance;
25
26
  this.balance = transactionPayoutTotals.balance;
26
27
  this.grandTotal = transactionPayoutTotals.grand_total;
28
+ this.grandTotalTax = transactionPayoutTotals.grand_total_tax;
27
29
  this.fee = transactionPayoutTotals.fee;
28
30
  this.earnings = transactionPayoutTotals.earnings;
29
31
  this.currencyCode = transactionPayoutTotals.currency_code;
@@ -6,6 +6,7 @@ class TransactionTotalsAdjusted {
6
6
  tax;
7
7
  total;
8
8
  grandTotal;
9
+ grandTotalTax;
9
10
  fee;
10
11
  earnings;
11
12
  currencyCode;
@@ -15,6 +16,7 @@ class TransactionTotalsAdjusted {
15
16
  this.tax = transactionTotalsAdjusted.tax;
16
17
  this.total = transactionTotalsAdjusted.total;
17
18
  this.grandTotal = transactionTotalsAdjusted.grand_total;
19
+ this.grandTotalTax = transactionTotalsAdjusted.grand_total_tax;
18
20
  this.fee = transactionTotalsAdjusted.fee ? transactionTotalsAdjusted.fee : null;
19
21
  this.earnings = transactionTotalsAdjusted.earnings ? transactionTotalsAdjusted.earnings : null;
20
22
  this.currencyCode = transactionTotalsAdjusted.currency_code;
@@ -10,6 +10,7 @@ class TransactionTotals {
10
10
  creditToBalance;
11
11
  balance;
12
12
  grandTotal;
13
+ grandTotalTax;
13
14
  fee;
14
15
  earnings;
15
16
  currencyCode;
@@ -22,6 +23,7 @@ class TransactionTotals {
22
23
  this.creditToBalance = transactionTotals.credit_to_balance;
23
24
  this.balance = transactionTotals.balance;
24
25
  this.grandTotal = transactionTotals.grand_total;
26
+ this.grandTotalTax = transactionTotals.grand_total_tax;
25
27
  this.fee = transactionTotals.fee ? transactionTotals.fee : null;
26
28
  this.earnings = transactionTotals.earnings ? transactionTotals.earnings : null;
27
29
  this.currencyCode = transactionTotals.currency_code;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TrialPeriod = void 0;
4
+ class TrialPeriod {
5
+ interval;
6
+ frequency;
7
+ requiresPaymentMethod;
8
+ constructor(trialPeriod) {
9
+ this.interval = trialPeriod.interval;
10
+ this.frequency = trialPeriod.frequency;
11
+ this.requiresPaymentMethod = trialPeriod.requires_payment_method;
12
+ }
13
+ }
14
+ exports.TrialPeriod = TrialPeriod;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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("./risk-level.js"), exports);
18
+ __exportStar(require("./action-taken.js"), exports);
19
+ __exportStar(require("./source.js"), exports);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -29,4 +29,5 @@ __exportStar(require("./simulation/index.js"), exports);
29
29
  __exportStar(require("./simulation-run/index.js"), exports);
30
30
  __exportStar(require("./simulation-run-event/index.js"), exports);
31
31
  __exportStar(require("./api-key/index.js"), exports);
32
+ __exportStar(require("./api-key-exposure/index.js"), exports);
32
33
  __exportStar(require("./client-tokens/index.js"), exports);
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ApiKeyExposureNotification = void 0;
4
+ class ApiKeyExposureNotification {
5
+ id;
6
+ apiKeyId;
7
+ riskLevel;
8
+ actionTaken;
9
+ source;
10
+ reference;
11
+ description;
12
+ createdAt;
13
+ constructor(apiKeyExposure) {
14
+ this.id = apiKeyExposure.id;
15
+ this.apiKeyId = apiKeyExposure.api_key_id;
16
+ this.riskLevel = apiKeyExposure.risk_level;
17
+ this.actionTaken = apiKeyExposure.action_taken;
18
+ this.source = apiKeyExposure.source;
19
+ this.reference = apiKeyExposure.reference;
20
+ this.description = apiKeyExposure.description ?? null;
21
+ this.createdAt = apiKeyExposure.created_at;
22
+ }
23
+ }
24
+ exports.ApiKeyExposureNotification = ApiKeyExposureNotification;
@@ -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("./api-key-exposure-notification.js"), exports);
@@ -29,4 +29,5 @@ __exportStar(require("./payout/index.js"), exports);
29
29
  __exportStar(require("./report/index.js"), exports);
30
30
  __exportStar(require("./shared/index.js"), exports);
31
31
  __exportStar(require("./api-key/index.js"), exports);
32
+ __exportStar(require("./api-key-exposure/index.js"), exports);
32
33
  __exportStar(require("./client-token/index.js"), exports);
@@ -3,11 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PayoutNotification = void 0;
4
4
  class PayoutNotification {
5
5
  id;
6
+ remittanceReference;
6
7
  status;
7
8
  amount;
8
9
  currencyCode;
9
10
  constructor(payout) {
10
11
  this.id = payout.id;
12
+ this.remittanceReference = payout.remittance_reference;
11
13
  this.status = payout.status;
12
14
  this.amount = payout.amount;
13
15
  this.currencyCode = payout.currency_code;
@@ -27,7 +27,7 @@ class PriceNotification {
27
27
  this.type = price.type ? price.type : null;
28
28
  this.name = price.name ? price.name : null;
29
29
  this.billingCycle = price.billing_cycle ? new index_js_1.TimePeriodNotification(price.billing_cycle) : null;
30
- this.trialPeriod = price.trial_period ? new index_js_1.TimePeriodNotification(price.trial_period) : null;
30
+ this.trialPeriod = price.trial_period ? new index_js_1.TrialPeriodNotification(price.trial_period) : null;
31
31
  this.taxMode = price.tax_mode;
32
32
  this.unitPrice = new index_js_1.MoneyNotification(price.unit_price);
33
33
  this.unitPriceOverrides =
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./time-period-notification.js"), exports);
18
+ __exportStar(require("./trial-period-notification.js"), exports);
18
19
  __exportStar(require("./money-notification.js"), exports);
19
20
  __exportStar(require("./unit-price-override-notification.js"), exports);
20
21
  __exportStar(require("./billing-details-notification.js"), exports);
@@ -10,6 +10,7 @@ class TransactionPayoutTotalsNotification {
10
10
  creditToBalance;
11
11
  balance;
12
12
  grandTotal;
13
+ grandTotalTax;
13
14
  fee;
14
15
  earnings;
15
16
  currencyCode;
@@ -24,6 +25,7 @@ class TransactionPayoutTotalsNotification {
24
25
  this.creditToBalance = transactionPayoutTotals.credit_to_balance;
25
26
  this.balance = transactionPayoutTotals.balance;
26
27
  this.grandTotal = transactionPayoutTotals.grand_total;
28
+ this.grandTotalTax = transactionPayoutTotals.grand_total_tax;
27
29
  this.fee = transactionPayoutTotals.fee;
28
30
  this.earnings = transactionPayoutTotals.earnings;
29
31
  this.currencyCode = transactionPayoutTotals.currency_code;
@@ -6,6 +6,7 @@ class TransactionTotalsAdjustedNotification {
6
6
  tax;
7
7
  total;
8
8
  grandTotal;
9
+ grandTotalTax;
9
10
  fee;
10
11
  earnings;
11
12
  currencyCode;
@@ -15,6 +16,7 @@ class TransactionTotalsAdjustedNotification {
15
16
  this.tax = transactionTotalsAdjusted.tax;
16
17
  this.total = transactionTotalsAdjusted.total;
17
18
  this.grandTotal = transactionTotalsAdjusted.grand_total;
19
+ this.grandTotalTax = transactionTotalsAdjusted.grand_total_tax;
18
20
  this.fee = transactionTotalsAdjusted.fee ? transactionTotalsAdjusted.fee : null;
19
21
  this.earnings = transactionTotalsAdjusted.earnings ? transactionTotalsAdjusted.earnings : null;
20
22
  this.currencyCode = transactionTotalsAdjusted.currency_code;
@@ -10,6 +10,7 @@ class TransactionTotalsNotification {
10
10
  creditToBalance;
11
11
  balance;
12
12
  grandTotal;
13
+ grandTotalTax;
13
14
  fee;
14
15
  earnings;
15
16
  currencyCode;
@@ -22,6 +23,7 @@ class TransactionTotalsNotification {
22
23
  this.creditToBalance = transactionTotals.credit_to_balance;
23
24
  this.balance = transactionTotals.balance;
24
25
  this.grandTotal = transactionTotals.grand_total;
26
+ this.grandTotalTax = transactionTotals.grand_total_tax;
25
27
  this.fee = transactionTotals.fee ? transactionTotals.fee : null;
26
28
  this.earnings = transactionTotals.earnings ? transactionTotals.earnings : null;
27
29
  this.currencyCode = transactionTotals.currency_code;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TrialPeriodNotification = void 0;
4
+ class TrialPeriodNotification {
5
+ interval;
6
+ frequency;
7
+ requiresPaymentMethod;
8
+ constructor(trialPeriod) {
9
+ this.interval = trialPeriod.interval;
10
+ this.frequency = trialPeriod.frequency;
11
+ this.requiresPaymentMethod = trialPeriod.requires_payment_method;
12
+ }
13
+ }
14
+ exports.TrialPeriodNotification = TrialPeriodNotification;
@@ -25,7 +25,7 @@ class SubscriptionPriceNotification {
25
25
  this.type = price.type ?? null;
26
26
  this.name = price.name ? price.name : null;
27
27
  this.billingCycle = price.billing_cycle ? new index_js_1.TimePeriodNotification(price.billing_cycle) : null;
28
- this.trialPeriod = price.trial_period ? new index_js_1.TimePeriodNotification(price.trial_period) : null;
28
+ this.trialPeriod = price.trial_period ? new index_js_1.TrialPeriodNotification(price.trial_period) : null;
29
29
  this.taxMode = price.tax_mode;
30
30
  this.unitPrice = price.unit_price ? new index_js_1.MoneyNotification(price.unit_price) : null;
31
31
  this.unitPriceOverrides = price.unit_price_overrides
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ApiKeyExposureCreatedEvent = void 0;
4
+ const event_js_1 = require("../../../entities/events/event.js");
5
+ const index_js_1 = require("../../helpers/index.js");
6
+ const index_js_2 = require("../../entities/index.js");
7
+ class ApiKeyExposureCreatedEvent extends event_js_1.Event {
8
+ eventType = index_js_1.EventName.ApiKeyExposureCreated;
9
+ data;
10
+ constructor(response) {
11
+ super(response);
12
+ this.data = new index_js_2.ApiKeyExposureNotification(response.data);
13
+ }
14
+ }
15
+ exports.ApiKeyExposureCreatedEvent = ApiKeyExposureCreatedEvent;
@@ -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("./api-key-exposure-created-event.js"), exports);
@@ -29,4 +29,5 @@ __exportStar(require("./subscription/index.js"), exports);
29
29
  __exportStar(require("./transaction/index.js"), exports);
30
30
  __exportStar(require("./report/index.js"), exports);
31
31
  __exportStar(require("./api-key/index.js"), exports);
32
+ __exportStar(require("./api-key-exposure/index.js"), exports);
32
33
  __exportStar(require("./client-token/index.js"), exports);
@@ -13,6 +13,7 @@ var EventName;
13
13
  EventName["ApiKeyExpiring"] = "api_key.expiring";
14
14
  EventName["ApiKeyExpired"] = "api_key.expired";
15
15
  EventName["ApiKeyRevoked"] = "api_key.revoked";
16
+ EventName["ApiKeyExposureCreated"] = "api_key_exposure.created";
16
17
  EventName["BusinessCreated"] = "business.created";
17
18
  EventName["BusinessImported"] = "business.imported";
18
19
  EventName["BusinessUpdated"] = "business.updated";
@@ -41,6 +41,8 @@ class Webhooks {
41
41
  return new index_js_1.ApiKeyRevokedEvent(data);
42
42
  case types_js_1.EventName.ApiKeyUpdated:
43
43
  return new index_js_1.ApiKeyUpdatedEvent(data);
44
+ case types_js_1.EventName.ApiKeyExposureCreated:
45
+ return new index_js_1.ApiKeyExposureCreatedEvent(data);
44
46
  case types_js_1.EventName.BusinessCreated:
45
47
  return new index_js_1.BusinessCreatedEvent(data);
46
48
  case types_js_1.EventName.BusinessUpdated:
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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("./api-key-exposure-notification-response.js"), exports);
@@ -29,4 +29,5 @@ __exportStar(require("./payout/index.js"), exports);
29
29
  __exportStar(require("./report/index.js"), exports);
30
30
  __exportStar(require("./shared/index.js"), exports);
31
31
  __exportStar(require("./api-key/index.js"), exports);
32
+ __exportStar(require("./api-key-exposure/index.js"), exports);
32
33
  __exportStar(require("./client-token/index.js"), exports);
@@ -15,6 +15,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./time-period-notification.js"), exports);
18
+ __exportStar(require("./trial-period-notification.js"), exports);
19
+ __exportStar(require("./trial-period-notification-response.js"), exports);
18
20
  __exportStar(require("./money-notification-response.js"), exports);
19
21
  __exportStar(require("./unit-price-override-notification-response.js"), exports);
20
22
  __exportStar(require("./shared-price-notification-response.js"), exports);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -15,6 +15,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./time-period.js"), exports);
18
+ __exportStar(require("./trial-period.js"), exports);
19
+ __exportStar(require("./trial-period-response.js"), exports);
18
20
  __exportStar(require("./money.js"), exports);
19
21
  __exportStar(require("./money-response.js"), exports);
20
22
  __exportStar(require("./unit-price-override.js"), exports);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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 = '3.4.0';
4
+ exports.SDK_VERSION = '3.6.0';
@@ -1,4 +1,4 @@
1
- import { ImportMeta, Money, TimePeriod, UnitPriceOverride } from '../shared/index.js';
1
+ import { ImportMeta, Money, TimePeriod, TrialPeriod, UnitPriceOverride } from '../shared/index.js';
2
2
  import { PriceQuantity } from './price-quantity.js';
3
3
  import { Product } from '../product/index.js';
4
4
  export class Price {
@@ -26,7 +26,7 @@ export class Price {
26
26
  this.type = price.type;
27
27
  this.name = price.name ? price.name : null;
28
28
  this.billingCycle = price.billing_cycle ? new TimePeriod(price.billing_cycle) : null;
29
- this.trialPeriod = price.trial_period ? new TimePeriod(price.trial_period) : null;
29
+ this.trialPeriod = price.trial_period ? new TrialPeriod(price.trial_period) : null;
30
30
  this.taxMode = price.tax_mode;
31
31
  this.unitPrice = new Money(price.unit_price);
32
32
  this.unitPriceOverrides =
@@ -1,4 +1,5 @@
1
1
  export * from './time-period.js';
2
+ export * from './trial-period.js';
2
3
  export * from './money.js';
3
4
  export * from './unit-price-override.js';
4
5
  export * from './billing-details.js';
@@ -7,6 +7,7 @@ export class TransactionPayoutTotals {
7
7
  creditToBalance;
8
8
  balance;
9
9
  grandTotal;
10
+ grandTotalTax;
10
11
  fee;
11
12
  earnings;
12
13
  currencyCode;
@@ -21,6 +22,7 @@ export class TransactionPayoutTotals {
21
22
  this.creditToBalance = transactionPayoutTotals.credit_to_balance;
22
23
  this.balance = transactionPayoutTotals.balance;
23
24
  this.grandTotal = transactionPayoutTotals.grand_total;
25
+ this.grandTotalTax = transactionPayoutTotals.grand_total_tax;
24
26
  this.fee = transactionPayoutTotals.fee;
25
27
  this.earnings = transactionPayoutTotals.earnings;
26
28
  this.currencyCode = transactionPayoutTotals.currency_code;
@@ -3,6 +3,7 @@ export class TransactionTotalsAdjusted {
3
3
  tax;
4
4
  total;
5
5
  grandTotal;
6
+ grandTotalTax;
6
7
  fee;
7
8
  earnings;
8
9
  currencyCode;
@@ -12,6 +13,7 @@ export class TransactionTotalsAdjusted {
12
13
  this.tax = transactionTotalsAdjusted.tax;
13
14
  this.total = transactionTotalsAdjusted.total;
14
15
  this.grandTotal = transactionTotalsAdjusted.grand_total;
16
+ this.grandTotalTax = transactionTotalsAdjusted.grand_total_tax;
15
17
  this.fee = transactionTotalsAdjusted.fee ? transactionTotalsAdjusted.fee : null;
16
18
  this.earnings = transactionTotalsAdjusted.earnings ? transactionTotalsAdjusted.earnings : null;
17
19
  this.currencyCode = transactionTotalsAdjusted.currency_code;
@@ -7,6 +7,7 @@ export class TransactionTotals {
7
7
  creditToBalance;
8
8
  balance;
9
9
  grandTotal;
10
+ grandTotalTax;
10
11
  fee;
11
12
  earnings;
12
13
  currencyCode;
@@ -19,6 +20,7 @@ export class TransactionTotals {
19
20
  this.creditToBalance = transactionTotals.credit_to_balance;
20
21
  this.balance = transactionTotals.balance;
21
22
  this.grandTotal = transactionTotals.grand_total;
23
+ this.grandTotalTax = transactionTotals.grand_total_tax;
22
24
  this.fee = transactionTotals.fee ? transactionTotals.fee : null;
23
25
  this.earnings = transactionTotals.earnings ? transactionTotals.earnings : null;
24
26
  this.currencyCode = transactionTotals.currency_code;
@@ -0,0 +1,10 @@
1
+ export class TrialPeriod {
2
+ interval;
3
+ frequency;
4
+ requiresPaymentMethod;
5
+ constructor(trialPeriod) {
6
+ this.interval = trialPeriod.interval;
7
+ this.frequency = trialPeriod.frequency;
8
+ this.requiresPaymentMethod = trialPeriod.requires_payment_method;
9
+ }
10
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from './risk-level.js';
2
+ export * from './action-taken.js';
3
+ export * from './source.js';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -13,4 +13,5 @@ export * from './simulation/index.js';
13
13
  export * from './simulation-run/index.js';
14
14
  export * from './simulation-run-event/index.js';
15
15
  export * from './api-key/index.js';
16
+ export * from './api-key-exposure/index.js';
16
17
  export * from './client-tokens/index.js';
@@ -0,0 +1,20 @@
1
+ export class ApiKeyExposureNotification {
2
+ id;
3
+ apiKeyId;
4
+ riskLevel;
5
+ actionTaken;
6
+ source;
7
+ reference;
8
+ description;
9
+ createdAt;
10
+ constructor(apiKeyExposure) {
11
+ this.id = apiKeyExposure.id;
12
+ this.apiKeyId = apiKeyExposure.api_key_id;
13
+ this.riskLevel = apiKeyExposure.risk_level;
14
+ this.actionTaken = apiKeyExposure.action_taken;
15
+ this.source = apiKeyExposure.source;
16
+ this.reference = apiKeyExposure.reference;
17
+ this.description = apiKeyExposure.description ?? null;
18
+ this.createdAt = apiKeyExposure.created_at;
19
+ }
20
+ }
@@ -0,0 +1 @@
1
+ export * from './api-key-exposure-notification.js';
@@ -13,4 +13,5 @@ export * from './payout/index.js';
13
13
  export * from './report/index.js';
14
14
  export * from './shared/index.js';
15
15
  export * from './api-key/index.js';
16
+ export * from './api-key-exposure/index.js';
16
17
  export * from './client-token/index.js';
@@ -1,10 +1,12 @@
1
1
  export class PayoutNotification {
2
2
  id;
3
+ remittanceReference;
3
4
  status;
4
5
  amount;
5
6
  currencyCode;
6
7
  constructor(payout) {
7
8
  this.id = payout.id;
9
+ this.remittanceReference = payout.remittance_reference;
8
10
  this.status = payout.status;
9
11
  this.amount = payout.amount;
10
12
  this.currencyCode = payout.currency_code;
@@ -1,4 +1,4 @@
1
- import { ImportMetaNotification, MoneyNotification, TimePeriodNotification, UnitPriceOverrideNotification, } from '../shared/index.js';
1
+ import { ImportMetaNotification, MoneyNotification, TimePeriodNotification, TrialPeriodNotification, UnitPriceOverrideNotification, } from '../shared/index.js';
2
2
  import { PriceQuantityNotification } from './price-quantity-notification.js';
3
3
  export class PriceNotification {
4
4
  id;
@@ -24,7 +24,7 @@ export class PriceNotification {
24
24
  this.type = price.type ? price.type : null;
25
25
  this.name = price.name ? price.name : null;
26
26
  this.billingCycle = price.billing_cycle ? new TimePeriodNotification(price.billing_cycle) : null;
27
- this.trialPeriod = price.trial_period ? new TimePeriodNotification(price.trial_period) : null;
27
+ this.trialPeriod = price.trial_period ? new TrialPeriodNotification(price.trial_period) : null;
28
28
  this.taxMode = price.tax_mode;
29
29
  this.unitPrice = new MoneyNotification(price.unit_price);
30
30
  this.unitPriceOverrides =
@@ -1,4 +1,5 @@
1
1
  export * from './time-period-notification.js';
2
+ export * from './trial-period-notification.js';
2
3
  export * from './money-notification.js';
3
4
  export * from './unit-price-override-notification.js';
4
5
  export * from './billing-details-notification.js';
@@ -7,6 +7,7 @@ export class TransactionPayoutTotalsNotification {
7
7
  creditToBalance;
8
8
  balance;
9
9
  grandTotal;
10
+ grandTotalTax;
10
11
  fee;
11
12
  earnings;
12
13
  currencyCode;
@@ -21,6 +22,7 @@ export class TransactionPayoutTotalsNotification {
21
22
  this.creditToBalance = transactionPayoutTotals.credit_to_balance;
22
23
  this.balance = transactionPayoutTotals.balance;
23
24
  this.grandTotal = transactionPayoutTotals.grand_total;
25
+ this.grandTotalTax = transactionPayoutTotals.grand_total_tax;
24
26
  this.fee = transactionPayoutTotals.fee;
25
27
  this.earnings = transactionPayoutTotals.earnings;
26
28
  this.currencyCode = transactionPayoutTotals.currency_code;