Socket
Socket
Sign inDemoInstall

unisender-api

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unisender-api - npm Package Compare versions

Comparing version 1.0.5 to 1.1.0

174

lib/index.d.ts

@@ -1,2 +0,2 @@

import { CreateListOptions, ResultResponse, List, EmptyObject, ImportContactsOptions, ImportContactsResult, SubscribeOptions, exportContactsOptions, getContactCountParameters, getContactCountResult, getContactOptions, getContactResult, getFieldsResult, createFieldOptions, FieldType, createEmailMessageOptions, createCampaignOptions, createCampaignResult, sendSmsResult, SendEmailOptions, checkEmailResult } from './interfaces/types';
import { CreateListOptions, ResultResponse, List, EmptyObject, ImportContactsOptions, ImportContactsResult, SubscribeOptions, exportContactsOptions, getContactCountParameters, getContactCountResult, getContactOptions, getContactResult, getFieldsResult, createFieldOptions, FieldType, createEmailMessageOptions, createCampaignOptions, createCampaignResult, sendSmsResult, SendEmailOptions, checkEmailResult, getWebVersionResult, updateEmailMessageOptions, createEmailTemplateOptions, updateEmailTemplateOptions, getTemplateOptions, getTemplateResult, getTemplatesOptions, listTemplatesResult, getCampaignDeliveryStatsOptions, getCampaignDeliveryStatsResult, getVisitedLinksResult, getCampaignsOptions, getCampaignsResult, getCampaignStatusResult, getMessagesOptions, getMessagesResult, getMessageResult, listMessagesResult } from './interfaces/types';
/** Initiate your Unisender account. */

@@ -283,3 +283,175 @@ declare class Unisender {

checkEmail(emailId: string): Promise<ResultResponse<checkEmailResult>>;
/**
* You can use the updateOptInEmail method to change the text of the email. The text must include at least one link with the href="{{ConfirmUrl}}".
*
* [More information](https://www.unisender.com/ru/support/api/messages/updateoptinemail/)
*
* @param senderName Sender's name.
* @param senderEmail Sender's email.
* @param subject A string with the subject of the email. May include wildcard fields.
* @param body HTML-formatted email text with the ability to add wildcard fields.
* @param listId The code of the list to which this email will be sent when subscribed. The codes of all lists can be obtained by calling getLists.
*/
updateOptInEmail(senderName: string, senderEmail: string, subject: string, body: string, listId: number): Promise<ResultResponse<EmptyObject>>;
/**
* A method for getting a link to the web version of an email.
*
* [More information](https://www.unisender.com/ru/support/api/messages/getwebversion/)
*
* @param campaignId The identifier of an existing campaign.
* @param format The output format takes the values html | json, by default json (html format is intended only for visual viewing of the result, the parser in this format will not work).
*/
getWebVersion(campaignId: number, format?: 'json' | 'html'): Promise<ResultResponse<getWebVersionResult>>;
/**
* A method for deleting a message.
*
* [More information](https://www.unisender.com/ru/support/api/messages/deletemessage/)
*
* @param messageId Message code.
*/
deleteMessage(messageId: number): Promise<ResultResponse<EmptyObject>>;
/**
* A method for editing an existing email message (without sending it). You can create a new email message using the createEmailMessage method.
*
* [More information](https://www.unisender.com/ru/support/api/messages/updateemailmessage/)
*
* @param messageId Message code.
* @param options additional options.
*/
updateEmailMessage(messageId: number, options?: updateEmailMessageOptions): Promise<ResultResponse<{
message_id: number;
}>>;
/**
* A method for creating an email template for a mass mailing. You can use the updateEmailTemplate method to edit an existing template.
*
* [More information](https://www.unisender.com/ru/support/api/templates/createemailtemplate/)
*
* @param title Template name.
* @param subject A string with the subject of the email. May include wildcard fields.
* @param body The text of the email template in HTML format with the ability to add wildcard fields.
* @param options additional options.
*/
createEmailTemplate(title: string, subject: string, body: string, options?: createEmailTemplateOptions): Promise<ResultResponse<{
template_id: number;
warnings: {
[key: string]: string;
}[];
}>>;
/**
* A method for editing an email template for a mass mailing created using the createEmailTemplate method.
*
* [More information](https://www.unisender.com/ru/support/api/templates/updateemailtemplate/)
*
* @param templateId Template ID, can be obtained by calling the createEmailTemplate, getTemplate, getTemplates, listTemplates methods.
* @param options additional options.
*/
updateEmailTemplate(templateId: number, options?: updateEmailTemplateOptions): Promise<ResultResponse<{
warnings: {
[key: string]: string;
}[];
}>>;
/**
* A method for removing a template.
*
* [More information](https://www.unisender.com/ru/support/api/templates/deletetemplate/)
*
* @param templateId Template ID, can be obtained by calling the createEmailTemplate, getTemplate, getTemplates, listTemplates methods.
*/
deleteTemplate(templateId: number): Promise<ResultResponse<EmptyObject>>;
/**
* The method returns information about the specified template.
*
* [More information](https://www.unisender.com/ru/support/api/templates/gettemplate/)
*
* @param templateId Template ID, can be obtained by calling the createEmailTemplate, getTemplate, getTemplates, listTemplates methods.
* @param options additional options.
*/
getTemplate(templateId: number, options?: getTemplateOptions): Promise<ResultResponse<getTemplateResult>>;
/**
* This method is used to get the list of all templates created both through the personal UniSender account and through API.
*
* [More information](https://www.unisender.com/ru/support/api/templates/gettemplates/)
*
* @param options additional options.
*/
getTemplates(options?: getTemplatesOptions): Promise<ResultResponse<getTemplateResult[]>>;
/**
* This method is used to get the list of all templates created both through personal UniSender account and through API. The method works like getTemplates, the only difference is that listTemplates does not return body parameter. To get the body use getTemplate method.
*
* [More information](https://www.unisender.com/ru/support/api/templates/listtemplates/)
*
* @param options additional options.
*/
listTemplates(options?: getTemplatesOptions): Promise<ResultResponse<listTemplatesResult[]>>;
/**
* Get a report on the results of message delivery in the specified mailing list.
*
* [More information](https://www.unisender.com/ru/support/api/statistics/getcampaigndeliverystats/)
*
* @param campaignId The identifier of the campaign obtained by calling the createCampaign method.
* @param options additional options
* @returns A link for download to the exported file.
*/
getCampaignDeliveryStats(campaignId: number, options?: getCampaignDeliveryStatsOptions): Promise<string>;
/**
* Get general information about message delivery results of the specified mailing. The method returns statistics similar to "Newsletters" - "Sent reports" of UniSender cabinet.
*
* [More information](https://www.unisender.com/ru/support/api/statistics/get-campaign-common-stats/)
*
* @param campaignId The identifier of the campaign obtained by calling the createCampaign method.
*/
getCampaignCommonStats(campaignId: number): Promise<ResultResponse<getCampaignDeliveryStatsResult>>;
/**
* Get a report on the links visited by users in the specified email newsletter.
*
* [More information](https://www.unisender.com/ru/support/api/statistics/getvisitedlinks/)
*
* @param campaignId The identifier of the campaign obtained by calling the createCampaign method.
*/
getVisitedLinks(campaignId: number, group?: string): Promise<ResultResponse<getVisitedLinksResult>>;
/**
* A method for getting a list of all available mailings. The number of mailings you can receive at a time is limited to 10000. To get the full list of mailings if their number is more than 10000, use parameters from and to.
*
* [More information](https://www.unisender.com/ru/support/api/statistics/getcampaigns/)
*
* @param options additional options.
*/
getCampaigns(options?: getCampaignsOptions): Promise<ResultResponse<getCampaignsResult[]>>;
/**
* Find out the status of the mailing list created by the createCampaign method.
*
* [More information](https://www.unisender.com/ru/support/api/statistics/getcampaignstatus/)
*
* @param campaignId The distribution code obtained by the createCampaign method.
*/
getCampaignStatus(campaignId: number): Promise<ResultResponse<getCampaignStatusResult>>;
/**
* This method is used to get the list of mails created both through the personal UniSender cabinet and through API (createEmailMessage + createCampaign etc.)
*
* [More information](https://www.unisender.com/ru/support/api/statistics/getmessages/)
*
* @param dateFrom the creation date is greater than, the format is yyyyy-mm-dd hh:mm UTC.
* @param dateTo the creation date is less than, the format is yyyyy-mm-dd hh:mm UTC.
* @param options additional options.
*/
getMessages(dateFrom: string, dateTo: string, options?: getMessagesOptions): Promise<ResultResponse<getMessagesResult[]>>;
/**
* A method for getting information about an SMS or email message.
*
* [More information](https://www.unisender.com/ru/support/api/statistics/getmessages/)
*
* @param messageId message identifier.
*/
getMessage(messageId: number): Promise<ResultResponse<getMessageResult[]>>;
/**
* This method is used to get a list of all messages created both through personal UniSender account and through API. The method works like getMessages, unlike listMessages - it doesn't return message body and attachments, but it returns user login.
*
* [More information](https://www.unisender.com/ru/support/api/statistics/listmessages/)
*
* @param dateFrom the creation date is greater than, the format is yyyyy-mm-dd hh:mm UTC.
* @param dateTo the creation date is less than, the format is yyyyy-mm-dd hh:mm UTC.
* @param options additional options.
*/
listMessages(dateFrom: string, dateTo: string, options?: getMessagesOptions): Promise<ResultResponse<listMessagesResult[]>>;
}
export default Unisender;

728

lib/index.js

@@ -45,4 +45,3 @@ "use strict";

var methods_1 = require("./utils/methods");
/** Initiate your Unisender account. */
var Unisender = /** @class */ (function () {
var Unisender = (function () {
function Unisender(apiKey) {

@@ -63,3 +62,3 @@ this.apiUrl = 'https://api.unisender.com/ru/api/';

_b.trys.push([1, 3, , 4]);
return [4 /*yield*/, axios_1.default.post(url.href, {
return [4, axios_1.default.post(url.href, {
headers: { 'Content-Type': 'multipart/form-data' }

@@ -69,7 +68,7 @@ })];

data = (_b.sent()).data;
return [2 /*return*/, data];
return [2, data];
case 3:
e_1 = _b.sent();
return [2 /*return*/, new Error((_a = e_1 === null || e_1 === void 0 ? void 0 : e_1.response) === null || _a === void 0 ? void 0 : _a.data)];
case 4: return [2 /*return*/];
return [2, new Error((_a = e_1 === null || e_1 === void 0 ? void 0 : e_1.response) === null || _a === void 0 ? void 0 : _a.data)];
case 4: return [2];
}

@@ -86,6 +85,2 @@ });

};
/**
* A method for get contact lists.
* [More information](https://www.unisender.com/ru/support/api/contacts/getlists/)
*/
Unisender.prototype.getLists = function () {

@@ -96,6 +91,6 @@ return __awaiter(this, void 0, void 0, function () {

switch (_a.label) {
case 0: return [4 /*yield*/, this.sendRequest(methods_1.methods.contactLists.getLists)];
case 0: return [4, this.sendRequest(methods_1.methods.contactLists.getLists)];
case 1:
request = _a.sent();
return [2 /*return*/, request];
return [2, request];
}

@@ -105,8 +100,2 @@ });

};
/**
* A method for creating a new contact list.
* [More information](https://www.unisender.com/ru/support/api/contacts/createlist/)
* @param title name of contact list
* @param options additional fields for create contact list
*/
Unisender.prototype.createList = function (title, options) {

@@ -126,6 +115,6 @@ return __awaiter(this, void 0, void 0, function () {

paramsString = this.parameterСollection(params);
return [4 /*yield*/, this.sendRequest(methods_1.methods.contactLists.createList, paramsString)];
return [4, this.sendRequest(methods_1.methods.contactLists.createList, paramsString)];
case 1:
request = _a.sent();
return [2 /*return*/, request];
return [2, request];
}

@@ -135,9 +124,2 @@ });

};
/**
* A method for update contact list.
* [More information](https://www.unisender.com/ru/support/api/contacts/updatelist/)
* @param id id of contact list
* @param title name of contact list
* @param options additional fields for update contact list
*/
Unisender.prototype.updateList = function (id, title, options) {

@@ -158,6 +140,6 @@ return __awaiter(this, void 0, void 0, function () {

paramsString = this.parameterСollection(params);
return [4 /*yield*/, this.sendRequest(methods_1.methods.contactLists.updateList, paramsString)];
return [4, this.sendRequest(methods_1.methods.contactLists.updateList, paramsString)];
case 1:
request = _a.sent();
return [2 /*return*/, request];
return [2, request];
}

@@ -167,5 +149,2 @@ });

};
/** A method for delete contact list.
* @param id - id of contact list
*/
Unisender.prototype.deleteList = function (id) {

@@ -180,6 +159,6 @@ return __awaiter(this, void 0, void 0, function () {

paramsString = this.parameterСollection(params);
return [4 /*yield*/, this.sendRequest(methods_1.methods.contactLists.deleteList, paramsString)];
return [4, this.sendRequest(methods_1.methods.contactLists.deleteList, paramsString)];
case 1:
request = _a.sent();
return [2 /*return*/, request];
return [2, request];
}

@@ -189,13 +168,2 @@ });

};
/**
* This method adds contacts (email address and/or cell phone number) to one or more lists and allows you to add/change values to additional fields and labels.
*
* [More information](https://www.unisender.com/ru/support/api/contacts/subscribe/)
*
* @param listIds Comma-separated list codes to add a contact to. Example: 1,2,3.
* @param email The email address of the contact
* @param name The name of the contact
* @param fields additional contact fields. Example: {UTM: 'store'}
* @param options additional options
*/
Unisender.prototype.subscribe = function (listIds, email, name, fields, options) {

@@ -222,6 +190,6 @@ return __awaiter(this, void 0, void 0, function () {

nameSubscriber = name ? "&fields[Name]=".concat(name) : '';
return [4 /*yield*/, this.sendRequest(methods_1.methods.contactLists.subscribe, paramsString + emailSubscriber + nameSubscriber + filedsString)];
return [4, this.sendRequest(methods_1.methods.contactLists.subscribe, paramsString + emailSubscriber + nameSubscriber + filedsString)];
case 1:
request = _a.sent();
return [2 /*return*/, request];
return [2, request];
}

@@ -231,11 +199,2 @@ });

};
/**
* The method excludes a contact's e-mail or phone number from one or more lists.
*
* [More information](https://www.unisender.com/ru/support/api/contacts/exclude/)
*
* @param contactType 'email' or 'phone'
* @param contact The contact e-mail or phone number. Example: andrey@chmerev.com or 89091234567
* @param listIds Comma-separated list codes from which we exclude a contact.
*/
Unisender.prototype.exclude = function (contactType, contact, listIds) {

@@ -252,6 +211,6 @@ return __awaiter(this, void 0, void 0, function () {

paramsString = this.parameterСollection(params);
return [4 /*yield*/, this.sendRequest(methods_1.methods.contactLists.exclude, paramsString)];
return [4, this.sendRequest(methods_1.methods.contactLists.exclude, paramsString)];
case 1:
request = _a.sent();
return [2 /*return*/, request];
return [2, request];
}

@@ -261,11 +220,2 @@ });

};
/**
* The method unsubscribes a contact's e-mail or phone number from one or more lists.
*
* [More information](https://www.unisender.com/ru/support/api/contacts/exclude/)
*
* @param contactType 'email' or 'phone'
* @param contact The contact e-mail or phone number. Example: andrey@chmerev.com or 89091234567
* @param listIds Comma-separated list codes from which we exclude a contact.
*/
Unisender.prototype.unsubscribe = function (contactType, contact, listIds) {

@@ -282,6 +232,6 @@ return __awaiter(this, void 0, void 0, function () {

paramsString = this.parameterСollection(params);
return [4 /*yield*/, this.sendRequest(methods_1.methods.contactLists.unsubscribe, paramsString)];
return [4, this.sendRequest(methods_1.methods.contactLists.unsubscribe, paramsString)];
case 1:
request = _a.sent();
return [2 /*return*/, request];
return [2, request];
}

@@ -291,18 +241,2 @@ });

};
/** A method for import contacts.
*
* Example import fileds and Data:
*
* Fields: ['email', 'Name']
*
* Data: [['andrey@chmerev.com', 'Andrey'], ['test@unisender.com', 'Test']]
*
* The number of fields must be equal to the number of fields of each contact
*
* [More information](https://www.unisender.com/ru/support/api/contacts/importcontacts/)
*
* @param fieldNames Array of field names
* @param data Contact array
* @param options additional options
*/
Unisender.prototype.importContacts = function (fieldNames, data, options) {

@@ -331,6 +265,6 @@ return __awaiter(this, void 0, void 0, function () {

});
return [4 /*yield*/, this.sendRequest(methods_1.methods.contactLists.importContacts, filedsString + dataString + paramsString)];
return [4, this.sendRequest(methods_1.methods.contactLists.importContacts, filedsString + dataString + paramsString)];
case 1:
request = _a.sent();
return [2 /*return*/, request];
return [2, request];
}

@@ -340,11 +274,2 @@ });

};
/**
* Exporting contact data from UniSender.
*
* [More information](https://www.unisender.com/ru/support/api/contacts/exportcontacts/)
*
* @param options additional options
* @param fieldNames Array of field names. Example: ['email', 'Name']
* @returns A link for download to the exported file.
*/
Unisender.prototype.exportContacts = function (options, fieldNames) {

@@ -367,3 +292,3 @@ return __awaiter(this, void 0, void 0, function () {

paramsString = this.parameterСollection(params);
return [4 /*yield*/, this.sendRequest(methods_1.methods.contactLists.exportContacts, filedsString + paramsString)];
return [4, this.sendRequest(methods_1.methods.contactLists.exportContacts, filedsString + paramsString)];
case 1:

@@ -378,4 +303,4 @@ request = _a.sent();

case 2:
if (!!completed) return [3 /*break*/, 5];
return [4 /*yield*/, this.sendRequest(methods_1.methods.contactLists.getTaskResult, "&task_uuid=".concat(request.result.task_uuid))];
if (!!completed) return [3, 5];
return [4, this.sendRequest(methods_1.methods.contactLists.getTaskResult, "&task_uuid=".concat(request.result.task_uuid))];
case 3:

@@ -391,7 +316,7 @@ checkStatus = _a.sent();

}
return [4 /*yield*/, (0, delay_1.delay)(10)];
return [4, (0, delay_1.delay)(10)];
case 4:
_a.sent();
return [3 /*break*/, 2];
case 5: return [2 /*return*/, urlForDownload];
return [3, 2];
case 5: return [2, urlForDownload];
}

@@ -401,9 +326,2 @@ });

};
/**
* The method returns the size of the contact database by user login.
*
* [More information](https://www.unisender.com/ru/support/api/contacts/gettotalcontactscount/)
*
* @param login User login in the system. Example: ID4417233
*/
Unisender.prototype.getTotalContactsCount = function (login) {

@@ -414,6 +332,6 @@ return __awaiter(this, void 0, void 0, function () {

switch (_a.label) {
case 0: return [4 /*yield*/, this.sendRequest(methods_1.methods.contactLists.getTotalContactsCount, "&login=".concat(login))];
case 0: return [4, this.sendRequest(methods_1.methods.contactLists.getTotalContactsCount, "&login=".concat(login))];
case 1:
request = _a.sent();
return [2 /*return*/, request];
return [2, request];
}

@@ -423,10 +341,2 @@ });

};
/**
* The method allows you to get the number of contacts in the list.
*
* [More information](https://www.unisender.com/ru/support/api/contacts/getcontactcount/)
*
* @param listId The id of the list to be searched.
* @param options A list of parameters to search for (at least one parameter). tagId / type / search
*/
Unisender.prototype.getContactCount = function (listId, options) {

@@ -446,6 +356,6 @@ return __awaiter(this, void 0, void 0, function () {

});
return [4 /*yield*/, this.sendRequest(methods_1.methods.contactLists.getContactCount, paramsString + optionsString)];
return [4, this.sendRequest(methods_1.methods.contactLists.getContactCount, paramsString + optionsString)];
case 1:
request = _a.sent();
return [2 /*return*/, request];
return [2, request];
}

@@ -455,10 +365,2 @@ });

};
/**
* Getting information about a single contact.
*
* [More information](https://www.unisender.com/ru/support/api/contacts/getcontact/)
*
* @param email email of the contact
* @param options additional options
*/
Unisender.prototype.getContact = function (email, options) {

@@ -478,6 +380,6 @@ return __awaiter(this, void 0, void 0, function () {

});
return [4 /*yield*/, this.sendRequest(methods_1.methods.contactLists.getContact, paramsString + optionsString)];
return [4, this.sendRequest(methods_1.methods.contactLists.getContact, paramsString + optionsString)];
case 1:
request = _a.sent();
return [2 /*return*/, request];
return [2, request];
}

@@ -487,7 +389,2 @@ });

};
/**
* A method to get a list of custom fields.
*
* [More information](https://www.unisender.com/ru/support/api/inputs/getfields/)
*/
Unisender.prototype.getFields = function () {

@@ -498,6 +395,6 @@ return __awaiter(this, void 0, void 0, function () {

switch (_a.label) {
case 0: return [4 /*yield*/, this.sendRequest(methods_1.methods.additionalFieldsAndLabels.getFields)];
case 0: return [4, this.sendRequest(methods_1.methods.additionalFieldsAndLabels.getFields)];
case 1:
request = _a.sent();
return [2 /*return*/, request];
return [2, request];
}

@@ -507,11 +404,2 @@ });

};
/**
* A method for creating a new custom field, the value of which can be set for each recipient and it can then be substituted in the email.
*
* [More information](https://www.unisender.com/ru/support/api/inputs/createfield/)
*
* @param name Variable for substitution. Must be unique, case-sensitive. It's also not recommended to create a field with a name that matches one of the names of standard fields (tags, email, phone, email_status, phone_status, etc.)..
* @param type Type of the field. Possible values: string, text, number, date, bool.
* @param options additional options. public_name
*/
Unisender.prototype.createField = function (name, type, options) {

@@ -532,6 +420,6 @@ return __awaiter(this, void 0, void 0, function () {

});
return [4 /*yield*/, this.sendRequest(methods_1.methods.additionalFieldsAndLabels.createField, paramsString + optionsString)];
return [4, this.sendRequest(methods_1.methods.additionalFieldsAndLabels.createField, paramsString + optionsString)];
case 1:
request = _a.sent();
return [2 /*return*/, request];
return [2, request];
}

@@ -541,11 +429,2 @@ });

};
/**
* A method for changing the parameters of a custom field.
*
* [More information](https://www.unisender.com/ru/support/api/inputs/updatefield/)
*
* @param id The id of the field to be changed.
* @param name Variable for substitution. Must be unique, case-sensitive. It's also not recommended to create a field with a name that matches one of the names of standard fields (tags, email, phone, email_status, phone_status, etc.)..
* @param options additional options. public_name
*/
Unisender.prototype.updateField = function (id, name, options) {

@@ -566,6 +445,6 @@ return __awaiter(this, void 0, void 0, function () {

});
return [4 /*yield*/, this.sendRequest(methods_1.methods.additionalFieldsAndLabels.updateField, paramsString + optionsString)];
return [4, this.sendRequest(methods_1.methods.additionalFieldsAndLabels.updateField, paramsString + optionsString)];
case 1:
request = _a.sent();
return [2 /*return*/, request];
return [2, request];
}

@@ -575,9 +454,2 @@ });

};
/**
* A method for delete field.
*
* [More information](https://www.unisender.com/ru/support/api/inputs/deletefield/)
*
* @param id The id of the field to be changed.
*/
Unisender.prototype.deleteField = function (id) {

@@ -592,6 +464,6 @@ return __awaiter(this, void 0, void 0, function () {

paramsString = this.parameterСollection(params);
return [4 /*yield*/, this.sendRequest(methods_1.methods.additionalFieldsAndLabels.deleteField, paramsString)];
return [4, this.sendRequest(methods_1.methods.additionalFieldsAndLabels.deleteField, paramsString)];
case 1:
request = _a.sent();
return [2 /*return*/, request];
return [2, request];
}

@@ -601,15 +473,2 @@ });

};
/**
* A method for creating an e-mail message without sending it.
* Note that the maximum size of an e-mail message is 8mb.
*
* [More information](https://www.unisender.com/ru/support/api/messages/createemailmessage/)
*
* @param senderName Sender name. Example: "Andrey Chmerev".
* @param senderEmail Sender e-mail. Example: "andrey@chmerev.com".
* @param listId The code of the list, which will be used to send the mailing list.
* @param options additional options.
* @param attachments A list of attachments. {name: "file.pdf", content: "the binary content of the file."}
*
*/
Unisender.prototype.createEmailMessage = function (senderName, senderEmail, listId, options, attachments) {

@@ -638,6 +497,6 @@ return __awaiter(this, void 0, void 0, function () {

});
return [4 /*yield*/, this.sendRequest(methods_1.methods.createAndSendMessage.createEmailMessage, paramsString + optionsString + attachmentsString)];
return [4, this.sendRequest(methods_1.methods.createAndSendMessage.createEmailMessage, paramsString + optionsString + attachmentsString)];
case 1:
request = _a.sent();
return [2 /*return*/, request];
return [2, request];
}

@@ -647,12 +506,2 @@ });

};
/**
* A method for creating an SMS message without sending it.
*
* [More information](https://www.unisender.com/ru/support/api/messages/createsmsmessage/)
*
* @param senderName The sender's name is from 3 to 11 Latin letters and numbers. The name must be registered with the support service.
* @param body Message text with the ability to add wildcard fields.
* @param listId The code of the list on which the SMS will be sent. The codes of all lists can be obtained by calling getLists.
* @param tag Label. If set, the message will not be sent to the entire list, but only to those recipients who are assigned the label.
*/
Unisender.prototype.createSmsMessage = function (senderName, body, listId, tag) {

@@ -670,6 +519,6 @@ return __awaiter(this, void 0, void 0, function () {

paramsString = this.parameterСollection(params);
return [4 /*yield*/, this.sendRequest(methods_1.methods.createAndSendMessage.createSmsMessage, paramsString)];
return [4, this.sendRequest(methods_1.methods.createAndSendMessage.createSmsMessage, paramsString)];
case 1:
request = _a.sent();
return [2 /*return*/, request];
return [2, request];
}

@@ -679,10 +528,2 @@ });

};
/**
* Schedule or start sending an e-mail or SMS message immediately.
*
* [More information](https://www.unisender.com/ru/support/api/messages/createcampaign/)
*
* @param messageId The code of the message to send. The code returned by createEmailMessage or createSmsMessage method should be passed.
* @param options additional options.
*/
Unisender.prototype.createCampaign = function (messageId, options) {

@@ -702,6 +543,6 @@ return __awaiter(this, void 0, void 0, function () {

});
return [4 /*yield*/, this.sendRequest(methods_1.methods.createAndSendMessage.createCampaign, paramsString + optionsString)];
return [4, this.sendRequest(methods_1.methods.createAndSendMessage.createCampaign, paramsString + optionsString)];
case 1:
request = _a.sent();
return [2 /*return*/, request];
return [2, request];
}

@@ -711,9 +552,2 @@ });

};
/**
* A method for cancelling a scheduled mailing.
*
* [More information](https://www.unisender.com/ru/support/api/messages/cancel-campaign/)
*
* @param campaignId The id of the mailing that you want to cancel.
*/
Unisender.prototype.cancelCampaign = function (campaignId) {

@@ -728,6 +562,6 @@ return __awaiter(this, void 0, void 0, function () {

paramsString = this.parameterСollection(params);
return [4 /*yield*/, this.sendRequest(methods_1.methods.createAndSendMessage.cancelCampaign, paramsString)];
return [4, this.sendRequest(methods_1.methods.createAndSendMessage.cancelCampaign, paramsString)];
case 1:
request = _a.sent();
return [2 /*return*/, request];
return [2, request];
}

@@ -737,9 +571,2 @@ });

};
/**
* Method returns the id of the current version of the specified message.
*
* [More information](https://www.unisender.com/ru/support/api/messages/get-actual-message-version/)
*
* @param messageId The identifier of the message for which you want to get the id of the current version of the letter.
*/
Unisender.prototype.getActualMessageVersion = function (messageId) {

@@ -754,6 +581,6 @@ return __awaiter(this, void 0, void 0, function () {

paramsString = this.parameterСollection(params);
return [4 /*yield*/, this.sendRequest(methods_1.methods.createAndSendMessage.getActualMessageVersion, paramsString)];
return [4, this.sendRequest(methods_1.methods.createAndSendMessage.getActualMessageVersion, paramsString)];
case 1:
request = _a.sent();
return [2 /*return*/, request];
return [2, request];
}

@@ -763,13 +590,2 @@ });

};
/**
* A method for simply sending one SMS message to one or more recipients.
*
* Maximum number of numbers to send SMS: 150 per call.
*
* [More information](https://www.unisender.com/ru/support/api/messages/sendsms/)
*
* @param phones The recipient's phone number in international format with a country code (you can omit the leading "+"). Example: "79031234567, 79031234567".
* @param sender Sender - the registered name of the sender (alpha name). The string can contain from 3 to 11 Latin letters or numbers with letters. Special characters are also possible - dot, hyphen, dash and some others.
* @param text Message text, up to 1000 characters. Type substitution characters are ignored.
*/
Unisender.prototype.sendSms = function (phones, sender, text) {

@@ -786,6 +602,6 @@ return __awaiter(this, void 0, void 0, function () {

paramsString = this.parameterСollection(params);
return [4 /*yield*/, this.sendRequest(methods_1.methods.createAndSendMessage.sendSms, paramsString)];
return [4, this.sendRequest(methods_1.methods.createAndSendMessage.sendSms, paramsString)];
case 1:
request = _a.sent();
return [2 /*return*/, request];
return [2, request];
}

@@ -795,9 +611,2 @@ });

};
/**
* Returns a string - the status of sending an SMS message.
*
* [More information](https://www.unisender.com/ru/support/api/messages/check-sms/)
*
* @param smsId The message code returned by the sendSms method.
*/
Unisender.prototype.checkSms = function (smsId) {

@@ -812,6 +621,6 @@ return __awaiter(this, void 0, void 0, function () {

paramsString = this.parameterСollection(params);
return [4 /*yield*/, this.sendRequest(methods_1.methods.createAndSendMessage.checkSms, paramsString)];
return [4, this.sendRequest(methods_1.methods.createAndSendMessage.checkSms, paramsString)];
case 1:
request = _a.sent();
return [2 /*return*/, request];
return [2, request];
}

@@ -821,15 +630,2 @@ });

};
/**
* A method for sending one individual email without using personalization and with limited statistical capabilities.
*
* [More information](https://www.unisender.com/ru/support/api/messages/sendemail/)
*
* @param email The address of the recipient of the message.
* @param senderName The sender's name. An arbitrary string, displayed in the "From whom" field of the email client.
* @param senderEmail E-mail address of the sender.
* @param subject The subject line of the email.
* @param body The text of the email is in HTML format as a string.
* @param listId The list code from which the recipient will be prompted to unsubscribe if he or she clicks the unsubscribe link.
* @param options additional options.
*/
Unisender.prototype.sendEmail = function (email, senderName, senderEmail, subject, body, listId, options) {

@@ -871,6 +667,6 @@ return __awaiter(this, void 0, void 0, function () {

});
return [4 /*yield*/, this.sendRequest(methods_1.methods.createAndSendMessage.sendEmail, paramsString + optionsString + attachmentsString + metadataString)];
return [4, this.sendRequest(methods_1.methods.createAndSendMessage.sendEmail, paramsString + optionsString + attachmentsString + metadataString)];
case 1:
request = _a.sent();
return [2 /*return*/, request];
return [2, request];
}

@@ -880,10 +676,2 @@ });

};
/**
* A method for sending a test email. You can only send an already created email.
*
* [More information](https://www.unisender.com/ru/support/api/messages/sendtestemail/)
*
* @param email The address of the recipient of the message. You can send to multiple comma-separated addresses.
* @param idMail The identifier of an email message created earlier. (For example, using the createEmailMessage method).
*/
Unisender.prototype.sendTestEmail = function (email, idMail) {

@@ -899,6 +687,6 @@ return __awaiter(this, void 0, void 0, function () {

paramsString = this.parameterСollection(params);
return [4 /*yield*/, this.sendRequest(methods_1.methods.createAndSendMessage.sendTestEmail, paramsString)];
return [4, this.sendRequest(methods_1.methods.createAndSendMessage.sendTestEmail, paramsString)];
case 1:
request = _a.sent();
return [2 /*return*/, request];
return [2, request];
}

@@ -908,9 +696,2 @@ });

};
/**
* The method allows you to check the delivery status of emails sent by the sendEmail method.
*
* [More information](https://www.unisender.com/ru/support/api/messages/check-email/)
*
* @param emailId The message code returned by the sendEmail method. You can specify up to 500 comma-separated email codes.
*/
Unisender.prototype.checkEmail = function (emailId) {

@@ -925,6 +706,6 @@ return __awaiter(this, void 0, void 0, function () {

paramsString = this.parameterСollection(params);
return [4 /*yield*/, this.sendRequest(methods_1.methods.createAndSendMessage.checkEmail, paramsString)];
return [4, this.sendRequest(methods_1.methods.createAndSendMessage.checkEmail, paramsString)];
case 1:
request = _a.sent();
return [2 /*return*/, request];
return [2, request];
}

@@ -934,2 +715,389 @@ });

};
Unisender.prototype.updateOptInEmail = function (senderName, senderEmail, subject, body, listId) {
return __awaiter(this, void 0, void 0, function () {
var params, paramsString, request;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
params = [];
params.push({ sender_name: senderName });
params.push({ sender_email: senderEmail });
params.push({ subject: subject });
params.push({ body: body });
params.push({ list_id: listId });
paramsString = this.parameterСollection(params);
return [4, this.sendRequest(methods_1.methods.createAndSendMessage.updateOptInEmail, paramsString)];
case 1:
request = _a.sent();
return [2, request];
}
});
});
};
Unisender.prototype.getWebVersion = function (campaignId, format) {
return __awaiter(this, void 0, void 0, function () {
var params, paramsString, request;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
params = [];
params.push({ campaign_id: campaignId });
format && params.push({ format: format });
paramsString = this.parameterСollection(params);
return [4, this.sendRequest(methods_1.methods.createAndSendMessage.getWebVersion, paramsString)];
case 1:
request = _a.sent();
return [2, request];
}
});
});
};
Unisender.prototype.deleteMessage = function (messageId) {
return __awaiter(this, void 0, void 0, function () {
var params, paramsString, request;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
params = [];
params.push({ message_id: messageId });
paramsString = this.parameterСollection(params);
return [4, this.sendRequest(methods_1.methods.createAndSendMessage.deleteMessage, paramsString)];
case 1:
request = _a.sent();
return [2, request];
}
});
});
};
Unisender.prototype.updateEmailMessage = function (messageId, options) {
return __awaiter(this, void 0, void 0, function () {
var params, paramsString, optionsString, request;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
params = [];
params.push({ message_id: messageId });
paramsString = this.parameterСollection(params);
optionsString = '';
options && Object.entries(options).forEach(function (_a) {
var key = _a[0], value = _a[1];
optionsString += "&".concat(key, "=").concat(value);
});
return [4, this.sendRequest(methods_1.methods.createAndSendMessage.updateEmailMessage, paramsString + optionsString)];
case 1:
request = _a.sent();
return [2, request];
}
});
});
};
Unisender.prototype.createEmailTemplate = function (title, subject, body, options) {
return __awaiter(this, void 0, void 0, function () {
var params, paramsString, optionsString, request;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
params = [];
params.push({ title: title });
params.push({ subject: subject });
params.push({ body: body });
paramsString = this.parameterСollection(params);
optionsString = '';
options && Object.entries(options).forEach(function (_a) {
var key = _a[0], value = _a[1];
optionsString += "&".concat(key, "=").concat(value);
});
return [4, this.sendRequest(methods_1.methods.templates.createEmailTemplate, paramsString + optionsString)];
case 1:
request = _a.sent();
return [2, request];
}
});
});
};
Unisender.prototype.updateEmailTemplate = function (templateId, options) {
return __awaiter(this, void 0, void 0, function () {
var params, paramsString, optionsString, request;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
params = [];
params.push({ template_id: templateId });
paramsString = this.parameterСollection(params);
optionsString = '';
options && Object.entries(options).forEach(function (_a) {
var key = _a[0], value = _a[1];
optionsString += "&".concat(key, "=").concat(value);
});
return [4, this.sendRequest(methods_1.methods.templates.updateEmailTemplate, paramsString + optionsString)];
case 1:
request = _a.sent();
return [2, request];
}
});
});
};
Unisender.prototype.deleteTemplate = function (templateId) {
return __awaiter(this, void 0, void 0, function () {
var params, paramsString, request;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
params = [];
params.push({ template_id: templateId });
paramsString = this.parameterСollection(params);
return [4, this.sendRequest(methods_1.methods.templates.deleteTemplate, paramsString)];
case 1:
request = _a.sent();
return [2, request];
}
});
});
};
Unisender.prototype.getTemplate = function (templateId, options) {
return __awaiter(this, void 0, void 0, function () {
var params, paramsString, optionsString, request;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
params = [];
params.push({ template_id: templateId });
paramsString = this.parameterСollection(params);
optionsString = '';
options && Object.entries(options).forEach(function (_a) {
var key = _a[0], value = _a[1];
optionsString += "&".concat(key, "=").concat(value);
});
return [4, this.sendRequest(methods_1.methods.templates.getTemplate, paramsString + optionsString)];
case 1:
request = _a.sent();
return [2, request];
}
});
});
};
Unisender.prototype.getTemplates = function (options) {
return __awaiter(this, void 0, void 0, function () {
var optionsString, request;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
optionsString = '';
options && Object.entries(options).forEach(function (_a) {
var key = _a[0], value = _a[1];
optionsString += "&".concat(key, "=").concat(value);
});
return [4, this.sendRequest(methods_1.methods.templates.getTemplates, optionsString)];
case 1:
request = _a.sent();
return [2, request];
}
});
});
};
Unisender.prototype.listTemplates = function (options) {
return __awaiter(this, void 0, void 0, function () {
var optionsString, request;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
optionsString = '';
options && Object.entries(options).forEach(function (_a) {
var key = _a[0], value = _a[1];
optionsString += "&".concat(key, "=").concat(value);
});
return [4, this.sendRequest(methods_1.methods.templates.listTemplates, optionsString)];
case 1:
request = _a.sent();
return [2, request];
}
});
});
};
Unisender.prototype.getCampaignDeliveryStats = function (campaignId, options) {
return __awaiter(this, void 0, void 0, function () {
var filedsString, params, paramsString, request, completed, urlForDownload, checkStatus, workStatuses;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
filedsString = '';
(options === null || options === void 0 ? void 0 : options.field_ids) && options.field_ids.forEach(function (field) {
filedsString += "&field_ids[]=".concat(field);
});
params = [];
params.push({ campaign_id: campaignId });
options && Object.entries(options).forEach(function (_a) {
var _b;
var key = _a[0], value = _a[1];
var paramsForAdditionalProcessing = ['field_ids'];
if (!paramsForAdditionalProcessing.includes(key)) {
params.push((_b = {}, _b[key] = value, _b));
}
});
paramsString = this.parameterСollection(params);
return [4, this.sendRequest(methods_1.methods.statistics.getCampaignDeliveryStats, filedsString + paramsString)];
case 1:
request = _a.sent();
if ((request === null || request === void 0 ? void 0 : request.result.status) !== 'new') {
throw new Error('An error occurred when creating a task for export. Please try again later.');
}
completed = false;
urlForDownload = '';
_a.label = 2;
case 2:
if (!!completed) return [3, 5];
return [4, this.sendRequest(methods_1.methods.contactLists.getTaskResult, "&task_uuid=".concat(request.result.task_uuid))];
case 3:
checkStatus = _a.sent();
if (checkStatus.result.status === 'completed') {
completed = true;
urlForDownload = checkStatus.result.file_to_download;
}
workStatuses = ['completed', 'processing'];
if (!workStatuses.includes(checkStatus.result.status)) {
throw new Error('An error occurred while waiting for a file link.');
}
return [4, (0, delay_1.delay)(10)];
case 4:
_a.sent();
return [3, 2];
case 5: return [2, urlForDownload];
}
});
});
};
Unisender.prototype.getCampaignCommonStats = function (campaignId) {
return __awaiter(this, void 0, void 0, function () {
var params, paramsString, request;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
params = [];
params.push({ campaign_id: campaignId });
paramsString = this.parameterСollection(params);
return [4, this.sendRequest(methods_1.methods.statistics.getCampaignCommonStats, paramsString)];
case 1:
request = _a.sent();
return [2, request];
}
});
});
};
Unisender.prototype.getVisitedLinks = function (campaignId, group) {
return __awaiter(this, void 0, void 0, function () {
var params, paramsString, request;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
params = [];
params.push({ campaign_id: campaignId });
group && params.push({ group: group });
paramsString = this.parameterСollection(params);
return [4, this.sendRequest(methods_1.methods.statistics.getVisitedLinks, paramsString)];
case 1:
request = _a.sent();
return [2, request];
}
});
});
};
Unisender.prototype.getCampaigns = function (options) {
return __awaiter(this, void 0, void 0, function () {
var optionsString, request;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
optionsString = '';
options && Object.entries(options).forEach(function (_a) {
var key = _a[0], value = _a[1];
optionsString += "&".concat(key, "=").concat(value);
});
return [4, this.sendRequest(methods_1.methods.statistics.getCampaigns, optionsString)];
case 1:
request = _a.sent();
return [2, request];
}
});
});
};
Unisender.prototype.getCampaignStatus = function (campaignId) {
return __awaiter(this, void 0, void 0, function () {
var params, paramsString, request;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
params = [];
params.push({ campaign_id: campaignId });
paramsString = this.parameterСollection(params);
return [4, this.sendRequest(methods_1.methods.statistics.getCampaignStatus, paramsString)];
case 1:
request = _a.sent();
return [2, request];
}
});
});
};
Unisender.prototype.getMessages = function (dateFrom, dateTo, options) {
return __awaiter(this, void 0, void 0, function () {
var params, paramsString, request;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
params = [];
params.push({ date_from: dateFrom });
params.push({ date_to: dateTo });
options && Object.entries(options).forEach(function (_a) {
var _b;
var key = _a[0], value = _a[1];
params.push((_b = {}, _b[key] = value, _b));
});
paramsString = this.parameterСollection(params);
return [4, this.sendRequest(methods_1.methods.statistics.getMessages, paramsString)];
case 1:
request = _a.sent();
return [2, request];
}
});
});
};
Unisender.prototype.getMessage = function (messageId) {
return __awaiter(this, void 0, void 0, function () {
var params, paramsString, request;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
params = [];
params.push({ id: messageId });
paramsString = this.parameterСollection(params);
return [4, this.sendRequest(methods_1.methods.statistics.getMessage, paramsString)];
case 1:
request = _a.sent();
return [2, request];
}
});
});
};
Unisender.prototype.listMessages = function (dateFrom, dateTo, options) {
return __awaiter(this, void 0, void 0, function () {
var params, paramsString, request;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
params = [];
params.push({ date_from: dateFrom });
params.push({ date_to: dateTo });
options && Object.entries(options).forEach(function (_a) {
var _b;
var key = _a[0], value = _a[1];
params.push((_b = {}, _b[key] = value, _b));
});
paramsString = this.parameterСollection(params);
return [4, this.sendRequest(methods_1.methods.statistics.listMessages, paramsString)];
case 1:
request = _a.sent();
return [2, request];
}
});
});
};
return Unisender;

@@ -936,0 +1104,0 @@ }());

@@ -168,2 +168,148 @@ export declare type EmptyObject = {

}
export interface getWebVersionResult {
letter_id: number;
web_letter_link: string;
}
export interface updateEmailMessageOptions {
sender_name?: string;
sender_email?: string;
subject?: string;
body?: string;
list_id?: number;
text_body?: string;
lang?: string;
categories?: string;
}
export interface createEmailTemplateOptions {
description?: string;
text_body?: string;
lang?: string;
}
export interface updateEmailTemplateOptions extends createEmailTemplateOptions {
title?: string;
subject?: string;
body?: string;
}
export interface getTemplateOptions {
system_template_id?: number;
format?: 'html' | 'json';
}
export interface listTemplatesResult {
id: string;
sub_user_login: string;
title: string;
description: string;
lang_code: string;
subject: string;
attachments: string;
screenshot_url: string;
fullsize_screenshot_url: string;
created: string;
updated: string;
message_format: string;
type: string;
raw_body: string;
}
export interface getTemplateResult extends listTemplatesResult {
body: string;
}
export interface getTemplatesOptions {
type?: 'system' | 'user';
date_from?: string;
date_to?: string;
format?: 'html' | 'json';
limit?: number;
offset?: number;
}
export interface getCampaignDeliveryStatsOptions {
notify_url?: string;
changed_since?: string;
field_ids?: string[];
}
export interface getCampaignDeliveryStatsResult {
total: number;
sent: number;
delivered: number;
read_unique: number;
read_all: number;
clicked_unique: number;
clicked_all: number;
unsubscribed: number;
spam: number;
}
export interface getVisitedLinksResult {
fields: string[];
data: string[][];
}
export interface getCampaignsOptions {
from?: string;
to?: string;
limit?: number;
offset?: number;
}
export interface getCampaignsResult {
id: number;
start_time: string;
status: string;
message_id: number;
list_id: number;
subject: string;
sender_name: string;
sender_email: string;
stats_url: string;
}
export interface getCampaignStatusResult {
status: string;
status_comment: string;
creation_time: string;
start_time: string;
}
export interface getMessagesOptions {
format?: 'html' | 'json';
limit?: number;
offset?: number;
}
interface Attachments {
isInline: boolean;
name: string;
size: number;
url: string;
}
export interface listMessagesResult {
id: number;
sub_user_login: string;
list_id: number;
segment_id?: any;
created: string;
updated: string;
service_type: string;
active_version_id?: any;
lang_code: string;
sender_email: string;
sender_name: string;
subject: string;
message_format: string;
}
export interface getMessagesResult extends listMessagesResult {
body: string;
attachments: Attachments[];
}
export interface getMessageResult {
id: string;
sub_user_login?: string | null;
list_id: string;
created: string;
last_update: string;
service_type: 'email' | 'sms';
lang_code: string;
active_version_id?: any;
message_format: string;
wrap_type: string;
images_behavior: string;
sender_email: string;
sender_name: string;
subject: string;
body: string;
text_body: string;
}
export {};

@@ -53,3 +53,3 @@ "use strict";

statistics: {
getCampaignDeliveryStats: 'getCampaignDeliveryStats',
getCampaignDeliveryStats: 'async/getCampaignDeliveryStats',
getCampaignCommonStats: 'getCampaignCommonStats',

@@ -56,0 +56,0 @@ getVisitedLinks: 'getVisitedLinks',

{
"author": "Andrey Chmerev <andrey@chmerev.com> (https://github.com/chmerev/)",
"name": "unisender-api",
"version": "1.0.5",
"version": "1.1.0",
"description": "Package for working with the unisender.com API for sending emails.",

@@ -6,0 +6,0 @@ "main": "./lib/index.js",

@@ -57,20 +57,20 @@

- [x] checkEmail
- [ ] updateOptInEmail
- [ ] getWebVersion
- [ ] deleteMessage
- [ ] updateEmailMessage
- [ ] createEmailTemplate
- [ ] updateEmailTemplate
- [ ] deleteTemplate
- [ ] getTemplate
- [ ] getTemplates
- [ ] listTemplates
- [ ] getCampaignDeliveryStats
- [ ] getCampaignCommonStats
- [ ] getVisitedLinks
- [ ] getCampaigns
- [ ] getCampaignStatus
- [ ] getMessages
- [ ] getMessage
- [ ] listMessages
- [x] updateOptInEmail
- [x] getWebVersion
- [x] deleteMessage
- [x] updateEmailMessage
- [x] createEmailTemplate
- [x] updateEmailTemplate
- [x] deleteTemplate
- [x] getTemplate
- [x] getTemplates
- [x] listTemplates
- [x] getCampaignDeliveryStats
- [x] getCampaignCommonStats
- [x] getVisitedLinks
- [x] getCampaigns
- [x] getCampaignStatus
- [x] getMessages
- [x] getMessage
- [x] listMessages

@@ -77,0 +77,0 @@ ## License

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc