Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nexmo

Package Overview
Dependencies
Maintainers
5
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nexmo - npm Package Compare versions

Comparing version 2.3.0 to 2.3.1

.nyc_output/23514d8761df44962cf7aad9f90bdbc3.json

212

lib/Conversations.js
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
value: true
});

@@ -9,7 +9,7 @@

var _index = require("./index");
var _index = require('./index');
var _index2 = _interopRequireDefault(_index);
var _Members = require("./Members");
var _Members = require('./Members');

@@ -26,131 +26,131 @@ var _Members2 = _interopRequireDefault(_Members);

var Conversations = function () {
_createClass(Conversations, null, [{
key: "PATH",
get: function get() {
return "/beta/conversations";
}
_createClass(Conversations, null, [{
key: 'PATH',
get: function get() {
return '/beta/conversations';
}
/**
* @param {Credentials} credentials
* credentials to be used when interacting with the API.
* @param {Object} options
* Additional Conversations options.
*/
/**
* @param {Credentials} credentials
* credentials to be used when interacting with the API.
* @param {Object} options
* Additional Conversations options.
*/
}]);
}]);
function Conversations(credentials) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
function Conversations(credentials) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
_classCallCheck(this, Conversations);
_classCallCheck(this, Conversations);
this.creds = credentials;
this.options = options;
this.creds = credentials;
this.options = options;
/**
* @type Members
*/
this.members = new _Members2.default(this.creds, this.options);
// Used to facilitate testing of the call to the underlying object
this._nexmo = this.options.nexmoOverride || _index2.default;
}
/**
* @type Members
* Create a new conversation.
*
* @param {Object} params - Parameters used when creating the conversation. See https://ea.developer.nexmo.com/api/conversation#create-a-conversation for more information.
* @param {function} callback - function to be called when the request completes.
*/
this.members = new _Members2.default(this.creds, this.options);
// Used to facilitate testing of the call to the underlying object
this._nexmo = this.options.nexmoOverride || _index2.default;
}
/**
* Create a new conversation.
*
* @param {Object} params - Parameters used when creating the conversation. See https://ea.developer.nexmo.com/api/conversation#create-a-conversation for more information.
* @param {function} callback - function to be called when the request completes.
*/
_createClass(Conversations, [{
key: 'create',
value: function create(params, callback) {
params = JSON.stringify(params);
var config = {
host: 'api.nexmo.com',
path: Conversations.PATH,
method: 'POST',
body: params,
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + this.creds.generateJwt()
}
};
this.options.httpClient.request(config, callback);
}
_createClass(Conversations, [{
key: "create",
value: function create(params, callback) {
params = JSON.stringify(params);
/**
* Get an existing conversation.
*
* @param {string|object} query - The unique identifier for the conversation to retrieve
* or a set of filter parameters for the query. For more information
* see https://ea.developer.nexmo.com/api/conversation#retrieve-a-conversation
* @param {function} callback - function to be called when the request completes.
*/
var config = {
host: "api.nexmo.com",
path: Conversations.PATH,
method: "POST",
body: params,
headers: {
"Content-Type": "application/json",
Authorization: "Bearer " + this.creds.generateJwt()
}, {
key: 'get',
value: function get(query, callback) {
this._nexmo.getWithQuery(Conversations.PATH, query, this.creds, this.options, callback);
}
};
this.options.httpClient.request(config, callback);
}
/**
* Get an existing conversation.
*
* @param {string|object} query - The unique identifier for the conversation to retrieve
* or a set of filter parameters for the query. For more information
* see https://ea.developer.nexmo.com/api/conversation#retrieve-a-conversation
* @param {function} callback - function to be called when the request completes.
*/
/**
* Update an existing conversation.
*
* @param {string} [conversationId] - The unique identifier for the conversation to update.
* @param {Object} params - Parameters used when updating the conversation.
* @param {function} callback - function to be called when the request completes.
*/
}, {
key: "get",
value: function get(query, callback) {
this._nexmo.getWithQuery(Conversations.PATH, query, this.creds, this.options, callback);
}
}, {
key: 'update',
value: function update(conversationId, params, callback) {
params = JSON.stringify(params);
/**
* Update an existing conversation.
*
* @param {string} [conversationId] - The unique identifier for the conversation to update.
* @param {Object} params - Parameters used when updating the conversation.
* @param {function} callback - function to be called when the request completes.
*/
var config = {
host: 'api.nexmo.com',
path: Conversations.PATH + '/' + conversationId,
method: 'PUT',
body: params,
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + this.creds.generateJwt()
}
};
}, {
key: "update",
value: function update(conversationId, params, callback) {
params = JSON.stringify(params);
var config = {
host: "api.nexmo.com",
path: Conversations.PATH + "/" + conversationId,
method: "PUT",
body: params,
headers: {
"Content-Type": "application/json",
Authorization: "Bearer " + this.creds.generateJwt()
this.options.httpClient.request(config, callback);
}
};
this.options.httpClient.request(config, callback);
}
/**
* Deleta an existing conversation.
*
* @param {string} [conversationId] - The unique identifier for the conversation to delete.
* @param {function} callback - function to be called when the request completes.
*/
/**
* Deleta an existing conversation.
*
* @param {string} [conversationId] - The unique identifier for the conversation to delete.
* @param {function} callback - function to be called when the request completes.
*/
}, {
key: 'delete',
value: function _delete(conversationId, callback) {
var config = {
host: 'api.nexmo.com',
path: Conversations.PATH + '/' + conversationId,
method: 'DELETE',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + this.creds.generateJwt()
}
};
}, {
key: "delete",
value: function _delete(conversationId, callback) {
var config = {
host: "api.nexmo.com",
path: Conversations.PATH + "/" + conversationId,
method: "DELETE",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer " + this.creds.generateJwt()
this.options.httpClient.request(config, callback);
}
};
}]);
this.options.httpClient.request(config, callback);
}
}]);
return Conversations;
return Conversations;
}();
exports.default = Conversations;
module.exports = exports["default"];
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9Db252ZXJzYXRpb25zLmpzIl0sIm5hbWVzIjpbIkNvbnZlcnNhdGlvbnMiLCJjcmVkZW50aWFscyIsIm9wdGlvbnMiLCJjcmVkcyIsIm1lbWJlcnMiLCJfbmV4bW8iLCJuZXhtb092ZXJyaWRlIiwicGFyYW1zIiwiY2FsbGJhY2siLCJKU09OIiwic3RyaW5naWZ5IiwiY29uZmlnIiwiaG9zdCIsInBhdGgiLCJQQVRIIiwibWV0aG9kIiwiYm9keSIsImhlYWRlcnMiLCJBdXRob3Jp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AsXG4gICAgICAgICAgICBtZXRob2Q6ICdQVVQnLFxuICAgICAgICAgICAgYm9keTogcGFyYW1zLFxuICAgICAgICAgICAgaGVhZGVyczoge1xuICAgICAgICAgICAgICAgICdDb250ZW50LVR5cGUnOiAnYXBwbGljYXRpb24vanNvbicsXG4gICAgICAgICAgICAgICAgJ0F1dGhvcml6YXRpb24nOiBgQmVhcmVyICR7dGhpcy5jcmVkcy5nZW5lcmF0ZUp3dCgpfWBcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAgICAgICB0aGlzLm9wdGlvbnMuaHR0cENsaWVudC5yZXF1ZXN0KGNvbmZpZywgY2FsbGJhY2spO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIERlbGV0YSBhbiBleGlzdGluZyBjb252ZXJzYXRpb24uXG4gICAgICpcbiAgICAgKiBAcGFyYW0ge3N0cmluZ30gW2NvbnZlcnNhdGlvbklkXSAtIFRoZSB1bmlxdWUgaWRlbnRpZmllciBmb3IgdGhlIGNvbnZlcnNhdGlvbiB0byBkZWxldGUuXG4gICAgICogQHBhcmFtIHtmdW5jdGlvbn0gY2FsbGJhY2sgLSBmdW5jdGlvbiB0byBiZSBjYWxsZWQgd2hlbiB0aGUgcmVxdWVzdCBjb21wbGV0ZXMuXG4gICAgICovXG4gICAgZGVsZXRlKGNvbnZlcnNhdGlvbklkLCBjYWxsYmFjaykge1xuICAgICAgICB2YXIgY29uZmlnID0ge1xuICAgICAgICAgICAgaG9zdDogJ2FwaS5uZXhtby5jb20nLFxuICAgICAgICAgICAgcGF0aDogYCR7Q29udmVyc2F0aW9ucy5QQVRIfS8ke2NvbnZlcnNhdGlvbklkfWAsXG4gICAgICAgICAgICBtZXRob2Q6ICdERUxFVEUnLFxuICAgICAgICAgICAgaGVhZGVyczoge1xuICAgICAgICAgICAgICAgICdDb250ZW50LVR5cGUnOiAnYXBwbGljYXRpb24vanNvbicsXG4gICAgICAgICAgICAgICAgJ0F1dGhvcml6YXRpb24nOiBgQmVhcmVyICR7dGhpcy5jcmVkcy5nZW5lcmF0ZUp3dCgpfWBcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAgICAgICB0aGlzLm9wdGlvbnMuaHR0cENsaWVudC5yZXF1ZXN0KGNvbmZpZywgY2FsbGJhY2spO1xuICAgIH1cblxufVxuXG5leHBvcnQgZGVmYXVsdCBDb252ZXJzYXRpb25zO1xuIl19

@@ -114,5 +114,7 @@ "use strict";

response.on("close", function (e) {
_this.logger.error("problem with API request detailed stacktrace below ");
_this.logger.error(e);
callback(e);
if (e) {
_this.logger.error("problem with API request detailed stacktrace below ");
_this.logger.error(e);
callback(e);
}
});

@@ -347,2 +349,2 @@ });

module.exports = exports["default"];
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9IdHRwQ2xpZW50LmpzIl0sIm5hbWVzIjpbImh0dHBzIiwicmVxdWlyZSIsImh0dHAiLCJyZXF1ZXN0IiwicXVlcnlzdHJpbmciLCJIdHRwQ2xpZW50Iiwib3B0aW9ucyIsImNyZWRlbnRpYWxzIiwiaG9zdCIsInBvcnQiLCJoZWFkZXJzIiwiQWNjZXB0IiwibG9nZ2VyIiwidGltZW91dCIsInJlcXVlc3RMaWIiLCJ1c2VyQWdlbnQiLCJlbmRwb2ludCIsIm1ldGhvZCIsImNhbGxiYWNrIiwic2tpcEpzb25QYXJzaW5nIiwicGF0aCIsIk9iamVjdCIsImFzc2lnbiIsInVuZGVmaW5lZCIsImtleXMiLCJmb3JFYWNoIiwia2V5IiwiaW5mbyIsImJvZHkiLCJlbmQiLCJyZXNwb25zZURhdGEiLCJvbiIsImlzQmluYXJ5IiwicmVzcG9uc2UiLCJzZXRFbmNvZGluZyIsInB1c2giLCJjaHVuayIsInN0YXR1c0NvZGUiLCJCdWZmZXIiLCJjb25jYXQiLCJfX3BhcnNlUmVzcG9uc2UiLCJlcnJvciIsImUiLCJodHRwUmVzcG9uc2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2RpbmcoXCJ1dGY4XCIpO1xuICAgICAgfVxuXG4gICAgICByZXNwb25zZS5vbihcImRhdGFcIiwgY2h1bmsgPT4ge1xuICAgICAgICByZXNwb25zZURhdGEucHVzaChjaHVuayk7XG4gICAgICB9KTtcblxuICAgICAgcmVzcG9uc2Uub24oXCJlbmRcIiwgKCkgPT4ge1xuICAgICAgICB0aGlzLmxvZ2dlci5pbmZvKFwicmVzcG9uc2UgZW5kZWQ6XCIsIHJlc3BvbnNlLnN0YXR1c0NvZGUpO1xuICAgICAgICBpZiAoY2FsbGJhY2spIHtcbiAgICAgICAgICBpZiAoaXNCaW5hcnkpIHtcbiAgICAgICAgICAgIHJlc3BvbnNlRGF0YSA9IEJ1ZmZlci5jb25jYXQocmVzcG9uc2VEYXRhKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICB0aGlzLl9fcGFyc2VSZXNwb25zZShcbiAgICAgICAgICAgIHJlc3BvbnNlLFxuICAgICAgICAgICAgcmVzcG9uc2VEYXRhLFxuICAgICAgICAgICAgZW5kcG9pbnQubWV0aG9kLFxuICAgICAgICAgICAgY2FsbGJhY2ssXG4gICAgICAgICAgICBza2lwSnNvblBhcnNpbmdcbiAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJlc3BvbnNlLm9uKFwiY2xvc2VcIiwgZSA9PiB7XG4gICAgICAgIGlmIChlKSB7XG4gICAgICAgICAgdGhpcy5sb2dnZXIuZXJyb3IoXG4gICAgICAgICAgICBcInByb2JsZW0gd2l0aCBBUEkgcmVxdWVzdCBkZXRhaWxlZCBzdGFja3RyYWNlIGJlbG93IFwiXG4gICAgICAgICAgKTtcbiAgICAgICAgICB0aGlzLmxvZ2dlci5lcnJvcihlKTtcbiAgICAgICAgICBjYWxsYmFjayhlKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfSk7XG4gICAgcmVxdWVzdC5vbihcImVycm9yXCIsIGUgPT4ge1xuICAgICAgdGhpcy5sb2dnZ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gsIHBhcmFtcywgY2FsbGJhY2ssIHVzZUp3dCkge1xuICAgIHBhcmFtcyA9IHBhcmFtcyB8fCB7fTtcbiAgICBpZiAoIXVzZUp3dCkge1xuICAgICAgcGFyYW1zW1wiYXBpX2tleVwiXSA9IHRoaXMuY3JlZGVudGlhbHMuYXBpS2V5O1xuICAgICAgcGFyYW1zW1wiYXBpX3NlY3JldFwiXSA9IHRoaXMuY3JlZGVudGlhbHMuYXBpU2VjcmV0O1xuICAgIH1cblxuICAgIHBhdGggPSBwYXRoICsgXCI/XCIgKyBxdWVyeXN0cmluZy5zdHJpbmdpZnkocGFyYW1zKTtcblxuICAgIHRoaXMucmVxdWVzdCh7IHBhdGg6IHBhdGggfSwgXCJQT1NUXCIsIGNhbGxiYWNrKTtcbiAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBIdHRwQ2xpZW50O1xuIl19

@@ -1,5 +0,5 @@

"use strict";
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
value: true
});

@@ -9,3 +9,3 @@

var _index = require("./index");
var _index = require('./index');

@@ -22,79 +22,80 @@ var _index2 = _interopRequireDefault(_index);

var Members = function () {
_createClass(Members, null, [{
key: "PATH",
_createClass(Members, null, [{
key: 'PATH',
/**
* The path to the `members` resource.
*/
get: function get() {
return "/beta/conversations/{conversation_uuid}/members";
}
/**
* Creates a new Members.
*
* @param {Credentials} creds - Credentials used when interacting with the Nexmo API.
* @param {Object} options - additional options for the class.
*/
/**
* The path to the `members` resource.
*/
get: function get() {
return '/beta/conversations/{conversation_uuid}/members';
}
}]);
/**
* Creates a new Members.
*
* @param {Credentials} creds - Credentials used when interacting with the Nexmo API.
* @param {Object} options - additional options for the class.
*/
function Members(creds, options) {
_classCallCheck(this, Members);
}]);
this.creds = creds;
this.options = options;
function Members(creds, options) {
_classCallCheck(this, Members);
this._nexmo = this.options.nexmoOverride || _index2.default;
}
this.creds = creds;
this.options = options;
/**
* Adds a member to a conversation.
*
* @param {string} [conversationId] - The unique identifier for the conversation
* @param {Object} params - Parameters used when adding a member to the conversation. See https://ea.developer.nexmo.com/api/conversation#add-a-user-to-a-conversation for more information.
* @param {function} callback - function to be called when the request completes.
*/
_createClass(Members, [{
key: "add",
value: function add(conversationId, params, callback) {
params = JSON.stringify(params);
var config = {
host: "api.nexmo.com",
path: Members.PATH.replace("{conversation_uuid}", conversationId),
method: "POST",
body: params,
headers: {
"Content-Type": "application/json",
Authorization: "Bearer " + this.creds.generateJwt()
}
};
this.options.httpClient.request(config, callback);
this._nexmo = this.options.nexmoOverride || _index2.default;
}
/**
* Get an existing member.
* Adds a member to a conversation.
*
* @param {string} [conversationId] - The unique identifier for the conversation
* @param {string|object} query - The unique identifier for the member to retrieve
* or a set of filter parameters for the query. For more information
* see https://ea.developer.nexmo.com/api/conversation#retrieve-members-of-a-conversation
* @param {Object} params - Parameters used when adding a member to the conversation. See https://ea.developer.nexmo.com/api/conversation#add-a-user-to-a-conversation for more information.
* @param {function} callback - function to be called when the request completes.
*/
}, {
key: "get",
value: function get(conversationId, query, callback) {
this._nexmo.getWithQuery(Members.PATH.replace("{conversation_uuid}", conversationId), query, this.creds, this.options, callback);
}
}]);
return Members;
_createClass(Members, [{
key: 'add',
value: function add(conversationId, params, callback) {
params = JSON.stringify(params);
var config = {
host: 'api.nexmo.com',
path: Members.PATH.replace('{conversation_uuid}', conversationId),
method: 'POST',
body: params,
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + this.creds.generateJwt()
}
};
this.options.httpClient.request(config, callback);
}
/**
* Get an existing member.
*
* @param {string} [conversationId] - The unique identifier for the conversation
* @param {string|object} query - The unique identifier for the member to retrieve
* or a set of filter parameters for the query. For more information
* see https://ea.developer.nexmo.com/api/conversation#retrieve-members-of-a-conversation
* @param {function} callback - function to be called when the request completes.
*/
}, {
key: 'get',
value: function get(conversationId, query, callback) {
this._nexmo.getWithQuery(Members.PATH.replace('{conversation_uuid}', conversationId), query, this.creds, this.options, callback);
}
}]);
return Members;
}();
exports.default = Members;
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ci5uZXhtby5jb20vYXBpL2NvbnZlcnNhdGlvbiNhZGQtYS11c2VyLXRvLWEtY29udmVyc2F0aW9uIGZvciBtb3JlIGluZm9ybWF0aW9uLlxuICAgICAqIEBwYXJhbSB7ZnVuY3Rpb259IGNhbGxiYWNrIC0gZnVuY3Rpb24gdG8gYmUgY2FsbGVkIHdoZW4gdGhlIHJlcXVlc3QgY29tcGxldGVzLlxuICAgICAqL1xuICAgIGFkZChjb252ZXJzYXRpb25JZCwgcGFyYW1zLCBjYWxsYmFjaykge1xuICAgICAgICBwYXJhbXMgPSBKU09OLnN0cmluZ2lmeShwYXJhbXMpO1xuXG4gICAgICAgIHZhciBjb25maWcgPSB7XG4gICAgICAgICAgICBob3N0OiAnYXBpLm5leG1vLmNvbScsXG4gICAgICAgICAgICBwYXRoOiBNZW1iZXJzLlBBVEgucmVwbGFjZSgne2NvbnZlcnNhdGlvbl91dWlkfScsIGNvbnZlcnNhdGlvbklkKSxcbiAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnLFxuICAgICAgICAgICAgYm9keTogcGFyYW1zLFxuICAgICAgICAgICAgaGVhZGVyczoge1xuICAgICAgICAgICAgICAgICdDb250ZW50LVR5cGUnOiAnYXBwbGljYXRpb24vanNvbicsXG4gICAgICAgICAgICAgICAgJ0F1dGhvcml6YXRpb24nOiBgQmVhcmVyICR7dGhpcy5jcmVkcy5nZW5lcmF0ZUp3dCgpfWBcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgICAgdGhpcy5vcHRpb25zLmh0dHBDbGllbnQucmVxdWVzdChjb25maWcsIGNhbGxiYWNrKTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBHZXQgYW4gZXhpc3RpbmcgbWVtYmVyLlxuICAgICAqXG4gICAgICogQHBhcmFtIHtzdHJpbmd9IFtjb252ZXJzYXRpb25JZF0gLSBUaGUgdW5pcXVlIGlkZW50aWZpZXIgZm9yIHRoZSBjb252ZXJzYXRpb25cbiAgICAgKiBAcGFyYW0ge3N0cmluZ3xvYmplY3R9IHF1ZXJ5IC0gVGhlIHVuaXF1ZSBpZGVudGlmaWVyIGZvciB0aGUgbWVtYmVyIHRvIHJldHJpZXZlXG4gICAgICogICAgICAgICAgICAgICBvciBhIHNldCBvZiBmaWx0ZXIgcGFyYW1ldGVycyBmb3IgdGhlIHF1ZXJ5LiBGb3IgbW9yZSBpbmZvcm1hdGlvblxuICAgICAqICAgICAgICAgICAgICAgc2VlIGh0dHBzOi8vZWEuZGV2ZWxvcGVyLm5leG1vLmNvbS9hcGkvY29udmVyc2F0aW9uI3JldHJpZXZlLW1lbWJlcnMtb2YtYS1jb252ZXJzYXRpb25cbiAgICAgKiBAcGFyYW0ge2Z1bmN0aW9ufSBjYWxsYmFjayAtIGZ1bmN0aW9uIHRvIGJlIGNhbGxlZCB3aGVuIHRoZSByZXF1ZXN0IGNvbXBsZXRlcy5cbiAgICAgKi9cbiAgICBnZXQoY29udmVyc2F0aW9uSWQsIHF1ZXJ5LCBjYWxsYmFjaykge1xuICAgICAgICB0aGlzLl9uZXhtby5nZXRXaXRoUXVlcnkoTWVtYmVycy5QQVRILnJlcGxhY2UoJ3tjb252ZXJzYXRpb25fdXVpZH0nLCBjb252ZXJzYXRpb25JZCksIHF1ZXJ5LCB0aGlzLmNyZWRzLCB0aGlzLm9wdGlvbnMsIGNhbGxiYWNrKTtcbiAgICB9XG5cbn1cblxuZXhwb3J0IGRlZmF1bHQgTWVtYmVycztcbiJdfQ==
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
value: true
});

@@ -9,3 +9,3 @@

var _index = require("./index");
var _index = require('./index');

@@ -22,139 +22,139 @@ var _index2 = _interopRequireDefault(_index);

var Users = function () {
_createClass(Users, null, [{
key: "PATH",
get: function get() {
return "/beta/users";
}
_createClass(Users, null, [{
key: 'PATH',
get: function get() {
return '/beta/users';
}
/**
* @param {Credentials} credentials
* credentials to be used when interacting with the API.
* @param {Object} options
* Additional Users options.
*/
/**
* @param {Credentials} credentials
* credentials to be used when interacting with the API.
* @param {Object} options
* Additional Users options.
*/
}]);
}]);
function Users(credentials) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
function Users(credentials) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
_classCallCheck(this, Users);
_classCallCheck(this, Users);
this.creds = credentials;
this.options = options;
this.creds = credentials;
this.options = options;
// Used to facilitate testing of the call to the underlying object
this._nexmo = this.options.nexmoOverride || _index2.default;
}
/**
* Create a new user.
*
* @param {Object} params - Parameters used when creating the user. See https://ea.developer.nexmo.com/api/conversation#create-a-user for more information.
* @param {function} callback - function to be called when the request completes.
*/
_createClass(Users, [{
key: "create",
value: function create(params, callback) {
params = JSON.stringify(params);
var config = {
host: "api.nexmo.com",
path: Users.PATH,
method: "POST",
body: params,
headers: {
"Content-Type": "application/json",
Authorization: "Bearer " + this.creds.generateJwt()
}
};
this.options.httpClient.request(config, callback);
// Used to facilitate testing of the call to the underlying object
this._nexmo = this.options.nexmoOverride || _index2.default;
}
/**
* Get an existing user.
* Create a new user.
*
* @param {string|object} query - The unique identifier for the user to retrieve
* or a set of filter parameters for the query. For more information
* see https://ea.developer.nexmo.com/api/conversation#retrieve-all-users
* @param {Object} params - Parameters used when creating the user. See https://ea.developer.nexmo.com/api/conversation#create-a-user for more information.
* @param {function} callback - function to be called when the request completes.
*/
}, {
key: "get",
value: function get(query, callback) {
this._nexmo.getWithQuery(Users.PATH, query, this.creds, this.options, callback);
}
/**
* Get an conversations for an existing user.
*
* @param {string} [userId] - The unique identifier for the user to retrieve conversations for
* @param {function} callback - function to be called when the request completes.
*/
_createClass(Users, [{
key: 'create',
value: function create(params, callback) {
params = JSON.stringify(params);
}, {
key: "getConversations",
value: function getConversations(userId, callback) {
this._nexmo.getWithQuery(Users.PATH + "/" + userId + "/conversations", {}, this.creds, this.options, callback);
}
var config = {
host: 'api.nexmo.com',
path: Users.PATH,
method: 'POST',
body: params,
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + this.creds.generateJwt()
}
};
this.options.httpClient.request(config, callback);
}
/**
* Update an existing user.
*
* @param {string} [userId] - The unique identifier for the user to update.
* @param {Object} params - Parameters used when updating the conversation.
* @param {function} callback - function to be called when the request completes.
*/
/**
* Get an existing user.
*
* @param {string|object} query - The unique identifier for the user to retrieve
* or a set of filter parameters for the query. For more information
* see https://ea.developer.nexmo.com/api/conversation#retrieve-all-users
* @param {function} callback - function to be called when the request completes.
*/
}, {
key: "update",
value: function update(userId, params, callback) {
params = JSON.stringify(params);
}, {
key: 'get',
value: function get(query, callback) {
this._nexmo.getWithQuery(Users.PATH, query, this.creds, this.options, callback);
}
var config = {
host: "api.nexmo.com",
path: Users.PATH + "/" + userId,
method: "PUT",
body: params,
headers: {
"Content-Type": "application/json",
Authorization: "Bearer " + this.creds.generateJwt()
/**
* Get an conversations for an existing user.
*
* @param {string} [userId] - The unique identifier for the user to retrieve conversations for
* @param {function} callback - function to be called when the request completes.
*/
}, {
key: 'getConversations',
value: function getConversations(userId, callback) {
this._nexmo.getWithQuery(Users.PATH + '/' + userId + '/conversations', {}, this.creds, this.options, callback);
}
};
this.options.httpClient.request(config, callback);
}
/**
* Update an existing user.
*
* @param {string} [userId] - The unique identifier for the user to update.
* @param {Object} params - Parameters used when updating the conversation.
* @param {function} callback - function to be called when the request completes.
*/
/**
* Deleta an existing user.
*
* @param {string} [userId] - The unique identifier for the user to delete.
* @param {function} callback - function to be called when the request completes.
*/
}, {
key: 'update',
value: function update(userId, params, callback) {
params = JSON.stringify(params);
}, {
key: "delete",
value: function _delete(userId, callback) {
var config = {
host: "api.nexmo.com",
path: Users.PATH + "/" + userId,
method: "DELETE",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer " + this.creds.generateJwt()
var config = {
host: 'api.nexmo.com',
path: Users.PATH + '/' + userId,
method: 'PUT',
body: params,
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + this.creds.generateJwt()
}
};
this.options.httpClient.request(config, callback);
}
};
this.options.httpClient.request(config, callback);
}
}]);
/**
* Deleta an existing user.
*
* @param {string} [userId] - The unique identifier for the user to delete.
* @param {function} callback - function to be called when the request completes.
*/
return Users;
}, {
key: 'delete',
value: function _delete(userId, callback) {
var config = {
host: 'api.nexmo.com',
path: Users.PATH + '/' + userId,
method: 'DELETE',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + this.creds.generateJwt()
}
};
this.options.httpClient.request(config, callback);
}
}]);
return Users;
}();
exports.default = Users;
module.exports = exports["default"];
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9Vc2Vycy5qcyJdLCJuYW1lcyI6WyJVc2VycyIsImNyZWRlbnRpYWxzIiwib3B0aW9ucyIsImNyZWRzIiwiX25leG1vIiwibmV4bW9PdmVycmlkZSIsInBhcmFtcyIsImNhbGxiYWNrIiwiSlNPTiIsInN0cmluZ2lmeSIsImNvbmZpZyIsImhvc3QiLCJwYXRoIiwiUEFUSCIsIm1ldGhvZCIsImJvZHkiLCJoZWFkZXJzIiwiQXV0aG9yaXphdGlvbiIsImdlbmVyYXRlSnd0IiwiaHR0cENsaWVudCIsInJlcXVlc3QiLCJxdWVyeSIsImdldFdpdGhRdWVyeSIsInVzZXJJZCJdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7O0FBRUE7Ozs7Ozs7O0FBRUE7OztJQUdNQSxLOzs7d0JBQ2M7QUFDaEIsYUFBTyxhQUFQO0FBQ0Q7O0FBRUQ7Ozs7Ozs7OztBQU1BLGlCQUFZQyxXQUFaLEVBQXVDO0FBQUEsUUFBZEMsT0FBYyx1RUFBSixFQUFJOztBQUFBOztBQUNyQyxTQUFLQyxLQUFMLEdBQWFGLFdBQWI7QUFDQSxTQUFLQyxPQUFMLEdBQWVBLE9BQWY7O0FBRUE7QUFDQSxTQUFLRSxNQUFMLEdBQWMsS0FBS0YsT0FBTCxDQUFhRyxhQUFiLG1CQ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AgICAgICAgIGhvc3Q6ICdhcGkubmV4bW8uY29tJyxcbiAgICAgICAgICAgIHBhdGg6IGAke1VzZXJzLlBBVEh9LyR7dXNlcklkfWAsXG4gICAgICAgICAgICBtZXRob2Q6ICdQVVQnLFxuICAgICAgICAgICAgYm9keTogcGFyYW1zLFxuICAgICAgICAgICAgaGVhZGVyczoge1xuICAgICAgICAgICAgICAgICdDb250ZW50LVR5cGUnOiAnYXBwbGljYXRpb24vanNvbicsXG4gICAgICAgICAgICAgICAgJ0F1dGhvcml6YXRpb24nOiBgQmVhcmVyICR7dGhpcy5jcmVkcy5nZW5lcmF0ZUp3dCgpfWBcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAgICAgICB0aGlzLm9wdGlvbnMuaHR0cENsaWVudC5yZXF1ZXN0KGNvbmZpZywgY2FsbGJhY2spO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIERlbGV0YSBhbiBleGlzdGluZyB1c2VyLlxuICAgICAqXG4gICAgICogQHBhcmFtIHtzdHJpbmd9IFt1c2VySWRdIC0gVGhlIHVuaXF1ZSBpZGVudGlmaWVyIGZvciB0aGUgdXNlciB0byBkZWxldGUuXG4gICAgICogQHBhcmFtIHtmdW5jdGlvbn0gY2FsbGJhY2sgLSBmdW5jdGlvbiB0byBiZSBjYWxsZWQgd2hlbiB0aGUgcmVxdWVzdCBjb21wbGV0ZXMuXG4gICAgICovXG4gICAgZGVsZXRlKHVzZXJJZCwgY2FsbGJhY2spIHtcbiAgICAgICAgdmFyIGNvbmZpZyA9IHtcbiAgICAgICAgICAgIGhvc3Q6ICdhcGkubmV4bW8uY29tJyxcbiAgICAgICAgICAgIHBhdGg6IGAke1VzZXJzLlBBVEh9LyR7dXNlcklkfWAsXG4gICAgICAgICAgICBtZXRob2Q6ICdERUxFVEUnLFxuICAgICAgICAgICAgaGVhZGVyczoge1xuICAgICAgICAgICAgICAgICdDb250ZW50LVR5cGUnOiAnYXBwbGljYXRpb24vanNvbicsXG4gICAgICAgICAgICAgICAgJ0F1dGhvcml6YXRpb24nOiBgQmVhcmVyICR7dGhpcy5jcmVkcy5nZW5lcmF0ZUp3dCgpfWBcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAgICAgICB0aGlzLm9wdGlvbnMuaHR0cENsaWVudC5yZXF1ZXN0KGNvbmZpZywgY2FsbGJhY2spO1xuICAgIH1cblxufVxuXG5leHBvcnQgZGVmYXVsdCBVc2VycztcbiJdfQ==
{
"name": "nexmo",
"author": "nexmo",
"version": "2.3.0",
"version": "2.3.1",
"main": "lib/Nexmo",

@@ -59,6 +59,6 @@ "keywords": [

"express": "^4.14.0",
"mocha": "^3.2.0",
"mocha": "^5.2.0",
"ngrok": "^2.2.2",
"nodemon": "^1.17.3",
"nyc": "^11.7.1",
"nodemon": "^1.17.5",
"nyc": "^13.0.0",
"prettier": "^1.12.1",

@@ -65,0 +65,0 @@ "sinon": "^1.17.4",

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