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.
Files changed (109) hide show
  1. package/dist/index.es.js +1 -1
  2. package/dist/index.es.js.map +1 -1
  3. package/dist/index.js +1 -1
  4. package/dist/index.js.map +1 -1
  5. package/dist/react-query/index.es.js +1 -1
  6. package/dist/react-query/index.es.js.map +1 -1
  7. package/dist/types/accessPermissions.d.ts +744 -0
  8. package/dist/types/actions.d.ts +118 -0
  9. package/dist/types/api-endpoints.d.ts +150 -0
  10. package/dist/types/artifacts.d.ts +97 -0
  11. package/dist/types/azure.d.ts +22 -0
  12. package/dist/types/bedrock.d.ts +1220 -0
  13. package/dist/types/config.d.ts +14849 -0
  14. package/dist/types/config.spec.d.ts +1 -0
  15. package/dist/types/createPayload.d.ts +5 -0
  16. package/dist/types/data-service.d.ts +287 -0
  17. package/dist/types/feedback.d.ts +36 -0
  18. package/dist/types/file-config.d.ts +263 -0
  19. package/dist/types/file-config.spec.d.ts +1 -0
  20. package/dist/types/generate.d.ts +597 -0
  21. package/dist/types/headers-helpers.d.ts +2 -0
  22. package/{src/index.ts → dist/types/index.d.ts} +0 -15
  23. package/dist/types/keys.d.ts +92 -0
  24. package/dist/types/mcp.d.ts +2760 -0
  25. package/dist/types/messages.d.ts +10 -0
  26. package/dist/types/models.d.ts +1547 -0
  27. package/dist/types/parameterSettings.d.ts +69 -0
  28. package/dist/types/parsers.d.ts +110 -0
  29. package/dist/types/permissions.d.ts +522 -0
  30. package/dist/types/react-query/react-query-service.d.ts +85 -0
  31. package/dist/types/request.d.ts +25 -0
  32. package/dist/types/roles.d.ts +554 -0
  33. package/dist/types/roles.spec.d.ts +1 -0
  34. package/dist/types/schemas.d.ts +5110 -0
  35. package/dist/types/schemas.spec.d.ts +1 -0
  36. package/dist/types/types/agents.d.ts +433 -0
  37. package/dist/types/types/assistants.d.ts +547 -0
  38. package/dist/types/types/files.d.ts +172 -0
  39. package/dist/types/types/graph.d.ts +135 -0
  40. package/{src/types/mcpServers.ts → dist/types/types/mcpServers.d.ts} +12 -18
  41. package/dist/types/types/mutations.d.ts +209 -0
  42. package/dist/types/types/queries.d.ts +169 -0
  43. package/dist/types/types/runs.d.ts +36 -0
  44. package/dist/types/types/web.d.ts +520 -0
  45. package/dist/types/types.d.ts +503 -0
  46. package/dist/types/utils.d.ts +12 -0
  47. package/package.json +5 -1
  48. package/babel.config.js +0 -4
  49. package/check_updates.sh +0 -52
  50. package/jest.config.js +0 -19
  51. package/react-query/package-lock.json +0 -292
  52. package/react-query/package.json +0 -10
  53. package/rollup.config.js +0 -74
  54. package/server-rollup.config.js +0 -40
  55. package/specs/actions.spec.ts +0 -2533
  56. package/specs/api-endpoints-subdir.spec.ts +0 -140
  57. package/specs/api-endpoints.spec.ts +0 -74
  58. package/specs/azure.spec.ts +0 -844
  59. package/specs/bedrock.spec.ts +0 -862
  60. package/specs/filetypes.spec.ts +0 -175
  61. package/specs/generate.spec.ts +0 -770
  62. package/specs/headers-helpers.spec.ts +0 -24
  63. package/specs/mcp.spec.ts +0 -147
  64. package/specs/openapiSpecs.ts +0 -524
  65. package/specs/parsers.spec.ts +0 -601
  66. package/specs/request-interceptor.spec.ts +0 -304
  67. package/specs/utils.spec.ts +0 -196
  68. package/src/accessPermissions.ts +0 -346
  69. package/src/actions.ts +0 -813
  70. package/src/api-endpoints.ts +0 -440
  71. package/src/artifacts.ts +0 -3104
  72. package/src/azure.ts +0 -328
  73. package/src/bedrock.ts +0 -425
  74. package/src/config.spec.ts +0 -315
  75. package/src/config.ts +0 -2006
  76. package/src/createPayload.ts +0 -46
  77. package/src/data-service.ts +0 -1087
  78. package/src/feedback.ts +0 -141
  79. package/src/file-config.spec.ts +0 -1248
  80. package/src/file-config.ts +0 -764
  81. package/src/generate.ts +0 -634
  82. package/src/headers-helpers.ts +0 -13
  83. package/src/keys.ts +0 -99
  84. package/src/mcp.ts +0 -271
  85. package/src/messages.ts +0 -50
  86. package/src/models.ts +0 -69
  87. package/src/parameterSettings.ts +0 -1111
  88. package/src/parsers.ts +0 -563
  89. package/src/permissions.ts +0 -188
  90. package/src/react-query/react-query-service.ts +0 -566
  91. package/src/request.ts +0 -171
  92. package/src/roles.spec.ts +0 -132
  93. package/src/roles.ts +0 -225
  94. package/src/schemas.spec.ts +0 -355
  95. package/src/schemas.ts +0 -1234
  96. package/src/types/agents.ts +0 -470
  97. package/src/types/assistants.ts +0 -654
  98. package/src/types/files.ts +0 -191
  99. package/src/types/graph.ts +0 -145
  100. package/src/types/mutations.ts +0 -422
  101. package/src/types/queries.ts +0 -208
  102. package/src/types/runs.ts +0 -40
  103. package/src/types/web.ts +0 -588
  104. package/src/types.ts +0 -676
  105. package/src/utils.ts +0 -85
  106. package/tsconfig.json +0 -28
  107. package/tsconfig.spec.json +0 -10
  108. /package/{src/react-query/index.ts → dist/types/react-query/index.d.ts} +0 -0
  109. /package/{src/types/index.ts → dist/types/types/index.d.ts} +0 -0
@@ -0,0 +1,503 @@
1
+ import type { InfiniteData } from '@tanstack/react-query';
2
+ import type { TConversationTag, EModelEndpoint, TConversation, TSharedLink, TAttachment, TMessage, TBanner } from './schemas';
3
+ import type { SettingDefinition } from './generate';
4
+ import type { TMinimalFeedback } from './feedback';
5
+ import type { ContentTypes } from './types/runs';
6
+ import type { Agent } from './types/assistants';
7
+ export * from './schemas';
8
+ export type TMessages = TMessage[];
9
+ export type TEndpointOption = Pick<TConversation, 'endpoint' | 'endpointType' | 'model' | 'modelLabel' | 'chatGptLabel' | 'promptPrefix' | 'temperature' | 'topP' | 'topK' | 'top_p' | 'frequency_penalty' | 'presence_penalty' | 'maxOutputTokens' | 'maxContextTokens' | 'max_tokens' | 'maxTokens' | 'resendFiles' | 'imageDetail' | 'reasoning_effort' | 'verbosity' | 'instructions' | 'additional_instructions' | 'append_current_datetime' | 'tools' | 'stop' | 'region' | 'additionalModelRequestFields' | 'promptCache' | 'thinking' | 'thinkingBudget' | 'thinkingLevel' | 'effort' | 'assistant_id' | 'agent_id' | 'iconURL' | 'greeting' | 'spec' | 'artifacts' | 'file_ids' | 'system' | 'examples' | 'context'> & {
10
+ modelDisplayLabel?: string;
11
+ key?: string | null;
12
+ /** @deprecated Assistants API */
13
+ thread_id?: string;
14
+ overrideConvoId?: string;
15
+ overrideUserMessageId?: string;
16
+ modelOptions?: Record<string, unknown>;
17
+ model_parameters?: Record<string, unknown>;
18
+ modelsConfig?: TModelsConfig;
19
+ attachments?: TAttachment[];
20
+ artifactsPrompt?: string;
21
+ agent?: Promise<Agent>;
22
+ clientOptions?: Record<string, unknown>;
23
+ };
24
+ export type TEphemeralAgent = {
25
+ mcp?: string[];
26
+ web_search?: boolean;
27
+ file_search?: boolean;
28
+ execute_code?: boolean;
29
+ artifacts?: string;
30
+ };
31
+ export type TPayload = Partial<TMessage> & Partial<TEndpointOption> & {
32
+ isContinued: boolean;
33
+ isRegenerate?: boolean;
34
+ conversationId: string | null;
35
+ messages?: TMessages;
36
+ isTemporary: boolean;
37
+ ephemeralAgent?: TEphemeralAgent | null;
38
+ editedContent?: TEditedContent | null;
39
+ /** Added conversation for multi-convo feature */
40
+ addedConvo?: TConversation;
41
+ };
42
+ export type TEditedContent = {
43
+ index: number;
44
+ type: ContentTypes.THINK;
45
+ [ContentTypes.THINK]: string;
46
+ } | {
47
+ index: number;
48
+ type: ContentTypes.TEXT;
49
+ [ContentTypes.TEXT]: string;
50
+ };
51
+ export type TSubmission = {
52
+ userMessage: TMessage;
53
+ isEdited?: boolean;
54
+ isContinued?: boolean;
55
+ isTemporary: boolean;
56
+ messages: TMessage[];
57
+ isRegenerate?: boolean;
58
+ initialResponse?: TMessage;
59
+ conversation: Partial<TConversation>;
60
+ endpointOption: TEndpointOption;
61
+ clientTimestamp?: string;
62
+ ephemeralAgent?: TEphemeralAgent | null;
63
+ editedContent?: TEditedContent | null;
64
+ /** Added conversation for multi-convo feature */
65
+ addedConvo?: TConversation;
66
+ };
67
+ export type EventSubmission = Omit<TSubmission, 'initialResponse'> & {
68
+ initialResponse: TMessage;
69
+ };
70
+ export type TPluginAction = {
71
+ pluginKey: string;
72
+ action: 'install' | 'uninstall';
73
+ auth?: Partial<Record<string, string>> | null;
74
+ isEntityTool?: boolean;
75
+ };
76
+ export type GroupedConversations = [key: string, TConversation[]][];
77
+ export type TUpdateUserPlugins = {
78
+ isEntityTool?: boolean;
79
+ pluginKey: string;
80
+ action: string;
81
+ auth?: Partial<Record<string, string | null>> | null;
82
+ };
83
+ export type TCategory = {
84
+ id?: string;
85
+ value: string;
86
+ label: string;
87
+ description?: string;
88
+ custom?: boolean;
89
+ };
90
+ export type TMarketplaceCategory = TCategory & {
91
+ count: number;
92
+ };
93
+ export type TError = {
94
+ message: string;
95
+ code?: number | string;
96
+ response?: {
97
+ data?: {
98
+ message?: string;
99
+ };
100
+ status?: number;
101
+ };
102
+ };
103
+ export type TBackupCode = {
104
+ codeHash: string;
105
+ used: boolean;
106
+ usedAt: Date | null;
107
+ };
108
+ export type TUser = {
109
+ id: string;
110
+ username: string;
111
+ email: string;
112
+ name: string;
113
+ avatar: string;
114
+ role: string;
115
+ provider: string;
116
+ plugins?: string[];
117
+ twoFactorEnabled?: boolean;
118
+ backupCodes?: TBackupCode[];
119
+ personalization?: {
120
+ memories?: boolean;
121
+ };
122
+ createdAt: string;
123
+ updatedAt: string;
124
+ };
125
+ export type TGetConversationsResponse = {
126
+ conversations: TConversation[];
127
+ pageNumber: string;
128
+ pageSize: string | number;
129
+ pages: string | number;
130
+ };
131
+ export type TUpdateMessageRequest = {
132
+ conversationId: string;
133
+ messageId: string;
134
+ model: string;
135
+ text: string;
136
+ };
137
+ export type TUpdateMessageContent = {
138
+ conversationId: string;
139
+ messageId: string;
140
+ index: number;
141
+ text: string;
142
+ };
143
+ export type TUpdateUserKeyRequest = {
144
+ name: string;
145
+ value: string;
146
+ expiresAt: string;
147
+ };
148
+ export type TAgentApiKeyCreateRequest = {
149
+ name: string;
150
+ expiresAt?: string | null;
151
+ };
152
+ export type TAgentApiKeyCreateResponse = {
153
+ id: string;
154
+ name: string;
155
+ key: string;
156
+ keyPrefix: string;
157
+ createdAt: string;
158
+ expiresAt?: string;
159
+ };
160
+ export type TAgentApiKeyListItem = {
161
+ id: string;
162
+ name: string;
163
+ keyPrefix: string;
164
+ lastUsedAt?: string;
165
+ expiresAt?: string;
166
+ createdAt: string;
167
+ };
168
+ export type TAgentApiKeyListResponse = {
169
+ keys: TAgentApiKeyListItem[];
170
+ };
171
+ export type TUpdateConversationRequest = {
172
+ conversationId: string;
173
+ title: string;
174
+ };
175
+ export type TUpdateConversationResponse = TConversation;
176
+ export type TDeleteConversationRequest = {
177
+ conversationId?: string;
178
+ thread_id?: string;
179
+ endpoint?: string;
180
+ source?: string;
181
+ };
182
+ export type TDeleteConversationResponse = {
183
+ acknowledged: boolean;
184
+ deletedCount: number;
185
+ messages: {
186
+ acknowledged: boolean;
187
+ deletedCount: number;
188
+ };
189
+ };
190
+ export type TArchiveConversationRequest = {
191
+ conversationId: string;
192
+ isArchived: boolean;
193
+ };
194
+ export type TArchiveConversationResponse = TConversation;
195
+ export type TSharedMessagesResponse = Omit<TSharedLink, 'messages'> & {
196
+ messages: TMessage[];
197
+ };
198
+ export type TCreateShareLinkRequest = Pick<TConversation, 'conversationId'>;
199
+ export type TUpdateShareLinkRequest = Pick<TSharedLink, 'shareId'>;
200
+ export type TSharedLinkResponse = Pick<TSharedLink, 'shareId'> & Pick<TConversation, 'conversationId'>;
201
+ export type TSharedLinkGetResponse = TSharedLinkResponse & {
202
+ success: boolean;
203
+ };
204
+ export type TConversationTagsResponse = TConversationTag[];
205
+ export type TConversationTagRequest = Partial<Omit<TConversationTag, 'createdAt' | 'updatedAt' | 'count' | 'user'>> & {
206
+ conversationId?: string;
207
+ addToConversation?: boolean;
208
+ };
209
+ export type TConversationTagResponse = TConversationTag;
210
+ export type TTagConversationRequest = {
211
+ tags: string[];
212
+ tag: string;
213
+ };
214
+ export type TTagConversationResponse = string[];
215
+ export type TDuplicateConvoRequest = {
216
+ conversationId?: string;
217
+ };
218
+ export type TDuplicateConvoResponse = {
219
+ conversation: TConversation;
220
+ messages: TMessage[];
221
+ };
222
+ export type TForkConvoRequest = {
223
+ messageId: string;
224
+ conversationId: string;
225
+ option?: string;
226
+ splitAtTarget?: boolean;
227
+ latestMessageId?: string;
228
+ };
229
+ export type TForkConvoResponse = {
230
+ conversation: TConversation;
231
+ messages: TMessage[];
232
+ };
233
+ export type TSearchResults = {
234
+ conversations: TConversation[];
235
+ messages: TMessage[];
236
+ pageNumber: string;
237
+ pageSize: string | number;
238
+ pages: string | number;
239
+ filter: object;
240
+ };
241
+ export type TConfig = {
242
+ order: number;
243
+ type?: EModelEndpoint;
244
+ azure?: boolean;
245
+ availableTools?: [];
246
+ availableRegions?: string[];
247
+ plugins?: Record<string, string>;
248
+ name?: string;
249
+ iconURL?: string;
250
+ version?: string;
251
+ modelDisplayLabel?: string;
252
+ userProvide?: boolean | null;
253
+ userProvideURL?: boolean | null;
254
+ disableBuilder?: boolean;
255
+ retrievalModels?: string[];
256
+ capabilities?: string[];
257
+ customParams?: {
258
+ defaultParamsEndpoint?: string;
259
+ paramDefinitions?: Partial<SettingDefinition>[];
260
+ };
261
+ };
262
+ export type TEndpointsConfig = Record<EModelEndpoint | string, TConfig | null | undefined> | undefined;
263
+ export type TModelsConfig = Record<string, string[]>;
264
+ export type TUpdateTokenCountResponse = {
265
+ count: number;
266
+ };
267
+ export type TMessageTreeNode = object;
268
+ export type TSearchMessage = object;
269
+ export type TSearchMessageTreeNode = object;
270
+ export type TRegisterUserResponse = {
271
+ message: string;
272
+ };
273
+ export type TRegisterUser = {
274
+ name: string;
275
+ email: string;
276
+ username: string;
277
+ password: string;
278
+ confirm_password?: string;
279
+ token?: string;
280
+ };
281
+ export type TLoginUser = {
282
+ email: string;
283
+ password: string;
284
+ token?: string;
285
+ backupCode?: string;
286
+ };
287
+ export type TLoginResponse = {
288
+ token?: string;
289
+ user?: TUser;
290
+ twoFAPending?: boolean;
291
+ tempToken?: string;
292
+ };
293
+ /** Shared payload for any operation that requires OTP or backup-code verification. */
294
+ export type TOTPVerificationPayload = {
295
+ token?: string;
296
+ backupCode?: string;
297
+ };
298
+ export type TEnable2FARequest = TOTPVerificationPayload;
299
+ export type TEnable2FAResponse = {
300
+ otpauthUrl: string;
301
+ backupCodes: string[];
302
+ message?: string;
303
+ };
304
+ export type TVerify2FARequest = TOTPVerificationPayload;
305
+ export type TVerify2FAResponse = {
306
+ message: string;
307
+ };
308
+ /** For verifying 2FA during login with a temporary token. */
309
+ export type TVerify2FATempRequest = TOTPVerificationPayload & {
310
+ tempToken: string;
311
+ };
312
+ export type TVerify2FATempResponse = {
313
+ token?: string;
314
+ user?: TUser;
315
+ message?: string;
316
+ };
317
+ export type TDisable2FARequest = TOTPVerificationPayload;
318
+ export type TDisable2FAResponse = {
319
+ message: string;
320
+ };
321
+ export type TRegenerateBackupCodesRequest = TOTPVerificationPayload;
322
+ export type TRegenerateBackupCodesResponse = {
323
+ message?: string;
324
+ backupCodes: string[];
325
+ backupCodesHash: TBackupCode[];
326
+ };
327
+ export type TDeleteUserRequest = TOTPVerificationPayload;
328
+ export type TRequestPasswordReset = {
329
+ email: string;
330
+ };
331
+ export type TResetPassword = {
332
+ userId: string;
333
+ token: string;
334
+ password: string;
335
+ confirm_password?: string;
336
+ };
337
+ export type VerifyEmailResponse = {
338
+ message: string;
339
+ };
340
+ export type TVerifyEmail = {
341
+ email: string;
342
+ token: string;
343
+ };
344
+ export type TResendVerificationEmail = Omit<TVerifyEmail, 'token'>;
345
+ export type TRefreshTokenResponse = {
346
+ token: string;
347
+ user: TUser;
348
+ };
349
+ export type TCheckUserKeyResponse = {
350
+ expiresAt: string;
351
+ };
352
+ export type TRequestPasswordResetResponse = {
353
+ link?: string;
354
+ message?: string;
355
+ };
356
+ /**
357
+ * Represents the response from the import endpoint.
358
+ */
359
+ export type TImportResponse = {
360
+ /**
361
+ * The message associated with the response.
362
+ */
363
+ message: string;
364
+ };
365
+ /** Prompts */
366
+ export type TPrompt = {
367
+ groupId: string;
368
+ author: string;
369
+ prompt: string;
370
+ type: 'text' | 'chat';
371
+ createdAt: string;
372
+ updatedAt: string;
373
+ _id?: string;
374
+ };
375
+ export type TPromptGroup = {
376
+ name: string;
377
+ numberOfGenerations?: number;
378
+ command?: string;
379
+ oneliner?: string;
380
+ category?: string;
381
+ productionId?: string | null;
382
+ productionPrompt?: Pick<TPrompt, 'prompt'> | null;
383
+ author: string;
384
+ authorName: string;
385
+ createdAt?: Date;
386
+ updatedAt?: Date;
387
+ _id?: string;
388
+ };
389
+ export type TCreatePrompt = {
390
+ prompt: Pick<TPrompt, 'prompt' | 'type'> & {
391
+ groupId?: string;
392
+ };
393
+ group?: {
394
+ name: string;
395
+ category?: string;
396
+ oneliner?: string;
397
+ command?: string;
398
+ };
399
+ };
400
+ export type TCreatePromptRecord = TCreatePrompt & Pick<TPromptGroup, 'author' | 'authorName'>;
401
+ export type TPromptsWithFilterRequest = {
402
+ groupId: string;
403
+ tags?: string[];
404
+ projectId?: string;
405
+ version?: number;
406
+ };
407
+ export type TPromptGroupsWithFilterRequest = {
408
+ category: string;
409
+ pageNumber?: string;
410
+ pageSize?: string | number;
411
+ limit?: string | number;
412
+ cursor?: string;
413
+ before?: string | null;
414
+ after?: string | null;
415
+ order?: 'asc' | 'desc';
416
+ name?: string;
417
+ author?: string;
418
+ };
419
+ export type PromptGroupListResponse = {
420
+ promptGroups: TPromptGroup[];
421
+ pageNumber: string;
422
+ pageSize: string | number;
423
+ pages: string | number;
424
+ has_more: boolean;
425
+ after: string | null;
426
+ };
427
+ export type PromptGroupListData = InfiniteData<PromptGroupListResponse>;
428
+ export type TCreatePromptResponse = {
429
+ prompt: TPrompt;
430
+ group?: TPromptGroup;
431
+ };
432
+ export type TUpdatePromptGroupPayload = Partial<TPromptGroup>;
433
+ export type TUpdatePromptGroupVariables = {
434
+ id: string;
435
+ payload: TUpdatePromptGroupPayload;
436
+ };
437
+ export type TUpdatePromptGroupResponse = TPromptGroup;
438
+ export type TDeletePromptResponse = {
439
+ prompt: string;
440
+ promptGroup?: {
441
+ message: string;
442
+ id: string;
443
+ };
444
+ };
445
+ export type TDeletePromptVariables = {
446
+ _id: string;
447
+ groupId: string;
448
+ };
449
+ export type TMakePromptProductionResponse = {
450
+ message: string;
451
+ };
452
+ export type TMakePromptProductionRequest = {
453
+ id: string;
454
+ groupId: string;
455
+ productionPrompt: Pick<TPrompt, 'prompt'>;
456
+ };
457
+ export type TUpdatePromptLabelsRequest = {
458
+ id: string;
459
+ payload: {
460
+ labels: string[];
461
+ };
462
+ };
463
+ export type TUpdatePromptLabelsResponse = {
464
+ message: string;
465
+ };
466
+ export type TDeletePromptGroupResponse = TUpdatePromptLabelsResponse;
467
+ export type TDeletePromptGroupRequest = {
468
+ id: string;
469
+ };
470
+ export type TGetCategoriesResponse = TCategory[];
471
+ export type TGetRandomPromptsResponse = {
472
+ prompts: TPromptGroup[];
473
+ };
474
+ export type TGetRandomPromptsRequest = {
475
+ limit: number;
476
+ skip: number;
477
+ };
478
+ export type TCustomConfigSpeechResponse = {
479
+ [key: string]: string;
480
+ };
481
+ export type TUserTermsResponse = {
482
+ termsAccepted: boolean;
483
+ };
484
+ export type TAcceptTermsResponse = {
485
+ success: boolean;
486
+ };
487
+ export type TBannerResponse = TBanner | null;
488
+ export type TUpdateFeedbackRequest = {
489
+ feedback?: TMinimalFeedback;
490
+ };
491
+ export type TUpdateFeedbackResponse = {
492
+ messageId: string;
493
+ conversationId: string;
494
+ feedback?: TMinimalFeedback;
495
+ };
496
+ export type TBalanceResponse = {
497
+ tokenCredits: number;
498
+ autoRefillEnabled: boolean;
499
+ refillIntervalValue?: number;
500
+ refillIntervalUnit?: 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'months';
501
+ lastRefill?: Date;
502
+ refillAmount?: number;
503
+ };
@@ -0,0 +1,12 @@
1
+ export declare const envVarRegex: RegExp;
2
+ /** Returns true when `varName` refers to an infrastructure secret that must not leak. */
3
+ export declare function isSensitiveEnvVar(varName: string): boolean;
4
+ /** Extracts the environment variable name from a template literal string */
5
+ export declare function extractVariableName(value: string): string | null;
6
+ /** Extracts the value of an environment variable from a string. */
7
+ export declare function extractEnvVariable(value: string): string;
8
+ /**
9
+ * Normalize the endpoint name to system-expected value.
10
+ * @param name
11
+ */
12
+ export declare function normalizeEndpointName(name?: string): string;
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "librechat-data-provider",
3
- "version": "0.8.402",
3
+ "version": "0.8.404",
4
4
  "description": "data services for librechat apps",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
7
7
  "types": "./dist/types/index.d.ts",
8
+ "sideEffects": false,
8
9
  "exports": {
9
10
  ".": {
10
11
  "import": "./dist/index.es.js",
@@ -17,6 +18,9 @@
17
18
  "types": "./dist/types/react-query/index.d.ts"
18
19
  }
19
20
  },
21
+ "files": [
22
+ "dist"
23
+ ],
20
24
  "scripts": {
21
25
  "clean": "rimraf dist",
22
26
  "build": "npm run clean && rollup -c --silent --bundleConfigAsCjs",
package/babel.config.js DELETED
@@ -1,4 +0,0 @@
1
- module.exports = {
2
- presets: [['@babel/preset-env', { targets: { node: 'current' } }], '@babel/preset-typescript'],
3
- plugins: ['babel-plugin-replace-ts-export-assignment'],
4
- };
package/check_updates.sh DELETED
@@ -1,52 +0,0 @@
1
- #!/bin/bash
2
- # SCRIPT USED TO DETERMINE WHICH PACKAGE HAD CHANGES
3
-
4
- # Set the directory containing the package.json file
5
- dir=${1:-.}
6
-
7
- # Today's date and the date 3 days ago in seconds since the Unix epoch
8
- today=$(date +%s)
9
- three_days_ago=$(date -d "3 days ago" +%s)
10
-
11
- # Read dependencies and devDependencies from package.json
12
- dependencies=$(jq -r '.dependencies,.devDependencies|keys[]' "$dir/package.json")
13
- packages=($dependencies) # Convert JSON array to bash array
14
-
15
- # Array to hold update messages
16
- declare -a updates
17
-
18
- # Loop over each package
19
- for pkg in "${packages[@]}"
20
- do
21
- echo "Checking $pkg..."
22
- # Retrieve the version time information as JSON
23
- times=$(npm view "$pkg" time --json)
24
-
25
- # Loop through dates from the JSON object and check if any are within the last 3 days
26
- echo $times | jq -r '. | to_entries[] | select(.key as $k | $k|test("^[0-9]")) | [.key, .value] | @csv' | while IFS="," read -r version date
27
- do
28
- # Format the date to remove quotes and trim it
29
- date=$(echo $date | tr -d '"' | xargs)
30
- # Convert date to seconds since the Unix epoch
31
- version_date=$(date -d "$date" +%s)
32
-
33
- # Check if this date is within the last three days
34
- if (( version_date > three_days_ago && version_date <= today ))
35
- then
36
- # Convert UTC to Eastern Time (ET), ensuring compatibility
37
- et_date=$(date -u -d "$date" +"%Y-%m-%d %H:%M:%S UTC")
38
- et_date=$(date -d "$et_date -4 hours" +"%Y-%m-%d %H:%M:%S ET")
39
- update_message="Version $version of $pkg was released on $et_date"
40
- echo "$update_message"
41
- updates+=("$update_message")
42
- fi
43
- done
44
- done
45
-
46
- # Display all collected updates
47
- if [ ${#updates[@]} -eq 0 ]; then
48
- echo "No recent updates found within the last three days."
49
- else
50
- echo "Recent updates within the last three days:"
51
- printf "%s\n" "${updates[@]}"
52
- fi
package/jest.config.js DELETED
@@ -1,19 +0,0 @@
1
- module.exports = {
2
- collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}', '!<rootDir>/node_modules/'],
3
- coveragePathIgnorePatterns: ['/node_modules/', '/dist/'],
4
- coverageReporters: ['text', 'cobertura'],
5
- testResultsProcessor: 'jest-junit',
6
- moduleNameMapper: {
7
- '^@src/(.*)$': '<rootDir>/src/$1',
8
- },
9
- // coverageThreshold: {
10
- // global: {
11
- // statements: 58,
12
- // branches: 49,
13
- // functions: 50,
14
- // lines: 57,
15
- // },
16
- // },
17
- maxWorkers: '50%',
18
- restoreMocks: true,
19
- };