Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📦 refactor: Move DB Models to @librechat/data-schemas #6210

Merged
merged 7 commits into from
Mar 7, 2025

Conversation

rubentalstra
Copy link
Collaborator

@rubentalstra rubentalstra commented Mar 6, 2025

Summary

This pull request includes several changes to the api/models directory to improve the codebase by updating schema imports and type definitions. The most important changes involve replacing local schema imports with imports from the @librechat/data-schemas package and updating type definitions in the api/models/File.js and api/models/Project.js files.

Schema Import Updates:

Type Definition Updates:

Other Notable Changes:

  • api/models/ConversationTag.js: Updated conversationTagSchema import to use @librechat/data-schemas and added mongoose import.
  • api/models/Prompt.js: Updated promptGroupSchema and promptSchema imports to use @librechat/data-schemas and added mongoose import.
  • api/models/Role.js: Updated roleSchema import to use @librechat/data-schemas and added mongoose import.
  • api/models/Session.js: Updated sessionSchema import to use @librechat/data-schemas.
  • api/models/Share.js: Updated shareSchema import to use @librechat/data-schemas and added mongoose import.
  • api/models/Token.js: Updated tokenSchema import to use @librechat/data-schemas.

Change Type

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Testing

Please describe your test process and include instructions so that we can reproduce your test. If there are any important variables for your testing configuration, list them here.

Test Configuration:

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • I have made pertinent documentation changes
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective or that my feature works
  • Local unit tests pass with my changes
  • Any changes dependent on mine have been merged and published in downstream modules.
  • A pull request for updating the documentation has been submitted.

@rubentalstra rubentalstra added this to the v0.7.8 milestone Mar 6, 2025
@rubentalstra rubentalstra added the 🔨 refactor Code cleanup without new features label Mar 6, 2025
@rubentalstra rubentalstra changed the title 🚀 feat: Introduce data schemas and refactor models to use @librechat/data-schemas 🚀 feat: Introduce data schemas and refactor models to use @librechat/data-schemas Mar 6, 2025
@rubentalstra rubentalstra self-assigned this Mar 6, 2025
@rubentalstra rubentalstra marked this pull request as ready for review March 6, 2025 22:00
@rubentalstra rubentalstra requested a review from danny-avila March 6, 2025 22:00
@danny-avila danny-avila changed the title 🚀 feat: Introduce data schemas and refactor models to use @librechat/data-schemas 📦 refactor: Move DB Models to @librechat/data-schemas Mar 7, 2025
@danny-avila danny-avila merged commit b51cd21 into main Mar 7, 2025
7 checks passed
@danny-avila danny-avila deleted the refactor/data-schemas branch March 7, 2025 16:55
danny-avila pushed a commit that referenced this pull request Mar 8, 2025
…6245)

* 📦 refactor: Update MeiliSearch integration and improve schema handling

* Update indexSync.js

* 📦 refactor: Update Conversation model import path in indexSync.js

* 📦 refactor: Update import paths for Conversation and Message models in indexSync.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 refactor Code cleanup without new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants