apigratis-sdk-nodejs
Advanced tools
Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "apigratis-sdk-nodejs", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "A ideia desse SDK é otimizar o tempo de código dos usuários auxiliando na integração com a plataforma", | ||
@@ -5,0 +5,0 @@ "homepage": "https://apigratis.com.br", |
@@ -5,19 +5,2 @@ const axios = require("axios"); | ||
static validateCredentials(credentials) { | ||
if ( | ||
!credentials?.SecretKey || | ||
!credentials?.PublicToken || | ||
!credentials?.DeviceToken || | ||
!credentials?.BearerToken | ||
) { | ||
throw new Error("Invalid credentials"); | ||
} | ||
} | ||
static validateWBody(body) { | ||
if (!body) { | ||
throw new Error("Invalid body"); | ||
} | ||
} | ||
static async request(data) { | ||
@@ -28,5 +11,2 @@ | ||
try { | ||
this.validateCredentials(credentials); | ||
this.validateBody(body); | ||
@@ -33,0 +13,0 @@ const SERVER = "https://cluster-01.apigratis.com/api/v1/whatsapp/"; |
@@ -32,1 +32,3 @@ const APIGratis = require('apigratis-sdk-nodejs'); | ||
} | ||
teste(); |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
4
445387
5026