Socket
Socket
Sign inDemoInstall

botframework-connector

Package Overview
Dependencies
56
Maintainers
3
Versions
542
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.14.1-dev3 to 4.14.1-dev4

4

_ts3.4/lib/auth/botFrameworkClientImpl.d.ts
import { Activity, InvokeResponse } from 'botframework-schema';
import { BotFrameworkClient } from '../skills';
import { ServiceClientCredentialsFactory } from './serviceClientCredentialsFactory';
import { AgentSettings } from '@azure/ms-rest-js/es/lib/serviceClient';
export declare class BotFrameworkClientImpl implements BotFrameworkClient {

@@ -8,5 +9,6 @@ private readonly credentialsFactory;

private readonly botFrameworkClientFetch;
constructor(credentialsFactory: ServiceClientCredentialsFactory, loginEndpoint: string, botFrameworkClientFetch?: (input: RequestInfo, init?: RequestInit) => Promise<Response>);
private readonly agentSettings?;
constructor(credentialsFactory: ServiceClientCredentialsFactory, loginEndpoint: string, botFrameworkClientFetch?: (input: RequestInfo, init?: RequestInit, agentSettings?: AgentSettings) => Promise<Response>, agentSettings?: AgentSettings);
postActivity<T>(fromBotId: string, toBotId: string, toUrl: string, serviceUrl: string, conversationId: string, activity: Activity): Promise<InvokeResponse<T>>;
}
//# sourceMappingURL=botFrameworkClientImpl.d.ts.map
import { Activity, InvokeResponse } from 'botframework-schema';
import { BotFrameworkClient } from '../skills';
import { ServiceClientCredentialsFactory } from './serviceClientCredentialsFactory';
import { AgentSettings } from '@azure/ms-rest-js/es/lib/serviceClient';
export declare class BotFrameworkClientImpl implements BotFrameworkClient {

@@ -8,5 +9,6 @@ private readonly credentialsFactory;

private readonly botFrameworkClientFetch;
constructor(credentialsFactory: ServiceClientCredentialsFactory, loginEndpoint: string, botFrameworkClientFetch?: (input: RequestInfo, init?: RequestInit) => Promise<Response>);
private readonly agentSettings?;
constructor(credentialsFactory: ServiceClientCredentialsFactory, loginEndpoint: string, botFrameworkClientFetch?: (input: RequestInfo, init?: RequestInit, agentSettings?: AgentSettings) => Promise<Response>, agentSettings?: AgentSettings);
postActivity<T>(fromBotId: string, toBotId: string, toUrl: string, serviceUrl: string, conversationId: string, activity: Activity): Promise<InvokeResponse<T>>;
}
//# sourceMappingURL=botFrameworkClientImpl.d.ts.map

@@ -21,6 +21,8 @@ "use strict";

const botbuilder_stdlib_1 = require("botbuilder-stdlib");
const botFrameworkClientFetchImpl = (input, init) => __awaiter(void 0, void 0, void 0, function* () {
const botFrameworkClientFetchImpl = (input, init, agentSettings) => __awaiter(void 0, void 0, void 0, function* () {
const config = {
headers: init.headers,
validateStatus: () => true,
httpAgent: agentSettings === null || agentSettings === void 0 ? void 0 : agentSettings.http,
httpsAgent: agentSettings === null || agentSettings === void 0 ? void 0 : agentSettings.https,
};

@@ -38,6 +40,7 @@ botbuilder_stdlib_1.assert.string(input, ['input']);

class BotFrameworkClientImpl {
constructor(credentialsFactory, loginEndpoint, botFrameworkClientFetch = botFrameworkClientFetchImpl) {
constructor(credentialsFactory, loginEndpoint, botFrameworkClientFetch = botFrameworkClientFetchImpl, agentSettings) {
this.credentialsFactory = credentialsFactory;
this.loginEndpoint = loginEndpoint;
this.botFrameworkClientFetch = botFrameworkClientFetch;
this.agentSettings = agentSettings;
botbuilder_stdlib_1.assert.maybeFunc(botFrameworkClientFetch, ['botFrameworkClientFetch']);

@@ -95,3 +98,3 @@ }

};
const response = yield this.botFrameworkClientFetch(request.url, config);
const response = yield this.botFrameworkClientFetch(request.url, config, this.agentSettings);
return { status: response.status, body: yield response.json() };

@@ -98,0 +101,0 @@ }

@@ -110,3 +110,4 @@ "use strict";

createBotFrameworkClient() {
return new botFrameworkClientImpl_1.BotFrameworkClientImpl(this.credentialsFactory, this.toChannelFromBotLoginUrl, this.botFrameworkClientFetch);
var _a;
return new botFrameworkClientImpl_1.BotFrameworkClientImpl(this.credentialsFactory, this.toChannelFromBotLoginUrl, this.botFrameworkClientFetch, (_a = this.connectorClientOptions) === null || _a === void 0 ? void 0 : _a.agentSettings);
}

@@ -113,0 +114,0 @@ JwtTokenValidation_authenticateRequest(activity, authHeader) {

@@ -5,3 +5,3 @@ {

"description": "Bot Connector is autorest generated connector client.",
"version": "4.14.1-dev3",
"version": "4.14.1-dev4",
"license": "MIT",

@@ -37,4 +37,4 @@ "keywords": [

"base64url": "^3.0.0",
"botbuilder-stdlib": "4.14.1-internal.dev3",
"botframework-schema": "4.14.1-dev3",
"botbuilder-stdlib": "4.14.1-internal.dev4",
"botframework-schema": "4.14.1-dev4",
"cross-fetch": "^3.0.5",

@@ -41,0 +41,0 @@ "jsonwebtoken": "8.0.1",

@@ -12,7 +12,14 @@ // Copyright (c) Microsoft Corporation.

import { assert } from 'botbuilder-stdlib';
import { AgentSettings } from '@azure/ms-rest-js/es/lib/serviceClient';
const botFrameworkClientFetchImpl = async (input: RequestInfo, init?: RequestInit): Promise<Response> => {
const botFrameworkClientFetchImpl = async (
input: RequestInfo,
init?: RequestInit,
agentSettings?: AgentSettings
): Promise<Response> => {
const config = {
headers: init.headers as Record<string, string>,
validateStatus: (): boolean => true,
httpAgent: agentSettings?.http,
httpsAgent: agentSettings?.https,
};

@@ -38,4 +45,6 @@

input: RequestInfo,
init?: RequestInit
) => Promise<Response> = botFrameworkClientFetchImpl
init?: RequestInit,
agentSettings?: AgentSettings
) => Promise<Response> = botFrameworkClientFetchImpl,
private readonly agentSettings?: AgentSettings
) {

@@ -112,3 +121,3 @@ assert.maybeFunc(botFrameworkClientFetch, ['botFrameworkClientFetch']);

};
const response = await this.botFrameworkClientFetch(request.url, config);
const response = await this.botFrameworkClientFetch(request.url, config, this.agentSettings);

@@ -115,0 +124,0 @@ return { status: response.status, body: await response.json() };

@@ -147,3 +147,4 @@ // Copyright (c) Microsoft Corporation.

this.toChannelFromBotLoginUrl,
this.botFrameworkClientFetch
this.botFrameworkClientFetch,
this.connectorClientOptions?.agentSettings
);

@@ -150,0 +151,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc