📦 refactor: Move DB Models to @librechat/data-schemas
#6210
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 theapi/models/File.js
andapi/models/Project.js
files.Schema Import Updates:
api/models/Action.js
: UpdatedactionSchema
import to use@librechat/data-schemas
.api/models/Agent.js
: UpdatedagentSchema
import to use@librechat/data-schemas
.api/models/Assistant.js
: UpdatedassistantSchema
import to use@librechat/data-schemas
.api/models/Balance.js
: UpdatedbalanceSchema
import to use@librechat/data-schemas
.api/models/Banner.js
: UpdatedbannerSchema
import to use@librechat/data-schemas
and addedmongoose
import.Type Definition Updates:
api/models/File.js
: Updated type definitions fromMongoFile
toIMongoFile
for various methods. [1] [2] [3] [4] [5] [6]api/models/Project.js
: Updated type definitions fromMongoProject
toIMongoProject
for various methods. [1] [2] [3] [4] [5] [6]Other Notable Changes:
api/models/ConversationTag.js
: UpdatedconversationTagSchema
import to use@librechat/data-schemas
and addedmongoose
import.api/models/Prompt.js
: UpdatedpromptGroupSchema
andpromptSchema
imports to use@librechat/data-schemas
and addedmongoose
import.api/models/Role.js
: UpdatedroleSchema
import to use@librechat/data-schemas
and addedmongoose
import.api/models/Session.js
: UpdatedsessionSchema
import to use@librechat/data-schemas
.api/models/Share.js
: UpdatedshareSchema
import to use@librechat/data-schemas
and addedmongoose
import.api/models/Token.js
: UpdatedtokenSchema
import to use@librechat/data-schemas
.Change Type
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