import type { AuthMethod } from '../auth/types.js';
/**
 * Configuration structure matching dw.json file format.
 * Uses kebab-case keys to match the file format.
 */
export interface DwJsonConfig {
    /** Instance name (for multi-config files) */
    name?: string;
    /** Whether this config is active (for multi-config files) */
    active?: boolean;
    /** B2C instance hostname */
    hostname?: string;
    /** Code version for deployments */
    'code-version'?: string;
    /** Username for Basic auth (WebDAV) */
    username?: string;
    /** Password/access-key for Basic auth (WebDAV) */
    password?: string;
    /** OAuth client ID */
    'client-id'?: string;
    /** OAuth client secret */
    'client-secret'?: string;
    /** OAuth scopes */
    'oauth-scopes'?: string[];
    /** SCAPI short code (kebab-case) */
    'short-code'?: string;
    /** SCAPI short code (camelCase) */
    shortCode?: string;
    /** SCAPI short code (alternate kebab-case) */
    'scapi-shortcode'?: string;
    /** Alternate hostname for WebDAV (if different from main hostname) */
    'webdav-hostname'?: string;
    /** Alternate hostname for WebDAV (legacy camelCase format) */
    secureHostname?: string;
    /** Alternate hostname for WebDAV (legacy kebab-case format) */
    'secure-server'?: string;
    /** Allowed authentication methods in priority order */
    'auth-methods'?: AuthMethod[];
    /** Account Manager hostname for OAuth */
    'account-manager-host'?: string;
    /** MRT project slug */
    mrtProject?: string;
    /** MRT environment name (e.g., staging, production) */
    mrtEnvironment?: string;
    /** MRT cloud origin URL */
    mrtOrigin?: string;
    /** MRT cloud origin URL (alias) */
    cloudOrigin?: string;
    /** Tenant/Organization ID for SCAPI */
    'tenant-id'?: string;
}
/**
 * dw.json with multi-config support (configs array).
 */
export interface DwJsonMultiConfig extends DwJsonConfig {
    /** Array of named instance configurations */
    configs?: DwJsonConfig[];
}
/**
 * Options for loading dw.json.
 */
export interface LoadDwJsonOptions {
    /** Named instance to select from configs array */
    instance?: string;
    /** Explicit path to dw.json (skips searching if provided) */
    path?: string;
    /** Starting directory for search (defaults to cwd) */
    startDir?: string;
}
/**
 * Result of loading dw.json configuration.
 */
export interface LoadDwJsonResult {
    /** The parsed configuration */
    config: DwJsonConfig;
    /** The path to the dw.json file that was loaded */
    path: string;
}
/**
 * Finds dw.json by searching upward from the starting directory.
 *
 * @param startDir - Directory to start searching from (defaults to cwd)
 * @returns Path to dw.json if found, undefined otherwise
 *
 * @example
 * const dwPath = findDwJson();
 * if (dwPath) {
 *   console.log(`Found dw.json at ${dwPath}`);
 * }
 */
export declare function findDwJson(startDir?: string): string | undefined;
/**
 * Loads configuration from a dw.json file.
 *
 * If an explicit path is provided, uses that file. Otherwise, looks for dw.json
 * in the startDir (or cwd). Does NOT search parent directories.
 *
 * Use `findDwJson()` if you need to search upward through parent directories.
 *
 * @param options - Loading options
 * @returns The parsed config with its path, or undefined if no dw.json found
 *
 * @example
 * // Load from ./dw.json (current directory)
 * const result = loadDwJson();
 * if (result) {
 *   console.log(`Loaded from ${result.path}`);
 *   console.log(result.config.hostname);
 * }
 *
 * // Load from specific directory
 * const result = loadDwJson({ startDir: '/path/to/project' });
 *
 * // Use named instance
 * const result = loadDwJson({ instance: 'staging' });
 *
 * // Explicit path
 * const result = loadDwJson({ path: './config/dw.json' });
 */
export declare function loadDwJson(options?: LoadDwJsonOptions): LoadDwJsonResult | undefined;
