import { PublicModelInterface } from '../../../../core';
import { SoftwareInfoModelImpl } from '../software-info-model';
/**
 * Configuration options for SoftwareInfo model instances.
 *
 * This interface defines the configuration options for the SoftwareInfo model.
 * Currently, no specific configuration options are required as the model
 * automatically loads software information from the system manifest API.
 *
 * @example Basic Usage
 * ```typescript
 * const softwareInfo = SoftwareInfo.instance('system-info').build();
 * ```
 *
 * @kosService core.software-info
 * @category Model Configuration
 * @category System Integration
 */
export interface SoftwareInfoOptions {
  /** Reserved for future extensibility - currently no options required */
  [key: string]: never;
}

/**
 * @interface
 * @kosService core.software-info
 * @useDeclaredType
 */
export type SoftwareInfoModel = PublicModelInterface<SoftwareInfoModelImpl>;

/**
 * Software artifact information representing an individual component or package.
 *
 * This interface describes a software artifact (component, package, or module)
 * installed on a KOS device node, including its identification, grouping, and version.
 *
 * @kosService core.software-info
 * @group KOS Model
 * @category Types
 */
export interface ArtifactsType {
  /** Unique identifier/name of the software artifact */
  name: string;
  /** Functional group classification (core, ui, services, etc.) */
  group: string;
  /** Semantic version string of the artifact */
  version: string;
}

/**
 * Node software information representing all software components on a device node.
 *
 * This interface describes the complete software configuration of a single KOS device node,
 * including the node identification, KOS framework version, and all installed artifacts
 * organized by functional groups.
 *
 * @kosService core.software-info
 * @group KOS Model
 * @category Types
 */
export interface NodeInfoType {
  /** Node identifier (primary, secondary, etc.) */
  nodeName: string;
  /** KOS framework version running on this node */
  kosVersion?: string;
  /** Artifacts organized by functional groups */
  group: Record<string, ArtifactsType[]>;
}
