- Added new indexes for the notices collection in the notice repository to improve query performance.
- Introduced indexes for `processing_metadata.processed` and `main_classification`, optimizing data retrieval and management.
- Modified the validation rule for the Country field in the CMSForm struct to ensure it requires exactly 3 characters, enhancing input validation consistency.
- This change improves the robustness of the form handling by enforcing stricter validation criteria.
- Modified the GetUnProcessedNotices method in the notice repository to include a filter for main_classification set to "72000000".
- Changed the sort order from ascending to descending for the created_at field, improving the retrieval of unprocessed notices.
- Added JSON tags to all fields in the CMS entity and its related sections (heroSection, chartSection, cardSection, contactSection, footerSection) to ensure proper serialization and deserialization in API responses.
- This change improves the API's usability by providing clear JSON representations of the CMS data structure.
- Added an entrypoint script to the scraper Dockerfile to handle one-time scraping with date range support.
- Introduced a new ContentXML field in the Notice entity to store XML content, improving data structure for notices.
- Updated the scraper logic to map XML content to the tender entity, enhancing data processing capabilities.
- Added a new Type field to the CMS entity to differentiate between Company and Organization types, improving data categorization.
- Updated the CMSForm to include validation for the Type field, ensuring proper input handling.
- Modified the ToResponse method to include the Type field in the CMSResponse, enhancing the API response structure.
- Adjusted the copyFormToEntity method in the CMS service to handle the new Type field, maintaining data integrity based on the selected type.
- Enhanced Swagger documentation to reflect the changes in the CMS API, providing clear examples for the new Type field.
- Added new fields to the CMS entity: CompanyName, Country, and Language, enhancing the data structure for better content management.
- Updated the CMSForm to include validation and examples for the new fields, ensuring proper input handling.
- Modified the copyFormToEntity method in the CMS service to map the new fields from the form to the entity, maintaining data integrity.
- Enhanced Swagger documentation to reflect the changes in the CMS API, providing clear examples for the new fields.
- Refactored the NoticeWorker to generate unique tender IDs using the PBL naming convention (SCDYYNNN format) and project names based on client and opportunity details.
- Introduced methods for generating tender IDs and project names, including logic for extracting client and opportunity names, ensuring consistency and clarity in naming.
- Updated the Tender entity to include a new ProjectName field, enhancing the data structure for better project identification.
- Added MongoDB indexing for the new project_name field to optimize query performance.
- Improved error handling and logging during the tender ID generation process, ensuring robustness in the worker's functionality.
- Updated the worker initialization process to include the new GLM SDK, enhancing the worker's capabilities for translation tasks.
- Modified the InitWorker function and NewNoticeWorker constructor to accept the GLM service, ensuring a cohesive integration.
- Implemented the GLM service initialization and logging for successful setup, improving maintainability and usability.
- Updated the NoticeWorker to utilize the GLM SDK for translating notice titles and descriptions, enhancing functionality and user experience.
- Introduced a new CMS management feature, including the ability to create, retrieve, update, search, and delete CMS entries.
- Implemented the CMS entity, repository, service, and handler layers following Clean Architecture principles.
- Added API endpoints for CMS operations in Swagger documentation, ensuring comprehensive API specifications.
- Enhanced error handling and validation for CMS data, improving robustness and user experience.
- Updated the main application to initialize the CMS repository and service, integrating them into the existing system.
- Introduced a new contact management feature, including the ability to create, retrieve, search, update, and delete contact messages.
- Implemented the Contact entity, repository, service, and handler layers following Clean Architecture principles.
- Added API endpoints for contact operations in Swagger documentation, ensuring comprehensive API specifications.
- Enhanced error handling and validation for contact data, improving robustness and user experience.
- Updated the main application to initialize the contact repository and service, integrating them into the existing system.
- Modified the Send method in the NotificationHandler to dispatch notifications asynchronously by using a goroutine, improving responsiveness and allowing the handler to return immediately after initiating the send process.
- This change enhances the user experience by not blocking the request while the notification is being sent, ensuring smoother operation of the API.
- Updated the Send method in the notification service to handle optional image and link fields more gracefully by using local variables.
- Improved logging to ensure that the correct values are sent in the notification context, enhancing clarity and maintainability of the notification process.
- This change ensures that nil values for image and link do not cause dereferencing issues, improving overall robustness of the notification sending logic.
- Added 'image' and 'link' fields to the NotificationRequest and NotificationResponse structures, improving the flexibility of notification content.
- Updated the 'created_at', 'updated_at', and 'schedule_at' fields to use integer types for Unix timestamps, ensuring consistency in time handling.
- Expanded the tender status enumeration to include 'closed', 'modified', 'suspended', and 'published', enhancing the representation of tender states.
- Reflected these changes in the Swagger documentation, ensuring accurate API specifications for clients.
- Modified the SearchForm struct to utilize query parameters for feedback search criteria, enhancing API consistency and usability.
- Updated validation tags accordingly to reflect the new query parameter structure, ensuring proper validation during request handling.
- Introduced a new worker service with a dedicated main entry point for handling background tasks, including MongoDB connection management and notification service initialization.
- Added a bootstrap package to manage application configuration, logging, and service initialization for the worker.
- Implemented a NoticeWorker to process unprocessed notices and create corresponding tender entities, enhancing the integration of notice management within the tender system.
- Refactored the tender service to remove the Ollama SDK dependency, streamlining the service initialization in the main application.
- Enhanced the notice repository with a method to retrieve unprocessed notices, improving data handling capabilities.
- Replaced the tender repository with a new notice repository, encapsulating notice-related data access methods.
- Introduced the Notice entity to represent tender/contract notices, including relevant fields and methods for managing notice data.
- Updated the TED scraper to utilize the new notice repository for creating and managing notices, enhancing the integration with the tender management system.
- Implemented Ollama SDK initialization in the web bootstrap process, allowing for improved AI interactions.
- Enhanced the tender service to include Ollama SDK for additional functionality, ensuring a more robust service layer.
- Updated the tender repository to create a unique index on tender_id, enhancing database query performance.
- Introduced new TED mapping functions to convert parsed TED documents into tender entities, improving integration with the tender management system.
- Added error handling for contract notice processing in the TED scraper, ensuring robust logging and error management.
- Removed deprecated eform structures to streamline the codebase and focus on essential components.
- Added logic to send an asynchronous email notification when a customer's username is updated, improving user communication regarding account changes.
- Introduced a flag to track if the username has changed, ensuring notifications are only sent when necessary.
- Enhanced error handling and logging for successful customer updates, maintaining clarity in operational logs.
- Updated GetByIDs methods in customer and user repositories to convert string IDs to bson.ObjectID, ensuring proper handling of MongoDB object IDs.
- Enhanced error handling for ID conversion to provide clearer feedback when invalid IDs are provided.
- Modified notification service calls in customer and user services to use context.Background() for asynchronous email sending, improving concurrency management.
- Ensured consistent handling of company IDs in the customer repository for retrieving customers by companies.
- Updated the Logout method in customer service to retrieve the customer by ID before invalidating the access token, enhancing error logging for failed retrievals.
- Added error handling for the access token invalidation process, ensuring a clear error message is returned if it fails.
- Implemented logic to clear the device token upon logout, updating the customer record accordingly and logging any errors during the update process.
- Improved logging for successful and failed logout operations to enhance traceability.
- Introduced a new configuration file for the TED scraper, defining database connection settings, logging preferences, and scraping parameters.
- Implemented a CronScheduler to manage scheduled tasks for TED operations, utilizing the robfig/cron library for scheduling.
- Added new entities and structures for handling TED XML data, including eForms and tender-related information, enhancing the scraper's functionality.
- Updated the main application to initialize the TED scraper with the new configuration and set up graceful shutdown handling.
- Removed the deprecated scraping implementation to streamline the codebase and focus on the new architecture.
- Updated the Tender entity to remove redundant comments on Unix timestamp fields, enhancing code readability.
- Renamed the AwardedEntity type to Awarded for improved clarity and consistency in naming conventions.
- Removed the transformPriorInformationNoticeToContractNotice method from TEDParser, streamlining the parser's functionality and reducing legacy code.
- Added new fields to the Tender entity for handling cancellation, award, and suspension details, improving the entity's capability to manage tender statuses.
- Implemented a DetectNoticeStatus method in the TEDParser to identify the status of TED notices from XML data, enhancing the parser's functionality.
- Updated the ParseXML method to include notice status detection, ensuring accurate status representation in parsed documents.
- Introduced upsert logic in the TED scraper to handle tender records more effectively, allowing for updates or creation based on existing ContractIDs.
- Enhanced logging and error handling throughout the scraping process to improve traceability and robustness.
- Added a comprehensive usage example document to illustrate the new features and usage patterns for the TED XML parser and scraper.
- Modified the ToResponse method in the Tender entity to create an OrganizationResponse instance for BuyerOrganization, ensuring safe access to its Name field.
- This change improves the robustness of the response structure by preventing potential nil dereference errors when BuyerOrganization is not set.
- Updated GetByID methods in user and customer services to return specific "not found" errors for better clarity in error responses.
- Modified NotificationResponse structure to include a new Recipient field, allowing for more flexible recipient handling.
- Changed CreatedAt and UpdatedAt fields in NotificationResponse to use Unix timestamps (int64) for consistency across the application.
- Improved notification retrieval logic to handle potential nil values for user and customer lookups, ensuring robust data handling.
- Changed API title and version in Swagger documentation from "Tender Management API" to "Opplens API" with version 1.0.0.
- Updated contact information and terms of service URLs to reflect the new branding for Opplens.
- Added a new "Notification" tag in the Swagger documentation for public notification management operations.
- Adjusted the Swagger endpoint path for documentation to improve routing consistency.
- Enhanced response structure in notification handlers to include metadata, improving clarity in API responses.
- Introduced a new ValidationService for customer operations to ensure valid username formats.
- Updated customer service and handler to utilize the new validation service, enhancing input validation during registration and updates.
- Modified CreateCustomerForm and UpdateCustomerForm to enforce username validation rules.
- Adjusted repository indexing to improve search efficiency by refining the text index for customer data.
- Ensured consistent handling of usernames across the customer module, improving overall data integrity and user experience.
- Updated the Register, Update, and Login methods in both customer and user services to ensure usernames are consistently stored and processed in lowercase.
- Modified notification messages to reflect the lowercase username format, enhancing clarity and consistency in user communications.
- Improved username existence checks during registration and updates to prevent case-sensitive duplicates, ensuring a more robust user experience.
- Updated feedback repository and service methods to use a consistent naming convention, changing `NewTenderRepository` and similar methods to `NewRepository`.
- Refactored feedback handler methods to improve clarity by renaming methods such as `ListFeedback` to `Search` and `GetFeedback` to `Get`.
- Enhanced feedback response structures to include detailed company and tender information, improving the clarity of feedback data returned to API consumers.
- Updated Swagger documentation to reflect changes in feedback response structures and endpoint paths, ensuring accurate representation of the API for consumers.
- Updated the notification routes to enhance clarity and usability by changing the endpoint for marking notifications as seen.
- Introduced a new route for marking all notifications as seen, improving the API's functionality and user experience.
- Updated Swagger documentation to reflect the changes in endpoint paths, ensuring accurate API documentation for consumers.
- Enhanced the GetByIDs method to convert string IDs to BSON ObjectIDs before querying the database, ensuring proper data type handling.
- This change improves the robustness of the method by preventing potential errors related to ID format mismatches during database operations.
- Introduced new query parameters for filtering notifications by 'seen' status and 'priority' in the API documentation, enhancing the flexibility of notification retrieval.
- Added a new endpoint to mark all notifications as seen for a user, including detailed Swagger documentation for the new functionality.
- Updated existing API documentation to reflect the changes, ensuring clarity for API consumers and improving overall documentation quality.
- Removed the use of the slices package for checking existing device tokens during customer login.
- Updated the Login method to directly assign the device token to the customer, ensuring a more straightforward approach to managing device tokens.
- Enhanced code readability by eliminating unnecessary checks, streamlining the login process for customers.
- Introduced CustomerNotificationResponse struct to provide a detailed response format for customer notifications, improving the clarity of notification data.
- Updated the Customer service interface to include methods for searching and retrieving customers with notification-specific responses, enhancing the flexibility of customer data retrieval.
- Modified the Login method to accept a device token, allowing for better tracking of customer devices during login.
- Refactored existing methods to utilize the new notification response structure, ensuring consistency across customer-related API responses.
- Enhanced error handling and logging in the service layer for improved traceability during customer searches and logins.
- Introduced the AllMarkSeen method in the notification service to mark all notifications as seen for a user, enhancing user experience by allowing bulk actions on notifications.
- Implemented the PublicAllMarkSeen handler to handle HTTP requests for marking all notifications as seen, ensuring proper request validation and response handling.
- Updated the notification client and SDK to support the new AllMarkSeen functionality, improving the overall API capabilities.
- Enhanced API documentation with Swagger comments for the new endpoint, ensuring clarity for API consumers.