Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@microsoft/teams-js
Advanced tools
@microsoft/teams-js is a JavaScript library that allows developers to integrate their web applications with Microsoft Teams. It provides a set of APIs to interact with Teams features such as authentication, notifications, and user context.
Authentication
This feature allows you to authenticate users within your Teams application. The code sample demonstrates how to initiate an authentication flow using the `microsoftTeams.authentication.authenticate` method.
const microsoftTeams = require('@microsoft/teams-js');
microsoftTeams.authentication.authenticate({
url: window.location.origin + '/auth-start',
width: 600,
height: 535,
successCallback: (result) => {
console.log('Authentication successful:', result);
},
failureCallback: (reason) => {
console.log('Authentication failed:', reason);
}
});
Notifications
This feature allows you to show notifications to users within your Teams application. The code sample demonstrates how to display a notification using the `microsoftTeams.notifications.showNotification` method.
const microsoftTeams = require('@microsoft/teams-js');
microsoftTeams.notifications.showNotification({
message: 'This is a notification',
duration: 3000
});
User Context
This feature allows you to retrieve the context of the user within Teams. The code sample demonstrates how to get the user context using the `microsoftTeams.getContext` method.
const microsoftTeams = require('@microsoft/teams-js');
microsoftTeams.getContext((context) => {
console.log('User context:', context);
});
The `botbuilder` package is part of the Microsoft Bot Framework and allows developers to create bots that can interact with users in Microsoft Teams. It provides functionalities for handling messages, dialogs, and other interactions within Teams, making it a good alternative for building conversational experiences.
The `office-js` package is used for developing Office Add-ins, including those for Microsoft Teams. It provides APIs to interact with Office applications and services, and can be used to extend the functionality of Teams by integrating with other Office 365 services.
This JavaScript library is part of the Microsoft Teams developer platform. For documentation, see Reference: Microsoft Teams JavaScript library.
yarn install
gulp
To install the stable version:
npm install --save @microsoft/teams-js
yarn add @microsoft/teams-js
You can access these files on unpkg, download them, or point your package manager to them.
Install either using npm or yarn
If you are using any dependency loader such as RequireJS or SystemJS or module bundler such as browserify, webpack, you can use import
syntax to import specific modules. For e.g.
import * as microsoftTeams from "@microsoft/teams-js";
Reference the library inside of your .html
page using:
<!-- Microsoft Teams JavaScript API (via CDN) -->
<script src="https://unpkg.com/@microsoft/teams-js@1.3.6/dist/MicrosoftTeams.min.js" integrity="sha384-bw/tQKCO7OgnYN29MFvAaRlOI7YaLpqeRtWhE//yfPA9pFx5THAydRA7o43Vt2JS" crossorigin="anonymous"></script>
<!-- Microsoft Teams JavaScript API (via npm) -->
<script src="node_modules/@microsoft/teams-js@1.3.6/dist/MicrosoftTeams.min.js"></script>
<!-- Microsoft Teams JavaScript API (via local) -->
<script src="MicrosoftTeams.min.js"></script>
We strongly welcome and encourage contributions to this project. Please read the contributor's guide.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
FAQs
Microsoft Client SDK for building app for Microsoft hosts
The npm package @microsoft/teams-js receives a total of 95,092 weekly downloads. As such, @microsoft/teams-js popularity was classified as popular.
We found that @microsoft/teams-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.