-
Notifications
You must be signed in to change notification settings - Fork 486
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support Bot new invoke type: config (#6632)
* Support bot new invoke type: config * address comments --------- Co-authored-by: Ying Du <yingdu@microsoft.com>
- Loading branch information
1 parent
850944e
commit 18524da
Showing
14 changed files
with
431 additions
and
0 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
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,43 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
using Newtonsoft.Json; | ||
|
||
namespace Microsoft.Bot.Schema.Teams | ||
{ | ||
/// <summary> | ||
/// Specifies bot config auth, including type and suggestedActions. | ||
/// </summary> | ||
public partial class BotConfigAuth | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="BotConfigAuth"/> class. | ||
/// </summary> | ||
public BotConfigAuth() | ||
{ | ||
CustomInit(); | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets type of bot config auth. | ||
/// </summary> | ||
/// <value> | ||
/// The type of bot config auth. | ||
/// </value> | ||
[JsonProperty(PropertyName = "type")] | ||
public string Type { get; set; } = "auth"; | ||
|
||
/// <summary> | ||
/// Gets or sets suggested actions. | ||
/// </summary> | ||
/// <value> | ||
/// The suggested actions of bot config auth. | ||
/// </value> | ||
[JsonProperty(PropertyName = "suggestedActions")] | ||
public SuggestedActions SuggestedActions { get; set; } | ||
|
||
/// <summary> | ||
/// An initialization method that performs custom operations like setting defaults. | ||
/// </summary> | ||
partial void CustomInit(); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
libraries/Microsoft.Bot.Schema/Teams/ConfigAuthResponse.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,24 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
namespace Microsoft.Bot.Schema.Teams | ||
{ | ||
/// <summary> | ||
/// Envelope for Config Auth Response. | ||
/// </summary> | ||
public partial class ConfigAuthResponse : ConfigResponse<BotConfigAuth> | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="ConfigAuthResponse"/> class. | ||
/// </summary> | ||
public ConfigAuthResponse() | ||
{ | ||
CustomInit(); | ||
} | ||
|
||
/// <summary> | ||
/// An initialization method that performs custom operations like setting defaults. | ||
/// </summary> | ||
partial void CustomInit(); | ||
} | ||
} |
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,45 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
namespace Microsoft.Bot.Schema.Teams | ||
{ | ||
using Newtonsoft.Json; | ||
|
||
/// <summary> | ||
/// Envelope for Config Response Payload. | ||
/// </summary> | ||
/// <typeparam name="T">The first generic type parameter.</typeparam>. | ||
public partial class ConfigResponse<T> : ConfigResponseBase | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="ConfigResponse{T}"/> class. | ||
/// </summary> | ||
public ConfigResponse() | ||
: base("config") | ||
{ | ||
CustomInit(); | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets the response to the config message. | ||
/// Possible values for the config type include: 'auth'or 'task'. | ||
/// </summary> | ||
/// <value> | ||
/// Response to a config request. | ||
/// </value> | ||
[JsonProperty(PropertyName = "config")] | ||
public T Config { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets response cache Info. | ||
/// </summary> | ||
/// <value> Value of cache info. </value> | ||
[JsonProperty(PropertyName = "cacheInfo")] | ||
public CacheInfo CacheInfo { get; set; } | ||
|
||
/// <summary> | ||
/// An initialization method that performs custom operations like setting defaults. | ||
/// </summary> | ||
partial void CustomInit(); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
libraries/Microsoft.Bot.Schema/Teams/ConfigResponseBase.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,36 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
using Newtonsoft.Json; | ||
|
||
namespace Microsoft.Bot.Schema.Teams | ||
{ | ||
/// <summary> | ||
/// Specifies Invoke response base including response type. | ||
/// </summary> | ||
public partial class ConfigResponseBase | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="ConfigResponseBase"/> class. | ||
/// </summary> | ||
protected ConfigResponseBase() | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="ConfigResponseBase"/> class. | ||
/// </summary> | ||
/// <param name="responseType"> response type for invoke.</param> | ||
protected ConfigResponseBase(string responseType) | ||
{ | ||
ResponseType = responseType; | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets response type invoke request. | ||
/// </summary> | ||
/// <value> Invoke request response type.</value> | ||
[JsonProperty("responseType")] | ||
public string ResponseType { get; set; } | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
libraries/Microsoft.Bot.Schema/Teams/ConfigTaskResponse.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,24 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
namespace Microsoft.Bot.Schema.Teams | ||
{ | ||
/// <summary> | ||
/// Envelope for Config Task Response. | ||
/// </summary> | ||
public partial class ConfigTaskResponse : ConfigResponse<TaskModuleResponseBase> | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="ConfigTaskResponse"/> class. | ||
/// </summary> | ||
public ConfigTaskResponse() | ||
{ | ||
CustomInit(); | ||
} | ||
|
||
/// <summary> | ||
/// An initialization method that performs custom operations like setting defaults. | ||
/// </summary> | ||
partial void CustomInit(); | ||
} | ||
} |
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
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
Oops, something went wrong.