@vonage/server-sdk
Advanced tools
Comparing version 2.12.0-beta.2 to 3.0.0-alpha.1
@@ -178,3 +178,3 @@ Apache License | ||
Copyright (c) 2020 Vonage | ||
Copyright (c) 2022 Vonage | ||
@@ -181,0 +181,0 @@ Licensed under the Apache License, Version 2.0 (the "License"); |
113
package.json
{ | ||
"name": "@vonage/server-sdk", | ||
"author": "vonage", | ||
"version": "2.12.0-beta.2", | ||
"main": "lib/Vonage", | ||
"types": "./typings/index.d.ts", | ||
"keywords": [ | ||
"sms", | ||
"voice", | ||
"vonage", | ||
"verify", | ||
"2fa", | ||
"phone numbers" | ||
"version": "3.0.0-alpha.1", | ||
"description": "Node.js Client for the Vonage API Platform", | ||
"author": "Chris Tankersley <chris@ctankersley.com>", | ||
"homepage": "https://developer.vonage.com", | ||
"license": "Apache-2.0", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"directories": { | ||
"lib": "dist", | ||
"test": "__tests__" | ||
}, | ||
"files": [ | ||
"/dist" | ||
], | ||
"homepage": "https://github.com/vonage/vonage-node-sdk", | ||
"publishConfig": { | ||
"directory": "dist" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/vonage/vonage-node-sdk.git" | ||
"url": "git+https://github.com/Vonage/vonage-node-sdk.git" | ||
}, | ||
"description": "Vonage Server SDK for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.", | ||
"contributors": [ | ||
"vonage", | ||
"kellyjandrews", | ||
"pvela", | ||
"leggetter", | ||
"akuzi", | ||
"bpilot", | ||
"justinfreitag", | ||
"ecwyne", | ||
"https://github.com/backhand", | ||
"alexlakatos" | ||
], | ||
"scripts": { | ||
"compile": "./node_modules/.bin/babel -d lib src/ -s inline", | ||
"test": "npm run test-no-lint", | ||
"report-coverage": "cross-env NODE_ENV=test nyc --reporter=text-lcov mocha > coverage.lcov", | ||
"test-coverage": "cross-env NODE_ENV=test nyc mocha", | ||
"test-coverage-html": "cross-env NODE_ENV=test nyc --reporter html mocha", | ||
"test-no-lint": "npm run compile && mocha --require @babel/register ./test/*-test.js", | ||
"test-watch": "nodemon --watch src --watch test -x 'npm run test-no-lint'", | ||
"lint": "eslint src test", | ||
"lint-fix": "eslint --fix src test", | ||
"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" | ||
"build": "npm run clean && npm run compile", | ||
"clean": "tsc -b --clean", | ||
"compile": "tsc -p tsconfig.json", | ||
"format": "prettier --write \"lib/**/*.ts\"", | ||
"lint": "tslint -p tsconfig.json", | ||
"prepublishOnly": "npm run build && npm run test && npm run lint", | ||
"preversion": "npm run lint", | ||
"test-watch": "npx jest --watch", | ||
"test": "npx jest", | ||
"version": "npm run format && git add -A lib" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.13.10", | ||
"@babel/core": "^7.13.10", | ||
"@babel/eslint-parser": "^7.13.10", | ||
"@babel/eslint-plugin": "^7.13.10", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.10.4", | ||
"@babel/preset-env": "^7.10.4", | ||
"@babel/register": "^7.13.8", | ||
"babel-plugin-add-module-exports": "^1.0.4", | ||
"babel-plugin-istanbul": "^6.0.0", | ||
"bluebird": "^3.5.3", | ||
"body-parser": "^1.18.3", | ||
"chai": "^3.5.0", | ||
"cross-env": "^7.0.2", | ||
"dotenv": "^9.0.2", | ||
"eslint": "^7.21.0", | ||
"eslint-config-prettier": "^8.1.0", | ||
"eslint-plugin-prettier": "^3.3.1", | ||
"expect.js": "^0.3.1", | ||
"mocha": "^9.2.1", | ||
"nodemon": "^2.0.4", | ||
"nyc": "^15.1.0", | ||
"prettier": "^2.2.1", | ||
"sinon": "^1.17.4", | ||
"sinon-chai": "^2.8.0", | ||
"sinon-expect": "^0.3.0" | ||
"bugs": { | ||
"url": "https://github.com/Vonage/vonage-node-sdk/issues" | ||
}, | ||
"dependencies": { | ||
"@babel/eslint-parser": "^7.13.10", | ||
"@babel/eslint-plugin": "^7.13.10", | ||
"jsonwebtoken": "^8.4.0", | ||
"query-string": "^7.1.1", | ||
"request": "^2.88.2", | ||
"require-module": "^0.1.0", | ||
"uuid": "^8.3.0" | ||
}, | ||
"license": "Apache 2.0" | ||
"@vonage/accounts": "^0.2.1", | ||
"@vonage/applications": "^0.3.1", | ||
"@vonage/messages": "^0.2.1", | ||
"@vonage/number-insights": "^0.2.1", | ||
"@vonage/numbers": "^0.2.1", | ||
"@vonage/pricing": "^0.2.1", | ||
"@vonage/server-client": "^0.3.0", | ||
"@vonage/sms": "^0.3.1", | ||
"@vonage/verify": "^0.2.1", | ||
"@vonage/voice": "^0.2.1" | ||
} | ||
} |
# Vonage Server SDK for Node.js | ||
![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/vonage/vonage-node-sdk/Vonage/master?logo=github&style=flat-square&label=Workflow%20Build) [![Codecov](https://img.shields.io/codecov/c/github/vonage/vonage-node-sdk?label=Codecov&logo=codecov&style=flat-square)](https://codecov.io/gh/Vonage/vonage-server-sdk) ![Latest Release](https://img.shields.io/github/v/release/vonage/vonage-node-sdk?logo=npm&style=flat-square) | ||
![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/vonage/vonage-node-sdk/Vonage/3.x-wip?logo=github&style=flat-square&label=Workflow%20Build) [![Codecov](https://img.shields.io/codecov/c/github/vonage/vonage-node-sdk?label=Codecov&logo=codecov&style=flat-square)](https://codecov.io/gh/Vonage/vonage-server-sdk) ![Latest Release](https://img.shields.io/github/v/release/vonage/vonage-node-sdk?logo=npm&style=flat-square) | ||
@@ -25,3 +25,3 @@ [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg?style=flat-square)](CODE_OF_CONDUCT.md) [![License](https://img.shields.io/npm/l/@vonage/server-sdk?label=License&style=flat-square)][license] | ||
```bash | ||
npm install @vonage/server-sdk | ||
npm install @vonage/server-sdk@3.0.0-beta | ||
``` | ||
@@ -32,3 +32,3 @@ | ||
```bash | ||
yarn add @vonage/server-sdk | ||
yarn add @vonage/server-sdk@3.0.0-beta | ||
``` | ||
@@ -38,5 +38,2 @@ | ||
* `apiKey` and `apiSecret` are required for SMS, Verify, Number Insights, Account management APIs | ||
* `applicationId` and `privateKey` are required for Voice / Stitch applications | ||
```js | ||
@@ -90,21 +87,9 @@ const Vonage = require('@vonage/server-sdk'); | ||
## Callbacks | ||
## Promises | ||
All methods expect a `callback` function to be passed in, with a method signature of `(error, response)` where: | ||
Most methods that interact with the Vonage API uses Promises. You can either resolve these yourself, or use `await` to | ||
wait for a response. | ||
* `error` - is an Error object if the API call returns an error, or `null` if the API call was successful. | ||
* `response` - is an Object, with the API response if the API call was successful, or `null` if there was an error. | ||
Example: | ||
```js | ||
callback = (error, response) => { | ||
if (error) { | ||
console.error(error) | ||
} | ||
if (response) { | ||
console.log(response) | ||
} | ||
} | ||
const resp = await vonage.sms.send({to: '15552220000', from: '15559992222', 'This is a test'}); | ||
``` | ||
@@ -117,3 +102,3 @@ | ||
```bash | ||
npm test | ||
npm run test | ||
``` | ||
@@ -144,3 +129,3 @@ | ||
| External Accounts API | Beta |❌| | ||
| Media API | Beta |✅| | ||
| Media API | Beta |❌| | ||
| Messages API | Beta |❌| | ||
@@ -150,3 +135,3 @@ | Number Insight API | General Availability |✅| | ||
| Pricing API | General Availability |✅| | ||
| Redact API | Developer Preview |✅| | ||
| Redact API | Developer Preview |❌| | ||
| Reports API | Beta |❌| | ||
@@ -153,0 +138,0 @@ | SMS API | General Availability |✅| |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
0
0
0
1
18944
10
7
68
137
+ Added@vonage/accounts@^0.2.1
+ Added@vonage/applications@^0.3.1
+ Added@vonage/messages@^0.2.1
+ Added@vonage/numbers@^0.2.1
+ Added@vonage/pricing@^0.2.1
+ Added@vonage/server-client@^0.3.0
+ Added@vonage/sms@^0.3.1
+ Added@vonage/verify@^0.2.1
+ Added@vonage/voice@^0.2.1
+ Added@vonage/accounts@0.2.6(transitive)
+ Added@vonage/applications@0.3.5(transitive)
+ Added@vonage/auth@0.5.00.6.0(transitive)
+ Added@vonage/jwt@0.3.0(transitive)
+ Added@vonage/messages@0.2.5(transitive)
+ Added@vonage/number-insights@0.2.5(transitive)
+ Added@vonage/numbers@0.2.5(transitive)
+ Added@vonage/pricing@0.2.5(transitive)
+ Added@vonage/server-client@0.3.00.5.0(transitive)
+ Added@vonage/sms@0.3.5(transitive)
+ Added@vonage/verify@0.2.5(transitive)
+ Added@vonage/vetch@0.2.00.3.1(transitive)
+ Added@vonage/voice@0.2.5(transitive)
+ Addednode-fetch@2.7.0(transitive)
+ Addedtr46@0.0.3(transitive)
+ Addedwebidl-conversions@3.0.1(transitive)
+ Addedwhatwg-url@5.0.0(transitive)
- Removed@babel/eslint-parser@^7.13.10
- Removed@babel/eslint-plugin@^7.13.10
- Removedjsonwebtoken@^8.4.0
- Removedquery-string@^7.1.1
- Removedrequest@^2.88.2
- Removedrequire-module@^0.1.0
- Removeduuid@^8.3.0
- Removed@ampproject/remapping@2.3.0(transitive)
- Removed@babel/code-frame@7.25.7(transitive)
- Removed@babel/compat-data@7.25.7(transitive)
- Removed@babel/core@7.25.7(transitive)
- Removed@babel/eslint-parser@7.25.7(transitive)
- Removed@babel/eslint-plugin@7.25.7(transitive)
- Removed@babel/generator@7.25.7(transitive)
- Removed@babel/helper-compilation-targets@7.25.7(transitive)
- Removed@babel/helper-module-imports@7.25.7(transitive)
- Removed@babel/helper-module-transforms@7.25.7(transitive)
- Removed@babel/helper-simple-access@7.25.7(transitive)
- Removed@babel/helper-string-parser@7.25.7(transitive)
- Removed@babel/helper-validator-identifier@7.25.7(transitive)
- Removed@babel/helper-validator-option@7.25.7(transitive)
- Removed@babel/helpers@7.25.7(transitive)
- Removed@babel/highlight@7.25.7(transitive)
- Removed@babel/parser@7.25.7(transitive)
- Removed@babel/template@7.25.7(transitive)
- Removed@babel/traverse@7.25.7(transitive)
- Removed@babel/types@7.25.7(transitive)
- Removed@eslint-community/eslint-utils@4.4.0(transitive)
- Removed@eslint-community/regexpp@4.11.1(transitive)
- Removed@eslint/config-array@0.18.0(transitive)
- Removed@eslint/core@0.6.0(transitive)
- Removed@eslint/eslintrc@3.1.0(transitive)
- Removed@eslint/js@9.12.0(transitive)
- Removed@eslint/object-schema@2.1.4(transitive)
- Removed@eslint/plugin-kit@0.2.0(transitive)
- Removed@humanfs/core@0.19.0(transitive)
- Removed@humanfs/node@0.16.5(transitive)
- Removed@humanwhocodes/module-importer@1.0.1(transitive)
- Removed@humanwhocodes/retry@0.3.1(transitive)
- Removed@jridgewell/gen-mapping@0.3.5(transitive)
- Removed@jridgewell/resolve-uri@3.1.2(transitive)
- Removed@jridgewell/set-array@1.2.1(transitive)
- Removed@jridgewell/sourcemap-codec@1.5.0(transitive)
- Removed@jridgewell/trace-mapping@0.3.25(transitive)
- Removed@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1(transitive)
- Removed@types/estree@1.0.6(transitive)
- Removed@types/json-schema@7.0.15(transitive)
- Removedacorn@8.12.1(transitive)
- Removedacorn-jsx@5.3.2(transitive)
- Removedajv@6.12.6(transitive)
- Removedansi-styles@3.2.14.3.0(transitive)
- Removedargparse@2.0.1(transitive)
- Removedasn1@0.2.6(transitive)
- Removedassert-plus@1.0.0(transitive)
- Removedasynckit@0.4.0(transitive)
- Removedaws-sign2@0.7.0(transitive)
- Removedaws4@1.13.2(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbcrypt-pbkdf@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedbrowserslist@4.24.0(transitive)
- Removedcallsites@3.1.0(transitive)
- Removedcaniuse-lite@1.0.30001667(transitive)
- Removedcaseless@0.12.0(transitive)
- Removedchalk@2.4.24.1.2(transitive)
- Removedcolor-convert@1.9.32.0.1(transitive)
- Removedcolor-name@1.1.31.1.4(transitive)
- Removedcombined-stream@1.0.8(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removedconvert-source-map@2.0.0(transitive)
- Removedcore-util-is@1.0.2(transitive)
- Removedcross-spawn@7.0.3(transitive)
- Removeddashdash@1.14.1(transitive)
- Removeddebug@4.3.7(transitive)
- Removeddecode-uri-component@0.2.2(transitive)
- Removeddeep-is@0.1.4(transitive)
- Removeddelayed-stream@1.0.0(transitive)
- Removedecc-jsbn@0.1.2(transitive)
- Removedelectron-to-chromium@1.5.32(transitive)
- Removedescalade@3.2.0(transitive)
- Removedescape-string-regexp@1.0.54.0.0(transitive)
- Removedeslint@9.12.0(transitive)
- Removedeslint-rule-composer@0.3.0(transitive)
- Removedeslint-scope@5.1.18.1.0(transitive)
- Removedeslint-visitor-keys@2.1.03.4.34.1.0(transitive)
- Removedespree@10.2.0(transitive)
- Removedesquery@1.6.0(transitive)
- Removedesrecurse@4.3.0(transitive)
- Removedestraverse@4.3.05.3.0(transitive)
- Removedesutils@2.0.3(transitive)
- Removedextend@3.0.2(transitive)
- Removedextsprintf@1.3.0(transitive)
- Removedfast-deep-equal@3.1.3(transitive)
- Removedfast-json-stable-stringify@2.1.0(transitive)
- Removedfast-levenshtein@2.0.6(transitive)
- Removedfile-entry-cache@8.0.0(transitive)
- Removedfilter-obj@1.1.0(transitive)
- Removedfind-up@5.0.0(transitive)
- Removedflat-cache@4.0.1(transitive)
- Removedflatted@3.3.1(transitive)
- Removedforever-agent@0.6.1(transitive)
- Removedform-data@2.3.3(transitive)
- Removedgensync@1.0.0-beta.2(transitive)
- Removedgetpass@0.1.7(transitive)
- Removedglob-parent@6.0.2(transitive)
- Removedglobals@11.12.014.0.0(transitive)
- Removedhar-schema@2.0.0(transitive)
- Removedhar-validator@5.1.5(transitive)
- Removedhas-flag@3.0.04.0.0(transitive)
- Removedhttp-signature@1.2.0(transitive)
- Removedignore@5.3.2(transitive)
- Removedimport-fresh@3.3.0(transitive)
- Removedimurmurhash@0.1.4(transitive)
- Removedis-extglob@2.1.1(transitive)
- Removedis-glob@4.0.3(transitive)
- Removedis-typedarray@1.0.0(transitive)
- Removedisexe@2.0.0(transitive)
- Removedisstream@0.1.2(transitive)
- Removedjs-tokens@4.0.0(transitive)
- Removedjs-yaml@4.1.0(transitive)
- Removedjsbn@0.1.1(transitive)
- Removedjsesc@3.0.2(transitive)
- Removedjson-buffer@3.0.1(transitive)
- Removedjson-schema@0.4.0(transitive)
- Removedjson-schema-traverse@0.4.1(transitive)
- Removedjson-stable-stringify-without-jsonify@1.0.1(transitive)
- Removedjson-stringify-safe@5.0.1(transitive)
- Removedjson5@2.2.3(transitive)
- Removedjsprim@1.4.2(transitive)
- Removedkeyv@4.5.4(transitive)
- Removedlevn@0.4.1(transitive)
- Removedlocate-path@6.0.0(transitive)
- Removedlru-cache@5.1.1(transitive)
- Removedmime-db@1.52.0(transitive)
- Removedmime-types@2.1.35(transitive)
- Removedminimatch@3.1.2(transitive)
- Removednatural-compare@1.4.0(transitive)
- Removednode-releases@2.0.18(transitive)
- Removedoauth-sign@0.9.0(transitive)
- Removedoptionator@0.9.4(transitive)
- Removedp-limit@3.1.0(transitive)
- Removedp-locate@5.0.0(transitive)
- Removedparent-module@1.0.1(transitive)
- Removedpath-exists@4.0.0(transitive)
- Removedpath-key@3.1.1(transitive)
- Removedperformance-now@2.1.0(transitive)
- Removedpicocolors@1.1.0(transitive)
- Removedprelude-ls@1.2.1(transitive)
- Removedpsl@1.9.0(transitive)
- Removedpunycode@2.3.1(transitive)
- Removedqs@6.5.3(transitive)
- Removedquery-string@7.1.3(transitive)
- Removedrequest@2.88.2(transitive)
- Removedrequire-module@0.1.0(transitive)
- Removedresolve@0.6.3(transitive)
- Removedresolve-from@4.0.0(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsemver@6.3.1(transitive)
- Removedshebang-command@2.0.0(transitive)
- Removedshebang-regex@3.0.0(transitive)
- Removedsplit-on-first@1.1.0(transitive)
- Removedsshpk@1.18.0(transitive)
- Removedstrict-uri-encode@2.0.0(transitive)
- Removedstrip-json-comments@3.1.1(transitive)
- Removedsupports-color@5.5.07.2.0(transitive)
- Removedtext-table@0.2.0(transitive)
- Removedto-fast-properties@2.0.0(transitive)
- Removedtough-cookie@2.5.0(transitive)
- Removedtunnel-agent@0.6.0(transitive)
- Removedtweetnacl@0.14.5(transitive)
- Removedtype-check@0.4.0(transitive)
- Removedupdate-browserslist-db@1.1.1(transitive)
- Removeduri-js@4.4.1(transitive)
- Removeduuid@3.4.0(transitive)
- Removedverror@1.10.0(transitive)
- Removedwhich@2.0.2(transitive)
- Removedword-wrap@1.2.5(transitive)
- Removedyallist@3.1.1(transitive)
- Removedyocto-queue@0.1.0(transitive)