From 9be51e89ec6aa5be45e4632159d84aca99670d94 Mon Sep 17 00:00:00 2001 From: Zeeshaun Date: Wed, 22 Apr 2026 09:52:00 -0500 Subject: [PATCH] Updating --- .../appsettings.json | 4 ++++ .../BuilderServices/ActionBuilderService.cs | 12 +++++++++++- .../MemberPreferencesApiConfiguration.cs | 12 ++++++++++++ .../DependencyInjection.cs | 1 + ...CU.Api.Internal.DispatcherSharedLib.csproj | 11 ++++++++--- .../ActionBuilderServiceTest.cs | 19 ++++++++++++++++++- .../Enums/ActionType.cs | 3 ++- ...U.Library.Internal.DispatcherModels.csproj | 4 +++- .../config-files/uat-pvars.yaml | 2 +- .../overlays/prd/appsettings/appsettings.json | 9 ++++++--- .../overlays/qa/appsettings/appsettings.json | 7 +++++-- .../overlays/uat/appsettings/appsettings.json | 9 ++++++--- 12 files changed, 77 insertions(+), 16 deletions(-) create mode 100644 LCU.API.Internal.Dispatcher/LCU.Api.Internal.DispatcherSharedLib/Configurations/MemberPreferencesApiConfiguration.cs diff --git a/LCU.API.Internal.Dispatcher/LCU.Api.Internal.Dispatcher/appsettings.json b/LCU.API.Internal.Dispatcher/LCU.Api.Internal.Dispatcher/appsettings.json index aae1fff..a8d298b 100644 --- a/LCU.API.Internal.Dispatcher/LCU.Api.Internal.Dispatcher/appsettings.json +++ b/LCU.API.Internal.Dispatcher/LCU.Api.Internal.Dispatcher/appsettings.json @@ -135,6 +135,10 @@ "Url": "https://localhost:7066", "AccountBatchEndpoint": "/api/RepoBatchProcessing/QueueRepoBatchRequest" }, + "MemberPreferencesApiConfiguration": { + "Url": "https://localhost:52727", + "QueueDNAAuditRequestEndpoint": "/api/QueueDnaAuditProcess" + }, "ConnectionsConfiguration": { "SQL": { "DispatcherDb": "data source=localhost;initial catalog=Dispatcher;Integrated Security=SSPI;MultipleActiveResultSets=True;App=EntityFramework;Encrypt=false", diff --git a/LCU.API.Internal.Dispatcher/LCU.Api.Internal.DispatcherSharedLib/BuilderServices/ActionBuilderService.cs b/LCU.API.Internal.Dispatcher/LCU.Api.Internal.DispatcherSharedLib/BuilderServices/ActionBuilderService.cs index 4c813b3..ecd4277 100644 --- a/LCU.API.Internal.Dispatcher/LCU.Api.Internal.DispatcherSharedLib/BuilderServices/ActionBuilderService.cs +++ b/LCU.API.Internal.Dispatcher/LCU.Api.Internal.DispatcherSharedLib/BuilderServices/ActionBuilderService.cs @@ -14,6 +14,7 @@ using LCU.Library.Internal.FileOperationsModels.Models; using LCU.Library.Internal.FileOperationsModels.Models.Requests; using LCU.Library.Internal.FileUpdaterModels.Models.Requests; using LCU.Library.Internal.IncentiveApiModels.Requests; +using LCU.Library.Internal.MemberPreferencesApiModels.Requests; using LCU.Library.Internal.MomBotModels.Models; using LCU.Library.Internal.NoticeProcessorModel.Models; using LCU.Library.Internal.NotificationsModels.Models; @@ -45,6 +46,7 @@ public class ActionBuilderService : IActionBuilderService private readonly TemenosNotificationApiConfiguration _temenosNotificationApiConfiguration; private readonly RealTimeAlertsApiConfiguration _realTimeAlertsApiConfiguration; private readonly RepoApiConfiguration _repoApiConfiguration; + private readonly MemberPreferencesApiConfiguration _memberPreferencesApiConfiguration; public ActionBuilderService(FileOperationsApiConfiguration fileOperationsApiConfiguration, FtpApiConfiguration ftpApiConfiguration, @@ -63,7 +65,8 @@ public class ActionBuilderService : IActionBuilderService FileUpdaterApiConfiguration fileUpdaterApiConfiguration, TemenosNotificationApiConfiguration temenosNotificationApiConfiguration, RealTimeAlertsApiConfiguration realTimeAlertsApiConfiguration, - RepoApiConfiguration repoApiConfiguration) + RepoApiConfiguration repoApiConfiguration, + MemberPreferencesApiConfiguration memberPreferencesApiConfiguration) { _fileOperationsApiConfiguration = fileOperationsApiConfiguration; _ftpApiConfiguration = ftpApiConfiguration; @@ -83,6 +86,7 @@ public class ActionBuilderService : IActionBuilderService _temenosNotificationApiConfiguration = temenosNotificationApiConfiguration; _realTimeAlertsApiConfiguration = realTimeAlertsApiConfiguration; _repoApiConfiguration = repoApiConfiguration; + _memberPreferencesApiConfiguration = memberPreferencesApiConfiguration; } public IActionService BuildAction(ActionType actionType) @@ -345,6 +349,12 @@ public class ActionBuilderService : IActionBuilderService ActionType.RepoBatchProcessRequest), #endregion RepoApi + #region MemberPreferences + nameof(ActionType.MemberPreferencesDNAAuditRequest) => new ActionService(_memberPreferencesApiConfiguration.QueueDNAAuditRequestEndpointUrl, + HttpMethodType.Post, + ActionType.MemberPreferencesDNAAuditRequest), + #endregion MemberPreferences + _ => throw new NotImplementedException(), }; } diff --git a/LCU.API.Internal.Dispatcher/LCU.Api.Internal.DispatcherSharedLib/Configurations/MemberPreferencesApiConfiguration.cs b/LCU.API.Internal.Dispatcher/LCU.Api.Internal.DispatcherSharedLib/Configurations/MemberPreferencesApiConfiguration.cs new file mode 100644 index 0000000..e7ca396 --- /dev/null +++ b/LCU.API.Internal.Dispatcher/LCU.Api.Internal.DispatcherSharedLib/Configurations/MemberPreferencesApiConfiguration.cs @@ -0,0 +1,12 @@ +using System.ComponentModel.DataAnnotations.Schema; + +namespace LCU.Api.Internal.DispatcherSharedLib.Configurations +{ + public class MemberPreferencesApiConfiguration + { + public string Url { get; set; } + public string QueueDNAAuditRequestEndpoint { get; set; } + [NotMapped] + public string QueueDNAAuditRequestEndpointUrl => Url + QueueDNAAuditRequestEndpoint; + } +} diff --git a/LCU.API.Internal.Dispatcher/LCU.Api.Internal.DispatcherSharedLib/DependencyInjection.cs b/LCU.API.Internal.Dispatcher/LCU.Api.Internal.DispatcherSharedLib/DependencyInjection.cs index 4a36f09..6ae12ce 100644 --- a/LCU.API.Internal.Dispatcher/LCU.Api.Internal.DispatcherSharedLib/DependencyInjection.cs +++ b/LCU.API.Internal.Dispatcher/LCU.Api.Internal.DispatcherSharedLib/DependencyInjection.cs @@ -29,6 +29,7 @@ public static class DependencyInjection configuration.Bind(services); configuration.Bind(services); configuration.Bind(services); + configuration.Bind(services); services.AddScoped(); services.AddScoped(); diff --git a/LCU.API.Internal.Dispatcher/LCU.Api.Internal.DispatcherSharedLib/LCU.Api.Internal.DispatcherSharedLib.csproj b/LCU.API.Internal.Dispatcher/LCU.Api.Internal.DispatcherSharedLib/LCU.Api.Internal.DispatcherSharedLib.csproj index 571f5e4..e7b19bc 100644 --- a/LCU.API.Internal.Dispatcher/LCU.Api.Internal.DispatcherSharedLib/LCU.Api.Internal.DispatcherSharedLib.csproj +++ b/LCU.API.Internal.Dispatcher/LCU.Api.Internal.DispatcherSharedLib/LCU.Api.Internal.DispatcherSharedLib.csproj @@ -1,10 +1,10 @@ - + net8.0 latest true - 5.7.21 + 5.7.23 1.0.0 - Initial Creation 1.1.0 - FileOperationsLib and ApiResponse Version upgrade. @@ -123,6 +123,8 @@ 5.7.19 - Update DocumentIngestorModels Nuget Package 5.7.20 - Update Dialer Api Nuget package for campaigns 5.7.21 - Update DocumentIngestorModels Nuget package + 5.7.22 - Update for MemberPreferences DNA Audit WorkItem + 5.7.23 - Update Ftp models 1.0.0 - Initial Creation @@ -241,12 +243,14 @@ 5.7.19 - Update DocumentIngestorModels Nuget Package 5.7.20 - Update Dialer Api Nuget package for campaigns 5.7.21 - Update DocumentIngestorModels Nuget package + 5.7.22 - Update for MemberPreferences DNA Audit WorkItem + 5.7.23 - Update Ftp models - + @@ -258,6 +262,7 @@ + diff --git a/LCU.API.Internal.Dispatcher/LCU.Api.Internal.DispatcherTests/BuilderServiceTests/ActionBuilderServiceTest.cs b/LCU.API.Internal.Dispatcher/LCU.Api.Internal.DispatcherTests/BuilderServiceTests/ActionBuilderServiceTest.cs index ce24f86..20c832b 100644 --- a/LCU.API.Internal.Dispatcher/LCU.Api.Internal.DispatcherTests/BuilderServiceTests/ActionBuilderServiceTest.cs +++ b/LCU.API.Internal.Dispatcher/LCU.Api.Internal.DispatcherTests/BuilderServiceTests/ActionBuilderServiceTest.cs @@ -24,6 +24,7 @@ public class ActionBuilderServiceTest private readonly TemenosNotificationApiConfiguration _temenosNotificationApiConfiguration; private readonly RealTimeAlertsApiConfiguration _realTimeAlertsApiConfiguration; private readonly RepoApiConfiguration _repoApiConfiguration; + private readonly MemberPreferencesApiConfiguration _memberPreferencesApiConfiguration; public ActionBuilderServiceTest() { @@ -168,6 +169,12 @@ public class ActionBuilderServiceTest AccountBatchEndpoint = "/api/RepoBatchProcessing/QueueRepoBatchRequest" }; + _memberPreferencesApiConfiguration = new MemberPreferencesApiConfiguration + { + Url = "https://Test", + QueueDNAAuditRequestEndpoint = "/api/QueueDnaAuditProcess" + }; + _actionBuilderService = new ActionBuilderService(_fileOperationsApiConfiguration, _ftpApiConfiguration, @@ -186,7 +193,8 @@ public class ActionBuilderServiceTest _fileUpdaterApiConfiguration, _temenosNotificationApiConfiguration, _realTimeAlertsApiConfiguration, - _repoApiConfiguration); + _repoApiConfiguration, + _memberPreferencesApiConfiguration); } internal void BuildActionService_Test(ActionType actionType, string url) @@ -526,4 +534,13 @@ public class ActionBuilderServiceTest BuildActionService_Test(ActionType.RepoBatchProcessRequest, "https://Test/api/RepoBatchProcessing/QueueRepoBatchRequest"); } #endregion RepoApi + + #region MemberPreferences + [Fact] + public void BuildActionService_MemberPreferencesDnaAuditRequest() + { + BuildActionService_Test(ActionType.MemberPreferencesDNAAuditRequest, "https://Test/api/QueueDnaAuditProcess"); + } + #endregion MemberPreferences + } \ No newline at end of file diff --git a/LCU.API.Internal.Dispatcher/LCU.Library.Internal.DispatcherModels/Enums/ActionType.cs b/LCU.API.Internal.Dispatcher/LCU.Library.Internal.DispatcherModels/Enums/ActionType.cs index 3c8dd4c..5c43825 100644 --- a/LCU.API.Internal.Dispatcher/LCU.Library.Internal.DispatcherModels/Enums/ActionType.cs +++ b/LCU.API.Internal.Dispatcher/LCU.Library.Internal.DispatcherModels/Enums/ActionType.cs @@ -65,5 +65,6 @@ public enum ActionType DocumentRetentionCleanupRequest = 60, UploadVoAppsCampaignResultsErrorRequest = 61, RepoBatchProcessRequest = 62, - DocumentIngestorProcessStatusEmail = 63 + DocumentIngestorProcessStatusEmail = 63, + MemberPreferencesDNAAuditRequest = 64 } \ No newline at end of file diff --git a/LCU.API.Internal.Dispatcher/LCU.Library.Internal.DispatcherModels/LCU.Library.Internal.DispatcherModels.csproj b/LCU.API.Internal.Dispatcher/LCU.Library.Internal.DispatcherModels/LCU.Library.Internal.DispatcherModels.csproj index ba23182..a3afea2 100644 --- a/LCU.API.Internal.Dispatcher/LCU.Library.Internal.DispatcherModels/LCU.Library.Internal.DispatcherModels.csproj +++ b/LCU.API.Internal.Dispatcher/LCU.Library.Internal.DispatcherModels/LCU.Library.Internal.DispatcherModels.csproj @@ -3,7 +3,7 @@ net8.0 True - 1.20.14 + 1.20.15 1.0.0 - Initial Creation 1.1.0 - Addition of Tag, JobTag, new filter for tags, and List of JobTags in Job model. @@ -68,6 +68,7 @@ 1.20.12 - Update JobErrorDetail to use JobStatus 1.20.13 - Update for RepoAPI 1.20.14 - Update DocumentIngestorModels Nuget package + 1.20.15 - Update for MemeberPreferences API 1.0.0 - Initial Creation @@ -133,6 +134,7 @@ 1.20.12 - Update JobErrorDetail to use JobStatus 1.20.13 - Update for RepoAPI 1.20.14 - Update DocumentIngestorModels Nuget package + 1.20.15 - Update for MemeberPreferences API latest diff --git a/LCU.API.Internal.Dispatcher/azdo_pipelines/config-files/uat-pvars.yaml b/LCU.API.Internal.Dispatcher/azdo_pipelines/config-files/uat-pvars.yaml index 5e72d16..62c9c51 100644 --- a/LCU.API.Internal.Dispatcher/azdo_pipelines/config-files/uat-pvars.yaml +++ b/LCU.API.Internal.Dispatcher/azdo_pipelines/config-files/uat-pvars.yaml @@ -9,4 +9,4 @@ variables: pvar_azdo_deployment_environment_db: DB-UAT pvar_LCU_API_Internal_DispatcherSql_db_name: Dispatcher - pvar_LCU_API_Internal_DispatcherSql_sql_server_name: D1CLS01U + pvar_LCU_API_Internal_DispatcherSql_sql_server_name: WEBCLSU diff --git a/LCU.API.Internal.Dispatcher/kustomize/overlays/prd/appsettings/appsettings.json b/LCU.API.Internal.Dispatcher/kustomize/overlays/prd/appsettings/appsettings.json index 5f096b3..2043a3f 100644 --- a/LCU.API.Internal.Dispatcher/kustomize/overlays/prd/appsettings/appsettings.json +++ b/LCU.API.Internal.Dispatcher/kustomize/overlays/prd/appsettings/appsettings.json @@ -66,7 +66,10 @@ "TemenosNotificationApiConfiguration": { "Url": "https://prd-temenos-notification-api.apps.azure.lcu-internal.com" }, - "RepoApiConfiguration": { - "Url": "https://prd-repo-api.apps.azure.lcu-internal.com" - } + "RepoApiConfiguration": { + "Url": "https://prd-repo-api.apps.azure.lcu-internal.com" + }, + "MemberPreferencesApiConfiguration": { + "Url": "https://prd-member-preferences-api.apps.azure.lcu-internal.com" + } } diff --git a/LCU.API.Internal.Dispatcher/kustomize/overlays/qa/appsettings/appsettings.json b/LCU.API.Internal.Dispatcher/kustomize/overlays/qa/appsettings/appsettings.json index 21990f9..bb0e826 100644 --- a/LCU.API.Internal.Dispatcher/kustomize/overlays/qa/appsettings/appsettings.json +++ b/LCU.API.Internal.Dispatcher/kustomize/overlays/qa/appsettings/appsettings.json @@ -69,6 +69,9 @@ "Url": "https://qa-temenos-notification-api.apps.azure.lcu-internal.com" }, "RepoApiConfiguration": { - "Url": "https://qa-repo-api.apps.azure.lcu-internal.com" - } + "Url": "https://qa-repo-api.apps.azure.lcu-internal.com" + }, + "MemberPreferencesApiConfiguration": { + "Url": "https://qa-member-preferences-api.apps.azure.lcu-internal.com" + } } \ No newline at end of file diff --git a/LCU.API.Internal.Dispatcher/kustomize/overlays/uat/appsettings/appsettings.json b/LCU.API.Internal.Dispatcher/kustomize/overlays/uat/appsettings/appsettings.json index 9c3fc78..b352c65 100644 --- a/LCU.API.Internal.Dispatcher/kustomize/overlays/uat/appsettings/appsettings.json +++ b/LCU.API.Internal.Dispatcher/kustomize/overlays/uat/appsettings/appsettings.json @@ -68,7 +68,10 @@ "TemenosNotificationApiConfiguration": { "Url": "https://uat-temenos-notification-api.apps.azure.lcu-internal.com" }, - "RepoApiConfiguration": { - "Url": "https://uat-repo-api.apps.azure.lcu-internal.com" - } + "RepoApiConfiguration": { + "Url": "https://uat-repo-api.apps.azure.lcu-internal.com" + }, + "MemberPreferencesApiConfiguration": { + "Url": "https://uat-member-preferences-api.apps.azure.lcu-internal.com" + } } \ No newline at end of file