Commit Graph

6 Commits

Author SHA1 Message Date
fullex
3d0e7a6c15 feat(api): enhance message deletion functionality with activeNodeId management
- Introduced `ActiveNodeStrategy` type to define strategies for updating `activeNodeId` when a message is deleted.
- Updated `DeleteMessageResponse` to include `newActiveNodeId` for tracking changes to the active node after deletion.
- Modified the `DELETE` endpoint to accept `activeNodeStrategy` as a query parameter, allowing for flexible handling of active node updates.
- Enhanced the `delete` method in `MessageService` to implement the new strategies, ensuring consistent behavior during message deletions.
2025-12-29 13:42:05 +08:00
fullex
9c47937714 feat(api): enhance message and topic schemas with new features
- Added `setAsActive` property to `CreateMessageDto` for controlling active node status in topics.
- Updated `messageTable` and `topicTable` schemas to include foreign key constraints and improved handling of active node references.
- Refactored message and topic service methods to utilize `.returning()` for better data retrieval after inserts and updates.
- Implemented hard delete functionality for messages and topics, replacing soft delete logic to ensure data integrity.
2025-12-29 00:42:55 +08:00
fullex
942e014d92 fix(api): enhance message status handling
- Updated MessageStatus type to include 'pending' as a new state, reflecting the message processing lifecycle.
- Modified CreateMessageDto and UpdateMessageDto interfaces to utilize the updated MessageStatus type for improved clarity and consistency in message status management.
2025-12-28 21:24:00 +08:00
fullex
7faff7ad4b feat(api): implement message branching API with tree structure support
- Add Topic and Message API endpoints for CRUD operations
  - Implement tree visualization queries (GET /topics/:id/tree)
  - Implement branch message queries with pagination (GET /topics/:id/messages)
  - Add multi-model response grouping via siblingsGroupId
  - Support topic forking from existing message nodes
  - Add INVALID_OPERATION error code for business rule violations
  - Update API design guidelines documentation
2025-12-28 12:54:06 +08:00
fullex
0b35029404 refactor(dataApi): remove batch and transaction support from Data API
- Deleted batch and transaction related schemas, handlers, and IPC channels to streamline the Data API.
- Updated related type definitions and import paths to reflect the removal of batch and transaction functionalities.
- Simplified the API server and adapter logic by eliminating unused methods and handlers.
2025-12-26 14:17:08 +08:00
fullex
18df6085d7 refactor(dataApi): streamline Data API schema and type definitions
- Removed outdated API model and schema files to simplify the structure.
- Consolidated API types and schemas for better organization and clarity.
- Updated import paths across the codebase to reflect the new structure.
- Enhanced documentation in related README files to guide usage of the new API schema organization.
2025-12-26 12:52:32 +08:00