From 4c6cc3bc05944875282df26714342c7cc09ebc88 Mon Sep 17 00:00:00 2001 From: Graham McMynn Date: Wed, 29 Mar 2023 09:41:47 -0700 Subject: [PATCH 1/5] Adding support for the SharePoint ACE APIs --- .../SharePoint/SharePointActivityHandler.cs | 140 ++++++++++++++++++ libraries/Microsoft.Bot.Connector/Channels.cs | 5 + .../Microsoft.Bot.Schema.csproj | 1 + .../SharePoint/AceData.cs | 79 ++++++++++ .../Microsoft.Bot.Schema/SharePoint/Action.cs | 28 ++++ .../SharePoint/ActionButton.cs | 36 +++++ .../SharePoint/ActionParameters.cs | 30 ++++ .../SharePoint/CardViewData.cs | 37 +++++ .../SharePoint/GetCardViewResponse.cs | 64 ++++++++ .../GetPropertyPaneConfigurationResponse.cs | 53 +++++++ .../SharePoint/GetQuickViewResponse.cs | 53 +++++++ .../IPropertyPaneFieldProperties.cs | 23 +++ .../IPropertyPaneGroupOrConditionalGroup.cs | 23 +++ .../PropertyPaneCheckboxProperties.cs | 45 ++++++ .../PropertyPaneChoiceGroupIconProperties.cs | 33 +++++ .../PropertyPaneChoiceGroupImageSize.cs | 39 +++++ .../PropertyPaneChoiceGroupOption.cs | 76 ++++++++++ .../PropertyPaneChoiceGroupProperties.cs | 39 +++++ .../SharePoint/PropertyPaneDropDownOption.cs | 72 +++++++++ .../PropertyPaneDropDownProperties.cs | 75 ++++++++++ .../SharePoint/PropertyPaneGroup.cs | 51 +++++++ .../SharePoint/PropertyPaneGroupField.cs | 114 ++++++++++++++ .../SharePoint/PropertyPaneLabelProperties.cs | 39 +++++ .../PropertyPaneLinkPopupWindowProperties.cs | 83 +++++++++++ .../SharePoint/PropertyPaneLinkProperties.cs | 63 ++++++++ .../SharePoint/PropertyPanePage.cs | 45 ++++++ .../SharePoint/PropertyPanePageHeader.cs | 33 +++++ .../PropertyPaneSliderProperties.cs | 75 ++++++++++ .../PropertyPaneTextFieldProperties.cs | 123 +++++++++++++++ .../PropertyPaneToggleProperties.cs | 81 ++++++++++ .../SharePoint/QuickViewBody.cs | 34 +++++ .../SharePoint/QuickViewData.cs | 39 +++++ .../SharePoint/QuickViewItem.cs | 34 +++++ .../SharePoint/QuickViewTemplate.cs | 40 +++++ 34 files changed, 1805 insertions(+) create mode 100644 libraries/Microsoft.Bot.Builder/SharePoint/SharePointActivityHandler.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/AceData.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/Action.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/ActionButton.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/ActionParameters.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/CardViewData.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/GetCardViewResponse.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/GetPropertyPaneConfigurationResponse.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/GetQuickViewResponse.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/IPropertyPaneFieldProperties.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/IPropertyPaneGroupOrConditionalGroup.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneCheckboxProperties.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupIconProperties.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupImageSize.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupOption.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupProperties.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneDropDownOption.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneDropDownProperties.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneGroup.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneGroupField.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneLabelProperties.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneLinkPopupWindowProperties.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneLinkProperties.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/PropertyPanePage.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/PropertyPanePageHeader.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneSliderProperties.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneTextFieldProperties.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneToggleProperties.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/QuickViewBody.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/QuickViewData.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/QuickViewItem.cs create mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/QuickViewTemplate.cs diff --git a/libraries/Microsoft.Bot.Builder/SharePoint/SharePointActivityHandler.cs b/libraries/Microsoft.Bot.Builder/SharePoint/SharePointActivityHandler.cs new file mode 100644 index 0000000000..8a8e5f7390 --- /dev/null +++ b/libraries/Microsoft.Bot.Builder/SharePoint/SharePointActivityHandler.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Net; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Bot.Connector; +using Microsoft.Bot.Schema; +using Microsoft.Bot.Schema.SharePoint; +using Microsoft.Bot.Schema.Teams; +using Newtonsoft.Json.Linq; + +namespace Microsoft.Bot.Builder.SharePoint +{ + /// + /// The SharePointActivityHandler is derived from ActivityHandler. It adds support for + /// the SharePoint specific events and interactions. + /// + public class SharePointActivityHandler : ActivityHandler + { + /// + /// Invoked when an invoke activity is received from the connector. + /// Invoke activities can be used to communicate many different things. + /// + /// A strongly-typed context object for this turn. + /// A cancellation token that can be used by other objects + /// or threads to receive notice of cancellation. + /// A task that represents the work queued to execute. + /// + /// Invoke activities communicate programmatic commands from a client or channel to a bot. + /// The meaning of an invoke activity is defined by the property, + /// which is meaningful within the scope of a channel. + /// + protected override async Task OnInvokeActivityAsync(ITurnContext turnContext, CancellationToken cancellationToken) + { + try + { + if (turnContext.Activity.Name == null && turnContext.Activity.ChannelId == Channels.SharePoint) + { + throw new NotSupportedException(); + } + else + { + switch (turnContext.Activity.Name) + { + case "cardExtension/getCardView": + return CreateInvokeResponse(await OnSharePointTaskGetCardViewAsync(turnContext, SafeCast(turnContext.Activity.Value), cancellationToken).ConfigureAwait(false)); + + case "cardExtension/getQuickView": + return CreateInvokeResponse(await OnSharePointTaskGetQuickViewAsync(turnContext, SafeCast(turnContext.Activity.Value), cancellationToken).ConfigureAwait(false)); + + case "cardExtension/getPropertyPaneConfiguration": + return CreateInvokeResponse(await OnSharePointTaskGetPropertyPaneConfigurationAsync(turnContext, SafeCast(turnContext.Activity.Value), cancellationToken).ConfigureAwait(false)); + + case "cardExtension/setPropertyPaneConfiguration": + await OnSharePointTaskSetPropertyPaneConfigurationAsync(turnContext, SafeCast(turnContext.Activity.Value), cancellationToken).ConfigureAwait(false); + return CreateInvokeResponse(); + } + } + } + catch (InvokeResponseException e) + { + return e.CreateInvokeResponse(); + } + + return await base.OnInvokeActivityAsync(turnContext, cancellationToken).ConfigureAwait(false); + } + + /// + /// Override this in a derived class to provide logic for when a card view is fetched. + /// + /// A strongly-typed context object for this turn. + /// The task module invoke request value payload. + /// A cancellation token that can be used by other objects + /// or threads to receive notice of cancellation. + /// A Task Module Response for the request. + protected virtual Task OnSharePointTaskGetCardViewAsync(ITurnContext turnContext, TaskModuleRequest taskModuleRequest, CancellationToken cancellationToken) + { + throw new InvokeResponseException(HttpStatusCode.NotImplemented); + } + + /// + /// Override this in a derived class to provide logic for when a quick view is fetched. + /// + /// A strongly-typed context object for this turn. + /// The task module invoke request value payload. + /// A cancellation token that can be used by other objects + /// or threads to receive notice of cancellation. + /// A Task Module Response for the request. + protected virtual Task OnSharePointTaskGetQuickViewAsync(ITurnContext turnContext, TaskModuleRequest taskModuleRequest, CancellationToken cancellationToken) + { + throw new InvokeResponseException(HttpStatusCode.NotImplemented); + } + + /// + /// Override this in a derived class to provide logic for getting configuration pane properties. + /// + /// A strongly-typed context object for this turn. + /// The task module invoke request value payload. + /// A cancellation token that can be used by other objects + /// or threads to receive notice of cancellation. + /// A Task Module Response for the request. + protected virtual Task OnSharePointTaskGetPropertyPaneConfigurationAsync(ITurnContext turnContext, TaskModuleRequest taskModuleRequest, CancellationToken cancellationToken) + { + throw new InvokeResponseException(HttpStatusCode.NotImplemented); + } + + /// + /// Override this in a derived class to provide logic for setting configuration pane properties. + /// + /// A strongly-typed context object for this turn. + /// The task module invoke request value payload. + /// A cancellation token that can be used by other objects + /// or threads to receive notice of cancellation. + /// A Task Module Response for the request. + protected virtual Task OnSharePointTaskSetPropertyPaneConfigurationAsync(ITurnContext turnContext, TaskModuleRequest taskModuleRequest, CancellationToken cancellationToken) + { + throw new InvokeResponseException(HttpStatusCode.NotImplemented); + } + + /// + /// Safely casts an object to an object of type . + /// + /// The object to be casted. + /// The object casted in the new type. + private static T SafeCast(object value) + { + var obj = value as JObject; + if (obj == null) + { + throw new InvokeResponseException(HttpStatusCode.BadRequest, $"expected type '{value.GetType().Name}'"); + } + + return obj.ToObject(); + } + } +} diff --git a/libraries/Microsoft.Bot.Connector/Channels.cs b/libraries/Microsoft.Bot.Connector/Channels.cs index 274b5da326..250e6cb11f 100644 --- a/libraries/Microsoft.Bot.Connector/Channels.cs +++ b/libraries/Microsoft.Bot.Connector/Channels.cs @@ -88,6 +88,11 @@ public class Channels /// public const string Msteams = "msteams"; + /// + /// MS Teams channel. + /// + public const string SharePoint = "sharepoint"; + /// /// Skype channel. /// diff --git a/libraries/Microsoft.Bot.Schema/Microsoft.Bot.Schema.csproj b/libraries/Microsoft.Bot.Schema/Microsoft.Bot.Schema.csproj index 391948ee07..4ef13581dc 100644 --- a/libraries/Microsoft.Bot.Schema/Microsoft.Bot.Schema.csproj +++ b/libraries/Microsoft.Bot.Schema/Microsoft.Bot.Schema.csproj @@ -25,6 +25,7 @@ + diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/AceData.cs b/libraries/Microsoft.Bot.Schema/SharePoint/AceData.cs new file mode 100644 index 0000000000..2b23417a4f --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/AceData.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Text; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// SharePoint Ace Data object. + /// + public class AceData + { + /// + /// Initializes a new instance of the class. + /// + public AceData() + { + // Do nothing + } + + /// + /// This enum contains the different types of card templates available in the SPFx framework. + /// + public enum AceCardSize + { + /// + /// Small + /// + Small, + + /// + /// Medium + /// + Medium, + + /// + /// Large + /// + Large + } + + /// + /// Gets or Sets the card size of the adaptive card extension of type enum. + /// + [JsonProperty(PropertyName = "cardSize")] + [JsonConverter(typeof(StringEnumConverter))] + public AceCardSize CardSize { get; set; } + + /// + /// Gets or Sets the version of the data of type . + /// + [JsonProperty(PropertyName = "dataVersion")] + public string DataVersion { get; set; } + + /// + /// Gets or Sets the id of type . + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// Gets or Sets the title of type . + /// + [JsonProperty(PropertyName = "title")] + public string Title { get; set; } + + /// + /// Gets or Sets the icon property of type . + /// + [JsonProperty(PropertyName = "iconProperty")] + public string IconProperty { get; set; } + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/Action.cs b/libraries/Microsoft.Bot.Schema/SharePoint/Action.cs new file mode 100644 index 0000000000..92ccde7c33 --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/Action.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Text; +using Newtonsoft.Json; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// Initializes a new instance of the class. + /// + public class Action + { + /// + /// Gets or Sets the type of type . + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or Sets the action parameters of type . + /// + [JsonProperty(PropertyName = "parameters")] + public ActionParameters Parameters { get; set; } + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/ActionButton.cs b/libraries/Microsoft.Bot.Schema/SharePoint/ActionButton.cs new file mode 100644 index 0000000000..8866bd7ad9 --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/ActionButton.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Text; +using Newtonsoft.Json; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// SharePoint action button. + /// + public class ActionButton + { + /// + /// Initializes a new instance of the class. + /// + public ActionButton() + { + // Do nothing + } + + /// + /// Gets or Sets the title of type . + /// + [JsonProperty(PropertyName = "title")] + public string Title { get; set; } + + /// + /// Gets or Sets the action of type . + /// + [JsonProperty(PropertyName = "action")] + public Action Action { get; set; } + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/ActionParameters.cs b/libraries/Microsoft.Bot.Schema/SharePoint/ActionParameters.cs new file mode 100644 index 0000000000..c575a3a098 --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/ActionParameters.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Text; +using Newtonsoft.Json; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// SharePoint action button parameters. + /// + public class ActionParameters + { + /// + /// Initializes a new instance of the class. + /// + public ActionParameters() + { + // Do nothing + } + + /// + /// Gets or Sets the view of type . + /// + [JsonProperty(PropertyName = "view")] + public string View { get; set; } + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/CardViewData.cs b/libraries/Microsoft.Bot.Schema/SharePoint/CardViewData.cs new file mode 100644 index 0000000000..dfd2c7df42 --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/CardViewData.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using Newtonsoft.Json; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// SharePoint Card View Data object. + /// + public class CardViewData + { + /// + /// Initializes a new instance of the class. + /// + public CardViewData() + { + // Do nothing + } + + /// + /// Gets or Sets the action buttons of type . + /// + [JsonProperty(PropertyName = "actionButtons")] + public IEnumerable ActionButtons { get; set; } + + /// + /// Gets or Sets the primary text of type . + /// + [JsonProperty(PropertyName = "primaryText")] + public string PrimaryText { get; set; } + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/GetCardViewResponse.cs b/libraries/Microsoft.Bot.Schema/SharePoint/GetCardViewResponse.cs new file mode 100644 index 0000000000..a8c7a79fe4 --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/GetCardViewResponse.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Text; +using Microsoft.Bot.Schema.Teams; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// SharePoint GetCardView response object. + /// + public class GetCardViewResponse + { + /// + /// Initializes a new instance of the class. + /// + /// Template type of the card view. + public GetCardViewResponse(CardViewTemplateType templateType) + { + this.TemplateType = templateType; + } + + /// + /// This enum contains the different types of card templates available in the SPFx framework. + /// + public enum CardViewTemplateType + { + /// + /// Primary text card view + /// + PrimaryTextCardView, + + /// + /// Image card view + /// + ImageCardView + } + + /// + /// Gets or Sets the template type of the card view of type enum. + /// + [JsonProperty(PropertyName = "templateType")] + [JsonConverter(typeof(StringEnumConverter))] + public CardViewTemplateType TemplateType { get; set; } + + /// + /// Gets or Sets AceData for the card view of type . + /// + [JsonProperty(PropertyName = "aceData")] + public AceData AceData { get; set; } + + /// + /// Gets or Sets CardViewData of type . + /// + [JsonProperty(PropertyName = "data")] + public CardViewData Data { get; set; } + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/GetPropertyPaneConfigurationResponse.cs b/libraries/Microsoft.Bot.Schema/SharePoint/GetPropertyPaneConfigurationResponse.cs new file mode 100644 index 0000000000..2e4f729156 --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/GetPropertyPaneConfigurationResponse.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Text; +using AdaptiveCards; +using Microsoft.Bot.Schema.Teams; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// SharePoint GetQuickView response object. + /// + public class GetPropertyPaneConfigurationResponse + { + /// + /// Initializes a new instance of the class. + /// + public GetPropertyPaneConfigurationResponse() + { + // Do nothing + } + + /// + /// Gets or Sets the pages of type . + /// + [JsonProperty(PropertyName = "pages")] + public IEnumerable Pages { get; set; } + + /// + /// Gets or Sets the current page of type . + /// + [JsonProperty(PropertyName = "currentPage")] + public int CurrentPage { get; set; } + + /// + /// Gets or Sets the loading indicator delay time of type . + /// + [JsonProperty(PropertyName = "loadingIndicatorDelayTime")] + public int LoadingIndicatorDelayTime { get; set; } + + /// + /// Gets or Sets a value indicating whether the loading indicator should be displayed on top of the property pane or not of type . + /// + [JsonProperty(PropertyName = "showLoadingIndicator")] + public bool ShowLoadingIndicator { get; set; } + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/GetQuickViewResponse.cs b/libraries/Microsoft.Bot.Schema/SharePoint/GetQuickViewResponse.cs new file mode 100644 index 0000000000..aa1af2ead0 --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/GetQuickViewResponse.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Text; +using AdaptiveCards; +using Microsoft.Bot.Schema.Teams; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// SharePoint GetQuickView response object. + /// + public class GetQuickViewResponse + { + /// + /// Initializes a new instance of the class. + /// + public GetQuickViewResponse() + { + // Do nothing + } + + /// + /// Gets or Sets data for the quick view of type . + /// + [JsonProperty(PropertyName = "data")] + public QuickViewData Data { get; set; } + + /// + /// Gets or Sets data for the quick view template of type . + /// + [JsonProperty(PropertyName = "template")] + public AdaptiveCard Template { get; set; } + + /// + /// Gets or Sets view Id of type . + /// + [JsonProperty(PropertyName = "viewId")] + public string ViewId { get; set; } + + /// + /// Gets or Sets stackSize of type . + /// + [JsonProperty(PropertyName = "stackSize")] + public int StackSize { get; set; } + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/IPropertyPaneFieldProperties.cs b/libraries/Microsoft.Bot.Schema/SharePoint/IPropertyPaneFieldProperties.cs new file mode 100644 index 0000000000..2e894f589f --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/IPropertyPaneFieldProperties.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Text; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// Interface for property pane field properties. + /// +#pragma warning disable CA1040 // Avoid empty interfaces + public interface IPropertyPaneFieldProperties +#pragma warning restore CA1040 // Avoid empty interfaces + { + // This interface has no common methods. + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/IPropertyPaneGroupOrConditionalGroup.cs b/libraries/Microsoft.Bot.Schema/SharePoint/IPropertyPaneGroupOrConditionalGroup.cs new file mode 100644 index 0000000000..b4b3619d07 --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/IPropertyPaneGroupOrConditionalGroup.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Text; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// Interface for property pane group or conditional group. + /// +#pragma warning disable CA1040 // Avoid empty interfaces + public interface IPropertyPaneGroupOrConditionalGroup +#pragma warning restore CA1040 // Avoid empty interfaces + { + // This interface has no common methods. + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneCheckboxProperties.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneCheckboxProperties.cs new file mode 100644 index 0000000000..3c15a94aa7 --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneCheckboxProperties.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Text; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// SharePoint Quick View Data object. + /// + public class PropertyPaneCheckboxProperties : IPropertyPaneFieldProperties + { + /// + /// Initializes a new instance of the class. + /// + public PropertyPaneCheckboxProperties() + { + // Do nothing + } + + /// + /// Gets or Sets the label to display next to the checkbox of type . + /// + [JsonProperty(PropertyName = "text")] + public string Text { get; set; } + + /// + /// Gets or Sets a value indicating whether this control is enabled or not of type . + /// + [JsonProperty(PropertyName = "disabled")] + public bool Disabled { get; set; } + + /// + /// Gets or Sets a value indicating whether the property pane checkbox is checked or not of type . + /// + [JsonProperty(PropertyName = "checked")] + public bool Checked { get; set; } + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupIconProperties.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupIconProperties.cs new file mode 100644 index 0000000000..8184625ae2 --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupIconProperties.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Text; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// SharePoint Quick View Data object. + /// + public class PropertyPaneChoiceGroupIconProperties + { + /// + /// Initializes a new instance of the class. + /// + public PropertyPaneChoiceGroupIconProperties() + { + // Do nothing + } + + /// + /// Gets or Sets the name of the icon to use from the Office Fabric icon set of type . + /// + [JsonProperty(PropertyName = "officeFabricIconFontName")] + public string OfficeFabricIconFontName { get; set; } + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupImageSize.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupImageSize.cs new file mode 100644 index 0000000000..09eee635fa --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupImageSize.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Text; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// SharePoint Quick View Data object. + /// + public class PropertyPaneChoiceGroupImageSize + { + /// + /// Initializes a new instance of the class. + /// + public PropertyPaneChoiceGroupImageSize() + { + // Do nothing + } + + /// + /// Gets or Sets the width of the image of type . + /// + [JsonProperty(PropertyName = "width")] + public int Width { get; set; } + + /// + /// Gets or Sets the height of the image of type . + /// + [JsonProperty(PropertyName = "height")] + public int Height { get; set; } + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupOption.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupOption.cs new file mode 100644 index 0000000000..79f93caf17 --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupOption.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Text; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using static Microsoft.Bot.Schema.SharePoint.PropertyPaneDropDownOption; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// SharePoint Quick View Data object. + /// + public class PropertyPaneChoiceGroupOption + { + /// + /// Initializes a new instance of the class. + /// + public PropertyPaneChoiceGroupOption() + { + // Do nothing + } + + /// + /// Gets or Sets the aria label of type . + /// + [JsonProperty(PropertyName = "ariaLabel")] + public string AriaLabel { get; set; } + + /// + /// Gets or Sets a value indicating whether the property pane choice group option is checked or not of type . + /// + [JsonProperty(PropertyName = "checked")] + public bool Checked { get; set; } + + /// + /// Gets or Sets a value indicating whether this control is enabled or not of type . + /// + [JsonProperty(PropertyName = "disabled")] + public bool Disabled { get; set; } + + /// + /// Gets or Sets the Icon component props for choice field of type . + /// + [JsonProperty(PropertyName = "iconProps")] + public PropertyPaneChoiceGroupIconProperties IconProps { get; set; } + + /// + /// Gets or Sets the width and height of the image in px for choice field of type . + /// + [JsonProperty(PropertyName = "imageSize")] + public PropertyPaneChoiceGroupImageSize ImageSize { get; set; } + + /// + /// Gets or Sets the src of image for choice field of type . + /// + [JsonProperty(PropertyName = "imageSrc")] + public string ImageSrc { get; set; } + + /// + /// Gets or Sets a key to uniquely identify this option of type . + /// + [JsonProperty(PropertyName = "key")] + public string Key { get; set; } + + /// + /// Gets or Sets text to render for this option of type . + /// + [JsonProperty(PropertyName = "text")] + public string Text { get; set; } + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupProperties.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupProperties.cs new file mode 100644 index 0000000000..843615e05d --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupProperties.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Text; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// SharePoint Quick View Data object. + /// + public class PropertyPaneChoiceGroupProperties : IPropertyPaneFieldProperties + { + /// + /// Initializes a new instance of the class. + /// + public PropertyPaneChoiceGroupProperties() + { + // Do nothing + } + + /// + /// Gets or Sets the label of type . + /// + [JsonProperty(PropertyName = "label")] + public string Label { get; set; } + + /// + /// Gets or Sets the collection of options for this choice group of type . + /// + [JsonProperty(PropertyName = "options")] + public IEnumerable Options { get; set; } + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneDropDownOption.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneDropDownOption.cs new file mode 100644 index 0000000000..94428038e2 --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneDropDownOption.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Text; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// SharePoint Quick View Data object. + /// + public class PropertyPaneDropDownOption + { + /// + /// Initializes a new instance of the class. + /// + public PropertyPaneDropDownOption() + { + // Do nothing + } + + /// + /// This enum contains the different types of fields. + /// + public enum DropDownOptionType + { + /// + /// Render normal menu item. + /// + Normal = 0, + + /// + /// Render a divider. + /// + Divider = 1, + + /// + /// Render menu item as a header. + /// + Header = 2 + } + + /// + /// Gets or Sets index for this option of type . + /// + [JsonProperty(PropertyName = "index")] + public int Index { get; set; } + + /// + /// Gets or Sets a key to uniquely identify this option of type . + /// + [JsonProperty(PropertyName = "key")] + public string Key { get; set; } + + /// + /// Gets or Sets text to render for this option of type . + /// + [JsonProperty(PropertyName = "text")] + public string Text { get; set; } + + /// + /// Gets or Sets the type of option. If omitted, the default is PropertyPaneDropdownMenuItemType.Normal of type . + /// + [JsonProperty(PropertyName = "type")] + public DropDownOptionType Type { get; set; } + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneDropDownProperties.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneDropDownProperties.cs new file mode 100644 index 0000000000..05d6ddb33e --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneDropDownProperties.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Text; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// SharePoint Quick View Data object. + /// + public class PropertyPaneDropDownProperties : IPropertyPaneFieldProperties + { + /// + /// Initializes a new instance of the class. + /// + public PropertyPaneDropDownProperties() + { + // Do nothing + } + + /// + /// Gets or Sets the aria label of type . + /// + [JsonProperty(PropertyName = "ariaLabel")] + public string AriaLabel { get; set; } + + /// + /// Gets or Sets an element's number or position in the current set of controls. Maps to native aria-posinset attribute. It starts from 1 of type . + /// + [JsonProperty(PropertyName = "ariaPositionInSet")] + public int AriaPositionInSet { get; set; } + + /// + /// Gets or Sets the number of items in the current set of controls. Maps to native aria-setsize attribute of type . + /// + [JsonProperty(PropertyName = "ariaSetSize")] + public int AriaSetSize { get; set; } + + /// + /// Gets or Sets the label of type . + /// + [JsonProperty(PropertyName = "label")] + public string Label { get; set; } + + /// + /// Gets or Sets a value indicating whether this control is enabled or not of type . + /// + [JsonProperty(PropertyName = "disabled")] + public bool Disabled { get; set; } + + /// + /// Gets or Sets the error message of type . + /// + [JsonProperty(PropertyName = "errorMessage")] + public string ErrorMessage { get; set; } + + /// + /// Gets or Sets the key of the initially selected option of type . + /// + [JsonProperty(PropertyName = "selectedKey")] + public string SelectedKey { get; set; } + + /// + /// Gets or Sets the collection of options for this Dropdown of type . + /// + [JsonProperty(PropertyName = "options")] + public IEnumerable Options { get; set; } + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneGroup.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneGroup.cs new file mode 100644 index 0000000000..c8dae267ba --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneGroup.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Text; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// SharePoint Quick View Data object. + /// + public class PropertyPaneGroup : IPropertyPaneGroupOrConditionalGroup + { + /// + /// Initializes a new instance of the class. + /// + public PropertyPaneGroup() + { + // Do nothing + } + + /// + /// Gets or Sets the group fields of type . + /// + [JsonProperty(PropertyName = "groupFields")] + public IEnumerable GroupFields { get; set; } + + /// + /// Gets or Sets the group name of type . + /// + [JsonProperty(PropertyName = "groupName")] + public string GroupName { get; set; } + + /// + /// Gets or Sets a value indicating whether the PropertyPane group is collapsed or not of type . + /// + [JsonProperty(PropertyName = "isCollapsed")] + public bool IsCollapsed { get; set; } + + /// + /// Gets or Sets a value indicating whether group name should be hidden of type . + /// + [JsonProperty(PropertyName = "isGroupNameHidden")] + public bool IsGroupNameHidden { get; set; } + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneGroupField.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneGroupField.cs new file mode 100644 index 0000000000..86babdcf17 --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneGroupField.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Text; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// SharePoint Quick View Data object. + /// + public class PropertyPaneGroupField + { + /// + /// Initializes a new instance of the class. + /// + public PropertyPaneGroupField() + { + // Do nothing + } + + /// + /// This enum contains the different types of fields. + /// + public enum FieldType + { + /// + /// Checkbox field. + /// + CheckBox = 2, + + /// + /// TextField field. + /// + TextField = 3, + + /// + /// Toggle field. + /// + Toggle = 5, + + /// + /// Dropdown field. + /// + Dropdown = 6, + + /// + /// Label field. + /// + Label = 7, + + /// + /// Slider field. + /// + Slider = 8, + + /// + /// ChoiceGroup field. + /// + ChoiceGroup = 10, + + /// + /// Horizontal Rule field. + /// + HorizontalRule = 12, + + /// + /// Link field. + /// + Link = 13 + } + + /// + /// Gets or Sets the type of field enum. + /// + [JsonProperty(PropertyName = "type")] + public FieldType Type { get; set; } + + /// + /// Gets or Sets the group fields of type . + /// + [JsonProperty(PropertyName = "groupFields")] + public IEnumerable GroupFields { get; set; } + + /// + /// Gets or Sets the properties property of type . + /// + [JsonProperty(PropertyName = "properties")] + public IPropertyPaneFieldProperties Properties { get; set; } + + /// + /// Gets or Sets a value indicating whether this control should be focused of type . + /// + [JsonProperty(PropertyName = "shouldFocus")] + public bool ShouldFocus { get; set; } + + /// + /// Gets or Sets the target property of type . + /// + [JsonProperty(PropertyName = "targetProperty")] + public string TargetProperty { get; set; } + + /// + /// Gets or Sets a value indicating whether group name should be hidden of type . + /// + [JsonProperty(PropertyName = "isGroupNameHidden")] + public bool IsGroupNameHidden { get; set; } + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneLabelProperties.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneLabelProperties.cs new file mode 100644 index 0000000000..2fd6946859 --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneLabelProperties.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Text; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// SharePoint Quick View Data object. + /// + public class PropertyPaneLabelProperties : IPropertyPaneFieldProperties + { + /// + /// Initializes a new instance of the class. + /// + public PropertyPaneLabelProperties() + { + // Do nothing + } + + /// + /// Gets or Sets the display text for the label of type . + /// + [JsonProperty(PropertyName = "text")] + public string Text { get; set; } + + /// + /// Gets or Sets a value indicating whether the associated form field is required or not. of type . + /// + [JsonProperty(PropertyName = "required")] + public bool Required { get; set; } + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneLinkPopupWindowProperties.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneLinkPopupWindowProperties.cs new file mode 100644 index 0000000000..fddb45bb90 --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneLinkPopupWindowProperties.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Text; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using static Microsoft.Bot.Schema.SharePoint.PropertyPaneGroupField; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// SharePoint Quick View Data object. + /// + public class PropertyPaneLinkPopupWindowProperties + { + /// + /// Initializes a new instance of the class. + /// + public PropertyPaneLinkPopupWindowProperties() + { + // Do nothing + } + + /// + /// This enum contains the different types of fields. + /// + public enum PopupWindowPosition + { + /// + /// Center. + /// + Center = 0, + + /// + /// Right Top. + /// + RightTop = 1, + + /// + /// Left Top . + /// + LeftTop = 2, + + /// + /// Right Bottom. + /// + RightBottom = 3, + + /// + /// Left Bottom. + /// + LeftBottom = 4, + } + + /// + /// Gets or Sets the height of the pop up window of type . + /// + [JsonProperty(PropertyName = "height")] + public int Height { get; set; } + + /// + /// Gets or Sets the position of pop up window enum. + /// + [JsonProperty(PropertyName = "positionWindowPosition")] + public PopupWindowPosition PositionWindowPosition { get; set; } + + /// + /// Gets or Sets the title of pop up window of type . + /// + [JsonProperty(PropertyName = "title")] + public string Title { get; set; } + + /// + /// Gets or Sets the width of the pop up window of type . + /// + [JsonProperty(PropertyName = "width")] + public int Width { get; set; } + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneLinkProperties.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneLinkProperties.cs new file mode 100644 index 0000000000..e48642f4bc --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneLinkProperties.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Text; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// SharePoint Quick View Data object. + /// + public class PropertyPaneLinkProperties : IPropertyPaneFieldProperties + { + /// + /// Initializes a new instance of the class. + /// + public PropertyPaneLinkProperties() + { + // Do nothing + } + + /// + /// Gets or Sets the aria label of type . + /// + [JsonProperty(PropertyName = "ariaLabel")] + public string AriaLabel { get; set; } + + /// + /// Gets or Sets a value indicating whether this control is enabled or not of type . + /// + [JsonProperty(PropertyName = "disabled")] + public bool Disabled { get; set; } + + /// + /// Gets or Sets the location to which the link is targeted to of type . + /// + [JsonProperty(PropertyName = "href")] + public string Href { get; set; } + + /// + /// Gets or Sets the props of pop up window. of type . + /// + [JsonProperty(PropertyName = "popupWindowProps")] + public PropertyPaneLinkPopupWindowProperties PopupWindowProps { get; set; } + + /// + /// Gets or Sets where to display the linked resource of type . + /// + [JsonProperty(PropertyName = "target")] + public string Target { get; set; } + + /// + /// Gets or Sets the display text for the link of type . + /// + [JsonProperty(PropertyName = "text")] + public string Text { get; set; } + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPanePage.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPanePage.cs new file mode 100644 index 0000000000..43820d8897 --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPanePage.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Text; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// SharePoint Quick View Data object. + /// + public class PropertyPanePage + { + /// + /// Initializes a new instance of the class. + /// + public PropertyPanePage() + { + // Do nothing + } + + /// + /// Gets or Sets the groups of type . + /// + [JsonProperty(PropertyName = "groups")] + public IEnumerable Groups { get; set; } + + /// + /// Gets or Sets a value indicating whether the groups on the PropertyPanePage are displayed as accordion or not of type . + /// + [JsonProperty(PropertyName = "displayGroupsAsAccordion")] + public bool DisplayGroupsAsAccordion { get; set; } + + /// + /// Gets or Sets the header for the property pane of type . + /// + [JsonProperty(PropertyName = "header")] + public PropertyPanePageHeader Header { get; set; } + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPanePageHeader.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPanePageHeader.cs new file mode 100644 index 0000000000..ed738c716f --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPanePageHeader.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Text; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// SharePoint Quick View Data object. + /// + public class PropertyPanePageHeader + { + /// + /// Initializes a new instance of the class. + /// + public PropertyPanePageHeader() + { + // Do nothing + } + + /// + /// Gets or Sets the description of type . + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneSliderProperties.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneSliderProperties.cs new file mode 100644 index 0000000000..faae992eb3 --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneSliderProperties.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Text; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// SharePoint Quick View Data object. + /// + public class PropertyPaneSliderProperties : IPropertyPaneFieldProperties + { + /// + /// Initializes a new instance of the class. + /// + public PropertyPaneSliderProperties() + { + this.Step = 1; + } + + /// + /// Gets or Sets the label of type . + /// + [JsonProperty(PropertyName = "label")] + public string Label { get; set; } + + /// + /// Gets or Sets the value of type . + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } + + /// + /// Gets or Sets the aria label of type . + /// + [JsonProperty(PropertyName = "ariaLabel")] + public string AriaLabel { get; set; } + + /// + /// Gets or Sets a value indicating whether this control is enabled or not of type . + /// + [JsonProperty(PropertyName = "disabled")] + public bool Disabled { get; set; } + + /// + /// Gets or Sets the max value of the Slider of type . + /// + [JsonProperty(PropertyName = "max")] + public int Max { get; set; } + + /// + /// Gets or Sets the min value of the Slider of type . + /// + [JsonProperty(PropertyName = "min")] + public int Min { get; set; } + + /// + /// Gets or Sets a value indicating whether to show the value on the right of the Slider of type . + /// + [JsonProperty(PropertyName = "showValue")] + public bool ShowValue { get; set; } + + /// + /// Gets or Sets the difference between the two adjacent values of the Slider. Defaults to 1. of type . + /// + [JsonProperty(PropertyName = "step")] + public int Step { get; set; } + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneTextFieldProperties.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneTextFieldProperties.cs new file mode 100644 index 0000000000..f93c811908 --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneTextFieldProperties.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Text; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// SharePoint Quick View Data object. + /// + public class PropertyPaneTextFieldProperties : IPropertyPaneFieldProperties + { + /// + /// Initializes a new instance of the class. + /// + public PropertyPaneTextFieldProperties() + { + // Do nothing + } + + /// + /// Gets or Sets the label of type . + /// + [JsonProperty(PropertyName = "label")] + public string Label { get; set; } + + /// + /// Gets or Sets the value of type . + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } + + /// + /// Gets or Sets the aria label of type . + /// + [JsonProperty(PropertyName = "ariaLabel")] + public string AriaLabel { get; set; } + + /// + /// Gets or Sets the amount of time to wait before validating after the users stop typing in ms of type . + /// + [JsonProperty(PropertyName = "deferredValidationTime")] + public int DeferredValidationTime { get; set; } + + /// + /// Gets or Sets the description of type . + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or Sets a value indicating whether this control is enabled or not of type . + /// + [JsonProperty(PropertyName = "disabled")] + public bool Disabled { get; set; } + + /// + /// Gets or Sets the error message of type . + /// + [JsonProperty(PropertyName = "errorMessage")] + public string ErrorMessage { get; set; } + + /// + /// Gets or Sets the name used to log PropertyPaneTextField value changes for engagement tracking of type . + /// + [JsonProperty(PropertyName = "logName")] + public string LogName { get; set; } + + /// + /// Gets or Sets the maximum number of characters that the PropertyPaneTextField can have of type . + /// + [JsonProperty(PropertyName = "maxLength")] + public int MaxLength { get; set; } + + /// + /// Gets or Sets a value indicating whether or not the text field is a multiline text field of type . + /// + [JsonProperty(PropertyName = "multiline")] + public bool Multiline { get; set; } + + /// + /// Gets or Sets the placeholder text to be displayed in the text field of type . + /// + [JsonProperty(PropertyName = "placeholder")] + public string Placeholder { get; set; } + + /// + /// Gets or Sets a value indicating whether or not the multiline text field is resizable of type . + /// + [JsonProperty(PropertyName = "resizable")] + public bool Resizable { get; set; } + + /// + /// Gets or Sets the value that specifies the visible height of a text area(multiline text TextField), in lines.maximum number of characters that the PropertyPaneTextField can have of type . + /// + [JsonProperty(PropertyName = "rows")] + public int Rows { get; set; } + + /// + /// Gets or Sets a value indicating whether or not the text field is underlined of type . + /// + [JsonProperty(PropertyName = "underlined")] + public bool Underlined { get; set; } + + /// + /// Gets or Sets a value indicating whether to run validation when the PropertyPaneTextField is focused of type . + /// + [JsonProperty(PropertyName = "validateOnFocusIn")] + public bool ValidateOnFocusIn { get; set; } + + /// + /// Gets or Sets a value indicating whether to run validation when the PropertyPaneTextField is out of focus or on blur of type . + /// + [JsonProperty(PropertyName = "validateOnFocusOut")] + public bool ValidateOnFocusOut { get; set; } + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneToggleProperties.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneToggleProperties.cs new file mode 100644 index 0000000000..29b4ce6185 --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneToggleProperties.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Text; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// SharePoint Quick View Data object. + /// + public class PropertyPaneToggleProperties : IPropertyPaneFieldProperties + { + /// + /// Initializes a new instance of the class. + /// + public PropertyPaneToggleProperties() + { + // Do nothing + } + + /// + /// Gets or Sets the aria label of type . + /// + [JsonProperty(PropertyName = "ariaLabel")] + public string AriaLabel { get; set; } + + /// + /// Gets or Sets the label of type . + /// + [JsonProperty(PropertyName = "label")] + public string Label { get; set; } + + /// + /// Gets or Sets a value indicating whether this control is enabled or not of type . + /// + [JsonProperty(PropertyName = "disabled")] + public bool Disabled { get; set; } + + /// + /// Gets or Sets a value indicating whether the property pane checkbox is checked or not of type . + /// + [JsonProperty(PropertyName = "checked")] + public bool Checked { get; set; } + + /// + /// Gets or Sets a key to uniquely identify the field of type . + /// + [JsonProperty(PropertyName = "key")] + public string Key { get; set; } + + /// + /// Gets or Sets text to display when toggle is OFF of type . + /// + [JsonProperty(PropertyName = "offText")] + public string OffText { get; set; } + + /// + /// Gets or Sets text to display when toggle is ON of type . + /// + [JsonProperty(PropertyName = "onText")] + public string OnText { get; set; } + + /// + /// Gets or Sets text for screen-reader to announce when toggle is OFF of type . + /// + [JsonProperty(PropertyName = "offAriaLabel")] + public string OffAriaLabel { get; set; } + + /// + /// Gets or Sets text for screen-reader to announce when toggle is ON of type . + /// + [JsonProperty(PropertyName = "onAriaLabel")] + public string OnAriaLabel { get; set; } + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/QuickViewBody.cs b/libraries/Microsoft.Bot.Schema/SharePoint/QuickViewBody.cs new file mode 100644 index 0000000000..e154a2c182 --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/QuickViewBody.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Text; +using Newtonsoft.Json; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// Initializes a new instance of the class. + /// + public class QuickViewBody + { + /// + /// Gets or Sets the type of type . + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or Sets a value indicating whether the separator exists. + /// + [JsonProperty(PropertyName = "separator")] + public bool Separator { get; set; } + + /// + /// Gets or Sets the items of type . + /// + [JsonProperty(PropertyName = "items")] + public IEnumerable Items { get; set; } + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/QuickViewData.cs b/libraries/Microsoft.Bot.Schema/SharePoint/QuickViewData.cs new file mode 100644 index 0000000000..28ba896391 --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/QuickViewData.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Text; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// SharePoint Quick View Data object. + /// + public class QuickViewData + { + /// + /// Initializes a new instance of the class. + /// + public QuickViewData() + { + // Do nothing + } + + /// + /// Gets or Sets the title of type . + /// + [JsonProperty(PropertyName = "title")] + public string Title { get; set; } + + /// + /// Gets or Sets the description of type . + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/QuickViewItem.cs b/libraries/Microsoft.Bot.Schema/SharePoint/QuickViewItem.cs new file mode 100644 index 0000000000..600d493b94 --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/QuickViewItem.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Text; +using Newtonsoft.Json; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// Initializes a new instance of the class. + /// + public class QuickViewItem + { + /// + /// Gets or Sets the type of type . + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or Sets a value indicating whether the separator exists. + /// + [JsonProperty(PropertyName = "separator")] + public bool Separator { get; set; } + + /// + /// Gets or Sets the items of type . + /// + [JsonProperty(PropertyName = "items")] + public IEnumerable Items { get; set; } + } +} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/QuickViewTemplate.cs b/libraries/Microsoft.Bot.Schema/SharePoint/QuickViewTemplate.cs new file mode 100644 index 0000000000..1d0c39b975 --- /dev/null +++ b/libraries/Microsoft.Bot.Schema/SharePoint/QuickViewTemplate.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Text; +using Newtonsoft.Json; + +namespace Microsoft.Bot.Schema.SharePoint +{ + /// + /// Initializes a new instance of the class. + /// + public class QuickViewTemplate + { + /// + /// Gets or Sets the schema of type . + /// + [JsonProperty(PropertyName = "$scehma")] + public string Schema { get; set; } + + /// + /// Gets or Sets the type of type . + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or Sets the version of type . + /// + [JsonProperty(PropertyName = "version")] + public string Version { get; set; } + + /// + /// Gets or Sets the body of type . + /// + [JsonProperty(PropertyName = "body")] + public QuickViewBody Body { get; set; } + } +} From 7d414214fd6fa1a6a210991c85e0304fced73b40 Mon Sep 17 00:00:00 2001 From: Graham McMynn Date: Thu, 30 Mar 2023 10:52:22 -0700 Subject: [PATCH 2/5] Adding unit tests for SharePoint BotInvoke endpoints --- .../SharePointActivityHandlerTests.cs | 186 ++++++++++++++++++ 1 file changed, 186 insertions(+) create mode 100644 tests/Microsoft.Bot.Builder.Tests/SharePoint/SharePointActivityHandlerTests.cs diff --git a/tests/Microsoft.Bot.Builder.Tests/SharePoint/SharePointActivityHandlerTests.cs b/tests/Microsoft.Bot.Builder.Tests/SharePoint/SharePointActivityHandlerTests.cs new file mode 100644 index 0000000000..473e3befbc --- /dev/null +++ b/tests/Microsoft.Bot.Builder.Tests/SharePoint/SharePointActivityHandlerTests.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Net; +using System.Net.Http; +using System.Reflection; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Bot.Builder.Tests; +using Microsoft.Bot.Connector; +using Microsoft.Bot.Connector.Authentication; +using Microsoft.Bot.Schema; +using Microsoft.Bot.Schema.SharePoint; +using Microsoft.Bot.Schema.Teams; +using Microsoft.Rest.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using Xunit; + +namespace Microsoft.Bot.Builder.SharePoint.Tests +{ + public class SharePointActivityHandlerTests + { + [Fact] + public async Task TestSharePointGetCardViewAction() + { + // Arrange + var activity = new Activity + { + Type = ActivityTypes.Invoke, + Name = "cardExtension/getCardView", + Value = JObject.FromObject(new object()), + }; + + Activity[] activitiesToSend = null; + void CaptureSend(Activity[] arg) + { + activitiesToSend = arg; + } + + var turnContext = new TurnContext(new SimpleAdapter(CaptureSend), activity); + + // Act + var bot = new TestActivityHandler(); + await ((IBot)bot).OnTurnAsync(turnContext); + + // Assert + Assert.Single(bot.Record); + Assert.Equal("OnSharePointTaskGetCardViewAsync", bot.Record[0]); + Assert.NotNull(activitiesToSend); + Assert.Single(activitiesToSend); + Assert.IsType(activitiesToSend[0].Value); + Assert.Equal(200, ((InvokeResponse)activitiesToSend[0].Value).Status); + } + + [Fact] + public async Task TestSharePointGetQuickViewAction() + { + // Arrange + var activity = new Activity + { + Type = ActivityTypes.Invoke, + Name = "cardExtension/getQuickView", + Value = JObject.FromObject(new object()), + }; + + Activity[] activitiesToSend = null; + void CaptureSend(Activity[] arg) + { + activitiesToSend = arg; + } + + var turnContext = new TurnContext(new SimpleAdapter(CaptureSend), activity); + + // Act + var bot = new TestActivityHandler(); + await ((IBot)bot).OnTurnAsync(turnContext); + + // Assert + Assert.Single(bot.Record); + Assert.Equal("OnSharePointTaskGetQuickViewAsync", bot.Record[0]); + Assert.NotNull(activitiesToSend); + Assert.Single(activitiesToSend); + Assert.IsType(activitiesToSend[0].Value); + Assert.Equal(200, ((InvokeResponse)activitiesToSend[0].Value).Status); + } + + [Fact] + public async Task TestSharePointGetPropertyPaneConfigurationAction() + { + // Arrange + var activity = new Activity + { + Type = ActivityTypes.Invoke, + Name = "cardExtension/getPropertyPaneConfiguration", + Value = JObject.FromObject(new object()), + }; + + Activity[] activitiesToSend = null; + void CaptureSend(Activity[] arg) + { + activitiesToSend = arg; + } + + var turnContext = new TurnContext(new SimpleAdapter(CaptureSend), activity); + + // Act + var bot = new TestActivityHandler(); + await ((IBot)bot).OnTurnAsync(turnContext); + + // Assert + Assert.Single(bot.Record); + Assert.Equal("OnSharePointTaskGetPropertyPaneConfigurationAsync", bot.Record[0]); + Assert.NotNull(activitiesToSend); + Assert.Single(activitiesToSend); + Assert.IsType(activitiesToSend[0].Value); + Assert.Equal(200, ((InvokeResponse)activitiesToSend[0].Value).Status); + } + + [Fact] + public async Task TestSharePointSetPropertyPaneConfigurationAction() + { + // Arrange + var activity = new Activity + { + Type = ActivityTypes.Invoke, + Name = "cardExtension/setPropertyPaneConfiguration", + Value = JObject.FromObject(new object()), + }; + + Activity[] activitiesToSend = null; + void CaptureSend(Activity[] arg) + { + activitiesToSend = arg; + } + + var turnContext = new TurnContext(new SimpleAdapter(CaptureSend), activity); + + // Act + var bot = new TestActivityHandler(); + await ((IBot)bot).OnTurnAsync(turnContext); + + // Assert + Assert.Single(bot.Record); + Assert.Equal("OnSharePointTaskSetPropertyPaneConfigurationAsync", bot.Record[0]); + Assert.NotNull(activitiesToSend); + Assert.Single(activitiesToSend); + Assert.IsType(activitiesToSend[0].Value); + Assert.Equal(200, ((InvokeResponse)activitiesToSend[0].Value).Status); + } + + private class TestActivityHandler : SharePointActivityHandler + { + public List Record { get; } = new List(); + + // Invoke + protected override Task OnSharePointTaskGetCardViewAsync(ITurnContext turnContext, TaskModuleRequest taskModuleRequest, CancellationToken cancellationToken) + { + Record.Add(MethodBase.GetCurrentMethod().Name); + return Task.FromResult(new GetCardViewResponse(GetCardViewResponse.CardViewTemplateType.PrimaryTextCardView)); + } + + protected override Task OnSharePointTaskGetPropertyPaneConfigurationAsync(ITurnContext turnContext, TaskModuleRequest taskModuleRequest, CancellationToken cancellationToken) + { + Record.Add(MethodBase.GetCurrentMethod().Name); + return Task.FromResult(new GetPropertyPaneConfigurationResponse()); + } + + protected override Task OnSharePointTaskGetQuickViewAsync(ITurnContext turnContext, TaskModuleRequest taskModuleRequest, CancellationToken cancellationToken) + { + Record.Add(MethodBase.GetCurrentMethod().Name); + return Task.FromResult(new GetQuickViewResponse()); + } + + protected override Task OnSharePointTaskSetPropertyPaneConfigurationAsync(ITurnContext turnContext, TaskModuleRequest taskModuleRequest, CancellationToken cancellationToken) + { + Record.Add(MethodBase.GetCurrentMethod().Name); + return Task.CompletedTask; + } + } + } +} From 12c06c4d7e660cea9e0cc5f19cca900d43e223da Mon Sep 17 00:00:00 2001 From: Graham McMynn Date: Mon, 3 Apr 2023 10:00:17 -0700 Subject: [PATCH 3/5] Fixing style cop issues --- libraries/Microsoft.Bot.Schema/SharePoint/AceData.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/AceData.cs b/libraries/Microsoft.Bot.Schema/SharePoint/AceData.cs index 2b23417a4f..6bdd95773e 100644 --- a/libraries/Microsoft.Bot.Schema/SharePoint/AceData.cs +++ b/libraries/Microsoft.Bot.Schema/SharePoint/AceData.cs @@ -48,6 +48,7 @@ public enum AceCardSize /// /// Gets or Sets the card size of the adaptive card extension of type enum. /// + /// This value is the size of the adaptive card extension. [JsonProperty(PropertyName = "cardSize")] [JsonConverter(typeof(StringEnumConverter))] public AceCardSize CardSize { get; set; } @@ -55,24 +56,28 @@ public enum AceCardSize /// /// Gets or Sets the version of the data of type . /// + /// This value is the version of the adaptive card extension. [JsonProperty(PropertyName = "dataVersion")] public string DataVersion { get; set; } /// /// Gets or Sets the id of type . /// + /// This value is the ID of the adaptive card extension. [JsonProperty(PropertyName = "id")] public string Id { get; set; } /// /// Gets or Sets the title of type . /// + /// This value is the title of the adaptive card extension. [JsonProperty(PropertyName = "title")] public string Title { get; set; } /// /// Gets or Sets the icon property of type . /// + /// This value is the icon of the adaptive card extension. [JsonProperty(PropertyName = "iconProperty")] public string IconProperty { get; set; } } From 02664d29ccce5b0e1ecdd090d2f7127300394af9 Mon Sep 17 00:00:00 2001 From: Graham McMynn Date: Mon, 3 Apr 2023 10:58:49 -0700 Subject: [PATCH 4/5] Fixing more style cop issues --- .../Microsoft.Bot.Schema/SharePoint/Action.cs | 2 + .../SharePoint/ActionButton.cs | 2 + .../SharePoint/ActionParameters.cs | 1 + .../SharePoint/CardViewData.cs | 2 + .../SharePoint/GetCardViewResponse.cs | 3 ++ .../GetPropertyPaneConfigurationResponse.cs | 4 ++ .../SharePoint/GetQuickViewResponse.cs | 6 ++- .../PropertyPaneCheckboxProperties.cs | 3 ++ .../PropertyPaneChoiceGroupIconProperties.cs | 1 + .../PropertyPaneChoiceGroupImageSize.cs | 2 + .../PropertyPaneChoiceGroupOption.cs | 8 ++++ .../PropertyPaneChoiceGroupProperties.cs | 1 + .../SharePoint/PropertyPaneDropDownOption.cs | 4 ++ .../PropertyPaneDropDownProperties.cs | 8 ++++ .../SharePoint/PropertyPaneGroup.cs | 4 ++ .../SharePoint/PropertyPaneGroupField.cs | 11 +++-- .../SharePoint/PropertyPaneLabelProperties.cs | 2 + .../PropertyPaneLinkPopupWindowProperties.cs | 4 ++ .../SharePoint/PropertyPaneLinkProperties.cs | 6 +++ .../SharePoint/PropertyPanePage.cs | 3 ++ .../SharePoint/PropertyPanePageHeader.cs | 1 + .../PropertyPaneSliderProperties.cs | 8 ++++ .../PropertyPaneTextFieldProperties.cs | 16 ++++++++ .../PropertyPaneToggleProperties.cs | 9 +++++ .../SharePoint/QuickViewBody.cs | 34 ---------------- .../SharePoint/QuickViewData.cs | 2 + .../SharePoint/QuickViewItem.cs | 34 ---------------- .../SharePoint/QuickViewTemplate.cs | 40 ------------------- 28 files changed, 106 insertions(+), 115 deletions(-) delete mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/QuickViewBody.cs delete mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/QuickViewItem.cs delete mode 100644 libraries/Microsoft.Bot.Schema/SharePoint/QuickViewTemplate.cs diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/Action.cs b/libraries/Microsoft.Bot.Schema/SharePoint/Action.cs index 92ccde7c33..a23ae5d54b 100644 --- a/libraries/Microsoft.Bot.Schema/SharePoint/Action.cs +++ b/libraries/Microsoft.Bot.Schema/SharePoint/Action.cs @@ -16,12 +16,14 @@ public class Action /// /// Gets or Sets the type of type . /// + /// This value is the type of the action. [JsonProperty(PropertyName = "type")] public string Type { get; set; } /// /// Gets or Sets the action parameters of type . /// + /// This value is the parameters of the action. [JsonProperty(PropertyName = "parameters")] public ActionParameters Parameters { get; set; } } diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/ActionButton.cs b/libraries/Microsoft.Bot.Schema/SharePoint/ActionButton.cs index 8866bd7ad9..5aeed58649 100644 --- a/libraries/Microsoft.Bot.Schema/SharePoint/ActionButton.cs +++ b/libraries/Microsoft.Bot.Schema/SharePoint/ActionButton.cs @@ -24,12 +24,14 @@ public ActionButton() /// /// Gets or Sets the title of type . /// + /// This value is the title of the action button. [JsonProperty(PropertyName = "title")] public string Title { get; set; } /// /// Gets or Sets the action of type . /// + /// This value is the action of the action button. [JsonProperty(PropertyName = "action")] public Action Action { get; set; } } diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/ActionParameters.cs b/libraries/Microsoft.Bot.Schema/SharePoint/ActionParameters.cs index c575a3a098..4ad2a196f5 100644 --- a/libraries/Microsoft.Bot.Schema/SharePoint/ActionParameters.cs +++ b/libraries/Microsoft.Bot.Schema/SharePoint/ActionParameters.cs @@ -24,6 +24,7 @@ public ActionParameters() /// /// Gets or Sets the view of type . /// + /// This value is the view of the action parameter. [JsonProperty(PropertyName = "view")] public string View { get; set; } } diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/CardViewData.cs b/libraries/Microsoft.Bot.Schema/SharePoint/CardViewData.cs index dfd2c7df42..e23e50839c 100644 --- a/libraries/Microsoft.Bot.Schema/SharePoint/CardViewData.cs +++ b/libraries/Microsoft.Bot.Schema/SharePoint/CardViewData.cs @@ -25,12 +25,14 @@ public CardViewData() /// /// Gets or Sets the action buttons of type . /// + /// This value is the action buttons of the card view. [JsonProperty(PropertyName = "actionButtons")] public IEnumerable ActionButtons { get; set; } /// /// Gets or Sets the primary text of type . /// + /// This value is the primary text of the card view. [JsonProperty(PropertyName = "primaryText")] public string PrimaryText { get; set; } } diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/GetCardViewResponse.cs b/libraries/Microsoft.Bot.Schema/SharePoint/GetCardViewResponse.cs index a8c7a79fe4..0d29ab772e 100644 --- a/libraries/Microsoft.Bot.Schema/SharePoint/GetCardViewResponse.cs +++ b/libraries/Microsoft.Bot.Schema/SharePoint/GetCardViewResponse.cs @@ -45,6 +45,7 @@ public enum CardViewTemplateType /// /// Gets or Sets the template type of the card view of type enum. /// + /// This value is the template type of the card view response. [JsonProperty(PropertyName = "templateType")] [JsonConverter(typeof(StringEnumConverter))] public CardViewTemplateType TemplateType { get; set; } @@ -52,12 +53,14 @@ public enum CardViewTemplateType /// /// Gets or Sets AceData for the card view of type . /// + /// This value is the ace data of the card view response. [JsonProperty(PropertyName = "aceData")] public AceData AceData { get; set; } /// /// Gets or Sets CardViewData of type . /// + /// This value is the data of the card view response. [JsonProperty(PropertyName = "data")] public CardViewData Data { get; set; } } diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/GetPropertyPaneConfigurationResponse.cs b/libraries/Microsoft.Bot.Schema/SharePoint/GetPropertyPaneConfigurationResponse.cs index 2e4f729156..fbb747ac23 100644 --- a/libraries/Microsoft.Bot.Schema/SharePoint/GetPropertyPaneConfigurationResponse.cs +++ b/libraries/Microsoft.Bot.Schema/SharePoint/GetPropertyPaneConfigurationResponse.cs @@ -29,24 +29,28 @@ public GetPropertyPaneConfigurationResponse() /// /// Gets or Sets the pages of type . /// + /// This value is the pages of the property pane. [JsonProperty(PropertyName = "pages")] public IEnumerable Pages { get; set; } /// /// Gets or Sets the current page of type . /// + /// This value is the current page of the property pane. [JsonProperty(PropertyName = "currentPage")] public int CurrentPage { get; set; } /// /// Gets or Sets the loading indicator delay time of type . /// + /// This value is the loading indicator delay time of the property pane. [JsonProperty(PropertyName = "loadingIndicatorDelayTime")] public int LoadingIndicatorDelayTime { get; set; } /// /// Gets or Sets a value indicating whether the loading indicator should be displayed on top of the property pane or not of type . /// + /// This value sets whether the loading indicator is shown for the property pane. [JsonProperty(PropertyName = "showLoadingIndicator")] public bool ShowLoadingIndicator { get; set; } } diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/GetQuickViewResponse.cs b/libraries/Microsoft.Bot.Schema/SharePoint/GetQuickViewResponse.cs index aa1af2ead0..e3327dde19 100644 --- a/libraries/Microsoft.Bot.Schema/SharePoint/GetQuickViewResponse.cs +++ b/libraries/Microsoft.Bot.Schema/SharePoint/GetQuickViewResponse.cs @@ -29,24 +29,28 @@ public GetQuickViewResponse() /// /// Gets or Sets data for the quick view of type . /// + /// This value is the data of the quick view response. [JsonProperty(PropertyName = "data")] public QuickViewData Data { get; set; } /// - /// Gets or Sets data for the quick view template of type . + /// Gets or Sets data for the quick view template of type . /// + /// This value is the template of the quick view response. [JsonProperty(PropertyName = "template")] public AdaptiveCard Template { get; set; } /// /// Gets or Sets view Id of type . /// + /// This value is the view Id of the quick view response. [JsonProperty(PropertyName = "viewId")] public string ViewId { get; set; } /// /// Gets or Sets stackSize of type . /// + /// This value is the stack size of the quick view response. [JsonProperty(PropertyName = "stackSize")] public int StackSize { get; set; } } diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneCheckboxProperties.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneCheckboxProperties.cs index 3c15a94aa7..19caddb899 100644 --- a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneCheckboxProperties.cs +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneCheckboxProperties.cs @@ -27,18 +27,21 @@ public PropertyPaneCheckboxProperties() /// /// Gets or Sets the label to display next to the checkbox of type . /// + /// This value is the text of the checkbox property. [JsonProperty(PropertyName = "text")] public string Text { get; set; } /// /// Gets or Sets a value indicating whether this control is enabled or not of type . /// + /// This value indicates if the control is disabled. [JsonProperty(PropertyName = "disabled")] public bool Disabled { get; set; } /// /// Gets or Sets a value indicating whether the property pane checkbox is checked or not of type . /// + /// This value indicates if the control is checked. [JsonProperty(PropertyName = "checked")] public bool Checked { get; set; } } diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupIconProperties.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupIconProperties.cs index 8184625ae2..bac6ef5b98 100644 --- a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupIconProperties.cs +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupIconProperties.cs @@ -27,6 +27,7 @@ public PropertyPaneChoiceGroupIconProperties() /// /// Gets or Sets the name of the icon to use from the Office Fabric icon set of type . /// + /// This value is the office fabric icon font name of the choice group. [JsonProperty(PropertyName = "officeFabricIconFontName")] public string OfficeFabricIconFontName { get; set; } } diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupImageSize.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupImageSize.cs index 09eee635fa..8dfd0ed6b6 100644 --- a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupImageSize.cs +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupImageSize.cs @@ -27,12 +27,14 @@ public PropertyPaneChoiceGroupImageSize() /// /// Gets or Sets the width of the image of type . /// + /// This value is the width of the choice group. [JsonProperty(PropertyName = "width")] public int Width { get; set; } /// /// Gets or Sets the height of the image of type . /// + /// This value is the height of the choice group. [JsonProperty(PropertyName = "height")] public int Height { get; set; } } diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupOption.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupOption.cs index 79f93caf17..3644f97662 100644 --- a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupOption.cs +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupOption.cs @@ -28,48 +28,56 @@ public PropertyPaneChoiceGroupOption() /// /// Gets or Sets the aria label of type . /// + /// This value is the aria label of the choice group. [JsonProperty(PropertyName = "ariaLabel")] public string AriaLabel { get; set; } /// /// Gets or Sets a value indicating whether the property pane choice group option is checked or not of type . /// + /// This value indicates whether the control is checked. [JsonProperty(PropertyName = "checked")] public bool Checked { get; set; } /// /// Gets or Sets a value indicating whether this control is enabled or not of type . /// + /// This value indicates whether the control is disabled. [JsonProperty(PropertyName = "disabled")] public bool Disabled { get; set; } /// /// Gets or Sets the Icon component props for choice field of type . /// + /// This value is the icon properties of the choice group. [JsonProperty(PropertyName = "iconProps")] public PropertyPaneChoiceGroupIconProperties IconProps { get; set; } /// /// Gets or Sets the width and height of the image in px for choice field of type . /// + /// This value is the image size of the choice group. [JsonProperty(PropertyName = "imageSize")] public PropertyPaneChoiceGroupImageSize ImageSize { get; set; } /// /// Gets or Sets the src of image for choice field of type . /// + /// This value is the image source of the choice group. [JsonProperty(PropertyName = "imageSrc")] public string ImageSrc { get; set; } /// /// Gets or Sets a key to uniquely identify this option of type . /// + /// This value is the key of the choice group. [JsonProperty(PropertyName = "key")] public string Key { get; set; } /// /// Gets or Sets text to render for this option of type . /// + /// This value is the text of the choice group. [JsonProperty(PropertyName = "text")] public string Text { get; set; } } diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupProperties.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupProperties.cs index 843615e05d..5cd17fee11 100644 --- a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupProperties.cs +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupProperties.cs @@ -33,6 +33,7 @@ public PropertyPaneChoiceGroupProperties() /// /// Gets or Sets the collection of options for this choice group of type . /// + /// This value is the icon properties of the choice group. [JsonProperty(PropertyName = "options")] public IEnumerable Options { get; set; } } diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneDropDownOption.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneDropDownOption.cs index 94428038e2..4c5ce443ef 100644 --- a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneDropDownOption.cs +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneDropDownOption.cs @@ -48,24 +48,28 @@ public enum DropDownOptionType /// /// Gets or Sets index for this option of type . /// + /// This value is the index of the drop down. [JsonProperty(PropertyName = "index")] public int Index { get; set; } /// /// Gets or Sets a key to uniquely identify this option of type . /// + /// This value is the key of the drop down. [JsonProperty(PropertyName = "key")] public string Key { get; set; } /// /// Gets or Sets text to render for this option of type . /// + /// This value is the text of the drop down. [JsonProperty(PropertyName = "text")] public string Text { get; set; } /// /// Gets or Sets the type of option. If omitted, the default is PropertyPaneDropdownMenuItemType.Normal of type . /// + /// This value is the type of the drop down. [JsonProperty(PropertyName = "type")] public DropDownOptionType Type { get; set; } } diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneDropDownProperties.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneDropDownProperties.cs index 05d6ddb33e..9f436d52a5 100644 --- a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneDropDownProperties.cs +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneDropDownProperties.cs @@ -27,48 +27,56 @@ public PropertyPaneDropDownProperties() /// /// Gets or Sets the aria label of type . /// + /// This value is the aria label of the drop down. [JsonProperty(PropertyName = "ariaLabel")] public string AriaLabel { get; set; } /// /// Gets or Sets an element's number or position in the current set of controls. Maps to native aria-posinset attribute. It starts from 1 of type . /// + /// This value is the aria position in set of the drop down. [JsonProperty(PropertyName = "ariaPositionInSet")] public int AriaPositionInSet { get; set; } /// /// Gets or Sets the number of items in the current set of controls. Maps to native aria-setsize attribute of type . /// + /// This value is the aria set size of the drop down. [JsonProperty(PropertyName = "ariaSetSize")] public int AriaSetSize { get; set; } /// /// Gets or Sets the label of type . /// + /// This value is the label of the drop down. [JsonProperty(PropertyName = "label")] public string Label { get; set; } /// /// Gets or Sets a value indicating whether this control is enabled or not of type . /// + /// This value indicates whether the property is disabled. [JsonProperty(PropertyName = "disabled")] public bool Disabled { get; set; } /// /// Gets or Sets the error message of type . /// + /// This value is the error message of the drop down. [JsonProperty(PropertyName = "errorMessage")] public string ErrorMessage { get; set; } /// /// Gets or Sets the key of the initially selected option of type . /// + /// This value is the selected key of the drop down. [JsonProperty(PropertyName = "selectedKey")] public string SelectedKey { get; set; } /// /// Gets or Sets the collection of options for this Dropdown of type . /// + /// This value is the options of the drop down. [JsonProperty(PropertyName = "options")] public IEnumerable Options { get; set; } } diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneGroup.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneGroup.cs index c8dae267ba..5e8e58c519 100644 --- a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneGroup.cs +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneGroup.cs @@ -27,24 +27,28 @@ public PropertyPaneGroup() /// /// Gets or Sets the group fields of type . /// + /// This value is the group fields of the property pane group. [JsonProperty(PropertyName = "groupFields")] public IEnumerable GroupFields { get; set; } /// /// Gets or Sets the group name of type . /// + /// This value is the group name of the property pane group. [JsonProperty(PropertyName = "groupName")] public string GroupName { get; set; } /// /// Gets or Sets a value indicating whether the PropertyPane group is collapsed or not of type . /// + /// This value indicates whether the property pane group is collapsed. [JsonProperty(PropertyName = "isCollapsed")] public bool IsCollapsed { get; set; } /// /// Gets or Sets a value indicating whether group name should be hidden of type . /// + /// This value indicates whether the property pane group is hidden. [JsonProperty(PropertyName = "isGroupNameHidden")] public bool IsGroupNameHidden { get; set; } } diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneGroupField.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneGroupField.cs index 86babdcf17..017be2bed3 100644 --- a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneGroupField.cs +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneGroupField.cs @@ -78,36 +78,35 @@ public enum FieldType /// /// Gets or Sets the type of field enum. /// + /// This value is the type of the property pane field. [JsonProperty(PropertyName = "type")] public FieldType Type { get; set; } - /// - /// Gets or Sets the group fields of type . - /// - [JsonProperty(PropertyName = "groupFields")] - public IEnumerable GroupFields { get; set; } - /// /// Gets or Sets the properties property of type . /// + /// This value is the properties of the property pane field. [JsonProperty(PropertyName = "properties")] public IPropertyPaneFieldProperties Properties { get; set; } /// /// Gets or Sets a value indicating whether this control should be focused of type . /// + /// This value indicates whether the property pane field should focus. [JsonProperty(PropertyName = "shouldFocus")] public bool ShouldFocus { get; set; } /// /// Gets or Sets the target property of type . /// + /// This value is the target property of the property pane field. [JsonProperty(PropertyName = "targetProperty")] public string TargetProperty { get; set; } /// /// Gets or Sets a value indicating whether group name should be hidden of type . /// + /// This value indicates whether the property pane field group name is hidden. [JsonProperty(PropertyName = "isGroupNameHidden")] public bool IsGroupNameHidden { get; set; } } diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneLabelProperties.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneLabelProperties.cs index 2fd6946859..52061aa706 100644 --- a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneLabelProperties.cs +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneLabelProperties.cs @@ -27,12 +27,14 @@ public PropertyPaneLabelProperties() /// /// Gets or Sets the display text for the label of type . /// + /// This value is the text of the property pane label. [JsonProperty(PropertyName = "text")] public string Text { get; set; } /// /// Gets or Sets a value indicating whether the associated form field is required or not. of type . /// + /// This value indicates whether the property pane field is required. [JsonProperty(PropertyName = "required")] public bool Required { get; set; } } diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneLinkPopupWindowProperties.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneLinkPopupWindowProperties.cs index fddb45bb90..4e26ecb825 100644 --- a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneLinkPopupWindowProperties.cs +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneLinkPopupWindowProperties.cs @@ -59,24 +59,28 @@ public enum PopupWindowPosition /// /// Gets or Sets the height of the pop up window of type . /// + /// This value is the height of the property pane popup. [JsonProperty(PropertyName = "height")] public int Height { get; set; } /// /// Gets or Sets the position of pop up window enum. /// + /// This value is the window position of the property pane popup. [JsonProperty(PropertyName = "positionWindowPosition")] public PopupWindowPosition PositionWindowPosition { get; set; } /// /// Gets or Sets the title of pop up window of type . /// + /// This value is the title of the property pane popup. [JsonProperty(PropertyName = "title")] public string Title { get; set; } /// /// Gets or Sets the width of the pop up window of type . /// + /// This value is the width of the property pane popup. [JsonProperty(PropertyName = "width")] public int Width { get; set; } } diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneLinkProperties.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneLinkProperties.cs index e48642f4bc..d25925efd4 100644 --- a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneLinkProperties.cs +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneLinkProperties.cs @@ -27,36 +27,42 @@ public PropertyPaneLinkProperties() /// /// Gets or Sets the aria label of type . /// + /// This value is the aria label of the property pane link. [JsonProperty(PropertyName = "ariaLabel")] public string AriaLabel { get; set; } /// /// Gets or Sets a value indicating whether this control is enabled or not of type . /// + /// This value indicates whether the property pane link is disabled. [JsonProperty(PropertyName = "disabled")] public bool Disabled { get; set; } /// /// Gets or Sets the location to which the link is targeted to of type . /// + /// This value is the href of the property pane link. [JsonProperty(PropertyName = "href")] public string Href { get; set; } /// /// Gets or Sets the props of pop up window. of type . /// + /// This value is the popup window properties of the property pane link. [JsonProperty(PropertyName = "popupWindowProps")] public PropertyPaneLinkPopupWindowProperties PopupWindowProps { get; set; } /// /// Gets or Sets where to display the linked resource of type . /// + /// This value is the target of the property pane link. [JsonProperty(PropertyName = "target")] public string Target { get; set; } /// /// Gets or Sets the display text for the link of type . /// + /// This value is the text of the property pane link. [JsonProperty(PropertyName = "text")] public string Text { get; set; } } diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPanePage.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPanePage.cs index 43820d8897..e258efafa1 100644 --- a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPanePage.cs +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPanePage.cs @@ -27,18 +27,21 @@ public PropertyPanePage() /// /// Gets or Sets the groups of type . /// + /// This value is the groups of the property pane page. [JsonProperty(PropertyName = "groups")] public IEnumerable Groups { get; set; } /// /// Gets or Sets a value indicating whether the groups on the PropertyPanePage are displayed as accordion or not of type . /// + /// This value indicates whether the property pane page is displayed as an accordion. [JsonProperty(PropertyName = "displayGroupsAsAccordion")] public bool DisplayGroupsAsAccordion { get; set; } /// /// Gets or Sets the header for the property pane of type . /// + /// This value is the header of the property pane page. [JsonProperty(PropertyName = "header")] public PropertyPanePageHeader Header { get; set; } } diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPanePageHeader.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPanePageHeader.cs index ed738c716f..f0f8133659 100644 --- a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPanePageHeader.cs +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPanePageHeader.cs @@ -27,6 +27,7 @@ public PropertyPanePageHeader() /// /// Gets or Sets the description of type . /// + /// This value is the description of the property pane page header. [JsonProperty(PropertyName = "description")] public string Description { get; set; } } diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneSliderProperties.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneSliderProperties.cs index faae992eb3..92cd75800d 100644 --- a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneSliderProperties.cs +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneSliderProperties.cs @@ -27,48 +27,56 @@ public PropertyPaneSliderProperties() /// /// Gets or Sets the label of type . /// + /// This value is the label of the slider. [JsonProperty(PropertyName = "label")] public string Label { get; set; } /// /// Gets or Sets the value of type . /// + /// This value is the value of the slider. [JsonProperty(PropertyName = "value")] public string Value { get; set; } /// /// Gets or Sets the aria label of type . /// + /// This value is the aria label of the slider. [JsonProperty(PropertyName = "ariaLabel")] public string AriaLabel { get; set; } /// /// Gets or Sets a value indicating whether this control is enabled or not of type . /// + /// This value indicates whether the slider is disabled. [JsonProperty(PropertyName = "disabled")] public bool Disabled { get; set; } /// /// Gets or Sets the max value of the Slider of type . /// + /// This value is the max value of the slider. [JsonProperty(PropertyName = "max")] public int Max { get; set; } /// /// Gets or Sets the min value of the Slider of type . /// + /// This value is the min value of the slider. [JsonProperty(PropertyName = "min")] public int Min { get; set; } /// /// Gets or Sets a value indicating whether to show the value on the right of the Slider of type . /// + /// This value indicates whether the value of the slider should be shown. [JsonProperty(PropertyName = "showValue")] public bool ShowValue { get; set; } /// /// Gets or Sets the difference between the two adjacent values of the Slider. Defaults to 1. of type . /// + /// This value is the step amount of the slider. [JsonProperty(PropertyName = "step")] public int Step { get; set; } } diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneTextFieldProperties.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneTextFieldProperties.cs index f93c811908..dcd84d1f0e 100644 --- a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneTextFieldProperties.cs +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneTextFieldProperties.cs @@ -27,96 +27,112 @@ public PropertyPaneTextFieldProperties() /// /// Gets or Sets the label of type . /// + /// This value is the label of the text field. [JsonProperty(PropertyName = "label")] public string Label { get; set; } /// /// Gets or Sets the value of type . /// + /// This value is the value of the text field. [JsonProperty(PropertyName = "value")] public string Value { get; set; } /// /// Gets or Sets the aria label of type . /// + /// This value is the aria label of the text field. [JsonProperty(PropertyName = "ariaLabel")] public string AriaLabel { get; set; } /// /// Gets or Sets the amount of time to wait before validating after the users stop typing in ms of type . /// + /// This value is the deferred validation time of the text field. [JsonProperty(PropertyName = "deferredValidationTime")] public int DeferredValidationTime { get; set; } /// /// Gets or Sets the description of type . /// + /// This value is the description of the text field. [JsonProperty(PropertyName = "description")] public string Description { get; set; } /// /// Gets or Sets a value indicating whether this control is enabled or not of type . /// + /// This value indicates whether the text field is disabled. [JsonProperty(PropertyName = "disabled")] public bool Disabled { get; set; } /// /// Gets or Sets the error message of type . /// + /// This value is the error message of the text field. [JsonProperty(PropertyName = "errorMessage")] public string ErrorMessage { get; set; } /// /// Gets or Sets the name used to log PropertyPaneTextField value changes for engagement tracking of type . /// + /// This value is the log name of the text field. [JsonProperty(PropertyName = "logName")] public string LogName { get; set; } /// /// Gets or Sets the maximum number of characters that the PropertyPaneTextField can have of type . /// + /// This value is the max length of the text field. [JsonProperty(PropertyName = "maxLength")] public int MaxLength { get; set; } /// /// Gets or Sets a value indicating whether or not the text field is a multiline text field of type . /// + /// This value indicates whether the text field is multiline. [JsonProperty(PropertyName = "multiline")] public bool Multiline { get; set; } /// /// Gets or Sets the placeholder text to be displayed in the text field of type . /// + /// This value is the place holder of the text field. [JsonProperty(PropertyName = "placeholder")] public string Placeholder { get; set; } /// /// Gets or Sets a value indicating whether or not the multiline text field is resizable of type . /// + /// This value indicates whether the text field is resiable. [JsonProperty(PropertyName = "resizable")] public bool Resizable { get; set; } /// /// Gets or Sets the value that specifies the visible height of a text area(multiline text TextField), in lines.maximum number of characters that the PropertyPaneTextField can have of type . /// + /// This value is the number of rows of the text field. [JsonProperty(PropertyName = "rows")] public int Rows { get; set; } /// /// Gets or Sets a value indicating whether or not the text field is underlined of type . /// + /// This value indicates whether the text field is underlined. [JsonProperty(PropertyName = "underlined")] public bool Underlined { get; set; } /// /// Gets or Sets a value indicating whether to run validation when the PropertyPaneTextField is focused of type . /// + /// This value indicates whether the text field is validated when gaining focus. [JsonProperty(PropertyName = "validateOnFocusIn")] public bool ValidateOnFocusIn { get; set; } /// /// Gets or Sets a value indicating whether to run validation when the PropertyPaneTextField is out of focus or on blur of type . /// + /// This value indicates whether the text field is validated when losing focus. [JsonProperty(PropertyName = "validateOnFocusOut")] public bool ValidateOnFocusOut { get; set; } } diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneToggleProperties.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneToggleProperties.cs index 29b4ce6185..4ae0f509bf 100644 --- a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneToggleProperties.cs +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneToggleProperties.cs @@ -27,54 +27,63 @@ public PropertyPaneToggleProperties() /// /// Gets or Sets the aria label of type . /// + /// This value is the aria label of the toggle field. [JsonProperty(PropertyName = "ariaLabel")] public string AriaLabel { get; set; } /// /// Gets or Sets the label of type . /// + /// This value is the label of the toggle field. [JsonProperty(PropertyName = "label")] public string Label { get; set; } /// /// Gets or Sets a value indicating whether this control is enabled or not of type . /// + /// This value indicates whether the toggle field is disabled. [JsonProperty(PropertyName = "disabled")] public bool Disabled { get; set; } /// /// Gets or Sets a value indicating whether the property pane checkbox is checked or not of type . /// + /// This value indicates whether the toggle field is checked. [JsonProperty(PropertyName = "checked")] public bool Checked { get; set; } /// /// Gets or Sets a key to uniquely identify the field of type . /// + /// This value is the key of the toggle field. [JsonProperty(PropertyName = "key")] public string Key { get; set; } /// /// Gets or Sets text to display when toggle is OFF of type . /// + /// This value is the label of the toggle field when off. [JsonProperty(PropertyName = "offText")] public string OffText { get; set; } /// /// Gets or Sets text to display when toggle is ON of type . /// + /// This value is the label of the toggle field when on. [JsonProperty(PropertyName = "onText")] public string OnText { get; set; } /// /// Gets or Sets text for screen-reader to announce when toggle is OFF of type . /// + /// This value is the aria label of the toggle field when off. [JsonProperty(PropertyName = "offAriaLabel")] public string OffAriaLabel { get; set; } /// /// Gets or Sets text for screen-reader to announce when toggle is ON of type . /// + /// This value is the aria label of the toggle field when on. [JsonProperty(PropertyName = "onAriaLabel")] public string OnAriaLabel { get; set; } } diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/QuickViewBody.cs b/libraries/Microsoft.Bot.Schema/SharePoint/QuickViewBody.cs deleted file mode 100644 index e154a2c182..0000000000 --- a/libraries/Microsoft.Bot.Schema/SharePoint/QuickViewBody.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Text; -using Newtonsoft.Json; - -namespace Microsoft.Bot.Schema.SharePoint -{ - /// - /// Initializes a new instance of the class. - /// - public class QuickViewBody - { - /// - /// Gets or Sets the type of type . - /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } - - /// - /// Gets or Sets a value indicating whether the separator exists. - /// - [JsonProperty(PropertyName = "separator")] - public bool Separator { get; set; } - - /// - /// Gets or Sets the items of type . - /// - [JsonProperty(PropertyName = "items")] - public IEnumerable Items { get; set; } - } -} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/QuickViewData.cs b/libraries/Microsoft.Bot.Schema/SharePoint/QuickViewData.cs index 28ba896391..e77b074993 100644 --- a/libraries/Microsoft.Bot.Schema/SharePoint/QuickViewData.cs +++ b/libraries/Microsoft.Bot.Schema/SharePoint/QuickViewData.cs @@ -27,12 +27,14 @@ public QuickViewData() /// /// Gets or Sets the title of type . /// + /// This value is the title of the quick view data. [JsonProperty(PropertyName = "title")] public string Title { get; set; } /// /// Gets or Sets the description of type . /// + /// This value is the description of the quick view data. [JsonProperty(PropertyName = "description")] public string Description { get; set; } } diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/QuickViewItem.cs b/libraries/Microsoft.Bot.Schema/SharePoint/QuickViewItem.cs deleted file mode 100644 index 600d493b94..0000000000 --- a/libraries/Microsoft.Bot.Schema/SharePoint/QuickViewItem.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Text; -using Newtonsoft.Json; - -namespace Microsoft.Bot.Schema.SharePoint -{ - /// - /// Initializes a new instance of the class. - /// - public class QuickViewItem - { - /// - /// Gets or Sets the type of type . - /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } - - /// - /// Gets or Sets a value indicating whether the separator exists. - /// - [JsonProperty(PropertyName = "separator")] - public bool Separator { get; set; } - - /// - /// Gets or Sets the items of type . - /// - [JsonProperty(PropertyName = "items")] - public IEnumerable Items { get; set; } - } -} diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/QuickViewTemplate.cs b/libraries/Microsoft.Bot.Schema/SharePoint/QuickViewTemplate.cs deleted file mode 100644 index 1d0c39b975..0000000000 --- a/libraries/Microsoft.Bot.Schema/SharePoint/QuickViewTemplate.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Text; -using Newtonsoft.Json; - -namespace Microsoft.Bot.Schema.SharePoint -{ - /// - /// Initializes a new instance of the class. - /// - public class QuickViewTemplate - { - /// - /// Gets or Sets the schema of type . - /// - [JsonProperty(PropertyName = "$scehma")] - public string Schema { get; set; } - - /// - /// Gets or Sets the type of type . - /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } - - /// - /// Gets or Sets the version of type . - /// - [JsonProperty(PropertyName = "version")] - public string Version { get; set; } - - /// - /// Gets or Sets the body of type . - /// - [JsonProperty(PropertyName = "body")] - public QuickViewBody Body { get; set; } - } -} From 59899f67c9630fefcc8fa681ebd5ee0cd2b0530b Mon Sep 17 00:00:00 2001 From: Graham McMynn Date: Tue, 4 Apr 2023 10:43:19 -0700 Subject: [PATCH 5/5] Adding value comment to PropertyPaneChoiceGroupProperties --- .../SharePoint/PropertyPaneChoiceGroupProperties.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupProperties.cs b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupProperties.cs index 5cd17fee11..a0b81a9b3b 100644 --- a/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupProperties.cs +++ b/libraries/Microsoft.Bot.Schema/SharePoint/PropertyPaneChoiceGroupProperties.cs @@ -27,6 +27,7 @@ public PropertyPaneChoiceGroupProperties() /// /// Gets or Sets the label of type . /// + /// This value is the label of the choice group. [JsonProperty(PropertyName = "label")] public string Label { get; set; }