├── .gitattributes ├── .gitignore ├── .sdl ├── .gdnbaselines ├── .gdnsuppress └── CredScanSuppressions.json ├── CSharp ├── Build │ ├── 272MSSharedLibSN2048.snk │ ├── SkypeTeams.StyleCop.targets │ ├── SkypeTeams.Tests.targets │ ├── SkypeTeams.targets │ └── Tools │ │ └── StyleCop │ │ ├── 4.7.54 │ │ ├── build │ │ │ └── StyleCop.MSBuild.Targets │ │ ├── license.txt │ │ └── tools │ │ │ ├── Community.StyleCop.CSharp.Rules.HowTo │ │ │ ├── Community.StyleCop.CSharp.Rules.dll │ │ │ ├── Community.StyleCop.CSharp.Rules.pdb │ │ │ ├── CustomDictionary.en-GB.xml │ │ │ ├── CustomDictionary.en-US.xml │ │ │ ├── CustomDictionary.xml │ │ │ ├── Newtonsoft.Json.dll │ │ │ ├── Settings.StyleCop │ │ │ ├── StyleCop.CSharp.Rules.dll │ │ │ ├── StyleCop.CSharp.dll │ │ │ ├── StyleCop.dll │ │ │ ├── StyleCopSettingsEditor.exe │ │ │ ├── de-DE │ │ │ └── StyleCop.CSharp.Rules.resources.dll │ │ │ ├── en-GB │ │ │ └── StyleCop.CSharp.Rules.resources.dll │ │ │ ├── es-MX │ │ │ └── StyleCop.CSharp.Rules.resources.dll │ │ │ ├── fr-FR │ │ │ └── StyleCop.CSharp.Rules.resources.dll │ │ │ ├── mssp7en.dll │ │ │ ├── mssp7en.lex │ │ │ ├── pl-PL │ │ │ └── StyleCop.CSharp.Rules.resources.dll │ │ │ ├── pt-BR │ │ │ └── StyleCop.CSharp.Rules.resources.dll │ │ │ └── ru-RU │ │ │ └── StyleCop.CSharp.Rules.resources.dll │ │ └── Readme.txt ├── Library │ ├── Microsoft.Bot.Connector.Teams.NetFramework │ │ ├── Microsoft.Bot.Connector.Teams.NetFramework.csproj │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── TenantFilterAttribute.cs │ │ ├── app.config │ │ └── packages.config │ ├── Microsoft.Bot.Connector.Teams.NetStandard │ │ ├── GlobalSuppressions.cs │ │ ├── Microsoft.Bot.Connector.Teams.NetStandard.csproj │ │ └── TenantFilterAttribute.cs │ └── Microsoft.Bot.Connector.Teams.Shared │ │ ├── ActivityExtensions.cs │ │ ├── AdaptiveBotBuilderAction.cs │ │ ├── AdditionalProperties.cs │ │ ├── App.config │ │ ├── AttachmentExtensions.cs │ │ ├── CardExtensions.cs │ │ ├── ConnectorClientExtensions.cs │ │ ├── ConversationExtensions.cs │ │ ├── ConversationUpdate │ │ ├── ChannelCreatedEvent.cs │ │ ├── ChannelDeletedEvent.cs │ │ ├── ChannelRenamedEvent.cs │ │ ├── MembersAddedEvent.cs │ │ ├── MembersRemovedEvent.cs │ │ ├── TeamEventBase.cs │ │ └── TeamRenamedEvent.cs │ │ ├── FileInfoCardEx.cs │ │ ├── Microsoft.Bot.Connector.Teams.Shared.projitems │ │ ├── Microsoft.Bot.Connector.Teams.Shared.shproj │ │ ├── RetryHelpers.cs │ │ ├── Swagger │ │ └── TeamsAPI.json │ │ ├── TeamsAPI │ │ ├── ITeamsOperations.cs │ │ ├── Models │ │ │ ├── ChannelInfo.cs │ │ │ ├── ComposeExtensionAttachment.cs │ │ │ ├── ComposeExtensionParameter.cs │ │ │ ├── ComposeExtensionQuery.cs │ │ │ ├── ComposeExtensionQueryOptions.cs │ │ │ ├── ComposeExtensionResponse.cs │ │ │ ├── ComposeExtensionResult.cs │ │ │ ├── ComposeExtensionSuggestedAction.cs │ │ │ ├── ConversationList.cs │ │ │ ├── FileConsentCard.cs │ │ │ ├── FileConsentCardResponse.cs │ │ │ ├── FileDownloadInfo.cs │ │ │ ├── FileInfoCard.cs │ │ │ ├── FileUploadInfo.cs │ │ │ ├── NotificationInfo.cs │ │ │ ├── O365ConnectorCard.cs │ │ │ ├── O365ConnectorCardActionBase.cs │ │ │ ├── O365ConnectorCardActionCard.cs │ │ │ ├── O365ConnectorCardActionQuery.cs │ │ │ ├── O365ConnectorCardDateInput.cs │ │ │ ├── O365ConnectorCardFact.cs │ │ │ ├── O365ConnectorCardHttpPOST.cs │ │ │ ├── O365ConnectorCardImage.cs │ │ │ ├── O365ConnectorCardInputBase.cs │ │ │ ├── O365ConnectorCardMultichoiceInput.cs │ │ │ ├── O365ConnectorCardMultichoiceInputChoice.cs │ │ │ ├── O365ConnectorCardOpenUri.cs │ │ │ ├── O365ConnectorCardOpenUriTarget.cs │ │ │ ├── O365ConnectorCardSection.cs │ │ │ ├── O365ConnectorCardTextInput.cs │ │ │ ├── O365ConnectorCardViewAction.cs │ │ │ ├── SigninStateVerificationQuery.cs │ │ │ ├── TaskModuleContinueResponse.cs │ │ │ ├── TaskModuleMessageResponse.cs │ │ │ ├── TaskModuleResponseBase.cs │ │ │ ├── TaskModuleResponseEnvelope.cs │ │ │ ├── TaskModuleTaskInfo.cs │ │ │ ├── TeamDetails.cs │ │ │ ├── TeamInfo.cs │ │ │ ├── TeamsChannelAccount.cs │ │ │ ├── TeamsChannelData.cs │ │ │ ├── TeamsPagedMembersResult.cs │ │ │ └── TenantInfo.cs │ │ ├── TeamsOperations.cs │ │ └── TeamsOperationsExtensions.cs │ │ ├── TeamsChannelAccountEx.cs │ │ ├── TeamsConnectorClient.cs │ │ ├── TenantFiltering.cs │ │ └── generateClient.cmd ├── Microsoft.Bot.Connector.Teams.sln ├── Packager │ ├── Microsoft.Bot.Connector.Teams.nuspec │ ├── Packager.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── app.config │ ├── nuget.exe │ └── packages.config ├── RootMarker ├── Samples │ ├── Microsoft.Bot.Connector.Teams.SampleBot.ASPCore │ │ ├── Controllers │ │ │ └── MessagesController.cs │ │ ├── Microsoft.Bot.Connector.Teams.SampleBot.ASPCore.csproj │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ ├── Microsoft.Bot.Connector.Teams.SampleBot.Shared │ │ ├── CipherHelper.cs │ │ ├── MessageProcessor.cs │ │ ├── Microsoft.Bot.Connector.Teams.SampleBot.Shared.projitems │ │ ├── Microsoft.Bot.Connector.Teams.SampleBot.Shared.shproj │ │ └── SimpleFBAuthController.cs │ └── Microsoft.Bot.Connector.Teams.SampleBot │ │ ├── App_Start │ │ └── WebApiConfig.cs │ │ ├── Controllers │ │ └── MessagesController.cs │ │ ├── Global.asax │ │ ├── Global.asax.cs │ │ ├── Microsoft.Bot.Connector.Teams.SampleBot.NetFramework.csproj │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ ├── Web.Debug.config │ │ ├── Web.Release.config │ │ ├── Web.config │ │ └── packages.config ├── Settings.StyleCop └── Tests │ ├── .runsettings │ ├── Microsoft.Bot.Connector.Teams.Tests.NetFramework │ ├── Microsoft.Bot.Connector.Teams.Tests.NetFramework.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── TenantFilteringTests.cs │ ├── app.config │ └── packages.config │ └── Microsoft.Bot.Connector.Teams.Tests.Shared │ ├── ActivityExtensionsTests.cs │ ├── CardTests.AdaptiveCard.cs │ ├── CardTests.FileCards.cs │ ├── CardTests.cs │ ├── ChannelDataTests.cs │ ├── ComposeExtensionTests.cs │ ├── ConnectorExtensionTests.cs │ ├── ConversationUpdateTests.cs │ ├── Jsons │ ├── SampleActivity2AtMentions.json │ ├── SampleActivityAtMention.json │ ├── SampleActivityChannelCreated.json │ ├── SampleActivityChannelDeleted.json │ ├── SampleActivityChannelRenamed.json │ ├── SampleActivityComposeExtension.json │ ├── SampleActivityConversationUpdateWithAADObjectId.json │ ├── SampleActivityInvoke.json │ ├── SampleActivityMembersAdded.json │ ├── SampleActivityMembersRemoved.json │ ├── SampleActivityMessageWithAADObjectId.json │ ├── SampleActivityNoMentions.json │ ├── SampleActivitySigninAuthStateVerification.json │ ├── SampleActivityTeamRenamed.json │ ├── SampleAdaptiveCard.json │ ├── SampleFileConsentCardResponseInvoke.json │ ├── SampleFileDownloadInfoAttachment.json │ ├── SampleResponseGetTeamsConversationMembers.json │ ├── SampleResponseGetTeamsPaginatedConversationMembers.json │ ├── SampleResponseTeamsGetConversationMember.json │ ├── SampleTaskModuleAdaptiveCard.json │ ├── SampleTaskModuleAdaptiveCardPayload.json │ ├── SampleTaskModuleCustomFormPayload.json │ └── SampleTaskModuleMessagePayload.json │ ├── MentionTests.cs │ ├── Microsoft.Bot.Connector.Teams.Tests.Shared.projitems │ ├── Microsoft.Bot.Connector.Teams.Tests.Shared.shproj │ ├── RetryHelperTests.cs │ ├── SigninAuthTests.cs │ ├── TaskModuleTests.cs │ ├── TeamsAPITests.FetchChannelList.cs │ ├── TeamsAPITests.FetchTeamDetails.cs │ ├── TeamsChannelAccountTests.cs │ ├── TestDelegatingHandler.cs │ └── app.config ├── LICENSE ├── Node ├── .npmignore ├── README.md ├── package-lock.json ├── package.json ├── samples │ ├── app.js │ ├── app.ts │ ├── simpleFBAuth.js │ ├── simpleFBAuth.ts │ └── typings.json ├── src │ ├── ConversationUpdate │ │ ├── channelCreatedEvent.js │ │ ├── channelDeletedEvent.js │ │ ├── channelRenamedEvent.js │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── membersAddedEvent.js │ │ ├── membersRemovedEvent.js │ │ ├── teamEventBase.js │ │ └── teamRenamedEvent.js │ ├── RemoteQuery │ │ ├── RestClient.d.ts │ │ ├── RestClient.js │ │ └── teams.js │ ├── TeamsChatConnector.ts │ ├── TeamsMessage.ts │ ├── TeamsMiddleware.ts │ ├── botbuilder-teams.d.ts │ ├── botbuilder-teams.ts │ ├── models │ │ ├── AdaptiveCard.ts │ │ ├── FileConsentCard.ts │ │ ├── FileConsentCardResponse.ts │ │ ├── FileDownloadInfo.ts │ │ ├── FileInfoCard.ts │ │ ├── ListCard.ts │ │ ├── TaskModuleAction.ts │ │ ├── TaskModuleResponse.ts │ │ ├── channelAccount.js │ │ ├── channelInfo.js │ │ ├── composeExtensionResponse.ts │ │ ├── conversationList.js │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── o365ConnectorCard.ts │ │ ├── teamInfo.js │ │ ├── teamsChannelAccountsResult.js │ │ ├── teamsChannelData.js │ │ └── tenantInfo.js │ └── tsconfig.json └── test │ ├── AdaptiveCard.js │ ├── ConversationUpdate.js │ ├── FileConsentCard.js │ ├── FileInfoCard.js │ ├── ListCard.js │ ├── O365ConnectorCard.js │ ├── TaskModule.js │ ├── TeamsChatConnector.js │ └── TeamsMessage.js └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Set the default behavior, in case people don't have core.autocrlf set. 2 | 3 | * text=auto 4 | 5 | # Denote all files that are truly binary and should not be modified. 6 | *.cer binary 7 | *.qencr binary 8 | *.dat binary 9 | *.dll binary 10 | *.exe binary 11 | *.cd binary 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################### 2 | # compiled source # 3 | ################### 4 | *.com 5 | *.class 6 | *.dll 7 | *.exe 8 | *.pdb 9 | *.dll.config 10 | *.cache 11 | *.suo 12 | *.Fakes.messages 13 | # Exclude hidden VS files 14 | .vs/* 15 | # Ignore local changes to web.Debug.config 16 | web.Debug.config 17 | # Include dlls if they’re in the NuGet packages directory 18 | !/packages/*/lib/*.dll 19 | !/packages/*/lib/*/*.dll 20 | # Include dlls if they're in the CommonReferences directory 21 | !*CommonReferences/*.dll 22 | #################### 23 | # VS Upgrade stuff # 24 | #################### 25 | UpgradeLog.XML 26 | _UpgradeReport_Files/ 27 | ############### 28 | # Directories # 29 | ############### 30 | bin/ 31 | obj/ 32 | TestResults/ 33 | FakesAssemblies/ 34 | ################### 35 | # Web publish log # 36 | ################### 37 | *.Publish.xml 38 | ############# 39 | # Resharper # 40 | ############# 41 | /_ReSharper.* 42 | *.ReSharper.* 43 | ############ 44 | # Packages # 45 | ############ 46 | # it’s better to unpack these files and commit the raw source 47 | # git has its own built in compression methods 48 | *.7z 49 | *.dmg 50 | *.gz 51 | *.iso 52 | *.jar 53 | *.rar 54 | *.tar 55 | *.zip 56 | ###################### 57 | # Logs and databases # 58 | ###################### 59 | *.log 60 | *.sqlite 61 | # OS generated files # 62 | ###################### 63 | .DS_Store? 64 | ehthumbs.db 65 | Icon? 66 | Thumbs.db 67 | [Bb]in 68 | [Oo]bj 69 | [Tt]est[Rr]esults 70 | *.suo 71 | *.user 72 | *.[Cc]ache 73 | *[Rr]esharper* 74 | packages 75 | NuGet.exe 76 | _[Ss]cripts 77 | *.exe 78 | *.dll 79 | *.nupkg 80 | *.ncrunchsolution 81 | *.dot[Cc]over 82 | /CSharp/.vs/* 83 | 84 | # Node generated files 85 | /Node/lib 86 | /Node/node_modules -------------------------------------------------------------------------------- /.sdl/.gdnbaselines: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0", 3 | "baselines": { 4 | "Baselines": { 5 | "name": "Baselines", 6 | "createdDate": "", 7 | "lastUpdatedDate": "" 8 | } 9 | }, 10 | "results": { 11 | } 12 | } -------------------------------------------------------------------------------- /.sdl/.gdnsuppress: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0", 3 | "suppressionSets": { 4 | "Suppressions": { 5 | "name": "Suppressions", 6 | "createdDate": "", 7 | "lastUpdatedDate": "" 8 | } 9 | }, 10 | "results": { 11 | } 12 | } -------------------------------------------------------------------------------- /.sdl/CredScanSuppressions.json: -------------------------------------------------------------------------------- 1 | { 2 | "tool": "Credential Scanner", 3 | "suppressions": [ 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /CSharp/Build/272MSSharedLibSN2048.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/BotBuilder-MicrosoftTeams/6a71ca74e9a878551730dbf19a119cab5f03a788/CSharp/Build/272MSSharedLibSN2048.snk -------------------------------------------------------------------------------- /CSharp/Build/SkypeTeams.StyleCop.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.7.54 4 | 5 | 6 | false 7 | true 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /CSharp/Build/SkypeTeams.Tests.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /CSharp/Build/SkypeTeams.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), RootMarker)) 4 | $(BuildRoot)\Build\Tools\Nuget\NuGet.exe 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CSharp/Build/Tools/StyleCop/4.7.54/license.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2012 Adam Ralph (adam@adamralph.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /CSharp/Build/Tools/StyleCop/4.7.54/tools/Community.StyleCop.CSharp.Rules.HowTo: -------------------------------------------------------------------------------- 1 | The settings are in compiled code download code from https://github.com/schlotter/Community.StyleCop.Rules and update the code and drop the binary. -------------------------------------------------------------------------------- /CSharp/Build/Tools/StyleCop/4.7.54/tools/Community.StyleCop.CSharp.Rules.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/BotBuilder-MicrosoftTeams/6a71ca74e9a878551730dbf19a119cab5f03a788/CSharp/Build/Tools/StyleCop/4.7.54/tools/Community.StyleCop.CSharp.Rules.dll -------------------------------------------------------------------------------- /CSharp/Build/Tools/StyleCop/4.7.54/tools/Community.StyleCop.CSharp.Rules.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/BotBuilder-MicrosoftTeams/6a71ca74e9a878551730dbf19a119cab5f03a788/CSharp/Build/Tools/StyleCop/4.7.54/tools/Community.StyleCop.CSharp.Rules.pdb -------------------------------------------------------------------------------- /CSharp/Build/Tools/StyleCop/4.7.54/tools/CustomDictionary.en-GB.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | canonicalise 6 | canonicalised 7 | canonicaliser 8 | canonicalisers 9 | canonicalises 10 | deserialise 11 | deserialised 12 | deserialiser 13 | deserialisers 14 | deserialises 15 | favourited 16 | initialiser 17 | initialisers 18 | serialisable 19 | serialiser 20 | uninitialise 21 | uninitialises 22 | 23 | 24 | preprocessed 25 | shortlived 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /CSharp/Build/Tools/StyleCop/4.7.54/tools/CustomDictionary.en-US.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | canonicalize 6 | canonicalized 7 | canonicalizer 8 | canonicalizers 9 | canonicalizes 10 | deserialize 11 | deserialized 12 | deserializes 13 | deserialized 14 | favorited 15 | initializer 16 | initializers 17 | serializable 18 | serializer 19 | uninitialize 20 | uninitializes 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /CSharp/Build/Tools/StyleCop/4.7.54/tools/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/BotBuilder-MicrosoftTeams/6a71ca74e9a878551730dbf19a119cab5f03a788/CSharp/Build/Tools/StyleCop/4.7.54/tools/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /CSharp/Build/Tools/StyleCop/4.7.54/tools/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 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | as 24 | do 25 | id 26 | if 27 | in 28 | is 29 | my 30 | no 31 | on 32 | to 33 | ui 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /CSharp/Build/Tools/StyleCop/4.7.54/tools/StyleCop.CSharp.Rules.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/BotBuilder-MicrosoftTeams/6a71ca74e9a878551730dbf19a119cab5f03a788/CSharp/Build/Tools/StyleCop/4.7.54/tools/StyleCop.CSharp.Rules.dll -------------------------------------------------------------------------------- /CSharp/Build/Tools/StyleCop/4.7.54/tools/StyleCop.CSharp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/BotBuilder-MicrosoftTeams/6a71ca74e9a878551730dbf19a119cab5f03a788/CSharp/Build/Tools/StyleCop/4.7.54/tools/StyleCop.CSharp.dll -------------------------------------------------------------------------------- /CSharp/Build/Tools/StyleCop/4.7.54/tools/StyleCop.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/BotBuilder-MicrosoftTeams/6a71ca74e9a878551730dbf19a119cab5f03a788/CSharp/Build/Tools/StyleCop/4.7.54/tools/StyleCop.dll -------------------------------------------------------------------------------- /CSharp/Build/Tools/StyleCop/4.7.54/tools/StyleCopSettingsEditor.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/BotBuilder-MicrosoftTeams/6a71ca74e9a878551730dbf19a119cab5f03a788/CSharp/Build/Tools/StyleCop/4.7.54/tools/StyleCopSettingsEditor.exe -------------------------------------------------------------------------------- /CSharp/Build/Tools/StyleCop/4.7.54/tools/de-DE/StyleCop.CSharp.Rules.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/BotBuilder-MicrosoftTeams/6a71ca74e9a878551730dbf19a119cab5f03a788/CSharp/Build/Tools/StyleCop/4.7.54/tools/de-DE/StyleCop.CSharp.Rules.resources.dll -------------------------------------------------------------------------------- /CSharp/Build/Tools/StyleCop/4.7.54/tools/en-GB/StyleCop.CSharp.Rules.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/BotBuilder-MicrosoftTeams/6a71ca74e9a878551730dbf19a119cab5f03a788/CSharp/Build/Tools/StyleCop/4.7.54/tools/en-GB/StyleCop.CSharp.Rules.resources.dll -------------------------------------------------------------------------------- /CSharp/Build/Tools/StyleCop/4.7.54/tools/es-MX/StyleCop.CSharp.Rules.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/BotBuilder-MicrosoftTeams/6a71ca74e9a878551730dbf19a119cab5f03a788/CSharp/Build/Tools/StyleCop/4.7.54/tools/es-MX/StyleCop.CSharp.Rules.resources.dll -------------------------------------------------------------------------------- /CSharp/Build/Tools/StyleCop/4.7.54/tools/fr-FR/StyleCop.CSharp.Rules.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/BotBuilder-MicrosoftTeams/6a71ca74e9a878551730dbf19a119cab5f03a788/CSharp/Build/Tools/StyleCop/4.7.54/tools/fr-FR/StyleCop.CSharp.Rules.resources.dll -------------------------------------------------------------------------------- /CSharp/Build/Tools/StyleCop/4.7.54/tools/mssp7en.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/BotBuilder-MicrosoftTeams/6a71ca74e9a878551730dbf19a119cab5f03a788/CSharp/Build/Tools/StyleCop/4.7.54/tools/mssp7en.dll -------------------------------------------------------------------------------- /CSharp/Build/Tools/StyleCop/4.7.54/tools/mssp7en.lex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/BotBuilder-MicrosoftTeams/6a71ca74e9a878551730dbf19a119cab5f03a788/CSharp/Build/Tools/StyleCop/4.7.54/tools/mssp7en.lex -------------------------------------------------------------------------------- /CSharp/Build/Tools/StyleCop/4.7.54/tools/pl-PL/StyleCop.CSharp.Rules.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/BotBuilder-MicrosoftTeams/6a71ca74e9a878551730dbf19a119cab5f03a788/CSharp/Build/Tools/StyleCop/4.7.54/tools/pl-PL/StyleCop.CSharp.Rules.resources.dll -------------------------------------------------------------------------------- /CSharp/Build/Tools/StyleCop/4.7.54/tools/pt-BR/StyleCop.CSharp.Rules.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/BotBuilder-MicrosoftTeams/6a71ca74e9a878551730dbf19a119cab5f03a788/CSharp/Build/Tools/StyleCop/4.7.54/tools/pt-BR/StyleCop.CSharp.Rules.resources.dll -------------------------------------------------------------------------------- /CSharp/Build/Tools/StyleCop/4.7.54/tools/ru-RU/StyleCop.CSharp.Rules.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/BotBuilder-MicrosoftTeams/6a71ca74e9a878551730dbf19a119cab5f03a788/CSharp/Build/Tools/StyleCop/4.7.54/tools/ru-RU/StyleCop.CSharp.Rules.resources.dll -------------------------------------------------------------------------------- /CSharp/Build/Tools/StyleCop/Readme.txt: -------------------------------------------------------------------------------- 1 | How-To? 2 | 1) Downloads the package from http://www.nuget.org/packages/StyleCop.MSBuild/ 3 | 2) Create a folder for the StyleCop version 4 | 3) Extract contents from .nupkg there (rename the file to .zip) 5 | 4) Optional - Delete all folders except build and tools 6 | 5) Update version of stylecop to use in SkypeTeams.StyleCop.targets -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.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 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.NetFramework/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.NetStandard/GlobalSuppressions.cs: -------------------------------------------------------------------------------- 1 | // This file is used by Code Analysis to maintain SuppressMessage 2 | // attributes that are applied to this project. 3 | // Project-level suppressions either have no target or are given 4 | // a specific target and scoped to a namespace, type, member, etc. 5 | 6 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1633:File must have header", Justification = "Open source file header is not supported.")] 7 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1413:Use trailing comma in multi-line initializers", Justification = "Readability")] -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.NetStandard/Microsoft.Bot.Connector.Teams.NetStandard.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard1.6 5 | Microsoft.Bot.Connector.Teams 6 | Microsoft.Bot.Connector.Teams 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | false 21 | bin\$(Configuration)\netstandard1.6\Microsoft.Bot.Connector.Teams.xml 22 | 23 | 24 | 25 | True 26 | True 27 | ..\..\Build\272MSSharedLibSN2048.snk 28 | 29 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/AdaptiveBotBuilderAction.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 37 | { 38 | using Models; 39 | 40 | /// 41 | /// Adapter class to represent BotBuilder card action as adaptive card action (in type of Action.Submit). 42 | /// 43 | public class AdaptiveBotBuilderAction : AdaptiveCards.AdaptiveSubmitAction 44 | { 45 | /// 46 | /// Constructor must wrap an existing CardAction from BotBuilder framework 47 | /// 48 | public AdaptiveBotBuilderAction(CardAction action) 49 | { 50 | this.RepresentAsBotBuilderAction(action); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/ConversationUpdate/ChannelCreatedEvent.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 37 | { 38 | using Models; 39 | 40 | /// 41 | /// Channel created event arguments. 42 | /// 43 | /// 44 | public class ChannelCreatedEvent : TeamEventBase 45 | { 46 | /// 47 | /// Gets the event type. 48 | /// 49 | public override TeamEventType EventType 50 | { 51 | get 52 | { 53 | return TeamEventType.ChannelCreated; 54 | } 55 | } 56 | 57 | /// 58 | /// Gets the channel created. 59 | /// 60 | public ChannelInfo Channel { get; internal set; } 61 | 62 | /// 63 | /// Gets the team for the event. 64 | /// 65 | public override TeamInfo Team { get; internal set; } 66 | 67 | /// 68 | /// Gets the tenant for the team. 69 | /// 70 | public override TenantInfo Tenant { get; internal set; } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/ConversationUpdate/ChannelDeletedEvent.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 | namespace Microsoft.Bot.Connector.Teams 36 | { 37 | using Models; 38 | 39 | /// 40 | /// Channel deleted event arguments. 41 | /// 42 | /// 43 | public class ChannelDeletedEvent : TeamEventBase 44 | { 45 | /// 46 | /// Gets the event type. 47 | /// 48 | public override TeamEventType EventType 49 | { 50 | get 51 | { 52 | return TeamEventType.ChannelDeleted; 53 | } 54 | } 55 | 56 | /// 57 | /// Gets the channel deleted. 58 | /// 59 | public ChannelInfo Channel { get; internal set; } 60 | 61 | /// 62 | /// Gets the team for the event. 63 | /// 64 | public override TeamInfo Team { get; internal set; } 65 | 66 | /// 67 | /// Gets the tenant for the team. 68 | /// 69 | public override TenantInfo Tenant { get; internal set; } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/ConversationUpdate/ChannelRenamedEvent.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 37 | { 38 | using Models; 39 | 40 | /// 41 | /// Channel renamed event. 42 | /// 43 | /// 44 | public class ChannelRenamedEvent : TeamEventBase 45 | { 46 | /// 47 | /// Gets the event type. 48 | /// 49 | public override TeamEventType EventType 50 | { 51 | get 52 | { 53 | return TeamEventType.ChannelRenamed; 54 | } 55 | } 56 | 57 | /// 58 | /// Gets the team for the event. 59 | /// 60 | public override TeamInfo Team { get; internal set; } 61 | 62 | /// 63 | /// Gets the tenant for the team. 64 | /// 65 | public override TenantInfo Tenant { get; internal set; } 66 | 67 | /// 68 | /// Gets the details of the channel renamed. 69 | /// 70 | public ChannelInfo Channel { get; internal set; } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/ConversationUpdate/MembersAddedEvent.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 37 | { 38 | using System.Collections.Generic; 39 | using Models; 40 | 41 | /// 42 | /// Event arguments for members added event. 43 | /// 44 | /// 45 | public class MembersAddedEvent : TeamEventBase 46 | { 47 | /// 48 | /// Gets the event type. 49 | /// 50 | public override TeamEventType EventType 51 | { 52 | get 53 | { 54 | return TeamEventType.MembersAdded; 55 | } 56 | } 57 | 58 | /// 59 | /// Gets the members added. 60 | /// 61 | public IList MembersAdded { get; internal set; } 62 | 63 | /// 64 | /// Gets the team for the event. 65 | /// 66 | public override TeamInfo Team { get; internal set; } 67 | 68 | /// 69 | /// Gets the tenant for the team. 70 | /// 71 | public override TenantInfo Tenant { get; internal set; } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/ConversationUpdate/MembersRemovedEvent.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 37 | { 38 | using System.Collections.Generic; 39 | using Models; 40 | 41 | /// 42 | /// Event arguments for members removed event. 43 | /// 44 | /// 45 | public class MembersRemovedEvent : TeamEventBase 46 | { 47 | /// 48 | /// Gets the event type. 49 | /// 50 | public override TeamEventType EventType 51 | { 52 | get 53 | { 54 | return TeamEventType.MembersRemoved; 55 | } 56 | } 57 | 58 | /// 59 | /// Gets the members added. 60 | /// 61 | public IList MembersRemoved { get; internal set; } 62 | 63 | /// 64 | /// Gets the team for the event. 65 | /// 66 | public override TeamInfo Team { get; internal set; } 67 | 68 | /// 69 | /// Gets the tenant for the team. 70 | /// 71 | public override TenantInfo Tenant { get; internal set; } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/ConversationUpdate/TeamRenamedEvent.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 37 | { 38 | using Models; 39 | 40 | /// 41 | /// Team renamed event. 42 | /// 43 | /// 44 | public class TeamRenamedEvent : TeamEventBase 45 | { 46 | /// 47 | /// Gets the event type. 48 | /// 49 | public override TeamEventType EventType 50 | { 51 | get 52 | { 53 | return TeamEventType.TeamRenamed; 54 | } 55 | } 56 | 57 | /// 58 | /// Gets the team for the event. 59 | /// 60 | public override TeamInfo Team { get; internal set; } 61 | 62 | /// 63 | /// Gets the tenant for the team. 64 | /// 65 | public override TenantInfo Tenant { get; internal set; } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/Microsoft.Bot.Connector.Teams.Shared.projitems: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | true 6 | 5d5f91d9-d2b4-4ef5-b0e4-39b9125a9018 7 | 8 | 9 | Microsoft.Bot.Connector.Teams.Shared 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 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/Microsoft.Bot.Connector.Teams.Shared.shproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5d5f91d9-d2b4-4ef5-b0e4-39b9125a9018 5 | 14.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/ChannelInfo.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// A channel info object which decribes the channel. 11 | /// 12 | public partial class ChannelInfo 13 | { 14 | /// 15 | /// Initializes a new instance of the ChannelInfo class. 16 | /// 17 | public ChannelInfo() { } 18 | 19 | /// 20 | /// Initializes a new instance of the ChannelInfo class. 21 | /// 22 | /// Unique identifier representing a channel 23 | /// Name of the channel 24 | public ChannelInfo(string id = default(string), string name = default(string)) 25 | { 26 | Id = id; 27 | Name = name; 28 | } 29 | 30 | /// 31 | /// Gets or sets unique identifier representing a channel 32 | /// 33 | [Newtonsoft.Json.JsonProperty(PropertyName = "id")] 34 | public string Id { get; set; } 35 | 36 | /// 37 | /// Gets or sets name of the channel 38 | /// 39 | [Newtonsoft.Json.JsonProperty(PropertyName = "name")] 40 | public string Name { get; set; } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/ComposeExtensionAttachment.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// Compose extension attachment. 11 | /// 12 | public partial class ComposeExtensionAttachment : Attachment 13 | { 14 | /// 15 | /// Initializes a new instance of the ComposeExtensionAttachment class. 16 | /// 17 | public ComposeExtensionAttachment() { } 18 | 19 | /// 20 | /// Initializes a new instance of the ComposeExtensionAttachment class. 21 | /// 22 | /// mimetype/Contenttype for the file 23 | /// Content Url 24 | /// Embedded content 25 | /// (OPTIONAL) The name of the attachment 26 | /// (OPTIONAL) Thumbnail associated with 27 | /// attachment 28 | /// Specifies how the result should be displayed 29 | /// in the preview window 30 | public ComposeExtensionAttachment(string contentType = default(string), string contentUrl = default(string), object content = default(object), string name = default(string), string thumbnailUrl = default(string), Attachment preview = default(Attachment)) 31 | : base(contentType, contentUrl, content, name, thumbnailUrl) 32 | { 33 | Preview = preview; 34 | } 35 | 36 | /// 37 | /// Gets or sets specifies how the result should be displayed in the 38 | /// preview window 39 | /// 40 | [Newtonsoft.Json.JsonProperty(PropertyName = "preview")] 41 | public Attachment Preview { get; set; } 42 | 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/ComposeExtensionParameter.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// Compose extension query parameters 11 | /// 12 | public partial class ComposeExtensionParameter 13 | { 14 | /// 15 | /// Initializes a new instance of the ComposeExtensionParameter class. 16 | /// 17 | public ComposeExtensionParameter() { } 18 | 19 | /// 20 | /// Initializes a new instance of the ComposeExtensionParameter class. 21 | /// 22 | /// Name of the parameter 23 | /// Value of the parameter 24 | public ComposeExtensionParameter(string name = default(string), object value = default(object)) 25 | { 26 | Name = name; 27 | Value = value; 28 | } 29 | 30 | /// 31 | /// Gets or sets name of the parameter 32 | /// 33 | [Newtonsoft.Json.JsonProperty(PropertyName = "name")] 34 | public string Name { get; set; } 35 | 36 | /// 37 | /// Gets or sets value of the parameter 38 | /// 39 | [Newtonsoft.Json.JsonProperty(PropertyName = "value")] 40 | public object Value { get; set; } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/ComposeExtensionQuery.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// Compose extension query 11 | /// 12 | public partial class ComposeExtensionQuery 13 | { 14 | /// 15 | /// Initializes a new instance of the ComposeExtensionQuery class. 16 | /// 17 | public ComposeExtensionQuery() { } 18 | 19 | /// 20 | /// Initializes a new instance of the ComposeExtensionQuery class. 21 | /// 22 | /// Id of the command assigned by Bot 23 | /// Parameters for the query 24 | /// Options for the query 25 | /// State parameter passed back to the bot after 26 | /// authentication/configuration flow 27 | public ComposeExtensionQuery(string commandId = default(string), System.Collections.Generic.IList parameters = default(System.Collections.Generic.IList), ComposeExtensionQueryOptions queryOptions = default(ComposeExtensionQueryOptions), string state = default(string)) 28 | { 29 | CommandId = commandId; 30 | Parameters = parameters; 31 | QueryOptions = queryOptions; 32 | State = state; 33 | } 34 | 35 | /// 36 | /// Gets or sets id of the command assigned by Bot 37 | /// 38 | [Newtonsoft.Json.JsonProperty(PropertyName = "commandId")] 39 | public string CommandId { get; set; } 40 | 41 | /// 42 | /// Gets or sets parameters for the query 43 | /// 44 | [Newtonsoft.Json.JsonProperty(PropertyName = "parameters")] 45 | public System.Collections.Generic.IList Parameters { get; set; } 46 | 47 | /// 48 | /// Gets or sets options for the query 49 | /// 50 | [Newtonsoft.Json.JsonProperty(PropertyName = "queryOptions")] 51 | public ComposeExtensionQueryOptions QueryOptions { get; set; } 52 | 53 | /// 54 | /// Gets or sets state parameter passed back to the bot after 55 | /// authentication/configuration flow 56 | /// 57 | [Newtonsoft.Json.JsonProperty(PropertyName = "state")] 58 | public string State { get; set; } 59 | 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/ComposeExtensionQueryOptions.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// Compose extensions query options 11 | /// 12 | public partial class ComposeExtensionQueryOptions 13 | { 14 | /// 15 | /// Initializes a new instance of the ComposeExtensionQueryOptions 16 | /// class. 17 | /// 18 | public ComposeExtensionQueryOptions() { } 19 | 20 | /// 21 | /// Initializes a new instance of the ComposeExtensionQueryOptions 22 | /// class. 23 | /// 24 | /// Number of entities to skip 25 | /// Number of entities to fetch 26 | public ComposeExtensionQueryOptions(int? skip = default(int?), int? count = default(int?)) 27 | { 28 | Skip = skip; 29 | Count = count; 30 | } 31 | 32 | /// 33 | /// Gets or sets number of entities to skip 34 | /// 35 | [Newtonsoft.Json.JsonProperty(PropertyName = "skip")] 36 | public int? Skip { get; set; } 37 | 38 | /// 39 | /// Gets or sets number of entities to fetch 40 | /// 41 | [Newtonsoft.Json.JsonProperty(PropertyName = "count")] 42 | public int? Count { get; set; } 43 | 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/ComposeExtensionResponse.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// Compose extension response 11 | /// 12 | public partial class ComposeExtensionResponse 13 | { 14 | /// 15 | /// Initializes a new instance of the ComposeExtensionResponse class. 16 | /// 17 | public ComposeExtensionResponse() { } 18 | 19 | /// 20 | /// Initializes a new instance of the ComposeExtensionResponse class. 21 | /// 22 | public ComposeExtensionResponse(ComposeExtensionResult composeExtension = default(ComposeExtensionResult)) 23 | { 24 | ComposeExtension = composeExtension; 25 | } 26 | 27 | /// 28 | /// 29 | [Newtonsoft.Json.JsonProperty(PropertyName = "composeExtension")] 30 | public ComposeExtensionResult ComposeExtension { get; set; } 31 | 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/ComposeExtensionSuggestedAction.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// Compose extension Actions (Only when type is auth or config) 11 | /// 12 | public partial class ComposeExtensionSuggestedAction 13 | { 14 | /// 15 | /// Initializes a new instance of the ComposeExtensionSuggestedAction 16 | /// class. 17 | /// 18 | public ComposeExtensionSuggestedAction() { } 19 | 20 | /// 21 | /// Initializes a new instance of the ComposeExtensionSuggestedAction 22 | /// class. 23 | /// 24 | /// Actions 25 | public ComposeExtensionSuggestedAction(System.Collections.Generic.IList actions = default(System.Collections.Generic.IList)) 26 | { 27 | Actions = actions; 28 | } 29 | 30 | /// 31 | /// Gets or sets actions 32 | /// 33 | [Newtonsoft.Json.JsonProperty(PropertyName = "actions")] 34 | public System.Collections.Generic.IList Actions { get; set; } 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/ConversationList.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// List of channels under a team 11 | /// 12 | public partial class ConversationList 13 | { 14 | /// 15 | /// Initializes a new instance of the ConversationList class. 16 | /// 17 | public ConversationList() { } 18 | 19 | /// 20 | /// Initializes a new instance of the ConversationList class. 21 | /// 22 | public ConversationList(System.Collections.Generic.IList conversations = default(System.Collections.Generic.IList)) 23 | { 24 | Conversations = conversations; 25 | } 26 | 27 | /// 28 | /// 29 | [Newtonsoft.Json.JsonProperty(PropertyName = "conversations")] 30 | public System.Collections.Generic.IList Conversations { get; set; } 31 | 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/FileConsentCard.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// File consent card attachment. 11 | /// 12 | public partial class FileConsentCard 13 | { 14 | /// 15 | /// Initializes a new instance of the FileConsentCard class. 16 | /// 17 | public FileConsentCard() { } 18 | 19 | /// 20 | /// Initializes a new instance of the FileConsentCard class. 21 | /// 22 | /// File description. 23 | /// Size of the file to be uploaded in 24 | /// Bytes. 25 | /// Context sent back to the Bot if user 26 | /// consented to upload. This is free flow schema and is sent back in 27 | /// Value field of Activity. 28 | /// Context sent back to the Bot if user 29 | /// declined. This is free flow schema and is sent back in Value 30 | /// field of Activity. 31 | public FileConsentCard(string description = default(string), long? sizeInBytes = default(long?), object acceptContext = default(object), object declineContext = default(object)) 32 | { 33 | Description = description; 34 | SizeInBytes = sizeInBytes; 35 | AcceptContext = acceptContext; 36 | DeclineContext = declineContext; 37 | } 38 | 39 | /// 40 | /// Gets or sets file description. 41 | /// 42 | [Newtonsoft.Json.JsonProperty(PropertyName = "description")] 43 | public string Description { get; set; } 44 | 45 | /// 46 | /// Gets or sets size of the file to be uploaded in Bytes. 47 | /// 48 | [Newtonsoft.Json.JsonProperty(PropertyName = "sizeInBytes")] 49 | public long? SizeInBytes { get; set; } 50 | 51 | /// 52 | /// Gets or sets context sent back to the Bot if user consented to 53 | /// upload. This is free flow schema and is sent back in Value field 54 | /// of Activity. 55 | /// 56 | [Newtonsoft.Json.JsonProperty(PropertyName = "acceptContext")] 57 | public object AcceptContext { get; set; } 58 | 59 | /// 60 | /// Gets or sets context sent back to the Bot if user declined. This 61 | /// is free flow schema and is sent back in Value field of Activity. 62 | /// 63 | [Newtonsoft.Json.JsonProperty(PropertyName = "declineContext")] 64 | public object DeclineContext { get; set; } 65 | 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/FileConsentCardResponse.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// File consent card response invoke activity payload. 11 | /// 12 | public partial class FileConsentCardResponse 13 | { 14 | /// 15 | /// Initializes a new instance of the FileConsentCardResponse class. 16 | /// 17 | public FileConsentCardResponse() { } 18 | 19 | /// 20 | /// Initializes a new instance of the FileConsentCardResponse class. 21 | /// 22 | /// User action on the file consent card. 23 | /// Possible values include: 'accept', 'decline' 24 | /// Context sent with the file consent 25 | /// card. 26 | /// Context sent back to the Bot if user 27 | /// declined. This is free flow schema and is sent back in Value 28 | /// field of Activity. 29 | public FileConsentCardResponse(string action = default(string), object context = default(object), FileUploadInfo uploadInfo = default(FileUploadInfo)) 30 | { 31 | Action = action; 32 | Context = context; 33 | UploadInfo = uploadInfo; 34 | } 35 | 36 | /// 37 | /// Gets or sets user action on the file consent card. Possible values 38 | /// include: 'accept', 'decline' 39 | /// 40 | [Newtonsoft.Json.JsonProperty(PropertyName = "action")] 41 | public string Action { get; set; } 42 | 43 | /// 44 | /// Gets or sets context sent with the file consent card. 45 | /// 46 | [Newtonsoft.Json.JsonProperty(PropertyName = "context")] 47 | public object Context { get; set; } 48 | 49 | /// 50 | /// Gets or sets context sent back to the Bot if user declined. This 51 | /// is free flow schema and is sent back in Value field of Activity. 52 | /// 53 | [Newtonsoft.Json.JsonProperty(PropertyName = "uploadInfo")] 54 | public FileUploadInfo UploadInfo { get; set; } 55 | 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/FileDownloadInfo.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// File download info attachment. 11 | /// 12 | public partial class FileDownloadInfo 13 | { 14 | /// 15 | /// Initializes a new instance of the FileDownloadInfo class. 16 | /// 17 | public FileDownloadInfo() { } 18 | 19 | /// 20 | /// Initializes a new instance of the FileDownloadInfo class. 21 | /// 22 | /// File download url. 23 | /// Unique Id for the file. 24 | /// Type of file. 25 | public FileDownloadInfo(string downloadUrl = default(string), string uniqueId = default(string), string fileType = default(string)) 26 | { 27 | DownloadUrl = downloadUrl; 28 | UniqueId = uniqueId; 29 | FileType = fileType; 30 | } 31 | 32 | /// 33 | /// Gets or sets file download url. 34 | /// 35 | [Newtonsoft.Json.JsonProperty(PropertyName = "downloadUrl")] 36 | public string DownloadUrl { get; set; } 37 | 38 | /// 39 | /// Gets or sets unique Id for the file. 40 | /// 41 | [Newtonsoft.Json.JsonProperty(PropertyName = "uniqueId")] 42 | public string UniqueId { get; set; } 43 | 44 | /// 45 | /// Gets or sets type of file. 46 | /// 47 | [Newtonsoft.Json.JsonProperty(PropertyName = "fileType")] 48 | public string FileType { get; set; } 49 | 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/FileInfoCard.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// File info card. 11 | /// 12 | public partial class FileInfoCard 13 | { 14 | /// 15 | /// Initializes a new instance of the FileInfoCard class. 16 | /// 17 | public FileInfoCard() { } 18 | 19 | /// 20 | /// Initializes a new instance of the FileInfoCard class. 21 | /// 22 | /// Unique Id for the file. 23 | /// Type of file. 24 | public FileInfoCard(string uniqueId = default(string), string fileType = default(string)) 25 | { 26 | UniqueId = uniqueId; 27 | FileType = fileType; 28 | } 29 | 30 | /// 31 | /// Gets or sets unique Id for the file. 32 | /// 33 | [Newtonsoft.Json.JsonProperty(PropertyName = "uniqueId")] 34 | public string UniqueId { get; set; } 35 | 36 | /// 37 | /// Gets or sets type of file. 38 | /// 39 | [Newtonsoft.Json.JsonProperty(PropertyName = "fileType")] 40 | public string FileType { get; set; } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/FileUploadInfo.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// Upload information for the file. 11 | /// 12 | public partial class FileUploadInfo 13 | { 14 | /// 15 | /// Initializes a new instance of the FileUploadInfo class. 16 | /// 17 | public FileUploadInfo() { } 18 | 19 | /// 20 | /// Initializes a new instance of the FileUploadInfo class. 21 | /// 22 | /// File name. 23 | /// URL to an upload session for the file 24 | /// contents. 25 | /// URL to the file. 26 | /// Identifier that uniquely identifies the 27 | /// file. 28 | /// File type. 29 | public FileUploadInfo(string name = default(string), string uploadUrl = default(string), string contentUrl = default(string), string uniqueId = default(string), string fileType = default(string)) 30 | { 31 | Name = name; 32 | UploadUrl = uploadUrl; 33 | ContentUrl = contentUrl; 34 | UniqueId = uniqueId; 35 | FileType = fileType; 36 | } 37 | 38 | /// 39 | /// Gets or sets file name. 40 | /// 41 | [Newtonsoft.Json.JsonProperty(PropertyName = "name")] 42 | public string Name { get; set; } 43 | 44 | /// 45 | /// Gets or sets URL to an upload session for the file contents. 46 | /// 47 | [Newtonsoft.Json.JsonProperty(PropertyName = "uploadUrl")] 48 | public string UploadUrl { get; set; } 49 | 50 | /// 51 | /// Gets or sets URL to the file. 52 | /// 53 | [Newtonsoft.Json.JsonProperty(PropertyName = "contentUrl")] 54 | public string ContentUrl { get; set; } 55 | 56 | /// 57 | /// Gets or sets identifier that uniquely identifies the file. 58 | /// 59 | [Newtonsoft.Json.JsonProperty(PropertyName = "uniqueId")] 60 | public string UniqueId { get; set; } 61 | 62 | /// 63 | /// Gets or sets file type. 64 | /// 65 | [Newtonsoft.Json.JsonProperty(PropertyName = "fileType")] 66 | public string FileType { get; set; } 67 | 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/NotificationInfo.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// Specifies if a notification is to be sent for the mentions. 11 | /// 12 | public partial class NotificationInfo 13 | { 14 | /// 15 | /// Initializes a new instance of the NotificationInfo class. 16 | /// 17 | public NotificationInfo() { } 18 | 19 | /// 20 | /// Initializes a new instance of the NotificationInfo class. 21 | /// 22 | /// true if notification is to be sent to the 23 | /// user, false otherwise. 24 | public NotificationInfo(bool? alert = default(bool?)) 25 | { 26 | Alert = alert; 27 | } 28 | 29 | /// 30 | /// Gets or sets true if notification is to be sent to the user, false 31 | /// otherwise. 32 | /// 33 | [Newtonsoft.Json.JsonProperty(PropertyName = "alert")] 34 | public bool? Alert { get; set; } 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/O365ConnectorCardActionBase.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// O365 connector card action base 11 | /// 12 | public partial class O365ConnectorCardActionBase 13 | { 14 | /// 15 | /// Initializes a new instance of the O365ConnectorCardActionBase 16 | /// class. 17 | /// 18 | public O365ConnectorCardActionBase() { } 19 | 20 | /// 21 | /// Initializes a new instance of the O365ConnectorCardActionBase 22 | /// class. 23 | /// 24 | /// Type of the action 25 | /// Name of the action that will be used as button 26 | /// title 27 | /// Action Id 28 | public O365ConnectorCardActionBase(string type = default(string), string name = default(string), string id = default(string)) 29 | { 30 | Type = type; 31 | Name = name; 32 | Id = id; 33 | } 34 | 35 | /// 36 | /// Gets or sets type of the action 37 | /// 38 | [Newtonsoft.Json.JsonProperty(PropertyName = "@type")] 39 | public string Type { get; set; } 40 | 41 | /// 42 | /// Gets or sets name of the action that will be used as button title 43 | /// 44 | [Newtonsoft.Json.JsonProperty(PropertyName = "name")] 45 | public string Name { get; set; } 46 | 47 | /// 48 | /// Gets or sets action Id 49 | /// 50 | [Newtonsoft.Json.JsonProperty(PropertyName = "@id")] 51 | public string Id { get; set; } 52 | 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/O365ConnectorCardActionQuery.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// O365 connector card HttpPOST invoke query 11 | /// 12 | public partial class O365ConnectorCardActionQuery 13 | { 14 | /// 15 | /// Initializes a new instance of the O365ConnectorCardActionQuery 16 | /// class. 17 | /// 18 | public O365ConnectorCardActionQuery() { } 19 | 20 | /// 21 | /// Initializes a new instance of the O365ConnectorCardActionQuery 22 | /// class. 23 | /// 24 | /// The results of body string defined in 25 | /// IO365ConnectorCardHttpPOST with substituted input values 26 | /// Action Id associated with the HttpPOST 27 | /// action button triggered, defined in 28 | /// O365ConnectorCardActionBase. 29 | public O365ConnectorCardActionQuery(string body = default(string), string actionId = default(string)) 30 | { 31 | Body = body; 32 | ActionId = actionId; 33 | } 34 | 35 | /// 36 | /// Gets or sets the results of body string defined in 37 | /// IO365ConnectorCardHttpPOST with substituted input values 38 | /// 39 | [Newtonsoft.Json.JsonProperty(PropertyName = "body")] 40 | public string Body { get; set; } 41 | 42 | /// 43 | /// Gets or sets action Id associated with the HttpPOST action button 44 | /// triggered, defined in O365ConnectorCardActionBase. 45 | /// 46 | [Newtonsoft.Json.JsonProperty(PropertyName = "actionId")] 47 | public string ActionId { get; set; } 48 | 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/O365ConnectorCardDateInput.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// O365 connector card date input 11 | /// 12 | public partial class O365ConnectorCardDateInput : O365ConnectorCardInputBase 13 | { 14 | /// 15 | /// Initializes a new instance of the O365ConnectorCardDateInput class. 16 | /// 17 | public O365ConnectorCardDateInput() { } 18 | 19 | /// 20 | /// Initializes a new instance of the O365ConnectorCardDateInput class. 21 | /// 22 | /// Input type name 23 | /// Input Id. It must be unique per entire O365 24 | /// connector card. 25 | /// Define if this input is a required field. 26 | /// Default value is false. 27 | /// Input title that will be shown as the 28 | /// placeholder 29 | /// Default value for this input field 30 | /// Include time input field. Default value 31 | /// is false (date only). 32 | public O365ConnectorCardDateInput(string type = default(string), string id = default(string), bool? isRequired = default(bool?), string title = default(string), string value = default(string), bool? includeTime = default(bool?)) 33 | : base(type, id, isRequired, title, value) 34 | { 35 | IncludeTime = includeTime; 36 | } 37 | 38 | /// 39 | /// Gets or sets include time input field. Default value is false 40 | /// (date only). 41 | /// 42 | [Newtonsoft.Json.JsonProperty(PropertyName = "includeTime")] 43 | public bool? IncludeTime { get; set; } 44 | 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/O365ConnectorCardFact.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// O365 connector card fact 11 | /// 12 | public partial class O365ConnectorCardFact 13 | { 14 | /// 15 | /// Initializes a new instance of the O365ConnectorCardFact class. 16 | /// 17 | public O365ConnectorCardFact() { } 18 | 19 | /// 20 | /// Initializes a new instance of the O365ConnectorCardFact class. 21 | /// 22 | /// Display name of the fact 23 | /// Display value for the fact 24 | public O365ConnectorCardFact(string name = default(string), string value = default(string)) 25 | { 26 | Name = name; 27 | Value = value; 28 | } 29 | 30 | /// 31 | /// Gets or sets display name of the fact 32 | /// 33 | [Newtonsoft.Json.JsonProperty(PropertyName = "name")] 34 | public string Name { get; set; } 35 | 36 | /// 37 | /// Gets or sets display value for the fact 38 | /// 39 | [Newtonsoft.Json.JsonProperty(PropertyName = "value")] 40 | public string Value { get; set; } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/O365ConnectorCardHttpPOST.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// O365 connector card HttpPOST action 11 | /// 12 | public partial class O365ConnectorCardHttpPOST : O365ConnectorCardActionBase 13 | { 14 | /// 15 | /// Initializes a new instance of the O365ConnectorCardHttpPOST class. 16 | /// 17 | public O365ConnectorCardHttpPOST() { } 18 | 19 | /// 20 | /// Initializes a new instance of the O365ConnectorCardHttpPOST class. 21 | /// 22 | /// Type of the action 23 | /// Name of the action that will be used as button 24 | /// title 25 | /// Action Id 26 | /// Content to be posted back to bots via 27 | /// invoke 28 | public O365ConnectorCardHttpPOST(string type = default(string), string name = default(string), string id = default(string), string body = default(string)) 29 | : base(type, name, id) 30 | { 31 | Body = body; 32 | } 33 | 34 | /// 35 | /// Gets or sets content to be posted back to bots via invoke 36 | /// 37 | [Newtonsoft.Json.JsonProperty(PropertyName = "body")] 38 | public string Body { get; set; } 39 | 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/O365ConnectorCardImage.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// O365 connector card image 11 | /// 12 | public partial class O365ConnectorCardImage 13 | { 14 | /// 15 | /// Initializes a new instance of the O365ConnectorCardImage class. 16 | /// 17 | public O365ConnectorCardImage() { } 18 | 19 | /// 20 | /// Initializes a new instance of the O365ConnectorCardImage class. 21 | /// 22 | /// URL for the image 23 | /// Alternative text for the image 24 | public O365ConnectorCardImage(string image = default(string), string title = default(string)) 25 | { 26 | Image = image; 27 | Title = title; 28 | } 29 | 30 | /// 31 | /// Gets or sets URL for the image 32 | /// 33 | [Newtonsoft.Json.JsonProperty(PropertyName = "image")] 34 | public string Image { get; set; } 35 | 36 | /// 37 | /// Gets or sets alternative text for the image 38 | /// 39 | [Newtonsoft.Json.JsonProperty(PropertyName = "title")] 40 | public string Title { get; set; } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/O365ConnectorCardMultichoiceInputChoice.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// O365O365 connector card multiple choice input item 11 | /// 12 | public partial class O365ConnectorCardMultichoiceInputChoice 13 | { 14 | /// 15 | /// Initializes a new instance of the 16 | /// O365ConnectorCardMultichoiceInputChoice class. 17 | /// 18 | public O365ConnectorCardMultichoiceInputChoice() { } 19 | 20 | /// 21 | /// Initializes a new instance of the 22 | /// O365ConnectorCardMultichoiceInputChoice class. 23 | /// 24 | /// The text rednered on ActionCard. 25 | /// The value received as results. 26 | public O365ConnectorCardMultichoiceInputChoice(string display = default(string), string value = default(string)) 27 | { 28 | Display = display; 29 | Value = value; 30 | } 31 | 32 | /// 33 | /// Gets or sets the text rednered on ActionCard. 34 | /// 35 | [Newtonsoft.Json.JsonProperty(PropertyName = "display")] 36 | public string Display { get; set; } 37 | 38 | /// 39 | /// Gets or sets the value received as results. 40 | /// 41 | [Newtonsoft.Json.JsonProperty(PropertyName = "value")] 42 | public string Value { get; set; } 43 | 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/O365ConnectorCardOpenUri.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// O365 connector card OpenUri action 11 | /// 12 | public partial class O365ConnectorCardOpenUri : O365ConnectorCardActionBase 13 | { 14 | /// 15 | /// Initializes a new instance of the O365ConnectorCardOpenUri class. 16 | /// 17 | public O365ConnectorCardOpenUri() { } 18 | 19 | /// 20 | /// Initializes a new instance of the O365ConnectorCardOpenUri class. 21 | /// 22 | /// Type of the action 23 | /// Name of the action that will be used as button 24 | /// title 25 | /// Action Id 26 | /// Target os / urls 27 | public O365ConnectorCardOpenUri(string type = default(string), string name = default(string), string id = default(string), System.Collections.Generic.IList targets = default(System.Collections.Generic.IList)) 28 | : base(type, name, id) 29 | { 30 | Targets = targets; 31 | } 32 | 33 | /// 34 | /// Gets or sets target os / urls 35 | /// 36 | [Newtonsoft.Json.JsonProperty(PropertyName = "targets")] 37 | public System.Collections.Generic.IList Targets { get; set; } 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/O365ConnectorCardOpenUriTarget.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// O365 connector card OpenUri target 11 | /// 12 | public partial class O365ConnectorCardOpenUriTarget 13 | { 14 | /// 15 | /// Initializes a new instance of the O365ConnectorCardOpenUriTarget 16 | /// class. 17 | /// 18 | public O365ConnectorCardOpenUriTarget() { } 19 | 20 | /// 21 | /// Initializes a new instance of the O365ConnectorCardOpenUriTarget 22 | /// class. 23 | /// 24 | /// Target operating system. Possible values include: 25 | /// 'default', 'iOS', 'android', 'windows' 26 | /// Target url 27 | public O365ConnectorCardOpenUriTarget(string os = default(string), string uri = default(string)) 28 | { 29 | Os = os; 30 | Uri = uri; 31 | } 32 | 33 | /// 34 | /// Gets or sets target operating system. Possible values include: 35 | /// 'default', 'iOS', 'android', 'windows' 36 | /// 37 | [Newtonsoft.Json.JsonProperty(PropertyName = "os")] 38 | public string Os { get; set; } 39 | 40 | /// 41 | /// Gets or sets target url 42 | /// 43 | [Newtonsoft.Json.JsonProperty(PropertyName = "uri")] 44 | public string Uri { get; set; } 45 | 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/O365ConnectorCardTextInput.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// O365 connector card text input 11 | /// 12 | public partial class O365ConnectorCardTextInput : O365ConnectorCardInputBase 13 | { 14 | /// 15 | /// Initializes a new instance of the O365ConnectorCardTextInput class. 16 | /// 17 | public O365ConnectorCardTextInput() { } 18 | 19 | /// 20 | /// Initializes a new instance of the O365ConnectorCardTextInput class. 21 | /// 22 | /// Input type name 23 | /// Input Id. It must be unique per entire O365 24 | /// connector card. 25 | /// Define if this input is a required field. 26 | /// Default value is false. 27 | /// Input title that will be shown as the 28 | /// placeholder 29 | /// Default value for this input field 30 | /// Define if text input is allowed for 31 | /// multiple lines. Default value is false. 32 | /// Maximum length of text input. Default 33 | /// value is unlimited. 34 | public O365ConnectorCardTextInput(string type = default(string), string id = default(string), bool? isRequired = default(bool?), string title = default(string), string value = default(string), bool? isMultiline = default(bool?), double? maxLength = default(double?)) 35 | : base(type, id, isRequired, title, value) 36 | { 37 | IsMultiline = isMultiline; 38 | MaxLength = maxLength; 39 | } 40 | 41 | /// 42 | /// Gets or sets define if text input is allowed for multiple lines. 43 | /// Default value is false. 44 | /// 45 | [Newtonsoft.Json.JsonProperty(PropertyName = "isMultiline")] 46 | public bool? IsMultiline { get; set; } 47 | 48 | /// 49 | /// Gets or sets maximum length of text input. Default value is 50 | /// unlimited. 51 | /// 52 | [Newtonsoft.Json.JsonProperty(PropertyName = "maxLength")] 53 | public double? MaxLength { get; set; } 54 | 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/O365ConnectorCardViewAction.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// O365 connector card ViewAction action 11 | /// 12 | public partial class O365ConnectorCardViewAction : O365ConnectorCardActionBase 13 | { 14 | /// 15 | /// Initializes a new instance of the O365ConnectorCardViewAction 16 | /// class. 17 | /// 18 | public O365ConnectorCardViewAction() { } 19 | 20 | /// 21 | /// Initializes a new instance of the O365ConnectorCardViewAction 22 | /// class. 23 | /// 24 | /// Type of the action 25 | /// Name of the action that will be used as button 26 | /// title 27 | /// Action Id 28 | /// Target urls, only the first url effective for 29 | /// card button 30 | public O365ConnectorCardViewAction(string type = default(string), string name = default(string), string id = default(string), System.Collections.Generic.IList target = default(System.Collections.Generic.IList)) 31 | : base(type, name, id) 32 | { 33 | Target = target; 34 | } 35 | 36 | /// 37 | /// Gets or sets target urls, only the first url effective for card 38 | /// button 39 | /// 40 | [Newtonsoft.Json.JsonProperty(PropertyName = "target")] 41 | public System.Collections.Generic.IList Target { get; set; } 42 | 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/SigninStateVerificationQuery.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// Signin state (part of signin action auth flow) verification invoke 11 | /// query 12 | /// 13 | public partial class SigninStateVerificationQuery 14 | { 15 | /// 16 | /// Initializes a new instance of the SigninStateVerificationQuery 17 | /// class. 18 | /// 19 | public SigninStateVerificationQuery() { } 20 | 21 | /// 22 | /// Initializes a new instance of the SigninStateVerificationQuery 23 | /// class. 24 | /// 25 | /// The state string originally received when the 26 | /// signin web flow is finished with a state posted back to client 27 | /// via tab SDK 28 | /// microsoftTeams.authentication.notifySuccess(state) 29 | public SigninStateVerificationQuery(string state = default(string)) 30 | { 31 | State = state; 32 | } 33 | 34 | /// 35 | /// Gets or sets The state string originally received when the signin 36 | /// web flow is finished with a state posted back to client via tab 37 | /// SDK microsoftTeams.authentication.notifySuccess(state) 38 | /// 39 | [Newtonsoft.Json.JsonProperty(PropertyName = "state")] 40 | public string State { get; set; } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/TaskModuleContinueResponse.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// Task Module Response with continue action. 11 | /// 12 | public partial class TaskModuleContinueResponse : TaskModuleResponseBase 13 | { 14 | /// 15 | /// Initializes a new instance of the TaskModuleContinueResponse class. 16 | /// 17 | public TaskModuleContinueResponse() { } 18 | 19 | /// 20 | /// Initializes a new instance of the TaskModuleContinueResponse class. 21 | /// 22 | /// Choice of action options when responding to the 23 | /// task/submit message. Possible values include: 'message', 24 | /// 'continue' 25 | /// The JSON for the Adaptive card to appear in 26 | /// the task module. 27 | public TaskModuleContinueResponse(string type = default(string), TaskModuleTaskInfo value = default(TaskModuleTaskInfo)) 28 | : base(type) 29 | { 30 | Value = value; 31 | } 32 | 33 | /// 34 | /// Gets or sets the JSON for the Adaptive card to appear in the task 35 | /// module. 36 | /// 37 | [Newtonsoft.Json.JsonProperty(PropertyName = "value")] 38 | public TaskModuleTaskInfo Value { get; set; } 39 | 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/TaskModuleMessageResponse.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// Task Module response with message action. 11 | /// 12 | public partial class TaskModuleMessageResponse : TaskModuleResponseBase 13 | { 14 | /// 15 | /// Initializes a new instance of the TaskModuleMessageResponse class. 16 | /// 17 | public TaskModuleMessageResponse() { } 18 | 19 | /// 20 | /// Initializes a new instance of the TaskModuleMessageResponse class. 21 | /// 22 | /// Choice of action options when responding to the 23 | /// task/submit message. Possible values include: 'message', 24 | /// 'continue' 25 | /// Teams will display the value of value in a 26 | /// popup message box. 27 | public TaskModuleMessageResponse(string type = default(string), string value = default(string)) 28 | : base(type) 29 | { 30 | Value = value; 31 | } 32 | 33 | /// 34 | /// Gets or sets teams will display the value of value in a popup 35 | /// message box. 36 | /// 37 | [Newtonsoft.Json.JsonProperty(PropertyName = "value")] 38 | public string Value { get; set; } 39 | 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/TaskModuleResponseBase.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// Base class for Task Module responses 11 | /// 12 | public partial class TaskModuleResponseBase 13 | { 14 | /// 15 | /// Initializes a new instance of the TaskModuleResponseBase class. 16 | /// 17 | public TaskModuleResponseBase() { } 18 | 19 | /// 20 | /// Initializes a new instance of the TaskModuleResponseBase class. 21 | /// 22 | /// Choice of action options when responding to the 23 | /// task/submit message. Possible values include: 'message', 24 | /// 'continue' 25 | public TaskModuleResponseBase(string type = default(string)) 26 | { 27 | Type = type; 28 | } 29 | 30 | /// 31 | /// Gets or sets choice of action options when responding to the 32 | /// task/submit message. Possible values include: 'message', 33 | /// 'continue' 34 | /// 35 | [Newtonsoft.Json.JsonProperty(PropertyName = "type")] 36 | public string Type { get; set; } 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/TaskModuleResponseEnvelope.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// Envelope for Task Module Response. 11 | /// 12 | public partial class TaskModuleResponseEnvelope 13 | { 14 | /// 15 | /// Initializes a new instance of the TaskModuleResponseEnvelope class. 16 | /// 17 | public TaskModuleResponseEnvelope() { } 18 | 19 | /// 20 | /// Initializes a new instance of the TaskModuleResponseEnvelope class. 21 | /// 22 | /// The JSON for the Adaptive card to appear in the 23 | /// task module. 24 | public TaskModuleResponseEnvelope(TaskModuleResponseBase task = default(TaskModuleResponseBase)) 25 | { 26 | Task = task; 27 | } 28 | 29 | /// 30 | /// Gets or sets the JSON for the Adaptive card to appear in the task 31 | /// module. 32 | /// 33 | [Newtonsoft.Json.JsonProperty(PropertyName = "task")] 34 | public TaskModuleResponseBase Task { get; set; } 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/TeamDetails.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// Details related to a team 11 | /// 12 | public partial class TeamDetails 13 | { 14 | /// 15 | /// Initializes a new instance of the TeamDetails class. 16 | /// 17 | public TeamDetails() { } 18 | 19 | /// 20 | /// Initializes a new instance of the TeamDetails class. 21 | /// 22 | /// Unique identifier representing a team 23 | /// Name of team. 24 | /// Azure Active Directory (AAD) Group Id for 25 | /// the team. 26 | public TeamDetails(string id = default(string), string name = default(string), string aadGroupId = default(string)) 27 | { 28 | Id = id; 29 | Name = name; 30 | AadGroupId = aadGroupId; 31 | } 32 | 33 | /// 34 | /// Gets or sets unique identifier representing a team 35 | /// 36 | [Newtonsoft.Json.JsonProperty(PropertyName = "id")] 37 | public string Id { get; set; } 38 | 39 | /// 40 | /// Gets or sets name of team. 41 | /// 42 | [Newtonsoft.Json.JsonProperty(PropertyName = "name")] 43 | public string Name { get; set; } 44 | 45 | /// 46 | /// Gets or sets azure Active Directory (AAD) Group Id for the team. 47 | /// 48 | [Newtonsoft.Json.JsonProperty(PropertyName = "aadGroupId")] 49 | public string AadGroupId { get; set; } 50 | 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/TeamInfo.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// Describes a team 11 | /// 12 | public partial class TeamInfo 13 | { 14 | /// 15 | /// Initializes a new instance of the TeamInfo class. 16 | /// 17 | public TeamInfo() { } 18 | 19 | /// 20 | /// Initializes a new instance of the TeamInfo class. 21 | /// 22 | /// Unique identifier representing a team 23 | /// Name of team. 24 | public TeamInfo(string id = default(string), string name = default(string)) 25 | { 26 | Id = id; 27 | Name = name; 28 | } 29 | 30 | /// 31 | /// Gets or sets unique identifier representing a team 32 | /// 33 | [Newtonsoft.Json.JsonProperty(PropertyName = "id")] 34 | public string Id { get; set; } 35 | 36 | /// 37 | /// Gets or sets name of team. 38 | /// 39 | [Newtonsoft.Json.JsonProperty(PropertyName = "name")] 40 | public string Name { get; set; } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/TeamsPagedMembersResult.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// Teams paged member reesult contract. 11 | /// 12 | public partial class TeamsPagedMembersResult 13 | { 14 | /// 15 | /// Initializes a new instance of the TeamsPagedMembersResult class. 16 | /// 17 | public TeamsPagedMembersResult() { } 18 | 19 | /// 20 | /// Initializes a new instance of the TeamsPagedMembersResult class. 21 | /// 22 | /// Continuation token. 23 | /// Target url 24 | public TeamsPagedMembersResult(string continuationToken = default(string), System.Collections.Generic.IList members = default(System.Collections.Generic.IList)) 25 | { 26 | ContinuationToken = continuationToken; 27 | Members = members; 28 | } 29 | 30 | /// 31 | /// Gets or sets continuation token. 32 | /// 33 | [Newtonsoft.Json.JsonProperty(PropertyName = "continuationToken")] 34 | public string ContinuationToken { get; set; } 35 | 36 | /// 37 | /// Gets or sets target url 38 | /// 39 | [Newtonsoft.Json.JsonProperty(PropertyName = "members")] 40 | public System.Collections.Generic.IList Members { get; set; } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsAPI/Models/TenantInfo.cs: -------------------------------------------------------------------------------- 1 | // Code generated by Microsoft (R) AutoRest Code Generator. 2 | // Changes may cause incorrect behavior and will be lost if the code is 3 | // regenerated. 4 | 5 | namespace Microsoft.Bot.Connector.Teams.Models 6 | { 7 | using System.Linq; 8 | 9 | /// 10 | /// Describes a tenant 11 | /// 12 | public partial class TenantInfo 13 | { 14 | /// 15 | /// Initializes a new instance of the TenantInfo class. 16 | /// 17 | public TenantInfo() { } 18 | 19 | /// 20 | /// Initializes a new instance of the TenantInfo class. 21 | /// 22 | /// Unique identifier representing a tenant 23 | public TenantInfo(string id = default(string)) 24 | { 25 | Id = id; 26 | } 27 | 28 | /// 29 | /// Gets or sets unique identifier representing a tenant 30 | /// 31 | [Newtonsoft.Json.JsonProperty(PropertyName = "id")] 32 | public string Id { get; set; } 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/TeamsChannelAccountEx.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.Bot.Connector.Teams.Models 2 | { 3 | /// 4 | /// Teams channel account detailing user Azure Active Directory details. 5 | /// 6 | public partial class TeamsChannelAccount 7 | { 8 | /// 9 | /// Sets the Azure Active Directory object Id from the other JSON field it can appear in. 10 | /// 11 | [Newtonsoft.Json.JsonProperty(PropertyName = "aadObjectId")] 12 | private string AADObjectId { set { ObjectId = value; } } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /CSharp/Library/Microsoft.Bot.Connector.Teams.Shared/generateClient.cmd: -------------------------------------------------------------------------------- 1 | ..\..\packages\autorest.0.17.3\tools\AutoRest -namespace Microsoft.Bot.Connector.Teams -input Swagger\TeamsAPI.json -outputDirectory TeamsAPI -AddCredentials -ClientName ConnectorClient -Header " Code generated by Microsoft (R) AutoRest Code Generator. Changes may cause incorrect behavior and will be lost if the code is regenerated. 2 | del TeamsAPI\ConnectorClient.cs 3 | del TeamsAPI\IConnectorClient.cs 4 | del TeamsAPI\Models\CardAction.cs 5 | del TeamsAPI\Models\CardImage.cs 6 | del TeamsAPI\Models\Attachment.cs 7 | del TeamsAPI\Models\ChannelAccount.cs -------------------------------------------------------------------------------- /CSharp/Packager/Microsoft.Bot.Connector.Teams.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Microsoft.Bot.Connector.Teams 5 | 0.10.0 6 | Microsoft 7 | https://github.com/OfficeDev/BotBuilder-MicrosoftTeams/blob/master/LICENSE 8 | true 9 | https://github.com/OfficeDev/BotBuilder-MicrosoftTeams 10 | © Microsoft Corporation. All rights reserved. 11 | Adds functionality for Get Paged Conversation Members and Get Single Conversation Member 12 | 13 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /CSharp/Packager/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("Packager")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Packager")] 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("aec7b503-fa3f-49b3-a719-437f04710c71")] 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/Packager/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /CSharp/Packager/nuget.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/BotBuilder-MicrosoftTeams/6a71ca74e9a878551730dbf19a119cab5f03a788/CSharp/Packager/nuget.exe -------------------------------------------------------------------------------- /CSharp/Packager/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /CSharp/RootMarker: -------------------------------------------------------------------------------- 1 | DO NOT DELETE THIS FILE. USED FOR BUILD. -------------------------------------------------------------------------------- /CSharp/Samples/Microsoft.Bot.Connector.Teams.SampleBot.ASPCore/Microsoft.Bot.Connector.Teams.SampleBot.ASPCore.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp1.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /CSharp/Samples/Microsoft.Bot.Connector.Teams.SampleBot.ASPCore/Program.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.ASPCore 37 | { 38 | using System.IO; 39 | using Microsoft.AspNetCore.Builder; 40 | using Microsoft.AspNetCore.Hosting; 41 | 42 | /// 43 | /// Main program entry class. 44 | /// 45 | public class Program 46 | { 47 | /// 48 | /// Program entry point. 49 | /// 50 | /// Command like arguments. 51 | public static void Main(string[] args) 52 | { 53 | var host = new WebHostBuilder() 54 | .UseKestrel() 55 | .UseContentRoot(Directory.GetCurrentDirectory()) 56 | .UseIISIntegration() 57 | .UseStartup() 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 | [![Build status](https://ci.appveyor.com/api/projects/status/504dr2qv99ee2ide/branch/master?svg=true)](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 | --------------------------------------------------------------------------------