
Research
/Security News
Popular Tinycolor npm Package Compromised in Supply Chain Attack Affecting 40+ Packages
Malicious update to @ctrl/tinycolor on npm is part of a supply-chain attack hitting 40+ packages across maintainers
directline-api
Advanced tools
The Direct Line API is a simple REST API for connecting directly to a single bot. This API is intended for developers writing their own client applications, web chat controls, or mobile apps that will talk to their bot.
https://docs.botframework.com/en-us/restapi/directline/
npm install directline-api
Check out test/test.js for samples.
var client = require('directline-api');
// get a token
client.getToken(secret);
// create a conversation
client.createConversation(token);
// post a message in a conversation
client.postMessage(token, conversationId, {
text: 'YOUR_TEXT'
});
// post a message with an userId, userId is your unique id for message sender.
client.ask(token, conversationId, {
text: 'YOUR_TEXT',
from: 'FROM_USERID'
});
// post a file in a conversation
client.postFileMessage(token, conversationId, formData);
// get messages in a conversation
client.getMessages(token, conversationId, [watermark]);
// generate a new conversation and token
client.generateConversationAndToken(secret);
// renew a token for a conversation
client.renewConversationToken(token, conversationId);
// request with a text and get response
// https://docs.botframework.com/en-us/restapi/directline/#!/Conversations/Conversations_PostMessage
client.ask(token, conversationId, body);
npm install
touch test/conf.json # ADD secret as 'DIRECT_LINE_SECRET'
npm test
FAQs
Client for Microsoft Botframework Direct Line REST API
We found that directline-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Malicious update to @ctrl/tinycolor on npm is part of a supply-chain attack hitting 40+ packages across maintainers
Security News
pnpm's new minimumReleaseAge setting delays package updates to prevent supply chain attacks, with other tools like Taze and NCU following suit.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.