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,422 +0,0 @@
1
- import * as types from '../types';
2
- import * as r from '../roles';
3
- import * as p from '../permissions';
4
- import {
5
- Tools,
6
- Assistant,
7
- AssistantCreateParams,
8
- AssistantUpdateParams,
9
- FunctionTool,
10
- AssistantDocument,
11
- Agent,
12
- AgentCreateParams,
13
- AgentUpdateParams,
14
- } from './assistants';
15
- import { Action, ActionMetadata } from './agents';
16
-
17
- export type MutationOptions<
18
- Response,
19
- Request,
20
- Context = unknown,
21
- Error = unknown,
22
- Snapshot = void,
23
- > = {
24
- onSuccess?: (data: Response, variables: Request, context?: Context) => void;
25
- onMutate?: (variables: Request) => Snapshot | Promise<Snapshot>;
26
- onError?: (error: Error, variables: Request, context?: Context, snapshot?: Snapshot) => void;
27
- onSettled?: (
28
- data: Response | undefined,
29
- error: Error | null,
30
- variables: Request,
31
- context?: Context,
32
- ) => void;
33
- };
34
-
35
- export type TGenTitleRequest = {
36
- conversationId: string;
37
- };
38
-
39
- export type TGenTitleResponse = {
40
- title: string;
41
- };
42
-
43
- export type PresetDeleteResponse = {
44
- acknowledged: boolean;
45
- deletedCount: number;
46
- };
47
-
48
- export type UpdatePresetOptions = MutationOptions<types.TPreset, types.TPreset>;
49
-
50
- export type DeletePresetOptions = MutationOptions<PresetDeleteResponse, types.TPreset | undefined>;
51
-
52
- /* Assistant mutations */
53
-
54
- export type AssistantAvatarVariables = {
55
- assistant_id: string;
56
- model: string;
57
- formData: FormData;
58
- postCreation?: boolean;
59
- endpoint: types.AssistantsEndpoint;
60
- version: number | string;
61
- };
62
-
63
- export type UpdateActionVariables = {
64
- assistant_id: string;
65
- functions: FunctionTool[];
66
- metadata: ActionMetadata;
67
- action_id?: string;
68
- model: string;
69
- endpoint: types.AssistantsEndpoint;
70
- version: number | string;
71
- };
72
-
73
- export type UploadAssistantAvatarOptions = MutationOptions<Assistant, AssistantAvatarVariables>;
74
-
75
- export type CreateAssistantMutationOptions = MutationOptions<Assistant, AssistantCreateParams>;
76
-
77
- export type UpdateAssistantVariables = {
78
- assistant_id: string;
79
- data: AssistantUpdateParams;
80
- };
81
-
82
- export type UpdateAssistantMutationOptions = MutationOptions<Assistant, UpdateAssistantVariables>;
83
-
84
- export type DeleteAssistantBody = {
85
- assistant_id: string;
86
- model: string;
87
- endpoint: types.AssistantsEndpoint;
88
- };
89
-
90
- export type DeleteAssistantMutationOptions = MutationOptions<
91
- void,
92
- Pick<DeleteAssistantBody, 'assistant_id'>
93
- >;
94
-
95
- export type UpdateActionResponse = [AssistantDocument, Assistant, Action];
96
- export type UpdateActionOptions = MutationOptions<UpdateActionResponse, UpdateActionVariables>;
97
-
98
- export type DeleteActionVariables = {
99
- endpoint: types.AssistantsEndpoint;
100
- assistant_id: string;
101
- action_id: string;
102
- model: string;
103
- };
104
-
105
- export type DeleteActionOptions = MutationOptions<void, DeleteActionVariables>;
106
-
107
- /* Agent mutations */
108
-
109
- export type AgentAvatarVariables = {
110
- agent_id: string;
111
- formData: FormData;
112
- };
113
-
114
- export type UpdateAgentActionVariables = {
115
- agent_id: string;
116
- action_id?: string;
117
- metadata: ActionMetadata;
118
- functions: FunctionTool[];
119
- };
120
-
121
- export type UploadAgentAvatarOptions = MutationOptions<Agent, AgentAvatarVariables>;
122
-
123
- export type CreateAgentMutationOptions = MutationOptions<Agent, AgentCreateParams>;
124
-
125
- export type UpdateAgentVariables = {
126
- agent_id: string;
127
- data: AgentUpdateParams;
128
- };
129
-
130
- export type DuplicateVersionError = Error & {
131
- statusCode?: number;
132
- details?: {
133
- duplicateVersion?: unknown;
134
- versionIndex?: number;
135
- };
136
- };
137
-
138
- export type UpdateAgentMutationOptions = MutationOptions<Agent, UpdateAgentVariables>;
139
-
140
- export type DuplicateAgentBody = {
141
- agent_id: string;
142
- };
143
-
144
- export type DuplicateAgentMutationOptions = MutationOptions<
145
- { agent: Agent; actions: Action[] },
146
- Pick<DuplicateAgentBody, 'agent_id'>
147
- >;
148
-
149
- export type DeleteAgentBody = {
150
- agent_id: string;
151
- };
152
-
153
- export type DeleteAgentMutationOptions = MutationOptions<void, Pick<DeleteAgentBody, 'agent_id'>>;
154
-
155
- export type UpdateAgentActionResponse = [Agent, Action];
156
- export type UpdateAgentActionOptions = MutationOptions<
157
- UpdateAgentActionResponse,
158
- UpdateAgentActionVariables
159
- >;
160
-
161
- export type DeleteAgentActionVariables = {
162
- agent_id: string;
163
- action_id: string;
164
- };
165
-
166
- export type DeleteAgentActionOptions = MutationOptions<void, DeleteAgentActionVariables>;
167
-
168
- export type RevertAgentVersionVariables = {
169
- agent_id: string;
170
- version_index: number;
171
- };
172
-
173
- export type RevertAgentVersionOptions = MutationOptions<Agent, RevertAgentVersionVariables>;
174
-
175
- export type DeleteConversationOptions = MutationOptions<
176
- types.TDeleteConversationResponse,
177
- types.TDeleteConversationRequest
178
- >;
179
-
180
- export type ArchiveConversationOptions = MutationOptions<
181
- types.TArchiveConversationResponse,
182
- types.TArchiveConversationRequest
183
- >;
184
-
185
- export type DuplicateConvoOptions = MutationOptions<
186
- types.TDuplicateConvoResponse,
187
- types.TDuplicateConvoRequest
188
- >;
189
-
190
- export type ForkConvoOptions = MutationOptions<types.TForkConvoResponse, types.TForkConvoRequest>;
191
-
192
- export type CreateSharedLinkOptions = MutationOptions<
193
- types.TSharedLink,
194
- Partial<types.TSharedLink>
195
- >;
196
-
197
- export type updateTagsInConvoOptions = MutationOptions<
198
- types.TTagConversationResponse,
199
- types.TTagConversationRequest
200
- >;
201
-
202
- export type UpdateSharedLinkOptions = MutationOptions<
203
- types.TSharedLink,
204
- Partial<types.TSharedLink>
205
- >;
206
-
207
- export type ArchiveConvoOptions = MutationOptions<
208
- types.TArchiveConversationResponse,
209
- types.TArchiveConversationRequest
210
- >;
211
-
212
- export type DeleteSharedLinkContext = { previousQueries?: Map<string, TDeleteSharedLinkResponse> };
213
- export type DeleteSharedLinkOptions = MutationOptions<
214
- TDeleteSharedLinkResponse,
215
- { shareId: string },
216
- DeleteSharedLinkContext
217
- >;
218
-
219
- export type TUpdatePromptContext =
220
- | {
221
- group?: types.TPromptGroup;
222
- previousListData?: types.PromptGroupListData;
223
- }
224
- | undefined;
225
-
226
- export type UpdatePromptGroupOptions = MutationOptions<
227
- types.TUpdatePromptGroupResponse,
228
- types.TUpdatePromptGroupVariables,
229
- TUpdatePromptContext
230
- >;
231
-
232
- export type CreatePromptOptions = MutationOptions<types.TCreatePromptResponse, types.TCreatePrompt>;
233
-
234
- export type DeletePromptOptions = MutationOptions<
235
- types.TDeletePromptResponse,
236
- types.TDeletePromptVariables
237
- >;
238
-
239
- export type DeletePromptGroupOptions = MutationOptions<
240
- types.TDeletePromptGroupResponse,
241
- types.TDeletePromptGroupRequest
242
- >;
243
-
244
- export type UpdatePromptLabelOptions = MutationOptions<
245
- types.TUpdatePromptLabelsResponse,
246
- types.TUpdatePromptLabelsRequest
247
- >;
248
-
249
- export type MakePromptProductionOptions = MutationOptions<
250
- types.TMakePromptProductionResponse,
251
- types.TMakePromptProductionRequest,
252
- TUpdatePromptContext
253
- >;
254
-
255
- /* Auth mutations */
256
- export type VerifyEmailOptions = MutationOptions<types.VerifyEmailResponse, types.TVerifyEmail>;
257
- export type ResendVerifcationOptions = MutationOptions<
258
- types.VerifyEmailResponse,
259
- types.TResendVerificationEmail
260
- >;
261
- export type RegistrationOptions = MutationOptions<
262
- types.TRegisterUserResponse,
263
- types.TRegisterUser,
264
- unknown,
265
- types.TError
266
- >;
267
-
268
- export type UpdatePermVars<T> = {
269
- roleName: string;
270
- updates: Partial<T>;
271
- };
272
-
273
- export type UpdatePromptPermVars = UpdatePermVars<p.TPromptPermissions>;
274
- export type UpdateMemoryPermVars = UpdatePermVars<p.TMemoryPermissions>;
275
- export type UpdateAgentPermVars = UpdatePermVars<p.TAgentPermissions>;
276
- export type UpdatePeoplePickerPermVars = UpdatePermVars<p.TPeoplePickerPermissions>;
277
- export type UpdateMCPServersPermVars = UpdatePermVars<p.TMcpServersPermissions>;
278
-
279
- export type UpdatePermResponse = r.TRole;
280
-
281
- export type UpdatePromptPermOptions = MutationOptions<
282
- UpdatePermResponse,
283
- UpdatePromptPermVars,
284
- unknown,
285
- types.TError | null | undefined
286
- >;
287
-
288
- export type UpdateMemoryPermOptions = MutationOptions<
289
- UpdatePermResponse,
290
- UpdateMemoryPermVars,
291
- unknown,
292
- types.TError | null | undefined
293
- >;
294
-
295
- export type UpdateAgentPermOptions = MutationOptions<
296
- UpdatePermResponse,
297
- UpdateAgentPermVars,
298
- unknown,
299
- types.TError | null | undefined
300
- >;
301
-
302
- export type UpdatePeoplePickerPermOptions = MutationOptions<
303
- UpdatePermResponse,
304
- UpdatePeoplePickerPermVars,
305
- unknown,
306
- types.TError | null | undefined
307
- >;
308
-
309
- export type UpdateMCPServersPermOptions = MutationOptions<
310
- UpdatePermResponse,
311
- UpdateMCPServersPermVars,
312
- unknown,
313
- types.TError | null | undefined
314
- >;
315
-
316
- export type UpdateRemoteAgentsPermVars = UpdatePermVars<p.TRemoteAgentsPermissions>;
317
-
318
- export type UpdateRemoteAgentsPermOptions = MutationOptions<
319
- UpdatePermResponse,
320
- UpdateRemoteAgentsPermVars,
321
- unknown,
322
- types.TError | null | undefined
323
- >;
324
-
325
- export type UpdateMarketplacePermVars = UpdatePermVars<p.TMarketplacePermissions>;
326
-
327
- export type UpdateMarketplacePermOptions = MutationOptions<
328
- UpdatePermResponse,
329
- UpdateMarketplacePermVars,
330
- unknown,
331
- types.TError | null | undefined
332
- >;
333
-
334
- export type UpdateConversationTagOptions = MutationOptions<
335
- types.TConversationTag,
336
- types.TConversationTagRequest
337
- >;
338
- export type DeleteConversationTagOptions = MutationOptions<types.TConversationTag, string>;
339
-
340
- export type AcceptTermsMutationOptions = MutationOptions<
341
- types.TAcceptTermsResponse,
342
- void,
343
- unknown,
344
- void
345
- >;
346
-
347
- /* Tools */
348
- export type UpdatePluginAuthOptions = MutationOptions<types.TUser, types.TUpdateUserPlugins>;
349
-
350
- export type ToolParamsMap = {
351
- [Tools.execute_code]: {
352
- lang: string;
353
- code: string;
354
- };
355
- };
356
-
357
- export type ToolId = keyof ToolParamsMap;
358
-
359
- export type ToolParams<T extends ToolId> = ToolParamsMap[T] & {
360
- messageId: string;
361
- partIndex?: number;
362
- blockIndex?: number;
363
- conversationId: string;
364
- };
365
- export type ToolCallResponse = { result: unknown; attachments?: types.TAttachment[] };
366
- export type ToolCallMutationOptions<T extends ToolId> = MutationOptions<
367
- ToolCallResponse,
368
- ToolParams<T>
369
- >;
370
-
371
- export type TDeleteSharedLinkResponse = {
372
- success: boolean;
373
- shareId: string;
374
- message: string;
375
- };
376
-
377
- export type TEditArtifactRequest = {
378
- index: number;
379
- messageId: string;
380
- original: string;
381
- updated: string;
382
- };
383
-
384
- export type TEditArtifactResponse = Pick<types.TMessage, 'content' | 'text' | 'conversationId'>;
385
-
386
- export type EditArtifactOptions = MutationOptions<
387
- TEditArtifactResponse,
388
- TEditArtifactRequest,
389
- unknown,
390
- Error
391
- >;
392
-
393
- export type TBranchMessageRequest = {
394
- messageId: string;
395
- agentId: string;
396
- };
397
-
398
- export type TBranchMessageResponse = types.TMessage;
399
-
400
- export type BranchMessageOptions = MutationOptions<
401
- TBranchMessageResponse,
402
- TBranchMessageRequest,
403
- unknown,
404
- Error
405
- >;
406
-
407
- export type TLogoutResponse = {
408
- message: string;
409
- redirect?: string;
410
- };
411
-
412
- export type LogoutOptions = MutationOptions<TLogoutResponse, undefined>;
413
-
414
- export interface AssistantInitialize {
415
- message: string;
416
- error?: string;
417
- }
418
-
419
- export interface CancelMCPOAuthResponse {
420
- success: boolean;
421
- message: string;
422
- }
@@ -1,208 +0,0 @@
1
- import type { InfiniteData } from '@tanstack/react-query';
2
- import type * as p from '../accessPermissions';
3
- import type * as a from '../types/agents';
4
- import type * as s from '../schemas';
5
- import type * as t from '../types';
6
-
7
- export type Conversation = {
8
- id: string;
9
- createdAt: number;
10
- participants: string[];
11
- lastMessage: string;
12
- conversations: s.TConversation[];
13
- };
14
-
15
- export type ConversationListParams = {
16
- cursor?: string;
17
- isArchived?: boolean;
18
- sortBy?: 'title' | 'createdAt' | 'updatedAt';
19
- sortDirection?: 'asc' | 'desc';
20
- tags?: string[];
21
- search?: string;
22
- };
23
-
24
- export type MinimalConversation = Pick<
25
- s.TConversation,
26
- 'conversationId' | 'endpoint' | 'title' | 'createdAt' | 'updatedAt' | 'user'
27
- >;
28
-
29
- export type ConversationListResponse = {
30
- conversations: MinimalConversation[];
31
- nextCursor: string | null;
32
- };
33
-
34
- export type ConversationData = InfiniteData<ConversationListResponse>;
35
- export type ConversationUpdater = (
36
- data: ConversationData,
37
- conversation: s.TConversation,
38
- ) => ConversationData;
39
-
40
- /* Messages */
41
- export type MessagesListParams = {
42
- cursor?: string | null;
43
- sortBy?: 'endpoint' | 'createdAt' | 'updatedAt';
44
- sortDirection?: 'asc' | 'desc';
45
- pageSize?: number;
46
- conversationId?: string;
47
- messageId?: string;
48
- search?: string;
49
- };
50
-
51
- export type MessagesListResponse = {
52
- messages: s.TMessage[];
53
- nextCursor: string | null;
54
- };
55
-
56
- /* Shared Links */
57
- export type SharedMessagesResponse = Omit<s.TSharedLink, 'messages'> & {
58
- messages: s.TMessage[];
59
- };
60
-
61
- export interface SharedLinksListParams {
62
- pageSize: number;
63
- isPublic: boolean;
64
- sortBy: 'title' | 'createdAt';
65
- sortDirection: 'asc' | 'desc';
66
- search?: string;
67
- cursor?: string;
68
- }
69
-
70
- export type SharedLinkItem = {
71
- shareId: string;
72
- title: string;
73
- isPublic: boolean;
74
- createdAt: Date;
75
- conversationId: string;
76
- };
77
-
78
- export interface SharedLinksResponse {
79
- links: SharedLinkItem[];
80
- nextCursor: string | null;
81
- hasNextPage: boolean;
82
- }
83
-
84
- export interface SharedLinkQueryData {
85
- pages: SharedLinksResponse[];
86
- pageParams: (string | null)[];
87
- }
88
-
89
- export type AllPromptGroupsFilterRequest = {
90
- category: string;
91
- pageNumber: string;
92
- pageSize: string | number;
93
- before?: string | null;
94
- after?: string | null;
95
- order?: 'asc' | 'desc';
96
- name?: string;
97
- author?: string;
98
- };
99
-
100
- export type AllPromptGroupsResponse = t.TPromptGroup[];
101
-
102
- export type ConversationTagsResponse = s.TConversationTag[];
103
-
104
- /* MCP Types */
105
- export type MCPTool = {
106
- name: string;
107
- pluginKey: string;
108
- description: string;
109
- };
110
-
111
- export type MCPServer = {
112
- name: string;
113
- icon: string;
114
- authenticated: boolean;
115
- authConfig: s.TPluginAuthConfig[];
116
- tools: MCPTool[];
117
- };
118
-
119
- export type MCPServersResponse = {
120
- servers: Record<string, MCPServer>;
121
- };
122
-
123
- export type VerifyToolAuthParams = { toolId: string };
124
- export type VerifyToolAuthResponse = {
125
- authenticated: boolean;
126
- message?: string | s.AuthType;
127
- authTypes?: [string, s.AuthType][];
128
- };
129
-
130
- export type GetToolCallParams = { conversationId: string };
131
- export type ToolCallResults = a.ToolCallResult[];
132
-
133
- /* Memories */
134
- export type TUserMemory = {
135
- key: string;
136
- value: string;
137
- updated_at: string;
138
- tokenCount?: number;
139
- };
140
-
141
- export type MemoriesResponse = {
142
- memories: TUserMemory[];
143
- totalTokens: number;
144
- tokenLimit: number | null;
145
- usagePercentage: number | null;
146
- };
147
-
148
- export type PrincipalSearchParams = {
149
- q: string;
150
- limit?: number;
151
- types?: Array<p.PrincipalType.USER | p.PrincipalType.GROUP | p.PrincipalType.ROLE>;
152
- };
153
-
154
- export type PrincipalSearchResponse = {
155
- query: string;
156
- limit: number;
157
- types?: Array<p.PrincipalType.USER | p.PrincipalType.GROUP | p.PrincipalType.ROLE>;
158
- results: p.TPrincipalSearchResult[];
159
- count: number;
160
- sources: {
161
- local: number;
162
- entra: number;
163
- };
164
- };
165
-
166
- export type AccessRole = {
167
- accessRoleId: p.AccessRoleIds;
168
- name: string;
169
- description: string;
170
- permBits: number;
171
- };
172
-
173
- export type AccessRolesResponse = AccessRole[];
174
-
175
- export interface MCPServerStatus {
176
- requiresOAuth: boolean;
177
- connectionState: 'disconnected' | 'connecting' | 'connected' | 'error';
178
- }
179
-
180
- export interface MCPConnectionStatusResponse {
181
- success: boolean;
182
- connectionStatus: Record<string, MCPServerStatus>;
183
- }
184
-
185
- export interface MCPServerConnectionStatusResponse {
186
- success: boolean;
187
- serverName: string;
188
- requiresOAuth: boolean;
189
- connectionStatus: 'disconnected' | 'connecting' | 'connected' | 'error';
190
- }
191
-
192
- export interface MCPAuthValuesResponse {
193
- success: boolean;
194
- serverName: string;
195
- authValueFlags: Record<string, boolean>;
196
- }
197
-
198
- /* SharePoint Graph API Token */
199
- export type GraphTokenParams = {
200
- scopes: string;
201
- };
202
-
203
- export type GraphTokenResponse = {
204
- access_token: string;
205
- token_type: string;
206
- expires_in: number;
207
- scope: string;
208
- };
package/src/types/runs.ts DELETED
@@ -1,40 +0,0 @@
1
- export enum ContentTypes {
2
- TEXT = 'text',
3
- THINK = 'think',
4
- TEXT_DELTA = 'text_delta',
5
- TOOL_CALL = 'tool_call',
6
- IMAGE_FILE = 'image_file',
7
- IMAGE_URL = 'image_url',
8
- VIDEO_URL = 'video_url',
9
- INPUT_AUDIO = 'input_audio',
10
- AGENT_UPDATE = 'agent_update',
11
- SUMMARY = 'summary',
12
- ERROR = 'error',
13
- }
14
-
15
- export enum StepTypes {
16
- TOOL_CALLS = 'tool_calls',
17
- MESSAGE_CREATION = 'message_creation',
18
- }
19
-
20
- export enum ToolCallTypes {
21
- FUNCTION = 'function',
22
- RETRIEVAL = 'retrieval',
23
- FILE_SEARCH = 'file_search',
24
- CODE_INTERPRETER = 'code_interpreter',
25
- /* Agents Tool Call */
26
- TOOL_CALL = 'tool_call',
27
- }
28
-
29
- /** Event names dispatched by the agent graph and consumed by step handlers. */
30
- export enum StepEvents {
31
- ON_RUN_STEP = 'on_run_step',
32
- ON_AGENT_UPDATE = 'on_agent_update',
33
- ON_MESSAGE_DELTA = 'on_message_delta',
34
- ON_REASONING_DELTA = 'on_reasoning_delta',
35
- ON_RUN_STEP_DELTA = 'on_run_step_delta',
36
- ON_RUN_STEP_COMPLETED = 'on_run_step_completed',
37
- ON_SUMMARIZE_START = 'on_summarize_start',
38
- ON_SUMMARIZE_DELTA = 'on_summarize_delta',
39
- ON_SUMMARIZE_COMPLETE = 'on_summarize_complete',
40
- }