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/MongoBlueprint/Create")] Task CreateBlueprintAsync([FromBody] BlueprintRequest newBlueprint, CancellationToken cancellationToken = default); [Get("/v1/MongoBlueprint/GetAll")] Task> GetAllBlueprintsAsync(CancellationToken cancellationToken = default); [Get("/v1/MongoBlueprint/{_id}/GetBy_Id")] Task GetBlueprintByIdAsync([FromRoute] string _id, CancellationToken cancellationToken = default); [Put("/v1/MongoBlueprint/{_id}/Update")] Task UpdateBlueprintAsync([FromRoute] string _id, [FromBody] BlueprintAdapter entity, CancellationToken cancellationToken = default); [Delete("/v1/MongoBlueprint/{_id}/Delete")] Task DeleteBlueprintAsync([FromRoute] string _id, CancellationToken cancellationToken = default); [Post("/v1/UserProject/Create")] Task CreateUserProjectAsync([FromBody] UserProjectRequest newUserProject, CancellationToken cancellationToken = default); [Get("/v1/UserProject/GetAll")] Task> GetAllUserProjectsAsync(CancellationToken cancellationToken = default); [Get("/v1/UserProject/{id}/GetById")] Task GetUserProjectByIdAsync([FromRoute] int id, CancellationToken cancellationToken = default); [Put("/v1/UserProject/{id}/Update")] Task UpdateUserProjectAsync([FromRoute] int id, [FromBody] UserProjectAdapter entity, CancellationToken cancellationToken = default); [Delete("/v1/UserProject/{id}/Delete")] Task DeleteUserProjectAsync([FromRoute] int id, CancellationToken cancellationToken = default); [Post("/v1/KeyVault/CreateSecret")] Task CreateSecretAsync([FromBody] KeyVaultRequest newKeyVault, CancellationToken cancellationToken = default); [Get("/v1/KeyVault/{secretName}/GetSecret")] Task GetSecretByNameAsync([FromRoute] string secretName, CancellationToken cancellationToken = default); [Put("/v1/KeyVault/UpdateSecret")] Task UpdateSecretAsync([FromBody] KeyVaultRequest entity, CancellationToken cancellationToken = default); [Delete("/v1/KeyVault/{secretName}/DeleteSecret")] Task DeleteSecretAsync([FromRoute] string secretName, CancellationToken cancellationToken = default); [Post("/v1/BlobStorage/UploadBlob")] Task UploadBlobAsync([FromQuery] BlobAddDto request, CancellationToken cancellationToken = default); [Get("/v1/BlobStorage/GetBlobList")] Task> GetBlobListAsync([FromQuery] string? prefix, CancellationToken cancellationToken = default); [Get("/v1/BlobStorage/DownloadBlob")] Task DownloadBlobAsync([FromQuery] string blobName, CancellationToken cancellationToken = default); [Delete("/v1/BlobStorage/DeleteBlob")] Task DeleteBlobAsync([FromQuery] string blobName, CancellationToken cancellationToken = default); } }