1
1
using Microsoft . Bot . Connector ;
2
- using System ;
3
2
using System . Collections . Generic ;
4
3
using Underscore . Bot . Models ;
5
4
6
5
namespace Underscore . Bot . MessageRouting . DataStore
7
6
{
8
7
/// <summary>
9
- /// Defines the type of engagement :
10
- /// - None: No engagement
8
+ /// Defines the type of the connection :
9
+ /// - None: No connection
11
10
/// - Client: E.g. a customer
12
11
/// - Owner: E.g. a customer service agent
13
12
/// - Any: Either a client or an owner
14
13
/// </summary>
15
- public enum EngagementProfile
14
+ public enum ConnectionProfile
16
15
{
17
16
None ,
18
17
Client ,
@@ -37,7 +36,7 @@ public interface IRoutingDataManager
37
36
/// </summary>
38
37
/// <param name="newParty">The new party to add.</param>
39
38
/// <param name="isUser">If true, will try to add the party to the list of users.
40
- /// If false, will try to add it to the list of bot identities.</param>
39
+ /// If false, will try to add it to the list of bot identities. True by default. </param>
41
40
/// <returns>True, if the given party was added. False otherwise (was null or already stored).</returns>
42
41
bool AddParty ( Party newParty , bool isUser = true ) ;
43
42
@@ -98,38 +97,38 @@ bool AddParty(string serviceUrl, string channelId,
98
97
bool RemovePendingRequest ( Party party ) ;
99
98
100
99
/// <summary>
101
- /// Checks if the given party is engaged in a 1:1 conversation as defined by the engagement
102
- /// profile (e.g. as a customer, as an agent or either one).
100
+ /// Checks if the given party is connected in a 1:1 conversation as defined by
101
+ /// the connection profile (e.g. as a customer, as an agent or either one).
103
102
/// </summary>
104
103
/// <param name="party">The party to check.</param>
105
- /// <param name="engagementProfile ">Defines whether to look for clients, owners or both.</param>
106
- /// <returns>True, if the party is engaged as defined by the given engagement profile.
104
+ /// <param name="connectionProfile ">Defines whether to look for clients, owners or both.</param>
105
+ /// <returns>True, if the party is connected as defined by the given connection profile.
107
106
/// False otherwise.</returns>
108
- bool IsEngaged ( Party party , EngagementProfile engagementProfile ) ;
107
+ bool IsConnected ( Party party , ConnectionProfile connectionProfile ) ;
109
108
110
109
/// <summary>
111
110
/// Resolves the given party's counterpart in a 1:1 conversation.
112
111
/// </summary>
113
112
/// <param name="partyWhoseCounterpartToFind">The party whose counterpart to resolve.</param>
114
113
/// <returns>The counterpart or null, if not found.</returns>
115
- Party GetEngagedCounterpart ( Party partyWhoseCounterpartToFind ) ;
114
+ Party GetConnectedCounterpart ( Party partyWhoseCounterpartToFind ) ;
116
115
117
116
/// <summary>
118
- /// Creates a new engagement between the given parties. The method also clears the pending
117
+ /// Creates a new connection between the given parties. The method also clears the pending
119
118
/// request of the client party, if one exists.
120
119
/// </summary>
121
120
/// <param name="conversationOwnerParty">The conversation owner party.</param>
122
121
/// <param name="conversationClientParty">The conversation client (customer) party.</param>
123
- /// <returns>The result of the operation. The expected result type, when successful, is EngagementAdded .</returns>
124
- MessageRouterResult AddEngagementAndClearPendingRequest ( Party conversationOwnerParty , Party conversationClientParty ) ;
122
+ /// <returns>The result of the operation. The expected result type, when successful, is Connected .</returns>
123
+ MessageRouterResult ConnectAndClearPendingRequest ( Party conversationOwnerParty , Party conversationClientParty ) ;
125
124
126
125
/// <summary>
127
- /// Removes an engagement (s) of the given party i.e. ends the 1:1 conversations.
126
+ /// Removes connection (s) of the given party i.e. ends the 1:1 conversations.
128
127
/// </summary>
129
- /// <param name="party">The party whose engagements to remove.</param>
130
- /// <param name="engagementProfile ">The engagement profile of the party (owner/client/either).</param>
131
- /// <returns>A list of operation results. The expected result types, when successful, are EngagementRemoved .</returns>
132
- IList < MessageRouterResult > RemoveEngagement ( Party party , EngagementProfile engagementProfile ) ;
128
+ /// <param name="party">The party whose connections to remove.</param>
129
+ /// <param name="connectionProfile ">The connection profile of the party (owner/client/either).</param>
130
+ /// <returns>A list of operation results. The expected result types, when successful, are Disconnected .</returns>
131
+ IList < MessageRouterResult > Disconnect ( Party party , ConnectionProfile connectionProfile ) ;
133
132
134
133
/// <summary>
135
134
/// Deletes all existing routing data permanently.
@@ -180,12 +179,12 @@ bool AddParty(string serviceUrl, string channelId,
180
179
Party FindBotPartyByChannelAndConversation ( string channelId , ConversationAccount conversationAccount ) ;
181
180
182
181
/// <summary>
183
- /// Tries to find a party engaged in a conversation.
182
+ /// Tries to find a party connected in a conversation.
184
183
/// </summary>
185
184
/// <param name="channelId">The channel ID.</param>
186
185
/// <param name="channelAccount">The channel account.</param>
187
186
/// <returns>The party matching the given details or null if not found.</returns>
188
- Party FindEngagedPartyByChannel ( string channelId , ChannelAccount channelAccount ) ;
187
+ Party FindConnectedPartyByChannel ( string channelId , ChannelAccount channelAccount ) ;
189
188
190
189
/// <summary>
191
190
/// Finds the parties from the given list that match the channel account (and ID) of the given party.
@@ -198,9 +197,9 @@ bool AddParty(string serviceUrl, string channelId,
198
197
199
198
#region Methods for debugging
200
199
#if DEBUG
201
- /// <returns>The engagements (parties in conversation) as a string.
202
- /// Will return an empty string, if no engagements exist.</returns>
203
- string EngagementsAsString ( ) ;
200
+ /// <returns>The connections (parties in conversation) as a string.
201
+ /// Will return an empty string, if no connections exist.</returns>
202
+ string ConnectionsToString ( ) ;
204
203
205
204
string GetLastMessageRouterResults ( ) ;
206
205
0 commit comments