import { type ErrorReportContext } from './event.js'; export interface ErrorReportOptions { /** The DSN to report to. Defaults to the one in `dsnFile`. */ dsn?: string; /** The file the release workflow writes the DSN to. */ dsnFile?: string; /** The CLI's install directory; frames inside it are the CLI's own code. */ packageRoot?: string; env?: NodeJS.ProcessEnv; } /** Whether the user turned error reporting off with `CHECKLY_NO_ERROR_REPORTING` or `DO_NOT_TRACK`. */ export declare function isErrorReportingDisabled(env?: NodeJS.ProcessEnv): boolean; /** * Remembers an error for `reportNotedCliError` to check and send when the * command ends. For errors a command catches and prints itself instead of * throwing, e.g. `deploy` and `test`, which never reach `BaseCommand.catch`. */ export declare function noteCliError(err: unknown, { handled }?: { handled?: boolean; }): void; /** * Sends one noted CLI bug, if any: the first one that ended the command, else * the first one a command printed. Reports at most one error per run, waits at * most a few seconds, and never throws: a failed report must not change how * the command fails. */ export declare function reportNotedCliError(context: () => Omit, options?: ErrorReportOptions): Promise; /** * Sets the options `reportNotedCliError` uses when it is given none, as in * `BaseCommand.finally`. For tests, which have no release DSN file. */ export declare function setDefaultErrorReportOptions(options: ErrorReportOptions): void; /** Lets the next report go out again. For tests. */ export declare function resetErrorReporting(): void;