import { IKosDataContainer } from '../../../core/core/kos-data-container';
import { IKosDataModel, KosCreationContext } from '../../../core/core/kosModel';
import { IKosIdentifiable } from '../../../core/core/types';
import { PublicModelInterface } from '../../../core/types';
import { OTAArtifactResponse, UpdaterItem, UpdaterOptions, UpdaterStatus } from './types';
export declare const MODEL_TYPE = "ota-model";
/**
 * OTA - Over-the-Air update management system for KOS devices.
 *
 * The OTA model provides comprehensive management of software updates and artifacts on KOS devices,
 * including real-time download progress tracking, installation management, and error handling.
 * This model is essential for applications that need to manage software updates, display update
 * status, and handle system maintenance operations.
 *
 * ## Key Features
 * - **Real-Time Update Tracking** - Live monitoring of download progress and installation status
 * - **Artifact Management** - Complete visibility into available and installed software artifacts
 * - **Trouble Integration** - Integration with KOS trouble system for error tracking and resolution
 * - **Status Monitoring** - Comprehensive status tracking (downloading, pending, ready, error, idle)
 * - **Installation Control** - Safe installation and reboot management for pending updates
 * - **Progress Reporting** - Detailed download progress with size and percentage completion
 *
 * ## Topic-Based Reactivity
 * The model listens to these KOS topics for real-time synchronization:
 * - **`/kos/ota/artifacts/all`** - Complete artifact list updates from OTA service
 * - **`/kos/ota/artifacts/changed`** - Incremental artifact status changes during downloads
 *
 * ## Update States
 * - **idle** - No updates in progress, system ready
 * - **downloading** - Updates actively downloading from remote sources
 * - **pending** - Updates downloaded and staged, ready for installation
 * - **ready** - Updates installed and ready for use
 * - **error** - Update process encountered errors, intervention needed
 *
 * ## Common Use Cases
 * - **Update Status Dashboard** - Display current update status and progress to users
 * - **System Maintenance** - Manage scheduled updates and installations
 * - **Error Handling** - Monitor and resolve update-related issues
 * - **Progress Monitoring** - Track download progress for large artifacts
 * - **Installation Management** - Control when updates are applied to minimize downtime
 *
 * @interface
 * @example Basic Usage
 * ```typescript
 * const otaModel = Ota.instance('system-updater').build();
 *
 * // Access current update status and manage installations
 * console.log(otaModel.status); // 'idle' | 'downloading' | 'pending' | 'ready' | 'error'
 * if (otaModel.status === 'pending') {
 *   otaModel.installAndReboot();
 * }
 * ```
 *
 * @group KOS Model
 * @category System Integration
 * @useDeclaredType
 *
 * @see {@link UpdaterOptions} - Configuration options for OTA model
 * @see {@link UpdaterItem} - Individual update artifact interface
 * @see {@link UpdaterStatus} - Available update status types
 * @see {@link OTAArtifactResponse} - Raw artifact data from OTA service
 * @see {@link TroubleContainer} - Integrated trouble management system
 */
export type OtaModel = PublicModelInterface<OtaModelImpl>;
/**
 * @ignore
 * @internal
 */
export declare class OtaModelImpl implements IKosDataModel, IKosIdentifiable {
    /** Unique identifier for the model instance */
    id: string;
    private logger;
    /** Internal data container holding all available update artifacts */
    private data;
    /** Trouble container dependency for tracking OTA-related troubles */
    private troubleContainer;
    /** Trouble condition indicating downloads are currently in progress */
    get downloadInProgressTrouble(): import('..').TroubleModel<any>;
    /** Trouble condition indicating updates are downloaded and pending installation */
    get updatePendingTrouble(): import('..').TroubleModel<any>;
    /** Trouble condition indicating OTA process is paused due to errors */
    get pausedDueToErrorsTrouble(): import('..').TroubleModel<any>;
    /** Collection of all available update artifacts with their current status */
    get updates(): IKosDataContainer<UpdaterItem>;
    /** Current overall update status based on active trouble conditions */
    get status(): UpdaterStatus;
    constructor(modelId: string, options: UpdaterOptions, context: KosCreationContext);
    /**
     * Installs pending updates and initiates system reboot.
     * This method resolves the OTAUpdatePendingTrouble to trigger installation.
     */
    installAndReboot(): void;
    /**
     * @internal
     */
    init(): Promise<void>;
    /**
     * @internal
     */
    load(): Promise<void>;
    handleAllArtifacts(artifacts: OTAArtifactResponse[]): Promise<void>;
    handleChangedArtifacts(artifacts: OTAArtifactResponse[]): void;
}
//# sourceMappingURL=ota-model.d.ts.map