librechat-data-provider 0.8.402 → 0.8.404
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.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/react-query/index.es.js +1 -1
- package/dist/react-query/index.es.js.map +1 -1
- package/dist/types/accessPermissions.d.ts +744 -0
- package/dist/types/actions.d.ts +118 -0
- package/dist/types/api-endpoints.d.ts +150 -0
- package/dist/types/artifacts.d.ts +97 -0
- package/dist/types/azure.d.ts +22 -0
- package/dist/types/bedrock.d.ts +1220 -0
- package/dist/types/config.d.ts +14849 -0
- package/dist/types/config.spec.d.ts +1 -0
- package/dist/types/createPayload.d.ts +5 -0
- package/dist/types/data-service.d.ts +287 -0
- package/dist/types/feedback.d.ts +36 -0
- package/dist/types/file-config.d.ts +263 -0
- package/dist/types/file-config.spec.d.ts +1 -0
- package/dist/types/generate.d.ts +597 -0
- package/dist/types/headers-helpers.d.ts +2 -0
- package/{src/index.ts → dist/types/index.d.ts} +0 -15
- package/dist/types/keys.d.ts +92 -0
- package/dist/types/mcp.d.ts +2760 -0
- package/dist/types/messages.d.ts +10 -0
- package/dist/types/models.d.ts +1547 -0
- package/dist/types/parameterSettings.d.ts +69 -0
- package/dist/types/parsers.d.ts +110 -0
- package/dist/types/permissions.d.ts +522 -0
- package/dist/types/react-query/react-query-service.d.ts +85 -0
- package/dist/types/request.d.ts +25 -0
- package/dist/types/roles.d.ts +554 -0
- package/dist/types/roles.spec.d.ts +1 -0
- package/dist/types/schemas.d.ts +5110 -0
- package/dist/types/schemas.spec.d.ts +1 -0
- package/dist/types/types/agents.d.ts +433 -0
- package/dist/types/types/assistants.d.ts +547 -0
- package/dist/types/types/files.d.ts +172 -0
- package/dist/types/types/graph.d.ts +135 -0
- package/{src/types/mcpServers.ts → dist/types/types/mcpServers.d.ts} +12 -18
- package/dist/types/types/mutations.d.ts +209 -0
- package/dist/types/types/queries.d.ts +169 -0
- package/dist/types/types/runs.d.ts +36 -0
- package/dist/types/types/web.d.ts +520 -0
- package/dist/types/types.d.ts +503 -0
- package/dist/types/utils.d.ts +12 -0
- package/package.json +5 -1
- package/babel.config.js +0 -4
- package/check_updates.sh +0 -52
- package/jest.config.js +0 -19
- package/react-query/package-lock.json +0 -292
- package/react-query/package.json +0 -10
- package/rollup.config.js +0 -74
- package/server-rollup.config.js +0 -40
- package/specs/actions.spec.ts +0 -2533
- package/specs/api-endpoints-subdir.spec.ts +0 -140
- package/specs/api-endpoints.spec.ts +0 -74
- package/specs/azure.spec.ts +0 -844
- package/specs/bedrock.spec.ts +0 -862
- package/specs/filetypes.spec.ts +0 -175
- package/specs/generate.spec.ts +0 -770
- package/specs/headers-helpers.spec.ts +0 -24
- package/specs/mcp.spec.ts +0 -147
- package/specs/openapiSpecs.ts +0 -524
- package/specs/parsers.spec.ts +0 -601
- package/specs/request-interceptor.spec.ts +0 -304
- package/specs/utils.spec.ts +0 -196
- package/src/accessPermissions.ts +0 -346
- package/src/actions.ts +0 -813
- package/src/api-endpoints.ts +0 -440
- package/src/artifacts.ts +0 -3104
- package/src/azure.ts +0 -328
- package/src/bedrock.ts +0 -425
- package/src/config.spec.ts +0 -315
- package/src/config.ts +0 -2006
- package/src/createPayload.ts +0 -46
- package/src/data-service.ts +0 -1087
- package/src/feedback.ts +0 -141
- package/src/file-config.spec.ts +0 -1248
- package/src/file-config.ts +0 -764
- package/src/generate.ts +0 -634
- package/src/headers-helpers.ts +0 -13
- package/src/keys.ts +0 -99
- package/src/mcp.ts +0 -271
- package/src/messages.ts +0 -50
- package/src/models.ts +0 -69
- package/src/parameterSettings.ts +0 -1111
- package/src/parsers.ts +0 -563
- package/src/permissions.ts +0 -188
- package/src/react-query/react-query-service.ts +0 -566
- package/src/request.ts +0 -171
- package/src/roles.spec.ts +0 -132
- package/src/roles.ts +0 -225
- package/src/schemas.spec.ts +0 -355
- package/src/schemas.ts +0 -1234
- package/src/types/agents.ts +0 -470
- package/src/types/assistants.ts +0 -654
- package/src/types/files.ts +0 -191
- package/src/types/graph.ts +0 -145
- package/src/types/mutations.ts +0 -422
- package/src/types/queries.ts +0 -208
- package/src/types/runs.ts +0 -40
- package/src/types/web.ts +0 -588
- package/src/types.ts +0 -676
- package/src/utils.ts +0 -85
- package/tsconfig.json +0 -28
- package/tsconfig.spec.json +0 -10
- /package/{src/react-query/index.ts → dist/types/react-query/index.d.ts} +0 -0
- /package/{src/types/index.ts → dist/types/types/index.d.ts} +0 -0
package/src/types/files.ts
DELETED
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
import { EToolResources } from './assistants';
|
|
2
|
-
|
|
3
|
-
export enum FileSources {
|
|
4
|
-
local = 'local',
|
|
5
|
-
firebase = 'firebase',
|
|
6
|
-
azure = 'azure',
|
|
7
|
-
azure_blob = 'azure_blob',
|
|
8
|
-
openai = 'openai',
|
|
9
|
-
s3 = 's3',
|
|
10
|
-
vectordb = 'vectordb',
|
|
11
|
-
execute_code = 'execute_code',
|
|
12
|
-
mistral_ocr = 'mistral_ocr',
|
|
13
|
-
azure_mistral_ocr = 'azure_mistral_ocr',
|
|
14
|
-
vertexai_mistral_ocr = 'vertexai_mistral_ocr',
|
|
15
|
-
text = 'text',
|
|
16
|
-
document_parser = 'document_parser',
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export const checkOpenAIStorage = (source: string) =>
|
|
20
|
-
source === FileSources.openai || source === FileSources.azure;
|
|
21
|
-
|
|
22
|
-
export enum FileContext {
|
|
23
|
-
avatar = 'avatar',
|
|
24
|
-
unknown = 'unknown',
|
|
25
|
-
agents = 'agents',
|
|
26
|
-
assistants = 'assistants',
|
|
27
|
-
execute_code = 'execute_code',
|
|
28
|
-
image_generation = 'image_generation',
|
|
29
|
-
assistants_output = 'assistants_output',
|
|
30
|
-
message_attachment = 'message_attachment',
|
|
31
|
-
filename = 'filename',
|
|
32
|
-
updatedAt = 'updatedAt',
|
|
33
|
-
source = 'source',
|
|
34
|
-
filterSource = 'filterSource',
|
|
35
|
-
context = 'context',
|
|
36
|
-
bytes = 'bytes',
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export type EndpointFileConfig = {
|
|
40
|
-
disabled?: boolean;
|
|
41
|
-
fileLimit?: number;
|
|
42
|
-
fileSizeLimit?: number;
|
|
43
|
-
totalSizeLimit?: number;
|
|
44
|
-
supportedMimeTypes?: RegExp[];
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export type FileConfig = {
|
|
48
|
-
endpoints: {
|
|
49
|
-
[key: string]: EndpointFileConfig;
|
|
50
|
-
};
|
|
51
|
-
fileTokenLimit?: number;
|
|
52
|
-
serverFileSizeLimit?: number;
|
|
53
|
-
avatarSizeLimit?: number;
|
|
54
|
-
clientImageResize?: {
|
|
55
|
-
enabled?: boolean;
|
|
56
|
-
maxWidth?: number;
|
|
57
|
-
maxHeight?: number;
|
|
58
|
-
quality?: number;
|
|
59
|
-
};
|
|
60
|
-
ocr?: {
|
|
61
|
-
supportedMimeTypes?: RegExp[];
|
|
62
|
-
};
|
|
63
|
-
text?: {
|
|
64
|
-
supportedMimeTypes?: RegExp[];
|
|
65
|
-
};
|
|
66
|
-
stt?: {
|
|
67
|
-
supportedMimeTypes?: RegExp[];
|
|
68
|
-
};
|
|
69
|
-
checkType?: (fileType: string, supportedTypes: RegExp[]) => boolean;
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export type FileConfigInput = {
|
|
73
|
-
endpoints?: {
|
|
74
|
-
[key: string]: EndpointFileConfig;
|
|
75
|
-
};
|
|
76
|
-
serverFileSizeLimit?: number;
|
|
77
|
-
avatarSizeLimit?: number;
|
|
78
|
-
clientImageResize?: {
|
|
79
|
-
enabled?: boolean;
|
|
80
|
-
maxWidth?: number;
|
|
81
|
-
maxHeight?: number;
|
|
82
|
-
quality?: number;
|
|
83
|
-
};
|
|
84
|
-
ocr?: {
|
|
85
|
-
supportedMimeTypes?: string[];
|
|
86
|
-
};
|
|
87
|
-
text?: {
|
|
88
|
-
supportedMimeTypes?: string[];
|
|
89
|
-
};
|
|
90
|
-
stt?: {
|
|
91
|
-
supportedMimeTypes?: string[];
|
|
92
|
-
};
|
|
93
|
-
checkType?: (fileType: string, supportedTypes: RegExp[]) => boolean;
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
export type TFile = {
|
|
97
|
-
_id?: string;
|
|
98
|
-
__v?: number;
|
|
99
|
-
user: string;
|
|
100
|
-
conversationId?: string;
|
|
101
|
-
message?: string;
|
|
102
|
-
file_id: string;
|
|
103
|
-
temp_file_id?: string;
|
|
104
|
-
bytes: number;
|
|
105
|
-
embedded: boolean;
|
|
106
|
-
filename: string;
|
|
107
|
-
filepath: string;
|
|
108
|
-
object: 'file';
|
|
109
|
-
type: string;
|
|
110
|
-
usage: number;
|
|
111
|
-
context?: FileContext;
|
|
112
|
-
source?: FileSources;
|
|
113
|
-
filterSource?: FileSources;
|
|
114
|
-
width?: number;
|
|
115
|
-
height?: number;
|
|
116
|
-
expiresAt?: string | Date;
|
|
117
|
-
preview?: string;
|
|
118
|
-
metadata?: { fileIdentifier?: string };
|
|
119
|
-
createdAt?: string | Date;
|
|
120
|
-
updatedAt?: string | Date;
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
export type TFileUpload = TFile & {
|
|
124
|
-
temp_file_id: string;
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
export type AvatarUploadResponse = {
|
|
128
|
-
url: string;
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
export type SpeechToTextResponse = {
|
|
132
|
-
text: string;
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
export type VoiceResponse = string[];
|
|
136
|
-
|
|
137
|
-
export type UploadMutationOptions = {
|
|
138
|
-
onSuccess?: (data: TFileUpload, variables: FormData, context?: unknown) => void;
|
|
139
|
-
onMutate?: (variables: FormData) => void | Promise<unknown>;
|
|
140
|
-
onError?: (error: unknown, variables: FormData, context?: unknown) => void;
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
export type UploadAvatarOptions = {
|
|
144
|
-
onSuccess?: (data: AvatarUploadResponse, variables: FormData, context?: unknown) => void;
|
|
145
|
-
onMutate?: (variables: FormData) => void | Promise<unknown>;
|
|
146
|
-
onError?: (error: unknown, variables: FormData, context?: unknown) => void;
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
export type SpeechToTextOptions = {
|
|
150
|
-
onSuccess?: (data: SpeechToTextResponse, variables: FormData, context?: unknown) => void;
|
|
151
|
-
onMutate?: (variables: FormData) => void | Promise<unknown>;
|
|
152
|
-
onError?: (error: unknown, variables: FormData, context?: unknown) => void;
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
export type TextToSpeechOptions = {
|
|
156
|
-
onSuccess?: (data: ArrayBuffer, variables: FormData, context?: unknown) => void;
|
|
157
|
-
onMutate?: (variables: FormData) => void | Promise<unknown>;
|
|
158
|
-
onError?: (error: unknown, variables: FormData, context?: unknown) => void;
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
export type VoiceOptions = {
|
|
162
|
-
onSuccess?: (data: VoiceResponse, variables: unknown, context?: unknown) => void;
|
|
163
|
-
onMutate?: () => void | Promise<unknown>;
|
|
164
|
-
onError?: (error: unknown, variables: unknown, context?: unknown) => void;
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
export type DeleteFilesResponse = {
|
|
168
|
-
message: string;
|
|
169
|
-
result: Record<string, unknown>;
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
export type BatchFile = {
|
|
173
|
-
file_id: string;
|
|
174
|
-
filepath: string;
|
|
175
|
-
embedded: boolean;
|
|
176
|
-
source: FileSources;
|
|
177
|
-
temp_file_id?: string;
|
|
178
|
-
};
|
|
179
|
-
|
|
180
|
-
export type DeleteFilesBody = {
|
|
181
|
-
files: BatchFile[];
|
|
182
|
-
agent_id?: string;
|
|
183
|
-
assistant_id?: string;
|
|
184
|
-
tool_resource?: EToolResources;
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
export type DeleteMutationOptions = {
|
|
188
|
-
onSuccess?: (data: DeleteFilesResponse, variables: DeleteFilesBody, context?: unknown) => void;
|
|
189
|
-
onMutate?: (variables: DeleteFilesBody) => void | Promise<unknown>;
|
|
190
|
-
onError?: (error: unknown, variables: DeleteFilesBody, context?: unknown) => void;
|
|
191
|
-
};
|
package/src/types/graph.ts
DELETED
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Microsoft Graph API type definitions
|
|
3
|
-
* Based on Microsoft Graph REST API v1.0 documentation
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Person type information from Microsoft Graph People API
|
|
8
|
-
*/
|
|
9
|
-
export interface TGraphPersonType {
|
|
10
|
-
/** Classification of the entity: "Person" or "Group" */
|
|
11
|
-
class: 'Person' | 'Group';
|
|
12
|
-
/** Specific subtype: e.g., "OrganizationUser", "UnifiedGroup" */
|
|
13
|
-
subclass: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Scored email address from Microsoft Graph People API
|
|
18
|
-
*/
|
|
19
|
-
export interface TGraphScoredEmailAddress {
|
|
20
|
-
/** Email address */
|
|
21
|
-
address: string;
|
|
22
|
-
/** Relevance score (0.0 to 1.0) */
|
|
23
|
-
relevanceScore: number;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Phone number from Microsoft Graph API
|
|
28
|
-
*/
|
|
29
|
-
export interface TGraphPhone {
|
|
30
|
-
/** Type of phone number */
|
|
31
|
-
type: string;
|
|
32
|
-
/** Phone number */
|
|
33
|
-
number: string;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Person/Contact result from Microsoft Graph /me/people endpoint
|
|
38
|
-
*/
|
|
39
|
-
export interface TGraphPerson {
|
|
40
|
-
/** Unique identifier */
|
|
41
|
-
id: string;
|
|
42
|
-
/** Display name */
|
|
43
|
-
displayName: string;
|
|
44
|
-
/** Given name (first name) */
|
|
45
|
-
givenName?: string;
|
|
46
|
-
/** Surname (last name) */
|
|
47
|
-
surname?: string;
|
|
48
|
-
/** User principal name */
|
|
49
|
-
userPrincipalName?: string;
|
|
50
|
-
/** Job title */
|
|
51
|
-
jobTitle?: string;
|
|
52
|
-
/** Department */
|
|
53
|
-
department?: string;
|
|
54
|
-
/** Company name */
|
|
55
|
-
companyName?: string;
|
|
56
|
-
/** Primary email address */
|
|
57
|
-
mail?: string;
|
|
58
|
-
/** Scored email addresses with relevance */
|
|
59
|
-
scoredEmailAddresses?: TGraphScoredEmailAddress[];
|
|
60
|
-
/** Person type classification */
|
|
61
|
-
personType?: TGraphPersonType;
|
|
62
|
-
/** Phone numbers */
|
|
63
|
-
phones?: TGraphPhone[];
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* User result from Microsoft Graph /users endpoint
|
|
68
|
-
*/
|
|
69
|
-
export interface TGraphUser {
|
|
70
|
-
/** Unique identifier */
|
|
71
|
-
id: string;
|
|
72
|
-
/** Display name */
|
|
73
|
-
displayName: string;
|
|
74
|
-
/** Given name (first name) */
|
|
75
|
-
givenName?: string;
|
|
76
|
-
/** Surname (last name) */
|
|
77
|
-
surname?: string;
|
|
78
|
-
/** User principal name */
|
|
79
|
-
userPrincipalName: string;
|
|
80
|
-
/** Primary email address */
|
|
81
|
-
mail?: string;
|
|
82
|
-
/** Job title */
|
|
83
|
-
jobTitle?: string;
|
|
84
|
-
/** Department */
|
|
85
|
-
department?: string;
|
|
86
|
-
/** Office location */
|
|
87
|
-
officeLocation?: string;
|
|
88
|
-
/** Business phone numbers */
|
|
89
|
-
businessPhones?: string[];
|
|
90
|
-
/** Mobile phone number */
|
|
91
|
-
mobilePhone?: string;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Group result from Microsoft Graph /groups endpoint
|
|
96
|
-
*/
|
|
97
|
-
export interface TGraphGroup {
|
|
98
|
-
/** Unique identifier */
|
|
99
|
-
id: string;
|
|
100
|
-
/** Display name */
|
|
101
|
-
displayName: string;
|
|
102
|
-
/** Group email address */
|
|
103
|
-
mail?: string;
|
|
104
|
-
/** Mail nickname */
|
|
105
|
-
mailNickname?: string;
|
|
106
|
-
/** Group description */
|
|
107
|
-
description?: string;
|
|
108
|
-
/** Group types (e.g., ["Unified"] for Microsoft 365 groups) */
|
|
109
|
-
groupTypes?: string[];
|
|
110
|
-
/** Whether group is mail-enabled */
|
|
111
|
-
mailEnabled?: boolean;
|
|
112
|
-
/** Whether group is security-enabled */
|
|
113
|
-
securityEnabled?: boolean;
|
|
114
|
-
/** Resource provisioning options */
|
|
115
|
-
resourceProvisioningOptions?: string[];
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Response wrapper for Microsoft Graph API list endpoints
|
|
120
|
-
*/
|
|
121
|
-
export interface TGraphListResponse<T> {
|
|
122
|
-
/** Array of results */
|
|
123
|
-
value: T[];
|
|
124
|
-
/** OData context */
|
|
125
|
-
'@odata.context'?: string;
|
|
126
|
-
/** Next page link */
|
|
127
|
-
'@odata.nextLink'?: string;
|
|
128
|
-
/** Count of results (if requested) */
|
|
129
|
-
'@odata.count'?: number;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Response from /me/people endpoint
|
|
134
|
-
*/
|
|
135
|
-
export type TGraphPeopleResponse = TGraphListResponse<TGraphPerson>;
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* Response from /users endpoint
|
|
139
|
-
*/
|
|
140
|
-
export type TGraphUsersResponse = TGraphListResponse<TGraphUser>;
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Response from /groups endpoint
|
|
144
|
-
*/
|
|
145
|
-
export type TGraphGroupsResponse = TGraphListResponse<TGraphGroup>;
|