import type { JSONObject } from '@dynatrace/openkit-js'; import type { FrozenResolvedCliOptions } from '../config/cli-options'; import { type CommandOutcome } from './reporting-utils'; /** * Starts timing the current command for its eventual command bizevent. * @param name The command name reported as the bizevent name. */ export declare function startCommandEvent(name: string): void; /** * Stores the command payload at its current lifecycle position, ready to flush at exit. * A no-op if `startCommandEvent` was never called (e.g. telemetry-init failure). * @param payload The payload for the eventual command bizevent. Replaces any previous payload. * @param options CLI options used to enrich the bizevent (app id/version, environment url). */ export declare function setCommandEventPayload(payload: JSONObject, options?: Partial): void; /** * Sends the pending command bizevent with `durationMs` and `outcome` merged in. * Idempotent — clears the pending slot first, so a duplicate flush (e.g. from both the * command's own catch block and the `handleError` safety net) sends exactly one event. * Never throws: telemetry must not mask the in-flight command outcome. * @param outcome Whether the command finished successfully or failed. */ export declare function flushCommandEvent(outcome: CommandOutcome): void; /** * Maps a thrown error to a command outcome. * Ctrl+C is a user-initiated stop rather than a failed command, so it counts as success. * @param error The error that ended the command. */ export declare function outcomeForError(error: unknown): CommandOutcome;