@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.
- package/dist/cjs/entities/price/price.js +1 -1
- package/dist/cjs/entities/shared/index.js +1 -0
- package/dist/cjs/entities/shared/transaction-payout-totals.js +2 -0
- package/dist/cjs/entities/shared/transaction-totals-adjusted.js +2 -0
- package/dist/cjs/entities/shared/transaction-totals.js +2 -0
- package/dist/cjs/entities/shared/trial-period.js +14 -0
- package/dist/cjs/enums/api-key-exposure/action-taken.js +2 -0
- package/dist/cjs/enums/api-key-exposure/index.js +19 -0
- package/dist/cjs/enums/api-key-exposure/risk-level.js +2 -0
- package/dist/cjs/enums/api-key-exposure/source.js +2 -0
- package/dist/cjs/enums/index.js +1 -0
- package/dist/cjs/notifications/entities/api-key-exposure/api-key-exposure-notification.js +24 -0
- package/dist/cjs/notifications/entities/api-key-exposure/index.js +17 -0
- package/dist/cjs/notifications/entities/index.js +1 -0
- package/dist/cjs/notifications/entities/payout/payout-notification.js +2 -0
- package/dist/cjs/notifications/entities/price/price-notification.js +1 -1
- package/dist/cjs/notifications/entities/shared/index.js +1 -0
- package/dist/cjs/notifications/entities/shared/transaction-payout-totals-notification.js +2 -0
- package/dist/cjs/notifications/entities/shared/transaction-totals-adjusted-notification.js +2 -0
- package/dist/cjs/notifications/entities/shared/transaction-totals-notification.js +2 -0
- package/dist/cjs/notifications/entities/shared/trial-period-notification.js +14 -0
- package/dist/cjs/notifications/entities/subscription/subscription-price-notification.js +1 -1
- package/dist/cjs/notifications/events/api-key-exposure/api-key-exposure-created-event.js +15 -0
- package/dist/cjs/notifications/events/api-key-exposure/index.js +17 -0
- package/dist/cjs/notifications/events/index.js +1 -0
- package/dist/cjs/notifications/helpers/types.js +1 -0
- package/dist/cjs/notifications/helpers/webhooks.js +2 -0
- package/dist/cjs/notifications/types/api-key-exposure/api-key-exposure-notification-response.js +2 -0
- package/dist/cjs/notifications/types/api-key-exposure/index.js +17 -0
- package/dist/cjs/notifications/types/index.js +1 -0
- package/dist/cjs/notifications/types/shared/index.js +2 -0
- package/dist/cjs/notifications/types/shared/trial-period-notification-response.js +2 -0
- package/dist/cjs/notifications/types/shared/trial-period-notification.js +2 -0
- package/dist/cjs/types/shared/index.js +2 -0
- package/dist/cjs/types/shared/trial-period-response.js +2 -0
- package/dist/cjs/types/shared/trial-period.js +2 -0
- package/dist/cjs/version.js +1 -1
- package/dist/esm/entities/price/price.js +2 -2
- package/dist/esm/entities/shared/index.js +1 -0
- package/dist/esm/entities/shared/transaction-payout-totals.js +2 -0
- package/dist/esm/entities/shared/transaction-totals-adjusted.js +2 -0
- package/dist/esm/entities/shared/transaction-totals.js +2 -0
- package/dist/esm/entities/shared/trial-period.js +10 -0
- package/dist/esm/enums/api-key-exposure/action-taken.js +1 -0
- package/dist/esm/enums/api-key-exposure/index.js +3 -0
- package/dist/esm/enums/api-key-exposure/risk-level.js +1 -0
- package/dist/esm/enums/api-key-exposure/source.js +1 -0
- package/dist/esm/enums/index.js +1 -0
- package/dist/esm/notifications/entities/api-key-exposure/api-key-exposure-notification.js +20 -0
- package/dist/esm/notifications/entities/api-key-exposure/index.js +1 -0
- package/dist/esm/notifications/entities/index.js +1 -0
- package/dist/esm/notifications/entities/payout/payout-notification.js +2 -0
- package/dist/esm/notifications/entities/price/price-notification.js +2 -2
- package/dist/esm/notifications/entities/shared/index.js +1 -0
- package/dist/esm/notifications/entities/shared/transaction-payout-totals-notification.js +2 -0
- package/dist/esm/notifications/entities/shared/transaction-totals-adjusted-notification.js +2 -0
- package/dist/esm/notifications/entities/shared/transaction-totals-notification.js +2 -0
- package/dist/esm/notifications/entities/shared/trial-period-notification.js +10 -0
- package/dist/esm/notifications/entities/subscription/subscription-price-notification.js +2 -2
- package/dist/esm/notifications/events/api-key-exposure/api-key-exposure-created-event.js +11 -0
- package/dist/esm/notifications/events/api-key-exposure/index.js +1 -0
- package/dist/esm/notifications/events/index.js +1 -0
- package/dist/esm/notifications/helpers/types.js +1 -0
- package/dist/esm/notifications/helpers/webhooks.js +3 -1
- package/dist/esm/notifications/types/api-key-exposure/api-key-exposure-notification-response.js +1 -0
- package/dist/esm/notifications/types/api-key-exposure/index.js +1 -0
- package/dist/esm/notifications/types/index.js +1 -0
- package/dist/esm/notifications/types/shared/index.js +2 -0
- package/dist/esm/notifications/types/shared/trial-period-notification-response.js +1 -0
- package/dist/esm/notifications/types/shared/trial-period-notification.js +1 -0
- package/dist/esm/types/shared/index.js +2 -0
- package/dist/esm/types/shared/trial-period-response.js +1 -0
- package/dist/esm/types/shared/trial-period.js +1 -0
- package/dist/esm/version.js +1 -1
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/entities/price/price.d.ts +2 -2
- package/dist/types/entities/shared/index.d.ts +1 -0
- package/dist/types/entities/shared/transaction-payout-totals.d.ts +1 -0
- package/dist/types/entities/shared/transaction-totals-adjusted.d.ts +1 -0
- package/dist/types/entities/shared/transaction-totals.d.ts +1 -0
- package/dist/types/entities/shared/trial-period.d.ts +8 -0
- package/dist/types/enums/api-key-exposure/action-taken.d.ts +1 -0
- package/dist/types/enums/api-key-exposure/index.d.ts +3 -0
- package/dist/types/enums/api-key-exposure/risk-level.d.ts +1 -0
- package/dist/types/enums/api-key-exposure/source.d.ts +1 -0
- package/dist/types/enums/index.d.ts +1 -0
- package/dist/types/enums/payment-method/type.d.ts +1 -1
- package/dist/types/enums/report/report-filter-name.d.ts +1 -1
- package/dist/types/enums/report/report-type.d.ts +1 -1
- package/dist/types/enums/shared/available-payment-methods.d.ts +1 -1
- package/dist/types/enums/shared/payment-type.d.ts +1 -1
- package/dist/types/enums/shared/tax-mode.d.ts +1 -1
- package/dist/types/notifications/entities/api-key-exposure/api-key-exposure-notification.d.ts +13 -0
- package/dist/types/notifications/entities/api-key-exposure/index.d.ts +1 -0
- package/dist/types/notifications/entities/index.d.ts +1 -0
- package/dist/types/notifications/entities/payout/payout-notification.d.ts +1 -0
- package/dist/types/notifications/entities/price/price-notification.d.ts +2 -2
- package/dist/types/notifications/entities/shared/index.d.ts +1 -0
- package/dist/types/notifications/entities/shared/transaction-payout-totals-notification.d.ts +1 -0
- package/dist/types/notifications/entities/shared/transaction-totals-adjusted-notification.d.ts +1 -0
- package/dist/types/notifications/entities/shared/transaction-totals-notification.d.ts +1 -0
- package/dist/types/notifications/entities/shared/trial-period-notification.d.ts +8 -0
- package/dist/types/notifications/entities/subscription/subscription-price-notification.d.ts +2 -2
- package/dist/types/notifications/events/api-key-exposure/api-key-exposure-created-event.d.ts +10 -0
- package/dist/types/notifications/events/api-key-exposure/index.d.ts +1 -0
- package/dist/types/notifications/events/index.d.ts +1 -0
- package/dist/types/notifications/helpers/types.d.ts +4 -3
- package/dist/types/notifications/types/api-key-exposure/api-key-exposure-notification-response.d.ts +11 -0
- package/dist/types/notifications/types/api-key-exposure/index.d.ts +1 -0
- package/dist/types/notifications/types/index.d.ts +1 -0
- package/dist/types/notifications/types/payout/payout-notification-response.d.ts +1 -0
- package/dist/types/notifications/types/price/price-notification-response.d.ts +2 -2
- package/dist/types/notifications/types/shared/index.d.ts +2 -0
- package/dist/types/notifications/types/shared/shared-price-notification-response.d.ts +2 -1
- package/dist/types/notifications/types/shared/transaction-payout-totals-notification-response.d.ts +1 -0
- package/dist/types/notifications/types/shared/transaction-totals-adjusted-notification-response.d.ts +1 -0
- package/dist/types/notifications/types/shared/transaction-totals-notification-response.d.ts +1 -0
- package/dist/types/notifications/types/shared/trial-period-notification-response.d.ts +4 -0
- package/dist/types/notifications/types/shared/trial-period-notification.d.ts +4 -0
- package/dist/types/notifications/types/subscription/subscription-price-notification-response.d.ts +2 -2
- package/dist/types/resources/prices/operations/create-price-request-body.d.ts +2 -2
- package/dist/types/resources/prices/operations/update-price-request-body.d.ts +2 -2
- package/dist/types/types/events/events-response.d.ts +5 -2
- package/dist/types/types/price/non-catalog-price-request.d.ts +2 -2
- package/dist/types/types/price/price-response.d.ts +2 -2
- package/dist/types/types/shared/index.d.ts +2 -0
- package/dist/types/types/shared/transaction-payout-totals-response.d.ts +1 -0
- package/dist/types/types/shared/transaction-totals-adjusted-response.d.ts +1 -0
- package/dist/types/types/shared/transaction-totals-response.d.ts +1 -0
- package/dist/types/types/shared/trial-period-response.d.ts +4 -0
- package/dist/types/types/shared/trial-period.d.ts +4 -0
- package/dist/types/version.d.ts +1 -1
- 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.
|
|
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,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);
|
package/dist/cjs/enums/index.js
CHANGED
|
@@ -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.
|
|
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.
|
|
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,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);
|
|
@@ -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);
|
package/dist/cjs/version.js
CHANGED
|
@@ -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
|
|
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 =
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/esm/enums/index.js
CHANGED
|
@@ -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';
|
|
@@ -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
|
|
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 =
|
|
@@ -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;
|