using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using xCategoryService.Models.Dtos; using xCategoryService.Models.Entities; using xCategoryService.Providers.Dtos; using xModels.Dtos; using xPushService.Interfaces; namespace xCategoryService.Interfaces { public interface IXSubCategoryProviderController : IXBaseProvidedController { /// /// Check Has Specified Locale or not ... /// /// /// /// /// [HttpGet("Resources/{id}/HasLocale")] Task> HasLocale( [FromRoute] int id, [FromQuery] string language, CancellationToken cancellationToken = default ); /// /// Load an Item by all of it's Related Translations ... /// /// /// /// [HttpGet("Resources/{id}")] Task> GetResource( [FromRoute] int id, CancellationToken cancellationToken = default ); /// /// Add Item for Specified Language ... /// /// /// /// /// [HttpPost("Resources")] Task> Add( [FromBody] XSubCategoryDto item, [FromQuery] string language = null, CancellationToken cancellationToken = default ); /// /// Add Item by it's Locales and Reference ... /// /// /// /// [HttpPost("Resources/AddResource")] Task> AddResource( [FromBody] XSubCategoryResourceDto item, CancellationToken cancellationToken = default ); /// /// Remove Item for Specified Language ... /// /// /// if null, Remove All /// /// [HttpDelete("Resources/{id}")] Task> Remove( [FromRoute] int id, [FromQuery] string language = null, CancellationToken cancellationToken = default ); /// /// Update an Item for Specified Language ... /// /// /// /// /// /// [HttpPut("Resources/{id}")] Task> Update( [FromRoute] int id, [FromBody] XSubCategoryDto item, [FromQuery] string language = null, CancellationToken cancellationToken = default ); /// /// Refresh a Resource ... /// /// /// /// [HttpPost("Resources/Refresh")] Task> Refresh( [FromBody] XSubCategoryResourceDto resource, CancellationToken cancellationToken = default ); /// /// Get All Resources ... /// /// /// [HttpGet("Resources/All")] Task>> GetAllResources( CancellationToken cancellationToken = default ); /// /// Find One Resource ... /// /// /// /// [HttpGet("Resources/Find/One")] Task> FindOneResource( [FromQuery] string query, CancellationToken cancellationToken = default ); /// /// Find Many Resource ... /// /// /// /// [HttpGet("Resources/Find/Many")] Task>> FindManyResource( [FromQuery] string query, CancellationToken cancellationToken = default ); /// /// Retrieve Resources by Query Pattern ... /// /// /// /// [HttpGet("Resources/Query")] Task>> QueryResources( [FromQuery] XQuery query = null, CancellationToken cancellationToken = default ); } }