New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@open-source-initiative/notify-sms

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@open-source-initiative/notify-sms - npm Package Compare versions

Comparing version

to
2.1.0

1

build/helpers.d.ts

@@ -14,2 +14,3 @@ /**

ACCESS_TOKEN: string;
useSenderIdName?: boolean;
}) => Promise<{

@@ -16,0 +17,0 @@ success: boolean;

5

build/helpers.js

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

var reciepientType = _c.reciepientType, channel = _c.channel, contactGroup = _c.contactGroup, senderId = _c.senderId, message = _c.message, contacts = _c.contacts;
var URL = _d.URL, ACCESS_TOKEN = _d.ACCESS_TOKEN;
var URL = _d.URL, ACCESS_TOKEN = _d.ACCESS_TOKEN, useSenderIdName = _d.useSenderIdName;
return __generator(this, function (_e) {

@@ -88,2 +88,5 @@ switch (_e.label) {

}
if (useSenderIdName) {
URL = URL + "&useSenderIdName=yes";
}
return [4 /*yield*/, (0, axios_1.default)({

@@ -90,0 +93,0 @@ method: 'POST',

@@ -64,2 +64,4 @@ /**

message: string;
}, options?: {
useSenderIdName?: boolean;
}): Promise<{

@@ -66,0 +68,0 @@ success: boolean;

@@ -175,4 +175,4 @@ "use strict";

};
SMSClass.prototype.SEND_SMS_TO_CONTACT_GROUP = function (_a) {
return __awaiter(this, arguments, void 0, function (_b) {
SMSClass.prototype.SEND_SMS_TO_CONTACT_GROUP = function (_a, options_1) {
return __awaiter(this, arguments, void 0, function (_b, options) {
var contactGroup = _b.contactGroup, senderId = _b.senderId, message = _b.message;

@@ -187,3 +187,3 @@ return __generator(this, function (_c) {

message: message
}, { URL: configs_1.SEND_SMS_API, ACCESS_TOKEN: this.accessToken })];
}, __assign({ URL: configs_1.SEND_SMS_API, ACCESS_TOKEN: this.accessToken }, options))];
});

@@ -190,0 +190,0 @@ });

{
"name": "@open-source-initiative/notify-sms",
"version": "2.0.1",
"version": "2.1.0",
"description": "This library enables users to send SMSs to zambian numbers accross all networks via notify",

@@ -5,0 +5,0 @@ "main": "./build/index",

@@ -9,3 +9,3 @@ import axios from 'axios';

args: { reciepientType: string; channel?: string; contactGroup?: string, senderId?: string; message: string; contacts?: string[] },
configs: { URL: string; ACCESS_TOKEN: string }
configs: { URL: string; ACCESS_TOKEN: string, useSenderIdName?: boolean }
) => Promise<{

@@ -29,3 +29,3 @@ success: boolean;

{ reciepientType, channel, contactGroup, senderId, message, contacts },
{ URL, ACCESS_TOKEN }
{ URL, ACCESS_TOKEN, useSenderIdName }
) => {

@@ -50,2 +50,6 @@ try {

if(useSenderIdName){
URL = URL + `&useSenderIdName=yes`;
}
let axiosResponse = await axios({

@@ -52,0 +56,0 @@ method: 'POST',

@@ -97,3 +97,3 @@ import axios from 'axios';

public async SEND_SMS_TO_CONTACT_GROUP({contactGroup, senderId, message}: { contactGroup?: string, senderId: string, message: string}) {
public async SEND_SMS_TO_CONTACT_GROUP({contactGroup, senderId, message}: { contactGroup?: string, senderId: string, message: string}, options?: { useSenderIdName?: boolean }) {
if(!this.accessToken) throw "Access token not set";

@@ -105,3 +105,3 @@ return sendSMS({

message
}, { URL: SEND_SMS_API, ACCESS_TOKEN: this.accessToken });
}, { URL: SEND_SMS_API, ACCESS_TOKEN: this.accessToken, ...options });
}

@@ -108,0 +108,0 @@

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

Sorry, the diff of this file is not supported yet