New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gzappy-js

Package Overview
Dependencies
Maintainers
0
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gzappy-js - npm Package Compare versions

Comparing version 0.0.15 to 0.0.16

4

dist/index.d.ts
declare class GzappyClient {
private userTokenId;
private token;
private instanceId;
private baseURL;
private api;
constructor({ userTokenId, instanceId }: GzappyClientOptions);
constructor({ token, instanceId }: GzappyClientOptions);
sendMessage(messages: string[], phones: string[]): Promise<any>;

@@ -8,0 +8,0 @@ sendMedia(message: string, mediaUrl: string, phones: string[]): Promise<any>;

@@ -38,9 +38,9 @@ "use strict";

var GzappyClient = class {
userTokenId;
token;
instanceId;
baseURL;
api;
constructor({ userTokenId, instanceId }) {
if (!userTokenId) {
throw new Error("userTokenId for gzappy-js is required");
constructor({ token, instanceId }) {
if (!token) {
throw new Error("Auth token for gzappy-js is required");
}

@@ -50,3 +50,3 @@ if (!instanceId) {

}
this.userTokenId = userTokenId;
this.token = token;
this.instanceId = instanceId;

@@ -57,3 +57,3 @@ this.baseURL = "https://api.gzappy.com/v1";

headers: {
user_token_id: this.userTokenId,
Authorization: `Bearer ${this.token}`,
"Content-Type": "application/json"

@@ -60,0 +60,0 @@ }

{
"name": "gzappy-js",
"version": "0.0.15",
"version": "0.0.16",
"description": "gzappy-js é um pacote JavaScript que facilita a integração com a API de WhatsApp da gzappy.com",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -35,2 +35,6 @@ <div align="center">

## Autenticação
A partir da versão 0.0.16, a autenticação é feita através do cabeçalho `Authorization` com o API Token gerado no painel da GZAPPY.
## Documentação

@@ -57,7 +61,7 @@

// Definição das variáveis de ambiente
const userTokenId = process.env.USER_TOKEN_ID
const instanceId = process.env.INSTANCE_ID
const token = process.env.GZAPPY_API_TOKEN
const instanceId = process.env.GZAPPY_INSTANCE_ID
// Criação de uma instância do gzappy client
const gClient = new gzappy({ userTokenId, instanceId })
const gClient = new gzappy({ token, instanceId })

@@ -69,3 +73,3 @@ // Enviando mensagens

]
const phones = ['5511999999999', '5511333333333']
const phones = ['5511999999999']

@@ -72,0 +76,0 @@ gClient

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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