export type UpdateChangeType = 'feature' | 'fix' | 'improvement' | 'breaking' | 'security' | 'deprecation';
export interface UpdateChangelogItem {
    version: string;
    date: string;
    summary: string;
    type?: UpdateChangeType;
}
export interface UpdatePluginCompatibility {
    name: string;
    compatible: boolean;
    minVersion?: string;
}
export interface UpdateInfo {
    current: string;
    latest: string;
    updateAvailable: boolean;
    severity?: 'patch' | 'minor' | 'major' | 'security';
    releaseDate?: string;
    changelog?: UpdateChangelogItem[];
    updateCommand?: string;
    breakingChanges?: string[];
    hasMigrations?: boolean;
    pluginCompatibility?: UpdatePluginCompatibility[];
    source?: 'update-server' | 'npm';
    /** Whether the current session may manage updates (admin/owner). */
    canManage?: boolean;
    hasGithubToken?: boolean;
    githubRepo?: string;
}
interface GithubForm {
    githubRepo: string;
    githubToken: string;
}
/** Admin/Owner may manage updates (matches the server's `requireAdminScope`). */
export declare function canManageUpdates(role: string | null | undefined): boolean;
/**
 * State + actions for the Settings → Updates tab. Owns the update-status check,
 * the GitHub-integration config form (with dirty tracking for the shared save
 * bar), and the "Create Update PR" action. All writes are gated on `canManage`,
 * which the server confirms in the check response.
 */
export declare function useUpdates({ role }: {
    role?: string;
}): {
    info: UpdateInfo | null;
    checking: boolean;
    hasChecked: boolean;
    error: string;
    applying: boolean;
    prResult: {
        prUrl: string;
        prNumber: number;
    } | null;
    canManage: boolean;
    form: GithubForm;
    setField: (key: keyof GithubForm, value: string) => void;
    dirty: boolean;
    repoError: string;
    hasErrors: boolean;
    saveState: "error" | "success" | "idle" | "saving";
    save: () => Promise<void>;
    reset: () => void;
    check: () => Promise<void>;
    apply: () => Promise<void>;
};
export {};
//# sourceMappingURL=useUpdates.d.ts.map