using System;
using System.Threading;
using xAiModels.Models.Dtos;
using System.Threading.Tasks;
using System.Collections.Generic;
namespace xAiModels.Interfaces
{
///
/// All Data Manipulation Requirements ...
///
public interface IXAiDataProvider
{
//
#region Getters ...
///
/// Retrieve Specified Project ...
///
///
///
///
///
///
Task GetProject(
Guid id,
bool fillConversations = false,
bool fillConversationMessages = false,
CancellationToken cancellationToken = default
);
///
/// Retrieve Specified Conversation ...
///
///
///
///
///
Task GetConversation(
Guid id,
bool fillMessages = false,
CancellationToken cancellationToken = default
);
#endregion
//
#region Loaders ...
///
/// Load Projects List of Specified Owner ...
///
///
///
///
///
///
///
Task> LoadProjects(
string ownerId,
string connectionId = null,
bool fillConversations = false,
bool fillConversationMessages = false,
CancellationToken cancellationToken = default
);
///
/// Load List of Conversations for Specified Project ...
///
///
///
///
///
///
Task> LoadConversations(
Guid projectId,
bool fillMessages = false,
string connectionId = null,
CancellationToken cancellationToken = default
);
///
/// Load Messages of Specified Conversation ...
///
///
///
///
Task> LoadMessages(
Guid conversationId,
CancellationToken cancellationToken = default
);
#endregion
//
#region Enrichers ...
///
/// Enrich Specified Item ...
///
///
///
///
///
///
Task Enrich(
XAiProjectDto source,
bool fillConversations = false,
bool fillConversationMessages = false,
CancellationToken cancellationToken = default
);
///
/// Enrich Specified Items ...
///
///
///
///
///
///
Task> EnrichRange(
IEnumerable sources,
bool fillConversations = false,
bool fillConversationMessages = false,
CancellationToken cancellationToken = default
);
///
/// Enrich Specified Item ...
///
///
///
///
///
Task Enrich(
XAiConversationDto source,
bool fillMessages = false,
CancellationToken cancellationToken = default
);
///
/// Enrich Specified Items ...
///
///
///
///
///
Task> EnrichRange(
IEnumerable sources,
bool fillMessages = false,
CancellationToken cancellationToken = default
);
///
/// Enrich Specified Item ...
///
///
///
///
Task Enrich(
XAiMessageDto source,
CancellationToken cancellationToken = default
);
///
/// Enrich Specified Items ...
///
///
///
///
Task> EnrichRange(
IEnumerable sources,
CancellationToken cancellationToken = default
);
#endregion
//
#region Defaults ...
///
/// Retrieve Default Project of Specified Owner ...
/// Create it if not Handled ...
///
///
///
///
///
Task GetDefaultProject(
string ownerId,
string connectionId = null,
CancellationToken cancellationToken = default
);
///
/// Retrieve Default Conversation of Specified Owner ...
/// Create it if not Handled ...
///
///
///
///
///
///
Task GetDefaultConversation(
string ownerId,
Guid projectId,
string connectionId = null,
CancellationToken cancellationToken = default
);
#endregion
//
#region Creator/Adders ...
///
/// Create Project ...
///
///
///
///
///
///
Task CreateProject(
string ownerId,
XAiProjectDto item = null,
string connectionId = null,
CancellationToken cancellationToken = default
);
///
/// Create Conversation ...
///
///
///
///
///
///
Task CreateConversation(
Guid projectId,
XAiConversationDto item = null,
string connectionId = null,
CancellationToken cancellationToken = default
);
///
/// Add Message ...
///
///
///
///
///
///
Task AddMessage(
Guid conversationId,
XAiMessageDto item,
string connectionId = null,
CancellationToken cancellationToken = default
);
#endregion
}
}