feat: Implement ExistingDatabaseContext for managing existing databases with customizable naming strategies and auto-discovery of entities
feat: Add SqlServerSchemaProvider for extracting database schema information from SQL Server feat: Introduce DatabaseType and NamingStrategy enums for better database management and naming conventions feat: Create IDatabaseDiscovery and IDatabaseManager interfaces for database operations and metadata retrieval feat: Develop REST service client architecture with BaseRestServiceClient and SAP Business One specific implementation feat: Implement REST service discovery page with UI for connecting to SAP Business One Service Layer and displaying discovered entities
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DataConnection.REST.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface for a generic REST service client.
|
||||
/// </summary>
|
||||
public interface IRestServiceClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Sends a GET request to the specified URI.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of the object to deserialize the response content to.</typeparam>
|
||||
/// <param name="requestUri">The URI the request is sent to.</param>
|
||||
/// <param name="cancellationToken">Cancellation token.</param>
|
||||
/// <returns>The deserialized response content.</returns>
|
||||
Task<T?> GetAsync<T>(string requestUri, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Sends a POST request to the specified URI.
|
||||
/// </summary>
|
||||
/// <typeparam name="TRequest">The type of the request object.</typeparam>
|
||||
/// <typeparam name="TResponse">The type of the object to deserialize the response content to.</typeparam>
|
||||
/// <param name="requestUri">The URI the request is sent to.</param>
|
||||
/// <param name="payload">The HTTP request content sent to the server.</param>
|
||||
/// <param name="cancellationToken">Cancellation token.</param>
|
||||
/// <returns>The deserialized response content.</returns>
|
||||
Task<TResponse?> PostAsync<TRequest, TResponse>(string requestUri, TRequest payload, CancellationToken cancellationToken = default);
|
||||
|
||||
// Add other methods as needed (PUT, DELETE, PATCH, etc.)
|
||||
// Consider adding methods for handling raw HttpResponseMessage or string responses
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user