diff --git a/MeAjudaAi.sln b/MeAjudaAi.sln index 2c4a098f9..d17613c1c 100644 --- a/MeAjudaAi.sln +++ b/MeAjudaAi.sln @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 18 VisualStudioVersion = 18.0.11205.157 @@ -109,19 +109,19 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Location", "Location", "{8B EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{A297266A-1ECB-AE19-8D6F-3A458F9AD28F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MeAjudaAi.Modules.Location.Tests", "src\Modules\Location\Tests\MeAjudaAi.Modules.Location.Tests.csproj", "{D0E46405-E34A-4905-BF34-9DF22036512E}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MeAjudaAi.Modules.Locations.Tests", "src\Modules\Locations\Tests\MeAjudaAi.Modules.Locations.Tests.csproj", "{D0E46405-E34A-4905-BF34-9DF22036512E}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Application", "Application", "{10AEE144-453E-4C4D-B928-DBD6A8C72108}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MeAjudaAi.Modules.Location.Application", "src\Modules\Location\Application\MeAjudaAi.Modules.Location.Application.csproj", "{B98C73C8-F57C-747F-B86E-3A0429BFBE12}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MeAjudaAi.Modules.Locations.Application", "src\Modules\Locations\Application\MeAjudaAi.Modules.Locations.Application.csproj", "{B98C73C8-F57C-747F-B86E-3A0429BFBE12}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Domain", "Domain", "{A7277AF8-7D65-4CE2-B6B0-2A0DB786780A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MeAjudaAi.Modules.Location.Domain", "src\Modules\Location\Domain\MeAjudaAi.Modules.Location.Domain.csproj", "{72B40E16-5D54-DCE4-A235-AA9F7CF99665}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MeAjudaAi.Modules.Locations.Domain", "src\Modules\Locations\Domain\MeAjudaAi.Modules.Locations.Domain.csproj", "{72B40E16-5D54-DCE4-A235-AA9F7CF99665}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Infrastructure", "Infrastructure", "{E4E48F48-72CF-41A4-AA66-9423D81C7970}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MeAjudaAi.Modules.Location.Infrastructure", "src\Modules\Location\Infrastructure\MeAjudaAi.Modules.Location.Infrastructure.csproj", "{1E72996A-6FD1-9E16-5188-42DDCFF6518C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MeAjudaAi.Modules.Locations.Infrastructure", "src\Modules\Locations\Infrastructure\MeAjudaAi.Modules.Locations.Infrastructure.csproj", "{1E72996A-6FD1-9E16-5188-42DDCFF6518C}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Search", "Search", "{6FF68FBA-C4AF-48EC-AFE2-E320F2195C79}" EndProject diff --git a/docs/modules/location.md b/docs/modules/locations.md similarity index 95% rename from docs/modules/location.md rename to docs/modules/locations.md index 8c32a9f7c..b5e1a3fb7 100644 --- a/docs/modules/location.md +++ b/docs/modules/locations.md @@ -1,10 +1,10 @@ -# 🗺️ Módulo Location - Geolocalização e CEP +# 🗺️ Módulo Locations - Geolocalização e CEP > **✅ Status**: Módulo **implementado e funcional** (Novembro 2025) ## 🎯 Visão Geral -O módulo **Location** é responsável por abstrair funcionalidades de **geolocalização** e **lookup de CEP brasileiro**, fornecendo uma API unificada e resiliente para outros módulos consumirem dados de localização. +O módulo **Locations** é responsável por abstrair funcionalidades de **geolocalização** e **lookup de CEP brasileiro**, fornecendo uma API unificada e resiliente para outros módulos consumirem dados de localização. ### **Responsabilidades** - ✅ **Lookup de CEP** com fallback automático entre APIs brasileiras @@ -16,7 +16,7 @@ O módulo **Location** é responsável por abstrair funcionalidades de **geoloca ## 🏗️ Arquitetura Implementada -### **Bounded Context: Location** +### **Bounded Context: Locations** - **Sem schema próprio** (stateless module) - **Padrão**: Service Layer + Value Objects - **Integrações**: ViaCEP, BrasilAPI, OpenCEP @@ -227,7 +227,7 @@ public sealed class LocationsModuleApi : ILocationModuleApi { private static class ModuleMetadata { - public const string Name = "Location"; + public const string Name = "Locations"; public const string Version = "1.0"; } @@ -317,9 +317,9 @@ services.AddHttpClient() ## 📊 Estrutura de Pastas ```plaintext -src/Modules/Location/ +src/Modules/Locations/ ├── API/ -│ └── MeAjudaAi.Modules.Location.API.csproj +│ └── MeAjudaAi.Modules.Locations.API.csproj ├── Application/ │ ├── ModuleApi/ │ │ └── LocationsModuleApi.cs @@ -327,13 +327,13 @@ src/Modules/Location/ │ │ ├── ICepLookupService.cs │ │ ├── CepLookupService.cs │ │ └── IGeocodingService.cs -│ └── MeAjudaAi.Modules.Location.Application.csproj +│ └── MeAjudaAi.Modules.Locations.Application.csproj ├── Domain/ │ ├── ValueObjects/ │ │ ├── Cep.cs │ │ ├── Coordinates.cs │ │ └── Address.cs -│ └── MeAjudaAi.Modules.Location.Domain.csproj +│ └── MeAjudaAi.Modules.Locations.Domain.csproj ├── Infrastructure/ │ ├── ExternalServices/ │ │ ├── ViaCEP/ @@ -346,7 +346,7 @@ src/Modules/Location/ │ │ ├── IOpenCepClient.cs │ │ └── OpenCepClient.cs │ ├── Extensions.cs -│ └── MeAjudaAi.Modules.Location.Infrastructure.csproj +│ └── MeAjudaAi.Modules.Locations.Infrastructure.csproj └── Tests/ └── Unit/ └── Domain/ diff --git a/src/Bootstrapper/MeAjudaAi.ApiService/MeAjudaAi.ApiService.csproj b/src/Bootstrapper/MeAjudaAi.ApiService/MeAjudaAi.ApiService.csproj index a077f15c6..9bc2f39b8 100644 --- a/src/Bootstrapper/MeAjudaAi.ApiService/MeAjudaAi.ApiService.csproj +++ b/src/Bootstrapper/MeAjudaAi.ApiService/MeAjudaAi.ApiService.csproj @@ -19,7 +19,7 @@ - + diff --git a/src/Bootstrapper/MeAjudaAi.ApiService/Program.cs b/src/Bootstrapper/MeAjudaAi.ApiService/Program.cs index 524a4e1ac..592f526d9 100644 --- a/src/Bootstrapper/MeAjudaAi.ApiService/Program.cs +++ b/src/Bootstrapper/MeAjudaAi.ApiService/Program.cs @@ -2,7 +2,7 @@ using MeAjudaAi.ApiService.Extensions; using MeAjudaAi.Modules.Catalogs.API; using MeAjudaAi.Modules.Documents.API; -using MeAjudaAi.Modules.Location.Infrastructure; +using MeAjudaAi.Modules.Locations.Infrastructure; using MeAjudaAi.Modules.Providers.API; using MeAjudaAi.Modules.Search.API; using MeAjudaAi.Modules.Users.API; diff --git a/src/Bootstrapper/MeAjudaAi.ApiService/appsettings.json b/src/Bootstrapper/MeAjudaAi.ApiService/appsettings.json index 3d6e77644..891e70a6b 100644 --- a/src/Bootstrapper/MeAjudaAi.ApiService/appsettings.json +++ b/src/Bootstrapper/MeAjudaAi.ApiService/appsettings.json @@ -104,7 +104,7 @@ "RetryAttempts": 3, "AutomaticRetryDelaySeconds": 60 }, - "Location": { + "Locations": { "ExternalApis": { "ViaCep": { "BaseUrl": "https://viacep.com.br/" diff --git a/src/Modules/Location/Application/MeAjudaAi.Modules.Location.Application.csproj b/src/Modules/Locations/Application/MeAjudaAi.Modules.Locations.Application.csproj similarity index 66% rename from src/Modules/Location/Application/MeAjudaAi.Modules.Location.Application.csproj rename to src/Modules/Locations/Application/MeAjudaAi.Modules.Locations.Application.csproj index 746e37b81..a1e01e346 100644 --- a/src/Modules/Location/Application/MeAjudaAi.Modules.Location.Application.csproj +++ b/src/Modules/Locations/Application/MeAjudaAi.Modules.Locations.Application.csproj @@ -1,13 +1,13 @@ - + net9.0 - MeAjudaAi.Modules.Location.Application + MeAjudaAi.Modules.Locations.Application - + diff --git a/src/Modules/Location/Application/ModuleApi/LocationsModuleApi.cs b/src/Modules/Locations/Application/ModuleApi/LocationsModuleApi.cs similarity index 95% rename from src/Modules/Location/Application/ModuleApi/LocationsModuleApi.cs rename to src/Modules/Locations/Application/ModuleApi/LocationsModuleApi.cs index 99de78e00..31435006c 100644 --- a/src/Modules/Location/Application/ModuleApi/LocationsModuleApi.cs +++ b/src/Modules/Locations/Application/ModuleApi/LocationsModuleApi.cs @@ -1,12 +1,12 @@ -using MeAjudaAi.Modules.Location.Application.Services; -using MeAjudaAi.Modules.Location.Domain.ValueObjects; +using MeAjudaAi.Modules.Locations.Application.Services; +using MeAjudaAi.Modules.Locations.Domain.ValueObjects; using MeAjudaAi.Shared.Contracts.Modules; using MeAjudaAi.Shared.Contracts.Modules.Location; using MeAjudaAi.Shared.Contracts.Modules.Location.DTOs; using MeAjudaAi.Shared.Functional; using Microsoft.Extensions.Logging; -namespace MeAjudaAi.Modules.Location.Application.ModuleApi; +namespace MeAjudaAi.Modules.Locations.Application.ModuleApi; /// /// Implementação da API pública do módulo Location para outros módulos. diff --git a/src/Modules/Location/Application/Services/ICepLookupService.cs b/src/Modules/Locations/Application/Services/ICepLookupService.cs similarity index 77% rename from src/Modules/Location/Application/Services/ICepLookupService.cs rename to src/Modules/Locations/Application/Services/ICepLookupService.cs index 64bdfed1d..e56c15057 100644 --- a/src/Modules/Location/Application/Services/ICepLookupService.cs +++ b/src/Modules/Locations/Application/Services/ICepLookupService.cs @@ -1,6 +1,6 @@ -using MeAjudaAi.Modules.Location.Domain.ValueObjects; +using MeAjudaAi.Modules.Locations.Domain.ValueObjects; -namespace MeAjudaAi.Modules.Location.Application.Services; +namespace MeAjudaAi.Modules.Locations.Application.Services; /// /// Serviço de consulta de CEP com fallback automático entre provedores. diff --git a/src/Modules/Location/Application/Services/IGeocodingService.cs b/src/Modules/Locations/Application/Services/IGeocodingService.cs similarity index 86% rename from src/Modules/Location/Application/Services/IGeocodingService.cs rename to src/Modules/Locations/Application/Services/IGeocodingService.cs index be08fc27e..517763b97 100644 --- a/src/Modules/Location/Application/Services/IGeocodingService.cs +++ b/src/Modules/Locations/Application/Services/IGeocodingService.cs @@ -1,6 +1,6 @@ using MeAjudaAi.Shared.Geolocation; -namespace MeAjudaAi.Modules.Location.Application.Services; +namespace MeAjudaAi.Modules.Locations.Application.Services; /// /// Serviço de geocoding para converter endereços em coordenadas. diff --git a/src/Modules/Location/Domain/Enums/ECepProvider.cs b/src/Modules/Locations/Domain/Enums/ECepProvider.cs similarity index 91% rename from src/Modules/Location/Domain/Enums/ECepProvider.cs rename to src/Modules/Locations/Domain/Enums/ECepProvider.cs index 9386c5401..80bda5387 100644 --- a/src/Modules/Location/Domain/Enums/ECepProvider.cs +++ b/src/Modules/Locations/Domain/Enums/ECepProvider.cs @@ -1,4 +1,4 @@ -namespace MeAjudaAi.Modules.Location.Domain.Enums; +namespace MeAjudaAi.Modules.Locations.Domain.Enums; /// /// Provedores de consulta de CEP disponíveis. diff --git a/src/Modules/Location/Domain/MeAjudaAi.Modules.Location.Domain.csproj b/src/Modules/Locations/Domain/MeAjudaAi.Modules.Locations.Domain.csproj similarity index 65% rename from src/Modules/Location/Domain/MeAjudaAi.Modules.Location.Domain.csproj rename to src/Modules/Locations/Domain/MeAjudaAi.Modules.Locations.Domain.csproj index b66c7c529..6a89fbdfc 100644 --- a/src/Modules/Location/Domain/MeAjudaAi.Modules.Location.Domain.csproj +++ b/src/Modules/Locations/Domain/MeAjudaAi.Modules.Locations.Domain.csproj @@ -1,8 +1,8 @@ - + net9.0 - MeAjudaAi.Modules.Location.Domain + MeAjudaAi.Modules.Locations.Domain diff --git a/src/Modules/Location/Domain/ValueObjects/Address.cs b/src/Modules/Locations/Domain/ValueObjects/Address.cs similarity index 98% rename from src/Modules/Location/Domain/ValueObjects/Address.cs rename to src/Modules/Locations/Domain/ValueObjects/Address.cs index db7841a2c..cfbfb5536 100644 --- a/src/Modules/Location/Domain/ValueObjects/Address.cs +++ b/src/Modules/Locations/Domain/ValueObjects/Address.cs @@ -1,7 +1,7 @@ using MeAjudaAi.Shared.Domain; using MeAjudaAi.Shared.Geolocation; -namespace MeAjudaAi.Modules.Location.Domain.ValueObjects; +namespace MeAjudaAi.Modules.Locations.Domain.ValueObjects; /// /// Representa um endereço brasileiro completo. diff --git a/src/Modules/Location/Domain/ValueObjects/Cep.cs b/src/Modules/Locations/Domain/ValueObjects/Cep.cs similarity index 95% rename from src/Modules/Location/Domain/ValueObjects/Cep.cs rename to src/Modules/Locations/Domain/ValueObjects/Cep.cs index 333392e21..3196d64fb 100644 --- a/src/Modules/Location/Domain/ValueObjects/Cep.cs +++ b/src/Modules/Locations/Domain/ValueObjects/Cep.cs @@ -1,7 +1,7 @@ using System.Text.RegularExpressions; using MeAjudaAi.Shared.Domain; -namespace MeAjudaAi.Modules.Location.Domain.ValueObjects; +namespace MeAjudaAi.Modules.Locations.Domain.ValueObjects; /// /// Representa um Código de Endereçamento Postal (CEP) brasileiro. diff --git a/src/Modules/Location/Infrastructure/Extensions.cs b/src/Modules/Locations/Infrastructure/Extensions.cs similarity index 72% rename from src/Modules/Location/Infrastructure/Extensions.cs rename to src/Modules/Locations/Infrastructure/Extensions.cs index 8c5018784..f09c87ef9 100644 --- a/src/Modules/Location/Infrastructure/Extensions.cs +++ b/src/Modules/Locations/Infrastructure/Extensions.cs @@ -1,13 +1,13 @@ -using MeAjudaAi.Modules.Location.Application.ModuleApi; -using MeAjudaAi.Modules.Location.Application.Services; -using MeAjudaAi.Modules.Location.Infrastructure.ExternalApis.Clients; -using MeAjudaAi.Modules.Location.Infrastructure.Services; +using MeAjudaAi.Modules.Locations.Application.ModuleApi; +using MeAjudaAi.Modules.Locations.Application.Services; +using MeAjudaAi.Modules.Locations.Infrastructure.ExternalApis.Clients; +using MeAjudaAi.Modules.Locations.Infrastructure.Services; using MeAjudaAi.Shared.Contracts.Modules.Location; using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; -namespace MeAjudaAi.Modules.Location.Infrastructure; +namespace MeAjudaAi.Modules.Locations.Infrastructure; /// /// Métodos de extensão para registrar serviços do módulo Location. @@ -23,30 +23,30 @@ public static IServiceCollection AddLocationModule(this IServiceCollection servi // ServiceDefaults já configura resiliência (retry, circuit breaker, timeout) services.AddHttpClient(client => { - var baseUrl = configuration["Location:ExternalApis:ViaCep:BaseUrl"] ?? "https://viacep.com.br/"; + var baseUrl = configuration["Locations:ExternalApis:ViaCep:BaseUrl"] ?? "https://viacep.com.br/"; client.BaseAddress = new Uri(baseUrl); }); services.AddHttpClient(client => { - var baseUrl = configuration["Location:ExternalApis:BrasilApi:BaseUrl"] ?? "https://brasilapi.com.br/"; + var baseUrl = configuration["Locations:ExternalApis:BrasilApi:BaseUrl"] ?? "https://brasilapi.com.br/"; client.BaseAddress = new Uri(baseUrl); }); services.AddHttpClient(client => { - var baseUrl = configuration["Location:ExternalApis:OpenCep:BaseUrl"] ?? "https://opencep.com/"; + var baseUrl = configuration["Locations:ExternalApis:OpenCep:BaseUrl"] ?? "https://opencep.com/"; client.BaseAddress = new Uri(baseUrl); }); // Registrar HTTP client para Nominatim (geocoding) services.AddHttpClient(client => { - var baseUrl = configuration["Location:ExternalApis:Nominatim:BaseUrl"] ?? "https://nominatim.openstreetmap.org/"; + var baseUrl = configuration["Locations:ExternalApis:Nominatim:BaseUrl"] ?? "https://nominatim.openstreetmap.org/"; client.BaseAddress = new Uri(baseUrl); // Configurar User-Agent conforme política de uso do Nominatim - var userAgent = configuration["Location:ExternalApis:Nominatim:UserAgent"] + var userAgent = configuration["Locations:ExternalApis:Nominatim:UserAgent"] ?? "MeAjudaAi/1.0 (https://github.com/frigini/MeAjudaAi)"; client.DefaultRequestHeaders.Add("User-Agent", userAgent); }); diff --git a/src/Modules/Location/Infrastructure/ExternalApis/Clients/BrasilApiCepClient.cs b/src/Modules/Locations/Infrastructure/ExternalApis/Clients/BrasilApiCepClient.cs similarity index 88% rename from src/Modules/Location/Infrastructure/ExternalApis/Clients/BrasilApiCepClient.cs rename to src/Modules/Locations/Infrastructure/ExternalApis/Clients/BrasilApiCepClient.cs index 7ae2998ff..d6dec4c39 100644 --- a/src/Modules/Location/Infrastructure/ExternalApis/Clients/BrasilApiCepClient.cs +++ b/src/Modules/Locations/Infrastructure/ExternalApis/Clients/BrasilApiCepClient.cs @@ -1,10 +1,10 @@ using System.Text.Json; -using MeAjudaAi.Modules.Location.Domain.ValueObjects; -using MeAjudaAi.Modules.Location.Infrastructure.ExternalApis.Responses; +using MeAjudaAi.Modules.Locations.Domain.ValueObjects; +using MeAjudaAi.Modules.Locations.Infrastructure.ExternalApis.Responses; using MeAjudaAi.Shared.Serialization; using Microsoft.Extensions.Logging; -namespace MeAjudaAi.Modules.Location.Infrastructure.ExternalApis.Clients; +namespace MeAjudaAi.Modules.Locations.Infrastructure.ExternalApis.Clients; /// /// Cliente HTTP para a API BrasilAPI. diff --git a/src/Modules/Location/Infrastructure/ExternalApis/Clients/NominatimClient.cs b/src/Modules/Locations/Infrastructure/ExternalApis/Clients/NominatimClient.cs similarity index 96% rename from src/Modules/Location/Infrastructure/ExternalApis/Clients/NominatimClient.cs rename to src/Modules/Locations/Infrastructure/ExternalApis/Clients/NominatimClient.cs index 6dfda725c..adb9ab246 100644 --- a/src/Modules/Location/Infrastructure/ExternalApis/Clients/NominatimClient.cs +++ b/src/Modules/Locations/Infrastructure/ExternalApis/Clients/NominatimClient.cs @@ -1,12 +1,12 @@ using System.Text.Json; using System.Web; -using MeAjudaAi.Modules.Location.Infrastructure.ExternalApis.Responses; +using MeAjudaAi.Modules.Locations.Infrastructure.ExternalApis.Responses; using MeAjudaAi.Shared.Geolocation; using MeAjudaAi.Shared.Serialization; using MeAjudaAi.Shared.Time; using Microsoft.Extensions.Logging; -namespace MeAjudaAi.Modules.Location.Infrastructure.ExternalApis.Clients; +namespace MeAjudaAi.Modules.Locations.Infrastructure.ExternalApis.Clients; /// /// Cliente HTTP para a API Nominatim (OpenStreetMap). diff --git a/src/Modules/Location/Infrastructure/ExternalApis/Clients/OpenCepClient.cs b/src/Modules/Locations/Infrastructure/ExternalApis/Clients/OpenCepClient.cs similarity index 88% rename from src/Modules/Location/Infrastructure/ExternalApis/Clients/OpenCepClient.cs rename to src/Modules/Locations/Infrastructure/ExternalApis/Clients/OpenCepClient.cs index 44d79c149..eb92c8be4 100644 --- a/src/Modules/Location/Infrastructure/ExternalApis/Clients/OpenCepClient.cs +++ b/src/Modules/Locations/Infrastructure/ExternalApis/Clients/OpenCepClient.cs @@ -1,10 +1,10 @@ using System.Text.Json; -using MeAjudaAi.Modules.Location.Domain.ValueObjects; -using MeAjudaAi.Modules.Location.Infrastructure.ExternalApis.Responses; +using MeAjudaAi.Modules.Locations.Domain.ValueObjects; +using MeAjudaAi.Modules.Locations.Infrastructure.ExternalApis.Responses; using MeAjudaAi.Shared.Serialization; using Microsoft.Extensions.Logging; -namespace MeAjudaAi.Modules.Location.Infrastructure.ExternalApis.Clients; +namespace MeAjudaAi.Modules.Locations.Infrastructure.ExternalApis.Clients; /// /// Cliente HTTP para a API OpenCEP. diff --git a/src/Modules/Location/Infrastructure/ExternalApis/Clients/ViaCepClient.cs b/src/Modules/Locations/Infrastructure/ExternalApis/Clients/ViaCepClient.cs similarity index 88% rename from src/Modules/Location/Infrastructure/ExternalApis/Clients/ViaCepClient.cs rename to src/Modules/Locations/Infrastructure/ExternalApis/Clients/ViaCepClient.cs index c186fe65b..0b4a8de06 100644 --- a/src/Modules/Location/Infrastructure/ExternalApis/Clients/ViaCepClient.cs +++ b/src/Modules/Locations/Infrastructure/ExternalApis/Clients/ViaCepClient.cs @@ -1,10 +1,10 @@ using System.Text.Json; -using MeAjudaAi.Modules.Location.Domain.ValueObjects; -using MeAjudaAi.Modules.Location.Infrastructure.ExternalApis.Responses; +using MeAjudaAi.Modules.Locations.Domain.ValueObjects; +using MeAjudaAi.Modules.Locations.Infrastructure.ExternalApis.Responses; using MeAjudaAi.Shared.Serialization; using Microsoft.Extensions.Logging; -namespace MeAjudaAi.Modules.Location.Infrastructure.ExternalApis.Clients; +namespace MeAjudaAi.Modules.Locations.Infrastructure.ExternalApis.Clients; /// /// Cliente HTTP para a API ViaCEP. diff --git a/src/Modules/Location/Infrastructure/ExternalApis/Responses/BrasilApiCepResponse.cs b/src/Modules/Locations/Infrastructure/ExternalApis/Responses/BrasilApiCepResponse.cs similarity index 82% rename from src/Modules/Location/Infrastructure/ExternalApis/Responses/BrasilApiCepResponse.cs rename to src/Modules/Locations/Infrastructure/ExternalApis/Responses/BrasilApiCepResponse.cs index c63503282..0c81719ea 100644 --- a/src/Modules/Location/Infrastructure/ExternalApis/Responses/BrasilApiCepResponse.cs +++ b/src/Modules/Locations/Infrastructure/ExternalApis/Responses/BrasilApiCepResponse.cs @@ -1,4 +1,4 @@ -namespace MeAjudaAi.Modules.Location.Infrastructure.ExternalApis.Responses; +namespace MeAjudaAi.Modules.Locations.Infrastructure.ExternalApis.Responses; /// /// Resposta da API BrasilAPI. diff --git a/src/Modules/Location/Infrastructure/ExternalApis/Responses/NominatimResponse.cs b/src/Modules/Locations/Infrastructure/ExternalApis/Responses/NominatimResponse.cs similarity index 83% rename from src/Modules/Location/Infrastructure/ExternalApis/Responses/NominatimResponse.cs rename to src/Modules/Locations/Infrastructure/ExternalApis/Responses/NominatimResponse.cs index 54d3487cb..f48dbf8ba 100644 --- a/src/Modules/Location/Infrastructure/ExternalApis/Responses/NominatimResponse.cs +++ b/src/Modules/Locations/Infrastructure/ExternalApis/Responses/NominatimResponse.cs @@ -1,4 +1,4 @@ -namespace MeAjudaAi.Modules.Location.Infrastructure.ExternalApis.Responses; +namespace MeAjudaAi.Modules.Locations.Infrastructure.ExternalApis.Responses; /// /// Resposta da API Nominatim (OpenStreetMap). diff --git a/src/Modules/Location/Infrastructure/ExternalApis/Responses/OpenCepResponse.cs b/src/Modules/Locations/Infrastructure/ExternalApis/Responses/OpenCepResponse.cs similarity index 83% rename from src/Modules/Location/Infrastructure/ExternalApis/Responses/OpenCepResponse.cs rename to src/Modules/Locations/Infrastructure/ExternalApis/Responses/OpenCepResponse.cs index 70564e3c1..45454c35e 100644 --- a/src/Modules/Location/Infrastructure/ExternalApis/Responses/OpenCepResponse.cs +++ b/src/Modules/Locations/Infrastructure/ExternalApis/Responses/OpenCepResponse.cs @@ -1,4 +1,4 @@ -namespace MeAjudaAi.Modules.Location.Infrastructure.ExternalApis.Responses; +namespace MeAjudaAi.Modules.Locations.Infrastructure.ExternalApis.Responses; /// /// Resposta da API OpenCEP. diff --git a/src/Modules/Location/Infrastructure/ExternalApis/Responses/ViaCepResponse.cs b/src/Modules/Locations/Infrastructure/ExternalApis/Responses/ViaCepResponse.cs similarity index 87% rename from src/Modules/Location/Infrastructure/ExternalApis/Responses/ViaCepResponse.cs rename to src/Modules/Locations/Infrastructure/ExternalApis/Responses/ViaCepResponse.cs index 0140fecf2..792ef6a4a 100644 --- a/src/Modules/Location/Infrastructure/ExternalApis/Responses/ViaCepResponse.cs +++ b/src/Modules/Locations/Infrastructure/ExternalApis/Responses/ViaCepResponse.cs @@ -1,4 +1,4 @@ -namespace MeAjudaAi.Modules.Location.Infrastructure.ExternalApis.Responses; +namespace MeAjudaAi.Modules.Locations.Infrastructure.ExternalApis.Responses; /// /// Resposta da API ViaCEP. diff --git a/src/Modules/Location/Infrastructure/MeAjudaAi.Modules.Location.Infrastructure.csproj b/src/Modules/Locations/Infrastructure/MeAjudaAi.Modules.Locations.Infrastructure.csproj similarity index 66% rename from src/Modules/Location/Infrastructure/MeAjudaAi.Modules.Location.Infrastructure.csproj rename to src/Modules/Locations/Infrastructure/MeAjudaAi.Modules.Locations.Infrastructure.csproj index 223b9b533..0e5499982 100644 --- a/src/Modules/Location/Infrastructure/MeAjudaAi.Modules.Location.Infrastructure.csproj +++ b/src/Modules/Locations/Infrastructure/MeAjudaAi.Modules.Locations.Infrastructure.csproj @@ -1,14 +1,14 @@ - + net9.0 - MeAjudaAi.Modules.Location.Infrastructure + MeAjudaAi.Modules.Locations.Infrastructure - - + + diff --git a/src/Modules/Location/Infrastructure/Services/CepLookupService.cs b/src/Modules/Locations/Infrastructure/Services/CepLookupService.cs similarity index 91% rename from src/Modules/Location/Infrastructure/Services/CepLookupService.cs rename to src/Modules/Locations/Infrastructure/Services/CepLookupService.cs index 8f79f7728..340fb478d 100644 --- a/src/Modules/Location/Infrastructure/Services/CepLookupService.cs +++ b/src/Modules/Locations/Infrastructure/Services/CepLookupService.cs @@ -1,12 +1,12 @@ -using MeAjudaAi.Modules.Location.Application.Services; -using MeAjudaAi.Modules.Location.Domain.Enums; -using MeAjudaAi.Modules.Location.Domain.ValueObjects; -using MeAjudaAi.Modules.Location.Infrastructure.ExternalApis.Clients; +using MeAjudaAi.Modules.Locations.Application.Services; +using MeAjudaAi.Modules.Locations.Domain.Enums; +using MeAjudaAi.Modules.Locations.Domain.ValueObjects; +using MeAjudaAi.Modules.Locations.Infrastructure.ExternalApis.Clients; using MeAjudaAi.Shared.Caching; using Microsoft.Extensions.Caching.Hybrid; using Microsoft.Extensions.Logging; -namespace MeAjudaAi.Modules.Location.Infrastructure.Services; +namespace MeAjudaAi.Modules.Locations.Infrastructure.Services; /// /// Implementação do serviço de consulta de CEP com fallback chain e caching. diff --git a/src/Modules/Location/Infrastructure/Services/GeocodingService.cs b/src/Modules/Locations/Infrastructure/Services/GeocodingService.cs similarity index 90% rename from src/Modules/Location/Infrastructure/Services/GeocodingService.cs rename to src/Modules/Locations/Infrastructure/Services/GeocodingService.cs index 27cdf8fd4..e9d1d2f42 100644 --- a/src/Modules/Location/Infrastructure/Services/GeocodingService.cs +++ b/src/Modules/Locations/Infrastructure/Services/GeocodingService.cs @@ -1,11 +1,11 @@ -using MeAjudaAi.Modules.Location.Application.Services; -using MeAjudaAi.Modules.Location.Infrastructure.ExternalApis.Clients; +using MeAjudaAi.Modules.Locations.Application.Services; +using MeAjudaAi.Modules.Locations.Infrastructure.ExternalApis.Clients; using MeAjudaAi.Shared.Caching; using MeAjudaAi.Shared.Geolocation; using Microsoft.Extensions.Caching.Hybrid; using Microsoft.Extensions.Logging; -namespace MeAjudaAi.Modules.Location.Infrastructure.Services; +namespace MeAjudaAi.Modules.Locations.Infrastructure.Services; /// /// Implementação do serviço de geocoding usando Nominatim (OpenStreetMap). diff --git a/src/Modules/Location/Tests/MeAjudaAi.Modules.Location.Tests.csproj b/src/Modules/Locations/Tests/MeAjudaAi.Modules.Locations.Tests.csproj similarity index 86% rename from src/Modules/Location/Tests/MeAjudaAi.Modules.Location.Tests.csproj rename to src/Modules/Locations/Tests/MeAjudaAi.Modules.Locations.Tests.csproj index 86e583e04..fabba1749 100644 --- a/src/Modules/Location/Tests/MeAjudaAi.Modules.Location.Tests.csproj +++ b/src/Modules/Locations/Tests/MeAjudaAi.Modules.Locations.Tests.csproj @@ -1,4 +1,4 @@ - + net9.0 @@ -18,9 +18,9 @@ - - - + + + diff --git a/src/Modules/Location/Tests/Unit/Application/ModuleApi/LocationsModuleApiTests.cs b/src/Modules/Locations/Tests/Unit/Application/ModuleApi/LocationsModuleApiTests.cs similarity index 96% rename from src/Modules/Location/Tests/Unit/Application/ModuleApi/LocationsModuleApiTests.cs rename to src/Modules/Locations/Tests/Unit/Application/ModuleApi/LocationsModuleApiTests.cs index 3945dda96..12cb86f1d 100644 --- a/src/Modules/Location/Tests/Unit/Application/ModuleApi/LocationsModuleApiTests.cs +++ b/src/Modules/Locations/Tests/Unit/Application/ModuleApi/LocationsModuleApiTests.cs @@ -1,13 +1,13 @@ using FluentAssertions; -using MeAjudaAi.Modules.Location.Application.ModuleApi; -using MeAjudaAi.Modules.Location.Application.Services; -using MeAjudaAi.Modules.Location.Domain.ValueObjects; +using MeAjudaAi.Modules.Locations.Application.ModuleApi; +using MeAjudaAi.Modules.Locations.Application.Services; +using MeAjudaAi.Modules.Locations.Domain.ValueObjects; using MeAjudaAi.Shared.Geolocation; using Microsoft.Extensions.Logging; using Moq; using Xunit; -namespace MeAjudaAi.Modules.Location.Tests.Unit.Application.ModuleApi; +namespace MeAjudaAi.Modules.Locations.Tests.Unit.Application.ModuleApi; [Trait("Category", "Unit")] public sealed class LocationsModuleApiTests diff --git a/src/Modules/Location/Tests/Unit/Domain/ValueObjects/AddressTests.cs b/src/Modules/Locations/Tests/Unit/Domain/ValueObjects/AddressTests.cs similarity index 98% rename from src/Modules/Location/Tests/Unit/Domain/ValueObjects/AddressTests.cs rename to src/Modules/Locations/Tests/Unit/Domain/ValueObjects/AddressTests.cs index 8e489208d..76b900d49 100644 --- a/src/Modules/Location/Tests/Unit/Domain/ValueObjects/AddressTests.cs +++ b/src/Modules/Locations/Tests/Unit/Domain/ValueObjects/AddressTests.cs @@ -1,9 +1,9 @@ using FluentAssertions; -using MeAjudaAi.Modules.Location.Domain.ValueObjects; +using MeAjudaAi.Modules.Locations.Domain.ValueObjects; using MeAjudaAi.Shared.Geolocation; using Xunit; -namespace MeAjudaAi.Modules.Location.Tests.Unit.Domain.ValueObjects; +namespace MeAjudaAi.Modules.Locations.Tests.Unit.Domain.ValueObjects; public sealed class AddressTests { diff --git a/src/Modules/Location/Tests/Unit/Domain/ValueObjects/CepTests.cs b/src/Modules/Locations/Tests/Unit/Domain/ValueObjects/CepTests.cs similarity index 96% rename from src/Modules/Location/Tests/Unit/Domain/ValueObjects/CepTests.cs rename to src/Modules/Locations/Tests/Unit/Domain/ValueObjects/CepTests.cs index dde2e52e2..d9d103437 100644 --- a/src/Modules/Location/Tests/Unit/Domain/ValueObjects/CepTests.cs +++ b/src/Modules/Locations/Tests/Unit/Domain/ValueObjects/CepTests.cs @@ -1,8 +1,8 @@ using FluentAssertions; -using MeAjudaAi.Modules.Location.Domain.ValueObjects; +using MeAjudaAi.Modules.Locations.Domain.ValueObjects; using Xunit; -namespace MeAjudaAi.Modules.Location.Tests.Unit.Domain.ValueObjects; +namespace MeAjudaAi.Modules.Locations.Tests.Unit.Domain.ValueObjects; public sealed class CepTests { diff --git a/tests/MeAjudaAi.Integration.Tests/MeAjudaAi.Integration.Tests.csproj b/tests/MeAjudaAi.Integration.Tests/MeAjudaAi.Integration.Tests.csproj index 07842813d..76185cb37 100644 --- a/tests/MeAjudaAi.Integration.Tests/MeAjudaAi.Integration.Tests.csproj +++ b/tests/MeAjudaAi.Integration.Tests/MeAjudaAi.Integration.Tests.csproj @@ -67,9 +67,9 @@ - - - + + + diff --git a/tests/MeAjudaAi.Integration.Tests/Modules/Location/CepLookupIntegrationTests.cs b/tests/MeAjudaAi.Integration.Tests/Modules/Location/CepLookupIntegrationTests.cs index 3aecf2641..76dcb347b 100644 --- a/tests/MeAjudaAi.Integration.Tests/Modules/Location/CepLookupIntegrationTests.cs +++ b/tests/MeAjudaAi.Integration.Tests/Modules/Location/CepLookupIntegrationTests.cs @@ -1,6 +1,6 @@ using System.Net; using FluentAssertions; -using MeAjudaAi.Modules.Location.Infrastructure.ExternalApis.Clients; +using MeAjudaAi.Modules.Locations.Infrastructure.ExternalApis.Clients; using MeAjudaAi.Shared.Caching; using MeAjudaAi.Shared.Contracts.Modules.Location; using MeAjudaAi.Shared.Tests.Mocks; diff --git a/tests/MeAjudaAi.Integration.Tests/Modules/Location/GeocodingIntegrationTests.cs b/tests/MeAjudaAi.Integration.Tests/Modules/Location/GeocodingIntegrationTests.cs index 493b468f3..a0feedd85 100644 --- a/tests/MeAjudaAi.Integration.Tests/Modules/Location/GeocodingIntegrationTests.cs +++ b/tests/MeAjudaAi.Integration.Tests/Modules/Location/GeocodingIntegrationTests.cs @@ -1,6 +1,6 @@ using System.Net; using FluentAssertions; -using MeAjudaAi.Modules.Location.Infrastructure.ExternalApis.Clients; +using MeAjudaAi.Modules.Locations.Infrastructure.ExternalApis.Clients; using MeAjudaAi.Shared.Caching; using MeAjudaAi.Shared.Contracts.Modules.Location; using MeAjudaAi.Shared.Tests.Mocks; diff --git a/tests/MeAjudaAi.Integration.Tests/Modules/Location/LocationIntegrationTestFixture.cs b/tests/MeAjudaAi.Integration.Tests/Modules/Location/LocationIntegrationTestFixture.cs index 13e463c15..e3dfcaddd 100644 --- a/tests/MeAjudaAi.Integration.Tests/Modules/Location/LocationIntegrationTestFixture.cs +++ b/tests/MeAjudaAi.Integration.Tests/Modules/Location/LocationIntegrationTestFixture.cs @@ -1,4 +1,4 @@ -using MeAjudaAi.Modules.Location.Infrastructure.ExternalApis.Clients; +using MeAjudaAi.Modules.Locations.Infrastructure.ExternalApis.Clients; using MeAjudaAi.Shared.Caching; using MeAjudaAi.Shared.Tests.Mocks; using MeAjudaAi.Shared.Tests.Mocks.Http; @@ -46,9 +46,9 @@ public virtual async ValueTask InitializeAsync() HttpMockBuilder = new MockHttpClientBuilder(services); ConfigureHttpClients(HttpMockBuilder); - // Adiciona serviços do módulo Location + // Adiciona serviços do módulo Locations var configuration = new ConfigurationBuilder().Build(); - MeAjudaAi.Modules.Location.Infrastructure.Extensions.AddLocationModule(services, configuration); + MeAjudaAi.Modules.Locations.Infrastructure.Extensions.AddLocationModule(services, configuration); ServiceProvider = services.BuildServiceProvider(); await Task.CompletedTask;