Files
Shadowbroker/frontend/src/lib/entityGraph.ts
T
BigBodyCobain af9b3d08cc feat: Telegram OSINT map layer, Osiris intel ports, and maritime settings
Add Telegram OSINT with hourly incremental t.me scraping, metro geocoding
separate from news centroids, threat-intercept popup UI with inline media,
and HTML markers above alert boxes so pins stay clickable. Expose GFW_API_TOKEN
in onboarding and Settings Maritime; harden GFW/CCTV/geo fetchers. Port Osiris-
derived recon, SCM, entity graph, malware/cyber feeds, sanctions, and submarine
cable layers with tests and documentation.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-08 21:04:08 -06:00

23 lines
713 B
TypeScript

import type { SelectedEntity } from '@/types/dashboard';
const GRAPH_TYPES = new Set(['aircraft', 'vessel', 'company', 'person', 'ip', 'country']);
const SELECTION_TO_GRAPH: Record<string, string> = {
flight: 'aircraft',
private_flight: 'aircraft',
military_flight: 'aircraft',
private_jet: 'aircraft',
tracked_flight: 'aircraft',
ship: 'vessel',
};
export function mapEntityToGraphType(type: string): string | null {
const mapped = SELECTION_TO_GRAPH[type] || type;
return GRAPH_TYPES.has(mapped) ? mapped : null;
}
export function isEntityGraphEligible(entity: SelectedEntity | null | undefined): boolean {
if (!entity) return false;
return mapEntityToGraphType(entity.type) !== null;
}