import type { BaseConnector } from '../../connector/BaseConnector.js';
import type { ConnectorRegistry } from '../../registry/connector/definitions.js';
import type { ConnectorConfig, ConnectorEventListener, ConnectorExecuteParams, ConnectorExecuteResult, ConnectorInstance, CredentialVault, TenantDescriptor, TenantRateLimitConfig } from '../../types/connector/index.js';
import type { ConnectorId, ConnectorInstanceId, CredentialId, TenantId } from '../../types/ids/index.js';
import { ConnectorManager } from './lifecycle.js';
export interface TenantConnectorManagerConfig {
    registry: ConnectorRegistry;
    credentialVault?: CredentialVault;
    defaultRateLimit?: TenantRateLimitConfig;
}
export declare class TenantConnectorManager {
    private tenants;
    private registry;
    private credentialVault;
    private defaultRateLimit;
    private listeners;
    private log;
    constructor(config: TenantConnectorManagerConfig);
    registerTenant(descriptor: TenantDescriptor, rateLimit?: TenantRateLimitConfig): void;
    unregisterTenant(tenantId: TenantId): Promise<void>;
    getTenant(tenantId: TenantId): TenantDescriptor | undefined;
    listTenants(): TenantDescriptor[];
    setTenantRateLimit(tenantId: TenantId, rateLimit: TenantRateLimitConfig): void;
    private checkRateLimit;
    createInstance(tenantId: TenantId, config: ConnectorConfig, connector: BaseConnector<unknown>): Promise<ConnectorInstance>;
    connect(tenantId: TenantId, instanceId: ConnectorInstanceId): Promise<void>;
    connectWithCredential(tenantId: TenantId, instanceId: ConnectorInstanceId, credentialId: CredentialId): Promise<void>;
    storeCredential(tenantId: TenantId, connectorId: ConnectorId, label: string, auth: import('../../types/connector/index.js').AuthConfig): Promise<import('../../types/connector/index.js').CredentialRef>;
    listCredentials(tenantId: TenantId, connectorId?: ConnectorId): Promise<import('../../types/connector/index.js').CredentialRef[]>;
    revokeCredential(credentialId: CredentialId): Promise<boolean>;
    disconnect(tenantId: TenantId, instanceId: ConnectorInstanceId): Promise<void>;
    execute(tenantId: TenantId, params: ConnectorExecuteParams): Promise<ConnectorExecuteResult>;
    healthCheck(tenantId: TenantId, instanceId: ConnectorInstanceId): Promise<boolean>;
    removeInstance(tenantId: TenantId, instanceId: ConnectorInstanceId): Promise<void>;
    listInstances(tenantId: TenantId): ConnectorInstance[];
    listConnectedInstances(tenantId: TenantId): ConnectorInstance[];
    getManagerForTenant(tenantId: TenantId): ConnectorManager;
    getCredentialVault(): CredentialVault | undefined;
    disconnectAll(): Promise<void>;
    on(listener: ConnectorEventListener): void;
    off(listener: ConnectorEventListener): void;
    private emitTenantEvent;
    private getTenantOrThrow;
}
//# sourceMappingURL=tenant.d.ts.map