@librechat/data-schemas 0.0.21 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +44 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +44 -11
- package/dist/index.es.js.map +1 -1
- package/dist/types/methods/token.d.ts +2 -2
- package/dist/types/methods/token.spec.d.ts +1 -0
- package/dist/types/models/plugins/mongoMeili.d.ts +2 -2
- package/package.json +1 -2
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
/// <reference types="mongoose/types/utility" />
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
-
/// <reference types="mongoose" />
|
|
25
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
26
25
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
|
+
import type { QueryOptions } from 'mongoose';
|
|
27
27
|
import { IToken, TokenCreateData, TokenQuery, TokenUpdateData, TokenDeleteResult } from '~/types';
|
|
28
28
|
export declare function createTokenMethods(mongoose: typeof import('mongoose')): {
|
|
29
|
-
findToken: (query: TokenQuery) => Promise<IToken | null>;
|
|
29
|
+
findToken: (query: TokenQuery, options?: QueryOptions) => Promise<IToken | null>;
|
|
30
30
|
createToken: (tokenData: TokenCreateData) => Promise<IToken>;
|
|
31
31
|
updateToken: (query: TokenQuery, updateData: TokenUpdateData) => Promise<IToken | null>;
|
|
32
32
|
deleteTokens: (query: TokenQuery) => Promise<TokenDeleteResult>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
25
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
|
-
import type { SearchResponse, Index } from 'meilisearch';
|
|
26
|
+
import type { SearchResponse, SearchParams, Index } from 'meilisearch';
|
|
27
27
|
import type { CallbackWithoutResultAndOptionalError, Document, Schema, Model } from 'mongoose';
|
|
28
28
|
import type { IConversation, IMessage } from '~/types';
|
|
29
29
|
interface MongoMeiliOptions {
|
|
@@ -73,7 +73,7 @@ export interface SchemaWithMeiliMethods extends Model<DocumentWithMeiliIndex> {
|
|
|
73
73
|
}>): Promise<void>;
|
|
74
74
|
cleanupMeiliIndex(index: Index<MeiliIndexable>, primaryKey: string, batchSize: number, delayMs: number): Promise<void>;
|
|
75
75
|
setMeiliIndexSettings(settings: Record<string, unknown>): Promise<unknown>;
|
|
76
|
-
meiliSearch(q: string, params?:
|
|
76
|
+
meiliSearch(q: string, params?: SearchParams, populate?: boolean): Promise<SearchResponse<MeiliIndexable, Record<string, unknown>>>;
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
79
|
* Mongoose plugin to synchronize MongoDB collections with a MeiliSearch index.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@librechat/data-schemas",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.23",
|
|
4
4
|
"description": "Mongoose schemas and models for LibreChat",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -53,7 +53,6 @@
|
|
|
53
53
|
"mongodb-memory-server": "^10.1.4",
|
|
54
54
|
"rimraf": "^5.0.1",
|
|
55
55
|
"rollup": "^4.22.4",
|
|
56
|
-
"rollup-plugin-generate-package-json": "^3.2.0",
|
|
57
56
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
58
57
|
"rollup-plugin-typescript2": "^0.35.0",
|
|
59
58
|
"ts-node": "^10.9.2",
|