Files
Core.Blueprint.Service/Core.Blueprint.Service.External/Clients/IBlueprintServiceClient.cs
2025-05-18 15:49:46 -06:00

68 lines
3.5 KiB
C#

using Core.Blueprint.KeyVault;
using Core.Blueprint.Service.External.Clients.Adapters;
using Core.Blueprint.Service.External.Clients.Requests;
using Core.Blueprint.Storage;
using Core.Blueprint.Storage.Adapters;
using Microsoft.AspNetCore.Mvc;
using Refit;
namespace Core.Blueprint.Service.External.Clients
{
public interface IBlueprintServiceClient
{
[Post("/v1/MongoSample/Create")]
Task<MongoSampleAdapter> CreateMongoSampleAsync([FromBody] MongoSampleRequest newSample, CancellationToken cancellationToken = default);
[Get("/v1/MongoSample/GetAll")]
Task<IEnumerable<MongoSampleAdapter>> GetAllMongoSamplesAsync(CancellationToken cancellationToken = default);
[Get("/v1/MongoSample/{_id}/GetBy_Id")]
Task<MongoSampleAdapter> GetMongoSampleByIdAsync([FromRoute] string _id, CancellationToken cancellationToken = default);
[Put("/v1/MongoSample/{_id}/Update")]
Task<MongoSampleAdapter> UpdateMongoSampleAsync([FromRoute] string _id, [FromBody] MongoSampleAdapter entity, CancellationToken cancellationToken = default);
[Delete("/v1/MongoSample/{_id}/Delete")]
Task<MongoSampleAdapter> DeleteMongoSampleAsync([FromRoute] string _id, CancellationToken cancellationToken = default);
[Post("/v1/SqlSample/Create")]
Task<SqlSampleAdapter> CreateSqlSampleAsync([FromBody] SqlSampleRequest newSqlSample, CancellationToken cancellationToken = default);
[Get("/v1/SqlSample/GetAll")]
Task<IEnumerable<SqlSampleAdapter>> GetAllSqlSamplesAsync(CancellationToken cancellationToken = default);
[Get("/v1/SqlSample/{id}/GetById")]
Task<SqlSampleAdapter> GetSqlSampleByIdAsync([FromRoute] int id, CancellationToken cancellationToken = default);
[Put("/v1/SqlSample/{id}/Update")]
Task<SqlSampleAdapter> UpdateSqlSampleAsync([FromRoute] int id, [FromBody] SqlSampleAdapter entity, CancellationToken cancellationToken = default);
[Delete("/v1/SqlSample/{id}/Delete")]
Task<SqlSampleAdapter> DeleteSqlSampleAsync([FromRoute] int id, CancellationToken cancellationToken = default);
[Post("/v1/KeyVault/CreateSecret")]
Task<KeyVaultResponse> CreateSecretAsync([FromBody] KeyVaultRequest newKeyVault, CancellationToken cancellationToken = default);
[Get("/v1/KeyVault/{secretName}/GetSecret")]
Task<KeyVaultAdapter> GetSecretByNameAsync([FromRoute] string secretName, CancellationToken cancellationToken = default);
[Put("/v1/KeyVault/UpdateSecret")]
Task<KeyVaultAdapter> UpdateSecretAsync([FromBody] KeyVaultRequest entity, CancellationToken cancellationToken = default);
[Delete("/v1/KeyVault/{secretName}/DeleteSecret")]
Task<KeyVaultAdapter> DeleteSecretAsync([FromRoute] string secretName, CancellationToken cancellationToken = default);
[Post("/v1/BlobStorage/UploadBlob")]
Task<BlobFileAdapter> UploadBlobAsync([FromQuery] BlobAddDto request, CancellationToken cancellationToken = default);
[Get("/v1/BlobStorage/GetBlobList")]
Task<List<BlobFileAdapter>> GetBlobListAsync([FromQuery] string? prefix, CancellationToken cancellationToken = default);
[Get("/v1/BlobStorage/DownloadBlob")]
Task<BlobDownloadUriAdapter> DownloadBlobAsync([FromQuery] string blobName, CancellationToken cancellationToken = default);
[Delete("/v1/BlobStorage/DeleteBlob")]
Task<BlobFileAdapter> DeleteBlobAsync([FromQuery] string blobName, CancellationToken cancellationToken = default);
}
}