diff --git a/audit-logs/audit-logs/Extensions/ServiceCollectionExtensions.cs b/audit-logs/audit-logs/Extensions/ServiceCollectionExtensions.cs new file mode 100644 index 0000000..1174d86 --- /dev/null +++ b/audit-logs/audit-logs/Extensions/ServiceCollectionExtensions.cs @@ -0,0 +1,33 @@ + +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using audit_logs.Models.AppSettings; +using audit_logs.Repositories; +using audit.Repositories; +using audit_logs.Repositories.Interfaces; +using audit_logs.Services; +using audit_logs.Services.Interfaces; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Options; +using MongoDB.Driver; + +namespace audit_logs.Extensions; + +public static class ServiceCollectionExtensions +{ + public static IServiceCollection AddAuditServices(this IServiceCollection services, IConfiguration configuration) + { + // Configurar MongoDbSettingsAudit a partir del archivo de configuración appsettings.json + services.Configure(configuration.GetSection("DatabaseConfigurationAudit")); + + // Registrar AuditService utilizando la configuración de MongoDbSettingsAudit + services.AddScoped(sp => + { + var options = sp.GetRequiredService>(); + return new AuditService(options); + }); + + return services; + } +} \ No newline at end of file diff --git a/audit-logs/audit-logs/Infraestructure/ServiceCollectionExtensions.cs b/audit-logs/audit-logs/Infraestructure/ServiceCollectionExtensions.cs deleted file mode 100644 index 08caf0e..0000000 --- a/audit-logs/audit-logs/Infraestructure/ServiceCollectionExtensions.cs +++ /dev/null @@ -1,34 +0,0 @@ - -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using audit_logs.Models.AppSettings; -using audit.Repositories; -using audit_logs.Repositories.Interfaces; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Options; -using MongoDB.Driver; - -namespace audit_logs.Infraestructure; - -public static class ServiceCollectionExtensions -{ - public static IServiceCollection AddMongoDb(this IServiceCollection services, IConfiguration configuration) - { - // Leer configuración desde el archivo appsettings.json - services.Configure(configuration.GetSection("MongoDbSettings")); - - // Registrar MongoDbSettings como Singleton para ser usado en MongoRepository - services.AddSingleton(sp => - { - var options = sp.GetRequiredService>().Value; - var client = new MongoClient(options.ConnectionString); - return client.GetDatabase(options.DatabaseName); - }); - - // Registrar MongoRepository como servicio genérico - services.AddScoped(typeof(IMongoRepository<>), typeof(MongoRepository<>)); - - return services; - } -} \ No newline at end of file diff --git a/audit-logs/audit-logs/Models/AppSettings/MongoDbSettings.cs b/audit-logs/audit-logs/Models/AppSettings/MongoDbSettingsAudit.cs similarity index 81% rename from audit-logs/audit-logs/Models/AppSettings/MongoDbSettings.cs rename to audit-logs/audit-logs/Models/AppSettings/MongoDbSettingsAudit.cs index 7d7c2af..20bae8e 100644 --- a/audit-logs/audit-logs/Models/AppSettings/MongoDbSettings.cs +++ b/audit-logs/audit-logs/Models/AppSettings/MongoDbSettingsAudit.cs @@ -1,6 +1,6 @@ namespace audit_logs.Models.AppSettings { - public class MongoDbSettings + public class MongoDbSettingsAudit { public string? ConnectionString { get; set; } public string? DatabaseName { get; set; } diff --git a/audit-logs/audit-logs/Models/AuditRecord.cs b/audit-logs/audit-logs/Models/AuditRecord.cs index 4dd1cd6..8dd5b98 100644 --- a/audit-logs/audit-logs/Models/AuditRecord.cs +++ b/audit-logs/audit-logs/Models/AuditRecord.cs @@ -31,7 +31,7 @@ public class AuditRecord public string Reason { get; set; } [BsonElement("user_ip_address")] - public string UserIpAddress { get; set; } + public string? UserIpAddress { get; set; } public class Change { diff --git a/audit-logs/audit-logs/Repositories/AuditRecordRepository.cs b/audit-logs/audit-logs/Repositories/AuditRecordRepository.cs index ebf1fa5..7cbf8fe 100644 --- a/audit-logs/audit-logs/Repositories/AuditRecordRepository.cs +++ b/audit-logs/audit-logs/Repositories/AuditRecordRepository.cs @@ -19,7 +19,7 @@ public class AuditRecordRepository : MongoRepository, IAuditRecordR { } - public AuditRecordRepository(IOptions dbSettings) : base(dbSettings) + public AuditRecordRepository(IOptions dbSettings) : base(dbSettings) { } diff --git a/audit-logs/audit-logs/Repositories/MongoRepository.cs b/audit-logs/audit-logs/Repositories/MongoRepository.cs index e03c800..a49090b 100644 --- a/audit-logs/audit-logs/Repositories/MongoRepository.cs +++ b/audit-logs/audit-logs/Repositories/MongoRepository.cs @@ -12,7 +12,7 @@ public abstract class MongoRepository : IMongoRepository { protected readonly IMongoDatabase _db; - protected MongoRepository(IOptions dbSettings) + protected MongoRepository(IOptions dbSettings) { _db = MongoDbHostBuilderExtension.GetMongoDB(dbSettings); } diff --git a/audit-logs/audit-logs/Services/AuditService.cs b/audit-logs/audit-logs/Services/AuditService.cs index ef412ed..fdd89b7 100644 --- a/audit-logs/audit-logs/Services/AuditService.cs +++ b/audit-logs/audit-logs/Services/AuditService.cs @@ -1,3 +1,5 @@ +namespace audit_logs.Services; + using System.Security.Claims; using System.Text.RegularExpressions; using audit_logs.Models; @@ -6,9 +8,6 @@ using audit_logs.Models.DTO; using audit_logs.Services.Interfaces; using Microsoft.Extensions.Options; using MongoDB.Bson; - -namespace audit_logs.Services; - using audit_logs.Repositories; using MongoDB.Driver; using audit_logs.Utils; @@ -32,82 +31,122 @@ public class AuditService : IAuditService { _auditLogRepository = new AuditRecordRepository(database); } - public AuditService(IOptions dbSettings) + + public AuditService(IOptions dbSettings) { _auditLogRepository = new AuditRecordRepository(dbSettings); } - public IAuditRecordRepository AuditLogRepository => _auditLogRepository; /// /// Records a detailed audit log entry. /// - /// The data required to create an audit record. - public async Task RecordAuditAsync(AuditRecord auditLogData) + /// The data required to create an audit record. + public async Task RecordAuditAsync(AuditRecord auditRecord) { - if (auditLogData == null) throw new ArgumentNullException(nameof(auditLogData)); - if (string.IsNullOrWhiteSpace(auditLogData.EntityType)) - throw new ArgumentNullException(nameof(auditLogData.EntityType)); - if (string.IsNullOrWhiteSpace(auditLogData.RecordId)) - throw new ArgumentNullException(nameof(auditLogData.RecordId)); - if (string.IsNullOrWhiteSpace(auditLogData.UserId)) - throw new ArgumentNullException(nameof(auditLogData.UserId)); - if (string.IsNullOrWhiteSpace(auditLogData.ActionType)) - throw new ArgumentNullException(nameof(auditLogData.ActionType)); - if (auditLogData.Changes == null) throw new ArgumentNullException(nameof(auditLogData.Changes)); - if (string.IsNullOrWhiteSpace(auditLogData.UserIpAddress)) - throw new ArgumentNullException(nameof(auditLogData.UserIpAddress)); - - var auditRecord = new AuditRecord - { - EntityType = auditLogData.EntityType, - RecordId = auditLogData.RecordId, - UserId = auditLogData.UserId, - ActionType = auditLogData.ActionType, - ActionTime = auditLogData.ActionTime, - Changes = auditLogData.Changes, - Reason = auditLogData.Reason, - UserIpAddress = auditLogData.UserIpAddress, - }; + if (auditRecord == null) throw new ArgumentNullException(nameof(auditRecord)); + if (string.IsNullOrWhiteSpace(auditRecord.EntityType)) + throw new ArgumentNullException(nameof(auditRecord.EntityType)); + if (string.IsNullOrWhiteSpace(auditRecord.RecordId)) + throw new ArgumentNullException(nameof(auditRecord.RecordId)); + if (string.IsNullOrWhiteSpace(auditRecord.UserId)) + throw new ArgumentNullException(nameof(auditRecord.UserId)); + if (string.IsNullOrWhiteSpace(auditRecord.ActionType)) + throw new ArgumentNullException(nameof(auditRecord.ActionType)); + if (auditRecord.Changes == null) throw new ArgumentNullException(nameof(auditRecord.Changes)); + if (string.IsNullOrWhiteSpace(auditRecord.UserIpAddress)) + throw new ArgumentNullException(nameof(auditRecord.UserIpAddress)); await _auditLogRepository.InsertOneAsync(auditRecord); } + #region Documentacioòn para el metodo CreateAuditLogAsync + /// /// Creates an audit log record based on the provided original and modified data. /// This method generates an object to encapsulate all necessary details for the audit log entry. - /// The includes the following fields: - /// - EntityType: The type of entity being modified. - /// - RecordId: The unique identifier of the record being modified within the EntityType. - /// - UserId: The ID of the user performing the action. - /// - ActionType: The type of action performed ("create", "update", or "delete"). - /// - Reason: (Optional) The reason for the action. - /// - ActionTime: The timestamp of the action. - /// - Changes: A list of differences between the original and modified data. - /// - UserIpAddress: The IP address of the user. /// - /// The representing the user performing the action. This parameter is required. - /// The original object before the change, or null for new records. - /// The modified object after the change, or null for deleted records. + /// + /// The representing the user performing the action. + /// This parameter is required and is used to populate the UserId and optionally other user-related fields. + /// + /// + /// The original object before the change. This parameter can be null for new records (when ActionType is "create"). + /// + /// + /// The modified object after the change. This parameter can be null for deleted records (when ActionType is "delete"). + /// /// - /// The reason for the change. If null or empty, defaults to "Not specified". + /// The reason for the change. This parameter is optional; if null or empty, it defaults to "Not specified". /// /// /// Thrown if is null. /// /// - /// This method constructs and populates an object to store all details related to the audit event. - /// It then asynchronously saves the record using RecordAuditAsync. + /// This method constructs and populates an object that contains the following fields: + /// + /// + /// EntityType: The type of entity being audited (e.g., "Patient"). + /// + /// + /// RecordId: The unique identifier of the record being modified within the entity (e.g. patient.id, nhc,etc) EntityType. + /// + /// + /// UserId: The ID of the user who performed the action that triggered the audit entry. + /// + /// + /// ActionType: The type of action performed, which can be one of the following: + /// + /// "create": Indicates a new record was created. + /// "update": Indicates an existing record was updated. + /// "delete": Indicates a record was removed. + /// + /// + /// + /// + /// Reason: (Optional) A description or justification for the action being logged. + /// + /// + /// ActionTime: The timestamp of when the action occurred, represented in UTC. + /// + /// + /// Changes: A list detailing the differences between the original and modified data. Each change includes: + /// + /// Field: The name of the field that was changed. + /// OldValue: The value of the field before the change. + /// NewValue: The value of the field after the change. + /// ValueType: The data type of the field (e.g., "string", "int", "bool"). + /// + /// + /// + /// + /// UserIpAddress: (Optional) The IP address of the user performing the action. Useful for tracking location-based information. + /// + /// + /// Once the is constructed, it is asynchronously saved using RecordAuditAsync. /// /// - /// A task representing the asynchronous operation of recording the audit log. + /// A task representing the asynchronous operation of recording the audit log. The task completes when the audit record is successfully stored. /// + /// + /// Here is an example of how to use this method: + /// + /// await CreateAuditLogAsync( + /// user: HttpContext.User, + /// dataOriginal: oldData, + /// dataModified: newData, + /// reason: "Updated user details" + /// ); + /// + /// + #endregion + public async Task CreateAuditLogAsync(ClaimsPrincipal user, Object? dataOriginal, Object? dataModified, string? reason) { - //auditLogData.ActionType falta este atributo if (user == null) throw new ArgumentNullException(nameof(user)); + AuditRecord auditLogData = new AuditRecord(); JsonComparer jsonComparer = new(); if (dataOriginal != null) @@ -139,10 +178,10 @@ public class AuditService : IAuditService auditLogData.Reason = string.IsNullOrEmpty(reason) ? "Not specified" : reason; auditLogData.UserIpAddress = string.IsNullOrEmpty(user.FindFirst("IpAddress")?.Value) ? "Not specified" - : user.FindFirst("IpAddress")?.Value; - auditLogData.UserId = user.FindFirst(ClaimTypes.Name)?.Value; + : user.FindFirst("IpAddress")?.Value ?? "Not specified"; + auditLogData.UserId = user.FindFirst(ClaimTypes.Name)?.Value ?? "Not specified"; - // Asignar ActionType según las condiciones + // Asignar ActionType segun las condiciones if (dataOriginal == null || string.IsNullOrEmpty(dataOriginal.ToString())) { auditLogData.ActionType = "create"; @@ -209,17 +248,20 @@ public class AuditService : IAuditService public async Task> GetAuditLogsBySpecificFilterAsync( SpecificAuditLogFilterDto filterDto) { - if (filterDto.pageNumber <= 0) throw new ArgumentException("Page number must be greater than 0.", nameof(filterDto.pageNumber)); - if (filterDto.pageSize <= 0) throw new ArgumentException("Page size must be greater than 0.", nameof(filterDto.pageSize)); + if (filterDto.pageNumber <= 0) + throw new ArgumentException("Page number must be greater than 0.", nameof(filterDto.pageNumber)); + if (filterDto.pageSize <= 0) + throw new ArgumentException("Page size must be greater than 0.", nameof(filterDto.pageSize)); // Construir filtro dinámico - var filter = BuildAuditLogFilter(filterDto.userId, filterDto.recordId, filterDto.entityType, filterDto.startDate, filterDto.endDate); + var filter = BuildAuditLogFilter(filterDto.userId, filterDto.recordId, filterDto.entityType, + filterDto.startDate, filterDto.endDate); var totalRecords = await _auditLogRepository.CountDocumentsAsync(filter); var totalPages = (int)Math.Ceiling((double)totalRecords / filterDto.pageSize); var records = await _auditLogRepository.GetPaginatedAsync(filterDto.pageNumber, filterDto.pageSize, filter); - var recordsDto = records.Select(record => AuditRecordMapper.ToDto(record)).ToList(); + var recordsDto = records.Select(record => AuditRecordMapper.ToDto(record)).ToList(); return new PaginatedLogsResultDto { @@ -230,7 +272,7 @@ public class AuditService : IAuditService Records = recordsDto }; } - + /// /// Retrieves paginated audit logs with optional full-text search across multiple fields. /// @@ -241,16 +283,20 @@ public class AuditService : IAuditService /// filter by the date the modification was made. /// A paginated list of audit records. public async Task> GetAuditLogsMatchingTextOrDateAsync( - AuditLogTextOrDateSearchDTO filtertTextOrDateDto) + AuditLogTextOrDateSearchDTO filtertTextOrDateDto) { - if (filtertTextOrDateDto.pageNumber <= 0) throw new ArgumentException("Page number must be greater than 0.", nameof(filtertTextOrDateDto.pageNumber)); - if (filtertTextOrDateDto.pageSize <= 0) throw new ArgumentException("Page size must be greater than 0.", nameof(filtertTextOrDateDto.pageSize)); + if (filtertTextOrDateDto.pageNumber <= 0) + throw new ArgumentException("Page number must be greater than 0.", nameof(filtertTextOrDateDto.pageNumber)); + if (filtertTextOrDateDto.pageSize <= 0) + throw new ArgumentException("Page size must be greater than 0.", nameof(filtertTextOrDateDto.pageSize)); // Construct the text search filter if text_to_search is provided FilterDefinition filter; - if (!string.IsNullOrWhiteSpace(filtertTextOrDateDto.searchText) || filtertTextOrDateDto.startDate.HasValue || filtertTextOrDateDto.endDate.HasValue) + if (!string.IsNullOrWhiteSpace(filtertTextOrDateDto.searchText) || filtertTextOrDateDto.startDate.HasValue || + filtertTextOrDateDto.endDate.HasValue) { - filter = BuildAuditLogFilterByText(filtertTextOrDateDto.searchText,filtertTextOrDateDto.startDate, filtertTextOrDateDto.endDate); + filter = BuildAuditLogFilterByText(filtertTextOrDateDto.searchText, filtertTextOrDateDto.startDate, + filtertTextOrDateDto.endDate); } else { @@ -259,8 +305,9 @@ public class AuditService : IAuditService var totalRecords = await _auditLogRepository.CountDocumentsAsync(filter); var totalPages = (int)Math.Ceiling((double)totalRecords / filtertTextOrDateDto.pageSize); - var records = await _auditLogRepository.GetPaginatedAsync(filtertTextOrDateDto.pageNumber, filtertTextOrDateDto.pageSize, filter); - var recordsDto = records.Select(record => AuditRecordMapper.ToDto(record)).ToList(); + var records = await _auditLogRepository.GetPaginatedAsync(filtertTextOrDateDto.pageNumber, + filtertTextOrDateDto.pageSize, filter); + var recordsDto = records.Select(record => AuditRecordMapper.ToDto(record)).ToList(); return new PaginatedLogsResultDto { @@ -310,9 +357,8 @@ public class AuditService : IAuditService return filters.Count > 0 ? builder.And(filters) : builder.Empty; } - - - + + private static FilterDefinition BuildAuditLogFilterByText( string? searchText, DateTime? startDate = null, @@ -358,8 +404,4 @@ public class AuditService : IAuditService return builder.Empty; // Sin filtros, devuelve todos los documentos } - - - - } \ No newline at end of file diff --git a/audit-logs/audit-logs/Services/Interfaces/IAuditService.cs b/audit-logs/audit-logs/Services/Interfaces/IAuditService.cs index 3755743..8b4464b 100644 --- a/audit-logs/audit-logs/Services/Interfaces/IAuditService.cs +++ b/audit-logs/audit-logs/Services/Interfaces/IAuditService.cs @@ -8,7 +8,7 @@ using audit_logs.Models; using MongoDB.Bson; public interface IAuditService { - Task RecordAuditAsync(AuditRecord auditLogData); + Task RecordAuditAsync(AuditRecord auditRecord); Task CreateAuditLogAsync(ClaimsPrincipal user, object dataOriginal, object dataModified, string reason = null); Task CreateAuditLogAsync(AuditLogData auditLogData); Task> GetAuditLogsBySpecificFilterAsync( diff --git a/audit-logs/audit-logs/Utils/MongoDbHostBuilderExtension.cs b/audit-logs/audit-logs/Utils/MongoDbHostBuilderExtension.cs index edd50e7..cb4bf1f 100644 --- a/audit-logs/audit-logs/Utils/MongoDbHostBuilderExtension.cs +++ b/audit-logs/audit-logs/Utils/MongoDbHostBuilderExtension.cs @@ -26,12 +26,12 @@ public static class MongoDbHostBuilderExtension return hostBuilder; } - public static IMongoDatabase GetMongoDB(IOptions dbSettings) + public static IMongoDatabase GetMongoDB(IOptions dbSettings) { _mongoDb ??= ConfigureMongoDbConnection(dbSettings); return _mongoDb; } - private static IMongoDatabase ConfigureMongoDbConnection(IOptions dbSettings) + private static IMongoDatabase ConfigureMongoDbConnection(IOptions dbSettings) { var connectionString = dbSettings.Value.ConnectionString; diff --git a/audit-logs/audit-logs/audit-logs.csproj b/audit-logs/audit-logs/audit-logs.csproj index 4c8b93b..d648604 100644 --- a/audit-logs/audit-logs/audit-logs.csproj +++ b/audit-logs/audit-logs/audit-logs.csproj @@ -8,7 +8,7 @@ AuditLogs - 1.0.17 + 1.0.19 Epigram Epigram Library for recording audit logs using MongoDB. diff --git a/audit-logs/audit-logs/bin/Debug/net8.0/audit-logs.deps.json b/audit-logs/audit-logs/bin/Debug/net8.0/audit-logs.deps.json index b6c5163..32738cf 100644 --- a/audit-logs/audit-logs/bin/Debug/net8.0/audit-logs.deps.json +++ b/audit-logs/audit-logs/bin/Debug/net8.0/audit-logs.deps.json @@ -6,7 +6,7 @@ "compilationOptions": {}, "targets": { ".NETCoreApp,Version=v8.0": { - "audit-logs/1.0.17": { + "audit-logs/1.0.19": { "dependencies": { "Microsoft.Extensions.Hosting": "8.0.0", "MongoDB.Driver": "2.23.1", @@ -569,7 +569,7 @@ } }, "libraries": { - "audit-logs/1.0.17": { + "audit-logs/1.0.19": { "type": "project", "serviceable": false, "sha512": "" diff --git a/audit-logs/audit-logs/bin/Debug/net8.0/audit-logs.dll b/audit-logs/audit-logs/bin/Debug/net8.0/audit-logs.dll index c4b84ee..e377357 100644 Binary files a/audit-logs/audit-logs/bin/Debug/net8.0/audit-logs.dll and b/audit-logs/audit-logs/bin/Debug/net8.0/audit-logs.dll differ diff --git a/audit-logs/audit-logs/bin/Debug/net8.0/audit-logs.pdb b/audit-logs/audit-logs/bin/Debug/net8.0/audit-logs.pdb index d20d3ef..4713a2c 100644 Binary files a/audit-logs/audit-logs/bin/Debug/net8.0/audit-logs.pdb and b/audit-logs/audit-logs/bin/Debug/net8.0/audit-logs.pdb differ diff --git a/audit-logs/audit-logs/nupkgs/AuditLogs.1.0.17.nupkg b/audit-logs/audit-logs/nupkgs/AuditLogs.1.0.17.nupkg deleted file mode 100644 index bb73667..0000000 Binary files a/audit-logs/audit-logs/nupkgs/AuditLogs.1.0.17.nupkg and /dev/null differ diff --git a/audit-logs/audit-logs/obj/Debug/net8.0/audit-logs.AssemblyInfo.cs b/audit-logs/audit-logs/obj/Debug/net8.0/audit-logs.AssemblyInfo.cs index 76bf525..b0ca83d 100644 --- a/audit-logs/audit-logs/obj/Debug/net8.0/audit-logs.AssemblyInfo.cs +++ b/audit-logs/audit-logs/obj/Debug/net8.0/audit-logs.AssemblyInfo.cs @@ -13,11 +13,11 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("Epigram")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyDescriptionAttribute("Library for recording audit logs using MongoDB.")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.17.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.17+8c3be106f93e44ea3daffe2267723e4026a0569d")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.19.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.19+7c08e6e218b786bd1ac8663615a55b7a1bbd429a")] [assembly: System.Reflection.AssemblyProductAttribute("audit-logs")] [assembly: System.Reflection.AssemblyTitleAttribute("audit-logs")] -[assembly: System.Reflection.AssemblyVersionAttribute("1.0.17.0")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.19.0")] [assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "https://git.teralevel.io/jrojas/audit/src/branch/master/audit-logs")] // Generado por la clase WriteCodeFragment de MSBuild. diff --git a/audit-logs/audit-logs/obj/Debug/net8.0/audit-logs.AssemblyInfoInputs.cache b/audit-logs/audit-logs/obj/Debug/net8.0/audit-logs.AssemblyInfoInputs.cache index adc7e28..a74ed59 100644 --- a/audit-logs/audit-logs/obj/Debug/net8.0/audit-logs.AssemblyInfoInputs.cache +++ b/audit-logs/audit-logs/obj/Debug/net8.0/audit-logs.AssemblyInfoInputs.cache @@ -1 +1 @@ -320b6d684f74b89619de8f730502db744f8cdec76db8b9368a26a05e0f551580 +88955e77972330336b26e79f5f072c1699f7c7a6c645f80e4ccc5579a9275d67 diff --git a/audit-logs/audit-logs/obj/Debug/net8.0/audit-logs.csproj.CoreCompileInputs.cache b/audit-logs/audit-logs/obj/Debug/net8.0/audit-logs.csproj.CoreCompileInputs.cache index 72f2b2c..24c7764 100644 --- a/audit-logs/audit-logs/obj/Debug/net8.0/audit-logs.csproj.CoreCompileInputs.cache +++ b/audit-logs/audit-logs/obj/Debug/net8.0/audit-logs.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -fee74b0a3f2ed58887d58c89fb59bc5939f2abe98f34889b8fcfd273ddc62914 +f5c69936e6460786b672de95895cf942c7281cfa292c2cd886ce7c819e5725c4 diff --git a/audit-logs/audit-logs/obj/Debug/net8.0/audit-logs.dll b/audit-logs/audit-logs/obj/Debug/net8.0/audit-logs.dll index c4b84ee..e377357 100644 Binary files a/audit-logs/audit-logs/obj/Debug/net8.0/audit-logs.dll and b/audit-logs/audit-logs/obj/Debug/net8.0/audit-logs.dll differ diff --git a/audit-logs/audit-logs/obj/Debug/net8.0/audit-logs.pdb b/audit-logs/audit-logs/obj/Debug/net8.0/audit-logs.pdb index d20d3ef..4713a2c 100644 Binary files a/audit-logs/audit-logs/obj/Debug/net8.0/audit-logs.pdb and b/audit-logs/audit-logs/obj/Debug/net8.0/audit-logs.pdb differ diff --git a/audit-logs/audit-logs/obj/Debug/net8.0/ref/audit-logs.dll b/audit-logs/audit-logs/obj/Debug/net8.0/ref/audit-logs.dll index 23bdf12..0d61054 100644 Binary files a/audit-logs/audit-logs/obj/Debug/net8.0/ref/audit-logs.dll and b/audit-logs/audit-logs/obj/Debug/net8.0/ref/audit-logs.dll differ diff --git a/audit-logs/audit-logs/obj/Debug/net8.0/refint/audit-logs.dll b/audit-logs/audit-logs/obj/Debug/net8.0/refint/audit-logs.dll index 23bdf12..0d61054 100644 Binary files a/audit-logs/audit-logs/obj/Debug/net8.0/refint/audit-logs.dll and b/audit-logs/audit-logs/obj/Debug/net8.0/refint/audit-logs.dll differ diff --git a/audit-logs/audit-logs/obj/audit-logs.csproj.nuget.dgspec.json b/audit-logs/audit-logs/obj/audit-logs.csproj.nuget.dgspec.json index cb11f24..c71db92 100644 --- a/audit-logs/audit-logs/obj/audit-logs.csproj.nuget.dgspec.json +++ b/audit-logs/audit-logs/obj/audit-logs.csproj.nuget.dgspec.json @@ -5,7 +5,7 @@ }, "projects": { "/home/julian/Documentos/repos/audit/audit-logs/audit-logs/audit-logs.csproj": { - "version": "1.0.16", + "version": "1.0.17", "restore": { "projectUniqueName": "/home/julian/Documentos/repos/audit/audit-logs/audit-logs/audit-logs.csproj", "projectName": "AuditLogs", diff --git a/audit-logs/audit-logs/obj/project.assets.json b/audit-logs/audit-logs/obj/project.assets.json index babf41e..16273d6 100644 --- a/audit-logs/audit-logs/obj/project.assets.json +++ b/audit-logs/audit-logs/obj/project.assets.json @@ -2567,7 +2567,7 @@ "/home/julian/.nuget/packages/": {} }, "project": { - "version": "1.0.16", + "version": "1.0.17", "restore": { "projectUniqueName": "/home/julian/Documentos/repos/audit/audit-logs/audit-logs/audit-logs.csproj", "projectName": "AuditLogs", diff --git a/audit-logs/audit-logs/obj/project.nuget.cache b/audit-logs/audit-logs/obj/project.nuget.cache index 80416dc..6efb0a3 100644 --- a/audit-logs/audit-logs/obj/project.nuget.cache +++ b/audit-logs/audit-logs/obj/project.nuget.cache @@ -1,6 +1,6 @@ { "version": 2, - "dgSpecHash": "Et3G5FTIc/k=", + "dgSpecHash": "dTEHYGtSsoE=", "success": true, "projectFilePath": "/home/julian/Documentos/repos/audit/audit-logs/audit-logs/audit-logs.csproj", "expectedPackageFiles": [ diff --git a/audit-logs/audit-logs/obj/rider.project.model.nuget.info b/audit-logs/audit-logs/obj/rider.project.model.nuget.info index 9e1b33b..bcd5acd 100644 --- a/audit-logs/audit-logs/obj/rider.project.model.nuget.info +++ b/audit-logs/audit-logs/obj/rider.project.model.nuget.info @@ -1 +1 @@ -17322799320339764 \ No newline at end of file +17326086729278728 \ No newline at end of file diff --git a/audit-logs/audit-logs/obj/rider.project.restore.info b/audit-logs/audit-logs/obj/rider.project.restore.info index bcd5acd..2406d88 100644 --- a/audit-logs/audit-logs/obj/rider.project.restore.info +++ b/audit-logs/audit-logs/obj/rider.project.restore.info @@ -1 +1 @@ -17326086729278728 \ No newline at end of file +17326358893202983 \ No newline at end of file diff --git a/audit-logs/audit-test/Repository/AuditServiceFilterbyTextAndDateTests.cs b/audit-logs/audit-test/Repository/AuditServiceFilterbyTextAndDateTests.cs index 539b9f3..ff103cd 100644 --- a/audit-logs/audit-test/Repository/AuditServiceFilterbyTextAndDateTests.cs +++ b/audit-logs/audit-test/Repository/AuditServiceFilterbyTextAndDateTests.cs @@ -28,7 +28,7 @@ public class AuditServiceFilterbyTextAndDateTests var allRecords = await _service.AuditLogRepository.GetAllAuditRecordsAsync(); // Assert - Assert.That(allRecords.Count(), Is.EqualTo(5), "All records from the JSON file should be loaded."); + Assert.That(allRecords.Count(), Is.EqualTo(7), "All records from the JSON file should be loaded."); } [Test] diff --git a/audit-logs/audit-test/bin/Debug/net8.0/audit-logs.dll b/audit-logs/audit-test/bin/Debug/net8.0/audit-logs.dll index c4b84ee..e377357 100644 Binary files a/audit-logs/audit-test/bin/Debug/net8.0/audit-logs.dll and b/audit-logs/audit-test/bin/Debug/net8.0/audit-logs.dll differ diff --git a/audit-logs/audit-test/bin/Debug/net8.0/audit-logs.pdb b/audit-logs/audit-test/bin/Debug/net8.0/audit-logs.pdb index d20d3ef..4713a2c 100644 Binary files a/audit-logs/audit-test/bin/Debug/net8.0/audit-logs.pdb and b/audit-logs/audit-test/bin/Debug/net8.0/audit-logs.pdb differ diff --git a/audit-logs/audit-test/bin/Debug/net8.0/audit-test.deps.json b/audit-logs/audit-test/bin/Debug/net8.0/audit-test.deps.json index ebc686e..651afd5 100644 --- a/audit-logs/audit-test/bin/Debug/net8.0/audit-test.deps.json +++ b/audit-logs/audit-test/bin/Debug/net8.0/audit-test.deps.json @@ -8,7 +8,7 @@ ".NETCoreApp,Version=v8.0": { "audit-test/1.0.0": { "dependencies": { - "AuditLogs": "1.0.16", + "AuditLogs": "1.0.17", "Microsoft.Extensions.Hosting": "8.0.0", "Microsoft.NET.Test.Sdk": "17.8.0", "Mongo2Go": "2.2.16", @@ -18,7 +18,7 @@ "NUnit3TestAdapter": "4.5.0", "coverlet.collector": "6.0.0", "xunit": "2.9.2", - "audit-logs": "1.0.16.0" + "audit-logs": "1.0.18.0" }, "runtime": { "audit-test.dll": {} @@ -944,7 +944,7 @@ } } }, - "AuditLogs/1.0.16": { + "AuditLogs/1.0.17": { "dependencies": { "Microsoft.Extensions.Hosting": "8.0.0", "MongoDB.Driver": "2.23.1", @@ -953,16 +953,16 @@ }, "runtime": { "audit-logs.dll": { - "assemblyVersion": "1.0.16", - "fileVersion": "1.0.16.0" + "assemblyVersion": "1.0.17", + "fileVersion": "1.0.18.0" } } }, - "audit-logs/1.0.16.0": { + "audit-logs/1.0.18.0": { "runtime": { "audit-logs.dll": { - "assemblyVersion": "1.0.16.0", - "fileVersion": "1.0.16.0" + "assemblyVersion": "1.0.18.0", + "fileVersion": "1.0.18.0" } } } @@ -1471,12 +1471,12 @@ "path": "zstdsharp.port/0.7.3", "hashPath": "zstdsharp.port.0.7.3.nupkg.sha512" }, - "AuditLogs/1.0.16": { + "AuditLogs/1.0.17": { "type": "project", "serviceable": false, "sha512": "" }, - "audit-logs/1.0.16.0": { + "audit-logs/1.0.18.0": { "type": "reference", "serviceable": false, "sha512": "" diff --git a/audit-logs/audit-test/bin/Debug/net8.0/audit-test.dll b/audit-logs/audit-test/bin/Debug/net8.0/audit-test.dll index d0d5cec..cd520f4 100644 Binary files a/audit-logs/audit-test/bin/Debug/net8.0/audit-test.dll and b/audit-logs/audit-test/bin/Debug/net8.0/audit-test.dll differ diff --git a/audit-logs/audit-test/bin/Debug/net8.0/audit-test.pdb b/audit-logs/audit-test/bin/Debug/net8.0/audit-test.pdb index e82b062..438f5a3 100644 Binary files a/audit-logs/audit-test/bin/Debug/net8.0/audit-test.pdb and b/audit-logs/audit-test/bin/Debug/net8.0/audit-test.pdb differ diff --git a/audit-logs/audit-test/obj/Debug/net8.0/audit-test.AssemblyInfo.cs b/audit-logs/audit-test/obj/Debug/net8.0/audit-test.AssemblyInfo.cs index 3246eed..1f87a1c 100644 --- a/audit-logs/audit-test/obj/Debug/net8.0/audit-test.AssemblyInfo.cs +++ b/audit-logs/audit-test/obj/Debug/net8.0/audit-test.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("audit-test")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8c3be106f93e44ea3daffe2267723e4026a0569d")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+7c08e6e218b786bd1ac8663615a55b7a1bbd429a")] [assembly: System.Reflection.AssemblyProductAttribute("audit-test")] [assembly: System.Reflection.AssemblyTitleAttribute("audit-test")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/audit-logs/audit-test/obj/Debug/net8.0/audit-test.AssemblyInfoInputs.cache b/audit-logs/audit-test/obj/Debug/net8.0/audit-test.AssemblyInfoInputs.cache index ebce432..e17ef0b 100644 --- a/audit-logs/audit-test/obj/Debug/net8.0/audit-test.AssemblyInfoInputs.cache +++ b/audit-logs/audit-test/obj/Debug/net8.0/audit-test.AssemblyInfoInputs.cache @@ -1 +1 @@ -142b1c1378f32e83f6fc5414661e98a2b515d2f45db3470d3ed86426c2d17e64 +beadb3471c102aa4f942699573b0c6b6cc2905637a4cf47b218f532af9de08f7 diff --git a/audit-logs/audit-test/obj/Debug/net8.0/audit-test.csproj.AssemblyReference.cache b/audit-logs/audit-test/obj/Debug/net8.0/audit-test.csproj.AssemblyReference.cache index c105615..b2f8e54 100644 Binary files a/audit-logs/audit-test/obj/Debug/net8.0/audit-test.csproj.AssemblyReference.cache and b/audit-logs/audit-test/obj/Debug/net8.0/audit-test.csproj.AssemblyReference.cache differ diff --git a/audit-logs/audit-test/obj/Debug/net8.0/audit-test.dll b/audit-logs/audit-test/obj/Debug/net8.0/audit-test.dll index d0d5cec..cd520f4 100644 Binary files a/audit-logs/audit-test/obj/Debug/net8.0/audit-test.dll and b/audit-logs/audit-test/obj/Debug/net8.0/audit-test.dll differ diff --git a/audit-logs/audit-test/obj/Debug/net8.0/audit-test.pdb b/audit-logs/audit-test/obj/Debug/net8.0/audit-test.pdb index e82b062..438f5a3 100644 Binary files a/audit-logs/audit-test/obj/Debug/net8.0/audit-test.pdb and b/audit-logs/audit-test/obj/Debug/net8.0/audit-test.pdb differ diff --git a/audit-logs/audit-test/obj/Debug/net8.0/ref/audit-test.dll b/audit-logs/audit-test/obj/Debug/net8.0/ref/audit-test.dll index 3594f30..8e37509 100644 Binary files a/audit-logs/audit-test/obj/Debug/net8.0/ref/audit-test.dll and b/audit-logs/audit-test/obj/Debug/net8.0/ref/audit-test.dll differ diff --git a/audit-logs/audit-test/obj/Debug/net8.0/refint/audit-test.dll b/audit-logs/audit-test/obj/Debug/net8.0/refint/audit-test.dll index 3594f30..8e37509 100644 Binary files a/audit-logs/audit-test/obj/Debug/net8.0/refint/audit-test.dll and b/audit-logs/audit-test/obj/Debug/net8.0/refint/audit-test.dll differ diff --git a/audit-logs/audit-test/obj/audit-test.csproj.nuget.dgspec.json b/audit-logs/audit-test/obj/audit-test.csproj.nuget.dgspec.json index 0791e42..58caec2 100644 --- a/audit-logs/audit-test/obj/audit-test.csproj.nuget.dgspec.json +++ b/audit-logs/audit-test/obj/audit-test.csproj.nuget.dgspec.json @@ -5,7 +5,7 @@ }, "projects": { "/home/julian/Documentos/repos/audit/audit-logs/audit-logs/audit-logs.csproj": { - "version": "1.0.16", + "version": "1.0.17", "restore": { "projectUniqueName": "/home/julian/Documentos/repos/audit/audit-logs/audit-logs/audit-logs.csproj", "projectName": "AuditLogs", diff --git a/audit-logs/audit-test/obj/project.assets.json b/audit-logs/audit-test/obj/project.assets.json index a3024e6..08a4a3f 100644 --- a/audit-logs/audit-test/obj/project.assets.json +++ b/audit-logs/audit-test/obj/project.assets.json @@ -1448,7 +1448,7 @@ "lib/net7.0/ZstdSharp.dll": {} } }, - "AuditLogs/1.0.16": { + "AuditLogs/1.0.17": { "type": "project", "framework": ".NETCoreApp,Version=v8.0", "dependencies": { @@ -3799,7 +3799,7 @@ "zstdsharp.port.nuspec" ] }, - "AuditLogs/1.0.16": { + "AuditLogs/1.0.17": { "type": "project", "path": "../audit-logs/audit-logs.csproj", "msbuildProject": "../audit-logs/audit-logs.csproj" @@ -3807,7 +3807,7 @@ }, "projectFileDependencyGroups": { "net8.0": [ - "AuditLogs >= 1.0.16", + "AuditLogs >= 1.0.17", "Microsoft.Extensions.Hosting >= 8.0.0", "Microsoft.NET.Test.Sdk >= 17.8.0", "Mongo2Go >= 2.2.16", diff --git a/audit-logs/audit-test/obj/project.nuget.cache b/audit-logs/audit-test/obj/project.nuget.cache index f32657c..9351075 100644 --- a/audit-logs/audit-test/obj/project.nuget.cache +++ b/audit-logs/audit-test/obj/project.nuget.cache @@ -1,6 +1,6 @@ { "version": 2, - "dgSpecHash": "7Jhsnyq0q5Y=", + "dgSpecHash": "f3yoSH3jMzc=", "success": true, "projectFilePath": "/home/julian/Documentos/repos/audit/audit-logs/audit-test/audit-test.csproj", "expectedPackageFiles": [ @@ -75,7 +75,7 @@ "/home/julian/.nuget/packages/xunit.extensibility.core/2.9.2/xunit.extensibility.core.2.9.2.nupkg.sha512", "/home/julian/.nuget/packages/xunit.extensibility.execution/2.9.2/xunit.extensibility.execution.2.9.2.nupkg.sha512", "/home/julian/.nuget/packages/zstdsharp.port/0.7.3/zstdsharp.port.0.7.3.nupkg.sha512", - "/home/julian/.nuget/packages/auditlogs/1.0.16/auditlogs.1.0.16.nupkg.sha512" + "/home/julian/.nuget/packages/auditlogs/1.0.17/auditlogs.1.0.17.nupkg.sha512" ], "logs": [] } \ No newline at end of file diff --git a/audit-logs/audit-test/obj/rider.project.model.nuget.info b/audit-logs/audit-test/obj/rider.project.model.nuget.info index f90f7eb..bcd5acd 100644 --- a/audit-logs/audit-test/obj/rider.project.model.nuget.info +++ b/audit-logs/audit-test/obj/rider.project.model.nuget.info @@ -1 +1 @@ -17322799320379764 \ No newline at end of file +17326086729278728 \ No newline at end of file diff --git a/audit-logs/audit-test/obj/rider.project.restore.info b/audit-logs/audit-test/obj/rider.project.restore.info index bcd5acd..2406d88 100644 --- a/audit-logs/audit-test/obj/rider.project.restore.info +++ b/audit-logs/audit-test/obj/rider.project.restore.info @@ -1 +1 @@ -17326086729278728 \ No newline at end of file +17326358893202983 \ No newline at end of file