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

@botpress/messaging-client

Package Overview
Dependencies
Maintainers
5
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@botpress/messaging-client - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

7

dist/messaging.d.ts

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

import { AxiosInstance } from 'axios';
import { AxiosInstance, AxiosRequestConfig } from 'axios';
import { ConversationClient } from './conversations';

@@ -18,3 +18,2 @@ import { HealthClient } from './health';

authenticate(clientId: string, clientToken: string): void;
private configureHttpClient;
private getAxiosConfig;

@@ -27,4 +26,4 @@ }

auth?: MessagingAuth;
/** A custom axios instance giving more control over the HTTP client used internally. Optional */
client?: AxiosInstance;
/** A custom axios config giving more control over the HTTP client used internally. Optional */
config?: Omit<AxiosRequestConfig, 'baseURL'>;
}

@@ -31,0 +30,0 @@ export interface MessagingAuth {

@@ -15,5 +15,6 @@ "use strict";

constructor(options) {
const { url, auth, client } = options;
this.http = this.configureHttpClient(client, this.getAxiosConfig({ url }));
this.authHttp = this.configureHttpClient(client, this.getAxiosConfig({ url, auth }));
const { auth } = options;
const config = this.getAxiosConfig(options);
this.http = axios_1.default.create(config);
this.authHttp = axios_1.default.create(config);
if (auth) {

@@ -33,17 +34,7 @@ this.authenticate(auth.clientId, auth.clientToken);

}
configureHttpClient(client, config) {
if (client) {
client.interceptors.request.use((value) => {
return Object.assign(Object.assign({}, value), config);
});
return client;
}
else {
return axios_1.default.create(config);
}
getAxiosConfig({ url, config }) {
const defaultConfig = { baseURL: `${url}/api` };
return Object.assign(Object.assign({}, config), defaultConfig);
}
getAxiosConfig({ url }) {
return { baseURL: `${url}/api` };
}
}
exports.MessagingClient = MessagingClient;
{
"name": "@botpress/messaging-client",
"version": "0.0.5",
"version": "0.0.6",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "types": "dist/index.d.ts",

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