Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sms77-client

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sms77-client - npm Package Compare versions

Comparing version 2.5.1 to 2.6.0

4

dist/constants/byEndpoint/hooks/index.d.ts

@@ -1,2 +0,2 @@

export declare const HOOK_EVENT_TYPES: readonly ["dlr", "voice_status", "sms_mo"];
export declare const HOOK_REQUEST_METHODS: readonly ["GET", "POST"];
export declare const HOOK_EVENT_TYPES: readonly ["all", "dlr", "sms_mo", "voice_status"];
export declare const HOOK_REQUEST_METHODS: readonly ["GET", "JSON", "POST"];

@@ -5,9 +5,11 @@ "use strict";

exports.HOOK_EVENT_TYPES = [
'all',
'dlr',
'sms_mo',
'voice_status',
'sms_mo',
];
exports.HOOK_REQUEST_METHODS = [
'GET',
'JSON',
'POST',
];
{
"author": "sms77 e.K.",
"description": "API client for the Sms77.io SMS gateway",
"dependencies": {
"date-fns": "^2.16.1"
},
"devDependencies": {
"@types/node": "^12.12.6",
"@types/node-fetch": "^2.5.8",
"@types/globalthis": "^1.0.1",
"@types/uuid": "^8.3.0",
"browserify": "^17.0.0",
"jasmine-fail-fast": "^2.0.1",
"jest": "^26.6.3",
"node-fetch": "^2.6.1",
"ts-jest": "^26.4.4",
"tsify": "^5.0.2",
"typescript": "^4.1.3",
"uuid": "^8.3.2"
},
"files": [
"dist/Sms77Client.umd.js",
"dist/constants/**/*",
"dist/lib/**/*",
"dist/validators/**/*",
"dist/*.d.ts",
"dist/types/*.d.ts"
],
"keywords": [
"2fa",
"sms",
"gateway",
"text2speech",
"hlr",
"cnam",
"mnp"
],
"license": "MIT",
"main": "dist/Sms77Client.umd.js",
"name": "sms77-client",
"peerDependencies": {
"node-fetch": "^2.6.1"
},
"repository": "https://github.com/sms77io/js-client",
"scripts": {
"build": "rm -rf dist && tsc && npm run bundle",
"bundle": "node build/build.js > dist/$npm_package_sms77io_bundleName.umd.js",
"prepublishOnly": "npm run build",
"test": "npx jest"
},
"sms77io": {
"bundleName": "Sms77Client"
},
"types": "dist/Sms77Client.d.ts",
"version": "2.5.1",
"homepage": "https://github.com/sms77io/js-client"
"author": "sms77 e.K.",
"bugs": {
"email": "a.matthies@sms77.io",
"url": "https://github.com/sms77io/js-client/issues"
},
"description": "Official API client for the Sms77.io SMS gateway",
"dependencies": {
"date-fns": "^2.17.0"
},
"devDependencies": {
"@types/globalthis": "^1.0.1",
"@types/node": "^12.12.6",
"@types/node-fetch": "^2.5.8",
"@types/uuid": "^8.3.0",
"browserify": "^17.0.0",
"jasmine-fail-fast": "^2.0.1",
"jest": "^26.6.3",
"node-fetch": "^2.6.1",
"ts-jest": "^26.5.1",
"tsify": "^5.0.2",
"typescript": "^4.1.5",
"uuid": "^8.3.2"
},
"files": [
"dist/Sms77Client.umd.js",
"dist/constants/**/*",
"dist/lib/**/*",
"dist/validators/**/*",
"dist/*.d.ts",
"dist/types/*.d.ts"
],
"keywords": [
"2fa",
"sms",
"gateway",
"text2speech",
"hlr",
"cnam",
"mnp",
"tts"
],
"license": "MIT",
"main": "dist/Sms77Client.umd.js",
"name": "sms77-client",
"peerDependencies": {
"node-fetch": "^2.6.1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/sms77io/js-client.git"
},
"scripts": {
"build": "rm -rf dist && tsc && npm run bundle",
"bundle": "node build/build.js > dist/$npm_package_sms77io_bundleName.umd.js",
"prepublishOnly": "npm run build",
"test": "npx jest"
},
"sms77io": {
"bundleName": "Sms77Client"
},
"types": "dist/Sms77Client.d.ts",
"version": "2.6.0",
"homepage": "https://github.com/sms77io/js-client"
}
![Sms77.io Logo](https://www.sms77.io/wp-content/uploads/2019/07/sms77-Logo-400x79.png "Sms77.io Logo")
# JavaScript API Client for the Sms77.io SMS Gateway
## Installation
This library relies on the the global fetch API.
In order to to use it with NodeJS u need to install [node-fetch](https://github.com/node-fetch/node-fetch).
For NodeJS versions < 12 use the [globalThis polyfill](https://github.com/es-shims/globalThis).
**NPM** ```npm install sms77-client node-fetch``` **Yarn** ```yarn add sms77-client node-fetch```
**This library relies on the global fetch API.
To use this library with Node.js, [node-fetch](https://github.com/node-fetch/node-fetch) is required.**
**Browser**
For compatibility with Node.js versions < 12, please also install the [globalThis polyfill](https://github.com/es-shims/globalThis).
### Installation using NPM
```bash
npm install sms77-client
```
### Installation using Yarn
```bash
yarn add sms77-client
```
### Browser
```html

@@ -16,25 +30,27 @@ <script src="https://unpkg.com/browse/sms77-client/dist/Sms77Client.umd.js"></script>

### Example
## Example
```javascript
//const globalThis = require('globalthis')(); // uncomment if NodeJS < NodeJS versions < 12
//globalThis.fetch = require('node-fetch').default; // uncomment in NodeJS environments
//const Sms77Client = require('sms77-client'); // uncomment in NodeJS environments
// const globalThis = require('globalthis')(); // uncomment if NodeJS < NodeJS versions < 12
// globalThis.fetch = require('node-fetch').default; // uncomment in NodeJS environments
// const Sms77Client = require('sms77-client'); // uncomment in NodeJS environments
new Sms77Client('MY_SUPER_SECRET_SMS77_IO_API_KEY!')
.balance()
.then(balance => console.log(`My balance is: ${balance}`))
.catch(error => console.error(`Error while fetching: ${balance}`));
new Sms77Client("MY_SUPER_SECRET_SMS77_IO_API_KEY!")
.balance()
.then((balance) => console.log(`My balance is: ${balance}`))
.catch((error) => console.error(`Error while fetching: ${balance}`));
```
#### Tests
1. ```git clone https://github.com/sms77io/js-client```
2. ```cd js-client && npm install```
3. ```SMS77_API_KEY=InsertSms77ApiKey npm run test```
## Tests
Set ```SMS77_LIVE_TEST=1``` for live tests performing actual http requests.
1. `git clone https://github.com/sms77io/js-client`
2. `cd js-client && npm install`
3. `SMS77_API_KEY=InsertSms77ApiKey npm run test`
Set ```SMS77_DEBUG=1``` for details printed to stdout.
Set `SMS77_LIVE_TEST=1` for live tests performing actual HTTP requests.
Set `SMS77_DEBUG=1` for details printed to `stdout`.
##### Support
Need help? Feel free to send us an <a href='mailto: support@sms77.io'>email</a>.
## Support
Need help? Feel free to send us an <a href='mailto: support@sms77.io'>email</a>.
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