import type { Connection } from '@salesforce/core'; /** * Configuration for the Salesforce Connection mock. */ export type MockSalesforceConnectionConfig = { /** API version (default: '59.0') */ version?: string; /** Access token (default: 'mock-access-token') */ accessToken?: string; /** Instance URL (default: 'https://test.salesforce.com') */ instanceUrl?: string; /** Username returned by getUsername() (default: 'test@example.com') */ username?: string; }; /** * Creates a minimal Connection mock satisfying the properties read by createConnectionFacade. * * The Connection type from @salesforce/core extends JSForce Connection, which is a large class * that cannot be fully stubbed without a real org. This factory provides only the subset of * properties that createConnectionFacade reads during facade construction and MCP handler * testing: accessToken, instanceUrl, version, query, queryMore, request, identity, and tooling. * * The single `as unknown as Connection` cast is isolated here so test files can use this * factory without any type-safety bypass at the call site. * * @param config - Optional overrides for connection properties * @returns A Connection-typed mock suitable for MCP handler unit tests * * @example * ```typescript * import { createMockSalesforceConnection } from '../../../src/adapters/testing/index.js'; * * let mockConnection: Connection; * * beforeEach(() => { * mockConnection = createMockSalesforceConnection(); * }); * ``` */ export declare function createMockSalesforceConnection(config?: MockSalesforceConnectionConfig): Connection;