@paddle/paddle-node-sdk 3.5.0 → 3.6.1
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/README.md +2 -2
- 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/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/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/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/version.js +1 -1
- 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/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/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/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/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/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/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/shared/available-payment-methods.d.ts +1 -1
- package/dist/types/enums/shared/currency-code.d.ts +1 -1
- package/dist/types/enums/shared/payment-type.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/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/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/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/types/events/events-response.d.ts +5 -2
- 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/version.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
[](https://github.com/PaddleHQ/paddle-node-sdk/blob/main/LICENSE)
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
[Paddle Billing](https://
|
|
9
|
+
[Paddle Billing](https://developer.paddle.com/?utm_source=dx&utm_medium=paddle-node-sdk) is the developer-first merchant of record, designed for modern SaaS, AI, mobile app, and digital product businesses. We take care of payments, tax, subscriptions, and metrics with one unified API that does it all.
|
|
10
10
|
|
|
11
11
|
This is a [Node.js](https://nodejs.org/) SDK that you can use to integrate Paddle Billing with applications written in server-side JavaScript.
|
|
12
12
|
|
|
13
13
|
For working with Paddle in your frontend, use [Paddle.js](https://developer.paddle.com/paddlejs/overview?utm_source=dx&utm_medium=paddle-node-sdk). You can open checkouts, securely collect payment information, build pricing pages, and integrate with Paddle Retain.
|
|
14
14
|
|
|
15
|
-
> **Important:** This package works with Paddle Billing. It does not support Paddle Classic. To work with Paddle Classic, see: [Paddle Classic
|
|
15
|
+
> **Important:** This package works with Paddle Billing. It does not support Paddle Classic. To work with Paddle Classic, see: [Paddle Classic dev docs](https://classic.paddle.com/?utm_source=dx&utm_medium=paddle-node-sdk)
|
|
16
16
|
|
|
17
17
|
## Installation
|
|
18
18
|
|
|
@@ -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,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);
|
|
@@ -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,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);
|
package/dist/cjs/version.js
CHANGED
|
@@ -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 @@
|
|
|
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';
|
|
@@ -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;
|
|
@@ -3,6 +3,7 @@ export class TransactionTotalsAdjustedNotification {
|
|
|
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 TransactionTotalsAdjustedNotification {
|
|
|
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 TransactionTotalsNotification {
|
|
|
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 TransactionTotalsNotification {
|
|
|
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,11 @@
|
|
|
1
|
+
import { Event } from '../../../entities/events/event.js';
|
|
2
|
+
import { EventName } from '../../helpers/index.js';
|
|
3
|
+
import { ApiKeyExposureNotification } from '../../entities/index.js';
|
|
4
|
+
export class ApiKeyExposureCreatedEvent extends Event {
|
|
5
|
+
eventType = EventName.ApiKeyExposureCreated;
|
|
6
|
+
data;
|
|
7
|
+
constructor(response) {
|
|
8
|
+
super(response);
|
|
9
|
+
this.data = new ApiKeyExposureNotification(response.data);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './api-key-exposure-created-event.js';
|
|
@@ -10,6 +10,7 @@ export var EventName;
|
|
|
10
10
|
EventName["ApiKeyExpiring"] = "api_key.expiring";
|
|
11
11
|
EventName["ApiKeyExpired"] = "api_key.expired";
|
|
12
12
|
EventName["ApiKeyRevoked"] = "api_key.revoked";
|
|
13
|
+
EventName["ApiKeyExposureCreated"] = "api_key_exposure.created";
|
|
13
14
|
EventName["BusinessCreated"] = "business.created";
|
|
14
15
|
EventName["BusinessImported"] = "business.imported";
|
|
15
16
|
EventName["BusinessUpdated"] = "business.updated";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WebhooksValidator } from './webhooks-validator.js';
|
|
2
2
|
import { EventName } from './types.js';
|
|
3
|
-
import { AddressCreatedEvent, AddressImportedEvent, AddressUpdatedEvent, AdjustmentCreatedEvent, AdjustmentUpdatedEvent, ApiKeyCreatedEvent, ApiKeyExpiredEvent, ApiKeyExpiringEvent, ApiKeyRevokedEvent, ApiKeyUpdatedEvent, BusinessCreatedEvent, BusinessImportedEvent, BusinessUpdatedEvent, ClientTokenCreatedEvent, ClientTokenRevokedEvent, ClientTokenUpdatedEvent, CustomerCreatedEvent, CustomerImportedEvent, CustomerUpdatedEvent, DiscountCreatedEvent, DiscountGroupCreatedEvent, DiscountGroupUpdatedEvent, DiscountImportedEvent, DiscountUpdatedEvent, GenericEvent, PaymentMethodDeletedEvent, PaymentMethodSavedEvent, PayoutCreatedEvent, PayoutPaidEvent, PriceCreatedEvent, PriceImportedEvent, PriceUpdatedEvent, ProductCreatedEvent, ProductImportedEvent, ProductUpdatedEvent, ReportCreatedEvent, ReportUpdatedEvent, SubscriptionActivatedEvent, SubscriptionCanceledEvent, SubscriptionCreatedEvent, SubscriptionImportedEvent, SubscriptionPastDueEvent, SubscriptionPausedEvent, SubscriptionResumedEvent, SubscriptionTrialingEvent, SubscriptionUpdatedEvent, TransactionBilledEvent, TransactionCanceledEvent, TransactionCompletedEvent, TransactionCreatedEvent, TransactionPaidEvent, TransactionPastDueEvent, TransactionPaymentFailedEvent, TransactionReadyEvent, TransactionRevisedEvent, TransactionUpdatedEvent, } from '../events/index.js';
|
|
3
|
+
import { AddressCreatedEvent, AddressImportedEvent, AddressUpdatedEvent, AdjustmentCreatedEvent, AdjustmentUpdatedEvent, ApiKeyCreatedEvent, ApiKeyExpiredEvent, ApiKeyExpiringEvent, ApiKeyRevokedEvent, ApiKeyUpdatedEvent, ApiKeyExposureCreatedEvent, BusinessCreatedEvent, BusinessImportedEvent, BusinessUpdatedEvent, ClientTokenCreatedEvent, ClientTokenRevokedEvent, ClientTokenUpdatedEvent, CustomerCreatedEvent, CustomerImportedEvent, CustomerUpdatedEvent, DiscountCreatedEvent, DiscountGroupCreatedEvent, DiscountGroupUpdatedEvent, DiscountImportedEvent, DiscountUpdatedEvent, GenericEvent, PaymentMethodDeletedEvent, PaymentMethodSavedEvent, PayoutCreatedEvent, PayoutPaidEvent, PriceCreatedEvent, PriceImportedEvent, PriceUpdatedEvent, ProductCreatedEvent, ProductImportedEvent, ProductUpdatedEvent, ReportCreatedEvent, ReportUpdatedEvent, SubscriptionActivatedEvent, SubscriptionCanceledEvent, SubscriptionCreatedEvent, SubscriptionImportedEvent, SubscriptionPastDueEvent, SubscriptionPausedEvent, SubscriptionResumedEvent, SubscriptionTrialingEvent, SubscriptionUpdatedEvent, TransactionBilledEvent, TransactionCanceledEvent, TransactionCompletedEvent, TransactionCreatedEvent, TransactionPaidEvent, TransactionPastDueEvent, TransactionPaymentFailedEvent, TransactionReadyEvent, TransactionRevisedEvent, TransactionUpdatedEvent, } from '../events/index.js';
|
|
4
4
|
import { Logger } from '../../internal/base/logger.js';
|
|
5
5
|
export class Webhooks {
|
|
6
6
|
async unmarshal(requestBody, secretKey, signature) {
|
|
@@ -38,6 +38,8 @@ export class Webhooks {
|
|
|
38
38
|
return new ApiKeyRevokedEvent(data);
|
|
39
39
|
case EventName.ApiKeyUpdated:
|
|
40
40
|
return new ApiKeyUpdatedEvent(data);
|
|
41
|
+
case EventName.ApiKeyExposureCreated:
|
|
42
|
+
return new ApiKeyExposureCreatedEvent(data);
|
|
41
43
|
case EventName.BusinessCreated:
|
|
42
44
|
return new BusinessCreatedEvent(data);
|
|
43
45
|
case EventName.BusinessUpdated:
|
package/dist/esm/notifications/types/api-key-exposure/api-key-exposure-notification-response.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './api-key-exposure-notification-response.js';
|
package/dist/esm/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = '3.
|
|
1
|
+
export const SDK_VERSION = '3.6.1';
|