using ColaFlow.Modules.Mcp.Application.DTOs;
namespace ColaFlow.Modules.Mcp.Application.Services;
///
/// Service interface for MCP API Key management
///
public interface IMcpApiKeyService
{
///
/// Create a new API Key
///
Task CreateAsync(CreateApiKeyRequest request, CancellationToken cancellationToken = default);
///
/// Validate an API Key
///
Task ValidateAsync(string plainKey, string? ipAddress = null, CancellationToken cancellationToken = default);
///
/// Get API Key by ID
///
Task GetByIdAsync(Guid id, Guid tenantId, CancellationToken cancellationToken = default);
///
/// Get all API Keys for a tenant
///
Task> GetByTenantIdAsync(Guid tenantId, CancellationToken cancellationToken = default);
///
/// Get all API Keys for a user
///
Task> GetByUserIdAsync(Guid userId, Guid tenantId, CancellationToken cancellationToken = default);
///
/// Update API Key metadata
///
Task UpdateMetadataAsync(Guid id, Guid tenantId, UpdateApiKeyMetadataRequest request, CancellationToken cancellationToken = default);
///
/// Update API Key permissions
///
Task UpdatePermissionsAsync(Guid id, Guid tenantId, UpdateApiKeyPermissionsRequest request, CancellationToken cancellationToken = default);
///
/// Revoke an API Key
///
Task RevokeAsync(Guid id, Guid tenantId, Guid revokedBy, CancellationToken cancellationToken = default);
}