import { Result } from './result'; import { System } from './system'; export declare enum SystemApiKeyErrorName { SYSTEM_API_KEY_NOT_FOUND = "systemApiKeyNotFound" } export interface SystemApiKeyErrorNotFound { type: SystemApiKeyErrorName.SYSTEM_API_KEY_NOT_FOUND; } export type SystemApiKeyErrorInfo = SystemApiKeyErrorNotFound; export declare enum ConfigLocation { USER = "user", APP = "app" } export declare function isValidApiKey(apiKey: unknown): apiKey is string; export declare function isValidApiKeyName(apiKeyName: string): boolean; export declare function castLocation(location: string): Result; export declare function findApiKeyConfigPathAsync(sys: System, location: ConfigLocation): Promise; export declare function readGlobalApiKeyAsync(sys: System, apiKeyName?: string | null): Promise>; export declare function readApiKeyAsync(sys: System, apiKeyName?: string | null): Promise>; export declare function writeApiKeyAsync(sys: System, location: ConfigLocation, apiKey: string, apiKeyName?: string | null): Promise;