using FlatRender.IdentitySvc.Domain.Entities; using FlatRender.IdentitySvc.Models.Requests; using FlatRender.IdentitySvc.Models.Responses; namespace FlatRender.IdentitySvc.Application.Services.Interfaces; public interface ITenantService { Task> ListAsync(int page, int pageSize); Task CreateAsync(CreateTenantRequest request); Task GetByIdAsync(Guid tenantId); Task GetBySlugAsync(string slug); Task UpdateAsync(Guid tenantId, UpdateTenantRequest request); Task GetBrandingAsync(Guid tenantId); Task UpsertBrandingAsync(Guid tenantId, TenantBrandingRequest request); Task StartDomainVerificationAsync(Guid tenantId, string domain, string method); Task> GetUsageAsync(Guid tenantId, DateOnly from, DateOnly to); // API Keys Task> GetApiKeysAsync(Guid tenantId); Task CreateApiKeyAsync(Guid tenantId, Guid createdByUserId, CreateApiKeyRequest request); Task RevokeApiKeyAsync(Guid tenantId, Guid apiKeyId, string? reason); Task ValidateApiKeyAsync(string keyPrefix, string keyHash, string? ipAddress); // Webhooks Task> GetWebhooksAsync(Guid tenantId); Task CreateWebhookAsync(Guid tenantId, CreateWebhookRequest request); Task DeleteWebhookAsync(Guid tenantId, Guid webhookId); Task> GetWebhookDeliveriesAsync(Guid tenantId, Guid webhookId); }