UNPKG

@salesforce/agents

Version:

Client side APIs for working with Salesforce agents

101 lines (100 loc) 2.85 kB
export type McpServerType = 'EXTERNAL'; export type McpAuthType = 'OAUTH' | 'NO_AUTH'; export type McpAssetKind = 'MCP_TOOL' | 'MCP_PROMPT' | 'MCP_RESOURCE'; export type McpServerAuthorizationOutput = { authType: McpAuthType; identityProvider?: string; scope?: string; }; export type McpServerAuthorizationInput = { authType: McpAuthType; identityProvider?: string; clientId?: string; clientSecret?: string; scope?: string; }; export type McpServerOutput = { id: string; name: string; label?: string; description?: string; type: McpServerType; status: string; serverUrl?: string; authorization?: McpServerAuthorizationOutput; createdById?: string; createdDate?: string; lastModifiedById?: string; lastModifiedDate?: string; }; export type McpServerCollection = { mcpServers: McpServerOutput[]; }; export type McpServerCreateInput = { name: string; label?: string; description?: string; type: McpServerType; serverUrl: string; authorization?: McpServerAuthorizationInput; }; export type McpServerUpdateInput = { label?: string; description?: string; serverUrl?: string; authorization?: McpServerAuthorizationInput; }; export type McpFetchedAsset = { id?: string; name: string; label?: string; description?: string; kind: McpAssetKind; active?: boolean; availableAsAgentAction?: boolean; status?: string; }; export type McpServerCreateOutput = { server: McpServerOutput; assets: McpFetchedAsset[]; }; export type McpServerFetchOutput = { assets: McpFetchedAsset[]; }; export type McpServerAssetOutput = { id: string; name: string; label?: string; description?: string; kind: McpAssetKind; active: boolean; availableAsAgentAction?: boolean; }; export type McpServerAssetCollection = { assets: McpServerAssetOutput[]; }; export type McpServerAssetReplaceItem = { id?: string; name?: string; label?: string; description?: string; active?: boolean; kind?: McpAssetKind; }; export type McpServerAssetReplaceInput = { assets: McpServerAssetReplaceItem[]; }; /** * MCP connection status values the server may return on a server record. * NOTE: only `ACTIVE` and `DISCONNECTED` are accepted by the `status` query * filter on `listMcpServers`; the others can appear on output but are rejected * (HTTP 400) if used as a filter value. */ export type McpConnectionStatus = 'ACTIVE' | 'INCOMPLETE' | 'INVALID' | 'INACTIVE' | 'NOT_APPLICABLE' | 'CUSTOM' | 'DISCONNECTED'; /** Status values accepted by the `listMcpServers` `status` query filter. */ export type McpServerStatusFilter = 'ACTIVE' | 'DISCONNECTED'; export type ListMcpServersOptions = { label?: string; type?: McpServerType; status?: McpServerStatusFilter; };