@vonage/redact
Advanced tools
Comparing version 1.2.0 to 1.3.0
{ | ||
"name": "@vonage/redact", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Delete data from the Vonage platform.", | ||
@@ -29,6 +29,6 @@ "homepage": "https://github.com/vonage/vonage-node-sdk/tree/main/packages/redact#readme", | ||
"dependencies": { | ||
"@vonage/server-client": "^1.3.0" | ||
"@vonage/server-client": "^1.4.0" | ||
}, | ||
"devDependencies": { | ||
"@vonage/auth": "^1.2.0", | ||
"@vonage/auth": "^1.3.0", | ||
"nock": "^13.3.0" | ||
@@ -35,0 +35,0 @@ }, |
# Vonage Redact SDK for Node.js | ||
![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/vonage/vonage-node-sdk/Vonage/3.x?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/npm/v/@vonage/redact) | ||
[![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/redact?label=License&style=flat-square)][license] | ||
![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/redact?label=%40vonage%2Fredact&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 Redact (for version 1) 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]. | ||
This is the Vonage Redact (for version 1) 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]. | ||
We recommend using this package as part of the overall | ||
[`@vonage/server-sdk` package](https://github.com/vonage/vonage-node-sdk). | ||
For full API documentation refer to [developer.vonage.com](https://developer.vonage.com/). | ||
For full API documentation refer to | ||
[developer.vonage.com](https://developer.vonage.com/). | ||
- [Installation](#installation) | ||
- [Usage](#using-the-vonage-redact-sdk) | ||
- [Usage](#usage) | ||
- [Promises](#promises) | ||
@@ -28,8 +18,5 @@ - [Testing](#testing) | ||
We recommend using this SDK as part of the overall | ||
[`@vonage/server-sdk` package](https://github.com/vonage/vonage-node-sdk). | ||
Please see the main package for installation. | ||
We recommend using this SDK as part of the overall [`@vonage/server-sdk` package](https://github.com/vonage/vonage-node-sdk). Please see the main package for installation. | ||
You can also use this SDK standalone if you only need access to just the | ||
Redact API. | ||
You can also use this SDK standalone if you only need access to just the Redact API. | ||
@@ -48,3 +35,3 @@ ### With NPM | ||
## Using the Vonage Redact SDK | ||
## Usage | ||
@@ -61,4 +48,4 @@ ### As part of the Vonage Server SDK | ||
const credentials = { | ||
apiKey: API_KEY, | ||
apiSecret: API_SECRET, | ||
apiKey: API_KEY, | ||
apiSecret: API_SECRET, | ||
} | ||
@@ -70,9 +57,9 @@ | ||
vonage.redact | ||
.redactMessage({ | ||
id: '209ab3c7536542b91e8b5aef032f6861', | ||
product: ProductType.SMS, | ||
type: Type.INBOUND, | ||
}) | ||
.then((resp) => console.log(resp)) | ||
.catch((err) => console.error(err)) | ||
.redactMessage({ | ||
id: '209ab3c7536542b91e8b5aef032f6861', | ||
product: ProductType.SMS, | ||
type: Type.INBOUND, | ||
}) | ||
.then((resp) => console.log(resp)) | ||
.catch((err) => console.error(err)) | ||
``` | ||
@@ -82,7 +69,3 @@ | ||
The SDK can be used standalone from the main | ||
[Vonage Server SDK for Node.js](https://github.com/vonage/vonage-node-sdk) if | ||
you only need to use the Messages API. All you need to do is | ||
`require('@vonage/redact')`, and use the returned object to create your own | ||
client. | ||
Unlike the other SDK's this package is not include in the [Vonage Server SDK for Node.js](https://github.com/vonage/vonage-node-sdk) | ||
@@ -101,26 +84,24 @@ ```js | ||
Where `credentials` is any option from [`@vonage/auth`](https://github.com/Vonage/vonage-node-sdk/tree/3.x/readme/packages/auth#options), | ||
and `options` is any option from [`@vonage/server-client`](https://github.com/Vonage/vonage-node-sdk/tree/3.x/readme/packages/server-client#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. | ||
Most methods that interact with the Vonage API uses Promises. You can eitherresolve these yourself, or use `await` to wait for a response. | ||
```js | ||
const resp = await vonage.redact | ||
.redactMessage({ | ||
id: '209ab3c7536542b91e8b5aef032f6861', | ||
product: ProductType.SMS, | ||
type: Type.INBOUND, | ||
}); | ||
.redactMessage({ | ||
id: '209ab3c7536542b91e8b5aef032f6861', | ||
product: ProductType.SMS, | ||
type: Type.INBOUND, | ||
}); | ||
vonage.redact | ||
.redactMessage({ | ||
id: '209ab3c7536542b91e8b5aef032f6861', | ||
product: ProductType.SMS, | ||
type: Type.INBOUND, | ||
}) | ||
.then((resp) => console.log(resp)) | ||
.catch((err) => console.error(err)) | ||
.redactMessage({ | ||
id: '209ab3c7536542b91e8b5aef032f6861', | ||
product: ProductType.SMS, | ||
type: Type.INBOUND, | ||
}) | ||
.then((resp) => console.log(resp)) | ||
.catch((err) => console.error(err)) | ||
``` | ||
@@ -127,0 +108,0 @@ |
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
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
14986
113
Updated@vonage/server-client@^1.4.0