import { type ApiVersion, type Localization } from "../config/index.js"; export interface MeritCredentials { apiId: string; apiKey: string; localization: Localization; version: ApiVersion; } declare function parseEnvFile(path: string): Record; /** * Hydrate process.env from the home and cwd env files without overwriting any * variable that is already set. Home file wins over the cwd file, and untrusted * paths (by default the cwd `.env`) may not set request-destination overrides * (see CWD_DENYLIST). Safe to call multiple times. Call once at CLI startup. */ export declare function loadEnvFile(paths?: string[], untrustedPaths?: string[]): void; declare function cleanValue(raw: string | undefined): string | undefined; export interface GetCredentialsOptions { /** If true and credentials aren't found, prompt interactively (requires TTY). */ allowPrompt?: boolean; /** Override env-file path for the interactive-save target. */ envFilePath?: string; } /** * Persist credential key/value pairs into the env file WITHOUT touching anything * else in it: existing lines for the given keys are replaced in place, missing keys * are appended, and all other lines (other credentials, comments, base-URL * overrides) are preserved verbatim. A plain rewrite would destroy e.g. a stored * STRIPE_API_KEY when the Aktiva prompt saves. */ declare function saveCredentialsToEnvFile(values: Record, path?: string): void; /** * Resolve Merit credentials + endpoint config. Throws AuthError if the API ID * or key cannot be found (and prompting is disabled or stdin is not a TTY). */ export declare function getCredentials(opts?: GetCredentialsOptions): Promise; export interface PalkCredentials { apiId: string; apiKey: string; } /** * Resolve Merit Palk credentials. Throws AuthError if the API ID or key cannot * be found (and prompting is disabled or stdin is not a TTY). */ export declare function getPalkCredentials(opts?: GetCredentialsOptions): Promise; export declare const _internal: { parseEnvFile: typeof parseEnvFile; cleanValue: typeof cleanValue; saveCredentialsToEnvFile: typeof saveCredentialsToEnvFile; HOME_ENV_FILE: string; CWD_ENV_FILE: string; }; export {};