mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-23 18:56:12 +01:00
19 lines
641 B
TypeScript
19 lines
641 B
TypeScript
|
|
import { createUserMethods, type UserMethods } from './user';
|
||
|
|
import { createSessionMethods, type SessionMethods } from './session';
|
||
|
|
import { createTokenMethods, type TokenMethods } from './token';
|
||
|
|
import { createRoleMethods, type RoleMethods } from './role';
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Creates all database methods for all collections
|
||
|
|
*/
|
||
|
|
export function createMethods(mongoose: typeof import('mongoose')) {
|
||
|
|
return {
|
||
|
|
...createUserMethods(mongoose),
|
||
|
|
...createSessionMethods(mongoose),
|
||
|
|
...createTokenMethods(mongoose),
|
||
|
|
...createRoleMethods(mongoose),
|
||
|
|
};
|
||
|
|
}
|
||
|
|
|
||
|
|
export type AllMethods = UserMethods & SessionMethods & TokenMethods & RoleMethods;
|