/**
 * JIRA Permission Gate
 *
 * Validates that sync permissions are enabled before allowing JIRA write operations.
 * This ensures manual JIRA commands respect the same permission settings as the
 * sync-coordinator.
 *
 * Usage:
 * ```typescript
 * const gate = await createJiraPermissionGate();
 * const result = gate.checkWritePermission();
 * if (!result.allowed) {
 *   console.log(result.reason);
 *   return;
 * }
 * ```
 *
 * @module jira-permission-gate
 */
/**
 * Permission check result
 */
export interface PermissionCheckResult {
    /**
     * Whether the operation is allowed
     */
    allowed: boolean;
    /**
     * Human-readable reason for the decision
     */
    reason: string;
    /**
     * Suggested action if permission denied
     */
    suggestedAction?: string;
    /**
     * Which setting controls this permission
     */
    settingPath?: string;
}
/**
 * Sync settings from config.json
 */
export interface SyncSettings {
    canUpsertInternalItems: boolean;
    canUpdateExternalItems: boolean;
    canUpdateStatus: boolean;
}
/**
 * Default settings (all disabled for safety)
 */
export declare const DEFAULT_SYNC_SETTINGS: SyncSettings;
/**
 * JIRA Permission Gate
 *
 * Checks permission settings before allowing JIRA write operations.
 */
export declare class JiraPermissionGate {
    private settings;
    private configPath;
    constructor(settings: SyncSettings, configPath: string);
    /**
     * Check if write operations (create/update issues) are allowed
     *
     * Requires: canUpdateExternalItems = true
     */
    checkWritePermission(): PermissionCheckResult;
    /**
     * Check if status updates (transitions) are allowed
     *
     * Requires: canUpdateStatus = true
     */
    checkStatusPermission(): PermissionCheckResult;
    /**
     * Check if internal item creation is allowed
     *
     * Requires: canUpsertInternalItems = true
     */
    checkCreateInternalPermission(): PermissionCheckResult;
    /**
     * Check if close operation is allowed (requires both write AND status)
     *
     * Requires: canUpdateExternalItems = true AND canUpdateStatus = true
     */
    checkClosePermission(): PermissionCheckResult;
    /**
     * Get current settings
     */
    getSettings(): SyncSettings;
    /**
     * Get human-readable permission summary
     */
    getPermissionSummary(): string;
}
/**
 * Create a JiraPermissionGate from config.json
 *
 * @param projectRoot - Project root directory (defaults to cwd)
 * @returns JiraPermissionGate instance
 */
export declare function createJiraPermissionGate(projectRoot?: string): Promise<JiraPermissionGate>;
/**
 * Quick check: Are JIRA write operations allowed?
 *
 * Convenience function for simple permission checks.
 *
 * @param projectRoot - Project root directory
 * @returns Permission check result
 */
export declare function canWriteToJira(projectRoot?: string): Promise<PermissionCheckResult>;
/**
 * Quick check: Are JIRA status updates allowed?
 *
 * @param projectRoot - Project root directory
 * @returns Permission check result
 */
export declare function canUpdateJiraStatus(projectRoot?: string): Promise<PermissionCheckResult>;
/**
 * Quick check: Can JIRA issues be closed?
 *
 * @param projectRoot - Project root directory
 * @returns Permission check result
 */
export declare function canCloseJiraIssue(projectRoot?: string): Promise<PermissionCheckResult>;
export default JiraPermissionGate;
//# sourceMappingURL=jira-permission-gate.d.ts.map