diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/AdapterWithErrorHandler.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/AdapterWithErrorHandler.cs deleted file mode 100644 index 091f3062ab..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/AdapterWithErrorHandler.cs +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Integration.AspNet.Core; -using Microsoft.Bot.Builder.Integration.AspNet.Core.Skills; -using Microsoft.Bot.Builder.Skills; -using Microsoft.Bot.Builder.TraceExtensions; -using Microsoft.Bot.Connector.Authentication; -using Microsoft.Bot.Schema; -using Microsoft.BotFrameworkFunctionalTests.SimpleHostBot21.Bots; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Logging; - -namespace Microsoft.BotFrameworkFunctionalTests.SimpleHostBot21 -{ - public class AdapterWithErrorHandler : BotFrameworkHttpAdapter - { - private readonly ConversationState _conversationState; - private readonly IConfiguration _configuration; - private readonly ILogger _logger; - private readonly SkillHttpClient _skillClient; - private readonly SkillsConfiguration _skillsConfig; - - /// - /// Initializes a new instance of the class to handle errors. - /// - /// The configuration properties. - /// An instance of a logger. - /// A state management object for the conversation. - /// The HTTP client for the skills. - /// The skills configuration. - public AdapterWithErrorHandler(IConfiguration configuration, ILogger logger, ConversationState conversationState = null, SkillHttpClient skillClient = null, SkillsConfiguration skillsConfig = null) - : base(configuration, logger) - { - _configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); - _conversationState = conversationState; - _logger = logger ?? throw new ArgumentNullException(nameof(logger)); - _skillClient = skillClient; - _skillsConfig = skillsConfig; - - OnTurnError = HandleTurnErrorAsync; - } - - /// - /// Handles the error by sending a message to the user and ending the conversation with the skill. - /// - /// Context for the current turn of conversation. - /// The handled exception. - /// A representing the result of the asynchronous operation. - private async Task HandleTurnErrorAsync(ITurnContext turnContext, Exception exception) - { - // Log any leaked exception from the application. - _logger.LogError(exception, $"[OnTurnError] unhandled error : {exception.Message}"); - - await SendErrorMessageAsync(turnContext, exception, default); - await EndSkillConversationAsync(turnContext, default); - await ClearConversationStateAsync(turnContext, default); - } - - /// - /// Sends an error message to the user and a trace activity to be displayed in the Bot Framework Emulator. - /// - /// Context for the current turn of conversation. - /// The exception to be sent in the message. - /// CancellationToken propagates notifications that operations should be cancelled. - /// A representing the result of the asynchronous operation. - private async Task SendErrorMessageAsync(ITurnContext turnContext, Exception exception, CancellationToken cancellationToken) - { - try - { - // Send a message to the user - var errorMessageText = "The bot encountered an error or bug."; - var errorMessage = MessageFactory.Text(errorMessageText, errorMessageText, InputHints.IgnoringInput); - errorMessage.Value = exception; - await turnContext.SendActivityAsync(errorMessage, cancellationToken); - - await turnContext.SendActivityAsync($"Exception: {exception.Message}"); - await turnContext.SendActivityAsync(exception.ToString()); - - errorMessageText = "To continue to run this bot, please fix the bot source code."; - errorMessage = MessageFactory.Text(errorMessageText, errorMessageText, InputHints.ExpectingInput); - await turnContext.SendActivityAsync(errorMessage, cancellationToken); - - // Send a trace activity, which will be displayed in the Bot Framework Emulator - await turnContext.TraceActivityAsync("OnTurnError Trace", exception.ToString(), "https://www.botframework.com/schemas/error", "TurnError", cancellationToken); - } - catch (Exception ex) - { - _logger.LogError(ex, $"Exception caught in SendErrorMessageAsync : {ex}"); - } - } - - /// - /// Informs to the active skill that the conversation is ended so that it has a chance to clean up. - /// - /// Context for the current turn of conversation. - /// CancellationToken propagates notifications that operations should be cancelled. - /// A representing the result of the asynchronous operation. - private async Task EndSkillConversationAsync(ITurnContext turnContext, CancellationToken cancellationToken) - { - if (_conversationState == null || _skillClient == null || _skillsConfig == null) - { - return; - } - - try - { - // Note: ActiveSkillPropertyName is set by the HostBot while messages are being - // forwarded to a Skill. - var activeSkill = await _conversationState.CreateProperty(HostBot.ActiveSkillPropertyName).GetAsync(turnContext, () => null, cancellationToken); - if (activeSkill != null) - { - var botId = _configuration.GetSection(MicrosoftAppCredentials.MicrosoftAppIdKey)?.Value; - - var endOfConversation = Activity.CreateEndOfConversationActivity(); - endOfConversation.Code = "HostSkillError"; - endOfConversation.ApplyConversationReference(turnContext.Activity.GetConversationReference(), true); - - await _conversationState.SaveChangesAsync(turnContext, true, cancellationToken); - await _skillClient.PostActivityAsync(botId, activeSkill, _skillsConfig.SkillHostEndpoint, (Activity)endOfConversation, cancellationToken); - } - } - catch (Exception ex) - { - _logger.LogError(ex, $"Exception caught on attempting to send EndOfConversation : {ex}"); - } - } - - /// - /// Deletes the conversationState for the current conversation to prevent the bot from getting stuck in an error-loop caused by being in a bad state. - /// ConversationState should be thought of as similar to "cookie-state" in a Web pages. - /// - /// Context for the current turn of conversation. - /// CancellationToken propagates notifications that operations should be cancelled. - /// A representing the result of the asynchronous operation. - private async Task ClearConversationStateAsync(ITurnContext turnContext, CancellationToken cancellationToken) - { - if (_conversationState != null) - { - try - { - await _conversationState.DeleteAsync(turnContext, cancellationToken); - } - catch (Exception ex) - { - _logger.LogError(ex, $"Exception caught on attempting to Delete ConversationState : {ex}"); - } - } - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/Authentication/AllowedSkillsClaimsValidator.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/Authentication/AllowedSkillsClaimsValidator.cs deleted file mode 100644 index 31ec04cb31..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/Authentication/AllowedSkillsClaimsValidator.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Security.Claims; -using System.Threading.Tasks; -using Microsoft.Bot.Connector.Authentication; - -namespace Microsoft.BotFrameworkFunctionalTests.SimpleHostBot21.Authentication -{ - /// - /// Sample claims validator that loads an allowed list from configuration if present - /// and checks that responses are coming from configured skills. - /// - public class AllowedSkillsClaimsValidator : ClaimsValidator - { - private readonly List _allowedSkills; - - /// - /// Initializes a new instance of the class. - /// Loads the appIds for the configured skills. Only allows responses from skills it has configured. - /// - /// The list of configured skills. - public AllowedSkillsClaimsValidator(SkillsConfiguration skillsConfig) - { - if (skillsConfig == null) - { - throw new ArgumentNullException(nameof(skillsConfig)); - } - - _allowedSkills = (from skill in skillsConfig.Skills.Values select skill.AppId).ToList(); - } - - /// - /// Checks that the appId claim in the skill request is in the list of skills configured for this bot. - /// - /// The list of claims to validate. - /// A task that represents the work queued to execute. - public override Task ValidateClaimsAsync(IList claims) - { - if (SkillValidation.IsSkillClaim(claims)) - { - var appId = JwtTokenValidation.GetAppIdFromClaims(claims); - if (!_allowedSkills.Contains(appId)) - { - throw new UnauthorizedAccessException($"Received a request from an application with an appID of \"{appId}\". To enable requests from this skill, add the skill to your configuration file."); - } - } - - return Task.CompletedTask; - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/Bots/HostBot.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/Bots/HostBot.cs deleted file mode 100644 index 79d4c150a7..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/Bots/HostBot.cs +++ /dev/null @@ -1,241 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Dialogs; -using Microsoft.Bot.Builder.Integration.AspNet.Core.Skills; -using Microsoft.Bot.Builder.Skills; -using Microsoft.Bot.Connector.Authentication; -using Microsoft.Bot.Schema; -using Microsoft.BotFrameworkFunctionalTests.SimpleHostBot21.Dialogs; -using Microsoft.Extensions.Configuration; -using Newtonsoft.Json; - -namespace Microsoft.BotFrameworkFunctionalTests.SimpleHostBot21.Bots -{ - public class HostBot : ActivityHandler - { - public const string DeliveryModePropertyName = "deliveryModeProperty"; - public const string ActiveSkillPropertyName = "activeSkillProperty"; - - private readonly IStatePropertyAccessor _deliveryModeProperty; - private readonly IStatePropertyAccessor _activeSkillProperty; - private readonly IStatePropertyAccessor _dialogStateProperty; - private readonly string _botId; - private readonly ConversationState _conversationState; - private readonly SkillHttpClient _skillClient; - private readonly SkillsConfiguration _skillsConfig; - private readonly Dialog _dialog; - - /// - /// Initializes a new instance of the class. - /// - /// A state management object for the conversation. - /// The skills configuration. - /// The HTTP client for the skills. - /// The configuration properties. - /// The dialog to use. - public HostBot(ConversationState conversationState, SkillsConfiguration skillsConfig, SkillHttpClient skillClient, IConfiguration configuration, SetupDialog dialog) - { - _conversationState = conversationState ?? throw new ArgumentNullException(nameof(conversationState)); - _skillsConfig = skillsConfig ?? throw new ArgumentNullException(nameof(skillsConfig)); - _skillClient = skillClient ?? throw new ArgumentNullException(nameof(skillClient)); - _dialog = dialog ?? throw new ArgumentNullException(nameof(dialog)); - _dialogStateProperty = _conversationState.CreateProperty("DialogState"); - if (configuration == null) - { - throw new ArgumentNullException(nameof(configuration)); - } - - _botId = configuration.GetSection(MicrosoftAppCredentials.MicrosoftAppIdKey)?.Value; - - // Create state properties to track the delivery mode and active skill. - _deliveryModeProperty = conversationState.CreateProperty(DeliveryModePropertyName); - _activeSkillProperty = conversationState.CreateProperty(ActiveSkillPropertyName); - } - - /// - public override async Task OnTurnAsync(ITurnContext turnContext, CancellationToken cancellationToken = default) - { - // Forward all activities except EndOfConversation to the active skill. - if (turnContext.Activity.Type != ActivityTypes.EndOfConversation) - { - // Try to get the active skill - var activeSkill = await _activeSkillProperty.GetAsync(turnContext, () => null, cancellationToken); - - if (activeSkill != null) - { - var deliveryMode = await _deliveryModeProperty.GetAsync(turnContext, () => null, cancellationToken); - - // Send the activity to the skill - await SendToSkillAsync(turnContext, deliveryMode, activeSkill, cancellationToken); - return; - } - } - - await base.OnTurnAsync(turnContext, cancellationToken); - - // Save any state changes that might have occurred during the turn. - await _conversationState.SaveChangesAsync(turnContext, false, cancellationToken); - } - - /// - /// Processes a message activity. - /// - /// Context for the current turn of conversation. - /// CancellationToken propagates notifications that operations should be cancelled. - /// A representing the result of the asynchronous operation. - protected override async Task OnMessageActivityAsync(ITurnContext turnContext, CancellationToken cancellationToken) - { - if (_skillsConfig.Skills.ContainsKey(turnContext.Activity.Text)) - { - var deliveryMode = await _deliveryModeProperty.GetAsync(turnContext, () => null, cancellationToken); - var selectedSkill = _skillsConfig.Skills[turnContext.Activity.Text]; - var v3Bots = new List { "EchoSkillBotDotNetV3", "EchoSkillBotJSV3" }; - - if (selectedSkill != null && deliveryMode == DeliveryModes.ExpectReplies && v3Bots.Contains(selectedSkill.Id)) - { - var message = MessageFactory.Text("V3 Bots do not support 'expectReplies' delivery mode."); - await turnContext.SendActivityAsync(message, cancellationToken); - - // Forget delivery mode and skill invocation. - await _deliveryModeProperty.DeleteAsync(turnContext, cancellationToken); - await _activeSkillProperty.DeleteAsync(turnContext, cancellationToken); - - // Restart setup dialog - await _conversationState.DeleteAsync(turnContext, cancellationToken); - } - } - - await _dialog.RunAsync(turnContext, _dialogStateProperty, cancellationToken); - } - - /// - /// Processes an end of conversation activity. - /// - /// Context for the current turn of conversation. - /// CancellationToken propagates notifications that operations should be cancelled. - /// A representing the result of the asynchronous operation. - protected override async Task OnEndOfConversationActivityAsync(ITurnContext turnContext, CancellationToken cancellationToken) - { - await EndConversation((Activity)turnContext.Activity, turnContext, cancellationToken); - } - - /// - /// Processes a member added event. - /// - /// The list of members added to the conversation. - /// Context for the current turn of conversation. - /// CancellationToken propagates notifications that operations should be cancelled. - /// A representing the result of the asynchronous operation. - protected override async Task OnMembersAddedAsync(IList membersAdded, ITurnContext turnContext, CancellationToken cancellationToken) - { - foreach (var member in membersAdded) - { - if (member.Id != turnContext.Activity.Recipient.Id) - { - await turnContext.SendActivityAsync(MessageFactory.Text("Hello and welcome!"), cancellationToken); - await _dialog.RunAsync(turnContext, _dialogStateProperty, cancellationToken); - } - } - } - - /// - /// Clears storage variables and sends the end of conversation activities. - /// - /// End of conversation activity. - /// Context for the current turn of conversation. - /// CancellationToken propagates notifications that operations should be cancelled. - /// A representing the result of the asynchronous operation. - private async Task EndConversation(Activity activity, ITurnContext turnContext, CancellationToken cancellationToken) - { - // Forget delivery mode and skill invocation. - await _deliveryModeProperty.DeleteAsync(turnContext, cancellationToken); - await _activeSkillProperty.DeleteAsync(turnContext, cancellationToken); - - // Show status message, text and value returned by the skill - var eocActivityMessage = $"Received {ActivityTypes.EndOfConversation}.\n\nCode: {activity.Code}."; - if (!string.IsNullOrWhiteSpace(activity.Text)) - { - eocActivityMessage += $"\n\nText: {activity.Text}"; - } - - if (activity.Value != null) - { - eocActivityMessage += $"\n\nValue: {JsonConvert.SerializeObject(activity.Value)}"; - } - - await turnContext.SendActivityAsync(MessageFactory.Text(eocActivityMessage), cancellationToken); - - // We are back at the host. - await turnContext.SendActivityAsync(MessageFactory.Text("Back in the host bot."), cancellationToken); - - // Restart setup dialog. - await _dialog.RunAsync(turnContext, _dialogStateProperty, cancellationToken); - - await _conversationState.SaveChangesAsync(turnContext, false, cancellationToken); - } - - /// - /// Sends an activity to the skill bot. - /// - /// Context for the current turn of conversation. - /// The delivery mode to use when communicating to the skill. - /// The skill that will receive the activity. - /// CancellationToken propagates notifications that operations should be cancelled. - /// A representing the result of the asynchronous operation. - private async Task SendToSkillAsync(ITurnContext turnContext, string deliveryMode, BotFrameworkSkill targetSkill, CancellationToken cancellationToken) - { - // NOTE: Always SaveChanges() before calling a skill so that any activity generated by the skill - // will have access to current accurate state. - await _conversationState.SaveChangesAsync(turnContext, force: true, cancellationToken: cancellationToken); - - if (deliveryMode == DeliveryModes.ExpectReplies) - { - // Clone activity and update its delivery mode. - var activity = JsonConvert.DeserializeObject(JsonConvert.SerializeObject(turnContext.Activity)); - activity.DeliveryMode = deliveryMode; - - // Route the activity to the skill. - var expectRepliesResponse = await _skillClient.PostActivityAsync(_botId, targetSkill, _skillsConfig.SkillHostEndpoint, activity, cancellationToken); - - // Check response status. - if (!expectRepliesResponse.IsSuccessStatusCode()) - { - throw new HttpRequestException($"Error invoking the skill id: \"{targetSkill.Id}\" at \"{targetSkill.SkillEndpoint}\" (status is {expectRepliesResponse.Status}). \r\n {expectRepliesResponse.Body}"); - } - - // Route response activities back to the channel. - var responseActivities = expectRepliesResponse.Body?.Activities; - - foreach (var responseActivity in responseActivities) - { - if (responseActivity.Type == ActivityTypes.EndOfConversation) - { - await EndConversation(responseActivity, turnContext, cancellationToken); - } - else - { - await turnContext.SendActivityAsync(responseActivity, cancellationToken); - } - } - } - else - { - // Route the activity to the skill. - var response = await _skillClient.PostActivityAsync(_botId, targetSkill, _skillsConfig.SkillHostEndpoint, (Activity)turnContext.Activity, cancellationToken); - - // Check response status - if (!response.IsSuccessStatusCode()) - { - throw new HttpRequestException($"Error invoking the skill id: \"{targetSkill.Id}\" at \"{targetSkill.SkillEndpoint}\" (status is {response.Status}). \r\n {response.Body}"); - } - } - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/Controllers/BotController.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/Controllers/BotController.cs deleted file mode 100644 index 9b199e8ac7..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/Controllers/BotController.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Integration.AspNet.Core; - -namespace Microsoft.BotFrameworkFunctionalTests.SimpleHostBot21.Controllers -{ - /// - /// This ASP Controller is created to handle a request. Dependency Injection will provide the Adapter and IBot implementation at runtime. - /// - [Route("api/messages")] - [ApiController] - public class BotController : ControllerBase - { - private readonly BotFrameworkHttpAdapter _adapter; - private readonly IBot _bot; - - /// - /// Initializes a new instance of the class. - /// - /// Adapter for the BotController. - /// Bot for the BotController. - public BotController(BotFrameworkHttpAdapter adapter, IBot bot) - { - _adapter = adapter; - _bot = bot; - } - - /// - /// Processes an HttpPost request. - /// - /// A representing the result of the asynchronous operation. - [HttpPost] - public async Task PostAsync() - { - await _adapter.ProcessAsync(Request, Response, _bot); - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/Controllers/SkillController.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/Controllers/SkillController.cs deleted file mode 100644 index 4b6a1c7736..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/Controllers/SkillController.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Microsoft.AspNetCore.Mvc; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Integration.AspNet.Core; -using Microsoft.Bot.Builder.Skills; - -namespace Microsoft.BotFrameworkFunctionalTests.SimpleHostBot21.Controllers -{ - /// - /// A controller that handles skill replies to the bot. - /// This example uses the that is registered as a in startup.cs. - /// - [ApiController] - [Route("api/skills")] - public class SkillController : ChannelServiceController - { - /// - /// Initializes a new instance of the class. - /// - /// The skill handler registered as ChannelServiceHandler. - public SkillController(ChannelServiceHandler handler) - : base(handler) - { - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/Dialogs/SetupDialog.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/Dialogs/SetupDialog.cs deleted file mode 100644 index 2ae8f6aea5..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/Dialogs/SetupDialog.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Dialogs; -using Microsoft.Bot.Builder.Dialogs.Choices; -using Microsoft.Bot.Builder.Skills; -using Microsoft.Bot.Schema; -using Microsoft.BotFrameworkFunctionalTests.SimpleHostBot21.Bots; - -namespace Microsoft.BotFrameworkFunctionalTests.SimpleHostBot21.Dialogs -{ - /// - /// The setup dialog for this bot. - /// - public class SetupDialog : ComponentDialog - { - private readonly IStatePropertyAccessor _deliveryModeProperty; - private readonly IStatePropertyAccessor _activeSkillProperty; - private readonly SkillsConfiguration _skillsConfig; - private string _deliveryMode; - - public SetupDialog(ConversationState conversationState, SkillsConfiguration skillsConfig) - : base(nameof(SetupDialog)) - { - _skillsConfig = skillsConfig ?? throw new ArgumentNullException(nameof(skillsConfig)); - - _deliveryModeProperty = conversationState.CreateProperty(HostBot.DeliveryModePropertyName); - _activeSkillProperty = conversationState.CreateProperty(HostBot.ActiveSkillPropertyName); - - // Define the setup dialog and its related components. - // Add ChoicePrompt to render available skills. - AddDialog(new ChoicePrompt(nameof(ChoicePrompt))); - - // Add main waterfall dialog for this bot. - var waterfallSteps = new WaterfallStep[] - { - SelectDeliveryModeStepAsync, - SelectSkillStepAsync, - FinalStepAsync - }; - AddDialog(new WaterfallDialog(nameof(WaterfallDialog), waterfallSteps)); - - InitialDialogId = nameof(WaterfallDialog); - } - - // Render a prompt to select the delivery mode to use. - private async Task SelectDeliveryModeStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - // Create the PromptOptions with the delivery modes supported. - const string messageText = "What delivery mode would you like to use?"; - const string repromptMessageText = "That was not a valid choice, please select a valid delivery mode."; - var choices = new List(); - choices.Add(new Choice(DeliveryModes.Normal)); - choices.Add(new Choice(DeliveryModes.ExpectReplies)); - var options = new PromptOptions - { - Prompt = MessageFactory.Text(messageText, messageText, InputHints.ExpectingInput), - RetryPrompt = MessageFactory.Text(repromptMessageText, repromptMessageText, InputHints.ExpectingInput), - Choices = choices - }; - - // Prompt the user to select a delivery mode. - return await stepContext.PromptAsync(nameof(ChoicePrompt), options, cancellationToken); - } - - // Render a prompt to select the skill to call. - private async Task SelectSkillStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - // Set delivery mode. - _deliveryMode = ((FoundChoice)stepContext.Result).Value; - await _deliveryModeProperty.SetAsync(stepContext.Context, ((FoundChoice)stepContext.Result).Value, cancellationToken); - - // Create the PromptOptions from the skill configuration which contains the list of configured skills. - const string messageText = "What skill would you like to call?"; - const string repromptMessageText = "That was not a valid choice, please select a valid skill."; - var options = new PromptOptions - { - Prompt = MessageFactory.Text(messageText, messageText, InputHints.ExpectingInput), - RetryPrompt = MessageFactory.Text(repromptMessageText, repromptMessageText, InputHints.ExpectingInput), - Choices = _skillsConfig.Skills.Select(skill => new Choice(skill.Key)).ToList(), - Style = ListStyle.SuggestedAction - }; - - // Prompt the user to select a skill. - return await stepContext.PromptAsync(nameof(ChoicePrompt), options, cancellationToken); - } - - // The SetupDialog has ended, we go back to the HostBot to connect with the selected skill. - private async Task FinalStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - var selectedSkillKey = ((FoundChoice)stepContext.Result).Value; - var selectedSkill = _skillsConfig.Skills.FirstOrDefault(skill => skill.Key == selectedSkillKey); - - var v3Bots = new List { "EchoSkillBotDotNetV3", "EchoSkillBotJSV3" }; - - if (_deliveryMode == DeliveryModes.ExpectReplies && v3Bots.Contains(selectedSkillKey)) - { - await stepContext.Context.SendActivityAsync(MessageFactory.Text("V3 Bots do not support 'expectReplies' delivery mode."), cancellationToken); - - // Restart setup dialog - return await stepContext.ReplaceDialogAsync(InitialDialogId, null, cancellationToken); - } - - // Set active skill - await _activeSkillProperty.SetAsync(stepContext.Context, selectedSkill.Value, cancellationToken); - - var message = MessageFactory.Text("Type anything to send to the skill.", "Type anything to send to the skill.", InputHints.ExpectingInput); - await stepContext.Context.SendActivityAsync(message, cancellationToken); - - return await stepContext.EndDialogAsync(stepContext.Values, cancellationToken); - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/Program.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/Program.cs deleted file mode 100644 index 992a1b61a9..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/Program.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Microsoft.AspNetCore; -using Microsoft.AspNetCore.Hosting; - -namespace Microsoft.BotFrameworkFunctionalTests.SimpleHostBot21 -{ - public class Program - { - /// - /// The entry point of the application. - /// - /// The command line args. - public static void Main(string[] args) - { - CreateWebHostBuilder(args).Build().Run(); - } - - /// - /// Creates a new instance of the class with pre-configured defaults. - /// - /// The command line args. - /// The initialized . - public static IWebHostBuilder CreateWebHostBuilder(string[] args) => - WebHost.CreateDefaultBuilder(args) - .UseStartup(); - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/Properties/launchSettings.json b/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/Properties/launchSettings.json deleted file mode 100644 index cbde6fb474..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/Properties/launchSettings.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:35005", - "sslPort": 0 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "SimpleHostBotDotNet21": { - "commandName": "Project", - "launchBrowser": true, - "applicationUrl": "http://localhost:35005", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/SimpleHostBot-2.1.csproj b/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/SimpleHostBot-2.1.csproj deleted file mode 100644 index c0924fb1cc..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/SimpleHostBot-2.1.csproj +++ /dev/null @@ -1,26 +0,0 @@ - - - - netcoreapp2.1 - latest - Microsoft.BotFrameworkFunctionalTests.SimpleHostBot21 - Microsoft.BotFrameworkFunctionalTests.SimpleHostBot21 - - - - DEBUG;TRACE - - - - - - - - - - - Always - - - - \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/SkillsConfiguration.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/SkillsConfiguration.cs deleted file mode 100644 index ee3ef40abb..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/SkillsConfiguration.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using Microsoft.Bot.Builder.Skills; -using Microsoft.Extensions.Configuration; - -namespace Microsoft.BotFrameworkFunctionalTests.SimpleHostBot21 -{ - /// - /// A helper class that loads Skills information from configuration. - /// - public class SkillsConfiguration - { - /// - /// Initializes a new instance of the class to load skills information from configuration. - /// - /// The configuration properties. - public SkillsConfiguration(IConfiguration configuration) - { - var section = configuration?.GetSection("BotFrameworkSkills"); - var skills = section?.Get(); - if (skills != null) - { - foreach (var skill in skills) - { - Skills.Add(skill.Id, skill); - } - } - - var skillHostEndpoint = configuration?.GetValue(nameof(SkillHostEndpoint)); - if (!string.IsNullOrWhiteSpace(skillHostEndpoint)) - { - SkillHostEndpoint = new Uri(skillHostEndpoint); - } - } - - /// - /// Gets the URI representing the endpoint of the host bot. - /// - /// The host bot endpoint URI. - public Uri SkillHostEndpoint { get; } - - /// - /// Gets the key-value pairs with the skills bots. - /// - /// The key-value pairs with the skills bots. - public Dictionary Skills { get; } = new Dictionary(StringComparer.OrdinalIgnoreCase); - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/Startup.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/Startup.cs deleted file mode 100644 index afafc6d9b2..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/Startup.cs +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.BotFramework; -using Microsoft.Bot.Builder.Integration.AspNet.Core; -using Microsoft.Bot.Builder.Integration.AspNet.Core.Skills; -using Microsoft.Bot.Builder.Skills; -using Microsoft.Bot.Connector.Authentication; -using Microsoft.BotFrameworkFunctionalTests.SimpleHostBot21.Authentication; -using Microsoft.BotFrameworkFunctionalTests.SimpleHostBot21.Bots; -using Microsoft.BotFrameworkFunctionalTests.SimpleHostBot21.Dialogs; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; - -namespace Microsoft.BotFrameworkFunctionalTests.SimpleHostBot21 -{ - public class Startup - { - public Startup(IConfiguration config) - { - Configuration = config; - } - - public IConfiguration Configuration { get; } - - /// - /// This method gets called by the runtime. Use this method to add services to the container. - /// - /// The collection of services to add to the container. - public void ConfigureServices(IServiceCollection services) - { - services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); - - // Configure credentials - services.AddSingleton(); - - // Register the skills configuration class - services.AddSingleton(); - - // Register AuthConfiguration to enable custom claim validation. - services.AddSingleton(sp => new AuthenticationConfiguration { ClaimsValidator = new AllowedSkillsClaimsValidator(sp.GetService()) }); - - // Register the Bot Framework Adapter with error handling enabled. - // Note: some classes use the base BotAdapter so we add an extra registration that pulls the same instance. - services.AddSingleton(); - services.AddSingleton(sp => sp.GetService()); - - // Register the skills client and skills request handler. - services.AddSingleton(); - services.AddHttpClient(); - services.AddSingleton(); - - // Register the storage we'll be using for User and Conversation state. (Memory is great for testing purposes.) - services.AddSingleton(); - - // Register Conversation state (used by the Dialog system itself). - services.AddSingleton(); - - // Create SetupDialog - services.AddSingleton(); - - // Register the bot as a transient. In this case the ASP Controller is expecting an IBot. - services.AddTransient(); - - if (!string.IsNullOrEmpty(Configuration["ChannelService"])) - { - // Register a ConfigurationChannelProvider -- this is only for Azure Gov. - services.AddSingleton(); - } - } - - /// - /// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - /// - /// The application request pipeline to be configured. - /// The web hosting environment. - public void Configure(IApplicationBuilder app, IHostingEnvironment env) - { - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - } - else - { - app.UseHsts(); - } - - app.UseDefaultFiles(); - app.UseStaticFiles(); - - // app.UseHttpsRedirection(); - app.UseMvc(); - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/appsettings.json b/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/appsettings.json deleted file mode 100644 index 65cb14456e..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/appsettings.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "MicrosoftAppId": "", - "MicrosoftAppPassword": "", - "ChannelService": "", - "SkillHostEndpoint": "http://localhost:35005/api/skills/", - "BotFrameworkSkills": [ - { - "Id": "EchoSkillBotComposerDotNet", - "AppId": "", - "SkillEndpoint": "http://localhost:35410/api/messages" - }, - { - "Id": "EchoSkillBotDotNet", - "AppId": "", - "SkillEndpoint": "http://localhost:35400/api/messages" - }, - { - "Id": "EchoSkillBotDotNet21", - "AppId": "", - "SkillEndpoint": "http://localhost:35405/api/messages" - }, - { - "Id": "EchoSkillBotDotNetV3", - "AppId": "", - "SkillEndpoint": "http://localhost:35407/api/messages" - }, - { - "Id": "EchoSkillBotJS", - "AppId": "", - "SkillEndpoint": "http://localhost:36400/api/messages" - }, - { - "Id": "EchoSkillBotJSV3", - "AppId": "", - "SkillEndpoint": "http://localhost:36407/api/messages" - }, - { - "Id": "EchoSkillBotPython", - "AppId": "", - "SkillEndpoint": "http://localhost:37400/api/messages" - } - ] -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/wwwroot/default.htm b/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/wwwroot/default.htm deleted file mode 100644 index 39a369dfe8..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot-2.1/wwwroot/default.htm +++ /dev/null @@ -1,420 +0,0 @@ - - - - - - - SimpleHostBot-2.1DotNet - - - - - -
-
-
-
SimpleRootBotDotNet21 Bot
-
-
-
-
-
Your bot is ready!
-
You can test your bot in the Bot Framework Emulator
- by connecting to http://localhost:3978/api/messages.
- -
Visit Azure - Bot Service to register your bot and add it to
- various channels. The bot's endpoint URL typically looks - like this:
-
https://your_bots_hostname/api/messages
-
-
-
-
- -
- - - diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/AdapterWithErrorHandler.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/AdapterWithErrorHandler.cs deleted file mode 100644 index a358155fed..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/AdapterWithErrorHandler.cs +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Integration.AspNet.Core; -using Microsoft.Bot.Builder.Integration.AspNet.Core.Skills; -using Microsoft.Bot.Builder.Skills; -using Microsoft.Bot.Builder.TraceExtensions; -using Microsoft.Bot.Connector.Authentication; -using Microsoft.Bot.Schema; -using Microsoft.BotFrameworkFunctionalTests.SimpleHostBot.Bots; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Logging; - -namespace Microsoft.BotFrameworkFunctionalTests.SimpleHostBot -{ - public class AdapterWithErrorHandler : BotFrameworkHttpAdapter - { - private readonly ConversationState _conversationState; - private readonly IConfiguration _configuration; - private readonly ILogger _logger; - private readonly SkillHttpClient _skillClient; - private readonly SkillsConfiguration _skillsConfig; - - /// - /// Initializes a new instance of the class to handle errors. - /// - /// The configuration properties. - /// An instance of a logger. - /// A state management object for the conversation. - /// The HTTP client for the skills. - /// The skills configuration. - public AdapterWithErrorHandler(IConfiguration configuration, ILogger logger, ConversationState conversationState = null, SkillHttpClient skillClient = null, SkillsConfiguration skillsConfig = null) - : base(configuration, logger) - { - _configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); - _conversationState = conversationState; - _logger = logger ?? throw new ArgumentNullException(nameof(logger)); - _skillClient = skillClient; - _skillsConfig = skillsConfig; - - OnTurnError = HandleTurnErrorAsync; - } - - /// - /// Handles the error by sending a message to the user and ending the conversation with the skill. - /// - /// Context for the current turn of conversation. - /// The handled exception. - /// A representing the result of the asynchronous operation. - private async Task HandleTurnErrorAsync(ITurnContext turnContext, Exception exception) - { - // Log any leaked exception from the application. - _logger.LogError(exception, $"[OnTurnError] unhandled error : {exception.Message}"); - - await SendErrorMessageAsync(turnContext, exception, default); - await EndSkillConversationAsync(turnContext, default); - await ClearConversationStateAsync(turnContext, default); - } - - /// - /// Sends an error message to the user and a trace activity to be displayed in the Bot Framework Emulator. - /// - /// Context for the current turn of conversation. - /// The exception to be sent in the message. - /// CancellationToken propagates notifications that operations should be cancelled. - /// A representing the result of the asynchronous operation. - private async Task SendErrorMessageAsync(ITurnContext turnContext, Exception exception, CancellationToken cancellationToken) - { - try - { - // Send a message to the user - var errorMessageText = "The bot encountered an error or bug."; - var errorMessage = MessageFactory.Text(errorMessageText, errorMessageText, InputHints.IgnoringInput); - errorMessage.Value = exception; - await turnContext.SendActivityAsync(errorMessage, cancellationToken); - - await turnContext.SendActivityAsync($"Exception: {exception.Message}"); - await turnContext.SendActivityAsync(exception.ToString()); - - errorMessageText = "To continue to run this bot, please fix the bot source code."; - errorMessage = MessageFactory.Text(errorMessageText, errorMessageText, InputHints.ExpectingInput); - await turnContext.SendActivityAsync(errorMessage, cancellationToken); - - // Send a trace activity, which will be displayed in the Bot Framework Emulator - await turnContext.TraceActivityAsync("OnTurnError Trace", exception.ToString(), "https://www.botframework.com/schemas/error", "TurnError", cancellationToken); - } - catch (Exception ex) - { - _logger.LogError(ex, $"Exception caught in SendErrorMessageAsync : {ex}"); - } - } - - /// - /// Informs to the active skill that the conversation is ended so that it has a chance to clean up. - /// - /// Context for the current turn of conversation. - /// CancellationToken propagates notifications that operations should be cancelled. - /// A representing the result of the asynchronous operation. - private async Task EndSkillConversationAsync(ITurnContext turnContext, CancellationToken cancellationToken) - { - if (_conversationState == null || _skillClient == null || _skillsConfig == null) - { - return; - } - - try - { - // Note: ActiveSkillPropertyName is set by the HostBot while messages are being - // forwarded to a Skill. - var activeSkill = await _conversationState.CreateProperty(HostBot.ActiveSkillPropertyName).GetAsync(turnContext, () => null, cancellationToken); - if (activeSkill != null) - { - var botId = _configuration.GetSection(MicrosoftAppCredentials.MicrosoftAppIdKey)?.Value; - - var endOfConversation = Activity.CreateEndOfConversationActivity(); - endOfConversation.Code = "HostSkillError"; - endOfConversation.ApplyConversationReference(turnContext.Activity.GetConversationReference(), true); - - await _conversationState.SaveChangesAsync(turnContext, true, cancellationToken); - await _skillClient.PostActivityAsync(botId, activeSkill, _skillsConfig.SkillHostEndpoint, (Activity)endOfConversation, cancellationToken); - } - } - catch (Exception ex) - { - _logger.LogError(ex, $"Exception caught on attempting to send EndOfConversation : {ex}"); - } - } - - /// - /// Deletes the conversationState for the current conversation to prevent the bot from getting stuck in an error-loop caused by being in a bad state. - /// ConversationState should be thought of as similar to "cookie-state" in a Web pages. - /// - /// Context for the current turn of conversation. - /// CancellationToken propagates notifications that operations should be cancelled. - /// A representing the result of the asynchronous operation. - private async Task ClearConversationStateAsync(ITurnContext turnContext, CancellationToken cancellationToken) - { - if (_conversationState != null) - { - try - { - await _conversationState.DeleteAsync(turnContext, cancellationToken); - } - catch (Exception ex) - { - _logger.LogError(ex, $"Exception caught on attempting to Delete ConversationState : {ex}"); - } - } - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/Authentication/AllowedSkillsClaimsValidator.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/Authentication/AllowedSkillsClaimsValidator.cs deleted file mode 100644 index 178a1c0a47..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/Authentication/AllowedSkillsClaimsValidator.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Security.Claims; -using System.Threading.Tasks; -using Microsoft.Bot.Connector.Authentication; - -namespace Microsoft.BotFrameworkFunctionalTests.SimpleHostBot.Authentication -{ - /// - /// Sample claims validator that loads an allowed list from configuration if present - /// and checks that responses are coming from configured skills. - /// - public class AllowedSkillsClaimsValidator : ClaimsValidator - { - private readonly List _allowedSkills; - - /// - /// Initializes a new instance of the class. - /// Loads the appIds for the configured skills. Only allows responses from skills it has configured. - /// - /// The list of configured skills. - public AllowedSkillsClaimsValidator(SkillsConfiguration skillsConfig) - { - if (skillsConfig == null) - { - throw new ArgumentNullException(nameof(skillsConfig)); - } - - _allowedSkills = (from skill in skillsConfig.Skills.Values select skill.AppId).ToList(); - } - - /// - /// Checks that the appId claim in the skill request is in the list of skills configured for this bot. - /// - /// The list of claims to validate. - /// A task that represents the work queued to execute. - public override Task ValidateClaimsAsync(IList claims) - { - if (SkillValidation.IsSkillClaim(claims)) - { - var appId = JwtTokenValidation.GetAppIdFromClaims(claims); - if (!_allowedSkills.Contains(appId)) - { - throw new UnauthorizedAccessException($"Received a request from an application with an appID of \"{appId}\". To enable requests from this skill, add the skill to your configuration file."); - } - } - - return Task.CompletedTask; - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/Bots/HostBot.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/Bots/HostBot.cs deleted file mode 100644 index 566610aed0..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/Bots/HostBot.cs +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Dialogs; -using Microsoft.Bot.Builder.Integration.AspNet.Core.Skills; -using Microsoft.Bot.Builder.Skills; -using Microsoft.Bot.Connector.Authentication; -using Microsoft.Bot.Schema; -using Microsoft.BotFrameworkFunctionalTests.SimpleHostBot.Dialogs; -using Microsoft.Extensions.Configuration; -using Newtonsoft.Json; - -namespace Microsoft.BotFrameworkFunctionalTests.SimpleHostBot.Bots -{ - public class HostBot : ActivityHandler - { - public const string DeliveryModePropertyName = "deliveryModeProperty"; - public const string ActiveSkillPropertyName = "activeSkillProperty"; - - private readonly IStatePropertyAccessor _deliveryModeProperty; - private readonly IStatePropertyAccessor _activeSkillProperty; - private readonly IStatePropertyAccessor _dialogStateProperty; - private readonly string _botId; - private readonly ConversationState _conversationState; - private readonly SkillHttpClient _skillClient; - private readonly SkillsConfiguration _skillsConfig; - private readonly Dialog _dialog; - - /// - /// Initializes a new instance of the class. - /// - /// A state management object for the conversation. - /// The skills configuration. - /// The HTTP client for the skills. - /// The configuration properties. - /// The dialog to use. - public HostBot(ConversationState conversationState, SkillsConfiguration skillsConfig, SkillHttpClient skillClient, IConfiguration configuration, SetupDialog dialog) - { - _conversationState = conversationState ?? throw new ArgumentNullException(nameof(conversationState)); - _skillsConfig = skillsConfig ?? throw new ArgumentNullException(nameof(skillsConfig)); - _skillClient = skillClient ?? throw new ArgumentNullException(nameof(skillClient)); - _dialog = dialog ?? throw new ArgumentNullException(nameof(dialog)); - _dialogStateProperty = _conversationState.CreateProperty("DialogState"); - if (configuration == null) - { - throw new ArgumentNullException(nameof(configuration)); - } - - _botId = configuration.GetSection(MicrosoftAppCredentials.MicrosoftAppIdKey)?.Value; - - // Create state properties to track the delivery mode and active skill. - _deliveryModeProperty = conversationState.CreateProperty(DeliveryModePropertyName); - _activeSkillProperty = conversationState.CreateProperty(ActiveSkillPropertyName); - } - - /// - public override async Task OnTurnAsync(ITurnContext turnContext, CancellationToken cancellationToken = default) - { - // Forward all activities except EndOfConversation to the active skill. - if (turnContext.Activity.Type != ActivityTypes.EndOfConversation) - { - // Try to get the active skill - var activeSkill = await _activeSkillProperty.GetAsync(turnContext, () => null, cancellationToken); - - if (activeSkill != null) - { - var deliveryMode = await _deliveryModeProperty.GetAsync(turnContext, () => null, cancellationToken); - - // Send the activity to the skill - await SendToSkillAsync(turnContext, deliveryMode, activeSkill, cancellationToken); - return; - } - } - - await base.OnTurnAsync(turnContext, cancellationToken); - - // Save any state changes that might have occurred during the turn. - await _conversationState.SaveChangesAsync(turnContext, false, cancellationToken); - } - - /// - /// Processes a message activity. - /// - /// Context for the current turn of conversation. - /// CancellationToken propagates notifications that operations should be cancelled. - /// A representing the result of the asynchronous operation. - protected override async Task OnMessageActivityAsync(ITurnContext turnContext, CancellationToken cancellationToken) - { - if (_skillsConfig.Skills.ContainsKey(turnContext.Activity.Text)) - { - var deliveryMode = await _deliveryModeProperty.GetAsync(turnContext, () => null, cancellationToken); - var selectedSkill = _skillsConfig.Skills[turnContext.Activity.Text]; - var v3Bots = new List { "EchoSkillBotDotNetV3", "EchoSkillBotJSV3" }; - - if (selectedSkill != null && deliveryMode == DeliveryModes.ExpectReplies && v3Bots.Contains(selectedSkill.Id)) - { - var message = MessageFactory.Text("V3 Bots do not support 'expectReplies' delivery mode."); - await turnContext.SendActivityAsync(message, cancellationToken); - - // Forget delivery mode and skill invocation. - await _deliveryModeProperty.DeleteAsync(turnContext, cancellationToken); - await _activeSkillProperty.DeleteAsync(turnContext, cancellationToken); - - // Restart setup dialog - await _conversationState.DeleteAsync(turnContext, cancellationToken); - } - } - - await _dialog.RunAsync(turnContext, _dialogStateProperty, cancellationToken); - } - - /// - /// Processes an end of conversation activity. - /// - /// Context for the current turn of conversation. - /// CancellationToken propagates notifications that operations should be cancelled. - /// A representing the result of the asynchronous operation. - protected override async Task OnEndOfConversationActivityAsync(ITurnContext turnContext, CancellationToken cancellationToken) - { - await EndConversation((Activity)turnContext.Activity, turnContext, cancellationToken); - } - - /// - /// Processes a member added event. - /// - /// The list of members added to the conversation. - /// Context for the current turn of conversation. - /// CancellationToken propagates notifications that operations should be cancelled. - /// A representing the result of the asynchronous operation. - protected override async Task OnMembersAddedAsync(IList membersAdded, ITurnContext turnContext, CancellationToken cancellationToken) - { - foreach (var member in membersAdded) - { - if (member.Id != turnContext.Activity.Recipient.Id) - { - await turnContext.SendActivityAsync(MessageFactory.Text("Hello and welcome!"), cancellationToken); - await _dialog.RunAsync(turnContext, _dialogStateProperty, cancellationToken); - } - } - } - - /// - /// Clears storage variables and sends the end of conversation activities. - /// - /// End of conversation activity. - /// Context for the current turn of conversation. - /// CancellationToken propagates notifications that operations should be cancelled. - /// A representing the result of the asynchronous operation. - private async Task EndConversation(Activity activity, ITurnContext turnContext, CancellationToken cancellationToken) - { - // Forget delivery mode and skill invocation. - await _deliveryModeProperty.DeleteAsync(turnContext, cancellationToken); - await _activeSkillProperty.DeleteAsync(turnContext, cancellationToken); - - // Show status message, text and value returned by the skill - var eocActivityMessage = $"Received {ActivityTypes.EndOfConversation}.\n\nCode: {activity.Code}."; - if (!string.IsNullOrWhiteSpace(activity.Text)) - { - eocActivityMessage += $"\n\nText: {activity.Text}"; - } - - if (activity.Value != null) - { - eocActivityMessage += $"\n\nValue: {JsonConvert.SerializeObject(activity.Value)}"; - } - - await turnContext.SendActivityAsync(MessageFactory.Text(eocActivityMessage), cancellationToken); - - // We are back at the host. - await turnContext.SendActivityAsync(MessageFactory.Text("Back in the host bot."), cancellationToken); - - // Restart setup dialog. - await _dialog.RunAsync(turnContext, _dialogStateProperty, cancellationToken); - - await _conversationState.SaveChangesAsync(turnContext, false, cancellationToken); - } - - /// - /// Sends an activity to the skill bot. - /// - /// Context for the current turn of conversation. - /// The delivery mode to use when communicating to the skill. - /// The skill that will receive the activity. - /// CancellationToken propagates notifications that operations should be cancelled. - /// A representing the result of the asynchronous operation. - private async Task SendToSkillAsync(ITurnContext turnContext, string deliveryMode, BotFrameworkSkill targetSkill, CancellationToken cancellationToken) - { - // NOTE: Always SaveChanges() before calling a skill so that any activity generated by the skill - // will have access to current accurate state. - await _conversationState.SaveChangesAsync(turnContext, force: true, cancellationToken: cancellationToken); - - if (deliveryMode == DeliveryModes.ExpectReplies) - { - // Clone activity and update its delivery mode. - var activity = JsonConvert.DeserializeObject(JsonConvert.SerializeObject(turnContext.Activity)); - activity.DeliveryMode = deliveryMode; - - // Route the activity to the skill. - var expectRepliesResponse = await _skillClient.PostActivityAsync(_botId, targetSkill, _skillsConfig.SkillHostEndpoint, activity, cancellationToken); - - // Check response status. - if (!expectRepliesResponse.IsSuccessStatusCode()) - { - throw new HttpRequestException($"Error invoking the skill id: \"{targetSkill.Id}\" at \"{targetSkill.SkillEndpoint}\" (status is {expectRepliesResponse.Status}). \r\n {expectRepliesResponse.Body}"); - } - - // Route response activities back to the channel. - var responseActivities = expectRepliesResponse.Body?.Activities; - - foreach (var responseActivity in responseActivities) - { - if (responseActivity.Type == ActivityTypes.EndOfConversation) - { - await EndConversation(responseActivity, turnContext, cancellationToken); - } - else - { - await turnContext.SendActivityAsync(responseActivity, cancellationToken); - } - } - } - else - { - // Route the activity to the skill. - var response = await _skillClient.PostActivityAsync(_botId, targetSkill, _skillsConfig.SkillHostEndpoint, (Activity)turnContext.Activity, cancellationToken); - - // Check response status - if (!response.IsSuccessStatusCode()) - { - throw new HttpRequestException($"Error invoking the skill id: \"{targetSkill.Id}\" at \"{targetSkill.SkillEndpoint}\" (status is {response.Status}). \r\n {response.Body}"); - } - } - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/Controllers/BotController.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/Controllers/BotController.cs deleted file mode 100644 index e0a80d0dc0..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/Controllers/BotController.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Integration.AspNet.Core; - -namespace Microsoft.BotFrameworkFunctionalTests.SimpleHostBot.Controllers -{ - /// - /// This ASP Controller is created to handle a request. Dependency Injection will provide the Adapter and IBot implementation at runtime. - /// - [Route("api/messages")] - [ApiController] - public class BotController : ControllerBase - { - private readonly BotFrameworkHttpAdapter _adapter; - private readonly IBot _bot; - - /// - /// Initializes a new instance of the class. - /// - /// Adapter for the BotController. - /// Bot for the BotController. - public BotController(BotFrameworkHttpAdapter adapter, IBot bot) - { - _adapter = adapter; - _bot = bot; - } - - /// - /// Processes an HttpPost request. - /// - /// A representing the result of the asynchronous operation. - [HttpPost] - public async Task PostAsync() - { - await _adapter.ProcessAsync(Request, Response, _bot); - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/Controllers/SkillController.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/Controllers/SkillController.cs deleted file mode 100644 index 9f270318f6..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/Controllers/SkillController.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Microsoft.AspNetCore.Mvc; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Integration.AspNet.Core; -using Microsoft.Bot.Builder.Skills; - -namespace Microsoft.BotFrameworkFunctionalTests.SimpleHostBot.Controllers -{ - /// - /// A controller that handles skill replies to the bot. - /// This example uses the that is registered as a in startup.cs. - /// - [ApiController] - [Route("api/skills")] - public class SkillController : ChannelServiceController - { - /// - /// Initializes a new instance of the class. - /// - /// The skill handler registered as ChannelServiceHandler. - public SkillController(ChannelServiceHandler handler) - : base(handler) - { - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/Dialogs/SetupDialog.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/Dialogs/SetupDialog.cs deleted file mode 100644 index 86b6c6787c..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/Dialogs/SetupDialog.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Dialogs; -using Microsoft.Bot.Builder.Dialogs.Choices; -using Microsoft.Bot.Builder.Skills; -using Microsoft.Bot.Schema; -using Microsoft.BotFrameworkFunctionalTests.SimpleHostBot.Bots; - -namespace Microsoft.BotFrameworkFunctionalTests.SimpleHostBot.Dialogs -{ - /// - /// The setup dialog for this bot. - /// - public class SetupDialog : ComponentDialog - { - private readonly IStatePropertyAccessor _deliveryModeProperty; - private readonly IStatePropertyAccessor _activeSkillProperty; - private readonly SkillsConfiguration _skillsConfig; - private string _deliveryMode; - - public SetupDialog(ConversationState conversationState, SkillsConfiguration skillsConfig) - : base(nameof(SetupDialog)) - { - _skillsConfig = skillsConfig ?? throw new ArgumentNullException(nameof(skillsConfig)); - - _deliveryModeProperty = conversationState.CreateProperty(HostBot.DeliveryModePropertyName); - _activeSkillProperty = conversationState.CreateProperty(HostBot.ActiveSkillPropertyName); - - // Define the setup dialog and its related components. - // Add ChoicePrompt to render available skills. - AddDialog(new ChoicePrompt(nameof(ChoicePrompt))); - - // Add main waterfall dialog for this bot. - var waterfallSteps = new WaterfallStep[] - { - SelectDeliveryModeStepAsync, - SelectSkillStepAsync, - FinalStepAsync - }; - AddDialog(new WaterfallDialog(nameof(WaterfallDialog), waterfallSteps)); - - InitialDialogId = nameof(WaterfallDialog); - } - - // Render a prompt to select the delivery mode to use. - private async Task SelectDeliveryModeStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - // Create the PromptOptions with the delivery modes supported. - const string messageText = "What delivery mode would you like to use?"; - const string repromptMessageText = "That was not a valid choice, please select a valid delivery mode."; - var choices = new List(); - choices.Add(new Choice(DeliveryModes.Normal)); - choices.Add(new Choice(DeliveryModes.ExpectReplies)); - var options = new PromptOptions - { - Prompt = MessageFactory.Text(messageText, messageText, InputHints.ExpectingInput), - RetryPrompt = MessageFactory.Text(repromptMessageText, repromptMessageText, InputHints.ExpectingInput), - Choices = choices - }; - - // Prompt the user to select a delivery mode. - return await stepContext.PromptAsync(nameof(ChoicePrompt), options, cancellationToken); - } - - // Render a prompt to select the skill to call. - private async Task SelectSkillStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - // Set delivery mode. - _deliveryMode = ((FoundChoice)stepContext.Result).Value; - await _deliveryModeProperty.SetAsync(stepContext.Context, ((FoundChoice)stepContext.Result).Value, cancellationToken); - - // Create the PromptOptions from the skill configuration which contains the list of configured skills. - const string messageText = "What skill would you like to call?"; - const string repromptMessageText = "That was not a valid choice, please select a valid skill."; - var options = new PromptOptions - { - Prompt = MessageFactory.Text(messageText, messageText, InputHints.ExpectingInput), - RetryPrompt = MessageFactory.Text(repromptMessageText, repromptMessageText, InputHints.ExpectingInput), - Choices = _skillsConfig.Skills.Select(skill => new Choice(skill.Key)).ToList(), - Style = ListStyle.SuggestedAction - }; - - // Prompt the user to select a skill. - return await stepContext.PromptAsync(nameof(ChoicePrompt), options, cancellationToken); - } - - // The SetupDialog has ended, we go back to the HostBot to connect with the selected skill. - private async Task FinalStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - var selectedSkillKey = ((FoundChoice)stepContext.Result).Value; - var selectedSkill = _skillsConfig.Skills.FirstOrDefault(skill => skill.Key == selectedSkillKey); - - var v3Bots = new List { "EchoSkillBotDotNetV3", "EchoSkillBotJSV3" }; - - if (_deliveryMode == DeliveryModes.ExpectReplies && v3Bots.Contains(selectedSkillKey)) - { - await stepContext.Context.SendActivityAsync(MessageFactory.Text("V3 Bots do not support 'expectReplies' delivery mode."), cancellationToken); - - // Restart setup dialog - return await stepContext.ReplaceDialogAsync(InitialDialogId, null, cancellationToken); - } - - // Set active skill - await _activeSkillProperty.SetAsync(stepContext.Context, selectedSkill.Value, cancellationToken); - - var message = MessageFactory.Text("Type anything to send to the skill.", "Type anything to send to the skill.", InputHints.ExpectingInput); - await stepContext.Context.SendActivityAsync(message, cancellationToken); - - return await stepContext.EndDialogAsync(stepContext.Values, cancellationToken); - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/Program.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/Program.cs deleted file mode 100644 index fb92b18353..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/Program.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Hosting; - -namespace Microsoft.BotFrameworkFunctionalTests.SimpleHostBot -{ - public class Program - { - /// - /// The entry point of the application. - /// - /// The command line args. - public static void Main(string[] args) - { - CreateHostBuilder(args).Build().Run(); - } - - /// - /// Creates a new instance of the class with pre-configured defaults. - /// - /// The command line args. - /// The initialized . - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup(); - }); - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/Properties/launchSettings.json b/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/Properties/launchSettings.json deleted file mode 100644 index e660cda730..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/Properties/launchSettings.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:35000", - "sslPort": 0 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "SimpleHostBotDotNet": { - "commandName": "Project", - "launchBrowser": true, - "applicationUrl": "http://localhost:35000", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/SimpleHostBot.csproj b/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/SimpleHostBot.csproj deleted file mode 100644 index 5f112edd07..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/SimpleHostBot.csproj +++ /dev/null @@ -1,29 +0,0 @@ - - - - netcoreapp3.1 - latest - Microsoft.BotFrameworkFunctionalTests.SimpleHostBot - Microsoft.BotFrameworkFunctionalTests.SimpleHostBot - - - - DEBUG;TRACE - - - - - - - - - - - Always - - - Always - - - - \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/SkillsConfiguration.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/SkillsConfiguration.cs deleted file mode 100644 index aa1989900b..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/SkillsConfiguration.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using Microsoft.Bot.Builder.Skills; -using Microsoft.Extensions.Configuration; - -namespace Microsoft.BotFrameworkFunctionalTests.SimpleHostBot -{ - /// - /// A helper class that loads Skills information from configuration. - /// - public class SkillsConfiguration - { - /// - /// Initializes a new instance of the class to load skills information from configuration. - /// - /// The configuration properties. - public SkillsConfiguration(IConfiguration configuration) - { - var section = configuration?.GetSection("BotFrameworkSkills"); - var skills = section?.Get(); - if (skills != null) - { - foreach (var skill in skills) - { - Skills.Add(skill.Id, skill); - } - } - - var skillHostEndpoint = configuration?.GetValue(nameof(SkillHostEndpoint)); - if (!string.IsNullOrWhiteSpace(skillHostEndpoint)) - { - SkillHostEndpoint = new Uri(skillHostEndpoint); - } - } - - /// - /// Gets the URI representing the endpoint of the host bot. - /// - /// - /// The URI representing the endpoint of the host bot. - /// - public Uri SkillHostEndpoint { get; } - - /// - /// Gets the key-value pairs with the skills bots. - /// - /// - /// The key-value pairs with the skills bots. - /// - public Dictionary Skills { get; } = new Dictionary(StringComparer.OrdinalIgnoreCase); - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/Startup.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/Startup.cs deleted file mode 100644 index 42879f11f9..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/Startup.cs +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.BotFramework; -using Microsoft.Bot.Builder.Integration.AspNet.Core; -using Microsoft.Bot.Builder.Integration.AspNet.Core.Skills; -using Microsoft.Bot.Builder.Skills; -using Microsoft.Bot.Connector.Authentication; -using Microsoft.BotFrameworkFunctionalTests.SimpleHostBot.Authentication; -using Microsoft.BotFrameworkFunctionalTests.SimpleHostBot.Bots; -using Microsoft.BotFrameworkFunctionalTests.SimpleHostBot.Dialogs; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; - -namespace Microsoft.BotFrameworkFunctionalTests.SimpleHostBot -{ - public class Startup - { - public Startup(IConfiguration config) - { - Configuration = config; - } - - public IConfiguration Configuration { get; } - - /// - /// This method gets called by the runtime. Use this method to add services to the container. - /// - /// The collection of services to add to the container. - public void ConfigureServices(IServiceCollection services) - { - services.AddControllers().AddNewtonsoftJson(); - - // Configure credentials - services.AddSingleton(); - - // Register the skills configuration class - services.AddSingleton(); - - // Register AuthConfiguration to enable custom claim validation. - services.AddSingleton(sp => new AuthenticationConfiguration { ClaimsValidator = new AllowedSkillsClaimsValidator(sp.GetService()) }); - - // Register the Bot Framework Adapter with error handling enabled. - // Note: some classes use the base BotAdapter so we add an extra registration that pulls the same instance. - services.AddSingleton(); - services.AddSingleton(sp => sp.GetService()); - - // Register the skills client and skills request handler. - services.AddSingleton(); - services.AddHttpClient(); - services.AddSingleton(); - - // Register the storage we'll be using for User and Conversation state. (Memory is great for testing purposes.) - services.AddSingleton(); - - // Register Conversation state (used by the Dialog system itself). - services.AddSingleton(); - - // Create SetupDialog - services.AddSingleton(); - - // Register the bot as a transient. In this case the ASP Controller is expecting an IBot. - services.AddTransient(); - - if (!string.IsNullOrEmpty(Configuration["ChannelService"])) - { - // Register a ConfigurationChannelProvider -- this is only for Azure Gov. - services.AddSingleton(); - } - } - - /// - /// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - /// - /// The application request pipeline to be configured. - /// The web hosting environment. - public void Configure(IApplicationBuilder app, IWebHostEnvironment env) - { - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - } - - app.UseDefaultFiles() - .UseStaticFiles() - .UseRouting() - .UseAuthorization() - .UseEndpoints(endpoints => - { - endpoints.MapControllers(); - }); - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/appsettings.json b/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/appsettings.json deleted file mode 100644 index ba463c7c36..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/appsettings.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "MicrosoftAppId": "", - "MicrosoftAppPassword": "", - "ChannelService": "", - "SkillHostEndpoint": "http://localhost:35000/api/skills/", - "BotFrameworkSkills": [ - { - "Id": "EchoSkillBotComposerDotNet", - "AppId": "", - "SkillEndpoint": "http://localhost:35410/api/messages" - }, - { - "Id": "EchoSkillBotDotNet", - "AppId": "", - "SkillEndpoint": "http://localhost:35400/api/messages" - }, - { - "Id": "EchoSkillBotDotNet21", - "AppId": "", - "SkillEndpoint": "http://localhost:35405/api/messages" - }, - { - "Id": "EchoSkillBotDotNetV3", - "AppId": "", - "SkillEndpoint": "http://localhost:35407/api/messages" - }, - { - "Id": "EchoSkillBotJS", - "AppId": "", - "SkillEndpoint": "http://localhost:36400/api/messages" - }, - { - "Id": "EchoSkillBotJSV3", - "AppId": "", - "SkillEndpoint": "http://localhost:36407/api/messages" - }, - { - "Id": "EchoSkillBotPython", - "AppId": "", - "SkillEndpoint": "http://localhost:37400/api/messages" - } - ] -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/wwwroot/default.htm b/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/wwwroot/default.htm deleted file mode 100644 index 8d163da5a0..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot/wwwroot/default.htm +++ /dev/null @@ -1,420 +0,0 @@ - - - - - - - SimpleHostBotDotNet - - - - - -
-
-
-
SimpleRootBotDotNet Bot
-
-
-
-
-
Your bot is ready!
-
You can test your bot in the Bot Framework Emulator
- by connecting to http://localhost:3978/api/messages.
- -
Visit Azure - Bot Service to register your bot and add it to
- various channels. The bot's endpoint URL typically looks - like this:
-
https://your_bots_hostname/api/messages
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/AdapterWithErrorHandler.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/AdapterWithErrorHandler.cs deleted file mode 100644 index 1658551aea..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/AdapterWithErrorHandler.cs +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Integration.AspNet.Core; -using Microsoft.Bot.Builder.Integration.AspNet.Core.Skills; -using Microsoft.Bot.Builder.Skills; -using Microsoft.Bot.Builder.TraceExtensions; -using Microsoft.Bot.Connector.Authentication; -using Microsoft.Bot.Schema; -using Microsoft.BotFrameworkFunctionalTests.WaterfallHostBot.Dialogs; -using Microsoft.BotFrameworkFunctionalTests.WaterfallHostBot.Middleware; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Logging; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallHostBot -{ - public class AdapterWithErrorHandler : BotFrameworkHttpAdapter - { - private readonly IConfiguration _configuration; - private readonly ConversationState _conversationState; - private readonly ILogger _logger; - private readonly SkillHttpClient _skillClient; - private readonly SkillsConfiguration _skillsConfig; - - public AdapterWithErrorHandler(IConfiguration configuration, ILogger logger, ConversationState conversationState, SkillHttpClient skillClient = null, SkillsConfiguration skillsConfig = null) - : base(configuration, logger) - { - _configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); - _conversationState = conversationState ?? throw new ArgumentNullException(nameof(conversationState)); - _logger = logger ?? throw new ArgumentNullException(nameof(logger)); - _skillClient = skillClient; - _skillsConfig = skillsConfig; - - OnTurnError = HandleTurnError; - Use(new LoggerMiddleware(logger)); - } - - private async Task HandleTurnError(ITurnContext turnContext, Exception exception) - { - // Log any leaked exception from the application. - _logger.LogError(exception, $"[OnTurnError] unhandled error : {exception.Message}"); - - await SendErrorMessageAsync(turnContext, exception); - await EndSkillConversationAsync(turnContext); - await ClearConversationStateAsync(turnContext); - } - - private async Task SendErrorMessageAsync(ITurnContext turnContext, Exception exception) - { - try - { - // Send a message to the user. - var errorMessageText = "The bot encountered an error or bug."; - var errorMessage = MessageFactory.Text(errorMessageText, errorMessageText, InputHints.IgnoringInput); - errorMessage.Value = exception; - await turnContext.SendActivityAsync(errorMessage); - - await turnContext.SendActivityAsync($"Exception: {exception.Message}"); - await turnContext.SendActivityAsync(exception.ToString()); - - errorMessageText = "To continue to run this bot, please fix the bot source code."; - errorMessage = MessageFactory.Text(errorMessageText, errorMessageText, InputHints.ExpectingInput); - await turnContext.SendActivityAsync(errorMessage); - - // Send a trace activity, which will be displayed in the Bot Framework Emulator. - await turnContext.TraceActivityAsync("OnTurnError Trace", exception.ToString(), "https://www.botframework.com/schemas/error", "TurnError"); - } - catch (Exception ex) - { - _logger.LogError(ex, $"Exception caught in SendErrorMessageAsync : {ex}"); - } - } - - private async Task EndSkillConversationAsync(ITurnContext turnContext) - { - if (_skillClient == null || _skillsConfig == null) - { - return; - } - - try - { - // Inform the active skill that the conversation is ended so that it has a chance to clean up. - // Note: the root bot manages the ActiveSkillPropertyName, which has a value while the root bot - // has an active conversation with a skill. - var activeSkill = await _conversationState.CreateProperty(MainDialog.ActiveSkillPropertyName).GetAsync(turnContext, () => null); - if (activeSkill != null) - { - var botId = _configuration.GetSection(MicrosoftAppCredentials.MicrosoftAppIdKey)?.Value; - - var endOfConversation = Activity.CreateEndOfConversationActivity(); - endOfConversation.Code = "RootSkillError"; - endOfConversation.ApplyConversationReference(turnContext.Activity.GetConversationReference(), true); - - await _conversationState.SaveChangesAsync(turnContext, true); - await _skillClient.PostActivityAsync(botId, activeSkill, _skillsConfig.SkillHostEndpoint, (Activity)endOfConversation, CancellationToken.None); - } - } - catch (Exception ex) - { - _logger.LogError(ex, $"Exception caught on attempting to send EndOfConversation : {ex}"); - } - } - - private async Task ClearConversationStateAsync(ITurnContext turnContext) - { - try - { - // Delete the conversationState for the current conversation to prevent the - // bot from getting stuck in a error-loop caused by being in a bad state. - // ConversationState should be thought of as similar to "cookie-state" for a Web page. - await _conversationState.DeleteAsync(turnContext); - } - catch (Exception ex) - { - _logger.LogError(ex, $"Exception caught on attempting to Delete ConversationState : {ex}"); - } - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Authentication/AllowedSkillsClaimsValidator.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Authentication/AllowedSkillsClaimsValidator.cs deleted file mode 100644 index 42594c3c85..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Authentication/AllowedSkillsClaimsValidator.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Security.Claims; -using System.Threading.Tasks; -using Microsoft.Bot.Connector.Authentication; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallHostBot.Authentication -{ - /// - /// Sample claims validator that loads an allowed list from configuration if present - /// and checks that responses are coming from configured skills. - /// - public class AllowedSkillsClaimsValidator : ClaimsValidator - { - private readonly List _allowedSkills; - - public AllowedSkillsClaimsValidator(SkillsConfiguration skillsConfig) - { - if (skillsConfig == null) - { - throw new ArgumentNullException(nameof(skillsConfig)); - } - - // Load the appIds for the configured skills (we will only allow responses from skills we have configured). - _allowedSkills = (from skill in skillsConfig.Skills.Values select skill.AppId).ToList(); - } - - public override Task ValidateClaimsAsync(IList claims) - { - if (SkillValidation.IsSkillClaim(claims)) - { - // Check that the appId claim in the skill request is in the list of skills configured for this bot. - var appId = JwtTokenValidation.GetAppIdFromClaims(claims); - if (!_allowedSkills.Contains(appId)) - { - throw new UnauthorizedAccessException($"Received a request from an application with an appID of \"{appId}\". To enable requests from this skill, add the skill to your configuration file."); - } - } - - return Task.CompletedTask; - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Bots/RootBot.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Bots/RootBot.cs deleted file mode 100644 index 75b20d5c30..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Bots/RootBot.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Collections.Generic; -using System.IO; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Dialogs; -using Microsoft.Bot.Schema; -using Newtonsoft.Json; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallHostBot.Bots -{ - public class RootBot : ActivityHandler - where T : Dialog - { - private readonly ConversationState _conversationState; - private readonly Dialog _mainDialog; - - public RootBot(ConversationState conversationState, T mainDialog) - { - _conversationState = conversationState; - _mainDialog = mainDialog; - } - - public override async Task OnTurnAsync(ITurnContext turnContext, CancellationToken cancellationToken = default) - { - if (turnContext.Activity.Type == ActivityTypes.ConversationUpdate) - { - // Let the base class handle the activity (this will trigger OnMembersAdded). - await base.OnTurnAsync(turnContext, cancellationToken); - } - else - { - // Run the Dialog with the Activity. - await _mainDialog.RunAsync(turnContext, _conversationState.CreateProperty("DialogState"), cancellationToken); - } - - // Save any state changes that might have occurred during the turn. - await _conversationState.SaveChangesAsync(turnContext, false, cancellationToken); - } - - protected override async Task OnMembersAddedAsync(IList membersAdded, ITurnContext turnContext, CancellationToken cancellationToken) - { - foreach (var member in membersAdded) - { - // Greet anyone that was not the target (recipient) of this message. - // To learn more about Adaptive Cards, see https://aka.ms/msbot-adaptivecards. - if (member.Id != turnContext.Activity.Recipient.Id) - { - var welcomeCard = CreateAdaptiveCardAttachment(); - var activity = MessageFactory.Attachment(welcomeCard); - activity.Speak = "Welcome to the waterfall host bot"; - await turnContext.SendActivityAsync(activity, cancellationToken); - await _mainDialog.RunAsync(turnContext, _conversationState.CreateProperty("DialogState"), cancellationToken); - } - } - } - - // Load attachment from embedded resource. - private Attachment CreateAdaptiveCardAttachment() - { - var cardResourcePath = "Microsoft.BotFrameworkFunctionalTests.WaterfallHostBot.Cards.welcomeCard.json"; - - using (var stream = GetType().Assembly.GetManifestResourceStream(cardResourcePath)) - { - using (var reader = new StreamReader(stream)) - { - var adaptiveCard = reader.ReadToEnd(); - return new Attachment - { - ContentType = "application/vnd.microsoft.card.adaptive", - Content = JsonConvert.DeserializeObject(adaptiveCard) - }; - } - } - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Cards/welcomeCard.json b/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Cards/welcomeCard.json deleted file mode 100644 index 1fc98a2237..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Cards/welcomeCard.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", - "type": "AdaptiveCard", - "version": "1.0", - "body": [ - { - "type": "Image", - "url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQtB3AwMUeNoq4gUBGe6Ocj8kyh3bXa9ZbV7u1fVKQoyKFHdkqU", - "size": "stretch" - }, - { - "type": "TextBlock", - "spacing": "Medium", - "size": "Medium", - "weight": "Bolder", - "text": "Welcome to the Skill Dialog Sample!", - "wrap": true, - "maxLines": 0, - "color": "Accent" - }, - { - "type": "TextBlock", - "size": "default", - "text": "This sample allows you to connect to a skill using a SkillDialog and invoke several actions.", - "wrap": true, - "maxLines": 0 - } - ] -} \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Controllers/BotController.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Controllers/BotController.cs deleted file mode 100644 index dcf63dabd6..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Controllers/BotController.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Integration.AspNet.Core; -using Microsoft.Extensions.Logging; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallHostBot.Controllers -{ - // This ASP Controller is created to handle a request. Dependency injection will provide the Adapter and IBot - // implementation at runtime. Multiple different IBot implementations running at different endpoints can be - // achieved by specifying a more specific type for the bot constructor argument. - [Route("api/messages")] - [ApiController] - public class BotController : ControllerBase - { - private readonly IBotFrameworkHttpAdapter _adapter; - private readonly IBot _bot; - private readonly ILogger _logger; - - public BotController(BotFrameworkHttpAdapter adapter, IBot bot, ILogger logger) - { - _adapter = adapter; - _bot = bot; - _logger = logger; - } - - [HttpPost] - [HttpGet] - public async Task PostAsync() - { - try - { - // Delegate the processing of the HTTP POST to the adapter. - // The adapter will invoke the bot. - await _adapter.ProcessAsync(Request, Response, _bot); - } - catch (Exception ex) - { - _logger.LogError(ex, "Error processing request"); - throw; - } - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Controllers/SkillController.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Controllers/SkillController.cs deleted file mode 100644 index 82e404550b..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Controllers/SkillController.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Integration.AspNet.Core; -using Microsoft.Bot.Builder.Skills; -using Microsoft.Bot.Schema; -using Microsoft.Extensions.Logging; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallHostBot.Controllers -{ - /// - /// A controller that handles skill replies to the bot. - /// This example uses the that is registered as a in startup.cs. - /// - [ApiController] - [Route("api/skills")] - public class SkillController : ChannelServiceController - { - private readonly ILogger _logger; - - public SkillController(ChannelServiceHandler handler, ILogger logger) - : base(handler) - { - _logger = logger; - } - - public override Task ReplyToActivityAsync(string conversationId, string activityId, Activity activity) - { - try - { - return base.ReplyToActivityAsync(conversationId, activityId, activity); - } - catch (Exception ex) - { - _logger.LogError(ex, "Error processing request"); - throw; - } - } - - public override Task SendToConversationAsync(string conversationId, Activity activity) - { - try - { - return base.SendToConversationAsync(conversationId, activity); - } - catch (Exception ex) - { - _logger.LogError(ex, "Error processing request"); - throw; - } - } - - public override Task UpdateActivityAsync(string conversationId, string activityId, Activity activity) - { - try - { - return base.UpdateActivityAsync(conversationId, activityId, activity); - } - catch (Exception ex) - { - _logger.LogError(ex, "Error processing request"); - throw; - } - } - - public override Task DeleteActivityAsync(string conversationId, string activityId) - { - try - { - return base.DeleteActivityAsync(conversationId, activityId); - } - catch (Exception ex) - { - _logger.LogError(ex, "Error processing request"); - throw; - } - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Dialogs/MainDialog.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Dialogs/MainDialog.cs deleted file mode 100644 index 17b08d3f58..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Dialogs/MainDialog.cs +++ /dev/null @@ -1,345 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Dialogs; -using Microsoft.Bot.Builder.Dialogs.Choices; -using Microsoft.Bot.Builder.Integration.AspNet.Core.Skills; -using Microsoft.Bot.Builder.Skills; -using Microsoft.Bot.Connector.Authentication; -using Microsoft.Bot.Schema; -using Microsoft.BotFrameworkFunctionalTests.WaterfallHostBot.Dialogs.Sso; -using Microsoft.BotFrameworkFunctionalTests.WaterfallHostBot.Skills; -using Microsoft.Extensions.Configuration; -using Newtonsoft.Json; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallHostBot.Dialogs -{ - /// - /// The main dialog for this bot. It uses a to call skills. - /// - public class MainDialog : ComponentDialog - { - // State property key that stores the active skill (used in AdapterWithErrorHandler to terminate the skills on error). - public static readonly string ActiveSkillPropertyName = $"{typeof(MainDialog).FullName}.ActiveSkillProperty"; - - private const string SsoDialogPrefix = "Sso"; - private readonly IStatePropertyAccessor _activeSkillProperty; - private readonly string _deliveryMode = $"{typeof(MainDialog).FullName}.DeliveryMode"; - private readonly string _selectedSkillKey = $"{typeof(MainDialog).FullName}.SelectedSkillKey"; - private readonly SkillsConfiguration _skillsConfig; - private readonly IConfiguration _configuration; - - // Dependency injection uses this constructor to instantiate MainDialog. - public MainDialog(ConversationState conversationState, SkillConversationIdFactoryBase conversationIdFactory, SkillHttpClient skillClient, SkillsConfiguration skillsConfig, IConfiguration configuration) - : base(nameof(MainDialog)) - { - _configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); - - var botId = configuration.GetSection(MicrosoftAppCredentials.MicrosoftAppIdKey)?.Value; - - _skillsConfig = skillsConfig ?? throw new ArgumentNullException(nameof(skillsConfig)); - - if (skillClient == null) - { - throw new ArgumentNullException(nameof(skillClient)); - } - - if (conversationState == null) - { - throw new ArgumentNullException(nameof(conversationState)); - } - - // Create state property to track the active skill. - _activeSkillProperty = conversationState.CreateProperty(ActiveSkillPropertyName); - - // Register the tangent dialog for testing tangents and resume - AddDialog(new TangentDialog()); - - // Create and add SkillDialog instances for the configured skills. - AddSkillDialogs(conversationState, conversationIdFactory, skillClient, skillsConfig, botId); - - // Add ChoicePrompt to render available delivery modes. - AddDialog(new ChoicePrompt("DeliveryModePrompt")); - - // Add ChoicePrompt to render available groups of skills. - AddDialog(new ChoicePrompt("SkillGroupPrompt")); - - // Add ChoicePrompt to render available skills. - AddDialog(new ChoicePrompt("SkillPrompt")); - - // Add ChoicePrompt to render skill actions. - AddDialog(new ChoicePrompt("SkillActionPrompt")); - - // Special case: register SSO dialogs for skills that support SSO actions. - AddSsoDialogs(configuration); - - // Add main waterfall dialog for this bot. - var waterfallSteps = new WaterfallStep[] - { - SelectDeliveryModeStepAsync, - SelectSkillGroupStepAsync, - SelectSkillStepAsync, - SelectSkillActionStepAsync, - CallSkillActionStepAsync, - FinalStepAsync - }; - AddDialog(new WaterfallDialog(nameof(WaterfallDialog), waterfallSteps)); - - // The initial child Dialog to run. - InitialDialogId = nameof(WaterfallDialog); - } - - /// - /// This override is used to test the "abort" command to interrupt skills from the parent and - /// also to test the "tangent" command to start a tangent and resume a skill. - /// - /// The inner for the current turn of conversation. - /// A cancellation token that can be used by other objects - /// or threads to receive notice of cancellation. - /// A representing the asynchronous operation. - protected override async Task OnContinueDialogAsync(DialogContext innerDc, CancellationToken cancellationToken = default) - { - // This is an example on how to cancel a SkillDialog that is currently in progress from the parent bot. - var activeSkill = await _activeSkillProperty.GetAsync(innerDc.Context, () => null, cancellationToken); - var activity = innerDc.Context.Activity; - if (activeSkill != null && activity.Type == ActivityTypes.Message && !string.IsNullOrWhiteSpace(activity.Text) && activity.Text.Equals("abort", StringComparison.CurrentCultureIgnoreCase)) - { - // Cancel all dialogs when the user says abort. - // The SkillDialog automatically sends an EndOfConversation message to the skill to let the - // skill know that it needs to end its current dialogs, too. - await innerDc.CancelAllDialogsAsync(cancellationToken); - return await innerDc.ReplaceDialogAsync(InitialDialogId, "Canceled! \n\n What delivery mode would you like to use?", cancellationToken); - } - - // Sample to test a tangent when in the middle of a skill conversation. - if (activeSkill != null && activity.Type == ActivityTypes.Message && !string.IsNullOrWhiteSpace(activity.Text) && activity.Text.Equals("tangent", StringComparison.CurrentCultureIgnoreCase)) - { - // Start tangent. - return await innerDc.BeginDialogAsync(nameof(TangentDialog), cancellationToken: cancellationToken); - } - - return await base.OnContinueDialogAsync(innerDc, cancellationToken); - } - - // Render a prompt to select the delivery mode to use. - private async Task SelectDeliveryModeStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - // Create the PromptOptions with the delivery modes supported. - var messageText = stepContext.Options?.ToString() ?? "What delivery mode would you like to use?"; - const string retryMessageText = "That was not a valid choice, please select a valid delivery mode."; - var choices = new List - { - new Choice(DeliveryModes.Normal), - new Choice(DeliveryModes.ExpectReplies) - }; - var options = new PromptOptions - { - Prompt = MessageFactory.Text(messageText, messageText, InputHints.ExpectingInput), - RetryPrompt = MessageFactory.Text(retryMessageText, retryMessageText, InputHints.ExpectingInput), - Choices = choices - }; - - // Prompt the user to select a delivery mode. - return await stepContext.PromptAsync("DeliveryModePrompt", options, cancellationToken); - } - - // Render a prompt to select the group of skills to use. - private async Task SelectSkillGroupStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - // Remember the delivery mode selected by the user. - stepContext.Values[_deliveryMode] = ((FoundChoice)stepContext.Result).Value; - - // Create the PromptOptions with the types of supported skills. - const string messageText = "What group of skills would you like to use?"; - const string retryMessageText = "That was not a valid choice, please select a valid skill group."; - - // Use linq to get a list of the groups for the skills in skillsConfig. - var choices = _skillsConfig.Skills - .GroupBy(skill => skill.Value.Group) - .Select(skillGroup => new Choice(skillGroup.First().Value.Group)) - .ToList(); - - var options = new PromptOptions - { - Prompt = MessageFactory.Text(messageText, messageText, InputHints.ExpectingInput), - RetryPrompt = MessageFactory.Text(retryMessageText, retryMessageText, InputHints.ExpectingInput), - Choices = choices - }; - - // Prompt the user to select a type of skill. - return await stepContext.PromptAsync("SkillGroupPrompt", options, cancellationToken); - } - - // Render a prompt to select the skill to call. - private async Task SelectSkillStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - var skillGroup = ((FoundChoice)stepContext.Result).Value; - - // Create the PromptOptions from the skill configuration which contain the list of configured skills. - const string messageText = "What skill would you like to call?"; - const string retryMessageText = "That was not a valid choice, please select a valid skill."; - - // Use linq to return the skills for the selected group. - var choices = _skillsConfig.Skills - .Where(skill => skill.Value.Group == skillGroup) - .Select(skill => new Choice(skill.Value.Id)) - .ToList(); - - var options = new PromptOptions - { - Prompt = MessageFactory.Text(messageText, messageText, InputHints.ExpectingInput), - RetryPrompt = MessageFactory.Text(retryMessageText, retryMessageText, InputHints.ExpectingInput), - Choices = choices - }; - - // Prompt the user to select a skill. - return await stepContext.PromptAsync("SkillPrompt", options, cancellationToken); - } - - // Render a prompt to select the begin action for the skill. - private async Task SelectSkillActionStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - // Get the skill info based on the selected skill. - var selectedSkillId = ((FoundChoice)stepContext.Result).Value; - var deliveryMode = stepContext.Values[_deliveryMode].ToString(); - var v3Bots = new List { "EchoSkillBotDotNetV3", "EchoSkillBotJSV3" }; - - // Exclude v3 bots from ExpectReplies - if (deliveryMode == DeliveryModes.ExpectReplies && v3Bots.Contains(selectedSkillId)) - { - await stepContext.Context.SendActivityAsync(MessageFactory.Text("V3 Bots do not support 'expectReplies' delivery mode."), cancellationToken); - - // Restart setup dialog - return await stepContext.ReplaceDialogAsync(InitialDialogId, null, cancellationToken); - } - - var selectedSkill = _skillsConfig.Skills.FirstOrDefault(keyValuePair => keyValuePair.Value.Id == selectedSkillId).Value; - - // Remember the skill selected by the user. - stepContext.Values[_selectedSkillKey] = selectedSkill; - - var skillActionChoices = selectedSkill.GetActions().Select(action => new Choice(action)).ToList(); - if (skillActionChoices.Count == 1) - { - // The skill only supports one action (e.g. Echo), skip the prompt. - return await stepContext.NextAsync(new FoundChoice { Value = skillActionChoices[0].Value }, cancellationToken); - } - - // Create the PromptOptions with the actions supported by the selected skill. - var messageText = $"Select an action to send to **{selectedSkill.Id}**."; - var options = new PromptOptions - { - Prompt = MessageFactory.Text(messageText, messageText, InputHints.ExpectingInput), - Choices = skillActionChoices - }; - - // Prompt the user to select a skill action. - return await stepContext.PromptAsync("SkillActionPrompt", options, cancellationToken); - } - - // Starts the SkillDialog based on the user's selections. - private async Task CallSkillActionStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - var selectedSkill = (SkillDefinition)stepContext.Values[_selectedSkillKey]; - - // Save active skill in state. - await _activeSkillProperty.SetAsync(stepContext.Context, selectedSkill, cancellationToken); - - // Create the initial activity to call the skill. - var skillActivity = selectedSkill.CreateBeginActivity(((FoundChoice)stepContext.Result).Value); - if (skillActivity.Name == "Sso") - { - // Special case, we start the SSO dialog to prepare the host to call the skill. - return await stepContext.BeginDialogAsync($"{SsoDialogPrefix}{selectedSkill.Id}", cancellationToken: cancellationToken); - } - - // We are manually creating the activity to send to the skill; ensure we add the ChannelData and Properties - // from the original activity so the skill gets them. - // Note: this is not necessary if we are just forwarding the current activity from context. - skillActivity.ChannelData = stepContext.Context.Activity.ChannelData; - skillActivity.Properties = stepContext.Context.Activity.Properties; - - // Create the BeginSkillDialogOptions and assign the activity to send. - var skillDialogArgs = new BeginSkillDialogOptions { Activity = skillActivity }; - - if (stepContext.Values[_deliveryMode].ToString() == DeliveryModes.ExpectReplies) - { - skillDialogArgs.Activity.DeliveryMode = DeliveryModes.ExpectReplies; - } - - // Start the skillDialog instance with the arguments. - return await stepContext.BeginDialogAsync(selectedSkill.Id, skillDialogArgs, cancellationToken); - } - - // The SkillDialog has ended, render the results (if any) and restart MainDialog. - private async Task FinalStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - var activeSkill = await _activeSkillProperty.GetAsync(stepContext.Context, () => null, cancellationToken); - - // Check if the skill returned any results and display them. - if (stepContext.Result != null) - { - var message = $"Skill \"{activeSkill.Id}\" invocation complete."; - message += $" Result: {JsonConvert.SerializeObject(stepContext.Result)}"; - await stepContext.Context.SendActivityAsync(MessageFactory.Text(message, message, inputHint: InputHints.IgnoringInput), cancellationToken: cancellationToken); - } - - // Clear the delivery mode selected by the user. - stepContext.Values[_deliveryMode] = null; - - // Clear the skill selected by the user. - stepContext.Values[_selectedSkillKey] = null; - - // Clear active skill in state. - await _activeSkillProperty.DeleteAsync(stepContext.Context, cancellationToken); - - // Restart the main dialog with a different message the second time around. - return await stepContext.ReplaceDialogAsync(InitialDialogId, $"Done with \"{activeSkill.Id}\". \n\n What delivery mode would you like to use?", cancellationToken); - } - - // Helper method that creates and adds SkillDialog instances for the configured skills. - private void AddSkillDialogs(ConversationState conversationState, SkillConversationIdFactoryBase conversationIdFactory, SkillHttpClient skillClient, SkillsConfiguration skillsConfig, string botId) - { - foreach (var skillInfo in _skillsConfig.Skills.Values) - { - // Create the dialog options. - var skillDialogOptions = new SkillDialogOptions - { - BotId = botId, - ConversationIdFactory = conversationIdFactory, - SkillClient = skillClient, - SkillHostEndpoint = skillsConfig.SkillHostEndpoint, - ConversationState = conversationState, - Skill = skillInfo - }; - - // Add a SkillDialog for the selected skill. - AddDialog(new SkillDialog(skillDialogOptions, skillInfo.Id)); - } - } - - // Special case. - // SSO needs a dialog in the host to allow the user to sign in. - // We create and several SsoDialog instances for each skill that supports SSO. - private void AddSsoDialogs(IConfiguration configuration) - { - var connectionName = configuration.GetSection("SsoConnectionName")?.Value; - foreach (var ssoSkillDialog in Dialogs.GetDialogs().Where(dialog => dialog.Id.StartsWith("WaterfallSkillBot")).ToList()) - { - AddDialog(new SsoDialog($"{SsoDialogPrefix}{ssoSkillDialog.Id}", ssoSkillDialog, connectionName)); - } - - connectionName = configuration.GetSection("SsoConnectionNameTeams")?.Value; - foreach (var ssoSkillDialog in Dialogs.GetDialogs().Where(dialog => dialog.Id.StartsWith("TeamsSkillBot")).ToList()) - { - AddDialog(new SsoDialog($"{SsoDialogPrefix}{ssoSkillDialog.Id}", ssoSkillDialog, connectionName)); - } - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Dialogs/Sso/SsoDialog.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Dialogs/Sso/SsoDialog.cs deleted file mode 100644 index 9e88adc417..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Dialogs/Sso/SsoDialog.cs +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Dialogs; -using Microsoft.Bot.Builder.Dialogs.Choices; -using Microsoft.Bot.Schema; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallHostBot.Dialogs.Sso -{ - /// - /// Helps prepare the host for SSO operations and provides helpers to check the status and invoke the skill. - /// - public class SsoDialog : ComponentDialog - { - private readonly string _connectionName; - private readonly string _skillDialogId; - - public SsoDialog(string dialogId, Dialog ssoSkillDialog, string connectionName) - : base(dialogId) - { - _connectionName = connectionName; - _skillDialogId = ssoSkillDialog.Id; - - AddDialog(new ChoicePrompt("ActionStepPrompt")); - AddDialog(new SsoSignInDialog(_connectionName)); - AddDialog(ssoSkillDialog); - - var waterfallSteps = new WaterfallStep[] - { - PromptActionStepAsync, - HandleActionStepAsync, - PromptFinalStepAsync, - }; - - AddDialog(new WaterfallDialog(nameof(WaterfallDialog), waterfallSteps)); - - InitialDialogId = nameof(WaterfallDialog); - } - - private async Task PromptActionStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - var messageText = "What SSO action do you want to perform?"; - var repromptMessageText = "That was not a valid choice, please select a valid choice."; - var options = new PromptOptions - { - Prompt = MessageFactory.Text(messageText, messageText, InputHints.ExpectingInput), - RetryPrompt = MessageFactory.Text(repromptMessageText, repromptMessageText, InputHints.ExpectingInput), - Choices = await GetPromptChoicesAsync(stepContext, cancellationToken) - }; - - // Prompt the user to select a skill. - return await stepContext.PromptAsync("ActionStepPrompt", options, cancellationToken); - } - - // Create the prompt choices based on the current sign in status - private async Task> GetPromptChoicesAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - var promptChoices = new List(); - var adapter = (IUserTokenProvider)stepContext.Context.Adapter; - var token = await adapter.GetUserTokenAsync(stepContext.Context, _connectionName, null, cancellationToken); - - if (token == null) - { - promptChoices.Add(new Choice("Login")); - - // Token exchange will fail when the host is not logged on and the skill should - // show a regular OAuthPrompt - promptChoices.Add(new Choice("Call Skill (without SSO)")); - } - else - { - promptChoices.Add(new Choice("Logout")); - promptChoices.Add(new Choice("Show token")); - promptChoices.Add(new Choice("Call Skill (with SSO)")); - } - - promptChoices.Add(new Choice("Back")); - - return promptChoices; - } - - private async Task HandleActionStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - var action = ((FoundChoice)stepContext.Result).Value.ToLowerInvariant(); - - switch (action) - { - case "login": - return await stepContext.BeginDialogAsync(nameof(SsoSignInDialog), null, cancellationToken); - - case "logout": - var adapter = (IUserTokenProvider)stepContext.Context.Adapter; - await adapter.SignOutUserAsync(stepContext.Context, _connectionName, cancellationToken: cancellationToken); - await stepContext.Context.SendActivityAsync("You have been signed out.", cancellationToken: cancellationToken); - return await stepContext.NextAsync(cancellationToken: cancellationToken); - - case "show token": - var tokenProvider = (IUserTokenProvider)stepContext.Context.Adapter; - var token = await tokenProvider.GetUserTokenAsync(stepContext.Context, _connectionName, null, cancellationToken); - if (token == null) - { - await stepContext.Context.SendActivityAsync("User has no cached token.", cancellationToken: cancellationToken); - } - else - { - await stepContext.Context.SendActivityAsync($"Here is your current SSO token: {token.Token}", cancellationToken: cancellationToken); - } - - return await stepContext.NextAsync(cancellationToken: cancellationToken); - - case "call skill (with sso)": - case "call skill (without sso)": - var beginSkillActivity = new Activity - { - Type = ActivityTypes.Event, - Name = "Sso" - }; - - return await stepContext.BeginDialogAsync(_skillDialogId, new BeginSkillDialogOptions { Activity = beginSkillActivity }, cancellationToken); - - case "back": - return new DialogTurnResult(DialogTurnStatus.Complete); - - default: - // This should never be hit since the previous prompt validates the choice - throw new InvalidOperationException($"Unrecognized action: {action}"); - } - } - - private async Task PromptFinalStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - // Restart the dialog (we will exit when the user says end) - return await stepContext.ReplaceDialogAsync(InitialDialogId, null, cancellationToken); - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Dialogs/Sso/SsoSignInDialog.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Dialogs/Sso/SsoSignInDialog.cs deleted file mode 100644 index 9529a192d5..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Dialogs/Sso/SsoSignInDialog.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Bot.Builder.Dialogs; -using Microsoft.Bot.Schema; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallHostBot.Dialogs.Sso -{ - public class SsoSignInDialog : ComponentDialog - { - public SsoSignInDialog(string connectionName) - : base(nameof(SsoSignInDialog)) - { - AddDialog(new OAuthPrompt( - nameof(OAuthPrompt), - new OAuthPromptSettings - { - ConnectionName = connectionName, - Text = $"Sign in to the host bot using AAD for SSO and connection {connectionName}", - Title = "Sign In", - Timeout = 60000 - })); - AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[] { SignInStepAsync, DisplayTokenAsync })); - InitialDialogId = nameof(WaterfallDialog); - } - - private async Task SignInStepAsync(WaterfallStepContext context, CancellationToken cancellationToken) - { - return await context.BeginDialogAsync(nameof(OAuthPrompt), null, cancellationToken); - } - - private async Task DisplayTokenAsync(WaterfallStepContext context, CancellationToken cancellationToken) - { - if (!(context.Result is TokenResponse result)) - { - await context.Context.SendActivityAsync("No token was provided.", cancellationToken: cancellationToken); - } - else - { - await context.Context.SendActivityAsync($"Here is your token: {result.Token}", cancellationToken: cancellationToken); - } - - return await context.EndDialogAsync(null, cancellationToken); - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Dialogs/TangentDialog.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Dialogs/TangentDialog.cs deleted file mode 100644 index 1962319bab..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Dialogs/TangentDialog.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Dialogs; -using Microsoft.Bot.Schema; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallHostBot.Dialogs -{ - /// - /// A simple waterfall dialog used to test triggering tangents from . - /// - public class TangentDialog : ComponentDialog - { - public TangentDialog(string dialogId = nameof(TangentDialog)) - : base(dialogId) - { - AddDialog(new TextPrompt(nameof(TextPrompt))); - var waterfallSteps = new WaterfallStep[] - { - Step1Async, - Step2Async, - EndStepAsync - }; - AddDialog(new WaterfallDialog(nameof(WaterfallDialog), waterfallSteps)); - - InitialDialogId = nameof(WaterfallDialog); - } - - private async Task Step1Async(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - var messageText = "Tangent step 1 of 2, say something."; - var promptMessage = MessageFactory.Text(messageText, messageText, InputHints.ExpectingInput); - return await stepContext.PromptAsync(nameof(TextPrompt), new PromptOptions { Prompt = promptMessage }, cancellationToken); - } - - private async Task Step2Async(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - var messageText = "Tangent step 2 of 2, say something."; - var promptMessage = MessageFactory.Text(messageText, messageText, InputHints.ExpectingInput); - return await stepContext.PromptAsync(nameof(TextPrompt), new PromptOptions { Prompt = promptMessage }, cancellationToken); - } - - private async Task EndStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - return await stepContext.EndDialogAsync(cancellationToken: cancellationToken); - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Middleware/LoggerMiddleware.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Middleware/LoggerMiddleware.cs deleted file mode 100644 index 9485dffbda..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Middleware/LoggerMiddleware.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Integration.AspNet.Core; -using Microsoft.Bot.Schema; -using Microsoft.Extensions.Logging; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallHostBot.Middleware -{ - /// - /// Uses an ILogger instance to log user and bot messages. It filters out ContinueConversation events coming from skill responses. - /// - public class LoggerMiddleware : IMiddleware - { - private readonly ILogger _logger; - - public LoggerMiddleware(ILogger logger) - { - _logger = logger ?? throw new ArgumentNullException(nameof(logger)); - } - - public async Task OnTurnAsync(ITurnContext turnContext, NextDelegate next, CancellationToken cancellationToken = default) - { - // Note: skill responses will show as ContinueConversation events; we don't log those. - // We only log incoming messages from users. - if (!(turnContext.Activity.Type == ActivityTypes.Event && turnContext.Activity.Name == ActivityEventNames.ContinueConversation)) - { - var message = $"User said: {turnContext.Activity.Text} Type: \"{turnContext.Activity.Type}\" Name: \"{turnContext.Activity.Name}\""; - _logger.LogInformation(message); - } - - // Register outgoing handler. - turnContext.OnSendActivities(OutgoingHandler); - - // Continue processing messages. - await next(cancellationToken); - } - - private async Task OutgoingHandler(ITurnContext turnContext, List activities, Func> next) - { - foreach (var activity in activities) - { - var message = $"Bot said: {activity.Text} Type: \"{activity.Type}\" Name: \"{activity.Name}\""; - _logger.LogInformation(message); - } - - return await next(); - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Program.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Program.cs deleted file mode 100644 index 306d8a19a4..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Program.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Hosting; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallHostBot -{ - public class Program - { - public static void Main(string[] args) - { - CreateHostBuilder(args).Build().Run(); - } - - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup(); - }); - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Properties/launchSettings.json b/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Properties/launchSettings.json deleted file mode 100644 index dafa6f0bc2..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Properties/launchSettings.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:35020", - "sslPort": 0 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "WaterfallHostBot": { - "commandName": "Project", - "launchBrowser": true, - "applicationUrl": "http://localhost:35020", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Skills/EchoSkill.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Skills/EchoSkill.cs deleted file mode 100644 index 7ff87fa16c..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Skills/EchoSkill.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using Microsoft.Bot.Schema; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallHostBot.Skills -{ - public class EchoSkill : SkillDefinition - { - private enum SkillAction - { - Message - } - - public override IList GetActions() - { - return new List { SkillAction.Message.ToString() }; - } - - public override Activity CreateBeginActivity(string actionId) - { - if (!Enum.TryParse(actionId, true, out _)) - { - throw new InvalidOperationException($"Unable to create begin activity for \"{actionId}\"."); - } - - // We only support one activity for Echo so no further checks are needed - return new Activity(ActivityTypes.Message) - { - Name = SkillAction.Message.ToString(), - Text = "Begin the Echo Skill." - }; - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Skills/SkillDefinition.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Skills/SkillDefinition.cs deleted file mode 100644 index e150259058..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Skills/SkillDefinition.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using Microsoft.Bot.Builder.Skills; -using Microsoft.Bot.Schema; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallHostBot.Skills -{ - /// - /// Extends and provides methods to return the actions and the begin activity to start a skill. - /// This class also exposes a group property to render skill groups and narrow down the available options. - /// - /// - /// This is just a temporary implementation, ideally, this should be replaced by logic that parses a manifest and creates - /// what's needed. - /// - public class SkillDefinition : BotFrameworkSkill - { - public string Group { get; set; } - - public virtual IList GetActions() - { - throw new NotImplementedException(); - } - - public virtual Activity CreateBeginActivity(string actionId) - { - throw new NotImplementedException(); - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Skills/TeamsSkill.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Skills/TeamsSkill.cs deleted file mode 100644 index 3975757a47..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Skills/TeamsSkill.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using Microsoft.Bot.Schema; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallHostBot.Skills -{ - public class TeamsSkill : SkillDefinition - { - private enum SkillAction - { - TeamsTaskModule, - TeamsCardAction, - TeamsConversation, - Cards, - Proactive, - Attachment, - Auth, - Sso, - Echo, - FileUpload, - Delete, - Update, - } - - public override IList GetActions() - { - return Enum.GetNames(typeof(SkillAction)); - } - - public override Activity CreateBeginActivity(string actionId) - { - if (!Enum.TryParse(actionId, true, out var skillAction)) - { - throw new InvalidOperationException($"Unable to create begin activity for \"{actionId}\"."); - } - - // We don't support special parameters in these skills so a generic event with the right name - // will do in this case. - return new Activity(ActivityTypes.Event) { Name = skillAction.ToString() }; - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Skills/WaterfallSkill.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Skills/WaterfallSkill.cs deleted file mode 100644 index 9725c05217..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Skills/WaterfallSkill.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using Microsoft.Bot.Schema; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallHostBot.Skills -{ - public class WaterfallSkill : SkillDefinition - { - private enum SkillAction - { - Cards, - Proactive, - Auth, - MessageWithAttachment, - Sso, - FileUpload, - Echo, - Delete, - Update - } - - public override IList GetActions() - { - return Enum.GetNames(typeof(SkillAction)); - } - - public override Activity CreateBeginActivity(string actionId) - { - if (!Enum.TryParse(actionId, true, out var skillAction)) - { - throw new InvalidOperationException($"Unable to create begin activity for \"{actionId}\"."); - } - - // We don't support special parameters in these skills so a generic event with the right name - // will do in this case. - return new Activity(ActivityTypes.Event) { Name = skillAction.ToString() }; - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/SkillsConfiguration.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/SkillsConfiguration.cs deleted file mode 100644 index 2c80655e23..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/SkillsConfiguration.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using Microsoft.Bot.Builder.Dialogs; -using Microsoft.BotFrameworkFunctionalTests.WaterfallHostBot.Skills; -using Microsoft.Extensions.Configuration; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallHostBot -{ - /// - /// A helper class that loads Skills information from configuration. - /// - /// - /// This class loads the skill settings from config and casts them into derived types of - /// so we can render prompts with the skills and in their groups. - /// - public class SkillsConfiguration - { - public SkillsConfiguration(IConfiguration configuration) - { - var section = configuration?.GetSection("BotFrameworkSkills"); - var skills = section?.Get(); - if (skills != null) - { - foreach (var skill in skills) - { - Skills.Add(skill.Id, CreateSkillDefinition(skill)); - } - } - - var skillHostEndpoint = configuration?.GetValue(nameof(SkillHostEndpoint)); - if (!string.IsNullOrWhiteSpace(skillHostEndpoint)) - { - SkillHostEndpoint = new Uri(skillHostEndpoint); - } - } - - public Uri SkillHostEndpoint { get; } - - public Dictionary Skills { get; } = new Dictionary(); - - private static SkillDefinition CreateSkillDefinition(SkillDefinition skill) - { - // Note: we hard code this for now, we should dynamically create instances based on the manifests. - // For now, this code creates a strong typed version of the SkillDefinition based on the skill group - // and copies the info from settings into it. - SkillDefinition skillDefinition; - switch (skill.Group) - { - case "Echo": - skillDefinition = ObjectPath.Assign(new EchoSkill(), skill); - break; - case "Waterfall": - skillDefinition = ObjectPath.Assign(new WaterfallSkill(), skill); - break; - case "Teams": - skillDefinition = ObjectPath.Assign(new TeamsSkill(), skill); - break; - default: - throw new Exception($"Unable to find definition class for {skill.Id}."); - } - - return skillDefinition; - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Startup.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Startup.cs deleted file mode 100644 index 3795f176d8..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/Startup.cs +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.BotFramework; -using Microsoft.Bot.Builder.Integration.AspNet.Core; -using Microsoft.Bot.Builder.Integration.AspNet.Core.Skills; -using Microsoft.Bot.Builder.Skills; -using Microsoft.Bot.Connector.Authentication; -using Microsoft.BotFrameworkFunctionalTests.WaterfallHostBot.Authentication; -using Microsoft.BotFrameworkFunctionalTests.WaterfallHostBot.Bots; -using Microsoft.BotFrameworkFunctionalTests.WaterfallHostBot.Dialogs; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallHostBot -{ - public class Startup - { - public Startup(IConfiguration configuration) - { - Configuration = configuration; - } - - public IConfiguration Configuration { get; } - - // This method gets called by the runtime. Use this method to add services to the container. - public void ConfigureServices(IServiceCollection services) - { - services.AddControllers() - .AddNewtonsoftJson(); - - // Register credential provider. - services.AddSingleton(); - - // Register the skills configuration class. - services.AddSingleton(); - - // Register AuthConfiguration to enable custom claim validation. - services.AddSingleton(sp => new AuthenticationConfiguration { ClaimsValidator = new AllowedSkillsClaimsValidator(sp.GetService()) }); - - // Register the Bot Framework Adapter with error handling enabled. - // Note: some classes expect a BotAdapter and some expect a BotFrameworkHttpAdapter, so - // register the same adapter instance for both types. - services.AddSingleton(); - services.AddSingleton(sp => sp.GetService()); - - // Register the skills conversation ID factory, the client and the request handler. - services.AddSingleton(); - services.AddHttpClient(); - - //services.AddSingleton(); - services.AddSingleton(); - - // Register the storage we'll be using for User and Conversation state. (Memory is great for testing purposes.) - services.AddSingleton(); - - // Register Conversation state (used by the Dialog system itself). - services.AddSingleton(); - services.AddSingleton(); - - // Register the MainDialog that will be run by the bot. - services.AddSingleton(); - - // Register the bot as a transient. In this case the ASP Controller is expecting an IBot. - services.AddTransient>(); - } - - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IWebHostEnvironment env) - { - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - } - - app.UseDefaultFiles(); - app.UseStaticFiles(); - - // Uncomment this to support HTTPS. - // app.UseHttpsRedirection(); - - app.UseRouting(); - - app.UseWebSockets(); - - app.UseAuthorization(); - - app.UseEndpoints(endpoints => - { - endpoints.MapControllers(); - }); - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/TeamsAppManifest/icon-color.png b/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/TeamsAppManifest/icon-color.png deleted file mode 100644 index 48a2de1330..0000000000 Binary files a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/TeamsAppManifest/icon-color.png and /dev/null differ diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/TeamsAppManifest/icon-outline.png b/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/TeamsAppManifest/icon-outline.png deleted file mode 100644 index dbfa927729..0000000000 Binary files a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/TeamsAppManifest/icon-outline.png and /dev/null differ diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/TeamsAppManifest/manifest.json b/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/TeamsAppManifest/manifest.json deleted file mode 100644 index 8811c44538..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/TeamsAppManifest/manifest.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.7/MicrosoftTeams.schema.json", - "manifestVersion": "1.7", - "version": "1.0.0", - "id": "", - "packageName": "com.microsoft.botframeworkfunctionaltests.teamswaterfall", - "developer": { - "name": "Microsoft", - "websiteUrl": "https://example.azurewebsites.net", - "privacyUrl": "https://example.azurewebsites.net/privacy", - "termsOfUseUrl": "https://example.azurewebsites.net/termsofuse" - }, - "icons": { - "color": "icon-color.png", - "outline": "icon-outline.png" - }, - "name": { - "short": "Teams Waterfall", - "full": "Teams Waterfall" - }, - "description": { - "short": "Teams Waterfall", - "full": "Teams Waterfall" - }, - "accentColor": "#FFFFFF", - "bots": [ - { - "botId": "", - "scopes": [ - "personal", - "groupchat", - "team" - ], - "supportsFiles": true, - "isNotificationOnly": false - } - ], - "webApplicationInfo": { - "id": "", - "resource": "api://botid-" - }, - "permissions": [ - "identity", - "messageTeamMembers" - ], - "validDomains": [ - "token.botframework.com", - "ngrok.io" - ] -} \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/TokenExchangeSkillHandler.cs b/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/TokenExchangeSkillHandler.cs deleted file mode 100644 index 18871b357c..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/TokenExchangeSkillHandler.cs +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Globalization; -using System.Linq; -using System.Security.Claims; -using System.Security.Principal; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Integration.AspNet.Core.Skills; -using Microsoft.Bot.Builder.Skills; -using Microsoft.Bot.Connector.Authentication; -using Microsoft.Bot.Schema; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Logging.Abstractions; -using Newtonsoft.Json.Linq; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallHostBot -{ - /// - /// A specialized to support SSO Token exchanges. - /// - public class TokenExchangeSkillHandler : SkillHandler - { - private const string WaterfallSkillBot = "WaterfallSkillBot"; - - private readonly BotAdapter _adapter; - private readonly SkillsConfiguration _skillsConfig; - private readonly SkillHttpClient _skillClient; - private readonly string _botId; - private readonly SkillConversationIdFactoryBase _conversationIdFactory; - private readonly ILogger _logger; - private readonly IExtendedUserTokenProvider _tokenExchangeProvider; - private readonly IConfiguration _configuration; - - public TokenExchangeSkillHandler( - BotAdapter adapter, - IBot bot, - IConfiguration configuration, - SkillConversationIdFactoryBase conversationIdFactory, - SkillsConfiguration skillsConfig, - SkillHttpClient skillClient, - ICredentialProvider credentialProvider, - AuthenticationConfiguration authConfig, - IChannelProvider channelProvider = null, - ILogger logger = null) - : base(adapter, bot, conversationIdFactory, credentialProvider, authConfig, channelProvider, logger) - { - _adapter = adapter; - _tokenExchangeProvider = adapter as IExtendedUserTokenProvider; - if (_tokenExchangeProvider == null) - { - throw new ArgumentException($"{nameof(adapter)} does not support token exchange"); - } - - _configuration = configuration; - _skillsConfig = skillsConfig; - _skillClient = skillClient; - _conversationIdFactory = conversationIdFactory; - _logger = logger ?? NullLogger.Instance; - _botId = configuration.GetSection(MicrosoftAppCredentials.MicrosoftAppIdKey)?.Value; - } - - protected override async Task OnSendToConversationAsync(ClaimsIdentity claimsIdentity, string conversationId, Activity activity, CancellationToken cancellationToken = default(CancellationToken)) - { - if (await InterceptOAuthCards(claimsIdentity, activity).ConfigureAwait(false)) - { - return new ResourceResponse(Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture)); - } - - return await base.OnSendToConversationAsync(claimsIdentity, conversationId, activity, cancellationToken).ConfigureAwait(false); - } - - protected override async Task OnReplyToActivityAsync(ClaimsIdentity claimsIdentity, string conversationId, string activityId, Activity activity, CancellationToken cancellationToken = default(CancellationToken)) - { - if (await InterceptOAuthCards(claimsIdentity, activity).ConfigureAwait(false)) - { - return new ResourceResponse(Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture)); - } - - return await base.OnReplyToActivityAsync(claimsIdentity, conversationId, activityId, activity, cancellationToken).ConfigureAwait(false); - } - - private BotFrameworkSkill GetCallingSkill(ClaimsIdentity claimsIdentity) - { - var appId = JwtTokenValidation.GetAppIdFromClaims(claimsIdentity.Claims); - - if (string.IsNullOrWhiteSpace(appId)) - { - return null; - } - - return _skillsConfig.Skills.Values.FirstOrDefault(s => string.Equals(s.AppId, appId, StringComparison.InvariantCultureIgnoreCase)); - } - - private async Task InterceptOAuthCards(ClaimsIdentity claimsIdentity, Activity activity) - { - var oauthCardAttachment = activity.Attachments?.FirstOrDefault(a => a?.ContentType == OAuthCard.ContentType); - if (oauthCardAttachment != null) - { - var targetSkill = GetCallingSkill(claimsIdentity); - if (targetSkill != null) - { - var oauthCard = ((JObject)oauthCardAttachment.Content).ToObject(); - - if (!string.IsNullOrWhiteSpace(oauthCard?.TokenExchangeResource?.Uri)) - { - using (var context = new TurnContext(_adapter, activity)) - { - context.TurnState.Add("BotIdentity", claimsIdentity); - - // We need to know what connection name to use for the token exchange so we figure that out here - var connectionName = targetSkill.Id.Contains(WaterfallSkillBot) ? _configuration.GetSection("SsoConnectionName").Value : _configuration.GetSection("SsoConnectionNameTeams").Value; - - if (string.IsNullOrEmpty(connectionName)) - { - throw new ArgumentNullException("The connection name cannot be null."); - } - - // AAD token exchange - try - { - var result = await _tokenExchangeProvider.ExchangeTokenAsync( - context, - connectionName, - activity.Recipient.Id, - new TokenExchangeRequest() { Uri = oauthCard.TokenExchangeResource.Uri }).ConfigureAwait(false); - - if (!string.IsNullOrEmpty(result?.Token)) - { - // If token above is null, then SSO has failed and hence we return false. - // If not, send an invoke to the skill with the token. - return await SendTokenExchangeInvokeToSkillAsync(activity, oauthCard.TokenExchangeResource.Id, result.Token, oauthCard.ConnectionName, targetSkill, default).ConfigureAwait(false); - } - } - catch (Exception ex) - { - // Show oauth card if token exchange fails. - _logger.LogWarning("Unable to exchange token.", ex); - return false; - } - - return false; - } - } - } - } - - return false; - } - - private async Task SendTokenExchangeInvokeToSkillAsync(Activity incomingActivity, string id, string token, string connectionName, BotFrameworkSkill targetSkill, CancellationToken cancellationToken) - { - var activity = incomingActivity.CreateReply(); - activity.Type = ActivityTypes.Invoke; - activity.Name = SignInConstants.TokenExchangeOperationName; - activity.Value = new TokenExchangeInvokeRequest() - { - Id = id, - Token = token, - ConnectionName = connectionName, - }; - - var skillConversationReference = await _conversationIdFactory.GetSkillConversationReferenceAsync(incomingActivity.Conversation.Id, cancellationToken).ConfigureAwait(false); - activity.Conversation = skillConversationReference.ConversationReference.Conversation; - activity.ServiceUrl = skillConversationReference.ConversationReference.ServiceUrl; - - // route the activity to the skill - var response = await _skillClient.PostActivityAsync(_botId, targetSkill, _skillsConfig.SkillHostEndpoint, activity, cancellationToken); - - // Check response status: true if success, false if failure - return response.Status >= 200 && response.Status <= 299; - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/WaterfallHostBot.csproj b/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/WaterfallHostBot.csproj deleted file mode 100644 index e1954961e8..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/WaterfallHostBot.csproj +++ /dev/null @@ -1,24 +0,0 @@ - - - - netcoreapp3.1 - latest - Microsoft.BotFrameworkFunctionalTests.WaterfallHostBot - Microsoft.BotFrameworkFunctionalTests.WaterfallHostBot - - - - - - - - - - - - - - - - - diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/appsettings.json b/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/appsettings.json deleted file mode 100644 index da8a447b35..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/appsettings.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" - } - }, - "AllowedHosts": "*", - - "MicrosoftAppId": "", - "MicrosoftAppPassword": "", - "SsoConnectionName": "", - "SsoConnectionNameTeams": "", - "SkillHostEndpoint": "http://localhost:35020/api/skills/", - "BotFrameworkSkills": [ - { - "Id": "EchoSkillBotDotNet", - "Group": "Echo", - "AppId": "", - "SkillEndpoint": "http://localhost:35400/api/messages" - }, - { - "Id": "EchoSkillBotDotNet21", - "Group": "Echo", - "AppId": "", - "SkillEndpoint": "http://localhost:35405/api/messages" - }, - { - "Id": "EchoSkillBotDotNetV3", - "Group": "Echo", - "AppId": "", - "SkillEndpoint": "http://localhost:35407/api/messages" - }, - { - "Id": "EchoSkillBotJS", - "Group": "Echo", - "AppId": "", - "SkillEndpoint": "http://localhost:36400/api/messages" - }, - { - "Id": "EchoSkillBotJSV3", - "Group": "Echo", - "AppId": "", - "SkillEndpoint": "http://localhost:36407/api/messages" - }, - { - "Id": "EchoSkillBotPython", - "Group": "Echo", - "AppId": "", - "SkillEndpoint": "http://localhost:37400/api/messages" - }, - { - "Id": "WaterfallSkillBotDotNet", - "Group": "Waterfall", - "AppId": "", - "SkillEndpoint": "http://localhost:35420/api/messages" - }, - { - "Id": "WaterfallSkillBotJS", - "Group": "Waterfall", - "AppId": "", - "SkillEndpoint": "http://localhost:36420/api/messages" - }, - { - "Id": "WaterfallSkillBotPython", - "Group": "Waterfall", - "AppId": "", - "SkillEndpoint": "http://localhost:37420/api/messages" - }, - { - "Id": "TeamsSkillBotDotNet", - "Group": "Teams", - "AppId": "", - "SkillEndpoint": "http://localhost:35430/api/messages" - }, - { - "Id": "TeamsSkillBotJS", - "Group": "Teams", - "AppId": "", - "SkillEndpoint": "http://localhost:36430/api/messages" - }, - { - "Id": "TeamsSkillBotPython", - "Group": "Teams", - "AppId": "", - "SkillEndpoint": "http://localhost:37430/api/messages" - } - ] -} diff --git a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/wwwroot/default.htm b/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/wwwroot/default.htm deleted file mode 100644 index 4f00a9a6d4..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/CodeFirst/WaterfallHostBot/wwwroot/default.htm +++ /dev/null @@ -1,420 +0,0 @@ - - - - - - - WaterfallHostBot - - - - - -
-
-
-
WaterfallHostBot Bot
-
-
-
-
-
Your bot is ready!
-
You can test your bot in the Bot Framework Emulator
- by connecting to http://localhost:3978/api/messages.
- -
Visit Azure - Bot Service to register your bot and add it to
- various channels. The bot's endpoint URL typically looks - like this:
-
https://your_bots_hostname/api/messages
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/Directory.Build.props b/tests/functional/Bots/DotNet/Consumers/Composer/Directory.Build.props deleted file mode 100644 index d4378dfc87..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/Composer/Directory.Build.props +++ /dev/null @@ -1,15 +0,0 @@ - - - - true - - - - - $(NoWarn);SA1412;NU1701 - - - - - - \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/.gitignore b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/.gitignore deleted file mode 100644 index eaa9cf70cc..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -# files generated during the lubuild process -# IMPORTANT: In regular composer bots the generated folder should be excluded and regenerated on the build server -# or by the dev running composer locally. But in this case we include it so we don't have to run bf luis:cross-train -# in the build server -# generated/ diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/Controllers/BotController.cs b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/Controllers/BotController.cs deleted file mode 100644 index c87f3cba5e..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/Controllers/BotController.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime.Settings; -using Microsoft.Bot.Builder.Integration.AspNet.Core; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Logging; - -namespace SimpleHostBotComposer.Controllers -{ - // This ASP Controller is created to handle a request. Dependency Injection will provide the Adapter and IBot - // implementation at runtime. Multiple different IBot implementations running at different endpoints can be - // achieved by specifying a more specific type for the bot constructor argument. - [ApiController] - public class BotController : ControllerBase - { - private readonly Dictionary _adapters = new Dictionary(); - private readonly IBot _bot; - private readonly ILogger _logger; - - public BotController( - IConfiguration configuration, - IEnumerable adapters, - IBot bot, - ILogger logger) - { - _bot = bot ?? throw new ArgumentNullException(nameof(bot)); - _logger = logger; - - var adapterSettings = configuration.GetSection(AdapterSettings.AdapterSettingsKey).Get>() ?? new List(); - adapterSettings.Add(AdapterSettings.CoreBotAdapterSettings); - - foreach (var adapter in adapters ?? throw new ArgumentNullException(nameof(adapters))) - { - var settings = adapterSettings.FirstOrDefault(s => s.Enabled && s.Type == adapter.GetType().FullName); - - if (settings != null) - { - _adapters.Add(settings.Route, adapter); - } - } - } - - [HttpPost] - [HttpGet] - [Route("api/{route}")] - public async Task PostAsync(string route) - { - if (string.IsNullOrEmpty(route)) - { - _logger.LogError($"PostAsync: No route provided."); - throw new ArgumentNullException(nameof(route)); - } - - if (_adapters.TryGetValue(route, out IBotFrameworkHttpAdapter adapter)) - { - if (_logger.IsEnabled(LogLevel.Debug)) - { - _logger.LogInformation($"PostAsync: routed '{route}' to {adapter.GetType().Name}"); - } - - // Delegate the processing of the HTTP POST to the appropriate adapter. - // The adapter will invoke the bot. - await adapter.ProcessAsync(Request, Response, _bot).ConfigureAwait(false); - } - else - { - _logger.LogError($"PostAsync: No adapter registered and enabled for route {route}."); - throw new KeyNotFoundException($"No adapter registered and enabled for route {route}."); - } - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/Controllers/SkillController.cs b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/Controllers/SkillController.cs deleted file mode 100644 index 4f90bad170..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/Controllers/SkillController.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Integration.AspNet.Core; -using Microsoft.Bot.Schema; -using Microsoft.Extensions.Logging; - -namespace SimpleHostBotComposer.Controllers -{ - /// - /// A controller that handles skill replies to the bot. - /// - [ApiController] - [Route("api/skills")] - public class SkillController : ChannelServiceController - { - private readonly ILogger _logger; - - public SkillController(ChannelServiceHandlerBase handler, ILogger logger) - : base(handler) - { - _logger = logger; - } - - public override Task ReplyToActivityAsync(string conversationId, string activityId, Activity activity) - { - try - { - if (_logger.IsEnabled(LogLevel.Debug)) - { - _logger.LogDebug($"ReplyToActivityAsync: conversationId={conversationId}, activityId={activityId}"); - } - - return base.ReplyToActivityAsync(conversationId, activityId, activity); - } - catch (Exception ex) - { - _logger.LogError(ex, $"ReplyToActivityAsync: {ex}"); - throw; - } - } - - public override Task SendToConversationAsync(string conversationId, Activity activity) - { - try - { - if (_logger.IsEnabled(LogLevel.Debug)) - { - _logger.LogDebug($"SendToConversationAsync: conversationId={conversationId}"); - } - - return base.SendToConversationAsync(conversationId, activity); - } - catch (Exception ex) - { - _logger.LogError(ex, $"SendToConversationAsync: {ex}"); - throw; - } - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/Program.cs b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/Program.cs deleted file mode 100644 index 2fd91a9203..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/Program.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime.Extensions; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Hosting; - -namespace SimpleHostBotComposer -{ - public class Program - { - public static void Main(string[] args) - { - CreateHostBuilder(args).Build().Run(); - } - - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureAppConfiguration((hostingContext, builder) => - { - var applicationRoot = AppDomain.CurrentDomain.BaseDirectory; - var environmentName = hostingContext.HostingEnvironment.EnvironmentName; - var settingsDirectory = "settings"; - - builder.AddBotRuntimeConfiguration(applicationRoot, settingsDirectory, environmentName); - - builder.AddCommandLine(args); - }) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup(); - }); - } -} \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/Properties/launchSettings.json b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/Properties/launchSettings.json deleted file mode 100644 index a9a6d4673c..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/Properties/launchSettings.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:35010/", - "sslPort": 0 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "SimpleHostBotComposerDotNet": { - "commandName": "Project", - "launchBrowser": true, - "applicationUrl": "http://localhost:35010", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/README.md b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/README.md deleted file mode 100644 index b48822a762..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# Welcome to your new bot - -This bot project was created using the Empty Bot template, and contains a minimal set of files necessary to have a working bot. - -## Next steps - -### Start building your bot - -Composer can help guide you through getting started building your bot. From your bot settings page (the wrench icon on the left navigation rail), click on the rocket-ship icon on the top right for some quick navigation links. - -Another great resource if you're just getting started is the **[guided tutorial](https://docs.microsoft.com/en-us/composer/tutorial/tutorial-introduction)** in our documentation. - -### Connect with your users - -Your bot comes pre-configured to connect to our Web Chat and DirectLine channels, but there are many more places you can connect your bot to - including Microsoft Teams, Telephony, DirectLine Speech, Slack, Facebook, Outlook and more. Check out all of the places you can connect to on the bot settings page. - -### Publish your bot to Azure from Composer - -Composer can help you provision the Azure resources necessary for your bot, and publish your bot to them. To get started, create a publishing profile from your bot settings page in Composer (the wrench icon on the left navigation rail). Make sure you only provision the optional Azure resources you need! - -### Extend your bot with packages - -From Package Manager in Composer you can find useful packages to help add additional pre-built functionality you can add to your bot - everything from simple dialogs & custom actions for working with specific scenarios to custom adapters for connecting your bot to users on clients like Facebook or Slack. - -### Extend your bot with code - -You can also extend your bot with code - simply open up the folder that was generated for you in the location you chose during the creation process with your favorite IDE (like Visual Studio). You can do things like create custom actions that can be used during dialog flows, create custom middleware to pre-process (or post-process) messages, and more. See [our documentation](https://aka.ms/bf-extend-with-code) for more information. diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/SimpleHostBotComposer.botproj b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/SimpleHostBotComposer.botproj deleted file mode 100644 index 12ebc0273a..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/SimpleHostBotComposer.botproj +++ /dev/null @@ -1,41 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/main/Composer/packages/server/schemas/botproject.schema", - "name": "SimpleHostBotComposer", - "skills": { - "echoSkillBotComposerDotNet": { - "manifest": "http://localhost:35410/manifests/echoskillbotcomposer-manifest.json", - "remote": true, - "endpointName": "default" - }, - "echoSkillBotDotNet": { - "manifest": "http://localhost:35400/manifests/echoskillbot-manifest-1.0.json", - "remote": true, - "endpointName": "default" - }, - "echoSkillBotDotNet21": { - "manifest": "http://localhost:35405/manifests/echoskillbot-manifest-1.0.json", - "remote": true, - "endpointName": "default" - }, - "echoSkillBotDotNetV3": { - "manifest": "http://localhost:35407/manifests/echoskillbotv3-manifest-1.0.json", - "remote": true, - "endpointName": "default" - }, - "echoSkillBotJs": { - "manifest": "http://localhost:36400/manifests/echoskillbot-manifest-1.0.json", - "remote": true, - "endpointName": "default" - }, - "echoSkillBotJsv3": { - "manifest": "http://localhost:36407/manifests/echoskillbotv3-manifest-1.0.json", - "remote": true, - "endpointName": "default" - }, - "echoSkillBotPython": { - "manifest": "http://localhost:37400/manifests/echoskillbot-manifest-1.0.json", - "remote": true, - "endpointName": "default" - } - } -} \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/SimpleHostBotComposer.csproj b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/SimpleHostBotComposer.csproj deleted file mode 100644 index 796e4f6f76..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/SimpleHostBotComposer.csproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - netcoreapp3.1 - OutOfProcess - c7eabc4e-9c9c-4b56-82d5-23e24f20ee24 - - - - PreserveNewest - - - - - - - - - \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/Startup.cs b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/Startup.cs deleted file mode 100644 index f9c021bb07..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/Startup.cs +++ /dev/null @@ -1,56 +0,0 @@ -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.StaticFiles; -using Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime.Extensions; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; - -namespace SimpleHostBotComposer -{ - public class Startup - { - public Startup(IConfiguration configuration) - { - Configuration = configuration; - } - - public IConfiguration Configuration { get; } - - // This method gets called by the runtime. Use this method to add services to the container. - public void ConfigureServices(IServiceCollection services) - { - services.AddControllers().AddNewtonsoftJson(); - services.AddBotRuntime(Configuration); - } - - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IWebHostEnvironment env) - { - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - } - - app.UseDefaultFiles(); - - // Set up custom content types - associating file extension to MIME type. - var provider = new FileExtensionContentTypeProvider(); - provider.Mappings[".lu"] = "application/vnd.microsoft.lu"; - provider.Mappings[".qna"] = "application/vnd.microsoft.qna"; - - // Expose static files in manifests folder for skill scenarios. - app.UseStaticFiles(new StaticFileOptions - { - ContentTypeProvider = provider - }); - app.UseWebSockets(); - app.UseRouting(); - app.UseAuthorization(); - app.UseEndpoints(endpoints => - { - endpoints.MapControllers(); - }); - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/dialogs/CallEchoSkill/CallEchoSkill.dialog b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/dialogs/CallEchoSkill/CallEchoSkill.dialog deleted file mode 100644 index 2967ebdbc8..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/dialogs/CallEchoSkill/CallEchoSkill.dialog +++ /dev/null @@ -1,244 +0,0 @@ -{ - "$kind": "Microsoft.AdaptiveDialog", - "$designer": { - "id": "950uG3", - "name": "CallEchoSkill", - "description": "" - }, - "autoEndDialog": true, - "defaultResultProperty": "dialog.result", - "triggers": [ - { - "$kind": "Microsoft.OnBeginDialog", - "$designer": { - "name": "BeginDialog", - "description": "", - "id": "XuIGWc" - }, - "actions": [ - { - "$kind": "Microsoft.ChoiceInput", - "$designer": { - "id": "AtuOWj" - }, - "defaultLocale": "en-us", - "disabled": false, - "maxTurnCount": 3, - "alwaysPrompt": false, - "allowInterruptions": false, - "unrecognizedPrompt": "", - "invalidPrompt": "", - "defaultValueResponse": "", - "prompt": "${ChoiceInput_Prompt_AtuOWj()}", - "choiceOptions": { - "includeNumbers": true - }, - "property": "dialog.deliveryMode", - "style": "suggestedAction", - "choices": [ - "normal", - "expectReplies" - ] - }, - { - "$kind": "Microsoft.ChoiceInput", - "$designer": { - "id": "DIABs2" - }, - "defaultLocale": "en-us", - "disabled": false, - "maxTurnCount": 3, - "alwaysPrompt": false, - "allowInterruptions": false, - "unrecognizedPrompt": "", - "invalidPrompt": "", - "defaultValueResponse": "", - "prompt": "${ChoiceInput_Prompt_DIABs2()}", - "choiceOptions": { - "includeNumbers": true - }, - "style": "suggestedAction", - "property": "dialog.selectedSkill", - "choices": [ - "EchoSkillBotComposerDotNet", - "EchoSkillBotDotNet", - "EchoSkillBotDotNet21", - "EchoSkillBotDotNetV3", - "EchoSkillBotJS", - "EchoSkillBotJSV3", - "EchoSkillBotPython" - ] - }, - { - "$kind": "Microsoft.TextInput", - "$designer": { - "id": "nJf5rj" - }, - "disabled": false, - "maxTurnCount": 3, - "alwaysPrompt": false, - "allowInterruptions": false, - "unrecognizedPrompt": "", - "invalidPrompt": "", - "defaultValueResponse": "", - "prompt": "${TextInput_Prompt_nJf5rj()}", - "property": "dialog.firstUtterance" - }, - { - "$kind": "Microsoft.SwitchCondition", - "$designer": { - "id": "b3M6yt" - }, - "condition": "dialog.selectedSkill", - "cases": [ - { - "value": "EchoSkillBotComposerDotNet", - "actions": [ - { - "$kind": "Microsoft.BeginSkill", - "$designer": { - "id": "KKS0wY" - }, - "activityProcessed": true, - "botId": "=settings.MicrosoftAppId", - "skillHostEndpoint": "=settings.skillHostEndpoint", - "connectionName": "=settings.connectionName", - "allowInterruptions": true, - "skillEndpoint": "=settings.skill['echoSkillBotComposerDotNet'].endpointUrl", - "skillAppId": "=settings.skill['echoSkillBotComposerDotNet'].msAppId", - "activity": "${BeginSkill_Activity_KKS0wY()}" - } - ] - }, - { - "value": "EchoSkillBotDotNet", - "actions": [ - { - "$kind": "Microsoft.BeginSkill", - "$designer": { - "id": "92WLGJ" - }, - "activityProcessed": true, - "botId": "=settings.MicrosoftAppId", - "skillHostEndpoint": "=settings.skillHostEndpoint", - "connectionName": "=settings.connectionName", - "allowInterruptions": true, - "skillEndpoint": "=settings.skill['echoSkillBotDotNet'].endpointUrl", - "skillAppId": "=settings.skill['echoSkillBotDotNet'].msAppId", - "activity": "${BeginSkill_Activity_92WLGJ()}" - } - ] - }, - { - "value": "EchoSkillBotDotNet21", - "actions": [ - { - "$kind": "Microsoft.BeginSkill", - "$designer": { - "id": "9zIod8" - }, - "activityProcessed": true, - "botId": "=settings.MicrosoftAppId", - "skillHostEndpoint": "=settings.skillHostEndpoint", - "connectionName": "=settings.connectionName", - "allowInterruptions": true, - "skillEndpoint": "=settings.skill['echoSkillBotDotNet21'].endpointUrl", - "skillAppId": "=settings.skill['echoSkillBotDotNet21'].msAppId", - "activity": "${BeginSkill_Activity_9zIod8()}" - } - ] - }, - { - "value": "EchoSkillBotDotNetV3", - "actions": [ - { - "$kind": "Microsoft.BeginSkill", - "$designer": { - "id": "GHbR47" - }, - "activityProcessed": true, - "botId": "=settings.MicrosoftAppId", - "skillHostEndpoint": "=settings.skillHostEndpoint", - "connectionName": "=settings.connectionName", - "allowInterruptions": true, - "skillEndpoint": "=settings.skill['echoSkillBotDotNetV3'].endpointUrl", - "skillAppId": "=settings.skill['echoSkillBotDotNetV3'].msAppId", - "activity": "${BeginSkill_Activity_GHbR47()}" - } - ] - }, - { - "value": "EchoSkillBotJS", - "actions": [ - { - "$kind": "Microsoft.BeginSkill", - "$designer": { - "id": "fXOB92" - }, - "activityProcessed": true, - "botId": "=settings.MicrosoftAppId", - "skillHostEndpoint": "=settings.skillHostEndpoint", - "connectionName": "=settings.connectionName", - "allowInterruptions": true, - "skillEndpoint": "=settings.skill['echoSkillBotJs'].endpointUrl", - "skillAppId": "=settings.skill['echoSkillBotJs'].msAppId", - "activity": "${BeginSkill_Activity_fXOB92()}" - } - ] - }, - { - "value": "EchoSkillBotJSV3", - "actions": [ - { - "$kind": "Microsoft.BeginSkill", - "$designer": { - "id": "aEVlOJ" - }, - "activityProcessed": true, - "botId": "=settings.MicrosoftAppId", - "skillHostEndpoint": "=settings.skillHostEndpoint", - "connectionName": "=settings.connectionName", - "allowInterruptions": true, - "skillEndpoint": "=settings.skill['echoSkillBotJsv3'].endpointUrl", - "skillAppId": "=settings.skill['echoSkillBotJsv3'].msAppId", - "activity": "${BeginSkill_Activity_aEVlOJ()}" - } - ] - }, - { - "value": "EchoSkillBotPython", - "actions": [ - { - "$kind": "Microsoft.BeginSkill", - "$designer": { - "id": "WnhW7c" - }, - "activityProcessed": true, - "botId": "=settings.MicrosoftAppId", - "skillHostEndpoint": "=settings.skillHostEndpoint", - "connectionName": "=settings.connectionName", - "allowInterruptions": true, - "skillEndpoint": "=settings.skill['echoSkillBotPython'].endpointUrl", - "skillAppId": "=settings.skill['echoSkillBotPython'].msAppId", - "activity": "${BeginSkill_Activity_WnhW7c()}" - } - ] - } - ], - "default": [ - { - "$kind": "Microsoft.SendActivity", - "$designer": { - "id": "3NY1Ax" - }, - "activity": "${SendActivity_3NY1Ax()}" - } - ] - } - ] - } - ], - "generator": "CallEchoSkill.lg", - "recognizer": "CallEchoSkill.lu.qna", - "id": "CallEchoSkill" -} diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/dialogs/CallEchoSkill/knowledge-base/en-us/CallEchoSkill.en-us.qna b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/dialogs/CallEchoSkill/knowledge-base/en-us/CallEchoSkill.en-us.qna deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/dialogs/CallEchoSkill/language-generation/en-us/CallEchoSkill.en-us.lg b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/dialogs/CallEchoSkill/language-generation/en-us/CallEchoSkill.en-us.lg deleted file mode 100644 index 8b5225cfbc..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/dialogs/CallEchoSkill/language-generation/en-us/CallEchoSkill.en-us.lg +++ /dev/null @@ -1,56 +0,0 @@ -[import](common.lg) - -# ChoiceInput_Prompt_AtuOWj() -[Activity - Text = What delivery mode would you like to use? -] - -# ChoiceInput_Prompt_DIABs2() -[Activity - Text = What skill would you like to call? -] - -# SendActivity_3NY1Ax() -[Activity - Text = We shouldn't hit this because we have validation in the prompt -] - -# BeginSkill_Activity_KKS0wY() -[Activity - Text = ${dialog.firstUtterance} -] - -# TextInput_Prompt_nJf5rj() -[Activity - Text = Type anything to send to the skill. -] - -# BeginSkill_Activity_92WLGJ() -[Activity - Text = ${dialog.firstUtterance} -] - -# BeginSkill_Activity_9zIod8() -[Activity - Text = ${dialog.firstUtterance} -] - -# BeginSkill_Activity_GHbR47() -[Activity - Text = ${dialog.firstUtterance} -] - -# BeginSkill_Activity_fXOB92() -[Activity - Text = ${dialog.firstUtterance} -] - -# BeginSkill_Activity_aEVlOJ() -[Activity - Text = ${dialog.firstUtterance} -] - -# BeginSkill_Activity_WnhW7c() -[Activity - Text = ${dialog.firstUtterance} -] diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/dialogs/CallEchoSkill/language-understanding/en-us/CallEchoSkill.en-us.lu b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/dialogs/CallEchoSkill/language-understanding/en-us/CallEchoSkill.en-us.lu deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/dialogs/CallEchoSkill/recognizers/CallEchoSkill.en-us.lu.dialog b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/dialogs/CallEchoSkill/recognizers/CallEchoSkill.en-us.lu.dialog deleted file mode 100644 index 9980d2dd76..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/dialogs/CallEchoSkill/recognizers/CallEchoSkill.en-us.lu.dialog +++ /dev/null @@ -1,8 +0,0 @@ -{ - "$kind": "Microsoft.LuisRecognizer", - "id": "LUIS_CallEchoSkill", - "applicationId": "=settings.luis.CallEchoSkill_en_us_lu.appId", - "version": "=settings.luis.CallEchoSkill_en_us_lu.version", - "endpoint": "=settings.luis.endpoint", - "endpointKey": "=settings.luis.endpointKey" -} diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/dialogs/CallEchoSkill/recognizers/CallEchoSkill.lu.dialog b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/dialogs/CallEchoSkill/recognizers/CallEchoSkill.lu.dialog deleted file mode 100644 index e07dee15ef..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/dialogs/CallEchoSkill/recognizers/CallEchoSkill.lu.dialog +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$kind": "Microsoft.MultiLanguageRecognizer", - "id": "LUIS_CallEchoSkill", - "recognizers": {} -} diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/dialogs/CallEchoSkill/recognizers/CallEchoSkill.lu.qna.dialog b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/dialogs/CallEchoSkill/recognizers/CallEchoSkill.lu.qna.dialog deleted file mode 100644 index 80b77f0d0d..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/dialogs/CallEchoSkill/recognizers/CallEchoSkill.lu.qna.dialog +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$kind": "Microsoft.CrossTrainedRecognizerSet", - "recognizers": [] -} diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/dialogs/emptyBot/knowledge-base/en-us/emptyBot.en-us.qna b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/dialogs/emptyBot/knowledge-base/en-us/emptyBot.en-us.qna deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/generated/interruption/CallEchoSkill.en-us.lu b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/generated/interruption/CallEchoSkill.en-us.lu deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/generated/interruption/CallEchoSkill.en-us.qna b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/generated/interruption/CallEchoSkill.en-us.qna deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/generated/interruption/SimpleHostBotComposer.en-us.lu b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/generated/interruption/SimpleHostBotComposer.en-us.lu deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/generated/interruption/SimpleHostBotComposer.en-us.qna b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/generated/interruption/SimpleHostBotComposer.en-us.qna deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/knowledge-base/en-us/simplehostbotcomposer.en-us.qna b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/knowledge-base/en-us/simplehostbotcomposer.en-us.qna deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/language-generation/en-us/common.en-us.lg b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/language-generation/en-us/common.en-us.lg deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/language-generation/en-us/simplehostbotcomposer.en-us.lg b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/language-generation/en-us/simplehostbotcomposer.en-us.lg deleted file mode 100644 index 333bea8b5e..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/language-generation/en-us/simplehostbotcomposer.en-us.lg +++ /dev/null @@ -1,26 +0,0 @@ -[import](common.lg) - -# SendActivity_Greeting() -[Activity - Text = Hello and welcome! - InputHint = acceptingInput -] - -# SendActivity_DidNotUnderstand() -[Activity - Text = ${SendActivity_DidNotUnderstand_text()} -] - -# SendActivity_DidNotUnderstand_text() -- Sorry, I didn't get that. -# SendActivity_M2LqJr() -[Activity - Text = Received endOfConversation.\n\nCode: ${turn.activity.code}. - InputHint = acceptingInput -] - -# SendActivity_bgTcyn() -[Activity - Text = Back in the host bot. - InputHint = acceptingInput -] diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/language-understanding/en-us/simplehostbotcomposer.en-us.lu b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/language-understanding/en-us/simplehostbotcomposer.en-us.lu deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/media/create-azure-resource-command-line.png b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/media/create-azure-resource-command-line.png deleted file mode 100644 index 497eb8e649..0000000000 Binary files a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/media/create-azure-resource-command-line.png and /dev/null differ diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/media/publish-az-login.png b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/media/publish-az-login.png deleted file mode 100644 index 4e721354bc..0000000000 Binary files a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/media/publish-az-login.png and /dev/null differ diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/recognizers/SimpleHostBotComposer.en-us.lu.dialog b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/recognizers/SimpleHostBotComposer.en-us.lu.dialog deleted file mode 100644 index 7d5d67f4f6..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/recognizers/SimpleHostBotComposer.en-us.lu.dialog +++ /dev/null @@ -1,8 +0,0 @@ -{ - "$kind": "Microsoft.LuisRecognizer", - "id": "LUIS_SimpleHostBotComposer", - "applicationId": "=settings.luis.SimpleHostBotComposer_en_us_lu.appId", - "version": "=settings.luis.SimpleHostBotComposer_en_us_lu.version", - "endpoint": "=settings.luis.endpoint", - "endpointKey": "=settings.luis.endpointKey" -} diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/recognizers/SimpleHostBotComposer.lu.dialog b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/recognizers/SimpleHostBotComposer.lu.dialog deleted file mode 100644 index 1ce9e8bf5f..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/recognizers/SimpleHostBotComposer.lu.dialog +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$kind": "Microsoft.MultiLanguageRecognizer", - "id": "LUIS_SimpleHostBotComposer", - "recognizers": {} -} diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/recognizers/SimpleHostBotComposer.lu.qna.dialog b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/recognizers/SimpleHostBotComposer.lu.qna.dialog deleted file mode 100644 index 80b77f0d0d..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/recognizers/SimpleHostBotComposer.lu.qna.dialog +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$kind": "Microsoft.CrossTrainedRecognizerSet", - "recognizers": [] -} diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/schemas/sdk.schema b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/schemas/sdk.schema deleted file mode 100644 index ee34876994..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/schemas/sdk.schema +++ /dev/null @@ -1,10312 +0,0 @@ -{ - "$schema": "https://schemas.botframework.com/schemas/component/v1.0/component.schema", - "type": "object", - "title": "Component kinds", - "description": "These are all of the kinds that can be created by the loader.", - "oneOf": [ - { - "$ref": "#/definitions/Microsoft.ActivityTemplate" - }, - { - "$ref": "#/definitions/Microsoft.AdaptiveDialog" - }, - { - "$ref": "#/definitions/Microsoft.AgeEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.Ask" - }, - { - "$ref": "#/definitions/Microsoft.AttachmentInput" - }, - { - "$ref": "#/definitions/Microsoft.BeginDialog" - }, - { - "$ref": "#/definitions/Microsoft.BeginSkill" - }, - { - "$ref": "#/definitions/Microsoft.BreakLoop" - }, - { - "$ref": "#/definitions/Microsoft.CancelAllDialogs" - }, - { - "$ref": "#/definitions/Microsoft.CancelDialog" - }, - { - "$ref": "#/definitions/Microsoft.ChannelMentionEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.ChoiceInput" - }, - { - "$ref": "#/definitions/Microsoft.ConditionalSelector" - }, - { - "$ref": "#/definitions/Microsoft.ConfirmationEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.ConfirmInput" - }, - { - "$ref": "#/definitions/Microsoft.ContinueConversation" - }, - { - "$ref": "#/definitions/Microsoft.ContinueConversationLater" - }, - { - "$ref": "#/definitions/Microsoft.ContinueLoop" - }, - { - "$ref": "#/definitions/Microsoft.CrossTrainedRecognizerSet" - }, - { - "$ref": "#/definitions/Microsoft.CurrencyEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.DateTimeEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.DateTimeInput" - }, - { - "$ref": "#/definitions/Microsoft.DebugBreak" - }, - { - "$ref": "#/definitions/Microsoft.DeleteActivity" - }, - { - "$ref": "#/definitions/Microsoft.DeleteProperties" - }, - { - "$ref": "#/definitions/Microsoft.DeleteProperty" - }, - { - "$ref": "#/definitions/Microsoft.DimensionEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.EditActions" - }, - { - "$ref": "#/definitions/Microsoft.EditArray" - }, - { - "$ref": "#/definitions/Microsoft.EmailEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.EmitEvent" - }, - { - "$ref": "#/definitions/Microsoft.EndDialog" - }, - { - "$ref": "#/definitions/Microsoft.EndTurn" - }, - { - "$ref": "#/definitions/Microsoft.FirstSelector" - }, - { - "$ref": "#/definitions/Microsoft.Foreach" - }, - { - "$ref": "#/definitions/Microsoft.ForeachPage" - }, - { - "$ref": "#/definitions/Microsoft.GetActivityMembers" - }, - { - "$ref": "#/definitions/Microsoft.GetConversationMembers" - }, - { - "$ref": "#/definitions/Microsoft.GetConversationReference" - }, - { - "$ref": "#/definitions/Microsoft.GotoAction" - }, - { - "$ref": "#/definitions/Microsoft.GuidEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.HashtagEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.HttpRequest" - }, - { - "$ref": "#/definitions/Microsoft.IfCondition" - }, - { - "$ref": "#/definitions/Microsoft.IpEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.LogAction" - }, - { - "$ref": "#/definitions/Microsoft.LuisRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.MentionEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.MostSpecificSelector" - }, - { - "$ref": "#/definitions/Microsoft.MultiLanguageRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.NumberEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.NumberInput" - }, - { - "$ref": "#/definitions/Microsoft.NumberRangeEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.OAuthInput" - }, - { - "$ref": "#/definitions/Microsoft.OnActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnAssignEntity" - }, - { - "$ref": "#/definitions/Microsoft.OnBeginDialog" - }, - { - "$ref": "#/definitions/Microsoft.OnCancelDialog" - }, - { - "$ref": "#/definitions/Microsoft.OnChooseEntity" - }, - { - "$ref": "#/definitions/Microsoft.OnChooseIntent" - }, - { - "$ref": "#/definitions/Microsoft.OnChooseProperty" - }, - { - "$ref": "#/definitions/Microsoft.OnCommandActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnCommandResultActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnCondition" - }, - { - "$ref": "#/definitions/Microsoft.OnContinueConversation" - }, - { - "$ref": "#/definitions/Microsoft.OnConversationUpdateActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnDialogEvent" - }, - { - "$ref": "#/definitions/Microsoft.OnEndOfActions" - }, - { - "$ref": "#/definitions/Microsoft.OnEndOfConversationActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnError" - }, - { - "$ref": "#/definitions/Microsoft.OnEventActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnHandoffActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnInstallationUpdateActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnIntent" - }, - { - "$ref": "#/definitions/Microsoft.OnInvokeActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnMessageActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnMessageDeleteActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnMessageReactionActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnMessageUpdateActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnQnAMatch" - }, - { - "$ref": "#/definitions/Microsoft.OnRepromptDialog" - }, - { - "$ref": "#/definitions/Microsoft.OnTypingActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnUnknownIntent" - }, - { - "$ref": "#/definitions/Microsoft.OrdinalEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.PercentageEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.PhoneNumberEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.QnAMakerDialog" - }, - { - "$ref": "#/definitions/Microsoft.QnAMakerRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.RandomSelector" - }, - { - "$ref": "#/definitions/Microsoft.RecognizerSet" - }, - { - "$ref": "#/definitions/Microsoft.RegexEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.RegexRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.RepeatDialog" - }, - { - "$ref": "#/definitions/Microsoft.ReplaceDialog" - }, - { - "$ref": "#/definitions/Microsoft.ResourceMultiLanguageGenerator" - }, - { - "$ref": "#/definitions/Microsoft.SendActivity" - }, - { - "$ref": "#/definitions/Microsoft.SendHandoffActivity" - }, - { - "$ref": "#/definitions/Microsoft.SetProperties" - }, - { - "$ref": "#/definitions/Microsoft.SetProperty" - }, - { - "$ref": "#/definitions/Microsoft.SignOutUser" - }, - { - "$ref": "#/definitions/Microsoft.StaticActivityTemplate" - }, - { - "$ref": "#/definitions/Microsoft.SwitchCondition" - }, - { - "$ref": "#/definitions/Microsoft.TelemetryTrackEventAction" - }, - { - "$ref": "#/definitions/Microsoft.TemperatureEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.TemplateEngineLanguageGenerator" - }, - { - "$ref": "#/definitions/Microsoft.TextInput" - }, - { - "$ref": "#/definitions/Microsoft.TextTemplate" - }, - { - "$ref": "#/definitions/Microsoft.ThrowException" - }, - { - "$ref": "#/definitions/Microsoft.TraceActivity" - }, - { - "$ref": "#/definitions/Microsoft.TrueSelector" - }, - { - "$ref": "#/definitions/Microsoft.UpdateActivity" - }, - { - "$ref": "#/definitions/Microsoft.UrlEntityRecognizer" - } - ], - "definitions": { - "arrayExpression": { - "$role": "expression", - "title": "Array or expression", - "description": "Array or expression to evaluate.", - "oneOf": [ - { - "type": "array", - "title": "Array", - "description": "Array constant." - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "booleanExpression": { - "$role": "expression", - "title": "Boolean or expression", - "description": "Boolean constant or expression to evaluate.", - "oneOf": [ - { - "type": "boolean", - "title": "Boolean", - "description": "Boolean constant.", - "default": false, - "examples": [ - false - ] - }, - { - "$ref": "#/definitions/equalsExpression", - "examples": [ - "=user.isVip" - ] - } - ] - }, - "component": { - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "condition": { - "$role": "expression", - "title": "Boolean condition", - "description": "Boolean constant or expression to evaluate.", - "oneOf": [ - { - "$ref": "#/definitions/expression" - }, - { - "type": "boolean", - "title": "Boolean", - "description": "Boolean value.", - "default": true, - "examples": [ - false - ] - } - ] - }, - "equalsExpression": { - "$role": "expression", - "type": "string", - "title": "Expression", - "description": "Expression starting with =.", - "pattern": "^=.*\\S.*", - "examples": [ - "=user.name" - ] - }, - "expression": { - "$role": "expression", - "type": "string", - "title": "Expression", - "description": "Expression to evaluate.", - "pattern": "^.*\\S.*", - "examples": [ - "user.age > 13" - ] - }, - "integerExpression": { - "$role": "expression", - "title": "Integer or expression", - "description": "Integer constant or expression to evaluate.", - "oneOf": [ - { - "type": "integer", - "title": "Integer", - "description": "Integer constant.", - "default": 0, - "examples": [ - 15 - ] - }, - { - "$ref": "#/definitions/equalsExpression", - "examples": [ - "=user.age" - ] - } - ] - }, - "Microsoft.ActivityTemplate": { - "$role": "implements(Microsoft.IActivityTemplate)", - "title": "Microsoft activity template", - "type": "object", - "required": [ - "template", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "template": { - "title": "Template", - "description": "Language Generator template to use to create the activity", - "type": "string" - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.ActivityTemplate" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.AdaptiveDialog": { - "$role": "implements(Microsoft.IDialog)", - "title": "Adaptive dialog", - "description": "Flexible, data driven dialog that can adapt to the conversation.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "pattern": "^(?!(=)).*", - "title": "Id", - "description": "Optional dialog ID." - }, - "autoEndDialog": { - "$ref": "#/definitions/booleanExpression", - "title": "Auto end dialog", - "description": "If set to true the dialog will automatically end when there are no further actions. If set to false, remember to manually end the dialog using EndDialog action.", - "default": true - }, - "defaultResultProperty": { - "type": "string", - "title": "Default result property", - "description": "Value that will be passed back to the parent dialog.", - "default": "dialog.result" - }, - "dialogs": { - "type": "array", - "title": "Dialogs", - "description": "Dialogs added to DialogSet.", - "items": { - "$kind": "Microsoft.IDialog", - "title": "Dialog", - "description": "Dialog to add to DialogSet.", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "recognizer": { - "$kind": "Microsoft.IRecognizer", - "title": "Recognizer", - "description": "Input recognizer that interprets user input into intent and entities.", - "$ref": "#/definitions/Microsoft.IRecognizer" - }, - "generator": { - "$kind": "Microsoft.ILanguageGenerator", - "title": "Language generator", - "description": "Language generator that generates bot responses.", - "$ref": "#/definitions/Microsoft.ILanguageGenerator" - }, - "selector": { - "$kind": "Microsoft.ITriggerSelector", - "title": "Selector", - "description": "Policy to determine which trigger is executed. Defaults to a 'best match' selector (optional).", - "$ref": "#/definitions/Microsoft.ITriggerSelector" - }, - "triggers": { - "type": "array", - "description": "List of triggers defined for this dialog.", - "title": "Triggers", - "items": { - "$kind": "Microsoft.ITrigger", - "title": "Event triggers", - "description": "Event triggers for handling events.", - "$ref": "#/definitions/Microsoft.ITrigger" - } - }, - "schema": { - "title": "Schema", - "description": "Schema to fill in.", - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "string", - "title": "Reference to JSON schema", - "description": "Reference to JSON schema .dialog file." - } - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.AdaptiveDialog" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.AgeEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Age entity recognizer", - "description": "Recognizer which recognizes age.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.AgeEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.Ask": { - "$role": [ - "implements(Microsoft.IDialog)", - "extends(Microsoft.SendActivity)" - ], - "title": "Send activity to ask a question", - "description": "This is an action which sends an activity to the user when a response is expected", - "type": "object", - "$policies": { - "interactive": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "expectedProperties": { - "$ref": "#/definitions/arrayExpression", - "title": "Expected properties", - "description": "Properties expected from the user.", - "examples": [ - [ - "age", - "name" - ] - ], - "items": { - "type": "string", - "title": "Name", - "description": "Name of the property" - } - }, - "defaultOperation": { - "$ref": "#/definitions/stringExpression", - "title": "Default operation", - "description": "Sets the default operation that will be used when no operation is recognized in the response to this Ask.", - "examples": [ - "Add()", - "Remove()" - ] - }, - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action." - }, - "activity": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Activity", - "description": "Activity to send.", - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.Ask" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.AttachmentInput": { - "$role": [ - "implements(Microsoft.IDialog)", - "extends(Microsoft.InputDialog)" - ], - "title": "Attachment input dialog", - "description": "Collect information - Ask for a file or image.", - "$policies": { - "interactive": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "type": "object", - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "defaultValue": { - "$role": "expression", - "title": "Default value", - "description": "'Property' will be set to the object or the result of this expression when max turn count is exceeded.", - "oneOf": [ - { - "$ref": "#/definitions/botframework.json/definitions/Attachment", - "title": "Object", - "description": "Attachment object." - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "value": { - "$role": "expression", - "title": "Value", - "description": "'Property' will be set to the object or the result of this expression unless it evaluates to null.", - "oneOf": [ - { - "$ref": "#/definitions/botframework.json/definitions/Attachment", - "title": "Object", - "description": "Attachment object." - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "outputFormat": { - "$role": "expression", - "title": "Output format", - "description": "Attachment output format.", - "oneOf": [ - { - "type": "string", - "title": "Standard format", - "description": "Standard output formats.", - "enum": [ - "all", - "first" - ], - "default": "first" - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "default": false, - "examples": [ - false, - "=user.isVip" - ] - }, - "prompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Initial prompt", - "description": "Message to send to collect information.", - "examples": [ - "What is your birth date?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "unrecognizedPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Unrecognized prompt", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "invalidPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Invalid prompt", - "description": "Message to send when the user input does not meet any validation expression.", - "examples": [ - "Sorry, '{this.value}' does not work. I need a number between 1-150. What is your age?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "defaultValueResponse": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Default value response", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "maxTurnCount": { - "$ref": "#/definitions/integerExpression", - "title": "Max turn count", - "description": "Maximum number of re-prompt attempts to collect information.", - "default": 3, - "minimum": 0, - "maximum": 2147483647, - "examples": [ - 3, - "=settings.xyz" - ] - }, - "validations": { - "type": "array", - "title": "Validation expressions", - "description": "Expression to validate user input.", - "items": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Expression which needs to met for the input to be considered valid", - "examples": [ - "int(this.value) > 1 && int(this.value) <= 150", - "count(this.value) < 300" - ] - } - }, - "property": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property to store collected information. Input will be skipped if property has value (unless 'Always prompt' is true).", - "examples": [ - "$birthday", - "dialog.${user.name}", - "=f(x)" - ] - }, - "alwaysPrompt": { - "$ref": "#/definitions/booleanExpression", - "title": "Always prompt", - "description": "Collect information even if the specified 'property' is not empty.", - "default": false, - "examples": [ - false, - "=$val" - ] - }, - "allowInterruptions": { - "$ref": "#/definitions/booleanExpression", - "title": "Allow Interruptions", - "description": "A boolean expression that determines whether the parent should be allowed to interrupt the input.", - "default": true, - "examples": [ - true, - "=user.xyz" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.AttachmentInput" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.BeginDialog": { - "$role": "implements(Microsoft.IDialog)", - "title": "Begin a dialog", - "description": "Begin another dialog.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "dialog": { - "oneOf": [ - { - "$kind": "Microsoft.IDialog", - "pattern": "^(?!(=)).*", - "title": "Dialog", - "$ref": "#/definitions/Microsoft.IDialog" - }, - { - "$ref": "#/definitions/equalsExpression" - } - ], - "title": "Dialog name", - "description": "Name of the dialog to call." - }, - "options": { - "$ref": "#/definitions/objectExpression", - "title": "Options", - "description": "One or more options that are passed to the dialog that is called.", - "examples": [ - { - "arg1": "=expression" - } - ], - "additionalProperties": { - "type": "string", - "title": "Options", - "description": "Options for dialog." - } - }, - "activityProcessed": { - "$ref": "#/definitions/booleanExpression", - "title": "Activity processed", - "description": "When set to false, the dialog that is called can process the current activity.", - "default": true - }, - "resultProperty": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property to store any value returned by the dialog that is called.", - "examples": [ - "dialog.userName" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.BeginDialog" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.BeginSkill": { - "$role": "implements(Microsoft.IDialog)", - "title": "Begin a skill", - "description": "Begin a remote skill.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the skill dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - true, - "=f(x)" - ] - }, - "activityProcessed": { - "$ref": "#/definitions/booleanExpression", - "title": "Activity processed", - "description": "When set to false, the skill will be started using the activity in the current turn context instead of the activity in the Activity property.", - "default": true, - "examples": [ - true, - "=f(x)" - ] - }, - "resultProperty": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property to store any value returned by the dialog that is called.", - "examples": [ - "dialog.userName" - ] - }, - "botId": { - "$ref": "#/definitions/stringExpression", - "title": "Skill host bot ID", - "description": "The Microsoft App ID that will be calling the skill.", - "default": "=settings.MicrosoftAppId" - }, - "skillHostEndpoint": { - "$ref": "#/definitions/stringExpression", - "title": "Skill host", - "description": "The callback Url for the skill host.", - "default": "=settings.skillHostEndpoint", - "examples": [ - "https://mybot.contoso.com/api/skills/" - ] - }, - "connectionName": { - "$ref": "#/definitions/stringExpression", - "title": "OAuth connection name (SSO)", - "description": "The OAuth Connection Name, that would be used to perform Single SignOn with a skill.", - "default": "=settings.connectionName" - }, - "skillAppId": { - "$ref": "#/definitions/stringExpression", - "title": "Skill App Id", - "description": "The Microsoft App ID for the skill." - }, - "skillEndpoint": { - "$ref": "#/definitions/stringExpression", - "title": "Skill endpoint ", - "description": "The /api/messages endpoint for the skill.", - "examples": [ - "https://myskill.contoso.com/api/messages/" - ] - }, - "activity": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Activity", - "description": "The activity to send to the skill.", - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "allowInterruptions": { - "$ref": "#/definitions/booleanExpression", - "title": "Allow interruptions", - "description": "A boolean expression that determines whether the parent should be allowed to interrupt the skill.", - "default": true, - "examples": [ - true, - "=user.xyz" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.BeginSkill" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.BreakLoop": { - "$role": "implements(Microsoft.IDialog)", - "title": "Break loop", - "description": "Stop executing this loop", - "type": "object", - "required": [ - "$kind" - ], - "$policies": { - "lastAction": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.BreakLoop" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.CancelAllDialogs": { - "$role": "implements(Microsoft.IDialog)", - "title": "Cancel all dialogs", - "description": "Cancel all active dialogs. All dialogs in the dialog chain will need a trigger to capture the event configured in this action.", - "type": "object", - "$policies": { - "lastAction": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "activityProcessed": { - "$ref": "#/definitions/booleanExpression", - "title": "Activity processed", - "description": "When set to false, the caller dialog is told it should process the current activity.", - "default": true - }, - "eventName": { - "$ref": "#/definitions/stringExpression", - "title": "Event name", - "description": "Name of the event to emit." - }, - "eventValue": { - "$ref": "#/definitions/valueExpression", - "title": "Event value", - "description": "Value to emit with the event (optional).", - "additionalProperties": true - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.CancelAllDialogs" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.CancelDialog": { - "$role": "implements(Microsoft.IDialog)", - "title": "Cancel all dialogs", - "description": "Cancel all active dialogs. All dialogs in the dialog chain will need a trigger to capture the event configured in this action.", - "type": "object", - "$policies": { - "lastAction": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "activityProcessed": { - "$ref": "#/definitions/booleanExpression", - "title": "Activity processed", - "description": "When set to false, the caller dialog is told it should process the current activity.", - "default": true - }, - "eventName": { - "$ref": "#/definitions/stringExpression", - "title": "Event name", - "description": "Name of the event to emit." - }, - "eventValue": { - "$ref": "#/definitions/valueExpression", - "title": "Event value", - "description": "Value to emit with the event (optional).", - "additionalProperties": true - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.CancelDialog" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.ChannelMentionEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)" - ], - "title": "Channel mention entity recognizer", - "description": "Promotes mention entities passed by a channel via the activity.entities into recognizer result.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.ChannelMentionEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.ChoiceInput": { - "$role": [ - "implements(Microsoft.IDialog)", - "extends(Microsoft.InputDialog)" - ], - "title": "Choice input dialog", - "description": "Collect information - Pick from a list of choices", - "type": "object", - "$policies": { - "interactive": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "defaultValue": { - "$ref": "#/definitions/stringExpression", - "title": "Default value", - "description": "'Property' will be set to the value of this expression when max turn count is exceeded.", - "examples": [ - "hello world", - "Hello ${user.name}", - "=concat(user.firstname, user.lastName)" - ] - }, - "value": { - "$ref": "#/definitions/stringExpression", - "title": "Value", - "description": "'Property' will be set to the value of this expression unless it evaluates to null.", - "examples": [ - "hello world", - "Hello ${user.name}", - "=concat(user.firstname, user.lastName)" - ] - }, - "outputFormat": { - "$role": "expression", - "title": "Output format", - "description": "Sets the desired choice output format (either value or index into choices).", - "oneOf": [ - { - "type": "string", - "title": "Standard", - "description": "Standard output format.", - "enum": [ - "value", - "index" - ], - "default": "value" - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "choices": { - "$role": "expression", - "title": "Array of choices", - "description": "Choices to choose from.", - "oneOf": [ - { - "type": "array", - "title": "Simple choices", - "description": "Simple choices to choose from.", - "items": [ - { - "type": "string", - "title": "Simple choice", - "description": "One choice for choice input." - } - ] - }, - { - "type": "array", - "title": "Structured choices", - "description": "Choices that allow full control.", - "items": [ - { - "type": "object", - "title": "Structured choice", - "description": "Structured choice to choose from.", - "properties": { - "value": { - "type": "string", - "title": "Value", - "description": "Value to return when this choice is selected." - }, - "action": { - "$ref": "#/definitions/botframework.json/definitions/CardAction", - "title": "Action", - "description": "Card action for the choice." - }, - "synonyms": { - "type": "array", - "title": "Synonyms", - "description": "List of synonyms to recognize in addition to the value (optional).", - "items": { - "type": "string", - "title": "Synonym", - "description": "Synonym for value." - } - } - } - } - ] - }, - { - "$ref": "#/definitions/stringExpression" - } - ] - }, - "defaultLocale": { - "$ref": "#/definitions/stringExpression", - "title": "Default locale", - "description": "The default locale to use to parse confirmation choices if there is not one passed by the caller.", - "default": "en-us", - "examples": [ - "en-us" - ] - }, - "style": { - "$role": "expression", - "title": "List style", - "description": "Sets the ListStyle to control how choices are rendered.", - "oneOf": [ - { - "type": "string", - "title": "List style", - "description": "Standard list style.", - "enum": [ - "none", - "auto", - "inline", - "list", - "suggestedAction", - "heroCard" - ], - "default": "auto" - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "choiceOptions": { - "title": "Choice options", - "description": "Sets the choice options used for controlling how choices are combined.", - "oneOf": [ - { - "type": "object", - "title": "Object", - "description": "Choice options object.", - "properties": { - "inlineSeparator": { - "type": "string", - "title": "Inline separator", - "description": "Character used to separate individual choices when there are more than 2 choices", - "default": ", " - }, - "inlineOr": { - "type": "string", - "title": "Inline or", - "description": "Separator inserted between the choices when there are only 2 choices", - "default": " or " - }, - "inlineOrMore": { - "type": "string", - "title": "Inline or more", - "description": "Separator inserted between the last 2 choices when their are more than 2 choices.", - "default": ", or " - }, - "includeNumbers": { - "type": "boolean", - "title": "Include numbers", - "description": "If true, 'inline' and 'list' list style will be prefixed with the index of the choice.", - "default": true - } - } - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "recognizerOptions": { - "title": "Recognizer options", - "description": "Sets how to recognize choices in the response", - "oneOf": [ - { - "type": "object", - "title": "Object", - "description": "Options for recognizer.", - "properties": { - "noValue": { - "type": "boolean", - "title": "No value", - "description": "If true, the choices value field will NOT be search over", - "default": false - }, - "noAction": { - "type": "boolean", - "title": "No action", - "description": "If true, the choices action.title field will NOT be searched over", - "default": false - }, - "recognizeNumbers": { - "type": "boolean", - "title": "Recognize numbers", - "description": "If true, the number recognizer will be used to recognize an index response (1,2,3...) to the prompt.", - "default": true - }, - "recognizeOrdinals": { - "type": "boolean", - "title": "Recognize ordinals", - "description": "If true, the ordinal recognizer will be used to recognize ordinal response (first/second/...) to the prompt.", - "default": true - } - } - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "default": false, - "examples": [ - false, - "=user.isVip" - ] - }, - "prompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Initial prompt", - "description": "Message to send to collect information.", - "examples": [ - "What is your birth date?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "unrecognizedPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Unrecognized prompt", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "invalidPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Invalid prompt", - "description": "Message to send when the user input does not meet any validation expression.", - "examples": [ - "Sorry, '{this.value}' does not work. I need a number between 1-150. What is your age?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "defaultValueResponse": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Default value response", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "maxTurnCount": { - "$ref": "#/definitions/integerExpression", - "title": "Max turn count", - "description": "Maximum number of re-prompt attempts to collect information.", - "default": 3, - "minimum": 0, - "maximum": 2147483647, - "examples": [ - 3, - "=settings.xyz" - ] - }, - "validations": { - "type": "array", - "title": "Validation expressions", - "description": "Expression to validate user input.", - "items": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Expression which needs to met for the input to be considered valid", - "examples": [ - "int(this.value) > 1 && int(this.value) <= 150", - "count(this.value) < 300" - ] - } - }, - "property": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property to store collected information. Input will be skipped if property has value (unless 'Always prompt' is true).", - "examples": [ - "$birthday", - "dialog.${user.name}", - "=f(x)" - ] - }, - "alwaysPrompt": { - "$ref": "#/definitions/booleanExpression", - "title": "Always prompt", - "description": "Collect information even if the specified 'property' is not empty.", - "default": false, - "examples": [ - false, - "=$val" - ] - }, - "allowInterruptions": { - "$ref": "#/definitions/booleanExpression", - "title": "Allow Interruptions", - "description": "A boolean expression that determines whether the parent should be allowed to interrupt the input.", - "default": true, - "examples": [ - true, - "=user.xyz" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.ChoiceInput" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.ConditionalSelector": { - "$role": "implements(Microsoft.ITriggerSelector)", - "title": "Conditional trigger selector", - "description": "Use a rule selector based on a condition", - "type": "object", - "required": [ - "condition", - "ifTrue", - "ifFalse", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Expression to evaluate" - }, - "ifTrue": { - "$kind": "Microsoft.ITriggerSelector", - "$ref": "#/definitions/Microsoft.ITriggerSelector" - }, - "ifFalse": { - "$kind": "Microsoft.ITriggerSelector", - "$ref": "#/definitions/Microsoft.ITriggerSelector" - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.ConditionalSelector" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.ConfirmationEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Confirmation entity recognizer", - "description": "Recognizer which recognizes confirmation choices (yes/no).", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.ConfirmationEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.ConfirmInput": { - "$role": [ - "implements(Microsoft.IDialog)", - "extends(Microsoft.InputDialog)" - ], - "title": "Confirm input dialog", - "description": "Collect information - Ask for confirmation (yes or no).", - "type": "object", - "$policies": { - "interactive": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "outputFormat": { - "$ref": "#/definitions/valueExpression", - "title": "Output format", - "description": "Optional expression to use to format the output.", - "examples": [ - "=concat('confirmation:', this.value)" - ] - }, - "defaultLocale": { - "$ref": "#/definitions/stringExpression", - "title": "Default locale", - "description": "The Default locale or an expression which provides the default locale to use as default if not found in the activity.", - "default": "en-us", - "examples": [ - "en-us" - ] - }, - "style": { - "$role": "expression", - "title": "List style", - "description": "Sets the ListStyle to control how choices are rendered.", - "oneOf": [ - { - "type": "string", - "title": "Standard style", - "description": "Standard style for rendering choices.", - "enum": [ - "none", - "auto", - "inline", - "list", - "suggestedAction", - "heroCard" - ], - "default": "auto" - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "choiceOptions": { - "title": "Choice options", - "description": "Choice Options or expression which provides Choice Options to control display choices to the user.", - "oneOf": [ - { - "type": "object", - "title": "Choice options", - "description": "Choice options.", - "properties": { - "inlineSeparator": { - "type": "string", - "title": "Inline separator", - "description": "Text to separate individual choices when there are more than 2 choices", - "default": ", " - }, - "inlineOr": { - "type": "string", - "title": "Inline or", - "description": "Text to be inserted between the choices when their are only 2 choices", - "default": " or " - }, - "inlineOrMore": { - "type": "string", - "title": "Inline or more", - "description": "Text to be inserted between the last 2 choices when their are more than 2 choices.", - "default": ", or " - }, - "includeNumbers": { - "type": "boolean", - "title": "Include numbers", - "description": "If true, inline and list style choices will be prefixed with the index of the choice.", - "default": true - } - } - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "defaultValue": { - "$ref": "#/definitions/booleanExpression", - "title": "Default value", - "description": "'Property' will be set to the value of this expression when max turn count is exceeded.", - "examples": [ - true, - "=user.age > 3" - ] - }, - "value": { - "$ref": "#/definitions/booleanExpression", - "title": "Value", - "description": "'Property' will be set to the value of this expression unless it evaluates to null.", - "examples": [ - true, - "=user.isVip" - ] - }, - "confirmChoices": { - "$role": "expression", - "title": "Array of choice objects", - "description": "Array of simple or structured choices.", - "oneOf": [ - { - "type": "array", - "title": "Simple choices", - "description": "Simple choices to confirm from.", - "items": [ - { - "type": "string", - "title": "Simple choice", - "description": "Simple choice to confirm." - } - ] - }, - { - "type": "array", - "title": "Structured choices", - "description": "Structured choices for confirmations.", - "items": [ - { - "type": "object", - "title": "Choice", - "description": "Choice to confirm.", - "properties": { - "value": { - "type": "string", - "title": "Value", - "description": "Value to return when this choice is selected." - }, - "action": { - "$ref": "#/definitions/botframework.json/definitions/CardAction", - "title": "Action", - "description": "Card action for the choice." - }, - "synonyms": { - "type": "array", - "title": "Synonyms", - "description": "List of synonyms to recognize in addition to the value (optional).", - "items": { - "type": "string", - "title": "Synonym", - "description": "Synonym for choice." - } - } - } - } - ] - }, - { - "$ref": "#/definitions/stringExpression" - } - ] - }, - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "default": false, - "examples": [ - false, - "=user.isVip" - ] - }, - "prompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Initial prompt", - "description": "Message to send to collect information.", - "examples": [ - "What is your birth date?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "unrecognizedPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Unrecognized prompt", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "invalidPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Invalid prompt", - "description": "Message to send when the user input does not meet any validation expression.", - "examples": [ - "Sorry, '{this.value}' does not work. I need a number between 1-150. What is your age?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "defaultValueResponse": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Default value response", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "maxTurnCount": { - "$ref": "#/definitions/integerExpression", - "title": "Max turn count", - "description": "Maximum number of re-prompt attempts to collect information.", - "default": 3, - "minimum": 0, - "maximum": 2147483647, - "examples": [ - 3, - "=settings.xyz" - ] - }, - "validations": { - "type": "array", - "title": "Validation expressions", - "description": "Expression to validate user input.", - "items": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Expression which needs to met for the input to be considered valid", - "examples": [ - "int(this.value) > 1 && int(this.value) <= 150", - "count(this.value) < 300" - ] - } - }, - "property": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property to store collected information. Input will be skipped if property has value (unless 'Always prompt' is true).", - "examples": [ - "$birthday", - "dialog.${user.name}", - "=f(x)" - ] - }, - "alwaysPrompt": { - "$ref": "#/definitions/booleanExpression", - "title": "Always prompt", - "description": "Collect information even if the specified 'property' is not empty.", - "default": false, - "examples": [ - false, - "=$val" - ] - }, - "allowInterruptions": { - "$ref": "#/definitions/booleanExpression", - "title": "Allow Interruptions", - "description": "A boolean expression that determines whether the parent should be allowed to interrupt the input.", - "default": true, - "examples": [ - true, - "=user.xyz" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.ConfirmInput" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.ContinueConversation": { - "$role": "implements(Microsoft.IDialog)", - "title": "Continue conversation (Queue)", - "description": "Continue a specific conversation (via StorageQueue implementation).", - "type": "object", - "required": [ - "conversationReference", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "conversationReference": { - "$ref": "#/definitions/objectExpression", - "title": "Conversation Reference", - "description": "A conversation reference. (NOTE: Minimum required values or channelId, conversation).", - "examples": [ - { - "channelId": "skype", - "serviceUrl": "http://smba.skype.com", - "conversation": { - "id": "11111" - }, - "bot": { - "id": "22222" - }, - "user": { - "id": "33333" - }, - "locale": "en-us" - } - ] - }, - "value": { - "$ref": "#/definitions/valueExpression", - "title": "Value", - "description": "Value to send in the activity.value." - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.ContinueConversation" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.ContinueConversationLater": { - "$role": "implements(Microsoft.IDialog)", - "title": "Continue conversation later (Queue)", - "description": "Continue conversation at later time (via StorageQueue implementation).", - "type": "object", - "required": [ - "date", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "date": { - "$ref": "#/definitions/stringExpression", - "title": "Date", - "description": "Date in the future as a ISO string when the conversation should continue.", - "examples": [ - "=addHours(utcNow(), 1)" - ] - }, - "value": { - "$ref": "#/definitions/valueExpression", - "title": "Value", - "description": "Value to send in the activity.value." - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.ContinueConversationLater" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.ContinueLoop": { - "$role": "implements(Microsoft.IDialog)", - "title": "Continue loop", - "description": "Stop executing this template and continue with the next iteration of the loop.", - "type": "object", - "required": [ - "$kind" - ], - "$policies": { - "lastAction": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.ContinueLoop" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.CrossTrainedRecognizerSet": { - "$role": "implements(Microsoft.IRecognizer)", - "title": "Cross-trained recognizer set", - "description": "Recognizer for selecting between cross trained recognizers.", - "type": "object", - "required": [ - "recognizers", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional unique id using with RecognizerSet." - }, - "recognizers": { - "type": "array", - "title": "Recognizers", - "description": "List of Recognizers defined for this set.", - "items": { - "$kind": "Microsoft.IRecognizer", - "$ref": "#/definitions/Microsoft.IRecognizer" - } - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.CrossTrainedRecognizerSet" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.CurrencyEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Currency entity recognizer", - "description": "Recognizer which recognizes currency.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.CurrencyEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.DateTimeEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Date and time entity recognizer", - "description": "Recognizer which recognizes dates and time fragments.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.DateTimeEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.DateTimeInput": { - "$role": [ - "implements(Microsoft.IDialog)", - "extends(Microsoft.InputDialog)" - ], - "title": "Date/time input dialog", - "description": "Collect information - Ask for date and/ or time", - "type": "object", - "defaultLocale": { - "$ref": "#/definitions/stringExpression", - "title": "Default locale", - "description": "Default locale.", - "default": "en-us" - }, - "$policies": { - "interactive": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "defaultValue": { - "$ref": "#/definitions/stringExpression", - "format": "date-time", - "title": "Default date", - "description": "'Property' will be set to the value or the result of the expression when max turn count is exceeded.", - "examples": [ - "=user.birthday" - ] - }, - "value": { - "$ref": "#/definitions/stringExpression", - "format": "date-time", - "title": "Value", - "description": "'Property' will be set to the value or the result of the expression unless it evaluates to null.", - "examples": [ - "=user.birthday" - ] - }, - "outputFormat": { - "$ref": "#/definitions/expression", - "title": "Output format", - "description": "Expression to use for formatting the output.", - "examples": [ - "=this.value[0].Value" - ] - }, - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "default": false, - "examples": [ - false, - "=user.isVip" - ] - }, - "prompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Initial prompt", - "description": "Message to send to collect information.", - "examples": [ - "What is your birth date?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "unrecognizedPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Unrecognized prompt", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "invalidPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Invalid prompt", - "description": "Message to send when the user input does not meet any validation expression.", - "examples": [ - "Sorry, '{this.value}' does not work. I need a number between 1-150. What is your age?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "defaultValueResponse": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Default value response", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "maxTurnCount": { - "$ref": "#/definitions/integerExpression", - "title": "Max turn count", - "description": "Maximum number of re-prompt attempts to collect information.", - "default": 3, - "minimum": 0, - "maximum": 2147483647, - "examples": [ - 3, - "=settings.xyz" - ] - }, - "validations": { - "type": "array", - "title": "Validation expressions", - "description": "Expression to validate user input.", - "items": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Expression which needs to met for the input to be considered valid", - "examples": [ - "int(this.value) > 1 && int(this.value) <= 150", - "count(this.value) < 300" - ] - } - }, - "property": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property to store collected information. Input will be skipped if property has value (unless 'Always prompt' is true).", - "examples": [ - "$birthday", - "dialog.${user.name}", - "=f(x)" - ] - }, - "alwaysPrompt": { - "$ref": "#/definitions/booleanExpression", - "title": "Always prompt", - "description": "Collect information even if the specified 'property' is not empty.", - "default": false, - "examples": [ - false, - "=$val" - ] - }, - "allowInterruptions": { - "$ref": "#/definitions/booleanExpression", - "title": "Allow Interruptions", - "description": "A boolean expression that determines whether the parent should be allowed to interrupt the input.", - "default": true, - "examples": [ - true, - "=user.xyz" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.DateTimeInput" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.DebugBreak": { - "$role": "implements(Microsoft.IDialog)", - "title": "Debugger break", - "description": "If debugger is attached, stop the execution at this point in the conversation.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.DebugBreak" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.DeleteActivity": { - "$role": "implements(Microsoft.IDialog)", - "title": "Delete Activity", - "description": "Delete an activity that was previously sent.", - "type": "object", - "required": [ - "activityId", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "activityId": { - "$ref": "#/definitions/stringExpression", - "title": "ActivityId", - "description": "expression to an activityId to delete", - "examples": [ - "=turn.lastresult.id" - ] - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.DeleteActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.DeleteProperties": { - "$role": "implements(Microsoft.IDialog)", - "title": "Delete Properties", - "description": "Delete multiple properties and any value it holds.", - "type": "object", - "required": [ - "properties", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "properties": { - "type": "array", - "title": "Properties", - "description": "Properties to delete.", - "items": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property to delete." - } - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.DeleteProperties" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.DeleteProperty": { - "$role": "implements(Microsoft.IDialog)", - "title": "Delete property", - "description": "Delete a property and any value it holds.", - "type": "object", - "required": [ - "property", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "property": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property to delete." - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.DeleteProperty" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.DimensionEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Dimension entity recognizer", - "description": "Recognizer which recognizes dimension.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.DimensionEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.EditActions": { - "$role": "implements(Microsoft.IDialog)", - "title": "Edit actions.", - "description": "Edit the current list of actions.", - "type": "object", - "required": [ - "changeType", - "actions", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "changeType": { - "title": "Type of change", - "description": "Type of change to apply to the current actions.", - "oneOf": [ - { - "type": "string", - "title": "Standard change", - "description": "Standard change types.", - "enum": [ - "insertActions", - "insertActionsBeforeTags", - "appendActions", - "endSequence", - "replaceSequence" - ] - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Actions to apply.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.EditActions" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.EditArray": { - "$role": "implements(Microsoft.IDialog)", - "title": "Edit array", - "description": "Modify an array in memory", - "type": "object", - "required": [ - "itemsProperty", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "changeType": { - "title": "Type of change", - "description": "Type of change to the array in memory.", - "oneOf": [ - { - "type": "string", - "title": "Change type", - "description": "Standard change type.", - "enum": [ - "push", - "pop", - "take", - "remove", - "clear" - ] - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "itemsProperty": { - "$ref": "#/definitions/stringExpression", - "title": "Items property", - "description": "Property that holds the array to update." - }, - "resultProperty": { - "$ref": "#/definitions/stringExpression", - "title": "Result property", - "description": "Property to store the result of this action." - }, - "value": { - "$ref": "#/definitions/valueExpression", - "title": "Value", - "description": "New value or expression.", - "examples": [ - "milk", - "=dialog.favColor", - "=dialog.favColor == 'red'" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.EditArray" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.EmailEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Email entity recognizer", - "description": "Recognizer which recognizes email.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.EmailEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.EmitEvent": { - "$role": "implements(Microsoft.IDialog)", - "title": "Emit a custom event", - "description": "Emit an event. Capture this event with a trigger.", - "type": "object", - "required": [ - "eventName", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "eventName": { - "$role": "expression", - "title": "Event name", - "description": "Name of the event to emit.", - "oneOf": [ - { - "type": "string", - "title": "Built-in event", - "description": "Standard event type.", - "enum": [ - "beginDialog", - "resumeDialog", - "repromptDialog", - "cancelDialog", - "endDialog", - "activityReceived", - "recognizedIntent", - "unknownIntent", - "actionsStarted", - "actionsSaved", - "actionsEnded", - "actionsResumed" - ] - }, - { - "type": "string", - "title": "Custom event", - "description": "Custom event type", - "pattern": "^(?!(beginDialog$|resumeDialog$|repromptDialog$|cancelDialog$|endDialog$|activityReceived$|recognizedIntent$|unknownIntent$|actionsStarted$|actionsSaved$|actionsEnded$|actionsResumed))(\\S){1}.*" - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "eventValue": { - "$ref": "#/definitions/valueExpression", - "title": "Event value", - "description": "Value to emit with the event (optional)." - }, - "bubbleEvent": { - "$ref": "#/definitions/booleanExpression", - "title": "Bubble event", - "description": "If true this event is passed on to parent dialogs." - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.EmitEvent" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.EndDialog": { - "$role": "implements(Microsoft.IDialog)", - "title": "End dialog", - "description": "End this dialog.", - "type": "object", - "$policies": { - "lastAction": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "value": { - "$ref": "#/definitions/valueExpression", - "title": "Value", - "description": "Result value returned to the parent dialog.", - "examples": [ - "=dialog.userName", - "='tomato'" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.EndDialog" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.EndTurn": { - "$role": "implements(Microsoft.IDialog)", - "title": "End turn", - "description": "End the current turn without ending the dialog.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.EndTurn" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.FirstSelector": { - "$role": "implements(Microsoft.ITriggerSelector)", - "title": "First trigger selector", - "description": "Selector for first true rule", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.FirstSelector" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.Foreach": { - "$role": "implements(Microsoft.IDialog)", - "title": "For each item", - "description": "Execute actions on each item in an a collection.", - "type": "object", - "required": [ - "itemsProperty", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "itemsProperty": { - "$ref": "#/definitions/stringExpression", - "title": "Items property", - "description": "Property that holds the array.", - "examples": [ - "user.todoList" - ] - }, - "index": { - "$ref": "#/definitions/stringExpression", - "title": "Index property", - "description": "Property that holds the index of the item.", - "default": "dialog.foreach.index" - }, - "value": { - "$ref": "#/definitions/stringExpression", - "title": "Value property", - "description": "Property that holds the value of the item.", - "default": "dialog.foreach.value" - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Actions to execute for each item. Use '$foreach.value' to access the value of each item. Use '$foreach.index' to access the index of each item.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.Foreach" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.ForeachPage": { - "$role": "implements(Microsoft.IDialog)", - "title": "For each page", - "description": "Execute actions on each page (collection of items) in an array.", - "type": "object", - "required": [ - "itemsProperty", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "itemsProperty": { - "$ref": "#/definitions/stringExpression", - "title": "Items property", - "description": "Property that holds the array.", - "examples": [ - "user.todoList" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Actions to execute for each page. Use '$foreach.page' to access each page.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "pageIndex": { - "$ref": "#/definitions/stringExpression", - "title": "Index property", - "description": "Property that holds the index of the page.", - "default": "dialog.foreach.pageindex" - }, - "page": { - "$ref": "#/definitions/stringExpression", - "title": "Page property", - "description": "Property that holds the value of the page.", - "default": "dialog.foreach.page" - }, - "pageSize": { - "$ref": "#/definitions/integerExpression", - "title": "Page size", - "description": "Number of items in each page.", - "default": 10 - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.ForeachPage" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.GetActivityMembers": { - "$role": "implements(Microsoft.IDialog)", - "title": "Get activity members", - "description": "Get the members who are participating in an activity. (BotFrameworkAdapter only)", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "property": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property (named location to store information).", - "examples": [ - "user.age" - ] - }, - "activityId": { - "$ref": "#/definitions/stringExpression", - "title": "Activity Id", - "description": "Activity ID or expression to an activityId to use to get the members. If none is defined then the current activity id will be used.", - "examples": [ - "turn.lastresult.id" - ] - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.GetActivityMembers" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.GetConversationMembers": { - "$role": "implements(Microsoft.IDialog)", - "title": "Get conversation members", - "description": "Get the members who are participating in an conversation. (BotFrameworkAdapter only)", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "property": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property (named location to store information).", - "examples": [ - "user.age" - ] - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.GetConversationMembers" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.GetConversationReference": { - "$role": "implements(Microsoft.IDialog)", - "title": "Get ConversationReference", - "description": "Gets the ConversationReference from current context and stores it in property so it can be used to with ContinueConversation action.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "property": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property (named location to store information).", - "examples": [ - "user.age" - ] - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.GetConversationReference" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.GotoAction": { - "$role": "implements(Microsoft.IDialog)", - "title": "Go to action", - "description": "Go to an an action by id.", - "type": "object", - "required": [ - "actionId", - "$kind" - ], - "$policies": { - "lastAction": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "actionId": { - "$ref": "#/definitions/stringExpression", - "title": "Action Id", - "description": "Action Id to execute next" - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.GotoAction" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.GuidEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Guid entity recognizer", - "description": "Recognizer which recognizes guids.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.GuidEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.HashtagEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Hashtag entity recognizer", - "description": "Recognizer which recognizes Hashtags.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.HashtagEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.HttpRequest": { - "$role": "implements(Microsoft.IDialog)", - "type": "object", - "title": "HTTP request", - "description": "Make a HTTP request.", - "required": [ - "url", - "method", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "method": { - "type": "string", - "title": "HTTP method", - "description": "HTTP method to use.", - "enum": [ - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "examples": [ - "GET", - "POST" - ] - }, - "url": { - "$ref": "#/definitions/stringExpression", - "title": "Url", - "description": "URL to call (supports data binding).", - "examples": [ - "https://contoso.com" - ] - }, - "body": { - "$ref": "#/definitions/valueExpression", - "title": "Body", - "description": "Body to include in the HTTP call (supports data binding).", - "additionalProperties": true - }, - "resultProperty": { - "$ref": "#/definitions/stringExpression", - "title": "Result property", - "description": "A property to store the result of this action. The result can include any of the 4 properties from the HTTP response: statusCode, reasonPhrase, content, and headers. If the content is JSON it will be a deserialized object. The values can be accessed via .content for example.", - "default": "turn.results", - "examples": [ - "dialog.contosodata" - ] - }, - "contentType": { - "$ref": "#/definitions/stringExpression", - "title": "Content type", - "description": "Content media type for the body.", - "examples": [ - "application/json", - "text/plain" - ] - }, - "headers": { - "type": "object", - "title": "Headers", - "description": "One or more headers to include in the request (supports data binding).", - "additionalProperties": { - "$ref": "#/definitions/stringExpression" - } - }, - "responseType": { - "$ref": "#/definitions/stringExpression", - "title": "Response type", - "description": "Defines the type of HTTP response. Automatically calls the 'Send a response' action if set to 'Activity' or 'Activities'.", - "oneOf": [ - { - "type": "string", - "title": "Standard response", - "description": "Standard response type.", - "enum": [ - "none", - "json", - "activity", - "activities", - "binary" - ], - "default": "json" - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.HttpRequest" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.IActivityTemplate": { - "title": "Microsoft ActivityTemplates", - "description": "Components which are ActivityTemplate, which is string template, an activity, or a implementation of ActivityTemplate", - "$role": "interface", - "oneOf": [ - { - "$ref": "#/definitions/Microsoft.ActivityTemplate" - }, - { - "$ref": "#/definitions/Microsoft.StaticActivityTemplate" - }, - { - "$ref": "#/definitions/botframework.json/definitions/Activity", - "required": [ - "type" - ] - }, - { - "type": "string" - } - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Declarative", - "version": "4.13.2" - } - }, - "Microsoft.IAdapter": { - "$role": "interface", - "title": "Bot adapter", - "description": "Component that enables connecting bots to chat clients and applications.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime", - "version": "4.13.2" - }, - "properties": { - "route": { - "type": "string", - "title": "Adapter http route", - "description": "Route where to expose the adapter." - }, - "type": { - "type": "string", - "title": "Adapter type name", - "description": "Adapter type name" - } - } - }, - "Microsoft.IDialog": { - "title": "Microsoft dialogs", - "description": "Components which derive from Dialog", - "$role": "interface", - "oneOf": [ - { - "$ref": "#/definitions/Microsoft.AdaptiveDialog" - }, - { - "$ref": "#/definitions/Microsoft.Ask" - }, - { - "$ref": "#/definitions/Microsoft.AttachmentInput" - }, - { - "$ref": "#/definitions/Microsoft.BeginDialog" - }, - { - "$ref": "#/definitions/Microsoft.BeginSkill" - }, - { - "$ref": "#/definitions/Microsoft.BreakLoop" - }, - { - "$ref": "#/definitions/Microsoft.CancelAllDialogs" - }, - { - "$ref": "#/definitions/Microsoft.CancelDialog" - }, - { - "$ref": "#/definitions/Microsoft.ChoiceInput" - }, - { - "$ref": "#/definitions/Microsoft.ConfirmInput" - }, - { - "$ref": "#/definitions/Microsoft.ContinueConversation" - }, - { - "$ref": "#/definitions/Microsoft.ContinueConversationLater" - }, - { - "$ref": "#/definitions/Microsoft.ContinueLoop" - }, - { - "$ref": "#/definitions/Microsoft.DateTimeInput" - }, - { - "$ref": "#/definitions/Microsoft.DebugBreak" - }, - { - "$ref": "#/definitions/Microsoft.DeleteActivity" - }, - { - "$ref": "#/definitions/Microsoft.DeleteProperties" - }, - { - "$ref": "#/definitions/Microsoft.DeleteProperty" - }, - { - "$ref": "#/definitions/Microsoft.EditActions" - }, - { - "$ref": "#/definitions/Microsoft.EditArray" - }, - { - "$ref": "#/definitions/Microsoft.EmitEvent" - }, - { - "$ref": "#/definitions/Microsoft.EndDialog" - }, - { - "$ref": "#/definitions/Microsoft.EndTurn" - }, - { - "$ref": "#/definitions/Microsoft.Foreach" - }, - { - "$ref": "#/definitions/Microsoft.ForeachPage" - }, - { - "$ref": "#/definitions/Microsoft.GetActivityMembers" - }, - { - "$ref": "#/definitions/Microsoft.GetConversationMembers" - }, - { - "$ref": "#/definitions/Microsoft.GetConversationReference" - }, - { - "$ref": "#/definitions/Microsoft.GotoAction" - }, - { - "$ref": "#/definitions/Microsoft.HttpRequest" - }, - { - "$ref": "#/definitions/Microsoft.IfCondition" - }, - { - "$ref": "#/definitions/Microsoft.LogAction" - }, - { - "$ref": "#/definitions/Microsoft.NumberInput" - }, - { - "$ref": "#/definitions/Microsoft.OAuthInput" - }, - { - "$ref": "#/definitions/Microsoft.QnAMakerDialog" - }, - { - "$ref": "#/definitions/Microsoft.RepeatDialog" - }, - { - "$ref": "#/definitions/Microsoft.ReplaceDialog" - }, - { - "$ref": "#/definitions/Microsoft.SendActivity" - }, - { - "$ref": "#/definitions/Microsoft.SendHandoffActivity" - }, - { - "$ref": "#/definitions/Microsoft.SetProperties" - }, - { - "$ref": "#/definitions/Microsoft.SetProperty" - }, - { - "$ref": "#/definitions/Microsoft.SignOutUser" - }, - { - "$ref": "#/definitions/Microsoft.SwitchCondition" - }, - { - "$ref": "#/definitions/Microsoft.TelemetryTrackEventAction" - }, - { - "$ref": "#/definitions/Microsoft.TextInput" - }, - { - "$ref": "#/definitions/Microsoft.ThrowException" - }, - { - "$ref": "#/definitions/Microsoft.TraceActivity" - }, - { - "$ref": "#/definitions/Microsoft.UpdateActivity" - }, - { - "type": "string", - "pattern": "^(?!(=)).*" - } - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Declarative", - "version": "4.13.2" - } - }, - "Microsoft.IEntityRecognizer": { - "$role": "interface", - "title": "Entity recognizers", - "description": "Components which derive from EntityRecognizer.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "oneOf": [ - { - "$ref": "#/definitions/Microsoft.AgeEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.ConfirmationEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.CurrencyEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.DateTimeEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.DimensionEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.EmailEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.GuidEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.HashtagEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.IpEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.MentionEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.NumberEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.NumberRangeEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.OrdinalEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.PercentageEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.PhoneNumberEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.RegexEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.TemperatureEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.UrlEntityRecognizer" - }, - { - "type": "string", - "title": "Reference to Microsoft.IEntityRecognizer", - "description": "Reference to Microsoft.IEntityRecognizer .dialog file." - } - ] - }, - "Microsoft.IfCondition": { - "$role": "implements(Microsoft.IDialog)", - "title": "If condition", - "description": "Two-way branch the conversation flow based on a condition.", - "type": "object", - "required": [ - "condition", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Expression to evaluate.", - "examples": [ - "user.age > 3" - ] - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - true, - "=user.age > 3" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Actions to execute if condition is true.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "elseActions": { - "type": "array", - "title": "Else", - "description": "Actions to execute if condition is false.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.IfCondition" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.ILanguageGenerator": { - "title": "Microsoft LanguageGenerator", - "description": "Components which dervie from the LanguageGenerator class", - "$role": "interface", - "oneOf": [ - { - "$ref": "#/definitions/Microsoft.ResourceMultiLanguageGenerator" - }, - { - "$ref": "#/definitions/Microsoft.TemplateEngineLanguageGenerator" - }, - { - "type": "string" - } - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - } - }, - "Microsoft.InputDialog": { - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "default": false, - "examples": [ - false, - "=user.isVip" - ] - }, - "prompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Initial prompt", - "description": "Message to send to collect information.", - "examples": [ - "What is your birth date?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "unrecognizedPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Unrecognized prompt", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "invalidPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Invalid prompt", - "description": "Message to send when the user input does not meet any validation expression.", - "examples": [ - "Sorry, '{this.value}' does not work. I need a number between 1-150. What is your age?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "defaultValueResponse": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Default value response", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "maxTurnCount": { - "$ref": "#/definitions/integerExpression", - "title": "Max turn count", - "description": "Maximum number of re-prompt attempts to collect information.", - "default": 3, - "minimum": 0, - "maximum": 2147483647, - "examples": [ - 3, - "=settings.xyz" - ] - }, - "validations": { - "type": "array", - "title": "Validation expressions", - "description": "Expression to validate user input.", - "items": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Expression which needs to met for the input to be considered valid", - "examples": [ - "int(this.value) > 1 && int(this.value) <= 150", - "count(this.value) < 300" - ] - } - }, - "property": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property to store collected information. Input will be skipped if property has value (unless 'Always prompt' is true).", - "examples": [ - "$birthday", - "dialog.${user.name}", - "=f(x)" - ] - }, - "alwaysPrompt": { - "$ref": "#/definitions/booleanExpression", - "title": "Always prompt", - "description": "Collect information even if the specified 'property' is not empty.", - "default": false, - "examples": [ - false, - "=$val" - ] - }, - "allowInterruptions": { - "$ref": "#/definitions/booleanExpression", - "title": "Allow Interruptions", - "description": "A boolean expression that determines whether the parent should be allowed to interrupt the input.", - "default": true, - "examples": [ - true, - "=user.xyz" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.InputDialog" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.IpEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "IP entity recognizer", - "description": "Recognizer which recognizes internet IP patterns (like 192.1.1.1).", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.IpEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.IRecognizer": { - "title": "Microsoft recognizer", - "description": "Components which derive from Recognizer class", - "$role": "interface", - "oneOf": [ - { - "$ref": "#/definitions/Microsoft.AgeEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.ChannelMentionEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.ConfirmationEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.CrossTrainedRecognizerSet" - }, - { - "$ref": "#/definitions/Microsoft.CurrencyEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.DateTimeEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.DimensionEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.EmailEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.GuidEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.HashtagEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.IpEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.LuisRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.MentionEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.MultiLanguageRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.NumberEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.NumberRangeEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.OrdinalEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.PercentageEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.PhoneNumberEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.QnAMakerRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.RecognizerSet" - }, - { - "$ref": "#/definitions/Microsoft.RegexEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.RegexRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.TemperatureEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.UrlEntityRecognizer" - }, - { - "type": "string" - } - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Declarative", - "version": "4.13.2" - } - }, - "Microsoft.ITextTemplate": { - "title": "Microsoft TextTemplate", - "description": "Components which derive from TextTemplate class", - "$role": "interface", - "oneOf": [ - { - "$ref": "#/definitions/Microsoft.TextTemplate" - }, - { - "type": "string" - } - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Declarative", - "version": "4.13.2" - } - }, - "Microsoft.ITrigger": { - "$role": "interface", - "title": "Microsoft Triggers", - "description": "Components which derive from OnCondition class.", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "oneOf": [ - { - "$ref": "#/definitions/Microsoft.OnActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnAssignEntity" - }, - { - "$ref": "#/definitions/Microsoft.OnBeginDialog" - }, - { - "$ref": "#/definitions/Microsoft.OnCancelDialog" - }, - { - "$ref": "#/definitions/Microsoft.OnChooseEntity" - }, - { - "$ref": "#/definitions/Microsoft.OnChooseIntent" - }, - { - "$ref": "#/definitions/Microsoft.OnChooseProperty" - }, - { - "$ref": "#/definitions/Microsoft.OnCommandActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnCommandResultActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnCondition" - }, - { - "$ref": "#/definitions/Microsoft.OnContinueConversation" - }, - { - "$ref": "#/definitions/Microsoft.OnConversationUpdateActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnDialogEvent" - }, - { - "$ref": "#/definitions/Microsoft.OnEndOfActions" - }, - { - "$ref": "#/definitions/Microsoft.OnEndOfConversationActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnError" - }, - { - "$ref": "#/definitions/Microsoft.OnEventActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnHandoffActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnInstallationUpdateActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnIntent" - }, - { - "$ref": "#/definitions/Microsoft.OnInvokeActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnMessageActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnMessageDeleteActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnMessageReactionActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnMessageUpdateActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnQnAMatch" - }, - { - "$ref": "#/definitions/Microsoft.OnRepromptDialog" - }, - { - "$ref": "#/definitions/Microsoft.OnTypingActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnUnknownIntent" - }, - { - "type": "string", - "title": "Reference to Microsoft.ITrigger", - "description": "Reference to Microsoft.ITrigger .dialog file." - } - ] - }, - "Microsoft.ITriggerSelector": { - "$role": "interface", - "title": "Selectors", - "description": "Components which derive from TriggerSelector class.", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "oneOf": [ - { - "$ref": "#/definitions/Microsoft.ConditionalSelector" - }, - { - "$ref": "#/definitions/Microsoft.FirstSelector" - }, - { - "$ref": "#/definitions/Microsoft.MostSpecificSelector" - }, - { - "$ref": "#/definitions/Microsoft.RandomSelector" - }, - { - "$ref": "#/definitions/Microsoft.TrueSelector" - }, - { - "type": "string", - "title": "Reference to Microsoft.ITriggerSelector", - "description": "Reference to Microsoft.ITriggerSelector .dialog file." - } - ] - }, - "Microsoft.LanguagePolicy": { - "title": "Language policy", - "description": "This represents a policy map for locales lookups to use for language", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": { - "type": "array", - "title": "Per-locale policy", - "description": "Language policy per locale.", - "items": { - "type": "string", - "title": "Locale", - "description": "Locale like en-us." - } - }, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.LanguagePolicy" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.LogAction": { - "$role": "implements(Microsoft.IDialog)", - "title": "Log to console", - "description": "Log a message to the host application. Send a TraceActivity to Bot Framework Emulator (optional).", - "type": "object", - "required": [ - "text", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - true, - "=user.age > 3" - ] - }, - "text": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Text", - "description": "Information to log.", - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "label": { - "$ref": "#/definitions/stringExpression", - "title": "Label", - "description": "Label for the trace activity (used to identify it in a list of trace activities.)" - }, - "traceActivity": { - "$ref": "#/definitions/booleanExpression", - "title": "Send trace activity", - "description": "If true, automatically sends a TraceActivity (view in Bot Framework Emulator)." - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.LogAction" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.LuisRecognizer": { - "$role": "implements(Microsoft.IRecognizer)", - "title": "LUIS Recognizer", - "description": "LUIS recognizer.", - "type": "object", - "required": [ - "applicationId", - "endpoint", - "endpointKey", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.AI.Luis", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional unique id using with RecognizerSet. Other recognizers should return 'DeferToRecognizer_{Id}' intent when cross training data for this recognizer." - }, - "applicationId": { - "$ref": "#/definitions/stringExpression", - "title": "LUIS application id", - "description": "Application ID for your model from the LUIS service." - }, - "version": { - "$ref": "#/definitions/stringExpression", - "title": "LUIS version", - "description": "Optional version to target. If null then predictionOptions.Slot is used." - }, - "endpoint": { - "$ref": "#/definitions/stringExpression", - "title": "LUIS endpoint", - "description": "Endpoint to use for LUIS service like https://westus.api.cognitive.microsoft.com." - }, - "endpointKey": { - "$ref": "#/definitions/stringExpression", - "title": "LUIS prediction key", - "description": "LUIS prediction key used to call endpoint." - }, - "externalEntityRecognizer": { - "$kind": "Microsoft.IRecognizer", - "title": "External entity recognizer", - "description": "Entities recognized by this recognizer will be passed to LUIS as external entities.", - "$ref": "#/definitions/Microsoft.IRecognizer" - }, - "dynamicLists": { - "$ref": "#/definitions/arrayExpression", - "title": "Dynamic lists", - "description": "Runtime defined entity lists.", - "items": { - "title": "Entity list", - "description": "Lists of canonical values and synonyms for an entity.", - "type": "object", - "properties": { - "entity": { - "title": "Entity", - "description": "Entity to extend with a dynamic list.", - "type": "string" - }, - "list": { - "title": "Dynamic list", - "description": "List of canonical forms and synonyms.", - "type": "array", - "items": { - "type": "object", - "title": "List entry", - "description": "Canonical form and synonynms.", - "properties": { - "canonicalForm": { - "title": "Canonical form", - "description": "Resolution if any synonym matches.", - "type": "string" - }, - "synonyms": { - "title": "Synonyms", - "description": "List of synonyms for a canonical form.", - "type": "array", - "items": { - "title": "Synonym", - "description": "Synonym for canonical form.", - "type": "string" - } - } - } - } - } - } - } - }, - "predictionOptions": { - "type": "object", - "title": "Prediction options", - "description": "Options to control LUIS prediction behavior.", - "properties": { - "includeAllIntents": { - "$ref": "#/definitions/booleanExpression", - "title": "Include all intents", - "description": "True for all intents, false for only top intent." - }, - "includeInstanceData": { - "$ref": "#/definitions/booleanExpression", - "title": "Include $instance", - "description": "True to include $instance metadata in the LUIS response." - }, - "log": { - "$ref": "#/definitions/booleanExpression", - "title": "Log utterances", - "description": "True to log utterances on LUIS service." - }, - "preferExternalEntities": { - "$ref": "#/definitions/booleanExpression", - "title": "Prefer external entities", - "description": "True to prefer external entities to those generated by LUIS models." - }, - "slot": { - "$ref": "#/definitions/stringExpression", - "title": "Slot", - "description": "Slot to use for talking to LUIS service like production or staging." - } - } - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.LuisRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.MentionEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Mentions entity recognizer", - "description": "Recognizer which recognizes @Mentions", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.MentionEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.MostSpecificSelector": { - "$role": "implements(Microsoft.ITriggerSelector)", - "title": "Most specific trigger selector", - "description": "Select most specific true events with optional additional selector", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "selector": { - "$kind": "Microsoft.ITriggerSelector", - "$ref": "#/definitions/Microsoft.ITriggerSelector" - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.MostSpecificSelector" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.MultiLanguageRecognizer": { - "$role": "implements(Microsoft.IRecognizer)", - "title": "Multi-language recognizer", - "description": "Configure one recognizer per language and the specify the language fallback policy.", - "type": "object", - "required": [ - "recognizers", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional unique id using with RecognizerSet. Other recognizers should return 'DeferToRecognizer_{Id}' intent when cross training data for this recognizer." - }, - "languagePolicy": { - "$kind": "Microsoft.LanguagePolicy", - "type": "object", - "title": "Language policy", - "description": "Defines fall back languages to try per user input language.", - "$ref": "#/definitions/Microsoft.LanguagePolicy" - }, - "recognizers": { - "type": "object", - "title": "Recognizers", - "description": "Map of language -> Recognizer", - "additionalProperties": { - "$kind": "Microsoft.IRecognizer", - "$ref": "#/definitions/Microsoft.IRecognizer" - } - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.MultiLanguageRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.NumberEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Number entity recognizer", - "description": "Recognizer which recognizes numbers.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.NumberEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.NumberInput": { - "$role": [ - "implements(Microsoft.IDialog)", - "extends(Microsoft.InputDialog)" - ], - "title": "Number input dialog", - "description": "Collect information - Ask for a number.", - "type": "object", - "$policies": { - "interactive": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "defaultValue": { - "$ref": "#/definitions/numberExpression", - "title": "Default value", - "description": "'Property' will be set to the value of this expression when max turn count is exceeded.", - "examples": [ - 13, - "=user.age" - ] - }, - "value": { - "$ref": "#/definitions/numberExpression", - "title": "Value", - "description": "'Property' will be set to the value of this expression unless it evaluates to null.", - "examples": [ - 13, - "=user.age" - ] - }, - "outputFormat": { - "$ref": "#/definitions/expression", - "title": "Output format", - "description": "Expression to format the number output.", - "examples": [ - "=this.value", - "=int(this.text)" - ] - }, - "defaultLocale": { - "$ref": "#/definitions/stringExpression", - "title": "Default locale", - "description": "Default locale to use if there is no locale available..", - "default": "en-us" - }, - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "default": false, - "examples": [ - false, - "=user.isVip" - ] - }, - "prompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Initial prompt", - "description": "Message to send to collect information.", - "examples": [ - "What is your birth date?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "unrecognizedPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Unrecognized prompt", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "invalidPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Invalid prompt", - "description": "Message to send when the user input does not meet any validation expression.", - "examples": [ - "Sorry, '{this.value}' does not work. I need a number between 1-150. What is your age?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "defaultValueResponse": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Default value response", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "maxTurnCount": { - "$ref": "#/definitions/integerExpression", - "title": "Max turn count", - "description": "Maximum number of re-prompt attempts to collect information.", - "default": 3, - "minimum": 0, - "maximum": 2147483647, - "examples": [ - 3, - "=settings.xyz" - ] - }, - "validations": { - "type": "array", - "title": "Validation expressions", - "description": "Expression to validate user input.", - "items": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Expression which needs to met for the input to be considered valid", - "examples": [ - "int(this.value) > 1 && int(this.value) <= 150", - "count(this.value) < 300" - ] - } - }, - "property": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property to store collected information. Input will be skipped if property has value (unless 'Always prompt' is true).", - "examples": [ - "$birthday", - "dialog.${user.name}", - "=f(x)" - ] - }, - "alwaysPrompt": { - "$ref": "#/definitions/booleanExpression", - "title": "Always prompt", - "description": "Collect information even if the specified 'property' is not empty.", - "default": false, - "examples": [ - false, - "=$val" - ] - }, - "allowInterruptions": { - "$ref": "#/definitions/booleanExpression", - "title": "Allow Interruptions", - "description": "A boolean expression that determines whether the parent should be allowed to interrupt the input.", - "default": true, - "examples": [ - true, - "=user.xyz" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.NumberInput" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.NumberRangeEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Number range entity recognizer", - "description": "Recognizer which recognizes ranges of numbers (Example:2 to 5).", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.NumberRangeEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OAuthInput": { - "$role": "implements(Microsoft.IDialog)", - "title": "OAuthInput Dialog", - "description": "Collect login information before each request.", - "type": "object", - "required": [ - "connectionName", - "$kind" - ], - "$policies": { - "interactive": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "connectionName": { - "$ref": "#/definitions/stringExpression", - "title": "Connection name", - "description": "The connection name configured in Azure Web App Bot OAuth settings.", - "examples": [ - "msgraphOAuthConnection" - ] - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - true, - "=user.age > 3" - ] - }, - "text": { - "$ref": "#/definitions/stringExpression", - "title": "Text", - "description": "Text shown in the OAuth signin card.", - "examples": [ - "Please sign in. ", - "=concat(x,y,z)" - ] - }, - "title": { - "$ref": "#/definitions/stringExpression", - "title": "Title", - "description": "Title shown in the OAuth signin card.", - "examples": [ - "Login" - ] - }, - "timeout": { - "$ref": "#/definitions/integerExpression", - "title": "Timeout", - "description": "Time out setting for the OAuth signin card.", - "default": 900000 - }, - "property": { - "$ref": "#/definitions/stringExpression", - "title": "Token property", - "description": "Property to store the OAuth token result. WARNING: Changing this location is not recommended as you should call OAuthInput immediately before each use of the token.", - "default": "turn.token", - "examples": [ - "dialog.token" - ] - }, - "invalidPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Invalid prompt", - "description": "Message to send if user response is invalid.", - "examples": [ - "Sorry, the login info you provided is not valid." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "defaultValueResponse": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Default value response", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Login failed." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "maxTurnCount": { - "$ref": "#/definitions/integerExpression", - "title": "Max turn count", - "description": "Maximum number of re-prompt attempts to collect information.", - "default": 3, - "examples": [ - 3 - ] - }, - "defaultValue": { - "$ref": "#/definitions/expression", - "title": "Default value", - "description": "Expression to examine on each turn of the conversation as possible value to the property.", - "examples": [ - "@token" - ] - }, - "allowInterruptions": { - "$ref": "#/definitions/booleanExpression", - "title": "Allow interruptions", - "description": "A boolean expression that determines whether the parent should be allowed to interrupt the input.", - "default": true, - "examples": [ - true, - "=f(x)" - ] - }, - "alwaysPrompt": { - "$ref": "#/definitions/booleanExpression", - "title": "Always prompt", - "description": "Collect information even if the specified 'property' is not empty.", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OAuthInput" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnActivity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On activity", - "description": "Actions to perform on receipt of a generic activity.", - "type": "object", - "required": [ - "type", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "type": { - "type": "string", - "title": "Activity type", - "description": "The Activity.Type to match" - }, - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnAssignEntity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On entity assignment", - "description": "Actions to apply an operation on a property and value.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "operation": { - "type": "string", - "title": "Operation", - "description": "Operation filter on event." - }, - "property": { - "type": "string", - "title": "Property", - "description": "Property filter on event." - }, - "value": { - "type": "string", - "title": "Value", - "description": "Value filter on event." - }, - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnAssignEntity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnBeginDialog": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On begin dialog", - "description": "Actions to perform when this dialog begins.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnBeginDialog" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnCancelDialog": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On cancel dialog", - "description": "Actions to perform on cancel dialog event.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnCancelDialog" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnChooseEntity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On choose entity", - "description": "Actions to be performed when value is ambiguous for operator and property.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "operation": { - "type": "string", - "title": "Operation", - "description": "Operation filter on event." - }, - "property": { - "type": "string", - "title": "Property", - "description": "Property filter on event." - }, - "value": { - "type": "string", - "title": "Ambiguous value", - "description": "Ambiguous value filter on event." - }, - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnChooseEntity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnChooseIntent": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On ambiguous intent", - "description": "Actions to perform on when an intent is ambiguous.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "intents": { - "type": "array", - "title": "Intents", - "description": "Intents that must be in the ChooseIntent result for this condition to trigger.", - "items": { - "title": "Intent", - "description": "Intent name to trigger on.", - "type": "string" - } - }, - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnChooseIntent" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnChooseProperty": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On choose property", - "description": "Actions to take when there are multiple possible mappings of entities to properties and operations.", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "type": "object", - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnChooseProperty" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnCommandActivity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On Command activity", - "description": "Actions to perform on receipt of an activity with type 'Command'. Overrides Intent trigger.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnCommandActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnCommandResultActivity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On Command Result activity", - "description": "Actions to perform on receipt of an activity with type 'CommandResult'. Overrides Intent trigger.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnCommandResultActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnCondition": { - "$role": "implements(Microsoft.ITrigger)", - "title": "On condition", - "description": "Actions to perform when specified condition is true.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnCondition" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnContinueConversation": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On continue conversation", - "description": "Actions to perform when a conversation is started up again from a ContinueConversationLater action.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnContinueConversation" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnConversationUpdateActivity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On ConversationUpdate activity", - "description": "Actions to perform on receipt of an activity with type 'ConversationUpdate'.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnConversationUpdateActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnDialogEvent": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On dialog event", - "description": "Actions to perform when a specific dialog event occurs.", - "type": "object", - "required": [ - "event", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "event": { - "type": "string", - "title": "Dialog event name", - "description": "Name of dialog event." - }, - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnDialogEvent" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnEndOfActions": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On end of actions", - "description": "Actions to take when there are no more actions in the current dialog.", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "type": "object", - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnEndOfActions" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnEndOfConversationActivity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On EndOfConversation activity", - "description": "Actions to perform on receipt of an activity with type 'EndOfConversation'.", - "type": "object", - "required": [ - "$kind" - ], - "$policies": { - "nonInteractive": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnEndOfConversationActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnError": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On error", - "description": "Action to perform when an 'Error' dialog event occurs.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnError" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnEventActivity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On Event activity", - "description": "Actions to perform on receipt of an activity with type 'Event'.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnEventActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnHandoffActivity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On Handoff activity", - "description": "Actions to perform on receipt of an activity with type 'HandOff'.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnHandoffActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnInstallationUpdateActivity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On InstallationUpdate activity", - "description": "Actions to perform on receipt of an activity with type 'InstallationUpdate'.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnInstallationUpdateActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnIntent": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On intent recognition", - "description": "Actions to perform when specified intent is recognized.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "intent": { - "type": "string", - "title": "Intent", - "description": "Name of intent." - }, - "entities": { - "type": "array", - "title": "Entities", - "description": "Required entities.", - "items": { - "type": "string", - "title": "Entity", - "description": "Entity that must be present." - } - }, - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnIntent" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnInvokeActivity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On Invoke activity", - "description": "Actions to perform on receipt of an activity with type 'Invoke'.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnInvokeActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnMessageActivity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On Message activity", - "description": "Actions to perform on receipt of an activity with type 'Message'. Overrides Intent trigger.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnMessageActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnMessageDeleteActivity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On MessageDelete activity", - "description": "Actions to perform on receipt of an activity with type 'MessageDelete'.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnMessageDeleteActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnMessageReactionActivity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On MessageReaction activity", - "description": "Actions to perform on receipt of an activity with type 'MessageReaction'.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnMessageReactionActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnMessageUpdateActivity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On MessageUpdate activity", - "description": "Actions to perform on receipt of an activity with type 'MessageUpdate'.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnMessageUpdateActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnQnAMatch": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On QnAMaker match", - "description": "Actions to perform on when an match from QnAMaker is found.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnQnAMatch" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnRepromptDialog": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On RepromptDialog", - "description": "Actions to perform when 'RepromptDialog' event occurs.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnRepromptDialog" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnTypingActivity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On Typing activity", - "description": "Actions to perform on receipt of an activity with type 'Typing'.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnTypingActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnUnknownIntent": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On unknown intent", - "description": "Action to perform when user input is unrecognized or if none of the 'on intent recognition' triggers match recognized intent.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnUnknownIntent" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OrdinalEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Ordinal entity recognizer", - "description": "Recognizer which recognizes ordinals (example: first, second, 3rd).", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OrdinalEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.PercentageEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Percentage entity recognizer", - "description": "Recognizer which recognizes percentages.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.PercentageEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.PhoneNumberEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Phone number entity recognizer", - "description": "Recognizer which recognizes phone numbers.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.PhoneNumberEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.QnAMakerDialog": { - "$role": "implements(Microsoft.IDialog)", - "title": "QnAMaker dialog", - "description": "Dialog which uses QnAMAker knowledge base to answer questions.", - "type": "object", - "required": [ - "knowledgeBaseId", - "endpointKey", - "hostname", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.AI.QnA", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "knowledgeBaseId": { - "$ref": "#/definitions/stringExpression", - "title": "KnowledgeBase Id", - "description": "KnowledgeBase Id of your QnA Maker KnowledgeBase.", - "default": "=settings.qna.knowledgebaseid" - }, - "endpointKey": { - "$ref": "#/definitions/stringExpression", - "title": "Endpoint key", - "description": "Endpoint key for the QnA Maker KB.", - "default": "=settings.qna.endpointkey" - }, - "hostname": { - "$ref": "#/definitions/stringExpression", - "title": "Hostname", - "description": "Hostname for your QnA Maker service.", - "default": "=settings.qna.hostname", - "examples": [ - "https://yourserver.azurewebsites.net/qnamaker" - ] - }, - "noAnswer": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Fallback answer", - "description": "Default answer to return when none found in KB.", - "default": "Sorry, I did not find an answer.", - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "threshold": { - "$ref": "#/definitions/numberExpression", - "title": "Threshold", - "description": "Threshold score to filter results.", - "default": 0.3 - }, - "activeLearningCardTitle": { - "$ref": "#/definitions/stringExpression", - "title": "Active learning card title", - "description": "Title for active learning suggestions card.", - "default": "Did you mean:" - }, - "cardNoMatchText": { - "$ref": "#/definitions/stringExpression", - "title": "Card no match text", - "description": "Text for no match option.", - "default": "None of the above." - }, - "cardNoMatchResponse": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Card no match response", - "description": "Custom response when no match option was selected.", - "default": "Thanks for the feedback.", - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "strictFilters": { - "$ref": "#/definitions/arrayExpression", - "title": "Strict filters", - "description": "Metadata filters to use when calling the QnA Maker KB.", - "items": { - "type": "object", - "title": "Metadata filter", - "description": "Metadata filter.", - "properties": { - "name": { - "type": "string", - "title": "Name", - "description": "Name of filter property.", - "maximum": 100 - }, - "value": { - "type": "string", - "title": "Value", - "description": "Value to filter on.", - "maximum": 100 - } - } - } - }, - "top": { - "$ref": "#/definitions/numberExpression", - "title": "Top", - "description": "The number of answers you want to retrieve.", - "default": 3 - }, - "isTest": { - "type": "boolean", - "title": "IsTest", - "description": "True, if pointing to Test environment, else false.", - "default": false - }, - "rankerType": { - "$ref": "#/definitions/stringExpression", - "title": "Ranker type", - "description": "Type of Ranker.", - "oneOf": [ - { - "title": "Standard ranker", - "description": "Standard ranker types.", - "enum": [ - "default", - "questionOnly", - "autoSuggestQuestion" - ], - "default": "default" - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "strictFiltersJoinOperator": { - "$ref": "#/definitions/stringExpression", - "title": "StrictFiltersJoinOperator", - "description": "Join operator for Strict Filters.", - "oneOf": [ - { - "title": "Join operator", - "description": "Value of Join Operator to be used as conjunction with Strict Filter values.", - "enum": [ - "AND", - "OR" - ], - "default": "AND" - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.QnAMakerDialog" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.QnAMakerRecognizer": { - "$role": "implements(Microsoft.IRecognizer)", - "title": "QnAMaker recognizer", - "description": "Recognizer for generating QnAMatch intents from a KB.", - "type": "object", - "required": [ - "knowledgeBaseId", - "endpointKey", - "hostname", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.AI.QnA", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional unique id using with RecognizerSet." - }, - "knowledgeBaseId": { - "$ref": "#/definitions/stringExpression", - "title": "KnowledgeBase Id", - "description": "Knowledge base Id of your QnA Maker knowledge base.", - "default": "=settings.qna.knowledgebaseid" - }, - "endpointKey": { - "$ref": "#/definitions/stringExpression", - "title": "Endpoint key", - "description": "Endpoint key for the QnA Maker KB.", - "default": "=settings.qna.endpointkey" - }, - "hostname": { - "$ref": "#/definitions/stringExpression", - "title": "Hostname", - "description": "Hostname for your QnA Maker service.", - "default": "=settings.qna.hostname", - "examples": [ - "https://yourserver.azurewebsites.net/qnamaker" - ] - }, - "threshold": { - "$ref": "#/definitions/numberExpression", - "title": "Threshold", - "description": "Threshold score to filter results.", - "default": 0.3 - }, - "strictFilters": { - "$ref": "#/definitions/arrayExpression", - "title": "Strict filters", - "description": "Metadata filters to use when calling the QnA Maker KB.", - "items": { - "type": "object", - "title": "Metadata filters", - "description": "Metadata filters to use when querying QnA Maker KB.", - "properties": { - "name": { - "type": "string", - "title": "Name", - "description": "Name to filter on.", - "maximum": 100 - }, - "value": { - "type": "string", - "title": "Value", - "description": "Value to restrict filter.", - "maximum": 100 - } - } - } - }, - "top": { - "$ref": "#/definitions/numberExpression", - "title": "Top", - "description": "The number of answers you want to retrieve.", - "default": 3 - }, - "isTest": { - "$ref": "#/definitions/booleanExpression", - "title": "Use test environment", - "description": "True, if pointing to Test environment, else false.", - "examples": [ - true, - "=f(x)" - ] - }, - "rankerType": { - "title": "Ranker type", - "description": "Type of Ranker.", - "oneOf": [ - { - "type": "string", - "title": "Ranker type", - "description": "Type of Ranker.", - "enum": [ - "default", - "questionOnly", - "autoSuggestQuestion" - ], - "default": "default" - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "strictFiltersJoinOperator": { - "$ref": "#/definitions/stringExpression", - "title": "StrictFiltersJoinOperator", - "description": "Join operator for Strict Filters.", - "oneOf": [ - { - "title": "Join operator", - "description": "Value of Join Operator to be used as onjuction with Strict Filter values.", - "enum": [ - "AND", - "OR" - ], - "default": "AND" - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "includeDialogNameInMetadata": { - "$ref": "#/definitions/booleanExpression", - "title": "Include dialog name", - "description": "When set to false, the dialog name will not be passed to QnAMaker. (default) is true", - "default": true, - "examples": [ - true, - "=f(x)" - ] - }, - "metadata": { - "$ref": "#/definitions/arrayExpression", - "title": "Metadata filters", - "description": "Metadata filters to use when calling the QnA Maker KB.", - "items": { - "type": "object", - "title": "Metadata filter", - "description": "Metadata filter to use when calling the QnA Maker KB.", - "properties": { - "name": { - "type": "string", - "title": "Name", - "description": "Name of value to test." - }, - "value": { - "type": "string", - "title": "Value", - "description": "Value to filter against." - } - } - } - }, - "context": { - "$ref": "#/definitions/objectExpression", - "title": "QnA request context", - "description": "Context to use for ranking." - }, - "qnaId": { - "$ref": "#/definitions/integerExpression", - "title": "QnA Id", - "description": "A number or expression which is the QnAId to paass to QnAMaker API." - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.QnAMakerRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.RandomSelector": { - "$role": "implements(Microsoft.ITriggerSelector)", - "title": "Random rule selector", - "description": "Select most specific true rule.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "seed": { - "type": "integer", - "title": "Random seed", - "description": "Random seed to start random number generation." - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.RandomSelector" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.RecognizerSet": { - "$role": "implements(Microsoft.IRecognizer)", - "title": "Recognizer set", - "description": "Creates the union of the intents and entities of the recognizers in the set.", - "type": "object", - "required": [ - "recognizers", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional unique id using with RecognizerSet. Other recognizers should return 'DeferToRecognizer_{Id}' intent when cross training data for this recognizer." - }, - "recognizers": { - "type": "array", - "title": "Recognizers", - "description": "List of Recognizers defined for this set.", - "items": { - "$kind": "Microsoft.IRecognizer", - "$ref": "#/definitions/Microsoft.IRecognizer" - } - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.RecognizerSet" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.RegexEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Regex entity recognizer", - "description": "Recognizer which recognizes patterns of input based on regex.", - "type": "object", - "required": [ - "name", - "pattern", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "name": { - "type": "string", - "title": "Name", - "description": "Name of the entity" - }, - "pattern": { - "type": "string", - "title": "Pattern", - "description": "Pattern expressed as regular expression." - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.RegexEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.RegexRecognizer": { - "$role": "implements(Microsoft.IRecognizer)", - "title": "Regex recognizer", - "description": "Use regular expressions to recognize intents and entities from user input.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional unique id using with RecognizerSet. Other recognizers should return 'DeferToRecognizer_{Id}' intent when cross training data for this recognizer." - }, - "intents": { - "type": "array", - "title": "RegEx patterns to intents", - "description": "Collection of patterns to match for an intent.", - "items": { - "type": "object", - "title": "Pattern", - "description": "Intent and regex pattern.", - "properties": { - "intent": { - "type": "string", - "title": "Intent", - "description": "The intent name." - }, - "pattern": { - "type": "string", - "title": "Pattern", - "description": "The regular expression pattern." - } - } - } - }, - "entities": { - "type": "array", - "title": "Entity recognizers", - "description": "Collection of entity recognizers to use.", - "items": { - "$kind": "Microsoft.IEntityRecognizer", - "$ref": "#/definitions/Microsoft.IEntityRecognizer" - } - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.RegexRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.RepeatDialog": { - "$role": "implements(Microsoft.IDialog)", - "type": "object", - "title": "Repeat dialog", - "description": "Repeat current dialog.", - "$policies": { - "lastAction": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "allowLoop": { - "$ref": "#/definitions/booleanExpression", - "title": "AllowLoop", - "description": "Optional condition which if true will allow loop of the repeated dialog.", - "examples": [ - "user.age > 3" - ] - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "options": { - "$ref": "#/definitions/objectExpression", - "title": "Options", - "description": "One or more options that are passed to the dialog that is called.", - "additionalProperties": { - "type": "string", - "title": "Options", - "description": "Options for repeating dialog." - } - }, - "activityProcessed": { - "$ref": "#/definitions/booleanExpression", - "title": "Activity processed", - "description": "When set to false, the dialog that is called can process the current activity.", - "default": true - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.RepeatDialog" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.ReplaceDialog": { - "$role": "implements(Microsoft.IDialog)", - "type": "object", - "title": "Replace dialog", - "description": "Replace current dialog with another dialog.", - "$policies": { - "lastAction": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "dialog": { - "oneOf": [ - { - "$kind": "Microsoft.IDialog", - "pattern": "^(?!(=)).*", - "title": "Dialog", - "$ref": "#/definitions/Microsoft.IDialog" - }, - { - "$ref": "#/definitions/equalsExpression", - "examples": [ - "=settings.dialogId" - ] - } - ], - "title": "Dialog name", - "description": "Name of the dialog to call." - }, - "options": { - "$ref": "#/definitions/objectExpression", - "title": "Options", - "description": "One or more options that are passed to the dialog that is called.", - "additionalProperties": { - "type": "string", - "title": "Options", - "description": "Options for replacing dialog." - } - }, - "activityProcessed": { - "$ref": "#/definitions/booleanExpression", - "title": "Activity processed", - "description": "When set to false, the dialog that is called can process the current activity.", - "default": true - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.ReplaceDialog" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.ResourceMultiLanguageGenerator": { - "$role": "implements(Microsoft.ILanguageGenerator)", - "title": "Resource multi-language generator", - "description": "MultiLanguage Generator which is bound to resource by resource Id.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional generator ID." - }, - "resourceId": { - "type": "string", - "title": "Resource Id", - "description": "Resource which is the root language generator. Other generaters with the same name and language suffix will be loaded into this generator and used based on the Language Policy.", - "default": "dialog.result" - }, - "languagePolicy": { - "type": "object", - "title": "Language policy", - "description": "Set alternate language policy for this generator. If not set, the global language policy will be used." - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.ResourceMultiLanguageGenerator" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.SendActivity": { - "$role": "implements(Microsoft.IDialog)", - "title": "Send an activity", - "description": "Respond with an activity.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action." - }, - "activity": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Activity", - "description": "Activity to send.", - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.SendActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.SendHandoffActivity": { - "$role": "implements(Microsoft.IDialog)", - "title": "Send a handoff activity", - "description": "Sends a handoff activity to trigger a handoff request.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "context": { - "$ref": "#/definitions/objectExpression", - "title": "Context", - "description": "Context to send with the handoff request" - }, - "transcript": { - "$ref": "#/definitions/objectExpression", - "title": "transcript", - "description": "Transcript to send with the handoff request" - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.SendHandoffActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.SetProperties": { - "$role": "implements(Microsoft.IDialog)", - "title": "Set property", - "description": "Set one or more property values.", - "type": "object", - "required": [ - "assignments", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - true, - "=user.age > 3" - ] - }, - "assignments": { - "type": "array", - "title": "Assignments", - "description": "Property value assignments to set.", - "items": { - "type": "object", - "title": "Assignment", - "description": "Property assignment.", - "properties": { - "property": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property (named location to store information).", - "examples": [ - "user.age" - ] - }, - "value": { - "$ref": "#/definitions/valueExpression", - "title": "Value", - "description": "New value or expression.", - "examples": [ - "='milk'", - "=dialog.favColor", - "=dialog.favColor == 'red'" - ] - } - } - } - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.SetProperties" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.SetProperty": { - "$role": "implements(Microsoft.IDialog)", - "title": "Set property", - "description": "Set property to a value.", - "type": "object", - "required": [ - "property", - "value", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - true, - "=user.age > 3" - ] - }, - "property": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property (named location to store information).", - "examples": [ - "user.age" - ] - }, - "value": { - "$ref": "#/definitions/valueExpression", - "title": "Value", - "description": "New value or expression.", - "examples": [ - "='milk'", - "=dialog.favColor", - "=dialog.favColor == 'red'" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.SetProperty" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.SignOutUser": { - "$role": "implements(Microsoft.IDialog)", - "title": "Sign out user", - "description": "Sign a user out that was logged in previously using OAuthInput.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "userId": { - "$ref": "#/definitions/stringExpression", - "title": "UserId", - "description": "Expression to an user to signout. Default is user.id.", - "default": "=user.id" - }, - "connectionName": { - "$ref": "#/definitions/stringExpression", - "title": "Connection name", - "description": "Connection name that was used with OAuthInput to log a user in." - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - true, - "=user.age > 3" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.SignOutUser" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.StaticActivityTemplate": { - "$role": "implements(Microsoft.IActivityTemplate)", - "title": "Microsoft static activity template", - "description": "This allows you to define a static Activity object", - "type": "object", - "required": [ - "activity", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "activity": { - "$ref": "#/definitions/botframework.json/definitions/Activity", - "title": "Activity", - "description": "A static Activity to used.", - "required": [ - "type" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.StaticActivityTemplate" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.SwitchCondition": { - "$role": "implements(Microsoft.IDialog)", - "title": "Switch condition", - "description": "Execute different actions based on the value of a property.", - "type": "object", - "required": [ - "condition", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "condition": { - "$ref": "#/definitions/stringExpression", - "title": "Condition", - "description": "Property to evaluate.", - "examples": [ - "user.favColor" - ] - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - true, - "=user.age > 3" - ] - }, - "cases": { - "type": "array", - "title": "Cases", - "description": "Actions for each possible condition.", - "items": { - "type": "object", - "title": "Case", - "description": "Case and actions.", - "required": [ - "value" - ], - "properties": { - "value": { - "type": [ - "number", - "integer", - "boolean", - "string" - ], - "title": "Value", - "description": "The value to compare the condition with.", - "examples": [ - "red", - "true", - "13" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - } - } - } - }, - "default": { - "type": "array", - "title": "Default", - "description": "Actions to execute if none of the cases meet the condition.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.SwitchCondition" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.TelemetryTrackEventAction": { - "$role": "implements(Microsoft.IDialog)", - "type": "object", - "title": "Telemetry - track event", - "description": "Track a custom event using the registered Telemetry Client.", - "required": [ - "url", - "method", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "eventName": { - "$ref": "#/definitions/stringExpression", - "title": "Event name", - "description": "The name of the event to track.", - "examples": [ - "MyEventStarted", - "MyEventCompleted" - ] - }, - "properties": { - "type": "object", - "title": "Properties", - "description": "One or more properties to attach to the event being tracked.", - "additionalProperties": { - "$ref": "#/definitions/stringExpression" - } - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.TelemetryTrackEventAction" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.TemperatureEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Temperature recognizer", - "description": "Recognizer which recognizes temperatures.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.TemperatureEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.TemplateEngineLanguageGenerator": { - "$role": "implements(Microsoft.ILanguageGenerator)", - "title": "Template multi-language generator", - "description": "Template Generator which allows only inline evaluation of templates.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional generator ID." - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.TemplateEngineLanguageGenerator" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.TextInput": { - "$role": [ - "implements(Microsoft.IDialog)", - "extends(Microsoft.InputDialog)" - ], - "type": "object", - "title": "Text input dialog", - "description": "Collection information - Ask for a word or sentence.", - "$policies": { - "interactive": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "defaultValue": { - "$ref": "#/definitions/stringExpression", - "title": "Default value", - "description": "'Property' will be set to the value of this expression when max turn count is exceeded.", - "examples": [ - "hello world", - "Hello ${user.name}", - "=concat(user.firstname, user.lastName)" - ] - }, - "value": { - "$ref": "#/definitions/stringExpression", - "title": "Value", - "description": "'Property' will be set to the value of this expression unless it evaluates to null.", - "examples": [ - "hello world", - "Hello ${user.name}", - "=concat(user.firstname, user.lastName)" - ] - }, - "outputFormat": { - "$ref": "#/definitions/stringExpression", - "title": "Output format", - "description": "Expression to format the output.", - "examples": [ - "=toUpper(this.value)", - "${toUpper(this.value)}" - ] - }, - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "default": false, - "examples": [ - false, - "=user.isVip" - ] - }, - "prompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Initial prompt", - "description": "Message to send to collect information.", - "examples": [ - "What is your birth date?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "unrecognizedPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Unrecognized prompt", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "invalidPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Invalid prompt", - "description": "Message to send when the user input does not meet any validation expression.", - "examples": [ - "Sorry, '{this.value}' does not work. I need a number between 1-150. What is your age?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "defaultValueResponse": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Default value response", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "maxTurnCount": { - "$ref": "#/definitions/integerExpression", - "title": "Max turn count", - "description": "Maximum number of re-prompt attempts to collect information.", - "default": 3, - "minimum": 0, - "maximum": 2147483647, - "examples": [ - 3, - "=settings.xyz" - ] - }, - "validations": { - "type": "array", - "title": "Validation expressions", - "description": "Expression to validate user input.", - "items": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Expression which needs to met for the input to be considered valid", - "examples": [ - "int(this.value) > 1 && int(this.value) <= 150", - "count(this.value) < 300" - ] - } - }, - "property": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property to store collected information. Input will be skipped if property has value (unless 'Always prompt' is true).", - "examples": [ - "$birthday", - "dialog.${user.name}", - "=f(x)" - ] - }, - "alwaysPrompt": { - "$ref": "#/definitions/booleanExpression", - "title": "Always prompt", - "description": "Collect information even if the specified 'property' is not empty.", - "default": false, - "examples": [ - false, - "=$val" - ] - }, - "allowInterruptions": { - "$ref": "#/definitions/booleanExpression", - "title": "Allow Interruptions", - "description": "A boolean expression that determines whether the parent should be allowed to interrupt the input.", - "default": true, - "examples": [ - true, - "=user.xyz" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.TextInput" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.TextTemplate": { - "$role": "implements(Microsoft.ITextTemplate)", - "title": "Microsoft TextTemplate", - "description": "Use LG Templates to create text", - "type": "object", - "required": [ - "template", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "template": { - "title": "Template", - "description": "Language Generator template to evaluate to create the text.", - "type": "string" - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.TextTemplate" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.ThrowException": { - "$role": "implements(Microsoft.IDialog)", - "title": "Throw an exception", - "description": "Throw an exception. Capture this exception with OnError trigger.", - "type": "object", - "required": [ - "errorValue", - "$kind" - ], - "$policies": { - "lastAction": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "errorValue": { - "$ref": "#/definitions/valueExpression", - "title": "Error value", - "description": "Error value to throw." - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.ThrowException" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.TraceActivity": { - "$role": "implements(Microsoft.IDialog)", - "title": "Send a TraceActivity", - "description": "Send a trace activity to the transcript logger and/ or Bot Framework Emulator.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - true, - "=user.age > 3" - ] - }, - "name": { - "$ref": "#/definitions/stringExpression", - "title": "Name", - "description": "Name of the trace activity" - }, - "label": { - "$ref": "#/definitions/stringExpression", - "title": "Label", - "description": "Label for the trace activity (used to identify it in a list of trace activities.)" - }, - "valueType": { - "$ref": "#/definitions/stringExpression", - "title": "Value type", - "description": "Type of value" - }, - "value": { - "$ref": "#/definitions/valueExpression", - "title": "Value", - "description": "Property that holds the value to send as trace activity." - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.TraceActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.TrueSelector": { - "$role": "implements(Microsoft.ITriggerSelector)", - "title": "True trigger selector", - "description": "Selector for all true events", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.TrueSelector" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.UpdateActivity": { - "$role": "implements(Microsoft.IDialog)", - "title": "Update an activity", - "description": "Respond with an activity.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - true, - "=user.age > 3" - ] - }, - "activityId": { - "$ref": "#/definitions/stringExpression", - "title": "Activity Id", - "description": "An string expression with the activity id to update.", - "examples": [ - "=turn.lastresult.id" - ] - }, - "activity": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Activity", - "description": "Activity to send.", - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.UpdateActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.UrlEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Url recognizer", - "description": "Recognizer which recognizes urls.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.UrlEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "numberExpression": { - "$role": "expression", - "title": "Number or expression", - "description": "Number constant or expression to evaluate.", - "oneOf": [ - { - "type": "number", - "title": "Number", - "description": "Number constant.", - "default": 0, - "examples": [ - 15.5 - ] - }, - { - "$ref": "#/definitions/equalsExpression", - "examples": [ - "=dialog.quantity" - ] - } - ] - }, - "objectExpression": { - "$role": "expression", - "title": "Object or expression", - "description": "Object or expression to evaluate.", - "oneOf": [ - { - "type": "object", - "title": "Object", - "description": "Object constant." - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "role": { - "title": "$role", - "description": "Defines the role played in the dialog schema from [expression|interface|implements($kind)|extends($kind)].", - "type": "string", - "pattern": "^((expression)|(interface)|(implements\\([a-zA-Z][a-zA-Z0-9.]*\\))|(extends\\([a-zA-Z][a-zA-Z0-9.]*\\)))$" - }, - "stringExpression": { - "$role": "expression", - "title": "String or expression", - "description": "Interpolated string or expression to evaluate.", - "oneOf": [ - { - "type": "string", - "title": "String", - "description": "Interpolated string", - "pattern": "^(?!(=)).*", - "examples": [ - "Hello ${user.name}" - ] - }, - { - "$ref": "#/definitions/equalsExpression", - "examples": [ - "=concat('x','y','z')" - ] - } - ] - }, - "valueExpression": { - "$role": "expression", - "title": "Any or expression", - "description": "Any constant or expression to evaluate.", - "oneOf": [ - { - "type": "object", - "title": "Object", - "description": "Object constant." - }, - { - "type": "array", - "title": "Array", - "description": "Array constant." - }, - { - "type": "string", - "title": "String", - "description": "Interpolated string.", - "pattern": "^(?!(=)).*", - "examples": [ - "Hello ${user.name}" - ] - }, - { - "type": "boolean", - "title": "Boolean", - "description": "Boolean constant", - "examples": [ - false - ] - }, - { - "type": "number", - "title": "Number", - "description": "Number constant.", - "examples": [ - 15.5 - ] - }, - { - "$ref": "#/definitions/equalsExpression", - "examples": [ - "=..." - ] - } - ] - }, - "schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "type": "integer", - "minimum": 0, - "default": 0 - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "uniqueItems": true, - "default": [], - "items": { - "type": "string" - } - } - }, - "type": [ - "object", - "boolean" - ], - "default": true, - "properties": { - "$schema": { - "type": "string", - "format": "uri" - }, - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "$comment": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "default": true, - "readOnly": { - "type": "boolean", - "default": false - }, - "writeOnly": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": true - }, - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "number" - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "number" - }, - "maxLength": { - "$ref": "#/definitions/schema/definitions/nonNegativeInteger" - }, - "minLength": { - "$ref": "#/definitions/schema/definitions/nonNegativeIntegerDefault0" - }, - "pattern": { - "type": "string", - "format": "regex" - }, - "additionalItems": { - "$ref": "#/definitions/schema" - }, - "items": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "$ref": "#/definitions/schema/definitions/schemaArray" - } - ], - "default": true - }, - "maxItems": { - "$ref": "#/definitions/schema/definitions/nonNegativeInteger" - }, - "minItems": { - "$ref": "#/definitions/schema/definitions/nonNegativeIntegerDefault0" - }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "contains": { - "$ref": "#/definitions/schema" - }, - "maxProperties": { - "$ref": "#/definitions/schema/definitions/nonNegativeInteger" - }, - "minProperties": { - "$ref": "#/definitions/schema/definitions/nonNegativeIntegerDefault0" - }, - "required": { - "$ref": "#/definitions/schema/definitions/stringArray" - }, - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "definitions": { - "type": "object", - "default": {}, - "additionalProperties": { - "$ref": "#/definitions/schema" - } - }, - "properties": { - "type": "object", - "default": {}, - "additionalProperties": { - "$ref": "#/definitions/schema" - } - }, - "patternProperties": { - "type": "object", - "propertyNames": { - "format": "regex" - }, - "default": {}, - "additionalProperties": { - "$ref": "#/definitions/schema" - } - }, - "dependencies": { - "type": "object", - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "$ref": "#/definitions/schema/definitions/stringArray" - } - ] - } - }, - "propertyNames": { - "$ref": "#/definitions/schema" - }, - "const": true, - "enum": { - "type": "array", - "minItems": 1, - "uniqueItems": true, - "items": true - }, - "type": { - "anyOf": [ - { - "$ref": "#/definitions/schema/definitions/simpleTypes" - }, - { - "type": "array", - "items": { - "$ref": "#/definitions/schema/definitions/simpleTypes" - }, - "minItems": 1, - "uniqueItems": true - } - ] - }, - "format": { - "type": "string" - }, - "contentMediaType": { - "type": "string" - }, - "contentEncoding": { - "type": "string" - }, - "if": { - "$ref": "#/definitions/schema" - }, - "then": { - "$ref": "#/definitions/schema" - }, - "else": { - "$ref": "#/definitions/schema" - }, - "allOf": { - "$ref": "#/definitions/schema/definitions/schemaArray" - }, - "anyOf": { - "$ref": "#/definitions/schema/definitions/schemaArray" - }, - "oneOf": { - "$ref": "#/definitions/schema/definitions/schemaArray" - }, - "not": { - "$ref": "#/definitions/schema" - } - } - }, - "botframework.json": { - "$schema": "http://json-schema.org/draft-07/schema#", - "definitions": { - "ChannelAccount": { - "description": "Channel account information needed to route a message", - "title": "ChannelAccount", - "type": "object", - "required": [ - "id", - "name" - ], - "properties": { - "id": { - "description": "Channel id for the user or bot on this channel (Example: joe@smith.com, or @joesmith or\n123456)", - "type": "string", - "title": "id" - }, - "name": { - "description": "Display friendly name", - "type": "string", - "title": "name" - }, - "aadObjectId": { - "description": "This account's object ID within Azure Active Directory (AAD)", - "type": "string", - "title": "aadObjectId" - }, - "role": { - "description": "Role of the entity behind the account (Example: User, Bot, etc.). Possible values include:\n'user', 'bot'", - "type": "string", - "title": "role" - } - } - }, - "ConversationAccount": { - "description": "Channel account information for a conversation", - "title": "ConversationAccount", - "type": "object", - "required": [ - "conversationType", - "id", - "isGroup", - "name" - ], - "properties": { - "isGroup": { - "description": "Indicates whether the conversation contains more than two participants at the time the\nactivity was generated", - "type": "boolean", - "title": "isGroup" - }, - "conversationType": { - "description": "Indicates the type of the conversation in channels that distinguish between conversation types", - "type": "string", - "title": "conversationType" - }, - "id": { - "description": "Channel id for the user or bot on this channel (Example: joe@smith.com, or @joesmith or\n123456)", - "type": "string", - "title": "id" - }, - "name": { - "description": "Display friendly name", - "type": "string", - "title": "name" - }, - "aadObjectId": { - "description": "This account's object ID within Azure Active Directory (AAD)", - "type": "string", - "title": "aadObjectId" - }, - "role": { - "description": "Role of the entity behind the account (Example: User, Bot, etc.). Possible values include:\n'user', 'bot'", - "enum": [ - "bot", - "user" - ], - "type": "string", - "title": "role" - } - } - }, - "MessageReaction": { - "description": "Message reaction object", - "title": "MessageReaction", - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "description": "Message reaction type. Possible values include: 'like', 'plusOne'", - "type": "string", - "title": "type" - } - } - }, - "CardAction": { - "description": "A clickable action", - "title": "CardAction", - "type": "object", - "required": [ - "title", - "type", - "value" - ], - "properties": { - "type": { - "description": "The type of action implemented by this button. Possible values include: 'openUrl', 'imBack',\n'postBack', 'playAudio', 'playVideo', 'showImage', 'downloadFile', 'signin', 'call',\n'payment', 'messageBack'", - "type": "string", - "title": "type" - }, - "title": { - "description": "Text description which appears on the button", - "type": "string", - "title": "title" - }, - "image": { - "description": "Image URL which will appear on the button, next to text label", - "type": "string", - "title": "image" - }, - "text": { - "description": "Text for this action", - "type": "string", - "title": "text" - }, - "displayText": { - "description": "(Optional) text to display in the chat feed if the button is clicked", - "type": "string", - "title": "displayText" - }, - "value": { - "description": "Supplementary parameter for action. Content of this property depends on the ActionType", - "title": "value" - }, - "channelData": { - "description": "Channel-specific data associated with this action", - "title": "channelData" - } - } - }, - "SuggestedActions": { - "description": "SuggestedActions that can be performed", - "title": "SuggestedActions", - "type": "object", - "required": [ - "actions", - "to" - ], - "properties": { - "to": { - "description": "Ids of the recipients that the actions should be shown to. These Ids are relative to the\nchannelId and a subset of all recipients of the activity", - "type": "array", - "title": "to", - "items": { - "title": "Id", - "description": "Id of recipient.", - "type": "string" - } - }, - "actions": { - "description": "Actions that can be shown to the user", - "type": "array", - "title": "actions", - "items": { - "$ref": "#/definitions/botframework.json/definitions/CardAction" - } - } - } - }, - "Attachment": { - "description": "An attachment within an activity", - "title": "Attachment", - "type": "object", - "required": [ - "contentType" - ], - "properties": { - "contentType": { - "description": "mimetype/Contenttype for the file", - "type": "string", - "title": "contentType" - }, - "contentUrl": { - "description": "Content Url", - "type": "string", - "title": "contentUrl" - }, - "content": { - "type": "object", - "description": "Embedded content", - "title": "content" - }, - "name": { - "description": "(OPTIONAL) The name of the attachment", - "type": "string", - "title": "name" - }, - "thumbnailUrl": { - "description": "(OPTIONAL) Thumbnail associated with attachment", - "type": "string", - "title": "thumbnailUrl" - } - } - }, - "Entity": { - "description": "Metadata object pertaining to an activity", - "title": "Entity", - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "description": "Type of this entity (RFC 3987 IRI)", - "type": "string", - "title": "type" - } - } - }, - "ConversationReference": { - "description": "An object relating to a particular point in a conversation", - "title": "ConversationReference", - "type": "object", - "required": [ - "bot", - "channelId", - "conversation", - "serviceUrl" - ], - "properties": { - "activityId": { - "description": "(Optional) ID of the activity to refer to", - "type": "string", - "title": "activityId" - }, - "user": { - "description": "(Optional) User participating in this conversation", - "$ref": "#/definitions/botframework.json/definitions/ChannelAccount", - "title": "user" - }, - "bot": { - "$ref": "#/definitions/botframework.json/definitions/ChannelAccount", - "description": "Bot participating in this conversation", - "title": "bot" - }, - "conversation": { - "$ref": "#/definitions/botframework.json/definitions/ConversationAccount", - "description": "Conversation reference", - "title": "conversation" - }, - "channelId": { - "description": "Channel ID", - "type": "string", - "title": "channelId" - }, - "serviceUrl": { - "description": "Service endpoint where operations concerning the referenced conversation may be performed", - "type": "string", - "title": "serviceUrl" - } - } - }, - "TextHighlight": { - "description": "Refers to a substring of content within another field", - "title": "TextHighlight", - "type": "object", - "required": [ - "occurrence", - "text" - ], - "properties": { - "text": { - "description": "Defines the snippet of text to highlight", - "type": "string", - "title": "text" - }, - "occurrence": { - "description": "Occurrence of the text field within the referenced text, if multiple exist.", - "type": "number", - "title": "occurrence" - } - } - }, - "SemanticAction": { - "description": "Represents a reference to a programmatic action", - "title": "SemanticAction", - "type": "object", - "required": [ - "entities", - "id" - ], - "properties": { - "id": { - "description": "ID of this action", - "type": "string", - "title": "id" - }, - "entities": { - "description": "Entities associated with this action", - "type": "object", - "title": "entities", - "additionalProperties": { - "$ref": "#/definitions/botframework.json/definitions/Entity" - } - } - } - }, - "Activity": { - "description": "An Activity is the basic communication type for the Bot Framework 3.0 protocol.", - "title": "Activity", - "type": "object", - "properties": { - "type": { - "description": "Contains the activity type. Possible values include: 'message', 'contactRelationUpdate',\n'conversationUpdate', 'typing', 'endOfConversation', 'event', 'invoke', 'deleteUserData',\n'messageUpdate', 'messageDelete', 'installationUpdate', 'messageReaction', 'suggestion',\n'trace', 'handoff'", - "type": "string", - "title": "type" - }, - "id": { - "description": "Contains an ID that uniquely identifies the activity on the channel.", - "type": "string", - "title": "id" - }, - "timestamp": { - "description": "Contains the date and time that the message was sent, in UTC, expressed in ISO-8601 format.", - "type": "string", - "format": "date-time", - "title": "timestamp" - }, - "localTimestamp": { - "description": "Contains the date and time that the message was sent, in local time, expressed in ISO-8601\nformat.\nFor example, 2016-09-23T13:07:49.4714686-07:00.", - "type": "string", - "format": "date-time", - "title": "localTimestamp" - }, - "localTimezone": { - "description": "Contains the name of the timezone in which the message, in local time, expressed in IANA Time\nZone database format.\nFor example, America/Los_Angeles.", - "type": "string", - "title": "localTimezone" - }, - "serviceUrl": { - "description": "Contains the URL that specifies the channel's service endpoint. Set by the channel.", - "type": "string", - "title": "serviceUrl" - }, - "channelId": { - "description": "Contains an ID that uniquely identifies the channel. Set by the channel.", - "type": "string", - "title": "channelId" - }, - "from": { - "$ref": "#/definitions/botframework.json/definitions/ChannelAccount", - "description": "Identifies the sender of the message.", - "title": "from" - }, - "conversation": { - "$ref": "#/definitions/botframework.json/definitions/ConversationAccount", - "description": "Identifies the conversation to which the activity belongs.", - "title": "conversation" - }, - "recipient": { - "$ref": "#/definitions/botframework.json/definitions/ChannelAccount", - "description": "Identifies the recipient of the message.", - "title": "recipient" - }, - "textFormat": { - "description": "Format of text fields Default:markdown. Possible values include: 'markdown', 'plain', 'xml'", - "type": "string", - "title": "textFormat" - }, - "attachmentLayout": { - "description": "The layout hint for multiple attachments. Default: list. Possible values include: 'list',\n'carousel'", - "type": "string", - "title": "attachmentLayout" - }, - "membersAdded": { - "description": "The collection of members added to the conversation.", - "type": "array", - "title": "membersAdded", - "items": { - "$ref": "#/definitions/botframework.json/definitions/ChannelAccount" - } - }, - "membersRemoved": { - "description": "The collection of members removed from the conversation.", - "type": "array", - "title": "membersRemoved", - "items": { - "$ref": "#/definitions/botframework.json/definitions/ChannelAccount" - } - }, - "reactionsAdded": { - "description": "The collection of reactions added to the conversation.", - "type": "array", - "title": "reactionsAdded", - "items": { - "$ref": "#/definitions/botframework.json/definitions/MessageReaction" - } - }, - "reactionsRemoved": { - "description": "The collection of reactions removed from the conversation.", - "type": "array", - "title": "reactionsRemoved", - "items": { - "$ref": "#/definitions/botframework.json/definitions/MessageReaction" - } - }, - "topicName": { - "description": "The updated topic name of the conversation.", - "type": "string", - "title": "topicName" - }, - "historyDisclosed": { - "description": "Indicates whether the prior history of the channel is disclosed.", - "type": "boolean", - "title": "historyDisclosed" - }, - "locale": { - "description": "A locale name for the contents of the text field.\nThe locale name is a combination of an ISO 639 two- or three-letter culture code associated\nwith a language\nand an ISO 3166 two-letter subculture code associated with a country or region.\nThe locale name can also correspond to a valid BCP-47 language tag.", - "type": "string", - "title": "locale" - }, - "text": { - "description": "The text content of the message.", - "type": "string", - "title": "text" - }, - "speak": { - "description": "The text to speak.", - "type": "string", - "title": "speak" - }, - "inputHint": { - "description": "Indicates whether your bot is accepting,\nexpecting, or ignoring user input after the message is delivered to the client. Possible\nvalues include: 'acceptingInput', 'ignoringInput', 'expectingInput'", - "type": "string", - "title": "inputHint" - }, - "summary": { - "description": "The text to display if the channel cannot render cards.", - "type": "string", - "title": "summary" - }, - "suggestedActions": { - "description": "The suggested actions for the activity.", - "$ref": "#/definitions/botframework.json/definitions/SuggestedActions", - "title": "suggestedActions" - }, - "attachments": { - "description": "Attachments", - "type": "array", - "title": "attachments", - "items": { - "$ref": "#/definitions/botframework.json/definitions/Attachment" - } - }, - "entities": { - "description": "Represents the entities that were mentioned in the message.", - "type": "array", - "title": "entities", - "items": { - "$ref": "#/definitions/botframework.json/definitions/Entity" - } - }, - "channelData": { - "description": "Contains channel-specific content.", - "title": "channelData" - }, - "action": { - "description": "Indicates whether the recipient of a contactRelationUpdate was added or removed from the\nsender's contact list.", - "type": "string", - "title": "action" - }, - "replyToId": { - "description": "Contains the ID of the message to which this message is a reply.", - "type": "string", - "title": "replyToId" - }, - "label": { - "description": "A descriptive label for the activity.", - "type": "string", - "title": "label" - }, - "valueType": { - "description": "The type of the activity's value object.", - "type": "string", - "title": "valueType" - }, - "value": { - "description": "A value that is associated with the activity.", - "title": "value" - }, - "name": { - "description": "The name of the operation associated with an invoke or event activity.", - "type": "string", - "title": "name" - }, - "relatesTo": { - "description": "A reference to another conversation or activity.", - "$ref": "#/definitions/botframework.json/definitions/ConversationReference", - "title": "relatesTo" - }, - "code": { - "description": "The a code for endOfConversation activities that indicates why the conversation ended.\nPossible values include: 'unknown', 'completedSuccessfully', 'userCancelled', 'botTimedOut',\n'botIssuedInvalidMessage', 'channelFailed'", - "type": "string", - "title": "code" - }, - "expiration": { - "description": "The time at which the activity should be considered to be \"expired\" and should not be\npresented to the recipient.", - "type": "string", - "format": "date-time", - "title": "expiration" - }, - "importance": { - "description": "The importance of the activity. Possible values include: 'low', 'normal', 'high'", - "type": "string", - "title": "importance" - }, - "deliveryMode": { - "description": "A delivery hint to signal to the recipient alternate delivery paths for the activity.\nThe default delivery mode is \"default\". Possible values include: 'normal', 'notification'", - "type": "string", - "title": "deliveryMode" - }, - "listenFor": { - "description": "List of phrases and references that speech and language priming systems should listen for", - "type": "array", - "title": "listenFor", - "items": { - "type": "string", - "title": "Phrase", - "description": "Phrase to listen for." - } - }, - "textHighlights": { - "description": "The collection of text fragments to highlight when the activity contains a ReplyToId value.", - "type": "array", - "title": "textHighlights", - "items": { - "$ref": "#/definitions/botframework.json/definitions/TextHighlight" - } - }, - "semanticAction": { - "$ref": "#/definitions/botframework.json/definitions/SemanticAction", - "description": "An optional programmatic action accompanying this request", - "title": "semanticAction" - } - } - } - } - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/schemas/sdk.uischema b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/schemas/sdk.uischema deleted file mode 100644 index 9cf19c6919..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/schemas/sdk.uischema +++ /dev/null @@ -1,1409 +0,0 @@ -{ - "$schema": "https://schemas.botframework.com/schemas/ui/v1.0/ui.schema", - "Microsoft.AdaptiveDialog": { - "form": { - "description": "This configures a data driven dialog via a collection of events and actions.", - "helpLink": "https://aka.ms/bf-composer-docs-dialog", - "hidden": [ - "triggers", - "generator", - "selector", - "schema" - ], - "label": "Adaptive dialog", - "order": [ - "recognizer", - "*" - ], - "properties": { - "recognizer": { - "description": "To understand what the user says, your dialog needs a \"Recognizer\"; that includes example words and sentences that users may use.", - "label": "Language Understanding" - } - } - } - }, - "Microsoft.Ask": { - "flow": { - "body": { - "field": "activity", - "widget": "LgWidget" - }, - "footer": { - "description": "= Default operation", - "property": "=action.defaultOperation", - "widget": "PropertyDescription" - }, - "header": { - "colors": { - "icon": "#5C2E91", - "theme": "#EEEAF4" - }, - "icon": "MessageBot", - "widget": "ActionHeader" - }, - "hideFooter": "=!action.defaultOperation", - "widget": "ActionCard" - }, - "form": { - "helpLink": "https://aka.ms/bfc-send-activity", - "label": "Send a response to ask a question", - "order": [ - "activity", - "*" - ], - "subtitle": "Ask Activity" - } - }, - "Microsoft.AttachmentInput": { - "flow": { - "body": "=action.prompt", - "botAsks": { - "body": { - "defaultContent": "", - "field": "prompt", - "widget": "LgWidget" - }, - "header": { - "colors": { - "icon": "#5C2E91", - "theme": "#EEEAF4" - }, - "icon": "MessageBot", - "widget": "ActionHeader" - }, - "widget": "ActionCard" - }, - "nowrap": true, - "userInput": { - "header": { - "colors": { - "icon": "#0078D4", - "theme": "#E5F0FF" - }, - "disableSDKTitle": true, - "icon": "User", - "menu": "none", - "widget": "ActionHeader" - }, - "widget": "ActionCard" - }, - "widget": "PromptWidget" - }, - "form": { - "helpLink": "https://aka.ms/bfc-ask-for-user-input", - "label": "Prompt for a file or an attachment", - "properties": { - "property": { - "intellisenseScopes": [ - "variable-scopes" - ] - } - }, - "subtitle": "Attachment Input" - } - }, - "Microsoft.BeginDialog": { - "flow": { - "body": { - "dialog": "=action.dialog", - "widget": "DialogRef" - }, - "footer": { - "description": "= Return value", - "property": "=action.resultProperty", - "widget": "PropertyDescription" - }, - "hideFooter": "=!action.resultProperty", - "widget": "ActionCard" - }, - "form": { - "helpLink": "https://aka.ms/bfc-understanding-dialogs", - "label": "Begin a new dialog", - "order": [ - "dialog", - "options", - "resultProperty", - "*" - ], - "properties": { - "resultProperty": { - "intellisenseScopes": [ - "variable-scopes" - ] - } - }, - "subtitle": "Begin Dialog" - } - }, - "Microsoft.BeginSkill": { - "flow": { - "body": { - "operation": "Host", - "resource": "=coalesce(action.skillEndpoint, \"?\")", - "singleline": true, - "widget": "ResourceOperation" - }, - "colors": { - "color": "#FFFFFF", - "icon": "#FFFFFF", - "theme": "#004578" - }, - "footer": { - "description": "= Result", - "property": "=action.resultProperty", - "widget": "PropertyDescription" - }, - "hideFooter": "=!action.resultProperty", - "icon": "Library", - "widget": "ActionCard" - }, - "form": { - "helpLink": "https://aka.ms/bf-composer-docs-connect-skill", - "label": "Connect to a skill", - "properties": { - "resultProperty": { - "intellisenseScopes": [ - "variable-scopes" - ] - } - }, - "subtitle": "Skill Dialog" - } - }, - "Microsoft.BreakLoop": { - "form": { - "label": "Break out of loop", - "subtitle": "Break out of loop" - } - }, - "Microsoft.CancelAllDialogs": { - "flow": { - "body": { - "description": "(Event)", - "property": "=coalesce(action.eventName, \"?\")", - "widget": "PropertyDescription" - }, - "widget": "ActionCard" - }, - "form": { - "helpLink": "https://aka.ms/bfc-understanding-dialogs", - "label": "Cancel all active dialogs", - "subtitle": "Cancel All Dialogs" - } - }, - "Microsoft.ChoiceInput": { - "flow": { - "body": "=action.prompt", - "botAsks": { - "body": { - "defaultContent": "", - "field": "prompt", - "widget": "LgWidget" - }, - "header": { - "colors": { - "icon": "#5C2E91", - "theme": "#EEEAF4" - }, - "icon": "MessageBot", - "widget": "ActionHeader" - }, - "widget": "ActionCard" - }, - "nowrap": true, - "userInput": { - "header": { - "colors": { - "icon": "#0078D4", - "theme": "#E5F0FF" - }, - "disableSDKTitle": true, - "icon": "User", - "menu": "none", - "widget": "ActionHeader" - }, - "widget": "ActionCard" - }, - "widget": "PromptWidget" - }, - "form": { - "helpLink": "https://aka.ms/bfc-ask-for-user-input", - "label": "Prompt with multi-choice", - "properties": { - "property": { - "intellisenseScopes": [ - "variable-scopes" - ] - } - }, - "subtitle": "Choice Input" - } - }, - "Microsoft.ConfirmInput": { - "flow": { - "body": "=action.prompt", - "botAsks": { - "body": { - "defaultContent": "", - "field": "prompt", - "widget": "LgWidget" - }, - "header": { - "colors": { - "icon": "#5C2E91", - "theme": "#EEEAF4" - }, - "icon": "MessageBot", - "widget": "ActionHeader" - }, - "widget": "ActionCard" - }, - "nowrap": true, - "userInput": { - "header": { - "colors": { - "icon": "#0078D4", - "theme": "#E5F0FF" - }, - "disableSDKTitle": true, - "icon": "User", - "menu": "none", - "widget": "ActionHeader" - }, - "widget": "ActionCard" - }, - "widget": "PromptWidget" - }, - "form": { - "helpLink": "https://aka.ms/bfc-ask-for-user-input", - "label": "Prompt for confirmation", - "properties": { - "property": { - "intellisenseScopes": [ - "variable-scopes" - ] - } - }, - "subtitle": "Confirm Input" - } - }, - "Microsoft.ContinueLoop": { - "form": { - "label": "Continue loop", - "subtitle": "Continue loop" - } - }, - "Microsoft.DateTimeInput": { - "flow": { - "body": "=action.prompt", - "botAsks": { - "body": { - "defaultContent": "", - "field": "prompt", - "widget": "LgWidget" - }, - "header": { - "colors": { - "icon": "#5C2E91", - "theme": "#EEEAF4" - }, - "icon": "MessageBot", - "widget": "ActionHeader" - }, - "widget": "ActionCard" - }, - "nowrap": true, - "userInput": { - "header": { - "colors": { - "icon": "#0078D4", - "theme": "#E5F0FF" - }, - "disableSDKTitle": true, - "icon": "User", - "menu": "none", - "widget": "ActionHeader" - }, - "widget": "ActionCard" - }, - "widget": "PromptWidget" - }, - "form": { - "helpLink": "https://aka.ms/bfc-ask-for-user-input", - "label": "Prompt for a date or a time", - "properties": { - "property": { - "intellisenseScopes": [ - "variable-scopes" - ] - } - }, - "subtitle": "Date Time Input" - } - }, - "Microsoft.DebugBreak": { - "form": { - "label": "Debug Break" - } - }, - "Microsoft.DeleteProperties": { - "flow": { - "body": { - "items": "=action.properties", - "widget": "ListOverview" - }, - "widget": "ActionCard" - }, - "form": { - "helpLink": "https://aka.ms/bfc-using-memory", - "label": "Delete properties", - "properties": { - "properties": { - "intellisenseScopes": [ - "user-variables" - ] - } - }, - "subtitle": "Delete Properties" - } - }, - "Microsoft.DeleteProperty": { - "flow": { - "body": "=action.property", - "widget": "ActionCard" - }, - "form": { - "helpLink": "https://aka.ms/bfc-using-memory", - "label": "Delete a property", - "properties": { - "property": { - "intellisenseScopes": [ - "user-variables" - ] - } - }, - "subtitle": "Delete Property" - } - }, - "Microsoft.EditActions": { - "flow": { - "body": "=action.changeType", - "widget": "ActionCard" - }, - "form": { - "label": "Modify active dialog", - "subtitle": "Edit Actions" - } - }, - "Microsoft.EditArray": { - "flow": { - "body": { - "operation": "=coalesce(action.changeType, \"?\")", - "resource": "=coalesce(action.itemsProperty, \"?\")", - "widget": "ResourceOperation" - }, - "footer": { - "description": "= Result", - "property": "=action.resultProperty", - "widget": "PropertyDescription" - }, - "hideFooter": "=!action.resultProperty", - "widget": "ActionCard" - }, - "form": { - "helpLink": "https://aka.ms/bfc-using-memory", - "label": "Edit an array property", - "properties": { - "itemsProperty": { - "intellisenseScopes": [ - "user-variables" - ] - }, - "resultProperty": { - "intellisenseScopes": [ - "variable-scopes" - ] - } - }, - "subtitle": "Edit Array" - } - }, - "Microsoft.EmitEvent": { - "flow": { - "body": { - "description": "(Event)", - "property": "=coalesce(action.eventName, \"?\")", - "widget": "PropertyDescription" - }, - "widget": "ActionCard" - }, - "form": { - "helpLink": "https://aka.ms/bfc-custom-events", - "label": "Emit a custom event", - "subtitle": "Emit Event" - } - }, - "Microsoft.EndDialog": { - "form": { - "helpLink": "https://aka.ms/bfc-understanding-dialogs", - "label": "End this dialog", - "subtitle": "End Dialog" - } - }, - "Microsoft.EndTurn": { - "form": { - "helpLink": "https://aka.ms/bfc-understanding-dialogs", - "label": "End turn", - "subtitle": "End Turn" - } - }, - "Microsoft.Foreach": { - "flow": { - "loop": { - "body": "=concat(\"Each value in \", coalesce(action.itemsProperty, \"?\"))", - "widget": "ActionCard" - }, - "nowrap": true, - "widget": "ForeachWidget" - }, - "form": { - "helpLink": "https://aka.ms/bfc-controlling-conversation-flow", - "hidden": [ - "actions" - ], - "label": "Loop: For each item", - "order": [ - "itemsProperty", - "*" - ], - "properties": { - "index": { - "intellisenseScopes": [ - "variable-scopes" - ] - }, - "itemsProperty": { - "intellisenseScopes": [ - "user-variables" - ] - }, - "value": { - "intellisenseScopes": [ - "variable-scopes" - ] - } - }, - "subtitle": "For Each" - } - }, - "Microsoft.ForeachPage": { - "flow": { - "loop": { - "body": "=concat(\"Each page of \", coalesce(action.pageSize, \"?\"), \" in \", coalesce(action.page, \"?\"))", - "widget": "ActionCard" - }, - "nowrap": true, - "widget": "ForeachWidget" - }, - "form": { - "helpLink": "https://aka.ms/bfc-controlling-conversation-flow", - "hidden": [ - "actions" - ], - "label": "Loop: For each page (multiple items)", - "order": [ - "itemsProperty", - "pageSize", - "*" - ], - "properties": { - "itemsProperty": { - "intellisenseScopes": [ - "user-variables" - ] - }, - "page": { - "intellisenseScopes": [ - "variable-scopes" - ] - }, - "pageIndex": { - "intellisenseScopes": [ - "variable-scopes" - ] - } - }, - "subtitle": "For Each Page" - } - }, - "Microsoft.GetActivityMembers": { - "flow": { - "body": { - "description": "= ActivityId", - "property": "=coalesce(action.activityId, \"?\")", - "widget": "PropertyDescription" - }, - "footer": { - "description": "= Result property", - "property": "=coalesce(action.property, \"?\")", - "widget": "PropertyDescription" - }, - "widget": "ActionCard" - } - }, - "Microsoft.GetConversationMembers": { - "flow": { - "footer": { - "description": "= Result property", - "property": "=action.property", - "widget": "PropertyDescription" - }, - "widget": "ActionCard" - } - }, - "Microsoft.HttpRequest": { - "flow": { - "body": { - "operation": "=action.method", - "resource": "=action.url", - "singleline": true, - "widget": "ResourceOperation" - }, - "footer": { - "description": "= Result property", - "property": "=action.resultProperty", - "widget": "PropertyDescription" - }, - "hideFooter": "=!action.resultProperty", - "widget": "ActionCard" - }, - "form": { - "helpLink": "https://aka.ms/bfc-using-http", - "label": "Send an HTTP request", - "order": [ - "method", - "url", - "body", - "headers", - "*" - ], - "properties": { - "resultProperty": { - "intellisenseScopes": [ - "variable-scopes" - ] - } - }, - "subtitle": "HTTP Request" - } - }, - "Microsoft.IfCondition": { - "flow": { - "judgement": { - "body": "=coalesce(action.condition, \"\")", - "widget": "ActionCard" - }, - "nowrap": true, - "widget": "IfConditionWidget" - }, - "form": { - "helpLink": "https://aka.ms/bfc-controlling-conversation-flow", - "hidden": [ - "actions", - "elseActions" - ], - "label": "Branch: If/Else", - "subtitle": "If Condition" - } - }, - "Microsoft.LogAction": { - "form": { - "helpLink": "https://aka.ms/composer-telemetry", - "label": "Log to console", - "subtitle": "Log Action" - } - }, - "Microsoft.NumberInput": { - "flow": { - "body": "=action.prompt", - "botAsks": { - "body": { - "defaultContent": "", - "field": "prompt", - "widget": "LgWidget" - }, - "header": { - "colors": { - "icon": "#5C2E91", - "theme": "#EEEAF4" - }, - "icon": "MessageBot", - "widget": "ActionHeader" - }, - "widget": "ActionCard" - }, - "nowrap": true, - "userInput": { - "header": { - "colors": { - "icon": "#0078D4", - "theme": "#E5F0FF" - }, - "disableSDKTitle": true, - "icon": "User", - "menu": "none", - "widget": "ActionHeader" - }, - "widget": "ActionCard" - }, - "widget": "PromptWidget" - }, - "form": { - "helpLink": "https://aka.ms/bfc-ask-for-user-input", - "label": "Prompt for a number", - "properties": { - "property": { - "intellisenseScopes": [ - "variable-scopes" - ] - } - }, - "subtitle": "Number Input" - } - }, - "Microsoft.OAuthInput": { - "flow": { - "body": { - "operation": "Connection", - "resource": "=coalesce(action.connectionName, \"?\")", - "singleline": true, - "widget": "ResourceOperation" - }, - "footer": { - "description": "= Token property", - "property": "=action.property", - "widget": "PropertyDescription" - }, - "hideFooter": "=!action.property", - "widget": "ActionCard" - }, - "form": { - "helpLink": "https://aka.ms/bfc-using-oauth", - "label": "OAuth login", - "order": [ - "connectionName", - "*" - ], - "subtitle": "OAuth Input" - } - }, - "Microsoft.OnActivity": { - "form": { - "hidden": [ - "actions" - ], - "label": "Activities", - "order": [ - "condition", - "*" - ], - "subtitle": "Activity received" - }, - "trigger": { - "label": "Activities (Activity received)", - "order": 5.1, - "submenu": { - "label": "Activities", - "placeholder": "Select an activity type", - "prompt": "Which activity type?" - } - } - }, - "Microsoft.OnAssignEntity": { - "form": { - "hidden": [ - "actions" - ], - "label": "Handle a condition when an entity is assigned", - "order": [ - "condition", - "*" - ], - "subtitle": "EntityAssigned activity" - } - }, - "Microsoft.OnBeginDialog": { - "form": { - "hidden": [ - "actions" - ], - "label": "Dialog started", - "order": [ - "condition", - "*" - ], - "subtitle": "Begin dialog event" - }, - "trigger": { - "label": "Dialog started (Begin dialog event)", - "order": 4.1, - "submenu": { - "label": "Dialog events", - "placeholder": "Select an event type", - "prompt": "Which event?" - } - } - }, - "Microsoft.OnCancelDialog": { - "form": { - "hidden": [ - "actions" - ], - "label": "Dialog cancelled", - "order": [ - "condition", - "*" - ], - "subtitle": "Cancel dialog event" - }, - "trigger": { - "label": "Dialog cancelled (Cancel dialog event)", - "order": 4.2, - "submenu": "Dialog events" - } - }, - "Microsoft.OnChooseEntity": { - "form": { - "hidden": [ - "actions" - ], - "order": [ - "condition", - "*" - ] - } - }, - "Microsoft.OnChooseIntent": { - "form": { - "hidden": [ - "actions" - ], - "order": [ - "condition", - "*" - ] - }, - "trigger": { - "label": "Duplicated intents recognized", - "order": 6 - } - }, - "Microsoft.OnCommandActivity": { - "form": { - "hidden": [ - "actions" - ], - "label": "Command received", - "order": [ - "condition", - "*" - ], - "subtitle": "Command activity received" - }, - "trigger": { - "label": "Command received (Command activity received)", - "order": 5.81, - "submenu": "Activities" - } - }, - "Microsoft.OnCommandResultActivity": { - "form": { - "hidden": [ - "actions" - ], - "label": "Command Result received", - "order": [ - "condition", - "*" - ], - "subtitle": "Command Result activity received" - }, - "trigger": { - "label": "Command Result received (Command Result activity received)", - "order": 5.81, - "submenu": "Activities" - } - }, - "Microsoft.OnCondition": { - "form": { - "hidden": [ - "actions" - ], - "label": "Handle a condition", - "order": [ - "condition", - "*" - ], - "subtitle": "Condition" - } - }, - "Microsoft.OnConversationUpdateActivity": { - "form": { - "description": "Handle the events fired when a user begins a new conversation with the bot.", - "helpLink": "https://aka.ms/bf-composer-docs-conversation-update-activity", - "hidden": [ - "actions" - ], - "label": "Greeting", - "order": [ - "condition", - "*" - ], - "subtitle": "ConversationUpdate activity" - }, - "trigger": { - "label": "Greeting (ConversationUpdate activity)", - "order": 5.2, - "submenu": "Activities" - } - }, - "Microsoft.OnDialogEvent": { - "form": { - "hidden": [ - "actions" - ], - "label": "Dialog events", - "order": [ - "condition", - "*" - ], - "subtitle": "Dialog event" - }, - "trigger": { - "label": "Custom events", - "order": 7 - } - }, - "Microsoft.OnEndOfActions": { - "form": { - "hidden": [ - "actions" - ], - "label": "Handle a condition when actions have ended", - "order": [ - "condition", - "*" - ], - "subtitle": "EndOfActions activity" - } - }, - "Microsoft.OnEndOfConversationActivity": { - "form": { - "hidden": [ - "actions" - ], - "label": "Conversation ended", - "order": [ - "condition", - "*" - ], - "subtitle": "EndOfConversation activity" - }, - "trigger": { - "label": "Conversation ended (EndOfConversation activity)", - "order": 5.3, - "submenu": "Activities" - } - }, - "Microsoft.OnError": { - "form": { - "hidden": [ - "actions" - ], - "label": "Error occurred", - "order": [ - "condition", - "*" - ], - "subtitle": "Error event" - }, - "trigger": { - "label": "Error occurred (Error event)", - "order": 4.3, - "submenu": "Dialog events" - } - }, - "Microsoft.OnEventActivity": { - "form": { - "hidden": [ - "actions" - ], - "label": "Event received", - "order": [ - "condition", - "*" - ], - "subtitle": "Event activity" - }, - "trigger": { - "label": "Event received (Event activity)", - "order": 5.4, - "submenu": "Activities" - } - }, - "Microsoft.OnHandoffActivity": { - "form": { - "hidden": [ - "actions" - ], - "label": "Handover to human", - "order": [ - "condition", - "*" - ], - "subtitle": "Handoff activity" - }, - "trigger": { - "label": "Handover to human (Handoff activity)", - "order": 5.5, - "submenu": "Activities" - } - }, - "Microsoft.OnInstallationUpdateActivity": { - "form": { - "hidden": [ - "actions" - ], - "label": "Installation updated", - "order": [ - "condition", - "*" - ], - "subtitle": "Installation updated activity" - } - }, - "Microsoft.OnIntent": { - "form": { - "hidden": [ - "actions" - ], - "label": "Intent recognized", - "order": [ - "intent", - "condition", - "entities", - "*" - ], - "subtitle": "Intent recognized" - }, - "trigger": { - "label": "Intent recognized", - "order": 1 - } - }, - "Microsoft.OnInvokeActivity": { - "form": { - "hidden": [ - "actions" - ], - "label": "Conversation invoked", - "order": [ - "condition", - "*" - ], - "subtitle": "Invoke activity" - }, - "trigger": { - "label": "Conversation invoked (Invoke activity)", - "order": 5.6, - "submenu": "Activities" - } - }, - "Microsoft.OnMessageActivity": { - "form": { - "hidden": [ - "actions" - ], - "label": "Message received", - "order": [ - "condition", - "*" - ], - "subtitle": "Message activity received" - }, - "trigger": { - "label": "Message received (Message activity received)", - "order": 5.81, - "submenu": "Activities" - } - }, - "Microsoft.OnMessageDeleteActivity": { - "form": { - "hidden": [ - "actions" - ], - "label": "Message deleted", - "order": [ - "condition", - "*" - ], - "subtitle": "Message deleted activity" - }, - "trigger": { - "label": "Message deleted (Message deleted activity)", - "order": 5.82, - "submenu": "Activities" - } - }, - "Microsoft.OnMessageReactionActivity": { - "form": { - "hidden": [ - "actions" - ], - "label": "Message reaction", - "order": [ - "condition", - "*" - ], - "subtitle": "Message reaction activity" - }, - "trigger": { - "label": "Message reaction (Message reaction activity)", - "order": 5.83, - "submenu": "Activities" - } - }, - "Microsoft.OnMessageUpdateActivity": { - "form": { - "hidden": [ - "actions" - ], - "label": "Message updated", - "order": [ - "condition", - "*" - ], - "subtitle": "Message updated activity" - }, - "trigger": { - "label": "Message updated (Message updated activity)", - "order": 5.84, - "submenu": "Activities" - } - }, - "Microsoft.OnQnAMatch": { - "trigger": { - "label": "QnA Intent recognized", - "order": 2 - } - }, - "Microsoft.OnRepromptDialog": { - "form": { - "hidden": [ - "actions" - ], - "label": "Re-prompt for input", - "order": [ - "condition", - "*" - ], - "subtitle": "Reprompt dialog event" - }, - "trigger": { - "label": "Re-prompt for input (Reprompt dialog event)", - "order": 4.4, - "submenu": "Dialog events" - } - }, - "Microsoft.OnTypingActivity": { - "form": { - "hidden": [ - "actions" - ], - "label": "User is typing", - "order": [ - "condition", - "*" - ], - "subtitle": "Typing activity" - }, - "trigger": { - "label": "User is typing (Typing activity)", - "order": 5.7, - "submenu": "Activities" - } - }, - "Microsoft.OnUnknownIntent": { - "form": { - "hidden": [ - "actions" - ], - "label": "Unknown intent", - "order": [ - "condition", - "*" - ], - "subtitle": "Unknown intent recognized" - }, - "trigger": { - "label": "Unknown intent", - "order": 3 - } - }, - "Microsoft.QnAMakerDialog": { - "flow": { - "body": "=action.hostname", - "widget": "ActionCard" - } - }, - "Microsoft.RegexRecognizer": { - "form": { - "hidden": [ - "entities" - ] - } - }, - "Microsoft.RepeatDialog": { - "form": { - "helpLink": "https://aka.ms/bfc-understanding-dialogs", - "label": "Repeat this dialog", - "order": [ - "options", - "*" - ], - "subtitle": "Repeat Dialog" - } - }, - "Microsoft.ReplaceDialog": { - "flow": { - "body": { - "dialog": "=action.dialog", - "widget": "DialogRef" - }, - "widget": "ActionCard" - }, - "form": { - "helpLink": "https://aka.ms/bfc-understanding-dialogs", - "label": "Replace this dialog", - "order": [ - "dialog", - "options", - "*" - ], - "subtitle": "Replace Dialog" - } - }, - "Microsoft.SendActivity": { - "flow": { - "body": { - "field": "activity", - "widget": "LgWidget" - }, - "header": { - "colors": { - "icon": "#5C2E91", - "theme": "#EEEAF4" - }, - "icon": "MessageBot", - "widget": "ActionHeader" - }, - "widget": "ActionCard" - }, - "form": { - "helpLink": "https://aka.ms/bfc-send-activity", - "label": "Send a response", - "order": [ - "activity", - "*" - ], - "subtitle": "Send Activity" - } - }, - "Microsoft.SendHandoffActivity": { - "flow": { - "widget": "ActionHeader" - }, - "form": { - "helpLink": "https://aka.ms/bfc-send-handoff-activity", - "label": "Send a handoff request", - "subtitle": "Send Handoff Activity" - }, - "menu": { - "label": "Send Handoff Event", - "submenu": [ - "Access external resources" - ] - } - }, - "Microsoft.SetProperties": { - "flow": { - "body": { - "items": "=foreach(action.assignments, x => concat(coalesce(x.property, \"?\"), \" : \", coalesce(x.value, \"?\")))", - "widget": "ListOverview" - }, - "widget": "ActionCard" - }, - "form": { - "helpLink": "https://aka.ms/bfc-using-memory", - "label": "Set properties", - "properties": { - "assignments": { - "properties": { - "property": { - "intellisenseScopes": [ - "variable-scopes" - ] - } - } - } - }, - "subtitle": "Set Properties" - } - }, - "Microsoft.SetProperty": { - "flow": { - "body": "${coalesce(action.property, \"?\")} : ${coalesce(action.value, \"?\")}", - "widget": "ActionCard" - }, - "form": { - "helpLink": "https://aka.ms/bfc-using-memory", - "label": "Set a property", - "properties": { - "property": { - "intellisenseScopes": [ - "variable-scopes" - ] - } - }, - "subtitle": "Set Property" - } - }, - "Microsoft.SignOutUser": { - "form": { - "label": "Sign out user", - "subtitle": "Signout User" - } - }, - "Microsoft.SwitchCondition": { - "flow": { - "judgement": { - "body": "=coalesce(action.condition, \"\")", - "widget": "ActionCard" - }, - "nowrap": true, - "widget": "SwitchConditionWidget" - }, - "form": { - "helpLink": "https://aka.ms/bfc-controlling-conversation-flow", - "hidden": [ - "default" - ], - "label": "Branch: Switch (multiple options)", - "properties": { - "cases": { - "hidden": [ - "actions" - ] - }, - "condition": { - "intellisenseScopes": [ - "user-variables" - ] - } - }, - "subtitle": "Switch Condition" - } - }, - "Microsoft.TextInput": { - "flow": { - "body": "=action.prompt", - "botAsks": { - "body": { - "defaultContent": "", - "field": "prompt", - "widget": "LgWidget" - }, - "header": { - "colors": { - "icon": "#5C2E91", - "theme": "#EEEAF4" - }, - "icon": "MessageBot", - "widget": "ActionHeader" - }, - "widget": "ActionCard" - }, - "nowrap": true, - "userInput": { - "header": { - "colors": { - "icon": "#0078D4", - "theme": "#E5F0FF" - }, - "disableSDKTitle": true, - "icon": "User", - "menu": "none", - "widget": "ActionHeader" - }, - "widget": "ActionCard" - }, - "widget": "PromptWidget" - }, - "form": { - "helpLink": "https://aka.ms/bfc-ask-for-user-input", - "label": "Prompt for text", - "properties": { - "property": { - "intellisenseScopes": [ - "variable-scopes" - ] - } - }, - "subtitle": "Text Input" - } - }, - "Microsoft.ThrowException": { - "flow": { - "body": { - "description": "= ErrorValue", - "property": "=coalesce(action.errorValue, \"?\")", - "widget": "PropertyDescription" - }, - "widget": "ActionCard" - }, - "form": { - "label": "Throw an exception", - "subtitle": "Throw an exception" - } - }, - "Microsoft.TraceActivity": { - "form": { - "helpLink": "https://aka.ms/composer-telemetry", - "label": "Emit a trace event", - "subtitle": "Trace Activity" - } - }, - "Microsoft.UpdateActivity": { - "flow": { - "body": { - "field": "activity", - "widget": "LgWidget" - }, - "header": { - "colors": { - "icon": "#656565", - "theme": "#D7D7D7" - }, - "icon": "MessageBot", - "title": "Update activity", - "widget": "ActionHeader" - }, - "widget": "ActionCard" - }, - "form": { - "label": "Update an activity", - "subtitle": "Update Activity" - } - } -} diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/schemas/update-schema.ps1 b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/schemas/update-schema.ps1 deleted file mode 100644 index 67715586e4..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/schemas/update-schema.ps1 +++ /dev/null @@ -1,27 +0,0 @@ -$SCHEMA_FILE="sdk.schema" -$UISCHEMA_FILE="sdk.uischema" -$BACKUP_SCHEMA_FILE="sdk-backup.schema" -$BACKUP_UISCHEMA_FILE="sdk-backup.uischema" - -Write-Host "Running schema merge." - -if (Test-Path $SCHEMA_FILE -PathType leaf) { Move-Item -Force -Path $SCHEMA_FILE -Destination $BACKUP_SCHEMA_FILE } -if (Test-Path $UISCHEMA_FILE -PathType leaf) { Move-Item -Force -Path $UISCHEMA_FILE -Destination $BACKUP_UISCHEMA_FILE } - -bf dialog:merge "*.schema" "!**/sdk-backup.schema" "*.uischema" "!**/sdk-backup.uischema" "!**/sdk.override.uischema" "!**/generated" "../*.csproj" "../package.json" -o $SCHEMA_FILE - -if (Test-Path $SCHEMA_FILE -PathType leaf) -{ - if (Test-Path $BACKUP_SCHEMA_FILE -PathType leaf) { Remove-Item -Force -Path $BACKUP_SCHEMA_FILE } - if (Test-Path $BACKUP_UISCHEMA_FILE -PathType leaf) { Remove-Item -Force -Path $BACKUP_UISCHEMA_FILE } - - Write-Host "Schema merged succesfully." - if (Test-Path $SCHEMA_FILE -PathType leaf) { Write-Host " Schema: $SCHEMA_FILE" } - if (Test-Path $UISCHEMA_FILE -PathType leaf) { Write-Host " UI Schema: $UISCHEMA_FILE" } -} -else -{ - Write-Host "Schema merge failed. Restoring previous versions." - if (Test-Path $BACKUP_SCHEMA_FILE -PathType leaf) { Move-Item -Force -Path $BACKUP_SCHEMA_FILE -Destination $SCHEMA_FILE } - if (Test-Path $BACKUP_UISCHEMA_FILE -PathType leaf) { Move-Item -Force -Path $BACKUP_UISCHEMA_FILE -Destination $UISCHEMA_FILE } -} diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/schemas/update-schema.sh b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/schemas/update-schema.sh deleted file mode 100644 index 50beec9c4c..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/schemas/update-schema.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash -SCHEMA_FILE=sdk.schema -UISCHEMA_FILE=sdk.uischema -BACKUP_SCHEMA_FILE=sdk-backup.schema -BACKUP_UISCHEMA_FILE=sdk-backup.uischema - -while [ $# -gt 0 ]; do - if [[ $1 == *"-"* ]]; then - param="${1/-/}" - declare $param="$2" - fi - shift -done - -echo "Running schema merge." -[ -f "$SCHEMA_FILE" ] && mv "./$SCHEMA_FILE" "./$BACKUP_SCHEMA_FILE" -[ -f "$UISCHEMA_FILE" ] && mv "./$UISCHEMA_FILE" "./$BACKUP_UISCHEMA_FILE" - -bf dialog:merge "*.schema" "!**/sdk-backup.schema" "*.uischema" "!**/sdk-backup.uischema" "!**/sdk.override.uischema" "!**/generated" "../*.csproj" "../package.json" -o $SCHEMA_FILE - -if [ -f "$SCHEMA_FILE" ]; then - rm -rf "./$BACKUP_SCHEMA_FILE" - rm -rf "./$BACKUP_UISCHEMA_FILE" - echo "Schema merged succesfully." - [ -f "$SCHEMA_FILE" ] && echo " Schema: $SCHEMA_FILE" - [ -f "$UISCHEMA_FILE" ] && echo " UI Schema: $UISCHEMA_FILE" -else - echo "Schema merge failed. Restoring previous versions." - [ -f "$BACKUP_SCHEMA_FILE" ] && mv "./$BACKUP_SCHEMA_FILE" "./$SCHEMA_FILE" - [ -f "$BACKUP_UISCHEMA_FILE" ] && mv "./$BACKUP_UISCHEMA_FILE" "./$UISCHEMA_FILE" -fi diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/settings/appsettings.json b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/settings/appsettings.json deleted file mode 100644 index 5743912bbc..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/settings/appsettings.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "customFunctions": [], - "defaultLanguage": "en-us", - "defaultLocale": "en-us", - "importedLibraries": [], - "languages": [ - "en-us" - ], - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" - } - }, - "luFeatures": { - "enableCompositeEntities": true, - "enableListEntities": true, - "enableMLEntities": true, - "enablePattern": true, - "enablePhraseLists": true, - "enablePrebuiltEntities": true, - "enableRegexEntities": true - }, - "luis": { - "authoringEndpoint": "", - "authoringRegion": "", - "defaultLanguage": "en-us", - "endpoint": "", - "environment": "composer", - "name": "SimpleHostBotComposer" - }, - "MicrosoftAppId": "", - "MicrosoftAppPassword": "", - "publishTargets": [], - "qna": { - "hostname": "", - "knowledgebaseid": "", - "qnaRegion": "westus" - }, - "runtime": { - "command": "dotnet run --project SimpleHostBotComposer.csproj", - "customRuntime": true, - "key": "adaptive-runtime-dotnet-webapp", - "path": "../" - }, - "runtimeSettings": { - "adapters": [], - "features": { - "removeRecipientMentions": false, - "showTyping": false, - "traceTranscript": false, - "useInspection": false, - "setSpeak": { - "voiceFontName": "en-US-AriaNeural", - "fallbackToTextForSpeechIfEmpty": true - } - }, - "components": [], - "skills": { - "allowedCallers": [ - "*" - ] - }, - "storage": "", - "telemetry": { - "logActivities": true, - "logPersonalInformation": false, - "options": { - "connectionString": "" - } - } - }, - "downsampling": { - "maxImbalanceRatio": -1 - }, - "skillConfiguration": {}, - "skillHostEndpoint": "http://localhost:35010/api/skills", - "skill": { - "echoSkillBotComposerDotNet": { - "endpointUrl": "http://localhost:35410/api/messages", - "msAppId": "00000000-0000-0000-0000-000000000000" - }, - "echoSkillBotDotNet": { - "endpointUrl": "http://localhost:35400/api/messages", - "msAppId": "00000000-0000-0000-0000-000000000000" - }, - "echoSkillBotDotNet21": { - "endpointUrl": "http://localhost:35405/api/messages", - "msAppId": "00000000-0000-0000-0000-000000000000" - }, - "echoSkillBotDotNetV3": { - "endpointUrl": "http://localhost:35407/api/messages", - "msAppId": "00000000-0000-0000-0000-000000000000" - }, - "echoSkillBotJs": { - "endpointUrl": "http://localhost:36400/api/messages", - "msAppId": "00000000-0000-0000-0000-000000000000" - }, - "echoSkillBotJsv3": { - "endpointUrl": "http://localhost:36407/api/messages", - "msAppId": "00000000-0000-0000-0000-000000000000" - }, - "echoSkillBotPython": { - "endpointUrl": "http://localhost:37400/api/messages", - "msAppId": "00000000-0000-0000-0000-000000000000" - } - } -} \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/simplehostbotcomposer.dialog b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/simplehostbotcomposer.dialog deleted file mode 100644 index d72a4dcbd3..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/simplehostbotcomposer.dialog +++ /dev/null @@ -1,104 +0,0 @@ -{ - "$kind": "Microsoft.AdaptiveDialog", - "$designer": { - "name": "SimpleHostBotComposer", - "description": "", - "id": "A79tBe" - }, - "autoEndDialog": true, - "defaultResultProperty": "dialog.result", - "triggers": [ - { - "$kind": "Microsoft.OnConversationUpdateActivity", - "$designer": { - "id": "376720" - }, - "actions": [ - { - "$kind": "Microsoft.Foreach", - "$designer": { - "id": "518944", - "name": "Loop: for each item" - }, - "itemsProperty": "turn.Activity.membersAdded", - "actions": [ - { - "$kind": "Microsoft.IfCondition", - "$designer": { - "id": "641773", - "name": "Branch: if/else" - }, - "condition": "string(dialog.foreach.value.id) != string(turn.Activity.Recipient.id)", - "actions": [ - { - "$kind": "Microsoft.SendActivity", - "$designer": { - "id": "859266", - "name": "Send a response" - }, - "activity": "${SendActivity_Greeting()}" - }, - { - "$kind": "Microsoft.BeginDialog", - "$designer": { - "id": "fTvoh5" - }, - "activityProcessed": true, - "dialog": "CallEchoSkill" - } - ] - } - ] - } - ] - }, - { - "$kind": "Microsoft.OnUnknownIntent", - "$designer": { - "id": "mb2n1u" - }, - "actions": [ - { - "$kind": "Microsoft.SendActivity", - "$designer": { - "id": "kMjqz1" - }, - "activity": "${SendActivity_DidNotUnderstand()}" - } - ] - }, - { - "$kind": "Microsoft.OnEndOfConversationActivity", - "$designer": { - "id": "xPU1pB" - }, - "actions": [ - { - "$kind": "Microsoft.SendActivity", - "$designer": { - "id": "M2LqJr" - }, - "activity": "${SendActivity_M2LqJr()}" - }, - { - "$kind": "Microsoft.SendActivity", - "$designer": { - "id": "bgTcyn" - }, - "activity": "${SendActivity_bgTcyn()}" - }, - { - "$kind": "Microsoft.BeginDialog", - "$designer": { - "id": "s9BrZr" - }, - "activityProcessed": true, - "dialog": "CallEchoSkill" - } - ] - } - ], - "generator": "SimpleHostBotComposer.lg", - "id": "SimpleHostBotComposer", - "recognizer": "SimpleHostBotComposer.lu.qna" -} diff --git a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/wwwroot/default.htm b/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/wwwroot/default.htm deleted file mode 100644 index 8ddd3ef885..0000000000 --- a/tests/functional/Bots/DotNet/Consumers/Composer/SimpleHostBotComposer/wwwroot/default.htm +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - SimpleHostBotComposer - - - - - -
-
-
-
SimpleHostBotComposer
-
-
-
-
-
Your bot is ready!
-
You can test your bot in the Bot Framework Emulator
- by connecting to http://localhost:3978/api/messages.
- -
Visit Azure - Bot Service to register your bot and add it to
- various channels. The bot's endpoint URL typically looks - like this:
-
https://your_bots_hostname/api/messages
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/FunctionalTestsBots.sln b/tests/functional/Bots/DotNet/FunctionalTestsBots.sln deleted file mode 100644 index ea5591067b..0000000000 --- a/tests/functional/Bots/DotNet/FunctionalTestsBots.sln +++ /dev/null @@ -1,106 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30621.155 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Consumers", "Consumers", "{12088D79-235C-4387-9DA8-69AB93D52A8E}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Skills", "Skills", "{39117C87-FD02-40CD-A9A9-9A4C0A630521}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CodeFirst", "CodeFirst", "{C7A60083-78C8-4CEF-A358-4E53CBF0D12A}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleHostBot", "Consumers\CodeFirst\SimpleHostBot\SimpleHostBot.csproj", "{AAE978F8-D22B-41E8-B445-872FF4194713}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleHostBot-2.1", "Consumers\CodeFirst\SimpleHostBot-2.1\SimpleHostBot-2.1.csproj", "{0443C38C-A0DF-4A1A-8931-4A4BFFEEB386}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CodeFirst", "CodeFirst", "{6EF38D8C-7953-4D54-BA31-FFF055B7B217}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EchoSkillBot-2.1", "Skills\CodeFirst\EchoSkillBot-2.1\EchoSkillBot-2.1.csproj", "{56864219-785B-4600-9849-43CAF90F37E9}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EchoSkillBot", "Skills\CodeFirst\EchoSkillBot\EchoSkillBot.csproj", "{692F26DD-F7BA-49F3-AC6D-73047C1E5D61}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Composer", "Composer", "{33FA275E-9E5D-4582-BFF7-24B2C5DB2962}" - ProjectSection(SolutionItems) = preProject - Consumers\Composer\Directory.Build.props = Consumers\Composer\Directory.Build.props - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Composer", "Composer", "{33E2281F-C6A7-40EC-961A-FF9FF254FDDC}" - ProjectSection(SolutionItems) = preProject - Skills\Composer\Directory.Build.props = Skills\Composer\Directory.Build.props - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WaterfallHostBot", "Consumers\CodeFirst\WaterfallHostBot\WaterfallHostBot.csproj", "{15A946BE-39F9-4945-9895-0019ED3392FC}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WaterfallSkillBot", "Skills\CodeFirst\WaterfallSkillBot\WaterfallSkillBot.csproj", "{E3BECBEF-E41F-48D1-9EEB-A4D7E1CD34E3}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EchoSkillBot-v3", "Skills\CodeFirst\EchoSkillBot-v3\EchoSkillBot-v3.csproj", "{41BC9547-FD9E-40E1-B1D9-C3F25BC9A2F3}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleHostBotComposer", "Consumers\Composer\SimpleHostBotComposer\SimpleHostBotComposer.csproj", "{FDC53B3A-0E15-4FDF-A587-05C8F90BC2B6}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EchoSkillBotComposer", "Skills\Composer\EchoSkillBotComposer\EchoSkillBotComposer.csproj", "{9BA47CF9-7D90-4B5C-A9FA-01797A435D53}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {AAE978F8-D22B-41E8-B445-872FF4194713}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AAE978F8-D22B-41E8-B445-872FF4194713}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AAE978F8-D22B-41E8-B445-872FF4194713}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AAE978F8-D22B-41E8-B445-872FF4194713}.Release|Any CPU.Build.0 = Release|Any CPU - {0443C38C-A0DF-4A1A-8931-4A4BFFEEB386}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0443C38C-A0DF-4A1A-8931-4A4BFFEEB386}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0443C38C-A0DF-4A1A-8931-4A4BFFEEB386}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0443C38C-A0DF-4A1A-8931-4A4BFFEEB386}.Release|Any CPU.Build.0 = Release|Any CPU - {56864219-785B-4600-9849-43CAF90F37E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {56864219-785B-4600-9849-43CAF90F37E9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {56864219-785B-4600-9849-43CAF90F37E9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {56864219-785B-4600-9849-43CAF90F37E9}.Release|Any CPU.Build.0 = Release|Any CPU - {692F26DD-F7BA-49F3-AC6D-73047C1E5D61}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {692F26DD-F7BA-49F3-AC6D-73047C1E5D61}.Debug|Any CPU.Build.0 = Debug|Any CPU - {692F26DD-F7BA-49F3-AC6D-73047C1E5D61}.Release|Any CPU.ActiveCfg = Release|Any CPU - {692F26DD-F7BA-49F3-AC6D-73047C1E5D61}.Release|Any CPU.Build.0 = Release|Any CPU - {15A946BE-39F9-4945-9895-0019ED3392FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {15A946BE-39F9-4945-9895-0019ED3392FC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {15A946BE-39F9-4945-9895-0019ED3392FC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {15A946BE-39F9-4945-9895-0019ED3392FC}.Release|Any CPU.Build.0 = Release|Any CPU - {E3BECBEF-E41F-48D1-9EEB-A4D7E1CD34E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E3BECBEF-E41F-48D1-9EEB-A4D7E1CD34E3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E3BECBEF-E41F-48D1-9EEB-A4D7E1CD34E3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E3BECBEF-E41F-48D1-9EEB-A4D7E1CD34E3}.Release|Any CPU.Build.0 = Release|Any CPU - {41BC9547-FD9E-40E1-B1D9-C3F25BC9A2F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {41BC9547-FD9E-40E1-B1D9-C3F25BC9A2F3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {41BC9547-FD9E-40E1-B1D9-C3F25BC9A2F3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {41BC9547-FD9E-40E1-B1D9-C3F25BC9A2F3}.Release|Any CPU.Build.0 = Release|Any CPU - {FDC53B3A-0E15-4FDF-A587-05C8F90BC2B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FDC53B3A-0E15-4FDF-A587-05C8F90BC2B6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FDC53B3A-0E15-4FDF-A587-05C8F90BC2B6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FDC53B3A-0E15-4FDF-A587-05C8F90BC2B6}.Release|Any CPU.Build.0 = Release|Any CPU - {9BA47CF9-7D90-4B5C-A9FA-01797A435D53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9BA47CF9-7D90-4B5C-A9FA-01797A435D53}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9BA47CF9-7D90-4B5C-A9FA-01797A435D53}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9BA47CF9-7D90-4B5C-A9FA-01797A435D53}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {C7A60083-78C8-4CEF-A358-4E53CBF0D12A} = {12088D79-235C-4387-9DA8-69AB93D52A8E} - {AAE978F8-D22B-41E8-B445-872FF4194713} = {C7A60083-78C8-4CEF-A358-4E53CBF0D12A} - {0443C38C-A0DF-4A1A-8931-4A4BFFEEB386} = {C7A60083-78C8-4CEF-A358-4E53CBF0D12A} - {6EF38D8C-7953-4D54-BA31-FFF055B7B217} = {39117C87-FD02-40CD-A9A9-9A4C0A630521} - {56864219-785B-4600-9849-43CAF90F37E9} = {6EF38D8C-7953-4D54-BA31-FFF055B7B217} - {692F26DD-F7BA-49F3-AC6D-73047C1E5D61} = {6EF38D8C-7953-4D54-BA31-FFF055B7B217} - {33FA275E-9E5D-4582-BFF7-24B2C5DB2962} = {12088D79-235C-4387-9DA8-69AB93D52A8E} - {33E2281F-C6A7-40EC-961A-FF9FF254FDDC} = {39117C87-FD02-40CD-A9A9-9A4C0A630521} - {15A946BE-39F9-4945-9895-0019ED3392FC} = {C7A60083-78C8-4CEF-A358-4E53CBF0D12A} - {E3BECBEF-E41F-48D1-9EEB-A4D7E1CD34E3} = {6EF38D8C-7953-4D54-BA31-FFF055B7B217} - {41BC9547-FD9E-40E1-B1D9-C3F25BC9A2F3} = {6EF38D8C-7953-4D54-BA31-FFF055B7B217} - {FDC53B3A-0E15-4FDF-A587-05C8F90BC2B6} = {33FA275E-9E5D-4582-BFF7-24B2C5DB2962} - {9BA47CF9-7D90-4B5C-A9FA-01797A435D53} = {33E2281F-C6A7-40EC-961A-FF9FF254FDDC} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {2B77A921-EEA6-4006-ABD2-159C92F9F874} - EndGlobalSection -EndGlobal diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/Authentication/AllowedCallersClaimsValidator.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/Authentication/AllowedCallersClaimsValidator.cs deleted file mode 100644 index 5b0b053639..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/Authentication/AllowedCallersClaimsValidator.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Security.Claims; -using System.Threading.Tasks; -using Microsoft.Bot.Connector.Authentication; -using Microsoft.Extensions.Configuration; - -namespace Microsoft.BotFrameworkFunctionalTests.EchoSkillBot21.Authentication -{ - /// - /// Sample claims validator that loads an allowed list from configuration if present - /// and checks that requests are coming from allowed parent bots. - /// - public class AllowedCallersClaimsValidator : ClaimsValidator - { - private const string ConfigKey = "AllowedCallers"; - private readonly List _allowedCallers; - - /// - /// Initializes a new instance of the class. - /// Loads the appIds for the configured callers. Only allows access to callers it has configured. - /// - /// The list of configured callers. - public AllowedCallersClaimsValidator(IConfiguration config) - { - if (config == null) - { - throw new ArgumentNullException(nameof(config)); - } - - // AllowedCallers is the setting in the appsettings.json file - // that consists of the list of parent bot IDs that are allowed to access the skill. - // To add a new parent bot, simply edit the AllowedCallers and add - // the parent bot's Microsoft app ID to the list. - // In this sample, we allow all callers if AllowedCallers contains an "*". - var section = config.GetSection(ConfigKey); - var appsList = section.Get(); - if (appsList == null) - { - throw new ArgumentNullException($"\"{ConfigKey}\" not found in configuration."); - } - - _allowedCallers = new List(appsList); - } - - /// - /// Checks that the appId claim in the skill request is in the list of callers configured for this bot. - /// - /// The list of claims to validate. - /// A task that represents the work queued to execute. - public override Task ValidateClaimsAsync(IList claims) - { - // If _allowedCallers contains an "*", we allow all callers. - if (SkillValidation.IsSkillClaim(claims) && !_allowedCallers.Contains("*")) - { - // Check that the appId claim in the skill request is in the list of callers configured for this bot. - var appId = JwtTokenValidation.GetAppIdFromClaims(claims); - if (!_allowedCallers.Contains(appId)) - { - throw new UnauthorizedAccessException($"Received a request from a bot with an app ID of \"{appId}\". To enable requests from this caller, add the app ID to your configuration file."); - } - } - - return Task.CompletedTask; - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/Bots/EchoBot.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/Bots/EchoBot.cs deleted file mode 100644 index 14cccdbc7a..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/Bots/EchoBot.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Schema; - -namespace Microsoft.BotFrameworkFunctionalTests.EchoSkillBot21.Bots -{ - public class EchoBot : ActivityHandler - { - /// - /// Processes a message activity. - /// - /// Context for the current turn of conversation. - /// CancellationToken propagates notifications that operations should be cancelled. - /// A representing the result of the asynchronous operation. - protected override async Task OnMessageActivityAsync(ITurnContext turnContext, CancellationToken cancellationToken) - { - if (turnContext.Activity.Text.Contains("end") || turnContext.Activity.Text.Contains("stop")) - { - // Send End of conversation at the end. - await turnContext.SendActivityAsync(MessageFactory.Text($"Ending conversation from the skill..."), cancellationToken); - var endOfConversation = Activity.CreateEndOfConversationActivity(); - endOfConversation.Code = EndOfConversationCodes.CompletedSuccessfully; - await turnContext.SendActivityAsync(endOfConversation, cancellationToken); - } - else - { - await turnContext.SendActivityAsync(MessageFactory.Text($"Echo: {turnContext.Activity.Text}"), cancellationToken); - await turnContext.SendActivityAsync(MessageFactory.Text("Say \"end\" or \"stop\" and I'll end the conversation and back to the parent."), cancellationToken); - } - } - - /// - /// Processes an end of conversation activity. - /// - /// Context for the current turn of conversation. - /// CancellationToken propagates notifications that operations should be cancelled. - /// A representing the result of the asynchronous operation. - protected override Task OnEndOfConversationActivityAsync(ITurnContext turnContext, CancellationToken cancellationToken) - { - // This will be called if the host bot is ending the conversation. Sending additional messages should be - // avoided as the conversation may have been deleted. - // Perform cleanup of resources if needed. - return Task.CompletedTask; - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/Controllers/BotController.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/Controllers/BotController.cs deleted file mode 100644 index c2fe9a198a..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/Controllers/BotController.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Integration.AspNet.Core; - -namespace Microsoft.BotFrameworkFunctionalTests.EchoSkillBot21.Controllers -{ - /// - /// This ASP Controller is created to handle a request. Dependency Injection will provide the Adapter and IBot implementation at runtime. - /// Multiple different IBot implementations running at different endpoints can be achieved by specifying a more specific type for the bot constructor argument. - /// - [Route("api/messages")] - [ApiController] - public class BotController : ControllerBase - { - private readonly IBotFrameworkHttpAdapter _adapter; - private readonly IBot _bot; - - /// - /// Initializes a new instance of the class. - /// - /// Adapter for the BotController. - /// Bot for the BotController. - public BotController(IBotFrameworkHttpAdapter adapter, IBot bot) - { - _adapter = adapter; - _bot = bot; - } - - /// - /// Processes an HttpPost request. - /// - /// A representing the result of the asynchronous operation. - [HttpPost] - public async Task PostAsync() - { - await _adapter.ProcessAsync(Request, Response, _bot); - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/EchoSkillBot-2.1.csproj b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/EchoSkillBot-2.1.csproj deleted file mode 100644 index 2df857a613..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/EchoSkillBot-2.1.csproj +++ /dev/null @@ -1,25 +0,0 @@ - - - - netcoreapp2.1 - latest - Microsoft.BotFrameworkFunctionalTests.EchoSkillBot21 - Microsoft.BotFrameworkFunctionalTests.EchoSkillBot21 - - - - DEBUG;TRACE - - - - - - - - - - Always - - - - \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/Program.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/Program.cs deleted file mode 100644 index bdfda7669a..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/Program.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Microsoft.AspNetCore; -using Microsoft.AspNetCore.Hosting; - -namespace Microsoft.BotFrameworkFunctionalTests.EchoSkillBot21 -{ - public class Program - { - /// - /// The entry point of the application. - /// - /// The command line args. - public static void Main(string[] args) - { - CreateWebHostBuilder(args).Build().Run(); - } - - /// - /// Creates a new instance of the class with pre-configured defaults. - /// - /// The command line args. - /// The initialized . - public static IWebHostBuilder CreateWebHostBuilder(string[] args) => - WebHost.CreateDefaultBuilder(args) - .UseStartup(); - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/Properties/launchSettings.json b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/Properties/launchSettings.json deleted file mode 100644 index 791f7e6a3b..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/Properties/launchSettings.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:35405/", - "sslPort": 0 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": false, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "EchoSkillBotDotNet21": { - "commandName": "Project", - "launchBrowser": true, - "applicationUrl": "http://localhost:35405/", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/SkillAdapterWithErrorHandler.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/SkillAdapterWithErrorHandler.cs deleted file mode 100644 index 76ef40f872..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/SkillAdapterWithErrorHandler.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Integration.AspNet.Core; -using Microsoft.Bot.Builder.TraceExtensions; -using Microsoft.Bot.Connector.Authentication; -using Microsoft.Bot.Schema; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Logging; - -namespace Microsoft.BotFrameworkFunctionalTests.EchoSkillBot21 -{ - public class SkillAdapterWithErrorHandler : BotFrameworkHttpAdapter - { - /// - /// Initializes a new instance of the class to handle errors. - /// - /// The configuration properties. - /// An implementation of the bots credentials. - /// The configuration setting for the authentication. - /// An instance of a logger. - /// A state management object for the conversation. - public SkillAdapterWithErrorHandler(IConfiguration configuration, ICredentialProvider credentialProvider, AuthenticationConfiguration authConfig, ILogger logger) - : base(configuration, credentialProvider, authConfig, logger: logger) - { - OnTurnError = async (turnContext, exception) => - { - try - { - // Log any leaked exception from the application. - logger.LogError(exception, $"[OnTurnError] unhandled error : {exception.Message}"); - - // Send a message to the user - var errorMessageText = "The skill encountered an error or bug."; - var errorMessage = MessageFactory.Text(errorMessageText + Environment.NewLine + exception, errorMessageText, InputHints.IgnoringInput); - errorMessage.Value = exception; - await turnContext.SendActivityAsync(errorMessage); - - errorMessageText = "To continue to run this bot, please fix the bot source code."; - errorMessage = MessageFactory.Text(errorMessageText, errorMessageText, InputHints.ExpectingInput); - await turnContext.SendActivityAsync(errorMessage); - - // Send a trace activity, which will be displayed in the Bot Framework Emulator - // Note: we return the entire exception in the value property to help the developer, this should not be done in prod. - await turnContext.TraceActivityAsync("OnTurnError Trace", exception.ToString(), "https://www.botframework.com/schemas/error", "TurnError"); - - // Send and EndOfConversation activity to the skill caller with the error to end the conversation - // and let the caller decide what to do. - var endOfConversation = Activity.CreateEndOfConversationActivity(); - endOfConversation.Code = "SkillError"; - endOfConversation.Text = exception.Message; - await turnContext.SendActivityAsync(endOfConversation); - } - catch (Exception ex) - { - logger.LogError(ex, $"Exception caught in SkillAdapterWithErrorHandler : {ex}"); - } - }; - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/Startup.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/Startup.cs deleted file mode 100644 index 1c0bacc9bd..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/Startup.cs +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.BotFramework; -using Microsoft.Bot.Builder.Integration.AspNet.Core; -using Microsoft.Bot.Connector.Authentication; -using Microsoft.BotFrameworkFunctionalTests.EchoSkillBot21.Bots; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; - -namespace Microsoft.BotFrameworkFunctionalTests.EchoSkillBot21 -{ - public class Startup - { - public Startup(IConfiguration config) - { - Configuration = config; - } - - public IConfiguration Configuration { get; } - - /// - /// This method gets called by the runtime. Use this method to add services to the container. - /// - /// Method to add services to the container. - public void ConfigureServices(IServiceCollection services) - { - services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); - - // Configure credentials - services.AddSingleton(); - - // Register AuthConfiguration to enable custom claim validation. - services.AddSingleton(sp => new AuthenticationConfiguration { ClaimsValidator = new Authentication.AllowedCallersClaimsValidator(sp.GetService()) }); - - // Create the Bot Framework Adapter with error handling enabled. - services.AddSingleton(); - - // Create the bot as a transient. In this case the ASP Controller is expecting an IBot. - services.AddTransient(); - - if (!string.IsNullOrEmpty(Configuration["ChannelService"])) - { - // Register a ConfigurationChannelProvider -- this is only for Azure Gov. - services.AddSingleton(); - } - } - - /// - /// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - /// - /// The application request pipeline to be configured. - /// The web hosting environment. - public void Configure(IApplicationBuilder app, IHostingEnvironment env) - { - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - } - else - { - app.UseHsts(); - } - - app.UseDefaultFiles(); - app.UseStaticFiles(); - - // app.UseHttpsRedirection(); - app.UseMvc(); - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/appsettings.json b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/appsettings.json deleted file mode 100644 index c61cdb4d79..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/appsettings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "MicrosoftAppId": "", - "MicrosoftAppPassword": "", - "ChannelService": "", - // This is a comma separate list with the App IDs that will have access to the skill. - // This setting is used in AllowedCallersClaimsValidator. - // Examples: - // [ "*" ] allows all callers. - // [ "AppId1", "AppId2" ] only allows access to parent bots with "AppId1" and "AppId2". - "AllowedCallers": [ "*" ] -} \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/wwwroot/default.htm b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/wwwroot/default.htm deleted file mode 100644 index 56d1b43377..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/wwwroot/default.htm +++ /dev/null @@ -1,420 +0,0 @@ - - - - - - - EchoSkillBot-2.1DotNet - - - - - -
-
-
-
EchoSkillBot-2.1DotNet Bot
-
-
-
-
-
Your bot is ready!
-
You can test your bot in the Bot Framework Emulator
- by connecting to http://localhost:3978/api/messages.
- -
Visit Azure - Bot Service to register your bot and add it to
- various channels. The bot's endpoint URL typically looks - like this:
-
https://your_bots_hostname/api/messages
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/wwwroot/manifests/echoskillbot-manifest-1.0.json b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/wwwroot/manifests/echoskillbot-manifest-1.0.json deleted file mode 100644 index 68b6a165ff..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-2.1/wwwroot/manifests/echoskillbot-manifest-1.0.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "https://schemas.botframework.com/schemas/skills/v2.1/skill-manifest.json", - "$id": "EchoSkillBotDotNet21", - "name": "EchoSkillBotDotNet21", - "version": "1.0", - "description": "This is a skill for echoing what the user sent to the bot (using .netcore 2.1).", - "publisherName": "Microsoft", - "privacyUrl": "https://microsoft.com/privacy", - "copyright": "Copyright (c) Microsoft Corporation. All rights reserved.", - "license": "https://github.com/microsoft/BotFramework-FunctionalTests/blob/main/LICENSE", - "tags": [ - "echo" - ], - "endpoints": [ - { - "name": "default", - "protocol": "BotFrameworkV3", - "description": "Localhost endpoint for the skill (on port 35405)", - "endpointUrl": "http://localhost:35405/api/messages", - "msAppId": "00000000-0000-0000-0000-000000000000" - } - ] -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/ApiControllerActionInvokerWithErrorHandler.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/ApiControllerActionInvokerWithErrorHandler.cs deleted file mode 100644 index 4ad82c1409..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/ApiControllerActionInvokerWithErrorHandler.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Microsoft.Bot.Builder.Dialogs; -using Microsoft.Bot.Connector; -using Newtonsoft.Json; -using System.IO; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using System.Web.Http.Controllers; - -namespace Microsoft.BotFrameworkFunctionalTests.EchoSkillBotv3 -{ - /// - /// Web Api Controller to intersect HTTP operations when the Action Invoker is triggered to capture exceptions and send it to the bot as an Activity. - /// - internal class ApiControllerActionInvokerWithErrorHandler : ApiControllerActionInvoker - { - public async override Task InvokeActionAsync(HttpActionContext actionContext, CancellationToken cancellationToken) - { - var result = base.InvokeActionAsync(actionContext, cancellationToken); - - if (result.Exception != null && result.Exception.GetBaseException() != null) - { - var stream = new StreamReader(actionContext.Request.Content.ReadAsStreamAsync().Result); - stream.BaseStream.Position = 0; - var rawRequest = stream.ReadToEnd(); - var activity = JsonConvert.DeserializeObject(rawRequest); - - activity.Type = "exception"; - activity.Text = result.Exception.ToString(); - activity.Value = result.Exception; - - await Conversation.SendAsync(activity, () => new Dialogs.RootDialog()); - } - - return await result; - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/App_Start/WebApiConfig.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/App_Start/WebApiConfig.cs deleted file mode 100644 index 97fc72a901..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/App_Start/WebApiConfig.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; -using System.Web.Http; -using System.Web.Http.Controllers; - -namespace Microsoft.BotFrameworkFunctionalTests.EchoSkillBotv3 -{ - public static class WebApiConfig - { - public static void Register(HttpConfiguration config) - { - // Json settings - config.Formatters.JsonFormatter.SerializerSettings.NullValueHandling = NullValueHandling.Ignore; - config.Formatters.JsonFormatter.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver(); - config.Formatters.JsonFormatter.SerializerSettings.Formatting = Formatting.Indented; - JsonConvert.DefaultSettings = () => new JsonSerializerSettings() - { - ContractResolver = new CamelCasePropertyNamesContractResolver(), - Formatting = Newtonsoft.Json.Formatting.Indented, - NullValueHandling = NullValueHandling.Ignore, - }; - - // Web API configuration and services - - // Web API routes - config.MapHttpAttributeRoutes(); - - config.Routes.MapHttpRoute( - name: "DefaultApi", - routeTemplate: "api/{controller}/{id}", - defaults: new { id = RouteParameter.Optional } - ); - config.Services.Replace(typeof(IHttpActionInvoker), new ApiControllerActionInvokerWithErrorHandler()); - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Authentication/CustomAllowedCallersClaimsValidator.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Authentication/CustomAllowedCallersClaimsValidator.cs deleted file mode 100644 index 7d3de967b2..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Authentication/CustomAllowedCallersClaimsValidator.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Microsoft.Bot.Connector.SkillAuthentication; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Security.Claims; -using System.Threading.Tasks; - -namespace Microsoft.BotFrameworkFunctionalTests.EchoSkillBotv3.Authentication -{ - /// - /// Sample claims validator that loads an allowed list from configuration if present - /// and checks that requests are coming from allowed parent bots. - /// - public class CustomAllowedCallersClaimsValidator : ClaimsValidator - { - private readonly IList _allowedCallers; - - public CustomAllowedCallersClaimsValidator(IList allowedCallers) - { - // AllowedCallers is the setting in web.config file - // that consists of the list of parent bot IDs that are allowed to access the skill. - // To add a new parent bot simply go to the AllowedCallers and add - // the parent bot's Microsoft app ID to the list. - - _allowedCallers = allowedCallers ?? throw new ArgumentNullException(nameof(allowedCallers)); - if (!_allowedCallers.Any()) - { - throw new ArgumentNullException(nameof(allowedCallers), "AllowedCallers must contain at least one element of '*' or valid MicrosoftAppId(s)."); - } - } - - /// - /// This method is called from JwtTokenValidation.ValidateClaimsAsync - /// - /// - public override Task ValidateClaimsAsync(IList claims) - { - if (claims == null) - { - throw new ArgumentNullException(nameof(claims)); - } - - if (!claims.Any()) - { - throw new UnauthorizedAccessException("ValidateClaimsAsync.claims parameter must contain at least one element."); - } - - if (SkillValidation.IsSkillClaim(claims)) - { - // if _allowedCallers has one item of '*', allow all parent bot calls and do not validate the appid from claims - if (_allowedCallers.Count == 1 && _allowedCallers[0] == "*") - { - return Task.CompletedTask; - } - - // Check that the appId claim in the skill request is in the list of skills configured for this bot. - var appId = JwtTokenValidation.GetAppIdFromClaims(claims).ToUpperInvariant(); - if (_allowedCallers.Contains(appId)) - { - return Task.CompletedTask; - } - - throw new UnauthorizedAccessException($"Received a request from a bot with an app ID of \"{appId}\". To enable requests from this caller, add the app ID to your configuration file."); - } - - throw new UnauthorizedAccessException($"ValidateClaimsAsync called without a Skill claim in claims."); - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Authentication/CustomSkillAuthenticationConfiguration.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Authentication/CustomSkillAuthenticationConfiguration.cs deleted file mode 100644 index 2d01093e67..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Authentication/CustomSkillAuthenticationConfiguration.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Microsoft.Bot.Connector.SkillAuthentication; -using System.Configuration; -using System.Linq; - -namespace Microsoft.BotFrameworkFunctionalTests.EchoSkillBotv3.Authentication -{ - public class CustomSkillAuthenticationConfiguration : AuthenticationConfiguration - { - private const string AllowedCallersConfigKey = "EchoBotAllowedCallers"; - public CustomSkillAuthenticationConfiguration() - { - // Could pull this list from a DB or anywhere. - var allowedCallers = ConfigurationManager.AppSettings[AllowedCallersConfigKey].Split(',').Select(s => s.Trim().ToUpperInvariant()).ToList(); - ClaimsValidator = new CustomAllowedCallersClaimsValidator(allowedCallers); - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Controllers/MessagesController.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Controllers/MessagesController.cs deleted file mode 100644 index 55cc612cd5..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Controllers/MessagesController.cs +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Diagnostics; -using System.Net; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using System.Web.Http; -using Autofac; -using Microsoft.Bot.Builder.Dialogs; -using Microsoft.Bot.Builder.Dialogs.Internals; -using Microsoft.Bot.Connector; -using Microsoft.Bot.Connector.SkillAuthentication; -using Microsoft.BotFrameworkFunctionalTests.EchoSkillBotv3.Authentication; - -namespace Microsoft.BotFrameworkFunctionalTests.EchoSkillBotv3 -{ - // Specify which type provides the authentication configuration to allow for validation for skills. - [SkillBotAuthentication(AuthenticationConfigurationProviderType = typeof(CustomSkillAuthenticationConfiguration))] - public class MessagesController : ApiController - { - /// - /// POST: api/Messages - /// Receive a message from a user and reply to it - /// - public async Task Post([FromBody]Activity activity) - { - if (activity.GetActivityType() == ActivityTypes.Message) - { - await Conversation.SendAsync(activity, () => new Dialogs.RootDialog()); - } - else - { - await HandleSystemMessage(activity); - } - var response = Request.CreateResponse(HttpStatusCode.OK); - return response; - } - - private async Task HandleSystemMessage(Activity message) - { - string messageType = message.GetActivityType(); - - if (messageType == ActivityTypes.EndOfConversation) - { - Trace.TraceInformation($"EndOfConversation: {message}"); - - // This Recipient null check is required for PVA manifest validation. - // PVA will send an EOC activity with null Recipient. - if (message.Recipient != null) - { - // Clear the dialog stack if the root bot has ended the conversation. - using (var scope = DialogModule.BeginLifetimeScope(Conversation.Container, message)) - { - var botData = scope.Resolve(); - await botData.LoadAsync(default(CancellationToken)); - - var stack = scope.Resolve(); - stack.Reset(); - - await botData.FlushAsync(default(CancellationToken)); - } - } - } - else if (messageType == ActivityTypes.DeleteUserData) - { - // Implement user deletion here - // If we handle user deletion, return a real message - } - else if (messageType == ActivityTypes.ConversationUpdate) - { - // Handle conversation state changes, like members being added and removed - // Use Activity.MembersAdded and Activity.MembersRemoved and Activity.Action for info - // Not available in all channels - } - else if (messageType == ActivityTypes.ContactRelationUpdate) - { - // Handle add/remove from contact lists - // Activity.From + Activity.Action represent what happened - } - else if (messageType == ActivityTypes.Typing) - { - // Handle knowing that the user is typing - } - else if (messageType == ActivityTypes.Ping) - { - } - - return null; - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Dialogs/RootDialog.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Dialogs/RootDialog.cs deleted file mode 100644 index 1ae1313a31..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Dialogs/RootDialog.cs +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Threading.Tasks; -using Microsoft.Bot.Builder.Dialogs; -using Microsoft.Bot.Connector; - -namespace Microsoft.BotFrameworkFunctionalTests.EchoSkillBotv3.Dialogs -{ - [Serializable] - public class RootDialog : IDialog - { - public Task StartAsync(IDialogContext context) - { - context.Wait(MessageReceivedAsync); - - return Task.CompletedTask; - } - - private async Task MessageReceivedAsync(IDialogContext context, IAwaitable result) - { - var activity = await result as Activity; - - var options = new MessageOptions - { - InputHint = InputHints.AcceptingInput - }; - - try - { - if (activity.Type == "exception") - { - await PostExceptionAsync(context, activity, activity.Value as Exception); - } - else if (activity.Text.ToLower().Contains("end") || activity.Text.ToLower().Contains("stop")) - { - // Send an `endOfconversation` activity if the user cancels the skill. - await context.SayAsync($"Ending conversation from the skill...", options: options); - var endOfConversation = activity.CreateReply(); - endOfConversation.Type = ActivityTypes.EndOfConversation; - endOfConversation.Code = EndOfConversationCodes.CompletedSuccessfully; - endOfConversation.InputHint = InputHints.AcceptingInput; - await context.PostAsync(endOfConversation); - } - else - { - await context.SayAsync($"Echo: {activity.Text}", options: options); - await context.SayAsync($"Say \"end\" or \"stop\" and I'll end the conversation and back to the parent.", options: options); - } - } - catch (Exception exception) - { - await PostExceptionAsync(context, activity, exception); - } - - context.Wait(MessageReceivedAsync); - } - - //Send exception message and trace - private static async Task PostExceptionAsync(IDialogContext context, Activity reply, Exception exception) - { - // Send a message to the user - var errorMessageText = "The skill encountered an error or bug."; - var activity = reply.CreateReply(); - activity.Text = errorMessageText + Environment.NewLine + exception; - activity.Speak = errorMessageText; - activity.InputHint = InputHints.IgnoringInput; - activity.Value = exception; - await context.PostAsync(activity); - - errorMessageText = "To continue to run this bot, please fix the bot source code."; - activity = reply.CreateReply(); - activity.Text = errorMessageText; - activity.Speak = errorMessageText; - activity.InputHint = InputHints.ExpectingInput; - await context.PostAsync(activity); - - // Send and EndOfConversation activity to the skill caller with the error to end the conversation - // and let the caller decide what to do. - activity = reply.CreateReply(); - activity.Type = ActivityTypes.EndOfConversation; - activity.Code = "SkillError"; - activity.Text = exception.Message; - await context.PostAsync(activity); - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/EchoSkillBot-v3.csproj b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/EchoSkillBot-v3.csproj deleted file mode 100644 index 4f5be44f73..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/EchoSkillBot-v3.csproj +++ /dev/null @@ -1,232 +0,0 @@ - - - - - Debug - AnyCPU - - - 2.0 - {41BC9547-FD9E-40E1-B1D9-C3F25BC9A2F3} - {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} - Library - Properties - Microsoft.BotFrameworkFunctionalTests.EchoSkillBot - Microsoft.BotFrameworkFunctionalTests.EchoSkillBot - - v4.7.2 - 512 - true - 3979 - enabled - disabled - false - - - - - - - - true - full - false - bin\ - DEBUG;TRACE - prompt - 4 - MSB3276 - - - pdbonly - true - bin\ - TRACE - prompt - 4 - - - - $(SolutionDir)packages\Autofac.4.6.0\lib\net45\Autofac.dll - - - $(SolutionDir)packages\Chronic.Signed.0.3.2\lib\net40\Chronic.dll - - - $(SolutionDir)packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll - - - $(SolutionDir)packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll - - - $(SolutionDir)packages\Microsoft.Azure.DocumentDB.1.22.0\lib\net45\Microsoft.Azure.Documents.Client.dll - - - $(SolutionDir)packages\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll - - - $(SolutionDir)packages\Microsoft.Bot.Builder.3.30.0\lib\net46\Microsoft.Bot.Builder.dll - True - - - $(SolutionDir)packages\Microsoft.Bot.Builder.3.30.0\lib\net46\Microsoft.Bot.Builder.Autofac.dll - True - - - $(SolutionDir)packages\Microsoft.Bot.Builder.Azure.3.16.3.40383\lib\net46\Microsoft.Bot.Builder.Azure.dll - - - $(SolutionDir)packages\Microsoft.Bot.Builder.History.3.30.0\lib\net46\Microsoft.Bot.Builder.History.dll - True - - - $(SolutionDir)packages\Microsoft.Bot.Connector.3.30.0\lib\net46\Microsoft.Bot.Connector.dll - True - - - - ..\..\..\packages\Microsoft.Data.Edm.5.8.4\lib\net40\Microsoft.Data.Edm.dll - - - ..\..\..\packages\Microsoft.Data.OData.5.8.4\lib\net40\Microsoft.Data.OData.dll - - - ..\..\..\packages\Microsoft.Data.Services.Client.5.8.4\lib\net40\Microsoft.Data.Services.Client.dll - - - $(SolutionDir)packages\Microsoft.IdentityModel.Clients.ActiveDirectory.4.4.0\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll - - - $(SolutionDir)packages\Microsoft.IdentityModel.Logging.1.1.4\lib\net451\Microsoft.IdentityModel.Logging.dll - - - $(SolutionDir)packages\Microsoft.IdentityModel.Protocol.Extensions.1.0.4.403061554\lib\net45\Microsoft.IdentityModel.Protocol.Extensions.dll - - - $(SolutionDir)packages\Microsoft.IdentityModel.Protocols.2.1.4\lib\net451\Microsoft.IdentityModel.Protocols.dll - - - $(SolutionDir)packages\Microsoft.IdentityModel.Protocols.OpenIdConnect.2.1.4\lib\net451\Microsoft.IdentityModel.Protocols.OpenIdConnect.dll - - - $(SolutionDir)packages\Microsoft.IdentityModel.Tokens.5.1.4\lib\net451\Microsoft.IdentityModel.Tokens.dll - - - $(SolutionDir)packages\Microsoft.Rest.ClientRuntime.2.3.8\lib\net452\Microsoft.Rest.ClientRuntime.dll - - - $(SolutionDir)packages\Microsoft.WindowsAzure.ConfigurationManager.3.2.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll - - - $(SolutionDir)packages\WindowsAzure.Storage.7.2.1\lib\net40\Microsoft.WindowsAzure.Storage.dll - - - $(SolutionDir)packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll - - - - - - - - - - $(SolutionDir)packages\System.IdentityModel.Tokens.Jwt.5.1.4\lib\net451\System.IdentityModel.Tokens.Jwt.dll - - - - $(SolutionDir)packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll - - - ..\..\..\packages\System.Spatial.5.8.4\lib\net40\System.Spatial.dll - - - - - - - - $(SolutionDir)packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll - - - $(SolutionDir)packages\Microsoft.AspNet.WebApi.WebHost.5.2.3\lib\net45\System.Web.Http.WebHost.dll - - - - - - - - - - Designer - - - - - - - - - - Global.asax - - - - - - - Designer - - - Web.config - - - Web.config - - - - - - - - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - true - - - true - true - - - - - - - - - True - True - 3978 - / - http://localhost:35407 - False - False - - - False - - - - - - - - - \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Global.asax b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Global.asax deleted file mode 100644 index 745e35c7cc..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Global.asax +++ /dev/null @@ -1 +0,0 @@ -<%@ Application Codebehind="Global.asax.cs" Inherits="Microsoft.BotFrameworkFunctionalTests.EchoSkillBotv3.WebApiApplication" Language="C#" %> diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Global.asax.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Global.asax.cs deleted file mode 100644 index 29c3e1e36f..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Global.asax.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Web.Http; -using Microsoft.Bot.Builder.Azure; -using Microsoft.Bot.Builder.Dialogs; -using Microsoft.Bot.Builder.Dialogs.Internals; -using Autofac; -using Microsoft.Bot.Connector; -using System.Reflection; - -namespace Microsoft.BotFrameworkFunctionalTests.EchoSkillBotv3 -{ - public class WebApiApplication : System.Web.HttpApplication - { - protected void Application_Start() - { - GlobalConfiguration.Configure(WebApiConfig.Register); - - Conversation.UpdateContainer( - builder => - { - builder.RegisterModule(new AzureModule(Assembly.GetExecutingAssembly())); - - // Bot Storage: Here we register the state storage for your bot. - // Default store: volatile in-memory store - Only for prototyping! - // We provide adapters for Azure Table, CosmosDb, SQL Azure, or you can implement your own! - // For samples and documentation, see: [https://github.com/Microsoft/BotBuilder-Azure](https://github.com/Microsoft/BotBuilder-Azure) - var store = new InMemoryDataStore(); - - // Other storage options - // var store = new TableBotDataStore("...DataStorageConnectionString..."); // requires Microsoft.BotBuilder.Azure Nuget package - // var store = new DocumentDbBotDataStore("cosmos db uri", "cosmos db key"); // requires Microsoft.BotBuilder.Azure Nuget package - - builder.Register(c => store) - .Keyed>(AzureModule.Key_DataStore) - .AsSelf() - .SingleInstance(); - }); - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Properties/AssemblyInfo.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Properties/AssemblyInfo.cs deleted file mode 100644 index 450505c46b..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("BotApplication")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("BotApplication")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2017")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("287d6db1-a34e-44db-bbf5-e1312cd4737f")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.1")] -[assembly: AssemblyFileVersion("1.0.0.1")] diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Web.Debug.config b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Web.Debug.config deleted file mode 100644 index fae9cfefa9..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Web.Debug.config +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Web.Release.config b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Web.Release.config deleted file mode 100644 index da6e960b8d..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Web.Release.config +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Web.config b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Web.config deleted file mode 100644 index e9f3490f0e..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/Web.config +++ /dev/null @@ -1,57 +0,0 @@ - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/default.htm b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/default.htm deleted file mode 100644 index 46acb6def1..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/default.htm +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - -

Echo Skill bot

- This bot demonstrates a Bot Builder V3 bot as a Skill. - - - diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/manifests/echoskillbotv3-manifest-1.0.json b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/manifests/echoskillbotv3-manifest-1.0.json deleted file mode 100644 index c45e0fe08c..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/manifests/echoskillbotv3-manifest-1.0.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "$schema": "https://schemas.botframework.com/schemas/skills/v2.1/skill-manifest.json", - "$id": "EchoSkillBotDotNetV3", - "name": "EchoSkillBotDotNetV3", - "version": "1.0", - "description": "This is a skill for echoing what the user sent to the bot (using BF V3).", - "publisherName": "Microsoft", - "privacyUrl": "https://microsoft.com/privacy", - "copyright": "Copyright (c) Microsoft Corporation. All rights reserved.", - "license": "https://github.com/microsoft/BotFramework-FunctionalTests/blob/main/LICENSE", - "tags": [ - "echo" - ], - "endpoints": [ - { - "name": "default", - "protocol": "BotFrameworkV3", - "description": "Localhost endpoint for the skill (on port 35407)", - "endpointUrl": "http://localhost:35407/api/messages", - "msAppId": "00000000-0000-0000-0000-000000000000" - } - ], - "activities": { - "EchoDotNetV3": { - "description": "Echo user responses", - "type": "message", - "name": "V3Echo" - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/packages.config b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/packages.config deleted file mode 100644 index dcb3d850a1..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot-v3/packages.config +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/Authentication/AllowedCallersClaimsValidator.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/Authentication/AllowedCallersClaimsValidator.cs deleted file mode 100644 index 0f5a4e3152..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/Authentication/AllowedCallersClaimsValidator.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Security.Claims; -using System.Threading.Tasks; -using Microsoft.Bot.Connector.Authentication; -using Microsoft.Extensions.Configuration; - -namespace Microsoft.BotFrameworkFunctionalTests.EchoSkillBot.Authentication -{ - /// - /// Sample claims validator that loads an allowed list from configuration if present - /// and checks that requests are coming from allowed parent bots. - /// - public class AllowedCallersClaimsValidator : ClaimsValidator - { - private const string ConfigKey = "AllowedCallers"; - private readonly List _allowedCallers; - - /// - /// Initializes a new instance of the class. - /// Loads the appIds for the configured callers. Only allows access to callers it has configured. - /// - /// The list of configured callers. - public AllowedCallersClaimsValidator(IConfiguration config) - { - if (config == null) - { - throw new ArgumentNullException(nameof(config)); - } - - // AllowedCallers is the setting in the appsettings.json file - // that consists of the list of parent bot IDs that are allowed to access the skill. - // To add a new parent bot, simply edit the AllowedCallers and add - // the parent bot's Microsoft app ID to the list. - // In this sample, we allow all callers if AllowedCallers contains an "*". - var section = config.GetSection(ConfigKey); - var appsList = section.Get(); - if (appsList == null) - { - throw new ArgumentNullException($"\"{ConfigKey}\" not found in configuration."); - } - - _allowedCallers = new List(appsList); - } - - /// - /// Checks that the appId claim in the skill request is in the list of callers configured for this bot. - /// - /// The list of claims to validate. - /// A task that represents the work queued to execute. - public override Task ValidateClaimsAsync(IList claims) - { - // If _allowedCallers contains an "*", we allow all callers. - if (SkillValidation.IsSkillClaim(claims) && !_allowedCallers.Contains("*")) - { - // Check that the appId claim in the skill request is in the list of callers configured for this bot. - var appId = JwtTokenValidation.GetAppIdFromClaims(claims); - if (!_allowedCallers.Contains(appId)) - { - throw new UnauthorizedAccessException($"Received a request from a bot with an app ID of \"{appId}\". To enable requests from this caller, add the app ID to your configuration file."); - } - } - - return Task.CompletedTask; - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/Bots/EchoBot.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/Bots/EchoBot.cs deleted file mode 100644 index 1e740b419c..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/Bots/EchoBot.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Schema; - -namespace Microsoft.BotFrameworkFunctionalTests.EchoSkillBot.Bots -{ - public class EchoBot : ActivityHandler - { - /// - /// Processes a message activity. - /// - /// Context for the current turn of conversation. - /// CancellationToken propagates notifications that operations should be cancelled. - /// A representing the result of the asynchronous operation. - protected override async Task OnMessageActivityAsync(ITurnContext turnContext, CancellationToken cancellationToken) - { - if (turnContext.Activity.Text.Contains("end") || turnContext.Activity.Text.Contains("stop")) - { - // Send End of conversation at the end. - await turnContext.SendActivityAsync(MessageFactory.Text($"Ending conversation from the skill..."), cancellationToken); - var endOfConversation = Activity.CreateEndOfConversationActivity(); - endOfConversation.Code = EndOfConversationCodes.CompletedSuccessfully; - await turnContext.SendActivityAsync(endOfConversation, cancellationToken); - } - else - { - await turnContext.SendActivityAsync(MessageFactory.Text($"Echo: {turnContext.Activity.Text}"), cancellationToken); - await turnContext.SendActivityAsync(MessageFactory.Text("Say \"end\" or \"stop\" and I'll end the conversation and back to the parent."), cancellationToken); - } - } - - /// - /// Processes an end of conversation activity. - /// - /// Context for the current turn of conversation. - /// CancellationToken propagates notifications that operations should be cancelled. - /// A representing the result of the asynchronous operation. - protected override Task OnEndOfConversationActivityAsync(ITurnContext turnContext, CancellationToken cancellationToken) - { - // This will be called if the host bot is ending the conversation. Sending additional messages should be - // avoided as the conversation may have been deleted. - // Perform cleanup of resources if needed. - return Task.CompletedTask; - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/Controllers/BotController.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/Controllers/BotController.cs deleted file mode 100644 index 3877bc87f3..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/Controllers/BotController.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Integration.AspNet.Core; - -namespace Microsoft.BotFrameworkFunctionalTests.EchoSkillBot.Controllers -{ - /// - /// This ASP Controller is created to handle a request. Dependency Injection will provide the Adapter and IBot implementation at runtime. - /// Multiple different IBot implementations running at different endpoints can be achieved by specifying a more specific type for the bot constructor argument. - /// - [Route("api/messages")] - [ApiController] - public class BotController : ControllerBase - { - private readonly IBotFrameworkHttpAdapter _adapter; - private readonly IBot _bot; - - /// - /// Initializes a new instance of the class. - /// - /// Adapter for the BotController. - /// Bot for the BotController. - public BotController(IBotFrameworkHttpAdapter adapter, IBot bot) - { - _adapter = adapter; - _bot = bot; - } - - /// - /// Processes an HttpPost request. - /// - /// A representing the result of the asynchronous operation. - [HttpPost] - public async Task PostAsync() - { - await _adapter.ProcessAsync(Request, Response, _bot); - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/EchoSkillBot.csproj b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/EchoSkillBot.csproj deleted file mode 100644 index 75badf2f19..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/EchoSkillBot.csproj +++ /dev/null @@ -1,25 +0,0 @@ - - - - netcoreapp3.1 - latest - Microsoft.BotFrameworkFunctionalTests.EchoSkillBot - Microsoft.BotFrameworkFunctionalTests.EchoSkillBot - - - - DEBUG;TRACE - - - - - - - - - - Always - - - - diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/Program.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/Program.cs deleted file mode 100644 index 5a43557181..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/Program.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Hosting; - -namespace Microsoft.BotFrameworkFunctionalTests.EchoSkillBot -{ - public class Program - { - /// - /// The entry point of the application. - /// - /// The command line args. - public static void Main(string[] args) - { - CreateHostBuilder(args).Build().Run(); - } - - /// - /// Creates a new instance of the class with pre-configured defaults. - /// - /// The command line args. - /// The initialized . - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup(); - }); - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/Properties/launchSettings.json b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/Properties/launchSettings.json deleted file mode 100644 index 547cc9c69d..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/Properties/launchSettings.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:35400/", - "sslPort": 0 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": false, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "EchoSkillBotDotNet": { - "commandName": "Project", - "launchBrowser": true, - "applicationUrl": "http://localhost:35400/", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/SkillAdapterWithErrorHandler.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/SkillAdapterWithErrorHandler.cs deleted file mode 100644 index 340e8a68ea..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/SkillAdapterWithErrorHandler.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Integration.AspNet.Core; -using Microsoft.Bot.Builder.TraceExtensions; -using Microsoft.Bot.Connector.Authentication; -using Microsoft.Bot.Schema; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Logging; - -namespace Microsoft.BotFrameworkFunctionalTests.EchoSkillBot -{ - public class SkillAdapterWithErrorHandler : BotFrameworkHttpAdapter - { - /// - /// Initializes a new instance of the class to handle errors. - /// - /// The configuration properties. - /// An implementation of the bots credentials. - /// The configuration setting for the authentication. - /// An instance of a logger. - public SkillAdapterWithErrorHandler(IConfiguration configuration, ICredentialProvider credentialProvider, AuthenticationConfiguration authConfig, ILogger logger) - : base(configuration, credentialProvider, authConfig, logger: logger) - { - OnTurnError = async (turnContext, exception) => - { - try - { - // Log any leaked exception from the application. - logger.LogError(exception, $"[OnTurnError] unhandled error : {exception.Message}"); - - // Send a message to the user - var errorMessageText = "The skill encountered an error or bug."; - var errorMessage = MessageFactory.Text(errorMessageText + Environment.NewLine + exception, errorMessageText, InputHints.IgnoringInput); - errorMessage.Value = exception; - await turnContext.SendActivityAsync(errorMessage); - - errorMessageText = "To continue to run this bot, please fix the bot source code."; - errorMessage = MessageFactory.Text(errorMessageText, errorMessageText, InputHints.ExpectingInput); - await turnContext.SendActivityAsync(errorMessage); - - // Send a trace activity, which will be displayed in the Bot Framework Emulator - // Note: we return the entire exception in the value property to help the developer, this should not be done in prod. - await turnContext.TraceActivityAsync("OnTurnError Trace", exception.ToString(), "https://www.botframework.com/schemas/error", "TurnError"); - - // Send and EndOfConversation activity to the skill caller with the error to end the conversation - // and let the caller decide what to do. - var endOfConversation = Activity.CreateEndOfConversationActivity(); - endOfConversation.Code = "SkillError"; - endOfConversation.Text = exception.Message; - await turnContext.SendActivityAsync(endOfConversation); - } - catch (Exception ex) - { - logger.LogError(ex, $"Exception caught in SkillAdapterWithErrorHandler : {ex}"); - } - }; - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/Startup.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/Startup.cs deleted file mode 100644 index 9af686442b..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/Startup.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.BotFramework; -using Microsoft.Bot.Builder.Integration.AspNet.Core; -using Microsoft.Bot.Connector.Authentication; -using Microsoft.BotFrameworkFunctionalTests.EchoSkillBot.Bots; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; - -namespace Microsoft.BotFrameworkFunctionalTests.EchoSkillBot -{ - public class Startup - { - public Startup(IConfiguration config) - { - Configuration = config; - } - - public IConfiguration Configuration { get; } - - /// - /// This method gets called by the runtime. Use this method to add services to the container. - /// - /// Method to add services to the container. - public void ConfigureServices(IServiceCollection services) - { - services.AddControllers().AddNewtonsoftJson(); - - // Configure credentials - services.AddSingleton(); - - // Register AuthConfiguration to enable custom claim validation. - services.AddSingleton(sp => new AuthenticationConfiguration { ClaimsValidator = new Authentication.AllowedCallersClaimsValidator(sp.GetService()) }); - - // Create the Bot Framework Adapter with error handling enabled. - services.AddSingleton(); - - // Create the bot as a transient. In this case the ASP Controller is expecting an IBot. - services.AddTransient(); - - if (!string.IsNullOrEmpty(Configuration["ChannelService"])) - { - // Register a ConfigurationChannelProvider -- this is only for Azure Gov. - services.AddSingleton(); - } - } - - /// - /// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - /// - /// The application request pipeline to be configured. - /// The web hosting environment. - public void Configure(IApplicationBuilder app, IWebHostEnvironment env) - { - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - } - - app.UseDefaultFiles() - .UseStaticFiles() - .UseRouting() - .UseAuthorization() - .UseEndpoints(endpoints => - { - endpoints.MapControllers(); - }); - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/appsettings.json b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/appsettings.json deleted file mode 100644 index c61cdb4d79..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/appsettings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "MicrosoftAppId": "", - "MicrosoftAppPassword": "", - "ChannelService": "", - // This is a comma separate list with the App IDs that will have access to the skill. - // This setting is used in AllowedCallersClaimsValidator. - // Examples: - // [ "*" ] allows all callers. - // [ "AppId1", "AppId2" ] only allows access to parent bots with "AppId1" and "AppId2". - "AllowedCallers": [ "*" ] -} \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/wwwroot/default.htm b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/wwwroot/default.htm deleted file mode 100644 index 416365e6bc..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/wwwroot/default.htm +++ /dev/null @@ -1,420 +0,0 @@ - - - - - - - EchoSkillBotDotNet - - - - - -
-
-
-
EchoSkillBotDotNet Bot
-
-
-
-
-
Your bot is ready!
-
You can test your bot in the Bot Framework Emulator
- by connecting to http://localhost:3978/api/messages.
- -
Visit Azure - Bot Service to register your bot and add it to
- various channels. The bot's endpoint URL typically looks - like this:
-
https://your_bots_hostname/api/messages
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/wwwroot/manifests/echoskillbot-manifest-1.0.json b/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/wwwroot/manifests/echoskillbot-manifest-1.0.json deleted file mode 100644 index 974de692e4..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/EchoSkillBot/wwwroot/manifests/echoskillbot-manifest-1.0.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "https://schemas.botframework.com/schemas/skills/v2.1/skill-manifest.json", - "$id": "EchoSkillBotDotNet", - "name": "EchoSkillBotDotNet", - "version": "1.0", - "description": "This is a skill for echoing what the user sent to the bot (using .netcore 3.1).", - "publisherName": "Microsoft", - "privacyUrl": "https://microsoft.com/privacy", - "copyright": "Copyright (c) Microsoft Corporation. All rights reserved.", - "license": "https://github.com/microsoft/BotFramework-FunctionalTests/blob/main/LICENSE", - "tags": [ - "echo" - ], - "endpoints": [ - { - "name": "default", - "protocol": "BotFrameworkV3", - "description": "Localhost endpoint for the skill (on port 35400)", - "endpointUrl": "http://localhost:35400/api/messages", - "msAppId": "00000000-0000-0000-0000-000000000000" - } - ] -} \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Authentication/AllowedCallersClaimsValidator.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Authentication/AllowedCallersClaimsValidator.cs deleted file mode 100644 index cc811d5d82..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Authentication/AllowedCallersClaimsValidator.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Security.Claims; -using System.Threading.Tasks; -using Microsoft.Bot.Connector.Authentication; -using Microsoft.Extensions.Configuration; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Authentication -{ - /// - /// Sample claims validator that loads an allowed list from configuration if present - /// and checks that requests are coming from allowed parent bots. - /// - public class AllowedCallersClaimsValidator : ClaimsValidator - { - private const string ConfigKey = "AllowedCallers"; - private readonly List _allowedCallers; - - public AllowedCallersClaimsValidator(IConfiguration config) - { - if (config == null) - { - throw new ArgumentNullException(nameof(config)); - } - - // AllowedCallers is the setting in the appsettings.json file - // that consists of the list of parent bot IDs that are allowed to access the skill. - // To add a new parent bot, simply edit the AllowedCallers and add - // the parent bot's Microsoft app ID to the list. - // In this sample, we allow all callers if AllowedCallers contains an "*". - var section = config.GetSection(ConfigKey); - var appsList = section.Get(); - if (appsList == null) - { - throw new ArgumentNullException($"\"{ConfigKey}\" not found in configuration."); - } - - _allowedCallers = new List(appsList); - } - - public override Task ValidateClaimsAsync(IList claims) - { - // If _allowedCallers contains an "*", we allow all callers. - if (SkillValidation.IsSkillClaim(claims) && !_allowedCallers.Contains("*")) - { - // Check that the appId claim in the skill request is in the list of callers configured for this bot. - var appId = JwtTokenValidation.GetAppIdFromClaims(claims); - if (!_allowedCallers.Contains(appId)) - { - throw new UnauthorizedAccessException($"Received a request from a bot with an app ID of \"{appId}\". To enable requests from this caller, add the app ID to your configuration file."); - } - } - - return Task.CompletedTask; - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Bots/SkillBot.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Bots/SkillBot.cs deleted file mode 100644 index ffad563104..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Bots/SkillBot.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Dialogs; -using Microsoft.Bot.Schema; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Bots -{ - public class SkillBot : ActivityHandler - where T : Dialog - { - private readonly ConversationState _conversationState; - private readonly Dialog _mainDialog; - private readonly Uri _serverUrl; - - public SkillBot(ConversationState conversationState, T mainDialog, IHttpContextAccessor httpContextAccessor) - { - _conversationState = conversationState; - _mainDialog = mainDialog; - _serverUrl = new Uri($"{httpContextAccessor.HttpContext.Request.Scheme}://{httpContextAccessor.HttpContext.Request.Host.Value}"); - } - - public override async Task OnTurnAsync(ITurnContext turnContext, CancellationToken cancellationToken = default) - { - if (turnContext.Activity.Type == ActivityTypes.ConversationUpdate) - { - // Let the base class handle the activity (this will trigger OnMembersAddedAsync). - await base.OnTurnAsync(turnContext, cancellationToken); - } - else - { - // Run the Dialog with the Activity. - await _mainDialog.RunAsync(turnContext, _conversationState.CreateProperty("DialogState"), cancellationToken); - } - - // Save any state changes that might have occurred during the turn. - await _conversationState.SaveChangesAsync(turnContext, false, cancellationToken); - } - - protected override async Task OnMembersAddedAsync(IList membersAdded, ITurnContext turnContext, CancellationToken cancellationToken) - { - foreach (var member in membersAdded) - { - if (member.Id != turnContext.Activity.Recipient.Id) - { - var activity = MessageFactory.Text("Welcome to the waterfall skill bot. \n\nThis is a skill, you will need to call it from another bot to use it."); - activity.Speak = "Welcome to the waterfall skill bot. This is a skill, you will need to call it from another bot to use it."; - await turnContext.SendActivityAsync(activity, cancellationToken); - - await turnContext.SendActivityAsync($"You can check the skill manifest to see what it supports here: {_serverUrl}manifests/waterfallskillbot-manifest-1.0.json", cancellationToken: cancellationToken); - } - } - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Controllers/BotController.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Controllers/BotController.cs deleted file mode 100644 index eff768c82a..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Controllers/BotController.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Integration.AspNet.Core; -using Microsoft.Extensions.Logging; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Controllers -{ - // This ASP Controller is created to handle a request. Dependency Injection will provide the Adapter and IBot - // implementation at runtime. Multiple different IBot implementations running at different endpoints can be - // achieved by specifying a more specific type for the bot constructor argument. - [ApiController] - public class BotController : ControllerBase - { - private readonly IBotFrameworkHttpAdapter _adapter; - private readonly IBot _bot; - private readonly ILogger _logger; - - public BotController(BotFrameworkHttpAdapter adapter, IBot bot, ILogger logger) - { - _adapter = adapter; - _bot = bot; - _logger = logger; - } - - [Route("api/messages")] - [HttpGet] - [HttpPost] - public async Task PostAsync() - { - try - { - // Delegate the processing of the HTTP POST to the adapter. - // The adapter will invoke the bot. - await _adapter.ProcessAsync(Request, Response, _bot); - } - catch (Exception ex) - { - _logger.LogError(ex, "Error processing request"); - throw; - } - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Controllers/CardsController.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Controllers/CardsController.cs deleted file mode 100644 index 817c197758..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Controllers/CardsController.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.IO; -using Microsoft.AspNetCore.Mvc; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Controllers -{ - // This ASP Controller is created to handle a request. Dependency Injection will provide the Adapter and IBot - // implementation at runtime. Multiple different IBot implementations running at different endpoints can be - // achieved by specifying a more specific type for the bot constructor argument. - [ApiController] - public class CardsController : ControllerBase - { - private static readonly string Music = "music.mp3"; - - [Route("api/music")] - [HttpGet] - public ActionResult ReturnFile() - { - var filename = Music; - var filePath = Path.Combine(Directory.GetCurrentDirectory(), "Dialogs/Cards/Files", filename); - var fileData = System.IO.File.ReadAllBytes(filePath); - - return File(fileData, "audio/mp3"); - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Controllers/ProactiveController.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Controllers/ProactiveController.cs deleted file mode 100644 index ae96c51bbb..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Controllers/ProactiveController.cs +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Concurrent; -using System.Net; -using System.Security.Claims; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Dialogs; -using Microsoft.Bot.Builder.Integration.AspNet.Core; -using Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Dialogs; -using Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Dialogs.Proactive; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Controllers -{ - [Route("api/notify")] - [ApiController] - public class ProactiveController : ControllerBase - { - private readonly IBotFrameworkHttpAdapter _adapter; - private readonly ConcurrentDictionary _continuationParametersStore; - private readonly ConversationState _conversationState; - private readonly ActivityRouterDialog _mainDialog; - - public ProactiveController(ConversationState conversationState, ActivityRouterDialog mainDialog, BotFrameworkHttpAdapter adapter, ConcurrentDictionary continuationParametersStore) - { - _conversationState = conversationState; - _adapter = adapter; - _continuationParametersStore = continuationParametersStore; - _mainDialog = mainDialog; - } - - // Note: in production scenarios, this controller should be secured. - public async Task Get(string user) - { - _continuationParametersStore.TryGetValue(user, out var continuationParameters); - - if (continuationParameters == null) - { - // Let the caller know a proactive messages have been sent - return new ContentResult - { - Content = $"

No messages sent


There are no conversations registered to receive proactive messages for {user}.", - ContentType = "text/html", - StatusCode = (int)HttpStatusCode.OK, - }; - } - - Exception exception = null; - try - { - async Task ContinuationBotCallback(ITurnContext context, CancellationToken cancellationToken) - { - await context.SendActivityAsync($"Got proactive message for user: {user}", cancellationToken: cancellationToken); - - // If we didn't have dialogs we could remove the code below, but we want to continue the dialog to clear the - // dialog stack. - // Run the main dialog to continue WaitForProactiveDialog and send an EndOfConversation when that one is done. - // ContinueDialogAsync in WaitForProactiveDialog will get a ContinueConversation event when this is called. - await _mainDialog.RunAsync(context, _conversationState.CreateProperty("DialogState"), cancellationToken); - - // Save any state changes so the dialog stack is persisted. - await _conversationState.SaveChangesAsync(context, false, cancellationToken); - } - - // Continue the conversation with the proactive message - await ((BotFrameworkAdapter)_adapter).ContinueConversationAsync((ClaimsIdentity)continuationParameters.ClaimsIdentity, continuationParameters.ConversationReference, continuationParameters.OAuthScope, ContinuationBotCallback, default); - } - catch (Exception ex) - { - exception = ex; - } - - // Let the caller know a proactive messages have been sent - return new ContentResult - { - Content = $"

Proactive messages have been sent


Timestamp: {DateTime.Now}
Exception: {exception}", - ContentType = "text/html", - StatusCode = (int)HttpStatusCode.OK, - }; - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Controllers/SkillController.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Controllers/SkillController.cs deleted file mode 100644 index ea90b07c02..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Controllers/SkillController.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Integration.AspNet.Core; -using Microsoft.Bot.Builder.Skills; -using Microsoft.Bot.Schema; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Controllers -{ - /// - /// A controller that handles skill replies to the bot. - /// This example uses the that is registered as a in startup.cs. - /// - [ApiController] - [Route("api/skills")] - public class SkillController : ChannelServiceController - { - public SkillController(ChannelServiceHandler handler) - : base(handler) - { - } - - public override Task ReplyToActivityAsync(string conversationId, string activityId, Activity activity) - { - try - { - return base.ReplyToActivityAsync(conversationId, activityId, activity); - } - catch (Exception ex) - { - Console.WriteLine(ex); - throw; - } - } - - public override Task SendToConversationAsync(string conversationId, Activity activity) - { - try - { - return base.SendToConversationAsync(conversationId, activity); - } - catch (Exception ex) - { - Console.WriteLine(ex); - throw; - } - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/ActivityRouterDialog.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/ActivityRouterDialog.cs deleted file mode 100644 index 11acef467c..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/ActivityRouterDialog.cs +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Concurrent; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Dialogs; -using Microsoft.Bot.Builder.Integration.AspNet.Core.Skills; -using Microsoft.Bot.Builder.Skills; -using Microsoft.Bot.Builder.TraceExtensions; -using Microsoft.Bot.Connector.Authentication; -using Microsoft.Bot.Schema; -using Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Dialogs.Auth; -using Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Dialogs.Cards; -using Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Dialogs.Delete; -using Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Dialogs.FileUpload; -using Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Dialogs.MessageWithAttachment; -using Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Dialogs.Proactive; -using Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Dialogs.Sso; -using Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Dialogs.Update; -using Microsoft.Extensions.Configuration; -using Newtonsoft.Json; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Dialogs -{ - /// - /// A root dialog that can route activities sent to the skill to different sub-dialogs. - /// - public class ActivityRouterDialog : ComponentDialog - { - private static readonly string _echoSkill = "EchoSkill"; - - public ActivityRouterDialog(IConfiguration configuration, IHttpContextAccessor httpContextAccessor, ConversationState conversationState, SkillConversationIdFactoryBase conversationIdFactory, SkillHttpClient skillClient, ConcurrentDictionary continuationParametersStore) - : base(nameof(ActivityRouterDialog)) - { - AddDialog(new CardDialog(httpContextAccessor)); - AddDialog(new MessageWithAttachmentDialog(new Uri($"{httpContextAccessor.HttpContext.Request.Scheme}://{httpContextAccessor.HttpContext.Request.Host.Value}"))); - AddDialog(new WaitForProactiveDialog(httpContextAccessor, continuationParametersStore)); - AddDialog(new AuthDialog(configuration)); - AddDialog(new SsoSkillDialog(configuration)); - AddDialog(new FileUploadDialog()); - AddDialog(new DeleteDialog()); - AddDialog(new UpdateDialog()); - - AddDialog(CreateEchoSkillDialog(conversationState, conversationIdFactory, skillClient, configuration)); - - AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[] { ProcessActivityAsync })); - - // The initial child Dialog to run. - InitialDialogId = nameof(WaterfallDialog); - } - - private static SkillDialog CreateEchoSkillDialog(ConversationState conversationState, SkillConversationIdFactoryBase conversationIdFactory, SkillHttpClient skillClient, IConfiguration configuration) - { - var botId = configuration.GetSection(MicrosoftAppCredentials.MicrosoftAppIdKey)?.Value; - - var skillHostEndpoint = configuration.GetSection("SkillHostEndpoint")?.Value; - if (string.IsNullOrWhiteSpace(skillHostEndpoint)) - { - throw new ArgumentException("SkillHostEndpoint is not in configuration"); - } - - var skillInfo = configuration.GetSection("EchoSkillInfo").Get() ?? throw new ArgumentException("EchoSkillInfo is not set in configuration"); - - var skillDialogOptions = new SkillDialogOptions - { - BotId = botId, - ConversationIdFactory = conversationIdFactory, - SkillClient = skillClient, - SkillHostEndpoint = new Uri(skillHostEndpoint), - ConversationState = conversationState, - Skill = skillInfo - }; - var echoSkillDialog = new SkillDialog(skillDialogOptions); - - echoSkillDialog.Id = _echoSkill; - return echoSkillDialog; - } - - private async Task ProcessActivityAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - // A skill can send trace activities, if needed. - await stepContext.Context.TraceActivityAsync($"{GetType().Name}.ProcessActivityAsync()", label: $"Got ActivityType: {stepContext.Context.Activity.Type}", cancellationToken: cancellationToken); - - switch (stepContext.Context.Activity.Type) - { - case ActivityTypes.Event: - return await OnEventActivityAsync(stepContext, cancellationToken); - - default: - // We didn't get an activity type we can handle. - await stepContext.Context.SendActivityAsync(MessageFactory.Text($"Unrecognized ActivityType: \"{stepContext.Context.Activity.Type}\".", inputHint: InputHints.IgnoringInput), cancellationToken); - return new DialogTurnResult(DialogTurnStatus.Complete); - } - } - - // This method performs different tasks based on the event name. - private async Task OnEventActivityAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - var activity = stepContext.Context.Activity; - await stepContext.Context.TraceActivityAsync($"{GetType().Name}.OnEventActivityAsync()", label: $"Name: {activity.Name}. Value: {GetObjectAsJsonString(activity.Value)}", cancellationToken: cancellationToken); - - // Resolve what to execute based on the event name. - switch (activity.Name) - { - case "Cards": - return await stepContext.BeginDialogAsync(FindDialog(nameof(CardDialog)).Id, cancellationToken: cancellationToken); - - case "Proactive": - return await stepContext.BeginDialogAsync(FindDialog(nameof(WaitForProactiveDialog)).Id, cancellationToken: cancellationToken); - - case "MessageWithAttachment": - return await stepContext.BeginDialogAsync(FindDialog(nameof(MessageWithAttachmentDialog)).Id, cancellationToken: cancellationToken); - - case "Auth": - return await stepContext.BeginDialogAsync(FindDialog(nameof(AuthDialog)).Id, cancellationToken: cancellationToken); - - case "Sso": - return await stepContext.BeginDialogAsync(FindDialog(nameof(SsoSkillDialog)).Id, cancellationToken: cancellationToken); - - case "FileUpload": - return await stepContext.BeginDialogAsync(FindDialog(nameof(FileUploadDialog)).Id, cancellationToken: cancellationToken); - - case "Echo": - // Start the EchoSkillBot - var messageActivity = MessageFactory.Text("I'm the echo skill bot"); - messageActivity.DeliveryMode = stepContext.Context.Activity.DeliveryMode; - return await stepContext.BeginDialogAsync(FindDialog(_echoSkill).Id, new BeginSkillDialogOptions { Activity = messageActivity }, cancellationToken); - - case "Delete": - return await stepContext.BeginDialogAsync(FindDialog(nameof(DeleteDialog)).Id, cancellationToken: cancellationToken); - - case "Update": - return await stepContext.BeginDialogAsync(FindDialog(nameof(UpdateDialog)).Id, cancellationToken: cancellationToken); - - default: - // We didn't get an event name we can handle. - await stepContext.Context.SendActivityAsync(MessageFactory.Text($"Unrecognized EventName: \"{activity.Name}\".", inputHint: InputHints.IgnoringInput), cancellationToken); - return new DialogTurnResult(DialogTurnStatus.Complete); - } - } - - private string GetObjectAsJsonString(object value) => value == null ? string.Empty : JsonConvert.SerializeObject(value); - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Auth/AuthDialog.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Auth/AuthDialog.cs deleted file mode 100644 index 39d26e238d..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Auth/AuthDialog.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Dialogs; -using Microsoft.Bot.Schema; -using Microsoft.Extensions.Configuration; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Dialogs.Auth -{ - public class AuthDialog : ComponentDialog - { - private readonly string _connectionName; - - public AuthDialog(IConfiguration configuration) - : base(nameof(AuthDialog)) - { - _connectionName = configuration["ConnectionName"]; - - // This confirmation dialog should be removed once https://github.com/microsoft/BotFramework-FunctionalTests/issues/299 is resolved (and this class should look like the class in the issue) - AddDialog(new ConfirmPrompt(nameof(ConfirmPrompt))); - AddDialog(new OAuthPrompt( - nameof(OAuthPrompt), - new OAuthPromptSettings - { - ConnectionName = _connectionName, - Text = $"Please Sign In to connection: '{_connectionName}'", - Title = "Sign In", - Timeout = 300000 // User has 5 minutes to login (1000 * 60 * 5) - })); - - AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[] { PromptStepAsync, LoginStepAsync, DisplayTokenAsync })); - - // The initial child Dialog to run. - InitialDialogId = nameof(WaterfallDialog); - } - - private async Task PromptStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - return await stepContext.BeginDialogAsync(nameof(OAuthPrompt), null, cancellationToken); - } - - private async Task LoginStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - // Get the token from the previous step. - var tokenResponse = (TokenResponse)stepContext.Result; - if (tokenResponse != null) - { - stepContext.Values["Token"] = tokenResponse.Token; - - // Show the token - var loggedInMessage = "You are now logged in."; - await stepContext.Context.SendActivityAsync(MessageFactory.Text(loggedInMessage, loggedInMessage, InputHints.IgnoringInput), cancellationToken); - - return await stepContext.PromptAsync(nameof(ConfirmPrompt), new PromptOptions { Prompt = MessageFactory.Text("Would you like to view your token?") }, cancellationToken); - } - - var tryAgainMessage = "Login was not successful please try again."; - await stepContext.Context.SendActivityAsync(MessageFactory.Text(tryAgainMessage, tryAgainMessage, InputHints.IgnoringInput), cancellationToken); - return await stepContext.ReplaceDialogAsync(InitialDialogId, cancellationToken: cancellationToken); - } - - private async Task DisplayTokenAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - var result = (bool)stepContext.Result; - if (result) - { - var showTokenMessage = "Here is your token:"; - await stepContext.Context.SendActivityAsync(MessageFactory.Text($"{showTokenMessage} {stepContext.Values["Token"]}", showTokenMessage, InputHints.IgnoringInput), cancellationToken); - } - - // Sign out - var botAdapter = (BotFrameworkAdapter)stepContext.Context.Adapter; - await botAdapter.SignOutUserAsync(stepContext.Context, _connectionName, null, cancellationToken); - var signOutMessage = "I have signed you out."; - await stepContext.Context.SendActivityAsync(MessageFactory.Text(signOutMessage, signOutMessage, inputHint: InputHints.IgnoringInput), cancellationToken); - - return await stepContext.EndDialogAsync(cancellationToken: cancellationToken); - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Cards/AdaptiveCardExtensions.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Cards/AdaptiveCardExtensions.cs deleted file mode 100644 index a0cb2216a6..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Cards/AdaptiveCardExtensions.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using AdaptiveCards; -using Microsoft.Bot.Schema; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Dialogs.Cards -{ - public static class AdaptiveCardExtensions - { - /// - /// Creates a new attachment from AdaptiveCard. - /// - /// The instance of AdaptiveCard. - /// The generated attachment. - public static Attachment ToAttachment(this AdaptiveCard card) - { - return new Attachment - { - Content = card, - ContentType = AdaptiveCard.ContentType, - }; - } - - /// - /// Wrap BotBuilder action into AdaptiveCard submit action. - /// - /// The instance of adaptive card submit action. - /// Target action to be adapted. - public static void RepresentAsBotBuilderAction(this AdaptiveSubmitAction action, CardAction targetAction) - { - if (action == null) - { - throw new ArgumentNullException(nameof(action)); - } - - if (targetAction == null) - { - throw new ArgumentNullException(nameof(targetAction)); - } - - var wrappedAction = new CardAction - { - Type = targetAction.Type, - Value = targetAction.Value, - Text = targetAction.Text, - DisplayText = targetAction.DisplayText, - }; - - var serializerSettings = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }; - - var jsonStr = action.DataJson ?? "{}"; - JToken dataJson = JObject.Parse(jsonStr); - dataJson["msteams"] = JObject.FromObject(wrappedAction, JsonSerializer.Create(serializerSettings)); - - action.Title = targetAction.Title; - action.DataJson = dataJson.ToString(); - } - - /// - /// Wrap BotBuilder action into AdaptiveCard submit action. - /// - /// Target bot builder action to be adapted. - /// The wrapped adaptive card submit action. - public static AdaptiveSubmitAction ToAdaptiveCardAction(this CardAction action) - { - var adaptiveCardAction = new AdaptiveSubmitAction(); - adaptiveCardAction.RepresentAsBotBuilderAction(action); - return adaptiveCardAction; - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Cards/CardDialog.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Cards/CardDialog.cs deleted file mode 100644 index 8ded48ff2c..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Cards/CardDialog.cs +++ /dev/null @@ -1,340 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using AdaptiveCards; -using Microsoft.AspNetCore.Http; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Dialogs; -using Microsoft.Bot.Builder.Dialogs.Choices; -using Microsoft.Bot.Schema; -using Microsoft.Bot.Schema.Teams; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Dialogs.Cards -{ - public class CardDialog : ComponentDialog - { - // for file upload - private static readonly string TeamsLogoFileName = "teams-logo.png"; - - // for video card - private static readonly string CorgiOnCarouselVideo = "https://www.youtube.com/watch?v=LvqzubPZjHE"; - - // for animation card - private static readonly string MindBlownGif = "https://media3.giphy.com/media/xT0xeJpnrWC4XWblEk/giphy.gif?cid=ecf05e47mye7k75sup6tcmadoom8p1q8u03a7g2p3f76upp9&rid=giphy.gif"; - - // list of cards that exist - private static readonly List _cardOptions = Enum.GetValues(typeof(CardOptions)).Cast().ToList(); - - private readonly Uri _serverUrl; - - public CardDialog(IHttpContextAccessor httpContextAccessor) - : base(nameof(CardDialog)) - { - _serverUrl = new Uri($"{httpContextAccessor.HttpContext.Request.Scheme}://{httpContextAccessor.HttpContext.Request.Host.Value}"); - - AddDialog(new ChoicePrompt("CardPrompt", CardPromptValidatorAsync)); - AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[] { SelectCardAsync, DisplayCardAsync })); - - InitialDialogId = nameof(WaterfallDialog); - } - - private static CardOptions ParseEnum(string card) - { - return (CardOptions)Enum.Parse(typeof(CardOptions), card, true); - } - - private static HeroCard MakeUpdatedHeroCard(WaterfallStepContext stepContext) - { - var heroCard = new HeroCard - { - Title = "Newly updated card.", - Buttons = new List() - }; - - var data = stepContext.Context.Activity.Value as JObject; - data = JObject.FromObject(data); - data["count"] = data["count"].Value() + 1; - heroCard.Text = $"Update count - {data["count"].Value()}"; - heroCard.Title = "Newly updated card"; - - heroCard.Buttons.Add(new CardAction - { - Type = ActionTypes.MessageBack, - Title = "Update Card", - Text = "UpdateCardAction", - Value = data - }); - - return heroCard; - } - - private async Task SelectCardAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - // Create the PromptOptions from the skill configuration which contain the list of configured skills. - var messageText = "What card do you want?"; - var repromptMessageText = "This message will be created in the validation code"; - var options = new PromptOptions - { - Prompt = MessageFactory.Text(messageText, messageText, InputHints.ExpectingInput), - RetryPrompt = MessageFactory.Text(repromptMessageText, repromptMessageText, InputHints.ExpectingInput), - Choices = _cardOptions.Select(card => new Choice(card.ToString())).ToList(), - Style = ListStyle.List - }; - - // Ask the user to enter their name. - return await stepContext.PromptAsync("CardPrompt", options, cancellationToken); - } - - private async Task DisplayCardAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - if (stepContext.Context.Activity.Value != null) - { - await HandleSpecialActivity(stepContext, cancellationToken); - } - else - { - // Checks to see if the activity is an adaptive card update or a bot action respose - var card = ((FoundChoice)stepContext.Result).Value.ToLowerInvariant(); - var cardType = ParseEnum(card); - - if (ChannelSupportedCards.IsCardSupported(stepContext.Context.Activity.ChannelId, cardType)) - { - switch (cardType) - { - case CardOptions.AdaptiveCardBotAction: - await stepContext.Context.SendActivityAsync(MessageFactory.Attachment(MakeAdaptiveCard("botaction").ToAttachment()), cancellationToken); - break; - case CardOptions.AdaptiveCardTeamsTaskModule: - await stepContext.Context.SendActivityAsync(MessageFactory.Attachment(MakeAdaptiveCard("taskmodule").ToAttachment()), cancellationToken); - break; - case CardOptions.AdaptiveCardSubmitAction: - await stepContext.Context.SendActivityAsync(MessageFactory.Attachment(MakeAdaptiveCard("submitaction").ToAttachment()), cancellationToken); - break; - case CardOptions.Hero: - await stepContext.Context.SendActivityAsync(MessageFactory.Attachment(CardSampleHelper.CreateHeroCard().ToAttachment()), cancellationToken).ConfigureAwait(false); - break; - case CardOptions.Thumbnail: - await stepContext.Context.SendActivityAsync(MessageFactory.Attachment(CardSampleHelper.CreateThumbnailCard().ToAttachment()), cancellationToken).ConfigureAwait(false); - break; - case CardOptions.Receipt: - await stepContext.Context.SendActivityAsync(MessageFactory.Attachment(CardSampleHelper.CreateReceiptCard().ToAttachment()), cancellationToken).ConfigureAwait(false); - break; - case CardOptions.Signin: - await stepContext.Context.SendActivityAsync(MessageFactory.Attachment(CardSampleHelper.CreateSigninCard().ToAttachment()), cancellationToken).ConfigureAwait(false); - break; - case CardOptions.Carousel: - // NOTE: if cards are NOT the same height in a carousel, Teams will instead display as AttachmentLayoutTypes.List - await stepContext.Context.SendActivityAsync( - MessageFactory.Carousel(new[] - { - CardSampleHelper.CreateHeroCard().ToAttachment(), - CardSampleHelper.CreateHeroCard().ToAttachment(), - CardSampleHelper.CreateHeroCard().ToAttachment() - }), - cancellationToken).ConfigureAwait(false); - break; - case CardOptions.List: - // NOTE: MessageFactory.Attachment with multiple attachments will default to AttachmentLayoutTypes.List - await stepContext.Context.SendActivityAsync( - MessageFactory.Attachment(new[] - { - CardSampleHelper.CreateHeroCard().ToAttachment(), - CardSampleHelper.CreateHeroCard().ToAttachment(), - CardSampleHelper.CreateHeroCard().ToAttachment() - }), - cancellationToken).ConfigureAwait(false); - break; - case CardOptions.O365: - - await stepContext.Context.SendActivityAsync(MessageFactory.Attachment(MakeO365CardAttachmentAsync()), cancellationToken).ConfigureAwait(false); - break; - case CardOptions.TeamsFileConsent: - await stepContext.Context.SendActivityAsync(MessageFactory.Attachment(MakeTeamsFileConsentCard()), cancellationToken); - break; - case CardOptions.Animation: - await stepContext.Context.SendActivityAsync(MessageFactory.Attachment(MakeAnimationCard().ToAttachment()), cancellationToken); - break; - case CardOptions.Audio: - await stepContext.Context.SendActivityAsync(MessageFactory.Attachment(MakeAudioCard().ToAttachment()), cancellationToken); - break; - case CardOptions.Video: - await stepContext.Context.SendActivityAsync(MessageFactory.Attachment(MakeVideoCard().ToAttachment()), cancellationToken); - break; - case CardOptions.AdaptiveUpdate: - await stepContext.Context.SendActivityAsync(MessageFactory.Attachment(MakeUpdateAdaptiveCard().ToAttachment()), cancellationToken); - break; - case CardOptions.End: - return new DialogTurnResult(DialogTurnStatus.Complete); - } - } - else - { - await stepContext.Context.SendActivityAsync(MessageFactory.Text($"{cardType} cards are not supported in the {stepContext.Context.Activity.ChannelId} channel."), cancellationToken); - } - } - - return await stepContext.ReplaceDialogAsync(InitialDialogId, "What card would you want?", cancellationToken); - } - - private async Task HandleSpecialActivity(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - if (stepContext.Context.Activity.Text == null) - { - await stepContext.Context.SendActivityAsync(MessageFactory.Text($"I received an activity with this data in the value field {stepContext.Context.Activity.Value}"), cancellationToken); - } - else - { - if (stepContext.Context.Activity.Text.ToLowerInvariant().Contains("update")) - { - if (stepContext.Context.Activity.ReplyToId == null) - { - await stepContext.Context.SendActivityAsync(MessageFactory.Text($"Update activity is not supported in the {stepContext.Context.Activity.ChannelId} channel."), cancellationToken); - } - else - { - var heroCard = MakeUpdatedHeroCard(stepContext); - - var activity = MessageFactory.Attachment(heroCard.ToAttachment()); - activity.Id = stepContext.Context.Activity.ReplyToId; - await stepContext.Context.UpdateActivityAsync(activity, cancellationToken); - } - } - else - { - await stepContext.Context.SendActivityAsync(MessageFactory.Text($"I received an activity with this data in the text field {stepContext.Context.Activity.Text} and this data in the value field {stepContext.Context.Activity.Value}"), cancellationToken); - } - } - } - - private async Task CardPromptValidatorAsync(PromptValidatorContext promptContext, CancellationToken cancellationToken) - { - if (!promptContext.Recognized.Succeeded) - { - // This checks to see if this response is the user clicking the update button on the card - if (promptContext.Context.Activity.Value != null) - { - return await Task.FromResult(true); - } - - if (promptContext.Context.Activity.Attachments != null) - { - return await Task.FromResult(true); - } - - // Render the activity so we can assert in tests. - // We may need to simplify the json if it gets too complicated to test. - promptContext.Options.RetryPrompt.Text = $"Got {JsonConvert.SerializeObject(promptContext.Context.Activity, Formatting.Indented)}\n\n{promptContext.Options.Prompt.Text}"; - return await Task.FromResult(false); - } - - return await Task.FromResult(true); - } - - private HeroCard MakeUpdateAdaptiveCard() - { - var heroCard = new HeroCard - { - Title = "Update card", - Text = "Update Card Action", - Buttons = new List() - }; - - var action = new CardAction - { - Type = ActionTypes.MessageBack, - Title = "Update card title", - Text = "Update card text", - Value = new JObject { { "count", 0 } } - }; - - heroCard.Buttons.Add(action); - - return heroCard; - } - - private AdaptiveCard MakeAdaptiveCard(string cardType) - { - var adaptiveCard = cardType switch - { - "botaction" => CardSampleHelper.CreateAdaptiveCardBotAction(), - "taskmodule" => CardSampleHelper.CreateAdaptiveCardTaskModule(), - "submitaction" => CardSampleHelper.CreateAdaptiveCardSubmit(), - _ => throw new ArgumentException(nameof(cardType)), - }; - - return adaptiveCard; - } - - private Attachment MakeO365CardAttachmentAsync() - { - var card = CardSampleHelper.CreateSampleO365ConnectorCard(); - var cardAttachment = new Attachment - { - Content = card, - ContentType = O365ConnectorCard.ContentType, - }; - - return cardAttachment; - } - - private Attachment MakeTeamsFileConsentCard() - { - var filename = TeamsLogoFileName; - var filePath = Path.Combine("Dialogs/Cards/Files", filename); - var fileSize = new FileInfo(filePath).Length; - - return MakeTeamsFileConsentCardAttachment(filename, fileSize); - } - - private Attachment MakeTeamsFileConsentCardAttachment(string filename, long fileSize) - { - var consentContext = new Dictionary - { - { "filename", filename }, - }; - - var fileCard = new FileConsentCard - { - Description = "This is the file I want to send you", - SizeInBytes = fileSize, - AcceptContext = consentContext, - DeclineContext = consentContext, - }; - - var asAttachment = new Attachment - { - Content = fileCard, - ContentType = FileConsentCard.ContentType, - Name = filename, - }; - - return asAttachment; - } - - private AnimationCard MakeAnimationCard() - { - var url = new MediaUrl(url: MindBlownGif); - return new AnimationCard(title: "Animation Card", media: new[] { url }, autostart: true); - } - - private VideoCard MakeVideoCard() - { - var url = new MediaUrl(url: CorgiOnCarouselVideo); - return new VideoCard(title: "Video Card", media: new[] { url }); - } - - private AudioCard MakeAudioCard() - { - var url = new MediaUrl(url: $"{_serverUrl}api/music"); - return new AudioCard(title: "Audio Card", media: new[] { url }, autoloop: true); - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Cards/CardOptions.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Cards/CardOptions.cs deleted file mode 100644 index f5cd97dafe..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Cards/CardOptions.cs +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Dialogs.Cards -{ - public enum CardOptions - { - /// - /// Adaptive card - Bot action - /// - AdaptiveCardBotAction, - - /// - /// Adaptive card - Task module - /// - AdaptiveCardTeamsTaskModule, - - /// - /// Adaptive card - Submit action - /// - AdaptiveCardSubmitAction, - - /// - /// Hero cards - /// - Hero, - - /// - /// Thumbnail cards - /// - Thumbnail, - - /// - /// Receipt cards - /// - Receipt, - - /// - /// Signin cards - /// - Signin, - - /// - /// Carousel cards - /// - Carousel, - - /// - /// List cards - /// - List, - - /// - /// O365 cards - /// - O365, - - /// - /// File cards - /// - TeamsFileConsent, - - /// - /// Animation cards - /// - Animation, - - /// - /// Audio cards - /// - Audio, - - /// - /// Video cards - /// - Video, - - /// - /// Adaptive update cards - /// - AdaptiveUpdate, - - /// - /// Ends the card selection dialog - /// - End - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Cards/CardSampleHelper.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Cards/CardSampleHelper.cs deleted file mode 100644 index 8ae3df2ada..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Cards/CardSampleHelper.cs +++ /dev/null @@ -1,508 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using AdaptiveCards; -using Microsoft.Bot.Schema; -using Microsoft.Bot.Schema.Teams; -using Newtonsoft.Json.Linq; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Dialogs.Cards -{ - public static class CardSampleHelper - { - public static AdaptiveCard CreateAdaptiveCardBotAction() - { - var adaptiveCard = new AdaptiveCard(new AdaptiveSchemaVersion(1, 2)); - adaptiveCard.Body.Add(new AdaptiveTextBlock("Bot Builder actions")); - - var action1 = new CardAction(ActionTypes.ImBack, "imBack", null, null, null, "text"); - var action2 = new CardAction(ActionTypes.MessageBack, "message back", null, null, null, JObject.Parse(@"{ ""key"" : ""value"" }")); - var action3 = new CardAction(ActionTypes.MessageBack, "message back local echo", null, "text received by bots", "display text message back", JObject.Parse(@"{ ""key"" : ""value"" }")); - var action4 = new CardAction("invoke", "invoke", null, null, null, JObject.Parse(@"{ ""key"" : ""value"" }")); - - adaptiveCard.Actions.Add(action1.ToAdaptiveCardAction()); - adaptiveCard.Actions.Add(action2.ToAdaptiveCardAction()); - adaptiveCard.Actions.Add(action3.ToAdaptiveCardAction()); - adaptiveCard.Actions.Add(action4.ToAdaptiveCardAction()); - - return adaptiveCard; - } - - public static AdaptiveCard CreateAdaptiveCardTaskModule() - { - var taskModuleAction = new TaskModuleAction("Launch Task Module", @"{ ""hiddenKey"": ""hidden value from task module launcher"" }"); - - var adaptiveCard = new AdaptiveCard(new AdaptiveSchemaVersion(1, 2)); - adaptiveCard.Body.Add(new AdaptiveTextBlock("Task Module Adaptive Card")); - adaptiveCard.Actions.Add(taskModuleAction.ToAdaptiveCardAction()); - - return adaptiveCard; - } - - public static AdaptiveCard CreateAdaptiveCardSubmit() - { - var adaptiveCard = new AdaptiveCard(new AdaptiveSchemaVersion(1, 2)); - adaptiveCard.Body.Add(new AdaptiveTextBlock("Bot Builder actions")); - adaptiveCard.Body.Add(new AdaptiveTextInput { Id = "x" }); - adaptiveCard.Actions.Add(new AdaptiveSubmitAction { Type = "Action.Submit", Title = "Action.Submit", Data = new JObject { { "key", "value" } } }); - - return adaptiveCard; - } - - public static Attachment CreateTaskModuleHeroCard() - { - return new HeroCard() - { - Title = "Task Module Invocation from Hero Card", - Subtitle = "This is a hero card with a Task Module Action button. Click the button to show an Adaptive Card within a Task Module.", - Buttons = new List() - { - new TaskModuleAction("Adaptive Card", new { data = "adaptivecard" }), - }, - }.ToAttachment(); - } - - public static SampleData CreateSampleData(AdaptiveCard adaptiveCard) - { - if (adaptiveCard == null) - { - throw new ArgumentNullException(nameof(adaptiveCard)); - } - - if (adaptiveCard.Body.Count < 4) - { - throw new Exception("Adaptive Card Body contains too few elements"); - } - - var userText = (adaptiveCard.Body[1] as AdaptiveTextBlock)?.Text; - var choiceSet = adaptiveCard.Body[3] as AdaptiveChoiceSetInput; - - if (choiceSet?.Choices?.Count < 3) - { - throw new Exception("Adaptive Card Body[3] contains too few choice elements"); - } - - return new SampleData - { - Question = userText, - MultiSelect = choiceSet.IsMultiSelect ? "true" : "false", - Option1 = choiceSet.Choices[0].Title, - Option2 = choiceSet.Choices[1].Title, - Option3 = choiceSet.Choices[2].Title, - }; - } - - public static AdaptiveCard CreateAdaptiveCardEditor(SampleData sampleData = null) - { - var cardData = sampleData ?? new SampleData(); - - return new AdaptiveCard(new AdaptiveSchemaVersion(1, 2)) - { - Body = new List - { - new AdaptiveTextBlock("This is an Adaptive Card within a Task Module") - { - Weight = AdaptiveTextWeight.Bolder, - }, - new AdaptiveTextBlock("Enter text for Question:"), - new AdaptiveTextInput() { Id = "Question", Placeholder = "Question text here", Value = cardData.Question }, - new AdaptiveTextBlock("Options for Question:"), - new AdaptiveTextBlock("Is Multi-Select:"), - new AdaptiveChoiceSetInput - { - Type = AdaptiveChoiceSetInput.TypeName, - Id = "MultiSelect", - Value = cardData.MultiSelect, - IsMultiSelect = false, - Choices = new List - { - new AdaptiveChoice() { Title = "True", Value = "true" }, - new AdaptiveChoice() { Title = "False", Value = "false" }, - }, - }, - new AdaptiveTextInput() { Id = "Option1", Placeholder = "Option 1 here", Value = cardData.Option1 }, - new AdaptiveTextInput() { Id = "Option2", Placeholder = "Option 2 here", Value = cardData.Option2 }, - new AdaptiveTextInput() { Id = "Option3", Placeholder = "Option 3 here", Value = cardData.Option3 }, - }, - Actions = new List - { - new AdaptiveSubmitAction - { - Type = AdaptiveSubmitAction.TypeName, - Title = "Submit", - Data = new JObject { { "submitLocation", "messagingExtensionFetchTask" } }, - }, - }, - }; - } - - public static AdaptiveCard CreateAdaptiveCard(SampleData data) - { - if (data == null) - { - throw new ArgumentNullException(nameof(data)); - } - - return new AdaptiveCard(new AdaptiveSchemaVersion(1, 2)) - { - Body = new List - { - new AdaptiveTextBlock("Adaptive Card from Task Module") { Weight = AdaptiveTextWeight.Bolder }, - new AdaptiveTextBlock($"{data.Question}") { Id = "Question" }, - new AdaptiveTextInput() { Id = "Answer", Placeholder = "Answer here..." }, - new AdaptiveChoiceSetInput - { - Type = AdaptiveChoiceSetInput.TypeName, - Id = "Choices", - IsMultiSelect = bool.Parse(data.MultiSelect), - Choices = new List - { - new AdaptiveChoice() { Title = data.Option1, Value = data.Option1 }, - new AdaptiveChoice() { Title = data.Option2, Value = data.Option2 }, - new AdaptiveChoice() { Title = data.Option3, Value = data.Option3 }, - }, - }, - }, - Actions = new List - { - new AdaptiveSubmitAction - { - Type = AdaptiveSubmitAction.TypeName, - Title = "Submit", - Data = new JObject { { "submitLocation", "messagingExtensionSubmit" } }, - }, - }, - }; - } - - public static HeroCard CreateHeroCard() - { - var heroCard = new HeroCard - { - Title = "BotFramework Hero Card", - Subtitle = "Microsoft Bot Framework", - Text = "Build and connect intelligent bots to interact with your users naturally wherever they are," + - " from text/sms to Skype, Slack, Office 365 mail and other popular services.", - Images = new List { new CardImage("https://sec.ch9.ms/ch9/7ff5/e07cfef0-aa3b-40bb-9baa-7c9ef8ff7ff5/buildreactionbotframework_960.jpg") }, - Buttons = new List { new CardAction(ActionTypes.OpenUrl, "Get Started", value: "https://docs.microsoft.com/bot-framework") }, - }; - - return heroCard; - } - - public static HeroCard CreateHeroCard(string type) - { - var heroCard = new HeroCard - { - Title = "BotFramework Hero Card", - Subtitle = "Microsoft Bot Framework", - Text = "Build and connect intelligent bots to interact with your users naturally wherever they are," + - " from text/sms to Skype, Slack, Office 365 mail and other popular services.", - Images = new List { new CardImage("https://sec.ch9.ms/ch9/7ff5/e07cfef0-aa3b-40bb-9baa-7c9ef8ff7ff5/buildreactionbotframework_960.jpg") }, - Buttons = new List { new CardAction(ActionTypes.OpenUrl, "Get Started", value: "https://docs.microsoft.com/bot-framework") }, - }; - - return heroCard; - } - - public static ThumbnailCard CreateThumbnailCard() - { - var heroCard = new ThumbnailCard - { - Title = "BotFramework Thumbnail Card", - Subtitle = "Microsoft Bot Framework", - Text = "Build and connect intelligent bots to interact with your users naturally wherever they are," + - " from text/sms to Skype, Slack, Office 365 mail and other popular services.", - Images = new List { new CardImage("https://sec.ch9.ms/ch9/7ff5/e07cfef0-aa3b-40bb-9baa-7c9ef8ff7ff5/buildreactionbotframework_960.jpg") }, - Buttons = new List { new CardAction(ActionTypes.OpenUrl, "Get Started", value: "https://docs.microsoft.com/bot-framework") }, - }; - - return heroCard; - } - - public static ReceiptCard CreateReceiptCard() - { - var receiptCard = new ReceiptCard - { - Title = "John Doe", - Facts = new List { new Fact("Order Number", "1234"), new Fact("Payment Method", "VISA 5555-****") }, - Items = new List - { - new ReceiptItem( - "Data Transfer", - price: "$ 38.45", - quantity: "368", - image: new CardImage(url: "https://github.com/amido/azure-vector-icons/raw/master/renders/traffic-manager.png")), - new ReceiptItem( - "App Service", - price: "$ 45.00", - quantity: "720", - image: new CardImage(url: "https://github.com/amido/azure-vector-icons/raw/master/renders/cloud-service.png")), - }, - Tax = "$ 7.50", - Total = "$ 90.95", - Buttons = new List - { - new CardAction( - ActionTypes.OpenUrl, - "More information", - "https://account.windowsazure.com/content/6.10.1.38-.8225.160809-1618/aux-pre/images/offer-icon-freetrial.png", - value: "https://azure.microsoft.com/en-us/pricing/"), - }, - }; - - return receiptCard; - } - - public static SigninCard CreateSigninCard() - { - var signinCard = new SigninCard - { - Text = "BotFramework Sign-in Card", - Buttons = new List { new CardAction(ActionTypes.Signin, "Sign-in", value: "https://login.microsoftonline.com/") }, - }; - - return signinCard; - } - - public static O365ConnectorCard CreateSampleO365ConnectorCard() - { - var actionCard1 = new O365ConnectorCardActionCard( - O365ConnectorCardActionCard.Type, - "Multiple Choice", - "card-1", - new List - { - new O365ConnectorCardMultichoiceInput( - O365ConnectorCardMultichoiceInput.Type, - "list-1", - true, - "Pick multiple options", - null, - new List - { - new O365ConnectorCardMultichoiceInputChoice("Choice 1", "1"), - new O365ConnectorCardMultichoiceInputChoice("Choice 2", "2"), - new O365ConnectorCardMultichoiceInputChoice("Choice 3", "3") - }, - "expanded", - true), - new O365ConnectorCardMultichoiceInput( - O365ConnectorCardMultichoiceInput.Type, - "list-2", - true, - "Pick multiple options", - null, - new List - { - new O365ConnectorCardMultichoiceInputChoice("Choice 4", "4"), - new O365ConnectorCardMultichoiceInputChoice("Choice 5", "5"), - new O365ConnectorCardMultichoiceInputChoice("Choice 6", "6") - }, - "compact", - true), - new O365ConnectorCardMultichoiceInput( - O365ConnectorCardMultichoiceInput.Type, - "list-3", - false, - "Pick an option", - null, - new List - { - new O365ConnectorCardMultichoiceInputChoice("Choice a", "a"), - new O365ConnectorCardMultichoiceInputChoice("Choice b", "b"), - new O365ConnectorCardMultichoiceInputChoice("Choice c", "c") - }, - "expanded", - false), - new O365ConnectorCardMultichoiceInput( - O365ConnectorCardMultichoiceInput.Type, - "list-4", - false, - "Pick an option", - null, - new List - { - new O365ConnectorCardMultichoiceInputChoice("Choice x", "x"), - new O365ConnectorCardMultichoiceInputChoice("Choice y", "y"), - new O365ConnectorCardMultichoiceInputChoice("Choice z", "z") - }, - "compact", - false) - }, - new List - { - new O365ConnectorCardHttpPOST( - O365ConnectorCardHttpPOST.Type, - "Send", - "card-1-btn-1", - @"{""list1"":""{{list-1.value}}"", ""list2"":""{{list-2.value}}"", ""list3"":""{{list-3.value}}"", ""list4"":""{{list-4.value}}""}") - }); - - var actionCard2 = new O365ConnectorCardActionCard( - O365ConnectorCardActionCard.Type, - "Text Input", - "card-2", - new List - { - new O365ConnectorCardTextInput( - O365ConnectorCardTextInput.Type, - "text-1", - false, - "multiline, no maxLength", - null, - true, - null), - new O365ConnectorCardTextInput( - O365ConnectorCardTextInput.Type, - "text-2", - false, - "single line, no maxLength", - null, - false, - null), - new O365ConnectorCardTextInput( - O365ConnectorCardTextInput.Type, - "text-3", - true, - "multiline, max len = 10, isRequired", - null, - true, - 10), - new O365ConnectorCardTextInput( - O365ConnectorCardTextInput.Type, - "text-4", - true, - "single line, max len = 10, isRequired", - null, - false, - 10) - }, - new List - { - new O365ConnectorCardHttpPOST( - O365ConnectorCardHttpPOST.Type, - "Send", - "card-2-btn-1", - @"{""text1"":""{{text-1.value}}"", ""text2"":""{{text-2.value}}"", ""text3"":""{{text-3.value}}"", ""text4"":""{{text-4.value}}""}") - }); - - var actionCard3 = new O365ConnectorCardActionCard( - O365ConnectorCardActionCard.Type, - "Date Input", - "card-3", - new List - { - new O365ConnectorCardDateInput( - O365ConnectorCardDateInput.Type, - "date-1", - true, - "date with time", - null, - true), - new O365ConnectorCardDateInput( - O365ConnectorCardDateInput.Type, - "date-2", - false, - "date only", - null, - false) - }, - new List - { - new O365ConnectorCardHttpPOST( - O365ConnectorCardHttpPOST.Type, - "Send", - "card-3-btn-1", - @"{""date1"":""{{date-1.value}}"", ""date2"":""{{date-2.value}}""}") - }); - - var section = new O365ConnectorCardSection( - "**section title**", - "section text", - "activity title", - "activity subtitle", - "activity text", - "http://connectorsdemo.azurewebsites.net/images/MSC12_Oscar_002.jpg", - "avatar", - true, - new List - { - new O365ConnectorCardFact("Fact name 1", "Fact value 1"), - new O365ConnectorCardFact("Fact name 2", "Fact value 2"), - }, - new List - { - new O365ConnectorCardImage - { - Image = "http://connectorsdemo.azurewebsites.net/images/MicrosoftSurface_024_Cafe_OH-06315_VS_R1c.jpg", - Title = "image 1" - }, - new O365ConnectorCardImage - { - Image = "http://connectorsdemo.azurewebsites.net/images/WIN12_Scene_01.jpg", - Title = "image 2" - }, - new O365ConnectorCardImage - { - Image = "http://connectorsdemo.azurewebsites.net/images/WIN12_Anthony_02.jpg", - Title = "image 3" - } - }); - - var card = new O365ConnectorCard() - { - Summary = "O365 card summary", - ThemeColor = "#E67A9E", - Title = "card title", - Text = "card text", - Sections = new List { section }, - PotentialAction = new List - { - actionCard1, - actionCard2, - actionCard3, - new O365ConnectorCardViewAction( - O365ConnectorCardViewAction.Type, - "View Action", - null, - new List - { - "http://microsoft.com" - }), - new O365ConnectorCardOpenUri( - O365ConnectorCardOpenUri.Type, - "Open Uri", - "open-uri", - new List - { - new O365ConnectorCardOpenUriTarget - { - Os = "default", - Uri = "http://microsoft.com" - }, - new O365ConnectorCardOpenUriTarget - { - Os = "iOS", - Uri = "http://microsoft.com" - }, - new O365ConnectorCardOpenUriTarget - { - Os = "android", - Uri = "http://microsoft.com" - }, - new O365ConnectorCardOpenUriTarget - { - Os = "windows", - Uri = "http://microsoft.com" - } - }) - } - }; - - return card; - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Cards/ChannelSupportedCards.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Cards/ChannelSupportedCards.cs deleted file mode 100644 index 426c3c118b..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Cards/ChannelSupportedCards.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Collections.Generic; -using Microsoft.Bot.Connector; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Dialogs.Cards -{ - public static class ChannelSupportedCards - { - /// - /// This tracks what cards are not supported in a given channel. - /// - private static readonly Dictionary> UnsupportedChannelCards = new Dictionary> - { - { - Channels.Emulator, new List - { - CardOptions.AdaptiveCardTeamsTaskModule, - CardOptions.AdaptiveUpdate, - CardOptions.O365, - CardOptions.TeamsFileConsent - } - }, - { Channels.Directline, new List { CardOptions.AdaptiveUpdate } }, - { - Channels.Telegram, new List - { - CardOptions.AdaptiveCardBotAction, - CardOptions.AdaptiveCardTeamsTaskModule, - CardOptions.AdaptiveCardSubmitAction, - CardOptions.List, - CardOptions.TeamsFileConsent - } - } - }; - - /// - /// This let's you know if a card is supported in a given channel. - /// - /// Bot Connector Channel. - /// Card Option to be checked. - /// A bool if the card is supported in the channel. - public static bool IsCardSupported(string channel, CardOptions type) - { - if (UnsupportedChannelCards.ContainsKey(channel)) - { - if (UnsupportedChannelCards[channel].Contains(type)) - { - return false; - } - } - - return true; - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Cards/Files/buildreactionbotframework.jpg b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Cards/Files/buildreactionbotframework.jpg deleted file mode 100644 index f410fc137e..0000000000 Binary files a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Cards/Files/buildreactionbotframework.jpg and /dev/null differ diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Cards/Files/music.mp3 b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Cards/Files/music.mp3 deleted file mode 100644 index b4ff6ee30f..0000000000 Binary files a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Cards/Files/music.mp3 and /dev/null differ diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Cards/Files/teams-logo.png b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Cards/Files/teams-logo.png deleted file mode 100644 index 78b0a0c308..0000000000 Binary files a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Cards/Files/teams-logo.png and /dev/null differ diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Cards/SampleData.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Cards/SampleData.cs deleted file mode 100644 index 13b7d9d744..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Cards/SampleData.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Dialogs.Cards -{ - public class SampleData - { - public SampleData() - { - MultiSelect = "true"; - } - - public string Question { get; set; } - - public string MultiSelect { get; set; } - - public string Option1 { get; set; } - - public string Option2 { get; set; } - - public string Option3 { get; set; } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Delete/DeleteDialog.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Delete/DeleteDialog.cs deleted file mode 100644 index 616ddfd70c..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Delete/DeleteDialog.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Dialogs; -using Microsoft.Bot.Connector; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Dialogs.Delete -{ - public class DeleteDialog : ComponentDialog - { - private readonly List _deleteSupported = new List - { - Channels.Msteams, - Channels.Slack, - Channels.Telegram - }; - - public DeleteDialog() - : base(nameof(DeleteDialog)) - { - AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[] { HandleDeleteDialog })); - InitialDialogId = nameof(WaterfallDialog); - } - - private async Task HandleDeleteDialog(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - var channel = stepContext.Context.Activity.ChannelId; - if (_deleteSupported.Contains(channel)) - { - var id = await stepContext.Context.SendActivityAsync(MessageFactory.Text("I will delete this message in 5 seconds"), cancellationToken); - await Task.Delay(5000, cancellationToken); - await stepContext.Context.DeleteActivityAsync(id.Id, cancellationToken); - } - else - { - await stepContext.Context.SendActivityAsync(MessageFactory.Text($"Delete is not supported in the {channel} channel."), cancellationToken); - } - - return new DialogTurnResult(DialogTurnStatus.Complete); - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/FileUpload/FileUploadDialog.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/FileUpload/FileUploadDialog.cs deleted file mode 100644 index 67a3885d27..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/FileUpload/FileUploadDialog.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.IO; -using System.Net; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Dialogs; -using Microsoft.Bot.Schema; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Dialogs.FileUpload -{ - public class FileUploadDialog : ComponentDialog - { - public FileUploadDialog() - : base(nameof(FileUploadDialog)) - { - AddDialog(new AttachmentPrompt(nameof(AttachmentPrompt))); - AddDialog(new ConfirmPrompt(nameof(ConfirmPrompt))); - AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[] { PromptUploadStepAsync, HandleAttachmentStepAsync, FinalStepAsync })); - - InitialDialogId = nameof(WaterfallDialog); - } - - private async Task PromptUploadStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - var promptOptions = new PromptOptions - { - Prompt = MessageFactory.Text("Please upload a file to continue."), - RetryPrompt = MessageFactory.Text("You must upload a file."), - }; - - return await stepContext.PromptAsync(nameof(AttachmentPrompt), promptOptions, cancellationToken); - } - - private async Task HandleAttachmentStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - var fileText = string.Empty; - - foreach (var file in stepContext.Context.Activity.Attachments) - { - var remoteFileUrl = file.ContentUrl; - var localFileName = Path.Combine(Path.GetTempPath(), file.Name); - string fileContent; - - using (var webClient = new WebClient()) - { - webClient.DownloadFile(remoteFileUrl, localFileName); - using var reader = new StreamReader(localFileName); - fileContent = await reader.ReadToEndAsync(); - } - - fileText += $"Attachment \"{file.Name}\" has been received.\r\n"; - fileText += $"File content: {fileContent}\r\n"; - } - - await stepContext.Context.SendActivityAsync(MessageFactory.Text(fileText), cancellationToken); - - // Ask to upload another file or end. - const string messageText = "Do you want to upload another file?"; - const string repromptMessageText = "That's an invalid choice."; - var options = new PromptOptions - { - Prompt = MessageFactory.Text(messageText, messageText, InputHints.ExpectingInput), - RetryPrompt = MessageFactory.Text(repromptMessageText, repromptMessageText, InputHints.ExpectingInput) - }; - - return await stepContext.PromptAsync(nameof(ConfirmPrompt), options, cancellationToken); - } - - private async Task FinalStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - var tryAnother = (bool)stepContext.Result; - if (tryAnother) - { - return await stepContext.ReplaceDialogAsync(InitialDialogId, cancellationToken: cancellationToken); - } - - return new DialogTurnResult(DialogTurnStatus.Complete); - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/MessageWithAttachment/MessageWithAttachmentDialog.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/MessageWithAttachment/MessageWithAttachmentDialog.cs deleted file mode 100644 index 443413e20d..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/MessageWithAttachment/MessageWithAttachmentDialog.cs +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.IO; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Dialogs; -using Microsoft.Bot.Builder.Dialogs.Choices; -using Microsoft.Bot.Schema; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Dialogs.MessageWithAttachment -{ - public class MessageWithAttachmentDialog : ComponentDialog - { - private const string Picture = "architecture-resize.png"; - private readonly Uri _serverUrl; - - public MessageWithAttachmentDialog(Uri serverUrl) - : base(nameof(MessageWithAttachmentDialog)) - { - _serverUrl = serverUrl; - AddDialog(new ChoicePrompt(nameof(ChoicePrompt))); - AddDialog(new ConfirmPrompt(nameof(ConfirmPrompt))); - AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[] { SelectAttachmentTypeAsync, SendActivityWithAttachmentAsync, FinalStepAsync })); - InitialDialogId = nameof(WaterfallDialog); - } - - private async Task SelectAttachmentTypeAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - const string messageText = "What attachment type do you want?"; - const string repromptMessageText = "That was not a valid choice, please select a valid card type."; - var options = new PromptOptions - { - Prompt = MessageFactory.Text(messageText, messageText, InputHints.ExpectingInput), - RetryPrompt = MessageFactory.Text(repromptMessageText, repromptMessageText, InputHints.ExpectingInput), - Choices = new List - { - new Choice("Inline"), - new Choice("Internet") - } - }; - - // Ask the user to enter their name. - return await stepContext.PromptAsync(nameof(ChoicePrompt), options, cancellationToken); - } - - private async Task SendActivityWithAttachmentAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - var attachmentType = ((FoundChoice)stepContext.Result).Value.ToLowerInvariant(); - var reply = new Activity(ActivityTypes.Message) { InputHint = InputHints.IgnoringInput }; - switch (attachmentType) - { - case "inline": - reply.Text = "This is an inline attachment."; - reply.Attachments = new List { GetInlineAttachment() }; - break; - - case "internet": - reply.Text = "This is an attachment from a HTTP URL."; - reply.Attachments = new List { GetInternetAttachment() }; - break; - - default: - throw new InvalidOperationException($"Invalid card type {attachmentType}"); - } - - await stepContext.Context.SendActivityAsync(reply, cancellationToken); - - // Ask to submit another or end. - const string messageText = "Do you want another type of attachment?"; - const string repromptMessageText = "That's an invalid choice."; - var options = new PromptOptions - { - Prompt = MessageFactory.Text(messageText, messageText, InputHints.ExpectingInput), - RetryPrompt = MessageFactory.Text(repromptMessageText, repromptMessageText, InputHints.ExpectingInput), - }; - - return await stepContext.PromptAsync(nameof(ConfirmPrompt), options, cancellationToken); - } - - private async Task FinalStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - var tryAnother = (bool)stepContext.Result; - if (tryAnother) - { - return await stepContext.ReplaceDialogAsync(InitialDialogId, cancellationToken: cancellationToken); - } - - return new DialogTurnResult(DialogTurnStatus.Complete); - } - - private Attachment GetInlineAttachment() - { - var imagePath = Path.Combine(Environment.CurrentDirectory, "wwwroot", "images", Picture); - var imageData = Convert.ToBase64String(File.ReadAllBytes(imagePath)); - - return new Attachment - { - Name = $"Files/{Picture}", - ContentType = "image/png", - ContentUrl = $"data:image/png;base64,{imageData}", - }; - } - - private Attachment GetInternetAttachment() - { - return new Attachment - { - Name = $"Files/{Picture}", - ContentType = "image/png", - ContentUrl = $"{_serverUrl}images/{Picture}", - }; - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Proactive/ContinuationParameters.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Proactive/ContinuationParameters.cs deleted file mode 100644 index ef2970a643..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Proactive/ContinuationParameters.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Security.Principal; -using Microsoft.Bot.Schema; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Dialogs.Proactive -{ - /// - /// Stores the information needed to resume a conversation when a proactive message arrives. - /// - public class ContinuationParameters - { - public IIdentity ClaimsIdentity { get; set; } - - public string OAuthScope { get; set; } - - public ConversationReference ConversationReference { get; set; } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Proactive/WaitForProactiveDialog.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Proactive/WaitForProactiveDialog.cs deleted file mode 100644 index aa6cf4b55a..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Proactive/WaitForProactiveDialog.cs +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Concurrent; -using System.Security.Principal; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Dialogs; -using Microsoft.Bot.Schema; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Dialogs.Proactive -{ - public class WaitForProactiveDialog : Dialog - { - // Message to send to users when the bot receives a Conversation Update event - private const string NotifyMessage = "Navigate to {0}api/notify?user={1} to proactively message the user."; - private readonly ConcurrentDictionary _continuationParametersStore; - - private readonly Uri _serverUrl; - - public WaitForProactiveDialog(IHttpContextAccessor httpContextAccessor, ConcurrentDictionary continuationParametersStore) - { - _continuationParametersStore = continuationParametersStore; - _serverUrl = new Uri($"{httpContextAccessor.HttpContext.Request.Scheme}://{httpContextAccessor.HttpContext.Request.Host.Value}"); - } - - public override async Task BeginDialogAsync(DialogContext dc, object options = null, CancellationToken cancellationToken = default) - { - // Store a reference to the conversation. - AddOrUpdateContinuationParameters(dc.Context); - - // Render message with continuation link. - await dc.Context.SendActivityAsync(MessageFactory.Text(string.Format(NotifyMessage, _serverUrl, dc.Context.Activity.From.Id)), cancellationToken); - return EndOfTurn; - } - - public override async Task ContinueDialogAsync(DialogContext dc, CancellationToken cancellationToken = default) - { - if (dc.Context.Activity.Type == ActivityTypes.Event && dc.Context.Activity.Name == ActivityEventNames.ContinueConversation) - { - // We continued the conversation, forget the proactive reference. - _continuationParametersStore.TryRemove(dc.Context.Activity.From.Id, out _); - - // The continue conversation activity comes from the ProactiveController when the notification is received - await dc.Context.SendActivityAsync("We received a proactive message, ending the dialog", cancellationToken: cancellationToken); - - // End the dialog so the host gets an EoC - return new DialogTurnResult(DialogTurnStatus.Complete); - } - - // Keep waiting for a call to the ProactiveController. - await dc.Context.SendActivityAsync($"We are waiting for a proactive message. {string.Format(NotifyMessage, _serverUrl, dc.Context.Activity.From.Id)}", cancellationToken: cancellationToken); - - return EndOfTurn; - } - - /// - /// Helper to extract and store parameters we need to continue a conversation from a proactive message. - /// - /// A turnContext instance with the parameters we need. - private void AddOrUpdateContinuationParameters(ITurnContext turnContext) - { - var continuationParameters = new ContinuationParameters - { - ClaimsIdentity = turnContext.TurnState.Get(BotAdapter.BotIdentityKey), - ConversationReference = turnContext.Activity.GetConversationReference(), - OAuthScope = turnContext.TurnState.Get(BotAdapter.OAuthScopeKey) - }; - - _continuationParametersStore.AddOrUpdate(turnContext.Activity.From.Id, continuationParameters, (_, __) => continuationParameters); - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Sso/SsoSkillDialog.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Sso/SsoSkillDialog.cs deleted file mode 100644 index 90add0aca3..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Sso/SsoSkillDialog.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Dialogs; -using Microsoft.Bot.Builder.Dialogs.Choices; -using Microsoft.Bot.Schema; -using Microsoft.Extensions.Configuration; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Dialogs.Sso -{ - public class SsoSkillDialog : ComponentDialog - { - private readonly string _connectionName; - - public SsoSkillDialog(IConfiguration configuration) - : base(nameof(SsoSkillDialog)) - { - _connectionName = configuration.GetSection("SsoConnectionName")?.Value; - AddDialog(new SsoSkillSignInDialog(_connectionName)); - AddDialog(new ChoicePrompt("ActionStepPrompt")); - - var waterfallSteps = new WaterfallStep[] - { - PromptActionStepAsync, - HandleActionStepAsync, - PromptFinalStepAsync - }; - - AddDialog(new WaterfallDialog(nameof(WaterfallDialog), waterfallSteps)); - - InitialDialogId = nameof(WaterfallDialog); - } - - private async Task PromptActionStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - const string messageText = "What SSO action would you like to perform on the skill?"; - const string repromptMessageText = "That was not a valid choice, please select a valid choice."; - var options = new PromptOptions - { - Prompt = MessageFactory.Text(messageText, messageText, InputHints.ExpectingInput), - RetryPrompt = MessageFactory.Text(repromptMessageText, repromptMessageText, InputHints.ExpectingInput), - Choices = await GetPromptChoicesAsync(stepContext, cancellationToken) - }; - - // Prompt the user to select a skill. - return await stepContext.PromptAsync("ActionStepPrompt", options, cancellationToken); - } - - private async Task> GetPromptChoicesAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - var promptChoices = new List(); - var adapter = (IUserTokenProvider)stepContext.Context.Adapter; - var token = await adapter.GetUserTokenAsync(stepContext.Context, _connectionName, null, cancellationToken); - - if (token == null) - { - promptChoices.Add(new Choice("Login")); - } - else - { - promptChoices.Add(new Choice("Logout")); - promptChoices.Add(new Choice("Show token")); - } - - promptChoices.Add(new Choice("End")); - - return promptChoices; - } - - private async Task HandleActionStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - var action = ((FoundChoice)stepContext.Result).Value.ToLowerInvariant(); - - switch (action) - { - case "login": - return await stepContext.BeginDialogAsync(nameof(SsoSkillSignInDialog), null, cancellationToken); - - case "logout": - var adapter = (IUserTokenProvider)stepContext.Context.Adapter; - await adapter.SignOutUserAsync(stepContext.Context, _connectionName, cancellationToken: cancellationToken); - await stepContext.Context.SendActivityAsync("You have been signed out.", cancellationToken: cancellationToken); - return await stepContext.NextAsync(cancellationToken: cancellationToken); - - case "show token": - var tokenProvider = (IUserTokenProvider)stepContext.Context.Adapter; - var token = await tokenProvider.GetUserTokenAsync(stepContext.Context, _connectionName, null, cancellationToken); - if (token == null) - { - await stepContext.Context.SendActivityAsync("User has no cached token.", cancellationToken: cancellationToken); - } - else - { - await stepContext.Context.SendActivityAsync($"Here is your current SSO token: {token.Token}", cancellationToken: cancellationToken); - } - - return await stepContext.NextAsync(cancellationToken: cancellationToken); - - case "end": - return new DialogTurnResult(DialogTurnStatus.Complete); - - default: - // This should never be hit since the previous prompt validates the choice - throw new InvalidOperationException($"Unrecognized action: {action}"); - } - } - - private async Task PromptFinalStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - // Restart the dialog (we will exit when the user says end) - return await stepContext.ReplaceDialogAsync(InitialDialogId, null, cancellationToken); - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Sso/SsoSkillSignInDialog.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Sso/SsoSkillSignInDialog.cs deleted file mode 100644 index 61c57301dc..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Sso/SsoSkillSignInDialog.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Bot.Builder.Dialogs; -using Microsoft.Bot.Schema; -using Microsoft.Extensions.Configuration; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Dialogs.Sso -{ - public class SsoSkillSignInDialog : ComponentDialog - { - public SsoSkillSignInDialog(string connectionName) - : base(nameof(SsoSkillSignInDialog)) - { - AddDialog(new OAuthPrompt(nameof(OAuthPrompt), new OAuthPromptSettings - { - ConnectionName = connectionName, - Text = "Sign in to the Skill using AAD", - Title = "Sign In" - })); - AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[] { SignInStepAsync, DisplayTokenAsync })); - InitialDialogId = nameof(WaterfallDialog); - } - - private async Task SignInStepAsync(WaterfallStepContext context, CancellationToken cancellationToken) - { - // This prompt won't show if the user is signed in to the host using SSO. - return await context.BeginDialogAsync(nameof(OAuthPrompt), null, cancellationToken); - } - - private async Task DisplayTokenAsync(WaterfallStepContext context, CancellationToken cancellationToken) - { - if (!(context.Result is TokenResponse result)) - { - await context.Context.SendActivityAsync("No token was provided for the skill.", cancellationToken: cancellationToken); - } - else - { - await context.Context.SendActivityAsync($"Here is your token for the skill: {result.Token}", cancellationToken: cancellationToken); - } - - return await context.EndDialogAsync(null, cancellationToken); - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Update/UpdateDialog.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Update/UpdateDialog.cs deleted file mode 100644 index 1ec0a5217d..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Dialogs/Update/UpdateDialog.cs +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Dialogs; -using Microsoft.Bot.Connector; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Dialogs.Update -{ - public class UpdateDialog : ComponentDialog - { - private readonly List _updateSupported = new List - { - Channels.Msteams, - Channels.Slack, - Channels.Telegram - }; - - private readonly Dictionary _updateTracker; - - public UpdateDialog() - : base(nameof(UpdateDialog)) - { - _updateTracker = new Dictionary(); - AddDialog(new ConfirmPrompt(nameof(ConfirmPrompt))); - AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[] { HandleUpdateDialog, FinalStepAsync })); - InitialDialogId = nameof(WaterfallDialog); - } - - private async Task HandleUpdateDialog(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - var channel = stepContext.Context.Activity.ChannelId; - if (_updateSupported.Contains(channel)) - { - if (_updateTracker.ContainsKey(stepContext.Context.Activity.Conversation.Id)) - { - var conversationId = stepContext.Context.Activity.Conversation.Id; - var tuple = _updateTracker[conversationId]; - var activity = MessageFactory.Text($"This message has been updated {tuple.Item2} time(s)."); - tuple.Item2 += 1; - activity.Id = tuple.Item1; - _updateTracker[conversationId] = tuple; - await stepContext.Context.UpdateActivityAsync(activity, cancellationToken); - } - else - { - var id = await stepContext.Context.SendActivityAsync(MessageFactory.Text("Here is the original activity"), cancellationToken); - _updateTracker.Add(stepContext.Context.Activity.Conversation.Id, (id.Id, 1)); - } - } - else - { - await stepContext.Context.SendActivityAsync(MessageFactory.Text($"Delete is not supported in the {channel} channel."), cancellationToken); - return new DialogTurnResult(DialogTurnStatus.Complete); - } - - // Ask if we want to update the activity again. - const string messageText = "Do you want to update the activity again?"; - const string repromptMessageText = "Please select a valid answer"; - var options = new PromptOptions - { - Prompt = MessageFactory.Text(messageText, messageText), - RetryPrompt = MessageFactory.Text(repromptMessageText, repromptMessageText), - }; - - // Ask the user to enter their name. - return await stepContext.PromptAsync(nameof(ConfirmPrompt), options, cancellationToken); - } - - private async Task FinalStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) - { - var tryAnother = (bool)stepContext.Result; - if (tryAnother) - { - return await stepContext.ReplaceDialogAsync(InitialDialogId, cancellationToken: cancellationToken); - } - - _updateTracker.Remove(stepContext.Context.Activity.Conversation.Id); - return new DialogTurnResult(DialogTurnStatus.Complete); - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Middleware/SsoSaveStateMiddleware.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Middleware/SsoSaveStateMiddleware.cs deleted file mode 100644 index f0fb5e5bad..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Middleware/SsoSaveStateMiddleware.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Schema; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Middleware -{ - /// - /// A middleware that ensures conversation state is saved when an OAuthCard is returned by the skill. - /// - /// - /// In SSO, the host will send an Invoke with the token if SSO is enabled. - /// This middleware saves the state of the bot before sending out the SSO card to ensure the dialog state - /// is persisted and in the right state if an InvokeActivity comes back from the Host with the token. - /// - public class SsoSaveStateMiddleware : IMiddleware - { - private readonly ConversationState _conversationState; - - public SsoSaveStateMiddleware(ConversationState conversationState) - { - _conversationState = conversationState; - } - - public async Task OnTurnAsync(ITurnContext turnContext, NextDelegate next, CancellationToken cancellationToken = new CancellationToken()) - { - // Register outgoing handler. - turnContext.OnSendActivities(OutgoingHandler); - - // Continue processing messages. - await next(cancellationToken); - } - - private async Task OutgoingHandler(ITurnContext turnContext, List activities, Func> next) - { - foreach (var activity in activities) - { - // Check if any of the outgoing activities has an OAuthCard. - if (activity.Attachments != null && activity.Attachments.Any(attachment => attachment.ContentType == OAuthCard.ContentType)) - { - // Save any state changes so the dialog stack is ready for SSO exchanges. - await _conversationState.SaveChangesAsync(turnContext, false, CancellationToken.None); - } - } - - return await next(); - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Program.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Program.cs deleted file mode 100644 index 31e4c693d2..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Program.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Hosting; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot -{ - public class Program - { - public static void Main(string[] args) - { - CreateHostBuilder(args).Build().Run(); - } - - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup(); - }); - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Properties/launchSettings.json b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Properties/launchSettings.json deleted file mode 100644 index f3bdbffd6c..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Properties/launchSettings.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:35420/", - "sslPort": 0 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": false, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "WaterfallSkillBotDotNet": { - "commandName": "Project", - "launchBrowser": true, - "applicationUrl": "http://localhost:35420/", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/SkillAdapterWithErrorHandler.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/SkillAdapterWithErrorHandler.cs deleted file mode 100644 index a4098b193c..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/SkillAdapterWithErrorHandler.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Threading.Tasks; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Integration.AspNet.Core; -using Microsoft.Bot.Builder.TraceExtensions; -using Microsoft.Bot.Connector.Authentication; -using Microsoft.Bot.Schema; -using Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Middleware; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Logging; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot -{ - public class SkillAdapterWithErrorHandler : BotFrameworkHttpAdapter - { - private readonly ConversationState _conversationState; - private readonly ILogger _logger; - - public SkillAdapterWithErrorHandler(IConfiguration configuration, ICredentialProvider credentialProvider, AuthenticationConfiguration authConfig, ILogger logger, ConversationState conversationState) - : base(configuration, credentialProvider, authConfig, logger: logger) - { - _conversationState = conversationState ?? throw new ArgumentNullException(nameof(conversationState)); - _logger = logger ?? throw new ArgumentNullException(nameof(logger)); - OnTurnError = HandleTurnError; - - // Add autosave middleware for SSO. - Use(new SsoSaveStateMiddleware(_conversationState)); - } - - private async Task HandleTurnError(ITurnContext turnContext, Exception exception) - { - // Log any leaked exception from the application. - _logger.LogError(exception, $"[OnTurnError] unhandled error : {exception.Message}"); - - await SendErrorMessageAsync(turnContext, exception); - await SendEoCToParentAsync(turnContext, exception); - await ClearConversationStateAsync(turnContext); - } - - private async Task SendErrorMessageAsync(ITurnContext turnContext, Exception exception) - { - try - { - // Send a message to the user. - var errorMessageText = "The skill encountered an error or bug."; - var errorMessage = MessageFactory.Text(errorMessageText + Environment.NewLine + exception, errorMessageText, InputHints.IgnoringInput); - errorMessage.Value = exception; - await turnContext.SendActivityAsync(errorMessage); - - errorMessageText = "To continue to run this bot, please fix the bot source code."; - errorMessage = MessageFactory.Text(errorMessageText, errorMessageText, InputHints.ExpectingInput); - await turnContext.SendActivityAsync(errorMessage); - - // Send a trace activity, which will be displayed in the Bot Framework Emulator. - // Note: we return the entire exception in the value property to help the developer; - // this should not be done in production. - await turnContext.TraceActivityAsync("OnTurnError Trace", exception.ToString(), "https://www.botframework.com/schemas/error", "TurnError"); - } - catch (Exception ex) - { - _logger.LogError(ex, $"Exception caught in SendErrorMessageAsync : {ex}"); - } - } - - private async Task SendEoCToParentAsync(ITurnContext turnContext, Exception exception) - { - try - { - // Send an EndOfConversation activity to the skill caller with the error to end the conversation, - // and let the caller decide what to do. - var endOfConversation = Activity.CreateEndOfConversationActivity(); - endOfConversation.Code = "SkillError"; - endOfConversation.Text = exception.Message; - await turnContext.SendActivityAsync(endOfConversation); - } - catch (Exception ex) - { - _logger.LogError(ex, $"Exception caught in SendEoCToParentAsync : {ex}"); - } - } - - private async Task ClearConversationStateAsync(ITurnContext turnContext) - { - try - { - // Delete the conversationState for the current conversation to prevent the - // bot from getting stuck in a error-loop caused by being in a bad state. - // ConversationState should be thought of as similar to "cookie-state" for a Web page. - await _conversationState.DeleteAsync(turnContext); - } - catch (Exception ex) - { - _logger.LogError(ex, $"Exception caught on attempting to Delete ConversationState : {ex}"); - } - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Startup.cs b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Startup.cs deleted file mode 100644 index 7405acb74d..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/Startup.cs +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Collections.Concurrent; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.BotFramework; -using Microsoft.Bot.Builder.Integration.AspNet.Core; -using Microsoft.Bot.Builder.Integration.AspNet.Core.Skills; -using Microsoft.Bot.Builder.Skills; -using Microsoft.Bot.Connector.Authentication; -using Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Authentication; -using Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Bots; -using Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Dialogs; -using Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Dialogs.Proactive; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; - -namespace Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot -{ - public class Startup - { - public Startup(IConfiguration configuration) - { - Configuration = configuration; - } - - public IConfiguration Configuration { get; } - - // This method gets called by the runtime. Use this method to add services to the container. - public void ConfigureServices(IServiceCollection services) - { - services.AddControllers() - .AddNewtonsoftJson(); - - // Configure credentials. - services.AddSingleton(); - if (!string.IsNullOrEmpty(Configuration["ChannelService"])) - { - // Register a ConfigurationChannelProvider -- this is only for Azure Gov. - services.AddSingleton(); - } - - // Register AuthConfiguration to enable custom claim validation. - services.AddSingleton(sp => new AuthenticationConfiguration { ClaimsValidator = new Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot.Authentication.AllowedCallersClaimsValidator(sp.GetService()) }); - - // Register the Bot Framework Adapter with error handling enabled. - // Note: some classes use the base BotAdapter so we add an extra registration that pulls the same instance. - services.AddSingleton(); - services.AddSingleton(sp => sp.GetService()); - - // Register the skills conversation ID factory, the client and the request handler. - services.AddSingleton(); - services.AddHttpClient(); - services.AddSingleton(); - - // Create the storage we'll be using for User and Conversation state. (Memory is great for testing purposes.) - services.AddSingleton(); - - // Create the Conversation state. (Used by the Dialog system itself.) - services.AddSingleton(); - - // The Dialog that will be run by the bot. - services.AddSingleton(); - - // The Bot needs an HttpClient to download and upload files. - services.AddHttpClient(); - - // Create a global dictionary for our ConversationReferences (used by proactive) - services.AddSingleton>(); - - // Create the bot as a transient. In this case the ASP Controller is expecting an IBot. - services.AddTransient>(); - - // Gives us access to HttpContext so we can create URLs with the host name. - services.AddHttpContextAccessor(); - } - - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IWebHostEnvironment env) - { - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - } - - app.UseDefaultFiles() - .UseStaticFiles() - .UseWebSockets() - .UseRouting() - .UseAuthorization() - .UseEndpoints(endpoints => - { - endpoints.MapControllers(); - }); - - // Uncomment this to support HTTPS. - // app.UseHttpsRedirection(); - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/WaterfallSkillBot.csproj b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/WaterfallSkillBot.csproj deleted file mode 100644 index a534c34089..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/WaterfallSkillBot.csproj +++ /dev/null @@ -1,46 +0,0 @@ - - - - netcoreapp3.1 - latest - Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot - Microsoft.BotFrameworkFunctionalTests.WaterfallSkillBot - cca62821-0d1d-4b4d-8e5b-8ee934324a2c - - - - - - - - - - PreserveNewest - - - PreserveNewest - - - - - - - - - - - - - - - Always - - - Always - - - PreserveNewest - - - - \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/appsettings.json b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/appsettings.json deleted file mode 100644 index aeba3b0618..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/appsettings.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "MicrosoftAppId": "", - "MicrosoftAppPassword": "", - "ConnectionName": "TestOAuthProvider", - "SsoConnectionName": "", - "ChannelService": "", - // This is a comma separate list with the App IDs that will have access to the skill. - // This setting is used in AllowedCallersClaimsValidator. - // Examples: - // [ "*" ] allows all callers. - // [ "AppId1", "AppId2" ] only allows access to parent bots with "AppId1" and "AppId2". - "AllowedCallers": [ "*" ], - - "SkillHostEndpoint": "http://localhost:35420/api/skills", - "EchoSkillInfo": { - "Id": "EchoSkillBot", - "AppId": "", - "SkillEndpoint": "http://localhost:35400/api/messages" - } -} diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/wwwroot/default.htm b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/wwwroot/default.htm deleted file mode 100644 index 53166d3e75..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/wwwroot/default.htm +++ /dev/null @@ -1,420 +0,0 @@ - - - - - - - WaterfallSkillBot - - - - - -
-
-
-
WaterfallSkillBot Bot
-
-
-
-
-
Your bot is ready!
-
You can test your bot in the Bot Framework Emulator
- by connecting to http://localhost:3978/api/messages.
- -
Visit Azure - Bot Service to register your bot and add it to
- various channels. The bot's endpoint URL typically looks - like this:
-
https://your_bots_hostname/api/messages
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/wwwroot/images/architecture-resize.png b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/wwwroot/images/architecture-resize.png deleted file mode 100644 index e65f0f7332..0000000000 Binary files a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/wwwroot/images/architecture-resize.png and /dev/null differ diff --git a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/wwwroot/manifests/waterfallskillbot-manifest-1.0.json b/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/wwwroot/manifests/waterfallskillbot-manifest-1.0.json deleted file mode 100644 index 414956f361..0000000000 --- a/tests/functional/Bots/DotNet/Skills/CodeFirst/WaterfallSkillBot/wwwroot/manifests/waterfallskillbot-manifest-1.0.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "$schema": "https://schemas.botframework.com/schemas/skills/v2.1/skill-manifest.json", - "$id": "WaterfallSkillBotDotNet", - "name": "WaterfallSkillBotDotNet", - "version": "1.0", - "description": "This is a skill definition for multiple activity types (implemented using waterfall dialogs).", - "publisherName": "Microsoft", - "privacyUrl": "https://microsoft.com/privacy", - "copyright": "Copyright (c) Microsoft Corporation. All rights reserved.", - "license": "https://github.com/microsoft/BotFramework-FunctionalTests/blob/main/LICENSE", - "tags": [ - "travel", - "weather", - "luis" - ], - "endpoints": [ - { - "name": "default", - "protocol": "BotFrameworkV3", - "description": "Localhost endpoint for the skill (on port 35420)", - "endpointUrl": "http://localhost:35420/api/messages", - "msAppId": "00000000-0000-0000-0000-000000000000" - } - ], - "activities": { - "bookFlight": { - "description": "Books a flight (multi turn).", - "type": "event", - "name": "BookFlight", - "value": { - "$ref": "#/definitions/bookingInfo" - }, - "resultValue": { - "$ref": "#/definitions/bookingInfo" - } - }, - "getWeather": { - "description": "Retrieves and returns the weather for the user's location.", - "type": "event", - "name": "GetWeather", - "value": { - "$ref": "#/definitions/location" - }, - "resultValue": { - "$ref": "#/definitions/weatherReport" - } - }, - "passthroughMessage": { - "type": "message", - "description": "Receives the user's utterance and attempts to resolve it using the skill's LUIS models.", - "value": { - "type": "object" - } - } - }, - "definitions": { - "bookingInfo": { - "type": "object", - "required": [ - "origin" - ], - "properties": { - "origin": { - "type": "string", - "description": "This is the origin city for the flight." - }, - "destination": { - "type": "string", - "description": "This is the destination city for the flight." - }, - "travelDate": { - "type": "string", - "description": "The date for the flight in YYYY-MM-DD format." - } - } - }, - "weatherReport": { - "type": "array", - "description": "Array of forecasts for the next week.", - "items": [ - { - "type": "string" - } - ] - }, - "location": { - "type": "object", - "description": "Location metadata.", - "properties": { - "latitude": { - "type": "number", - "title": "Latitude" - }, - "longitude": { - "type": "number", - "title": "Longitude" - }, - "postalCode": { - "type": "string", - "title": "Postal code" - } - } - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/Composer/Directory.Build.props b/tests/functional/Bots/DotNet/Skills/Composer/Directory.Build.props deleted file mode 100644 index d4378dfc87..0000000000 --- a/tests/functional/Bots/DotNet/Skills/Composer/Directory.Build.props +++ /dev/null @@ -1,15 +0,0 @@ - - - - true - - - - - $(NoWarn);SA1412;NU1701 - - - - - - \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/.gitignore b/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/.gitignore deleted file mode 100644 index eaa9cf70cc..0000000000 --- a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -# files generated during the lubuild process -# IMPORTANT: In regular composer bots the generated folder should be excluded and regenerated on the build server -# or by the dev running composer locally. But in this case we include it so we don't have to run bf luis:cross-train -# in the build server -# generated/ diff --git a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/Controllers/BotController.cs b/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/Controllers/BotController.cs deleted file mode 100644 index c9bccdb753..0000000000 --- a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/Controllers/BotController.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime.Settings; -using Microsoft.Bot.Builder.Integration.AspNet.Core; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Logging; - -namespace EchoSkillBotComposer.Controllers -{ - // This ASP Controller is created to handle a request. Dependency Injection will provide the Adapter and IBot - // implementation at runtime. Multiple different IBot implementations running at different endpoints can be - // achieved by specifying a more specific type for the bot constructor argument. - [ApiController] - public class BotController : ControllerBase - { - private readonly Dictionary _adapters = new Dictionary(); - private readonly IBot _bot; - private readonly ILogger _logger; - - public BotController( - IConfiguration configuration, - IEnumerable adapters, - IBot bot, - ILogger logger) - { - _bot = bot ?? throw new ArgumentNullException(nameof(bot)); - _logger = logger; - - var adapterSettings = configuration.GetSection(AdapterSettings.AdapterSettingsKey).Get>() ?? new List(); - adapterSettings.Add(AdapterSettings.CoreBotAdapterSettings); - - foreach (var adapter in adapters ?? throw new ArgumentNullException(nameof(adapters))) - { - var settings = adapterSettings.FirstOrDefault(s => s.Enabled && s.Type == adapter.GetType().FullName); - - if (settings != null) - { - _adapters.Add(settings.Route, adapter); - } - } - } - - [HttpPost] - [HttpGet] - [Route("api/{route}")] - public async Task PostAsync(string route) - { - if (string.IsNullOrEmpty(route)) - { - _logger.LogError($"PostAsync: No route provided."); - throw new ArgumentNullException(nameof(route)); - } - - if (_adapters.TryGetValue(route, out IBotFrameworkHttpAdapter adapter)) - { - if (_logger.IsEnabled(LogLevel.Debug)) - { - _logger.LogInformation($"PostAsync: routed '{route}' to {adapter.GetType().Name}"); - } - - // Delegate the processing of the HTTP POST to the appropriate adapter. - // The adapter will invoke the bot. - await adapter.ProcessAsync(Request, Response, _bot).ConfigureAwait(false); - } - else - { - _logger.LogError($"PostAsync: No adapter registered and enabled for route {route}."); - throw new KeyNotFoundException($"No adapter registered and enabled for route {route}."); - } - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/Controllers/SkillController.cs b/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/Controllers/SkillController.cs deleted file mode 100644 index 88c36f2b1c..0000000000 --- a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/Controllers/SkillController.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Bot.Builder; -using Microsoft.Bot.Builder.Integration.AspNet.Core; -using Microsoft.Bot.Schema; -using Microsoft.Extensions.Logging; - -namespace EchoSkillBotComposer.Controllers -{ - /// - /// A controller that handles skill replies to the bot. - /// - [ApiController] - [Route("api/skills")] - public class SkillController : ChannelServiceController - { - private readonly ILogger _logger; - - public SkillController(ChannelServiceHandlerBase handler, ILogger logger) - : base(handler) - { - _logger = logger; - } - - public override Task ReplyToActivityAsync(string conversationId, string activityId, Activity activity) - { - try - { - if (_logger.IsEnabled(LogLevel.Debug)) - { - _logger.LogDebug($"ReplyToActivityAsync: conversationId={conversationId}, activityId={activityId}"); - } - - return base.ReplyToActivityAsync(conversationId, activityId, activity); - } - catch (Exception ex) - { - _logger.LogError(ex, $"ReplyToActivityAsync: {ex}"); - throw; - } - } - - public override Task SendToConversationAsync(string conversationId, Activity activity) - { - try - { - if (_logger.IsEnabled(LogLevel.Debug)) - { - _logger.LogDebug($"SendToConversationAsync: conversationId={conversationId}"); - } - - return base.SendToConversationAsync(conversationId, activity); - } - catch (Exception ex) - { - _logger.LogError(ex, $"SendToConversationAsync: {ex}"); - throw; - } - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/EchoSkillBotComposer.botproj b/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/EchoSkillBotComposer.botproj deleted file mode 100644 index 247bba8b18..0000000000 --- a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/EchoSkillBotComposer.botproj +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/main/Composer/packages/server/schemas/botproject.schema", - "name": "EchoSkillBotComposer", - "skills": {} -} \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/EchoSkillBotComposer.csproj b/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/EchoSkillBotComposer.csproj deleted file mode 100644 index d3c03d57e2..0000000000 --- a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/EchoSkillBotComposer.csproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - netcoreapp3.1 - OutOfProcess - 720cb418-9c27-47a3-b473-1b8771598297 - - - - PreserveNewest - - - - - - - - - \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/Program.cs b/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/Program.cs deleted file mode 100644 index b9cc275c38..0000000000 --- a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/Program.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime.Extensions; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Hosting; - -namespace EchoSkillBotComposer -{ - public class Program - { - public static void Main(string[] args) - { - CreateHostBuilder(args).Build().Run(); - } - - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureAppConfiguration((hostingContext, builder) => - { - var applicationRoot = AppDomain.CurrentDomain.BaseDirectory; - var environmentName = hostingContext.HostingEnvironment.EnvironmentName; - var settingsDirectory = "settings"; - - builder.AddBotRuntimeConfiguration(applicationRoot, settingsDirectory, environmentName); - - builder.AddCommandLine(args); - }) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup(); - }); - } -} \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/Properties/launchSettings.json b/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/Properties/launchSettings.json deleted file mode 100644 index 5e20497847..0000000000 --- a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/Properties/launchSettings.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:35410/", - "sslPort": 0 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": false, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "EchoSkillBotComposerDotNet": { - "commandName": "Project", - "launchBrowser": false, - "applicationUrl": "http://localhost:35410", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/README.md b/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/README.md deleted file mode 100644 index b48822a762..0000000000 --- a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# Welcome to your new bot - -This bot project was created using the Empty Bot template, and contains a minimal set of files necessary to have a working bot. - -## Next steps - -### Start building your bot - -Composer can help guide you through getting started building your bot. From your bot settings page (the wrench icon on the left navigation rail), click on the rocket-ship icon on the top right for some quick navigation links. - -Another great resource if you're just getting started is the **[guided tutorial](https://docs.microsoft.com/en-us/composer/tutorial/tutorial-introduction)** in our documentation. - -### Connect with your users - -Your bot comes pre-configured to connect to our Web Chat and DirectLine channels, but there are many more places you can connect your bot to - including Microsoft Teams, Telephony, DirectLine Speech, Slack, Facebook, Outlook and more. Check out all of the places you can connect to on the bot settings page. - -### Publish your bot to Azure from Composer - -Composer can help you provision the Azure resources necessary for your bot, and publish your bot to them. To get started, create a publishing profile from your bot settings page in Composer (the wrench icon on the left navigation rail). Make sure you only provision the optional Azure resources you need! - -### Extend your bot with packages - -From Package Manager in Composer you can find useful packages to help add additional pre-built functionality you can add to your bot - everything from simple dialogs & custom actions for working with specific scenarios to custom adapters for connecting your bot to users on clients like Facebook or Slack. - -### Extend your bot with code - -You can also extend your bot with code - simply open up the folder that was generated for you in the location you chose during the creation process with your favorite IDE (like Visual Studio). You can do things like create custom actions that can be used during dialog flows, create custom middleware to pre-process (or post-process) messages, and more. See [our documentation](https://aka.ms/bf-extend-with-code) for more information. diff --git a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/Startup.cs b/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/Startup.cs deleted file mode 100644 index dae17d4283..0000000000 --- a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/Startup.cs +++ /dev/null @@ -1,56 +0,0 @@ -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.StaticFiles; -using Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime.Extensions; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; - -namespace EchoSkillBotComposer -{ - public class Startup - { - public Startup(IConfiguration configuration) - { - Configuration = configuration; - } - - public IConfiguration Configuration { get; } - - // This method gets called by the runtime. Use this method to add services to the container. - public void ConfigureServices(IServiceCollection services) - { - services.AddControllers().AddNewtonsoftJson(); - services.AddBotRuntime(Configuration); - } - - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IWebHostEnvironment env) - { - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - } - - app.UseDefaultFiles(); - - // Set up custom content types - associating file extension to MIME type. - var provider = new FileExtensionContentTypeProvider(); - provider.Mappings[".lu"] = "application/vnd.microsoft.lu"; - provider.Mappings[".qna"] = "application/vnd.microsoft.qna"; - - // Expose static files in manifests folder for skill scenarios. - app.UseStaticFiles(new StaticFileOptions - { - ContentTypeProvider = provider - }); - app.UseWebSockets(); - app.UseRouting(); - app.UseAuthorization(); - app.UseEndpoints(endpoints => - { - endpoints.MapControllers(); - }); - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/dialogs/emptyBot/knowledge-base/en-us/emptyBot.en-us.qna b/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/dialogs/emptyBot/knowledge-base/en-us/emptyBot.en-us.qna deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/echoskillbotcomposer.dialog b/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/echoskillbotcomposer.dialog deleted file mode 100644 index 5abf65c6df..0000000000 --- a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/echoskillbotcomposer.dialog +++ /dev/null @@ -1,115 +0,0 @@ -{ - "$kind": "Microsoft.AdaptiveDialog", - "$designer": { - "name": "EchoSkillBotComposer", - "description": "", - "id": "A79tBe" - }, - "autoEndDialog": true, - "defaultResultProperty": "dialog.result", - "triggers": [ - { - "$kind": "Microsoft.OnConversationUpdateActivity", - "$designer": { - "id": "376720" - }, - "actions": [ - { - "$kind": "Microsoft.Foreach", - "$designer": { - "id": "518944", - "name": "Loop: for each item" - }, - "itemsProperty": "turn.Activity.membersAdded", - "actions": [ - { - "$kind": "Microsoft.IfCondition", - "$designer": { - "id": "641773", - "name": "Branch: if/else" - }, - "condition": "string(dialog.foreach.value.id) != string(turn.Activity.Recipient.id)", - "actions": [ - { - "$kind": "Microsoft.SendActivity", - "$designer": { - "id": "859266", - "name": "Send a response" - }, - "activity": "${SendActivity_Greeting()}" - } - ] - } - ] - } - ] - }, - { - "$kind": "Microsoft.OnUnknownIntent", - "$designer": { - "id": "mb2n1u" - }, - "actions": [ - { - "$kind": "Microsoft.SendActivity", - "$designer": { - "id": "kMjqz1" - }, - "activity": "${SendActivity_DidNotUnderstand()}" - } - ] - }, - { - "$kind": "Microsoft.OnMessageActivity", - "$designer": { - "id": "esM1JY" - }, - "actions": [ - { - "$kind": "Microsoft.IfCondition", - "$designer": { - "id": "SK42Qt" - }, - "condition": "turn.activity.text != 'end' && turn.activity.text != 'stop'", - "actions": [ - { - "$kind": "Microsoft.SendActivity", - "$designer": { - "id": "HHAFpn" - }, - "activity": "${SendActivity_HHAFpn()}" - }, - { - "$kind": "Microsoft.SendActivity", - "$designer": { - "id": "dZ2zwR" - }, - "activity": "${SendActivity_dZ2zwR()}" - }, - { - "$kind": "Microsoft.EndTurn", - "$designer": { - "id": "YzX0HZ" - } - } - ], - "elseActions": [ - { - "$kind": "Microsoft.SendActivity", - "$designer": { - "id": "xvwomh" - }, - "activity": "${SendActivity_xvwomh()}" - } - ] - } - ] - } - ], - "generator": "EchoSkillBotComposer.lg", - "id": "EchoSkillBotComposer", - "recognizer": { - "$kind": "Microsoft.RegexRecognizer", - "intents": [] - } -} diff --git a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/generated/interruption/EchoSkillBotComposer.en-us.lu b/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/generated/interruption/EchoSkillBotComposer.en-us.lu deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/generated/interruption/EchoSkillBotComposer.en-us.qna b/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/generated/interruption/EchoSkillBotComposer.en-us.qna deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/knowledge-base/en-us/echoskillbotcomposer.en-us.qna b/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/knowledge-base/en-us/echoskillbotcomposer.en-us.qna deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/language-generation/en-us/common.en-us.lg b/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/language-generation/en-us/common.en-us.lg deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/language-generation/en-us/echoskillbotcomposer.en-us.lg b/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/language-generation/en-us/echoskillbotcomposer.en-us.lg deleted file mode 100644 index f49f92107e..0000000000 --- a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/language-generation/en-us/echoskillbotcomposer.en-us.lg +++ /dev/null @@ -1,31 +0,0 @@ -[import](common.lg) - -# SendActivity_Greeting() -[Activity - Text = Welcome to EchoSkillBotComposerDotNet. -] - -# SendActivity_DidNotUnderstand() -[Activity - Text = ${SendActivity_DidNotUnderstand_text()} -] - -# SendActivity_DidNotUnderstand_text() -- Sorry, I didn't get that. -# SendActivity_HHAFpn() -[Activity - Text = Echo: ${turn.activity.text} - InputHint = acceptingInput -] - -# SendActivity_dZ2zwR() -[Activity - Text = Say "end" or "stop" and I'll end the conversation and back to the parent. - InputHint = acceptingInput -] - -# SendActivity_xvwomh() -[Activity - Text = Ending conversation from the skill... - InputHint = acceptingInput -] diff --git a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/language-understanding/en-us/echoskillbotcomposer.en-us.lu b/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/language-understanding/en-us/echoskillbotcomposer.en-us.lu deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/manifests/echoskillbotcomposer-manifest.json b/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/manifests/echoskillbotcomposer-manifest.json deleted file mode 100644 index 25205b9286..0000000000 --- a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/manifests/echoskillbotcomposer-manifest.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "https://schemas.botframework.com/schemas/skills/v2.1/skill-manifest.json", - "$id": "EchoSkillBotComposerDotNet", - "name": "EchoSkillBotComposerDotNet", - "version": "1.0", - "description": "This is a skill for echoing what the user sent to the bot (using Composer with the dotnet runtime).", - "publisherName": "Microsoft", - "privacyUrl": "https://microsoft.com/privacy", - "copyright": "Copyright (c) Microsoft Corporation. All rights reserved.", - "license": "https://github.com/microsoft/BotFramework-FunctionalTests/blob/main/LICENSE", - "tags": [ - "echo" - ], - "endpoints": [ - { - "name": "default", - "protocol": "BotFrameworkV3", - "description": "Localhost endpoint for the skill (on port 35410)", - "endpointUrl": "http://localhost:35410/api/messages", - "msAppId": "00000000-0000-0000-0000-000000000000" - } - ] -} \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/media/create-azure-resource-command-line.png b/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/media/create-azure-resource-command-line.png deleted file mode 100644 index 497eb8e649..0000000000 Binary files a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/media/create-azure-resource-command-line.png and /dev/null differ diff --git a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/media/publish-az-login.png b/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/media/publish-az-login.png deleted file mode 100644 index 4e721354bc..0000000000 Binary files a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/media/publish-az-login.png and /dev/null differ diff --git a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/schemas/sdk.schema b/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/schemas/sdk.schema deleted file mode 100644 index ee34876994..0000000000 --- a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/schemas/sdk.schema +++ /dev/null @@ -1,10312 +0,0 @@ -{ - "$schema": "https://schemas.botframework.com/schemas/component/v1.0/component.schema", - "type": "object", - "title": "Component kinds", - "description": "These are all of the kinds that can be created by the loader.", - "oneOf": [ - { - "$ref": "#/definitions/Microsoft.ActivityTemplate" - }, - { - "$ref": "#/definitions/Microsoft.AdaptiveDialog" - }, - { - "$ref": "#/definitions/Microsoft.AgeEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.Ask" - }, - { - "$ref": "#/definitions/Microsoft.AttachmentInput" - }, - { - "$ref": "#/definitions/Microsoft.BeginDialog" - }, - { - "$ref": "#/definitions/Microsoft.BeginSkill" - }, - { - "$ref": "#/definitions/Microsoft.BreakLoop" - }, - { - "$ref": "#/definitions/Microsoft.CancelAllDialogs" - }, - { - "$ref": "#/definitions/Microsoft.CancelDialog" - }, - { - "$ref": "#/definitions/Microsoft.ChannelMentionEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.ChoiceInput" - }, - { - "$ref": "#/definitions/Microsoft.ConditionalSelector" - }, - { - "$ref": "#/definitions/Microsoft.ConfirmationEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.ConfirmInput" - }, - { - "$ref": "#/definitions/Microsoft.ContinueConversation" - }, - { - "$ref": "#/definitions/Microsoft.ContinueConversationLater" - }, - { - "$ref": "#/definitions/Microsoft.ContinueLoop" - }, - { - "$ref": "#/definitions/Microsoft.CrossTrainedRecognizerSet" - }, - { - "$ref": "#/definitions/Microsoft.CurrencyEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.DateTimeEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.DateTimeInput" - }, - { - "$ref": "#/definitions/Microsoft.DebugBreak" - }, - { - "$ref": "#/definitions/Microsoft.DeleteActivity" - }, - { - "$ref": "#/definitions/Microsoft.DeleteProperties" - }, - { - "$ref": "#/definitions/Microsoft.DeleteProperty" - }, - { - "$ref": "#/definitions/Microsoft.DimensionEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.EditActions" - }, - { - "$ref": "#/definitions/Microsoft.EditArray" - }, - { - "$ref": "#/definitions/Microsoft.EmailEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.EmitEvent" - }, - { - "$ref": "#/definitions/Microsoft.EndDialog" - }, - { - "$ref": "#/definitions/Microsoft.EndTurn" - }, - { - "$ref": "#/definitions/Microsoft.FirstSelector" - }, - { - "$ref": "#/definitions/Microsoft.Foreach" - }, - { - "$ref": "#/definitions/Microsoft.ForeachPage" - }, - { - "$ref": "#/definitions/Microsoft.GetActivityMembers" - }, - { - "$ref": "#/definitions/Microsoft.GetConversationMembers" - }, - { - "$ref": "#/definitions/Microsoft.GetConversationReference" - }, - { - "$ref": "#/definitions/Microsoft.GotoAction" - }, - { - "$ref": "#/definitions/Microsoft.GuidEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.HashtagEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.HttpRequest" - }, - { - "$ref": "#/definitions/Microsoft.IfCondition" - }, - { - "$ref": "#/definitions/Microsoft.IpEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.LogAction" - }, - { - "$ref": "#/definitions/Microsoft.LuisRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.MentionEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.MostSpecificSelector" - }, - { - "$ref": "#/definitions/Microsoft.MultiLanguageRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.NumberEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.NumberInput" - }, - { - "$ref": "#/definitions/Microsoft.NumberRangeEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.OAuthInput" - }, - { - "$ref": "#/definitions/Microsoft.OnActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnAssignEntity" - }, - { - "$ref": "#/definitions/Microsoft.OnBeginDialog" - }, - { - "$ref": "#/definitions/Microsoft.OnCancelDialog" - }, - { - "$ref": "#/definitions/Microsoft.OnChooseEntity" - }, - { - "$ref": "#/definitions/Microsoft.OnChooseIntent" - }, - { - "$ref": "#/definitions/Microsoft.OnChooseProperty" - }, - { - "$ref": "#/definitions/Microsoft.OnCommandActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnCommandResultActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnCondition" - }, - { - "$ref": "#/definitions/Microsoft.OnContinueConversation" - }, - { - "$ref": "#/definitions/Microsoft.OnConversationUpdateActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnDialogEvent" - }, - { - "$ref": "#/definitions/Microsoft.OnEndOfActions" - }, - { - "$ref": "#/definitions/Microsoft.OnEndOfConversationActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnError" - }, - { - "$ref": "#/definitions/Microsoft.OnEventActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnHandoffActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnInstallationUpdateActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnIntent" - }, - { - "$ref": "#/definitions/Microsoft.OnInvokeActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnMessageActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnMessageDeleteActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnMessageReactionActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnMessageUpdateActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnQnAMatch" - }, - { - "$ref": "#/definitions/Microsoft.OnRepromptDialog" - }, - { - "$ref": "#/definitions/Microsoft.OnTypingActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnUnknownIntent" - }, - { - "$ref": "#/definitions/Microsoft.OrdinalEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.PercentageEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.PhoneNumberEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.QnAMakerDialog" - }, - { - "$ref": "#/definitions/Microsoft.QnAMakerRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.RandomSelector" - }, - { - "$ref": "#/definitions/Microsoft.RecognizerSet" - }, - { - "$ref": "#/definitions/Microsoft.RegexEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.RegexRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.RepeatDialog" - }, - { - "$ref": "#/definitions/Microsoft.ReplaceDialog" - }, - { - "$ref": "#/definitions/Microsoft.ResourceMultiLanguageGenerator" - }, - { - "$ref": "#/definitions/Microsoft.SendActivity" - }, - { - "$ref": "#/definitions/Microsoft.SendHandoffActivity" - }, - { - "$ref": "#/definitions/Microsoft.SetProperties" - }, - { - "$ref": "#/definitions/Microsoft.SetProperty" - }, - { - "$ref": "#/definitions/Microsoft.SignOutUser" - }, - { - "$ref": "#/definitions/Microsoft.StaticActivityTemplate" - }, - { - "$ref": "#/definitions/Microsoft.SwitchCondition" - }, - { - "$ref": "#/definitions/Microsoft.TelemetryTrackEventAction" - }, - { - "$ref": "#/definitions/Microsoft.TemperatureEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.TemplateEngineLanguageGenerator" - }, - { - "$ref": "#/definitions/Microsoft.TextInput" - }, - { - "$ref": "#/definitions/Microsoft.TextTemplate" - }, - { - "$ref": "#/definitions/Microsoft.ThrowException" - }, - { - "$ref": "#/definitions/Microsoft.TraceActivity" - }, - { - "$ref": "#/definitions/Microsoft.TrueSelector" - }, - { - "$ref": "#/definitions/Microsoft.UpdateActivity" - }, - { - "$ref": "#/definitions/Microsoft.UrlEntityRecognizer" - } - ], - "definitions": { - "arrayExpression": { - "$role": "expression", - "title": "Array or expression", - "description": "Array or expression to evaluate.", - "oneOf": [ - { - "type": "array", - "title": "Array", - "description": "Array constant." - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "booleanExpression": { - "$role": "expression", - "title": "Boolean or expression", - "description": "Boolean constant or expression to evaluate.", - "oneOf": [ - { - "type": "boolean", - "title": "Boolean", - "description": "Boolean constant.", - "default": false, - "examples": [ - false - ] - }, - { - "$ref": "#/definitions/equalsExpression", - "examples": [ - "=user.isVip" - ] - } - ] - }, - "component": { - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "condition": { - "$role": "expression", - "title": "Boolean condition", - "description": "Boolean constant or expression to evaluate.", - "oneOf": [ - { - "$ref": "#/definitions/expression" - }, - { - "type": "boolean", - "title": "Boolean", - "description": "Boolean value.", - "default": true, - "examples": [ - false - ] - } - ] - }, - "equalsExpression": { - "$role": "expression", - "type": "string", - "title": "Expression", - "description": "Expression starting with =.", - "pattern": "^=.*\\S.*", - "examples": [ - "=user.name" - ] - }, - "expression": { - "$role": "expression", - "type": "string", - "title": "Expression", - "description": "Expression to evaluate.", - "pattern": "^.*\\S.*", - "examples": [ - "user.age > 13" - ] - }, - "integerExpression": { - "$role": "expression", - "title": "Integer or expression", - "description": "Integer constant or expression to evaluate.", - "oneOf": [ - { - "type": "integer", - "title": "Integer", - "description": "Integer constant.", - "default": 0, - "examples": [ - 15 - ] - }, - { - "$ref": "#/definitions/equalsExpression", - "examples": [ - "=user.age" - ] - } - ] - }, - "Microsoft.ActivityTemplate": { - "$role": "implements(Microsoft.IActivityTemplate)", - "title": "Microsoft activity template", - "type": "object", - "required": [ - "template", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "template": { - "title": "Template", - "description": "Language Generator template to use to create the activity", - "type": "string" - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.ActivityTemplate" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.AdaptiveDialog": { - "$role": "implements(Microsoft.IDialog)", - "title": "Adaptive dialog", - "description": "Flexible, data driven dialog that can adapt to the conversation.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "pattern": "^(?!(=)).*", - "title": "Id", - "description": "Optional dialog ID." - }, - "autoEndDialog": { - "$ref": "#/definitions/booleanExpression", - "title": "Auto end dialog", - "description": "If set to true the dialog will automatically end when there are no further actions. If set to false, remember to manually end the dialog using EndDialog action.", - "default": true - }, - "defaultResultProperty": { - "type": "string", - "title": "Default result property", - "description": "Value that will be passed back to the parent dialog.", - "default": "dialog.result" - }, - "dialogs": { - "type": "array", - "title": "Dialogs", - "description": "Dialogs added to DialogSet.", - "items": { - "$kind": "Microsoft.IDialog", - "title": "Dialog", - "description": "Dialog to add to DialogSet.", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "recognizer": { - "$kind": "Microsoft.IRecognizer", - "title": "Recognizer", - "description": "Input recognizer that interprets user input into intent and entities.", - "$ref": "#/definitions/Microsoft.IRecognizer" - }, - "generator": { - "$kind": "Microsoft.ILanguageGenerator", - "title": "Language generator", - "description": "Language generator that generates bot responses.", - "$ref": "#/definitions/Microsoft.ILanguageGenerator" - }, - "selector": { - "$kind": "Microsoft.ITriggerSelector", - "title": "Selector", - "description": "Policy to determine which trigger is executed. Defaults to a 'best match' selector (optional).", - "$ref": "#/definitions/Microsoft.ITriggerSelector" - }, - "triggers": { - "type": "array", - "description": "List of triggers defined for this dialog.", - "title": "Triggers", - "items": { - "$kind": "Microsoft.ITrigger", - "title": "Event triggers", - "description": "Event triggers for handling events.", - "$ref": "#/definitions/Microsoft.ITrigger" - } - }, - "schema": { - "title": "Schema", - "description": "Schema to fill in.", - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "string", - "title": "Reference to JSON schema", - "description": "Reference to JSON schema .dialog file." - } - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.AdaptiveDialog" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.AgeEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Age entity recognizer", - "description": "Recognizer which recognizes age.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.AgeEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.Ask": { - "$role": [ - "implements(Microsoft.IDialog)", - "extends(Microsoft.SendActivity)" - ], - "title": "Send activity to ask a question", - "description": "This is an action which sends an activity to the user when a response is expected", - "type": "object", - "$policies": { - "interactive": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "expectedProperties": { - "$ref": "#/definitions/arrayExpression", - "title": "Expected properties", - "description": "Properties expected from the user.", - "examples": [ - [ - "age", - "name" - ] - ], - "items": { - "type": "string", - "title": "Name", - "description": "Name of the property" - } - }, - "defaultOperation": { - "$ref": "#/definitions/stringExpression", - "title": "Default operation", - "description": "Sets the default operation that will be used when no operation is recognized in the response to this Ask.", - "examples": [ - "Add()", - "Remove()" - ] - }, - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action." - }, - "activity": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Activity", - "description": "Activity to send.", - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.Ask" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.AttachmentInput": { - "$role": [ - "implements(Microsoft.IDialog)", - "extends(Microsoft.InputDialog)" - ], - "title": "Attachment input dialog", - "description": "Collect information - Ask for a file or image.", - "$policies": { - "interactive": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "type": "object", - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "defaultValue": { - "$role": "expression", - "title": "Default value", - "description": "'Property' will be set to the object or the result of this expression when max turn count is exceeded.", - "oneOf": [ - { - "$ref": "#/definitions/botframework.json/definitions/Attachment", - "title": "Object", - "description": "Attachment object." - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "value": { - "$role": "expression", - "title": "Value", - "description": "'Property' will be set to the object or the result of this expression unless it evaluates to null.", - "oneOf": [ - { - "$ref": "#/definitions/botframework.json/definitions/Attachment", - "title": "Object", - "description": "Attachment object." - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "outputFormat": { - "$role": "expression", - "title": "Output format", - "description": "Attachment output format.", - "oneOf": [ - { - "type": "string", - "title": "Standard format", - "description": "Standard output formats.", - "enum": [ - "all", - "first" - ], - "default": "first" - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "default": false, - "examples": [ - false, - "=user.isVip" - ] - }, - "prompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Initial prompt", - "description": "Message to send to collect information.", - "examples": [ - "What is your birth date?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "unrecognizedPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Unrecognized prompt", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "invalidPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Invalid prompt", - "description": "Message to send when the user input does not meet any validation expression.", - "examples": [ - "Sorry, '{this.value}' does not work. I need a number between 1-150. What is your age?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "defaultValueResponse": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Default value response", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "maxTurnCount": { - "$ref": "#/definitions/integerExpression", - "title": "Max turn count", - "description": "Maximum number of re-prompt attempts to collect information.", - "default": 3, - "minimum": 0, - "maximum": 2147483647, - "examples": [ - 3, - "=settings.xyz" - ] - }, - "validations": { - "type": "array", - "title": "Validation expressions", - "description": "Expression to validate user input.", - "items": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Expression which needs to met for the input to be considered valid", - "examples": [ - "int(this.value) > 1 && int(this.value) <= 150", - "count(this.value) < 300" - ] - } - }, - "property": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property to store collected information. Input will be skipped if property has value (unless 'Always prompt' is true).", - "examples": [ - "$birthday", - "dialog.${user.name}", - "=f(x)" - ] - }, - "alwaysPrompt": { - "$ref": "#/definitions/booleanExpression", - "title": "Always prompt", - "description": "Collect information even if the specified 'property' is not empty.", - "default": false, - "examples": [ - false, - "=$val" - ] - }, - "allowInterruptions": { - "$ref": "#/definitions/booleanExpression", - "title": "Allow Interruptions", - "description": "A boolean expression that determines whether the parent should be allowed to interrupt the input.", - "default": true, - "examples": [ - true, - "=user.xyz" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.AttachmentInput" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.BeginDialog": { - "$role": "implements(Microsoft.IDialog)", - "title": "Begin a dialog", - "description": "Begin another dialog.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "dialog": { - "oneOf": [ - { - "$kind": "Microsoft.IDialog", - "pattern": "^(?!(=)).*", - "title": "Dialog", - "$ref": "#/definitions/Microsoft.IDialog" - }, - { - "$ref": "#/definitions/equalsExpression" - } - ], - "title": "Dialog name", - "description": "Name of the dialog to call." - }, - "options": { - "$ref": "#/definitions/objectExpression", - "title": "Options", - "description": "One or more options that are passed to the dialog that is called.", - "examples": [ - { - "arg1": "=expression" - } - ], - "additionalProperties": { - "type": "string", - "title": "Options", - "description": "Options for dialog." - } - }, - "activityProcessed": { - "$ref": "#/definitions/booleanExpression", - "title": "Activity processed", - "description": "When set to false, the dialog that is called can process the current activity.", - "default": true - }, - "resultProperty": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property to store any value returned by the dialog that is called.", - "examples": [ - "dialog.userName" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.BeginDialog" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.BeginSkill": { - "$role": "implements(Microsoft.IDialog)", - "title": "Begin a skill", - "description": "Begin a remote skill.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the skill dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - true, - "=f(x)" - ] - }, - "activityProcessed": { - "$ref": "#/definitions/booleanExpression", - "title": "Activity processed", - "description": "When set to false, the skill will be started using the activity in the current turn context instead of the activity in the Activity property.", - "default": true, - "examples": [ - true, - "=f(x)" - ] - }, - "resultProperty": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property to store any value returned by the dialog that is called.", - "examples": [ - "dialog.userName" - ] - }, - "botId": { - "$ref": "#/definitions/stringExpression", - "title": "Skill host bot ID", - "description": "The Microsoft App ID that will be calling the skill.", - "default": "=settings.MicrosoftAppId" - }, - "skillHostEndpoint": { - "$ref": "#/definitions/stringExpression", - "title": "Skill host", - "description": "The callback Url for the skill host.", - "default": "=settings.skillHostEndpoint", - "examples": [ - "https://mybot.contoso.com/api/skills/" - ] - }, - "connectionName": { - "$ref": "#/definitions/stringExpression", - "title": "OAuth connection name (SSO)", - "description": "The OAuth Connection Name, that would be used to perform Single SignOn with a skill.", - "default": "=settings.connectionName" - }, - "skillAppId": { - "$ref": "#/definitions/stringExpression", - "title": "Skill App Id", - "description": "The Microsoft App ID for the skill." - }, - "skillEndpoint": { - "$ref": "#/definitions/stringExpression", - "title": "Skill endpoint ", - "description": "The /api/messages endpoint for the skill.", - "examples": [ - "https://myskill.contoso.com/api/messages/" - ] - }, - "activity": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Activity", - "description": "The activity to send to the skill.", - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "allowInterruptions": { - "$ref": "#/definitions/booleanExpression", - "title": "Allow interruptions", - "description": "A boolean expression that determines whether the parent should be allowed to interrupt the skill.", - "default": true, - "examples": [ - true, - "=user.xyz" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.BeginSkill" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.BreakLoop": { - "$role": "implements(Microsoft.IDialog)", - "title": "Break loop", - "description": "Stop executing this loop", - "type": "object", - "required": [ - "$kind" - ], - "$policies": { - "lastAction": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.BreakLoop" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.CancelAllDialogs": { - "$role": "implements(Microsoft.IDialog)", - "title": "Cancel all dialogs", - "description": "Cancel all active dialogs. All dialogs in the dialog chain will need a trigger to capture the event configured in this action.", - "type": "object", - "$policies": { - "lastAction": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "activityProcessed": { - "$ref": "#/definitions/booleanExpression", - "title": "Activity processed", - "description": "When set to false, the caller dialog is told it should process the current activity.", - "default": true - }, - "eventName": { - "$ref": "#/definitions/stringExpression", - "title": "Event name", - "description": "Name of the event to emit." - }, - "eventValue": { - "$ref": "#/definitions/valueExpression", - "title": "Event value", - "description": "Value to emit with the event (optional).", - "additionalProperties": true - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.CancelAllDialogs" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.CancelDialog": { - "$role": "implements(Microsoft.IDialog)", - "title": "Cancel all dialogs", - "description": "Cancel all active dialogs. All dialogs in the dialog chain will need a trigger to capture the event configured in this action.", - "type": "object", - "$policies": { - "lastAction": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "activityProcessed": { - "$ref": "#/definitions/booleanExpression", - "title": "Activity processed", - "description": "When set to false, the caller dialog is told it should process the current activity.", - "default": true - }, - "eventName": { - "$ref": "#/definitions/stringExpression", - "title": "Event name", - "description": "Name of the event to emit." - }, - "eventValue": { - "$ref": "#/definitions/valueExpression", - "title": "Event value", - "description": "Value to emit with the event (optional).", - "additionalProperties": true - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.CancelDialog" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.ChannelMentionEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)" - ], - "title": "Channel mention entity recognizer", - "description": "Promotes mention entities passed by a channel via the activity.entities into recognizer result.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.ChannelMentionEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.ChoiceInput": { - "$role": [ - "implements(Microsoft.IDialog)", - "extends(Microsoft.InputDialog)" - ], - "title": "Choice input dialog", - "description": "Collect information - Pick from a list of choices", - "type": "object", - "$policies": { - "interactive": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "defaultValue": { - "$ref": "#/definitions/stringExpression", - "title": "Default value", - "description": "'Property' will be set to the value of this expression when max turn count is exceeded.", - "examples": [ - "hello world", - "Hello ${user.name}", - "=concat(user.firstname, user.lastName)" - ] - }, - "value": { - "$ref": "#/definitions/stringExpression", - "title": "Value", - "description": "'Property' will be set to the value of this expression unless it evaluates to null.", - "examples": [ - "hello world", - "Hello ${user.name}", - "=concat(user.firstname, user.lastName)" - ] - }, - "outputFormat": { - "$role": "expression", - "title": "Output format", - "description": "Sets the desired choice output format (either value or index into choices).", - "oneOf": [ - { - "type": "string", - "title": "Standard", - "description": "Standard output format.", - "enum": [ - "value", - "index" - ], - "default": "value" - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "choices": { - "$role": "expression", - "title": "Array of choices", - "description": "Choices to choose from.", - "oneOf": [ - { - "type": "array", - "title": "Simple choices", - "description": "Simple choices to choose from.", - "items": [ - { - "type": "string", - "title": "Simple choice", - "description": "One choice for choice input." - } - ] - }, - { - "type": "array", - "title": "Structured choices", - "description": "Choices that allow full control.", - "items": [ - { - "type": "object", - "title": "Structured choice", - "description": "Structured choice to choose from.", - "properties": { - "value": { - "type": "string", - "title": "Value", - "description": "Value to return when this choice is selected." - }, - "action": { - "$ref": "#/definitions/botframework.json/definitions/CardAction", - "title": "Action", - "description": "Card action for the choice." - }, - "synonyms": { - "type": "array", - "title": "Synonyms", - "description": "List of synonyms to recognize in addition to the value (optional).", - "items": { - "type": "string", - "title": "Synonym", - "description": "Synonym for value." - } - } - } - } - ] - }, - { - "$ref": "#/definitions/stringExpression" - } - ] - }, - "defaultLocale": { - "$ref": "#/definitions/stringExpression", - "title": "Default locale", - "description": "The default locale to use to parse confirmation choices if there is not one passed by the caller.", - "default": "en-us", - "examples": [ - "en-us" - ] - }, - "style": { - "$role": "expression", - "title": "List style", - "description": "Sets the ListStyle to control how choices are rendered.", - "oneOf": [ - { - "type": "string", - "title": "List style", - "description": "Standard list style.", - "enum": [ - "none", - "auto", - "inline", - "list", - "suggestedAction", - "heroCard" - ], - "default": "auto" - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "choiceOptions": { - "title": "Choice options", - "description": "Sets the choice options used for controlling how choices are combined.", - "oneOf": [ - { - "type": "object", - "title": "Object", - "description": "Choice options object.", - "properties": { - "inlineSeparator": { - "type": "string", - "title": "Inline separator", - "description": "Character used to separate individual choices when there are more than 2 choices", - "default": ", " - }, - "inlineOr": { - "type": "string", - "title": "Inline or", - "description": "Separator inserted between the choices when there are only 2 choices", - "default": " or " - }, - "inlineOrMore": { - "type": "string", - "title": "Inline or more", - "description": "Separator inserted between the last 2 choices when their are more than 2 choices.", - "default": ", or " - }, - "includeNumbers": { - "type": "boolean", - "title": "Include numbers", - "description": "If true, 'inline' and 'list' list style will be prefixed with the index of the choice.", - "default": true - } - } - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "recognizerOptions": { - "title": "Recognizer options", - "description": "Sets how to recognize choices in the response", - "oneOf": [ - { - "type": "object", - "title": "Object", - "description": "Options for recognizer.", - "properties": { - "noValue": { - "type": "boolean", - "title": "No value", - "description": "If true, the choices value field will NOT be search over", - "default": false - }, - "noAction": { - "type": "boolean", - "title": "No action", - "description": "If true, the choices action.title field will NOT be searched over", - "default": false - }, - "recognizeNumbers": { - "type": "boolean", - "title": "Recognize numbers", - "description": "If true, the number recognizer will be used to recognize an index response (1,2,3...) to the prompt.", - "default": true - }, - "recognizeOrdinals": { - "type": "boolean", - "title": "Recognize ordinals", - "description": "If true, the ordinal recognizer will be used to recognize ordinal response (first/second/...) to the prompt.", - "default": true - } - } - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "default": false, - "examples": [ - false, - "=user.isVip" - ] - }, - "prompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Initial prompt", - "description": "Message to send to collect information.", - "examples": [ - "What is your birth date?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "unrecognizedPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Unrecognized prompt", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "invalidPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Invalid prompt", - "description": "Message to send when the user input does not meet any validation expression.", - "examples": [ - "Sorry, '{this.value}' does not work. I need a number between 1-150. What is your age?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "defaultValueResponse": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Default value response", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "maxTurnCount": { - "$ref": "#/definitions/integerExpression", - "title": "Max turn count", - "description": "Maximum number of re-prompt attempts to collect information.", - "default": 3, - "minimum": 0, - "maximum": 2147483647, - "examples": [ - 3, - "=settings.xyz" - ] - }, - "validations": { - "type": "array", - "title": "Validation expressions", - "description": "Expression to validate user input.", - "items": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Expression which needs to met for the input to be considered valid", - "examples": [ - "int(this.value) > 1 && int(this.value) <= 150", - "count(this.value) < 300" - ] - } - }, - "property": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property to store collected information. Input will be skipped if property has value (unless 'Always prompt' is true).", - "examples": [ - "$birthday", - "dialog.${user.name}", - "=f(x)" - ] - }, - "alwaysPrompt": { - "$ref": "#/definitions/booleanExpression", - "title": "Always prompt", - "description": "Collect information even if the specified 'property' is not empty.", - "default": false, - "examples": [ - false, - "=$val" - ] - }, - "allowInterruptions": { - "$ref": "#/definitions/booleanExpression", - "title": "Allow Interruptions", - "description": "A boolean expression that determines whether the parent should be allowed to interrupt the input.", - "default": true, - "examples": [ - true, - "=user.xyz" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.ChoiceInput" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.ConditionalSelector": { - "$role": "implements(Microsoft.ITriggerSelector)", - "title": "Conditional trigger selector", - "description": "Use a rule selector based on a condition", - "type": "object", - "required": [ - "condition", - "ifTrue", - "ifFalse", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Expression to evaluate" - }, - "ifTrue": { - "$kind": "Microsoft.ITriggerSelector", - "$ref": "#/definitions/Microsoft.ITriggerSelector" - }, - "ifFalse": { - "$kind": "Microsoft.ITriggerSelector", - "$ref": "#/definitions/Microsoft.ITriggerSelector" - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.ConditionalSelector" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.ConfirmationEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Confirmation entity recognizer", - "description": "Recognizer which recognizes confirmation choices (yes/no).", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.ConfirmationEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.ConfirmInput": { - "$role": [ - "implements(Microsoft.IDialog)", - "extends(Microsoft.InputDialog)" - ], - "title": "Confirm input dialog", - "description": "Collect information - Ask for confirmation (yes or no).", - "type": "object", - "$policies": { - "interactive": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "outputFormat": { - "$ref": "#/definitions/valueExpression", - "title": "Output format", - "description": "Optional expression to use to format the output.", - "examples": [ - "=concat('confirmation:', this.value)" - ] - }, - "defaultLocale": { - "$ref": "#/definitions/stringExpression", - "title": "Default locale", - "description": "The Default locale or an expression which provides the default locale to use as default if not found in the activity.", - "default": "en-us", - "examples": [ - "en-us" - ] - }, - "style": { - "$role": "expression", - "title": "List style", - "description": "Sets the ListStyle to control how choices are rendered.", - "oneOf": [ - { - "type": "string", - "title": "Standard style", - "description": "Standard style for rendering choices.", - "enum": [ - "none", - "auto", - "inline", - "list", - "suggestedAction", - "heroCard" - ], - "default": "auto" - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "choiceOptions": { - "title": "Choice options", - "description": "Choice Options or expression which provides Choice Options to control display choices to the user.", - "oneOf": [ - { - "type": "object", - "title": "Choice options", - "description": "Choice options.", - "properties": { - "inlineSeparator": { - "type": "string", - "title": "Inline separator", - "description": "Text to separate individual choices when there are more than 2 choices", - "default": ", " - }, - "inlineOr": { - "type": "string", - "title": "Inline or", - "description": "Text to be inserted between the choices when their are only 2 choices", - "default": " or " - }, - "inlineOrMore": { - "type": "string", - "title": "Inline or more", - "description": "Text to be inserted between the last 2 choices when their are more than 2 choices.", - "default": ", or " - }, - "includeNumbers": { - "type": "boolean", - "title": "Include numbers", - "description": "If true, inline and list style choices will be prefixed with the index of the choice.", - "default": true - } - } - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "defaultValue": { - "$ref": "#/definitions/booleanExpression", - "title": "Default value", - "description": "'Property' will be set to the value of this expression when max turn count is exceeded.", - "examples": [ - true, - "=user.age > 3" - ] - }, - "value": { - "$ref": "#/definitions/booleanExpression", - "title": "Value", - "description": "'Property' will be set to the value of this expression unless it evaluates to null.", - "examples": [ - true, - "=user.isVip" - ] - }, - "confirmChoices": { - "$role": "expression", - "title": "Array of choice objects", - "description": "Array of simple or structured choices.", - "oneOf": [ - { - "type": "array", - "title": "Simple choices", - "description": "Simple choices to confirm from.", - "items": [ - { - "type": "string", - "title": "Simple choice", - "description": "Simple choice to confirm." - } - ] - }, - { - "type": "array", - "title": "Structured choices", - "description": "Structured choices for confirmations.", - "items": [ - { - "type": "object", - "title": "Choice", - "description": "Choice to confirm.", - "properties": { - "value": { - "type": "string", - "title": "Value", - "description": "Value to return when this choice is selected." - }, - "action": { - "$ref": "#/definitions/botframework.json/definitions/CardAction", - "title": "Action", - "description": "Card action for the choice." - }, - "synonyms": { - "type": "array", - "title": "Synonyms", - "description": "List of synonyms to recognize in addition to the value (optional).", - "items": { - "type": "string", - "title": "Synonym", - "description": "Synonym for choice." - } - } - } - } - ] - }, - { - "$ref": "#/definitions/stringExpression" - } - ] - }, - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "default": false, - "examples": [ - false, - "=user.isVip" - ] - }, - "prompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Initial prompt", - "description": "Message to send to collect information.", - "examples": [ - "What is your birth date?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "unrecognizedPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Unrecognized prompt", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "invalidPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Invalid prompt", - "description": "Message to send when the user input does not meet any validation expression.", - "examples": [ - "Sorry, '{this.value}' does not work. I need a number between 1-150. What is your age?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "defaultValueResponse": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Default value response", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "maxTurnCount": { - "$ref": "#/definitions/integerExpression", - "title": "Max turn count", - "description": "Maximum number of re-prompt attempts to collect information.", - "default": 3, - "minimum": 0, - "maximum": 2147483647, - "examples": [ - 3, - "=settings.xyz" - ] - }, - "validations": { - "type": "array", - "title": "Validation expressions", - "description": "Expression to validate user input.", - "items": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Expression which needs to met for the input to be considered valid", - "examples": [ - "int(this.value) > 1 && int(this.value) <= 150", - "count(this.value) < 300" - ] - } - }, - "property": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property to store collected information. Input will be skipped if property has value (unless 'Always prompt' is true).", - "examples": [ - "$birthday", - "dialog.${user.name}", - "=f(x)" - ] - }, - "alwaysPrompt": { - "$ref": "#/definitions/booleanExpression", - "title": "Always prompt", - "description": "Collect information even if the specified 'property' is not empty.", - "default": false, - "examples": [ - false, - "=$val" - ] - }, - "allowInterruptions": { - "$ref": "#/definitions/booleanExpression", - "title": "Allow Interruptions", - "description": "A boolean expression that determines whether the parent should be allowed to interrupt the input.", - "default": true, - "examples": [ - true, - "=user.xyz" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.ConfirmInput" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.ContinueConversation": { - "$role": "implements(Microsoft.IDialog)", - "title": "Continue conversation (Queue)", - "description": "Continue a specific conversation (via StorageQueue implementation).", - "type": "object", - "required": [ - "conversationReference", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "conversationReference": { - "$ref": "#/definitions/objectExpression", - "title": "Conversation Reference", - "description": "A conversation reference. (NOTE: Minimum required values or channelId, conversation).", - "examples": [ - { - "channelId": "skype", - "serviceUrl": "http://smba.skype.com", - "conversation": { - "id": "11111" - }, - "bot": { - "id": "22222" - }, - "user": { - "id": "33333" - }, - "locale": "en-us" - } - ] - }, - "value": { - "$ref": "#/definitions/valueExpression", - "title": "Value", - "description": "Value to send in the activity.value." - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.ContinueConversation" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.ContinueConversationLater": { - "$role": "implements(Microsoft.IDialog)", - "title": "Continue conversation later (Queue)", - "description": "Continue conversation at later time (via StorageQueue implementation).", - "type": "object", - "required": [ - "date", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "date": { - "$ref": "#/definitions/stringExpression", - "title": "Date", - "description": "Date in the future as a ISO string when the conversation should continue.", - "examples": [ - "=addHours(utcNow(), 1)" - ] - }, - "value": { - "$ref": "#/definitions/valueExpression", - "title": "Value", - "description": "Value to send in the activity.value." - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.ContinueConversationLater" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.ContinueLoop": { - "$role": "implements(Microsoft.IDialog)", - "title": "Continue loop", - "description": "Stop executing this template and continue with the next iteration of the loop.", - "type": "object", - "required": [ - "$kind" - ], - "$policies": { - "lastAction": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.ContinueLoop" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.CrossTrainedRecognizerSet": { - "$role": "implements(Microsoft.IRecognizer)", - "title": "Cross-trained recognizer set", - "description": "Recognizer for selecting between cross trained recognizers.", - "type": "object", - "required": [ - "recognizers", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional unique id using with RecognizerSet." - }, - "recognizers": { - "type": "array", - "title": "Recognizers", - "description": "List of Recognizers defined for this set.", - "items": { - "$kind": "Microsoft.IRecognizer", - "$ref": "#/definitions/Microsoft.IRecognizer" - } - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.CrossTrainedRecognizerSet" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.CurrencyEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Currency entity recognizer", - "description": "Recognizer which recognizes currency.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.CurrencyEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.DateTimeEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Date and time entity recognizer", - "description": "Recognizer which recognizes dates and time fragments.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.DateTimeEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.DateTimeInput": { - "$role": [ - "implements(Microsoft.IDialog)", - "extends(Microsoft.InputDialog)" - ], - "title": "Date/time input dialog", - "description": "Collect information - Ask for date and/ or time", - "type": "object", - "defaultLocale": { - "$ref": "#/definitions/stringExpression", - "title": "Default locale", - "description": "Default locale.", - "default": "en-us" - }, - "$policies": { - "interactive": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "defaultValue": { - "$ref": "#/definitions/stringExpression", - "format": "date-time", - "title": "Default date", - "description": "'Property' will be set to the value or the result of the expression when max turn count is exceeded.", - "examples": [ - "=user.birthday" - ] - }, - "value": { - "$ref": "#/definitions/stringExpression", - "format": "date-time", - "title": "Value", - "description": "'Property' will be set to the value or the result of the expression unless it evaluates to null.", - "examples": [ - "=user.birthday" - ] - }, - "outputFormat": { - "$ref": "#/definitions/expression", - "title": "Output format", - "description": "Expression to use for formatting the output.", - "examples": [ - "=this.value[0].Value" - ] - }, - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "default": false, - "examples": [ - false, - "=user.isVip" - ] - }, - "prompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Initial prompt", - "description": "Message to send to collect information.", - "examples": [ - "What is your birth date?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "unrecognizedPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Unrecognized prompt", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "invalidPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Invalid prompt", - "description": "Message to send when the user input does not meet any validation expression.", - "examples": [ - "Sorry, '{this.value}' does not work. I need a number between 1-150. What is your age?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "defaultValueResponse": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Default value response", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "maxTurnCount": { - "$ref": "#/definitions/integerExpression", - "title": "Max turn count", - "description": "Maximum number of re-prompt attempts to collect information.", - "default": 3, - "minimum": 0, - "maximum": 2147483647, - "examples": [ - 3, - "=settings.xyz" - ] - }, - "validations": { - "type": "array", - "title": "Validation expressions", - "description": "Expression to validate user input.", - "items": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Expression which needs to met for the input to be considered valid", - "examples": [ - "int(this.value) > 1 && int(this.value) <= 150", - "count(this.value) < 300" - ] - } - }, - "property": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property to store collected information. Input will be skipped if property has value (unless 'Always prompt' is true).", - "examples": [ - "$birthday", - "dialog.${user.name}", - "=f(x)" - ] - }, - "alwaysPrompt": { - "$ref": "#/definitions/booleanExpression", - "title": "Always prompt", - "description": "Collect information even if the specified 'property' is not empty.", - "default": false, - "examples": [ - false, - "=$val" - ] - }, - "allowInterruptions": { - "$ref": "#/definitions/booleanExpression", - "title": "Allow Interruptions", - "description": "A boolean expression that determines whether the parent should be allowed to interrupt the input.", - "default": true, - "examples": [ - true, - "=user.xyz" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.DateTimeInput" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.DebugBreak": { - "$role": "implements(Microsoft.IDialog)", - "title": "Debugger break", - "description": "If debugger is attached, stop the execution at this point in the conversation.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.DebugBreak" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.DeleteActivity": { - "$role": "implements(Microsoft.IDialog)", - "title": "Delete Activity", - "description": "Delete an activity that was previously sent.", - "type": "object", - "required": [ - "activityId", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "activityId": { - "$ref": "#/definitions/stringExpression", - "title": "ActivityId", - "description": "expression to an activityId to delete", - "examples": [ - "=turn.lastresult.id" - ] - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.DeleteActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.DeleteProperties": { - "$role": "implements(Microsoft.IDialog)", - "title": "Delete Properties", - "description": "Delete multiple properties and any value it holds.", - "type": "object", - "required": [ - "properties", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "properties": { - "type": "array", - "title": "Properties", - "description": "Properties to delete.", - "items": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property to delete." - } - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.DeleteProperties" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.DeleteProperty": { - "$role": "implements(Microsoft.IDialog)", - "title": "Delete property", - "description": "Delete a property and any value it holds.", - "type": "object", - "required": [ - "property", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "property": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property to delete." - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.DeleteProperty" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.DimensionEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Dimension entity recognizer", - "description": "Recognizer which recognizes dimension.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.DimensionEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.EditActions": { - "$role": "implements(Microsoft.IDialog)", - "title": "Edit actions.", - "description": "Edit the current list of actions.", - "type": "object", - "required": [ - "changeType", - "actions", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "changeType": { - "title": "Type of change", - "description": "Type of change to apply to the current actions.", - "oneOf": [ - { - "type": "string", - "title": "Standard change", - "description": "Standard change types.", - "enum": [ - "insertActions", - "insertActionsBeforeTags", - "appendActions", - "endSequence", - "replaceSequence" - ] - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Actions to apply.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.EditActions" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.EditArray": { - "$role": "implements(Microsoft.IDialog)", - "title": "Edit array", - "description": "Modify an array in memory", - "type": "object", - "required": [ - "itemsProperty", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "changeType": { - "title": "Type of change", - "description": "Type of change to the array in memory.", - "oneOf": [ - { - "type": "string", - "title": "Change type", - "description": "Standard change type.", - "enum": [ - "push", - "pop", - "take", - "remove", - "clear" - ] - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "itemsProperty": { - "$ref": "#/definitions/stringExpression", - "title": "Items property", - "description": "Property that holds the array to update." - }, - "resultProperty": { - "$ref": "#/definitions/stringExpression", - "title": "Result property", - "description": "Property to store the result of this action." - }, - "value": { - "$ref": "#/definitions/valueExpression", - "title": "Value", - "description": "New value or expression.", - "examples": [ - "milk", - "=dialog.favColor", - "=dialog.favColor == 'red'" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.EditArray" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.EmailEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Email entity recognizer", - "description": "Recognizer which recognizes email.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.EmailEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.EmitEvent": { - "$role": "implements(Microsoft.IDialog)", - "title": "Emit a custom event", - "description": "Emit an event. Capture this event with a trigger.", - "type": "object", - "required": [ - "eventName", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "eventName": { - "$role": "expression", - "title": "Event name", - "description": "Name of the event to emit.", - "oneOf": [ - { - "type": "string", - "title": "Built-in event", - "description": "Standard event type.", - "enum": [ - "beginDialog", - "resumeDialog", - "repromptDialog", - "cancelDialog", - "endDialog", - "activityReceived", - "recognizedIntent", - "unknownIntent", - "actionsStarted", - "actionsSaved", - "actionsEnded", - "actionsResumed" - ] - }, - { - "type": "string", - "title": "Custom event", - "description": "Custom event type", - "pattern": "^(?!(beginDialog$|resumeDialog$|repromptDialog$|cancelDialog$|endDialog$|activityReceived$|recognizedIntent$|unknownIntent$|actionsStarted$|actionsSaved$|actionsEnded$|actionsResumed))(\\S){1}.*" - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "eventValue": { - "$ref": "#/definitions/valueExpression", - "title": "Event value", - "description": "Value to emit with the event (optional)." - }, - "bubbleEvent": { - "$ref": "#/definitions/booleanExpression", - "title": "Bubble event", - "description": "If true this event is passed on to parent dialogs." - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.EmitEvent" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.EndDialog": { - "$role": "implements(Microsoft.IDialog)", - "title": "End dialog", - "description": "End this dialog.", - "type": "object", - "$policies": { - "lastAction": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "value": { - "$ref": "#/definitions/valueExpression", - "title": "Value", - "description": "Result value returned to the parent dialog.", - "examples": [ - "=dialog.userName", - "='tomato'" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.EndDialog" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.EndTurn": { - "$role": "implements(Microsoft.IDialog)", - "title": "End turn", - "description": "End the current turn without ending the dialog.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.EndTurn" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.FirstSelector": { - "$role": "implements(Microsoft.ITriggerSelector)", - "title": "First trigger selector", - "description": "Selector for first true rule", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.FirstSelector" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.Foreach": { - "$role": "implements(Microsoft.IDialog)", - "title": "For each item", - "description": "Execute actions on each item in an a collection.", - "type": "object", - "required": [ - "itemsProperty", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "itemsProperty": { - "$ref": "#/definitions/stringExpression", - "title": "Items property", - "description": "Property that holds the array.", - "examples": [ - "user.todoList" - ] - }, - "index": { - "$ref": "#/definitions/stringExpression", - "title": "Index property", - "description": "Property that holds the index of the item.", - "default": "dialog.foreach.index" - }, - "value": { - "$ref": "#/definitions/stringExpression", - "title": "Value property", - "description": "Property that holds the value of the item.", - "default": "dialog.foreach.value" - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Actions to execute for each item. Use '$foreach.value' to access the value of each item. Use '$foreach.index' to access the index of each item.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.Foreach" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.ForeachPage": { - "$role": "implements(Microsoft.IDialog)", - "title": "For each page", - "description": "Execute actions on each page (collection of items) in an array.", - "type": "object", - "required": [ - "itemsProperty", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "itemsProperty": { - "$ref": "#/definitions/stringExpression", - "title": "Items property", - "description": "Property that holds the array.", - "examples": [ - "user.todoList" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Actions to execute for each page. Use '$foreach.page' to access each page.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "pageIndex": { - "$ref": "#/definitions/stringExpression", - "title": "Index property", - "description": "Property that holds the index of the page.", - "default": "dialog.foreach.pageindex" - }, - "page": { - "$ref": "#/definitions/stringExpression", - "title": "Page property", - "description": "Property that holds the value of the page.", - "default": "dialog.foreach.page" - }, - "pageSize": { - "$ref": "#/definitions/integerExpression", - "title": "Page size", - "description": "Number of items in each page.", - "default": 10 - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.ForeachPage" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.GetActivityMembers": { - "$role": "implements(Microsoft.IDialog)", - "title": "Get activity members", - "description": "Get the members who are participating in an activity. (BotFrameworkAdapter only)", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "property": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property (named location to store information).", - "examples": [ - "user.age" - ] - }, - "activityId": { - "$ref": "#/definitions/stringExpression", - "title": "Activity Id", - "description": "Activity ID or expression to an activityId to use to get the members. If none is defined then the current activity id will be used.", - "examples": [ - "turn.lastresult.id" - ] - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.GetActivityMembers" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.GetConversationMembers": { - "$role": "implements(Microsoft.IDialog)", - "title": "Get conversation members", - "description": "Get the members who are participating in an conversation. (BotFrameworkAdapter only)", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "property": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property (named location to store information).", - "examples": [ - "user.age" - ] - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.GetConversationMembers" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.GetConversationReference": { - "$role": "implements(Microsoft.IDialog)", - "title": "Get ConversationReference", - "description": "Gets the ConversationReference from current context and stores it in property so it can be used to with ContinueConversation action.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "property": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property (named location to store information).", - "examples": [ - "user.age" - ] - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.GetConversationReference" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.GotoAction": { - "$role": "implements(Microsoft.IDialog)", - "title": "Go to action", - "description": "Go to an an action by id.", - "type": "object", - "required": [ - "actionId", - "$kind" - ], - "$policies": { - "lastAction": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "actionId": { - "$ref": "#/definitions/stringExpression", - "title": "Action Id", - "description": "Action Id to execute next" - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.GotoAction" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.GuidEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Guid entity recognizer", - "description": "Recognizer which recognizes guids.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.GuidEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.HashtagEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Hashtag entity recognizer", - "description": "Recognizer which recognizes Hashtags.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.HashtagEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.HttpRequest": { - "$role": "implements(Microsoft.IDialog)", - "type": "object", - "title": "HTTP request", - "description": "Make a HTTP request.", - "required": [ - "url", - "method", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "method": { - "type": "string", - "title": "HTTP method", - "description": "HTTP method to use.", - "enum": [ - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "examples": [ - "GET", - "POST" - ] - }, - "url": { - "$ref": "#/definitions/stringExpression", - "title": "Url", - "description": "URL to call (supports data binding).", - "examples": [ - "https://contoso.com" - ] - }, - "body": { - "$ref": "#/definitions/valueExpression", - "title": "Body", - "description": "Body to include in the HTTP call (supports data binding).", - "additionalProperties": true - }, - "resultProperty": { - "$ref": "#/definitions/stringExpression", - "title": "Result property", - "description": "A property to store the result of this action. The result can include any of the 4 properties from the HTTP response: statusCode, reasonPhrase, content, and headers. If the content is JSON it will be a deserialized object. The values can be accessed via .content for example.", - "default": "turn.results", - "examples": [ - "dialog.contosodata" - ] - }, - "contentType": { - "$ref": "#/definitions/stringExpression", - "title": "Content type", - "description": "Content media type for the body.", - "examples": [ - "application/json", - "text/plain" - ] - }, - "headers": { - "type": "object", - "title": "Headers", - "description": "One or more headers to include in the request (supports data binding).", - "additionalProperties": { - "$ref": "#/definitions/stringExpression" - } - }, - "responseType": { - "$ref": "#/definitions/stringExpression", - "title": "Response type", - "description": "Defines the type of HTTP response. Automatically calls the 'Send a response' action if set to 'Activity' or 'Activities'.", - "oneOf": [ - { - "type": "string", - "title": "Standard response", - "description": "Standard response type.", - "enum": [ - "none", - "json", - "activity", - "activities", - "binary" - ], - "default": "json" - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.HttpRequest" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.IActivityTemplate": { - "title": "Microsoft ActivityTemplates", - "description": "Components which are ActivityTemplate, which is string template, an activity, or a implementation of ActivityTemplate", - "$role": "interface", - "oneOf": [ - { - "$ref": "#/definitions/Microsoft.ActivityTemplate" - }, - { - "$ref": "#/definitions/Microsoft.StaticActivityTemplate" - }, - { - "$ref": "#/definitions/botframework.json/definitions/Activity", - "required": [ - "type" - ] - }, - { - "type": "string" - } - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Declarative", - "version": "4.13.2" - } - }, - "Microsoft.IAdapter": { - "$role": "interface", - "title": "Bot adapter", - "description": "Component that enables connecting bots to chat clients and applications.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime", - "version": "4.13.2" - }, - "properties": { - "route": { - "type": "string", - "title": "Adapter http route", - "description": "Route where to expose the adapter." - }, - "type": { - "type": "string", - "title": "Adapter type name", - "description": "Adapter type name" - } - } - }, - "Microsoft.IDialog": { - "title": "Microsoft dialogs", - "description": "Components which derive from Dialog", - "$role": "interface", - "oneOf": [ - { - "$ref": "#/definitions/Microsoft.AdaptiveDialog" - }, - { - "$ref": "#/definitions/Microsoft.Ask" - }, - { - "$ref": "#/definitions/Microsoft.AttachmentInput" - }, - { - "$ref": "#/definitions/Microsoft.BeginDialog" - }, - { - "$ref": "#/definitions/Microsoft.BeginSkill" - }, - { - "$ref": "#/definitions/Microsoft.BreakLoop" - }, - { - "$ref": "#/definitions/Microsoft.CancelAllDialogs" - }, - { - "$ref": "#/definitions/Microsoft.CancelDialog" - }, - { - "$ref": "#/definitions/Microsoft.ChoiceInput" - }, - { - "$ref": "#/definitions/Microsoft.ConfirmInput" - }, - { - "$ref": "#/definitions/Microsoft.ContinueConversation" - }, - { - "$ref": "#/definitions/Microsoft.ContinueConversationLater" - }, - { - "$ref": "#/definitions/Microsoft.ContinueLoop" - }, - { - "$ref": "#/definitions/Microsoft.DateTimeInput" - }, - { - "$ref": "#/definitions/Microsoft.DebugBreak" - }, - { - "$ref": "#/definitions/Microsoft.DeleteActivity" - }, - { - "$ref": "#/definitions/Microsoft.DeleteProperties" - }, - { - "$ref": "#/definitions/Microsoft.DeleteProperty" - }, - { - "$ref": "#/definitions/Microsoft.EditActions" - }, - { - "$ref": "#/definitions/Microsoft.EditArray" - }, - { - "$ref": "#/definitions/Microsoft.EmitEvent" - }, - { - "$ref": "#/definitions/Microsoft.EndDialog" - }, - { - "$ref": "#/definitions/Microsoft.EndTurn" - }, - { - "$ref": "#/definitions/Microsoft.Foreach" - }, - { - "$ref": "#/definitions/Microsoft.ForeachPage" - }, - { - "$ref": "#/definitions/Microsoft.GetActivityMembers" - }, - { - "$ref": "#/definitions/Microsoft.GetConversationMembers" - }, - { - "$ref": "#/definitions/Microsoft.GetConversationReference" - }, - { - "$ref": "#/definitions/Microsoft.GotoAction" - }, - { - "$ref": "#/definitions/Microsoft.HttpRequest" - }, - { - "$ref": "#/definitions/Microsoft.IfCondition" - }, - { - "$ref": "#/definitions/Microsoft.LogAction" - }, - { - "$ref": "#/definitions/Microsoft.NumberInput" - }, - { - "$ref": "#/definitions/Microsoft.OAuthInput" - }, - { - "$ref": "#/definitions/Microsoft.QnAMakerDialog" - }, - { - "$ref": "#/definitions/Microsoft.RepeatDialog" - }, - { - "$ref": "#/definitions/Microsoft.ReplaceDialog" - }, - { - "$ref": "#/definitions/Microsoft.SendActivity" - }, - { - "$ref": "#/definitions/Microsoft.SendHandoffActivity" - }, - { - "$ref": "#/definitions/Microsoft.SetProperties" - }, - { - "$ref": "#/definitions/Microsoft.SetProperty" - }, - { - "$ref": "#/definitions/Microsoft.SignOutUser" - }, - { - "$ref": "#/definitions/Microsoft.SwitchCondition" - }, - { - "$ref": "#/definitions/Microsoft.TelemetryTrackEventAction" - }, - { - "$ref": "#/definitions/Microsoft.TextInput" - }, - { - "$ref": "#/definitions/Microsoft.ThrowException" - }, - { - "$ref": "#/definitions/Microsoft.TraceActivity" - }, - { - "$ref": "#/definitions/Microsoft.UpdateActivity" - }, - { - "type": "string", - "pattern": "^(?!(=)).*" - } - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Declarative", - "version": "4.13.2" - } - }, - "Microsoft.IEntityRecognizer": { - "$role": "interface", - "title": "Entity recognizers", - "description": "Components which derive from EntityRecognizer.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "oneOf": [ - { - "$ref": "#/definitions/Microsoft.AgeEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.ConfirmationEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.CurrencyEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.DateTimeEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.DimensionEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.EmailEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.GuidEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.HashtagEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.IpEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.MentionEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.NumberEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.NumberRangeEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.OrdinalEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.PercentageEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.PhoneNumberEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.RegexEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.TemperatureEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.UrlEntityRecognizer" - }, - { - "type": "string", - "title": "Reference to Microsoft.IEntityRecognizer", - "description": "Reference to Microsoft.IEntityRecognizer .dialog file." - } - ] - }, - "Microsoft.IfCondition": { - "$role": "implements(Microsoft.IDialog)", - "title": "If condition", - "description": "Two-way branch the conversation flow based on a condition.", - "type": "object", - "required": [ - "condition", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Expression to evaluate.", - "examples": [ - "user.age > 3" - ] - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - true, - "=user.age > 3" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Actions to execute if condition is true.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "elseActions": { - "type": "array", - "title": "Else", - "description": "Actions to execute if condition is false.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.IfCondition" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.ILanguageGenerator": { - "title": "Microsoft LanguageGenerator", - "description": "Components which dervie from the LanguageGenerator class", - "$role": "interface", - "oneOf": [ - { - "$ref": "#/definitions/Microsoft.ResourceMultiLanguageGenerator" - }, - { - "$ref": "#/definitions/Microsoft.TemplateEngineLanguageGenerator" - }, - { - "type": "string" - } - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - } - }, - "Microsoft.InputDialog": { - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "default": false, - "examples": [ - false, - "=user.isVip" - ] - }, - "prompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Initial prompt", - "description": "Message to send to collect information.", - "examples": [ - "What is your birth date?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "unrecognizedPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Unrecognized prompt", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "invalidPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Invalid prompt", - "description": "Message to send when the user input does not meet any validation expression.", - "examples": [ - "Sorry, '{this.value}' does not work. I need a number between 1-150. What is your age?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "defaultValueResponse": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Default value response", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "maxTurnCount": { - "$ref": "#/definitions/integerExpression", - "title": "Max turn count", - "description": "Maximum number of re-prompt attempts to collect information.", - "default": 3, - "minimum": 0, - "maximum": 2147483647, - "examples": [ - 3, - "=settings.xyz" - ] - }, - "validations": { - "type": "array", - "title": "Validation expressions", - "description": "Expression to validate user input.", - "items": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Expression which needs to met for the input to be considered valid", - "examples": [ - "int(this.value) > 1 && int(this.value) <= 150", - "count(this.value) < 300" - ] - } - }, - "property": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property to store collected information. Input will be skipped if property has value (unless 'Always prompt' is true).", - "examples": [ - "$birthday", - "dialog.${user.name}", - "=f(x)" - ] - }, - "alwaysPrompt": { - "$ref": "#/definitions/booleanExpression", - "title": "Always prompt", - "description": "Collect information even if the specified 'property' is not empty.", - "default": false, - "examples": [ - false, - "=$val" - ] - }, - "allowInterruptions": { - "$ref": "#/definitions/booleanExpression", - "title": "Allow Interruptions", - "description": "A boolean expression that determines whether the parent should be allowed to interrupt the input.", - "default": true, - "examples": [ - true, - "=user.xyz" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.InputDialog" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.IpEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "IP entity recognizer", - "description": "Recognizer which recognizes internet IP patterns (like 192.1.1.1).", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.IpEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.IRecognizer": { - "title": "Microsoft recognizer", - "description": "Components which derive from Recognizer class", - "$role": "interface", - "oneOf": [ - { - "$ref": "#/definitions/Microsoft.AgeEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.ChannelMentionEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.ConfirmationEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.CrossTrainedRecognizerSet" - }, - { - "$ref": "#/definitions/Microsoft.CurrencyEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.DateTimeEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.DimensionEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.EmailEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.GuidEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.HashtagEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.IpEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.LuisRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.MentionEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.MultiLanguageRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.NumberEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.NumberRangeEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.OrdinalEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.PercentageEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.PhoneNumberEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.QnAMakerRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.RecognizerSet" - }, - { - "$ref": "#/definitions/Microsoft.RegexEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.RegexRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.TemperatureEntityRecognizer" - }, - { - "$ref": "#/definitions/Microsoft.UrlEntityRecognizer" - }, - { - "type": "string" - } - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Declarative", - "version": "4.13.2" - } - }, - "Microsoft.ITextTemplate": { - "title": "Microsoft TextTemplate", - "description": "Components which derive from TextTemplate class", - "$role": "interface", - "oneOf": [ - { - "$ref": "#/definitions/Microsoft.TextTemplate" - }, - { - "type": "string" - } - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Declarative", - "version": "4.13.2" - } - }, - "Microsoft.ITrigger": { - "$role": "interface", - "title": "Microsoft Triggers", - "description": "Components which derive from OnCondition class.", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "oneOf": [ - { - "$ref": "#/definitions/Microsoft.OnActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnAssignEntity" - }, - { - "$ref": "#/definitions/Microsoft.OnBeginDialog" - }, - { - "$ref": "#/definitions/Microsoft.OnCancelDialog" - }, - { - "$ref": "#/definitions/Microsoft.OnChooseEntity" - }, - { - "$ref": "#/definitions/Microsoft.OnChooseIntent" - }, - { - "$ref": "#/definitions/Microsoft.OnChooseProperty" - }, - { - "$ref": "#/definitions/Microsoft.OnCommandActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnCommandResultActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnCondition" - }, - { - "$ref": "#/definitions/Microsoft.OnContinueConversation" - }, - { - "$ref": "#/definitions/Microsoft.OnConversationUpdateActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnDialogEvent" - }, - { - "$ref": "#/definitions/Microsoft.OnEndOfActions" - }, - { - "$ref": "#/definitions/Microsoft.OnEndOfConversationActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnError" - }, - { - "$ref": "#/definitions/Microsoft.OnEventActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnHandoffActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnInstallationUpdateActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnIntent" - }, - { - "$ref": "#/definitions/Microsoft.OnInvokeActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnMessageActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnMessageDeleteActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnMessageReactionActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnMessageUpdateActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnQnAMatch" - }, - { - "$ref": "#/definitions/Microsoft.OnRepromptDialog" - }, - { - "$ref": "#/definitions/Microsoft.OnTypingActivity" - }, - { - "$ref": "#/definitions/Microsoft.OnUnknownIntent" - }, - { - "type": "string", - "title": "Reference to Microsoft.ITrigger", - "description": "Reference to Microsoft.ITrigger .dialog file." - } - ] - }, - "Microsoft.ITriggerSelector": { - "$role": "interface", - "title": "Selectors", - "description": "Components which derive from TriggerSelector class.", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "oneOf": [ - { - "$ref": "#/definitions/Microsoft.ConditionalSelector" - }, - { - "$ref": "#/definitions/Microsoft.FirstSelector" - }, - { - "$ref": "#/definitions/Microsoft.MostSpecificSelector" - }, - { - "$ref": "#/definitions/Microsoft.RandomSelector" - }, - { - "$ref": "#/definitions/Microsoft.TrueSelector" - }, - { - "type": "string", - "title": "Reference to Microsoft.ITriggerSelector", - "description": "Reference to Microsoft.ITriggerSelector .dialog file." - } - ] - }, - "Microsoft.LanguagePolicy": { - "title": "Language policy", - "description": "This represents a policy map for locales lookups to use for language", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": { - "type": "array", - "title": "Per-locale policy", - "description": "Language policy per locale.", - "items": { - "type": "string", - "title": "Locale", - "description": "Locale like en-us." - } - }, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.LanguagePolicy" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.LogAction": { - "$role": "implements(Microsoft.IDialog)", - "title": "Log to console", - "description": "Log a message to the host application. Send a TraceActivity to Bot Framework Emulator (optional).", - "type": "object", - "required": [ - "text", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - true, - "=user.age > 3" - ] - }, - "text": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Text", - "description": "Information to log.", - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "label": { - "$ref": "#/definitions/stringExpression", - "title": "Label", - "description": "Label for the trace activity (used to identify it in a list of trace activities.)" - }, - "traceActivity": { - "$ref": "#/definitions/booleanExpression", - "title": "Send trace activity", - "description": "If true, automatically sends a TraceActivity (view in Bot Framework Emulator)." - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.LogAction" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.LuisRecognizer": { - "$role": "implements(Microsoft.IRecognizer)", - "title": "LUIS Recognizer", - "description": "LUIS recognizer.", - "type": "object", - "required": [ - "applicationId", - "endpoint", - "endpointKey", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.AI.Luis", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional unique id using with RecognizerSet. Other recognizers should return 'DeferToRecognizer_{Id}' intent when cross training data for this recognizer." - }, - "applicationId": { - "$ref": "#/definitions/stringExpression", - "title": "LUIS application id", - "description": "Application ID for your model from the LUIS service." - }, - "version": { - "$ref": "#/definitions/stringExpression", - "title": "LUIS version", - "description": "Optional version to target. If null then predictionOptions.Slot is used." - }, - "endpoint": { - "$ref": "#/definitions/stringExpression", - "title": "LUIS endpoint", - "description": "Endpoint to use for LUIS service like https://westus.api.cognitive.microsoft.com." - }, - "endpointKey": { - "$ref": "#/definitions/stringExpression", - "title": "LUIS prediction key", - "description": "LUIS prediction key used to call endpoint." - }, - "externalEntityRecognizer": { - "$kind": "Microsoft.IRecognizer", - "title": "External entity recognizer", - "description": "Entities recognized by this recognizer will be passed to LUIS as external entities.", - "$ref": "#/definitions/Microsoft.IRecognizer" - }, - "dynamicLists": { - "$ref": "#/definitions/arrayExpression", - "title": "Dynamic lists", - "description": "Runtime defined entity lists.", - "items": { - "title": "Entity list", - "description": "Lists of canonical values and synonyms for an entity.", - "type": "object", - "properties": { - "entity": { - "title": "Entity", - "description": "Entity to extend with a dynamic list.", - "type": "string" - }, - "list": { - "title": "Dynamic list", - "description": "List of canonical forms and synonyms.", - "type": "array", - "items": { - "type": "object", - "title": "List entry", - "description": "Canonical form and synonynms.", - "properties": { - "canonicalForm": { - "title": "Canonical form", - "description": "Resolution if any synonym matches.", - "type": "string" - }, - "synonyms": { - "title": "Synonyms", - "description": "List of synonyms for a canonical form.", - "type": "array", - "items": { - "title": "Synonym", - "description": "Synonym for canonical form.", - "type": "string" - } - } - } - } - } - } - } - }, - "predictionOptions": { - "type": "object", - "title": "Prediction options", - "description": "Options to control LUIS prediction behavior.", - "properties": { - "includeAllIntents": { - "$ref": "#/definitions/booleanExpression", - "title": "Include all intents", - "description": "True for all intents, false for only top intent." - }, - "includeInstanceData": { - "$ref": "#/definitions/booleanExpression", - "title": "Include $instance", - "description": "True to include $instance metadata in the LUIS response." - }, - "log": { - "$ref": "#/definitions/booleanExpression", - "title": "Log utterances", - "description": "True to log utterances on LUIS service." - }, - "preferExternalEntities": { - "$ref": "#/definitions/booleanExpression", - "title": "Prefer external entities", - "description": "True to prefer external entities to those generated by LUIS models." - }, - "slot": { - "$ref": "#/definitions/stringExpression", - "title": "Slot", - "description": "Slot to use for talking to LUIS service like production or staging." - } - } - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.LuisRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.MentionEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Mentions entity recognizer", - "description": "Recognizer which recognizes @Mentions", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.MentionEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.MostSpecificSelector": { - "$role": "implements(Microsoft.ITriggerSelector)", - "title": "Most specific trigger selector", - "description": "Select most specific true events with optional additional selector", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "selector": { - "$kind": "Microsoft.ITriggerSelector", - "$ref": "#/definitions/Microsoft.ITriggerSelector" - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.MostSpecificSelector" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.MultiLanguageRecognizer": { - "$role": "implements(Microsoft.IRecognizer)", - "title": "Multi-language recognizer", - "description": "Configure one recognizer per language and the specify the language fallback policy.", - "type": "object", - "required": [ - "recognizers", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional unique id using with RecognizerSet. Other recognizers should return 'DeferToRecognizer_{Id}' intent when cross training data for this recognizer." - }, - "languagePolicy": { - "$kind": "Microsoft.LanguagePolicy", - "type": "object", - "title": "Language policy", - "description": "Defines fall back languages to try per user input language.", - "$ref": "#/definitions/Microsoft.LanguagePolicy" - }, - "recognizers": { - "type": "object", - "title": "Recognizers", - "description": "Map of language -> Recognizer", - "additionalProperties": { - "$kind": "Microsoft.IRecognizer", - "$ref": "#/definitions/Microsoft.IRecognizer" - } - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.MultiLanguageRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.NumberEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Number entity recognizer", - "description": "Recognizer which recognizes numbers.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.NumberEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.NumberInput": { - "$role": [ - "implements(Microsoft.IDialog)", - "extends(Microsoft.InputDialog)" - ], - "title": "Number input dialog", - "description": "Collect information - Ask for a number.", - "type": "object", - "$policies": { - "interactive": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "defaultValue": { - "$ref": "#/definitions/numberExpression", - "title": "Default value", - "description": "'Property' will be set to the value of this expression when max turn count is exceeded.", - "examples": [ - 13, - "=user.age" - ] - }, - "value": { - "$ref": "#/definitions/numberExpression", - "title": "Value", - "description": "'Property' will be set to the value of this expression unless it evaluates to null.", - "examples": [ - 13, - "=user.age" - ] - }, - "outputFormat": { - "$ref": "#/definitions/expression", - "title": "Output format", - "description": "Expression to format the number output.", - "examples": [ - "=this.value", - "=int(this.text)" - ] - }, - "defaultLocale": { - "$ref": "#/definitions/stringExpression", - "title": "Default locale", - "description": "Default locale to use if there is no locale available..", - "default": "en-us" - }, - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "default": false, - "examples": [ - false, - "=user.isVip" - ] - }, - "prompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Initial prompt", - "description": "Message to send to collect information.", - "examples": [ - "What is your birth date?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "unrecognizedPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Unrecognized prompt", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "invalidPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Invalid prompt", - "description": "Message to send when the user input does not meet any validation expression.", - "examples": [ - "Sorry, '{this.value}' does not work. I need a number between 1-150. What is your age?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "defaultValueResponse": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Default value response", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "maxTurnCount": { - "$ref": "#/definitions/integerExpression", - "title": "Max turn count", - "description": "Maximum number of re-prompt attempts to collect information.", - "default": 3, - "minimum": 0, - "maximum": 2147483647, - "examples": [ - 3, - "=settings.xyz" - ] - }, - "validations": { - "type": "array", - "title": "Validation expressions", - "description": "Expression to validate user input.", - "items": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Expression which needs to met for the input to be considered valid", - "examples": [ - "int(this.value) > 1 && int(this.value) <= 150", - "count(this.value) < 300" - ] - } - }, - "property": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property to store collected information. Input will be skipped if property has value (unless 'Always prompt' is true).", - "examples": [ - "$birthday", - "dialog.${user.name}", - "=f(x)" - ] - }, - "alwaysPrompt": { - "$ref": "#/definitions/booleanExpression", - "title": "Always prompt", - "description": "Collect information even if the specified 'property' is not empty.", - "default": false, - "examples": [ - false, - "=$val" - ] - }, - "allowInterruptions": { - "$ref": "#/definitions/booleanExpression", - "title": "Allow Interruptions", - "description": "A boolean expression that determines whether the parent should be allowed to interrupt the input.", - "default": true, - "examples": [ - true, - "=user.xyz" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.NumberInput" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.NumberRangeEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Number range entity recognizer", - "description": "Recognizer which recognizes ranges of numbers (Example:2 to 5).", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.NumberRangeEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OAuthInput": { - "$role": "implements(Microsoft.IDialog)", - "title": "OAuthInput Dialog", - "description": "Collect login information before each request.", - "type": "object", - "required": [ - "connectionName", - "$kind" - ], - "$policies": { - "interactive": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "connectionName": { - "$ref": "#/definitions/stringExpression", - "title": "Connection name", - "description": "The connection name configured in Azure Web App Bot OAuth settings.", - "examples": [ - "msgraphOAuthConnection" - ] - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - true, - "=user.age > 3" - ] - }, - "text": { - "$ref": "#/definitions/stringExpression", - "title": "Text", - "description": "Text shown in the OAuth signin card.", - "examples": [ - "Please sign in. ", - "=concat(x,y,z)" - ] - }, - "title": { - "$ref": "#/definitions/stringExpression", - "title": "Title", - "description": "Title shown in the OAuth signin card.", - "examples": [ - "Login" - ] - }, - "timeout": { - "$ref": "#/definitions/integerExpression", - "title": "Timeout", - "description": "Time out setting for the OAuth signin card.", - "default": 900000 - }, - "property": { - "$ref": "#/definitions/stringExpression", - "title": "Token property", - "description": "Property to store the OAuth token result. WARNING: Changing this location is not recommended as you should call OAuthInput immediately before each use of the token.", - "default": "turn.token", - "examples": [ - "dialog.token" - ] - }, - "invalidPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Invalid prompt", - "description": "Message to send if user response is invalid.", - "examples": [ - "Sorry, the login info you provided is not valid." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "defaultValueResponse": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Default value response", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Login failed." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "maxTurnCount": { - "$ref": "#/definitions/integerExpression", - "title": "Max turn count", - "description": "Maximum number of re-prompt attempts to collect information.", - "default": 3, - "examples": [ - 3 - ] - }, - "defaultValue": { - "$ref": "#/definitions/expression", - "title": "Default value", - "description": "Expression to examine on each turn of the conversation as possible value to the property.", - "examples": [ - "@token" - ] - }, - "allowInterruptions": { - "$ref": "#/definitions/booleanExpression", - "title": "Allow interruptions", - "description": "A boolean expression that determines whether the parent should be allowed to interrupt the input.", - "default": true, - "examples": [ - true, - "=f(x)" - ] - }, - "alwaysPrompt": { - "$ref": "#/definitions/booleanExpression", - "title": "Always prompt", - "description": "Collect information even if the specified 'property' is not empty.", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OAuthInput" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnActivity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On activity", - "description": "Actions to perform on receipt of a generic activity.", - "type": "object", - "required": [ - "type", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "type": { - "type": "string", - "title": "Activity type", - "description": "The Activity.Type to match" - }, - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnAssignEntity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On entity assignment", - "description": "Actions to apply an operation on a property and value.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "operation": { - "type": "string", - "title": "Operation", - "description": "Operation filter on event." - }, - "property": { - "type": "string", - "title": "Property", - "description": "Property filter on event." - }, - "value": { - "type": "string", - "title": "Value", - "description": "Value filter on event." - }, - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnAssignEntity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnBeginDialog": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On begin dialog", - "description": "Actions to perform when this dialog begins.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnBeginDialog" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnCancelDialog": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On cancel dialog", - "description": "Actions to perform on cancel dialog event.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnCancelDialog" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnChooseEntity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On choose entity", - "description": "Actions to be performed when value is ambiguous for operator and property.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "operation": { - "type": "string", - "title": "Operation", - "description": "Operation filter on event." - }, - "property": { - "type": "string", - "title": "Property", - "description": "Property filter on event." - }, - "value": { - "type": "string", - "title": "Ambiguous value", - "description": "Ambiguous value filter on event." - }, - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnChooseEntity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnChooseIntent": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On ambiguous intent", - "description": "Actions to perform on when an intent is ambiguous.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "intents": { - "type": "array", - "title": "Intents", - "description": "Intents that must be in the ChooseIntent result for this condition to trigger.", - "items": { - "title": "Intent", - "description": "Intent name to trigger on.", - "type": "string" - } - }, - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnChooseIntent" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnChooseProperty": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On choose property", - "description": "Actions to take when there are multiple possible mappings of entities to properties and operations.", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "type": "object", - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnChooseProperty" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnCommandActivity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On Command activity", - "description": "Actions to perform on receipt of an activity with type 'Command'. Overrides Intent trigger.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnCommandActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnCommandResultActivity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On Command Result activity", - "description": "Actions to perform on receipt of an activity with type 'CommandResult'. Overrides Intent trigger.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnCommandResultActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnCondition": { - "$role": "implements(Microsoft.ITrigger)", - "title": "On condition", - "description": "Actions to perform when specified condition is true.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnCondition" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnContinueConversation": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On continue conversation", - "description": "Actions to perform when a conversation is started up again from a ContinueConversationLater action.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnContinueConversation" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnConversationUpdateActivity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On ConversationUpdate activity", - "description": "Actions to perform on receipt of an activity with type 'ConversationUpdate'.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnConversationUpdateActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnDialogEvent": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On dialog event", - "description": "Actions to perform when a specific dialog event occurs.", - "type": "object", - "required": [ - "event", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "event": { - "type": "string", - "title": "Dialog event name", - "description": "Name of dialog event." - }, - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnDialogEvent" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnEndOfActions": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On end of actions", - "description": "Actions to take when there are no more actions in the current dialog.", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "type": "object", - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnEndOfActions" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnEndOfConversationActivity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On EndOfConversation activity", - "description": "Actions to perform on receipt of an activity with type 'EndOfConversation'.", - "type": "object", - "required": [ - "$kind" - ], - "$policies": { - "nonInteractive": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnEndOfConversationActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnError": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On error", - "description": "Action to perform when an 'Error' dialog event occurs.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnError" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnEventActivity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On Event activity", - "description": "Actions to perform on receipt of an activity with type 'Event'.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnEventActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnHandoffActivity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On Handoff activity", - "description": "Actions to perform on receipt of an activity with type 'HandOff'.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnHandoffActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnInstallationUpdateActivity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On InstallationUpdate activity", - "description": "Actions to perform on receipt of an activity with type 'InstallationUpdate'.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnInstallationUpdateActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnIntent": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On intent recognition", - "description": "Actions to perform when specified intent is recognized.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "intent": { - "type": "string", - "title": "Intent", - "description": "Name of intent." - }, - "entities": { - "type": "array", - "title": "Entities", - "description": "Required entities.", - "items": { - "type": "string", - "title": "Entity", - "description": "Entity that must be present." - } - }, - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnIntent" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnInvokeActivity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On Invoke activity", - "description": "Actions to perform on receipt of an activity with type 'Invoke'.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnInvokeActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnMessageActivity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On Message activity", - "description": "Actions to perform on receipt of an activity with type 'Message'. Overrides Intent trigger.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnMessageActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnMessageDeleteActivity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On MessageDelete activity", - "description": "Actions to perform on receipt of an activity with type 'MessageDelete'.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnMessageDeleteActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnMessageReactionActivity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On MessageReaction activity", - "description": "Actions to perform on receipt of an activity with type 'MessageReaction'.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnMessageReactionActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnMessageUpdateActivity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On MessageUpdate activity", - "description": "Actions to perform on receipt of an activity with type 'MessageUpdate'.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnMessageUpdateActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnQnAMatch": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On QnAMaker match", - "description": "Actions to perform on when an match from QnAMaker is found.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnQnAMatch" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnRepromptDialog": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On RepromptDialog", - "description": "Actions to perform when 'RepromptDialog' event occurs.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnRepromptDialog" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnTypingActivity": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On Typing activity", - "description": "Actions to perform on receipt of an activity with type 'Typing'.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnTypingActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OnUnknownIntent": { - "$role": [ - "implements(Microsoft.ITrigger)", - "extends(Microsoft.OnCondition)" - ], - "title": "On unknown intent", - "description": "Action to perform when user input is unrecognized or if none of the 'on intent recognition' triggers match recognized intent.", - "type": "object", - "required": [ - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "condition": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Condition (expression).", - "examples": [ - "user.vip == true" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Sequence of actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "priority": { - "$ref": "#/definitions/numberExpression", - "title": "Priority", - "description": "Priority for trigger with 0 being the highest and < 0 ignored." - }, - "runOnce": { - "$ref": "#/definitions/booleanExpression", - "title": "Run Once", - "description": "True if rule should run once per unique conditions", - "examples": [ - true, - "=f(x)" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OnUnknownIntent" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.OrdinalEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Ordinal entity recognizer", - "description": "Recognizer which recognizes ordinals (example: first, second, 3rd).", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.OrdinalEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.PercentageEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Percentage entity recognizer", - "description": "Recognizer which recognizes percentages.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.PercentageEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.PhoneNumberEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Phone number entity recognizer", - "description": "Recognizer which recognizes phone numbers.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.PhoneNumberEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.QnAMakerDialog": { - "$role": "implements(Microsoft.IDialog)", - "title": "QnAMaker dialog", - "description": "Dialog which uses QnAMAker knowledge base to answer questions.", - "type": "object", - "required": [ - "knowledgeBaseId", - "endpointKey", - "hostname", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.AI.QnA", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "knowledgeBaseId": { - "$ref": "#/definitions/stringExpression", - "title": "KnowledgeBase Id", - "description": "KnowledgeBase Id of your QnA Maker KnowledgeBase.", - "default": "=settings.qna.knowledgebaseid" - }, - "endpointKey": { - "$ref": "#/definitions/stringExpression", - "title": "Endpoint key", - "description": "Endpoint key for the QnA Maker KB.", - "default": "=settings.qna.endpointkey" - }, - "hostname": { - "$ref": "#/definitions/stringExpression", - "title": "Hostname", - "description": "Hostname for your QnA Maker service.", - "default": "=settings.qna.hostname", - "examples": [ - "https://yourserver.azurewebsites.net/qnamaker" - ] - }, - "noAnswer": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Fallback answer", - "description": "Default answer to return when none found in KB.", - "default": "Sorry, I did not find an answer.", - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "threshold": { - "$ref": "#/definitions/numberExpression", - "title": "Threshold", - "description": "Threshold score to filter results.", - "default": 0.3 - }, - "activeLearningCardTitle": { - "$ref": "#/definitions/stringExpression", - "title": "Active learning card title", - "description": "Title for active learning suggestions card.", - "default": "Did you mean:" - }, - "cardNoMatchText": { - "$ref": "#/definitions/stringExpression", - "title": "Card no match text", - "description": "Text for no match option.", - "default": "None of the above." - }, - "cardNoMatchResponse": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Card no match response", - "description": "Custom response when no match option was selected.", - "default": "Thanks for the feedback.", - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "strictFilters": { - "$ref": "#/definitions/arrayExpression", - "title": "Strict filters", - "description": "Metadata filters to use when calling the QnA Maker KB.", - "items": { - "type": "object", - "title": "Metadata filter", - "description": "Metadata filter.", - "properties": { - "name": { - "type": "string", - "title": "Name", - "description": "Name of filter property.", - "maximum": 100 - }, - "value": { - "type": "string", - "title": "Value", - "description": "Value to filter on.", - "maximum": 100 - } - } - } - }, - "top": { - "$ref": "#/definitions/numberExpression", - "title": "Top", - "description": "The number of answers you want to retrieve.", - "default": 3 - }, - "isTest": { - "type": "boolean", - "title": "IsTest", - "description": "True, if pointing to Test environment, else false.", - "default": false - }, - "rankerType": { - "$ref": "#/definitions/stringExpression", - "title": "Ranker type", - "description": "Type of Ranker.", - "oneOf": [ - { - "title": "Standard ranker", - "description": "Standard ranker types.", - "enum": [ - "default", - "questionOnly", - "autoSuggestQuestion" - ], - "default": "default" - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "strictFiltersJoinOperator": { - "$ref": "#/definitions/stringExpression", - "title": "StrictFiltersJoinOperator", - "description": "Join operator for Strict Filters.", - "oneOf": [ - { - "title": "Join operator", - "description": "Value of Join Operator to be used as conjunction with Strict Filter values.", - "enum": [ - "AND", - "OR" - ], - "default": "AND" - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.QnAMakerDialog" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.QnAMakerRecognizer": { - "$role": "implements(Microsoft.IRecognizer)", - "title": "QnAMaker recognizer", - "description": "Recognizer for generating QnAMatch intents from a KB.", - "type": "object", - "required": [ - "knowledgeBaseId", - "endpointKey", - "hostname", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.AI.QnA", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional unique id using with RecognizerSet." - }, - "knowledgeBaseId": { - "$ref": "#/definitions/stringExpression", - "title": "KnowledgeBase Id", - "description": "Knowledge base Id of your QnA Maker knowledge base.", - "default": "=settings.qna.knowledgebaseid" - }, - "endpointKey": { - "$ref": "#/definitions/stringExpression", - "title": "Endpoint key", - "description": "Endpoint key for the QnA Maker KB.", - "default": "=settings.qna.endpointkey" - }, - "hostname": { - "$ref": "#/definitions/stringExpression", - "title": "Hostname", - "description": "Hostname for your QnA Maker service.", - "default": "=settings.qna.hostname", - "examples": [ - "https://yourserver.azurewebsites.net/qnamaker" - ] - }, - "threshold": { - "$ref": "#/definitions/numberExpression", - "title": "Threshold", - "description": "Threshold score to filter results.", - "default": 0.3 - }, - "strictFilters": { - "$ref": "#/definitions/arrayExpression", - "title": "Strict filters", - "description": "Metadata filters to use when calling the QnA Maker KB.", - "items": { - "type": "object", - "title": "Metadata filters", - "description": "Metadata filters to use when querying QnA Maker KB.", - "properties": { - "name": { - "type": "string", - "title": "Name", - "description": "Name to filter on.", - "maximum": 100 - }, - "value": { - "type": "string", - "title": "Value", - "description": "Value to restrict filter.", - "maximum": 100 - } - } - } - }, - "top": { - "$ref": "#/definitions/numberExpression", - "title": "Top", - "description": "The number of answers you want to retrieve.", - "default": 3 - }, - "isTest": { - "$ref": "#/definitions/booleanExpression", - "title": "Use test environment", - "description": "True, if pointing to Test environment, else false.", - "examples": [ - true, - "=f(x)" - ] - }, - "rankerType": { - "title": "Ranker type", - "description": "Type of Ranker.", - "oneOf": [ - { - "type": "string", - "title": "Ranker type", - "description": "Type of Ranker.", - "enum": [ - "default", - "questionOnly", - "autoSuggestQuestion" - ], - "default": "default" - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "strictFiltersJoinOperator": { - "$ref": "#/definitions/stringExpression", - "title": "StrictFiltersJoinOperator", - "description": "Join operator for Strict Filters.", - "oneOf": [ - { - "title": "Join operator", - "description": "Value of Join Operator to be used as onjuction with Strict Filter values.", - "enum": [ - "AND", - "OR" - ], - "default": "AND" - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "includeDialogNameInMetadata": { - "$ref": "#/definitions/booleanExpression", - "title": "Include dialog name", - "description": "When set to false, the dialog name will not be passed to QnAMaker. (default) is true", - "default": true, - "examples": [ - true, - "=f(x)" - ] - }, - "metadata": { - "$ref": "#/definitions/arrayExpression", - "title": "Metadata filters", - "description": "Metadata filters to use when calling the QnA Maker KB.", - "items": { - "type": "object", - "title": "Metadata filter", - "description": "Metadata filter to use when calling the QnA Maker KB.", - "properties": { - "name": { - "type": "string", - "title": "Name", - "description": "Name of value to test." - }, - "value": { - "type": "string", - "title": "Value", - "description": "Value to filter against." - } - } - } - }, - "context": { - "$ref": "#/definitions/objectExpression", - "title": "QnA request context", - "description": "Context to use for ranking." - }, - "qnaId": { - "$ref": "#/definitions/integerExpression", - "title": "QnA Id", - "description": "A number or expression which is the QnAId to paass to QnAMaker API." - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.QnAMakerRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.RandomSelector": { - "$role": "implements(Microsoft.ITriggerSelector)", - "title": "Random rule selector", - "description": "Select most specific true rule.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "seed": { - "type": "integer", - "title": "Random seed", - "description": "Random seed to start random number generation." - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.RandomSelector" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.RecognizerSet": { - "$role": "implements(Microsoft.IRecognizer)", - "title": "Recognizer set", - "description": "Creates the union of the intents and entities of the recognizers in the set.", - "type": "object", - "required": [ - "recognizers", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional unique id using with RecognizerSet. Other recognizers should return 'DeferToRecognizer_{Id}' intent when cross training data for this recognizer." - }, - "recognizers": { - "type": "array", - "title": "Recognizers", - "description": "List of Recognizers defined for this set.", - "items": { - "$kind": "Microsoft.IRecognizer", - "$ref": "#/definitions/Microsoft.IRecognizer" - } - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.RecognizerSet" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.RegexEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Regex entity recognizer", - "description": "Recognizer which recognizes patterns of input based on regex.", - "type": "object", - "required": [ - "name", - "pattern", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "name": { - "type": "string", - "title": "Name", - "description": "Name of the entity" - }, - "pattern": { - "type": "string", - "title": "Pattern", - "description": "Pattern expressed as regular expression." - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.RegexEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.RegexRecognizer": { - "$role": "implements(Microsoft.IRecognizer)", - "title": "Regex recognizer", - "description": "Use regular expressions to recognize intents and entities from user input.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional unique id using with RecognizerSet. Other recognizers should return 'DeferToRecognizer_{Id}' intent when cross training data for this recognizer." - }, - "intents": { - "type": "array", - "title": "RegEx patterns to intents", - "description": "Collection of patterns to match for an intent.", - "items": { - "type": "object", - "title": "Pattern", - "description": "Intent and regex pattern.", - "properties": { - "intent": { - "type": "string", - "title": "Intent", - "description": "The intent name." - }, - "pattern": { - "type": "string", - "title": "Pattern", - "description": "The regular expression pattern." - } - } - } - }, - "entities": { - "type": "array", - "title": "Entity recognizers", - "description": "Collection of entity recognizers to use.", - "items": { - "$kind": "Microsoft.IEntityRecognizer", - "$ref": "#/definitions/Microsoft.IEntityRecognizer" - } - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.RegexRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.RepeatDialog": { - "$role": "implements(Microsoft.IDialog)", - "type": "object", - "title": "Repeat dialog", - "description": "Repeat current dialog.", - "$policies": { - "lastAction": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "allowLoop": { - "$ref": "#/definitions/booleanExpression", - "title": "AllowLoop", - "description": "Optional condition which if true will allow loop of the repeated dialog.", - "examples": [ - "user.age > 3" - ] - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "options": { - "$ref": "#/definitions/objectExpression", - "title": "Options", - "description": "One or more options that are passed to the dialog that is called.", - "additionalProperties": { - "type": "string", - "title": "Options", - "description": "Options for repeating dialog." - } - }, - "activityProcessed": { - "$ref": "#/definitions/booleanExpression", - "title": "Activity processed", - "description": "When set to false, the dialog that is called can process the current activity.", - "default": true - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.RepeatDialog" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.ReplaceDialog": { - "$role": "implements(Microsoft.IDialog)", - "type": "object", - "title": "Replace dialog", - "description": "Replace current dialog with another dialog.", - "$policies": { - "lastAction": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "dialog": { - "oneOf": [ - { - "$kind": "Microsoft.IDialog", - "pattern": "^(?!(=)).*", - "title": "Dialog", - "$ref": "#/definitions/Microsoft.IDialog" - }, - { - "$ref": "#/definitions/equalsExpression", - "examples": [ - "=settings.dialogId" - ] - } - ], - "title": "Dialog name", - "description": "Name of the dialog to call." - }, - "options": { - "$ref": "#/definitions/objectExpression", - "title": "Options", - "description": "One or more options that are passed to the dialog that is called.", - "additionalProperties": { - "type": "string", - "title": "Options", - "description": "Options for replacing dialog." - } - }, - "activityProcessed": { - "$ref": "#/definitions/booleanExpression", - "title": "Activity processed", - "description": "When set to false, the dialog that is called can process the current activity.", - "default": true - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.ReplaceDialog" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.ResourceMultiLanguageGenerator": { - "$role": "implements(Microsoft.ILanguageGenerator)", - "title": "Resource multi-language generator", - "description": "MultiLanguage Generator which is bound to resource by resource Id.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional generator ID." - }, - "resourceId": { - "type": "string", - "title": "Resource Id", - "description": "Resource which is the root language generator. Other generaters with the same name and language suffix will be loaded into this generator and used based on the Language Policy.", - "default": "dialog.result" - }, - "languagePolicy": { - "type": "object", - "title": "Language policy", - "description": "Set alternate language policy for this generator. If not set, the global language policy will be used." - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.ResourceMultiLanguageGenerator" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.SendActivity": { - "$role": "implements(Microsoft.IDialog)", - "title": "Send an activity", - "description": "Respond with an activity.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action." - }, - "activity": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Activity", - "description": "Activity to send.", - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.SendActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.SendHandoffActivity": { - "$role": "implements(Microsoft.IDialog)", - "title": "Send a handoff activity", - "description": "Sends a handoff activity to trigger a handoff request.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "context": { - "$ref": "#/definitions/objectExpression", - "title": "Context", - "description": "Context to send with the handoff request" - }, - "transcript": { - "$ref": "#/definitions/objectExpression", - "title": "transcript", - "description": "Transcript to send with the handoff request" - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.SendHandoffActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.SetProperties": { - "$role": "implements(Microsoft.IDialog)", - "title": "Set property", - "description": "Set one or more property values.", - "type": "object", - "required": [ - "assignments", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - true, - "=user.age > 3" - ] - }, - "assignments": { - "type": "array", - "title": "Assignments", - "description": "Property value assignments to set.", - "items": { - "type": "object", - "title": "Assignment", - "description": "Property assignment.", - "properties": { - "property": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property (named location to store information).", - "examples": [ - "user.age" - ] - }, - "value": { - "$ref": "#/definitions/valueExpression", - "title": "Value", - "description": "New value or expression.", - "examples": [ - "='milk'", - "=dialog.favColor", - "=dialog.favColor == 'red'" - ] - } - } - } - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.SetProperties" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.SetProperty": { - "$role": "implements(Microsoft.IDialog)", - "title": "Set property", - "description": "Set property to a value.", - "type": "object", - "required": [ - "property", - "value", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - true, - "=user.age > 3" - ] - }, - "property": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property (named location to store information).", - "examples": [ - "user.age" - ] - }, - "value": { - "$ref": "#/definitions/valueExpression", - "title": "Value", - "description": "New value or expression.", - "examples": [ - "='milk'", - "=dialog.favColor", - "=dialog.favColor == 'red'" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.SetProperty" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.SignOutUser": { - "$role": "implements(Microsoft.IDialog)", - "title": "Sign out user", - "description": "Sign a user out that was logged in previously using OAuthInput.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "userId": { - "$ref": "#/definitions/stringExpression", - "title": "UserId", - "description": "Expression to an user to signout. Default is user.id.", - "default": "=user.id" - }, - "connectionName": { - "$ref": "#/definitions/stringExpression", - "title": "Connection name", - "description": "Connection name that was used with OAuthInput to log a user in." - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - true, - "=user.age > 3" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.SignOutUser" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.StaticActivityTemplate": { - "$role": "implements(Microsoft.IActivityTemplate)", - "title": "Microsoft static activity template", - "description": "This allows you to define a static Activity object", - "type": "object", - "required": [ - "activity", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "activity": { - "$ref": "#/definitions/botframework.json/definitions/Activity", - "title": "Activity", - "description": "A static Activity to used.", - "required": [ - "type" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.StaticActivityTemplate" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.SwitchCondition": { - "$role": "implements(Microsoft.IDialog)", - "title": "Switch condition", - "description": "Execute different actions based on the value of a property.", - "type": "object", - "required": [ - "condition", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "condition": { - "$ref": "#/definitions/stringExpression", - "title": "Condition", - "description": "Property to evaluate.", - "examples": [ - "user.favColor" - ] - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - true, - "=user.age > 3" - ] - }, - "cases": { - "type": "array", - "title": "Cases", - "description": "Actions for each possible condition.", - "items": { - "type": "object", - "title": "Case", - "description": "Case and actions.", - "required": [ - "value" - ], - "properties": { - "value": { - "type": [ - "number", - "integer", - "boolean", - "string" - ], - "title": "Value", - "description": "The value to compare the condition with.", - "examples": [ - "red", - "true", - "13" - ] - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Actions to execute.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - } - } - } - }, - "default": { - "type": "array", - "title": "Default", - "description": "Actions to execute if none of the cases meet the condition.", - "items": { - "$kind": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.SwitchCondition" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.TelemetryTrackEventAction": { - "$role": "implements(Microsoft.IDialog)", - "type": "object", - "title": "Telemetry - track event", - "description": "Track a custom event using the registered Telemetry Client.", - "required": [ - "url", - "method", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "eventName": { - "$ref": "#/definitions/stringExpression", - "title": "Event name", - "description": "The name of the event to track.", - "examples": [ - "MyEventStarted", - "MyEventCompleted" - ] - }, - "properties": { - "type": "object", - "title": "Properties", - "description": "One or more properties to attach to the event being tracked.", - "additionalProperties": { - "$ref": "#/definitions/stringExpression" - } - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.TelemetryTrackEventAction" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.TemperatureEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Temperature recognizer", - "description": "Recognizer which recognizes temperatures.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.TemperatureEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.TemplateEngineLanguageGenerator": { - "$role": "implements(Microsoft.ILanguageGenerator)", - "title": "Template multi-language generator", - "description": "Template Generator which allows only inline evaluation of templates.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional generator ID." - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.TemplateEngineLanguageGenerator" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.TextInput": { - "$role": [ - "implements(Microsoft.IDialog)", - "extends(Microsoft.InputDialog)" - ], - "type": "object", - "title": "Text input dialog", - "description": "Collection information - Ask for a word or sentence.", - "$policies": { - "interactive": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "defaultValue": { - "$ref": "#/definitions/stringExpression", - "title": "Default value", - "description": "'Property' will be set to the value of this expression when max turn count is exceeded.", - "examples": [ - "hello world", - "Hello ${user.name}", - "=concat(user.firstname, user.lastName)" - ] - }, - "value": { - "$ref": "#/definitions/stringExpression", - "title": "Value", - "description": "'Property' will be set to the value of this expression unless it evaluates to null.", - "examples": [ - "hello world", - "Hello ${user.name}", - "=concat(user.firstname, user.lastName)" - ] - }, - "outputFormat": { - "$ref": "#/definitions/stringExpression", - "title": "Output format", - "description": "Expression to format the output.", - "examples": [ - "=toUpper(this.value)", - "${toUpper(this.value)}" - ] - }, - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "default": false, - "examples": [ - false, - "=user.isVip" - ] - }, - "prompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Initial prompt", - "description": "Message to send to collect information.", - "examples": [ - "What is your birth date?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "unrecognizedPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Unrecognized prompt", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "invalidPrompt": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Invalid prompt", - "description": "Message to send when the user input does not meet any validation expression.", - "examples": [ - "Sorry, '{this.value}' does not work. I need a number between 1-150. What is your age?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "defaultValueResponse": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Default value response", - "description": "Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.", - "examples": [ - "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it." - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "maxTurnCount": { - "$ref": "#/definitions/integerExpression", - "title": "Max turn count", - "description": "Maximum number of re-prompt attempts to collect information.", - "default": 3, - "minimum": 0, - "maximum": 2147483647, - "examples": [ - 3, - "=settings.xyz" - ] - }, - "validations": { - "type": "array", - "title": "Validation expressions", - "description": "Expression to validate user input.", - "items": { - "$ref": "#/definitions/condition", - "title": "Condition", - "description": "Expression which needs to met for the input to be considered valid", - "examples": [ - "int(this.value) > 1 && int(this.value) <= 150", - "count(this.value) < 300" - ] - } - }, - "property": { - "$ref": "#/definitions/stringExpression", - "title": "Property", - "description": "Property to store collected information. Input will be skipped if property has value (unless 'Always prompt' is true).", - "examples": [ - "$birthday", - "dialog.${user.name}", - "=f(x)" - ] - }, - "alwaysPrompt": { - "$ref": "#/definitions/booleanExpression", - "title": "Always prompt", - "description": "Collect information even if the specified 'property' is not empty.", - "default": false, - "examples": [ - false, - "=$val" - ] - }, - "allowInterruptions": { - "$ref": "#/definitions/booleanExpression", - "title": "Allow Interruptions", - "description": "A boolean expression that determines whether the parent should be allowed to interrupt the input.", - "default": true, - "examples": [ - true, - "=user.xyz" - ] - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.TextInput" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.TextTemplate": { - "$role": "implements(Microsoft.ITextTemplate)", - "title": "Microsoft TextTemplate", - "description": "Use LG Templates to create text", - "type": "object", - "required": [ - "template", - "$kind" - ], - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "template": { - "title": "Template", - "description": "Language Generator template to evaluate to create the text.", - "type": "string" - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.TextTemplate" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.ThrowException": { - "$role": "implements(Microsoft.IDialog)", - "title": "Throw an exception", - "description": "Throw an exception. Capture this exception with OnError trigger.", - "type": "object", - "required": [ - "errorValue", - "$kind" - ], - "$policies": { - "lastAction": true - }, - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - "user.age > 3" - ] - }, - "errorValue": { - "$ref": "#/definitions/valueExpression", - "title": "Error value", - "description": "Error value to throw." - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.ThrowException" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.TraceActivity": { - "$role": "implements(Microsoft.IDialog)", - "title": "Send a TraceActivity", - "description": "Send a trace activity to the transcript logger and/ or Bot Framework Emulator.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - true, - "=user.age > 3" - ] - }, - "name": { - "$ref": "#/definitions/stringExpression", - "title": "Name", - "description": "Name of the trace activity" - }, - "label": { - "$ref": "#/definitions/stringExpression", - "title": "Label", - "description": "Label for the trace activity (used to identify it in a list of trace activities.)" - }, - "valueType": { - "$ref": "#/definitions/stringExpression", - "title": "Value type", - "description": "Type of value" - }, - "value": { - "$ref": "#/definitions/valueExpression", - "title": "Value", - "description": "Property that holds the value to send as trace activity." - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.TraceActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.TrueSelector": { - "$role": "implements(Microsoft.ITriggerSelector)", - "title": "True trigger selector", - "description": "Selector for all true events", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.TrueSelector" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.UpdateActivity": { - "$role": "implements(Microsoft.IDialog)", - "title": "Update an activity", - "description": "Respond with an activity.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "Optional id for the dialog" - }, - "disabled": { - "$ref": "#/definitions/booleanExpression", - "title": "Disabled", - "description": "Optional condition which if true will disable this action.", - "examples": [ - true, - "=user.age > 3" - ] - }, - "activityId": { - "$ref": "#/definitions/stringExpression", - "title": "Activity Id", - "description": "An string expression with the activity id to update.", - "examples": [ - "=turn.lastresult.id" - ] - }, - "activity": { - "$kind": "Microsoft.IActivityTemplate", - "title": "Activity", - "description": "Activity to send.", - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.UpdateActivity" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "Microsoft.UrlEntityRecognizer": { - "$role": [ - "implements(Microsoft.IRecognizer)", - "implements(Microsoft.IEntityRecognizer)" - ], - "title": "Url recognizer", - "description": "Recognizer which recognizes urls.", - "type": "object", - "$package": { - "name": "Microsoft.Bot.Builder.Dialogs.Adaptive", - "version": "4.13.2" - }, - "required": [ - "$kind" - ], - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "title": "Tooling property", - "description": "Open ended property for tooling." - } - }, - "properties": { - "$kind": { - "title": "Kind of dialog object", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.UrlEntityRecognizer" - }, - "$designer": { - "title": "Designer information", - "type": "object", - "description": "Extra information for the Bot Framework Composer." - } - } - }, - "numberExpression": { - "$role": "expression", - "title": "Number or expression", - "description": "Number constant or expression to evaluate.", - "oneOf": [ - { - "type": "number", - "title": "Number", - "description": "Number constant.", - "default": 0, - "examples": [ - 15.5 - ] - }, - { - "$ref": "#/definitions/equalsExpression", - "examples": [ - "=dialog.quantity" - ] - } - ] - }, - "objectExpression": { - "$role": "expression", - "title": "Object or expression", - "description": "Object or expression to evaluate.", - "oneOf": [ - { - "type": "object", - "title": "Object", - "description": "Object constant." - }, - { - "$ref": "#/definitions/equalsExpression" - } - ] - }, - "role": { - "title": "$role", - "description": "Defines the role played in the dialog schema from [expression|interface|implements($kind)|extends($kind)].", - "type": "string", - "pattern": "^((expression)|(interface)|(implements\\([a-zA-Z][a-zA-Z0-9.]*\\))|(extends\\([a-zA-Z][a-zA-Z0-9.]*\\)))$" - }, - "stringExpression": { - "$role": "expression", - "title": "String or expression", - "description": "Interpolated string or expression to evaluate.", - "oneOf": [ - { - "type": "string", - "title": "String", - "description": "Interpolated string", - "pattern": "^(?!(=)).*", - "examples": [ - "Hello ${user.name}" - ] - }, - { - "$ref": "#/definitions/equalsExpression", - "examples": [ - "=concat('x','y','z')" - ] - } - ] - }, - "valueExpression": { - "$role": "expression", - "title": "Any or expression", - "description": "Any constant or expression to evaluate.", - "oneOf": [ - { - "type": "object", - "title": "Object", - "description": "Object constant." - }, - { - "type": "array", - "title": "Array", - "description": "Array constant." - }, - { - "type": "string", - "title": "String", - "description": "Interpolated string.", - "pattern": "^(?!(=)).*", - "examples": [ - "Hello ${user.name}" - ] - }, - { - "type": "boolean", - "title": "Boolean", - "description": "Boolean constant", - "examples": [ - false - ] - }, - { - "type": "number", - "title": "Number", - "description": "Number constant.", - "examples": [ - 15.5 - ] - }, - { - "$ref": "#/definitions/equalsExpression", - "examples": [ - "=..." - ] - } - ] - }, - "schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "type": "integer", - "minimum": 0, - "default": 0 - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "uniqueItems": true, - "default": [], - "items": { - "type": "string" - } - } - }, - "type": [ - "object", - "boolean" - ], - "default": true, - "properties": { - "$schema": { - "type": "string", - "format": "uri" - }, - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "$comment": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "default": true, - "readOnly": { - "type": "boolean", - "default": false - }, - "writeOnly": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": true - }, - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "number" - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "number" - }, - "maxLength": { - "$ref": "#/definitions/schema/definitions/nonNegativeInteger" - }, - "minLength": { - "$ref": "#/definitions/schema/definitions/nonNegativeIntegerDefault0" - }, - "pattern": { - "type": "string", - "format": "regex" - }, - "additionalItems": { - "$ref": "#/definitions/schema" - }, - "items": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "$ref": "#/definitions/schema/definitions/schemaArray" - } - ], - "default": true - }, - "maxItems": { - "$ref": "#/definitions/schema/definitions/nonNegativeInteger" - }, - "minItems": { - "$ref": "#/definitions/schema/definitions/nonNegativeIntegerDefault0" - }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "contains": { - "$ref": "#/definitions/schema" - }, - "maxProperties": { - "$ref": "#/definitions/schema/definitions/nonNegativeInteger" - }, - "minProperties": { - "$ref": "#/definitions/schema/definitions/nonNegativeIntegerDefault0" - }, - "required": { - "$ref": "#/definitions/schema/definitions/stringArray" - }, - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "definitions": { - "type": "object", - "default": {}, - "additionalProperties": { - "$ref": "#/definitions/schema" - } - }, - "properties": { - "type": "object", - "default": {}, - "additionalProperties": { - "$ref": "#/definitions/schema" - } - }, - "patternProperties": { - "type": "object", - "propertyNames": { - "format": "regex" - }, - "default": {}, - "additionalProperties": { - "$ref": "#/definitions/schema" - } - }, - "dependencies": { - "type": "object", - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "$ref": "#/definitions/schema/definitions/stringArray" - } - ] - } - }, - "propertyNames": { - "$ref": "#/definitions/schema" - }, - "const": true, - "enum": { - "type": "array", - "minItems": 1, - "uniqueItems": true, - "items": true - }, - "type": { - "anyOf": [ - { - "$ref": "#/definitions/schema/definitions/simpleTypes" - }, - { - "type": "array", - "items": { - "$ref": "#/definitions/schema/definitions/simpleTypes" - }, - "minItems": 1, - "uniqueItems": true - } - ] - }, - "format": { - "type": "string" - }, - "contentMediaType": { - "type": "string" - }, - "contentEncoding": { - "type": "string" - }, - "if": { - "$ref": "#/definitions/schema" - }, - "then": { - "$ref": "#/definitions/schema" - }, - "else": { - "$ref": "#/definitions/schema" - }, - "allOf": { - "$ref": "#/definitions/schema/definitions/schemaArray" - }, - "anyOf": { - "$ref": "#/definitions/schema/definitions/schemaArray" - }, - "oneOf": { - "$ref": "#/definitions/schema/definitions/schemaArray" - }, - "not": { - "$ref": "#/definitions/schema" - } - } - }, - "botframework.json": { - "$schema": "http://json-schema.org/draft-07/schema#", - "definitions": { - "ChannelAccount": { - "description": "Channel account information needed to route a message", - "title": "ChannelAccount", - "type": "object", - "required": [ - "id", - "name" - ], - "properties": { - "id": { - "description": "Channel id for the user or bot on this channel (Example: joe@smith.com, or @joesmith or\n123456)", - "type": "string", - "title": "id" - }, - "name": { - "description": "Display friendly name", - "type": "string", - "title": "name" - }, - "aadObjectId": { - "description": "This account's object ID within Azure Active Directory (AAD)", - "type": "string", - "title": "aadObjectId" - }, - "role": { - "description": "Role of the entity behind the account (Example: User, Bot, etc.). Possible values include:\n'user', 'bot'", - "type": "string", - "title": "role" - } - } - }, - "ConversationAccount": { - "description": "Channel account information for a conversation", - "title": "ConversationAccount", - "type": "object", - "required": [ - "conversationType", - "id", - "isGroup", - "name" - ], - "properties": { - "isGroup": { - "description": "Indicates whether the conversation contains more than two participants at the time the\nactivity was generated", - "type": "boolean", - "title": "isGroup" - }, - "conversationType": { - "description": "Indicates the type of the conversation in channels that distinguish between conversation types", - "type": "string", - "title": "conversationType" - }, - "id": { - "description": "Channel id for the user or bot on this channel (Example: joe@smith.com, or @joesmith or\n123456)", - "type": "string", - "title": "id" - }, - "name": { - "description": "Display friendly name", - "type": "string", - "title": "name" - }, - "aadObjectId": { - "description": "This account's object ID within Azure Active Directory (AAD)", - "type": "string", - "title": "aadObjectId" - }, - "role": { - "description": "Role of the entity behind the account (Example: User, Bot, etc.). Possible values include:\n'user', 'bot'", - "enum": [ - "bot", - "user" - ], - "type": "string", - "title": "role" - } - } - }, - "MessageReaction": { - "description": "Message reaction object", - "title": "MessageReaction", - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "description": "Message reaction type. Possible values include: 'like', 'plusOne'", - "type": "string", - "title": "type" - } - } - }, - "CardAction": { - "description": "A clickable action", - "title": "CardAction", - "type": "object", - "required": [ - "title", - "type", - "value" - ], - "properties": { - "type": { - "description": "The type of action implemented by this button. Possible values include: 'openUrl', 'imBack',\n'postBack', 'playAudio', 'playVideo', 'showImage', 'downloadFile', 'signin', 'call',\n'payment', 'messageBack'", - "type": "string", - "title": "type" - }, - "title": { - "description": "Text description which appears on the button", - "type": "string", - "title": "title" - }, - "image": { - "description": "Image URL which will appear on the button, next to text label", - "type": "string", - "title": "image" - }, - "text": { - "description": "Text for this action", - "type": "string", - "title": "text" - }, - "displayText": { - "description": "(Optional) text to display in the chat feed if the button is clicked", - "type": "string", - "title": "displayText" - }, - "value": { - "description": "Supplementary parameter for action. Content of this property depends on the ActionType", - "title": "value" - }, - "channelData": { - "description": "Channel-specific data associated with this action", - "title": "channelData" - } - } - }, - "SuggestedActions": { - "description": "SuggestedActions that can be performed", - "title": "SuggestedActions", - "type": "object", - "required": [ - "actions", - "to" - ], - "properties": { - "to": { - "description": "Ids of the recipients that the actions should be shown to. These Ids are relative to the\nchannelId and a subset of all recipients of the activity", - "type": "array", - "title": "to", - "items": { - "title": "Id", - "description": "Id of recipient.", - "type": "string" - } - }, - "actions": { - "description": "Actions that can be shown to the user", - "type": "array", - "title": "actions", - "items": { - "$ref": "#/definitions/botframework.json/definitions/CardAction" - } - } - } - }, - "Attachment": { - "description": "An attachment within an activity", - "title": "Attachment", - "type": "object", - "required": [ - "contentType" - ], - "properties": { - "contentType": { - "description": "mimetype/Contenttype for the file", - "type": "string", - "title": "contentType" - }, - "contentUrl": { - "description": "Content Url", - "type": "string", - "title": "contentUrl" - }, - "content": { - "type": "object", - "description": "Embedded content", - "title": "content" - }, - "name": { - "description": "(OPTIONAL) The name of the attachment", - "type": "string", - "title": "name" - }, - "thumbnailUrl": { - "description": "(OPTIONAL) Thumbnail associated with attachment", - "type": "string", - "title": "thumbnailUrl" - } - } - }, - "Entity": { - "description": "Metadata object pertaining to an activity", - "title": "Entity", - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "description": "Type of this entity (RFC 3987 IRI)", - "type": "string", - "title": "type" - } - } - }, - "ConversationReference": { - "description": "An object relating to a particular point in a conversation", - "title": "ConversationReference", - "type": "object", - "required": [ - "bot", - "channelId", - "conversation", - "serviceUrl" - ], - "properties": { - "activityId": { - "description": "(Optional) ID of the activity to refer to", - "type": "string", - "title": "activityId" - }, - "user": { - "description": "(Optional) User participating in this conversation", - "$ref": "#/definitions/botframework.json/definitions/ChannelAccount", - "title": "user" - }, - "bot": { - "$ref": "#/definitions/botframework.json/definitions/ChannelAccount", - "description": "Bot participating in this conversation", - "title": "bot" - }, - "conversation": { - "$ref": "#/definitions/botframework.json/definitions/ConversationAccount", - "description": "Conversation reference", - "title": "conversation" - }, - "channelId": { - "description": "Channel ID", - "type": "string", - "title": "channelId" - }, - "serviceUrl": { - "description": "Service endpoint where operations concerning the referenced conversation may be performed", - "type": "string", - "title": "serviceUrl" - } - } - }, - "TextHighlight": { - "description": "Refers to a substring of content within another field", - "title": "TextHighlight", - "type": "object", - "required": [ - "occurrence", - "text" - ], - "properties": { - "text": { - "description": "Defines the snippet of text to highlight", - "type": "string", - "title": "text" - }, - "occurrence": { - "description": "Occurrence of the text field within the referenced text, if multiple exist.", - "type": "number", - "title": "occurrence" - } - } - }, - "SemanticAction": { - "description": "Represents a reference to a programmatic action", - "title": "SemanticAction", - "type": "object", - "required": [ - "entities", - "id" - ], - "properties": { - "id": { - "description": "ID of this action", - "type": "string", - "title": "id" - }, - "entities": { - "description": "Entities associated with this action", - "type": "object", - "title": "entities", - "additionalProperties": { - "$ref": "#/definitions/botframework.json/definitions/Entity" - } - } - } - }, - "Activity": { - "description": "An Activity is the basic communication type for the Bot Framework 3.0 protocol.", - "title": "Activity", - "type": "object", - "properties": { - "type": { - "description": "Contains the activity type. Possible values include: 'message', 'contactRelationUpdate',\n'conversationUpdate', 'typing', 'endOfConversation', 'event', 'invoke', 'deleteUserData',\n'messageUpdate', 'messageDelete', 'installationUpdate', 'messageReaction', 'suggestion',\n'trace', 'handoff'", - "type": "string", - "title": "type" - }, - "id": { - "description": "Contains an ID that uniquely identifies the activity on the channel.", - "type": "string", - "title": "id" - }, - "timestamp": { - "description": "Contains the date and time that the message was sent, in UTC, expressed in ISO-8601 format.", - "type": "string", - "format": "date-time", - "title": "timestamp" - }, - "localTimestamp": { - "description": "Contains the date and time that the message was sent, in local time, expressed in ISO-8601\nformat.\nFor example, 2016-09-23T13:07:49.4714686-07:00.", - "type": "string", - "format": "date-time", - "title": "localTimestamp" - }, - "localTimezone": { - "description": "Contains the name of the timezone in which the message, in local time, expressed in IANA Time\nZone database format.\nFor example, America/Los_Angeles.", - "type": "string", - "title": "localTimezone" - }, - "serviceUrl": { - "description": "Contains the URL that specifies the channel's service endpoint. Set by the channel.", - "type": "string", - "title": "serviceUrl" - }, - "channelId": { - "description": "Contains an ID that uniquely identifies the channel. Set by the channel.", - "type": "string", - "title": "channelId" - }, - "from": { - "$ref": "#/definitions/botframework.json/definitions/ChannelAccount", - "description": "Identifies the sender of the message.", - "title": "from" - }, - "conversation": { - "$ref": "#/definitions/botframework.json/definitions/ConversationAccount", - "description": "Identifies the conversation to which the activity belongs.", - "title": "conversation" - }, - "recipient": { - "$ref": "#/definitions/botframework.json/definitions/ChannelAccount", - "description": "Identifies the recipient of the message.", - "title": "recipient" - }, - "textFormat": { - "description": "Format of text fields Default:markdown. Possible values include: 'markdown', 'plain', 'xml'", - "type": "string", - "title": "textFormat" - }, - "attachmentLayout": { - "description": "The layout hint for multiple attachments. Default: list. Possible values include: 'list',\n'carousel'", - "type": "string", - "title": "attachmentLayout" - }, - "membersAdded": { - "description": "The collection of members added to the conversation.", - "type": "array", - "title": "membersAdded", - "items": { - "$ref": "#/definitions/botframework.json/definitions/ChannelAccount" - } - }, - "membersRemoved": { - "description": "The collection of members removed from the conversation.", - "type": "array", - "title": "membersRemoved", - "items": { - "$ref": "#/definitions/botframework.json/definitions/ChannelAccount" - } - }, - "reactionsAdded": { - "description": "The collection of reactions added to the conversation.", - "type": "array", - "title": "reactionsAdded", - "items": { - "$ref": "#/definitions/botframework.json/definitions/MessageReaction" - } - }, - "reactionsRemoved": { - "description": "The collection of reactions removed from the conversation.", - "type": "array", - "title": "reactionsRemoved", - "items": { - "$ref": "#/definitions/botframework.json/definitions/MessageReaction" - } - }, - "topicName": { - "description": "The updated topic name of the conversation.", - "type": "string", - "title": "topicName" - }, - "historyDisclosed": { - "description": "Indicates whether the prior history of the channel is disclosed.", - "type": "boolean", - "title": "historyDisclosed" - }, - "locale": { - "description": "A locale name for the contents of the text field.\nThe locale name is a combination of an ISO 639 two- or three-letter culture code associated\nwith a language\nand an ISO 3166 two-letter subculture code associated with a country or region.\nThe locale name can also correspond to a valid BCP-47 language tag.", - "type": "string", - "title": "locale" - }, - "text": { - "description": "The text content of the message.", - "type": "string", - "title": "text" - }, - "speak": { - "description": "The text to speak.", - "type": "string", - "title": "speak" - }, - "inputHint": { - "description": "Indicates whether your bot is accepting,\nexpecting, or ignoring user input after the message is delivered to the client. Possible\nvalues include: 'acceptingInput', 'ignoringInput', 'expectingInput'", - "type": "string", - "title": "inputHint" - }, - "summary": { - "description": "The text to display if the channel cannot render cards.", - "type": "string", - "title": "summary" - }, - "suggestedActions": { - "description": "The suggested actions for the activity.", - "$ref": "#/definitions/botframework.json/definitions/SuggestedActions", - "title": "suggestedActions" - }, - "attachments": { - "description": "Attachments", - "type": "array", - "title": "attachments", - "items": { - "$ref": "#/definitions/botframework.json/definitions/Attachment" - } - }, - "entities": { - "description": "Represents the entities that were mentioned in the message.", - "type": "array", - "title": "entities", - "items": { - "$ref": "#/definitions/botframework.json/definitions/Entity" - } - }, - "channelData": { - "description": "Contains channel-specific content.", - "title": "channelData" - }, - "action": { - "description": "Indicates whether the recipient of a contactRelationUpdate was added or removed from the\nsender's contact list.", - "type": "string", - "title": "action" - }, - "replyToId": { - "description": "Contains the ID of the message to which this message is a reply.", - "type": "string", - "title": "replyToId" - }, - "label": { - "description": "A descriptive label for the activity.", - "type": "string", - "title": "label" - }, - "valueType": { - "description": "The type of the activity's value object.", - "type": "string", - "title": "valueType" - }, - "value": { - "description": "A value that is associated with the activity.", - "title": "value" - }, - "name": { - "description": "The name of the operation associated with an invoke or event activity.", - "type": "string", - "title": "name" - }, - "relatesTo": { - "description": "A reference to another conversation or activity.", - "$ref": "#/definitions/botframework.json/definitions/ConversationReference", - "title": "relatesTo" - }, - "code": { - "description": "The a code for endOfConversation activities that indicates why the conversation ended.\nPossible values include: 'unknown', 'completedSuccessfully', 'userCancelled', 'botTimedOut',\n'botIssuedInvalidMessage', 'channelFailed'", - "type": "string", - "title": "code" - }, - "expiration": { - "description": "The time at which the activity should be considered to be \"expired\" and should not be\npresented to the recipient.", - "type": "string", - "format": "date-time", - "title": "expiration" - }, - "importance": { - "description": "The importance of the activity. Possible values include: 'low', 'normal', 'high'", - "type": "string", - "title": "importance" - }, - "deliveryMode": { - "description": "A delivery hint to signal to the recipient alternate delivery paths for the activity.\nThe default delivery mode is \"default\". Possible values include: 'normal', 'notification'", - "type": "string", - "title": "deliveryMode" - }, - "listenFor": { - "description": "List of phrases and references that speech and language priming systems should listen for", - "type": "array", - "title": "listenFor", - "items": { - "type": "string", - "title": "Phrase", - "description": "Phrase to listen for." - } - }, - "textHighlights": { - "description": "The collection of text fragments to highlight when the activity contains a ReplyToId value.", - "type": "array", - "title": "textHighlights", - "items": { - "$ref": "#/definitions/botframework.json/definitions/TextHighlight" - } - }, - "semanticAction": { - "$ref": "#/definitions/botframework.json/definitions/SemanticAction", - "description": "An optional programmatic action accompanying this request", - "title": "semanticAction" - } - } - } - } - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/schemas/sdk.uischema b/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/schemas/sdk.uischema deleted file mode 100644 index 9cf19c6919..0000000000 --- a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/schemas/sdk.uischema +++ /dev/null @@ -1,1409 +0,0 @@ -{ - "$schema": "https://schemas.botframework.com/schemas/ui/v1.0/ui.schema", - "Microsoft.AdaptiveDialog": { - "form": { - "description": "This configures a data driven dialog via a collection of events and actions.", - "helpLink": "https://aka.ms/bf-composer-docs-dialog", - "hidden": [ - "triggers", - "generator", - "selector", - "schema" - ], - "label": "Adaptive dialog", - "order": [ - "recognizer", - "*" - ], - "properties": { - "recognizer": { - "description": "To understand what the user says, your dialog needs a \"Recognizer\"; that includes example words and sentences that users may use.", - "label": "Language Understanding" - } - } - } - }, - "Microsoft.Ask": { - "flow": { - "body": { - "field": "activity", - "widget": "LgWidget" - }, - "footer": { - "description": "= Default operation", - "property": "=action.defaultOperation", - "widget": "PropertyDescription" - }, - "header": { - "colors": { - "icon": "#5C2E91", - "theme": "#EEEAF4" - }, - "icon": "MessageBot", - "widget": "ActionHeader" - }, - "hideFooter": "=!action.defaultOperation", - "widget": "ActionCard" - }, - "form": { - "helpLink": "https://aka.ms/bfc-send-activity", - "label": "Send a response to ask a question", - "order": [ - "activity", - "*" - ], - "subtitle": "Ask Activity" - } - }, - "Microsoft.AttachmentInput": { - "flow": { - "body": "=action.prompt", - "botAsks": { - "body": { - "defaultContent": "", - "field": "prompt", - "widget": "LgWidget" - }, - "header": { - "colors": { - "icon": "#5C2E91", - "theme": "#EEEAF4" - }, - "icon": "MessageBot", - "widget": "ActionHeader" - }, - "widget": "ActionCard" - }, - "nowrap": true, - "userInput": { - "header": { - "colors": { - "icon": "#0078D4", - "theme": "#E5F0FF" - }, - "disableSDKTitle": true, - "icon": "User", - "menu": "none", - "widget": "ActionHeader" - }, - "widget": "ActionCard" - }, - "widget": "PromptWidget" - }, - "form": { - "helpLink": "https://aka.ms/bfc-ask-for-user-input", - "label": "Prompt for a file or an attachment", - "properties": { - "property": { - "intellisenseScopes": [ - "variable-scopes" - ] - } - }, - "subtitle": "Attachment Input" - } - }, - "Microsoft.BeginDialog": { - "flow": { - "body": { - "dialog": "=action.dialog", - "widget": "DialogRef" - }, - "footer": { - "description": "= Return value", - "property": "=action.resultProperty", - "widget": "PropertyDescription" - }, - "hideFooter": "=!action.resultProperty", - "widget": "ActionCard" - }, - "form": { - "helpLink": "https://aka.ms/bfc-understanding-dialogs", - "label": "Begin a new dialog", - "order": [ - "dialog", - "options", - "resultProperty", - "*" - ], - "properties": { - "resultProperty": { - "intellisenseScopes": [ - "variable-scopes" - ] - } - }, - "subtitle": "Begin Dialog" - } - }, - "Microsoft.BeginSkill": { - "flow": { - "body": { - "operation": "Host", - "resource": "=coalesce(action.skillEndpoint, \"?\")", - "singleline": true, - "widget": "ResourceOperation" - }, - "colors": { - "color": "#FFFFFF", - "icon": "#FFFFFF", - "theme": "#004578" - }, - "footer": { - "description": "= Result", - "property": "=action.resultProperty", - "widget": "PropertyDescription" - }, - "hideFooter": "=!action.resultProperty", - "icon": "Library", - "widget": "ActionCard" - }, - "form": { - "helpLink": "https://aka.ms/bf-composer-docs-connect-skill", - "label": "Connect to a skill", - "properties": { - "resultProperty": { - "intellisenseScopes": [ - "variable-scopes" - ] - } - }, - "subtitle": "Skill Dialog" - } - }, - "Microsoft.BreakLoop": { - "form": { - "label": "Break out of loop", - "subtitle": "Break out of loop" - } - }, - "Microsoft.CancelAllDialogs": { - "flow": { - "body": { - "description": "(Event)", - "property": "=coalesce(action.eventName, \"?\")", - "widget": "PropertyDescription" - }, - "widget": "ActionCard" - }, - "form": { - "helpLink": "https://aka.ms/bfc-understanding-dialogs", - "label": "Cancel all active dialogs", - "subtitle": "Cancel All Dialogs" - } - }, - "Microsoft.ChoiceInput": { - "flow": { - "body": "=action.prompt", - "botAsks": { - "body": { - "defaultContent": "", - "field": "prompt", - "widget": "LgWidget" - }, - "header": { - "colors": { - "icon": "#5C2E91", - "theme": "#EEEAF4" - }, - "icon": "MessageBot", - "widget": "ActionHeader" - }, - "widget": "ActionCard" - }, - "nowrap": true, - "userInput": { - "header": { - "colors": { - "icon": "#0078D4", - "theme": "#E5F0FF" - }, - "disableSDKTitle": true, - "icon": "User", - "menu": "none", - "widget": "ActionHeader" - }, - "widget": "ActionCard" - }, - "widget": "PromptWidget" - }, - "form": { - "helpLink": "https://aka.ms/bfc-ask-for-user-input", - "label": "Prompt with multi-choice", - "properties": { - "property": { - "intellisenseScopes": [ - "variable-scopes" - ] - } - }, - "subtitle": "Choice Input" - } - }, - "Microsoft.ConfirmInput": { - "flow": { - "body": "=action.prompt", - "botAsks": { - "body": { - "defaultContent": "", - "field": "prompt", - "widget": "LgWidget" - }, - "header": { - "colors": { - "icon": "#5C2E91", - "theme": "#EEEAF4" - }, - "icon": "MessageBot", - "widget": "ActionHeader" - }, - "widget": "ActionCard" - }, - "nowrap": true, - "userInput": { - "header": { - "colors": { - "icon": "#0078D4", - "theme": "#E5F0FF" - }, - "disableSDKTitle": true, - "icon": "User", - "menu": "none", - "widget": "ActionHeader" - }, - "widget": "ActionCard" - }, - "widget": "PromptWidget" - }, - "form": { - "helpLink": "https://aka.ms/bfc-ask-for-user-input", - "label": "Prompt for confirmation", - "properties": { - "property": { - "intellisenseScopes": [ - "variable-scopes" - ] - } - }, - "subtitle": "Confirm Input" - } - }, - "Microsoft.ContinueLoop": { - "form": { - "label": "Continue loop", - "subtitle": "Continue loop" - } - }, - "Microsoft.DateTimeInput": { - "flow": { - "body": "=action.prompt", - "botAsks": { - "body": { - "defaultContent": "", - "field": "prompt", - "widget": "LgWidget" - }, - "header": { - "colors": { - "icon": "#5C2E91", - "theme": "#EEEAF4" - }, - "icon": "MessageBot", - "widget": "ActionHeader" - }, - "widget": "ActionCard" - }, - "nowrap": true, - "userInput": { - "header": { - "colors": { - "icon": "#0078D4", - "theme": "#E5F0FF" - }, - "disableSDKTitle": true, - "icon": "User", - "menu": "none", - "widget": "ActionHeader" - }, - "widget": "ActionCard" - }, - "widget": "PromptWidget" - }, - "form": { - "helpLink": "https://aka.ms/bfc-ask-for-user-input", - "label": "Prompt for a date or a time", - "properties": { - "property": { - "intellisenseScopes": [ - "variable-scopes" - ] - } - }, - "subtitle": "Date Time Input" - } - }, - "Microsoft.DebugBreak": { - "form": { - "label": "Debug Break" - } - }, - "Microsoft.DeleteProperties": { - "flow": { - "body": { - "items": "=action.properties", - "widget": "ListOverview" - }, - "widget": "ActionCard" - }, - "form": { - "helpLink": "https://aka.ms/bfc-using-memory", - "label": "Delete properties", - "properties": { - "properties": { - "intellisenseScopes": [ - "user-variables" - ] - } - }, - "subtitle": "Delete Properties" - } - }, - "Microsoft.DeleteProperty": { - "flow": { - "body": "=action.property", - "widget": "ActionCard" - }, - "form": { - "helpLink": "https://aka.ms/bfc-using-memory", - "label": "Delete a property", - "properties": { - "property": { - "intellisenseScopes": [ - "user-variables" - ] - } - }, - "subtitle": "Delete Property" - } - }, - "Microsoft.EditActions": { - "flow": { - "body": "=action.changeType", - "widget": "ActionCard" - }, - "form": { - "label": "Modify active dialog", - "subtitle": "Edit Actions" - } - }, - "Microsoft.EditArray": { - "flow": { - "body": { - "operation": "=coalesce(action.changeType, \"?\")", - "resource": "=coalesce(action.itemsProperty, \"?\")", - "widget": "ResourceOperation" - }, - "footer": { - "description": "= Result", - "property": "=action.resultProperty", - "widget": "PropertyDescription" - }, - "hideFooter": "=!action.resultProperty", - "widget": "ActionCard" - }, - "form": { - "helpLink": "https://aka.ms/bfc-using-memory", - "label": "Edit an array property", - "properties": { - "itemsProperty": { - "intellisenseScopes": [ - "user-variables" - ] - }, - "resultProperty": { - "intellisenseScopes": [ - "variable-scopes" - ] - } - }, - "subtitle": "Edit Array" - } - }, - "Microsoft.EmitEvent": { - "flow": { - "body": { - "description": "(Event)", - "property": "=coalesce(action.eventName, \"?\")", - "widget": "PropertyDescription" - }, - "widget": "ActionCard" - }, - "form": { - "helpLink": "https://aka.ms/bfc-custom-events", - "label": "Emit a custom event", - "subtitle": "Emit Event" - } - }, - "Microsoft.EndDialog": { - "form": { - "helpLink": "https://aka.ms/bfc-understanding-dialogs", - "label": "End this dialog", - "subtitle": "End Dialog" - } - }, - "Microsoft.EndTurn": { - "form": { - "helpLink": "https://aka.ms/bfc-understanding-dialogs", - "label": "End turn", - "subtitle": "End Turn" - } - }, - "Microsoft.Foreach": { - "flow": { - "loop": { - "body": "=concat(\"Each value in \", coalesce(action.itemsProperty, \"?\"))", - "widget": "ActionCard" - }, - "nowrap": true, - "widget": "ForeachWidget" - }, - "form": { - "helpLink": "https://aka.ms/bfc-controlling-conversation-flow", - "hidden": [ - "actions" - ], - "label": "Loop: For each item", - "order": [ - "itemsProperty", - "*" - ], - "properties": { - "index": { - "intellisenseScopes": [ - "variable-scopes" - ] - }, - "itemsProperty": { - "intellisenseScopes": [ - "user-variables" - ] - }, - "value": { - "intellisenseScopes": [ - "variable-scopes" - ] - } - }, - "subtitle": "For Each" - } - }, - "Microsoft.ForeachPage": { - "flow": { - "loop": { - "body": "=concat(\"Each page of \", coalesce(action.pageSize, \"?\"), \" in \", coalesce(action.page, \"?\"))", - "widget": "ActionCard" - }, - "nowrap": true, - "widget": "ForeachWidget" - }, - "form": { - "helpLink": "https://aka.ms/bfc-controlling-conversation-flow", - "hidden": [ - "actions" - ], - "label": "Loop: For each page (multiple items)", - "order": [ - "itemsProperty", - "pageSize", - "*" - ], - "properties": { - "itemsProperty": { - "intellisenseScopes": [ - "user-variables" - ] - }, - "page": { - "intellisenseScopes": [ - "variable-scopes" - ] - }, - "pageIndex": { - "intellisenseScopes": [ - "variable-scopes" - ] - } - }, - "subtitle": "For Each Page" - } - }, - "Microsoft.GetActivityMembers": { - "flow": { - "body": { - "description": "= ActivityId", - "property": "=coalesce(action.activityId, \"?\")", - "widget": "PropertyDescription" - }, - "footer": { - "description": "= Result property", - "property": "=coalesce(action.property, \"?\")", - "widget": "PropertyDescription" - }, - "widget": "ActionCard" - } - }, - "Microsoft.GetConversationMembers": { - "flow": { - "footer": { - "description": "= Result property", - "property": "=action.property", - "widget": "PropertyDescription" - }, - "widget": "ActionCard" - } - }, - "Microsoft.HttpRequest": { - "flow": { - "body": { - "operation": "=action.method", - "resource": "=action.url", - "singleline": true, - "widget": "ResourceOperation" - }, - "footer": { - "description": "= Result property", - "property": "=action.resultProperty", - "widget": "PropertyDescription" - }, - "hideFooter": "=!action.resultProperty", - "widget": "ActionCard" - }, - "form": { - "helpLink": "https://aka.ms/bfc-using-http", - "label": "Send an HTTP request", - "order": [ - "method", - "url", - "body", - "headers", - "*" - ], - "properties": { - "resultProperty": { - "intellisenseScopes": [ - "variable-scopes" - ] - } - }, - "subtitle": "HTTP Request" - } - }, - "Microsoft.IfCondition": { - "flow": { - "judgement": { - "body": "=coalesce(action.condition, \"\")", - "widget": "ActionCard" - }, - "nowrap": true, - "widget": "IfConditionWidget" - }, - "form": { - "helpLink": "https://aka.ms/bfc-controlling-conversation-flow", - "hidden": [ - "actions", - "elseActions" - ], - "label": "Branch: If/Else", - "subtitle": "If Condition" - } - }, - "Microsoft.LogAction": { - "form": { - "helpLink": "https://aka.ms/composer-telemetry", - "label": "Log to console", - "subtitle": "Log Action" - } - }, - "Microsoft.NumberInput": { - "flow": { - "body": "=action.prompt", - "botAsks": { - "body": { - "defaultContent": "", - "field": "prompt", - "widget": "LgWidget" - }, - "header": { - "colors": { - "icon": "#5C2E91", - "theme": "#EEEAF4" - }, - "icon": "MessageBot", - "widget": "ActionHeader" - }, - "widget": "ActionCard" - }, - "nowrap": true, - "userInput": { - "header": { - "colors": { - "icon": "#0078D4", - "theme": "#E5F0FF" - }, - "disableSDKTitle": true, - "icon": "User", - "menu": "none", - "widget": "ActionHeader" - }, - "widget": "ActionCard" - }, - "widget": "PromptWidget" - }, - "form": { - "helpLink": "https://aka.ms/bfc-ask-for-user-input", - "label": "Prompt for a number", - "properties": { - "property": { - "intellisenseScopes": [ - "variable-scopes" - ] - } - }, - "subtitle": "Number Input" - } - }, - "Microsoft.OAuthInput": { - "flow": { - "body": { - "operation": "Connection", - "resource": "=coalesce(action.connectionName, \"?\")", - "singleline": true, - "widget": "ResourceOperation" - }, - "footer": { - "description": "= Token property", - "property": "=action.property", - "widget": "PropertyDescription" - }, - "hideFooter": "=!action.property", - "widget": "ActionCard" - }, - "form": { - "helpLink": "https://aka.ms/bfc-using-oauth", - "label": "OAuth login", - "order": [ - "connectionName", - "*" - ], - "subtitle": "OAuth Input" - } - }, - "Microsoft.OnActivity": { - "form": { - "hidden": [ - "actions" - ], - "label": "Activities", - "order": [ - "condition", - "*" - ], - "subtitle": "Activity received" - }, - "trigger": { - "label": "Activities (Activity received)", - "order": 5.1, - "submenu": { - "label": "Activities", - "placeholder": "Select an activity type", - "prompt": "Which activity type?" - } - } - }, - "Microsoft.OnAssignEntity": { - "form": { - "hidden": [ - "actions" - ], - "label": "Handle a condition when an entity is assigned", - "order": [ - "condition", - "*" - ], - "subtitle": "EntityAssigned activity" - } - }, - "Microsoft.OnBeginDialog": { - "form": { - "hidden": [ - "actions" - ], - "label": "Dialog started", - "order": [ - "condition", - "*" - ], - "subtitle": "Begin dialog event" - }, - "trigger": { - "label": "Dialog started (Begin dialog event)", - "order": 4.1, - "submenu": { - "label": "Dialog events", - "placeholder": "Select an event type", - "prompt": "Which event?" - } - } - }, - "Microsoft.OnCancelDialog": { - "form": { - "hidden": [ - "actions" - ], - "label": "Dialog cancelled", - "order": [ - "condition", - "*" - ], - "subtitle": "Cancel dialog event" - }, - "trigger": { - "label": "Dialog cancelled (Cancel dialog event)", - "order": 4.2, - "submenu": "Dialog events" - } - }, - "Microsoft.OnChooseEntity": { - "form": { - "hidden": [ - "actions" - ], - "order": [ - "condition", - "*" - ] - } - }, - "Microsoft.OnChooseIntent": { - "form": { - "hidden": [ - "actions" - ], - "order": [ - "condition", - "*" - ] - }, - "trigger": { - "label": "Duplicated intents recognized", - "order": 6 - } - }, - "Microsoft.OnCommandActivity": { - "form": { - "hidden": [ - "actions" - ], - "label": "Command received", - "order": [ - "condition", - "*" - ], - "subtitle": "Command activity received" - }, - "trigger": { - "label": "Command received (Command activity received)", - "order": 5.81, - "submenu": "Activities" - } - }, - "Microsoft.OnCommandResultActivity": { - "form": { - "hidden": [ - "actions" - ], - "label": "Command Result received", - "order": [ - "condition", - "*" - ], - "subtitle": "Command Result activity received" - }, - "trigger": { - "label": "Command Result received (Command Result activity received)", - "order": 5.81, - "submenu": "Activities" - } - }, - "Microsoft.OnCondition": { - "form": { - "hidden": [ - "actions" - ], - "label": "Handle a condition", - "order": [ - "condition", - "*" - ], - "subtitle": "Condition" - } - }, - "Microsoft.OnConversationUpdateActivity": { - "form": { - "description": "Handle the events fired when a user begins a new conversation with the bot.", - "helpLink": "https://aka.ms/bf-composer-docs-conversation-update-activity", - "hidden": [ - "actions" - ], - "label": "Greeting", - "order": [ - "condition", - "*" - ], - "subtitle": "ConversationUpdate activity" - }, - "trigger": { - "label": "Greeting (ConversationUpdate activity)", - "order": 5.2, - "submenu": "Activities" - } - }, - "Microsoft.OnDialogEvent": { - "form": { - "hidden": [ - "actions" - ], - "label": "Dialog events", - "order": [ - "condition", - "*" - ], - "subtitle": "Dialog event" - }, - "trigger": { - "label": "Custom events", - "order": 7 - } - }, - "Microsoft.OnEndOfActions": { - "form": { - "hidden": [ - "actions" - ], - "label": "Handle a condition when actions have ended", - "order": [ - "condition", - "*" - ], - "subtitle": "EndOfActions activity" - } - }, - "Microsoft.OnEndOfConversationActivity": { - "form": { - "hidden": [ - "actions" - ], - "label": "Conversation ended", - "order": [ - "condition", - "*" - ], - "subtitle": "EndOfConversation activity" - }, - "trigger": { - "label": "Conversation ended (EndOfConversation activity)", - "order": 5.3, - "submenu": "Activities" - } - }, - "Microsoft.OnError": { - "form": { - "hidden": [ - "actions" - ], - "label": "Error occurred", - "order": [ - "condition", - "*" - ], - "subtitle": "Error event" - }, - "trigger": { - "label": "Error occurred (Error event)", - "order": 4.3, - "submenu": "Dialog events" - } - }, - "Microsoft.OnEventActivity": { - "form": { - "hidden": [ - "actions" - ], - "label": "Event received", - "order": [ - "condition", - "*" - ], - "subtitle": "Event activity" - }, - "trigger": { - "label": "Event received (Event activity)", - "order": 5.4, - "submenu": "Activities" - } - }, - "Microsoft.OnHandoffActivity": { - "form": { - "hidden": [ - "actions" - ], - "label": "Handover to human", - "order": [ - "condition", - "*" - ], - "subtitle": "Handoff activity" - }, - "trigger": { - "label": "Handover to human (Handoff activity)", - "order": 5.5, - "submenu": "Activities" - } - }, - "Microsoft.OnInstallationUpdateActivity": { - "form": { - "hidden": [ - "actions" - ], - "label": "Installation updated", - "order": [ - "condition", - "*" - ], - "subtitle": "Installation updated activity" - } - }, - "Microsoft.OnIntent": { - "form": { - "hidden": [ - "actions" - ], - "label": "Intent recognized", - "order": [ - "intent", - "condition", - "entities", - "*" - ], - "subtitle": "Intent recognized" - }, - "trigger": { - "label": "Intent recognized", - "order": 1 - } - }, - "Microsoft.OnInvokeActivity": { - "form": { - "hidden": [ - "actions" - ], - "label": "Conversation invoked", - "order": [ - "condition", - "*" - ], - "subtitle": "Invoke activity" - }, - "trigger": { - "label": "Conversation invoked (Invoke activity)", - "order": 5.6, - "submenu": "Activities" - } - }, - "Microsoft.OnMessageActivity": { - "form": { - "hidden": [ - "actions" - ], - "label": "Message received", - "order": [ - "condition", - "*" - ], - "subtitle": "Message activity received" - }, - "trigger": { - "label": "Message received (Message activity received)", - "order": 5.81, - "submenu": "Activities" - } - }, - "Microsoft.OnMessageDeleteActivity": { - "form": { - "hidden": [ - "actions" - ], - "label": "Message deleted", - "order": [ - "condition", - "*" - ], - "subtitle": "Message deleted activity" - }, - "trigger": { - "label": "Message deleted (Message deleted activity)", - "order": 5.82, - "submenu": "Activities" - } - }, - "Microsoft.OnMessageReactionActivity": { - "form": { - "hidden": [ - "actions" - ], - "label": "Message reaction", - "order": [ - "condition", - "*" - ], - "subtitle": "Message reaction activity" - }, - "trigger": { - "label": "Message reaction (Message reaction activity)", - "order": 5.83, - "submenu": "Activities" - } - }, - "Microsoft.OnMessageUpdateActivity": { - "form": { - "hidden": [ - "actions" - ], - "label": "Message updated", - "order": [ - "condition", - "*" - ], - "subtitle": "Message updated activity" - }, - "trigger": { - "label": "Message updated (Message updated activity)", - "order": 5.84, - "submenu": "Activities" - } - }, - "Microsoft.OnQnAMatch": { - "trigger": { - "label": "QnA Intent recognized", - "order": 2 - } - }, - "Microsoft.OnRepromptDialog": { - "form": { - "hidden": [ - "actions" - ], - "label": "Re-prompt for input", - "order": [ - "condition", - "*" - ], - "subtitle": "Reprompt dialog event" - }, - "trigger": { - "label": "Re-prompt for input (Reprompt dialog event)", - "order": 4.4, - "submenu": "Dialog events" - } - }, - "Microsoft.OnTypingActivity": { - "form": { - "hidden": [ - "actions" - ], - "label": "User is typing", - "order": [ - "condition", - "*" - ], - "subtitle": "Typing activity" - }, - "trigger": { - "label": "User is typing (Typing activity)", - "order": 5.7, - "submenu": "Activities" - } - }, - "Microsoft.OnUnknownIntent": { - "form": { - "hidden": [ - "actions" - ], - "label": "Unknown intent", - "order": [ - "condition", - "*" - ], - "subtitle": "Unknown intent recognized" - }, - "trigger": { - "label": "Unknown intent", - "order": 3 - } - }, - "Microsoft.QnAMakerDialog": { - "flow": { - "body": "=action.hostname", - "widget": "ActionCard" - } - }, - "Microsoft.RegexRecognizer": { - "form": { - "hidden": [ - "entities" - ] - } - }, - "Microsoft.RepeatDialog": { - "form": { - "helpLink": "https://aka.ms/bfc-understanding-dialogs", - "label": "Repeat this dialog", - "order": [ - "options", - "*" - ], - "subtitle": "Repeat Dialog" - } - }, - "Microsoft.ReplaceDialog": { - "flow": { - "body": { - "dialog": "=action.dialog", - "widget": "DialogRef" - }, - "widget": "ActionCard" - }, - "form": { - "helpLink": "https://aka.ms/bfc-understanding-dialogs", - "label": "Replace this dialog", - "order": [ - "dialog", - "options", - "*" - ], - "subtitle": "Replace Dialog" - } - }, - "Microsoft.SendActivity": { - "flow": { - "body": { - "field": "activity", - "widget": "LgWidget" - }, - "header": { - "colors": { - "icon": "#5C2E91", - "theme": "#EEEAF4" - }, - "icon": "MessageBot", - "widget": "ActionHeader" - }, - "widget": "ActionCard" - }, - "form": { - "helpLink": "https://aka.ms/bfc-send-activity", - "label": "Send a response", - "order": [ - "activity", - "*" - ], - "subtitle": "Send Activity" - } - }, - "Microsoft.SendHandoffActivity": { - "flow": { - "widget": "ActionHeader" - }, - "form": { - "helpLink": "https://aka.ms/bfc-send-handoff-activity", - "label": "Send a handoff request", - "subtitle": "Send Handoff Activity" - }, - "menu": { - "label": "Send Handoff Event", - "submenu": [ - "Access external resources" - ] - } - }, - "Microsoft.SetProperties": { - "flow": { - "body": { - "items": "=foreach(action.assignments, x => concat(coalesce(x.property, \"?\"), \" : \", coalesce(x.value, \"?\")))", - "widget": "ListOverview" - }, - "widget": "ActionCard" - }, - "form": { - "helpLink": "https://aka.ms/bfc-using-memory", - "label": "Set properties", - "properties": { - "assignments": { - "properties": { - "property": { - "intellisenseScopes": [ - "variable-scopes" - ] - } - } - } - }, - "subtitle": "Set Properties" - } - }, - "Microsoft.SetProperty": { - "flow": { - "body": "${coalesce(action.property, \"?\")} : ${coalesce(action.value, \"?\")}", - "widget": "ActionCard" - }, - "form": { - "helpLink": "https://aka.ms/bfc-using-memory", - "label": "Set a property", - "properties": { - "property": { - "intellisenseScopes": [ - "variable-scopes" - ] - } - }, - "subtitle": "Set Property" - } - }, - "Microsoft.SignOutUser": { - "form": { - "label": "Sign out user", - "subtitle": "Signout User" - } - }, - "Microsoft.SwitchCondition": { - "flow": { - "judgement": { - "body": "=coalesce(action.condition, \"\")", - "widget": "ActionCard" - }, - "nowrap": true, - "widget": "SwitchConditionWidget" - }, - "form": { - "helpLink": "https://aka.ms/bfc-controlling-conversation-flow", - "hidden": [ - "default" - ], - "label": "Branch: Switch (multiple options)", - "properties": { - "cases": { - "hidden": [ - "actions" - ] - }, - "condition": { - "intellisenseScopes": [ - "user-variables" - ] - } - }, - "subtitle": "Switch Condition" - } - }, - "Microsoft.TextInput": { - "flow": { - "body": "=action.prompt", - "botAsks": { - "body": { - "defaultContent": "", - "field": "prompt", - "widget": "LgWidget" - }, - "header": { - "colors": { - "icon": "#5C2E91", - "theme": "#EEEAF4" - }, - "icon": "MessageBot", - "widget": "ActionHeader" - }, - "widget": "ActionCard" - }, - "nowrap": true, - "userInput": { - "header": { - "colors": { - "icon": "#0078D4", - "theme": "#E5F0FF" - }, - "disableSDKTitle": true, - "icon": "User", - "menu": "none", - "widget": "ActionHeader" - }, - "widget": "ActionCard" - }, - "widget": "PromptWidget" - }, - "form": { - "helpLink": "https://aka.ms/bfc-ask-for-user-input", - "label": "Prompt for text", - "properties": { - "property": { - "intellisenseScopes": [ - "variable-scopes" - ] - } - }, - "subtitle": "Text Input" - } - }, - "Microsoft.ThrowException": { - "flow": { - "body": { - "description": "= ErrorValue", - "property": "=coalesce(action.errorValue, \"?\")", - "widget": "PropertyDescription" - }, - "widget": "ActionCard" - }, - "form": { - "label": "Throw an exception", - "subtitle": "Throw an exception" - } - }, - "Microsoft.TraceActivity": { - "form": { - "helpLink": "https://aka.ms/composer-telemetry", - "label": "Emit a trace event", - "subtitle": "Trace Activity" - } - }, - "Microsoft.UpdateActivity": { - "flow": { - "body": { - "field": "activity", - "widget": "LgWidget" - }, - "header": { - "colors": { - "icon": "#656565", - "theme": "#D7D7D7" - }, - "icon": "MessageBot", - "title": "Update activity", - "widget": "ActionHeader" - }, - "widget": "ActionCard" - }, - "form": { - "label": "Update an activity", - "subtitle": "Update Activity" - } - } -} diff --git a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/schemas/update-schema.ps1 b/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/schemas/update-schema.ps1 deleted file mode 100644 index 67715586e4..0000000000 --- a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/schemas/update-schema.ps1 +++ /dev/null @@ -1,27 +0,0 @@ -$SCHEMA_FILE="sdk.schema" -$UISCHEMA_FILE="sdk.uischema" -$BACKUP_SCHEMA_FILE="sdk-backup.schema" -$BACKUP_UISCHEMA_FILE="sdk-backup.uischema" - -Write-Host "Running schema merge." - -if (Test-Path $SCHEMA_FILE -PathType leaf) { Move-Item -Force -Path $SCHEMA_FILE -Destination $BACKUP_SCHEMA_FILE } -if (Test-Path $UISCHEMA_FILE -PathType leaf) { Move-Item -Force -Path $UISCHEMA_FILE -Destination $BACKUP_UISCHEMA_FILE } - -bf dialog:merge "*.schema" "!**/sdk-backup.schema" "*.uischema" "!**/sdk-backup.uischema" "!**/sdk.override.uischema" "!**/generated" "../*.csproj" "../package.json" -o $SCHEMA_FILE - -if (Test-Path $SCHEMA_FILE -PathType leaf) -{ - if (Test-Path $BACKUP_SCHEMA_FILE -PathType leaf) { Remove-Item -Force -Path $BACKUP_SCHEMA_FILE } - if (Test-Path $BACKUP_UISCHEMA_FILE -PathType leaf) { Remove-Item -Force -Path $BACKUP_UISCHEMA_FILE } - - Write-Host "Schema merged succesfully." - if (Test-Path $SCHEMA_FILE -PathType leaf) { Write-Host " Schema: $SCHEMA_FILE" } - if (Test-Path $UISCHEMA_FILE -PathType leaf) { Write-Host " UI Schema: $UISCHEMA_FILE" } -} -else -{ - Write-Host "Schema merge failed. Restoring previous versions." - if (Test-Path $BACKUP_SCHEMA_FILE -PathType leaf) { Move-Item -Force -Path $BACKUP_SCHEMA_FILE -Destination $SCHEMA_FILE } - if (Test-Path $BACKUP_UISCHEMA_FILE -PathType leaf) { Move-Item -Force -Path $BACKUP_UISCHEMA_FILE -Destination $UISCHEMA_FILE } -} diff --git a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/schemas/update-schema.sh b/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/schemas/update-schema.sh deleted file mode 100644 index 50beec9c4c..0000000000 --- a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/schemas/update-schema.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash -SCHEMA_FILE=sdk.schema -UISCHEMA_FILE=sdk.uischema -BACKUP_SCHEMA_FILE=sdk-backup.schema -BACKUP_UISCHEMA_FILE=sdk-backup.uischema - -while [ $# -gt 0 ]; do - if [[ $1 == *"-"* ]]; then - param="${1/-/}" - declare $param="$2" - fi - shift -done - -echo "Running schema merge." -[ -f "$SCHEMA_FILE" ] && mv "./$SCHEMA_FILE" "./$BACKUP_SCHEMA_FILE" -[ -f "$UISCHEMA_FILE" ] && mv "./$UISCHEMA_FILE" "./$BACKUP_UISCHEMA_FILE" - -bf dialog:merge "*.schema" "!**/sdk-backup.schema" "*.uischema" "!**/sdk-backup.uischema" "!**/sdk.override.uischema" "!**/generated" "../*.csproj" "../package.json" -o $SCHEMA_FILE - -if [ -f "$SCHEMA_FILE" ]; then - rm -rf "./$BACKUP_SCHEMA_FILE" - rm -rf "./$BACKUP_UISCHEMA_FILE" - echo "Schema merged succesfully." - [ -f "$SCHEMA_FILE" ] && echo " Schema: $SCHEMA_FILE" - [ -f "$UISCHEMA_FILE" ] && echo " UI Schema: $UISCHEMA_FILE" -else - echo "Schema merge failed. Restoring previous versions." - [ -f "$BACKUP_SCHEMA_FILE" ] && mv "./$BACKUP_SCHEMA_FILE" "./$SCHEMA_FILE" - [ -f "$BACKUP_UISCHEMA_FILE" ] && mv "./$BACKUP_UISCHEMA_FILE" "./$UISCHEMA_FILE" -fi diff --git a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/settings/appsettings.json b/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/settings/appsettings.json deleted file mode 100644 index 531e75ff37..0000000000 --- a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/settings/appsettings.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "customFunctions": [], - "defaultLanguage": "en-us", - "defaultLocale": "en-us", - "importedLibraries": [], - "languages": [ - "en-us" - ], - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" - } - }, - "luFeatures": { - "enableCompositeEntities": true, - "enableListEntities": true, - "enableMLEntities": true, - "enablePattern": true, - "enablePhraseLists": true, - "enablePrebuiltEntities": true, - "enableRegexEntities": true - }, - "luis": { - "authoringEndpoint": "", - "authoringRegion": "", - "defaultLanguage": "en-us", - "endpoint": "", - "environment": "composer", - "name": "EchoSkillBotComposer" - }, - "MicrosoftAppId": "", - "publishTargets": [], - "qna": { - "hostname": "", - "knowledgebaseid": "", - "qnaRegion": "westus" - }, - "runtime": { - "command": "dotnet run --project EchoSkillBotComposer.csproj", - "customRuntime": true, - "key": "adaptive-runtime-dotnet-webapp", - "path": "../" - }, - "runtimeSettings": { - "adapters": [], - "features": { - "removeRecipientMentions": false, - "showTyping": false, - "traceTranscript": false, - "useInspection": false, - "setSpeak": { - "voiceFontName": "en-US-AriaNeural", - "fallbackToTextForSpeechIfEmpty": true - } - }, - "components": [], - "skills": { - "allowedCallers": ["*"] - }, - "storage": "", - "telemetry": { - "logActivities": true, - "logPersonalInformation": false, - "options": { - "connectionString": "" - } - } - }, - "downsampling": { - "maxImbalanceRatio": -1 - }, - "skillConfiguration": {}, - "skillHostEndpoint": "http://localhost:35410/api/skills" -} \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/wwwroot/default.htm b/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/wwwroot/default.htm deleted file mode 100644 index 696762e394..0000000000 --- a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/wwwroot/default.htm +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - EchoSkillBotComposer - - - - - -
-
-
-
EchoSkillBotComposer
-
-
-
-
-
Your bot is ready!
-
You can test your bot in the Bot Framework Emulator
- by connecting to http://localhost:3978/api/messages.
- -
Visit Azure - Bot Service to register your bot and add it to
- various channels. The bot's endpoint URL typically looks - like this:
-
https://your_bots_hostname/api/messages
-
-
-
-
- -
- - - \ No newline at end of file diff --git a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/wwwroot/manifests/echoskillbotcomposer-manifest.json b/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/wwwroot/manifests/echoskillbotcomposer-manifest.json deleted file mode 100644 index 25205b9286..0000000000 --- a/tests/functional/Bots/DotNet/Skills/Composer/EchoSkillBotComposer/wwwroot/manifests/echoskillbotcomposer-manifest.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "https://schemas.botframework.com/schemas/skills/v2.1/skill-manifest.json", - "$id": "EchoSkillBotComposerDotNet", - "name": "EchoSkillBotComposerDotNet", - "version": "1.0", - "description": "This is a skill for echoing what the user sent to the bot (using Composer with the dotnet runtime).", - "publisherName": "Microsoft", - "privacyUrl": "https://microsoft.com/privacy", - "copyright": "Copyright (c) Microsoft Corporation. All rights reserved.", - "license": "https://github.com/microsoft/BotFramework-FunctionalTests/blob/main/LICENSE", - "tags": [ - "echo" - ], - "endpoints": [ - { - "name": "default", - "protocol": "BotFrameworkV3", - "description": "Localhost endpoint for the skill (on port 35410)", - "endpointUrl": "http://localhost:35410/api/messages", - "msAppId": "00000000-0000-0000-0000-000000000000" - } - ] -} \ No newline at end of file diff --git a/tests/functional/build/yaml/deployBotResources/deployBotResources.yml b/tests/functional/build/yaml/deployBotResources/deployBotResources.yml index 6fd01cd5fa..f39e345b58 100644 --- a/tests/functional/build/yaml/deployBotResources/deployBotResources.yml +++ b/tests/functional/build/yaml/deployBotResources/deployBotResources.yml @@ -108,9 +108,11 @@ stages: appId: $(BFCFNEMPTYBOTDOTNETWEBAPPID) appSecret: $(BFCFNEMPTYBOTDOTNETWEBAPPSECRET) project: - directory: 'Tests/Functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot' - name: "SimpleHostBot.csproj" + generator: 'generators/generator-bot-empty' + integration: "webapp" + name: "EmptyBotDotNetWebApp" netCoreVersion: "3.1.x" + platform: "dotnet" dependency: registry: ${{ parameters.dependenciesRegistryDotNetHosts }} version: ${{ parameters.dependenciesVersionDotNetHosts }} @@ -122,12 +124,14 @@ stages: appId: $(BFCFNEMPTYBOTDOTNETFUNCTIONSID) appSecret: $(BFCFNEMPTYBOTDOTNETFUNCTIONSSECRET) project: - directory: 'Tests/Functional/Bots/DotNet/Consumers/CodeFirst/SimpleHostBot' - name: "SimpleHostBot.csproj" + generator: 'generators/generator-bot-empty' + integration: "functions" + name: "EmptyBotDotNetFunctions" netCoreVersion: "3.1.x" + platform: "dotnet" dependency: registry: ${{ parameters.dependenciesRegistryDotNetHosts }} - version: ${{ parameters.dependenciesVersionDotNetHosts }} + version: ${{ parameters.dependenciesVersionDotNetHosts }} # JS - template: js/deploy.yml diff --git a/tests/functional/build/yaml/deployBotResources/dotnet/deploy.yml b/tests/functional/build/yaml/deployBotResources/dotnet/deploy.yml index 9c85c0cd42..f3d0c6f054 100644 --- a/tests/functional/build/yaml/deployBotResources/dotnet/deploy.yml +++ b/tests/functional/build/yaml/deployBotResources/dotnet/deploy.yml @@ -54,9 +54,8 @@ stages: dependsOn: "${{ bot.dependsOn }}" jobs: - job: "Deploy" - ${{ if eq(bot.type, 'SkillV3') }}: - variables: - SolutionDir: "$(BUILD.SOURCESDIRECTORY)/Bots/DotNet/" + variables: + SolutionDir: "$(BUILD.SOURCESDIRECTORY)/bots/" displayName: "Deploy steps" steps: # Delete Bot Resources @@ -87,28 +86,6 @@ stages: - task: NuGetToolInstaller@1 displayName: "Use NuGet" - # Prepare appsettings.json file, deleting all the declared skills, so it uses only the settings define in Azure - - ${{ if eq(bot.type, 'Host') }}: - - task: PowerShell@2 - displayName: 'Prepare App Settings' - inputs: - targetType: inline - workingDirectory: '$(SYSTEM.DEFAULTWORKINGDIRECTORY)/${{ bot.project.directory }}' - failOnStderr: true - script: | - $file = "./appsettings.json" - $content = Get-Content -Raw $file | ConvertFrom-Json - $content.BotFrameworkSkills = @() - $content | ConvertTo-Json | Set-Content $file - - # Run NuGet restore SkillV3 - - ${{ if eq(bot.type, 'SkillV3') }}: - - task: NuGetCommand@2 - displayName: "NuGet restore" - inputs: - restoreSolution: "${{ bot.project.directory }}/${{ bot.project.name }}" - restoreDirectory: "$(SOLUTIONDIR)packages" - # Evaluate dependencies source and version - template: evaluateDependenciesVariables.yml parameters: @@ -116,6 +93,12 @@ stages: registry: "${{ bot.dependency.registry }}" version: "${{ bot.dependency.version }}" + # Generate bot template + - template: ../generator/deploy.yml + parameters: + project: "${{ bot.project }}" + solutiondir: "$(SOLUTIONDIR)" + # Start of DotNet Install & Build - ${{ if in(bot.type, 'Host', 'Skill') }}: # Install dependencies @@ -123,10 +106,12 @@ stages: parameters: project: "${{ bot.project }}" registry: "$(DEPENDENCIESSOURCE)" + solutiondir: "$(SOLUTIONDIR)/${{ bot.project.name }}" version: "$(DEPENDENCIESVERSIONNUMBER)" packages: - Microsoft.Bot.Builder.Dialogs - Microsoft.Bot.Builder.Integration.AspNet.Core + Microsoft.Bot.Builder.AI.Luis + Microsoft.Bot.Builder.AI.QnA + Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime # Build Bot - task: DotNetCoreCLI@2 @@ -134,7 +119,7 @@ stages: inputs: command: publish publishWebProjects: false - projects: "${{ bot.project.directory }}/${{ bot.project.name }}" + projects: "$(SOLUTIONDIR)/${{ bot.project.name }}/${{ bot.project.name }}.csproj" arguments: "--output $(SYSTEM.DEFAULTWORKINGDIRECTORY)/${{ parameters.buildFolder }}/${{ bot.name }}" modifyOutputPath: false @@ -143,59 +128,15 @@ stages: displayName: 'Get BotBuilder Version' inputs: targetType: inline - workingDirectory: '$(SYSTEM.DEFAULTWORKINGDIRECTORY)/${{ bot.project.directory }}' + workingDirectory: '$(SOLUTIONDIR)/${{ bot.project.name }}' failOnStderr: true script: | - [XML]$data = Get-Content "./${{ bot.project.name }}" - $package = $data.Project.ItemGroup.PackageReference | Where-Object { $_.Include -eq "Microsoft.Bot.Builder.Integration.AspNet.Core" } + [XML]$data = Get-Content "./${{ bot.project.name }}.csproj" + $package = $data.Project.ItemGroup.PackageReference | Where-Object { $_.Include -eq "Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime" } Write-Host "##vso[task.setvariable variable=BotBuilderVersionNumber]$($package.version)" # End of DotNet Install & Build - # Start DotNet v3 Install, Build - - ${{ if eq(bot.type, 'SkillV3') }}: - # Install dependencies - - template: installDependenciesV3.yml - parameters: - registry: "$(DEPENDENCIESSOURCE)" - version: "$(DEPENDENCIESVERSIONNUMBER)" - project: "${{ bot.project }}" - packages: - Microsoft.Bot.Builder - Microsoft.Bot.Builder.Azure - Microsoft.Bot.Builder.History - - # Build bot - - task: MSBuild@1 - displayName: "Build" - inputs: - solution: "${{ bot.project.directory }}/${{ bot.project.name }}" - vsVersion: 16.0 - platform: "$(BUILDPLATFORM)" - configuration: "$(BUILDCONFIGURATION)" - - # Get BotBuilder version - - task: PowerShell@2 - displayName: 'Get BotBuilder Version' - inputs: - targetType: inline - failOnStderr: true - script: | - $result = @(Get-ChildItem "$(SOLUTIONDIR)packages\Microsoft.Bot.Builder.[0-9]*" -directory | Sort LastWriteTime -Descending) - $version = $result[0].Name.Replace("Microsoft.Bot.Builder.", "") - Write-Host "##vso[task.setvariable variable=BotBuilderVersionNumber]$($version)" - - # Zip bot - - task: ArchiveFiles@2 - displayName: 'Zip bot' - inputs: - rootFolderOrFile: '$(SYSTEM.DEFAULTWORKINGDIRECTORY)/${{ bot.project.directory }}' - includeRootFolder: false - archiveType: 'zip' - archiveFile: '$(SYSTEM.DEFAULTWORKINGDIRECTORY)/${{ parameters.buildFolder }}/${{ bot.name }}/${{ bot.name }}.zip' - replaceExistingArchive: true - verbose: true - # End of DotNet v3 Install, Build # Tag BotBuilder package version - template: ../common/tagBotBuilderVersion.yml @@ -258,3 +199,11 @@ stages: botGroup: "${{ parameters.resourceGroup }}" botName: "${{ bot.name }}" resourceSuffix: "${{ parameters.resourceSuffix }}" + + # Debugging output for the workspace + - script: | + cd .. + dir *.* /s + displayName: 'Dir workspace' + continueOnError: true + condition: succeededOrFailed() \ No newline at end of file diff --git a/tests/functional/build/yaml/deployBotResources/dotnet/deployComposer.yml b/tests/functional/build/yaml/deployBotResources/dotnet/deployComposer.yml deleted file mode 100644 index 5e20c68afe..0000000000 --- a/tests/functional/build/yaml/deployBotResources/dotnet/deployComposer.yml +++ /dev/null @@ -1,167 +0,0 @@ -parameters: - - name: appInsight - displayName: Azure Application Insight name - type: string - - - name: appServicePlan - displayName: App Service Plan name - type: string - - - name: appServicePlanRG - displayName: App Service Plan Resource Group - type: string - - - name: azureSubscription - displayName: Azure Service Connection - type: string - - - name: botPricingTier - displayName: Bot Pricing Tier - type: string - - - name: bots - displayName: Bots - type: object - - - name: buildFolder - displayName: Build Folder - type: string - default: "build-composer" - - - name: keyVault - displayName: Key Vault name - type: string - - - name: resourceGroup - displayName: Resource Group - type: string - - - name: resourceSuffix - displayName: Azure resources' name suffix - type: string - -stages: -- ${{ each bot in parameters.bots }}: - - stage: "Deploy_${{ bot.name }}" - ${{ if eq(bot.displayName, '') }}: - displayName: "${{ bot.name }}" - ${{ if ne(bot.displayName, '') }}: - displayName: "${{ bot.displayName }}" - dependsOn: "${{ bot.dependsOn }}" - jobs: - - job: "Deploy" - displayName: "Deploy steps" - steps: - # Delete Bot Resources - - template: ../common/deleteResources.yml - parameters: - azureSubscription: "${{ parameters.azureSubscription }}" - resourceGroup: "${{ parameters.resourceGroup }}" - resourceName: "${{ bot.name }}" - resourceSuffix: "${{ parameters.resourceSuffix }}" - - # Gets Bot App Registration credentials from KeyVault or Pipeline Variables - - template: ../common/getAppRegistration.yml - parameters: - appId: ${{ bot.appId }} - appSecret: ${{ bot.appSecret }} - azureSubscription: "${{ parameters.azureSubscription }}" - botName: "${{ bot.name }}" - keyVault: "${{ parameters.keyVault }}" - - # Use Net Core version - - ${{ if ne(bot.project.netCoreVersion, '') }}: - - task: UseDotNet@2 - displayName: "Use NetCore v${{ bot.project.netCoreVersion }}" - inputs: - version: "${{ bot.project.netCoreVersion }}" - - # Evaluate dependencies source and version - - template: evaluateDependenciesVariables.yml - parameters: - botType: "${{ bot.type }}" - registry: "${{ bot.dependency.registry }}" - version: "${{ bot.dependency.version }}" - - # Start of DotNet Install & Build - - template: installDependencies.yml - parameters: - project: "${{ bot.project }}" - registry: "$(DEPENDENCIESSOURCE)" - version: "$(DEPENDENCIESVERSIONNUMBER)" - packages: - Microsoft.Bot.Builder.AI.Luis - Microsoft.Bot.Builder.AI.QnA - Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime - - # Build Bot - - task: DotNetCoreCLI@2 - displayName: "Build" - inputs: - command: publish - publishWebProjects: false - projects: "${{ bot.project.directory }}/${{ bot.project.name }}" - arguments: "--output $(SYSTEM.DEFAULTWORKINGDIRECTORY)/${{ parameters.buildFolder }}/${{ bot.name }}" - modifyOutputPath: false - - # Get BotBuilder package version - - task: PowerShell@2 - displayName: 'Get BotBuilder Version' - inputs: - targetType: inline - workingDirectory: '$(SYSTEM.DEFAULTWORKINGDIRECTORY)/${{ bot.project.directory }}' - failOnStderr: true - script: | - [XML]$data = Get-Content "./${{ bot.project.name }}" - $package = $data.Project.ItemGroup.PackageReference | Where-Object { $_.Include -eq "Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime" } - Write-Host "##vso[task.setvariable variable=BotBuilderVersionNumber]$($package.version)" - - # Tag BotBuilder package version - - template: ../common/tagBotBuilderVersion.yml - parameters: - ${{ if eq(bot.displayName, '') }}: - botName: "${{ bot.name }}" - ${{ if ne(bot.displayName, '') }}: - botName: "${{ bot.displayName }}" - version: "$(BOTBUILDERVERSIONNUMBER)" - - # Upload zip to artifacts in case we want to debug it - - task: PublishBuildArtifacts@1 - displayName: 'Publish zip package' - inputs: - pathToPublish: "$(SYSTEM.DEFAULTWORKINGDIRECTORY)/${{ parameters.buildFolder }}/${{ bot.name }}/${{ bot.name }}.zip" - artifactName: dotnet-$(BUILD.BUILDID) - - # Create App Service and Bot Channel Registration - - template: ../common/createAppService.yml - parameters: - appId: $(APPID) - appInsight: "${{ parameters.appInsight }}" - appSecret: $(APPSECRET) - appServicePlan: "${{ parameters.appServicePlan }}" - appServicePlanRG: "${{ parameters.appServicePlanRG }}" - azureSubscription: "${{ parameters.azureSubscription }}" - botGroup: "${{ parameters.resourceGroup }}" - botName: "${{ bot.name }}" - botPricingTier: "${{ parameters.botPricingTier }}" - resourceSuffix: "${{ parameters.resourceSuffix }}" - templateFile: "build/templates/template-bot-resources.json" - - # Deploy bot - - task: AzureWebApp@1 - displayName: 'Deploy Azure Web App : ${{ bot.name }}-$(BUILD.BUILDID)' - inputs: - azureSubscription: "${{ parameters.azureSubscription }}" - appName: '${{ bot.name }}${{ parameters.resourceSuffix }}-$(BUILD.BUILDID)' - resourceGroupName: '${{ parameters.resourceGroup }}' - package: '$(SYSTEM.DEFAULTWORKINGDIRECTORY)/${{ parameters.buildFolder }}/${{ bot.name }}/${{ bot.name }}.zip' - deploymentMethod: runFromPackage - - # Create DirectLine Channel Hosts - - ${{ if eq(bot.type, 'Host') }}: - - template: ../common/createDirectLine.yml - parameters: - azureSubscription: "${{ parameters.azureSubscription }}" - botGroup: "${{ parameters.resourceGroup }}" - botName: "${{ bot.name }}" - resourceSuffix: "${{ parameters.resourceSuffix }}" diff --git a/tests/functional/build/yaml/deployBotResources/dotnet/evaluateDependenciesVariables.yml b/tests/functional/build/yaml/deployBotResources/dotnet/evaluateDependenciesVariables.yml index 161b04723b..f2e44169c4 100644 --- a/tests/functional/build/yaml/deployBotResources/dotnet/evaluateDependenciesVariables.yml +++ b/tests/functional/build/yaml/deployBotResources/dotnet/evaluateDependenciesVariables.yml @@ -51,7 +51,7 @@ steps: exit 1 # Force exit } if ("${{ parameters.botType }}" -in "Host", "Skill") { - $PackageList = nuget list Microsoft.Bot.Builder.Integration.AspNet.Core -Source "$source" -PreRelease + $PackageList = nuget list Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime -Source "$source" -PreRelease $versionNumber = $PackageList.Split(" ")[-1] } elseif ("${{ parameters.botType }}" -in "SkillV3") { $versionNumber = "" diff --git a/tests/functional/build/yaml/deployBotResources/dotnet/installDependencies.yml b/tests/functional/build/yaml/deployBotResources/dotnet/installDependencies.yml index 4fc5ef882e..76c859d3ee 100644 --- a/tests/functional/build/yaml/deployBotResources/dotnet/installDependencies.yml +++ b/tests/functional/build/yaml/deployBotResources/dotnet/installDependencies.yml @@ -1,4 +1,4 @@ -parameters: +parameters: - name: packages displayName: Dependency Packages type: object @@ -11,6 +11,10 @@ parameters: displayName: Registry source type: string + - name: solutiondir + displayName: Solution directory + type: string + - name: version displayName: Version number type: string @@ -20,7 +24,7 @@ steps: displayName: 'Install dependencies for ${{ parameters.project.name }}' inputs: targetType: inline - workingDirectory: '$(SYSTEM.DEFAULTWORKINGDIRECTORY)/${{ parameters.project.directory }}' + workingDirectory: '${{ parameters.solutiondir }}' failOnStderr: true script: | $version = "" @@ -46,7 +50,7 @@ steps: } } - Invoke-Expression "dotnet add ""./${{ parameters.project.name }}"" package $version $source $package" + Invoke-Expression "dotnet add ""./${{ parameters.project.name }}.csproj"" package $version $source $package" if (-not ([string]::IsNullOrEmpty("$versionAux"))) { $version = $versionAux diff --git a/tests/functional/build/yaml/deployBotResources/dotnet/installDependenciesV3.yml b/tests/functional/build/yaml/deployBotResources/dotnet/installDependenciesV3.yml deleted file mode 100644 index 62bb916f5a..0000000000 --- a/tests/functional/build/yaml/deployBotResources/dotnet/installDependenciesV3.yml +++ /dev/null @@ -1,44 +0,0 @@ -parameters: - - name: packages - displayName: Dependency Packages - type: object - - - name: project - displayName: Project - type: object - - - name: registry - displayName: Registry source - type: string - - - name: version - displayName: Version number - type: string - -steps: - - task: PowerShell@2 - displayName: 'Install dependencies' - inputs: - targetType: inline - workingDirectory: '$(System.DefaultWorkingDirectory)/${{ parameters.project.directory }}' - failOnStderr: true - script: | - $version = "" - $source = "" - - if (-not ([string]::IsNullOrEmpty("${{ parameters.version }}"))) { - $version = "-Version ""${{ parameters.version }}""" - } - - if (-not ([string]::IsNullOrEmpty("${{ parameters.registry }}"))) { - $source = "-Source ""${{ parameters.registry }}""" - } - - foreach ($package in "${{ parameters.packages }}".Split()) { - Invoke-Expression "nuget update ""./packages.config"" -Id $package $version $source" - } - - write-host "`nPackages:" - foreach ($package in "${{ parameters.packages }}".Split()) { - write-host " - $package " - } diff --git a/tests/functional/build/yaml/deployBotResources/generator/deploy.yml b/tests/functional/build/yaml/deployBotResources/generator/deploy.yml new file mode 100644 index 0000000000..f7c1680fde --- /dev/null +++ b/tests/functional/build/yaml/deployBotResources/generator/deploy.yml @@ -0,0 +1,32 @@ +parameters: + - name: project + displayName: Project + type: object + + - name: solutiondir + displayName: Solution directory + type: string + +steps: + # Create /bots directory + - script: | + mkdir bots + displayName: 'Create bots directory' + + # Install yarn workspace + - script: | + yarn --immutable + displayName: 'Install yarn' + + # Install yo + - script: | + npm install -g yo + displayName: 'Install yo' + + # Generate Bot template + - task: CmdLine@2 + displayName: 'Install template' + inputs: + script: | + yo ../${{ parameters.project.generator }} ${{ parameters.project.name }} --platform ${{ parameters.project.platform }} --integration ${{ parameters.project.integration }} + workingDirectory: '${{ parameters.solutiondir }}' diff --git a/tests/functional/build/yaml/sharedResources/createSharedResources.yml b/tests/functional/build/yaml/sharedResources/createSharedResources.yml index f593314d46..efdf2fcc1c 100644 --- a/tests/functional/build/yaml/sharedResources/createSharedResources.yml +++ b/tests/functional/build/yaml/sharedResources/createSharedResources.yml @@ -22,7 +22,7 @@ variables: InternalAppServicePlanDotNetName: "bfcfnbotsappservicedotnet$($env:RESOURCESUFFIX)" InternalAppServicePlanJSName: "bfcfnbotsappservicejs$($env:RESOURCESUFFIX)" InternalCosmosDBName: "bfcfnbotstatedb$($env:RESOURCESUFFIX)" - InternalStorageName: "bfcfnbotstroage$($env:RESOURCESUFFIX)" + InternalStorageName: "bfcfnbotstorage$($env:RESOURCESUFFIX)" InternalKeyVaultName: "bfcfnbotkeyvault$($env:RESOURCESUFFIX)" InternalResourceGroupName: $[coalesce(variables['RESOURCEGROUPNAME'], 'bfcfnshared')]