librechat-data-provider 0.8.402 → 0.8.403

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.
Files changed (103) hide show
  1. package/dist/types/accessPermissions.d.ts +744 -0
  2. package/dist/types/actions.d.ts +118 -0
  3. package/dist/types/api-endpoints.d.ts +149 -0
  4. package/dist/types/artifacts.d.ts +97 -0
  5. package/dist/types/azure.d.ts +22 -0
  6. package/dist/types/bedrock.d.ts +1220 -0
  7. package/dist/types/config.d.ts +13916 -0
  8. package/dist/types/config.spec.d.ts +1 -0
  9. package/dist/types/createPayload.d.ts +5 -0
  10. package/dist/types/data-service.d.ts +284 -0
  11. package/dist/types/feedback.d.ts +36 -0
  12. package/dist/types/file-config.d.ts +263 -0
  13. package/dist/types/file-config.spec.d.ts +1 -0
  14. package/dist/types/generate.d.ts +597 -0
  15. package/dist/types/headers-helpers.d.ts +2 -0
  16. package/{src/index.ts → dist/types/index.d.ts} +0 -15
  17. package/dist/types/keys.d.ts +92 -0
  18. package/dist/types/mcp.d.ts +2760 -0
  19. package/dist/types/messages.d.ts +10 -0
  20. package/dist/types/models.d.ts +1677 -0
  21. package/dist/types/parameterSettings.d.ts +69 -0
  22. package/dist/types/parsers.d.ts +110 -0
  23. package/dist/types/permissions.d.ts +522 -0
  24. package/dist/types/react-query/react-query-service.d.ts +85 -0
  25. package/dist/types/request.d.ts +25 -0
  26. package/dist/types/roles.d.ts +554 -0
  27. package/dist/types/roles.spec.d.ts +1 -0
  28. package/dist/types/schemas.d.ts +4815 -0
  29. package/dist/types/schemas.spec.d.ts +1 -0
  30. package/dist/types/types/agents.d.ts +433 -0
  31. package/dist/types/types/assistants.d.ts +547 -0
  32. package/dist/types/types/files.d.ts +172 -0
  33. package/dist/types/types/graph.d.ts +135 -0
  34. package/{src/types/mcpServers.ts → dist/types/types/mcpServers.d.ts} +12 -18
  35. package/dist/types/types/mutations.d.ts +209 -0
  36. package/dist/types/types/queries.d.ts +169 -0
  37. package/dist/types/types/runs.d.ts +36 -0
  38. package/dist/types/types/web.d.ts +520 -0
  39. package/dist/types/types.d.ts +503 -0
  40. package/dist/types/utils.d.ts +12 -0
  41. package/package.json +4 -1
  42. package/babel.config.js +0 -4
  43. package/check_updates.sh +0 -52
  44. package/jest.config.js +0 -19
  45. package/react-query/package-lock.json +0 -292
  46. package/react-query/package.json +0 -10
  47. package/rollup.config.js +0 -74
  48. package/server-rollup.config.js +0 -40
  49. package/specs/actions.spec.ts +0 -2533
  50. package/specs/api-endpoints-subdir.spec.ts +0 -140
  51. package/specs/api-endpoints.spec.ts +0 -74
  52. package/specs/azure.spec.ts +0 -844
  53. package/specs/bedrock.spec.ts +0 -862
  54. package/specs/filetypes.spec.ts +0 -175
  55. package/specs/generate.spec.ts +0 -770
  56. package/specs/headers-helpers.spec.ts +0 -24
  57. package/specs/mcp.spec.ts +0 -147
  58. package/specs/openapiSpecs.ts +0 -524
  59. package/specs/parsers.spec.ts +0 -601
  60. package/specs/request-interceptor.spec.ts +0 -304
  61. package/specs/utils.spec.ts +0 -196
  62. package/src/accessPermissions.ts +0 -346
  63. package/src/actions.ts +0 -813
  64. package/src/api-endpoints.ts +0 -440
  65. package/src/artifacts.ts +0 -3104
  66. package/src/azure.ts +0 -328
  67. package/src/bedrock.ts +0 -425
  68. package/src/config.spec.ts +0 -315
  69. package/src/config.ts +0 -2006
  70. package/src/createPayload.ts +0 -46
  71. package/src/data-service.ts +0 -1087
  72. package/src/feedback.ts +0 -141
  73. package/src/file-config.spec.ts +0 -1248
  74. package/src/file-config.ts +0 -764
  75. package/src/generate.ts +0 -634
  76. package/src/headers-helpers.ts +0 -13
  77. package/src/keys.ts +0 -99
  78. package/src/mcp.ts +0 -271
  79. package/src/messages.ts +0 -50
  80. package/src/models.ts +0 -69
  81. package/src/parameterSettings.ts +0 -1111
  82. package/src/parsers.ts +0 -563
  83. package/src/permissions.ts +0 -188
  84. package/src/react-query/react-query-service.ts +0 -566
  85. package/src/request.ts +0 -171
  86. package/src/roles.spec.ts +0 -132
  87. package/src/roles.ts +0 -225
  88. package/src/schemas.spec.ts +0 -355
  89. package/src/schemas.ts +0 -1234
  90. package/src/types/agents.ts +0 -470
  91. package/src/types/assistants.ts +0 -654
  92. package/src/types/files.ts +0 -191
  93. package/src/types/graph.ts +0 -145
  94. package/src/types/mutations.ts +0 -422
  95. package/src/types/queries.ts +0 -208
  96. package/src/types/runs.ts +0 -40
  97. package/src/types/web.ts +0 -588
  98. package/src/types.ts +0 -676
  99. package/src/utils.ts +0 -85
  100. package/tsconfig.json +0 -28
  101. package/tsconfig.spec.json +0 -10
  102. /package/{src/react-query/index.ts → dist/types/react-query/index.d.ts} +0 -0
  103. /package/{src/types/index.ts → dist/types/types/index.d.ts} +0 -0
package/src/types/web.ts DELETED
@@ -1,588 +0,0 @@
1
- import type { Logger as WinstonLogger } from 'winston';
2
-
3
- export type SearchRefType = 'search' | 'image' | 'news' | 'video' | 'ref';
4
-
5
- export enum DATE_RANGE {
6
- PAST_HOUR = 'h',
7
- PAST_24_HOURS = 'd',
8
- PAST_WEEK = 'w',
9
- PAST_MONTH = 'm',
10
- PAST_YEAR = 'y',
11
- }
12
-
13
- export type SearchProvider = 'serper' | 'searxng';
14
- export type RerankerType = 'infinity' | 'jina' | 'cohere' | 'none';
15
-
16
- export interface Highlight {
17
- score: number;
18
- text: string;
19
- references?: UsedReferences;
20
- }
21
-
22
- export type ProcessedSource = {
23
- content?: string;
24
- attribution?: string;
25
- references?: References;
26
- highlights?: Highlight[];
27
- processed?: boolean;
28
- };
29
-
30
- export type ProcessedOrganic = OrganicResult & ProcessedSource;
31
- export type ProcessedTopStory = TopStoryResult & ProcessedSource;
32
- export type ValidSource = ProcessedOrganic | ProcessedTopStory;
33
-
34
- export type ResultReference = {
35
- link: string;
36
- type: 'link' | 'image' | 'video' | 'file';
37
- title?: string;
38
- attribution?: string;
39
- };
40
- export interface SearchResultData {
41
- turn?: number;
42
- organic?: ProcessedOrganic[];
43
- topStories?: ProcessedTopStory[];
44
- images?: ImageResult[];
45
- videos?: VideoResult[];
46
- places?: PlaceResult[];
47
- news?: NewsResult[];
48
- shopping?: ShoppingResult[];
49
- knowledgeGraph?: KnowledgeGraphResult;
50
- answerBox?: AnswerBoxResult;
51
- peopleAlsoAsk?: PeopleAlsoAskResult[];
52
- relatedSearches?: Array<{ query: string }>;
53
- references?: ResultReference[];
54
- error?: string;
55
- }
56
-
57
- export interface SearchResult {
58
- data?: SearchResultData;
59
- error?: string;
60
- success: boolean;
61
- }
62
-
63
- export interface Source {
64
- link: string;
65
- html?: string;
66
- title?: string;
67
- snippet?: string;
68
- date?: string;
69
- }
70
-
71
- export interface SearchConfig {
72
- searchProvider?: SearchProvider;
73
- serperApiKey?: string;
74
- searxngInstanceUrl?: string;
75
- searxngApiKey?: string;
76
- }
77
-
78
- export type References = {
79
- links: MediaReference[];
80
- images: MediaReference[];
81
- videos: MediaReference[];
82
- };
83
- export interface ScrapeResult {
84
- url: string;
85
- error?: boolean;
86
- content: string;
87
- attribution?: string;
88
- references?: References;
89
- highlights?: Highlight[];
90
- }
91
-
92
- export interface ProcessSourcesConfig {
93
- topResults?: number;
94
- strategies?: string[];
95
- filterContent?: boolean;
96
- reranker?: unknown;
97
- logger?: Logger;
98
- }
99
-
100
- export interface FirecrawlConfig {
101
- firecrawlApiKey?: string;
102
- firecrawlApiUrl?: string;
103
- firecrawlOptions?: {
104
- formats?: string[];
105
- includeTags?: string[];
106
- excludeTags?: string[];
107
- headers?: Record<string, string>;
108
- waitFor?: number;
109
- timeout?: number;
110
- maxAge?: number;
111
- mobile?: boolean;
112
- skipTlsVerification?: boolean;
113
- blockAds?: boolean;
114
- removeBase64Images?: boolean;
115
- parsePDF?: boolean;
116
- storeInCache?: boolean;
117
- zeroDataRetention?: boolean;
118
- location?: {
119
- country?: string;
120
- languages?: string[];
121
- };
122
- onlyMainContent?: boolean;
123
- changeTrackingOptions?: {
124
- modes?: string[];
125
- schema?: Record<string, unknown>;
126
- prompt?: string;
127
- tag?: string | null;
128
- };
129
- };
130
- }
131
-
132
- export interface ScraperContentResult {
133
- content: string;
134
- }
135
-
136
- export interface ScraperExtractionResult {
137
- no_extraction: ScraperContentResult;
138
- }
139
-
140
- export interface JinaRerankerResult {
141
- index: number;
142
- relevance_score: number;
143
- document?: string | { text: string };
144
- }
145
-
146
- export interface JinaRerankerResponse {
147
- model: string;
148
- usage: {
149
- total_tokens: number;
150
- };
151
- results: JinaRerankerResult[];
152
- }
153
-
154
- export interface CohereRerankerResult {
155
- index: number;
156
- relevance_score: number;
157
- }
158
-
159
- export interface CohereRerankerResponse {
160
- results: CohereRerankerResult[];
161
- id: string;
162
- meta: {
163
- api_version: {
164
- version: string;
165
- is_experimental: boolean;
166
- };
167
- billed_units: {
168
- search_units: number;
169
- };
170
- };
171
- }
172
-
173
- export type SafeSearchLevel = 0 | 1 | 2;
174
-
175
- export type Logger = WinstonLogger;
176
- export interface MediaReference {
177
- originalUrl: string;
178
- title?: string;
179
- text?: string;
180
- }
181
-
182
- export type UsedReferences = {
183
- type: 'link' | 'image' | 'video';
184
- originalIndex: number;
185
- reference: MediaReference;
186
- }[];
187
-
188
- /** Firecrawl */
189
-
190
- export interface FirecrawlScrapeOptions {
191
- formats?: string[];
192
- includeTags?: string[];
193
- excludeTags?: string[];
194
- headers?: Record<string, string>;
195
- waitFor?: number;
196
- timeout?: number;
197
- }
198
-
199
- export interface ScrapeMetadata {
200
- // Core source information
201
- sourceURL?: string;
202
- url?: string;
203
- scrapeId?: string;
204
- statusCode?: number;
205
- // Basic metadata
206
- title?: string;
207
- description?: string;
208
- language?: string;
209
- favicon?: string;
210
- viewport?: string;
211
- robots?: string;
212
- 'theme-color'?: string;
213
- // Open Graph metadata
214
- 'og:url'?: string;
215
- 'og:title'?: string;
216
- 'og:description'?: string;
217
- 'og:type'?: string;
218
- 'og:image'?: string;
219
- 'og:image:width'?: string;
220
- 'og:image:height'?: string;
221
- 'og:site_name'?: string;
222
- ogUrl?: string;
223
- ogTitle?: string;
224
- ogDescription?: string;
225
- ogImage?: string;
226
- ogSiteName?: string;
227
- // Article metadata
228
- 'article:author'?: string;
229
- 'article:published_time'?: string;
230
- 'article:modified_time'?: string;
231
- 'article:section'?: string;
232
- 'article:tag'?: string;
233
- 'article:publisher'?: string;
234
- publishedTime?: string;
235
- modifiedTime?: string;
236
- // Twitter metadata
237
- 'twitter:site'?: string | boolean | number | null;
238
- 'twitter:creator'?: string;
239
- 'twitter:card'?: string;
240
- 'twitter:image'?: string;
241
- 'twitter:dnt'?: string;
242
- 'twitter:app:name:iphone'?: string;
243
- 'twitter:app:id:iphone'?: string;
244
- 'twitter:app:url:iphone'?: string;
245
- 'twitter:app:name:ipad'?: string;
246
- 'twitter:app:id:ipad'?: string;
247
- 'twitter:app:url:ipad'?: string;
248
- 'twitter:app:name:googleplay'?: string;
249
- 'twitter:app:id:googleplay'?: string;
250
- 'twitter:app:url:googleplay'?: string;
251
- // Facebook metadata
252
- 'fb:app_id'?: string;
253
- // App links
254
- 'al:ios:url'?: string;
255
- 'al:ios:app_name'?: string;
256
- 'al:ios:app_store_id'?: string;
257
- // Allow for additional properties that might be present
258
- [key: string]: string | number | boolean | null | undefined;
259
- }
260
-
261
- export interface FirecrawlScrapeResponse {
262
- success: boolean;
263
- data?: {
264
- markdown?: string;
265
- html?: string;
266
- rawHtml?: string;
267
- screenshot?: string;
268
- links?: string[];
269
- metadata?: ScrapeMetadata;
270
- };
271
- error?: string;
272
- }
273
-
274
- export interface FirecrawlScraperConfig {
275
- apiKey?: string;
276
- apiUrl?: string;
277
- formats?: string[];
278
- timeout?: number;
279
- logger?: Logger;
280
- }
281
-
282
- /** Serper API */
283
- export interface VideoResult {
284
- title?: string;
285
- link?: string;
286
- snippet?: string;
287
- imageUrl?: string;
288
- duration?: string;
289
- source?: string;
290
- channel?: string;
291
- date?: string;
292
- position?: number;
293
- }
294
-
295
- export interface PlaceResult {
296
- position?: number;
297
- name?: string;
298
- address?: string;
299
- latitude?: number;
300
- longitude?: number;
301
- rating?: number;
302
- ratingCount?: number;
303
- category?: string;
304
- identifier?: string;
305
- }
306
-
307
- export interface NewsResult {
308
- title?: string;
309
- link?: string;
310
- snippet?: string;
311
- date?: string;
312
- source?: string;
313
- imageUrl?: string;
314
- position?: number;
315
- }
316
-
317
- export interface ShoppingResult {
318
- title?: string;
319
- source?: string;
320
- link?: string;
321
- price?: string;
322
- delivery?: string;
323
- imageUrl?: string;
324
- rating?: number;
325
- ratingCount?: number;
326
- offers?: string;
327
- productId?: string;
328
- position?: number;
329
- }
330
-
331
- export interface ScholarResult {
332
- title?: string;
333
- link?: string;
334
- publicationInfo?: string;
335
- snippet?: string;
336
- year?: number;
337
- citedBy?: number;
338
- }
339
-
340
- export interface ImageResult {
341
- title?: string;
342
- imageUrl?: string;
343
- imageWidth?: number;
344
- imageHeight?: number;
345
- thumbnailUrl?: string;
346
- thumbnailWidth?: number;
347
- thumbnailHeight?: number;
348
- source?: string;
349
- domain?: string;
350
- link?: string;
351
- googleUrl?: string;
352
- position?: number;
353
- }
354
-
355
- export interface SerperSearchPayload extends SerperSearchInput {
356
- /**
357
- * Search type/vertical
358
- * Options: "search" (web), "images", "news", "places", "videos"
359
- */
360
- type?: 'search' | 'images' | 'news' | 'places' | 'videos';
361
-
362
- /**
363
- * Starting index for search results pagination (used instead of page)
364
- */
365
- start?: number;
366
-
367
- /**
368
- * Filtering for safe search
369
- * Options: "off", "moderate", "active"
370
- */
371
- safe?: 'off' | 'moderate' | 'active';
372
- }
373
-
374
- export type SerperSearchParameters = Pick<SerperSearchPayload, 'q' | 'type'> & {
375
- engine: 'google';
376
- };
377
-
378
- export interface OrganicResult {
379
- position?: number;
380
- title?: string;
381
- link: string;
382
- snippet?: string;
383
- date?: string;
384
- sitelinks?: Array<{
385
- title: string;
386
- link: string;
387
- }>;
388
- }
389
-
390
- export interface TopStoryResult {
391
- title?: string;
392
- link: string;
393
- source?: string;
394
- date?: string;
395
- imageUrl?: string;
396
- }
397
- export interface KnowledgeGraphResult {
398
- title?: string;
399
- type?: string;
400
- imageUrl?: string;
401
- description?: string;
402
- descriptionSource?: string;
403
- descriptionLink?: string;
404
- attributes?: Record<string, string>;
405
- website?: string;
406
- }
407
-
408
- export interface AnswerBoxResult {
409
- title?: string;
410
- snippet?: string;
411
- snippetHighlighted?: string[];
412
- link?: string;
413
- date?: string;
414
- }
415
-
416
- export interface PeopleAlsoAskResult {
417
- question?: string;
418
- snippet?: string;
419
- title?: string;
420
- link?: string;
421
- }
422
-
423
- export type RelatedSearches = Array<{ query: string }>;
424
-
425
- export interface SerperSearchInput {
426
- /**
427
- * The search query string
428
- */
429
- q: string;
430
-
431
- /**
432
- * Country code for localized results
433
- * Examples: "us", "uk", "ca", "de", etc.
434
- */
435
- gl?: string;
436
-
437
- /**
438
- * Interface language
439
- * Examples: "en", "fr", "de", etc.
440
- */
441
- hl?: string;
442
-
443
- /**
444
- * Number of results to return (up to 100)
445
- */
446
- num?: number;
447
- /**
448
- * Specific location for contextual results
449
- * Example: "New York, NY"
450
- */
451
- location?: string;
452
-
453
- /**
454
- * Search autocorrection setting
455
- */
456
- autocorrect?: boolean;
457
- page?: number;
458
- /**
459
- * Date range for search results
460
- * Options: "h" (past hour), "d" (past 24 hours), "w" (past week),
461
- * "m" (past month), "y" (past year)
462
- * `qdr:${DATE_RANGE}`
463
- */
464
- tbs?: string;
465
- }
466
-
467
- export type SerperResultData = {
468
- searchParameters: SerperSearchPayload;
469
- organic?: OrganicResult[];
470
- topStories?: TopStoryResult[];
471
- images?: ImageResult[];
472
- videos?: VideoResult[];
473
- places?: PlaceResult[];
474
- news?: NewsResult[];
475
- shopping?: ShoppingResult[];
476
- peopleAlsoAsk?: PeopleAlsoAskResult[];
477
- relatedSearches?: RelatedSearches;
478
- knowledgeGraph?: KnowledgeGraphResult;
479
- answerBox?: AnswerBoxResult;
480
- credits?: number;
481
- };
482
-
483
- /** SearXNG */
484
-
485
- export interface SearxNGSearchPayload {
486
- /**
487
- * The search query string
488
- * Supports syntax specific to different search engines
489
- * Example: "site:github.com SearXNG"
490
- */
491
- q: string;
492
-
493
- /**
494
- * Comma-separated list of search categories
495
- * Example: "general,images,news"
496
- */
497
- categories?: string;
498
-
499
- /**
500
- * Comma-separated list of search engines to use
501
- * Example: "google,bing,duckduckgo"
502
- */
503
- engines?: string;
504
-
505
- /**
506
- * Code of the language for search results
507
- * Example: "en", "fr", "de", "es"
508
- */
509
- language?: string;
510
-
511
- /**
512
- * Search page number
513
- * Default: 1
514
- */
515
- pageno?: number;
516
-
517
- /**
518
- * Time range filter for search results
519
- * Options: "day", "month", "year"
520
- */
521
- time_range?: 'day' | 'month' | 'year';
522
-
523
- /**
524
- * Output format of results
525
- * Options: "json", "csv", "rss"
526
- */
527
- format?: 'json' | 'csv' | 'rss';
528
-
529
- /**
530
- * Open search results on new tab
531
- * Options: `0` (off), `1` (on)
532
- */
533
- results_on_new_tab?: 0 | 1;
534
-
535
- /**
536
- * Proxy image results through SearxNG
537
- * Options: true, false
538
- */
539
- image_proxy?: boolean;
540
-
541
- /**
542
- * Service for autocomplete suggestions
543
- * Options: "google", "dbpedia", "duckduckgo", "mwmbl",
544
- * "startpage", "wikipedia", "stract", "swisscows", "qwant"
545
- */
546
- autocomplete?: string;
547
-
548
- /**
549
- * Safe search filtering level
550
- * Options: "0" (off), "1" (moderate), "2" (strict)
551
- */
552
- safesearch?: 0 | 1 | 2;
553
-
554
- /**
555
- * Theme to use for results page
556
- * Default: "simple" (other themes may be available per instance)
557
- */
558
- theme?: string;
559
-
560
- /**
561
- * List of enabled plugins
562
- * Default: "Hash_plugin,Self_Information,Tracker_URL_remover,Ahmia_blacklist"
563
- */
564
- enabled_plugins?: string;
565
-
566
- /**
567
- * List of disabled plugins
568
- */
569
- disabled_plugins?: string;
570
-
571
- /**
572
- * List of enabled engines
573
- */
574
- enabled_engines?: string;
575
-
576
- /**
577
- * List of disabled engines
578
- */
579
- disabled_engines?: string;
580
- }
581
-
582
- export interface SearXNGResult {
583
- title?: string;
584
- url?: string;
585
- content?: string;
586
- publishedDate?: string;
587
- img_src?: string;
588
- }