├── .gitattributes ├── .gitignore ├── AdapterWithErrorHandler.cs ├── Assets └── images │ ├── Bot Features - Merchandisers Daily Task.png │ ├── Flow Chart.png │ ├── GoToMarket Presentation.pptx │ └── empty ├── AzureEstimateGoToMarketBot.xlsx ├── Bots ├── DialogAndWelcomeBot.cs └── DialogBot.cs ├── Cards ├── Cards.cs └── welcomeCard.json ├── Controllers └── BotController.cs ├── DeploymentTemplates ├── new-rg-parameters.json ├── preexisting-rg-parameters.json ├── template-with-new-rg.json └── template-with-preexisting-rg.json ├── Dialogs ├── CancelAndHelpDialog.cs ├── DisplayProduct.cs ├── MainDialog.cs ├── Operations │ ├── AddMarketReport.cs │ ├── AddMoreProductsDialog.cs │ ├── AddProductsDialog.cs │ ├── CreateMoreTaskDialog.cs │ ├── CreateTaskDialog.cs │ ├── DeleteTaskDialog.cs │ ├── EmailAuthenticationDialog.cs │ ├── GetProductIDDialog.cs │ ├── IndividualProductUpdateDialog.cs │ ├── MerchandiserAttendance.cs │ ├── RemoveProductsDialog.cs │ ├── UpdateProductDialog.cs │ ├── ViewAllProductsDialog.cs │ └── ViewTaskDialog.cs └── ScheduleTask.cs ├── EcommerceAdminBot.csproj ├── EcommerceAdminBot.sln ├── Models ├── ConversationData.cs ├── MarketDBDetails.cs ├── MarketDetails.cs ├── ProductDBDetails.cs ├── ProductDetails.cs ├── User.cs └── UserProfile.cs ├── Program.cs ├── Properties ├── ServiceDependencies │ ├── EcommerceAdminBot20220704202001 - Web Deploy │ │ └── profile.arm.json │ ├── lgMerchandiserBot - Web Deploy │ │ └── profile.arm.json │ └── lgMerchandiserBot - Web Deploy1 │ │ └── profile.arm.json └── launchSettings.json ├── README.md ├── Services └── StateService.cs ├── Startup.cs ├── ToDoLUISRecognizer.cs ├── Utilities ├── CosmoDBClientToDo.cs ├── CosmosDBClient.cs ├── Repository.cs ├── ToDoTask.cs └── UserRepository.cs ├── appsettings.Development.json ├── appsettings.json ├── bin └── Debug │ └── netcoreapp3.1 │ ├── AdaptiveCards.dll │ ├── AdaptiveExpressions.dll │ ├── Antlr4.Runtime.Standard.dll │ ├── Azure.Core.dll │ ├── Cosmos.CRTCompat.dll │ ├── DeploymentTemplates │ ├── new-rg-parameters.json │ ├── preexisting-rg-parameters.json │ ├── template-with-new-rg.json │ └── template-with-preexisting-rg.json │ ├── EcommerceAdminBot.deps.json │ ├── EcommerceAdminBot.dll │ ├── EcommerceAdminBot.exe │ ├── EcommerceAdminBot.pdb │ ├── EcommerceAdminBot.runtimeconfig.dev.json │ ├── EcommerceAdminBot.runtimeconfig.json │ ├── Microsoft.AspNetCore.JsonPatch.dll │ ├── Microsoft.AspNetCore.Mvc.NewtonsoftJson.dll │ ├── Microsoft.Azure.CognitiveServices.Language.LUIS.dll │ ├── Microsoft.Azure.Cosmos.Client.dll │ ├── Microsoft.Azure.Cosmos.Core.dll │ ├── Microsoft.Azure.Cosmos.Direct.dll │ ├── Microsoft.Azure.Cosmos.Serialization.HybridRow.dll │ ├── Microsoft.Azure.Cosmos.ServiceInterop.dll │ ├── Microsoft.Bcl.AsyncInterfaces.dll │ ├── Microsoft.Bcl.HashCode.dll │ ├── Microsoft.Bot.Builder.AI.Luis.dll │ ├── Microsoft.Bot.Builder.Dialogs.Declarative.dll │ ├── Microsoft.Bot.Builder.Dialogs.dll │ ├── Microsoft.Bot.Builder.Integration.AspNet.Core.dll │ ├── Microsoft.Bot.Builder.dll │ ├── Microsoft.Bot.Configuration.dll │ ├── Microsoft.Bot.Connector.dll │ ├── Microsoft.Bot.Schema.dll │ ├── Microsoft.Bot.Streaming.dll │ ├── Microsoft.IdentityModel.Clients.ActiveDirectory.dll │ ├── Microsoft.IdentityModel.JsonWebTokens.dll │ ├── Microsoft.IdentityModel.Logging.dll │ ├── Microsoft.IdentityModel.Protocols.OpenIdConnect.dll │ ├── Microsoft.IdentityModel.Protocols.dll │ ├── Microsoft.IdentityModel.Tokens.dll │ ├── Microsoft.Recognizers.Definitions.dll │ ├── Microsoft.Recognizers.Text.Choice.dll │ ├── Microsoft.Recognizers.Text.DataTypes.TimexExpression.dll │ ├── Microsoft.Recognizers.Text.DateTime.dll │ ├── Microsoft.Recognizers.Text.Number.dll │ ├── Microsoft.Recognizers.Text.NumberWithUnit.dll │ ├── Microsoft.Recognizers.Text.dll │ ├── Microsoft.Rest.ClientRuntime.Azure.dll │ ├── Microsoft.Rest.ClientRuntime.dll │ ├── Newtonsoft.Json.Bson.dll │ ├── Newtonsoft.Json.dll │ ├── NuGet.Common.dll │ ├── NuGet.Configuration.dll │ ├── NuGet.Frameworks.dll │ ├── NuGet.Packaging.dll │ ├── NuGet.Versioning.dll │ ├── System.Configuration.ConfigurationManager.dll │ ├── System.IdentityModel.Tokens.Jwt.dll │ ├── System.Security.Cryptography.ProtectedData.dll │ ├── appsettings.Development.json │ ├── appsettings.json │ └── runtimes │ ├── win-x64 │ └── native │ │ ├── Cosmos.CRTCompat.dll │ │ └── Microsoft.Azure.Cosmos.ServiceInterop.dll │ └── win │ └── lib │ └── netstandard2.0 │ └── System.Security.Cryptography.ProtectedData.dll ├── obj ├── Debug │ └── netcoreapp3.1 │ │ ├── .NETCoreApp,Version=v3.1.AssemblyAttributes.cs │ │ ├── EcommerceAdminBot.AssemblyInfo.cs │ │ ├── EcommerceAdminBot.AssemblyInfoInputs.cache │ │ ├── EcommerceAdminBot.GeneratedMSBuildEditorConfig.editorconfig │ │ ├── EcommerceAdminBot.MvcApplicationPartsAssemblyInfo.cache │ │ ├── EcommerceAdminBot.MvcApplicationPartsAssemblyInfo.cs │ │ ├── EcommerceAdminBot.RazorTargetAssemblyInfo.cache │ │ ├── EcommerceAdminBot.assets.cache │ │ ├── EcommerceAdminBot.csproj.AssemblyReference.cache │ │ ├── EcommerceAdminBot.csproj.CopyComplete │ │ ├── EcommerceAdminBot.csproj.CoreCompileInputs.cache │ │ ├── EcommerceAdminBot.csproj.FileListAbsolute.txt │ │ ├── EcommerceAdminBot.dll │ │ ├── EcommerceAdminBot.genruntimeconfig.cache │ │ ├── EcommerceAdminBot.pdb │ │ ├── apphost.exe │ │ └── staticwebassets │ │ ├── EcommerceAdminBot.StaticWebAssets.Manifest.cache │ │ └── EcommerceAdminBot.StaticWebAssets.xml ├── EcommerceAdminBot.csproj.nuget.dgspec.json ├── EcommerceAdminBot.csproj.nuget.g.props ├── EcommerceAdminBot.csproj.nuget.g.targets ├── project.assets.json └── project.nuget.cache └── wwwroot └── default.htm /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Oo]ut/ 33 | [Ll]og/ 34 | [Ll]ogs/ 35 | 36 | # Visual Studio 2015/2017 cache/options directory 37 | .vs/ 38 | # Uncomment if you have tasks that create the project's static files in wwwroot 39 | #wwwroot/ 40 | 41 | # Visual Studio 2017 auto generated files 42 | Generated\ Files/ 43 | 44 | # MSTest test Results 45 | [Tt]est[Rr]esult*/ 46 | [Bb]uild[Ll]og.* 47 | 48 | # NUnit 49 | *.VisualState.xml 50 | TestResult.xml 51 | nunit-*.xml 52 | 53 | # Build Results of an ATL Project 54 | [Dd]ebugPS/ 55 | [Rr]eleasePS/ 56 | dlldata.c 57 | 58 | # Benchmark Results 59 | BenchmarkDotNet.Artifacts/ 60 | 61 | # .NET Core 62 | project.lock.json 63 | project.fragment.lock.json 64 | artifacts/ 65 | 66 | # ASP.NET Scaffolding 67 | ScaffoldingReadMe.txt 68 | 69 | # StyleCop 70 | StyleCopReport.xml 71 | 72 | # Files built by Visual Studio 73 | *_i.c 74 | *_p.c 75 | *_h.h 76 | *.ilk 77 | *.meta 78 | *.obj 79 | *.iobj 80 | *.pch 81 | *.pdb 82 | *.ipdb 83 | *.pgc 84 | *.pgd 85 | *.rsp 86 | *.sbr 87 | *.tlb 88 | *.tli 89 | *.tlh 90 | *.tmp 91 | *.tmp_proj 92 | *_wpftmp.csproj 93 | *.log 94 | *.vspscc 95 | *.vssscc 96 | .builds 97 | *.pidb 98 | *.svclog 99 | *.scc 100 | 101 | # Chutzpah Test files 102 | _Chutzpah* 103 | 104 | # Visual C++ cache files 105 | ipch/ 106 | *.aps 107 | *.ncb 108 | *.opendb 109 | *.opensdf 110 | *.sdf 111 | *.cachefile 112 | *.VC.db 113 | *.VC.VC.opendb 114 | 115 | # Visual Studio profiler 116 | *.psess 117 | *.vsp 118 | *.vspx 119 | *.sap 120 | 121 | # Visual Studio Trace Files 122 | *.e2e 123 | 124 | # TFS 2012 Local Workspace 125 | $tf/ 126 | 127 | # Guidance Automation Toolkit 128 | *.gpState 129 | 130 | # ReSharper is a .NET coding add-in 131 | _ReSharper*/ 132 | *.[Rr]e[Ss]harper 133 | *.DotSettings.user 134 | 135 | # TeamCity is a build add-in 136 | _TeamCity* 137 | 138 | # DotCover is a Code Coverage Tool 139 | *.dotCover 140 | 141 | # AxoCover is a Code Coverage Tool 142 | .axoCover/* 143 | !.axoCover/settings.json 144 | 145 | # Coverlet is a free, cross platform Code Coverage Tool 146 | coverage*.json 147 | coverage*.xml 148 | coverage*.info 149 | 150 | # Visual Studio code coverage results 151 | *.coverage 152 | *.coveragexml 153 | 154 | # NCrunch 155 | _NCrunch_* 156 | .*crunch*.local.xml 157 | nCrunchTemp_* 158 | 159 | # MightyMoose 160 | *.mm.* 161 | AutoTest.Net/ 162 | 163 | # Web workbench (sass) 164 | .sass-cache/ 165 | 166 | # Installshield output folder 167 | [Ee]xpress/ 168 | 169 | # DocProject is a documentation generator add-in 170 | DocProject/buildhelp/ 171 | DocProject/Help/*.HxT 172 | DocProject/Help/*.HxC 173 | DocProject/Help/*.hhc 174 | DocProject/Help/*.hhk 175 | DocProject/Help/*.hhp 176 | DocProject/Help/Html2 177 | DocProject/Help/html 178 | 179 | # Click-Once directory 180 | publish/ 181 | 182 | # Publish Web Output 183 | *.[Pp]ublish.xml 184 | *.azurePubxml 185 | # Note: Comment the next line if you want to checkin your web deploy settings, 186 | # but database connection strings (with potential passwords) will be unencrypted 187 | *.pubxml 188 | *.publishproj 189 | 190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 191 | # checkin your Azure Web App publish settings, but sensitive information contained 192 | # in these scripts will be unencrypted 193 | PublishScripts/ 194 | 195 | # NuGet Packages 196 | *.nupkg 197 | # NuGet Symbol Packages 198 | *.snupkg 199 | # The packages folder can be ignored because of Package Restore 200 | **/[Pp]ackages/* 201 | # except build/, which is used as an MSBuild target. 202 | !**/[Pp]ackages/build/ 203 | # Uncomment if necessary however generally it will be regenerated when needed 204 | #!**/[Pp]ackages/repositories.config 205 | # NuGet v3's project.json files produces more ignorable files 206 | *.nuget.props 207 | *.nuget.targets 208 | 209 | # Microsoft Azure Build Output 210 | csx/ 211 | *.build.csdef 212 | 213 | # Microsoft Azure Emulator 214 | ecf/ 215 | rcf/ 216 | 217 | # Windows Store app package directories and files 218 | AppPackages/ 219 | BundleArtifacts/ 220 | Package.StoreAssociation.xml 221 | _pkginfo.txt 222 | *.appx 223 | *.appxbundle 224 | *.appxupload 225 | 226 | # Visual Studio cache files 227 | # files ending in .cache can be ignored 228 | *.[Cc]ache 229 | # but keep track of directories ending in .cache 230 | !?*.[Cc]ache/ 231 | 232 | # Others 233 | ClientBin/ 234 | ~$* 235 | *~ 236 | *.dbmdl 237 | *.dbproj.schemaview 238 | *.jfm 239 | *.pfx 240 | *.publishsettings 241 | orleans.codegen.cs 242 | 243 | # Including strong name files can present a security risk 244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 245 | #*.snk 246 | 247 | # Since there are multiple workflows, uncomment next line to ignore bower_components 248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 249 | #bower_components/ 250 | 251 | # RIA/Silverlight projects 252 | Generated_Code/ 253 | 254 | # Backup & report files from converting an old project file 255 | # to a newer Visual Studio version. Backup files are not needed, 256 | # because we have git ;-) 257 | _UpgradeReport_Files/ 258 | Backup*/ 259 | UpgradeLog*.XML 260 | UpgradeLog*.htm 261 | ServiceFabricBackup/ 262 | *.rptproj.bak 263 | 264 | # SQL Server files 265 | *.mdf 266 | *.ldf 267 | *.ndf 268 | 269 | # Business Intelligence projects 270 | *.rdl.data 271 | *.bim.layout 272 | *.bim_*.settings 273 | *.rptproj.rsuser 274 | *- [Bb]ackup.rdl 275 | *- [Bb]ackup ([0-9]).rdl 276 | *- [Bb]ackup ([0-9][0-9]).rdl 277 | 278 | # Microsoft Fakes 279 | FakesAssemblies/ 280 | 281 | # GhostDoc plugin setting file 282 | *.GhostDoc.xml 283 | 284 | # Node.js Tools for Visual Studio 285 | .ntvs_analysis.dat 286 | node_modules/ 287 | 288 | # Visual Studio 6 build log 289 | *.plg 290 | 291 | # Visual Studio 6 workspace options file 292 | *.opt 293 | 294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 295 | *.vbw 296 | 297 | # Visual Studio LightSwitch build output 298 | **/*.HTMLClient/GeneratedArtifacts 299 | **/*.DesktopClient/GeneratedArtifacts 300 | **/*.DesktopClient/ModelManifest.xml 301 | **/*.Server/GeneratedArtifacts 302 | **/*.Server/ModelManifest.xml 303 | _Pvt_Extensions 304 | 305 | # Paket dependency manager 306 | .paket/paket.exe 307 | paket-files/ 308 | 309 | # FAKE - F# Make 310 | .fake/ 311 | 312 | # CodeRush personal settings 313 | .cr/personal 314 | 315 | # Python Tools for Visual Studio (PTVS) 316 | __pycache__/ 317 | *.pyc 318 | 319 | # Cake - Uncomment if you are using it 320 | # tools/** 321 | # !tools/packages.config 322 | 323 | # Tabs Studio 324 | *.tss 325 | 326 | # Telerik's JustMock configuration file 327 | *.jmconfig 328 | 329 | # BizTalk build output 330 | *.btp.cs 331 | *.btm.cs 332 | *.odx.cs 333 | *.xsd.cs 334 | 335 | # OpenCover UI analysis results 336 | OpenCover/ 337 | 338 | # Azure Stream Analytics local run output 339 | ASALocalRun/ 340 | 341 | # MSBuild Binary and Structured Log 342 | *.binlog 343 | 344 | # NVidia Nsight GPU debugger configuration file 345 | *.nvuser 346 | 347 | # MFractors (Xamarin productivity tool) working folder 348 | .mfractor/ 349 | 350 | # Local History for Visual Studio 351 | .localhistory/ 352 | 353 | # BeatPulse healthcheck temp database 354 | healthchecksdb 355 | 356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 357 | MigrationBackup/ 358 | 359 | # Ionide (cross platform F# VS Code tools) working folder 360 | .ionide/ 361 | 362 | # Fody - auto-generated XML schema 363 | FodyWeavers.xsd -------------------------------------------------------------------------------- /AdapterWithErrorHandler.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | // 4 | // Generated with Bot Builder V4 SDK Template for Visual Studio CoreBot v4.13.1 5 | 6 | using Microsoft.Bot.Builder; 7 | using Microsoft.Bot.Builder.Integration.AspNet.Core; 8 | using Microsoft.Bot.Builder.TraceExtensions; 9 | using Microsoft.Bot.Schema; 10 | using Microsoft.Extensions.Configuration; 11 | using Microsoft.Extensions.Logging; 12 | using System; 13 | 14 | namespace EcommerceAdminBot 15 | { 16 | public class AdapterWithErrorHandler : BotFrameworkHttpAdapter 17 | { 18 | public AdapterWithErrorHandler(IConfiguration configuration, ILogger logger, ConversationState conversationState = null) 19 | : base(configuration, logger) 20 | { 21 | OnTurnError = async (turnContext, exception) => 22 | { 23 | // Log any leaked exception from the application. 24 | logger.LogError(exception, $"[OnTurnError] unhandled error : {exception.Message}"); 25 | 26 | // Send a message to the user 27 | var errorMessageText = "The bot encountered an error or bug."; 28 | var errorMessage = MessageFactory.Text(errorMessageText, errorMessageText, InputHints.ExpectingInput); 29 | await turnContext.SendActivityAsync(errorMessage); 30 | 31 | errorMessageText = "To continue to run this bot, please fix the bot source code."; 32 | errorMessage = MessageFactory.Text(errorMessageText, errorMessageText, InputHints.ExpectingInput); 33 | await turnContext.SendActivityAsync(errorMessage); 34 | 35 | if (conversationState != null) 36 | { 37 | try 38 | { 39 | // Delete the conversationState for the current conversation to prevent the 40 | // bot from getting stuck in a error-loop caused by being in a bad state. 41 | // ConversationState should be thought of as similar to "cookie-state" in a Web pages. 42 | await conversationState.DeleteAsync(turnContext); 43 | } 44 | catch (Exception e) 45 | { 46 | logger.LogError(e, $"Exception caught on attempting to Delete ConversationState : {e.Message}"); 47 | } 48 | } 49 | 50 | // Send a trace activity, which will be displayed in the Bot Framework Emulator 51 | await turnContext.TraceActivityAsync("OnTurnError Trace", exception.Message, "https://www.botframework.com/schemas/error", "TurnError"); 52 | }; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Assets/images/Bot Features - Merchandisers Daily Task.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/Assets/images/Bot Features - Merchandisers Daily Task.png -------------------------------------------------------------------------------- /Assets/images/Flow Chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/Assets/images/Flow Chart.png -------------------------------------------------------------------------------- /Assets/images/GoToMarket Presentation.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/Assets/images/GoToMarket Presentation.pptx -------------------------------------------------------------------------------- /Assets/images/empty: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AzureEstimateGoToMarketBot.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/AzureEstimateGoToMarketBot.xlsx -------------------------------------------------------------------------------- /Bots/DialogAndWelcomeBot.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | // 4 | // Generated with Bot Builder V4 SDK Template for Visual Studio CoreBot v4.13.1 5 | 6 | using EcommerceAdminBot.Services; 7 | using EcommerceAdminBot.Utilities; 8 | using Microsoft.Bot.Builder; 9 | using Microsoft.Bot.Builder.Dialogs; 10 | using Microsoft.Bot.Schema; 11 | using Microsoft.Extensions.Logging; 12 | using Newtonsoft.Json; 13 | using System; 14 | using System.Collections.Generic; 15 | using System.IO; 16 | using System.Linq; 17 | using System.Threading; 18 | using System.Threading.Tasks; 19 | 20 | namespace EcommerceAdminBot.Bots 21 | { 22 | public class DialogAndWelcomeBot : DialogBot 23 | where T : Dialog 24 | { 25 | private readonly StateService _stateService; 26 | public DialogAndWelcomeBot(StateService stateService, T dialog, ILogger> logger) 27 | : base(stateService, dialog, logger) 28 | { 29 | _stateService = stateService; 30 | } 31 | 32 | protected override async Task OnMembersAddedAsync(IList membersAdded, ITurnContext turnContext, CancellationToken cancellationToken) 33 | { 34 | foreach (var member in membersAdded) 35 | { 36 | // Greet anyone that was not the target (recipient) of this message. 37 | // To learn more about Adaptive Cards, see https://aka.ms/msbot-adaptivecards for more details. 38 | if (member.Id != turnContext.Activity.Recipient.Id) 39 | { 40 | var welcomeCard = CreateAdaptiveCardAttachment(); 41 | var response = MessageFactory.Attachment(welcomeCard, ssml: "Welcome to LG Admin ChatBot!"); 42 | await turnContext.SendActivityAsync(response, cancellationToken); 43 | await Dialog.RunAsync(turnContext, _stateService.ConversationState.CreateProperty("DialogState"), cancellationToken); 44 | } 45 | } 46 | } 47 | 48 | // Load attachment from embedded resource. 49 | private Attachment CreateAdaptiveCardAttachment() 50 | { 51 | var cardResourcePath = GetType().Assembly.GetManifestResourceNames().First(name => name.EndsWith("welcomeCard.json")); 52 | 53 | using (var stream = GetType().Assembly.GetManifestResourceStream(cardResourcePath)) 54 | { 55 | using (var reader = new StreamReader(stream)) 56 | { 57 | var adaptiveCard = reader.ReadToEnd(); 58 | return new Attachment() 59 | { 60 | ContentType = "application/vnd.microsoft.card.adaptive", 61 | Content = JsonConvert.DeserializeObject(adaptiveCard), 62 | }; 63 | } 64 | } 65 | } 66 | } 67 | } 68 | 69 | -------------------------------------------------------------------------------- /Bots/DialogBot.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | // 4 | // Generated with Bot Builder V4 SDK Template for Visual Studio CoreBot v4.13.1 5 | 6 | using EcommerceAdminBot.Services; 7 | using Microsoft.Bot.Builder; 8 | using Microsoft.Bot.Builder.Dialogs; 9 | using Microsoft.Bot.Schema; 10 | using Microsoft.Extensions.Logging; 11 | using System.Threading; 12 | using System.Threading.Tasks; 13 | 14 | namespace EcommerceAdminBot.Bots 15 | { 16 | // This IBot implementation can run any type of Dialog. The use of type parameterization is to allows multiple different bots 17 | // to be run at different endpoints within the same project. This can be achieved by defining distinct Controller types 18 | // each with dependency on distinct IBot types, this way ASP Dependency Injection can glue everything together without ambiguity. 19 | // The ConversationState is used by the Dialog system. The UserState isn't, however, it might have been used in a Dialog implementation, 20 | // and the requirement is that all BotState objects are saved at the end of a turn. 21 | public class DialogBot : ActivityHandler 22 | where T : Dialog 23 | { 24 | protected readonly Dialog Dialog; 25 | private readonly StateService _stateService; 26 | protected readonly ILogger Logger; 27 | 28 | public DialogBot(StateService stateService, T dialog, ILogger> logger) 29 | { 30 | _stateService = stateService; 31 | Dialog = dialog; 32 | Logger = logger; 33 | } 34 | 35 | public override async Task OnTurnAsync(ITurnContext turnContext, CancellationToken cancellationToken = default(CancellationToken)) 36 | { 37 | await base.OnTurnAsync(turnContext, cancellationToken); 38 | 39 | // Save any state changes that might have occurred during the turn. 40 | await _stateService.UserState.SaveChangesAsync(turnContext, false, cancellationToken); 41 | await _stateService.ConversationState.SaveChangesAsync(turnContext, false, cancellationToken); 42 | } 43 | 44 | protected override async Task OnMessageActivityAsync(ITurnContext turnContext, CancellationToken cancellationToken) 45 | { 46 | Logger.LogInformation("Running dialog with Message Activity."); 47 | 48 | // Run the Dialog with the new message Activity. 49 | await Dialog.RunAsync(turnContext, _stateService.ConversationState.CreateProperty("DialogState"), cancellationToken); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Cards/welcomeCard.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", 3 | "type": "AdaptiveCard", 4 | "version": "1.0", 5 | "body": [ 6 | { 7 | "type": "Image", 8 | "url": "https://www.lg.com/lg5-common-gp/images/common/header/logo-b2c.jpg", 9 | "size": "stretch" 10 | }, 11 | { 12 | "type": "TextBlock", 13 | "spacing": "medium", 14 | "size": "default", 15 | "weight": "bolder", 16 | "text": "Welcome to Ecommerce Merchandiser ChatBot!", 17 | "wrap": true, 18 | "maxLines": 0 19 | }, 20 | { 21 | "type": "TextBlock", 22 | "size": "default", 23 | "isSubtle": true, 24 | "text": "This is a simple bot which aims to make merchandiser manage products, giving them access to ADD|UPDATE|REMOVE|VIEW the products on the basis of their category.", 25 | "wrap": true, 26 | "maxLines": 0 27 | } 28 | ] 29 | 30 | } -------------------------------------------------------------------------------- /Controllers/BotController.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | // 4 | // Generated with Bot Builder V4 SDK Template for Visual Studio CoreBot v4.13.1 5 | 6 | using Microsoft.AspNetCore.Mvc; 7 | using Microsoft.Bot.Builder; 8 | using Microsoft.Bot.Builder.Integration.AspNet.Core; 9 | using System.Threading.Tasks; 10 | 11 | namespace EcommerceAdminBot.Controllers 12 | { 13 | // This ASP Controller is created to handle a request. Dependency Injection will provide the Adapter and IBot 14 | // implementation at runtime. Multiple different IBot implementations running at different endpoints can be 15 | // achieved by specifying a more specific type for the bot constructor argument. 16 | [Route("api/messages")] 17 | [ApiController] 18 | public class BotController : ControllerBase 19 | { 20 | private readonly IBotFrameworkHttpAdapter Adapter; 21 | private readonly IBot Bot; 22 | 23 | public BotController(IBotFrameworkHttpAdapter adapter, IBot bot) 24 | { 25 | Adapter = adapter; 26 | Bot = bot; 27 | } 28 | 29 | [HttpPost, HttpGet] 30 | public async Task PostAsync() 31 | { 32 | // Delegate the processing of the HTTP POST to the adapter. 33 | // The adapter will invoke the bot. 34 | await Adapter.ProcessAsync(Request, Response, Bot); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /DeploymentTemplates/new-rg-parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "groupLocation": { 6 | "value": "" 7 | }, 8 | "groupName": { 9 | "value": "" 10 | }, 11 | "appId": { 12 | "value": "" 13 | }, 14 | "appSecret": { 15 | "value": "" 16 | }, 17 | "botId": { 18 | "value": "" 19 | }, 20 | "botSku": { 21 | "value": "" 22 | }, 23 | "newAppServicePlanName": { 24 | "value": "" 25 | }, 26 | "newAppServicePlanSku": { 27 | "value": { 28 | "name": "S1", 29 | "tier": "Standard", 30 | "size": "S1", 31 | "family": "S", 32 | "capacity": 1 33 | } 34 | }, 35 | "newAppServicePlanLocation": { 36 | "value": "" 37 | }, 38 | "newWebAppName": { 39 | "value": "" 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /DeploymentTemplates/preexisting-rg-parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "appId": { 6 | "value": "" 7 | }, 8 | "appSecret": { 9 | "value": "" 10 | }, 11 | "botId": { 12 | "value": "" 13 | }, 14 | "botSku": { 15 | "value": "" 16 | }, 17 | "newAppServicePlanName": { 18 | "value": "" 19 | }, 20 | "newAppServicePlanSku": { 21 | "value": { 22 | "name": "S1", 23 | "tier": "Standard", 24 | "size": "S1", 25 | "family": "S", 26 | "capacity": 1 27 | } 28 | }, 29 | "appServicePlanLocation": { 30 | "value": "" 31 | }, 32 | "existingAppServicePlan": { 33 | "value": "" 34 | }, 35 | "newWebAppName": { 36 | "value": "" 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /DeploymentTemplates/template-with-new-rg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "groupLocation": { 6 | "type": "string", 7 | "metadata": { 8 | "description": "Specifies the location of the Resource Group." 9 | } 10 | }, 11 | "groupName": { 12 | "type": "string", 13 | "metadata": { 14 | "description": "Specifies the name of the Resource Group." 15 | } 16 | }, 17 | "appId": { 18 | "type": "string", 19 | "metadata": { 20 | "description": "Active Directory App ID, set as MicrosoftAppId in the Web App's Application Settings." 21 | } 22 | }, 23 | "appSecret": { 24 | "type": "string", 25 | "metadata": { 26 | "description": "Active Directory App Password, set as MicrosoftAppPassword in the Web App's Application Settings." 27 | } 28 | }, 29 | "botId": { 30 | "type": "string", 31 | "metadata": { 32 | "description": "The globally unique and immutable bot ID. Also used to configure the displayName of the bot, which is mutable." 33 | } 34 | }, 35 | "botSku": { 36 | "type": "string", 37 | "metadata": { 38 | "description": "The pricing tier of the Bot Service Registration. Acceptable values are F0 and S1." 39 | } 40 | }, 41 | "newAppServicePlanName": { 42 | "type": "string", 43 | "metadata": { 44 | "description": "The name of the App Service Plan." 45 | } 46 | }, 47 | "newAppServicePlanSku": { 48 | "type": "object", 49 | "defaultValue": { 50 | "name": "S1", 51 | "tier": "Standard", 52 | "size": "S1", 53 | "family": "S", 54 | "capacity": 1 55 | }, 56 | "metadata": { 57 | "description": "The SKU of the App Service Plan. Defaults to Standard values." 58 | } 59 | }, 60 | "newAppServicePlanLocation": { 61 | "type": "string", 62 | "metadata": { 63 | "description": "The location of the App Service Plan. Defaults to \"westus\"." 64 | } 65 | }, 66 | "newWebAppName": { 67 | "type": "string", 68 | "defaultValue": "", 69 | "metadata": { 70 | "description": "The globally unique name of the Web App. Defaults to the value passed in for \"botId\"." 71 | } 72 | } 73 | }, 74 | "variables": { 75 | "appServicePlanName": "[parameters('newAppServicePlanName')]", 76 | "resourcesLocation": "[parameters('newAppServicePlanLocation')]", 77 | "webAppName": "[if(empty(parameters('newWebAppName')), parameters('botId'), parameters('newWebAppName'))]", 78 | "siteHost": "[concat(variables('webAppName'), '.azurewebsites.net')]", 79 | "botEndpoint": "[concat('https://', variables('siteHost'), '/api/messages')]", 80 | "resourceGroupId": "[concat(subscription().id, '/resourceGroups/', parameters('groupName'))]" 81 | }, 82 | "resources": [ 83 | { 84 | "name": "[parameters('groupName')]", 85 | "type": "Microsoft.Resources/resourceGroups", 86 | "apiVersion": "2018-05-01", 87 | "location": "[parameters('groupLocation')]", 88 | "properties": {} 89 | }, 90 | { 91 | "type": "Microsoft.Resources/deployments", 92 | "apiVersion": "2018-05-01", 93 | "name": "storageDeployment", 94 | "resourceGroup": "[parameters('groupName')]", 95 | "dependsOn": [ 96 | "[resourceId('Microsoft.Resources/resourceGroups/', parameters('groupName'))]" 97 | ], 98 | "properties": { 99 | "mode": "Incremental", 100 | "template": { 101 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", 102 | "contentVersion": "1.0.0.0", 103 | "parameters": {}, 104 | "variables": {}, 105 | "resources": [ 106 | { 107 | "comments": "Create a new App Service Plan", 108 | "type": "Microsoft.Web/serverfarms", 109 | "name": "[variables('appServicePlanName')]", 110 | "apiVersion": "2018-02-01", 111 | "location": "[variables('resourcesLocation')]", 112 | "sku": "[parameters('newAppServicePlanSku')]", 113 | "properties": { 114 | "name": "[variables('appServicePlanName')]" 115 | } 116 | }, 117 | { 118 | "comments": "Create a Web App using the new App Service Plan", 119 | "type": "Microsoft.Web/sites", 120 | "apiVersion": "2015-08-01", 121 | "location": "[variables('resourcesLocation')]", 122 | "kind": "app", 123 | "dependsOn": [ 124 | "[concat(variables('resourceGroupId'), '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]" 125 | ], 126 | "name": "[variables('webAppName')]", 127 | "properties": { 128 | "name": "[variables('webAppName')]", 129 | "serverFarmId": "[variables('appServicePlanName')]", 130 | "siteConfig": { 131 | "appSettings": [ 132 | { 133 | "name": "WEBSITE_NODE_DEFAULT_VERSION", 134 | "value": "10.14.1" 135 | }, 136 | { 137 | "name": "MicrosoftAppId", 138 | "value": "[parameters('appId')]" 139 | }, 140 | { 141 | "name": "MicrosoftAppPassword", 142 | "value": "[parameters('appSecret')]" 143 | } 144 | ], 145 | "cors": { 146 | "allowedOrigins": [ 147 | "https://botservice.hosting.portal.azure.net", 148 | "https://hosting.onecloud.azure-test.net/" 149 | ] 150 | }, 151 | "webSocketsEnabled": true 152 | } 153 | } 154 | }, 155 | { 156 | "apiVersion": "2017-12-01", 157 | "type": "Microsoft.BotService/botServices", 158 | "name": "[parameters('botId')]", 159 | "location": "global", 160 | "kind": "bot", 161 | "sku": { 162 | "name": "[parameters('botSku')]" 163 | }, 164 | "properties": { 165 | "name": "[parameters('botId')]", 166 | "displayName": "[parameters('botId')]", 167 | "endpoint": "[variables('botEndpoint')]", 168 | "msaAppId": "[parameters('appId')]", 169 | "developerAppInsightsApplicationId": null, 170 | "developerAppInsightKey": null, 171 | "publishingCredentials": null, 172 | "storageResourceId": null 173 | }, 174 | "dependsOn": [ 175 | "[concat(variables('resourceGroupId'), '/providers/Microsoft.Web/sites/', variables('webAppName'))]" 176 | ] 177 | } 178 | ], 179 | "outputs": {} 180 | } 181 | } 182 | } 183 | ] 184 | } -------------------------------------------------------------------------------- /DeploymentTemplates/template-with-preexisting-rg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "appId": { 6 | "type": "string", 7 | "metadata": { 8 | "description": "Active Directory App ID, set as MicrosoftAppId in the Web App's Application Settings." 9 | } 10 | }, 11 | "appSecret": { 12 | "type": "string", 13 | "metadata": { 14 | "description": "Active Directory App Password, set as MicrosoftAppPassword in the Web App's Application Settings. Defaults to \"\"." 15 | } 16 | }, 17 | "botId": { 18 | "type": "string", 19 | "metadata": { 20 | "description": "The globally unique and immutable bot ID. Also used to configure the displayName of the bot, which is mutable." 21 | } 22 | }, 23 | "botSku": { 24 | "defaultValue": "F0", 25 | "type": "string", 26 | "metadata": { 27 | "description": "The pricing tier of the Bot Service Registration. Acceptable values are F0 and S1." 28 | } 29 | }, 30 | "newAppServicePlanName": { 31 | "type": "string", 32 | "defaultValue": "", 33 | "metadata": { 34 | "description": "The name of the new App Service Plan." 35 | } 36 | }, 37 | "newAppServicePlanSku": { 38 | "type": "object", 39 | "defaultValue": { 40 | "name": "S1", 41 | "tier": "Standard", 42 | "size": "S1", 43 | "family": "S", 44 | "capacity": 1 45 | }, 46 | "metadata": { 47 | "description": "The SKU of the App Service Plan. Defaults to Standard values." 48 | } 49 | }, 50 | "appServicePlanLocation": { 51 | "type": "string", 52 | "metadata": { 53 | "description": "The location of the App Service Plan." 54 | } 55 | }, 56 | "existingAppServicePlan": { 57 | "type": "string", 58 | "defaultValue": "", 59 | "metadata": { 60 | "description": "Name of the existing App Service Plan used to create the Web App for the bot." 61 | } 62 | }, 63 | "newWebAppName": { 64 | "type": "string", 65 | "defaultValue": "", 66 | "metadata": { 67 | "description": "The globally unique name of the Web App. Defaults to the value passed in for \"botId\"." 68 | } 69 | } 70 | }, 71 | "variables": { 72 | "defaultAppServicePlanName": "[if(empty(parameters('existingAppServicePlan')), 'createNewAppServicePlan', parameters('existingAppServicePlan'))]", 73 | "useExistingAppServicePlan": "[not(equals(variables('defaultAppServicePlanName'), 'createNewAppServicePlan'))]", 74 | "servicePlanName": "[if(variables('useExistingAppServicePlan'), parameters('existingAppServicePlan'), parameters('newAppServicePlanName'))]", 75 | "resourcesLocation": "[parameters('appServicePlanLocation')]", 76 | "webAppName": "[if(empty(parameters('newWebAppName')), parameters('botId'), parameters('newWebAppName'))]", 77 | "siteHost": "[concat(variables('webAppName'), '.azurewebsites.net')]", 78 | "botEndpoint": "[concat('https://', variables('siteHost'), '/api/messages')]" 79 | }, 80 | "resources": [ 81 | { 82 | "comments": "Create a new App Service Plan if no existing App Service Plan name was passed in.", 83 | "type": "Microsoft.Web/serverfarms", 84 | "condition": "[not(variables('useExistingAppServicePlan'))]", 85 | "name": "[variables('servicePlanName')]", 86 | "apiVersion": "2018-02-01", 87 | "location": "[variables('resourcesLocation')]", 88 | "sku": "[parameters('newAppServicePlanSku')]", 89 | "properties": { 90 | "name": "[variables('servicePlanName')]" 91 | } 92 | }, 93 | { 94 | "comments": "Create a Web App using an App Service Plan", 95 | "type": "Microsoft.Web/sites", 96 | "apiVersion": "2015-08-01", 97 | "location": "[variables('resourcesLocation')]", 98 | "kind": "app", 99 | "dependsOn": [ 100 | "[resourceId('Microsoft.Web/serverfarms', variables('servicePlanName'))]" 101 | ], 102 | "name": "[variables('webAppName')]", 103 | "properties": { 104 | "name": "[variables('webAppName')]", 105 | "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('servicePlanName'))]", 106 | "siteConfig": { 107 | "appSettings": [ 108 | { 109 | "name": "WEBSITE_NODE_DEFAULT_VERSION", 110 | "value": "10.14.1" 111 | }, 112 | { 113 | "name": "MicrosoftAppId", 114 | "value": "[parameters('appId')]" 115 | }, 116 | { 117 | "name": "MicrosoftAppPassword", 118 | "value": "[parameters('appSecret')]" 119 | } 120 | ], 121 | "cors": { 122 | "allowedOrigins": [ 123 | "https://botservice.hosting.portal.azure.net", 124 | "https://hosting.onecloud.azure-test.net/" 125 | ] 126 | }, 127 | "webSocketsEnabled": true 128 | } 129 | } 130 | }, 131 | { 132 | "apiVersion": "2017-12-01", 133 | "type": "Microsoft.BotService/botServices", 134 | "name": "[parameters('botId')]", 135 | "location": "global", 136 | "kind": "bot", 137 | "sku": { 138 | "name": "[parameters('botSku')]" 139 | }, 140 | "properties": { 141 | "name": "[parameters('botId')]", 142 | "displayName": "[parameters('botId')]", 143 | "endpoint": "[variables('botEndpoint')]", 144 | "msaAppId": "[parameters('appId')]", 145 | "developerAppInsightsApplicationId": null, 146 | "developerAppInsightKey": null, 147 | "publishingCredentials": null, 148 | "storageResourceId": null 149 | }, 150 | "dependsOn": [ 151 | "[resourceId('Microsoft.Web/sites/', variables('webAppName'))]" 152 | ] 153 | } 154 | ] 155 | } -------------------------------------------------------------------------------- /Dialogs/CancelAndHelpDialog.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | // 4 | // Generated with Bot Builder V4 SDK Template for Visual Studio CoreBot v4.13.1 5 | 6 | using Microsoft.Bot.Builder; 7 | using Microsoft.Bot.Builder.Dialogs; 8 | using Microsoft.Bot.Schema; 9 | using System.Threading; 10 | using System.Threading.Tasks; 11 | 12 | namespace EcommerceAdminBot.Dialogs 13 | { 14 | public class CancelAndHelpDialog : ComponentDialog 15 | { 16 | private const string HelpMsgText = "Show help here"; 17 | private const string CancelMsgText = "Cancelling..."; 18 | 19 | public CancelAndHelpDialog(string id) 20 | : base(id) 21 | { 22 | } 23 | 24 | protected override async Task OnContinueDialogAsync(DialogContext innerDc, CancellationToken cancellationToken = default) 25 | { 26 | var result = await InterruptAsync(innerDc, cancellationToken); 27 | if (result != null) 28 | { 29 | return result; 30 | } 31 | 32 | return await base.OnContinueDialogAsync(innerDc, cancellationToken); 33 | } 34 | 35 | private async Task InterruptAsync(DialogContext innerDc, CancellationToken cancellationToken) 36 | { 37 | if (innerDc.Context.Activity.Type == ActivityTypes.Message) 38 | { 39 | var text = innerDc.Context.Activity.Text.ToLowerInvariant(); 40 | 41 | switch (text) 42 | { 43 | case "help": 44 | case "?": 45 | var helpMessage = MessageFactory.Text(HelpMsgText, HelpMsgText, InputHints.ExpectingInput); 46 | await innerDc.Context.SendActivityAsync(helpMessage, cancellationToken); 47 | return new DialogTurnResult(DialogTurnStatus.Waiting); 48 | 49 | case "cancel": 50 | case "quit": 51 | var cancelMessage = MessageFactory.Text(CancelMsgText, CancelMsgText, InputHints.IgnoringInput); 52 | await innerDc.Context.SendActivityAsync(cancelMessage, cancellationToken); 53 | return await innerDc.CancelAllDialogsAsync(cancellationToken); 54 | } 55 | } 56 | 57 | return null; 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Dialogs/DisplayProduct.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | // 4 | // Generated with Bot Builder V4 SDK Template for Visual Studio CoreBot v4.11.1 5 | 6 | using AdaptiveCards; 7 | using Microsoft.Bot.Builder; 8 | using Microsoft.Bot.Builder.Dialogs; 9 | using Microsoft.Bot.Builder.Dialogs.Choices; 10 | using Microsoft.Bot.Schema; 11 | using Microsoft.Extensions.Configuration; 12 | using Microsoft.Extensions.Logging; 13 | using Newtonsoft.Json.Linq; 14 | using System.Collections.Generic; 15 | using System.Linq; 16 | using System.Threading; 17 | using System.Threading.Tasks; 18 | using EcommerceAdminBot.Dialogs.Operations; 19 | using EcommerceAdminBot.Utilities; 20 | using EcommerceAdminBot.Models; 21 | using EcommerceAdminBot.Services; 22 | using ToDoBot.Dialogs.Operations; 23 | 24 | namespace EcommerceAdminBot.Dialogs 25 | { 26 | public class DisplayProduct : ComponentDialog 27 | { 28 | //private readonly ToDoLUISRecognizer _luisRecognizer; 29 | //protected readonly ILogger Logger; 30 | protected readonly IConfiguration Configuration; 31 | CosmosDBClient _cosmosDBClient; 32 | //private readonly string CheckProductDialogID = "CheckProductDlg"; 33 | StateService _stateService; 34 | 35 | public DisplayProduct(IConfiguration configuration, CosmosDBClient cosmosDBClient, StateService stateService) : base(nameof(DisplayProduct)) 36 | { 37 | Configuration = configuration; 38 | _cosmosDBClient = cosmosDBClient; 39 | _stateService = stateService; 40 | 41 | // _luisRecognizer = luisRecognizer; 42 | //Logger = logger; 43 | Configuration = configuration; 44 | _cosmosDBClient = cosmosDBClient; 45 | _stateService = stateService; 46 | var waterfallSteps = new WaterfallStep[] 47 | { 48 | IntroStepAsync, 49 | ActStepAsync, 50 | FinalStepAsync, 51 | }; 52 | AddDialog(new WaterfallDialog(nameof(WaterfallDialog), waterfallSteps)); 53 | AddDialog(new TextPrompt(nameof(TextPrompt))); 54 | //AddDialog(new TextPrompt(UserValidationDialogID, UserValidation)); 55 | AddDialog(new ChoicePrompt(nameof(ChoicePrompt))); 56 | AddDialog(new AddProductsDialog(Configuration, cosmosDBClient, _stateService)); 57 | AddDialog(new UpdateProductDialog(_cosmosDBClient, _stateService)); 58 | AddDialog(new RemoveProductsDialog(_cosmosDBClient, _stateService)); 59 | AddDialog(new ViewAllProductsDialog(_cosmosDBClient, _stateService)); 60 | //AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[] 61 | 62 | //AddDialog(new WaterfallDialog(nameof(WaterfallDialog), waterfallSteps)); 63 | 64 | // The initial child Dialog to run. 65 | InitialDialogId = nameof(WaterfallDialog); 66 | } 67 | 68 | 69 | 70 | 71 | private async Task IntroStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 72 | { 73 | await _cosmosDBClient.CreateDBConnection(Configuration["CosmosEndPointURI"], Configuration["CosmosPrimaryKey"], Configuration["CosmosDatabaseId"], Configuration["CosmosContainerID"], Configuration["CosmosPartitionKey"]); 74 | await stepContext.Context.SendActivityAsync(MessageFactory.Text("How can I help you today?"), cancellationToken); 75 | List operationList = new List { "Add Products", "Update Product", "Remove Products", "View All Products", "Exit" }; 76 | // Create card 77 | var card = new AdaptiveCard(new AdaptiveSchemaVersion(1, 0)) 78 | { 79 | // Use LINQ to turn the choices into submit actions 80 | Actions = operationList.Select(choice => new AdaptiveSubmitAction 81 | { 82 | Title = choice, 83 | Data = choice, // This will be a string 84 | }).ToList(), 85 | }; 86 | /*/Typing... Message 87 | await stepContext.Context.SendActivitiesAsync( 88 | new Activity[] { 89 | new Activity { Type = ActivityTypes.Typing }, 90 | new Activity { Type = "delay", Value= 5000 }, 91 | MessageFactory.Text("Finished typing", "Finished typing"), 92 | }, 93 | cancellationToken); 94 | */// Prompt 95 | return await stepContext.PromptAsync(nameof(ChoicePrompt), new PromptOptions 96 | { 97 | Prompt = (Activity)MessageFactory.Attachment(new Attachment 98 | { 99 | ContentType = AdaptiveCard.ContentType, 100 | // Convert the AdaptiveCard to a JObject 101 | Content = JObject.FromObject(card), 102 | }), 103 | Choices = ChoiceFactory.ToChoices(operationList), 104 | // Don't render the choices outside the card 105 | Style = ListStyle.None, 106 | }, 107 | cancellationToken); 108 | } 109 | private async Task ActStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 110 | { 111 | stepContext.Values["Operation"] = ((FoundChoice)stepContext.Result).Value; 112 | string operation = (string)stepContext.Values["Operation"]; 113 | await stepContext.Context.SendActivityAsync(MessageFactory.Text("You have selected - " + operation), cancellationToken); 114 | if ("Exit".Equals(operation)) 115 | { 116 | return await stepContext.EndDialogAsync(null, cancellationToken); 117 | } 118 | if ("Add Products".Equals(operation)) 119 | { 120 | return await stepContext.BeginDialogAsync(nameof(AddProductsDialog), new ProductDetails(), cancellationToken); 121 | } 122 | else if ("Update Product".Equals(operation)) 123 | { 124 | return await stepContext.BeginDialogAsync(nameof(UpdateProductDialog), new ProductDetails(), cancellationToken); 125 | } 126 | else if ("Remove Products".Equals(operation)) 127 | { 128 | return await stepContext.BeginDialogAsync(nameof(RemoveProductsDialog), new ProductDetails(), cancellationToken); 129 | } 130 | else if("View All Products".Equals(operation)) 131 | { 132 | return await stepContext.BeginDialogAsync(nameof(ViewAllProductsDialog), new ProductDetails(), cancellationToken); 133 | } 134 | else 135 | { 136 | await stepContext.Context.SendActivityAsync(MessageFactory.Text("The selected option not found."), cancellationToken); 137 | return await stepContext.NextAsync(null, cancellationToken); 138 | } 139 | } 140 | 141 | private async Task FinalStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 142 | { 143 | 144 | // Restart the main dialog with a different message the second time around 145 | var promptMessage = "Thank You for Your timely updated. What else can I do for you?"; 146 | return await stepContext.ReplaceDialogAsync(InitialDialogId, promptMessage, cancellationToken); 147 | } 148 | 149 | } 150 | } 151 | -------------------------------------------------------------------------------- /Dialogs/Operations/AddMoreProductsDialog.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Bot.Builder; 2 | using Microsoft.Bot.Builder.Dialogs; 3 | using Microsoft.Bot.Builder.Dialogs.Choices; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Threading; 8 | using System.Threading.Tasks; 9 | 10 | namespace EcommerceAdminBot.Dialogs.Operations 11 | { 12 | public class AddMoreProductsDialog : CancelAndHelpDialog 13 | { 14 | public AddMoreProductsDialog() : base(nameof(AddMoreProductsDialog)) 15 | { 16 | 17 | var waterfallSteps = new WaterfallStep[] 18 | { 19 | ProductIDStepAsync, 20 | ProductNameStepAsync, 21 | ProductPriceStepAsync, 22 | ProductImageURLStepAsync, 23 | ProductCategoryStepAsync, 24 | MoreProductsStepAsync, 25 | SummaryStepAsync, 26 | }; 27 | 28 | AddDialog(new WaterfallDialog(nameof(WaterfallDialog), waterfallSteps)); 29 | AddDialog(new TextPrompt(nameof(TextPrompt))); 30 | AddDialog(new ChoicePrompt(nameof(ChoicePrompt))); 31 | AddDialog(new NumberPrompt(nameof(NumberPrompt))); 32 | AddDialog(new ConfirmPrompt(nameof(ConfirmPrompt))); 33 | 34 | InitialDialogId = nameof(WaterfallDialog); 35 | } 36 | 37 | private async Task ProductIDStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 38 | { 39 | return await stepContext.PromptAsync(nameof(TextPrompt), new PromptOptions 40 | { 41 | Prompt = MessageFactory.Text("Please give a product ID.") 42 | }, cancellationToken); 43 | } 44 | 45 | private async Task ProductNameStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 46 | { 47 | stepContext.Values["ProductID"] = (string)stepContext.Result; 48 | 49 | return await stepContext.PromptAsync(nameof(TextPrompt), new PromptOptions 50 | { 51 | Prompt = MessageFactory.Text("Please give a name of the product.") 52 | }, cancellationToken); 53 | } 54 | 55 | private async Task ProductPriceStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 56 | { 57 | stepContext.Values["ProductName"] = (string)stepContext.Result; 58 | 59 | return await stepContext.PromptAsync(nameof(NumberPrompt), new PromptOptions 60 | { 61 | Prompt = MessageFactory.Text($"What price would you like to keep for {(string)stepContext.Values["ProductName"]}?") 62 | }, cancellationToken); 63 | } 64 | 65 | private async Task ProductImageURLStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 66 | { 67 | stepContext.Values["ProductPrice"] = (int)stepContext.Result; 68 | 69 | return await stepContext.PromptAsync(nameof(TextPrompt), new PromptOptions 70 | { 71 | Prompt = MessageFactory.Text("Please give a image URL of the product.") 72 | }, cancellationToken); 73 | } 74 | 75 | private async Task ProductCategoryStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 76 | { 77 | stepContext.Values["ProductImageURL"] = (string)stepContext.Result; 78 | 79 | return await stepContext.PromptAsync(nameof(ChoicePrompt), new PromptOptions() 80 | { 81 | Prompt = MessageFactory.Text("What category your product belongs to?"), 82 | Choices = ChoiceFactory.ToChoices(new List { "Television", "Laptop", "Air Conditioner", "Monitor", "Speaker", "Earphones" }), 83 | }, cancellationToken); 84 | } 85 | 86 | private async Task MoreProductsStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 87 | { 88 | stepContext.Values["ProductCategory"] = ((FoundChoice)stepContext.Result).Value; 89 | 90 | return await stepContext.PromptAsync(nameof(ConfirmPrompt), new PromptOptions 91 | { 92 | Prompt = MessageFactory.Text("Would you like to Add more products?") 93 | }, cancellationToken); 94 | } 95 | 96 | private async Task SummaryStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 97 | { 98 | var productDetails = (ProductDetails)stepContext.Options; 99 | 100 | Product product = new Product() 101 | { 102 | ID = (string)stepContext.Values["ProductID"], 103 | Name = (string)stepContext.Values["ProductName"], 104 | Price = (int)stepContext.Values["ProductPrice"], 105 | ImageURL = (string)stepContext.Values["ProductImageURL"], 106 | Category = (string)stepContext.Values["ProductCategory"] 107 | }; 108 | 109 | productDetails.ProductList.Add(product); 110 | 111 | if ((bool)stepContext.Result) 112 | { 113 | return await stepContext.ReplaceDialogAsync(InitialDialogId, productDetails, cancellationToken); 114 | } 115 | else 116 | { 117 | await stepContext.Context.SendActivityAsync(MessageFactory.Text("Ok.")); 118 | return await stepContext.EndDialogAsync(productDetails, cancellationToken); 119 | } 120 | } 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /Dialogs/Operations/CreateMoreTaskDialog.cs: -------------------------------------------------------------------------------- 1 | using EcommerceAdminBot.Models; 2 | using Microsoft.Bot.Builder; 3 | using Microsoft.Bot.Builder.Dialogs; 4 | using System.Threading; 5 | using System.Threading.Tasks; 6 | 7 | namespace EcommerceAdminBot.Dialogs.Operations 8 | { 9 | public class CreateMoreTaskDialog : ComponentDialog 10 | { 11 | public CreateMoreTaskDialog() : base(nameof(CreateMoreTaskDialog)) 12 | { 13 | var waterfallSteps = new WaterfallStep[] 14 | { 15 | TasksStepAsync, 16 | ConfirmStepAsync, 17 | SummaryStepAsync, 18 | }; 19 | 20 | AddDialog(new WaterfallDialog(nameof(WaterfallDialog), waterfallSteps)); 21 | AddDialog(new TextPrompt(nameof(TextPrompt))); 22 | AddDialog(new ConfirmPrompt(nameof(ConfirmPrompt))); 23 | 24 | InitialDialogId = nameof(WaterfallDialog); 25 | } 26 | 27 | private async Task TasksStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 28 | { 29 | return await stepContext.PromptAsync(nameof(TextPrompt), new PromptOptions 30 | { 31 | Prompt = MessageFactory.Text("Please give the task to add.") 32 | }, cancellationToken); 33 | } 34 | 35 | private async Task ConfirmStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 36 | { 37 | var userDetails = (User)stepContext.Options; 38 | stepContext.Values["Task"] = (string)stepContext.Result; 39 | userDetails.TasksList.Add((string)stepContext.Values["Task"]); 40 | 41 | return await stepContext.PromptAsync(nameof(ConfirmPrompt), new PromptOptions 42 | { 43 | Prompt = MessageFactory.Text("Would you like to Add more tasks?") 44 | }, cancellationToken); 45 | } 46 | 47 | private async Task SummaryStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 48 | { 49 | var userDetails = (User)stepContext.Options; 50 | if ((bool)stepContext.Result) 51 | { 52 | return await stepContext.ReplaceDialogAsync(InitialDialogId, userDetails, cancellationToken); 53 | } 54 | else 55 | { 56 | await stepContext.Context.SendActivityAsync(MessageFactory.Text("Ok.")); 57 | return await stepContext.EndDialogAsync(userDetails, cancellationToken); 58 | } 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /Dialogs/Operations/CreateTaskDialog.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Bot.Builder; 2 | using Microsoft.Bot.Builder.Dialogs; 3 | using Microsoft.Extensions.Configuration; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Threading; 8 | using System.Threading.Tasks; 9 | using EcommerceAdminBot.Utilities; 10 | using EcommerceAdminBot.Dialogs.Operations; 11 | using EcommerceAdminBot.Models; 12 | using EcommerceAdminBot.Services; 13 | 14 | namespace EcommerceAdminBot.Dialogs.Operations 15 | { 16 | public class CreateTaskDialog : ComponentDialog 17 | { 18 | 19 | private readonly CosmoDBClientToDo _cosmosDBClient; 20 | StateService _stateService; 21 | public CreateTaskDialog(CosmoDBClientToDo cosmosDBClient, StateService stateService) : base(nameof(CreateTaskDialog)) 22 | { 23 | 24 | _cosmosDBClient = cosmosDBClient; 25 | _stateService = stateService; 26 | var waterfallSteps = new WaterfallStep[] 27 | { 28 | TasksStepAsync, 29 | ActStepAsync, 30 | MoreTasksStepAsync, 31 | SummaryStepAsync 32 | }; 33 | 34 | AddDialog(new WaterfallDialog(nameof(WaterfallDialog), waterfallSteps)); 35 | AddDialog(new TextPrompt(nameof(TextPrompt))); 36 | AddDialog(new ConfirmPrompt(nameof(ConfirmPrompt))); 37 | AddDialog(new CreateMoreTaskDialog()); 38 | 39 | InitialDialogId = nameof(WaterfallDialog); 40 | } 41 | 42 | private async Task TasksStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 43 | { 44 | return await stepContext.PromptAsync(nameof(TextPrompt), new PromptOptions 45 | { 46 | Prompt = MessageFactory.Text("Please give the task to add.") 47 | }, cancellationToken); 48 | } 49 | 50 | private async Task ActStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 51 | { 52 | var userDetails = (User)stepContext.Options; 53 | stepContext.Values["Task"] = (string)stepContext.Result; 54 | userDetails.TasksList.Add((string)stepContext.Values["Task"]); 55 | 56 | return await stepContext.PromptAsync(nameof(ConfirmPrompt), new PromptOptions 57 | { 58 | Prompt = MessageFactory.Text("Would you like to Add more tasks?") 59 | }, cancellationToken); 60 | } 61 | 62 | private async Task MoreTasksStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 63 | { 64 | var userDetails = (User)stepContext.Options; 65 | if ((bool)stepContext.Result) 66 | { 67 | return await stepContext.BeginDialogAsync(nameof(CreateMoreTaskDialog), userDetails, cancellationToken); 68 | } 69 | else 70 | { 71 | return await stepContext.NextAsync(userDetails, cancellationToken); 72 | } 73 | } 74 | 75 | private async Task SummaryStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 76 | { 77 | var userDetails = (User)stepContext.Result; 78 | UserProfile userProfile = await _stateService.UserProfileAccessor.GetAsync(stepContext.Context, () => new UserProfile()); 79 | 80 | await stepContext.Context.SendActivityAsync(MessageFactory.Text("Here are the tasks you provided - "), cancellationToken); 81 | for (int i = 0; i < userDetails.TasksList.Count; i++) 82 | { 83 | await stepContext.Context.SendActivityAsync(MessageFactory.Text(userDetails.TasksList[i]), cancellationToken); 84 | } 85 | await stepContext.Context.SendActivityAsync(MessageFactory.Text("Please wait while I add your tasks to the database..."), cancellationToken); 86 | for (int i = 0; i < userDetails.TasksList.Count; i++) 87 | { 88 | if (await _cosmosDBClient.AddItemsToContainerAsync(User.UserID, userDetails.TasksList[i], userProfile.Email) == -1) 89 | { 90 | await stepContext.Context.SendActivityAsync(MessageFactory.Text("The Task '" + userDetails.TasksList[i] + "' already exists"), cancellationToken); 91 | 92 | } 93 | 94 | } 95 | await stepContext.Context.SendActivityAsync(MessageFactory.Text("Add Task operation completed. Thank you."), cancellationToken); 96 | 97 | return await stepContext.EndDialogAsync(userDetails, cancellationToken); 98 | } 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /Dialogs/Operations/DeleteTaskDialog.cs: -------------------------------------------------------------------------------- 1 | using AdaptiveCards; 2 | using Microsoft.Bot.Builder; 3 | using Microsoft.Bot.Builder.Dialogs; 4 | using Microsoft.Bot.Builder.Dialogs.Choices; 5 | using Microsoft.Bot.Schema; 6 | using Newtonsoft.Json.Linq; 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Threading; 11 | using System.Threading.Tasks; 12 | using EcommerceAdminBot.Utilities; 13 | using EcommerceAdminBot; 14 | 15 | namespace ToDoBot.Dialogs.Operations 16 | { 17 | public class DeleteTaskDialog : ComponentDialog 18 | { 19 | private readonly CosmoDBClientToDo _cosmosDBClient; 20 | public DeleteTaskDialog(CosmoDBClientToDo cosmosDBClient) : base(nameof(DeleteTaskDialog)) 21 | { 22 | _cosmosDBClient = cosmosDBClient; 23 | 24 | var waterfallSteps = new WaterfallStep[] 25 | { 26 | ShowTasksStepAsync, 27 | DeleteTasksStepAsync, 28 | DeleteMoreTasksStepAsync, 29 | }; 30 | 31 | AddDialog(new WaterfallDialog(nameof(WaterfallDialog), waterfallSteps)); 32 | AddDialog(new TextPrompt(nameof(TextPrompt))); 33 | AddDialog(new ConfirmPrompt(nameof(ConfirmPrompt))); 34 | 35 | InitialDialogId = nameof(WaterfallDialog); 36 | } 37 | 38 | private async Task ShowTasksStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 39 | { 40 | List toDoTasks = await _cosmosDBClient.QueryItemsAsync(User.UserID); 41 | 42 | if (toDoTasks.Count == 0) 43 | { 44 | await stepContext.Context.SendActivityAsync(MessageFactory.Text("You don't have any tasks to delete."), cancellationToken); 45 | return await stepContext.EndDialogAsync(null, cancellationToken); 46 | } 47 | 48 | List taskList = new List(); 49 | for (int i = 0; i < toDoTasks.Count; i++) 50 | { 51 | taskList.Add(toDoTasks[i].Task); 52 | } 53 | 54 | await stepContext.Context.SendActivityAsync(MessageFactory.Text("Please select the tasks you want to delete."), cancellationToken); 55 | 56 | var card = new AdaptiveCard(new AdaptiveSchemaVersion(1, 0)) 57 | { 58 | // Use LINQ to turn the choices into submit actions 59 | Actions = taskList.Select(choice => new AdaptiveSubmitAction 60 | { 61 | Title = choice, 62 | Data = choice, // This will be a string 63 | }).ToList(), 64 | }; 65 | // Prompt 66 | return await stepContext.PromptAsync(nameof(ChoicePrompt), new PromptOptions 67 | { 68 | Prompt = (Activity)MessageFactory.Attachment(new Attachment 69 | { 70 | ContentType = AdaptiveCard.ContentType, 71 | // Convert the AdaptiveCard to a JObject 72 | Content = JObject.FromObject(card), 73 | }), 74 | Choices = ChoiceFactory.ToChoices(taskList), 75 | // Don't render the choices outside the card 76 | Style = ListStyle.None, 77 | }, 78 | cancellationToken); 79 | } 80 | 81 | private async Task DeleteTasksStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 82 | { 83 | stepContext.Values["TaskToDelete"] = ((FoundChoice)stepContext.Result).Value; 84 | string taskToDelete = (string)stepContext.Values["TaskToDelete"]; 85 | bool deleteTask = await _cosmosDBClient.DeleteTaskItemAsync(taskToDelete, User.UserID); 86 | 87 | if (deleteTask) 88 | { 89 | await stepContext.Context.SendActivityAsync(MessageFactory.Text("Task '" + taskToDelete + "' successfully deleted."), cancellationToken); 90 | 91 | List toDoTasks = await _cosmosDBClient.QueryItemsAsync(User.UserID); 92 | 93 | if (toDoTasks.Count == 0) 94 | { 95 | await stepContext.Context.SendActivityAsync(MessageFactory.Text("No Tasks left. All your tasks are deleted."), cancellationToken); 96 | return await stepContext.EndDialogAsync(null, cancellationToken); 97 | } 98 | 99 | return await stepContext.PromptAsync(nameof(ConfirmPrompt), new PromptOptions 100 | { 101 | Prompt = MessageFactory.Text("Would you like to Delete more tasks?") 102 | }, cancellationToken); 103 | } 104 | else 105 | { 106 | await stepContext.Context.SendActivityAsync(MessageFactory.Text("Task '" + taskToDelete + "' could not be deleted. Either it has been already deleted or some error occurred."), cancellationToken); 107 | return await stepContext.EndDialogAsync(null, cancellationToken); 108 | } 109 | 110 | } 111 | 112 | private async Task DeleteMoreTasksStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 113 | { 114 | if ((bool)stepContext.Result) 115 | { 116 | return await stepContext.ReplaceDialogAsync(InitialDialogId, null, cancellationToken); 117 | } 118 | else 119 | { 120 | await stepContext.Context.SendActivityAsync(MessageFactory.Text("Ok.")); 121 | return await stepContext.EndDialogAsync(null, cancellationToken); 122 | } 123 | } 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /Dialogs/Operations/EmailAuthenticationDialog.cs: -------------------------------------------------------------------------------- 1 | using EcommerceAdminBot.Models; 2 | using EcommerceAdminBot.Services; 3 | using EcommerceAdminBot.Utilities; 4 | using Microsoft.Bot.Builder; 5 | using Microsoft.Bot.Builder.Dialogs; 6 | using Microsoft.Extensions.Configuration; 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Threading; 11 | using System.Threading.Tasks; 12 | 13 | namespace EcommerceAdminBot.Dialogs.Operations 14 | { 15 | public class EmailAuthenticationDialog : ComponentDialog 16 | { 17 | private readonly StateService _stateService; 18 | private readonly UserRepository _userRespository; 19 | protected readonly IConfiguration Configuration; 20 | private readonly string EmailDialogID = "EmailDlg"; 21 | private readonly string EmailVerificationCodeDialogID = "EmailVerificationCodeDlg"; 22 | public EmailAuthenticationDialog(StateService stateService, UserRepository userRepository, IConfiguration configuration) : base(nameof(EmailAuthenticationDialog)) 23 | { 24 | _stateService = stateService ?? throw new System.ArgumentNullException(nameof(stateService)); 25 | _userRespository = userRepository; 26 | Configuration = configuration; 27 | 28 | var waterfallSteps = new WaterfallStep[] 29 | { 30 | EmailStepAsync, 31 | OTPVerificationStepAsync, 32 | AuthenticationConfirmStepAsync, 33 | }; 34 | 35 | AddDialog(new WaterfallDialog(nameof(WaterfallDialog), waterfallSteps)); 36 | AddDialog(new TextPrompt(nameof(TextPrompt))); 37 | AddDialog(new TextPrompt(EmailDialogID, EmailValidation)); 38 | AddDialog(new NumberPrompt(EmailVerificationCodeDialogID, EmailVerificationCodeValidation)); 39 | 40 | InitialDialogId = nameof(WaterfallDialog); 41 | } 42 | 43 | private async Task EmailStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 44 | { 45 | 46 | await stepContext.Context.SendActivityAsync(MessageFactory.Text("Please Authenticate..."), cancellationToken); 47 | return await stepContext.PromptAsync(EmailDialogID, new PromptOptions 48 | { 49 | Prompt = MessageFactory.Text("Can I have your email address please?"), 50 | 51 | }, cancellationToken); 52 | } 53 | 54 | private async Task OTPVerificationStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 55 | { 56 | UserProfile userProfile = await _stateService.UserProfileAccessor.GetAsync(stepContext.Context, () => new UserProfile()); 57 | 58 | // Save the email to user profile 59 | userProfile.Email = (string)stepContext.Result; 60 | 61 | // Generate the OTP and save it to the user profile 62 | Random rnd = new Random(); 63 | userProfile.OTP = rnd.Next(100000, 999999); 64 | 65 | await _stateService.UserProfileAccessor.SetAsync(stepContext.Context, userProfile); 66 | 67 | await stepContext.Context.SendActivityAsync(MessageFactory.Text($"Please wait while I send an OTP to your email {userProfile.Email} for verification."), cancellationToken); 68 | 69 | // trigger the power automate flow to send email 70 | bool status = await _userRespository.SendEmailForCodeVerificationAsync(userProfile.OTP, userProfile.Email, userProfile.Name, Configuration["PowerAutomatePOSTURL"]); 71 | 72 | // verify the response status of the api call 73 | if (status) 74 | { 75 | return await stepContext.PromptAsync(EmailVerificationCodeDialogID, new PromptOptions 76 | { 77 | Prompt = MessageFactory.Text("I have sent a verification code to your email. Please enter the code here to validate your email. Please Check your inbox or Spam folder for the email.") 78 | }, cancellationToken); 79 | } 80 | else 81 | { 82 | await stepContext.Context.SendActivityAsync(MessageFactory.Text("Verfication Email could not be sent. Please try again later. Sorry for the inconvenience caused."), cancellationToken); 83 | return await stepContext.EndDialogAsync(null, cancellationToken); 84 | } 85 | 86 | 87 | } 88 | 89 | private async Task AuthenticationConfirmStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 90 | { 91 | await stepContext.Context.SendActivityAsync(MessageFactory.Text("Your email is verified."), cancellationToken); 92 | UserProfile userProfile = await _stateService.UserProfileAccessor.GetAsync(stepContext.Context, () => new UserProfile()); 93 | userProfile.UserAuthenticated = true; 94 | await _stateService.UserProfileAccessor.SetAsync(stepContext.Context, userProfile); 95 | return await stepContext.EndDialogAsync(null, cancellationToken); 96 | } 97 | 98 | private async Task EmailValidation(PromptValidatorContext promptcontext, CancellationToken cancellationtoken) 99 | { 100 | string email = promptcontext.Recognized.Value; 101 | 102 | if (string.IsNullOrWhiteSpace(email)) 103 | { 104 | await promptcontext.Context.SendActivityAsync("The email you entered is not valid, please enter a valid email.", cancellationToken: cancellationtoken); 105 | return false; 106 | } 107 | 108 | try 109 | { 110 | var addr = new System.Net.Mail.MailAddress(email); 111 | if (addr.Address == email) 112 | { 113 | return true; 114 | } 115 | else 116 | { 117 | await promptcontext.Context.SendActivityAsync("The email you entered is not valid, please enter a valid email.", cancellationToken: cancellationtoken); 118 | return false; 119 | } 120 | } 121 | catch 122 | { 123 | await promptcontext.Context.SendActivityAsync("The email you entered is not valid, please enter a valid email.", cancellationToken: cancellationtoken); 124 | return false; 125 | } 126 | } 127 | 128 | private async Task EmailVerificationCodeValidation(PromptValidatorContext promptcontext, CancellationToken cancellationtoken) 129 | { 130 | UserProfile userProfile = await _stateService.UserProfileAccessor.GetAsync(promptcontext.Context, () => new UserProfile()); 131 | int verificationCode = promptcontext.Recognized.Value; 132 | 133 | if (verificationCode == userProfile.OTP) 134 | { 135 | return true; 136 | } 137 | await promptcontext.Context.SendActivityAsync("The verification code you entered is incorrect. Please enter the correct code.", cancellationToken: cancellationtoken); 138 | userProfile.Email = null; 139 | //await promptcontext.EndDialogAsync(null, cancellationtoken); 140 | return false; 141 | } 142 | } 143 | } -------------------------------------------------------------------------------- /Dialogs/Operations/GetProductIDDialog.cs: -------------------------------------------------------------------------------- 1 | using EcommerceAdminBot.Models; 2 | using EcommerceAdminBot.Services; 3 | using EcommerceAdminBot.Utilities; 4 | using Microsoft.Bot.Builder; 5 | using Microsoft.Bot.Builder.Dialogs; 6 | using Microsoft.Bot.Builder.Dialogs.Choices; 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Threading; 11 | using System.Threading.Tasks; 12 | 13 | namespace EcommerceAdminBot.Dialogs.Operations 14 | { 15 | public class GetProductIDDialog : CancelAndHelpDialog 16 | { 17 | CosmosDBClient _cosmosDBClient; 18 | StateService _stateService; 19 | 20 | 21 | public GetProductIDDialog(CosmosDBClient cosmosDBClient, StateService stateService) : base(nameof(GetProductIDDialog)) 22 | { 23 | _cosmosDBClient = cosmosDBClient; 24 | _stateService = stateService; 25 | var waterfallSteps = new WaterfallStep[] 26 | { 27 | CategoryStepAsync, 28 | ChangeCategoryStepAsync, 29 | SummaryStepAsync, 30 | }; 31 | 32 | AddDialog(new WaterfallDialog(nameof(WaterfallDialog), waterfallSteps)); 33 | AddDialog(new TextPrompt(nameof(TextPrompt))); 34 | AddDialog(new ChoicePrompt(nameof(ChoicePrompt))); 35 | AddDialog(new ConfirmPrompt(nameof(ConfirmPrompt))); 36 | 37 | InitialDialogId = nameof(WaterfallDialog); 38 | } 39 | 40 | private async Task CategoryStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 41 | { 42 | return await stepContext.PromptAsync(nameof(ChoicePrompt), new PromptOptions() 43 | { 44 | Prompt = MessageFactory.Text("Select the category to get the latest product ID."), 45 | Choices = ChoiceFactory.ToChoices(new List { "Laptop", "Monitor", "Projector"}), 46 | }, cancellationToken); 47 | } 48 | 49 | private async Task ChangeCategoryStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 50 | { 51 | string productCategory = ((FoundChoice)stepContext.Result).Value; 52 | UserProfile userProfile = await _stateService.UserProfileAccessor.GetAsync(stepContext.Context, () => new UserProfile()); 53 | 54 | List productDBDetails = await _cosmosDBClient.QueryLatestCategoryItemsAsync(productCategory, userProfile.Email); 55 | if (productDBDetails.Count > 0) 56 | { 57 | await stepContext.Context.SendActivityAsync(MessageFactory.Text($"The latest product ID is {productDBDetails[0].Id} for product name '{productDBDetails[0].ProductName}'"), cancellationToken); 58 | } 59 | else 60 | { 61 | await stepContext.Context.SendActivityAsync(MessageFactory.Text($"The {productCategory} category does not have any products."), cancellationToken); 62 | } 63 | 64 | return await stepContext.PromptAsync(nameof(ConfirmPrompt), new PromptOptions 65 | { 66 | Prompt = MessageFactory.Text("Would you like to see other category's latest product?") 67 | }, cancellationToken); 68 | } 69 | 70 | private async Task SummaryStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 71 | { 72 | if ((bool)stepContext.Result) 73 | { 74 | return await stepContext.ReplaceDialogAsync(InitialDialogId, null, cancellationToken); 75 | } 76 | else 77 | { 78 | await stepContext.Context.SendActivityAsync(MessageFactory.Text("Sure.")); 79 | return await stepContext.EndDialogAsync(null, cancellationToken); 80 | } 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /Dialogs/Operations/MerchandiserAttendance.cs: -------------------------------------------------------------------------------- 1 | using EcommerceAdminBot.Models; 2 | using EcommerceAdminBot.Services; 3 | using EcommerceAdminBot.Utilities; 4 | using Microsoft.Bot.Builder; 5 | using Microsoft.Bot.Builder.Dialogs; 6 | using Microsoft.Extensions.Configuration; 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Threading; 11 | using System.Threading.Tasks; 12 | 13 | namespace EcommerceAdminBot.Dialogs.Operations 14 | { 15 | public class MerchandiserAttendance : ComponentDialog 16 | { 17 | private readonly StateService _stateService; 18 | private readonly UserRepository _userRespository; 19 | protected readonly IConfiguration Configuration; 20 | //private readonly string CheckProductDialogID = "CheckProductDlg"; 21 | public MerchandiserAttendance(StateService stateService, UserRepository userRepository, IConfiguration configuration) : base(nameof(MerchandiserAttendance)) 22 | { 23 | //_stateService = stateService ?? throw new System.ArgumentNullException(nameof(stateService)); 24 | _userRespository = userRepository; 25 | Configuration = configuration; 26 | _stateService = stateService; 27 | 28 | 29 | var waterfallSteps = new WaterfallStep[] 30 | { 31 | storeNameAsync, 32 | LocationStepAsync, 33 | MessageStepAsync, 34 | MessageVerificationStepAsync 35 | 36 | }; 37 | 38 | AddDialog(new WaterfallDialog(nameof(WaterfallDialog), waterfallSteps)); 39 | AddDialog(new TextPrompt(nameof(TextPrompt))); 40 | //AddDialog(new TextPrompt(EmailDialogID, EmailValidation); 41 | //AddDialog(new NumberPrompt(CheckProductDialogID, ProductExistsValidation)); 42 | 43 | InitialDialogId = nameof(WaterfallDialog); 44 | } 45 | private async Task storeNameAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 46 | { 47 | 48 | //await stepContext.Context.SendActivityAsync(MessageFactory.Text("Please Authenticate..."), cancellationToken); 49 | return await stepContext.PromptAsync(nameof(TextPrompt), new PromptOptions 50 | { 51 | Prompt = MessageFactory.Text("To mark your attendance kindly share the store name you have visited today."), 52 | 53 | }, cancellationToken); 54 | //await stepContext.Context.SendActivityAsync(MessageFactory.Text($"To mark your attendance kindly share your location."), cancellationToken); 55 | //return await stepContext.NextAsync(stepContext, cancellationToken); 56 | } 57 | 58 | private async Task LocationStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 59 | { 60 | UserProfile userProfile = await _stateService.UserProfileAccessor.GetAsync(stepContext.Context, () => new UserProfile()); 61 | 62 | // Save the email to user profile 63 | userProfile.storeName = (string)stepContext.Result; 64 | await _stateService.UserProfileAccessor.SetAsync(stepContext.Context, userProfile); 65 | //await stepContext.Context.SendActivityAsync(MessageFactory.Text("Please Authenticate..."), cancellationToken); 66 | return await stepContext.PromptAsync(nameof(TextPrompt), new PromptOptions 67 | { 68 | Prompt = MessageFactory.Text("Kindly share your live location.(currently in text format)"), 69 | 70 | }, cancellationToken); 71 | //await stepContext.Context.SendActivityAsync(MessageFactory.Text($"To mark your attendance kindly share your location."), cancellationToken); 72 | //return await stepContext.NextAsync(stepContext, cancellationToken); 73 | } 74 | 75 | 76 | private async Task MessageStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 77 | { 78 | UserProfile userProfile = await _stateService.UserProfileAccessor.GetAsync(stepContext.Context, () => new UserProfile()); 79 | 80 | // Save the email to user profile 81 | userProfile.location = (string)stepContext.Result; 82 | //await stepContext.Context.SendActivityAsync(MessageFactory.Text("Please Authenticate..."), cancellationToken); 83 | return await stepContext.PromptAsync(nameof(TextPrompt), new PromptOptions 84 | { 85 | Prompt = MessageFactory.Text("If there's any message for the admin, Kindly post here.(Ex. Sorry for the delay in attendance|I have come to different store today.)"), 86 | 87 | }, cancellationToken); 88 | //await stepContext.Context.SendActivityAsync(MessageFactory.Text($"To mark your attendance kindly share your location."), cancellationToken); 89 | //return await stepContext.NextAsync(stepContext, cancellationToken); 90 | } 91 | private async Task MessageVerificationStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 92 | { 93 | UserProfile userProfile = await _stateService.UserProfileAccessor.GetAsync(stepContext.Context, () => new UserProfile()); 94 | 95 | // Save the email to user profile 96 | userProfile.Message = (string)stepContext.Result; 97 | 98 | await stepContext.Context.SendActivityAsync(MessageFactory.Text($"Thank You Mr.{userProfile.Name}I am sending your attendance application to the Manager for confirmation"), cancellationToken); 99 | 100 | //await stepContext.Context.SendActivityAsync(MessageFactory.Text($"Welcome back {userProfile.Name}, How can I help you today?"), cancellationToken); 101 | // trigger the power automate flow to send email 102 | bool status = await _userRespository.SendEmailForlocationVerificationAsync(userProfile.storeName, userProfile.Message, userProfile.Name, userProfile.location, Configuration["PowerAutomatePOSTURLAdmin"]); 103 | await _stateService.UserProfileAccessor.SetAsync(stepContext.Context, userProfile); 104 | // verify the response status of the api call 105 | if (status) 106 | { 107 | await stepContext.Context.SendActivityAsync(MessageFactory.Text("Verfication Email has been sent to your manager. Thank You for your response."), cancellationToken); 108 | await stepContext.Context.SendActivityAsync(MessageFactory.Text("In Case you have any issues kindly contact the admin."), cancellationToken); 109 | await stepContext.Context.SendActivityAsync(MessageFactory.Text("Now, share your 'To-Do List' for the day"), cancellationToken); 110 | userProfile.attendance = true; 111 | await _stateService.UserProfileAccessor.SetAsync(stepContext.Context, userProfile); 112 | } 113 | else 114 | { 115 | await stepContext.Context.SendActivityAsync(MessageFactory.Text("Verfication Email could not be sent. Please try again later. Sorry for the inconvenience caused."), cancellationToken); 116 | return await stepContext.EndDialogAsync(null, cancellationToken); 117 | } 118 | return await stepContext.EndDialogAsync(null, cancellationToken); 119 | } 120 | 121 | /*private async Task ProductExistsValidation(PromptValidatorContext promptcontext, CancellationToken cancellationtoken) 122 | { 123 | UserProfile userProfile = await _stateService.UserProfileAccessor.GetAsync(promptcontext.Context, () => new UserProfile()); 124 | 125 | string product = promptcontext.Recognized.Value; 126 | 127 | if (await _cosmosDBClient.CheckProductAsync(product, userProfile.ValueFinder)) 128 | { 129 | await promptcontext.Context.SendActivityAsync($"The {userProfile.ValueFinder} {product} already exists. Please give different {userProfile.ValueFinder}", cancellationToken: cancellationtoken); 130 | return false; 131 | } 132 | 133 | return true; 134 | }*/ 135 | 136 | } 137 | } -------------------------------------------------------------------------------- /Dialogs/Operations/RemoveProductsDialog.cs: -------------------------------------------------------------------------------- 1 | using EcommerceAdminBot.Models; 2 | using EcommerceAdminBot.Services; 3 | using EcommerceAdminBot.Utilities; 4 | using Microsoft.Bot.Builder; 5 | using Microsoft.Bot.Builder.Dialogs; 6 | using Microsoft.Bot.Builder.Dialogs.Choices; 7 | using Microsoft.Bot.Schema; 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Threading; 12 | using System.Threading.Tasks; 13 | 14 | namespace EcommerceAdminBot.Dialogs.Operations 15 | { 16 | public class RemoveProductsDialog : CancelAndHelpDialog 17 | { 18 | CosmosDBClient _cosmosDBClient; 19 | StateService _stateService; 20 | public RemoveProductsDialog(CosmosDBClient cosmosDBClient, StateService stateService) : base(nameof(RemoveProductsDialog)) 21 | { 22 | _cosmosDBClient = cosmosDBClient; 23 | _stateService = stateService; 24 | 25 | var waterfallSteps = new WaterfallStep[] 26 | { 27 | IntroStepAsync, 28 | ViewProductsStepAsync, 29 | SelectProductStepAsync, 30 | DeleteProductStepAsync, 31 | SummaryStepAsync, 32 | }; 33 | 34 | AddDialog(new WaterfallDialog(nameof(WaterfallDialog), waterfallSteps)); 35 | AddDialog(new TextPrompt(nameof(TextPrompt))); 36 | AddDialog(new ChoicePrompt(nameof(ChoicePrompt))); 37 | AddDialog(new ConfirmPrompt(nameof(ConfirmPrompt))); 38 | 39 | InitialDialogId = nameof(WaterfallDialog); 40 | } 41 | 42 | private async Task IntroStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 43 | { 44 | return await stepContext.PromptAsync(nameof(ChoicePrompt), new PromptOptions() 45 | { 46 | Prompt = MessageFactory.Text("How would you like to see your products?"), 47 | Choices = ChoiceFactory.ToChoices(new List { "View All Products", "View By Category" }), 48 | }, cancellationToken); 49 | } 50 | 51 | private async Task ViewProductsStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 52 | { 53 | stepContext.Values["ViewBy"] = ((FoundChoice)stepContext.Result).Value; 54 | string viewBy = (string)stepContext.Values["ViewBy"]; 55 | 56 | if ("View By Category".Equals(viewBy)) 57 | { 58 | return await stepContext.PromptAsync(nameof(ChoicePrompt), new PromptOptions() 59 | { 60 | Prompt = MessageFactory.Text("Please select the category to view the products?"), 61 | Choices = ChoiceFactory.ToChoices(new List { "Television", "Laptop", "Air Conditioner", "Monitor", "Speaker", "Earphones" }), 62 | }, cancellationToken); 63 | } 64 | return await stepContext.NextAsync(null, cancellationToken); 65 | } 66 | 67 | private async Task SelectProductStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 68 | { 69 | UserProfile userProfile = await _stateService.UserProfileAccessor.GetAsync(stepContext.Context, () => new UserProfile()); 70 | 71 | string viewBy = (string)stepContext.Values["ViewBy"]; 72 | if ("View All Products".Equals(viewBy)) 73 | { 74 | List productDBDetails = await _cosmosDBClient.QueryAllItemsAsync("All",userProfile.Email, ""); 75 | 76 | if (productDBDetails.Count > 0) 77 | { 78 | var attachments = new List(); 79 | var reply = MessageFactory.Attachment(attachments); 80 | reply.AttachmentLayout = AttachmentLayoutTypes.Carousel; 81 | 82 | for (int i = 0; i < productDBDetails.Count; i++) 83 | { 84 | reply.Attachments.Add(Cards.Cards.GetThumbnailCardForUpdateView(productDBDetails[i].Id, productDBDetails[i].ProductName, productDBDetails[i].Price, productDBDetails[i].Image).ToAttachment()); 85 | } 86 | // Send the card(s) to the user as an attachment to the activity 87 | await stepContext.Context.SendActivityAsync(reply, cancellationToken); 88 | return await stepContext.PromptAsync(nameof(TextPrompt), new PromptOptions { }, cancellationToken); 89 | } 90 | else 91 | { 92 | await stepContext.Context.SendActivityAsync(MessageFactory.Text("You don't have any products to delete."), cancellationToken); 93 | return await stepContext.EndDialogAsync(null, cancellationToken); 94 | } 95 | 96 | } 97 | else 98 | { 99 | stepContext.Values["Category"] = ((FoundChoice)stepContext.Result).Value; 100 | 101 | List productDBDetails = await _cosmosDBClient.QueryAllItemsAsync("Category",userProfile.Email, (string)stepContext.Values["Category"]); 102 | 103 | if (productDBDetails.Count > 0) 104 | { 105 | var attachments = new List(); 106 | var reply = MessageFactory.Attachment(attachments); 107 | reply.AttachmentLayout = AttachmentLayoutTypes.Carousel; 108 | 109 | for (int i = 0; i < productDBDetails.Count; i++) 110 | { 111 | reply.Attachments.Add(Cards.Cards.GetThumbnailCardForUpdateView(productDBDetails[i].Id, productDBDetails[i].ProductName, productDBDetails[i].Price, productDBDetails[i].Image).ToAttachment()); 112 | } 113 | // Send the card(s) to the user as an attachment to the activity 114 | await stepContext.Context.SendActivityAsync(reply, cancellationToken); 115 | return await stepContext.PromptAsync(nameof(TextPrompt), new PromptOptions { }, cancellationToken); 116 | } 117 | else 118 | { 119 | await stepContext.Context.SendActivityAsync(MessageFactory.Text($"You don't have any products for {(string)stepContext.Values["Category"]} category."), cancellationToken); 120 | 121 | // Restart the main dialog with a different message the second time around 122 | var promptMessage = "What else can I do for you?"; 123 | return await stepContext.ReplaceDialogAsync(InitialDialogId, promptMessage, cancellationToken); 124 | } 125 | } 126 | } 127 | 128 | private async Task DeleteProductStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 129 | { 130 | 131 | stepContext.Values["ProductId"] = (string)stepContext.Result; 132 | UserProfile userProfile = await _stateService.UserProfileAccessor.GetAsync(stepContext.Context, () => new UserProfile()); 133 | 134 | List productList = await _cosmosDBClient.QueryItemWithIdAsync((string)stepContext.Values["ProductId"], userProfile.Email); 135 | if (await _cosmosDBClient.DeleteItemAsync(productList[0].ProductName, (string)stepContext.Values["ProductId"], userProfile.Email)) 136 | { 137 | await stepContext.Context.SendActivityAsync(MessageFactory.Text($"The product with name {productList[0].ProductName} is successfully deleted."), cancellationToken); 138 | } 139 | else 140 | { 141 | await stepContext.Context.SendActivityAsync(MessageFactory.Text($"The product with name {productList[0].ProductName} could not be deleted. Either it has been already deleted or some error occurred."), cancellationToken); 142 | return await stepContext.EndDialogAsync(null, cancellationToken); 143 | } 144 | //UserProfile userProfile = await _stateService.UserProfileAccessor.GetAsync(stepContext.Context, () => new UserProfile()); 145 | 146 | 147 | List productDBDetails = await _cosmosDBClient.QueryAllItemsAsync("All", userProfile.Email, ""); 148 | 149 | if (productDBDetails.Count > 0) 150 | { 151 | return await stepContext.PromptAsync(nameof(ConfirmPrompt), new PromptOptions 152 | { 153 | Prompt = MessageFactory.Text("Would you like to delete more products?") 154 | }, cancellationToken); 155 | } 156 | else 157 | { 158 | await stepContext.Context.SendActivityAsync(MessageFactory.Text("You don't have any products to delete."), cancellationToken); 159 | return await stepContext.EndDialogAsync(null, cancellationToken); 160 | } 161 | 162 | } 163 | 164 | private async Task SummaryStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 165 | { 166 | if ((bool)stepContext.Result) 167 | { 168 | return await stepContext.ReplaceDialogAsync(InitialDialogId, null, cancellationToken); 169 | } 170 | else 171 | { 172 | return await stepContext.EndDialogAsync(null, cancellationToken); 173 | } 174 | } 175 | } 176 | } 177 | -------------------------------------------------------------------------------- /Dialogs/Operations/UpdateProductDialog.cs: -------------------------------------------------------------------------------- 1 | using EcommerceAdminBot.Models; 2 | using EcommerceAdminBot.Services; 3 | using EcommerceAdminBot.Utilities; 4 | using Microsoft.Bot.Builder; 5 | using Microsoft.Bot.Builder.Dialogs; 6 | using Microsoft.Bot.Builder.Dialogs.Choices; 7 | using Microsoft.Bot.Schema; 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Threading; 12 | using System.Threading.Tasks; 13 | 14 | namespace EcommerceAdminBot.Dialogs.Operations 15 | { 16 | public class UpdateProductDialog : CancelAndHelpDialog 17 | { 18 | CosmosDBClient _cosmosDBClient; 19 | StateService _stateService; 20 | public UpdateProductDialog(CosmosDBClient cosmosDBClient, StateService stateService) : base(nameof(UpdateProductDialog)) 21 | { 22 | _cosmosDBClient = cosmosDBClient; 23 | _stateService = stateService; 24 | 25 | var waterfallSteps = new WaterfallStep[] 26 | { 27 | IntroStepAsync, 28 | ViewProductsStepAsync, 29 | SelectProductStepAsync, 30 | UpdateProductStepAsync, 31 | UpdateMoreProductsStepAsync, 32 | SummaryStepAsync, 33 | }; 34 | 35 | AddDialog(new WaterfallDialog(nameof(WaterfallDialog), waterfallSteps)); 36 | AddDialog(new TextPrompt(nameof(TextPrompt))); 37 | AddDialog(new ChoicePrompt(nameof(ChoicePrompt))); 38 | AddDialog(new ConfirmPrompt(nameof(ConfirmPrompt))); 39 | AddDialog(new IndividualProductUpdateDialog(_cosmosDBClient, _stateService)); 40 | 41 | InitialDialogId = nameof(WaterfallDialog); 42 | } 43 | 44 | private async Task IntroStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 45 | { 46 | return await stepContext.PromptAsync(nameof(ChoicePrompt), new PromptOptions() 47 | { 48 | Prompt = MessageFactory.Text("How would you like to see your products?"), 49 | Choices = ChoiceFactory.ToChoices(new List { "View All Products", "View By Category" }), 50 | }, cancellationToken); 51 | } 52 | 53 | private async Task ViewProductsStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 54 | { 55 | stepContext.Values["ViewBy"] = ((FoundChoice)stepContext.Result).Value; 56 | string viewBy = (string)stepContext.Values["ViewBy"]; 57 | 58 | if ("View By Category".Equals(viewBy)) 59 | { 60 | return await stepContext.PromptAsync(nameof(ChoicePrompt), new PromptOptions() 61 | { 62 | Prompt = MessageFactory.Text("Please select the category to view the products?"), 63 | Choices = ChoiceFactory.ToChoices(new List { "Television", "Laptop", "Air Conditioner", "Monitor", "Speaker", "Earphones" }), 64 | }, cancellationToken); 65 | } 66 | return await stepContext.NextAsync(null, cancellationToken); 67 | } 68 | 69 | private async Task SelectProductStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 70 | { 71 | UserProfile userProfile = await _stateService.UserProfileAccessor.GetAsync(stepContext.Context, () => new UserProfile()); 72 | 73 | string viewBy = (string)stepContext.Values["ViewBy"]; 74 | if ("View All Products".Equals(viewBy)) 75 | { 76 | List productDBDetails = await _cosmosDBClient.QueryAllItemsAsync("All",userProfile.Email, ""); 77 | 78 | if (productDBDetails.Count > 0) 79 | { 80 | var attachments = new List(); 81 | var reply = MessageFactory.Attachment(attachments); 82 | reply.AttachmentLayout = AttachmentLayoutTypes.Carousel; 83 | 84 | for (int i = 0; i < productDBDetails.Count; i++) 85 | { 86 | reply.Attachments.Add(Cards.Cards.GetThumbnailCardForUpdateView(productDBDetails[i].Id, productDBDetails[i].ProductName, productDBDetails[i].Price, productDBDetails[i].Image).ToAttachment()); 87 | } 88 | // Send the card(s) to the user as an attachment to the activity 89 | await stepContext.Context.SendActivityAsync(reply, cancellationToken); 90 | return await stepContext.PromptAsync(nameof(TextPrompt), new PromptOptions { }, cancellationToken); 91 | } 92 | else 93 | { 94 | await stepContext.Context.SendActivityAsync(MessageFactory.Text("You don't have any products to update."), cancellationToken); 95 | return await stepContext.EndDialogAsync(null, cancellationToken); 96 | } 97 | 98 | } 99 | else 100 | { 101 | stepContext.Values["Category"] = ((FoundChoice)stepContext.Result).Value; 102 | 103 | List productDBDetails = await _cosmosDBClient.QueryAllItemsAsync("Category",userProfile.Email, (string)stepContext.Values["Category"]); 104 | 105 | if (productDBDetails.Count > 0) 106 | { 107 | var attachments = new List(); 108 | var reply = MessageFactory.Attachment(attachments); 109 | reply.AttachmentLayout = AttachmentLayoutTypes.Carousel; 110 | 111 | for (int i = 0; i < productDBDetails.Count; i++) 112 | { 113 | reply.Attachments.Add(Cards.Cards.GetThumbnailCardForUpdateView(productDBDetails[i].Id, productDBDetails[i].ProductName, productDBDetails[i].Price, productDBDetails[i].Image).ToAttachment()); 114 | } 115 | // Send the card(s) to the user as an attachment to the activity 116 | await stepContext.Context.SendActivityAsync(reply, cancellationToken); 117 | return await stepContext.PromptAsync(nameof(TextPrompt), new PromptOptions { }, cancellationToken); 118 | } 119 | else 120 | { 121 | await stepContext.Context.SendActivityAsync(MessageFactory.Text($"You don't have any products for {(string)stepContext.Values["Category"]} category."), cancellationToken); 122 | 123 | // Restart the main dialog with a different message the second time around 124 | var promptMessage = "What else can I do for you?"; 125 | return await stepContext.ReplaceDialogAsync(InitialDialogId, promptMessage, cancellationToken); 126 | } 127 | } 128 | } 129 | 130 | private async Task UpdateProductStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 131 | { 132 | 133 | stepContext.Values["ProductId"] = (string)stepContext.Result; 134 | UserProfile userProfile = await _stateService.UserProfileAccessor.GetAsync(stepContext.Context, () => new UserProfile()); 135 | 136 | List productList = await _cosmosDBClient.QueryItemWithIdAsync((string)stepContext.Values["ProductId"], userProfile.Email); 137 | 138 | return await stepContext.BeginDialogAsync(nameof(IndividualProductUpdateDialog), productList[0], cancellationToken); 139 | } 140 | 141 | private async Task UpdateMoreProductsStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 142 | { 143 | return await stepContext.PromptAsync(nameof(ConfirmPrompt), new PromptOptions 144 | { 145 | Prompt = MessageFactory.Text("Would you like to update more products?") 146 | }, cancellationToken); 147 | } 148 | 149 | private async Task SummaryStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 150 | { 151 | if ((bool)stepContext.Result) 152 | { 153 | return await stepContext.ReplaceDialogAsync(InitialDialogId, null, cancellationToken); 154 | } 155 | else 156 | { 157 | return await stepContext.EndDialogAsync(null, cancellationToken); 158 | } 159 | } 160 | } 161 | } 162 | -------------------------------------------------------------------------------- /Dialogs/Operations/ViewAllProductsDialog.cs: -------------------------------------------------------------------------------- 1 | using EcommerceAdminBot.Models; 2 | using EcommerceAdminBot.Services; 3 | using EcommerceAdminBot.Utilities; 4 | using Microsoft.Bot.Builder; 5 | using Microsoft.Bot.Builder.Dialogs; 6 | using Microsoft.Bot.Builder.Dialogs.Choices; 7 | using Microsoft.Bot.Schema; 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Threading; 12 | using System.Threading.Tasks; 13 | 14 | namespace EcommerceAdminBot.Dialogs.Operations 15 | { 16 | public class ViewAllProductsDialog : ComponentDialog 17 | { 18 | CosmosDBClient _cosmosDBClient; 19 | StateService _stateService; 20 | public ViewAllProductsDialog(CosmosDBClient cosmosDBClient, StateService stateService) : base(nameof(ViewAllProductsDialog)) 21 | { 22 | _cosmosDBClient = cosmosDBClient; 23 | _stateService = stateService; 24 | 25 | var waterfallSteps = new WaterfallStep[] 26 | { 27 | IntroStepAsync, 28 | ViewProductsStepAsync, 29 | ViewByCategoryStepAsync, 30 | }; 31 | 32 | AddDialog(new WaterfallDialog(nameof(WaterfallDialog), waterfallSteps)); 33 | AddDialog(new TextPrompt(nameof(TextPrompt))); 34 | 35 | InitialDialogId = nameof(WaterfallDialog); 36 | } 37 | 38 | private async Task IntroStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 39 | { 40 | return await stepContext.PromptAsync(nameof(ChoicePrompt), new PromptOptions() 41 | { 42 | Prompt = MessageFactory.Text("How would you like to see your products?"), 43 | Choices = ChoiceFactory.ToChoices(new List { "View All Products", "View By Category", "Exit" }), 44 | }, cancellationToken); 45 | } 46 | 47 | private async Task ViewProductsStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 48 | { 49 | stepContext.Values["ViewBy"] = ((FoundChoice)stepContext.Result).Value; 50 | string viewBy = (string)stepContext.Values["ViewBy"]; 51 | if ("Exit".Equals(viewBy)) 52 | { 53 | return await stepContext.EndDialogAsync(null, cancellationToken); 54 | 55 | } 56 | if ("View By Category".Equals(viewBy)) 57 | { 58 | return await stepContext.PromptAsync(nameof(ChoicePrompt), new PromptOptions() 59 | { 60 | Prompt = MessageFactory.Text("Please select the category to view the products?"), 61 | Choices = ChoiceFactory.ToChoices(new List { "Laptop", "Monitor", "Projector" }), 62 | }, cancellationToken); 63 | } 64 | return await stepContext.NextAsync(null, cancellationToken); 65 | } 66 | 67 | private async Task ViewByCategoryStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 68 | { 69 | UserProfile userProfile = await _stateService.UserProfileAccessor.GetAsync(stepContext.Context, () => new UserProfile()); 70 | 71 | string viewBy = (string)stepContext.Values["ViewBy"]; 72 | if ("View All Products".Equals(viewBy)) 73 | { 74 | List productDBDetails = await _cosmosDBClient.QueryAllItemsAsync("All", userProfile.Email , ""); 75 | 76 | if (productDBDetails.Count > 0) 77 | { 78 | var attachments = new List(); 79 | var reply = MessageFactory.Attachment(attachments); 80 | reply.AttachmentLayout = AttachmentLayoutTypes.Carousel; 81 | 82 | for (int i = 0; i < productDBDetails.Count; i++) 83 | { 84 | reply.Attachments.Add(Cards.Cards.GetHeroCard(productDBDetails[i].Id, productDBDetails[i].ProductName, productDBDetails[i].Price, productDBDetails[i].Image).ToAttachment()); 85 | } 86 | // Send the card(s) to the user as an attachment to the activity 87 | await stepContext.Context.SendActivityAsync(reply, cancellationToken); 88 | } 89 | else 90 | { 91 | await stepContext.Context.SendActivityAsync(MessageFactory.Text("You don't have any products to view."), cancellationToken); 92 | 93 | } 94 | 95 | return await stepContext.EndDialogAsync(null, cancellationToken); 96 | 97 | } 98 | else 99 | { 100 | stepContext.Values["Category"] = ((FoundChoice)stepContext.Result).Value; 101 | 102 | List productDBDetails = await _cosmosDBClient.QueryAllItemsAsync("Category",userProfile.Email, (string)stepContext.Values["Category"]); 103 | 104 | if (productDBDetails.Count > 0) 105 | { 106 | var attachments = new List(); 107 | var reply = MessageFactory.Attachment(attachments); 108 | reply.AttachmentLayout = AttachmentLayoutTypes.Carousel; 109 | 110 | for (int i = 0; i < productDBDetails.Count; i++) 111 | { 112 | reply.Attachments.Add(Cards.Cards.GetHeroCard(productDBDetails[i].Id, productDBDetails[i].ProductName, productDBDetails[i].Price, productDBDetails[i].Image).ToAttachment()); 113 | } 114 | // Send the card(s) to the user as an attachment to the activity 115 | await stepContext.Context.SendActivityAsync(reply, cancellationToken); 116 | 117 | } 118 | else 119 | { 120 | await stepContext.Context.SendActivityAsync(MessageFactory.Text($"You don't have any products for {(string)stepContext.Values["Category"]} category."), cancellationToken); 121 | 122 | } 123 | 124 | // Restart the dialog with a different message the second time around 125 | var promptMessage = "What else can I do for you?"; 126 | return await stepContext.ReplaceDialogAsync(InitialDialogId, promptMessage, cancellationToken); 127 | } 128 | } 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /Dialogs/Operations/ViewTaskDialog.cs: -------------------------------------------------------------------------------- 1 | using AdaptiveCards; 2 | using Microsoft.Bot.Builder; 3 | using Microsoft.Bot.Builder.Dialogs; 4 | using Microsoft.Bot.Builder.Dialogs.Choices; 5 | using Microsoft.Bot.Schema; 6 | using Microsoft.Extensions.Configuration; 7 | using Newtonsoft.Json.Linq; 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Diagnostics; 11 | using System.Linq; 12 | using System.Threading; 13 | using System.Threading.Tasks; 14 | using EcommerceAdminBot.Utilities; 15 | 16 | namespace EcommerceAdminBot.Dialogs.Operations 17 | { 18 | public class ViewTaskDialog : ComponentDialog 19 | { 20 | protected readonly IConfiguration Configuration; 21 | private readonly CosmoDBClientToDo _cosmosDBClient; 22 | public ViewTaskDialog(IConfiguration configuration, CosmoDBClientToDo cosmosDBClient) : base(nameof(ViewTaskDialog)) 23 | { 24 | Configuration = configuration; 25 | _cosmosDBClient = cosmosDBClient; 26 | 27 | var waterfallSteps = new WaterfallStep[] 28 | { 29 | ShowTasksStepAsync, 30 | }; 31 | 32 | AddDialog(new WaterfallDialog(nameof(WaterfallDialog), waterfallSteps)); 33 | AddDialog(new TextPrompt(nameof(TextPrompt))); 34 | 35 | InitialDialogId = nameof(WaterfallDialog); 36 | } 37 | 38 | private async Task ShowTasksStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) 39 | { 40 | List toDoTasks = await _cosmosDBClient.QueryItemsAsync(User.UserID, Configuration["CosmosEndPointURI"], Configuration["CosmosPrimaryKey"], Configuration["CosmosDatabaseIdToDo"], Configuration["CosmosContainerIDToDo"], Configuration["CosmosPartitionKeyToDo"]); 41 | if (toDoTasks.Count == 0) 42 | { 43 | await stepContext.Context.SendActivityAsync(MessageFactory.Text("You don't have any tasks added."), cancellationToken); 44 | return await stepContext.EndDialogAsync(null, cancellationToken); 45 | } 46 | await stepContext.Context.SendActivityAsync(MessageFactory.Text("Please find the below tasks you provided."), cancellationToken); 47 | /*for (int i = 0; i < toDoTasks.Count; i++) 48 | { 49 | await stepContext.Context.SendActivityAsync(MessageFactory.Text(toDoTasks[i].Task), cancellationToken); 50 | }*/ 51 | List taskList = new List(); 52 | for (int i = 0; i < toDoTasks.Count; i++) 53 | { 54 | taskList.Add(toDoTasks[i].Task); 55 | } 56 | 57 | //await stepContext.Context.SendActivityAsync(MessageFactory.Text("Please select the tasks you want to delete."), cancellationToken); 58 | 59 | var card = new AdaptiveCard(new AdaptiveSchemaVersion(1, 0)) 60 | { 61 | // Use LINQ to turn the choices into submit actions 62 | Actions = taskList.Select(choice => new AdaptiveSubmitAction 63 | { 64 | Title = choice, 65 | Data = choice, // This will be a string 66 | }).ToList(), 67 | }; 68 | /* 69 | //Typing... Message 70 | await stepContext.Context.SendActivitiesAsync( 71 | new Microsoft.Bot.Schema.Activity[] { 72 | new Microsoft.Bot.Schema.Activity { Type = ActivityTypes.Typing }, 73 | new Microsoft.Bot.Schema.Activity { Type = "delay", Value= 5000 }, 74 | MessageFactory.Text("Finished typing", "Finished typing"), 75 | }, 76 | cancellationToken); 77 | */ 78 | // Prompt 79 | await stepContext.PromptAsync(nameof(ChoicePrompt), new PromptOptions 80 | { 81 | Prompt = (Microsoft.Bot.Schema.Activity)MessageFactory.Attachment(new Attachment 82 | { 83 | ContentType = AdaptiveCard.ContentType, 84 | // Convert the AdaptiveCard to a JObject 85 | Content = JObject.FromObject(card), 86 | }), 87 | Choices = ChoiceFactory.ToChoices(taskList), 88 | // Don't render the choices outside the card 89 | Style = ListStyle.None, 90 | }, 91 | cancellationToken); 92 | /*//Typing... Message 93 | await stepContext.Context.SendActivitiesAsync( 94 | new Microsoft.Bot.Schema.Activity[] { 95 | new Microsoft.Bot.Schema.Activity { Type = ActivityTypes.Typing }, 96 | new Microsoft.Bot.Schema.Activity { Type = "delay", Value= 8000 }, 97 | MessageFactory.Text("Finished typing", "Finished typing"), 98 | }, 99 | cancellationToken); 100 | */ 101 | 102 | return await stepContext.EndDialogAsync(null, cancellationToken); 103 | } 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /EcommerceAdminBot.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp3.1 5 | latest 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 | Always 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /EcommerceAdminBot.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.31105.61 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EcommerceAdminBot", "EcommerceAdminBot.csproj", "{7AA076D6-B873-44BC-8DB6-E3A0D5FAFA16}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {7AA076D6-B873-44BC-8DB6-E3A0D5FAFA16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {7AA076D6-B873-44BC-8DB6-E3A0D5FAFA16}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {7AA076D6-B873-44BC-8DB6-E3A0D5FAFA16}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {7AA076D6-B873-44BC-8DB6-E3A0D5FAFA16}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {50CB4F90-50A8-4483-8319-D4556FD18B2D} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /Models/ConversationData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace EcommerceAdminBot.Models 7 | { 8 | public class ConversationData 9 | { 10 | // Track whether we have already asked the user's name 11 | public bool PromptedUserForOTP { get; set; } = false; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Models/MarketDBDetails.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace EcommerceAdminBot.Models 8 | { 9 | public class MarketDBDetails 10 | { 11 | [JsonProperty(PropertyName = "id")] 12 | public string Email { get; set; } 13 | /*public string StoreName { get; set; } 14 | public int Price { get; set; } 15 | public string Image { get; set; } 16 | public string Category { get; set; } 17 | 18 | public string Email { get; set; } 19 | */ 20 | //public string Id { get; set; } 21 | public string StoreName { get; set; } 22 | public string Location { get; set; } 23 | 24 | public string Photo { get; set; } 25 | //public string Company { get; set; } 26 | public string Image { get; set; } 27 | public string Category { get; set; } 28 | public string TextMessage { get; set; } 29 | public string informationCategory { get; set; } 30 | public override string ToString() 31 | { 32 | return JsonConvert.SerializeObject(this); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /Models/MarketDetails.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace EcommerceAdminBot 7 | { 8 | public class MarketDetails 9 | { 10 | public List ProductList = new List(); 11 | } 12 | 13 | public class ProductM 14 | { 15 | public string Email { get; set; } 16 | //public string ID { get; set; } 17 | public string SName { get; set; } 18 | public string location { get; set; } 19 | public string Photo { get; set; } 20 | //public string Company { get; set; } 21 | public string ImageURL { get; set; } 22 | public string Category { get; set; } 23 | public string textmessage { get; set; } 24 | public string informationCategory { get; set; } 25 | } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /Models/ProductDBDetails.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace EcommerceAdminBot.Models 8 | { 9 | public class ProductDBDetails 10 | { 11 | [JsonProperty(PropertyName = "id")] 12 | public string Email { get; set; } 13 | public string Id { get; set; } 14 | public string ProductName { get; set; } 15 | public int Price { get; set; } 16 | public string Image { get; set; } 17 | public string Category { get; set; } 18 | 19 | //public string TextMessage { get; set; } 20 | 21 | public override string ToString() 22 | { 23 | return JsonConvert.SerializeObject(this); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Models/ProductDetails.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace EcommerceAdminBot 7 | { 8 | public class ProductDetails 9 | { 10 | public List ProductList = new List(); 11 | } 12 | 13 | public class Product 14 | { 15 | public string ID { get; set; } 16 | public string Name { get; set; } 17 | public int Price { get; set; } 18 | public string ImageURL { get; set; } 19 | public string Category { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Models/User.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace EcommerceAdminBot 7 | { 8 | public class User 9 | { 10 | public List TasksList = new List(); 11 | public static string UserID { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Models/UserProfile.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace EcommerceAdminBot.Models 7 | { 8 | public class UserProfile 9 | { 10 | public string Name { get; set; } 11 | public string Email { get; set; } 12 | public bool UserAuthenticated { get; set; } = false; 13 | public int OTP { get; set; } 14 | public bool attendance { get; set; } 15 | public string storeName { get; set; } 16 | public string Message { get; set; } 17 | public string location { get; set; } 18 | public bool EmailVerified { get; set; } = false; 19 | public string ValueFinder { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Program.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | // 4 | // Generated with Bot Builder V4 SDK Template for Visual Studio CoreBot v4.13.1 5 | 6 | using Microsoft.AspNetCore.Hosting; 7 | using Microsoft.Extensions.Hosting; 8 | using Microsoft.Extensions.Logging; 9 | 10 | namespace EcommerceAdminBot 11 | { 12 | public class Program 13 | { 14 | public static void Main(string[] args) 15 | { 16 | CreateHostBuilder(args).Build().Run(); 17 | } 18 | 19 | public static IHostBuilder CreateHostBuilder(string[] args) => 20 | Host.CreateDefaultBuilder(args) 21 | .ConfigureWebHostDefaults(webBuilder => 22 | { 23 | webBuilder.ConfigureLogging((logging) => 24 | { 25 | logging.AddDebug(); 26 | logging.AddConsole(); 27 | }); 28 | webBuilder.UseStartup(); 29 | }); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Properties/ServiceDependencies/EcommerceAdminBot20220704202001 - Web Deploy/profile.arm.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#", 3 | "contentVersion": "1.0.0.0", 4 | "metadata": { 5 | "_dependencyType": "appService.windows" 6 | }, 7 | "parameters": { 8 | "resourceGroupName": { 9 | "type": "string", 10 | "defaultValue": "LG_Merchandiser", 11 | "metadata": { 12 | "description": "Name of the resource group for the resource. It is recommended to put resources under same resource group for better tracking." 13 | } 14 | }, 15 | "resourceGroupLocation": { 16 | "type": "string", 17 | "defaultValue": "westus", 18 | "metadata": { 19 | "description": "Location of the resource group. Resource groups could have different location than resources, however by default we use API versions from latest hybrid profile which support all locations for resource types we support." 20 | } 21 | }, 22 | "resourceName": { 23 | "type": "string", 24 | "defaultValue": "EcommerceAdminBot20220704202001", 25 | "metadata": { 26 | "description": "Name of the main resource to be created by this template." 27 | } 28 | }, 29 | "resourceLocation": { 30 | "type": "string", 31 | "defaultValue": "[parameters('resourceGroupLocation')]", 32 | "metadata": { 33 | "description": "Location of the resource. By default use resource group's location, unless the resource provider is not supported there." 34 | } 35 | } 36 | }, 37 | "variables": { 38 | "appServicePlan_name": "[concat('Plan', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]", 39 | "appServicePlan_ResourceId": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('resourceGroupName'), '/providers/Microsoft.Web/serverFarms/', variables('appServicePlan_name'))]" 40 | }, 41 | "resources": [ 42 | { 43 | "type": "Microsoft.Resources/resourceGroups", 44 | "name": "[parameters('resourceGroupName')]", 45 | "location": "[parameters('resourceGroupLocation')]", 46 | "apiVersion": "2019-10-01" 47 | }, 48 | { 49 | "type": "Microsoft.Resources/deployments", 50 | "name": "[concat(parameters('resourceGroupName'), 'Deployment', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]", 51 | "resourceGroup": "[parameters('resourceGroupName')]", 52 | "apiVersion": "2019-10-01", 53 | "dependsOn": [ 54 | "[parameters('resourceGroupName')]" 55 | ], 56 | "properties": { 57 | "mode": "Incremental", 58 | "template": { 59 | "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", 60 | "contentVersion": "1.0.0.0", 61 | "resources": [ 62 | { 63 | "location": "[parameters('resourceLocation')]", 64 | "name": "[parameters('resourceName')]", 65 | "type": "Microsoft.Web/sites", 66 | "apiVersion": "2015-08-01", 67 | "tags": { 68 | "[concat('hidden-related:', variables('appServicePlan_ResourceId'))]": "empty" 69 | }, 70 | "dependsOn": [ 71 | "[variables('appServicePlan_ResourceId')]" 72 | ], 73 | "kind": "app", 74 | "properties": { 75 | "name": "[parameters('resourceName')]", 76 | "kind": "app", 77 | "httpsOnly": true, 78 | "reserved": false, 79 | "serverFarmId": "[variables('appServicePlan_ResourceId')]", 80 | "siteConfig": { 81 | "metadata": [ 82 | { 83 | "name": "CURRENT_STACK", 84 | "value": "dotnetcore" 85 | } 86 | ] 87 | } 88 | }, 89 | "identity": { 90 | "type": "SystemAssigned" 91 | } 92 | }, 93 | { 94 | "location": "[parameters('resourceLocation')]", 95 | "name": "[variables('appServicePlan_name')]", 96 | "type": "Microsoft.Web/serverFarms", 97 | "apiVersion": "2015-08-01", 98 | "sku": { 99 | "name": "S1", 100 | "tier": "Standard", 101 | "family": "S", 102 | "size": "S1" 103 | }, 104 | "properties": { 105 | "name": "[variables('appServicePlan_name')]" 106 | } 107 | } 108 | ] 109 | } 110 | } 111 | } 112 | ] 113 | } -------------------------------------------------------------------------------- /Properties/ServiceDependencies/lgMerchandiserBot - Web Deploy/profile.arm.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#", 3 | "contentVersion": "1.0.0.0", 4 | "metadata": { 5 | "_dependencyType": "appService.windows" 6 | }, 7 | "parameters": { 8 | "resourceGroupName": { 9 | "type": "string", 10 | "defaultValue": "lgMerchandiser", 11 | "metadata": { 12 | "description": "Name of the resource group for the resource. It is recommended to put resources under same resource group for better tracking." 13 | } 14 | }, 15 | "resourceGroupLocation": { 16 | "type": "string", 17 | "defaultValue": "eastus", 18 | "metadata": { 19 | "description": "Location of the resource group. Resource groups could have different location than resources, however by default we use API versions from latest hybrid profile which support all locations for resource types we support." 20 | } 21 | }, 22 | "resourceName": { 23 | "type": "string", 24 | "defaultValue": "lgMerchandiserBot", 25 | "metadata": { 26 | "description": "Name of the main resource to be created by this template." 27 | } 28 | }, 29 | "resourceLocation": { 30 | "type": "string", 31 | "defaultValue": "[parameters('resourceGroupLocation')]", 32 | "metadata": { 33 | "description": "Location of the resource. By default use resource group's location, unless the resource provider is not supported there." 34 | } 35 | } 36 | }, 37 | "variables": { 38 | "appServicePlan_name": "[concat('Plan', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]", 39 | "appServicePlan_ResourceId": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('resourceGroupName'), '/providers/Microsoft.Web/serverFarms/', variables('appServicePlan_name'))]" 40 | }, 41 | "resources": [ 42 | { 43 | "type": "Microsoft.Resources/resourceGroups", 44 | "name": "[parameters('resourceGroupName')]", 45 | "location": "[parameters('resourceGroupLocation')]", 46 | "apiVersion": "2019-10-01" 47 | }, 48 | { 49 | "type": "Microsoft.Resources/deployments", 50 | "name": "[concat(parameters('resourceGroupName'), 'Deployment', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]", 51 | "resourceGroup": "[parameters('resourceGroupName')]", 52 | "apiVersion": "2019-10-01", 53 | "dependsOn": [ 54 | "[parameters('resourceGroupName')]" 55 | ], 56 | "properties": { 57 | "mode": "Incremental", 58 | "template": { 59 | "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", 60 | "contentVersion": "1.0.0.0", 61 | "resources": [ 62 | { 63 | "location": "[parameters('resourceLocation')]", 64 | "name": "[parameters('resourceName')]", 65 | "type": "Microsoft.Web/sites", 66 | "apiVersion": "2015-08-01", 67 | "tags": { 68 | "[concat('hidden-related:', variables('appServicePlan_ResourceId'))]": "empty" 69 | }, 70 | "dependsOn": [ 71 | "[variables('appServicePlan_ResourceId')]" 72 | ], 73 | "kind": "app", 74 | "properties": { 75 | "name": "[parameters('resourceName')]", 76 | "kind": "app", 77 | "httpsOnly": true, 78 | "reserved": false, 79 | "serverFarmId": "[variables('appServicePlan_ResourceId')]", 80 | "siteConfig": { 81 | "metadata": [ 82 | { 83 | "name": "CURRENT_STACK", 84 | "value": "dotnetcore" 85 | } 86 | ] 87 | } 88 | }, 89 | "identity": { 90 | "type": "SystemAssigned" 91 | } 92 | }, 93 | { 94 | "location": "[parameters('resourceLocation')]", 95 | "name": "[variables('appServicePlan_name')]", 96 | "type": "Microsoft.Web/serverFarms", 97 | "apiVersion": "2015-08-01", 98 | "sku": { 99 | "name": "S1", 100 | "tier": "Standard", 101 | "family": "S", 102 | "size": "S1" 103 | }, 104 | "properties": { 105 | "name": "[variables('appServicePlan_name')]" 106 | } 107 | } 108 | ] 109 | } 110 | } 111 | } 112 | ] 113 | } -------------------------------------------------------------------------------- /Properties/ServiceDependencies/lgMerchandiserBot - Web Deploy1/profile.arm.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#", 3 | "contentVersion": "1.0.0.0", 4 | "metadata": { 5 | "_dependencyType": "appService.windows" 6 | }, 7 | "parameters": { 8 | "resourceGroupName": { 9 | "type": "string", 10 | "defaultValue": "lgMerchandiser", 11 | "metadata": { 12 | "description": "Name of the resource group for the resource. It is recommended to put resources under same resource group for better tracking." 13 | } 14 | }, 15 | "resourceGroupLocation": { 16 | "type": "string", 17 | "defaultValue": "eastus", 18 | "metadata": { 19 | "description": "Location of the resource group. Resource groups could have different location than resources, however by default we use API versions from latest hybrid profile which support all locations for resource types we support." 20 | } 21 | }, 22 | "resourceName": { 23 | "type": "string", 24 | "defaultValue": "lgMerchandiserBot", 25 | "metadata": { 26 | "description": "Name of the main resource to be created by this template." 27 | } 28 | }, 29 | "resourceLocation": { 30 | "type": "string", 31 | "defaultValue": "[parameters('resourceGroupLocation')]", 32 | "metadata": { 33 | "description": "Location of the resource. By default use resource group's location, unless the resource provider is not supported there." 34 | } 35 | } 36 | }, 37 | "variables": { 38 | "appServicePlan_name": "[concat('Plan', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]", 39 | "appServicePlan_ResourceId": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('resourceGroupName'), '/providers/Microsoft.Web/serverFarms/', variables('appServicePlan_name'))]" 40 | }, 41 | "resources": [ 42 | { 43 | "type": "Microsoft.Resources/resourceGroups", 44 | "name": "[parameters('resourceGroupName')]", 45 | "location": "[parameters('resourceGroupLocation')]", 46 | "apiVersion": "2019-10-01" 47 | }, 48 | { 49 | "type": "Microsoft.Resources/deployments", 50 | "name": "[concat(parameters('resourceGroupName'), 'Deployment', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]", 51 | "resourceGroup": "[parameters('resourceGroupName')]", 52 | "apiVersion": "2019-10-01", 53 | "dependsOn": [ 54 | "[parameters('resourceGroupName')]" 55 | ], 56 | "properties": { 57 | "mode": "Incremental", 58 | "template": { 59 | "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", 60 | "contentVersion": "1.0.0.0", 61 | "resources": [ 62 | { 63 | "location": "[parameters('resourceLocation')]", 64 | "name": "[parameters('resourceName')]", 65 | "type": "Microsoft.Web/sites", 66 | "apiVersion": "2015-08-01", 67 | "tags": { 68 | "[concat('hidden-related:', variables('appServicePlan_ResourceId'))]": "empty" 69 | }, 70 | "dependsOn": [ 71 | "[variables('appServicePlan_ResourceId')]" 72 | ], 73 | "kind": "app", 74 | "properties": { 75 | "name": "[parameters('resourceName')]", 76 | "kind": "app", 77 | "httpsOnly": true, 78 | "reserved": false, 79 | "serverFarmId": "[variables('appServicePlan_ResourceId')]", 80 | "siteConfig": { 81 | "metadata": [ 82 | { 83 | "name": "CURRENT_STACK", 84 | "value": "dotnetcore" 85 | } 86 | ] 87 | } 88 | }, 89 | "identity": { 90 | "type": "SystemAssigned" 91 | } 92 | }, 93 | { 94 | "location": "[parameters('resourceLocation')]", 95 | "name": "[variables('appServicePlan_name')]", 96 | "type": "Microsoft.Web/serverFarms", 97 | "apiVersion": "2015-08-01", 98 | "sku": { 99 | "name": "S1", 100 | "tier": "Standard", 101 | "family": "S", 102 | "size": "S1" 103 | }, 104 | "properties": { 105 | "name": "[variables('appServicePlan_name')]" 106 | } 107 | } 108 | ] 109 | } 110 | } 111 | } 112 | ] 113 | } -------------------------------------------------------------------------------- /Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:3978/", 8 | "sslPort": 0 9 | } 10 | }, 11 | "profiles": { 12 | "IIS Express": { 13 | "commandName": "IISExpress", 14 | "launchBrowser": true, 15 | "environmentVariables": { 16 | "ASPNETCORE_ENVIRONMENT": "Development" 17 | } 18 | }, 19 | "CoreBot": { 20 | "commandName": "Project", 21 | "launchBrowser": true, 22 | "applicationUrl": "http://localhost:3978", 23 | "environmentVariables": { 24 | "ASPNETCORE_ENVIRONMENT": "Development" 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Services/StateService.cs: -------------------------------------------------------------------------------- 1 | using EcommerceAdminBot.Models; 2 | using Microsoft.Bot.Builder; 3 | using Microsoft.Bot.Builder.Dialogs; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Threading.Tasks; 8 | 9 | namespace EcommerceAdminBot.Services 10 | { 11 | public class StateService 12 | { 13 | #region Variables 14 | // State Variables 15 | 16 | public ConversationState ConversationState { get; } 17 | public UserState UserState { get; } 18 | 19 | // IDs 20 | public static string UserProfileId { get; } = $"{nameof(StateService)}.UserProfile"; 21 | public static string ConversationDataId { get; } = $"{nameof(StateService)}.ConversationData"; 22 | public static string DialogStateId { get; } = $"{nameof(StateService)}.DialogState"; 23 | 24 | // Accessors 25 | public IStatePropertyAccessor UserProfileAccessor { get; set; } 26 | public IStatePropertyAccessor ConversationDataAccessor { get; set; } 27 | public IStatePropertyAccessor DialogStateAccessor { get; set; } 28 | 29 | public StateService(UserState userState, ConversationState conversationState) 30 | { 31 | ConversationState = conversationState ?? throw new ArgumentNullException(nameof(conversationState)); 32 | UserState = userState ?? throw new ArgumentNullException(nameof(userState)); 33 | 34 | InitializeAccessors(); 35 | } 36 | 37 | public void InitializeAccessors() 38 | { 39 | // Initialize Conversation State Accessor 40 | ConversationDataAccessor = ConversationState.CreateProperty(ConversationDataId); 41 | 42 | DialogStateAccessor = ConversationState.CreateProperty(DialogStateId); 43 | 44 | // Initialize User State 45 | UserProfileAccessor = UserState.CreateProperty(UserProfileId); 46 | } 47 | 48 | #endregion 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Startup.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | // 4 | // Generated with Bot Builder V4 SDK Template for Visual Studio CoreBot v4.13.1 5 | 6 | using EcommerceAdminBot.Bots; 7 | using EcommerceAdminBot.Dialogs; 8 | using EcommerceAdminBot.Models; 9 | using EcommerceAdminBot.Services; 10 | using EcommerceAdminBot.Utilities; 11 | using Microsoft.AspNetCore.Builder; 12 | using Microsoft.AspNetCore.Hosting; 13 | using Microsoft.Bot.Builder; 14 | using Microsoft.Bot.Builder.BotFramework; 15 | using Microsoft.Bot.Builder.Integration.AspNet.Core; 16 | using Microsoft.Bot.Connector.Authentication; 17 | using Microsoft.Extensions.DependencyInjection; 18 | using Microsoft.Extensions.Hosting; 19 | 20 | namespace EcommerceAdminBot 21 | { 22 | public class Startup 23 | { 24 | // This method gets called by the runtime. Use this method to add services to the container. 25 | public void ConfigureServices(IServiceCollection services) 26 | { 27 | services.AddControllers().AddNewtonsoftJson(); 28 | 29 | // Create the Bot Framework Adapter with error handling enabled. 30 | services.AddSingleton(); 31 | 32 | services.AddSingleton(); 33 | 34 | // Create the storage we'll be using for User and Conversation state. (Memory is great for testing purposes.) 35 | services.AddSingleton(); 36 | 37 | // Create the User state. (Used in this bot's Dialog implementation.) 38 | services.AddSingleton(); 39 | 40 | // Create the Conversation state. (Used by the Dialog system itself.) 41 | services.AddSingleton(); 42 | 43 | // Create an instance of the state service 44 | services.AddSingleton(); 45 | 46 | // The MainDialog that will be run by the bot. 47 | services.AddSingleton(); 48 | 49 | services.AddSingleton(); 50 | 51 | services.AddSingleton(); 52 | services.AddSingleton(); 53 | // Create the bot as a transient. In this case the ASP Controller is expecting an IBot. 54 | services.AddTransient>(); 55 | } 56 | 57 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 58 | public void Configure(IApplicationBuilder app, IWebHostEnvironment env) 59 | { 60 | if (env.IsDevelopment()) 61 | { 62 | app.UseDeveloperExceptionPage(); 63 | } 64 | 65 | app.UseDefaultFiles() 66 | .UseStaticFiles() 67 | .UseWebSockets() 68 | .UseRouting() 69 | .UseAuthorization() 70 | .UseEndpoints(endpoints => 71 | { 72 | endpoints.MapControllers(); 73 | }); 74 | 75 | // app.UseHttpsRedirection(); 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /ToDoLUISRecognizer.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. 3 | 4 | using Microsoft.Bot.Builder; 5 | using Microsoft.Bot.Builder.AI.Luis; 6 | using Microsoft.Extensions.Configuration; 7 | using System.Threading; 8 | using System.Threading.Tasks; 9 | 10 | namespace EcommerceAdminBot 11 | { 12 | public class ToDoLUISRecognizer : IRecognizer 13 | { 14 | private readonly LuisRecognizer _recognizer; 15 | 16 | public ToDoLUISRecognizer(IConfiguration configuration) 17 | { 18 | var luisIsConfigured = !string.IsNullOrEmpty(configuration["LuisAppId"]) && !string.IsNullOrEmpty(configuration["LuisAPIKey"]) && !string.IsNullOrEmpty(configuration["LuisAPIHostName"]); 19 | if (luisIsConfigured) 20 | { 21 | var luisApplication = new LuisApplication( 22 | configuration["LuisAppId"], 23 | configuration["LuisAPIKey"], 24 | "https://" + configuration["LuisAPIHostName"]); 25 | // Set the recognizer options depending on which endpoint version you want to use. 26 | // More details can be found in https://docs.microsoft.com/en-gb/azure/cognitive-services/luis/luis-migration-api-v3 27 | var recognizerOptions = new LuisRecognizerOptionsV3(luisApplication) 28 | { 29 | PredictionOptions = new Microsoft.Bot.Builder.AI.LuisV3.LuisPredictionOptions 30 | { 31 | IncludeInstanceData = true, 32 | } 33 | }; 34 | 35 | _recognizer = new LuisRecognizer(recognizerOptions); 36 | } 37 | } 38 | 39 | // Returns true if luis is configured in the appsettings.json and initialized. 40 | public virtual bool IsConfigured => _recognizer != null; 41 | 42 | public virtual async Task RecognizeAsync(ITurnContext turnContext, CancellationToken cancellationToken) 43 | => await _recognizer.RecognizeAsync(turnContext, cancellationToken); 44 | 45 | public virtual async Task RecognizeAsync(ITurnContext turnContext, CancellationToken cancellationToken) 46 | where T : IRecognizerConvert, new() 47 | => await _recognizer.RecognizeAsync(turnContext, cancellationToken); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Utilities/CosmoDBClientToDo.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Azure.Cosmos; 2 | using Microsoft.Extensions.Configuration; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Net; 7 | using System.Threading.Tasks; 8 | 9 | namespace EcommerceAdminBot.Utilities 10 | { 11 | public class CosmoDBClientToDo 12 | { 13 | // The Cosmos client instance 14 | private CosmosClient cosmosClient; 15 | 16 | // The database we will create 17 | private Database database; 18 | 19 | // The container we will create. 20 | private Container container; 21 | 22 | public async Task GetStartedAsync(string EndpointUri, String PrimaryKey, string databaseId, string containerId, string partitionKey) 23 | { 24 | // Create a new instance of the Cosmos Client 25 | this.cosmosClient = new CosmosClient(EndpointUri, PrimaryKey, new CosmosClientOptions() { ApplicationName = "CosmosDBDotnetQuickstart" }); 26 | await this.CreateDatabaseAsync(databaseId); 27 | await this.CreateContainerAsync(containerId, partitionKey); 28 | //await this.ScaleContainerAsync(); 29 | //await this.AddItemsToContainerAsync(); 30 | //await this.QueryItemsAsync(); 31 | //await this.ReplaceFamilyItemAsync(); 32 | //await this.DeleteFamilyItemAsync(); 33 | //await this.DeleteDatabaseAndCleanupAsync(); 34 | } 35 | 36 | // 37 | /// 38 | /// Create the database if it does not exist 39 | /// 40 | private async Task CreateDatabaseAsync(string databaseId) 41 | { 42 | // Create a new database 43 | this.database = await this.cosmosClient.CreateDatabaseIfNotExistsAsync(databaseId); 44 | Console.WriteLine("Created Database: {0}\n", this.database.Id); 45 | } 46 | // 47 | 48 | 49 | // 50 | /// 51 | /// Create the container if it does not exist. 52 | /// 53 | /// 54 | private async Task CreateContainerAsync(string containerId, string partitionKey) 55 | { 56 | // Create a new container 57 | this.container = await this.database.CreateContainerIfNotExistsAsync(containerId, partitionKey, 400); 58 | Console.WriteLine("Created Container: {0}\n", this.container.Id); 59 | } 60 | // 61 | 62 | // 63 | /// 64 | /// Run a query (using Azure Cosmos DB SQL syntax) against the container 65 | /// 66 | public async Task CheckNewUserIdAsync(string userId, string EndpointUri, string PrimaryKey, string databaseId, string containerId, string partitionKey) 67 | { 68 | await GetStartedAsync(EndpointUri, PrimaryKey, databaseId, containerId, partitionKey); 69 | 70 | var sqlQueryText = $"SELECT c.id FROM c WHERE c.id = '{userId}'"; 71 | 72 | Console.WriteLine("Running query: {0}\n", sqlQueryText); 73 | 74 | QueryDefinition queryDefinition = new QueryDefinition(sqlQueryText); 75 | FeedIterator queryResultSetIterator = this.container.GetItemQueryIterator(queryDefinition); 76 | 77 | while (queryResultSetIterator.HasMoreResults) 78 | { 79 | FeedResponse currentResultSet = await queryResultSetIterator.ReadNextAsync(); 80 | if (currentResultSet.Count > 0) 81 | { 82 | return true; 83 | } 84 | else 85 | { 86 | return false; 87 | } 88 | } 89 | return false; 90 | 91 | } 92 | 93 | public async Task AddItemsToContainerAsync(string userId, string task, string Email) 94 | { 95 | ToDoTask todotask = new ToDoTask 96 | { 97 | Id = userId, 98 | Task = task, 99 | Email = Email 100 | }; 101 | 102 | try 103 | { 104 | // Read the item to see if it exists. 105 | ItemResponse todotaskResponse = await this.container.ReadItemAsync(todotask.Id, new PartitionKey(todotask.Task)); 106 | Console.WriteLine("Item in database with id: {0} already exists\n", todotaskResponse.Resource.Id); 107 | return -1; 108 | } 109 | catch (CosmosException ex) when (ex.StatusCode == HttpStatusCode.NotFound) 110 | { 111 | 112 | ItemResponse todotaskResponse = await this.container.CreateItemAsync(todotask, new PartitionKey(todotask.Task)); 113 | 114 | // Note that after creating the item, we can access the body of the item with the Resource property off the ItemResponse. We can also access the RequestCharge property to see the amount of RUs consumed on this request. 115 | Console.WriteLine("Created item in database with id: {0} Operation consumed {1} RUs.\n", todotaskResponse.Resource.Id, todotaskResponse.RequestCharge); 116 | 117 | return 1; 118 | } 119 | 120 | 121 | } 122 | // 123 | 124 | public async Task> QueryItemsAsync(string userId, string EndpointUri, string PrimaryKey, string databaseId, string containerId, string partitionKey) 125 | { 126 | await GetStartedAsync(EndpointUri, PrimaryKey, databaseId, containerId, partitionKey); 127 | 128 | var sqlQueryText = $"SELECT * FROM c WHERE c.id = '{userId}' ORDER BY c._ts DESC"; 129 | 130 | Console.WriteLine("Running query: {0}\n", sqlQueryText); 131 | 132 | QueryDefinition queryDefinition = new QueryDefinition(sqlQueryText); 133 | FeedIterator queryResultSetIterator = this.container.GetItemQueryIterator(queryDefinition); 134 | 135 | List todoTasks = new List(); 136 | 137 | while (queryResultSetIterator.HasMoreResults) 138 | { 139 | FeedResponse currentResultSet = await queryResultSetIterator.ReadNextAsync(); 140 | foreach (ToDoTask todoTask in currentResultSet) 141 | { 142 | todoTasks.Add(todoTask); 143 | Console.WriteLine("\tRead {0}\n", todoTask); 144 | } 145 | } 146 | return todoTasks; 147 | } 148 | 149 | public async Task> QueryItemsAsync(string userId) 150 | { 151 | var sqlQueryText = $"SELECT * FROM c WHERE c.id = '{userId}' ORDER BY c._ts ASC"; 152 | 153 | Console.WriteLine("Running query: {0}\n", sqlQueryText); 154 | 155 | QueryDefinition queryDefinition = new QueryDefinition(sqlQueryText); 156 | FeedIterator queryResultSetIterator = this.container.GetItemQueryIterator(queryDefinition); 157 | 158 | List todoTasks = new List(); 159 | 160 | while (queryResultSetIterator.HasMoreResults) 161 | { 162 | FeedResponse currentResultSet = await queryResultSetIterator.ReadNextAsync(); 163 | foreach (ToDoTask todoTask in currentResultSet) 164 | { 165 | todoTasks.Add(todoTask); 166 | Console.WriteLine("\tRead {0}\n", todoTask); 167 | } 168 | } 169 | return todoTasks; 170 | } 171 | 172 | public async Task DeleteTaskItemAsync(string partitionKey, string id) 173 | { 174 | var partitionKeyValue = partitionKey; 175 | var userId = id; 176 | 177 | try 178 | { 179 | // Delete an item. Note we must provide the partition key value and id of the item to delete 180 | ItemResponse todoTaskResponse = await this.container.DeleteItemAsync(userId, new PartitionKey(partitionKeyValue)); 181 | Console.WriteLine("Deleted ToDoTask [{0},{1}]\n", partitionKeyValue, userId); 182 | return true; 183 | } 184 | catch (Exception ex) 185 | { 186 | Console.WriteLine(ex.Message); 187 | return false; 188 | } 189 | 190 | } 191 | 192 | } 193 | } 194 | -------------------------------------------------------------------------------- /Utilities/Repository.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace EcommerceAdminBot.Utilities 7 | { 8 | public class Repository 9 | { 10 | private static Random random = new Random(); 11 | public static string RandomString(int length) 12 | { 13 | const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; 14 | return new string(Enumerable.Repeat(chars, length) 15 | .Select(s => s[random.Next(s.Length)]).ToArray()); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Utilities/ToDoTask.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace EcommerceAdminBot.Utilities 8 | { 9 | public class ToDoTask 10 | { 11 | [JsonProperty(PropertyName = "id")] 12 | 13 | public string Id { get; set; } 14 | public string Task { get; set; } 15 | public string Email { get; set; } 16 | 17 | public override string ToString() 18 | { 19 | return JsonConvert.SerializeObject(this); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Utilities/UserRepository.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Net.Http; 6 | using System.Net.Http.Headers; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | 10 | namespace EcommerceAdminBot.Utilities 11 | { 12 | public class UserRepository 13 | { 14 | public async Task SendEmailForCodeVerificationAsync(int verificationCode, string toAddress, string username, string uri) 15 | { 16 | try 17 | { 18 | HttpClient client = new HttpClient(); 19 | client.BaseAddress = new Uri(uri); 20 | client.DefaultRequestHeaders.Accept.Clear(); 21 | client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); 22 | 23 | HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Post, client.BaseAddress); 24 | var body = $"{{\"Email\": \"{toAddress}\",\"Subject\":\"[LG Merchandiser] Email Verification Code\",\"Username\":\"{username}\",\"OTP\":\"{verificationCode}\"}}"; 25 | var content = new StringContent(body, Encoding.UTF8, "application/json"); 26 | request.Content = content; 27 | var response = await MakeRequestAsync(request, client); 28 | var authenticationModel = JsonConvert.DeserializeObject(response); 29 | 30 | if (authenticationModel.status.Equals("success")) 31 | { 32 | return true; 33 | } 34 | else 35 | { 36 | 37 | return false; 38 | } 39 | } 40 | catch (Exception e) 41 | { 42 | 43 | Console.WriteLine(e.Message); 44 | throw new Exception(); 45 | } 46 | } 47 | public async Task SendEmailForlocationVerificationAsync(string storeName,string messagefromMerchandiser, string username, string location, string uri) 48 | { 49 | try 50 | { 51 | HttpClient client = new HttpClient(); 52 | client.BaseAddress = new Uri(uri); 53 | client.DefaultRequestHeaders.Accept.Clear(); 54 | client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); 55 | 56 | HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Post, client.BaseAddress); 57 | var body = $"{{\"StoreName\": \"{storeName}\",\"Message\":\"{messagefromMerchandiser}\",\"Username\":\"{username}\",\"Location\":\"{location}\"}}"; 58 | var content = new StringContent(body, Encoding.UTF8, "application/json"); 59 | request.Content = content; 60 | var response = await MakeRequestAsync(request, client); 61 | var authenticationModel = JsonConvert.DeserializeObject(response); 62 | 63 | if (authenticationModel.status.Equals("success")) 64 | { 65 | return true; 66 | } 67 | else 68 | { 69 | 70 | return false; 71 | } 72 | } 73 | catch (Exception e) 74 | { 75 | Console.WriteLine(e.Message); 76 | throw new Exception(); 77 | } 78 | } 79 | 80 | public async Task MakeRequestAsync(HttpRequestMessage getRequest, HttpClient client) 81 | { 82 | var response = await client.SendAsync(getRequest).ConfigureAwait(false); 83 | var responseString = string.Empty; 84 | try 85 | { 86 | response.EnsureSuccessStatusCode(); 87 | responseString = await response.Content.ReadAsStringAsync().ConfigureAwait(false); 88 | } 89 | catch (HttpRequestException) 90 | { 91 | // empty responseString 92 | } 93 | 94 | return responseString; 95 | } 96 | } 97 | 98 | public class AuthenticationModel 99 | { 100 | public string status { get; set; } 101 | public string message { get; set; } 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "PowerAutomatePOSTURL": "https://prod-116.westus.logic.azure.com:443/workflows/305b9e97def54143a1b8c10664f25784/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=Dcz7KHm_RbHM4kkkYRasoaW8MaTlsyGgODfT-Xdr7X8", 3 | "PowerAutomatePOSTURLAdmin": "https://prod-164.westus.logic.azure.com:443/workflows/16d0c6a8d16f40b99275e14ff6a0b54f/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=NjemChjqtnbUCgC_CY_peWLJuinZxAMBQcK5AXC8kPg", 4 | "CosmosEndPointURI": "https://merchandiserdata.documents.azure.com:443/", 5 | "CosmosPrimaryKey": "eQ1lk7pVpQk9GsP5WBtJjsqDHX7NLCHe1TkJP4iWxbk8blTq6l5twRgkya2Bz5uD5FLmcJUYT9DS3RMnPXipjw==", 6 | "CosmosDatabaseId": "DisplayProductDB", 7 | //LGMerchandiserData", 8 | "CosmosContainerID": "ProductDetails", 9 | "CosmosPartitionKey": "/ProductName", 10 | "MicrosoftAppId": "bf046c20-7bfc-4e9f-bbad-7ec7ed2d06f6", 11 | //"12d33919-5e1b-4214-9082-9ff8c5db76d6", 12 | "MicrosoftAppPassword": "u.h8Q~ADBJFk~t.PawyGiQxuMj5ymcy06bW1qcgZ", 13 | //"QMU8Q~DqG2uhcf4HHKg.fdubza5mJQyeztvOYan3", 14 | "LuisAppId": "39686553-99ab-4bc0-a1b6-814ab244a213", 15 | "LuisAPIKey": "36cf8921017f469684d33990dff8c398", 16 | "LuisAPIHostName": "westus.api.cognitive.microsoft.com/", 17 | //"CosmosEndPointURI": "https://localhost:8081", 18 | //"CosmosPrimaryKey": "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==", 19 | "CosmosDatabaseIdToDo": "ToDoBotDB", 20 | "CosmosContainerIdToDo": "ToDoTask", 21 | "CosmosPartitionKeyTodo": "/Task", 22 | "CosmosDatabaseIdMarketReport": "MarketDB", 23 | "CosmosContainerIdMarketReport": "MarketReport", 24 | "CosmosPartitionKeyMarketReport": "/TextMessage" 25 | 26 | } 27 | 28 | -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/AdaptiveCards.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/AdaptiveCards.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/AdaptiveExpressions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/AdaptiveExpressions.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Antlr4.Runtime.Standard.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Antlr4.Runtime.Standard.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Azure.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Azure.Core.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Cosmos.CRTCompat.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Cosmos.CRTCompat.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/DeploymentTemplates/new-rg-parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "groupLocation": { 6 | "value": "" 7 | }, 8 | "groupName": { 9 | "value": "" 10 | }, 11 | "appId": { 12 | "value": "" 13 | }, 14 | "appSecret": { 15 | "value": "" 16 | }, 17 | "botId": { 18 | "value": "" 19 | }, 20 | "botSku": { 21 | "value": "" 22 | }, 23 | "newAppServicePlanName": { 24 | "value": "" 25 | }, 26 | "newAppServicePlanSku": { 27 | "value": { 28 | "name": "S1", 29 | "tier": "Standard", 30 | "size": "S1", 31 | "family": "S", 32 | "capacity": 1 33 | } 34 | }, 35 | "newAppServicePlanLocation": { 36 | "value": "" 37 | }, 38 | "newWebAppName": { 39 | "value": "" 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/DeploymentTemplates/preexisting-rg-parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "appId": { 6 | "value": "" 7 | }, 8 | "appSecret": { 9 | "value": "" 10 | }, 11 | "botId": { 12 | "value": "" 13 | }, 14 | "botSku": { 15 | "value": "" 16 | }, 17 | "newAppServicePlanName": { 18 | "value": "" 19 | }, 20 | "newAppServicePlanSku": { 21 | "value": { 22 | "name": "S1", 23 | "tier": "Standard", 24 | "size": "S1", 25 | "family": "S", 26 | "capacity": 1 27 | } 28 | }, 29 | "appServicePlanLocation": { 30 | "value": "" 31 | }, 32 | "existingAppServicePlan": { 33 | "value": "" 34 | }, 35 | "newWebAppName": { 36 | "value": "" 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/DeploymentTemplates/template-with-new-rg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "groupLocation": { 6 | "type": "string", 7 | "metadata": { 8 | "description": "Specifies the location of the Resource Group." 9 | } 10 | }, 11 | "groupName": { 12 | "type": "string", 13 | "metadata": { 14 | "description": "Specifies the name of the Resource Group." 15 | } 16 | }, 17 | "appId": { 18 | "type": "string", 19 | "metadata": { 20 | "description": "Active Directory App ID, set as MicrosoftAppId in the Web App's Application Settings." 21 | } 22 | }, 23 | "appSecret": { 24 | "type": "string", 25 | "metadata": { 26 | "description": "Active Directory App Password, set as MicrosoftAppPassword in the Web App's Application Settings." 27 | } 28 | }, 29 | "botId": { 30 | "type": "string", 31 | "metadata": { 32 | "description": "The globally unique and immutable bot ID. Also used to configure the displayName of the bot, which is mutable." 33 | } 34 | }, 35 | "botSku": { 36 | "type": "string", 37 | "metadata": { 38 | "description": "The pricing tier of the Bot Service Registration. Acceptable values are F0 and S1." 39 | } 40 | }, 41 | "newAppServicePlanName": { 42 | "type": "string", 43 | "metadata": { 44 | "description": "The name of the App Service Plan." 45 | } 46 | }, 47 | "newAppServicePlanSku": { 48 | "type": "object", 49 | "defaultValue": { 50 | "name": "S1", 51 | "tier": "Standard", 52 | "size": "S1", 53 | "family": "S", 54 | "capacity": 1 55 | }, 56 | "metadata": { 57 | "description": "The SKU of the App Service Plan. Defaults to Standard values." 58 | } 59 | }, 60 | "newAppServicePlanLocation": { 61 | "type": "string", 62 | "metadata": { 63 | "description": "The location of the App Service Plan. Defaults to \"westus\"." 64 | } 65 | }, 66 | "newWebAppName": { 67 | "type": "string", 68 | "defaultValue": "", 69 | "metadata": { 70 | "description": "The globally unique name of the Web App. Defaults to the value passed in for \"botId\"." 71 | } 72 | } 73 | }, 74 | "variables": { 75 | "appServicePlanName": "[parameters('newAppServicePlanName')]", 76 | "resourcesLocation": "[parameters('newAppServicePlanLocation')]", 77 | "webAppName": "[if(empty(parameters('newWebAppName')), parameters('botId'), parameters('newWebAppName'))]", 78 | "siteHost": "[concat(variables('webAppName'), '.azurewebsites.net')]", 79 | "botEndpoint": "[concat('https://', variables('siteHost'), '/api/messages')]", 80 | "resourceGroupId": "[concat(subscription().id, '/resourceGroups/', parameters('groupName'))]" 81 | }, 82 | "resources": [ 83 | { 84 | "name": "[parameters('groupName')]", 85 | "type": "Microsoft.Resources/resourceGroups", 86 | "apiVersion": "2018-05-01", 87 | "location": "[parameters('groupLocation')]", 88 | "properties": {} 89 | }, 90 | { 91 | "type": "Microsoft.Resources/deployments", 92 | "apiVersion": "2018-05-01", 93 | "name": "storageDeployment", 94 | "resourceGroup": "[parameters('groupName')]", 95 | "dependsOn": [ 96 | "[resourceId('Microsoft.Resources/resourceGroups/', parameters('groupName'))]" 97 | ], 98 | "properties": { 99 | "mode": "Incremental", 100 | "template": { 101 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", 102 | "contentVersion": "1.0.0.0", 103 | "parameters": {}, 104 | "variables": {}, 105 | "resources": [ 106 | { 107 | "comments": "Create a new App Service Plan", 108 | "type": "Microsoft.Web/serverfarms", 109 | "name": "[variables('appServicePlanName')]", 110 | "apiVersion": "2018-02-01", 111 | "location": "[variables('resourcesLocation')]", 112 | "sku": "[parameters('newAppServicePlanSku')]", 113 | "properties": { 114 | "name": "[variables('appServicePlanName')]" 115 | } 116 | }, 117 | { 118 | "comments": "Create a Web App using the new App Service Plan", 119 | "type": "Microsoft.Web/sites", 120 | "apiVersion": "2015-08-01", 121 | "location": "[variables('resourcesLocation')]", 122 | "kind": "app", 123 | "dependsOn": [ 124 | "[concat(variables('resourceGroupId'), '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]" 125 | ], 126 | "name": "[variables('webAppName')]", 127 | "properties": { 128 | "name": "[variables('webAppName')]", 129 | "serverFarmId": "[variables('appServicePlanName')]", 130 | "siteConfig": { 131 | "appSettings": [ 132 | { 133 | "name": "WEBSITE_NODE_DEFAULT_VERSION", 134 | "value": "10.14.1" 135 | }, 136 | { 137 | "name": "MicrosoftAppId", 138 | "value": "[parameters('appId')]" 139 | }, 140 | { 141 | "name": "MicrosoftAppPassword", 142 | "value": "[parameters('appSecret')]" 143 | } 144 | ], 145 | "cors": { 146 | "allowedOrigins": [ 147 | "https://botservice.hosting.portal.azure.net", 148 | "https://hosting.onecloud.azure-test.net/" 149 | ] 150 | }, 151 | "webSocketsEnabled": true 152 | } 153 | } 154 | }, 155 | { 156 | "apiVersion": "2017-12-01", 157 | "type": "Microsoft.BotService/botServices", 158 | "name": "[parameters('botId')]", 159 | "location": "global", 160 | "kind": "bot", 161 | "sku": { 162 | "name": "[parameters('botSku')]" 163 | }, 164 | "properties": { 165 | "name": "[parameters('botId')]", 166 | "displayName": "[parameters('botId')]", 167 | "endpoint": "[variables('botEndpoint')]", 168 | "msaAppId": "[parameters('appId')]", 169 | "developerAppInsightsApplicationId": null, 170 | "developerAppInsightKey": null, 171 | "publishingCredentials": null, 172 | "storageResourceId": null 173 | }, 174 | "dependsOn": [ 175 | "[concat(variables('resourceGroupId'), '/providers/Microsoft.Web/sites/', variables('webAppName'))]" 176 | ] 177 | } 178 | ], 179 | "outputs": {} 180 | } 181 | } 182 | } 183 | ] 184 | } -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/DeploymentTemplates/template-with-preexisting-rg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "appId": { 6 | "type": "string", 7 | "metadata": { 8 | "description": "Active Directory App ID, set as MicrosoftAppId in the Web App's Application Settings." 9 | } 10 | }, 11 | "appSecret": { 12 | "type": "string", 13 | "metadata": { 14 | "description": "Active Directory App Password, set as MicrosoftAppPassword in the Web App's Application Settings. Defaults to \"\"." 15 | } 16 | }, 17 | "botId": { 18 | "type": "string", 19 | "metadata": { 20 | "description": "The globally unique and immutable bot ID. Also used to configure the displayName of the bot, which is mutable." 21 | } 22 | }, 23 | "botSku": { 24 | "defaultValue": "F0", 25 | "type": "string", 26 | "metadata": { 27 | "description": "The pricing tier of the Bot Service Registration. Acceptable values are F0 and S1." 28 | } 29 | }, 30 | "newAppServicePlanName": { 31 | "type": "string", 32 | "defaultValue": "", 33 | "metadata": { 34 | "description": "The name of the new App Service Plan." 35 | } 36 | }, 37 | "newAppServicePlanSku": { 38 | "type": "object", 39 | "defaultValue": { 40 | "name": "S1", 41 | "tier": "Standard", 42 | "size": "S1", 43 | "family": "S", 44 | "capacity": 1 45 | }, 46 | "metadata": { 47 | "description": "The SKU of the App Service Plan. Defaults to Standard values." 48 | } 49 | }, 50 | "appServicePlanLocation": { 51 | "type": "string", 52 | "metadata": { 53 | "description": "The location of the App Service Plan." 54 | } 55 | }, 56 | "existingAppServicePlan": { 57 | "type": "string", 58 | "defaultValue": "", 59 | "metadata": { 60 | "description": "Name of the existing App Service Plan used to create the Web App for the bot." 61 | } 62 | }, 63 | "newWebAppName": { 64 | "type": "string", 65 | "defaultValue": "", 66 | "metadata": { 67 | "description": "The globally unique name of the Web App. Defaults to the value passed in for \"botId\"." 68 | } 69 | } 70 | }, 71 | "variables": { 72 | "defaultAppServicePlanName": "[if(empty(parameters('existingAppServicePlan')), 'createNewAppServicePlan', parameters('existingAppServicePlan'))]", 73 | "useExistingAppServicePlan": "[not(equals(variables('defaultAppServicePlanName'), 'createNewAppServicePlan'))]", 74 | "servicePlanName": "[if(variables('useExistingAppServicePlan'), parameters('existingAppServicePlan'), parameters('newAppServicePlanName'))]", 75 | "resourcesLocation": "[parameters('appServicePlanLocation')]", 76 | "webAppName": "[if(empty(parameters('newWebAppName')), parameters('botId'), parameters('newWebAppName'))]", 77 | "siteHost": "[concat(variables('webAppName'), '.azurewebsites.net')]", 78 | "botEndpoint": "[concat('https://', variables('siteHost'), '/api/messages')]" 79 | }, 80 | "resources": [ 81 | { 82 | "comments": "Create a new App Service Plan if no existing App Service Plan name was passed in.", 83 | "type": "Microsoft.Web/serverfarms", 84 | "condition": "[not(variables('useExistingAppServicePlan'))]", 85 | "name": "[variables('servicePlanName')]", 86 | "apiVersion": "2018-02-01", 87 | "location": "[variables('resourcesLocation')]", 88 | "sku": "[parameters('newAppServicePlanSku')]", 89 | "properties": { 90 | "name": "[variables('servicePlanName')]" 91 | } 92 | }, 93 | { 94 | "comments": "Create a Web App using an App Service Plan", 95 | "type": "Microsoft.Web/sites", 96 | "apiVersion": "2015-08-01", 97 | "location": "[variables('resourcesLocation')]", 98 | "kind": "app", 99 | "dependsOn": [ 100 | "[resourceId('Microsoft.Web/serverfarms', variables('servicePlanName'))]" 101 | ], 102 | "name": "[variables('webAppName')]", 103 | "properties": { 104 | "name": "[variables('webAppName')]", 105 | "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('servicePlanName'))]", 106 | "siteConfig": { 107 | "appSettings": [ 108 | { 109 | "name": "WEBSITE_NODE_DEFAULT_VERSION", 110 | "value": "10.14.1" 111 | }, 112 | { 113 | "name": "MicrosoftAppId", 114 | "value": "[parameters('appId')]" 115 | }, 116 | { 117 | "name": "MicrosoftAppPassword", 118 | "value": "[parameters('appSecret')]" 119 | } 120 | ], 121 | "cors": { 122 | "allowedOrigins": [ 123 | "https://botservice.hosting.portal.azure.net", 124 | "https://hosting.onecloud.azure-test.net/" 125 | ] 126 | }, 127 | "webSocketsEnabled": true 128 | } 129 | } 130 | }, 131 | { 132 | "apiVersion": "2017-12-01", 133 | "type": "Microsoft.BotService/botServices", 134 | "name": "[parameters('botId')]", 135 | "location": "global", 136 | "kind": "bot", 137 | "sku": { 138 | "name": "[parameters('botSku')]" 139 | }, 140 | "properties": { 141 | "name": "[parameters('botId')]", 142 | "displayName": "[parameters('botId')]", 143 | "endpoint": "[variables('botEndpoint')]", 144 | "msaAppId": "[parameters('appId')]", 145 | "developerAppInsightsApplicationId": null, 146 | "developerAppInsightKey": null, 147 | "publishingCredentials": null, 148 | "storageResourceId": null 149 | }, 150 | "dependsOn": [ 151 | "[resourceId('Microsoft.Web/sites/', variables('webAppName'))]" 152 | ] 153 | } 154 | ] 155 | } -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/EcommerceAdminBot.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/EcommerceAdminBot.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/EcommerceAdminBot.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/EcommerceAdminBot.exe -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/EcommerceAdminBot.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/EcommerceAdminBot.pdb -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/EcommerceAdminBot.runtimeconfig.dev.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "additionalProbingPaths": [ 4 | "C:\\Users\\mayan\\.dotnet\\store\\|arch|\\|tfm|", 5 | "C:\\Users\\mayan\\.nuget\\packages", 6 | "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages", 7 | "C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet" 8 | ] 9 | } 10 | } -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/EcommerceAdminBot.runtimeconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "tfm": "netcoreapp3.1", 4 | "framework": { 5 | "name": "Microsoft.AspNetCore.App", 6 | "version": "3.1.0" 7 | }, 8 | "configProperties": { 9 | "System.GC.Server": true, 10 | "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.AspNetCore.JsonPatch.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.AspNetCore.JsonPatch.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.AspNetCore.Mvc.NewtonsoftJson.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.AspNetCore.Mvc.NewtonsoftJson.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.Azure.CognitiveServices.Language.LUIS.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.Azure.CognitiveServices.Language.LUIS.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.Azure.Cosmos.Client.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.Azure.Cosmos.Client.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.Azure.Cosmos.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.Azure.Cosmos.Core.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.Azure.Cosmos.Direct.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.Azure.Cosmos.Direct.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.Azure.Cosmos.Serialization.HybridRow.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.Azure.Cosmos.Serialization.HybridRow.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.Azure.Cosmos.ServiceInterop.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.Azure.Cosmos.ServiceInterop.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.Bcl.AsyncInterfaces.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.Bcl.AsyncInterfaces.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.Bcl.HashCode.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.Bcl.HashCode.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.Bot.Builder.AI.Luis.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.Bot.Builder.AI.Luis.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.Bot.Builder.Dialogs.Declarative.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.Bot.Builder.Dialogs.Declarative.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.Bot.Builder.Dialogs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.Bot.Builder.Dialogs.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.Bot.Builder.Integration.AspNet.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.Bot.Builder.Integration.AspNet.Core.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.Bot.Builder.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.Bot.Builder.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.Bot.Configuration.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.Bot.Configuration.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.Bot.Connector.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.Bot.Connector.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.Bot.Schema.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.Bot.Schema.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.Bot.Streaming.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.Bot.Streaming.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.IdentityModel.Clients.ActiveDirectory.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.IdentityModel.Clients.ActiveDirectory.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.IdentityModel.JsonWebTokens.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.IdentityModel.JsonWebTokens.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.IdentityModel.Logging.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.IdentityModel.Logging.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.IdentityModel.Protocols.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.IdentityModel.Protocols.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.IdentityModel.Tokens.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.IdentityModel.Tokens.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.Recognizers.Definitions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.Recognizers.Definitions.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.Recognizers.Text.Choice.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.Recognizers.Text.Choice.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.Recognizers.Text.DataTypes.TimexExpression.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.Recognizers.Text.DataTypes.TimexExpression.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.Recognizers.Text.DateTime.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.Recognizers.Text.DateTime.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.Recognizers.Text.Number.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.Recognizers.Text.Number.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.Recognizers.Text.NumberWithUnit.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.Recognizers.Text.NumberWithUnit.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.Recognizers.Text.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.Recognizers.Text.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.Rest.ClientRuntime.Azure.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.Rest.ClientRuntime.Azure.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Microsoft.Rest.ClientRuntime.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Microsoft.Rest.ClientRuntime.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Newtonsoft.Json.Bson.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Newtonsoft.Json.Bson.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/NuGet.Common.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/NuGet.Common.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/NuGet.Configuration.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/NuGet.Configuration.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/NuGet.Frameworks.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/NuGet.Frameworks.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/NuGet.Packaging.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/NuGet.Packaging.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/NuGet.Versioning.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/NuGet.Versioning.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/System.Configuration.ConfigurationManager.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/System.Configuration.ConfigurationManager.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/System.IdentityModel.Tokens.Jwt.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/System.IdentityModel.Tokens.Jwt.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/System.Security.Cryptography.ProtectedData.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/System.Security.Cryptography.ProtectedData.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "PowerAutomatePOSTURL": "https://prod-116.westus.logic.azure.com:443/workflows/305b9e97def54143a1b8c10664f25784/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=Dcz7KHm_RbHM4kkkYRasoaW8MaTlsyGgODfT-Xdr7X8", 3 | "PowerAutomatePOSTURLAdmin": "https://prod-164.westus.logic.azure.com:443/workflows/16d0c6a8d16f40b99275e14ff6a0b54f/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=NjemChjqtnbUCgC_CY_peWLJuinZxAMBQcK5AXC8kPg", 4 | "CosmosEndPointURI": "https://merchandiserdata.documents.azure.com:443/", 5 | "CosmosPrimaryKey": "eQ1lk7pVpQk9GsP5WBtJjsqDHX7NLCHe1TkJP4iWxbk8blTq6l5twRgkya2Bz5uD5FLmcJUYT9DS3RMnPXipjw==", 6 | "CosmosDatabaseId": "DisplayProductDB", 7 | //LGMerchandiserData", 8 | "CosmosContainerID": "ProductDetails", 9 | "CosmosPartitionKey": "/ProductName", 10 | "MicrosoftAppId": "", 11 | //"bf046c20-7bfc-4e9f-bbad-7ec7ed2d06f6", 12 | //"12d33919-5e1b-4214-9082-9ff8c5db76d6", 13 | "MicrosoftAppPassword": "", 14 | //"u.h8Q~ADBJFk~t.PawyGiQxuMj5ymcy06bW1qcgZ", 15 | //"QMU8Q~DqG2uhcf4HHKg.fdubza5mJQyeztvOYan3", 16 | "LuisAppId": "39686553-99ab-4bc0-a1b6-814ab244a213", 17 | "LuisAPIKey": "36cf8921017f469684d33990dff8c398", 18 | "LuisAPIHostName": "westus.api.cognitive.microsoft.com/", 19 | //"CosmosEndPointURI": "https://localhost:8081", 20 | //"CosmosPrimaryKey": "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==", 21 | "CosmosDatabaseIdToDo": "ToDoBotDB", 22 | "CosmosContainerIdToDo": "ToDoTask", 23 | "CosmosPartitionKeyTodo": "/Task", 24 | "CosmosDatabaseIdMarketReport": "MarketDB", 25 | "CosmosContainerIdMarketReport": "MarketReport", 26 | "CosmosPartitionKeyMarketReport": "/TextMessage" 27 | 28 | } 29 | 30 | -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/runtimes/win-x64/native/Cosmos.CRTCompat.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/runtimes/win-x64/native/Cosmos.CRTCompat.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/runtimes/win-x64/native/Microsoft.Azure.Cosmos.ServiceInterop.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/runtimes/win-x64/native/Microsoft.Azure.Cosmos.ServiceInterop.dll -------------------------------------------------------------------------------- /bin/Debug/netcoreapp3.1/runtimes/win/lib/netstandard2.0/System.Security.Cryptography.ProtectedData.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/bin/Debug/netcoreapp3.1/runtimes/win/lib/netstandard2.0/System.Security.Cryptography.ProtectedData.dll -------------------------------------------------------------------------------- /obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v3.1", FrameworkDisplayName = "")] 5 | -------------------------------------------------------------------------------- /obj/Debug/netcoreapp3.1/EcommerceAdminBot.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | using System; 12 | using System.Reflection; 13 | 14 | [assembly: System.Reflection.AssemblyCompanyAttribute("EcommerceAdminBot")] 15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] 16 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] 17 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] 18 | [assembly: System.Reflection.AssemblyProductAttribute("EcommerceAdminBot")] 19 | [assembly: System.Reflection.AssemblyTitleAttribute("EcommerceAdminBot")] 20 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] 21 | 22 | // Generated by the MSBuild WriteCodeFragment class. 23 | 24 | -------------------------------------------------------------------------------- /obj/Debug/netcoreapp3.1/EcommerceAdminBot.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | dc152977a31f34cdc60d5eb3d0a39651d619354f 2 | -------------------------------------------------------------------------------- /obj/Debug/netcoreapp3.1/EcommerceAdminBot.GeneratedMSBuildEditorConfig.editorconfig: -------------------------------------------------------------------------------- 1 | is_global = true 2 | build_property.RootNamespace = EcommerceAdminBot 3 | build_property.ProjectDir = C:\Users\mayan\OneDrive\Desktop\EcommerceAdminBot-master\ 4 | -------------------------------------------------------------------------------- /obj/Debug/netcoreapp3.1/EcommerceAdminBot.MvcApplicationPartsAssemblyInfo.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/obj/Debug/netcoreapp3.1/EcommerceAdminBot.MvcApplicationPartsAssemblyInfo.cache -------------------------------------------------------------------------------- /obj/Debug/netcoreapp3.1/EcommerceAdminBot.MvcApplicationPartsAssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | using System; 12 | using System.Reflection; 13 | 14 | [assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute("Microsoft.Bot.Builder.Integration.AspNet.Core")] 15 | 16 | // Generated by the MSBuild WriteCodeFragment class. 17 | 18 | -------------------------------------------------------------------------------- /obj/Debug/netcoreapp3.1/EcommerceAdminBot.RazorTargetAssemblyInfo.cache: -------------------------------------------------------------------------------- 1 | 30d9d82613444ba816a2905107283f00a4d4148b 2 | -------------------------------------------------------------------------------- /obj/Debug/netcoreapp3.1/EcommerceAdminBot.assets.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/obj/Debug/netcoreapp3.1/EcommerceAdminBot.assets.cache -------------------------------------------------------------------------------- /obj/Debug/netcoreapp3.1/EcommerceAdminBot.csproj.AssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/obj/Debug/netcoreapp3.1/EcommerceAdminBot.csproj.AssemblyReference.cache -------------------------------------------------------------------------------- /obj/Debug/netcoreapp3.1/EcommerceAdminBot.csproj.CopyComplete: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/obj/Debug/netcoreapp3.1/EcommerceAdminBot.csproj.CopyComplete -------------------------------------------------------------------------------- /obj/Debug/netcoreapp3.1/EcommerceAdminBot.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | d76a9150de59d8f753b266cb3ca985ab57b8b2dd 2 | -------------------------------------------------------------------------------- /obj/Debug/netcoreapp3.1/EcommerceAdminBot.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/obj/Debug/netcoreapp3.1/EcommerceAdminBot.dll -------------------------------------------------------------------------------- /obj/Debug/netcoreapp3.1/EcommerceAdminBot.genruntimeconfig.cache: -------------------------------------------------------------------------------- 1 | 8dd35bb28cc1c5798b8503eb920cba4adc7e36c6 2 | -------------------------------------------------------------------------------- /obj/Debug/netcoreapp3.1/EcommerceAdminBot.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/obj/Debug/netcoreapp3.1/EcommerceAdminBot.pdb -------------------------------------------------------------------------------- /obj/Debug/netcoreapp3.1/apphost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/obj/Debug/netcoreapp3.1/apphost.exe -------------------------------------------------------------------------------- /obj/Debug/netcoreapp3.1/staticwebassets/EcommerceAdminBot.StaticWebAssets.Manifest.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mayank-cse/EcommerceMerchandizerBot/18f40c516171d0ebb4d07445246a073b73c2cb94/obj/Debug/netcoreapp3.1/staticwebassets/EcommerceAdminBot.StaticWebAssets.Manifest.cache -------------------------------------------------------------------------------- /obj/Debug/netcoreapp3.1/staticwebassets/EcommerceAdminBot.StaticWebAssets.xml: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /obj/EcommerceAdminBot.csproj.nuget.dgspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "format": 1, 3 | "restore": { 4 | "C:\\Users\\mayan\\OneDrive\\Desktop\\EcommerceAdminBot-master\\EcommerceAdminBot.csproj": {} 5 | }, 6 | "projects": { 7 | "C:\\Users\\mayan\\OneDrive\\Desktop\\EcommerceAdminBot-master\\EcommerceAdminBot.csproj": { 8 | "version": "1.0.0", 9 | "restore": { 10 | "projectUniqueName": "C:\\Users\\mayan\\OneDrive\\Desktop\\EcommerceAdminBot-master\\EcommerceAdminBot.csproj", 11 | "projectName": "EcommerceAdminBot", 12 | "projectPath": "C:\\Users\\mayan\\OneDrive\\Desktop\\EcommerceAdminBot-master\\EcommerceAdminBot.csproj", 13 | "packagesPath": "C:\\Users\\mayan\\.nuget\\packages\\", 14 | "outputPath": "C:\\Users\\mayan\\OneDrive\\Desktop\\EcommerceAdminBot-master\\obj\\", 15 | "projectStyle": "PackageReference", 16 | "fallbackFolders": [ 17 | "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages", 18 | "C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\" 19 | ], 20 | "configFilePaths": [ 21 | "C:\\Users\\mayan\\AppData\\Roaming\\NuGet\\NuGet.Config", 22 | "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", 23 | "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config", 24 | "C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config" 25 | ], 26 | "originalTargetFrameworks": [ 27 | "netcoreapp3.1" 28 | ], 29 | "sources": { 30 | "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, 31 | "https://api.nuget.org/v3/index.json": {} 32 | }, 33 | "frameworks": { 34 | "netcoreapp3.1": { 35 | "targetAlias": "netcoreapp3.1", 36 | "projectReferences": {} 37 | } 38 | }, 39 | "warningProperties": { 40 | "warnAsError": [ 41 | "NU1605" 42 | ] 43 | } 44 | }, 45 | "frameworks": { 46 | "netcoreapp3.1": { 47 | "targetAlias": "netcoreapp3.1", 48 | "dependencies": { 49 | "AdaptiveCards": { 50 | "target": "Package", 51 | "version": "[2.7.1, )" 52 | }, 53 | "Microsoft.AspNetCore.Mvc.NewtonsoftJson": { 54 | "target": "Package", 55 | "version": "[3.1.1, )" 56 | }, 57 | "Microsoft.Azure.Cosmos": { 58 | "target": "Package", 59 | "version": "[3.18.0, )" 60 | }, 61 | "Microsoft.Bot.Builder": { 62 | "target": "Package", 63 | "version": "[4.16.1, )" 64 | }, 65 | "Microsoft.Bot.Builder.AI.Luis": { 66 | "target": "Package", 67 | "version": "[4.13.1, )" 68 | }, 69 | "Microsoft.Bot.Builder.Dialogs": { 70 | "target": "Package", 71 | "version": "[4.13.1, )" 72 | }, 73 | "Microsoft.Bot.Builder.Integration.AspNet.Core": { 74 | "target": "Package", 75 | "version": "[4.13.1, )" 76 | }, 77 | "Microsoft.Bot.Builder.Location": { 78 | "target": "Package", 79 | "version": "[2.1.0, )" 80 | }, 81 | "Microsoft.Recognizers.Text.DataTypes.TimexExpression": { 82 | "target": "Package", 83 | "version": "[1.4.0, )" 84 | }, 85 | "Ngrok.AspNetCore": { 86 | "target": "Package", 87 | "version": "[1.0.6, )" 88 | }, 89 | "System.Threading.Tasks": { 90 | "target": "Package", 91 | "version": "[4.3.0, )" 92 | } 93 | }, 94 | "imports": [ 95 | "net461", 96 | "net462", 97 | "net47", 98 | "net471", 99 | "net472", 100 | "net48" 101 | ], 102 | "assetTargetFallback": true, 103 | "warn": true, 104 | "frameworkReferences": { 105 | "Microsoft.AspNetCore.App": { 106 | "privateAssets": "none" 107 | }, 108 | "Microsoft.NETCore.App": { 109 | "privateAssets": "all" 110 | } 111 | }, 112 | "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.408\\RuntimeIdentifierGraph.json" 113 | } 114 | } 115 | } 116 | } 117 | } -------------------------------------------------------------------------------- /obj/EcommerceAdminBot.csproj.nuget.g.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | True 5 | NuGet 6 | $(MSBuildThisFileDirectory)project.assets.json 7 | $(UserProfile)\.nuget\packages\ 8 | C:\Users\mayan\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages;C:\Program Files (x86)\Microsoft\Xamarin\NuGet\ 9 | PackageReference 10 | 5.11.1 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 19 | 20 | 21 | 22 | Microsoft.Azure.Cosmos 23 | 3.18.0 24 | Content 25 | false 26 | False 27 | ThirdPartyNotice.txt 28 | 29 | 30 | -------------------------------------------------------------------------------- /obj/EcommerceAdminBot.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | 6 | 7 | 8 | 9 | --------------------------------------------------------------------------------