UNPKG

@salesforce/agents

Version:

Client side APIs for working with Salesforce agents

29 lines (28 loc) 1.98 kB
import { Connection } from '@salesforce/core'; import { type ListMcpServersOptions, type McpServerCollection, type McpServerCreateInput, type McpServerCreateOutput, type McpServerOutput, type McpServerUpdateInput, type McpServerFetchOutput, type McpServerAssetCollection, type McpServerAssetReplaceInput } from './apiCatalogTypes.js'; /** * Thin client over the API Catalog Connect API. Every method is a one-to-one * wrapper around a Connect endpoint via `connection.request`, mirroring the * shape of `AgentDataLibrary` from `@salesforce/agents`. */ export declare class ApiCatalog { /** GET /api-catalog/mcp-servers */ static listMcpServers(connection: Connection, options?: ListMcpServersOptions): Promise<McpServerCollection>; /** POST /api-catalog/mcp-servers */ static createMcpServer(connection: Connection, input: McpServerCreateInput): Promise<McpServerCreateOutput>; /** GET /api-catalog/mcp-servers/{id} */ static getMcpServer(connection: Connection, id: string): Promise<McpServerOutput>; /** PUT /api-catalog/mcp-servers/{id} */ static updateMcpServer(connection: Connection, id: string, input: McpServerUpdateInput): Promise<McpServerOutput>; /** DELETE /api-catalog/mcp-servers/{id} */ static deleteMcpServer(connection: Connection, id: string): Promise<void>; /** POST /api-catalog/mcp-servers/{id}/fetch */ static fetchMcpServer(connection: Connection, id: string): Promise<McpServerFetchOutput>; /** GET /api-catalog/mcp-servers/{id}/assets */ static listMcpServerAssets(connection: Connection, id: string): Promise<McpServerAssetCollection>; /** PUT /api-catalog/mcp-servers/{id}/assets */ static replaceMcpServerAssets(connection: Connection, id: string, input: McpServerAssetReplaceInput): Promise<McpServerAssetCollection>; private static request; /** Best-effort telemetry — never let a telemetry failure mask the real result or error. */ private static emitTelemetry; }