/**
 * Management API Client for CLIProxyAPI
 *
 * HTTP client for CLIProxy Management API endpoints.
 * Handles authentication, error mapping, and provides typed methods for CRUD operations.
 */
import type { ManagementClientConfig, ManagementHealthStatus, ClaudeKey, ClaudeKeyPatch, RemoteModelInfo } from './management-api-types';
import type { CliproxyRoutingStrategy } from '../types';
/**
 * Management API Client for CLIProxyAPI.
 * Provides typed methods for CRUD operations on claude-api-key configuration.
 */
export declare class ManagementApiClient {
    private readonly config;
    private readonly timeout;
    constructor(config: ManagementClientConfig);
    /**
     * Build base URL for display purposes.
     */
    getBaseUrl(): string;
    /**
     * Check health of Management API.
     * Uses GET /v0/management/claude-api-key as health check.
     */
    health(): Promise<ManagementHealthStatus>;
    /**
     * Get all claude-api-key entries from remote CLIProxy.
     */
    getClaudeKeys(): Promise<ClaudeKey[]>;
    /**
     * Replace all claude-api-key entries on remote CLIProxy.
     * This is an atomic operation - all entries are replaced at once.
     */
    putClaudeKeys(keys: ClaudeKey[]): Promise<void>;
    /**
     * Update a single claude-api-key entry by index or api-key match.
     */
    patchClaudeKey(patch: ClaudeKeyPatch): Promise<void>;
    /**
     * Delete a claude-api-key entry by api-key value.
     */
    deleteClaudeKey(apiKey: string): Promise<void>;
    /**
     * Get model definitions for a channel from CLIProxyAPI.
     * GET /v0/management/model-definitions/:channel
     */
    getModelDefinitions(channel: string): Promise<RemoteModelInfo[]>;
    /**
     * Get the global credential routing strategy from CLIProxy.
     */
    getRoutingStrategy(): Promise<CliproxyRoutingStrategy>;
    /**
     * Update the global credential routing strategy on CLIProxy.
     */
    putRoutingStrategy(strategy: CliproxyRoutingStrategy): Promise<CliproxyRoutingStrategy>;
    /**
     * Get a management section from CLIProxyAPI.
     * Example sections: claude-api-key, gemini-api-key, codex-api-key.
     */
    getSection<T>(section: string): Promise<T[]>;
    /**
     * Replace an entire management section on CLIProxyAPI.
     */
    putSection<T>(section: string, entries: T[]): Promise<void>;
    /**
     * Make an HTTP request to the Management API.
     */
    private request;
    /**
     * Make request using native fetch API.
     */
    private requestWithFetch;
    /**
     * Make request using native https module for self-signed cert support.
     */
    private requestWithHttps;
}
/**
 * Create a ManagementApiClient from CCS config.
 * Uses cliproxy_server.remote settings.
 */
export declare function createManagementClient(remoteConfig: {
    host: string;
    port?: number;
    protocol: 'http' | 'https';
    management_key?: string;
    auth_token?: string;
    timeout?: number;
}, allowSelfSigned?: boolean): ManagementApiClient;
//# sourceMappingURL=management-api-client.d.ts.map