/**
 * Permissions Policy Manager
 *
 * Manages Permissions-Policy header configuration for controlling
 * browser feature access (camera, microphone, geolocation, etc.).
 *
 * @packageDocumentation
 * @module security/headers/permissions-policy
 */
import type { PermissionsPolicyConfig, PermissionsPolicyValue } from './types.js';
/**
 * Permissions-Policy header name
 */
export declare const PERMISSIONS_POLICY_HEADER = "Permissions-Policy";
/**
 * All known permission policy features
 */
export declare const KNOWN_FEATURES: readonly ["accelerometer", "ambient-light-sensor", "autoplay", "battery", "camera", "display-capture", "document-domain", "encrypted-media", "fullscreen", "gamepad", "geolocation", "gyroscope", "hid", "identity-credentials-get", "idle-detection", "local-fonts", "magnetometer", "microphone", "midi", "otp-credentials", "payment", "picture-in-picture", "publickey-credentials-create", "publickey-credentials-get", "screen-wake-lock", "serial", "speaker-selection", "storage-access", "usb", "web-share", "window-management", "xr-spatial-tracking", "interest-cohort"];
/**
 * High-risk features that should be disabled by default
 */
export declare const HIGH_RISK_FEATURES: readonly ["camera", "microphone", "geolocation", "display-capture", "serial", "usb", "hid", "bluetooth", "idle-detection"];
/**
 * Sensor-related features
 */
export declare const SENSOR_FEATURES: readonly ["accelerometer", "ambient-light-sensor", "gyroscope", "magnetometer"];
/**
 * Feature permission level
 */
export type FeaturePermission = 'all' | 'self' | 'none' | string[];
/**
 * Permissions Policy validation issue
 */
export interface PermissionsPolicyIssue {
    severity: 'error' | 'warning' | 'info';
    feature: string;
    message: string;
    recommendation?: string;
}
/**
 * Validation result
 */
export interface PermissionsPolicyValidationResult {
    valid: boolean;
    issues: PermissionsPolicyIssue[];
}
/**
 * Strict preset - Disable all powerful features
 *
 * Suitable for API servers and applications that don't need
 * browser features.
 */
export declare const STRICT_PERMISSIONS_PRESET: PermissionsPolicyConfig;
/**
 * Moderate preset - Allow self-origin for safe features
 *
 * Suitable for web applications that need some browser features.
 */
export declare const MODERATE_PERMISSIONS_PRESET: PermissionsPolicyConfig;
/**
 * API preset - Minimal permissions for API-only services
 *
 * Disables all features since APIs don't serve HTML.
 */
export declare const API_PERMISSIONS_PRESET: PermissionsPolicyConfig;
/**
 * Permissions Policy Manager
 *
 * @example
 * ```typescript
 * const policy = new PermissionsPolicyManager()
 *   .preset('strict')
 *   .allow('fullscreen', 'self')
 *   .allow('payment', 'self')
 *   .deny('geolocation')
 *   .build();
 *
 * res.setHeader('Permissions-Policy', policy);
 * ```
 */
export declare class PermissionsPolicyManager {
    private features;
    /**
     * Start from a preset
     */
    preset(name: 'strict' | 'moderate' | 'api'): this;
    /**
     * Allow a feature for specific origins
     *
     * @param feature - The feature name
     * @param permission - 'self', 'all', 'none', or array of origins
     */
    allow(feature: string, permission: FeaturePermission): this;
    /**
     * Deny a feature completely
     */
    deny(feature: string): this;
    /**
     * Allow a feature for self only
     */
    allowSelf(feature: string): this;
    /**
     * Allow a feature for all origins
     *
     * WARNING: This is generally not recommended for sensitive features!
     */
    allowAll(feature: string): this;
    /**
     * Allow a feature for specific origins
     */
    allowOrigins(feature: string, origins: string[]): this;
    /**
     * Allow a feature for self and specific origins
     */
    allowSelfAndOrigins(feature: string, origins: string[]): this;
    /**
     * Disable all sensor-related features
     */
    disableSensors(): this;
    /**
     * Disable all high-risk features
     */
    disableHighRisk(): this;
    /**
     * Opt out of FLoC/Topics (interest-cohort)
     */
    disableInterestCohort(): this;
    /**
     * Apply a configuration object
     */
    fromConfig(config: PermissionsPolicyConfig): this;
    /**
     * Remove a feature from the policy
     */
    remove(feature: string): this;
    /**
     * Clear all features
     */
    clear(): this;
    /**
     * Validate the policy configuration
     */
    validate(): PermissionsPolicyValidationResult;
    /**
     * Build the Permissions-Policy header value
     */
    build(): string;
    /**
     * Get the current configuration as an object
     */
    toConfig(): PermissionsPolicyConfig;
    /**
     * Format a permission value to the correct syntax
     */
    private formatPermission;
    /**
     * Clone the manager
     */
    clone(): PermissionsPolicyManager;
}
/**
 * Create a strict permissions policy (disable all sensitive features)
 */
export declare function createStrictPermissionsPolicy(): PermissionsPolicyManager;
/**
 * Create a moderate permissions policy
 */
export declare function createModeratePermissionsPolicy(): PermissionsPolicyManager;
/**
 * Create an API permissions policy (disable everything)
 */
export declare function createAPIPermissionsPolicy(): PermissionsPolicyManager;
/**
 * Create a permissions policy from configuration
 */
export declare function createPermissionsPolicy(config: PermissionsPolicyConfig): PermissionsPolicyManager;
/**
 * Build a Permissions-Policy header directly from configuration
 */
export declare function buildPermissionsPolicyHeader(config: PermissionsPolicyConfig): string;
/**
 * Parse a Permissions-Policy header value
 */
export declare function parsePermissionsPolicyHeader(header: string): PermissionsPolicyConfig;
/**
 * Get the secure default for a specific feature
 */
export declare function getSecureDefault(feature: string): PermissionsPolicyValue;
//# sourceMappingURL=permissions-policy.d.ts.map