()
58 | .UseApplicationInsights()
59 | .Build();
60 |
61 | host.Run();
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/CSharp/Samples/Microsoft.Bot.Connector.Teams.SampleBot.ASPCore/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:63797/",
7 | "sslPort": 0
8 | }
9 | },
10 | "profiles": {
11 | "IIS Express": {
12 | "commandName": "IISExpress",
13 | "launchBrowser": true,
14 | "environmentVariables": {
15 | "ASPNETCORE_ENVIRONMENT": "Development"
16 | }
17 | },
18 | "Microsoft.Bot.Connector.Teams.SampleBot.ASPCore": {
19 | "commandName": "Project",
20 | "launchBrowser": true,
21 | "launchUrl": "api/values",
22 | "environmentVariables": {
23 | "ASPNETCORE_ENVIRONMENT": "Development"
24 | },
25 | "applicationUrl": "http://localhost:63798"
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/CSharp/Samples/Microsoft.Bot.Connector.Teams.SampleBot.ASPCore/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "IncludeScopes": false,
4 | "LogLevel": {
5 | "Default": "Debug",
6 | "System": "Information",
7 | "Microsoft": "Information"
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/CSharp/Samples/Microsoft.Bot.Connector.Teams.SampleBot.ASPCore/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "MicrosoftAppId": "",
3 | "MicrosoftAppPassword": "",
4 | "AllowedTenants": "",
5 | "Logging": {
6 | "IncludeScopes": false,
7 | "LogLevel": {
8 | "Default": "Warning"
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/CSharp/Samples/Microsoft.Bot.Connector.Teams.SampleBot.Shared/Microsoft.Bot.Connector.Teams.SampleBot.Shared.projitems:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 | true
6 | 3aa653dd-a278-4c8d-a0c8-1dfd47446ec0
7 |
8 |
9 | Microsoft.Bot.Connector.Teams.SampleBot.Shared
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/CSharp/Samples/Microsoft.Bot.Connector.Teams.SampleBot.Shared/Microsoft.Bot.Connector.Teams.SampleBot.Shared.shproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 3aa653dd-a278-4c8d-a0c8-1dfd47446ec0
5 | 14.0
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/CSharp/Samples/Microsoft.Bot.Connector.Teams.SampleBot/App_Start/WebApiConfig.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license.
3 | //
4 | // Microsoft Bot Framework: http://botframework.com
5 | // Microsoft Teams: https://dev.office.com/microsoft-teams
6 | //
7 | // Bot Builder SDK GitHub:
8 | // https://github.com/Microsoft/BotBuilder
9 | //
10 | // Bot Builder SDK Extensions for Teams
11 | // https://github.com/OfficeDev/BotBuilder-MicrosoftTeams
12 | //
13 | // Copyright (c) Microsoft Corporation
14 | // All rights reserved.
15 | //
16 | // MIT License:
17 | // Permission is hereby granted, free of charge, to any person obtaining
18 | // a copy of this software and associated documentation files (the
19 | // "Software"), to deal in the Software without restriction, including
20 | // without limitation the rights to use, copy, modify, merge, publish,
21 | // distribute, sublicense, and/or sell copies of the Software, and to
22 | // permit persons to whom the Software is furnished to do so, subject to
23 | // the following conditions:
24 | //
25 | // The above copyright notice and this permission notice shall be
26 | // included in all copies or substantial portions of the Software.
27 | //
28 | // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
29 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
30 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
31 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
32 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
33 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
34 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35 |
36 | namespace Microsoft.Bot.Connector.Teams.SampleBot
37 | {
38 | using System.Web.Http;
39 |
40 | ///
41 | /// Web API configuration.
42 | ///
43 | public static class WebApiConfig
44 | {
45 | ///
46 | /// Registers the API configuration.
47 | ///
48 | /// The configuration.
49 | public static void Register(HttpConfiguration config)
50 | {
51 | // Web API configuration and services
52 |
53 | // Web API routes
54 | config.MapHttpAttributeRoutes();
55 |
56 | config.Routes.MapHttpRoute(
57 | name: "DefaultApi",
58 | routeTemplate: "api/{controller}/{id}",
59 | defaults: new { id = RouteParameter.Optional });
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/CSharp/Samples/Microsoft.Bot.Connector.Teams.SampleBot/Global.asax:
--------------------------------------------------------------------------------
1 | <%@ Application Codebehind="Global.asax.cs" Inherits="Microsoft.Bot.Connector.Teams.SampleBot.WebApiApplication" Language="C#" %>
2 |
--------------------------------------------------------------------------------
/CSharp/Samples/Microsoft.Bot.Connector.Teams.SampleBot/Global.asax.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license.
3 | //
4 | // Microsoft Bot Framework: http://botframework.com
5 | // Microsoft Teams: https://dev.office.com/microsoft-teams
6 | //
7 | // Bot Builder SDK GitHub:
8 | // https://github.com/Microsoft/BotBuilder
9 | //
10 | // Bot Builder SDK Extensions for Teams
11 | // https://github.com/OfficeDev/BotBuilder-MicrosoftTeams
12 | //
13 | // Copyright (c) Microsoft Corporation
14 | // All rights reserved.
15 | //
16 | // MIT License:
17 | // Permission is hereby granted, free of charge, to any person obtaining
18 | // a copy of this software and associated documentation files (the
19 | // "Software"), to deal in the Software without restriction, including
20 | // without limitation the rights to use, copy, modify, merge, publish,
21 | // distribute, sublicense, and/or sell copies of the Software, and to
22 | // permit persons to whom the Software is furnished to do so, subject to
23 | // the following conditions:
24 | //
25 | // The above copyright notice and this permission notice shall be
26 | // included in all copies or substantial portions of the Software.
27 | //
28 | // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
29 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
30 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
31 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
32 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
33 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
34 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35 |
36 | namespace Microsoft.Bot.Connector.Teams.SampleBot
37 | {
38 | using System.Configuration;
39 | using System.Web.Http;
40 |
41 | ///
42 | /// Web application lifecycle management.
43 | ///
44 | ///
45 | public class WebApiApplication : System.Web.HttpApplication
46 | {
47 | ///
48 | /// Executed on IIS app start.
49 | ///
50 | protected void Application_Start()
51 | {
52 | GlobalConfiguration.Configure(WebApiConfig.Register);
53 | }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/CSharp/Samples/Microsoft.Bot.Connector.Teams.SampleBot/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Microsoft.Bot.Connector.Teams.SampleBot")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Microsoft.Bot.Connector.Teams.SampleBot")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("d3261462-9ccb-430c-a63d-4ada0103d0ac")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Revision and Build Numbers
33 | // by using the '*' as shown below:
34 | [assembly: AssemblyVersion("1.0.0.0")]
35 | [assembly: AssemblyFileVersion("1.0.0.0")]
36 |
--------------------------------------------------------------------------------
/CSharp/Samples/Microsoft.Bot.Connector.Teams.SampleBot/Web.Debug.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
29 |
30 |
--------------------------------------------------------------------------------
/CSharp/Samples/Microsoft.Bot.Connector.Teams.SampleBot/Web.Release.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
19 |
30 |
31 |
--------------------------------------------------------------------------------
/CSharp/Samples/Microsoft.Bot.Connector.Teams.SampleBot/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CSharp/Settings.StyleCop:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | preprocessor,pre-processor
5 | shortlived,short-lived
6 |
7 |
8 |
9 |
10 |
11 |
12 | \.g\.cs$
13 | \.generated\.cs$
14 | \.g\.i\.cs$
15 | TemporaryGeneratedFile_.*\.cs$
16 | AssemblyInfo.*\.cs$
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | False
27 |
28 |
29 |
30 |
31 |
32 | as
33 | do
34 | id
35 | if
36 | in
37 | ip
38 | is
39 | mx
40 | my
41 | no
42 | on
43 | to
44 | ui
45 | vs
46 | x
47 | y
48 | z
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 | False
57 |
58 |
59 |
60 |
61 |
62 | False
63 |
64 |
65 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.NetFramework/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Microsoft.Bot.Connector.Teams.Tests")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Microsoft.Bot.Connector.Teams.Tests")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("d63af194-744a-4207-a223-b6cfb5a0d6c5")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.NetFramework/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.NetFramework/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.Shared/ActivityExtensionsTests.cs:
--------------------------------------------------------------------------------
1 |
2 |
3 | //
4 | // Copyright (c) Microsoft. All rights reserved.
5 | // Licensed under the MIT license.
6 | //
7 | // Microsoft Teams: https://dev.office.com/microsoft-teams
8 | //
9 | // Bot Builder Microsoft Teams SDK GitHub
10 | // https://github.com/OfficeDev/BotBuilder-MicrosoftTeams
11 | //
12 | // Copyright (c) Microsoft Corporation
13 | // All rights reserved.
14 | //
15 | // MIT License:
16 | // Permission is hereby granted, free of charge, to any person obtaining
17 | // a copy of this software and associated documentation files (the
18 | // "Software"), to deal in the Software without restriction, including
19 | // without limitation the rights to use, copy, modify, merge, publish,
20 | // distribute, sublicense, and/or sell copies of the Software, and to
21 | // permit persons to whom the Software is furnished to do so, subject to
22 | // the following conditions:
23 | //
24 | // The above copyright notice and this permission notice shall be
25 | // included in all copies or substantial portions of the Software.
26 | //
27 | // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
28 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
29 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
30 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
31 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
32 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
33 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34 | //
35 |
36 | namespace Microsoft.Bot.Connector.Teams.Tests
37 | {
38 | using System;
39 | using System.Collections.Generic;
40 | using System.Text;
41 | using Microsoft.VisualStudio.TestTools.UnitTesting;
42 |
43 | ///
44 | /// Generic activity extensions tests.
45 | ///
46 | [TestClass]
47 | public class ActivityExtensionsTests
48 | {
49 | ///
50 | /// Activity extensions tests for strip mentions with mentions in it.
51 | ///
52 | public void ActivityExtensions_StripMentionsWithMentionsInIt()
53 | {
54 |
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.Shared/Jsons/SampleActivity2AtMentions.json:
--------------------------------------------------------------------------------
1 | {
2 | "text": "Test Bot 1 TestBot2 TestMessage",
3 | "textFormat": "plain",
4 | "attachments": [
5 | {
6 | "contentType": "text/html",
7 | "content": "Test Bot 1 TestBot2 TestMessage
"
8 | }
9 | ],
10 | "type": "message",
11 | "timestamp": "2017-04-25T22:14:10.626Z",
12 | "id": "1493158451219",
13 | "channelId": "msteams",
14 | "serviceUrl": "https://smba.trafficmanager.net/amer-client-ss.msg/",
15 | "from": {
16 | "id": "29:15WjgbDbuckdlwGz_Maqg6r0H3tKwOhZaj9VCKO4O20VD-hULRlwweUaiXT_dimbE6tEjtkfJPhav6pC8Eh9tbQ",
17 | "name": "Test"
18 | },
19 | "conversation": {
20 | "isGroup": true,
21 | "id": "19:ChannelID@thread.skype;messageid=1493158451000"
22 | },
23 | "recipient": {
24 | "id": "28:310f9d19-f5e7-4b13-a535-75f25f36232e",
25 | "name": "TestBot2"
26 | },
27 | "entities": [
28 | {
29 | "mentioned": {
30 | "id": "28:e2f318df-469d-4494-8efd-d6e16da873be",
31 | "name": "Test Bot 1"
32 | },
33 | "text": "Test Bot 1",
34 | "type": "mention"
35 | },
36 | {
37 | "mentioned": {
38 | "id": "28:310f9d19-f5e7-4b13-a535-75f25f36232e",
39 | "name": "TestBot2"
40 | },
41 | "text": "TestBot2",
42 | "type": "mention"
43 | },
44 | {
45 | "locale": "en-US",
46 | "country": "US",
47 | "platform": "Windows",
48 | "type": "clientInfo"
49 | }
50 | ],
51 | "channelData": {
52 | "channel": {
53 | "id": "19:ChannelID@thread.skype"
54 | },
55 | "team": {
56 | "id": "19:TeamID@thread.skype"
57 | },
58 | "tenant": {
59 | "id": "b401cedf-7465-4c41-8f52-9b31a19f6826"
60 | }
61 | }
62 | }
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.Shared/Jsons/SampleActivityAtMention.json:
--------------------------------------------------------------------------------
1 | {
2 | "text": "Test Message",
3 | "textFormat": "plain",
4 | "attachments": [
5 | {
6 | "contentType": "text/html",
7 | "content": "TestBot Test Message
"
8 | }
9 | ],
10 | "type": "message",
11 | "timestamp": "2017-03-31T00:12:59.893Z",
12 | "id": "1400900100700",
13 | "channelId": "msteams",
14 | "serviceUrl": "https://smba.trafficmanager.net/amer-client-ss.msg/",
15 | "from": {
16 | "id": "29:SAMPLEID",
17 | "name": "SAMPLE USER"
18 | },
19 | "conversation": {
20 | "isGroup": true,
21 | "id": "19:ThreadID@thread.skype;messageid=1400900100700"
22 | },
23 | "recipient": {
24 | "id": "28:f7c72d1a-9892-42b7-8fe0-6fb6e7c85851",
25 | "name": "TestBot"
26 | },
27 | "entities": [
28 | {
29 | "mentioned": {
30 | "id": "28:f7c72d1a-9892-42b7-8fe0-6fb6e7c85851",
31 | "name": "TestBot"
32 | },
33 | "text": "TestBot",
34 | "type": "mention"
35 | },
36 | {
37 | "locale": "en-US",
38 | "country": "US",
39 | "platform": "Windows",
40 | "type": "clientInfo"
41 | }
42 | ],
43 | "channelData": {
44 | "channel": {
45 | "id": "19:ThreadID@thread.skype"
46 | },
47 | "team": {
48 | "id": "19:ThreadID@thread.skype"
49 | },
50 | "tenant": {
51 | "id": "3b9e9fbb-ed2f-415b-b776-cf788e573366"
52 | }
53 | }
54 | }
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.Shared/Jsons/SampleActivityChannelCreated.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "conversationUpdate",
3 | "timestamp": "2017-03-31T00:12:59.893Z",
4 | "id": "1400900100700",
5 | "channelId": "msteams",
6 | "serviceUrl": "https://smba.trafficmanager.net/amer-client-ss.msg/",
7 | "from": {
8 | "id": "29:SAMPLEID"
9 | },
10 | "conversation": {
11 | "isGroup": true,
12 | "id": "19:ThreadID@thread.skype;messageid=1400900100700"
13 | },
14 | "recipient": {
15 | "id": "28:f7c72d1a-9892-42b7-8fe0-6fb6e7c85851",
16 | "name": "TestBot"
17 | },
18 | "channelData": {
19 | "channel": {
20 | "id": "19:Channel@thread.skype",
21 | "name": "Channel2"
22 | },
23 | "team": {
24 | "id": "19:ThreadID@thread.skype"
25 | },
26 | "eventType": "channelCreated",
27 | "tenant": {
28 | "id": "3b9e9fbb-ed2f-415b-b776-cf788e573366"
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.Shared/Jsons/SampleActivityChannelDeleted.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "conversationUpdate",
3 | "timestamp": "2017-03-31T00:12:59.893Z",
4 | "id": "1400900100700",
5 | "channelId": "msteams",
6 | "serviceUrl": "https://smba.trafficmanager.net/amer-client-ss.msg/",
7 | "from": {
8 | "id": "29:SAMPLEID"
9 | },
10 | "conversation": {
11 | "isGroup": true,
12 | "id": "19:ThreadID@thread.skype;messageid=1400900100700"
13 | },
14 | "recipient": {
15 | "id": "28:f7c72d1a-9892-42b7-8fe0-6fb6e7c85851",
16 | "name": "TestBot"
17 | },
18 | "channelData": {
19 | "channel": {
20 | "id": "19:Channel@thread.skype",
21 | "name": "Channel2"
22 | },
23 | "team": {
24 | "id": "19:ThreadID@thread.skype"
25 | },
26 | "eventType": "channelDeleted",
27 | "tenant": {
28 | "id": "3b9e9fbb-ed2f-415b-b776-cf788e573366"
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.Shared/Jsons/SampleActivityChannelRenamed.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "conversationUpdate",
3 | "timestamp": "2017-03-31T00:12:59.893Z",
4 | "id": "1400900100700",
5 | "channelId": "msteams",
6 | "serviceUrl": "https://smba.trafficmanager.net/amer-client-ss.msg/",
7 | "from": {
8 | "id": "29:SAMPLEID"
9 | },
10 | "conversation": {
11 | "isGroup": true,
12 | "id": "19:ThreadID@thread.skype;messageid=1400900100700"
13 | },
14 | "recipient": {
15 | "id": "28:f7c72d1a-9892-42b7-8fe0-6fb6e7c85851",
16 | "name": "TestBot"
17 | },
18 | "channelData": {
19 | "channel": {
20 | "id": "19:Channel2@thread.skype",
21 | "name": "Channel3"
22 | },
23 | "team": {
24 | "id": "19:ThreadID@thread.skype"
25 | },
26 | "eventType": "channelRenamed",
27 | "tenant": {
28 | "id": "3b9e9fbb-ed2f-415b-b776-cf788e573366"
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.Shared/Jsons/SampleActivityComposeExtension.json:
--------------------------------------------------------------------------------
1 | {
2 | "text": "Test",
3 | "textFormat": "plain",
4 | "type": "invoke",
5 | "name": "composeExtension/query",
6 | "timestamp": "2017-04-25T22:29:14.158Z",
7 | "id": "1493159353121",
8 | "channelId": "msteams",
9 | "serviceUrl": "https://smba.trafficmanager.net/amer-client-ss.msg/",
10 | "from": {
11 | "id": "29:Key",
12 | "name": "TestUser"
13 | },
14 | "conversation": {
15 | "id": "ConversationId"
16 | },
17 | "recipient": {
18 | "id": "28:00000000-1111-2222-3333-444444444444",
19 | "name": "TestBot"
20 | },
21 | "entities": [
22 | {
23 | "locale": "en-US",
24 | "country": "US",
25 | "platform": "Windows",
26 | "type": "clientInfo"
27 | }
28 | ],
29 | "channelData": {
30 | "tenant": {
31 | "id": "0fb0a2ff-2539-417a-8514-7f3b695024fd"
32 | }
33 | },
34 | "value": {
35 | "commandId": "testQuery",
36 | "parameters": [
37 | {
38 | "name": "selectedQueryJson",
39 | "value": "Value"
40 | }
41 | ]
42 | }
43 | }
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.Shared/Jsons/SampleActivityConversationUpdateWithAADObjectId.json:
--------------------------------------------------------------------------------
1 | {
2 | "membersAdded": [
3 | {
4 | "id": "29:uniqueId",
5 | "aadObjectId": "d2ffaeab-d802-4fec-8580-0987e9ad2628"
6 | },
7 | {
8 | "id": "28:uniqueId"
9 | }
10 | ],
11 | "type": "conversationUpdate",
12 | "timestamp": "2018-07-17T03:34:27.521Z",
13 | "id": "f:d23bdb9e",
14 | "channelId": "msteams",
15 | "serviceUrl": "https://smba.trafficmanager.net/amer/",
16 | "from": {
17 | "id": "29:uniqueId",
18 | "aadObjectId": "d2ffaeab-d802-4fec-8580-0987e9ad2628"
19 | },
20 | "conversation": {
21 | "conversationType": "personal",
22 | "id": "a:uniqueID"
23 | },
24 | "recipient": {
25 | "id": "28:uniqueId",
26 | "name": "Bot Name"
27 | },
28 | "channelData": {
29 | "tenant": {
30 | "id": "09e852a2-4575-45f7-9586-7cc3acfdc715"
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.Shared/Jsons/SampleActivityInvoke.json:
--------------------------------------------------------------------------------
1 | {
2 | "text": "Test",
3 | "textFormat": "plain",
4 | "type": "invoke",
5 | "timestamp": "2017-04-25T22:29:14.158Z",
6 | "id": "1493159353121",
7 | "channelId": "msteams",
8 | "serviceUrl": "https://smba.trafficmanager.net/amer-client-ss.msg/",
9 | "from": {
10 | "id": "29:Key",
11 | "name": "TestUser"
12 | },
13 | "conversation": {
14 | "id": "ConversationId"
15 | },
16 | "recipient": {
17 | "id": "28:00000000-1111-2222-3333-444444444444",
18 | "name": "TestBot"
19 | },
20 | "entities": [
21 | {
22 | "locale": "en-US",
23 | "country": "US",
24 | "platform": "Windows",
25 | "type": "clientInfo"
26 | }
27 | ],
28 | "channelData": {
29 | "tenant": {
30 | "id": "0fb0a2ff-2539-417a-8514-7f3b695024fd"
31 | }
32 | },
33 | "value": {
34 | "commandId": "testQuery",
35 | "title": "testQuery",
36 | "parameters": [
37 | {
38 | "name": "selectedQueryJson",
39 | "value": "Value"
40 | }
41 | ]
42 | }
43 | }
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.Shared/Jsons/SampleActivityMembersAdded.json:
--------------------------------------------------------------------------------
1 | {
2 | "membersAdded": [
3 | {
4 | "id": "29:UniqueID"
5 | }
6 | ],
7 | "type": "conversationUpdate",
8 | "timestamp": "2017-03-31T00:12:59.893Z",
9 | "id": "1400900100700",
10 | "channelId": "msteams",
11 | "serviceUrl": "https://smba.trafficmanager.net/amer-client-ss.msg/",
12 | "from": {
13 | "id": "29:SAMPLEID"
14 | },
15 | "conversation": {
16 | "isGroup": true,
17 | "id": "19:ThreadID@thread.skype;messageid=1400900100700"
18 | },
19 | "recipient": {
20 | "id": "28:f7c72d1a-9892-42b7-8fe0-6fb6e7c85851",
21 | "name": "TestBot"
22 | },
23 | "channelData": {
24 | "team": {
25 | "id": "19:ThreadID@thread.skype"
26 | },
27 | "eventType": "teamMemberAdded",
28 | "tenant": {
29 | "id": "3b9e9fbb-ed2f-415b-b776-cf788e573366"
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.Shared/Jsons/SampleActivityMembersRemoved.json:
--------------------------------------------------------------------------------
1 | {
2 | "membersRemoved": [
3 | {
4 | "id": "29:UniqueID"
5 | }
6 | ],
7 | "type": "conversationUpdate",
8 | "timestamp": "2017-03-31T00:12:59.893Z",
9 | "id": "1400900100700",
10 | "channelId": "msteams",
11 | "serviceUrl": "https://smba.trafficmanager.net/amer-client-ss.msg/",
12 | "from": {
13 | "id": "29:SAMPLEID"
14 | },
15 | "conversation": {
16 | "isGroup": true,
17 | "id": "19:ThreadID@thread.skype;messageid=1400900100700"
18 | },
19 | "recipient": {
20 | "id": "28:f7c72d1a-9892-42b7-8fe0-6fb6e7c85851",
21 | "name": "TestBot"
22 | },
23 | "channelData": {
24 | "team": {
25 | "id": "19:ThreadID@thread.skype"
26 | },
27 | "eventType": "teamMemberRemoved",
28 | "tenant": {
29 | "id": "3b9e9fbb-ed2f-415b-b776-cf788e573366"
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.Shared/Jsons/SampleActivityMessageWithAADObjectId.json:
--------------------------------------------------------------------------------
1 | {
2 | "text": "hi",
3 | "textFormat": "plain",
4 | "type": "message",
5 | "timestamp": "2018-07-17T21:11:21.461Z",
6 | "localTimestamp": "2018-07-17T14:11:21.461-07:00",
7 | "id": "1531861881427",
8 | "channelId": "msteams",
9 | "serviceUrl": "https://smba.trafficmanager.net/amer/",
10 | "from": {
11 | "id": "29:uniqueId",
12 | "name": "User name",
13 | "aadObjectId": "d2ffaeab-d802-4fec-8580-0987e9ad2628"
14 | },
15 | "conversation": {
16 | "conversationType": "personal",
17 | "id": "a:uniqueId"
18 | },
19 | "recipient": {
20 | "id": "28:uniqueId",
21 | "name": "Bot name"
22 | },
23 | "entities": [
24 | {
25 | "locale": "en-US",
26 | "country": "US",
27 | "platform": "Web",
28 | "type": "clientInfo"
29 | }
30 | ],
31 | "channelData": {
32 | "tenant": {
33 | "id": "09e852a2-4575-45f7-9586-7cc3acfdc715"
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.Shared/Jsons/SampleActivityNoMentions.json:
--------------------------------------------------------------------------------
1 | {
2 | "text": "Test ",
3 | "textFormat": "plain",
4 | "type": "message",
5 | "timestamp": "2017-04-25T22:29:14.158Z",
6 | "id": "1493159353121",
7 | "channelId": "msteams",
8 | "serviceUrl": "https://smba.trafficmanager.net/amer-client-ss.msg/",
9 | "from": {
10 | "id": "29:Key",
11 | "name": "TestUser"
12 | },
13 | "conversation": {
14 | "id": "ConversationId"
15 | },
16 | "recipient": {
17 | "id": "28:00000000-1111-2222-3333-444444444444",
18 | "name": "TestBot"
19 | },
20 | "entities": [
21 | {
22 | "locale": "en-US",
23 | "country": "US",
24 | "platform": "Windows",
25 | "type": "clientInfo"
26 | }
27 | ],
28 | "channelData": {
29 | "tenant": {
30 | "id": "0fb0a2ff-2539-417a-8514-7f3b695024fd"
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.Shared/Jsons/SampleActivitySigninAuthStateVerification.json:
--------------------------------------------------------------------------------
1 | {
2 | "text": "Test",
3 | "textFormat": "plain",
4 | "type": "invoke",
5 | "name": "signin/verifyState",
6 | "timestamp": "2017-04-25T22:29:14.158Z",
7 | "id": "1493159353121",
8 | "channelId": "msteams",
9 | "serviceUrl": "https://smba.trafficmanager.net/amer-client-ss.msg/",
10 | "from": {
11 | "id": "29:Key",
12 | "name": "TestUser"
13 | },
14 | "conversation": {
15 | "id": "ConversationId"
16 | },
17 | "recipient": {
18 | "id": "28:00000000-1111-2222-3333-444444444444",
19 | "name": "TestBot"
20 | },
21 | "entities": [
22 | {
23 | "locale": "en-US",
24 | "country": "US",
25 | "platform": "Windows",
26 | "type": "clientInfo"
27 | }
28 | ],
29 | "channelData": {
30 | "tenant": {
31 | "id": "0fb0a2ff-2539-417a-8514-7f3b695024fd"
32 | }
33 | },
34 | "value": {
35 | "state": "WHATEVER_STATE_CONTENT"
36 | }
37 | }
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.Shared/Jsons/SampleActivityTeamRenamed.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "conversationUpdate",
3 | "timestamp": "2017-03-31T00:12:59.893Z",
4 | "id": "1400900100700",
5 | "channelId": "msteams",
6 | "serviceUrl": "https://smba.trafficmanager.net/amer-client-ss.msg/",
7 | "from": {
8 | "id": "29:SAMPLEID"
9 | },
10 | "conversation": {
11 | "isGroup": true,
12 | "id": "19:ThreadID@thread.skype;messageid=1400900100700"
13 | },
14 | "recipient": {
15 | "id": "28:f7c72d1a-9892-42b7-8fe0-6fb6e7c85851",
16 | "name": "TestBot"
17 | },
18 | "channelData": {
19 | "team": {
20 | "id": "19:ThreadID2@thread.skype",
21 | "name": "Test Team"
22 | },
23 | "eventType": "teamRenamed",
24 | "tenant": {
25 | "id": "3b9e9fbb-ed2f-415b-b776-cf788e573366"
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.Shared/Jsons/SampleAdaptiveCard.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "AdaptiveCard",
3 | "version": "1.0",
4 | "body": [
5 | {
6 | "type": "TextBlock",
7 | "text": "some text on card"
8 | }
9 | ],
10 | "actions": [
11 | {
12 | "type": "Action.OpenUrl",
13 | "url": "https://microsoft.com"
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.Shared/Jsons/SampleFileConsentCardResponseInvoke.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fileConsent/invoke",
3 | "value": {
4 | "type": "fileUpload",
5 | "action": "accept",
6 | "context": {
7 | },
8 | "uploadInfo": {
9 | "contentUrl": "https://contoso.sharepoint.com/personal/johnadams_contoso_com/Documents/Applications/file_example.txt",
10 | "name": "file_example.txt",
11 | "uploadUrl": "https://upload.link",
12 | "uniqueId": "1150D938-8870-4044-9F2C-5BBDEBA70C8C",
13 | "fileType": "txt"
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.Shared/Jsons/SampleFileDownloadInfoAttachment.json:
--------------------------------------------------------------------------------
1 | {
2 | "contentType": "application/vnd.microsoft.teams.file.download.info",
3 | "contentUrl": null,
4 | "content": {
5 | "downloadUrl": "https://bing.com",
6 | "uniqueId": "b83b9f77-7003-4d63-985c-9611c98303f3",
7 | "fileType": "txt"
8 | },
9 | "name": null,
10 | "thumbnailUrl": null
11 | }
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.Shared/Jsons/SampleResponseGetTeamsConversationMembers.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": "29:UserId1",
4 | "objectId": "0955be99-52ab-4b9e-9e9f-73e0c02bf4ea",
5 | "givenName": "Name",
6 | "email": "name@contoso.com",
7 | "userPrincipalName": "nme@contoso.com",
8 | "name": "Name"
9 | },
10 | {
11 | "id": "29:UserId2",
12 | "objectId": "cf7592ea-cae8-4e4f-b161-bd7315907892",
13 | "givenName": "FirstName",
14 | "surname": "LastName",
15 | "email": "FirstName.LastName@contoso.com",
16 | "userPrincipalName": "contoso@contoso.com",
17 | "name": "FirstName LastName"
18 | }
19 | ]
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.Shared/Jsons/SampleResponseGetTeamsPaginatedConversationMembers.json:
--------------------------------------------------------------------------------
1 | {
2 | "continuationToken": "teststring",
3 | "members":[
4 | {
5 | "id": "29:UserId1",
6 | "objectId": "0955be99-52ab-4b9e-9e9f-73e0c02bf4ea",
7 | "givenName": "Name",
8 | "email": "name@contoso.com",
9 | "userPrincipalName": "nme@contoso.com",
10 | "name": "Name"
11 | },
12 | {
13 | "id": "29:UserId2",
14 | "objectId": "cf7592ea-cae8-4e4f-b161-bd7315907892",
15 | "givenName": "FirstName",
16 | "surname": "LastName",
17 | "email": "FirstName.LastName@contoso.com",
18 | "userPrincipalName": "contoso@contoso.com",
19 | "name": "FirstName LastName"
20 | }
21 | ]
22 | }
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.Shared/Jsons/SampleResponseTeamsGetConversationMember.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "29:UserId1",
3 | "objectId": "0955be99-52ab-4b9e-9e9f-73e0c02bf4ea",
4 | "givenName": "Name",
5 | "email": "name@contoso.com",
6 | "userPrincipalName": "nme@contoso.com",
7 | "name": "Name"
8 | }
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.Shared/Jsons/SampleTaskModuleAdaptiveCard.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "AdaptiveCard",
3 | "version": "1.0",
4 | "body": [
5 | {
6 | "type": "TextBlock",
7 | "text": "some text on card"
8 | }
9 | ],
10 | "actions": [
11 | {
12 | "type": "Action.OpenUrl",
13 | "url": "https://microsoft.com"
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.Shared/Jsons/SampleTaskModuleAdaptiveCardPayload.json:
--------------------------------------------------------------------------------
1 | {
2 | "task": {
3 | "type": "continue",
4 | "value": {
5 | "title": "Adaptive Card: Inputs",
6 | "height": "small",
7 | "width": "small",
8 | "card": {
9 | "contentType": "application/vnd.microsoft.card.adaptive",
10 | "content": {
11 | "type": "AdaptiveCard",
12 | "version": "1.0",
13 | "body": [
14 | {
15 | "type": "TextBlock",
16 | "text": "some text on card"
17 | }
18 | ],
19 | "actions": [
20 | {
21 | "type": "Action.OpenUrl",
22 | "url": "https://microsoft.com"
23 | }
24 | ]
25 | }
26 | }
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.Shared/Jsons/SampleTaskModuleCustomFormPayload.json:
--------------------------------------------------------------------------------
1 | {
2 | "task": {
3 | "type": "continue",
4 | "value": {
5 | "title": "Custom Form",
6 | "height": 510,
7 | "width": 430,
8 | "url": "https://contoso.com/teamsapp/customform",
9 | "fallbackUrl": "https://contoso.com/teamsapp/customform"
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.Shared/Jsons/SampleTaskModuleMessagePayload.json:
--------------------------------------------------------------------------------
1 | {
2 | "task": {
3 | "type": "message",
4 | "value": "This is a test message"
5 | }
6 | }
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.Shared/Microsoft.Bot.Connector.Teams.Tests.Shared.shproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 8e7d4c7e-7d02-4e8a-afd5-1be8879bb8a6
5 | 14.0
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/CSharp/Tests/Microsoft.Bot.Connector.Teams.Tests.Shared/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Microsoft Corporation. All rights reserved.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
22 |
--------------------------------------------------------------------------------
/Node/.npmignore:
--------------------------------------------------------------------------------
1 | /.npmignore
2 | /src
3 | /test
4 | /samples
5 | /**/node_modules
6 |
--------------------------------------------------------------------------------
/Node/README.md:
--------------------------------------------------------------------------------
1 | # Bot Builder Microsoft Teams Extensions
2 |
3 | The Microsoft Bot Builder SDK Teams Extensions allow bots built using Bot Builder SDK to consume Teams functionality easily. **[Review the documentation](https://msdn.microsoft.com/en-us/microsoft-teams/bots)** to get started!
4 |
5 | Get started quickly with our samples:
6 |
7 | * Sample bot [C#](https://github.com/OfficeDev/BotBuilder-MicrosoftTeams/tree/master/CSharp/Samples/Microsoft.Bot.Connector.Teams.SampleBot)
8 | * Sample bot [Node](https://github.com/OfficeDev/BotBuilder-MicrosoftTeams/tree/master/Node/samples)
9 |
10 | # Contributing
11 |
12 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
13 |
--------------------------------------------------------------------------------
/Node/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "botbuilder-teams",
3 | "version": "0.2.9",
4 | "description": "Microsoft Teams Bot Builder extension SDK",
5 | "scripts": {
6 | "prepublish": "cd src && tsc && copy botbuilder-teams.d.ts ..\\lib",
7 | "test": "cd test && mocha ."
8 | },
9 | "author": "Microsoft Corp",
10 | "license": "MIT",
11 | "main": "./lib/botbuilder-teams.js",
12 | "typings": "./lib/botbuilder-teams.d.ts",
13 | "dependencies": {
14 | "adaptivecards": "^1.0.0",
15 | "botbuilder": "^3.30.0",
16 | "crypto": "^1.0.1",
17 | "ms-rest": "^2.5.0",
18 | "sprintf-js": "^1.1.1",
19 | "tsc": "^1.20150623.0"
20 | },
21 | "devDependencies": {
22 | "@types/node": "^13.11.0",
23 | "@types/sprintf-js": "0.0.27",
24 | "mocha": "^5.2.0",
25 | "nodemon": "^1.18.9",
26 | "restify": "^4.3.1",
27 | "typescript": "^3.8.3"
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Node/samples/typings.json:
--------------------------------------------------------------------------------
1 | {
2 | "globalDependencies": {
3 | "core-js": "registry:dt/core-js#0.9.0+20170324193834",
4 | "node": "registry:env/node#6.0.0+20170213133316"
5 | },
6 | "globalDevDependencies": {
7 | "node": "registry:dt/node#7.0.0+20170322231424"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Node/src/ConversationUpdate/channelDeletedEvent.js:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) Microsoft. All rights reserved.
3 | // Licensed under the MIT license.
4 | //
5 | // Microsoft Bot Framework: http://botframework.com
6 | //
7 | // Bot Builder SDK Github:
8 | // https://github.com/Microsoft/BotBuilder
9 | //
10 | // Copyright (c) Microsoft Corporation
11 | // All rights reserved.
12 | //
13 | // MIT License:
14 | // Permission is hereby granted, free of charge, to any person obtaining
15 | // a copy of this software and associated documentation files (the
16 | // "Software"), to deal in the Software without restriction, including
17 | // without limitation the rights to use, copy, modify, merge, publish,
18 | // distribute, sublicense, and/or sell copies of the Software, and to
19 | // permit persons to whom the Software is furnished to do so, subject to
20 | // the following conditions:
21 | //
22 | // The above copyright notice and this permission notice shall be
23 | // included in all copies or substantial portions of the Software.
24 | //
25 | // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
26 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
28 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
29 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
30 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
31 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 | //
33 |
34 | 'use strict';
35 |
36 | const models = require('../models');
37 | const TeamEventBase = require('./teamEventBase').TeamEventBase;
38 | const TeamEventType = require('./teamEventBase').TeamEventType;
39 |
40 | /**
41 | * @class
42 | * Initializes a new instance of the ChannelDeletedEvent class.
43 | * @constructor
44 | * Channel Deleted in Teams
45 | *
46 | * @member {ChannelInfo} [channel]
47 | *
48 | * @member {TeamInfo} [team] Team info for channel
49 | *
50 | * @member {TenantInfo} [tenant] Tenant info for channel
51 | *
52 | */
53 |
54 | class ChannelDeletedEvent extends TeamEventBase {
55 | constructor(channel, team, tenant) {
56 | super(
57 | ChannelDeletedEvent.eventType,
58 | team,
59 | tenant
60 | );
61 | this.channel = channel;
62 | }
63 |
64 | mapper() {
65 | return {
66 | required: false,
67 | serializedName: 'ChannelDeletedEvent',
68 | type: {
69 | name: 'Composite',
70 | className: 'ChannelDeletedEvent',
71 | modelProperties: {
72 | channel: {
73 | required: false,
74 | serializedName: 'channel',
75 | type: {
76 | name: 'Composite',
77 | className: 'ChannelInfo'
78 | }
79 | },
80 | }
81 | }
82 | };
83 | }
84 | }
85 |
86 | ChannelDeletedEvent.eventType = TeamEventType.ChannelDeleted;
87 |
88 | module.exports = ChannelDeletedEvent;
89 |
--------------------------------------------------------------------------------
/Node/src/ConversationUpdate/channelRenamedEvent.js:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) Microsoft. All rights reserved.
3 | // Licensed under the MIT license.
4 | //
5 | // Microsoft Bot Framework: http://botframework.com
6 | //
7 | // Bot Builder SDK Github:
8 | // https://github.com/Microsoft/BotBuilder
9 | //
10 | // Copyright (c) Microsoft Corporation
11 | // All rights reserved.
12 | //
13 | // MIT License:
14 | // Permission is hereby granted, free of charge, to any person obtaining
15 | // a copy of this software and associated documentation files (the
16 | // "Software"), to deal in the Software without restriction, including
17 | // without limitation the rights to use, copy, modify, merge, publish,
18 | // distribute, sublicense, and/or sell copies of the Software, and to
19 | // permit persons to whom the Software is furnished to do so, subject to
20 | // the following conditions:
21 | //
22 | // The above copyright notice and this permission notice shall be
23 | // included in all copies or substantial portions of the Software.
24 | //
25 | // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
26 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
28 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
29 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
30 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
31 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 | //
33 |
34 | 'use strict';
35 |
36 | const models = require('../models');
37 | const TeamEventBase = require('./teamEventBase').TeamEventBase;
38 | const TeamEventType = require('./teamEventBase').TeamEventType;
39 |
40 | /**
41 | * @class
42 | * Initializes a new instance of the ChannelRenamedEvent class.
43 | * @constructor
44 | * Channel Renamed in Teams
45 | *
46 | * @member {ChannelInfo} [channel]
47 | *
48 | * @member {TeamInfo} [team] Team info for channel
49 | *
50 | * @member {TenantInfo} [tenant] Tenant info for channel
51 | *
52 | */
53 |
54 | class ChannelRenamedEvent extends TeamEventBase {
55 | constructor(channel, team, tenant) {
56 | super(
57 | ChannelRenamedEvent.eventType,
58 | team,
59 | tenant
60 | );
61 | this.channel = channel;
62 | }
63 |
64 | mapper() {
65 | return {
66 | required: false,
67 | serializedName: 'ChannelRenamedEvent',
68 | type: {
69 | name: 'Composite',
70 | className: 'ChannelRenamedEvent',
71 | modelProperties: {
72 | channel: {
73 | required: false,
74 | serializedName: 'channel',
75 | type: {
76 | name: 'Composite',
77 | className: 'ChannelInfo'
78 | }
79 | },
80 | }
81 | }
82 | };
83 | }
84 | }
85 |
86 | ChannelRenamedEvent.eventType = TeamEventType.ChannelRenamed;
87 |
88 | module.exports = ChannelRenamedEvent;
89 |
--------------------------------------------------------------------------------
/Node/src/ConversationUpdate/index.js:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) Microsoft. All rights reserved.
3 | // Licensed under the MIT license.
4 | //
5 | // Microsoft Bot Framework: http://botframework.com
6 | //
7 | // Bot Builder SDK Github:
8 | // https://github.com/Microsoft/BotBuilder
9 | //
10 | // Copyright (c) Microsoft Corporation
11 | // All rights reserved.
12 | //
13 | // MIT License:
14 | // Permission is hereby granted, free of charge, to any person obtaining
15 | // a copy of this software and associated documentation files (the
16 | // "Software"), to deal in the Software without restriction, including
17 | // without limitation the rights to use, copy, modify, merge, publish,
18 | // distribute, sublicense, and/or sell copies of the Software, and to
19 | // permit persons to whom the Software is furnished to do so, subject to
20 | // the following conditions:
21 | //
22 | // The above copyright notice and this permission notice shall be
23 | // included in all copies or substantial portions of the Software.
24 | //
25 | // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
26 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
28 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
29 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
30 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
31 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 | //
33 |
34 |
35 | /* jshint latedef:false */
36 | /* jshint forin:false */
37 | /* jshint noempty:false */
38 |
39 | 'use strict';
40 |
41 | const teamEventBaseModule = require('./teamEventBase');
42 | exports.TeamEventBase = teamEventBaseModule.TeamEventBase;
43 | exports.TeamEventType = teamEventBaseModule.TeamEventType;
44 | exports.MembersAddedEvent = require('./membersAddedEvent');
45 | exports.MembersRemovedEvent = require('./membersRemovedEvent');
46 | exports.ChannelCreatedEvent = require('./channelCreatedEvent');
47 | exports.ChannelDeletedEvent = require('./channelDeletedEvent');
48 | exports.ChannelRenamedEvent = require('./channelRenamedEvent');
49 | exports.TeamRenamedEvent = require('./teamRenamedEvent');
50 |
51 |
--------------------------------------------------------------------------------
/Node/src/ConversationUpdate/teamRenamedEvent.js:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) Microsoft. All rights reserved.
3 | // Licensed under the MIT license.
4 | //
5 | // Microsoft Bot Framework: http://botframework.com
6 | //
7 | // Bot Builder SDK Github:
8 | // https://github.com/Microsoft/BotBuilder
9 | //
10 | // Copyright (c) Microsoft Corporation
11 | // All rights reserved.
12 | //
13 | // MIT License:
14 | // Permission is hereby granted, free of charge, to any person obtaining
15 | // a copy of this software and associated documentation files (the
16 | // "Software"), to deal in the Software without restriction, including
17 | // without limitation the rights to use, copy, modify, merge, publish,
18 | // distribute, sublicense, and/or sell copies of the Software, and to
19 | // permit persons to whom the Software is furnished to do so, subject to
20 | // the following conditions:
21 | //
22 | // The above copyright notice and this permission notice shall be
23 | // included in all copies or substantial portions of the Software.
24 | //
25 | // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
26 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
28 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
29 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
30 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
31 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 | //
33 |
34 |
35 | 'use strict';
36 |
37 | const models = require('../models');
38 | const TeamEventBase = require('./teamEventBase').TeamEventBase;
39 | const TeamEventType = require('./teamEventBase').TeamEventType;
40 |
41 | /**
42 | * @class
43 | * Initializes a new instance of the TeamRenamedEvent class.
44 | * @constructor
45 | * Team Renamed in Teams
46 | *
47 | * @member {TeamInfo} [team] Team info for channel
48 | *
49 | * @member {TenantInfo} [tenant] Tenant info for channel
50 | *
51 | */
52 |
53 | class TeamRenamedEvent extends TeamEventBase {
54 | constructor(team, tenant) {
55 | super(
56 | TeamRenamedEvent.eventType,
57 | team,
58 | tenant
59 | );
60 | }
61 |
62 | mapper() {
63 | return {
64 | required: false,
65 | serializedName: 'TeamRenamedEvent',
66 | type: {
67 | }
68 | };
69 | }
70 | }
71 |
72 | TeamRenamedEvent.eventType = TeamEventType.TeamRenamed;
73 |
74 | module.exports = TeamRenamedEvent;
75 |
--------------------------------------------------------------------------------
/Node/src/RemoteQuery/RestClient.d.ts:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) Microsoft. All rights reserved.
3 | // Licensed under the MIT license.
4 | //
5 | // Microsoft Bot Framework: http://botframework.com
6 | //
7 | // Bot Builder SDK Github:
8 | // https://github.com/Microsoft/BotBuilder
9 | //
10 | // Copyright (c) Microsoft Corporation
11 | // All rights reserved.
12 | //
13 | // MIT License:
14 | // Permission is hereby granted, free of charge, to any person obtaining
15 | // a copy of this software and associated documentation files (the
16 | // "Software"), to deal in the Software without restriction, including
17 | // without limitation the rights to use, copy, modify, merge, publish,
18 | // distribute, sublicense, and/or sell copies of the Software, and to
19 | // permit persons to whom the Software is furnished to do so, subject to
20 | // the following conditions:
21 | //
22 | // The above copyright notice and this permission notice shall be
23 | // included in all copies or substantial portions of the Software.
24 | //
25 | // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
26 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
28 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
29 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
30 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
31 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 | //
33 |
34 |
35 | import { ServiceClientOptions, RequestOptions, ServiceCallback } from 'ms-rest';
36 |
37 | declare class RestClient {
38 | /**
39 | * @class
40 | * Initializes a new instance of the RestClient class.
41 | * @constructor
42 | *
43 | * @param {string} [baseUri] - The base URI of the service.
44 | *
45 | * @param {object} [options] - The parameter options
46 | *
47 | * @param {Array} [options.filters] - Filters to be added to the request pipeline
48 | *
49 | * @param {object} [options.requestOptions] - Options for the underlying request object
50 | * {@link https://github.com/request/request#requestoptions-callback Options doc}
51 | *
52 | * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
53 | *
54 | */
55 | constructor(baseUri: string, options: ServiceClientOptions);
56 |
57 | }
58 |
59 | export = RestClient;
60 |
--------------------------------------------------------------------------------
/Node/src/RemoteQuery/RestClient.js:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) Microsoft. All rights reserved.
3 | // Licensed under the MIT license.
4 | //
5 | // Microsoft Bot Framework: http://botframework.com
6 | //
7 | // Bot Builder SDK Github:
8 | // https://github.com/Microsoft/BotBuilder
9 | //
10 | // Copyright (c) Microsoft Corporation
11 | // All rights reserved.
12 | //
13 | // MIT License:
14 | // Permission is hereby granted, free of charge, to any person obtaining
15 | // a copy of this software and associated documentation files (the
16 | // "Software"), to deal in the Software without restriction, including
17 | // without limitation the rights to use, copy, modify, merge, publish,
18 | // distribute, sublicense, and/or sell copies of the Software, and to
19 | // permit persons to whom the Software is furnished to do so, subject to
20 | // the following conditions:
21 | //
22 | // The above copyright notice and this permission notice shall be
23 | // included in all copies or substantial portions of the Software.
24 | //
25 | // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
26 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
28 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
29 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
30 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
31 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 | //
33 |
34 |
35 | /* jshint latedef:false */
36 | /* jshint forin:false */
37 | /* jshint noempty:false */
38 |
39 | 'use strict';
40 |
41 | var util = require('util');
42 | var msRest = require('ms-rest');
43 |
44 | var models = require('../models');
45 |
46 | /**
47 | * @class
48 | * Initializes a new instance of the RestClient class.
49 | * @constructor
50 | *
51 | * @param {string} [baseUri] - The base URI of the service.
52 | *
53 | * @param {object} [options] - The parameter options
54 | *
55 | * @param {Array} [options.filters] - Filters to be added to the request pipeline
56 | *
57 | * @param {object} [options.requestOptions] - Options for the underlying request object
58 | * {@link https://github.com/request/request#requestoptions-callback Options doc}
59 | *
60 | * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
61 | *
62 | */
63 | class RestClient extends msRest.ServiceClient {
64 | constructor (baseUri, options) {
65 | if (!options) options = {};
66 |
67 | super(null, options);
68 | this.baseUri = baseUri;
69 | if (!this.baseUri) {
70 | this.baseUri = 'https://api.botframework.com';
71 | }
72 |
73 | var packageInfo = this.getPackageJsonInfo(__dirname);
74 | this.addUserAgentInfo(util.format('%s/%s', packageInfo.name, packageInfo.version));
75 | this.models = models;
76 | msRest.addSerializationMixin(this);
77 | }
78 | }
79 |
80 | module.exports = RestClient;
81 |
--------------------------------------------------------------------------------
/Node/src/TeamsMiddleware.ts:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license.
3 | //
4 | // Microsoft Bot Framework: http://botframework.com
5 | //
6 | // Bot Builder SDK Github:
7 | // https://github.com/Microsoft/BotBuilder
8 | //
9 | // Copyright (c) Microsoft Corporation
10 | // All rights reserved.
11 | //
12 | // MIT License:
13 | // Permission is hereby granted, free of charge, to any person obtaining
14 | // a copy of this software and associated documentation files (the
15 | // "Software"), to deal in the Software without restriction, including
16 | // without limitation the rights to use, copy, modify, merge, publish,
17 | // distribute, sublicense, and/or sell copies of the Software, and to
18 | // permit persons to whom the Software is furnished to do so, subject to
19 | // the following conditions:
20 | //
21 | // The above copyright notice and this permission notice shall be
22 | // included in all copies or substantial portions of the Software.
23 | //
24 | // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
25 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
28 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
29 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
30 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 | //
32 |
33 | import * as builder from "botbuilder";
34 |
35 | // Strip bot mentions from the message text
36 | export class StripBotAtMentions implements builder.IMiddlewareMap {
37 |
38 | public readonly botbuilder = (session: builder.Session, next: Function): void => {
39 | let message = session.message;
40 | if (message) {
41 | let botMri = message.address.bot.id.toLowerCase();
42 | let botAtMentions = message.entities && message.entities.filter(
43 | (entity) => (entity.type === "mention") && (entity.mentioned.id.toLowerCase() === botMri));
44 | if (botAtMentions && botAtMentions.length) {
45 | // Save original text as property of the message
46 | (message as any).textWithBotMentions = message.text;
47 | // Remove the text corresponding to each mention
48 | message.text = botAtMentions.reduce((previousText, entity) => {
49 | return previousText.replace(entity.text, "").trim();
50 | }, message.text);
51 | }
52 | }
53 | next();
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/Node/src/models/FileConsentCardResponse.ts:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation
2 | // All rights reserved.
3 | //
4 | // MIT License:
5 | // Permission is hereby granted, free of charge, to any person obtaining
6 | // a copy of this software and associated documentation files (the
7 | // "Software"), to deal in the Software without restriction, including
8 | // without limitation the rights to use, copy, modify, merge, publish,
9 | // distribute, sublicense, and/or sell copies of the Software, and to
10 | // permit persons to whom the Software is furnished to do so, subject to
11 | // the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be
14 | // included in all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
17 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 |
24 | import * as builder from "botbuilder";
25 |
26 | /** Name of the file consent invoke activity */
27 | export const fileConsentInvokeName = "fileConsent/invoke";
28 |
29 | /** Represents the value of the invoke activity sent when the user acts on a file consent card. */
30 | export interface IFileConsentCardResponse {
31 |
32 | /** The action the user took. */
33 | action: FileConsentCardAction;
34 |
35 | /** The context associated with the action. */
36 | context?: any;
37 |
38 | /** If the user accepted the file, contains information about the file to be uploaded. */
39 | uploadInfo?: IFileUploadInfo;
40 | }
41 |
42 | /** Actions the user can take on the file consent card. */
43 | export enum FileConsentCardAction {
44 |
45 | /** File was accepted. */
46 | accept = "accept",
47 |
48 | /** File was declined. */
49 | decline = "decline",
50 | }
51 |
52 | /** Information about the file to be uploaded. */
53 | export interface IFileUploadInfo {
54 |
55 | /** Name of the file. */
56 | name: string;
57 |
58 | /** URL to an upload session that the bot can use to set the file contents. */
59 | uploadUrl: string;
60 |
61 | /** URL to file. */
62 | contentUrl: string;
63 |
64 | /** ID that uniquely identifies the file. */
65 | uniqueId: string;
66 |
67 | /** Type of the file. */
68 | fileType: string;
69 | }
70 |
--------------------------------------------------------------------------------
/Node/src/models/FileDownloadInfo.ts:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation
2 | // All rights reserved.
3 | //
4 | // MIT License:
5 | // Permission is hereby granted, free of charge, to any person obtaining
6 | // a copy of this software and associated documentation files (the
7 | // "Software"), to deal in the Software without restriction, including
8 | // without limitation the rights to use, copy, modify, merge, publish,
9 | // distribute, sublicense, and/or sell copies of the Software, and to
10 | // permit persons to whom the Software is furnished to do so, subject to
11 | // the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be
14 | // included in all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
17 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 |
24 | import * as builder from "botbuilder";
25 |
26 | /** Represents a file download info attachment. */
27 | export interface IFileDownloadInfo extends builder.IAttachment {
28 |
29 | /** The additional content of the attachment. */
30 | content: IFileDownloadInfoContent;
31 | }
32 |
33 | /** Additional content of a file download info attachment. */
34 | export interface IFileDownloadInfoContent {
35 |
36 | /** Type of the file. */
37 | fileType: string;
38 |
39 | /** Short-lived download url for the file. */
40 | downloadUrl: string;
41 | }
42 |
43 | /**
44 | * Helpers for working with file download info attachments.
45 | */
46 | export class FileDownloadInfo {
47 |
48 | /** Content type of a file download info attachment. */
49 | public static contentType = "application/vnd.microsoft.teams.file.download.info";
50 |
51 | /**
52 | * Returns the attachments in the list that are of type file download info.
53 | * @param attachments the attachments in the message
54 | */
55 | public static filter(attachments: builder.IAttachment[]|undefined): IFileDownloadInfo[]|undefined {
56 | if (attachments) {
57 | return attachments.filter(x => x.contentType === FileDownloadInfo.contentType) as IFileDownloadInfo[];
58 | } else {
59 | return undefined;
60 | }
61 | }
62 | }
--------------------------------------------------------------------------------
/Node/src/models/TaskModuleAction.ts:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation
2 | // All rights reserved.
3 | //
4 | // MIT License:
5 | // Permission is hereby granted, free of charge, to any person obtaining
6 | // a copy of this software and associated documentation files (the
7 | // 'Software'), to deal in the Software without restriction, including
8 | // without limitation the rights to use, copy, modify, merge, publish,
9 | // distribute, sublicense, and/or sell copies of the Software, and to
10 | // permit persons to whom the Software is furnished to do so, subject to
11 | // the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be
14 | // included in all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED ''AS IS'', WITHOUT WARRANTY OF ANY KIND,
17 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 |
24 | import * as builder from 'botbuilder';
25 | import { IIsAdaptiveCardBotBuilderAction, IAdaptiveCardAction, AdaptiveCardBotBuilderAction } from './AdaptiveCard';
26 |
27 | export class TaskModuleCardAction implements IIsAdaptiveCardBotBuilderAction, builder.IIsCardAction {
28 |
29 | private adaptorObj: builder.CardAction;
30 |
31 | constructor(private session?: builder.Session) {
32 | this.adaptorObj = new builder.CardAction(session);
33 | this.adaptorObj.type('invoke');
34 | }
35 |
36 | /** Title of the action. For buttons this will be the label of the button. For tap actions this may be used for accesibility purposes or shown on hover. */
37 | title(text: builder.TextType, ...args: any[]): TaskModuleCardAction {
38 | this.adaptorObj.title(text, ...args);
39 | return this;
40 | }
41 |
42 | /** The actions value. */
43 | value(v: {[key: string]: any}): TaskModuleCardAction {
44 | this.adaptorObj.value( v);
45 | return this;
46 | }
47 |
48 | toAction(): builder.ICardAction {
49 | let json = this.adaptorObj.toAction();
50 | let valJson = (typeof json.value === 'string') ? JSON.parse(json.value) : json.value;
51 | valJson.type = 'task/fetch';
52 | json.value = JSON.stringify(valJson);
53 | return json;
54 | }
55 |
56 | toAdaptiveCardAction(): IAdaptiveCardAction {
57 | let btn: builder.ICardAction = this.toAction();
58 | let adapterBtn = AdaptiveCardBotBuilderAction.convertFromBotBuilderCardAction(btn);
59 | return adapterBtn;
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/Node/src/models/channelInfo.js:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) Microsoft. All rights reserved.
3 | // Licensed under the MIT license.
4 | //
5 | // Microsoft Bot Framework: http://botframework.com
6 | //
7 | // Bot Builder SDK Github:
8 | // https://github.com/Microsoft/BotBuilder
9 | //
10 | // Copyright (c) Microsoft Corporation
11 | // All rights reserved.
12 | //
13 | // MIT License:
14 | // Permission is hereby granted, free of charge, to any person obtaining
15 | // a copy of this software and associated documentation files (the
16 | // "Software"), to deal in the Software without restriction, including
17 | // without limitation the rights to use, copy, modify, merge, publish,
18 | // distribute, sublicense, and/or sell copies of the Software, and to
19 | // permit persons to whom the Software is furnished to do so, subject to
20 | // the following conditions:
21 | //
22 | // The above copyright notice and this permission notice shall be
23 | // included in all copies or substantial portions of the Software.
24 | //
25 | // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
26 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
28 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
29 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
30 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
31 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 | //
33 |
34 |
35 | 'use strict';
36 |
37 | /**
38 | * @class
39 | * Initializes a new instance of the ChannelInfo class.
40 | * @constructor
41 | * A channel info object which describes the channel.
42 | *
43 | * @member {string} [id] Unique identifier representing a channel
44 | *
45 | * @member {string} [name] Name of the channel
46 | *
47 | */
48 | class ChannelInfo {
49 | constructor(name, id) {
50 | this.name = name;
51 | this.id = id;
52 | }
53 |
54 | /**
55 | * Defines the metadata of ChannelInfo
56 | *
57 | * @returns {object} metadata of ChannelInfo
58 | *
59 | */
60 | mapper() {
61 | return {
62 | required: false,
63 | serializedName: 'ChannelInfo',
64 | type: {
65 | name: 'Composite',
66 | className: 'ChannelInfo',
67 | modelProperties: {
68 | id: {
69 | required: false,
70 | serializedName: 'id',
71 | type: {
72 | name: 'String'
73 | }
74 | },
75 | name: {
76 | required: false,
77 | serializedName: 'name',
78 | type: {
79 | name: 'String'
80 | }
81 | }
82 | }
83 | }
84 | };
85 | }
86 | }
87 |
88 | module.exports = ChannelInfo;
89 |
--------------------------------------------------------------------------------
/Node/src/models/conversationList.js:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) Microsoft. All rights reserved.
3 | // Licensed under the MIT license.
4 | //
5 | // Microsoft Bot Framework: http://botframework.com
6 | //
7 | // Bot Builder SDK Github:
8 | // https://github.com/Microsoft/BotBuilder
9 | //
10 | // Copyright (c) Microsoft Corporation
11 | // All rights reserved.
12 | //
13 | // MIT License:
14 | // Permission is hereby granted, free of charge, to any person obtaining
15 | // a copy of this software and associated documentation files (the
16 | // "Software"), to deal in the Software without restriction, including
17 | // without limitation the rights to use, copy, modify, merge, publish,
18 | // distribute, sublicense, and/or sell copies of the Software, and to
19 | // permit persons to whom the Software is furnished to do so, subject to
20 | // the following conditions:
21 | //
22 | // The above copyright notice and this permission notice shall be
23 | // included in all copies or substantial portions of the Software.
24 | //
25 | // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
26 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
28 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
29 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
30 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
31 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 | //
33 |
34 |
35 | 'use strict';
36 |
37 | const models = require('./index');
38 |
39 | /**
40 | * @class
41 | * Initializes a new instance of the ConversationList class.
42 | * @constructor
43 | * List of channels under a team
44 | *
45 | * @member {array} [conversations]
46 | *
47 | */
48 | class ConversationList {
49 | constructor() {
50 | }
51 |
52 | /**
53 | * Defines the metadata of ConversationList
54 | *
55 | * @returns {object} metadata of ConversationList
56 | *
57 | */
58 | mapper() {
59 | return {
60 | required: false,
61 | serializedName: 'ConversationList',
62 | type: {
63 | name: 'Composite',
64 | className: 'ConversationList',
65 | modelProperties: {
66 | conversations: {
67 | required: false,
68 | serializedName: 'conversations',
69 | type: {
70 | name: 'Sequence',
71 | element: {
72 | required: false,
73 | serializedName: 'ChannelInfoElementType',
74 | type: {
75 | name: 'Composite',
76 | className: 'ChannelInfo'
77 | }
78 | }
79 | }
80 | }
81 | }
82 | }
83 | };
84 | }
85 | }
86 |
87 | module.exports = ConversationList;
88 |
--------------------------------------------------------------------------------
/Node/src/models/teamsChannelAccountsResult.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Code generated by Microsoft (R) AutoRest Code Generator.
3 | * Changes may cause incorrect behavior and will be lost if the code is
4 | * regenerated.
5 | */
6 |
7 | 'use strict';
8 |
9 | const models = require('./index');
10 |
11 | /**
12 | * Result from paginated conversation members API
13 | *
14 | */
15 | class TeamsChannelAccountsResult {
16 | /**
17 | * Create a TeamsChannelAccountsResult.
18 | * @member {string} [continuationToken] continuationToken to indicate if
19 | * caller can continue to call the API to fetch more members
20 | * @member {array} [members] An array of channel accounts
21 | */
22 | constructor() {
23 | }
24 |
25 | /**
26 | * Defines the metadata of TeamsChannelAccountsResult
27 | *
28 | * @returns {object} metadata of TeamsChannelAccountsResult
29 | *
30 | */
31 | mapper() {
32 | return {
33 | required: false,
34 | serializedName: 'TeamsChannelAccountsResult',
35 | type: {
36 | name: 'Composite',
37 | className: 'TeamsChannelAccountsResult',
38 | modelProperties: {
39 | continuationToken: {
40 | required: false,
41 | serializedName: 'continuationToken',
42 | type: {
43 | name: 'String'
44 | }
45 | },
46 | members: {
47 | required: false,
48 | serializedName: 'members',
49 | type: {
50 | name: 'Sequence',
51 | element: {
52 | required: false,
53 | serializedName: 'TeamsChannelAccountElementType',
54 | type: {
55 | name: 'Composite',
56 | className: 'TeamsChannelAccount'
57 | }
58 | }
59 | }
60 | }
61 | }
62 | }
63 | };
64 | }
65 | }
66 |
67 | module.exports = TeamsChannelAccountsResult;
68 |
--------------------------------------------------------------------------------
/Node/src/models/tenantInfo.js:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) Microsoft. All rights reserved.
3 | // Licensed under the MIT license.
4 | //
5 | // Microsoft Bot Framework: http://botframework.com
6 | //
7 | // Bot Builder SDK Github:
8 | // https://github.com/Microsoft/BotBuilder
9 | //
10 | // Copyright (c) Microsoft Corporation
11 | // All rights reserved.
12 | //
13 | // MIT License:
14 | // Permission is hereby granted, free of charge, to any person obtaining
15 | // a copy of this software and associated documentation files (the
16 | // "Software"), to deal in the Software without restriction, including
17 | // without limitation the rights to use, copy, modify, merge, publish,
18 | // distribute, sublicense, and/or sell copies of the Software, and to
19 | // permit persons to whom the Software is furnished to do so, subject to
20 | // the following conditions:
21 | //
22 | // The above copyright notice and this permission notice shall be
23 | // included in all copies or substantial portions of the Software.
24 | //
25 | // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
26 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
28 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
29 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
30 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
31 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 | //
33 |
34 |
35 | 'use strict';
36 |
37 | /**
38 | * @class
39 | * Initializes a new instance of the TenantInfo class.
40 | * @constructor
41 | * Describes a tenant
42 | *
43 | * @member {string} [id] Unique identifier representing a tenant
44 | *
45 | */
46 | class TenantInfo {
47 | constructor(id) {
48 | this.id = id;
49 | }
50 |
51 | /**
52 | * Defines the metadata of TenantInfo
53 | *
54 | * @returns {object} metadata of TenantInfo
55 | *
56 | */
57 | mapper() {
58 | return {
59 | required: false,
60 | serializedName: 'TenantInfo',
61 | type: {
62 | name: 'Composite',
63 | className: 'TenantInfo',
64 | modelProperties: {
65 | id: {
66 | required: false,
67 | serializedName: 'id',
68 | type: {
69 | name: 'String'
70 | }
71 | }
72 | }
73 | }
74 | };
75 | }
76 | }
77 |
78 | module.exports = TenantInfo;
79 |
--------------------------------------------------------------------------------
/Node/src/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es6",
4 | "allowJs": true,
5 | "module": "commonjs",
6 | "sourceMap": false,
7 | "noImplicitAny": true,
8 | "outDir": "../lib",
9 | "noEmitOnError": true,
10 | "removeComments": true,
11 | "forceConsistentCasingInFileNames": true
12 | },
13 | "exclude": [
14 | "botbuilder-teams.d.ts"
15 | ]
16 | }
--------------------------------------------------------------------------------
/Node/test/FileConsentCard.js:
--------------------------------------------------------------------------------
1 | var assert = require('assert');
2 | var fcc = require('../lib/models/FileConsentCard');
3 |
4 | describe('FileConsentCard', function () {
5 | describe('#toAttachment()', function (done) {
6 | it('should populate attachment correctly', function () {
7 | let card = new fcc.FileConsentCard()
8 | .name('filename.txt')
9 | .description('file description')
10 | .sizeInBytes(1000)
11 | .acceptContext({ data: 'accept' })
12 | .declineContext({ data: 'decline' });
13 |
14 | let attachment = card.toAttachment();
15 | assert(attachment.contentType === 'application/vnd.microsoft.teams.card.file.consent');
16 | assert(attachment.name === 'filename.txt');
17 | assert(attachment.content.description === 'file description');
18 | assert(attachment.content.sizeInBytes === 1000);
19 | assert(attachment.content.acceptContext.data === 'accept');
20 | assert(attachment.content.declineContext.data === 'decline');
21 | });
22 | });
23 |
24 | describe('#context()', function (done) {
25 | it('should set accept and decline context', function () {
26 | let card = new fcc.FileConsentCard()
27 | .name('filename.txt')
28 | .description('file description')
29 | .sizeInBytes(1000)
30 | .acceptContext({ data: 'neutral' })
31 | .declineContext({ data: 'neutral' });
32 |
33 | let attachment = card.toAttachment();
34 | assert(attachment.contentType === 'application/vnd.microsoft.teams.card.file.consent');
35 | assert(attachment.name === 'filename.txt');
36 | assert(attachment.content.description === 'file description');
37 | assert(attachment.content.sizeInBytes === 1000);
38 | assert(attachment.content.acceptContext.data === 'neutral');
39 | assert(attachment.content.declineContext.data === 'neutral');
40 | });
41 | });
42 | });
43 |
--------------------------------------------------------------------------------
/Node/test/FileInfoCard.js:
--------------------------------------------------------------------------------
1 | var assert = require('assert');
2 | var fic = require('../lib/models/FileInfoCard');
3 |
4 | describe('FileInfoCard', function () {
5 | describe('#toAttachment()', function (done) {
6 | it('should populate attachment correctly', function () {
7 | let card = new fic.FileInfoCard()
8 | .name('filename.txt')
9 | .contentUrl('https://content.url')
10 | .uniqueId('unique_id')
11 | .fileType('txt');
12 |
13 | let attachment = card.toAttachment();
14 | assert(attachment.contentType === 'application/vnd.microsoft.teams.card.file.info');
15 | assert(attachment.name === 'filename.txt');
16 | assert(attachment.contentUrl === 'https://content.url');
17 | assert(attachment.content.uniqueId === 'unique_id');
18 | assert(attachment.content.fileType === 'txt');
19 | });
20 | });
21 |
22 | describe('#fromFileUploadInfo()', function (done) {
23 | it('should populate attachment correctly', function () {
24 | let uploadInfo = {
25 | name: 'filename.txt',
26 | contentUrl: 'https://content.url',
27 | uploadUrl: 'https://upload.url',
28 | uniqueId: 'unique_id',
29 | fileType: 'txt'
30 | };
31 | let card = fic.FileInfoCard.fromFileUploadInfo(uploadInfo);
32 |
33 | let attachment = card.toAttachment();
34 | assert(attachment.contentType === 'application/vnd.microsoft.teams.card.file.info');
35 | assert(attachment.name === 'filename.txt');
36 | assert(attachment.contentUrl === 'https://content.url');
37 | assert(attachment.content.uniqueId === 'unique_id');
38 | assert(attachment.content.fileType === 'txt');
39 | });
40 | });
41 | });
42 |
--------------------------------------------------------------------------------
/Node/test/O365ConnectorCard.js:
--------------------------------------------------------------------------------
1 | var builder = require('botbuilder');
2 | var assert = require('assert');
3 | var models = require('../lib/models');
4 | var O365ConnectorCardSection = models.O365ConnectorCardSection;
5 | var O365ConnectorCardActivityImageTypes = models.O365ConnectorCardActivityImageTypes;
6 |
7 | describe('O365ConnectorCard', function () {
8 | describe('#O365ConnectorCardSection.activityImageType', function (done) {
9 | it('should use avatar by default', function () {
10 | section = new O365ConnectorCardSection();
11 | section.activityImage("a imageUrl");
12 | assert.equal('avatar', section.data.activityImageType);
13 | });
14 |
15 | it('should use avatar by default if pass in invalid image type', function () {
16 | section = new O365ConnectorCardSection();
17 | section.activityImageType("Invalid imageType");
18 | assert.equal('avatar', section.data.activityImageType);
19 | });
20 |
21 | it('should work with valid image types', function () {
22 | section = new O365ConnectorCardSection();
23 | section.activityImageType(O365ConnectorCardActivityImageTypes.Article);
24 | assert.equal('article', section.data.activityImageType);
25 | section.activityImageType(O365ConnectorCardActivityImageTypes.Avatar);
26 | assert.equal('avatar', section.data.activityImageType);
27 | });
28 | });
29 | });
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # This functionality is now in the core Bot Framework SDK
2 |
3 | This functionality has been moved into the core Bot Framework SDK. You should update your Bot Framework SDK to version 4.6 rather than using this SDK.
4 |
5 | This SDK will be deprecated, and will not receive further updates.
6 |
7 | # Bot Builder Microsoft Teams Extensions
8 |
9 | [](https://ci.appveyor.com/project/RamjotSingh/botbuilder-microsoftteams/branch/master)
10 |
11 |
12 | The Microsoft Bot Builder SDK Teams Extensions allow you to build bots for Microsoft Teams quickly and easily. **[Review the documentation](https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/bots/bots-overview)** to get started!
13 |
14 | > Note that the Bot Builder Extensions does **NOT** yet work with Bot Framework SDK 4.x. It currently only works with Bot Framework SDK 3.x.
15 |
16 | # This SDK allows you to easily...
17 |
18 | * Fetch a list of channels in a team
19 | * Fetch profile info about all members of a team
20 | * Fetch tenant-id from an incoming message to bot
21 | * Create 1:1 chat with a specific user
22 | * Mention a specific user
23 | * Consume various events like channel-created, team-renamed, etc.
24 | * Accept messages only from specific tenants
25 | * Write Compose Extensions
26 | * _and more!_
27 |
28 | # Installing
29 |
30 | If you are building your bot in .NET, simply grab the [Microsoft.Bot.Connector.Teams](https://www.nuget.org/packages/Microsoft.Bot.Connector.Teams) nuget.
31 |
32 | If you are using Node, grab the [botbuilder-teams](https://www.npmjs.com/package/botbuilder-teams) NPM instead.
33 |
34 | # Get started quickly with our samples:
35 |
36 | * Sample bot [C#](https://github.com/OfficeDev/BotBuilder-MicrosoftTeams/tree/master/CSharp/Samples/Microsoft.Bot.Connector.Teams.SampleBot)
37 | * Sample bot [Node](https://github.com/OfficeDev/BotBuilder-MicrosoftTeams/tree/master/Node/samples)
38 |
39 | # Questions, bugs, feature requests, and contributions
40 | Please review the information [here](https://docs.microsoft.com/en-us/microsoftteams/platform/feedback).
41 |
42 | # Contributing
43 |
44 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
45 |
--------------------------------------------------------------------------------