-
Notifications
You must be signed in to change notification settings - Fork 485
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alex Terentiev
committed
Oct 16, 2023
1 parent
ff04905
commit eff37be
Showing
7 changed files
with
391 additions
and
11,755 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
libraries/Microsoft.Bot.Schema/SharePoint/BaseHandleActionResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
|
||
namespace Microsoft.Bot.Schema.SharePoint | ||
{ | ||
/// <summary> | ||
/// Adaptive Card Extension View response type. | ||
/// </summary> | ||
[JsonConverter(typeof(StringEnumConverter))] | ||
public enum ViewResponseType | ||
{ | ||
/// <summary> | ||
/// Render card view. | ||
/// </summary> | ||
Card, | ||
|
||
/// <summary> | ||
/// Render quick view. | ||
/// </summary> | ||
QuickView, | ||
|
||
/// <summary> | ||
/// No operation. | ||
/// </summary> | ||
NoOp | ||
} | ||
|
||
/// <summary> | ||
/// Response returned when handling a client-side action on an Adaptive Card Extension. | ||
/// </summary> | ||
public abstract class BaseHandleActionResponse | ||
{ | ||
/// <summary> | ||
/// Gets the response type. | ||
/// </summary> | ||
/// <value>Response type.</value> | ||
[JsonProperty(PropertyName = "responseType")] | ||
public abstract ViewResponseType ResponseType { get; } | ||
|
||
/// <summary> | ||
/// Gets or sets render arguments. | ||
/// </summary> | ||
/// <value>Render arguments.</value> | ||
[JsonProperty(PropertyName = "renderArguments")] | ||
public object RenderArguments { get; set; } | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
libraries/Microsoft.Bot.Schema/SharePoint/CardViewHandleActionResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
{ | ||
/// <summary> | ||
/// Adaptive Card Extension Client-side action response to render card view. | ||
/// </summary> | ||
public class CardViewHandleActionResponse : BaseHandleActionResponse | ||
{ | ||
/// <summary> | ||
/// Gets the response type. | ||
/// </summary> | ||
/// <value>Card.</value> | ||
[JsonProperty(PropertyName = "responseType")] | ||
public override ViewResponseType ResponseType => ViewResponseType.Card; | ||
|
||
/// <summary> | ||
/// Gets or sets card view render arguments. | ||
/// </summary> | ||
/// <value>Card view render arguments.</value> | ||
[JsonProperty(PropertyName = "renderArguments")] | ||
public new GetCardViewResponse RenderArguments { get; set; } | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
libraries/Microsoft.Bot.Schema/SharePoint/NoOpHandleActionResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
{ | ||
/// <summary> | ||
/// Adaptive Card Extension Client-side action no-op response. | ||
/// </summary> | ||
public class NoOpHandleActionResponse : BaseHandleActionResponse | ||
{ | ||
/// <summary> | ||
/// Gets the response type. | ||
/// </summary> | ||
/// <value>Card.</value> | ||
[JsonProperty(PropertyName = "responseType")] | ||
public override ViewResponseType ResponseType => ViewResponseType.NoOp; | ||
|
||
/// <summary> | ||
/// Gets or sets card view render arguments. | ||
/// </summary> | ||
/// <value>Card view render arguments.</value> | ||
[JsonProperty(PropertyName = "renderArguments")] | ||
public new object RenderArguments | ||
{ | ||
get => null; | ||
set { } | ||
} | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
libraries/Microsoft.Bot.Schema/SharePoint/QuickViewHandleActionResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
{ | ||
/// <summary> | ||
/// Adaptive Card Extension Client-side action response to render quick view. | ||
/// </summary> | ||
public class QuickViewHandleActionResponse : BaseHandleActionResponse | ||
{ | ||
/// <summary> | ||
/// Gets the response type. | ||
/// </summary> | ||
/// <value>Card.</value> | ||
[JsonProperty(PropertyName = "responseType")] | ||
public override ViewResponseType ResponseType => ViewResponseType.QuickView; | ||
|
||
/// <summary> | ||
/// Gets or sets card view render arguments. | ||
/// </summary> | ||
/// <value>Card view render arguments.</value> | ||
[JsonProperty(PropertyName = "renderArguments")] | ||
public new GetQuickViewResponse RenderArguments { get; set; } | ||
} | ||
} |
Oops, something went wrong.