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.
- package/dist/index.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/react-query/index.es.js +1 -1
- package/dist/react-query/index.es.js.map +1 -1
- package/dist/types/accessPermissions.d.ts +744 -0
- package/dist/types/actions.d.ts +118 -0
- package/dist/types/api-endpoints.d.ts +150 -0
- package/dist/types/artifacts.d.ts +97 -0
- package/dist/types/azure.d.ts +22 -0
- package/dist/types/bedrock.d.ts +1220 -0
- package/dist/types/config.d.ts +14849 -0
- package/dist/types/config.spec.d.ts +1 -0
- package/dist/types/createPayload.d.ts +5 -0
- package/dist/types/data-service.d.ts +287 -0
- package/dist/types/feedback.d.ts +36 -0
- package/dist/types/file-config.d.ts +263 -0
- package/dist/types/file-config.spec.d.ts +1 -0
- package/dist/types/generate.d.ts +597 -0
- package/dist/types/headers-helpers.d.ts +2 -0
- package/{src/index.ts → dist/types/index.d.ts} +0 -15
- package/dist/types/keys.d.ts +92 -0
- package/dist/types/mcp.d.ts +2760 -0
- package/dist/types/messages.d.ts +10 -0
- package/dist/types/models.d.ts +1547 -0
- package/dist/types/parameterSettings.d.ts +69 -0
- package/dist/types/parsers.d.ts +110 -0
- package/dist/types/permissions.d.ts +522 -0
- package/dist/types/react-query/react-query-service.d.ts +85 -0
- package/dist/types/request.d.ts +25 -0
- package/dist/types/roles.d.ts +554 -0
- package/dist/types/roles.spec.d.ts +1 -0
- package/dist/types/schemas.d.ts +5110 -0
- package/dist/types/schemas.spec.d.ts +1 -0
- package/dist/types/types/agents.d.ts +433 -0
- package/dist/types/types/assistants.d.ts +547 -0
- package/dist/types/types/files.d.ts +172 -0
- package/dist/types/types/graph.d.ts +135 -0
- package/{src/types/mcpServers.ts → dist/types/types/mcpServers.d.ts} +12 -18
- package/dist/types/types/mutations.d.ts +209 -0
- package/dist/types/types/queries.d.ts +169 -0
- package/dist/types/types/runs.d.ts +36 -0
- package/dist/types/types/web.d.ts +520 -0
- package/dist/types/types.d.ts +503 -0
- package/dist/types/utils.d.ts +12 -0
- package/package.json +5 -1
- package/babel.config.js +0 -4
- package/check_updates.sh +0 -52
- package/jest.config.js +0 -19
- package/react-query/package-lock.json +0 -292
- package/react-query/package.json +0 -10
- package/rollup.config.js +0 -74
- package/server-rollup.config.js +0 -40
- package/specs/actions.spec.ts +0 -2533
- package/specs/api-endpoints-subdir.spec.ts +0 -140
- package/specs/api-endpoints.spec.ts +0 -74
- package/specs/azure.spec.ts +0 -844
- package/specs/bedrock.spec.ts +0 -862
- package/specs/filetypes.spec.ts +0 -175
- package/specs/generate.spec.ts +0 -770
- package/specs/headers-helpers.spec.ts +0 -24
- package/specs/mcp.spec.ts +0 -147
- package/specs/openapiSpecs.ts +0 -524
- package/specs/parsers.spec.ts +0 -601
- package/specs/request-interceptor.spec.ts +0 -304
- package/specs/utils.spec.ts +0 -196
- package/src/accessPermissions.ts +0 -346
- package/src/actions.ts +0 -813
- package/src/api-endpoints.ts +0 -440
- package/src/artifacts.ts +0 -3104
- package/src/azure.ts +0 -328
- package/src/bedrock.ts +0 -425
- package/src/config.spec.ts +0 -315
- package/src/config.ts +0 -2006
- package/src/createPayload.ts +0 -46
- package/src/data-service.ts +0 -1087
- package/src/feedback.ts +0 -141
- package/src/file-config.spec.ts +0 -1248
- package/src/file-config.ts +0 -764
- package/src/generate.ts +0 -634
- package/src/headers-helpers.ts +0 -13
- package/src/keys.ts +0 -99
- package/src/mcp.ts +0 -271
- package/src/messages.ts +0 -50
- package/src/models.ts +0 -69
- package/src/parameterSettings.ts +0 -1111
- package/src/parsers.ts +0 -563
- package/src/permissions.ts +0 -188
- package/src/react-query/react-query-service.ts +0 -566
- package/src/request.ts +0 -171
- package/src/roles.spec.ts +0 -132
- package/src/roles.ts +0 -225
- package/src/schemas.spec.ts +0 -355
- package/src/schemas.ts +0 -1234
- package/src/types/agents.ts +0 -470
- package/src/types/assistants.ts +0 -654
- package/src/types/files.ts +0 -191
- package/src/types/graph.ts +0 -145
- package/src/types/mutations.ts +0 -422
- package/src/types/queries.ts +0 -208
- package/src/types/runs.ts +0 -40
- package/src/types/web.ts +0 -588
- package/src/types.ts +0 -676
- package/src/utils.ts +0 -85
- package/tsconfig.json +0 -28
- package/tsconfig.spec.json +0 -10
- /package/{src/react-query/index.ts → dist/types/react-query/index.d.ts} +0 -0
- /package/{src/types/index.ts → dist/types/types/index.d.ts} +0 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Microsoft Graph API type definitions
|
|
3
|
+
* Based on Microsoft Graph REST API v1.0 documentation
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Person type information from Microsoft Graph People API
|
|
7
|
+
*/
|
|
8
|
+
export interface TGraphPersonType {
|
|
9
|
+
/** Classification of the entity: "Person" or "Group" */
|
|
10
|
+
class: 'Person' | 'Group';
|
|
11
|
+
/** Specific subtype: e.g., "OrganizationUser", "UnifiedGroup" */
|
|
12
|
+
subclass: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Scored email address from Microsoft Graph People API
|
|
16
|
+
*/
|
|
17
|
+
export interface TGraphScoredEmailAddress {
|
|
18
|
+
/** Email address */
|
|
19
|
+
address: string;
|
|
20
|
+
/** Relevance score (0.0 to 1.0) */
|
|
21
|
+
relevanceScore: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Phone number from Microsoft Graph API
|
|
25
|
+
*/
|
|
26
|
+
export interface TGraphPhone {
|
|
27
|
+
/** Type of phone number */
|
|
28
|
+
type: string;
|
|
29
|
+
/** Phone number */
|
|
30
|
+
number: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Person/Contact result from Microsoft Graph /me/people endpoint
|
|
34
|
+
*/
|
|
35
|
+
export interface TGraphPerson {
|
|
36
|
+
/** Unique identifier */
|
|
37
|
+
id: string;
|
|
38
|
+
/** Display name */
|
|
39
|
+
displayName: string;
|
|
40
|
+
/** Given name (first name) */
|
|
41
|
+
givenName?: string;
|
|
42
|
+
/** Surname (last name) */
|
|
43
|
+
surname?: string;
|
|
44
|
+
/** User principal name */
|
|
45
|
+
userPrincipalName?: string;
|
|
46
|
+
/** Job title */
|
|
47
|
+
jobTitle?: string;
|
|
48
|
+
/** Department */
|
|
49
|
+
department?: string;
|
|
50
|
+
/** Company name */
|
|
51
|
+
companyName?: string;
|
|
52
|
+
/** Primary email address */
|
|
53
|
+
mail?: string;
|
|
54
|
+
/** Scored email addresses with relevance */
|
|
55
|
+
scoredEmailAddresses?: TGraphScoredEmailAddress[];
|
|
56
|
+
/** Person type classification */
|
|
57
|
+
personType?: TGraphPersonType;
|
|
58
|
+
/** Phone numbers */
|
|
59
|
+
phones?: TGraphPhone[];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* User result from Microsoft Graph /users endpoint
|
|
63
|
+
*/
|
|
64
|
+
export interface TGraphUser {
|
|
65
|
+
/** Unique identifier */
|
|
66
|
+
id: string;
|
|
67
|
+
/** Display name */
|
|
68
|
+
displayName: string;
|
|
69
|
+
/** Given name (first name) */
|
|
70
|
+
givenName?: string;
|
|
71
|
+
/** Surname (last name) */
|
|
72
|
+
surname?: string;
|
|
73
|
+
/** User principal name */
|
|
74
|
+
userPrincipalName: string;
|
|
75
|
+
/** Primary email address */
|
|
76
|
+
mail?: string;
|
|
77
|
+
/** Job title */
|
|
78
|
+
jobTitle?: string;
|
|
79
|
+
/** Department */
|
|
80
|
+
department?: string;
|
|
81
|
+
/** Office location */
|
|
82
|
+
officeLocation?: string;
|
|
83
|
+
/** Business phone numbers */
|
|
84
|
+
businessPhones?: string[];
|
|
85
|
+
/** Mobile phone number */
|
|
86
|
+
mobilePhone?: string;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Group result from Microsoft Graph /groups endpoint
|
|
90
|
+
*/
|
|
91
|
+
export interface TGraphGroup {
|
|
92
|
+
/** Unique identifier */
|
|
93
|
+
id: string;
|
|
94
|
+
/** Display name */
|
|
95
|
+
displayName: string;
|
|
96
|
+
/** Group email address */
|
|
97
|
+
mail?: string;
|
|
98
|
+
/** Mail nickname */
|
|
99
|
+
mailNickname?: string;
|
|
100
|
+
/** Group description */
|
|
101
|
+
description?: string;
|
|
102
|
+
/** Group types (e.g., ["Unified"] for Microsoft 365 groups) */
|
|
103
|
+
groupTypes?: string[];
|
|
104
|
+
/** Whether group is mail-enabled */
|
|
105
|
+
mailEnabled?: boolean;
|
|
106
|
+
/** Whether group is security-enabled */
|
|
107
|
+
securityEnabled?: boolean;
|
|
108
|
+
/** Resource provisioning options */
|
|
109
|
+
resourceProvisioningOptions?: string[];
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Response wrapper for Microsoft Graph API list endpoints
|
|
113
|
+
*/
|
|
114
|
+
export interface TGraphListResponse<T> {
|
|
115
|
+
/** Array of results */
|
|
116
|
+
value: T[];
|
|
117
|
+
/** OData context */
|
|
118
|
+
'@odata.context'?: string;
|
|
119
|
+
/** Next page link */
|
|
120
|
+
'@odata.nextLink'?: string;
|
|
121
|
+
/** Count of results (if requested) */
|
|
122
|
+
'@odata.count'?: number;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Response from /me/people endpoint
|
|
126
|
+
*/
|
|
127
|
+
export type TGraphPeopleResponse = TGraphListResponse<TGraphPerson>;
|
|
128
|
+
/**
|
|
129
|
+
* Response from /users endpoint
|
|
130
|
+
*/
|
|
131
|
+
export type TGraphUsersResponse = TGraphListResponse<TGraphUser>;
|
|
132
|
+
/**
|
|
133
|
+
* Response from /groups endpoint
|
|
134
|
+
*/
|
|
135
|
+
export type TGraphGroupsResponse = TGraphListResponse<TGraphGroup>;
|
|
@@ -1,49 +1,43 @@
|
|
|
1
1
|
import type { MCPOptions, MCPServerUserInput } from '../mcp';
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* Base MCP Server interface
|
|
5
4
|
* Core structure shared between API and database layers
|
|
6
5
|
*/
|
|
7
6
|
export interface IMCPServerDB {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
_id?: string;
|
|
8
|
+
serverName: string;
|
|
9
|
+
config: MCPOptions;
|
|
10
|
+
author?: string | null;
|
|
11
|
+
createdAt?: Date;
|
|
12
|
+
updatedAt?: Date;
|
|
14
13
|
}
|
|
15
|
-
|
|
16
14
|
/**
|
|
17
15
|
* User-managed MCP Server (standalone, not attached to agent)
|
|
18
16
|
* API type for frontend/backend communication
|
|
19
17
|
* Similar to Agent type - includes populated author fields
|
|
20
18
|
*/
|
|
21
19
|
export type MCPServerDB = IMCPServerDB;
|
|
22
|
-
|
|
23
20
|
/**
|
|
24
21
|
* Parameters for creating a new user-managed MCP server
|
|
25
22
|
* Note: Only UI-editable fields are allowed (excludes server-managed fields)
|
|
26
23
|
*/
|
|
27
24
|
export type MCPServerCreateParams = {
|
|
28
|
-
|
|
25
|
+
config: MCPServerUserInput;
|
|
29
26
|
};
|
|
30
|
-
|
|
31
27
|
/**
|
|
32
28
|
* Parameters for updating an existing user-managed MCP server
|
|
33
29
|
* Note: Only UI-editable fields are allowed (excludes server-managed fields)
|
|
34
30
|
*/
|
|
35
31
|
export type MCPServerUpdateParams = {
|
|
36
|
-
|
|
32
|
+
config?: MCPServerUserInput;
|
|
37
33
|
};
|
|
38
|
-
|
|
39
34
|
/**
|
|
40
35
|
* Response for MCP server list endpoint
|
|
41
36
|
*/
|
|
42
37
|
export type MCPServerDBObjectResponse = {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
38
|
+
dbId?: string;
|
|
39
|
+
serverName: string;
|
|
40
|
+
/** True if access is only via agent (not directly shared with user) */
|
|
41
|
+
consumeOnly?: boolean;
|
|
47
42
|
} & MCPOptions;
|
|
48
|
-
|
|
49
43
|
export type MCPServersListResponse = Record<string, MCPServerDBObjectResponse>;
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import * as types from '../types';
|
|
2
|
+
import * as r from '../roles';
|
|
3
|
+
import * as p from '../permissions';
|
|
4
|
+
import { Tools, Assistant, AssistantCreateParams, AssistantUpdateParams, FunctionTool, AssistantDocument, Agent, AgentCreateParams, AgentUpdateParams } from './assistants';
|
|
5
|
+
import { Action, ActionMetadata } from './agents';
|
|
6
|
+
export type MutationOptions<Response, Request, Context = unknown, Error = unknown, Snapshot = void> = {
|
|
7
|
+
onSuccess?: (data: Response, variables: Request, context?: Context) => void;
|
|
8
|
+
onMutate?: (variables: Request) => Snapshot | Promise<Snapshot>;
|
|
9
|
+
onError?: (error: Error, variables: Request, context?: Context, snapshot?: Snapshot) => void;
|
|
10
|
+
onSettled?: (data: Response | undefined, error: Error | null, variables: Request, context?: Context) => void;
|
|
11
|
+
};
|
|
12
|
+
export type TGenTitleRequest = {
|
|
13
|
+
conversationId: string;
|
|
14
|
+
};
|
|
15
|
+
export type TGenTitleResponse = {
|
|
16
|
+
title: string;
|
|
17
|
+
};
|
|
18
|
+
export type PresetDeleteResponse = {
|
|
19
|
+
acknowledged: boolean;
|
|
20
|
+
deletedCount: number;
|
|
21
|
+
};
|
|
22
|
+
export type UpdatePresetOptions = MutationOptions<types.TPreset, types.TPreset>;
|
|
23
|
+
export type DeletePresetOptions = MutationOptions<PresetDeleteResponse, types.TPreset | undefined>;
|
|
24
|
+
export type AssistantAvatarVariables = {
|
|
25
|
+
assistant_id: string;
|
|
26
|
+
model: string;
|
|
27
|
+
formData: FormData;
|
|
28
|
+
postCreation?: boolean;
|
|
29
|
+
endpoint: types.AssistantsEndpoint;
|
|
30
|
+
version: number | string;
|
|
31
|
+
};
|
|
32
|
+
export type UpdateActionVariables = {
|
|
33
|
+
assistant_id: string;
|
|
34
|
+
functions: FunctionTool[];
|
|
35
|
+
metadata: ActionMetadata;
|
|
36
|
+
action_id?: string;
|
|
37
|
+
model: string;
|
|
38
|
+
endpoint: types.AssistantsEndpoint;
|
|
39
|
+
version: number | string;
|
|
40
|
+
};
|
|
41
|
+
export type UploadAssistantAvatarOptions = MutationOptions<Assistant, AssistantAvatarVariables>;
|
|
42
|
+
export type CreateAssistantMutationOptions = MutationOptions<Assistant, AssistantCreateParams>;
|
|
43
|
+
export type UpdateAssistantVariables = {
|
|
44
|
+
assistant_id: string;
|
|
45
|
+
data: AssistantUpdateParams;
|
|
46
|
+
};
|
|
47
|
+
export type UpdateAssistantMutationOptions = MutationOptions<Assistant, UpdateAssistantVariables>;
|
|
48
|
+
export type DeleteAssistantBody = {
|
|
49
|
+
assistant_id: string;
|
|
50
|
+
model: string;
|
|
51
|
+
endpoint: types.AssistantsEndpoint;
|
|
52
|
+
};
|
|
53
|
+
export type DeleteAssistantMutationOptions = MutationOptions<void, Pick<DeleteAssistantBody, 'assistant_id'>>;
|
|
54
|
+
export type UpdateActionResponse = [AssistantDocument, Assistant, Action];
|
|
55
|
+
export type UpdateActionOptions = MutationOptions<UpdateActionResponse, UpdateActionVariables>;
|
|
56
|
+
export type DeleteActionVariables = {
|
|
57
|
+
endpoint: types.AssistantsEndpoint;
|
|
58
|
+
assistant_id: string;
|
|
59
|
+
action_id: string;
|
|
60
|
+
model: string;
|
|
61
|
+
};
|
|
62
|
+
export type DeleteActionOptions = MutationOptions<void, DeleteActionVariables>;
|
|
63
|
+
export type AgentAvatarVariables = {
|
|
64
|
+
agent_id: string;
|
|
65
|
+
formData: FormData;
|
|
66
|
+
};
|
|
67
|
+
export type UpdateAgentActionVariables = {
|
|
68
|
+
agent_id: string;
|
|
69
|
+
action_id?: string;
|
|
70
|
+
metadata: ActionMetadata;
|
|
71
|
+
functions: FunctionTool[];
|
|
72
|
+
};
|
|
73
|
+
export type UploadAgentAvatarOptions = MutationOptions<Agent, AgentAvatarVariables>;
|
|
74
|
+
export type CreateAgentMutationOptions = MutationOptions<Agent, AgentCreateParams>;
|
|
75
|
+
export type UpdateAgentVariables = {
|
|
76
|
+
agent_id: string;
|
|
77
|
+
data: AgentUpdateParams;
|
|
78
|
+
};
|
|
79
|
+
export type DuplicateVersionError = Error & {
|
|
80
|
+
statusCode?: number;
|
|
81
|
+
details?: {
|
|
82
|
+
duplicateVersion?: unknown;
|
|
83
|
+
versionIndex?: number;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
export type UpdateAgentMutationOptions = MutationOptions<Agent, UpdateAgentVariables>;
|
|
87
|
+
export type DuplicateAgentBody = {
|
|
88
|
+
agent_id: string;
|
|
89
|
+
};
|
|
90
|
+
export type DuplicateAgentMutationOptions = MutationOptions<{
|
|
91
|
+
agent: Agent;
|
|
92
|
+
actions: Action[];
|
|
93
|
+
}, Pick<DuplicateAgentBody, 'agent_id'>>;
|
|
94
|
+
export type DeleteAgentBody = {
|
|
95
|
+
agent_id: string;
|
|
96
|
+
};
|
|
97
|
+
export type DeleteAgentMutationOptions = MutationOptions<void, Pick<DeleteAgentBody, 'agent_id'>>;
|
|
98
|
+
export type UpdateAgentActionResponse = [Agent, Action];
|
|
99
|
+
export type UpdateAgentActionOptions = MutationOptions<UpdateAgentActionResponse, UpdateAgentActionVariables>;
|
|
100
|
+
export type DeleteAgentActionVariables = {
|
|
101
|
+
agent_id: string;
|
|
102
|
+
action_id: string;
|
|
103
|
+
};
|
|
104
|
+
export type DeleteAgentActionOptions = MutationOptions<void, DeleteAgentActionVariables>;
|
|
105
|
+
export type RevertAgentVersionVariables = {
|
|
106
|
+
agent_id: string;
|
|
107
|
+
version_index: number;
|
|
108
|
+
};
|
|
109
|
+
export type RevertAgentVersionOptions = MutationOptions<Agent, RevertAgentVersionVariables>;
|
|
110
|
+
export type DeleteConversationOptions = MutationOptions<types.TDeleteConversationResponse, types.TDeleteConversationRequest>;
|
|
111
|
+
export type ArchiveConversationOptions = MutationOptions<types.TArchiveConversationResponse, types.TArchiveConversationRequest>;
|
|
112
|
+
export type DuplicateConvoOptions = MutationOptions<types.TDuplicateConvoResponse, types.TDuplicateConvoRequest>;
|
|
113
|
+
export type ForkConvoOptions = MutationOptions<types.TForkConvoResponse, types.TForkConvoRequest>;
|
|
114
|
+
export type CreateSharedLinkOptions = MutationOptions<types.TSharedLink, Partial<types.TSharedLink>>;
|
|
115
|
+
export type updateTagsInConvoOptions = MutationOptions<types.TTagConversationResponse, types.TTagConversationRequest>;
|
|
116
|
+
export type UpdateSharedLinkOptions = MutationOptions<types.TSharedLink, Partial<types.TSharedLink>>;
|
|
117
|
+
export type ArchiveConvoOptions = MutationOptions<types.TArchiveConversationResponse, types.TArchiveConversationRequest>;
|
|
118
|
+
export type DeleteSharedLinkContext = {
|
|
119
|
+
previousQueries?: Map<string, TDeleteSharedLinkResponse>;
|
|
120
|
+
};
|
|
121
|
+
export type DeleteSharedLinkOptions = MutationOptions<TDeleteSharedLinkResponse, {
|
|
122
|
+
shareId: string;
|
|
123
|
+
}, DeleteSharedLinkContext>;
|
|
124
|
+
export type TUpdatePromptContext = {
|
|
125
|
+
group?: types.TPromptGroup;
|
|
126
|
+
previousListData?: types.PromptGroupListData;
|
|
127
|
+
} | undefined;
|
|
128
|
+
export type UpdatePromptGroupOptions = MutationOptions<types.TUpdatePromptGroupResponse, types.TUpdatePromptGroupVariables, TUpdatePromptContext>;
|
|
129
|
+
export type CreatePromptOptions = MutationOptions<types.TCreatePromptResponse, types.TCreatePrompt>;
|
|
130
|
+
export type DeletePromptOptions = MutationOptions<types.TDeletePromptResponse, types.TDeletePromptVariables>;
|
|
131
|
+
export type DeletePromptGroupOptions = MutationOptions<types.TDeletePromptGroupResponse, types.TDeletePromptGroupRequest>;
|
|
132
|
+
export type UpdatePromptLabelOptions = MutationOptions<types.TUpdatePromptLabelsResponse, types.TUpdatePromptLabelsRequest>;
|
|
133
|
+
export type MakePromptProductionOptions = MutationOptions<types.TMakePromptProductionResponse, types.TMakePromptProductionRequest, TUpdatePromptContext>;
|
|
134
|
+
export type VerifyEmailOptions = MutationOptions<types.VerifyEmailResponse, types.TVerifyEmail>;
|
|
135
|
+
export type ResendVerifcationOptions = MutationOptions<types.VerifyEmailResponse, types.TResendVerificationEmail>;
|
|
136
|
+
export type RegistrationOptions = MutationOptions<types.TRegisterUserResponse, types.TRegisterUser, unknown, types.TError>;
|
|
137
|
+
export type UpdatePermVars<T> = {
|
|
138
|
+
roleName: string;
|
|
139
|
+
updates: Partial<T>;
|
|
140
|
+
};
|
|
141
|
+
export type UpdatePromptPermVars = UpdatePermVars<p.TPromptPermissions>;
|
|
142
|
+
export type UpdateMemoryPermVars = UpdatePermVars<p.TMemoryPermissions>;
|
|
143
|
+
export type UpdateAgentPermVars = UpdatePermVars<p.TAgentPermissions>;
|
|
144
|
+
export type UpdatePeoplePickerPermVars = UpdatePermVars<p.TPeoplePickerPermissions>;
|
|
145
|
+
export type UpdateMCPServersPermVars = UpdatePermVars<p.TMcpServersPermissions>;
|
|
146
|
+
export type UpdatePermResponse = r.TRole;
|
|
147
|
+
export type UpdatePromptPermOptions = MutationOptions<UpdatePermResponse, UpdatePromptPermVars, unknown, types.TError | null | undefined>;
|
|
148
|
+
export type UpdateMemoryPermOptions = MutationOptions<UpdatePermResponse, UpdateMemoryPermVars, unknown, types.TError | null | undefined>;
|
|
149
|
+
export type UpdateAgentPermOptions = MutationOptions<UpdatePermResponse, UpdateAgentPermVars, unknown, types.TError | null | undefined>;
|
|
150
|
+
export type UpdatePeoplePickerPermOptions = MutationOptions<UpdatePermResponse, UpdatePeoplePickerPermVars, unknown, types.TError | null | undefined>;
|
|
151
|
+
export type UpdateMCPServersPermOptions = MutationOptions<UpdatePermResponse, UpdateMCPServersPermVars, unknown, types.TError | null | undefined>;
|
|
152
|
+
export type UpdateRemoteAgentsPermVars = UpdatePermVars<p.TRemoteAgentsPermissions>;
|
|
153
|
+
export type UpdateRemoteAgentsPermOptions = MutationOptions<UpdatePermResponse, UpdateRemoteAgentsPermVars, unknown, types.TError | null | undefined>;
|
|
154
|
+
export type UpdateMarketplacePermVars = UpdatePermVars<p.TMarketplacePermissions>;
|
|
155
|
+
export type UpdateMarketplacePermOptions = MutationOptions<UpdatePermResponse, UpdateMarketplacePermVars, unknown, types.TError | null | undefined>;
|
|
156
|
+
export type UpdateConversationTagOptions = MutationOptions<types.TConversationTag, types.TConversationTagRequest>;
|
|
157
|
+
export type DeleteConversationTagOptions = MutationOptions<types.TConversationTag, string>;
|
|
158
|
+
export type AcceptTermsMutationOptions = MutationOptions<types.TAcceptTermsResponse, void, unknown, void>;
|
|
159
|
+
export type UpdatePluginAuthOptions = MutationOptions<types.TUser, types.TUpdateUserPlugins>;
|
|
160
|
+
export type ToolParamsMap = {
|
|
161
|
+
[Tools.execute_code]: {
|
|
162
|
+
lang: string;
|
|
163
|
+
code: string;
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
export type ToolId = keyof ToolParamsMap;
|
|
167
|
+
export type ToolParams<T extends ToolId> = ToolParamsMap[T] & {
|
|
168
|
+
messageId: string;
|
|
169
|
+
partIndex?: number;
|
|
170
|
+
blockIndex?: number;
|
|
171
|
+
conversationId: string;
|
|
172
|
+
};
|
|
173
|
+
export type ToolCallResponse = {
|
|
174
|
+
result: unknown;
|
|
175
|
+
attachments?: types.TAttachment[];
|
|
176
|
+
};
|
|
177
|
+
export type ToolCallMutationOptions<T extends ToolId> = MutationOptions<ToolCallResponse, ToolParams<T>>;
|
|
178
|
+
export type TDeleteSharedLinkResponse = {
|
|
179
|
+
success: boolean;
|
|
180
|
+
shareId: string;
|
|
181
|
+
message: string;
|
|
182
|
+
};
|
|
183
|
+
export type TEditArtifactRequest = {
|
|
184
|
+
index: number;
|
|
185
|
+
messageId: string;
|
|
186
|
+
original: string;
|
|
187
|
+
updated: string;
|
|
188
|
+
};
|
|
189
|
+
export type TEditArtifactResponse = Pick<types.TMessage, 'content' | 'text' | 'conversationId'>;
|
|
190
|
+
export type EditArtifactOptions = MutationOptions<TEditArtifactResponse, TEditArtifactRequest, unknown, Error>;
|
|
191
|
+
export type TBranchMessageRequest = {
|
|
192
|
+
messageId: string;
|
|
193
|
+
agentId: string;
|
|
194
|
+
};
|
|
195
|
+
export type TBranchMessageResponse = types.TMessage;
|
|
196
|
+
export type BranchMessageOptions = MutationOptions<TBranchMessageResponse, TBranchMessageRequest, unknown, Error>;
|
|
197
|
+
export type TLogoutResponse = {
|
|
198
|
+
message: string;
|
|
199
|
+
redirect?: string;
|
|
200
|
+
};
|
|
201
|
+
export type LogoutOptions = MutationOptions<TLogoutResponse, undefined>;
|
|
202
|
+
export interface AssistantInitialize {
|
|
203
|
+
message: string;
|
|
204
|
+
error?: string;
|
|
205
|
+
}
|
|
206
|
+
export interface CancelMCPOAuthResponse {
|
|
207
|
+
success: boolean;
|
|
208
|
+
message: string;
|
|
209
|
+
}
|
|
@@ -0,0 +1,169 @@
|
|
|
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
|
+
export type Conversation = {
|
|
7
|
+
id: string;
|
|
8
|
+
createdAt: number;
|
|
9
|
+
participants: string[];
|
|
10
|
+
lastMessage: string;
|
|
11
|
+
conversations: s.TConversation[];
|
|
12
|
+
};
|
|
13
|
+
export type ConversationListParams = {
|
|
14
|
+
cursor?: string;
|
|
15
|
+
isArchived?: boolean;
|
|
16
|
+
sortBy?: 'title' | 'createdAt' | 'updatedAt';
|
|
17
|
+
sortDirection?: 'asc' | 'desc';
|
|
18
|
+
tags?: string[];
|
|
19
|
+
search?: string;
|
|
20
|
+
};
|
|
21
|
+
export type MinimalConversation = Pick<s.TConversation, 'conversationId' | 'endpoint' | 'title' | 'createdAt' | 'updatedAt' | 'user'>;
|
|
22
|
+
export type ConversationListResponse = {
|
|
23
|
+
conversations: MinimalConversation[];
|
|
24
|
+
nextCursor: string | null;
|
|
25
|
+
};
|
|
26
|
+
export type ConversationData = InfiniteData<ConversationListResponse>;
|
|
27
|
+
export type ConversationUpdater = (data: ConversationData, conversation: s.TConversation) => ConversationData;
|
|
28
|
+
export type MessagesListParams = {
|
|
29
|
+
cursor?: string | null;
|
|
30
|
+
sortBy?: 'endpoint' | 'createdAt' | 'updatedAt';
|
|
31
|
+
sortDirection?: 'asc' | 'desc';
|
|
32
|
+
pageSize?: number;
|
|
33
|
+
conversationId?: string;
|
|
34
|
+
messageId?: string;
|
|
35
|
+
search?: string;
|
|
36
|
+
};
|
|
37
|
+
export type MessagesListResponse = {
|
|
38
|
+
messages: s.TMessage[];
|
|
39
|
+
nextCursor: string | null;
|
|
40
|
+
};
|
|
41
|
+
export type SharedMessagesResponse = Omit<s.TSharedLink, 'messages'> & {
|
|
42
|
+
messages: s.TMessage[];
|
|
43
|
+
};
|
|
44
|
+
export interface SharedLinksListParams {
|
|
45
|
+
pageSize: number;
|
|
46
|
+
isPublic: boolean;
|
|
47
|
+
sortBy: 'title' | 'createdAt';
|
|
48
|
+
sortDirection: 'asc' | 'desc';
|
|
49
|
+
search?: string;
|
|
50
|
+
cursor?: string;
|
|
51
|
+
}
|
|
52
|
+
export type SharedLinkItem = {
|
|
53
|
+
shareId: string;
|
|
54
|
+
title: string;
|
|
55
|
+
isPublic: boolean;
|
|
56
|
+
createdAt: Date;
|
|
57
|
+
conversationId: string;
|
|
58
|
+
};
|
|
59
|
+
export interface SharedLinksResponse {
|
|
60
|
+
links: SharedLinkItem[];
|
|
61
|
+
nextCursor: string | null;
|
|
62
|
+
hasNextPage: boolean;
|
|
63
|
+
}
|
|
64
|
+
export interface SharedLinkQueryData {
|
|
65
|
+
pages: SharedLinksResponse[];
|
|
66
|
+
pageParams: (string | null)[];
|
|
67
|
+
}
|
|
68
|
+
export type AllPromptGroupsFilterRequest = {
|
|
69
|
+
category: string;
|
|
70
|
+
pageNumber: string;
|
|
71
|
+
pageSize: string | number;
|
|
72
|
+
before?: string | null;
|
|
73
|
+
after?: string | null;
|
|
74
|
+
order?: 'asc' | 'desc';
|
|
75
|
+
name?: string;
|
|
76
|
+
author?: string;
|
|
77
|
+
};
|
|
78
|
+
export type AllPromptGroupsResponse = t.TPromptGroup[];
|
|
79
|
+
export type ConversationTagsResponse = s.TConversationTag[];
|
|
80
|
+
export type MCPTool = {
|
|
81
|
+
name: string;
|
|
82
|
+
pluginKey: string;
|
|
83
|
+
description: string;
|
|
84
|
+
};
|
|
85
|
+
export type MCPServer = {
|
|
86
|
+
name: string;
|
|
87
|
+
icon: string;
|
|
88
|
+
authenticated: boolean;
|
|
89
|
+
authConfig: s.TPluginAuthConfig[];
|
|
90
|
+
tools: MCPTool[];
|
|
91
|
+
};
|
|
92
|
+
export type MCPServersResponse = {
|
|
93
|
+
servers: Record<string, MCPServer>;
|
|
94
|
+
};
|
|
95
|
+
export type VerifyToolAuthParams = {
|
|
96
|
+
toolId: string;
|
|
97
|
+
};
|
|
98
|
+
export type VerifyToolAuthResponse = {
|
|
99
|
+
authenticated: boolean;
|
|
100
|
+
message?: string | s.AuthType;
|
|
101
|
+
authTypes?: [string, s.AuthType][];
|
|
102
|
+
};
|
|
103
|
+
export type GetToolCallParams = {
|
|
104
|
+
conversationId: string;
|
|
105
|
+
};
|
|
106
|
+
export type ToolCallResults = a.ToolCallResult[];
|
|
107
|
+
export type TUserMemory = {
|
|
108
|
+
key: string;
|
|
109
|
+
value: string;
|
|
110
|
+
updated_at: string;
|
|
111
|
+
tokenCount?: number;
|
|
112
|
+
};
|
|
113
|
+
export type MemoriesResponse = {
|
|
114
|
+
memories: TUserMemory[];
|
|
115
|
+
totalTokens: number;
|
|
116
|
+
tokenLimit: number | null;
|
|
117
|
+
usagePercentage: number | null;
|
|
118
|
+
};
|
|
119
|
+
export type PrincipalSearchParams = {
|
|
120
|
+
q: string;
|
|
121
|
+
limit?: number;
|
|
122
|
+
types?: Array<p.PrincipalType.USER | p.PrincipalType.GROUP | p.PrincipalType.ROLE>;
|
|
123
|
+
};
|
|
124
|
+
export type PrincipalSearchResponse = {
|
|
125
|
+
query: string;
|
|
126
|
+
limit: number;
|
|
127
|
+
types?: Array<p.PrincipalType.USER | p.PrincipalType.GROUP | p.PrincipalType.ROLE>;
|
|
128
|
+
results: p.TPrincipalSearchResult[];
|
|
129
|
+
count: number;
|
|
130
|
+
sources: {
|
|
131
|
+
local: number;
|
|
132
|
+
entra: number;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
export type AccessRole = {
|
|
136
|
+
accessRoleId: p.AccessRoleIds;
|
|
137
|
+
name: string;
|
|
138
|
+
description: string;
|
|
139
|
+
permBits: number;
|
|
140
|
+
};
|
|
141
|
+
export type AccessRolesResponse = AccessRole[];
|
|
142
|
+
export interface MCPServerStatus {
|
|
143
|
+
requiresOAuth: boolean;
|
|
144
|
+
connectionState: 'disconnected' | 'connecting' | 'connected' | 'error';
|
|
145
|
+
}
|
|
146
|
+
export interface MCPConnectionStatusResponse {
|
|
147
|
+
success: boolean;
|
|
148
|
+
connectionStatus: Record<string, MCPServerStatus>;
|
|
149
|
+
}
|
|
150
|
+
export interface MCPServerConnectionStatusResponse {
|
|
151
|
+
success: boolean;
|
|
152
|
+
serverName: string;
|
|
153
|
+
requiresOAuth: boolean;
|
|
154
|
+
connectionStatus: 'disconnected' | 'connecting' | 'connected' | 'error';
|
|
155
|
+
}
|
|
156
|
+
export interface MCPAuthValuesResponse {
|
|
157
|
+
success: boolean;
|
|
158
|
+
serverName: string;
|
|
159
|
+
authValueFlags: Record<string, boolean>;
|
|
160
|
+
}
|
|
161
|
+
export type GraphTokenParams = {
|
|
162
|
+
scopes: string;
|
|
163
|
+
};
|
|
164
|
+
export type GraphTokenResponse = {
|
|
165
|
+
access_token: string;
|
|
166
|
+
token_type: string;
|
|
167
|
+
expires_in: number;
|
|
168
|
+
scope: string;
|
|
169
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare 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
|
+
export declare enum StepTypes {
|
|
15
|
+
TOOL_CALLS = "tool_calls",
|
|
16
|
+
MESSAGE_CREATION = "message_creation"
|
|
17
|
+
}
|
|
18
|
+
export declare enum ToolCallTypes {
|
|
19
|
+
FUNCTION = "function",
|
|
20
|
+
RETRIEVAL = "retrieval",
|
|
21
|
+
FILE_SEARCH = "file_search",
|
|
22
|
+
CODE_INTERPRETER = "code_interpreter",
|
|
23
|
+
TOOL_CALL = "tool_call"
|
|
24
|
+
}
|
|
25
|
+
/** Event names dispatched by the agent graph and consumed by step handlers. */
|
|
26
|
+
export declare enum StepEvents {
|
|
27
|
+
ON_RUN_STEP = "on_run_step",
|
|
28
|
+
ON_AGENT_UPDATE = "on_agent_update",
|
|
29
|
+
ON_MESSAGE_DELTA = "on_message_delta",
|
|
30
|
+
ON_REASONING_DELTA = "on_reasoning_delta",
|
|
31
|
+
ON_RUN_STEP_DELTA = "on_run_step_delta",
|
|
32
|
+
ON_RUN_STEP_COMPLETED = "on_run_step_completed",
|
|
33
|
+
ON_SUMMARIZE_START = "on_summarize_start",
|
|
34
|
+
ON_SUMMARIZE_DELTA = "on_summarize_delta",
|
|
35
|
+
ON_SUMMARIZE_COMPLETE = "on_summarize_complete"
|
|
36
|
+
}
|