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
@@ -1,188 +0,0 @@
1
- import { z } from 'zod';
2
-
3
- /**
4
- * Enum for Permission Types
5
- */
6
- export enum PermissionTypes {
7
- /**
8
- * Type for Prompt Permissions
9
- */
10
- PROMPTS = 'PROMPTS',
11
- /**
12
- * Type for Bookmark Permissions
13
- */
14
- BOOKMARKS = 'BOOKMARKS',
15
- /**
16
- * Type for Agent Permissions
17
- */
18
- AGENTS = 'AGENTS',
19
- /**
20
- * Type for Memory Permissions
21
- */
22
- MEMORIES = 'MEMORIES',
23
- /**
24
- * Type for Multi-Conversation Permissions
25
- */
26
- MULTI_CONVO = 'MULTI_CONVO',
27
- /**
28
- * Type for Temporary Chat
29
- */
30
- TEMPORARY_CHAT = 'TEMPORARY_CHAT',
31
- /**
32
- * Type for using the "Run Code" LC Code Interpreter API feature
33
- */
34
- RUN_CODE = 'RUN_CODE',
35
- /**
36
- * Type for using the "Web Search" feature
37
- */
38
- WEB_SEARCH = 'WEB_SEARCH',
39
- /**
40
- * Type for People Picker Permissions
41
- */
42
- PEOPLE_PICKER = 'PEOPLE_PICKER',
43
- /**
44
- * Type for Marketplace Permissions
45
- */
46
- MARKETPLACE = 'MARKETPLACE',
47
- /**
48
- * Type for using the "File Search" feature
49
- */
50
- FILE_SEARCH = 'FILE_SEARCH',
51
- /**
52
- * Type for using the "File Citations" feature in agents
53
- */
54
- FILE_CITATIONS = 'FILE_CITATIONS',
55
- /**
56
- * Type for MCP Server Permissions
57
- */
58
- MCP_SERVERS = 'MCP_SERVERS',
59
- /**
60
- * Type for Remote Agent (API) Permissions
61
- */
62
- REMOTE_AGENTS = 'REMOTE_AGENTS',
63
- }
64
-
65
- /**
66
- * Enum for Role-Based Access Control Constants
67
- */
68
- export enum Permissions {
69
- USE = 'USE',
70
- CREATE = 'CREATE',
71
- UPDATE = 'UPDATE',
72
- READ = 'READ',
73
- READ_AUTHOR = 'READ_AUTHOR',
74
- SHARE = 'SHARE',
75
- /** Can disable if desired */
76
- OPT_OUT = 'OPT_OUT',
77
- VIEW_USERS = 'VIEW_USERS',
78
- VIEW_GROUPS = 'VIEW_GROUPS',
79
- VIEW_ROLES = 'VIEW_ROLES',
80
- /** Can share resources publicly (with everyone) */
81
- SHARE_PUBLIC = 'SHARE_PUBLIC',
82
- }
83
-
84
- export const promptPermissionsSchema = z.object({
85
- [Permissions.USE]: z.boolean().default(true),
86
- [Permissions.CREATE]: z.boolean().default(true),
87
- [Permissions.SHARE]: z.boolean().default(false),
88
- [Permissions.SHARE_PUBLIC]: z.boolean().default(false),
89
- });
90
- export type TPromptPermissions = z.infer<typeof promptPermissionsSchema>;
91
-
92
- export const bookmarkPermissionsSchema = z.object({
93
- [Permissions.USE]: z.boolean().default(true),
94
- });
95
- export type TBookmarkPermissions = z.infer<typeof bookmarkPermissionsSchema>;
96
-
97
- export const memoryPermissionsSchema = z.object({
98
- [Permissions.USE]: z.boolean().default(true),
99
- [Permissions.CREATE]: z.boolean().default(true),
100
- [Permissions.UPDATE]: z.boolean().default(true),
101
- [Permissions.READ]: z.boolean().default(true),
102
- [Permissions.OPT_OUT]: z.boolean().default(true),
103
- });
104
- export type TMemoryPermissions = z.infer<typeof memoryPermissionsSchema>;
105
-
106
- export const agentPermissionsSchema = z.object({
107
- [Permissions.USE]: z.boolean().default(true),
108
- [Permissions.CREATE]: z.boolean().default(true),
109
- [Permissions.SHARE]: z.boolean().default(false),
110
- [Permissions.SHARE_PUBLIC]: z.boolean().default(false),
111
- });
112
- export type TAgentPermissions = z.infer<typeof agentPermissionsSchema>;
113
-
114
- export const multiConvoPermissionsSchema = z.object({
115
- [Permissions.USE]: z.boolean().default(true),
116
- });
117
- export type TMultiConvoPermissions = z.infer<typeof multiConvoPermissionsSchema>;
118
-
119
- export const temporaryChatPermissionsSchema = z.object({
120
- [Permissions.USE]: z.boolean().default(true),
121
- });
122
- export type TTemporaryChatPermissions = z.infer<typeof temporaryChatPermissionsSchema>;
123
-
124
- export const runCodePermissionsSchema = z.object({
125
- [Permissions.USE]: z.boolean().default(true),
126
- });
127
- export type TRunCodePermissions = z.infer<typeof runCodePermissionsSchema>;
128
-
129
- export const webSearchPermissionsSchema = z.object({
130
- [Permissions.USE]: z.boolean().default(true),
131
- });
132
- export type TWebSearchPermissions = z.infer<typeof webSearchPermissionsSchema>;
133
-
134
- export const peoplePickerPermissionsSchema = z.object({
135
- [Permissions.VIEW_USERS]: z.boolean().default(true),
136
- [Permissions.VIEW_GROUPS]: z.boolean().default(true),
137
- [Permissions.VIEW_ROLES]: z.boolean().default(true),
138
- });
139
- export type TPeoplePickerPermissions = z.infer<typeof peoplePickerPermissionsSchema>;
140
-
141
- export const marketplacePermissionsSchema = z.object({
142
- [Permissions.USE]: z.boolean().default(false),
143
- });
144
- export type TMarketplacePermissions = z.infer<typeof marketplacePermissionsSchema>;
145
-
146
- export const fileSearchPermissionsSchema = z.object({
147
- [Permissions.USE]: z.boolean().default(true),
148
- });
149
- export type TFileSearchPermissions = z.infer<typeof fileSearchPermissionsSchema>;
150
-
151
- export const fileCitationsPermissionsSchema = z.object({
152
- [Permissions.USE]: z.boolean().default(true),
153
- });
154
- export type TFileCitationsPermissions = z.infer<typeof fileCitationsPermissionsSchema>;
155
-
156
- export const mcpServersPermissionsSchema = z.object({
157
- [Permissions.USE]: z.boolean().default(true),
158
- [Permissions.CREATE]: z.boolean().default(true),
159
- [Permissions.SHARE]: z.boolean().default(false),
160
- [Permissions.SHARE_PUBLIC]: z.boolean().default(false),
161
- });
162
- export type TMcpServersPermissions = z.infer<typeof mcpServersPermissionsSchema>;
163
-
164
- export const remoteAgentsPermissionsSchema = z.object({
165
- [Permissions.USE]: z.boolean().default(false),
166
- [Permissions.CREATE]: z.boolean().default(false),
167
- [Permissions.SHARE]: z.boolean().default(false),
168
- [Permissions.SHARE_PUBLIC]: z.boolean().default(false),
169
- });
170
- export type TRemoteAgentsPermissions = z.infer<typeof remoteAgentsPermissionsSchema>;
171
-
172
- // Define a single permissions schema that holds all permission types.
173
- export const permissionsSchema = z.object({
174
- [PermissionTypes.PROMPTS]: promptPermissionsSchema,
175
- [PermissionTypes.BOOKMARKS]: bookmarkPermissionsSchema,
176
- [PermissionTypes.MEMORIES]: memoryPermissionsSchema,
177
- [PermissionTypes.AGENTS]: agentPermissionsSchema,
178
- [PermissionTypes.MULTI_CONVO]: multiConvoPermissionsSchema,
179
- [PermissionTypes.TEMPORARY_CHAT]: temporaryChatPermissionsSchema,
180
- [PermissionTypes.RUN_CODE]: runCodePermissionsSchema,
181
- [PermissionTypes.WEB_SEARCH]: webSearchPermissionsSchema,
182
- [PermissionTypes.PEOPLE_PICKER]: peoplePickerPermissionsSchema,
183
- [PermissionTypes.MARKETPLACE]: marketplacePermissionsSchema,
184
- [PermissionTypes.FILE_SEARCH]: fileSearchPermissionsSchema,
185
- [PermissionTypes.FILE_CITATIONS]: fileCitationsPermissionsSchema,
186
- [PermissionTypes.MCP_SERVERS]: mcpServersPermissionsSchema,
187
- [PermissionTypes.REMOTE_AGENTS]: remoteAgentsPermissionsSchema,
188
- });