This commit introduces new functions for handling various date operations, including start and end of day, week, month, hour, and minute. It also adds relative date parsing capabilities, allowing for expressions like 'TODAY', '-7D..', and '-1M..-CM'. Additionally, the `parseFilter` function is updated to support these new date functionalities, with corresponding tests added to ensure accurate date filtering and validation. The changes improve the overall date management and querying capabilities within the application.
This update enhances the `auditlogs.js` files by formatting the allowed filters for better clarity and refactoring the `listAuditLogsRouteHandler` function to improve code readability. Unused filter translations for Mongoose have been removed, streamlining the filtering logic. These changes contribute to cleaner code and easier future modifications.