import Conf from 'conf'; declare enum Env { production = "production", staging = "staging", development = "development", local = "local" } export type CredentialSource = 'login' | 'account_override' | 'environment'; declare class ChecklyConfig { private _auth?; private _data?; private pinnedEnv?; private warnedEnv; get auth(): Conf<{ apiKey: unknown; pendingDeviceAuthorization: unknown; }>; get data(): Conf<{ accountId: unknown; accountName: unknown; }>; clear(): void; getEnv(): Env; /** * Freezes the variables that decide which credentials the CLI sends and * where it sends them, at their current values for the rest of the run. * Commands call this once authentication has passed, before they load user * code: check files and Playwright configs run in the CLI's process, and one * that loads another .env file (e.g. `dotenv.config({ override: true })`) * would otherwise switch the key or account of every later request, or send * the authenticated key to another host. A variable unset at this point * stays unset. Stored credentials are unaffected; only the CLI changes them. */ pinEnvironment(): void; /** A pinned variable's value: the value at pinning once pinned, warning once if it has changed since. */ private env; getApiKey(): string; getAccountId(): string; /** Whether `CHECKLY_ACCOUNT_ID` picks the account, rather than the stored default. */ hasAccountIdInEnvironment(): boolean; /** The account `checkly login` stored as the default, ignoring the environment. */ getStoredAccountId(): string; /** The stored default account with its name (the id when the name is missing), if there is one. */ getStoredAccount(): { id: string; name: string; } | undefined; /** Whether `checkly login` stored both a key and a default account. */ hasStoredLogin(): boolean; /** * Where this run's credentials come from: * - `environment`: `CHECKLY_API_KEY` is set. Such a key belongs to one * account; `CHECKLY_ACCOUNT_ID` names it, and `checkly login` stays out * of the way. * - `account_override`: only `CHECKLY_ACCOUNT_ID` is set. It picks the * account for the key `checkly login` stores, which belongs to the user * and works with all of their accounts. The CLI cannot tell a one-command * prefix from an export or a `.env` entry, so this holds for every command * while the variable is set. * - `login`: neither is set; the stored key and default account apply. */ getCredentialSource(): CredentialSource; getApiUrl(): string; getAuthUrl(): string; getMqttUrl(): string; hasValidCredentials(): boolean; } declare const config: ChecklyConfig; export default config;