From be86ad1604d84bb6da0153e300cbf5524fc57e9a Mon Sep 17 00:00:00 2001 From: Rene Evertz Date: Wed, 22 Oct 2025 11:35:49 +0200 Subject: [PATCH] =?UTF-8?q?Ordnerstruktur=20aufger=C3=A4umt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AiCoreUnitTest/AiCoreUnitTest.csproj | 4 - BeWoAI.sln | 32 +-- Host/Host.csproj | 2 +- Server/ApiFacade/ApiFacade.csproj | 60 ---- Server/ApiFacade/Core/HttpClientFacade.cs | 231 --------------- Server/ApiFacade/Core/JsonHttpClientFacade.cs | 48 ---- Server/ApiFacade/Core/WebClientFacade.cs | 268 ------------------ Server/ApiFacade/Properties/AssemblyInfo.cs | 33 --- Server/ApiFacade/README.txt | 23 -- .../Components/AICore}/AICore.csproj | 8 +- .../Context/Core/AiContextSummaryFactory.cs | 0 .../Context/Core/ContextEntryMapperFactory.cs | 0 .../AICore}/Context/Entry/BaseContextEntry.cs | 0 .../Detail/CustomerDetailContextEntry.cs | 0 .../Entry/Detail/DetailContextEntry.cs | 0 .../Detail/EmployeeDetailContextEntry.cs | 0 .../Detail/OrganisationDetailContextEntry.cs | 0 .../Entry/Detail/PersonDetailContextEntry.cs | 0 .../SupportConceptDetailContextEntry.cs | 0 .../CustomerNavigationContextEntry.cs | 0 .../EmployeeNavigationContextEntry.cs | 0 .../Navigation/NavigationContextEntry.cs | 0 .../OrganisationNavigationContextEntry.cs | 0 .../PersonNavigationContextEntry.cs | 0 .../Navigation/ServiceRecordContextEntry.cs | 0 .../SupportConceptNavigationContextEntry.cs | 0 .../EntryMapper/BaseContextEntryMapper.cs | 0 .../Detail/CustomerContextEntryMapper.cs | 0 .../Detail/EmployeeContextEntryMapper.cs | 0 .../Detail/OrganisationContextEntryMapper.cs | 0 .../Detail/PersonContextEntryMapper.cs | 0 .../Detail/ServiceRecordContextEntryMapper.cs | 0 .../SupportConceptContextEntryMapper.cs | 0 .../CustomerNavigationContextEntryMapper.cs | 0 .../EmployeeNavigationContextEntryMapper.cs | 0 ...rganisationNavigationContextEntryMapper.cs | 0 .../PersonNavigationContextEntryMapper.cs | 0 ...portConceptNavigationContextEntryMapper.cs | 0 .../Context/Interfaces/IContextSummary.cs | 0 .../Context/Summary/BaseContextSummary.cs | 0 .../Detail/CustomerDetailContextSummary.cs | 0 .../Summary/Detail/DetailContextSummary.cs | 0 .../Detail/EmployeeDetailContextSummary.cs | 0 .../OrganisationDetailContextSummary.cs | 0 .../Detail/PersonDetailContextSummary.cs | 0 .../SupportConceptDetailContextSummary.cs | 0 .../CustomerNavigationContextSummary.cs | 0 .../EmployeeNavigationContextSummary.cs | 0 .../Navigation/NavigationContextSummary.cs | 0 .../OrganisationNavigationContextSummary.cs | 0 .../PersonNavigationContextSummary.cs | 0 .../ServiceRecordNavigationContextSummary.cs | 0 .../SupportConceptNavigationContextSummary.cs | 0 .../SummaryParser/BaseContextSummaryParser.cs | 0 .../SummaryParser/CsvContextSummaryParser.cs | 0 .../SummaryParser/JsonContextSummaryParser.cs | 0 .../AICore}/Facade/DefaultErrorExtractor.cs | 0 .../AICore}/Facade/LLM/BaseLLMApiClient.cs | 0 .../AICore}/Facade/LLM/OllamaApiClient.cs | 0 .../AICore}/Facade/LLM/OpenWebApiClient.cs | 0 .../AICore}/Prompt/Core/AiPromptBuilder.cs | 0 .../Components/AICore}/Prompt/Core/AiUtils.cs | 0 .../Prompt/Models/AiConversationContext.cs | 0 .../Prompt/SystemPrompts/system_prompt1.txt | 0 .../Prompt/SystemPrompts/system_prompt2.txt | 0 .../Prompt/SystemPrompts/system_prompt3.txt | 0 .../AICore}/Properties/AssemblyInfo.cs | 0 .../Components/AICore}/app.config | 0 .../Components/AICore}/packages.config | 0 Server/Components/README.txt | 10 + .../ApiFacade/HttpClientFacade.cs | 0 .../ApiFacade/JsonHttpClientFacade.cs | 0 .../ServerUtils}/ApiFacade/WebClientFacade.cs | 0 .../ServerUtils}/Core/MergedConfig.cs | 0 .../ServerUtils}/Properties/AssemblyInfo.cs | 0 .../Components/ServerUtils}/README.txt | 0 .../ServerUtils}/ServerUtils.csproj | 6 +- Service/Service.csproj | 4 - 78 files changed, 17 insertions(+), 712 deletions(-) delete mode 100644 Server/ApiFacade/ApiFacade.csproj delete mode 100644 Server/ApiFacade/Core/HttpClientFacade.cs delete mode 100644 Server/ApiFacade/Core/JsonHttpClientFacade.cs delete mode 100644 Server/ApiFacade/Core/WebClientFacade.cs delete mode 100644 Server/ApiFacade/Properties/AssemblyInfo.cs delete mode 100644 Server/ApiFacade/README.txt rename {AICore => Server/Components/AICore}/AICore.csproj (96%) rename {AICore => Server/Components/AICore}/Context/Core/AiContextSummaryFactory.cs (100%) rename {AICore => Server/Components/AICore}/Context/Core/ContextEntryMapperFactory.cs (100%) rename {AICore => Server/Components/AICore}/Context/Entry/BaseContextEntry.cs (100%) rename {AICore => Server/Components/AICore}/Context/Entry/Detail/CustomerDetailContextEntry.cs (100%) rename {AICore => Server/Components/AICore}/Context/Entry/Detail/DetailContextEntry.cs (100%) rename {AICore => Server/Components/AICore}/Context/Entry/Detail/EmployeeDetailContextEntry.cs (100%) rename {AICore => Server/Components/AICore}/Context/Entry/Detail/OrganisationDetailContextEntry.cs (100%) rename {AICore => Server/Components/AICore}/Context/Entry/Detail/PersonDetailContextEntry.cs (100%) rename {AICore => Server/Components/AICore}/Context/Entry/Detail/SupportConceptDetailContextEntry.cs (100%) rename {AICore => Server/Components/AICore}/Context/Entry/Navigation/CustomerNavigationContextEntry.cs (100%) rename {AICore => Server/Components/AICore}/Context/Entry/Navigation/EmployeeNavigationContextEntry.cs (100%) rename {AICore => Server/Components/AICore}/Context/Entry/Navigation/NavigationContextEntry.cs (100%) rename {AICore => Server/Components/AICore}/Context/Entry/Navigation/OrganisationNavigationContextEntry.cs (100%) rename {AICore => Server/Components/AICore}/Context/Entry/Navigation/PersonNavigationContextEntry.cs (100%) rename {AICore => Server/Components/AICore}/Context/Entry/Navigation/ServiceRecordContextEntry.cs (100%) rename {AICore => Server/Components/AICore}/Context/Entry/Navigation/SupportConceptNavigationContextEntry.cs (100%) rename {AICore => Server/Components/AICore}/Context/EntryMapper/BaseContextEntryMapper.cs (100%) rename {AICore => Server/Components/AICore}/Context/EntryMapper/Detail/CustomerContextEntryMapper.cs (100%) rename {AICore => Server/Components/AICore}/Context/EntryMapper/Detail/EmployeeContextEntryMapper.cs (100%) rename {AICore => Server/Components/AICore}/Context/EntryMapper/Detail/OrganisationContextEntryMapper.cs (100%) rename {AICore => Server/Components/AICore}/Context/EntryMapper/Detail/PersonContextEntryMapper.cs (100%) rename {AICore => Server/Components/AICore}/Context/EntryMapper/Detail/ServiceRecordContextEntryMapper.cs (100%) rename {AICore => Server/Components/AICore}/Context/EntryMapper/Detail/SupportConceptContextEntryMapper.cs (100%) rename {AICore => Server/Components/AICore}/Context/EntryMapper/Navigation/CustomerNavigationContextEntryMapper.cs (100%) rename {AICore => Server/Components/AICore}/Context/EntryMapper/Navigation/EmployeeNavigationContextEntryMapper.cs (100%) rename {AICore => Server/Components/AICore}/Context/EntryMapper/Navigation/OrganisationNavigationContextEntryMapper.cs (100%) rename {AICore => Server/Components/AICore}/Context/EntryMapper/Navigation/PersonNavigationContextEntryMapper.cs (100%) rename {AICore => Server/Components/AICore}/Context/EntryMapper/Navigation/SupportConceptNavigationContextEntryMapper.cs (100%) rename {AICore => Server/Components/AICore}/Context/Interfaces/IContextSummary.cs (100%) rename {AICore => Server/Components/AICore}/Context/Summary/BaseContextSummary.cs (100%) rename {AICore => Server/Components/AICore}/Context/Summary/Detail/CustomerDetailContextSummary.cs (100%) rename {AICore => Server/Components/AICore}/Context/Summary/Detail/DetailContextSummary.cs (100%) rename {AICore => Server/Components/AICore}/Context/Summary/Detail/EmployeeDetailContextSummary.cs (100%) rename {AICore => Server/Components/AICore}/Context/Summary/Detail/OrganisationDetailContextSummary.cs (100%) rename {AICore => Server/Components/AICore}/Context/Summary/Detail/PersonDetailContextSummary.cs (100%) rename {AICore => Server/Components/AICore}/Context/Summary/Detail/SupportConceptDetailContextSummary.cs (100%) rename {AICore => Server/Components/AICore}/Context/Summary/Navigation/CustomerNavigationContextSummary.cs (100%) rename {AICore => Server/Components/AICore}/Context/Summary/Navigation/EmployeeNavigationContextSummary.cs (100%) rename {AICore => Server/Components/AICore}/Context/Summary/Navigation/NavigationContextSummary.cs (100%) rename {AICore => Server/Components/AICore}/Context/Summary/Navigation/OrganisationNavigationContextSummary.cs (100%) rename {AICore => Server/Components/AICore}/Context/Summary/Navigation/PersonNavigationContextSummary.cs (100%) rename {AICore => Server/Components/AICore}/Context/Summary/Navigation/ServiceRecordNavigationContextSummary.cs (100%) rename {AICore => Server/Components/AICore}/Context/Summary/Navigation/SupportConceptNavigationContextSummary.cs (100%) rename {AICore => Server/Components/AICore}/Context/SummaryParser/BaseContextSummaryParser.cs (100%) rename {AICore => Server/Components/AICore}/Context/SummaryParser/CsvContextSummaryParser.cs (100%) rename {AICore => Server/Components/AICore}/Context/SummaryParser/JsonContextSummaryParser.cs (100%) rename {AICore => Server/Components/AICore}/Facade/DefaultErrorExtractor.cs (100%) rename {AICore => Server/Components/AICore}/Facade/LLM/BaseLLMApiClient.cs (100%) rename {AICore => Server/Components/AICore}/Facade/LLM/OllamaApiClient.cs (100%) rename {AICore => Server/Components/AICore}/Facade/LLM/OpenWebApiClient.cs (100%) rename {AICore => Server/Components/AICore}/Prompt/Core/AiPromptBuilder.cs (100%) rename {AICore => Server/Components/AICore}/Prompt/Core/AiUtils.cs (100%) rename {AICore => Server/Components/AICore}/Prompt/Models/AiConversationContext.cs (100%) rename {AICore => Server/Components/AICore}/Prompt/SystemPrompts/system_prompt1.txt (100%) rename {AICore => Server/Components/AICore}/Prompt/SystemPrompts/system_prompt2.txt (100%) rename {AICore => Server/Components/AICore}/Prompt/SystemPrompts/system_prompt3.txt (100%) rename {AICore => Server/Components/AICore}/Properties/AssemblyInfo.cs (100%) rename {AICore => Server/Components/AICore}/app.config (100%) rename {AICore => Server/Components/AICore}/packages.config (100%) create mode 100644 Server/Components/README.txt rename {ServiceUtils => Server/Components/ServerUtils}/ApiFacade/HttpClientFacade.cs (100%) rename {ServiceUtils => Server/Components/ServerUtils}/ApiFacade/JsonHttpClientFacade.cs (100%) rename {ServiceUtils => Server/Components/ServerUtils}/ApiFacade/WebClientFacade.cs (100%) rename {ServiceUtils => Server/Components/ServerUtils}/Core/MergedConfig.cs (100%) rename {ServiceUtils => Server/Components/ServerUtils}/Properties/AssemblyInfo.cs (100%) rename {ServiceUtils => Server/Components/ServerUtils}/README.txt (100%) rename {ServiceUtils => Server/Components/ServerUtils}/ServerUtils.csproj (93%) diff --git a/AiCoreUnitTest/AiCoreUnitTest.csproj b/AiCoreUnitTest/AiCoreUnitTest.csproj index 0723a5f99..5f348aa02 100644 --- a/AiCoreUnitTest/AiCoreUnitTest.csproj +++ b/AiCoreUnitTest/AiCoreUnitTest.csproj @@ -57,10 +57,6 @@ - - {69D70CA9-0DF9-419E-BFAF-F4539F129BD9} - AICore - {B0D73E3D-4AE7-4024-93A6-DB1F46D7CCEE} Data diff --git a/BeWoAI.sln b/BeWoAI.sln index d83c0dba8..f3ab36979 100644 --- a/BeWoAI.sln +++ b/BeWoAI.sln @@ -43,11 +43,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Translation", "Translation" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TranslationUnitTest", "TranslationUnitTest\TranslationUnitTest.csproj", "{83C43FEC-233D-49EF-BD23-BF842A3EBDF5}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Features", "Features", "{830D2912-108B-4946-A3BE-CE4ECD50819F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AICore", "AICore\AICore.csproj", "{69D70CA9-0DF9-419E-BFAF-F4539F129BD9}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServerUtils", "ServiceUtils\ServerUtils.csproj", "{EC2349FB-7FE0-4AD1-B28B-A7A27AF80A57}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Components", "Components", "{830D2912-108B-4946-A3BE-CE4ECD50819F}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AI", "AI", "{084C391D-FCE1-4984-87FA-F8F9CFCC6A4F}" EndProject @@ -199,30 +195,6 @@ Global {83C43FEC-233D-49EF-BD23-BF842A3EBDF5}.Release|Any CPU.Build.0 = Release|Any CPU {83C43FEC-233D-49EF-BD23-BF842A3EBDF5}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {83C43FEC-233D-49EF-BD23-BF842A3EBDF5}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {69D70CA9-0DF9-419E-BFAF-F4539F129BD9}.Debug|.NET.ActiveCfg = Debug|Any CPU - {69D70CA9-0DF9-419E-BFAF-F4539F129BD9}.Debug|.NET.Build.0 = Debug|Any CPU - {69D70CA9-0DF9-419E-BFAF-F4539F129BD9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {69D70CA9-0DF9-419E-BFAF-F4539F129BD9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {69D70CA9-0DF9-419E-BFAF-F4539F129BD9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {69D70CA9-0DF9-419E-BFAF-F4539F129BD9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {69D70CA9-0DF9-419E-BFAF-F4539F129BD9}.Release|.NET.ActiveCfg = Release|Any CPU - {69D70CA9-0DF9-419E-BFAF-F4539F129BD9}.Release|.NET.Build.0 = Release|Any CPU - {69D70CA9-0DF9-419E-BFAF-F4539F129BD9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {69D70CA9-0DF9-419E-BFAF-F4539F129BD9}.Release|Any CPU.Build.0 = Release|Any CPU - {69D70CA9-0DF9-419E-BFAF-F4539F129BD9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {69D70CA9-0DF9-419E-BFAF-F4539F129BD9}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {EC2349FB-7FE0-4AD1-B28B-A7A27AF80A57}.Debug|.NET.ActiveCfg = Debug|Any CPU - {EC2349FB-7FE0-4AD1-B28B-A7A27AF80A57}.Debug|.NET.Build.0 = Debug|Any CPU - {EC2349FB-7FE0-4AD1-B28B-A7A27AF80A57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EC2349FB-7FE0-4AD1-B28B-A7A27AF80A57}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EC2349FB-7FE0-4AD1-B28B-A7A27AF80A57}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {EC2349FB-7FE0-4AD1-B28B-A7A27AF80A57}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {EC2349FB-7FE0-4AD1-B28B-A7A27AF80A57}.Release|.NET.ActiveCfg = Release|Any CPU - {EC2349FB-7FE0-4AD1-B28B-A7A27AF80A57}.Release|.NET.Build.0 = Release|Any CPU - {EC2349FB-7FE0-4AD1-B28B-A7A27AF80A57}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EC2349FB-7FE0-4AD1-B28B-A7A27AF80A57}.Release|Any CPU.Build.0 = Release|Any CPU - {EC2349FB-7FE0-4AD1-B28B-A7A27AF80A57}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {EC2349FB-7FE0-4AD1-B28B-A7A27AF80A57}.Release|Mixed Platforms.Build.0 = Release|Any CPU {68C1F8EA-7828-4E46-8F04-91105C55860E}.Debug|.NET.ActiveCfg = Debug|Any CPU {68C1F8EA-7828-4E46-8F04-91105C55860E}.Debug|.NET.Build.0 = Debug|Any CPU {68C1F8EA-7828-4E46-8F04-91105C55860E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU @@ -254,8 +226,6 @@ Global {B331128C-7E9F-4BDC-B509-A8DAE1B94E5C} = {CCD6B644-49E7-4A11-BD8F-607088A4AC83} {83C43FEC-233D-49EF-BD23-BF842A3EBDF5} = {B331128C-7E9F-4BDC-B509-A8DAE1B94E5C} {830D2912-108B-4946-A3BE-CE4ECD50819F} = {FEB0336B-F053-40B6-92DD-7DE56AB9408A} - {69D70CA9-0DF9-419E-BFAF-F4539F129BD9} = {830D2912-108B-4946-A3BE-CE4ECD50819F} - {EC2349FB-7FE0-4AD1-B28B-A7A27AF80A57} = {FEB0336B-F053-40B6-92DD-7DE56AB9408A} {084C391D-FCE1-4984-87FA-F8F9CFCC6A4F} = {CCD6B644-49E7-4A11-BD8F-607088A4AC83} {68C1F8EA-7828-4E46-8F04-91105C55860E} = {084C391D-FCE1-4984-87FA-F8F9CFCC6A4F} EndGlobalSection diff --git a/Host/Host.csproj b/Host/Host.csproj index 82afdac34..cb14d1920 100644 --- a/Host/Host.csproj +++ b/Host/Host.csproj @@ -541,7 +541,7 @@ - {47331732-DD96-4075-869F-83AA9F3F9937} + {47331732-dd96-4075-869f-83aa9f3f9937} Dakota diff --git a/Server/ApiFacade/ApiFacade.csproj b/Server/ApiFacade/ApiFacade.csproj deleted file mode 100644 index 5469b6b34..000000000 --- a/Server/ApiFacade/ApiFacade.csproj +++ /dev/null @@ -1,60 +0,0 @@ - - - - - Debug - AnyCPU - {4B2F3959-3CDA-4514-83A2-FA3C24E57BB7} - Library - Properties - BeWo.Server.ApiFacade - BeWo.Server.ApiFacade - v4.7.2 - 512 - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - {2F50B83D-A3F0-4EC4-979A-3F9B7E3D8ED4} - Shared - - - - - - - \ No newline at end of file diff --git a/Server/ApiFacade/Core/HttpClientFacade.cs b/Server/ApiFacade/Core/HttpClientFacade.cs deleted file mode 100644 index 38407b719..000000000 --- a/Server/ApiFacade/Core/HttpClientFacade.cs +++ /dev/null @@ -1,231 +0,0 @@ -using BS.Shared.Core; -using BS.Shared.DataContracts; -using BS.Shared.Exceptions; -using BS.Shared.Interface; -using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.Diagnostics.Eventing.Reader; -using System.Linq; -using System.Net; -using System.Net.Http; -using System.Net.Security; -using System.Net.Sockets; -using System.Runtime.CompilerServices; -using System.Security.Authentication; -using System.Security.Cryptography.X509Certificates; -using System.Text; -using System.Threading.Tasks; - -namespace BeWo.Server.ApiFacade.Core -{ - public class HttpClientFacade - { - public HttpClientFacade(string base_url, string api_key, bool directConntect = true) - { - if (string.IsNullOrEmpty(base_url)) - throw new ArgumentNullException("HttpClient: base_url is missing"); - - if (string.IsNullOrWhiteSpace(api_key)) - throw new ArgumentNullException("HttpClient: token is missing"); - - Base_Url = base_url; - SetToken(api_key); - DirectConnect = directConntect; - } - - public bool DirectConnect { get; private set; } - public string Base_Url { get; private set; } - - public HttpMethod Method { get; set; } = HttpMethod.Get; - public Dictionary Headers { get; set; } = new Dictionary(); - public Dictionary Parameters { get; set; } = new Dictionary(); - public string ContentType { get; set; } = "application/x-www-form-urlencoded"; - public Encoding Encoding { get; set; } = Encoding.UTF8; - public TimeSpan Timeout { get; set; } = TimeSpan.FromSeconds(30); - - /// - /// Führt einen Request aus, erwartet einen komplexen Datentyp: Schaue Verweise für Beispiele. - /// - /// - /// - /// - /// - /// - public virtual async Task> GetAnonymousTypeAsync(string method, T anonymousType, IApiErrorExtractor extractor) - { - var http_response = await getResponseAsync(method).ConfigureAwait(false); - - if (!http_response.IsSuccessStatusCode) - { - return ApiResponse.FailureResponse(AppError.ApiResponseFailed, http_response.ReasonPhrase, (int)http_response.StatusCode); - } - - var json = await http_response.Content.ReadAsStringAsync().ConfigureAwait(false); - - return parse(() => JsonConvert.DeserializeAnonymousType(json, anonymousType), json, extractor); - } - - /// - /// Führt einen Request aus, erwartet einen einfachen Datentyp wie: string, int, decimal, byte[] - - /// Liste kann gerne erweitert werden - /// - /// - /// - /// - /// - /// - public virtual async Task> GetAsync(string method, IApiErrorExtractor extractor) - { - var http_response = await getResponseAsync(method).ConfigureAwait(false); - - if (!http_response.IsSuccessStatusCode) - { - return ApiResponse.FailureResponse(AppError.ApiResponseFailed, http_response.ReasonPhrase, (int)http_response.StatusCode); - } - - var content = await http_response.Content.ReadAsStringAsync().ConfigureAwait(false); - object result; - - var type = typeof(T); - if (type == typeof(string)) - { - result = content; - } - else if (type == typeof(int)) - { - result = int.Parse(content); - } - else if (type == typeof(decimal)) - { - result = decimal.Parse(content); - } - else if (type == typeof(byte[])) - { - result = await http_response.Content.ReadAsByteArrayAsync().ConfigureAwait(false); - } - else - { - throw new BeWoInvalidOperationException(AppError.UnsupportedType(typeof(T))); - } - - return parse(() => (T)result, content, extractor); - } - - private static bool ServerCertificateCustomValidation(HttpRequestMessage requestMessage, X509Certificate2 certificate, X509Chain chain, SslPolicyErrors sslErrors) - { - // It is possible to inspect the certificate provided by the server. - Console.WriteLine($"Requested URI: {requestMessage.RequestUri}"); - Console.WriteLine($"Effective date: {certificate?.GetEffectiveDateString()}"); - Console.WriteLine($"Exp date: {certificate?.GetExpirationDateString()}"); - Console.WriteLine($"Issuer: {certificate?.Issuer}"); - Console.WriteLine($"Subject: {certificate?.Subject}"); - - // Based on the custom logic it is possible to decide whether the client considers certificate valid or not - Console.WriteLine($"Errors: {sslErrors}"); - return sslErrors == SslPolicyErrors.None; - } - - private protected virtual async Task getResponseAsync(string method) - { - var handler = new HttpClientHandler - { - ServerCertificateCustomValidationCallback = ServerCertificateCustomValidation, - SslProtocols = SslProtocols.Tls12 | SslProtocols.Tls11 | SslProtocols.Tls, - }; - - using (var client = new HttpClient(handler) { Timeout = Timeout }) - { - var requestUri = BS.Shared.Core.Utilities.WebUtils.CombineUrl(Base_Url, method); - - if (Method == HttpMethod.Get && Parameters.Count > 0) - { - var query = string.Join("&", Parameters.Select(p => $"{Uri.EscapeDataString(p.Key)}={Uri.EscapeDataString(p.Value)}")); - requestUri += (Base_Url.Contains("?") ? "&" : "?") + query; - } - - using (var request = new HttpRequestMessage(Method, requestUri)) - { - await checkForDirect(request).ConfigureAwait(false); - - // Add headers - foreach (var header in Headers) - request.Headers.TryAddWithoutValidation(header.Key, header.Value); - - // Add body if POST or PUT - if (Method == HttpMethod.Post || Method == HttpMethod.Put) - { - var content = new FormUrlEncodedContent(Parameters); - var bytes = await content.ReadAsByteArrayAsync().ConfigureAwait(false); - request.Content = new ByteArrayContent(bytes); - request.Content.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue(ContentType); - } - - return await client.SendAsync(request).ConfigureAwait(false); - } - } - } - - private protected async Task checkForDirect(HttpRequestMessage request) - { - if (!DirectConnect || request.RequestUri is null) - return; - - var host = request.RequestUri.DnsSafeHost; - var isSslSession = request.RequestUri.ToString().StartsWith("https://"); - - try - { - // DNS-Auflösung für den Hostnamen durchführen - var ipAddresses = await Dns.GetHostAddressesAsync(host).ConfigureAwait(false); - - // Erste verfügbare IP-Adresse verwenden (IPv4 bevorzugen) - var targetIp = ipAddresses.FirstOrDefault(ip => ip.AddressFamily == AddressFamily.InterNetwork) - ?? ipAddresses.FirstOrDefault(); - - if (targetIp != null) - { - request.RequestUri = new Uri($"{(isSslSession ? "https://" : "http://")}{targetIp}{request.RequestUri.PathAndQuery}"); - request.Headers.Host = host; - } - } - catch (Exception ex) - { - // Fallback: Original URI beibehalten bei DNS-Fehlern - // Optional: Logging des Fehlers - Console.WriteLine($"DNS resolution failed for {host}: {ex.Message}"); - } - } - - private void SetToken(string api_key) - { - var key = nameof(HttpRequestHeader.Authorization); - var token = $"Bearer {api_key}"; - - if (Headers.ContainsKey(key)) - { - Headers[key] = token; - } - else - { - Headers.Add(key, token); - } - } - - private ApiResponse parse(Func func, string json, IApiErrorExtractor errorExtractor) - { - try - { - // Versuch, die erwartete Struktur zu deserialisieren - var data = func(); - - return ApiResponse.SuccessResponse(data); - } - catch (JsonException) - { - // Falls normale Deserialisierung fehlschlägt, versuche Fehler zu extrahieren - return ApiResponse.FailureResponse(AppError.JsonParsingError, errorExtractor.ExtractError(json).ToList()); - } - } - } -} diff --git a/Server/ApiFacade/Core/JsonHttpClientFacade.cs b/Server/ApiFacade/Core/JsonHttpClientFacade.cs deleted file mode 100644 index f1081ea63..000000000 --- a/Server/ApiFacade/Core/JsonHttpClientFacade.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net.Http; -using System.Text; -using System.Threading.Tasks; -using System.IO; -using Newtonsoft.Json; - -namespace BeWo.Server.ApiFacade.Core -{ - public class JsonHttpClientFacade : HttpClientFacade - { - public object JsonObject { get; set; } - - public JsonHttpClientFacade(string base_url, string api_key, bool directConnect = true) : base(base_url, api_key, directConnect) - { - ContentType = "application/json"; - Method = HttpMethod.Post; - } - - private protected override async Task getResponseAsync(string method) - { - using (var client = new HttpClient { Timeout = Timeout }) - { - var requestUri = BS.Shared.Core.Utilities.WebUtils.CombineUrl(Base_Url, method); - - using (var request = new HttpRequestMessage(Method, requestUri)) - { - await checkForDirect(request).ConfigureAwait(false); - - // Add headers - foreach (var header in Headers) - request.Headers.TryAddWithoutValidation(header.Key, header.Value); - - // Add body if POST or PUT - if (Method == HttpMethod.Post || Method == HttpMethod.Put) - { - var json = JsonConvert.SerializeObject(JsonObject); - request.Content = new StringContent(json, Encoding, "application/json"); - } - - return await client.SendAsync(request).ConfigureAwait(false); - } - } - } - } -} diff --git a/Server/ApiFacade/Core/WebClientFacade.cs b/Server/ApiFacade/Core/WebClientFacade.cs deleted file mode 100644 index aa24232d6..000000000 --- a/Server/ApiFacade/Core/WebClientFacade.cs +++ /dev/null @@ -1,268 +0,0 @@ -using BS.Shared.Extensions; -using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.Linq; -using System.Net; -using System.Security.Policy; -using System.Text; -using System.Threading.Tasks; - -namespace BeWo.Server.ApiFacade.Core -{ - public class WebClientFacade - { - // - // GET - // - protected TRes SendGet(string sub_url, string token = null) - => Get(sub_url, token); - protected Task SendGetAsync(string sub_url, string token = null) - => GetAsync(sub_url, token); - - // - // POST - // - protected TRes SendPostUploadString(string sub_url, TReq req, string token = null) - => SendUploadString(sub_url, "POST", req, token); - protected TRes SendPostUploadValues(string sub_url, TReq req, string token = null) - => SendUploadValues(sub_url, "POST", req, token); - protected byte[] SendPostUploadValuesRaw(string sub_url, TReq req, string token = null) - => SendUploadValuesRaw(sub_url, "POST", req, token); - protected Task SendPostUploadStringAsync(string sub_url, TReq req, string token = null) - => SendUploadStringAsync(sub_url, "POST", req, token); - protected Task SendPostUploadValuesAsync(string sub_url, TReq req, string token = null) - => SendUploadValuesAsync(sub_url, "POST", req, token); - protected Task SendPostUploadValuesAsyncRaw(string sub_url, TReq req, string token = null) - => SendUploadValuesRawAsync(sub_url, "POST", req, token); - - #region private - // - // Requests - // - private TRes Get(string sub_url, string token = null) - { - var url = getUrl(sub_url); - - string response = Get(url, token); - - return deserialize(response); - } - private TRes SendUploadString(string sub_url, string method, TReq req, string token = null) - { - var data = serializeJson(req); - var url = getUrl(sub_url); - - string response = SendUploadString(url, method, data, token); - - return deserialize(response); - } - private TRes SendUploadValues(string sub_url, string method, TReq req, string token = null) - { - var data = serialize(req); - var url = getUrl(sub_url); - - string response = SendUploadValues(url, method, data, token); - - return deserialize(response); - } - private byte[] SendUploadValuesRaw(string sub_url, string method, TReq req, string token = null) - { - var data = serialize(req); - var url = getUrl(sub_url); - - var response = SendUploadValuesRaww(url, method, data, token); - - return response; - } - private async Task GetAsync(string sub_url, string token = null) - { - var url = getUrl(sub_url); - - string response = await GetAsync(url, token); - - return deserialize(response); - } - private async Task SendUploadStringAsync(string sub_url, string method, TReq req, string token = null) - { - var data = serializeJson(req); - var url = getUrl(sub_url); - - string response = await SendUploadStringAsync(url, method, data, token); - - return deserialize(response); - } - private async Task SendUploadValuesAsync(string sub_url, string method, TReq req, string token = null) - { - var data = serialize(req); - var url = getUrl(sub_url); - - string response = await SendUploadValuesAsync(url, method, data, token); - - return deserialize(response); - } - private async Task SendUploadValuesRawAsync(string sub_url, string method, TReq req, string token = null) - { - var data = serialize(req); - var url = getUrl(sub_url); - - var response = await SendUploadValuesRawAsync(url, method, data, token); - - return response; - } - - // - // String - // - private string Get(string url, string token = null) - => exec(true, client => client.DownloadString(url), token); - private string SendUploadString(string url, string method, string request, string token = null) - => exec(false, client => client.UploadString(url, method, request), token); - private string SendUploadValues(string url, string method, T request, string token = null) - => exec(false, client => Encoding.UTF8.GetString(client.UploadValues(url, method, request?.ToNameValueCollection())), token); - private byte[] SendUploadValuesRaww(string url, string method, T request, string token = null) - => execraw(false, client => client.UploadValues(url, method, request?.ToNameValueCollection()), token); - private Task GetAsync(string url, string token = null) - => execasync(true, client => client.DownloadStringTaskAsync(url), token); - private Task SendUploadStringAsync(string url, string method, string request, string token = null) - => execasync(false, client => client.UploadStringTaskAsync(url, method, request), token); - private Task SendUploadValuesAsync(string url, string method, T request, string token = null) - => execasync(false, async client => Encoding.UTF8.GetString(await client.UploadValuesTaskAsync(url, method, request?.ToNameValueCollection()).ConfigureAwait(false)), token); - private Task SendUploadValuesRawAsync(string url, string method, T request, string token = null) - => execasyncraw(false, async client => await client.UploadValuesTaskAsync(url, method, request?.ToNameValueCollection()).ConfigureAwait(false), token); - - // - // Base - // - private string exec(bool override_header, Func action, string token = null) - { - string response; - - using (WebClient client = new WebClient()) - { - //client.Encoding = Encoding.Default; - client.Encoding = Encoding.UTF8; - - if (override_header) - client.Headers.Add(HttpRequestHeader.ContentType, "application/json"); - - if (token != null) - client.Headers.Set(HttpRequestHeader.Authorization, "Bearer " + token); - - response = action(client); - } - - return response; - } - private byte[] execraw(bool override_header, Func action, string token = null) - { - byte[] response; - - using (WebClient client = new WebClient()) - { - //client.Encoding = Encoding.Default; - client.Encoding = Encoding.UTF8; - - if (override_header) - client.Headers.Add(HttpRequestHeader.ContentType, "application/json"); - - if (token != null) - client.Headers.Set(HttpRequestHeader.Authorization, "Bearer " + token); - - response = action(client); - } - - return response; - } - private async Task execasync(bool override_header, Func> action, string token = null) - { - string response; - - using (WebClient client = new WebClient()) - { - //client.Encoding = Encoding.Default; - client.Encoding = Encoding.UTF8; - - if (override_header) - client.Headers.Add(HttpRequestHeader.ContentType, "application/json"); - - if (token != null) - client.Headers.Set(HttpRequestHeader.Authorization, "Bearer " + token); - - response = await action(client); - } - - return response; - } - private async Task execasyncraw(bool override_header, Func> action, string token = null) - { - byte[] response; - - using (WebClient client = new WebClient()) - { - //client.Encoding = Encoding.Default; - client.Encoding = Encoding.UTF8; - - if (override_header) - client.Headers.Add(HttpRequestHeader.ContentType, "application/json"); - - if (token != null) - client.Headers.Set(HttpRequestHeader.Authorization, "Bearer " + token); - - response = await action(client); - } - - return response; - } - - private T deserialize(string input) - { - if (string.IsNullOrEmpty(input)) - return default; - - if (typeof(T) == typeof(string)) - return (T)(object)input; - - if (typeof(T) == typeof(byte[])) - return (T)(object)Encoding.UTF8.GetBytes(input); - - var t = JsonConvert.DeserializeObject(input); - - return t; - } - private IDictionary serialize(T input) - { - return input?.ToKeyValue(); - } - private string serializeJson(T input) - { - if (typeof(T) == typeof(string)) - return input as string; - - var t = JsonConvert.SerializeObject(input); - - return t; - } - #endregion - - protected virtual string getKey() - { - return null; - } - - protected virtual string getUrl() - { - return null; - } - - private string getUrl(string sub_url) - { - var root = getUrl(); - var baseUri = new Uri(root); - var uri = new Uri(baseUri, sub_url); - var url = uri.ToString(); - return url; - } - } -} diff --git a/Server/ApiFacade/Properties/AssemblyInfo.cs b/Server/ApiFacade/Properties/AssemblyInfo.cs deleted file mode 100644 index 411668c9a..000000000 --- a/Server/ApiFacade/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// Allgemeine Informationen über eine Assembly werden über die folgenden -// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, -// die einer Assembly zugeordnet sind. -[assembly: AssemblyTitle("ClassLibrary1")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ClassLibrary1")] -[assembly: AssemblyCopyright("Copyright © 2025")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly -// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von -// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen. -[assembly: ComVisible(false)] - -// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird -[assembly: Guid("4b2f3959-3cda-4514-83a2-fa3c24e57bb7")] - -// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: -// -// Hauptversion -// Nebenversion -// Buildnummer -// Revision -// -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Server/ApiFacade/README.txt b/Server/ApiFacade/README.txt deleted file mode 100644 index 9621956b7..000000000 --- a/Server/ApiFacade/README.txt +++ /dev/null @@ -1,23 +0,0 @@ -Betreff: Projektübersicht: API-Kommunikations-Facade - - -Hallo zusammen! Dies ist eine kleine Info über das Projekt. -Ich habe mir dieses Projekt auf der selben Ebenen wie Data gedacht. - -Data: ist ein Projekt, was speziell für die Datenbank Logik dient. -ApiFacade: soll im Gegenzug ein Projekt darstellen, was rein für die API Kommunikation gedacht ist. - -Aktuell beinhaltet es die basischen Klassen HttpClientFacade und JsonHttpClientFacade. -WebClientFacade wird nicht benutzt. - -HttpClientFacade stellt eine Facade für einen Api Endpunkt bereit, welche mit GET angesporchen werden. -Parameter werden dabei in der Query übergeben, der Body bleibt unberüht! - -JsonClientFacade stellt eine Facade für Api Endpunkte bereit, welche mit POST angesprochen werden. - -Es wäre hier definitiv eine Überlegung wert, ob man die konkreten Implentiereungen nicht doch auch hier vornimmt, -sauber getrennt durch Ordner. -Das wäre auch nicht so schlecht, weil Data als Idee auch abgeschlossen für die DB Interaktionen dient. -Ich behalte das mal im Hinterkopf, es würde wenn den gesamten Ordner Server/Features/AICore/Facade betreffen. - -Danke fürs lesen :) \ No newline at end of file diff --git a/AICore/AICore.csproj b/Server/Components/AICore/AICore.csproj similarity index 96% rename from AICore/AICore.csproj rename to Server/Components/AICore/AICore.csproj index 1a2576420..4a8faea84 100644 --- a/AICore/AICore.csproj +++ b/Server/Components/AICore/AICore.csproj @@ -8,7 +8,7 @@ Library Properties AICore - BeWo.Features.AICore + BeWo.Components.AICore v4.7.2 512 true @@ -115,11 +115,7 @@ - - {EC2349FB-7FE0-4AD1-B28B-A7A27AF80A57} - ServerUtils - - + {2f50b83d-a3f0-4ec4-979a-3f9b7e3d8ed4} Shared diff --git a/AICore/Context/Core/AiContextSummaryFactory.cs b/Server/Components/AICore/Context/Core/AiContextSummaryFactory.cs similarity index 100% rename from AICore/Context/Core/AiContextSummaryFactory.cs rename to Server/Components/AICore/Context/Core/AiContextSummaryFactory.cs diff --git a/AICore/Context/Core/ContextEntryMapperFactory.cs b/Server/Components/AICore/Context/Core/ContextEntryMapperFactory.cs similarity index 100% rename from AICore/Context/Core/ContextEntryMapperFactory.cs rename to Server/Components/AICore/Context/Core/ContextEntryMapperFactory.cs diff --git a/AICore/Context/Entry/BaseContextEntry.cs b/Server/Components/AICore/Context/Entry/BaseContextEntry.cs similarity index 100% rename from AICore/Context/Entry/BaseContextEntry.cs rename to Server/Components/AICore/Context/Entry/BaseContextEntry.cs diff --git a/AICore/Context/Entry/Detail/CustomerDetailContextEntry.cs b/Server/Components/AICore/Context/Entry/Detail/CustomerDetailContextEntry.cs similarity index 100% rename from AICore/Context/Entry/Detail/CustomerDetailContextEntry.cs rename to Server/Components/AICore/Context/Entry/Detail/CustomerDetailContextEntry.cs diff --git a/AICore/Context/Entry/Detail/DetailContextEntry.cs b/Server/Components/AICore/Context/Entry/Detail/DetailContextEntry.cs similarity index 100% rename from AICore/Context/Entry/Detail/DetailContextEntry.cs rename to Server/Components/AICore/Context/Entry/Detail/DetailContextEntry.cs diff --git a/AICore/Context/Entry/Detail/EmployeeDetailContextEntry.cs b/Server/Components/AICore/Context/Entry/Detail/EmployeeDetailContextEntry.cs similarity index 100% rename from AICore/Context/Entry/Detail/EmployeeDetailContextEntry.cs rename to Server/Components/AICore/Context/Entry/Detail/EmployeeDetailContextEntry.cs diff --git a/AICore/Context/Entry/Detail/OrganisationDetailContextEntry.cs b/Server/Components/AICore/Context/Entry/Detail/OrganisationDetailContextEntry.cs similarity index 100% rename from AICore/Context/Entry/Detail/OrganisationDetailContextEntry.cs rename to Server/Components/AICore/Context/Entry/Detail/OrganisationDetailContextEntry.cs diff --git a/AICore/Context/Entry/Detail/PersonDetailContextEntry.cs b/Server/Components/AICore/Context/Entry/Detail/PersonDetailContextEntry.cs similarity index 100% rename from AICore/Context/Entry/Detail/PersonDetailContextEntry.cs rename to Server/Components/AICore/Context/Entry/Detail/PersonDetailContextEntry.cs diff --git a/AICore/Context/Entry/Detail/SupportConceptDetailContextEntry.cs b/Server/Components/AICore/Context/Entry/Detail/SupportConceptDetailContextEntry.cs similarity index 100% rename from AICore/Context/Entry/Detail/SupportConceptDetailContextEntry.cs rename to Server/Components/AICore/Context/Entry/Detail/SupportConceptDetailContextEntry.cs diff --git a/AICore/Context/Entry/Navigation/CustomerNavigationContextEntry.cs b/Server/Components/AICore/Context/Entry/Navigation/CustomerNavigationContextEntry.cs similarity index 100% rename from AICore/Context/Entry/Navigation/CustomerNavigationContextEntry.cs rename to Server/Components/AICore/Context/Entry/Navigation/CustomerNavigationContextEntry.cs diff --git a/AICore/Context/Entry/Navigation/EmployeeNavigationContextEntry.cs b/Server/Components/AICore/Context/Entry/Navigation/EmployeeNavigationContextEntry.cs similarity index 100% rename from AICore/Context/Entry/Navigation/EmployeeNavigationContextEntry.cs rename to Server/Components/AICore/Context/Entry/Navigation/EmployeeNavigationContextEntry.cs diff --git a/AICore/Context/Entry/Navigation/NavigationContextEntry.cs b/Server/Components/AICore/Context/Entry/Navigation/NavigationContextEntry.cs similarity index 100% rename from AICore/Context/Entry/Navigation/NavigationContextEntry.cs rename to Server/Components/AICore/Context/Entry/Navigation/NavigationContextEntry.cs diff --git a/AICore/Context/Entry/Navigation/OrganisationNavigationContextEntry.cs b/Server/Components/AICore/Context/Entry/Navigation/OrganisationNavigationContextEntry.cs similarity index 100% rename from AICore/Context/Entry/Navigation/OrganisationNavigationContextEntry.cs rename to Server/Components/AICore/Context/Entry/Navigation/OrganisationNavigationContextEntry.cs diff --git a/AICore/Context/Entry/Navigation/PersonNavigationContextEntry.cs b/Server/Components/AICore/Context/Entry/Navigation/PersonNavigationContextEntry.cs similarity index 100% rename from AICore/Context/Entry/Navigation/PersonNavigationContextEntry.cs rename to Server/Components/AICore/Context/Entry/Navigation/PersonNavigationContextEntry.cs diff --git a/AICore/Context/Entry/Navigation/ServiceRecordContextEntry.cs b/Server/Components/AICore/Context/Entry/Navigation/ServiceRecordContextEntry.cs similarity index 100% rename from AICore/Context/Entry/Navigation/ServiceRecordContextEntry.cs rename to Server/Components/AICore/Context/Entry/Navigation/ServiceRecordContextEntry.cs diff --git a/AICore/Context/Entry/Navigation/SupportConceptNavigationContextEntry.cs b/Server/Components/AICore/Context/Entry/Navigation/SupportConceptNavigationContextEntry.cs similarity index 100% rename from AICore/Context/Entry/Navigation/SupportConceptNavigationContextEntry.cs rename to Server/Components/AICore/Context/Entry/Navigation/SupportConceptNavigationContextEntry.cs diff --git a/AICore/Context/EntryMapper/BaseContextEntryMapper.cs b/Server/Components/AICore/Context/EntryMapper/BaseContextEntryMapper.cs similarity index 100% rename from AICore/Context/EntryMapper/BaseContextEntryMapper.cs rename to Server/Components/AICore/Context/EntryMapper/BaseContextEntryMapper.cs diff --git a/AICore/Context/EntryMapper/Detail/CustomerContextEntryMapper.cs b/Server/Components/AICore/Context/EntryMapper/Detail/CustomerContextEntryMapper.cs similarity index 100% rename from AICore/Context/EntryMapper/Detail/CustomerContextEntryMapper.cs rename to Server/Components/AICore/Context/EntryMapper/Detail/CustomerContextEntryMapper.cs diff --git a/AICore/Context/EntryMapper/Detail/EmployeeContextEntryMapper.cs b/Server/Components/AICore/Context/EntryMapper/Detail/EmployeeContextEntryMapper.cs similarity index 100% rename from AICore/Context/EntryMapper/Detail/EmployeeContextEntryMapper.cs rename to Server/Components/AICore/Context/EntryMapper/Detail/EmployeeContextEntryMapper.cs diff --git a/AICore/Context/EntryMapper/Detail/OrganisationContextEntryMapper.cs b/Server/Components/AICore/Context/EntryMapper/Detail/OrganisationContextEntryMapper.cs similarity index 100% rename from AICore/Context/EntryMapper/Detail/OrganisationContextEntryMapper.cs rename to Server/Components/AICore/Context/EntryMapper/Detail/OrganisationContextEntryMapper.cs diff --git a/AICore/Context/EntryMapper/Detail/PersonContextEntryMapper.cs b/Server/Components/AICore/Context/EntryMapper/Detail/PersonContextEntryMapper.cs similarity index 100% rename from AICore/Context/EntryMapper/Detail/PersonContextEntryMapper.cs rename to Server/Components/AICore/Context/EntryMapper/Detail/PersonContextEntryMapper.cs diff --git a/AICore/Context/EntryMapper/Detail/ServiceRecordContextEntryMapper.cs b/Server/Components/AICore/Context/EntryMapper/Detail/ServiceRecordContextEntryMapper.cs similarity index 100% rename from AICore/Context/EntryMapper/Detail/ServiceRecordContextEntryMapper.cs rename to Server/Components/AICore/Context/EntryMapper/Detail/ServiceRecordContextEntryMapper.cs diff --git a/AICore/Context/EntryMapper/Detail/SupportConceptContextEntryMapper.cs b/Server/Components/AICore/Context/EntryMapper/Detail/SupportConceptContextEntryMapper.cs similarity index 100% rename from AICore/Context/EntryMapper/Detail/SupportConceptContextEntryMapper.cs rename to Server/Components/AICore/Context/EntryMapper/Detail/SupportConceptContextEntryMapper.cs diff --git a/AICore/Context/EntryMapper/Navigation/CustomerNavigationContextEntryMapper.cs b/Server/Components/AICore/Context/EntryMapper/Navigation/CustomerNavigationContextEntryMapper.cs similarity index 100% rename from AICore/Context/EntryMapper/Navigation/CustomerNavigationContextEntryMapper.cs rename to Server/Components/AICore/Context/EntryMapper/Navigation/CustomerNavigationContextEntryMapper.cs diff --git a/AICore/Context/EntryMapper/Navigation/EmployeeNavigationContextEntryMapper.cs b/Server/Components/AICore/Context/EntryMapper/Navigation/EmployeeNavigationContextEntryMapper.cs similarity index 100% rename from AICore/Context/EntryMapper/Navigation/EmployeeNavigationContextEntryMapper.cs rename to Server/Components/AICore/Context/EntryMapper/Navigation/EmployeeNavigationContextEntryMapper.cs diff --git a/AICore/Context/EntryMapper/Navigation/OrganisationNavigationContextEntryMapper.cs b/Server/Components/AICore/Context/EntryMapper/Navigation/OrganisationNavigationContextEntryMapper.cs similarity index 100% rename from AICore/Context/EntryMapper/Navigation/OrganisationNavigationContextEntryMapper.cs rename to Server/Components/AICore/Context/EntryMapper/Navigation/OrganisationNavigationContextEntryMapper.cs diff --git a/AICore/Context/EntryMapper/Navigation/PersonNavigationContextEntryMapper.cs b/Server/Components/AICore/Context/EntryMapper/Navigation/PersonNavigationContextEntryMapper.cs similarity index 100% rename from AICore/Context/EntryMapper/Navigation/PersonNavigationContextEntryMapper.cs rename to Server/Components/AICore/Context/EntryMapper/Navigation/PersonNavigationContextEntryMapper.cs diff --git a/AICore/Context/EntryMapper/Navigation/SupportConceptNavigationContextEntryMapper.cs b/Server/Components/AICore/Context/EntryMapper/Navigation/SupportConceptNavigationContextEntryMapper.cs similarity index 100% rename from AICore/Context/EntryMapper/Navigation/SupportConceptNavigationContextEntryMapper.cs rename to Server/Components/AICore/Context/EntryMapper/Navigation/SupportConceptNavigationContextEntryMapper.cs diff --git a/AICore/Context/Interfaces/IContextSummary.cs b/Server/Components/AICore/Context/Interfaces/IContextSummary.cs similarity index 100% rename from AICore/Context/Interfaces/IContextSummary.cs rename to Server/Components/AICore/Context/Interfaces/IContextSummary.cs diff --git a/AICore/Context/Summary/BaseContextSummary.cs b/Server/Components/AICore/Context/Summary/BaseContextSummary.cs similarity index 100% rename from AICore/Context/Summary/BaseContextSummary.cs rename to Server/Components/AICore/Context/Summary/BaseContextSummary.cs diff --git a/AICore/Context/Summary/Detail/CustomerDetailContextSummary.cs b/Server/Components/AICore/Context/Summary/Detail/CustomerDetailContextSummary.cs similarity index 100% rename from AICore/Context/Summary/Detail/CustomerDetailContextSummary.cs rename to Server/Components/AICore/Context/Summary/Detail/CustomerDetailContextSummary.cs diff --git a/AICore/Context/Summary/Detail/DetailContextSummary.cs b/Server/Components/AICore/Context/Summary/Detail/DetailContextSummary.cs similarity index 100% rename from AICore/Context/Summary/Detail/DetailContextSummary.cs rename to Server/Components/AICore/Context/Summary/Detail/DetailContextSummary.cs diff --git a/AICore/Context/Summary/Detail/EmployeeDetailContextSummary.cs b/Server/Components/AICore/Context/Summary/Detail/EmployeeDetailContextSummary.cs similarity index 100% rename from AICore/Context/Summary/Detail/EmployeeDetailContextSummary.cs rename to Server/Components/AICore/Context/Summary/Detail/EmployeeDetailContextSummary.cs diff --git a/AICore/Context/Summary/Detail/OrganisationDetailContextSummary.cs b/Server/Components/AICore/Context/Summary/Detail/OrganisationDetailContextSummary.cs similarity index 100% rename from AICore/Context/Summary/Detail/OrganisationDetailContextSummary.cs rename to Server/Components/AICore/Context/Summary/Detail/OrganisationDetailContextSummary.cs diff --git a/AICore/Context/Summary/Detail/PersonDetailContextSummary.cs b/Server/Components/AICore/Context/Summary/Detail/PersonDetailContextSummary.cs similarity index 100% rename from AICore/Context/Summary/Detail/PersonDetailContextSummary.cs rename to Server/Components/AICore/Context/Summary/Detail/PersonDetailContextSummary.cs diff --git a/AICore/Context/Summary/Detail/SupportConceptDetailContextSummary.cs b/Server/Components/AICore/Context/Summary/Detail/SupportConceptDetailContextSummary.cs similarity index 100% rename from AICore/Context/Summary/Detail/SupportConceptDetailContextSummary.cs rename to Server/Components/AICore/Context/Summary/Detail/SupportConceptDetailContextSummary.cs diff --git a/AICore/Context/Summary/Navigation/CustomerNavigationContextSummary.cs b/Server/Components/AICore/Context/Summary/Navigation/CustomerNavigationContextSummary.cs similarity index 100% rename from AICore/Context/Summary/Navigation/CustomerNavigationContextSummary.cs rename to Server/Components/AICore/Context/Summary/Navigation/CustomerNavigationContextSummary.cs diff --git a/AICore/Context/Summary/Navigation/EmployeeNavigationContextSummary.cs b/Server/Components/AICore/Context/Summary/Navigation/EmployeeNavigationContextSummary.cs similarity index 100% rename from AICore/Context/Summary/Navigation/EmployeeNavigationContextSummary.cs rename to Server/Components/AICore/Context/Summary/Navigation/EmployeeNavigationContextSummary.cs diff --git a/AICore/Context/Summary/Navigation/NavigationContextSummary.cs b/Server/Components/AICore/Context/Summary/Navigation/NavigationContextSummary.cs similarity index 100% rename from AICore/Context/Summary/Navigation/NavigationContextSummary.cs rename to Server/Components/AICore/Context/Summary/Navigation/NavigationContextSummary.cs diff --git a/AICore/Context/Summary/Navigation/OrganisationNavigationContextSummary.cs b/Server/Components/AICore/Context/Summary/Navigation/OrganisationNavigationContextSummary.cs similarity index 100% rename from AICore/Context/Summary/Navigation/OrganisationNavigationContextSummary.cs rename to Server/Components/AICore/Context/Summary/Navigation/OrganisationNavigationContextSummary.cs diff --git a/AICore/Context/Summary/Navigation/PersonNavigationContextSummary.cs b/Server/Components/AICore/Context/Summary/Navigation/PersonNavigationContextSummary.cs similarity index 100% rename from AICore/Context/Summary/Navigation/PersonNavigationContextSummary.cs rename to Server/Components/AICore/Context/Summary/Navigation/PersonNavigationContextSummary.cs diff --git a/AICore/Context/Summary/Navigation/ServiceRecordNavigationContextSummary.cs b/Server/Components/AICore/Context/Summary/Navigation/ServiceRecordNavigationContextSummary.cs similarity index 100% rename from AICore/Context/Summary/Navigation/ServiceRecordNavigationContextSummary.cs rename to Server/Components/AICore/Context/Summary/Navigation/ServiceRecordNavigationContextSummary.cs diff --git a/AICore/Context/Summary/Navigation/SupportConceptNavigationContextSummary.cs b/Server/Components/AICore/Context/Summary/Navigation/SupportConceptNavigationContextSummary.cs similarity index 100% rename from AICore/Context/Summary/Navigation/SupportConceptNavigationContextSummary.cs rename to Server/Components/AICore/Context/Summary/Navigation/SupportConceptNavigationContextSummary.cs diff --git a/AICore/Context/SummaryParser/BaseContextSummaryParser.cs b/Server/Components/AICore/Context/SummaryParser/BaseContextSummaryParser.cs similarity index 100% rename from AICore/Context/SummaryParser/BaseContextSummaryParser.cs rename to Server/Components/AICore/Context/SummaryParser/BaseContextSummaryParser.cs diff --git a/AICore/Context/SummaryParser/CsvContextSummaryParser.cs b/Server/Components/AICore/Context/SummaryParser/CsvContextSummaryParser.cs similarity index 100% rename from AICore/Context/SummaryParser/CsvContextSummaryParser.cs rename to Server/Components/AICore/Context/SummaryParser/CsvContextSummaryParser.cs diff --git a/AICore/Context/SummaryParser/JsonContextSummaryParser.cs b/Server/Components/AICore/Context/SummaryParser/JsonContextSummaryParser.cs similarity index 100% rename from AICore/Context/SummaryParser/JsonContextSummaryParser.cs rename to Server/Components/AICore/Context/SummaryParser/JsonContextSummaryParser.cs diff --git a/AICore/Facade/DefaultErrorExtractor.cs b/Server/Components/AICore/Facade/DefaultErrorExtractor.cs similarity index 100% rename from AICore/Facade/DefaultErrorExtractor.cs rename to Server/Components/AICore/Facade/DefaultErrorExtractor.cs diff --git a/AICore/Facade/LLM/BaseLLMApiClient.cs b/Server/Components/AICore/Facade/LLM/BaseLLMApiClient.cs similarity index 100% rename from AICore/Facade/LLM/BaseLLMApiClient.cs rename to Server/Components/AICore/Facade/LLM/BaseLLMApiClient.cs diff --git a/AICore/Facade/LLM/OllamaApiClient.cs b/Server/Components/AICore/Facade/LLM/OllamaApiClient.cs similarity index 100% rename from AICore/Facade/LLM/OllamaApiClient.cs rename to Server/Components/AICore/Facade/LLM/OllamaApiClient.cs diff --git a/AICore/Facade/LLM/OpenWebApiClient.cs b/Server/Components/AICore/Facade/LLM/OpenWebApiClient.cs similarity index 100% rename from AICore/Facade/LLM/OpenWebApiClient.cs rename to Server/Components/AICore/Facade/LLM/OpenWebApiClient.cs diff --git a/AICore/Prompt/Core/AiPromptBuilder.cs b/Server/Components/AICore/Prompt/Core/AiPromptBuilder.cs similarity index 100% rename from AICore/Prompt/Core/AiPromptBuilder.cs rename to Server/Components/AICore/Prompt/Core/AiPromptBuilder.cs diff --git a/AICore/Prompt/Core/AiUtils.cs b/Server/Components/AICore/Prompt/Core/AiUtils.cs similarity index 100% rename from AICore/Prompt/Core/AiUtils.cs rename to Server/Components/AICore/Prompt/Core/AiUtils.cs diff --git a/AICore/Prompt/Models/AiConversationContext.cs b/Server/Components/AICore/Prompt/Models/AiConversationContext.cs similarity index 100% rename from AICore/Prompt/Models/AiConversationContext.cs rename to Server/Components/AICore/Prompt/Models/AiConversationContext.cs diff --git a/AICore/Prompt/SystemPrompts/system_prompt1.txt b/Server/Components/AICore/Prompt/SystemPrompts/system_prompt1.txt similarity index 100% rename from AICore/Prompt/SystemPrompts/system_prompt1.txt rename to Server/Components/AICore/Prompt/SystemPrompts/system_prompt1.txt diff --git a/AICore/Prompt/SystemPrompts/system_prompt2.txt b/Server/Components/AICore/Prompt/SystemPrompts/system_prompt2.txt similarity index 100% rename from AICore/Prompt/SystemPrompts/system_prompt2.txt rename to Server/Components/AICore/Prompt/SystemPrompts/system_prompt2.txt diff --git a/AICore/Prompt/SystemPrompts/system_prompt3.txt b/Server/Components/AICore/Prompt/SystemPrompts/system_prompt3.txt similarity index 100% rename from AICore/Prompt/SystemPrompts/system_prompt3.txt rename to Server/Components/AICore/Prompt/SystemPrompts/system_prompt3.txt diff --git a/AICore/Properties/AssemblyInfo.cs b/Server/Components/AICore/Properties/AssemblyInfo.cs similarity index 100% rename from AICore/Properties/AssemblyInfo.cs rename to Server/Components/AICore/Properties/AssemblyInfo.cs diff --git a/AICore/app.config b/Server/Components/AICore/app.config similarity index 100% rename from AICore/app.config rename to Server/Components/AICore/app.config diff --git a/AICore/packages.config b/Server/Components/AICore/packages.config similarity index 100% rename from AICore/packages.config rename to Server/Components/AICore/packages.config diff --git a/Server/Components/README.txt b/Server/Components/README.txt new file mode 100644 index 000000000..b60503e14 --- /dev/null +++ b/Server/Components/README.txt @@ -0,0 +1,10 @@ +Projekte der Component haben die Idee, dass sie nur Shared referenzieren. +Component sind etwa das Shared für Server. + +Vorteil: +- Component können von jedem Server Projekt verwendet werden +- Component bietet Basis Funktionalitäten (ConfigReader, ApiRequests) + +FAQ: +Wieso nicht in Shared? +Components können Server Version haben (4.7.2) und sind nicht vom Client limitiert. \ No newline at end of file diff --git a/ServiceUtils/ApiFacade/HttpClientFacade.cs b/Server/Components/ServerUtils/ApiFacade/HttpClientFacade.cs similarity index 100% rename from ServiceUtils/ApiFacade/HttpClientFacade.cs rename to Server/Components/ServerUtils/ApiFacade/HttpClientFacade.cs diff --git a/ServiceUtils/ApiFacade/JsonHttpClientFacade.cs b/Server/Components/ServerUtils/ApiFacade/JsonHttpClientFacade.cs similarity index 100% rename from ServiceUtils/ApiFacade/JsonHttpClientFacade.cs rename to Server/Components/ServerUtils/ApiFacade/JsonHttpClientFacade.cs diff --git a/ServiceUtils/ApiFacade/WebClientFacade.cs b/Server/Components/ServerUtils/ApiFacade/WebClientFacade.cs similarity index 100% rename from ServiceUtils/ApiFacade/WebClientFacade.cs rename to Server/Components/ServerUtils/ApiFacade/WebClientFacade.cs diff --git a/ServiceUtils/Core/MergedConfig.cs b/Server/Components/ServerUtils/Core/MergedConfig.cs similarity index 100% rename from ServiceUtils/Core/MergedConfig.cs rename to Server/Components/ServerUtils/Core/MergedConfig.cs diff --git a/ServiceUtils/Properties/AssemblyInfo.cs b/Server/Components/ServerUtils/Properties/AssemblyInfo.cs similarity index 100% rename from ServiceUtils/Properties/AssemblyInfo.cs rename to Server/Components/ServerUtils/Properties/AssemblyInfo.cs diff --git a/ServiceUtils/README.txt b/Server/Components/ServerUtils/README.txt similarity index 100% rename from ServiceUtils/README.txt rename to Server/Components/ServerUtils/README.txt diff --git a/ServiceUtils/ServerUtils.csproj b/Server/Components/ServerUtils/ServerUtils.csproj similarity index 93% rename from ServiceUtils/ServerUtils.csproj rename to Server/Components/ServerUtils/ServerUtils.csproj index 25bf78b0a..e2f7a425e 100644 --- a/ServiceUtils/ServerUtils.csproj +++ b/Server/Components/ServerUtils/ServerUtils.csproj @@ -7,8 +7,8 @@ {EC2349FB-7FE0-4AD1-B28B-A7A27AF80A57} Library Properties - BeWo.ServiceUtils - BeWo.ServiceUtils + BeWo.ServerUtils + BeWo.Components.ServerUtils v4.7.2 512 true @@ -51,7 +51,7 @@ - + {2f50b83d-a3f0-4ec4-979a-3f9b7e3d8ed4} Shared diff --git a/Service/Service.csproj b/Service/Service.csproj index 930bb5f78..811716fef 100644 --- a/Service/Service.csproj +++ b/Service/Service.csproj @@ -577,10 +577,6 @@ - - {69D70CA9-0DF9-419E-BFAF-F4539F129BD9} - AICore - {47331732-dd96-4075-869f-83aa9f3f9937} Dakota