Skip to content

Commit

Permalink
Merge pull request #1494 from OfficeDev/v-hrajandira/Thirdparty-stora…
Browse files Browse the repository at this point in the history
…ge-nodejs

Create New Sample Msgext Thirdparty Storage Nodejs
  • Loading branch information
Harikrishnan-MSFT authored Jan 6, 2025
2 parents 9bb6100 + cea5353 commit 4b71e4c
Show file tree
Hide file tree
Showing 48 changed files with 10,229 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/build-complete-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,10 @@ jobs:
- project_path: 'samples/tab-nested-auth/nodejs'
name: 'tab-nested-auth'
version: '18.x'

- project_path: 'samples/msgext-thirdparty-storage/nodejs'
name: 'msgext-thirdparty-storage'
version: '18.x'

- project_path: 'samples/bot-streaming/nodejs'
name: 'bot-streaming'
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ The [Teams Toolkit](https://marketplace.visualstudio.com/items?itemName=TeamsDev
| 8 | Messaging extensions - auth and config | This sample demonstrates how to create a search Messaging Extension in Microsoft Teams that includes a configuration page and supports user authentication. | Advanced | [View](msgext-search-auth-config#cs) | | [View](msgext-search-auth-config#python) | | [View](/samples/msgext-search-auth-config/csharp/demo-manifest/msgext-search-auth-config.zip) |
| 9 | Messaging Extensions AI - Sentiment Analysis | Messaging Extension with AI capability that performs sentiment analysis (positive/negative/neutral) for messages posted in Microsoft Teams chat | Advanced | [View](msgext-ai-sentiment-analysis#cs) | [View](msgext-ai-sentiment-analysis#js) ![toolkit-icon](assets/toolkit-icon.png) | | | |
| 10 | Messaging extension - Adaptive Card based loop components | Demonstrates a Messaging Extension for Microsoft Teams that utilizes adaptive card-based loop components, enabling link unfurling and dynamic interactions within the compose area. | Advanced | [View](msgext-unfurling-ac-loop-components#cs) | [View](msgext-unfurling-ac-loop-components#nodejs) ![toolkit-icon](assets/toolkit-icon.png) | | | [View](/samples/msgext-unfurling-ac-loop-components/csharp/demo-manifest/msgext-unfurling-ac-loop-components.zip) |
| 11 | Copilot Handoff | This sample implements a Teams message extension that can be used as a plugin for Microsoft Copilot for Microsoft 365. The message extension showcases copilot handoff along with allowing users to query the Northwind Database | Advanced | | [View](msgext-copilot-handoff#js) ![toolkit-icon](assets/toolkit-icon.png) | | | |
| 11 | Copilot Handoff | This sample implements a Teams message extension that can be used as a plugin for Microsoft Copilot for Microsoft 365. The message extension showcases copilot handoff along with allowing users to query the Northwind Database | Advanced | | [View](msgext-copilot-handoff#js) ![toolkit-icon](assets/toolkit-icon.png) | | | |
| 12 | Third-Party Cloud Storage | This app enables seamless integration with third-party cloud storage providers for files dragged and dropped in Teams chats or channels. It uses the Microsoft Teams JavaScript SDK's thirdPartyCloudStorage module to fetch and upload files efficiently. | Advanced | | [View][msgext-thirdparty-storage#nodejs] ![toolkit-icon](assets/toolkit-icon.png) | | | |

#### Additional samples

Expand Down Expand Up @@ -343,6 +344,7 @@ The [Teams Toolkit](https://marketplace.visualstudio.com/items?itemName=TeamsDev
[msgext-unfurling-ac-loop-components#cs]:samples/msgext-unfurling-ac-loop-components/csharp
[msgext-search-sso-config#cs]:samples/msgext-search-sso-config/csharp
[msgext-copilot-handoff#js]:samples/msgext-copilot-handoff/ts
[msgext-thirdparty-storage#nodejs]:samples/msgext-thirdparty-storage/nodejs
[msgext-expert-finder#nodejs]:samples/msgext-expert-finder-js

[tab-sso#ts]:samples/tab-sso/nodejs
Expand Down
5 changes: 5 additions & 0 deletions samples/msgext-thirdparty-storage/nodejs/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
MicrosoftAppType=
MicrosoftAppId=
MicrosoftAppPassword=
MicrosoftAppTenantId=
BaseUrl=
15 changes: 15 additions & 0 deletions samples/msgext-thirdparty-storage/nodejs/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* eslint-disable */
module.exports = {
"extends": "standard",
"rules": {
"semi": [2, "always"],
"indent": [2, 4],
"no-return-await": 0,
"space-before-function-paren": [2, {
"named": "never",
"anonymous": "never",
"asyncArrow": "always"
}],
"template-curly-spacing": [2, "always"]
}
};
17 changes: 17 additions & 0 deletions samples/msgext-thirdparty-storage/nodejs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# TeamsFx files
env/.env.*.user
env/.env.local
.localConfigs
appManifest/build
/build

# dependencies
node_modules/

# misc
.env
.deployment
.DS_Store

# build
lib/
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"TeamsDevApp.ms-teams-vscode-extension"
]
}
73 changes: 73 additions & 0 deletions samples/msgext-thirdparty-storage/nodejs/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch App (Edge)",
"type": "msedge",
"request": "launch",
"url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}",
"cascadeTerminateToConfigurations": [
"Attach to Local Service"
],
"presentation": {
"group": "all",
"hidden": true
},
"internalConsoleOptions": "neverOpen"
},
{
"name": "Launch App (Chrome)",
"type": "chrome",
"request": "launch",
"url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}",
"cascadeTerminateToConfigurations": [
"Attach to Local Service"
],
"presentation": {
"group": "all",
"hidden": true
},
"internalConsoleOptions": "neverOpen"
},
{
"name": "Attach to Local Service",
"type": "node",
"request": "attach",
"port": 9239,
"restart": true,
"presentation": {
"group": "all",
"hidden": true
},
"internalConsoleOptions": "neverOpen"
}
],
"compounds": [
{
"name": "Debug (Edge)",
"configurations": [
"Launch App (Edge)",
"Attach to Local Service"
],
"preLaunchTask": "Start Teams App Locally",
"presentation": {
"group": "all",
"order": 1
},
"stopAll": true
},
{
"name": "Debug (Chrome)",
"configurations": [
"Launch App (Chrome)",
"Attach to Local Service"
],
"preLaunchTask": "Start Teams App Locally",
"presentation": {
"group": "all",
"order": 2
},
"stopAll": true
}
]
}
11 changes: 11 additions & 0 deletions samples/msgext-thirdparty-storage/nodejs/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"debug.onTaskErrors": "abort",
"json.schemas": [
{
"fileMatch": [
"/aad.*.json"
],
"schema": {}
}
]
}
104 changes: 104 additions & 0 deletions samples/msgext-thirdparty-storage/nodejs/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
// This file is automatically generated by Teams Toolkit.
// The teamsfx tasks defined in this file require Teams Toolkit version >= 5.0.0.
// See https://aka.ms/teamsfx-tasks for details on how to customize each task.
{
"version": "2.0.0",
"tasks": [
{
"label": "Start Teams App Locally",
"dependsOn": [
"Validate prerequisites",
"Start local tunnel",
"Provision",
"Deploy",
"Start application"
],
"dependsOrder": "sequence"
},
{
// Check all required prerequisites.
// See https://aka.ms/teamsfx-tasks/check-prerequisites to know the details and how to customize the args.
"label": "Validate prerequisites",
"type": "teamsfx",
"command": "debug-check-prerequisites",
"args": {
"prerequisites": [
"nodejs", // Validate if Node.js is installed.
"m365Account", // Sign-in prompt for Microsoft 365 account, then validate if the account enables the sideloading permission.
"portOccupancy" // Validate available ports to ensure those debug ones are not occupied.
],
"portOccupancy": [
3978 // app service port
]
}
},
{
// Start the local tunnel service to forward public URL to local port and inspect traffic.
// See https://aka.ms/teamsfx-tasks/local-tunnel for the detailed args definitions.
"label": "Start local tunnel",
"type": "teamsfx",
"command": "debug-start-local-tunnel",
"args": {
"type": "dev-tunnel",
"ports": [
{
"portNumber": 3978,
"protocol": "http",
"access": "public",
"writeToEnvironmentFile": {
"endpoint": "BOT_ENDPOINT", // output tunnel endpoint as BOT_ENDPOINT
"domain": "BOT_DOMAIN" // output tunnel domain as BOT_DOMAIN
}
}
],
"env": "local"
},
"isBackground": true,
"problemMatcher": "$teamsfx-local-tunnel-watch"
},
{
// Create the debug resources.
// See https://aka.ms/teamsfx-tasks/provision to know the details and how to customize the args.
"label": "Provision",
"type": "teamsfx",
"command": "provision",
"args": {
"env": "local"
}
},
{
// Build project.
// See https://aka.ms/teamsfx-tasks/deploy to know the details and how to customize the args.
"label": "Deploy",
"type": "teamsfx",
"command": "deploy",
"args": {
"env": "local"
}
},
{
"label": "Start application",
"type": "shell",
"command": "npm run dev:teamsfx",
"isBackground": true,
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": {
"pattern": [
{
"regexp": "^.*$",
"file": 0,
"location": 1,
"message": 2
}
],
"background": {
"activeOnStart": true,
"beginsPattern": "[nodemon] starting",
"endsPattern": "Server listening on http://localhost:"
}
}
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 4b71e4c

Please sign in to comment.