import type { TelemetryAttributes, TelemetryOptions } from './types.js';
/**
 * Telemetry client for sending events to Application Insights.
 *
 * @example
 * ```typescript
 * const telemetry = new Telemetry({
 *   project: 'my-app',
 *   appInsightsKey: 'InstrumentationKey=...',
 *   version: '1.0.0',
 *   dataDir: '/path/to/data',
 * });
 *
 * await telemetry.start();
 * telemetry.sendEvent('USER_ACTION', { action: 'click' });
 * telemetry.stop();
 * ```
 */
export declare class Telemetry {
    private attributes;
    private cliId;
    private project;
    private reporter;
    private sessionId;
    private started;
    private version;
    private appInsightsKey;
    private traceLog;
    /**
     * Check if telemetry is disabled via environment variables.
     * Supports both SF_DISABLE_TELEMETRY (sf CLI standard) and SFCC_DISABLE_TELEMETRY.
     */
    static isDisabled(): boolean;
    /**
     * Get the connection string for telemetry, respecting disable flags and env overrides.
     * @param projectDefault - Default connection string from project config (e.g., package.json)
     * @returns Connection string to use, or undefined if telemetry should be disabled
     */
    static getConnectionString(projectDefault?: string): string | undefined;
    constructor(options: TelemetryOptions);
    /**
     * Add additional attributes to include with all future events.
     */
    addAttributes(attributes: TelemetryAttributes): void;
    /**
     * Send a telemetry event. Events are buffered until you call {@link flush} or
     * {@link stop}. Use this for batching; use {@link sendEventAndFlush} when you
     * need one event sent before continuing.
     *
     * @param eventName - Name of the event (e.g., 'SERVER_STATUS', 'TOOL_CALLED')
     * @param attributes - Event-specific attributes (only string/number/boolean are sent)
     */
    sendEvent(eventName: string, attributes?: TelemetryAttributes): void;
    /**
     * Send a telemetry event and flush immediately. Use this when you need the event
     * delivered before continuing (e.g. after a tool call or server lifecycle event),
     * so you don't have to remember to call {@link flush}. For batching multiple
     * events and flushing once, use {@link sendEvent} and then {@link flush}.
     *
     * @param eventName - Name of the event (e.g., 'SERVER_STATUS', 'TOOL_CALLED')
     * @param attributes - Event-specific attributes (only string/number/boolean are sent)
     */
    sendEventAndFlush(eventName: string, attributes?: TelemetryAttributes): Promise<void>;
    /**
     * Send an exception to telemetry.
     *
     * @param error - The error to report
     * @param attributes - Additional attributes to include with the exception
     */
    sendException(error: Error, attributes?: TelemetryAttributes): void;
    /**
     * Start the telemetry reporter.
     * Must be called before sending events.
     */
    start(): Promise<void>;
    /**
     * Flush pending telemetry events without stopping the reporter.
     * Use this for long-running processes that need to ensure events are sent periodically.
     * Uses the native reporter.flush() as documented in https://github.com/forcedotcom/telemetry,
     * and also flushes the App Insights client when present (SDK flush() only flushes O11y).
     */
    flush(): Promise<void>;
    /**
     * Stop the telemetry reporter and flush any pending events.
     * Includes a delay to allow async HTTP requests to complete.
     */
    stop(): Promise<void>;
    private buildEventProperties;
    private createReporter;
}
