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

@saysimple/node-sdk

Package Overview
Dependencies
Maintainers
3
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@saysimple/node-sdk - npm Package Compare versions

Comparing version

to
0.0.15

4

CHANGELOG.md
# 🚧 Changelog 🚧
## Latest
**25 February 2022**
- Added optional x-client-ip header to http client initiation
## V0.0.14
**27 January 2022**

@@ -5,0 +9,0 @@ - Added get unique conversations

2

dist/base/http-client.d.ts

@@ -17,5 +17,5 @@ import { Method } from "axios";

headers?: {
[name: string]: string;
[name: string]: string | undefined;
};
}
export {};

@@ -27,2 +27,3 @@ "use strict";

var _a;
var _b;
if (apiToken === void 0) { apiToken = ""; }

@@ -36,3 +37,3 @@ if (privateKey === void 0) { privateKey = ""; }

}
return new intelligence_1.Intelligence(new http_client_1.HttpClient({ baseUrl: config.baseUrl }, new saysimple_authorization_1.SaySimpleAuthorization((_a = config.authenticationUrl) !== null && _a !== void 0 ? _a : "https://api.saysimple.io/v1/auth/authenticate", apiToken, privateKey)));
return new intelligence_1.Intelligence(new http_client_1.HttpClient({ baseUrl: config.baseUrl, headers: (_a = {}, _a["x-client-ip"] = config.xClientIp, _a) }, new saysimple_authorization_1.SaySimpleAuthorization((_b = config.authenticationUrl) !== null && _b !== void 0 ? _b : "https://api.saysimple.io/v1/auth/authenticate", apiToken, privateKey)));
}

@@ -39,0 +40,0 @@ module.exports = {

export interface IntelligenceV1FactoryMethodConfig {
baseUrl: string;
authenticationUrl: string;
xClientIp: string;
}

@@ -6,3 +6,3 @@ {

"repository": "https://github.com/saysimple/node-sdk",
"version": "0.0.14",
"version": "0.0.15",
"description": "The official SaySimple Node SDK. Want to use our awesome customer conversations platform? Please visit: https://saysimple.com",

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

@@ -78,3 +78,3 @@ import { AxiosInstance, AxiosRequestConfig, AxiosResponse, Method } from "axios";

baseUrl?: string,
headers?: { [name: string]: string }
headers?: { [name: string]: string | undefined }
}

@@ -20,3 +20,3 @@ import { HttpClient } from "./base/http-client";

new HttpClient(
{ baseUrl: config.baseUrl },
{ baseUrl: config.baseUrl, headers: { [ "x-client-ip" ]: config.xClientIp } },
new SaySimpleAuthorization(

@@ -23,0 +23,0 @@ config.authenticationUrl ?? "https://api.saysimple.io/v1/auth/authenticate",

export interface IntelligenceV1FactoryMethodConfig {
baseUrl: string,
authenticationUrl: string
authenticationUrl: string,
xClientIp: string
}

@@ -30,3 +30,6 @@ import "jest-extended";

const expectedHttpClientConfig = {
baseUrl: "https://secret-url.com/"
baseUrl : "https://secret-url.com/",
headers : {
"x-client-ip": "192.168.1337.45",
},
};

@@ -38,3 +41,4 @@

{
baseUrl: "https://secret-url.com"
baseUrl : "https://secret-url.com",
xClientIp : "192.168.1337.45"
}

@@ -59,3 +63,4 @@ );

authenticationUrl : "www.saysimple.com/auth",
baseUrl : "www.saysimple.com/"
baseUrl : "www.saysimple.com/",
xClientIp : "192.168.1337.45",
}

@@ -62,0 +67,0 @@ );