/**
 * Backup Scheduler for Onebox
 *
 * Uses @push.rocks/taskbuffer for cron-based scheduled backups
 * with GFS (Grandfather-Father-Son) time-window based retention scheme.
 */
import type { IBackupSchedule, IBackupScheduleCreate, IBackupScheduleUpdate } from '../types.js';
import { RETENTION_PRESETS } from '../types.js';
import type { Onebox } from './onebox.js';
export declare class BackupScheduler {
    private oneboxRef;
    private taskManager;
    private scheduledTasks;
    private initialized;
    constructor(oneboxRef: Onebox);
    /**
     * Initialize the scheduler and load enabled schedules
     */
    init(): Promise<void>;
    /**
     * Stop the scheduler
     */
    stop(): Promise<void>;
    /**
     * Create a new backup schedule
     */
    createSchedule(request: IBackupScheduleCreate): Promise<IBackupSchedule>;
    /**
     * Update an existing backup schedule
     */
    updateSchedule(scheduleId: number, updates: IBackupScheduleUpdate): Promise<IBackupSchedule>;
    /**
     * Delete a backup schedule
     */
    deleteSchedule(scheduleId: number): Promise<void>;
    deleteSchedulesForService(serviceId: number): Promise<void>;
    /**
     * Trigger immediate backup for a schedule
     */
    triggerBackup(scheduleId: number): Promise<void>;
    /**
     * Get all schedules
     */
    getAllSchedules(): Promise<IBackupSchedule[]>;
    /**
     * Get schedule by ID
     */
    getScheduleById(id: number): Promise<IBackupSchedule | null>;
    /**
     * Get schedules for a service
     */
    getSchedulesForService(serviceName: string): Promise<IBackupSchedule[]>;
    /**
     * Get retention presets
     */
    getRetentionPresets(): typeof RETENTION_PRESETS;
    /**
     * Register a task for a schedule
     */
    private registerTask;
    /**
     * Deschedule a task
     */
    private descheduleTask;
    /**
     * Execute a backup for a schedule
     */
    private executeBackup;
    /**
     * Apply time-window based retention policy
     * Works correctly regardless of backup frequency (cron schedule)
     */
    private applyRetention;
    /**
     * Get start of day (midnight) for N days ago
     */
    private getStartOfDay;
    /**
     * Get start of week (Sunday midnight) for N weeks ago
     */
    private getStartOfWeek;
    /**
     * Get month range for N months ago
     */
    private getMonthRange;
    /**
     * Update next run time for a schedule
     */
    private updateNextRunTime;
    /**
     * Calculate next run time from cron expression
     */
    private calculateNextRun;
    /**
     * Get services that match a schedule based on its scope type
     */
    private getServicesForSchedule;
    /**
     * Get services that match a glob pattern
     */
    private getServicesMatchingPattern;
    /**
     * Simple glob pattern matching (supports * and ?)
     */
    private matchesGlobPattern;
    /**
     * Get human-readable description of a schedule's scope
     */
    private getScopeDescription;
    /**
     * Get human-readable description of retention policy
     */
    private getRetentionDescription;
    /**
     * Prune the containerarchive repository to reclaim storage.
     * Uses the most generous retention policy across all schedules.
     */
    private pruneArchive;
}
