using Model; namespace Services; /// /// Represents a service interface for managing tactics. /// public interface ITacticService { /// /// Retrieves a list of tactics owned by the specified user. /// /// The ID of the user. /// A task that represents the asynchronous operation. The task result contains a list of tactics. Task> ListTacticsOf(int userId); /// /// Checks if the userId corresponds to the tactic's owner identifier /// /// The ID of the user. /// The ID of the tactic. /// A task that represents the asynchronous operation. The task result contains a boolean indicating whether the user has rights. Task IsOwnerOf(int userId, int tacticId); /// /// Adds a new tactic for the specified user. /// /// The ID of the user. /// The name of the tactic. /// The type of court. /// A task that represents the asynchronous operation. The task result contains the ID of the newly added tactic. Task AddTactic(int userId, string name, CourtType courtType); /// /// Updates the name of the specified tactic. /// /// The ID of the tactic. /// The new name of the tactic. /// A task that represents the asynchronous operation. The task result contains a boolean indicating whether the update was successful. Task UpdateName(int tacticId, string name); /// /// Sets the content of a tactic step. /// /// The ID of the tactic. /// The ID of the step. /// The JSON content to set. /// A task that represents the asynchronous operation. The task result contains a boolean indicating whether the operation was successful. Task SetTacticStepContent(int tacticId, int stepId, string json); /// /// Retrieves the content of a tactic step. /// /// The ID of the tactic. /// The ID of the step. /// A task that represents the asynchronous operation. The task result contains the JSON content of the step. Task GetTacticStepContent(int tacticId, int stepId); public Task ShareTactic(int tacticId, int? userId, int? teamId); public Task UnshareTactic(int tacticId, int? userId, int? teamId); /// /// Retrieves the root step of the specified tactic. /// /// The ID of the tactic. /// A task that represents the asynchronous operation. The task result contains the root step of the tactic. Task GetRootStep(int tacticId); /// /// Retrieves the tactic with the specified ID. /// /// The ID of the tactic. /// A task that represents the asynchronous operation. The task result contains the tactic. Task GetTactic(int tacticId); /// /// Retrieves a list of tactics owned by the specified user. /// /// The ID of the user. /// A task that represents the asynchronous operation. The task result contains a list of tactics. Task> ListUserTactics(int userId); /// /// Adds a new step to the specified tactic. /// /// The ID of the tactic. /// The ID of the parent step. /// The initial JSON content of the step. /// A task that represents the asynchronous operation. The task result contains the ID of the newly added step. Task AddTacticStep(int tacticId, int parentStepId, string initialJson); /// /// Removes the specified step from the tactic, along with its child steps if any. /// /// The ID of the tactic. /// The ID of the step to remove. /// A task that represents the asynchronous operation. The task result contains a boolean indicating whether the removal was successful. Task RemoveTacticStep(int tacticId, int stepId); Task RemoveTactic(int tacticId); }