diff --git a/package-lock.json b/package-lock.json index 1c4b14c997..9bf8acf6ac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -51874,7 +51874,7 @@ }, "packages/data-schemas": { "name": "@librechat/data-schemas", - "version": "0.0.15", + "version": "0.0.16", "license": "MIT", "devDependencies": { "@rollup/plugin-alias": "^5.1.0", diff --git a/packages/data-schemas/package.json b/packages/data-schemas/package.json index 71c5ccc630..91068d2e6c 100644 --- a/packages/data-schemas/package.json +++ b/packages/data-schemas/package.json @@ -1,6 +1,6 @@ { "name": "@librechat/data-schemas", - "version": "0.0.15", + "version": "0.0.16", "description": "Mongoose schemas and models for LibreChat", "type": "module", "main": "dist/index.cjs", diff --git a/packages/data-schemas/src/schema/index.ts b/packages/data-schemas/src/schema/index.ts index a7de162e0b..2d94db5301 100644 --- a/packages/data-schemas/src/schema/index.ts +++ b/packages/data-schemas/src/schema/index.ts @@ -23,3 +23,4 @@ export { default as toolCallSchema } from './toolCall'; export { default as transactionSchema } from './transaction'; export { default as userSchema } from './user'; export { default as memorySchema } from './memory'; +export { default as groupSchema } from './group'; diff --git a/packages/data-schemas/src/schema/user.ts b/packages/data-schemas/src/schema/user.ts index 3a0f140546..d46d4f9c87 100644 --- a/packages/data-schemas/src/schema/user.ts +++ b/packages/data-schemas/src/schema/user.ts @@ -51,6 +51,7 @@ const userSchema = new Schema( trim: true, minlength: 8, maxlength: 128, + select: false, }, avatar: { type: String, @@ -114,6 +115,7 @@ const userSchema = new Schema( }, totpSecret: { type: String, + select: false, }, backupCodes: { type: [BackupCodeSchema], diff --git a/packages/data-schemas/src/types/group.ts b/packages/data-schemas/src/types/group.ts index 22d68a6aab..4a46b417e7 100644 --- a/packages/data-schemas/src/types/group.ts +++ b/packages/data-schemas/src/types/group.ts @@ -1,6 +1,6 @@ -import type { Document, Types } from 'mongoose'; +import { Document } from 'mongoose'; -export type Group = { +export interface IGroup extends Document { /** The name of the group */ name: string; /** Optional description of the group */ @@ -15,9 +15,7 @@ export type Group = { source: 'local' | 'entra'; /** External ID (e.g., Entra ID) - required for non-local sources */ idOnTheSource?: string; -}; - -export type IGroup = Group & - Document & { - _id: Types.ObjectId; - }; + /** Timestamps */ + createdAt?: Date; + updatedAt?: Date; +}