import { Analytics } from '@segment/analytics-node';
import type { TelemetryEnv, ToolCallTelemetryProperties } from './types.js';
/**
 * Gets the telemetry environment, defaulting to 'PROD' if not provided or invalid
 */
export declare function getTelemetryEnv(env?: string | null): TelemetryEnv;
/**
 * Gets or initializes the Segment Analytics client.
 * The environment is determined by the TELEMETRY_ENV environment variable.
 *
 * @returns Analytics client instance or null if initialization failed
 */
export declare function getOrInitAnalyticsClient(telemetryEnv: TelemetryEnv): Analytics | null;
/**
 * Tracks a tool call event to Segment.
 * Segment requires either userId OR anonymousId, but not both
 * When userId is available, use it; otherwise use anonymousId
 *
 * @param userId - Apify user ID (null if not available)
 * @param telemetryEnv - Telemetry environment
 * @param properties - Event properties for the tool call
 */
export declare function trackToolCall(userId: string | null, telemetryEnv: TelemetryEnv, properties: ToolCallTelemetryProperties): void;
//# sourceMappingURL=telemetry.d.ts.map