Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Vonage/vonage-node-sdk
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: @vonage/server-sdk@3.9.3
Choose a base ref
...
head repository: Vonage/vonage-node-sdk
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: @vonage/server-sdk@3.10.0
Choose a head ref
  • 7 commits
  • 81 files changed
  • 4 contributors

Commits on Sep 18, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    12ec202 View commit details

Commits on Sep 25, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    65d4bcf View commit details

Commits on Oct 12, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    670b83c View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    66ea103 View commit details

Commits on Oct 13, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3e6a4dc View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5ca15c8 View commit details
  3. Publish

     - @vonage/accounts@1.9.0
     - @vonage/applications@1.9.0
     - @vonage/audit@1.9.0
     - @vonage/auth@1.7.0
     - @vonage/jwt@1.7.0
     - @vonage/media@1.1.0
     - @vonage/meetings@1.5.0
     - @vonage/messages@1.10.0
     - @vonage/number-insight-v2@1.1.0
     - @vonage/number-insights@1.9.0
     - @vonage/numbers@1.9.0
     - @vonage/pricing@1.9.0
     - @vonage/proactive-connect@1.6.0
     - @vonage/redact@1.8.0
     - @vonage/server-client@1.9.0
     - @Vonage/server-sdk@3.10.0
     - @vonage/sms@1.9.0
     - @vonage/subaccounts@1.5.0
     - @vonage/users@1.3.0
     - @Vonage/verify@1.9.0
     - @vonage/verify2@1.8.0
     - @vonage/vetch@1.6.0
     - @vonage/video@1.12.0
     - @vonage/voice@1.9.0
    manchuck committed Oct 13, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    manchuck Chuck Reeves
    Copy the full SHA
    ea2de27 View commit details
Showing with 1,465 additions and 241 deletions.
  1. +2 −2 .github/workflows/ci.yml
  2. +3 −1 README.md
  3. +12 −0 jest.config.ts
  4. +22 −22 package.json
  5. +4 −4 packages/accounts/package.json
  6. +5 −5 packages/applications/package.json
  7. +5 −5 packages/audit/package.json
  8. +3 −3 packages/auth/package.json
  9. +4 −4 packages/jwt/package.json
  10. +71 −0 packages/media/README.md
  11. +10 −0 packages/media/__tests__/__dataSets__/delete.ts
  12. +361 −0 packages/media/__tests__/__dataSets__/get.ts
  13. +18 −0 packages/media/__tests__/__dataSets__/index.ts
  14. +43 −0 packages/media/__tests__/__dataSets__/put.ts
  15. +1 −0 packages/media/__tests__/common.ts
  16. +82 −0 packages/media/__tests__/media.test.ts
  17. +28 −0 packages/media/__tests__/private.test.key
  18. +2 −0 packages/media/lib/index.ts
  19. +69 −0 packages/media/lib/media.ts
  20. +2 −0 packages/media/lib/types/Responses/index.ts
  21. +16 −0 packages/media/lib/types/Responses/mediaItemResponse.ts
  22. +18 −0 packages/media/lib/types/Responses/mediaItemResponsePage.ts
  23. +3 −0 packages/media/lib/types/index.ts
  24. +18 −0 packages/media/lib/types/mediaItem.ts
  25. +7 −0 packages/media/lib/types/mediaParameters.ts
  26. +33 −0 packages/media/package.json
  27. +7 −7 packages/meetings/__tests__/file.test.ts
  28. +1 −1 packages/meetings/__tests__/numbers.test.ts
  29. +5 −3 packages/meetings/__tests__/recordings.test.ts
  30. +14 −14 packages/meetings/__tests__/room.test.ts
  31. +20 −20 packages/meetings/__tests__/theme.test.ts
  32. +1 −1 packages/meetings/lib/enums/joinType.ts
  33. +17 −17 packages/meetings/lib/meetings.ts
  34. +6 −6 packages/meetings/package.json
  35. +5 −5 packages/messages/package.json
  36. +105 −0 packages/number-insight-v2/README.md
  37. +8 −0 packages/number-insight-v2/__tests__/__dataSets__/index.ts
  38. +69 −0 packages/number-insight-v2/__tests__/__dataSets__/post.ts
  39. +1 −0 packages/number-insight-v2/__tests__/common.ts
  40. +48 −0 packages/number-insight-v2/__tests__/numberInsightV2.test.ts
  41. +28 −0 packages/number-insight-v2/__tests__/private.test.key
  42. +4 −0 packages/number-insight-v2/lib/enums/index.ts
  43. +4 −0 packages/number-insight-v2/lib/enums/insight.ts
  44. +5 −0 packages/number-insight-v2/lib/enums/label.ts
  45. +5 −0 packages/number-insight-v2/lib/enums/riskRecommendation.ts
  46. +4 −0 packages/number-insight-v2/lib/enums/status.ts
  47. +3 −0 packages/number-insight-v2/lib/index.ts
  48. +15 −0 packages/number-insight-v2/lib/numberInsightV2.ts
  49. +11 −0 packages/number-insight-v2/lib/types/fraudCheck.ts
  50. +8 −0 packages/number-insight-v2/lib/types/fraudScore.ts
  51. +7 −0 packages/number-insight-v2/lib/types/index.ts
  52. +7 −0 packages/number-insight-v2/lib/types/parameters/fraudParameters.ts
  53. +1 −0 packages/number-insight-v2/lib/types/parameters/index.ts
  54. +5 −0 packages/number-insight-v2/lib/types/phoneInfo.ts
  55. +7 −0 packages/number-insight-v2/lib/types/requests/fraudCheckRequest.ts
  56. +1 −0 packages/number-insight-v2/lib/types/requests/index.ts
  57. +9 −0 packages/number-insight-v2/lib/types/responses/fraudCheckResponse.ts
  58. +7 −0 packages/number-insight-v2/lib/types/responses/fraudScoreResponse.ts
  59. +2 −0 packages/number-insight-v2/lib/types/responses/index.ts
  60. +7 −0 packages/number-insight-v2/lib/types/simSwap.ts
  61. +36 −0 packages/number-insight-v2/package.json
  62. +19 −0 packages/number-insight-v2/tsconfig.json
  63. +5 −5 packages/number-insights/package.json
  64. +5 −5 packages/numbers/package.json
  65. +1 −1 packages/pricing/lib/enums/ServiceType.ts
  66. +5 −5 packages/pricing/package.json
  67. +20 −23 packages/proactive-connect/__tests__/proactiveConnect.test.ts
  68. +5 −5 packages/proactive-connect/package.json
  69. +4 −4 packages/redact/package.json
  70. +13 −10 packages/server-client/__tests__/file.test.ts
  71. +4 −5 packages/server-client/package.json
  72. +3 −1 packages/server-sdk/README.md
  73. +15 −15 packages/server-sdk/package.json
  74. +4 −4 packages/sms/package.json
  75. +4 −4 packages/subaccounts/package.json
  76. +4 −4 packages/users/package.json
  77. +5 −5 packages/verify/package.json
  78. +4 −4 packages/verify2/package.json
  79. +4 −5 packages/vetch/package.json
  80. +7 −7 packages/video/package.json
  81. +9 −9 packages/voice/package.json
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -26,8 +26,8 @@ jobs:
- name: Install packages
run: npm install

- name: Lint, Compile, Test
run: npm run compile && npm run test -- --coverage --verbose --maxWorkers=2
- name: Compile, Test
run: npm run compile && npm run test -- --coverage --verbose --maxWorkers=1

- name: Run codecov
uses: codecov/codecov-action@v3
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -81,6 +81,7 @@ You can find more information for each product below:
* [Auth][auth]
* [JWT][jwt]
* [Messages](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/messages/README.md)
* [Number Insight V2](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/number-insight-v2/README.md)
* [Number Insights](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/number-insights/README.md)
* [Numbers](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/numbers/README.md)
* [Pricing](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/pricing/README.md)
@@ -109,7 +110,8 @@ The following is a list of Vonage APIs and whether the Node Server SDK provides
| External Accounts API | Beta ||
| Media API | Beta ||
| Messages API | Beta ||
| Number Insight API | General Availability ||
| Number Insight V2 API | Beta ||
| Number Insights API | General Availability ||
| Number Management API | General Availability ||
| Pricing API | General Availability ||
| Proactive Connect API | Beta ||
12 changes: 12 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -32,6 +32,11 @@ const config: Config.InitialOptions = {
testMatch: ['<rootDir>/packages/jwt/__tests__/**/*.test.ts'],
coveragePathIgnorePatterns: ['node_modules', '__tests__'],
},
{
displayName: 'MEDIA',
testMatch: ['<rootDir>/packages/media/__tests__/**/*.test.ts'],
coveragePathIgnorePatterns: ['node_modules', '__tests__'],
},
{
displayName: 'MESSAGES',
testMatch: ['<rootDir>/packages/messages/__tests__/**/*.test.ts'],
@@ -42,6 +47,13 @@ const config: Config.InitialOptions = {
testMatch: ['<rootDir>/packages/meetings/__tests__/**/*.test.ts'],
coveragePathIgnorePatterns: ['node_modules', '__tests__'],
},
{
displayName: 'NUMBER INSIGHT V2',
testMatch: [
'<rootDir>/packages/number-insight-v2/__tests__/**/*.test.ts',
],
coveragePathIgnorePatterns: ['node_modules', '__tests__'],
},
{
displayName: 'NUMBER INSIGHTS',
testMatch: ['<rootDir>/packages/number-insights/__tests__/**/*.test.ts'],
44 changes: 22 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
@@ -55,36 +55,36 @@
]
},
"devDependencies": {
"@babel/core": "7.22.5",
"@babel/plugin-transform-modules-commonjs": "^7.22.5",
"@babel/plugin-transform-typescript": "7.22.5",
"@babel/preset-env": "7.22.5",
"@babel/preset-typescript": "7.22.5",
"@babel/types": "^7.22.5",
"@types/jest": "^29.5.2",
"@types/node": "^20.3.1",
"@typescript-eslint/eslint-plugin": "5.60.0",
"@typescript-eslint/parser": "5.60.0",
"babel-jest": "29.5.0",
"@babel/core": "7.23.2",
"@babel/plugin-transform-modules-commonjs": "^7.23.0",
"@babel/plugin-transform-typescript": "7.22.15",
"@babel/preset-env": "7.23.2",
"@babel/preset-typescript": "7.23.2",
"@babel/types": "^7.23.0",
"@types/jest": "^29.5.5",
"@types/node": "^20.8.4",
"@typescript-eslint/eslint-plugin": "6.7.5",
"@typescript-eslint/parser": "6.7.5",
"babel-jest": "29.7.0",
"babel-plugin-module-resolver": "5.0.0",
"eslint": "8.43.0",
"eslint": "8.51.0",
"eslint-config-google": "0.14.0",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-deprecation": "1.4.1",
"eslint-plugin-jest": "27.2.2",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-deprecation": "2.0.0",
"eslint-plugin-jest": "27.4.2",
"eslint-plugin-jest-extended": "2.0.0",
"eslint-plugin-jest-formatting": "3.1.0",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-prettier": "5.0.1",
"husky": "^8.0.3",
"is-ci": "3.0.1",
"jest": "^29.5.0",
"lerna": "^7.0.2",
"jest": "^29.7.0",
"lerna": "^7.3.1",
"lerna-changelog": "^2.2.0",
"lint-staged": "13.2.2",
"nock": "^13.3.1",
"prettier": "2.8.8",
"lint-staged": "14.0.1",
"nock": "^13.3.4",
"prettier": "3.0.3",
"prettier-eslint": "15.0.1",
"ts-node-dev": "^2.0.0",
"typescript": "^5.1.3"
"typescript": "^5.2.2"
}
}
8 changes: 4 additions & 4 deletions packages/accounts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vonage/accounts",
"version": "1.8.2",
"version": "1.9.0",
"description": "Vonage Account Management API",
"homepage": "https://developer.vonage.com",
"bugs": {
@@ -27,11 +27,11 @@
"compile": "npx tsc --build --verbose"
},
"dependencies": {
"@vonage/server-client": "^1.8.2"
"@vonage/server-client": "^1.9.0"
},
"devDependencies": {
"@vonage/auth": "^1.6.0",
"nock": "^13.3.1"
"@vonage/auth": "^1.7.0",
"nock": "^13.3.4"
},
"publishConfig": {
"directory": "dist"
10 changes: 5 additions & 5 deletions packages/applications/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vonage/applications",
"version": "1.8.2",
"version": "1.9.0",
"description": "Vonage Applications API",
"keywords": [
"vonage"
@@ -30,12 +30,12 @@
"compile": "npx tsc --build --verbose"
},
"dependencies": {
"@vonage/auth": "^1.6.0",
"@vonage/server-client": "^1.8.2",
"@vonage/vetch": "^1.5.1"
"@vonage/auth": "^1.7.0",
"@vonage/server-client": "^1.9.0",
"@vonage/vetch": "^1.6.0"
},
"devDependencies": {
"nock": "^13.3.1"
"nock": "^13.3.4"
},
"publishConfig": {
"directory": "dist"
10 changes: 5 additions & 5 deletions packages/audit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vonage/audit",
"version": "1.8.2",
"version": "1.9.0",
"description": "Vonage Audit SDK Package",
"homepage": "https://github.com/vonage/vonage-node-sdk/tree/master/packages/audit#readme",
"bugs": {
@@ -27,12 +27,12 @@
"compile": "npx tsc --build --verbose"
},
"dependencies": {
"@vonage/auth": "^1.6.0",
"@vonage/server-client": "^1.8.2",
"@vonage/vetch": "^1.5.1"
"@vonage/auth": "^1.7.0",
"@vonage/server-client": "^1.9.0",
"@vonage/vetch": "^1.6.0"
},
"devDependencies": {
"nock": "^13.3.1"
"nock": "^13.3.4"
},
"publishConfig": {
"directory": "dist"
6 changes: 3 additions & 3 deletions packages/auth/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vonage/auth",
"version": "1.6.0",
"version": "1.7.0",
"description": "Vonage Auth Package adds the correct authentication headers to requests to Vonage API's",
"homepage": "https://github.com/vonage/vonage-node-sdk/tree/master/packages/auth#readme",
"bugs": {
@@ -23,11 +23,11 @@
"compile": "npx tsc --build --verbose"
},
"dependencies": {
"@vonage/jwt": "^1.6.0",
"@vonage/jwt": "^1.7.0",
"debug": "^4.3.4"
},
"devDependencies": {
"@types/node": "^20.3.1"
"@types/node": "^20.8.4"
},
"publishConfig": {
"directory": "dist"
8 changes: 4 additions & 4 deletions packages/jwt/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vonage/jwt",
"version": "1.6.0",
"version": "1.7.0",
"description": "Vonage JWT package. Creates JWT tokens for Vonage API's",
"homepage": "https://github.com/vonage/vonage-node-sdk/tree/master/packages/jwt#readme",
"bugs": {
@@ -24,11 +24,11 @@
},
"dependencies": {
"debug": "^4.3.4",
"jsonwebtoken": "^9.0.0",
"uuid": "^9.0.0"
"jsonwebtoken": "^9.0.2",
"uuid": "^9.0.1"
},
"devDependencies": {
"@types/uuid": "^9.0.2"
"@types/uuid": "^9.0.5"
},
"publishConfig": {
"directory": "dist"
71 changes: 71 additions & 0 deletions packages/media/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Vonage Media SDK for Node.js

![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vonage/vonage-node-sdk/ci.yml?branch=3.x) [![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/npm/v/@vonage/media?label=%40vonage%2Fmedia&style=flat-square) [![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/accounts?label=License&style=flat-square)][license]


<img src="https://developer.nexmo.com/images/logos/vbc-logo.svg" height="48px" alt="Vonage" />

This is the Vonage Media SDK for Node.js for use with [Vonage APIs](https://www.vonage.com/). To use it you will need a Vonage account. Sign up [for free at vonage.com][signup].

For full API documentation refer to [developer.vonage.com](https://developer.vonage.com/).

- [Installation](#installation)
- [Usage](#usage)
- [Promises](#promises)
- [Testing](#testing)

## Installation

### With NPM

```bash
npm install @vonage/media
```

### With Yarn

```bash
yarn add @vonage/media
```

## Usage

Unlike the other SDK's this package is not included in the [Vonage Server SDK for Node.js](https://github.com/vonage/vonage-node-sdk)

```js
const { Auth } = require('@vonage/auth')
const { Media } = require('@vonage/media')

const credentials = new Auth({
applicationId: APP_ID,
privateKey: PRIAVTE_KEY,
})
const options = {}
const mediaClient = new Media(credentials, options)
```

Where `credentials` is any option from [`@vonage/auth`](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/auth/README.md#options), and `options` is any option from [`@vonage/server-client`](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/server-client/README.md#options)

## Promises

Most methods that interact with the Vonage API uses Promises. You can either resolve these yourself, or use `await` to wait for a response.

```js
const resp = await mediaClient.listMediaItem()

mediaClient
.listMedia()
.then((resp) => console.log(resp))
.catch((err) => console.error(err))
```

## Testing

Run:

```bash
npm run test
```

[signup]: https://dashboard.nexmo.com/sign-up?utm_source=DEV_REL&utm_medium=github&utm_campaign=node-server-sdk
[license]: ../../LICENSE.txt
10 changes: 10 additions & 0 deletions packages/media/__tests__/__dataSets__/delete.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export default [
{
label: 'delete media item',
requests: [['/v3/media/00000000-0000-0000-0000-000000000000', 'DELETE']],
responses: [[204]],
clientMethod: 'deleteMediaItem',
parameters: ['00000000-0000-0000-0000-000000000000'],
expected: undefined,
},
];
Loading