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/feedback.ts DELETED
@@ -1,141 +0,0 @@
1
- import { z } from 'zod';
2
-
3
- export type TFeedbackRating = 'thumbsUp' | 'thumbsDown';
4
- export const FEEDBACK_RATINGS = ['thumbsUp', 'thumbsDown'] as const;
5
-
6
- export const FEEDBACK_REASON_KEYS = [
7
- // Down
8
- 'not_matched',
9
- 'inaccurate',
10
- 'bad_style',
11
- 'missing_image',
12
- 'unjustified_refusal',
13
- 'not_helpful',
14
- 'other',
15
- // Up
16
- 'accurate_reliable',
17
- 'creative_solution',
18
- 'clear_well_written',
19
- 'attention_to_detail',
20
- ] as const;
21
-
22
- export type TFeedbackTagKey = (typeof FEEDBACK_REASON_KEYS)[number];
23
-
24
- export interface TFeedbackTag {
25
- key: TFeedbackTagKey;
26
- label: string;
27
- direction: TFeedbackRating;
28
- icon: string;
29
- }
30
-
31
- // --- Tag Registry ---
32
- export const FEEDBACK_TAGS: TFeedbackTag[] = [
33
- // Thumbs Down
34
- {
35
- key: 'not_matched',
36
- label: 'com_ui_feedback_tag_not_matched',
37
- direction: 'thumbsDown',
38
- icon: 'AlertCircle',
39
- },
40
- {
41
- key: 'inaccurate',
42
- label: 'com_ui_feedback_tag_inaccurate',
43
- direction: 'thumbsDown',
44
- icon: 'AlertCircle',
45
- },
46
- {
47
- key: 'bad_style',
48
- label: 'com_ui_feedback_tag_bad_style',
49
- direction: 'thumbsDown',
50
- icon: 'PenTool',
51
- },
52
- {
53
- key: 'missing_image',
54
- label: 'com_ui_feedback_tag_missing_image',
55
- direction: 'thumbsDown',
56
- icon: 'ImageOff',
57
- },
58
- {
59
- key: 'unjustified_refusal',
60
- label: 'com_ui_feedback_tag_unjustified_refusal',
61
- direction: 'thumbsDown',
62
- icon: 'Ban',
63
- },
64
- {
65
- key: 'not_helpful',
66
- label: 'com_ui_feedback_tag_not_helpful',
67
- direction: 'thumbsDown',
68
- icon: 'ThumbsDown',
69
- },
70
- {
71
- key: 'other',
72
- label: 'com_ui_feedback_tag_other',
73
- direction: 'thumbsDown',
74
- icon: 'HelpCircle',
75
- },
76
- // Thumbs Up
77
- {
78
- key: 'accurate_reliable',
79
- label: 'com_ui_feedback_tag_accurate_reliable',
80
- direction: 'thumbsUp',
81
- icon: 'CheckCircle',
82
- },
83
- {
84
- key: 'creative_solution',
85
- label: 'com_ui_feedback_tag_creative_solution',
86
- direction: 'thumbsUp',
87
- icon: 'Lightbulb',
88
- },
89
- {
90
- key: 'clear_well_written',
91
- label: 'com_ui_feedback_tag_clear_well_written',
92
- direction: 'thumbsUp',
93
- icon: 'PenTool',
94
- },
95
- {
96
- key: 'attention_to_detail',
97
- label: 'com_ui_feedback_tag_attention_to_detail',
98
- direction: 'thumbsUp',
99
- icon: 'Search',
100
- },
101
- ];
102
-
103
- export function getTagsForRating(rating: TFeedbackRating): TFeedbackTag[] {
104
- return FEEDBACK_TAGS.filter((tag) => tag.direction === rating);
105
- }
106
-
107
- export const feedbackTagKeySchema = z.enum(FEEDBACK_REASON_KEYS);
108
- export const feedbackRatingSchema = z.enum(FEEDBACK_RATINGS);
109
-
110
- export const feedbackSchema = z.object({
111
- rating: feedbackRatingSchema,
112
- tag: feedbackTagKeySchema,
113
- text: z.string().max(1024).optional(),
114
- });
115
-
116
- export type TMinimalFeedback = z.infer<typeof feedbackSchema>;
117
-
118
- export type TFeedback = {
119
- rating: TFeedbackRating;
120
- tag: TFeedbackTag | undefined;
121
- text?: string;
122
- };
123
-
124
- export function toMinimalFeedback(feedback: TFeedback | undefined): TMinimalFeedback | undefined {
125
- if (!feedback?.rating || !feedback?.tag || !feedback.tag.key) {
126
- return undefined;
127
- }
128
-
129
- return {
130
- rating: feedback.rating,
131
- tag: feedback.tag.key,
132
- text: feedback.text,
133
- };
134
- }
135
-
136
- export function getTagByKey(key: TFeedbackTagKey | undefined): TFeedbackTag | undefined {
137
- if (!key) {
138
- return undefined;
139
- }
140
- return FEEDBACK_TAGS.find((tag) => tag.key === key);
141
- }