// The available "type" of an inventory attribute
export type AttributeType =
  | 'string'
  | 'int'
  | 'real'
  | 'slist'
  | 'date'
  | 'context'
  | 'class'
  | 'software_group';

// A single inventory variable as returned by
// GET /advancedreports/inventory/variables, normalized for the UI.
export interface CfeAttribute {
  attribute_name: string;
  category?: string;
  convert_function?: string | null;
  enabled?: 0 | 1;
  id?: string;
  id_key?: string | number;
  keyname?: string | null;
  label: string;
  readonly?: 0 | 1;
  source_table?: string;
  type: AttributeType;
}

// CFE_mapping: attributes keyed by their `label` (backend key).
export type InventoryMapping = Record<string, CfeAttribute>;
