/**
 * Variable store -- environment variable CRUD with lock enforcement.
 *
 * Manages org-level environment variables and per-source overrides.
 * Lock enforcement: locked org vars cannot be overridden by source overrides.
 */
import { type Kysely } from 'kysely';
import type { Database, EnvironmentVariable, EnvironmentSourceOverride } from '../db/types.js';
/**
 * Data access layer for environment variables and source overrides.
 */
export declare class VariableStore {
    private readonly db;
    constructor(db: Kysely<Database>);
    /** List all org-level variables for an environment. */
    listVars(orgId: string, environmentId: string): Promise<EnvironmentVariable[]>;
    /** Upsert an org-level variable. */
    setVar(orgId: string, environmentId: string, key: string, value: string, locked?: boolean): Promise<void>;
    /** Delete an org-level variable. */
    deleteVar(orgId: string, environmentId: string, key: string): Promise<void>;
    /** List source overrides for a specific source (routing key). */
    listSourceOverrides(orgId: string, environmentId: string, routingKey: string): Promise<EnvironmentSourceOverride[]>;
    /** Upsert a source override. */
    setSourceOverride(orgId: string, environmentId: string, routingKey: string, key: string, value: string): Promise<void>;
    /** Delete a source override. */
    deleteSourceOverride(orgId: string, environmentId: string, routingKey: string, key: string): Promise<void>;
    /**
     * Get resolved variables for an environment, optionally merged with source overrides.
     *
     * Merge rules:
     * - Org-level vars form the base
     * - Source overrides can add new keys and override unlocked org vars
     * - Locked org vars are NOT overridden by source overrides
     *
     * @param routingKey - If provided, source overrides are merged in
     */
    getResolvedVars(orgId: string, environmentId: string, routingKey?: string): Promise<Record<string, string>>;
}
//# sourceMappingURL=variable-store.d.ts.map