something
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
using LctMonolith.Services.Models;
|
||||
|
||||
namespace LctMonolith.Services;
|
||||
|
||||
public interface IAnalyticsService
|
||||
{
|
||||
Task<AnalyticsSummary> GetSummaryAsync(CancellationToken ct = default);
|
||||
}
|
||||
using LctMonolith.Services.Models;
|
||||
|
||||
namespace LctMonolith.Services;
|
||||
|
||||
public interface IAnalyticsService
|
||||
{
|
||||
Task<AnalyticsSummary> GetSummaryAsync(CancellationToken ct = default);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using LctMonolith.Models.Database;
|
||||
|
||||
namespace LctMonolith.Services.Interfaces;
|
||||
|
||||
public interface IDialogueService
|
||||
{
|
||||
Task<Dialogue?> GetDialogueByMissionIdAsync(Guid missionId);
|
||||
Task<Dialogue> CreateDialogueAsync(Dialogue dialogue);
|
||||
Task<DialogueMessage?> GetDialogueMessageByIdAsync(Guid messageId);
|
||||
Task<IEnumerable<DialogueMessageResponseOption>> GetResponseOptionsAsync(Guid messageId);
|
||||
Task<DialogueMessage?> ProcessDialogueResponseAsync(Guid messageId, Guid responseOptionId, Guid playerId);
|
||||
}
|
||||
using LctMonolith.Models.Database;
|
||||
|
||||
namespace LctMonolith.Services.Interfaces;
|
||||
|
||||
public interface IDialogueService
|
||||
{
|
||||
Task<Dialogue?> GetDialogueByMissionIdAsync(Guid missionId);
|
||||
Task<Dialogue> CreateDialogueAsync(Dialogue dialogue);
|
||||
Task<DialogueMessage?> GetDialogueMessageByIdAsync(Guid messageId);
|
||||
Task<IEnumerable<DialogueMessageResponseOption>> GetResponseOptionsAsync(Guid messageId);
|
||||
Task<DialogueMessage?> ProcessDialogueResponseAsync(Guid messageId, Guid responseOptionId, Guid playerId);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
namespace LctMonolith.Services.Interfaces;
|
||||
|
||||
public interface IFileStorageService
|
||||
{
|
||||
Task<string> UploadAsync(Stream content, string contentType, string keyPrefix, CancellationToken ct = default);
|
||||
Task DeleteAsync(string key, CancellationToken ct = default);
|
||||
Task<string> GetPresignedUrlAsync(string key, TimeSpan? expires = null, CancellationToken ct = default);
|
||||
}
|
||||
namespace LctMonolith.Services.Interfaces;
|
||||
|
||||
public interface IFileStorageService
|
||||
{
|
||||
Task<string> UploadAsync(Stream content, string contentType, string keyPrefix, CancellationToken ct = default);
|
||||
Task DeleteAsync(string key, CancellationToken ct = default);
|
||||
Task<string> GetPresignedUrlAsync(string key, TimeSpan? expires = null, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using LctMonolith.Models.Database;
|
||||
|
||||
namespace LctMonolith.Services.Contracts;
|
||||
|
||||
public interface IInventoryService
|
||||
{
|
||||
Task<IEnumerable<UserInventoryItem>> GetStoreInventoryAsync(Guid userId, CancellationToken ct = default);
|
||||
}
|
||||
using LctMonolith.Models.Database;
|
||||
|
||||
namespace LctMonolith.Services.Contracts;
|
||||
|
||||
public interface IInventoryService
|
||||
{
|
||||
Task<IEnumerable<UserInventoryItem>> GetStoreInventoryAsync(Guid userId, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
using LctMonolith.Models.Database;
|
||||
|
||||
namespace LctMonolith.Services.Interfaces;
|
||||
|
||||
public interface IMissionCategoryService
|
||||
{
|
||||
// CRUD should be enough
|
||||
Task<MissionCategory?> GetCategoryByIdAsync(Guid categoryId);
|
||||
Task<MissionCategory?> GetCategoryByTitleAsync(string title);
|
||||
Task<IEnumerable<MissionCategory>> GetAllCategoriesAsync();
|
||||
Task<MissionCategory> CreateCategoryAsync(MissionCategory category);
|
||||
Task<MissionCategory> UpdateCategoryAsync(MissionCategory category);
|
||||
Task<bool> DeleteCategoryAsync(Guid categoryId);
|
||||
}
|
||||
using LctMonolith.Models.Database;
|
||||
|
||||
namespace LctMonolith.Services.Interfaces;
|
||||
|
||||
public interface IMissionCategoryService
|
||||
{
|
||||
// CRUD should be enough
|
||||
Task<MissionCategory?> GetCategoryByIdAsync(Guid categoryId);
|
||||
Task<MissionCategory?> GetCategoryByTitleAsync(string title);
|
||||
Task<IEnumerable<MissionCategory>> GetAllCategoriesAsync();
|
||||
Task<MissionCategory> CreateCategoryAsync(MissionCategory category);
|
||||
Task<MissionCategory> UpdateCategoryAsync(MissionCategory category);
|
||||
Task<bool> DeleteCategoryAsync(Guid categoryId);
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
using LctMonolith.Models.Database;
|
||||
using LctMonolith.Models.DTO;
|
||||
|
||||
namespace LctMonolith.Services.Interfaces;
|
||||
|
||||
public interface IMissionService
|
||||
{
|
||||
Task<Mission?> GetMissionByIdAsync(Guid missionId);
|
||||
Task<IEnumerable<Mission>> GetMissionsByCategoryAsync(Guid categoryId);
|
||||
Task<IEnumerable<Mission>> GetAvailableMissionsForPlayerAsync(Guid playerId);
|
||||
Task<IEnumerable<Mission>> GetChildMissionsAsync(Guid parentMissionId);
|
||||
Task<Mission> CreateMissionAsync(Mission mission);
|
||||
Task<Mission> UpdateMissionAsync(Mission mission);
|
||||
Task<bool> DeleteMissionAsync(Guid missionId);
|
||||
Task<bool> IsMissionAvailableForPlayerAsync(Guid missionId, Guid playerId);
|
||||
Task<MissionCompletionResult> CompleteMissionAsync(Guid missionId, Guid playerId, object? missionProof = null);
|
||||
}
|
||||
using LctMonolith.Models.Database;
|
||||
using LctMonolith.Models.DTO;
|
||||
|
||||
namespace LctMonolith.Services.Interfaces;
|
||||
|
||||
public interface IMissionService
|
||||
{
|
||||
Task<Mission?> GetMissionByIdAsync(Guid missionId);
|
||||
Task<IEnumerable<Mission>> GetMissionsByCategoryAsync(Guid categoryId);
|
||||
Task<IEnumerable<Mission>> GetAvailableMissionsForPlayerAsync(Guid playerId);
|
||||
Task<IEnumerable<Mission>> GetChildMissionsAsync(Guid parentMissionId);
|
||||
Task<Mission> CreateMissionAsync(Mission mission);
|
||||
Task<Mission> UpdateMissionAsync(Mission mission);
|
||||
Task<bool> DeleteMissionAsync(Guid missionId);
|
||||
Task<bool> IsMissionAvailableForPlayerAsync(Guid missionId, Guid playerId);
|
||||
Task<MissionCompletionResult> CompleteMissionAsync(Guid missionId, Guid playerId, object? missionProof = null);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using LctMonolith.Models.Database;
|
||||
|
||||
namespace LctMonolith.Services.Contracts;
|
||||
|
||||
public interface INotificationService
|
||||
{
|
||||
Task<Notification> CreateAsync(Guid userId, string type, string title, string message, CancellationToken ct = default);
|
||||
Task<IEnumerable<Notification>> GetUnreadAsync(Guid userId, CancellationToken ct = default);
|
||||
Task<IEnumerable<Notification>> GetAllAsync(Guid userId, int take = 100, CancellationToken ct = default);
|
||||
Task MarkReadAsync(Guid userId, Guid notificationId, CancellationToken ct = default);
|
||||
Task<int> MarkAllReadAsync(Guid userId, CancellationToken ct = default);
|
||||
}
|
||||
using LctMonolith.Models.Database;
|
||||
|
||||
namespace LctMonolith.Services.Contracts;
|
||||
|
||||
public interface INotificationService
|
||||
{
|
||||
Task<Notification> CreateAsync(Guid userId, string type, string title, string message, CancellationToken ct = default);
|
||||
Task<IEnumerable<Notification>> GetUnreadAsync(Guid userId, CancellationToken ct = default);
|
||||
Task<IEnumerable<Notification>> GetAllAsync(Guid userId, int take = 100, CancellationToken ct = default);
|
||||
Task MarkReadAsync(Guid userId, Guid notificationId, CancellationToken ct = default);
|
||||
Task<int> MarkAllReadAsync(Guid userId, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
using LctMonolith.Models.Database;
|
||||
|
||||
namespace LctMonolith.Services.Interfaces;
|
||||
|
||||
public interface IPlayerService
|
||||
{
|
||||
Task<Player?> GetPlayerByUserIdAsync(string userId);
|
||||
Task<Player> CreatePlayerAsync(string userId, string username);
|
||||
Task<Player> UpdatePlayerRankAsync(Guid playerId, Guid newRankId);
|
||||
Task<Player> AddPlayerExperienceAsync(Guid playerId, int experience);
|
||||
Task<Player> AddPlayerManaAsync(Guid playerId, int mana);
|
||||
Task<IEnumerable<Player>> GetTopPlayersAsync(int topCount, TimeSpan timeFrame);
|
||||
Task<Player> GetPlayerWithProgressAsync(Guid playerId);
|
||||
}
|
||||
using LctMonolith.Models.Database;
|
||||
|
||||
namespace LctMonolith.Services.Interfaces;
|
||||
|
||||
public interface IPlayerService
|
||||
{
|
||||
Task<Player?> GetPlayerByUserIdAsync(string userId);
|
||||
Task<Player> CreatePlayerAsync(string userId, string username);
|
||||
Task<Player> UpdatePlayerRankAsync(Guid playerId, Guid newRankId);
|
||||
Task<Player> AddPlayerExperienceAsync(Guid playerId, int experience);
|
||||
Task<Player> AddPlayerManaAsync(Guid playerId, int mana);
|
||||
Task<IEnumerable<Player>> GetTopPlayersAsync(int topCount, TimeSpan timeFrame);
|
||||
Task<Player> GetPlayerWithProgressAsync(Guid playerId);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
namespace LctMonolith.Services.Interfaces;
|
||||
|
||||
using LctMonolith.Models.Database;
|
||||
|
||||
public interface IProfileService
|
||||
{
|
||||
Task<Profile?> GetByUserIdAsync(Guid userId, CancellationToken ct = default);
|
||||
Task<Profile> UpsertAsync(Guid userId, string? firstName, string? lastName, DateOnly? birthDate, string? about, string? location, CancellationToken ct = default);
|
||||
Task<Profile> UpdateAvatarAsync(Guid userId, Stream fileStream, string contentType, string? fileName, CancellationToken ct = default);
|
||||
Task<bool> DeleteAvatarAsync(Guid userId, CancellationToken ct = default);
|
||||
}
|
||||
namespace LctMonolith.Services.Interfaces;
|
||||
|
||||
using LctMonolith.Models.Database;
|
||||
|
||||
public interface IProfileService
|
||||
{
|
||||
Task<Profile?> GetByUserIdAsync(Guid userId, CancellationToken ct = default);
|
||||
Task<Profile> UpsertAsync(Guid userId, string? firstName, string? lastName, DateOnly? birthDate, string? about, string? location, CancellationToken ct = default);
|
||||
Task<Profile> UpdateAvatarAsync(Guid userId, Stream fileStream, string contentType, string? fileName, CancellationToken ct = default);
|
||||
Task<bool> DeleteAvatarAsync(Guid userId, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
using LctMonolith.Models.Database;
|
||||
using LctMonolith.Models.DTO;
|
||||
|
||||
namespace LctMonolith.Services.Interfaces;
|
||||
|
||||
public interface IProgressTrackingService
|
||||
{
|
||||
Task<PlayerMission> StartMissionAsync(Guid missionId, Guid playerId);
|
||||
Task<PlayerMission> UpdateMissionProgressAsync(Guid playerMissionId, int progressPercentage, object? proof = null);
|
||||
Task<PlayerMission> CompleteMissionAsync(Guid playerMissionId, object? proof = null);
|
||||
Task<IEnumerable<PlayerMission>> GetPlayerMissionsAsync(Guid playerId);
|
||||
Task<PlayerMission?> GetPlayerMissionAsync(Guid playerId, Guid missionId);
|
||||
Task<PlayerProgress> GetPlayerOverallProgressAsync(Guid playerId);
|
||||
}
|
||||
using LctMonolith.Models.Database;
|
||||
using LctMonolith.Models.DTO;
|
||||
|
||||
namespace LctMonolith.Services.Interfaces;
|
||||
|
||||
public interface IProgressTrackingService
|
||||
{
|
||||
Task<PlayerMission> StartMissionAsync(Guid missionId, Guid playerId);
|
||||
Task<PlayerMission> UpdateMissionProgressAsync(Guid playerMissionId, int progressPercentage, object? proof = null);
|
||||
Task<PlayerMission> CompleteMissionAsync(Guid playerMissionId, object? proof = null);
|
||||
Task<IEnumerable<PlayerMission>> GetPlayerMissionsAsync(Guid playerId);
|
||||
Task<PlayerMission?> GetPlayerMissionAsync(Guid playerId, Guid missionId);
|
||||
Task<PlayerProgress> GetPlayerOverallProgressAsync(Guid playerId);
|
||||
}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
using LctMonolith.Models.Database;
|
||||
|
||||
namespace LctMonolith.Services.Interfaces;
|
||||
|
||||
public interface IRankService
|
||||
{
|
||||
Task<Rank?> GetRankByIdAsync(Guid rankId);
|
||||
Task<Rank?> GetRankByTitleAsync(string title);
|
||||
Task<IEnumerable<Rank>> GetAllRanksAsync();
|
||||
Task<Rank> CreateRankAsync(Rank rank);
|
||||
Task<Rank> UpdateRankAsync(Rank rank);
|
||||
Task<bool> DeleteRankAsync(Guid rankId);
|
||||
Task<bool> CanPlayerAdvanceToRankAsync(Guid playerId, Guid rankId);
|
||||
Task<Rank?> GetNextRankAsync(Guid currentRankId);
|
||||
}
|
||||
using LctMonolith.Models.Database;
|
||||
|
||||
namespace LctMonolith.Services.Interfaces;
|
||||
|
||||
public interface IRankService
|
||||
{
|
||||
Task<Rank?> GetRankByIdAsync(Guid rankId);
|
||||
Task<Rank?> GetRankByTitleAsync(string title);
|
||||
Task<IEnumerable<Rank>> GetAllRanksAsync();
|
||||
Task<Rank> CreateRankAsync(Rank rank);
|
||||
Task<Rank> UpdateRankAsync(Rank rank);
|
||||
Task<bool> DeleteRankAsync(Guid rankId);
|
||||
Task<bool> CanPlayerAdvanceToRankAsync(Guid playerId, Guid rankId);
|
||||
Task<Rank?> GetNextRankAsync(Guid currentRankId);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
using LctMonolith.Models.Database;
|
||||
|
||||
namespace LctMonolith.Services.Interfaces;
|
||||
|
||||
public interface IRewardService
|
||||
{
|
||||
Task<IEnumerable<MissionSkillReward>> GetMissionSkillRewardsAsync(Guid missionId);
|
||||
Task<IEnumerable<MissionItemReward>> GetMissionItemRewardsAsync(Guid missionId);
|
||||
Task DistributeMissionRewardsAsync(Guid missionId, Guid playerId);
|
||||
Task<bool> CanClaimRewardAsync(Guid rewardId, Guid playerId);
|
||||
}
|
||||
using LctMonolith.Models.Database;
|
||||
|
||||
namespace LctMonolith.Services.Interfaces;
|
||||
|
||||
public interface IRewardService
|
||||
{
|
||||
Task<IEnumerable<MissionSkillReward>> GetMissionSkillRewardsAsync(Guid missionId);
|
||||
Task<IEnumerable<MissionItemReward>> GetMissionItemRewardsAsync(Guid missionId);
|
||||
Task DistributeMissionRewardsAsync(Guid missionId, Guid playerId);
|
||||
Task<bool> CanClaimRewardAsync(Guid rewardId, Guid playerId);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using LctMonolith.Models.Database;
|
||||
|
||||
namespace LctMonolith.Services.Interfaces;
|
||||
|
||||
public interface IRuleValidationService
|
||||
{
|
||||
Task<bool> ValidateMissionRankRulesAsync(Guid missionId, Guid playerId);
|
||||
Task<bool> ValidateRankAdvancementRulesAsync(Guid playerId, Guid targetRankId);
|
||||
Task<IEnumerable<MissionRankRule>> GetApplicableRankRulesAsync(Guid missionId);
|
||||
}
|
||||
using LctMonolith.Models.Database;
|
||||
|
||||
namespace LctMonolith.Services.Interfaces;
|
||||
|
||||
public interface IRuleValidationService
|
||||
{
|
||||
Task<bool> ValidateMissionRankRulesAsync(Guid missionId, Guid playerId);
|
||||
Task<bool> ValidateRankAdvancementRulesAsync(Guid playerId, Guid targetRankId);
|
||||
Task<IEnumerable<MissionRankRule>> GetApplicableRankRulesAsync(Guid missionId);
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
using LctMonolith.Models.Database;
|
||||
|
||||
namespace LctMonolith.Services.Interfaces;
|
||||
|
||||
public interface ISkillService
|
||||
{
|
||||
Task<Skill?> GetSkillByIdAsync(Guid skillId);
|
||||
Task<Skill?> GetSkillByTitleAsync(string title);
|
||||
Task<IEnumerable<Skill>> GetAllSkillsAsync();
|
||||
Task<Skill> CreateSkillAsync(Skill skill);
|
||||
Task<Skill> UpdateSkillAsync(Skill skill);
|
||||
Task<bool> DeleteSkillAsync(Guid skillId);
|
||||
Task<PlayerSkill> UpdatePlayerSkillAsync(Guid playerId, Guid skillId, int level);
|
||||
Task<IEnumerable<PlayerSkill>> GetPlayerSkillsAsync(Guid playerId);
|
||||
Task<int> GetPlayerSkillLevelAsync(Guid playerId, Guid skillId);
|
||||
}
|
||||
using LctMonolith.Models.Database;
|
||||
|
||||
namespace LctMonolith.Services.Interfaces;
|
||||
|
||||
public interface ISkillService
|
||||
{
|
||||
Task<Skill?> GetSkillByIdAsync(Guid skillId);
|
||||
Task<Skill?> GetSkillByTitleAsync(string title);
|
||||
Task<IEnumerable<Skill>> GetAllSkillsAsync();
|
||||
Task<Skill> CreateSkillAsync(Skill skill);
|
||||
Task<Skill> UpdateSkillAsync(Skill skill);
|
||||
Task<bool> DeleteSkillAsync(Guid skillId);
|
||||
Task<PlayerSkill> UpdatePlayerSkillAsync(Guid playerId, Guid skillId, int level);
|
||||
Task<IEnumerable<PlayerSkill>> GetPlayerSkillsAsync(Guid playerId);
|
||||
Task<int> GetPlayerSkillLevelAsync(Guid playerId, Guid skillId);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using LctMonolith.Models.Database;
|
||||
|
||||
namespace LctMonolith.Services.Contracts;
|
||||
|
||||
public interface IStoreService
|
||||
{
|
||||
Task<IEnumerable<StoreItem>> GetActiveItemsAsync(CancellationToken ct = default);
|
||||
Task<UserInventoryItem> PurchaseAsync(Guid userId, Guid itemId, int quantity, CancellationToken ct = default);
|
||||
}
|
||||
using LctMonolith.Models.Database;
|
||||
|
||||
namespace LctMonolith.Services.Contracts;
|
||||
|
||||
public interface IStoreService
|
||||
{
|
||||
Task<IEnumerable<StoreItem>> GetActiveItemsAsync(CancellationToken ct = default);
|
||||
Task<UserInventoryItem> PurchaseAsync(Guid userId, Guid itemId, int quantity, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
using LctMonolith.Models.Database;
|
||||
using LctMonolith.Services.Models;
|
||||
|
||||
namespace LctMonolith.Services.Contracts;
|
||||
|
||||
public interface ITokenService
|
||||
{
|
||||
Task<TokenPair> IssueAsync(AppUser user, CancellationToken ct = default);
|
||||
Task<TokenPair> RefreshAsync(string refreshToken, CancellationToken ct = default);
|
||||
Task RevokeAsync(string refreshToken, CancellationToken ct = default);
|
||||
}
|
||||
using LctMonolith.Models.Database;
|
||||
using LctMonolith.Services.Models;
|
||||
|
||||
namespace LctMonolith.Services.Contracts;
|
||||
|
||||
public interface ITokenService
|
||||
{
|
||||
Task<TokenPair> IssueAsync(AppUser user, CancellationToken ct = default);
|
||||
Task<TokenPair> RefreshAsync(string refreshToken, CancellationToken ct = default);
|
||||
Task RevokeAsync(string refreshToken, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user