-Aggiunta dei servizi di connessione REST base, di SAP e di Salesforce
This commit is contained in:
@@ -10,6 +10,21 @@ namespace DataConnection.REST.Interfaces
|
||||
/// </summary>
|
||||
public interface IRestMetadataDiscovery
|
||||
{
|
||||
/// <summary>
|
||||
/// Discovers a list of available entities from the REST service without detailed field information.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token.</param>
|
||||
/// <returns>A list of discovered entity summaries.</returns>
|
||||
Task<List<RestEntitySummary>> DiscoverEntitySummariesAsync(CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Discovers detailed information for a specific entity including all its properties.
|
||||
/// </summary>
|
||||
/// <param name="entityName">The name of the entity to get details for.</param>
|
||||
/// <param name="cancellationToken">Cancellation token.</param>
|
||||
/// <returns>Detailed entity information or null if not found.</returns>
|
||||
Task<RestEntityInfo?> DiscoverEntityDetailsAsync(string entityName, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Discovers entities and their properties from the REST service metadata.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DataConnection.REST.Interfaces
|
||||
@@ -27,6 +28,15 @@ namespace DataConnection.REST.Interfaces
|
||||
/// <returns>The deserialized response content.</returns>
|
||||
Task<TResponse?> PostAsync<TRequest, TResponse>(string requestUri, TRequest payload, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new entity by sending a POST request with the provided data.
|
||||
/// </summary>
|
||||
/// <param name="entityName">The name of the entity to create.</param>
|
||||
/// <param name="entityData">The data for the new entity as key-value pairs.</param>
|
||||
/// <param name="cancellationToken">Cancellation token.</param>
|
||||
/// <returns>The created entity data or null if creation failed.</returns>
|
||||
Task<Dictionary<string, object>?> CreateEntityAsync(string entityName, Dictionary<string, object> entityData, 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