Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: adding more information about migration #849

Merged
merged 1 commit into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 98 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,98 @@

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

This is the Node.JS SDK for [Vonage APIs](https://www.vonage.com/). To use it you will need a Vonage account. Sign up [for free at vonage.com][signup].
This is the Node.JS Server SDK for [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)
* [Constructor](#constructor)
* [Promises](#promises)
* [Testing](#testing)
* [Examples](#examples)
* [References](#references)


## Installation

### With NPM

```bash
npm install @vonage/server-sdk
```

### With Yarn

```bash
yarn add @vonage/server-sdk
```

## Constructor

```js
const { Vonage } = require('@vonage/server-sdk');

const vonage = new Vonage(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 vonage.sms.send({
to: '15552220000',
from: '15559992222',
text: 'This is a test',
});
```

## Testing

Run:

```bash
npm run test
```

Or to continually watch and run tests as you change the code:

```bash
npm run test-watch
```

## Examples

See the [Vonage Node Quickstarts repo](https://github.com/Vonage/vonage-node-code-snippets).


## References

This is a [monorepo](https://en.wikipedia.org/wiki/Monorepo). You can find more information for each package below:
You can find more information for each product below:

* [Accounts](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/accounts/README.md)
* [Accounts][applications]
* [Applications](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/applications/README.md)
* [Audit](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/audit/README.md)
* [Auth](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/auth/README.md)
* [JWT](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/jwt/README.md)
* [Auth][auth]
* [JWT][jwt]
* [Messages](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/messages/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)
* [Redact](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/redact/README.md)
* [Server Client](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/server-client/README.md)
* [Server SDK](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/server-sdk/README.md)
* [SMS](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/sms/README.md)
* [SMS][sms]
* [Sub Accounts](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/subaccounts/README.md)
* [Verify](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/verify/README.md)
* [Verify V2](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/verify2/README.md)
* [Vetch](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/vetch/README.md)
* [Video](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/video/README.md)
* [Voice](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/voice/README.md)
* [Voice][voice]

## Supported APIs

Only API's marked as General Availability will be available through the [Server SDK](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/server-sdk/README.md) package. All other supported packages will have to be installed and configured outside that package.

The following is a list of Vonage APIs and whether the Node Server SDK provides support for them:

| API | API Release Status | Supported? |
Expand All @@ -51,6 +112,7 @@ The following is a list of Vonage APIs and whether the Node Server SDK provides
| Number Insight API | General Availability | ✅ |
| Number Management API | General Availability | ✅ |
| Pricing API | General Availability | ✅ |
| Proactive Connect API | Beta | ✅ |
| Redact API | Developer Preview | ✅ |
| Reports API | Beta | ❌ |
| SMS API | General Availability | ✅ |
Expand All @@ -59,5 +121,31 @@ The following is a list of Vonage APIs and whether the Node Server SDK provides
| Verify v2 API | General Availability | ✅ |
| Voice API | General Availability | ✅ |

### V2 Migrations

While most of the V2 functions have been ported into their own package, some of the functions have not been ported or were removed. Below is a list of those changes:

| V2 Function | Status | Note |
|-----------------------------|:---------------:|:------------------------------------------------------:|
| `vonage.conversion` | _REMOVED_ | |
| `vonage.conversation` | Not Implemented | This was only released as a beta package |
| `vonage.app` | _REMOVED_ | Moved to [Applications][applications] |
| `vonage.files` | Not ported | Has not been ported to V3 at this time |
| `vonage.message` | Moved | Moved to [SMS][sms] |
| `vonage.generateJwt` | Moved | Was moved to [JWT][jwt] |
| `vonage.generateSignature` | Not Ported | Has not been ported to V3 at this time |
| `vonage.calls` | Moved | Was moved to [Voice][voice] |
| `vonage.credentials` | Updated | Options can be found in [Server Client][server-client] |
| `vonage.options` | Updated | Options can be found in [Server Client][server-client] |
| `vonage.options.httpClient` | _Removed_ | |
| `vonage.options.userAgent` | Not Ported | Has not been ported to V3 at this time |

For more information, check out each packages migration guide.

[applications]: https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/applications/README.md
[auth]: https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/auth/README.md
[sms]: https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/sms/README.md
[jwt]: https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/jwt/README.md
[voice]: https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/voice/README.md
[signup]: https://dashboard.nexmo.com/sign-up?utm_source=DEV_REL&utm_medium=github&utm_campaign=node-server-sdk
[license]: LICENSE.txt
4 changes: 4 additions & 0 deletions packages/accounts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ This is the Vonage Account SDK for Node.js for use with [Vonage APIs](https://ww

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

If you are updating from V2 to V3, please check the migration guide found [here](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/accounts/v2_TO_v3_MIGRATION_GUIDE.md)

* [Installation](#installation)
* [Usage](#usage)
* [Promises](#promises)
Expand Down Expand Up @@ -96,5 +98,7 @@ Run:
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
2 changes: 2 additions & 0 deletions packages/applications/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ This is the Vonage Applications SDK for Node.js for use with [Vonage APIs](https

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

If you are updating from V2 to V3, please check the migration guide found [here](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/applications/v2_TO_v3_MIGRATION_GUIDE.md)

* [Installation](#installation)
* [Usage](#usage)
* [Promises](#promises)
Expand Down
2 changes: 2 additions & 0 deletions packages/messages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ This is the Vonage Messages SDK for Node.js for use with [Vonage APIs](https://w

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

If you are updating from V2 to V3, please check the migration guide found [here](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/messages/v2_TO_v3_MIGRATION_GUIDE.md)

* [Installation](#installation)
* [Usage](#usage)
* [Promises](#promises)
Expand Down
2 changes: 1 addition & 1 deletion packages/messages/v2_TO_v3_MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ There are no differences to the methods used for sending messages from 2.x to
If you used the classes that were made available for different messages types in
2.x, you will want to update the require statements to use:

`@vonage/messages/dist/classes/`
`@vonage/messages`

instead of the older:

Expand Down
2 changes: 2 additions & 0 deletions packages/number-insights/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ This is the Vonage Number Insights SDK for Node.js for use with [Vonage APIs](ht

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

If you are updating from V2 to V3, please check the migration guide found [here](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/number-insights/v2_TO_v3_MIGRATION_GUIDE.md)

* [Installation](#installation)
* [Usage](#usage)
* [Promises](#promises)
Expand Down
2 changes: 2 additions & 0 deletions packages/numbers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ This is the Vonage Number SDK for Node.js for use with [Vonage APIs](https://www

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

If you are updating from V2 to V3, please check the migration guide found [here](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/numbers/v2_TO_v3_MIGRATION_GUIDE.md)

* [Installation](#installation)
* [Usage](#usage)
* [Promises](#promises)
Expand Down
2 changes: 2 additions & 0 deletions packages/pricing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ This is the Vonage Pricing SDK for Node.js for use with [Vonage APIs](https://ww

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

If you are updating from V2 to V3, please check the migration guide found [here](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/pricing/v2_TO_v3_MIGRATION_GUIDE.md)

* [Installation](#installation)
* [Usage](#usage)
* [Promises](#promises)
Expand Down
37 changes: 32 additions & 5 deletions packages/server-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,28 +70,29 @@ npm run test-watch

See the [Vonage Node Quickstarts repo](https://github.com/Vonage/vonage-node-code-snippets).


## References

You can find more information for each product below:

* [Accounts](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/accounts/README.md)
* [Accounts][applications]
* [Applications](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/applications/README.md)
* [Audit](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/audit/README.md)
* [Auth](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/auth/README.md)
* [JWT](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/jwt/README.md)
* [Auth][auth]
* [JWT][jwt]
* [Messages](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/messages/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)
* [Server Client](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/server-client/README.md)
* [Server SDK](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/server-sdk/README.md)
* [SMS](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/sms/README.md)
* [SMS][sms]
* [Sub Accounts](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/subaccounts/README.md)
* [Verify](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/verify/README.md)
* [Verify V2](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/verify2/README.md)
* [Vetch](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/vetch/README.md)
* [Video](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/video/README.md)
* [Voice](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/voice/README.md)
* [Voice][voice]

## Supported APIs

Expand Down Expand Up @@ -120,5 +121,31 @@ The following is a list of Vonage APIs and whether the Node Server SDK provides
| Verify v2 API | General Availability | ✅ |
| Voice API | General Availability | ✅ |

### V2 Migrations

While most of the V2 functions have been ported into their own package, some of the functions have not been ported or were removed. Below is a list of those changes:

| V2 Function | Status | Note |
|-----------------------------|:---------------:|:------------------------------------------------------:|
| `vonage.conversion` | _REMOVED_ | |
| `vonage.conversation` | Not Implemented | This was only released as a beta package |
| `vonage.app` | _REMOVED_ | Moved to [Applications][applications] |
| `vonage.files` | Not ported | Has not been ported to V3 at this time |
| `vonage.message` | Moved | Moved to [SMS][sms] |
| `vonage.generateJwt` | Moved | Was moved to [JWT][jwt] |
| `vonage.generateSignature` | Not Ported | Has not been ported to V3 at this time |
| `vonage.calls` | Moved | Was moved to [Voice][voice] |
| `vonage.credentials` | Updated | Options can be found in [Server Client][server-client] |
| `vonage.options` | Updated | Options can be found in [Server Client][server-client] |
| `vonage.options.httpClient` | _Removed_ | |
| `vonage.options.userAgent` | Not Ported | Has not been ported to V3 at this time |

For more information, check out each packages migration guide.

[applications]: https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/applications/README.md
[auth]: https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/auth/README.md
[sms]: https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/sms/README.md
[jwt]: https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/jwt/README.md
[voice]: https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/voice/README.md
[signup]: https://dashboard.nexmo.com/sign-up?utm_source=DEV_REL&utm_medium=github&utm_campaign=node-server-sdk
[license]: LICENSE.txt
2 changes: 2 additions & 0 deletions packages/sms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ This is the Vonage SMS SDK for Node.js for use with [Vonage APIs](https://www.vo

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

If you are updating from V2 to V3, please check the migration guide found [here](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/sms/v2_TO_v3_MIGRATION_GUIDE.md)

* [Installation](#installation)
* [Usage](#usage)
* [Promises](#promises)
Expand Down
2 changes: 2 additions & 0 deletions packages/sms/v2_TO_v3_MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ $ npm install @vonage/sms
## Setup

### With the Vonage Server SDK

If you are using the main Vonage Node Server SDK, you will need to configure it using a Vonage API Key and Secret. The setup is the same for any other key/secret-based application. The SMS client will then be available as `vonage.sms`.

```js
Expand All @@ -33,6 +34,7 @@ vonage.sms.send({
```

### Standalone

This module is also capable of working as a standalone module. The only difference is that you create a `SMS` object and pass the credentials there.

```js
Expand Down
2 changes: 2 additions & 0 deletions packages/verify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Note: This package is only compatible with verify V1.

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

If you are updating from V2 to V3, please check the migration guide found [here](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/verify/v2_TO_v3_MIGRATION_GUIDE.md)

- [Installation](#installation)
- [Usage](#usage)
- [Promises](#promises)
Expand Down
2 changes: 2 additions & 0 deletions packages/voice/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ This is the Vonage Voice SDK for Node.js for use with [Vonage APIs](https://www.

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

If you are updating from V2 to V3, please check the migration guide found [here](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/voice/v2_TO_v3_MIGRATION_GUIDE.md)

* [Installation](#installation)
* [Usage](#usage)
* [Promises](#promises)
Expand Down