blastengine
Advanced tools
| import BEObject from "./object"; | ||
| import Report from "./report"; | ||
| import { Attachment, InsertCode, Unsubscribed } from "../../types/"; | ||
| import { Attachment, InsertCode, SuccessJsonFormat, Unsubscribed } from "../../types/"; | ||
| /** | ||
@@ -189,2 +189,10 @@ * The Base class extends BEObject and serves as a foundation for | ||
| /** | ||
| * Cancels the bulk delivery. | ||
| * | ||
| * @async | ||
| * @return {Promise<SuccessJsonFormat>} - The result of the cancel operation. | ||
| * @throws Will throw an error if deliveryId is not found. | ||
| */ | ||
| cancel(): Promise<SuccessJsonFormat>; | ||
| /** | ||
| * Retrieves information about the delivery, based on the deliveryId. | ||
@@ -191,0 +199,0 @@ * |
+17
-1
@@ -15,3 +15,2 @@ "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| // import Transaction from './transaction'; | ||
| const object_1 = __importDefault(require("./object")); | ||
@@ -220,2 +219,19 @@ const report_1 = __importDefault(require("./report")); | ||
| /** | ||
| * Cancels the bulk delivery. | ||
| * | ||
| * @async | ||
| * @return {Promise<SuccessJsonFormat>} - The result of the cancel operation. | ||
| * @throws Will throw an error if deliveryId is not found. | ||
| */ | ||
| cancel() { | ||
| return __awaiter(this, void 0, void 0, function* () { | ||
| if (!this.deliveryId) | ||
| throw new Error("Delivery id is not found."); | ||
| const url = `/deliveries/${this.deliveryId}/cancel`; | ||
| const res = yield Base.request | ||
| .send("patch", url); | ||
| return res; | ||
| }); | ||
| } | ||
| /** | ||
| * Retrieves information about the delivery, based on the deliveryId. | ||
@@ -222,0 +238,0 @@ * |
@@ -69,10 +69,2 @@ import Base from "./base"; | ||
| /** | ||
| * Cancels the bulk delivery. | ||
| * | ||
| * @async | ||
| * @return {Promise<SuccessJsonFormat>} - The result of the cancel operation. | ||
| * @throws Will throw an error if deliveryId is not found. | ||
| */ | ||
| cancel(): Promise<SuccessJsonFormat>; | ||
| /** | ||
| * Gets an Email instance for the current bulk delivery. | ||
@@ -79,0 +71,0 @@ * |
+3
-18
@@ -191,19 +191,2 @@ "use strict"; | ||
| /** | ||
| * Cancels the bulk delivery. | ||
| * | ||
| * @async | ||
| * @return {Promise<SuccessJsonFormat>} - The result of the cancel operation. | ||
| * @throws Will throw an error if deliveryId is not found. | ||
| */ | ||
| cancel() { | ||
| return __awaiter(this, void 0, void 0, function* () { | ||
| if (!this.deliveryId) | ||
| throw new Error("Delivery id is not found."); | ||
| const url = `/deliveries/${this.deliveryId}/cancel`; | ||
| const res = yield Bulk.request | ||
| .send("patch", url); | ||
| return res; | ||
| }); | ||
| } | ||
| /** | ||
| * Gets an Email instance for the current bulk delivery. | ||
@@ -298,3 +281,5 @@ * | ||
| return {}; | ||
| const reservationTime = (0, date_fns_tz_1.format)(date, "%FT%T%z", { timeZone: "Asia/Tokyo" }) | ||
| const reservationTime = (0, date_fns_tz_1.format)(date, "yyyy-MM-dd'T'HH:mm:ssXXX", { | ||
| timeZone: "Asia/Tokyo", | ||
| }) | ||
| .replace("+0900", "+09:00"); | ||
@@ -301,0 +286,0 @@ return { |
| import Base from "./base"; | ||
| import Bulk from "./bulk"; | ||
| import Transaction from "./transaction"; | ||
| import { MailConfig, SearchCondition, SearchResult, Attachment, Unsubscribed, SearchAllCondition } from "../../types/"; | ||
| import { MailConfig, SearchCondition, SearchResult, Attachment, Unsubscribed, SearchConditionUnsubscribe } from "../../types/"; | ||
| /** | ||
@@ -30,7 +30,7 @@ * Class representing a mail, extending the Base class. | ||
| * @async | ||
| * @param {SearchCondition} params - The search conditions. | ||
| * @param {SearchConditionUnsubscribe} params - The search conditions. | ||
| * @return {Promise<(Bulk | Transaction)[]>} - The search results. | ||
| * @static | ||
| */ | ||
| static find(params?: SearchCondition): Promise<(Bulk | Transaction)[]>; | ||
| static find(params?: SearchConditionUnsubscribe): Promise<(Bulk | Transaction)[]>; | ||
| /** | ||
@@ -44,3 +44,3 @@ * Finds mails based on conditions. | ||
| */ | ||
| static all(params?: SearchAllCondition): Promise<(Bulk | Transaction)[]>; | ||
| static all(params?: SearchCondition): Promise<(Bulk | Transaction)[]>; | ||
| /** | ||
@@ -47,0 +47,0 @@ * Adds a recipient to the mail. |
@@ -61,3 +61,3 @@ "use strict"; | ||
| * @async | ||
| * @param {SearchCondition} params - The search conditions. | ||
| * @param {SearchConditionUnsubscribe} params - The search conditions. | ||
| * @return {Promise<(Bulk | Transaction)[]>} - The search results. | ||
@@ -97,4 +97,2 @@ * @static | ||
| const res = yield Mail.request.send("get", url, params); | ||
| console.log(res); | ||
| console.log(params); | ||
| return res.data.map((params) => Mail.fromJson(params)); | ||
@@ -260,3 +258,3 @@ }); | ||
| } | ||
| if (sendTime || this.params.to.length > 1) { | ||
| if (sendTime) { | ||
| return this.sendBulk(sendTime); | ||
@@ -263,0 +261,0 @@ } |
@@ -143,3 +143,4 @@ "use strict"; | ||
| else if (requestInit.method.toUpperCase() === "POST" || | ||
| requestInit.method.toUpperCase() === "PUT") { | ||
| requestInit.method.toUpperCase() === "PUT" || | ||
| requestInit.method.toUpperCase() === "PATCH") { | ||
| requestInit.body = JSON.stringify(params); | ||
@@ -146,0 +147,0 @@ } |
+1
-1
| { | ||
| "name": "blastengine", | ||
| "version": "2.3.7", | ||
| "version": "2.3.8", | ||
| "description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
222227
0.01%