2023-09-03 22:43:50 +00:00
|
|
|
using BotSharp.Abstraction.Repositories.Models;
|
2023-08-26 04:41:01 +00:00
|
|
|
using BotSharp.Abstraction.Repositories.Records;
|
2023-09-03 04:11:53 +00:00
|
|
|
using BotSharp.Abstraction.Routing.Models;
|
2023-08-26 04:41:01 +00:00
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
namespace BotSharp.Abstraction.Repositories;
|
2023-08-10 04:53:22 +00:00
|
|
|
|
|
|
|
|
public interface IBotSharpRepository
|
|
|
|
|
{
|
|
|
|
|
IQueryable<UserRecord> User { get; }
|
|
|
|
|
IQueryable<AgentRecord> Agent { get; }
|
|
|
|
|
IQueryable<UserAgentRecord> UserAgent { get; }
|
|
|
|
|
IQueryable<ConversationRecord> Conversation { get; }
|
2023-09-02 22:41:58 +00:00
|
|
|
IQueryable<RoutingItemRecord> RoutingItem { get; }
|
|
|
|
|
IQueryable<RoutingProfileRecord> RoutingProfile { get; }
|
|
|
|
|
|
2023-08-10 04:53:22 +00:00
|
|
|
int Transaction<TTableInterface>(Action action);
|
|
|
|
|
void Add<TTableInterface>(object entity);
|
2023-09-02 05:10:46 +00:00
|
|
|
|
|
|
|
|
UserRecord GetUserByEmail(string email);
|
|
|
|
|
void CreateUser(UserRecord user);
|
|
|
|
|
void UpdateAgent(AgentRecord agent);
|
2023-09-03 04:11:53 +00:00
|
|
|
|
|
|
|
|
List<RoutingItemRecord> CreateRoutingItems(List<RoutingItemRecord> routingItems);
|
|
|
|
|
List<RoutingProfileRecord> CreateRoutingProfiles(List<RoutingProfileRecord> profiles);
|
|
|
|
|
void DeleteRoutingItems();
|
|
|
|
|
void DeleteRoutingProfiles();
|
2023-09-03 04:54:22 +00:00
|
|
|
|
2023-09-03 19:32:12 +00:00
|
|
|
AgentRecord GetAgent(string agentId);
|
2023-09-03 04:54:22 +00:00
|
|
|
List<string> GetAgentResponses(string agentId);
|
2023-09-03 22:43:50 +00:00
|
|
|
|
|
|
|
|
void CreateNewConversation(ConversationRecord conversation);
|
|
|
|
|
string GetConversationDialog(string conversationId);
|
|
|
|
|
void UpdateConversationDialog(string conversationId, string dialogs);
|
|
|
|
|
|
|
|
|
|
List<KeyValueModel> GetConversationState(string conversationId);
|
|
|
|
|
void UpdateConversationState(string conversationId, List<KeyValueModel> state);
|
|
|
|
|
|
|
|
|
|
ConversationRecord GetConversation(string conversationId);
|
|
|
|
|
List<ConversationRecord> GetConversations(string userId);
|
2023-08-10 04:53:22 +00:00
|
|
|
}
|