import type { CResult } from '../types.mts'; import type { SocketYml } from '@socketsecurity/config'; export interface LocalConfig { apiBaseUrl?: string | null | undefined; // @deprecated ; use apiToken. when loading a config, if this prop exists it // is deleted and set to apiToken instead, and then persisted. // should only happen once for legacy users. apiKey?: string | null | undefined; apiProxy?: string | null | undefined; apiToken?: string | null | undefined; defaultOrg?: string | undefined; enforcedOrgs?: string[] | readonly string[] | null | undefined; skipAskToPersistDefaultOrg?: boolean | undefined; // Convenience alias for defaultOrg. org?: string | undefined; } export type FoundSocketYml = { path: string; parsed: SocketYml; }; export declare function findSocketYmlSync(dir?: string): CResult; export declare function getConfigValue(key: Key): CResult; // This version squashes errors, returning undefined instead. // Should be used when we can reasonably predict the call can't fail. export declare function getConfigValueOrUndef(key: Key): LocalConfig[Key] | undefined; export declare function getSupportedConfigEntries(): [keyof LocalConfig, string][]; export declare function getSupportedConfigKeys(): (keyof LocalConfig)[]; export declare function isConfigFromFlag(): boolean; export declare function isSensitiveConfigKey(key: string): key is keyof LocalConfig; export declare function isSupportedConfigKey(key: string): key is keyof LocalConfig; /** * Reset config cache for testing purposes. * This allows tests to start with a fresh config state. * @internal */ export declare function resetConfigForTesting(): void; export declare function overrideCachedConfig(jsonConfig: unknown): CResult; export declare function overrideConfigApiToken(apiToken: unknown): void; export declare function updateConfigValue(configKey: keyof LocalConfig, value: LocalConfig[Key]): CResult; //# sourceMappingURL=config.d.mts.map