// api/rapids/rapids.types.ts
/**
 * Common interfaces for RAPIDS API responses
 */

export interface RapidsResponse {
	count?: number;
	total?: number;
	rogue_aps?: RogueAp[];
	suspect_aps?: SuspectAp[];
	interfering_aps?: InterferingAp[];
	neighbor_aps?: NeighborAp[];
	manually_contained_aps?: ManuallyContainedAp[];
	infrastructure_attacks?: InfrastructureAttack[];
	client_attacks?: ClientAttack[];
	wids_events?: WidsEvent[];
}

export interface RogueAp {
	id: string;
	ssid?: string;
	classification?: string;
	classification_method?: 'Device' | 'Rule' | 'Manual' | 'Unknown';
	containment_status?: string;
	encryption?: 'WPA' | 'OPEN' | 'WEP' | 'Unknown';
	first_det_device?: string;
	first_det_device_name?: string;
	first_seen?: string;
	last_det_device: string;
	last_det_device_name?: string;
	last_seen?: string;
	signal?: number;
	mac_vendor?: string;
	name?: string;
	group_name?: string;
	cust_id?: string;
	lan_mac?: string;
}

export interface InfrastructureAttack {
	macaddr: string;
	attack_type: string;
	detected_ap: string;
	detected_time: number;
}

export interface ClientAttack {
	macaddr: string;
	attack_type: string;
	detected_ap: string;
	detected_time: number;
}

export interface WidsEvent {
	macaddr: string;
	detected_ap: string;
	event_type: string;
	level: string;
	event_time: number;
	radio_band: string;
	description: string;
}

// Type definitions for other AP types
export type SuspectAp = RogueAp;
export type InterferingAp = RogueAp;
export type NeighborAp = RogueAp;
export type ManuallyContainedAp = RogueAp;

/**
 * RAPIDS query parameters
 */
export interface RapidsQueryParams {
	group?: string[];
	label?: string[];
	site?: string[];
	start?: number;
	end?: number;
	from_timestamp?: number;
	to_timestamp?: number;
	offset?: number;
	limit?: number;
	sort?: 'ts' | '-ts' | 'macaddr' | '-macaddr';
	swarm_id?: string;
	calculate_total?: boolean;
}
