@librechat/data-schemas 0.0.7 → 0.0.8
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 +1470 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +1467 -6
- package/dist/index.es.js.map +1 -1
- package/dist/types/config/meiliLogger.d.ts +4 -0
- package/dist/types/config/parsers.d.ts +32 -0
- package/dist/types/config/winston.d.ts +4 -0
- package/dist/types/crypto/index.d.ts +3 -0
- package/dist/types/index.d.ts +7 -46
- package/dist/types/methods/index.d.ts +67 -0
- package/dist/types/methods/role.d.ts +35 -0
- package/dist/types/methods/session.d.ts +48 -0
- package/dist/types/methods/token.d.ts +34 -0
- package/dist/types/methods/user.d.ts +38 -0
- package/dist/types/methods/user.test.d.ts +1 -0
- package/dist/types/models/action.d.ts +30 -0
- package/dist/types/models/agent.d.ts +30 -0
- package/dist/types/models/assistant.d.ts +30 -0
- package/dist/types/models/balance.d.ts +30 -0
- package/dist/types/models/banner.d.ts +30 -0
- package/dist/types/models/conversationTag.d.ts +30 -0
- package/dist/types/models/convo.d.ts +30 -0
- package/dist/types/models/file.d.ts +30 -0
- package/dist/types/models/index.d.ts +53 -0
- package/dist/types/models/key.d.ts +30 -0
- package/dist/types/models/message.d.ts +30 -0
- package/dist/types/models/pluginAuth.d.ts +30 -0
- package/dist/types/models/plugins/mongoMeili.d.ts +52 -0
- package/dist/types/models/preset.d.ts +30 -0
- package/dist/types/models/project.d.ts +30 -0
- package/dist/types/models/prompt.d.ts +30 -0
- package/dist/types/models/promptGroup.d.ts +30 -0
- package/dist/types/models/role.d.ts +30 -0
- package/dist/types/models/session.d.ts +30 -0
- package/dist/types/models/sharedLink.d.ts +30 -0
- package/dist/types/models/token.d.ts +30 -0
- package/dist/types/models/toolCall.d.ts +30 -0
- package/dist/types/models/transaction.d.ts +30 -0
- package/dist/types/models/user.d.ts +30 -0
- package/dist/types/schema/action.d.ts +2 -27
- package/dist/types/schema/agent.d.ts +4 -31
- package/dist/types/schema/assistant.d.ts +4 -16
- package/dist/types/schema/balance.d.ts +4 -12
- package/dist/types/schema/convo.d.ts +2 -49
- package/dist/types/schema/file.d.ts +2 -26
- package/dist/types/schema/index.d.ts +23 -0
- package/dist/types/schema/message.d.ts +2 -36
- package/dist/types/schema/role.d.ts +2 -5
- package/dist/types/schema/session.d.ts +2 -6
- package/dist/types/schema/token.d.ts +2 -11
- package/dist/types/schema/user.d.ts +5 -36
- package/dist/types/types/action.d.ts +52 -0
- package/dist/types/types/agent.d.ts +55 -0
- package/dist/types/types/assistant.d.ts +39 -0
- package/dist/types/types/balance.d.ts +35 -0
- package/dist/types/types/banner.d.ts +34 -0
- package/dist/types/types/convo.d.ts +74 -0
- package/dist/types/types/file.d.ts +51 -0
- package/dist/types/types/index.d.ts +12 -0
- package/dist/types/types/message.d.ts +67 -0
- package/dist/types/types/role.d.ts +30 -0
- package/dist/types/types/session.d.ts +61 -0
- package/dist/types/types/token.d.ts +62 -0
- package/dist/types/types/user.d.ts +91 -0
- package/package.json +12 -5
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose" />
|
|
25
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
26
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
27
|
+
/**
|
|
28
|
+
* Creates or returns the Session model using the provided mongoose instance and schema
|
|
29
|
+
*/
|
|
30
|
+
export declare function createSessionModel(mongoose: typeof import('mongoose')): import("mongoose").Model<any, {}, {}, {}, any, any>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose" />
|
|
25
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
26
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
27
|
+
/**
|
|
28
|
+
* Creates or returns the SharedLink model using the provided mongoose instance and schema
|
|
29
|
+
*/
|
|
30
|
+
export declare function createSharedLinkModel(mongoose: typeof import('mongoose')): import("mongoose").Model<any, {}, {}, {}, any, any>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose" />
|
|
25
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
26
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
27
|
+
/**
|
|
28
|
+
* Creates or returns the Token model using the provided mongoose instance and schema
|
|
29
|
+
*/
|
|
30
|
+
export declare function createTokenModel(mongoose: typeof import('mongoose')): import("mongoose").Model<any, {}, {}, {}, any, any>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose" />
|
|
25
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
26
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
27
|
+
/**
|
|
28
|
+
* Creates or returns the ToolCall model using the provided mongoose instance and schema
|
|
29
|
+
*/
|
|
30
|
+
export declare function createToolCallModel(mongoose: typeof import('mongoose')): import("mongoose").Model<any, {}, {}, {}, any, any>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose" />
|
|
25
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
26
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
27
|
+
/**
|
|
28
|
+
* Creates or returns the Transaction model using the provided mongoose instance and schema
|
|
29
|
+
*/
|
|
30
|
+
export declare function createTransactionModel(mongoose: typeof import('mongoose')): import("mongoose").Model<any, {}, {}, {}, any, any>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose" />
|
|
25
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
26
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
27
|
+
/**
|
|
28
|
+
* Creates or returns the User model using the provided mongoose instance and schema
|
|
29
|
+
*/
|
|
30
|
+
export declare function createUserModel(mongoose: typeof import('mongoose')): import("mongoose").Model<any, {}, {}, {}, any, any>;
|
|
@@ -23,33 +23,8 @@
|
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
25
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
|
-
import mongoose
|
|
27
|
-
|
|
28
|
-
user: mongoose.Types.ObjectId;
|
|
29
|
-
action_id: string;
|
|
30
|
-
type: string;
|
|
31
|
-
settings?: unknown;
|
|
32
|
-
agent_id?: string;
|
|
33
|
-
assistant_id?: string;
|
|
34
|
-
metadata: {
|
|
35
|
-
api_key?: string;
|
|
36
|
-
auth: {
|
|
37
|
-
authorization_type?: string;
|
|
38
|
-
custom_auth_header?: string;
|
|
39
|
-
type: 'service_http' | 'oauth' | 'none';
|
|
40
|
-
authorization_content_type?: string;
|
|
41
|
-
authorization_url?: string;
|
|
42
|
-
client_url?: string;
|
|
43
|
-
scope?: string;
|
|
44
|
-
token_exchange_method: 'default_post' | 'basic_auth_header' | null;
|
|
45
|
-
};
|
|
46
|
-
domain: string;
|
|
47
|
-
privacy_policy_url?: string;
|
|
48
|
-
raw_spec?: string;
|
|
49
|
-
oauth_client_id?: string;
|
|
50
|
-
oauth_client_secret?: string;
|
|
51
|
-
};
|
|
52
|
-
}
|
|
26
|
+
import mongoose from 'mongoose';
|
|
27
|
+
import type { IAction } from '~/types';
|
|
53
28
|
declare const Action: mongoose.Schema<IAction, mongoose.Model<IAction, any, any, any, mongoose.Document<unknown, any, IAction> & IAction & Required<{
|
|
54
29
|
_id: unknown;
|
|
55
30
|
}> & {
|
|
@@ -23,40 +23,13 @@
|
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
25
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
|
-
import { Schema
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
name?: string;
|
|
30
|
-
description?: string;
|
|
31
|
-
instructions?: string;
|
|
32
|
-
avatar?: {
|
|
33
|
-
filepath: string;
|
|
34
|
-
source: string;
|
|
35
|
-
};
|
|
36
|
-
provider: string;
|
|
37
|
-
model: string;
|
|
38
|
-
model_parameters?: Record<string, unknown>;
|
|
39
|
-
artifacts?: string;
|
|
40
|
-
access_level?: number;
|
|
41
|
-
recursion_limit?: number;
|
|
42
|
-
tools?: string[];
|
|
43
|
-
tool_kwargs?: Array<unknown>;
|
|
44
|
-
actions?: string[];
|
|
45
|
-
author: Types.ObjectId;
|
|
46
|
-
authorName?: string;
|
|
47
|
-
hide_sequential_outputs?: boolean;
|
|
48
|
-
end_after_tools?: boolean;
|
|
49
|
-
agent_ids?: string[];
|
|
50
|
-
isCollaborative?: boolean;
|
|
51
|
-
conversation_starters?: string[];
|
|
52
|
-
tool_resources?: unknown;
|
|
53
|
-
projectIds?: Types.ObjectId[];
|
|
54
|
-
}
|
|
55
|
-
declare const agentSchema: Schema<IAgent, import("mongoose").Model<IAgent, any, any, any, Document<unknown, any, IAgent> & IAgent & Required<{
|
|
26
|
+
import { Schema } from 'mongoose';
|
|
27
|
+
import type { IAgent } from '~/types';
|
|
28
|
+
declare const agentSchema: Schema<IAgent, import("mongoose").Model<IAgent, any, any, any, import("mongoose").Document<unknown, any, IAgent> & IAgent & Required<{
|
|
56
29
|
_id: unknown;
|
|
57
30
|
}> & {
|
|
58
31
|
__v: number;
|
|
59
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IAgent, Document<unknown, {}, import("mongoose").FlatRecord<IAgent>> & import("mongoose").FlatRecord<IAgent> & Required<{
|
|
32
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IAgent, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IAgent>> & import("mongoose").FlatRecord<IAgent> & Required<{
|
|
60
33
|
_id: unknown;
|
|
61
34
|
}> & {
|
|
62
35
|
__v: number;
|
|
@@ -23,25 +23,13 @@
|
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
25
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
|
-
import { Schema
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
assistant_id: string;
|
|
30
|
-
avatar?: {
|
|
31
|
-
filepath: string;
|
|
32
|
-
source: string;
|
|
33
|
-
};
|
|
34
|
-
conversation_starters?: string[];
|
|
35
|
-
access_level?: number;
|
|
36
|
-
file_ids?: string[];
|
|
37
|
-
actions?: string[];
|
|
38
|
-
append_current_datetime?: boolean;
|
|
39
|
-
}
|
|
40
|
-
declare const assistantSchema: Schema<IAssistant, import("mongoose").Model<IAssistant, any, any, any, Document<unknown, any, IAssistant> & IAssistant & Required<{
|
|
26
|
+
import { Schema } from 'mongoose';
|
|
27
|
+
import type { IAssistant } from '~/types';
|
|
28
|
+
declare const assistantSchema: Schema<IAssistant, import("mongoose").Model<IAssistant, any, any, any, import("mongoose").Document<unknown, any, IAssistant> & IAssistant & Required<{
|
|
41
29
|
_id: unknown;
|
|
42
30
|
}> & {
|
|
43
31
|
__v: number;
|
|
44
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IAssistant, Document<unknown, {}, import("mongoose").FlatRecord<IAssistant>> & import("mongoose").FlatRecord<IAssistant> & Required<{
|
|
32
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IAssistant, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IAssistant>> & import("mongoose").FlatRecord<IAssistant> & Required<{
|
|
45
33
|
_id: unknown;
|
|
46
34
|
}> & {
|
|
47
35
|
__v: number;
|
|
@@ -23,21 +23,13 @@
|
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
25
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
|
-
import { Schema
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
tokenCredits: number;
|
|
30
|
-
autoRefillEnabled: boolean;
|
|
31
|
-
refillIntervalValue: number;
|
|
32
|
-
refillIntervalUnit: 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'months';
|
|
33
|
-
lastRefill: Date;
|
|
34
|
-
refillAmount: number;
|
|
35
|
-
}
|
|
36
|
-
declare const balanceSchema: Schema<IBalance, import("mongoose").Model<IBalance, any, any, any, Document<unknown, any, IBalance> & IBalance & Required<{
|
|
26
|
+
import { Schema } from 'mongoose';
|
|
27
|
+
import type * as t from '~/types';
|
|
28
|
+
declare const balanceSchema: Schema<t.IBalance, import("mongoose").Model<t.IBalance, any, any, any, import("mongoose").Document<unknown, any, t.IBalance> & t.IBalance & Required<{
|
|
37
29
|
_id: unknown;
|
|
38
30
|
}> & {
|
|
39
31
|
__v: number;
|
|
40
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IBalance, Document<unknown, {}, import("mongoose").FlatRecord<IBalance>> & import("mongoose").FlatRecord<IBalance> & Required<{
|
|
32
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, t.IBalance, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<t.IBalance>> & import("mongoose").FlatRecord<t.IBalance> & Required<{
|
|
41
33
|
_id: unknown;
|
|
42
34
|
}> & {
|
|
43
35
|
__v: number;
|
|
@@ -23,54 +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 { Schema
|
|
27
|
-
|
|
28
|
-
conversationId: string;
|
|
29
|
-
title?: string;
|
|
30
|
-
user?: string;
|
|
31
|
-
messages?: Types.ObjectId[];
|
|
32
|
-
agentOptions?: unknown;
|
|
33
|
-
endpoint?: string;
|
|
34
|
-
endpointType?: string;
|
|
35
|
-
model?: string;
|
|
36
|
-
region?: string;
|
|
37
|
-
chatGptLabel?: string;
|
|
38
|
-
examples?: unknown[];
|
|
39
|
-
modelLabel?: string;
|
|
40
|
-
promptPrefix?: string;
|
|
41
|
-
temperature?: number;
|
|
42
|
-
top_p?: number;
|
|
43
|
-
topP?: number;
|
|
44
|
-
topK?: number;
|
|
45
|
-
maxOutputTokens?: number;
|
|
46
|
-
maxTokens?: number;
|
|
47
|
-
presence_penalty?: number;
|
|
48
|
-
frequency_penalty?: number;
|
|
49
|
-
file_ids?: string[];
|
|
50
|
-
resendImages?: boolean;
|
|
51
|
-
promptCache?: boolean;
|
|
52
|
-
thinking?: boolean;
|
|
53
|
-
thinkingBudget?: number;
|
|
54
|
-
system?: string;
|
|
55
|
-
resendFiles?: boolean;
|
|
56
|
-
imageDetail?: string;
|
|
57
|
-
agent_id?: string;
|
|
58
|
-
assistant_id?: string;
|
|
59
|
-
instructions?: string;
|
|
60
|
-
stop?: string[];
|
|
61
|
-
isArchived?: boolean;
|
|
62
|
-
iconURL?: string;
|
|
63
|
-
greeting?: string;
|
|
64
|
-
spec?: string;
|
|
65
|
-
tags?: string[];
|
|
66
|
-
tools?: string[];
|
|
67
|
-
maxContextTokens?: number;
|
|
68
|
-
max_tokens?: number;
|
|
69
|
-
reasoning_effort?: string;
|
|
70
|
-
files?: string[];
|
|
71
|
-
expiredAt?: Date;
|
|
72
|
-
createdAt?: Date;
|
|
73
|
-
updatedAt?: Date;
|
|
74
|
-
}
|
|
26
|
+
import { Schema } from 'mongoose';
|
|
27
|
+
import { IConversation } from '~/types';
|
|
75
28
|
declare const convoSchema: Schema<IConversation>;
|
|
76
29
|
export default convoSchema;
|
|
@@ -23,31 +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 { Schema
|
|
27
|
-
|
|
28
|
-
user: Types.ObjectId;
|
|
29
|
-
conversationId?: string;
|
|
30
|
-
file_id: string;
|
|
31
|
-
temp_file_id?: string;
|
|
32
|
-
bytes: number;
|
|
33
|
-
text?: string;
|
|
34
|
-
filename: string;
|
|
35
|
-
filepath: string;
|
|
36
|
-
object: 'file';
|
|
37
|
-
embedded?: boolean;
|
|
38
|
-
type: string;
|
|
39
|
-
context?: string;
|
|
40
|
-
usage: number;
|
|
41
|
-
source: string;
|
|
42
|
-
model?: string;
|
|
43
|
-
width?: number;
|
|
44
|
-
height?: number;
|
|
45
|
-
metadata?: {
|
|
46
|
-
fileIdentifier?: string;
|
|
47
|
-
};
|
|
48
|
-
expiresAt?: Date;
|
|
49
|
-
createdAt?: Date;
|
|
50
|
-
updatedAt?: Date;
|
|
51
|
-
}
|
|
26
|
+
import { Schema } from 'mongoose';
|
|
27
|
+
import type { IMongoFile } from '~/types';
|
|
52
28
|
declare const file: Schema<IMongoFile>;
|
|
53
29
|
export default file;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export { default as actionSchema } from './action';
|
|
2
|
+
export { default as agentSchema } from './agent';
|
|
3
|
+
export { default as assistantSchema } from './assistant';
|
|
4
|
+
export { default as balanceSchema } from './balance';
|
|
5
|
+
export { default as bannerSchema } from './banner';
|
|
6
|
+
export { default as categoriesSchema } from './categories';
|
|
7
|
+
export { default as conversationTagSchema } from './conversationTag';
|
|
8
|
+
export { default as convoSchema } from './convo';
|
|
9
|
+
export { default as fileSchema } from './file';
|
|
10
|
+
export { default as keySchema } from './key';
|
|
11
|
+
export { default as messageSchema } from './message';
|
|
12
|
+
export { default as pluginAuthSchema } from './pluginAuth';
|
|
13
|
+
export { default as presetSchema } from './preset';
|
|
14
|
+
export { default as projectSchema } from './project';
|
|
15
|
+
export { default as promptSchema } from './prompt';
|
|
16
|
+
export { default as promptGroupSchema } from './promptGroup';
|
|
17
|
+
export { default as roleSchema } from './role';
|
|
18
|
+
export { default as sessionSchema } from './session';
|
|
19
|
+
export { default as shareSchema } from './share';
|
|
20
|
+
export { default as tokenSchema } from './token';
|
|
21
|
+
export { default as toolCallSchema } from './toolCall';
|
|
22
|
+
export { default as transactionSchema } from './transaction';
|
|
23
|
+
export { default as userSchema } from './user';
|
|
@@ -23,41 +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 { Schema
|
|
27
|
-
|
|
28
|
-
messageId: string;
|
|
29
|
-
conversationId: string;
|
|
30
|
-
user: string;
|
|
31
|
-
model?: string;
|
|
32
|
-
endpoint?: string;
|
|
33
|
-
conversationSignature?: string;
|
|
34
|
-
clientId?: string;
|
|
35
|
-
invocationId?: number;
|
|
36
|
-
parentMessageId?: string;
|
|
37
|
-
tokenCount?: number;
|
|
38
|
-
summaryTokenCount?: number;
|
|
39
|
-
sender?: string;
|
|
40
|
-
text?: string;
|
|
41
|
-
summary?: string;
|
|
42
|
-
isCreatedByUser: boolean;
|
|
43
|
-
unfinished?: boolean;
|
|
44
|
-
error?: boolean;
|
|
45
|
-
finish_reason?: string;
|
|
46
|
-
_meiliIndex?: boolean;
|
|
47
|
-
files?: unknown[];
|
|
48
|
-
plugin?: {
|
|
49
|
-
latest?: string;
|
|
50
|
-
inputs?: unknown[];
|
|
51
|
-
outputs?: string;
|
|
52
|
-
};
|
|
53
|
-
plugins?: unknown[];
|
|
54
|
-
content?: unknown[];
|
|
55
|
-
thread_id?: string;
|
|
56
|
-
iconURL?: string;
|
|
57
|
-
attachments?: unknown[];
|
|
58
|
-
expiredAt?: Date;
|
|
59
|
-
createdAt?: Date;
|
|
60
|
-
updatedAt?: Date;
|
|
61
|
-
}
|
|
26
|
+
import { Schema } from 'mongoose';
|
|
27
|
+
import type { IMessage } from '~/types/message';
|
|
62
28
|
declare const messageSchema: Schema<IMessage>;
|
|
63
29
|
export default messageSchema;
|
|
@@ -23,10 +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 { Schema
|
|
27
|
-
|
|
28
|
-
name: string;
|
|
29
|
-
permissions: {};
|
|
30
|
-
}
|
|
26
|
+
import { Schema } from 'mongoose';
|
|
27
|
+
import type { IRole } from '~/types';
|
|
31
28
|
declare const roleSchema: Schema<IRole>;
|
|
32
29
|
export default roleSchema;
|
|
@@ -23,11 +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 { Schema
|
|
27
|
-
|
|
28
|
-
refreshTokenHash: string;
|
|
29
|
-
expiration: Date;
|
|
30
|
-
user: Types.ObjectId;
|
|
31
|
-
}
|
|
26
|
+
import { Schema } from 'mongoose';
|
|
27
|
+
import { ISession } from '~/types';
|
|
32
28
|
declare const sessionSchema: Schema<ISession>;
|
|
33
29
|
export default sessionSchema;
|
|
@@ -23,16 +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 { Schema
|
|
27
|
-
|
|
28
|
-
userId: Types.ObjectId;
|
|
29
|
-
email?: string;
|
|
30
|
-
type?: string;
|
|
31
|
-
identifier?: string;
|
|
32
|
-
token: string;
|
|
33
|
-
createdAt: Date;
|
|
34
|
-
expiresAt: Date;
|
|
35
|
-
metadata?: Map<string, unknown>;
|
|
36
|
-
}
|
|
26
|
+
import { Schema } from 'mongoose';
|
|
27
|
+
import { IToken } from '~/types';
|
|
37
28
|
declare const tokenSchema: Schema<IToken>;
|
|
38
29
|
export default tokenSchema;
|
|
@@ -23,46 +23,15 @@
|
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
25
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
|
-
import { Schema
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
username?: string;
|
|
30
|
-
email: string;
|
|
31
|
-
emailVerified: boolean;
|
|
32
|
-
password?: string;
|
|
33
|
-
avatar?: string;
|
|
34
|
-
provider: string;
|
|
35
|
-
role?: string;
|
|
36
|
-
googleId?: string;
|
|
37
|
-
facebookId?: string;
|
|
38
|
-
openidId?: string;
|
|
39
|
-
ldapId?: string;
|
|
40
|
-
githubId?: string;
|
|
41
|
-
discordId?: string;
|
|
42
|
-
appleId?: string;
|
|
43
|
-
plugins?: unknown[];
|
|
44
|
-
twoFactorEnabled?: boolean;
|
|
45
|
-
totpSecret?: string;
|
|
46
|
-
backupCodes?: Array<{
|
|
47
|
-
codeHash: string;
|
|
48
|
-
used: boolean;
|
|
49
|
-
usedAt?: Date | null;
|
|
50
|
-
}>;
|
|
51
|
-
refreshToken?: Array<{
|
|
52
|
-
refreshToken: string;
|
|
53
|
-
}>;
|
|
54
|
-
expiresAt?: Date;
|
|
55
|
-
termsAccepted?: boolean;
|
|
56
|
-
createdAt?: Date;
|
|
57
|
-
updatedAt?: Date;
|
|
58
|
-
}
|
|
59
|
-
declare const User: Schema<IUser, import("mongoose").Model<IUser, any, any, any, Document<unknown, any, IUser> & IUser & Required<{
|
|
26
|
+
import { Schema } from 'mongoose';
|
|
27
|
+
import { IUser } from '~/types';
|
|
28
|
+
declare const userSchema: Schema<IUser, import("mongoose").Model<IUser, any, any, any, import("mongoose").Document<unknown, any, IUser> & IUser & Required<{
|
|
60
29
|
_id: unknown;
|
|
61
30
|
}> & {
|
|
62
31
|
__v: number;
|
|
63
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IUser, Document<unknown, {}, import("mongoose").FlatRecord<IUser>> & import("mongoose").FlatRecord<IUser> & Required<{
|
|
32
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IUser, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IUser>> & import("mongoose").FlatRecord<IUser> & Required<{
|
|
64
33
|
_id: unknown;
|
|
65
34
|
}> & {
|
|
66
35
|
__v: number;
|
|
67
36
|
}>;
|
|
68
|
-
export default
|
|
37
|
+
export default userSchema;
|