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.4.1-beta-1 to 2.4.1

.gitattributes

6

lib/CallsResource.js

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

"Content-Type": "application/json",
"Content-Length": params.length,
"Content-Length": Buffer.byteLength(params),
Authorization: "Bearer " + this.creds.generateJwt()

@@ -161,3 +161,3 @@ }

"Content-Type": "application/json",
"Content-Length": params.length,
"Content-Length": Buffer.byteLength(params),
Authorization: "Bearer " + this.creds.generateJwt()

@@ -175,2 +175,2 @@ }

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

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

"Content-Type": "application/json",
"Content-Length": params.length,
"Content-Length": Buffer.byteLength(params),
Authorization: "Bearer " + this.creds.generateJwt()

@@ -75,2 +75,2 @@ }

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

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

key: "post",
value: function post(path, params, callback, useJwt, headers) {
value: function post(path, params, callback, useJwt) {
var qs = {};

@@ -314,15 +314,3 @@ if (!useJwt) {

headers = headers || {};
if (useJwt) {
headers["Authorization"] = "Bearer " + this.credentials.generateJwt();
}
var encodedParams = void 0;
if (headers["Content-Type"] == "application/json") {
encodedParams = JSON.stringify(params);
} else {
encodedParams = querystring.stringify(params);
}
this.request({ path: path, body: encodedParams, headers: headers }, "POST", callback);
this.request({ path: path, body: querystring.stringify(params) }, "POST", callback);
}

@@ -376,2 +364,2 @@ }, {

module.exports = exports["default"];
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9IdHRwQ2xpZW50LmpzIl0sIm5hbWVzIjpbImh0dHBzIiwicmVxdWlyZSIsImh0dHAiLCJyZXF1ZXN0IiwicXVlcnlzdHJpbmciLCJIdHRwQ2xpZW50Iiwib3B0aW9ucyIsImNyZWRlbnRpYWxzIiwiaG9zdCIsInBvcnQiLCJoZWFkZXJzIiwiQWNjZXB0IiwibG9nZ2VyIiwidGltZW91dCIsInJlcXVlc3RMaWIiLCJ1c2VyQWdlbnQiLCJlbmRwb2ludCIsIm1ldGhvZCIsImNhbGxiYWNrIiwic2tpcEpzb25QYXJzaW5nIiwicGF0aCIsIk9iamVjdCIsImFzc2lnbiIsInVuZGVmaW5lZCIsImtleXMiLCJmb3JFYWNoIiwia2V5IiwiaW5mbyIsImJvZHkiLCJlbmQiLCJyZXNwb25zZURhdGEiLCJvbiIsImlzQmluYXJ5IiwicmVzcG9uc2UiLCJzZXRFbmNvZGluZyIsInB1c2giLCJjaHVuayIsInN0YXR1c0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 -57,10 +57,2 @@ "use strict";

var _Conversations = require("./Conversations");
var _Conversations2 = _interopRequireDefault(_Conversations);
var _Users = require("./Users");
var _Users2 = _interopRequireDefault(_Users);
var _FilesResource = require("./FilesResource");

@@ -82,10 +74,2 @@

var _Channel = require("./Channel");
var _Channel2 = _interopRequireDefault(_Channel);
var _Dispatch = require("./Dispatch");
var _Dispatch2 = _interopRequireDefault(_Dispatch);
var _HttpClient = require("./HttpClient");

@@ -164,4 +148,2 @@

this.calls = new _CallsResource2.default(this.credentials, this.options);
this.conversations = new _Conversations2.default(this.credentials, this.options);
this.users = new _Users2.default(this.credentials, this.options);
this.files = new _FilesResource2.default(this.credentials, this.options);

@@ -171,4 +153,2 @@ this.conversion = new _Conversion2.default(this.credentials, this.options);

this.redact = new _Redact2.default(this.credentials, this.options);
this.channel = new _Channel2.default(this.credentials, this.options);
this.dispatch = new _Dispatch2.default(this.credentials, this.options);

@@ -234,2 +214,2 @@ /**

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

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

"Content-Type": "application/json",
"Content-Length": params.length,
"Content-Length": Buffer.byteLength(params),
Authorization: "Bearer " + this.creds.generateJwt()

@@ -97,2 +97,2 @@ }

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

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

"Content-Type": "application/json",
"Content-Length": params.length,
"Content-Length": Buffer.byteLength(params),
Authorization: "Bearer " + this.creds.generateJwt()

@@ -97,2 +97,2 @@ }

module.exports = exports["default"];
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9UYWxrUmVzb3VyY2UuanMiXSwibmFtZXMiOlsiVGFsa1Jlc291cmNlIiwiY3JlZHMiLCJvcHRpb25zIiwiY2FsbElkIiwicGFyYW1zIiwiY2FsbGJhY2siLCJKU09OIiwic3RyaW5naWZ5IiwiY29uZmlnIiwiaG9zdCIsInBhdGgiLCJQQVRIIiwicmVwbGFjZSIsIm1ldGhvZCIsImJvZHkiLCJoZWFkZXJzIiwibGVuZ3RoIiwiQXV0aG9yaXphdGlvbiIsImdlbmVyYXRlSnd0IiwiaHR0cENsaWVudCIsInJlcXVlc3QiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQTs7O0lBR01BLFk7Ozs7QUFDSjs7O3dCQUdrQjtBQUNoQixhQUFPLDRCQUFQO0FBQ0Q7O0FBRUQ7Ozs7Ozs7OztBQU1BLHdCQUFZQyxLQUFaLEVBQW1CQyxPQUFuQixFQUE0QjtBQUFBOztBQUMxQixTQUFLRCxLQUFMLEdBQWFBLEtBQWI7QUFDQSxTQUFLQyxPQUFMLEdBQW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iLFxuICAgICAgcGF0aDogVGFsa1Jlc291cmNlLlBBVEgucmVwbGFjZShcIntjYWxsX3V1aWR9XCIsIGNhbGxJZCksXG4gICAgICBtZXRob2Q6IFwiREVMRVRFXCIsXG4gICAgICBoZWFkZXJzOiB7XG4gICAgICAgIFwiQ29udGVudC1UeXBlXCI6IFwiYXBwbGljYXRpb24vanNvblwiLFxuICAgICAgICBBdXRob3JpemF0aW9uOiBgQmVhcmVyICR7dGhpcy5jcmVkcy5nZW5lcmF0ZUp3dCgpfWBcbiAgICAgIH1cbiAgICB9O1xuICAgIHRoaXMub3B0aW9ucy5odHRwQ2xpZW50LnJlcXVlc3QoY29uZmlnLCBjYWxsYmFjayk7XG4gIH1cbn1cblxuZXhwb3J0IGRlZmF1bHQgVGFsa1Jlc291cmNlO1xuIl19
The MIT License (MIT)
Copyright (c) 2016 Nexmo Inc
Copyright (c) 2018 Nexmo Inc

@@ -6,0 +6,0 @@ Permission is hereby granted, free of charge, to any person

{
"name": "nexmo",
"author": "nexmo",
"version": "2.4.1-beta-1",
"version": "2.4.1",
"main": "lib/Nexmo",

@@ -28,4 +28,3 @@ "keywords": [

"ecwyne",
"https://github.com/backhand",
"alexlakatos"
"https://github.com/backhand"
],

@@ -42,4 +41,3 @@ "scripts": {

"prepublish": "npm run compile",
"pretest": "npm run lint",
"test-e2e": "npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./e2e/*.spec.js"
"pretest": "npm run lint"
},

@@ -53,17 +51,17 @@ "devDependencies": {

"babel-register": "^6.7.2",
"bluebird": "^3.4.6",
"body-parser": "^1.15.2",
"bluebird": "^3.5.3",
"body-parser": "^1.18.3",
"chai": "^3.5.0",
"cross-env": "^5.1.1",
"cross-env": "^5.2.0",
"dotenv": "^2.0.0",
"eslint": "^3.18",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-prettier": "^2.3.1",
"eslint-config-prettier": "^2.10.0",
"eslint-plugin-prettier": "^2.7.0",
"expect.js": "^0.3.1",
"express": "^4.14.0",
"express": "^4.16.4",
"mocha": "^5.2.0",
"ngrok": "^2.2.2",
"nodemon": "^1.17.5",
"nyc": "^13.0.0",
"prettier": "^1.12.1",
"nodemon": "^1.18.9",
"nyc": "^13.1.0",
"prettier": "^1.16.3",
"sinon": "^1.17.4",

@@ -74,4 +72,4 @@ "sinon-chai": "^2.8.0",

"dependencies": {
"jsonwebtoken": "^8.2.1",
"request": "^2.83.0",
"jsonwebtoken": "^8.4.0",
"request": "^2.88.0",
"uuid": "^2.0.2"

@@ -78,0 +76,0 @@ },

@@ -1,10 +0,12 @@

# Nexmo Client Library for Node.js [![build status](https://secure.travis-ci.org/Nexmo/nexmo-node.png)](http://travis-ci.org/Nexmo/nexmo-node)
# Nexmo Client Library for Node.js
[![build status](https://secure.travis-ci.org/Nexmo/nexmo-node.png)](http://travis-ci.org/Nexmo/nexmo-node)
[![Known Vulnerabilities](https://snyk.io/test/github/Nexmo/nexmo-node/badge.svg)](https://snyk.io/test/github/Nexmo/nexmo-node)
A Node.JS REST API Wrapper library for [Nexmo](http://nexmo.com/).
A Node.JS REST API Wrapper library for [Nexmo](https://www.nexmo.com/).
For full API documentation refer to [docs.nexmo.com](https://docs.nexmo.com/).
For full API documentation refer to [developer.nexmo.com](https://developer.nexmo.com/).
[![NPM](https://nodei.co/npm/nexmo.png)](https://nodei.co/npm/nexmo/)
[Installation](#installation) | [Constructor](#constructor) | [Messaging](#messaging) | [Voice](#voice) | [Verify](#verify) | [Number Insight](#number-insight) | [Applications](#applications) | [Conversations](#conversations) | [Users](#users) | [Management](#management) | [Redact](#redact) | [JWT (JSON Web Token)](#jwt)
[Installation](#installation) | [Constructor](#constructor) | [Messaging](#messaging) | [Voice](#voice) | [Verify](#verify) | [Number Insight](#number-insight) | [Applications](#applications) | [Management](#management) | [Redact](#redact) | [JWT (JSON Web Token)](#jwt)

@@ -20,5 +22,5 @@ ## Installation

```js
var Nexmo = require('nexmo');
const Nexmo = require('nexmo');
var nexmo = new Nexmo({
const nexmo = new Nexmo({
apiKey: API_KEY,

@@ -31,10 +33,10 @@ apiSecret: API_SECRET,

* `apiKey` - API Key from Nexmo
* `apiSecret` - API SECRET from Nexmo
* `applicationId` - The Nexmo Application ID to be used when creating JWTs. Required for voice related functionality.
* `apiKey` - API Key from Nexmo.
* `apiSecret` - API SECRET from Nexmo.
* `applicationId` - The Nexmo Application ID to be used when creating JWTs. Required for voice-related functionality.
* `privateKey` - The Private Key to be used when creating JWTs. You can specify the key as any of the following:
* The private key as a string (It must start with `-----BEGIN PRIVATE KEY-----`)
* A [Buffer](https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_string_encoding) containing the file contents. Required for voice related functionality.
* A path to the key file on disk
* `options` - Additional options for the constructor
* The private key as a string (It must start with `-----BEGIN PRIVATE KEY-----`).
* A [Buffer](https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_string_encoding) containing the file contents. Required for voice-related functionality.
* A path to the key file on disk.
* `options` - Additional options for the constructor.

@@ -69,3 +71,3 @@ Options are:

* `opts` - parameter is optional. See [SMS API Reference](https://docs.nexmo.com/messaging/sms-api/api-reference#request)
* `opts` - parameter is optional. See [SMS API Reference](https://developer.nexmo.com/api/sms#send-an-sms)

@@ -97,3 +99,3 @@ ### Send a Binary Message

For detailed information please see the documentation at https://docs.nexmo.com/voice/voice-api
For detailed information please see the documentation at https://developer.nexmo.com/api/voice

@@ -118,3 +120,3 @@ ### Make a call

For more information see https://docs.nexmo.com/voice/voice-api/api-reference#call_create
For more information see https://developer.nexmo.com/api/voice#createCall

@@ -127,3 +129,3 @@ ### Get a Call

For more information see https://docs.nexmo.com/voice/voice-api/api-reference#call_create
For more information see https://developer.nexmo.com/api/voice#getCall

@@ -136,3 +138,3 @@ ### Query Calls

The first parameter can contain many properties to filter the returned call or to page results. For more information see the [Calls API Reference](https://docs.nexmo.com/voice/voice-api/api-reference#calls).
The first parameter can contain many properties to filter the returned call or to page results. For more information see the [Calls API Reference](https://developer.nexmo.com/api/voice#getCalls).

@@ -145,3 +147,3 @@ ### Update a Call

For more information see https://developer.nexmo.com/api/voice#modify-an-existing-call
For more information see https://developer.nexmo.com/api/voice#updateCall

@@ -161,3 +163,3 @@ ### Stream an Audio File to a Call

For more information see https://docs.nexmo.com/voice/voice-api/api-reference#stream_put
For more information see https://developer.nexmo.com/api/voice#startStream

@@ -170,3 +172,3 @@ ### Stop an audio stream in a call

For more information see https://docs.nexmo.com/voice/voice-api/api-reference#stream_delete
For more information see https://developer.nexmo.com/api/voice#stopStream

@@ -186,3 +188,3 @@ ### Play synthesized text in a call

For more information see https://docs.nexmo.com/voice/voice-api/api-reference#talk_put
For more information see https://developer.nexmo.com/api/voice#startTalk

@@ -195,2 +197,4 @@ ### Stop synthesized text in a call

For more information see https://developer.nexmo.com/api/voice#stopTalk
### Send DTMF to a Call

@@ -202,3 +206,3 @@

For more information see https://docs.nexmo.com/voice/voice-api/api-reference#dtmf_put
For more information see https://developer.nexmo.com/api/voice#startDTMF

@@ -208,3 +212,3 @@

For detailed information please see the documentation at https://docs.nexmo.com/voice/voice-api/recordings
For detailed information please see the documentation at https://developer.nexmo.com/voice/voice-api/guides/recording

@@ -231,3 +235,3 @@ ### Get a file (recording)

For more information check the documentation at https://docs.nexmo.com/verify/api-reference/api-reference#vrequest
For more information check the documentation at https://developer.nexmo.com/api/verify#verify-request

@@ -240,3 +244,3 @@ ### Validate the response of a Verification Request

For more information check the documentation at https://docs.nexmo.com/verify/api-reference/api-reference#check
For more information check the documentation at https://developer.nexmo.com/api/verify#verify-check

@@ -249,3 +253,3 @@ ### Search one or more Verification Request

For more information check the documentation at https://docs.nexmo.com/verify/api-reference/api-reference#search
For more information check the documentation at https://developer.nexmo.com/api/verify#verify-search

@@ -258,3 +262,3 @@ ### Cancel verification

For more information check the documentation at https://docs.nexmo.com/verify/api-reference/api-reference#control
For more information check the documentation at https://developer.nexmo.com/api/verify#verify-control

@@ -267,3 +271,3 @@ ### Trigger next verification event

For more information check the documentation at https://docs.nexmo.com/verify/api-reference/api-reference#control
For more information check the documentation at https://developer.nexmo.com/api/verify#verify-control

@@ -278,3 +282,3 @@ ## Number Insight

For more information check the documentation at https://docs.nexmo.com/number-insight/basic
For more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-basic/node

@@ -293,3 +297,3 @@ Example:

For more information check the documentation at https://docs.nexmo.com/number-insight/standard
For more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-standard/node

@@ -305,10 +309,10 @@ Example:

```js
nexmo.numberInsight.get({level: 'advanced', number: NUMBER}, callback);
nexmo.numberInsight.get({level: 'advancedSync', number: NUMBER}, callback);
```
For more information check the documentation at https://docs.nexmo.com/number-insight/advanced
For more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-advanced/node
### Advanced Async
Number Insight Advanced might take a few seconds to return a result, therefore the option exist to process the result asynchronously through a webhook.
Number Insight Advanced might take a few seconds to return a result, therefore the option exists to process the result asynchronously through a webhook.

@@ -319,7 +323,7 @@ ```js

In this case the result of your insight request is posted to the callback URL as a webhook. For more details on webhooks see the [Number Insight Advanced](https://docs.nexmo.com/number-insight/advanced-async) documentation.
In this case, the result of your insight request is posted to the callback URL as a webhook. For more details on webhooks see the [Number Insight Advanced](https://developer.nexmo.com/number-insight/building-blocks/number-insight-advanced-async-callback/node) documentation.
## Applications
For an overview of applications see https://docs.nexmo.com/tools/application-api
For an overview of applications see https://developer.nexmo.com/concepts/guides/applications

@@ -332,3 +336,3 @@ ### Create an App

For more information see https://docs.nexmo.com/tools/application-api/api-reference#create
For more information see https://developer.nexmo.com/api/application#create-an-application

@@ -341,5 +345,5 @@ ### Get a single App

For more information see https://docs.nexmo.com/tools/application-api/api-reference#retrieve
For more information see https://developer.nexmo.com/api/application#retrieve-an-application
### Get Apps by filter
### Get Apps by a filter

@@ -350,3 +354,3 @@ ```js

For more information see https://docs.nexmo.com/tools/application-api/api-reference#list
For more information see https://developer.nexmo.com/api/application#retrieve-your-applications

@@ -359,3 +363,3 @@ ### Update an App

For more information see https://docs.nexmo.com/tools/application-api/api-reference#update
For more information see https://developer.nexmo.com/api/application#update-an-application

@@ -368,122 +372,4 @@ ### Delete an App

For more information see https://docs.nexmo.com/tools/application-api/api-reference#delete
For more information see https://developer.nexmo.com/api/application#destroy-an-application
## Conversations
For an overview of conversations see https://developer.nexmo.com/stitch/overview
### Create a Conversation
```js
nexmo.conversations.create(params, callback);
```
params is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/stitch#createConversation)
### Get a single Conversation
```js
nexmo.conversations.get(conversationId, callback);
```
For more information see https://developer.nexmo.com/api/stitch#retrieveConversation
### Get Conversations by filter
```js
nexmo.conversations.get(options, callback);
```
For more information see https://developer.nexmo.com/api/stitch
### Update a Conversation
```js
nexmo.conversations.update(conversationId, params, callback);
```
params is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/stitch#replaceConversation)
### Delete a Conversation
```js
nexmo.conversations.delete(conversationId, callback);
```
For more information see https://developer.nexmo.com/api/stitch#deleteConversation
### Add a Member to a Conversation
```js
nexmo.conversations.members.add(conversationId, params, callback);
```
params is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/stitch)
### Get a single Member
```js
nexmo.conversations.members.get(conversationId, memberId, callback);
```
For more information see https://developer.nexmo.com/api/stitch#getUser
### Get Members by filter
```js
nexmo.conversations.members.get(conversationId, params, callback);
```
For more information see https://developer.nexmo.com/api/stitch
## Users
### Create a User
```js
nexmo.users.create(params, callback);
```
params is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/stitch#createUse)
### Get a single User
```js
nexmo.users.get(userId, callback);
```
For more information see https://developer.nexmo.com/api/stitch#getUser
### Get Users by filter
```js
nexmo.users.get(options, callback);
```
For more information see https://developer.nexmo.com/api/stitch#getUsers
### Get all Conversations for a Users
```js
nexmo.users.getConversations(userId, callback);
```
For more information see https://developer.nexmo.com/api/stitch#getuserConversations
### Update a User
```js
nexmo.users.update(userId, params, callback);
```
params is a dictionary of parameters per [documentation](https://ea.developer.nexmo.com/api/conversation#create-a-conversation)
### Delete a User
```js
nexmo.users.delete(userId, callback);
```
For more information see https://developer.nexmo.com/api/stitch#deleteUser
## Management

@@ -521,3 +407,3 @@

### Get Pricing for sending message to a country.
### Get Pricing for sending a message to a country.

@@ -530,3 +416,3 @@ ```js

### Get Pricing for sending message or making a call to a number.
### Get Pricing for sending a message or making a call to a number.

@@ -540,3 +426,3 @@ ```js

### Get all numbers associated to the account.
### Get all numbers associated with the account.

@@ -553,3 +439,3 @@ ```js

For more details on what the above options mean refer to the Nexmo API [documentation](https://docs.nexmo.com/tools/developer-api/account-numbers)
For more details on what the above options mean, refer to the Nexmo API [documentation](https://developer.nexmo.com/api/developer/numbers#list-owned-numbers)

@@ -578,3 +464,3 @@ Example:

For more details on what the above options mean refer to the Nexmo API [documentation](https://docs.nexmo.com/tools/developer-api/number-search)
For more details on what the above options mean, refer to the Nexmo API [documentation](https://developer.nexmo.com/api/developer/numbers#search-available-numbers)

@@ -587,3 +473,3 @@ Example:

### Purchase number
### Purchase Number

@@ -606,3 +492,3 @@ ```js

params is a dictionary of parameters per [documentation](https://docs.nexmo.com/index.php/developer-api/number-update)
params is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/developer/numbers#update-a-number)

@@ -681,56 +567,2 @@ ### Update Password (API Secret)

## Channel
### Send a message
```js
nexmo.channel.send(
{ type: "<TYPE>", number: "<TO>"},
{ type: "<TYPE>", number: "<FROM>"},
{ content: { type: "text", text: "testing" } },
callback
);
```
## Dispatch
### Create a dispatch
```js
nexmo.dispatch.create(
"failover",
[
{
to: { type: "viber_service_msg", id: "<TO>"},
from: { type: "viber_service_msg", id: "<FROM>" },
message: {
content: {
type: "text",
text: "<CONTENT>"
},
viber_service_msg: {
ttl: 30
}
},
failover: {
expiry_time: 600,
condition_status: "delivered"
}
},
{
to: { type: "sms", number: "<TO>" },
from: { type: "sms", number: "<FROM>" },
message: {
content: {
type: "text",
text: "<CONTENT>"
}
}
}
],
callback
);
```
## JWT

@@ -741,5 +573,5 @@

```js
var Nexmo = require('nexmo');
const Nexmo = require('nexmo');
var jwt = Nexmo.generateJwt('path/to/private.key', {application_id: APP_ID});
const jwt = Nexmo.generateJwt('path/to/private.key', {application_id: APP_ID});
```

@@ -750,5 +582,5 @@

```js
var Nexmo = require('nexmo');
const Nexmo = require('nexmo');
var nexmo = new Nexmo({
const nexmo = new Nexmo({
apiKey: API_KEY,

@@ -760,3 +592,3 @@ apiSecret: API_SECRET,

var jwt = nexmo.generateJwt();
const jwt = nexmo.generateJwt();
```

@@ -802,7 +634,8 @@

Also see the [Nexmo Node Quickstarts repo](https://github.com/nexmo-community/nexmo-node-quickstart).
Also, see the [Nexmo Node Quickstarts repo](https://github.com/nexmo-community/nexmo-node-quickstart).
## Creating your own requests
> !!!IMPORTANT!!! This section uses internal APIs and should not be relied on. We make no guarantees that the interface is stable. Relying on these methods is not recommended for production applications
> #### IMPORTANT
> This section uses internal APIs and should not be relied on. We make no guarantees that the interface is stable. Relying on these methods is not recommended for production applications

@@ -815,3 +648,3 @@ For endpoints that are not yet implemented, you can use the Nexmo HTTP Client to

```javascript
var nexmo = new Nexmo({
const nexmo = new Nexmo({
apiKey: 'API_KEY',

@@ -867,3 +700,3 @@ apiSecret: 'API_SECRET',

* [ ] Inbound Call Webhook
* [x] Update calls
* [x] Update Calls
* [x] Stream to Call

@@ -882,3 +715,3 @@ * [x] Talk to Call

* [ ] Two-Factor Authentication
* [ ] Event Based Alerts
* [ ] Event-Based Alerts
* [ ] Sending Alerts

@@ -902,15 +735,2 @@ * [ ] Campaign Subscription Management

* [x] Delete an Application
* Conversations
* [x] Create a Conversation
* [x] Get Conversations
* [x] Update a Conversation
* [x] Delete a Conversation
* [x] Add a Member to a Conversation
* [x] Get Members
* Users
* [x] Create a User
* [x] Get Users
* [x] Get Conversations for a User
* [x] Update a User
* [x] Delete a User
* Account

@@ -933,6 +753,2 @@ * [X] Balance

* [x] Delete
* Channel
* [x] Send
* Workflow
* [x] Create
* Voice (Deprecated)

@@ -939,0 +755,0 @@ * [x] Outbound Calls

@@ -36,6 +36,21 @@ import chai, { expect } from "chai";

it("should allow a call to be created", () => {
var params = {};
var params = {
to: {
type: "websocket",
uri: "wss://example.com/socket",
"content-type": "audio/l16;rate=16000",
headers: {
"utf-8": "✅"
}
}
};
calls.create(params, emptyCallback);
var expectedRequestArgs = ResourceTestHelper.requestArgsMatch(params);
var expectedRequestArgs = ResourceTestHelper.requestArgsMatch(params, {
method: "POST",
headers: {
"Content-Type": "application/json",
"Content-Length": 124
}
});
expect(httpClientStub.request).to.have.been.calledWith(

@@ -109,3 +124,7 @@ sinon.match(expectedRequestArgs),

var params = {
action: "hangup"
action: "hangup",
destination: {
type: "ncco",
url: ["http://exémple.com/ncco.json"]
}
};

@@ -116,3 +135,7 @@ calls.update(callId, params, emptyCallback);

method: "PUT",
path: `${CallsResource.PATH}/${callId}`
path: `${CallsResource.PATH}/${callId}`,
headers: {
"Content-Type": "application/json",
"Content-Length": 89
}
});

@@ -119,0 +142,0 @@

@@ -42,3 +42,7 @@ import chai, { expect } from "chai";

path: DtmfResource.PATH.replace("{call_uuid}", callId),
method: "PUT"
method: "PUT",
headers: {
"Content-Type": "application/json",
"Content-Length": 20
}
});

@@ -45,0 +49,0 @@ expect(httpClientStub.request).to.have.been.calledWith(

import JwtGenerator from "../src/JwtGenerator";
import path from "path";
import fs from "fs";

@@ -25,3 +26,5 @@ import expect from "expect.js";

it("should generate a JWT", function() {
var testPrivateKey = fs.readFileSync(__dirname + "/private-test.key");
var testPrivateKey = fs.readFileSync(
path.join(__dirname, "private-test.key")
);

@@ -38,4 +41,8 @@ var generator = new JwtGenerator();

it("should add jti and iat claims by default", function() {
var testPrivateKey = fs.readFileSync(__dirname + "/private-test.key");
var testPublicKey = fs.readFileSync(__dirname + "/public-test.key");
var testPrivateKey = fs.readFileSync(
path.join(__dirname, "private-test.key")
);
var testPublicKey = fs.readFileSync(
path.join(__dirname, "public-test.key")
);

@@ -52,4 +59,8 @@ var generator = new JwtGenerator();

it("should be possible to add additional claims", function() {
var testPrivateKey = fs.readFileSync(__dirname + "/private-test.key");
var testPublicKey = fs.readFileSync(__dirname + "/public-test.key");
var testPrivateKey = fs.readFileSync(
path.join(__dirname, "private-test.key")
);
var testPublicKey = fs.readFileSync(
path.join(__dirname, "public-test.key")
);

@@ -69,23 +80,3 @@ var generator = new JwtGenerator();

});
it("should be possible to add object literal claims", function() {
var testPrivateKey = fs.readFileSync(__dirname + "/private-test.key");
var testPublicKey = fs.readFileSync(__dirname + "/public-test.key");
var generator = new JwtGenerator();
var appId = "app-id";
var objectLiteral = {
path: "/random"
};
var token = generator.generate(testPrivateKey, {
application_id: appId,
object: objectLiteral
});
var decoded = jwt.verify(token, testPublicKey, { algorithms: ["RS256"] });
expect(decoded.application_id).to.be(appId);
expect(typeof decoded.object).to.be(typeof {});
});
});
});
import Media from "../lib/Media";
import os from "os";
import { expect, sinon, TestUtils } from "./NexmoTestUtils";

@@ -65,5 +66,6 @@

it("should call the correct URL (file provided)", function() {
const file = os.type() === "Windows_NT" ? "\\\\.\\NUL" : "/dev/null";
return expect(this.media)
.method("upload")
.withParams({ file: "/dev/null" })
.withParams({ file })
.to.postFile.to.url("/v3/media");

@@ -70,0 +72,0 @@ });

@@ -9,4 +9,3 @@ import chai, { expect } from "chai";

import CallsResource from "../lib/CallsResource";
import Conversations from "../lib/Conversations";
import Users from "../lib/Users";
chai.use(sinonChai);

@@ -28,3 +27,3 @@

it("should create a JWT with a private key (file path) [static]", () => {
var token = Nexmo.generateJwt(__dirname + "/private-test.key");
var token = Nexmo.generateJwt(path.join(__dirname, "private-test.key"));
expect(token).to.be.a("string");

@@ -34,3 +33,5 @@ });

it("should create a JWT with a private key (Buffer) [static]", () => {
var fileBuffer = fs.readFileSync(__dirname + "/private-test.key");
var fileBuffer = fs.readFileSync(
path.join(__dirname, "private-test.key")
);
var token = Nexmo.generateJwt(fileBuffer);

@@ -44,3 +45,6 @@ expect(token).to.be.a("string");

it("should expose a credentials object", function() {
var nexmo = new Nexmo({ apiKey: "test", apiSecret: "test" });
var nexmo = new Nexmo({
apiKey: "test",
apiSecret: "test"
});
expect(nexmo.credentials).to.be.a("object");

@@ -50,3 +54,6 @@ });

it("should expose a message object", function() {
var nexmo = new Nexmo({ apiKey: "test", apiSecret: "test" });
var nexmo = new Nexmo({
apiKey: "test",
apiSecret: "test"
});
expect(nexmo.message).to.be.a("object");

@@ -56,3 +63,6 @@ });

it("should expose a voice object", function() {
var nexmo = new Nexmo({ apiKey: "test", apiSecret: "test" });
var nexmo = new Nexmo({
apiKey: "test",
apiSecret: "test"
});
expect(nexmo.voice).to.be.a("object");

@@ -62,3 +72,6 @@ });

it("should expose a number object", function() {
var nexmo = new Nexmo({ apiKey: "test", apiSecret: "test" });
var nexmo = new Nexmo({
apiKey: "test",
apiSecret: "test"
});
expect(nexmo.number).to.be.a("object");

@@ -68,3 +81,6 @@ });

it("should expose a verify object", function() {
var nexmo = new Nexmo({ apiKey: "test", apiSecret: "test" });
var nexmo = new Nexmo({
apiKey: "test",
apiSecret: "test"
});
expect(nexmo.verify).to.be.a("object");

@@ -74,3 +90,6 @@ });

it("should expose a numberInsight object", function() {
var nexmo = new Nexmo({ apiKey: "test", apiSecret: "test" });
var nexmo = new Nexmo({
apiKey: "test",
apiSecret: "test"
});
expect(nexmo.numberInsight).to.be.a("object");

@@ -80,3 +99,6 @@ });

it("should expose a app object", function() {
var nexmo = new Nexmo({ apiKey: "test", apiSecret: "test" });
var nexmo = new Nexmo({
apiKey: "test",
apiSecret: "test"
});
expect(nexmo.app).to.be.a("object");

@@ -86,3 +108,6 @@ });

it("should expose a applications object", function() {
var nexmo = new Nexmo({ apiKey: "test", apiSecret: "test" });
var nexmo = new Nexmo({
apiKey: "test",
apiSecret: "test"
});
expect(nexmo.applications).to.be.a("object");

@@ -92,3 +117,6 @@ });

it("should alias apps to applications object", function() {
var nexmo = new Nexmo({ apiKey: "test", apiSecret: "test" });
var nexmo = new Nexmo({
apiKey: "test",
apiSecret: "test"
});
expect(nexmo.applications).to.equal(nexmo.app);

@@ -98,3 +126,6 @@ });

it("should expose a account object", function() {
var nexmo = new Nexmo({ apiKey: "test", apiSecret: "test" });
var nexmo = new Nexmo({
apiKey: "test",
apiSecret: "test"
});
expect(nexmo.account).to.be.a("object");

@@ -104,18 +135,14 @@ });

it("should expose a calls object", function() {
var nexmo = new Nexmo({ apiKey: "test", apiSecret: "test" });
var nexmo = new Nexmo({
apiKey: "test",
apiSecret: "test"
});
expect(nexmo.calls).to.be.an.instanceOf(CallsResource);
});
it("should expose a conversations object", function() {
var nexmo = new Nexmo({ apiKey: "test", apiSecret: "test" });
expect(nexmo.conversations).to.be.an.instanceOf(Conversations);
});
it("should expose a users object", function() {
var nexmo = new Nexmo({ apiKey: "test", apiSecret: "test" });
expect(nexmo.users).to.be.an.instanceOf(Users);
});
it("should expose a files object", function() {
var nexmo = new Nexmo({ apiKey: "test", apiSecret: "test" });
var nexmo = new Nexmo({
apiKey: "test",
apiSecret: "test"
});
expect(nexmo.files).to.be.a("object");

@@ -144,3 +171,6 @@ });

it("should have debug turned off by default", function() {
var nexmo = new Nexmo({ apiKey: "test", apiSecret: "test" });
var nexmo = new Nexmo({
apiKey: "test",
apiSecret: "test"
});
expect(nexmo.options.debug).to.be.false;

@@ -160,3 +190,5 @@ });

},
{ logger: logger }
{
logger: logger
}
);

@@ -172,3 +204,5 @@ expect(nexmo.options.logger).to.equal(logger);

},
{ debug: true }
{
debug: true
}
);

@@ -179,5 +213,8 @@ expect(nexmo.options.debug).to.be.true;

it("should have a default user agent in the form LIBRARY-NAME/LIBRARY-VERSION/LANGUAGE-VERSION", function() {
var nexmo = new Nexmo({ apiKey: "test", apiSecret: "test" });
var nexmo = new Nexmo({
apiKey: "test",
apiSecret: "test"
});
expect(nexmo.options.userAgent).to.match(
/^nexmo-node\/[\d|\w\-\d.]* node\/[\d.]*$/
/^nexmo-node\/[\d.]* node\/[\d.]*$/
);

@@ -198,3 +235,3 @@ });

expect(nexmo.options.userAgent).to.match(
/nexmo-node\/[\d|\w\-\d.]* node\/[\d.]* nexmo-cli\/1\.0\.0/
/nexmo-node\/[\d.]* node\/[\d.]* nexmo-cli\/1\.0\.0/
);

@@ -207,3 +244,3 @@ });

apiSecret: "test",
privateKey: __dirname + "/private-test.key",
privateKey: path.join(__dirname, "private-test.key"),
application_id: "app-id"

@@ -219,3 +256,3 @@ });

var appId = "app_id";
var privateKey = __dirname + "/private-test.key";
var privateKey = path.join(__dirname, "private-test.key");

@@ -222,0 +259,0 @@ var expectedJwt = Nexmo.generateJwt(privateKey, {

@@ -63,2 +63,3 @@ import querystring from "querystring";

}
match = match && expected.headers[k] === actual.headers[k];

@@ -65,0 +66,0 @@ });

@@ -35,3 +35,3 @@ import chai, { expect } from "chai";

var params = {
stream_url: "https://example.com/test.mp3" // eslint-disable-line camelcase
stream_url: "https://example.com/▶tést.mp3" // eslint-disable-line camelcase
}; // eslint-disable-line camelcase

@@ -42,4 +42,9 @@ stream.start(callId, params, emptyCallback);

path: StreamResource.PATH.replace("{call_uuid}", callId),
method: "PUT"
method: "PUT",
headers: {
"Content-Type": "application/json",
"Content-Length": 49
}
});
expect(httpClientStub.request).to.have.been.calledWith(

@@ -46,0 +51,0 @@ sinon.match(expectedRequestArgs),

@@ -41,3 +41,7 @@ import chai, { expect } from "chai";

path: TalkResource.PATH.replace("{call_uuid}", callId),
method: "PUT"
method: "PUT",
headers: {
"Content-Type": "application/json",
"Content-Length": 17
}
});

@@ -50,2 +54,23 @@ expect(httpClientStub.request).to.have.been.calledWith(

it("should be able to start a talk with unicode characters", () => {
const callId = "2342342-lkjhlkjh-32423";
var params = {
text: "Alô 😊!"
};
talk.start(callId, params, emptyCallback);
var expectedRequestArgs = ResourceTestHelper.requestArgsMatch(params, {
path: TalkResource.PATH.replace("{call_uuid}", callId),
method: "PUT",
headers: {
"Content-Type": "application/json",
"Content-Length": 21
}
});
expect(httpClientStub.request).to.have.been.calledWith(
sinon.match(expectedRequestArgs),
emptyCallback
);
});
it("should be possible to stop an ongoing talk", () => {

@@ -52,0 +77,0 @@ const callId = "2342342-lkjhlkjh-32423";

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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