/** * Types V2 - Carte des réseaux de bifurcation * Source : public/data/reseaux-bifurcation.json */ export interface StructureV2 { id: string nom: string url: string pays: string ville: string famille_principale: 1 | 2 | 3 | 4 | 5 familles_secondaires?: number[] hashtags: string[] type_principal: string badges: { centre_ressources: boolean mouvement_manifeste: boolean contre_pouvoir_spatial: boolean f6_recherche_politique: boolean } description_courte: string description_longue: string pensees: { id: string; label: string; confiance: string }[] sources: { type: string; titre: string; url: string }[] already_in_v1: boolean eligible_v2: boolean // Geocoords (ajoutés par géocodage - peut être null) latitude?: number | null longitude?: number | null } export interface ReseauxBifurcationData { version: string meta: { total_structures: number total_projets_emblematiques: number total_edges_graphe: number familles: { id: number; label: string; color: string }[] hashtags_officiels: string[] } structures: StructureV2[] projets: ProjetEmblematique[] graphe: { edges: GrapheEdge[] } } export interface ProjetEmblematique { id: string nom: string structure_parent: string annee?: number lieu?: string geocoords?: { lat: number; lng: number } | null description: string url?: string | null tags: string[] } export interface GrapheEdge { source: string target: string types: string[] score: number evidence: string } // Mapping StructureV2 vers le format attendu par NavMap (interface Org) // NavMap attend { Id, latitude, longitude, nom, ... } export function structureToMapOrg(s: StructureV2, index: number): { Id: number nom: string latitude?: number | null longitude?: number | null prioritaire?: boolean famille_principale?: number hashtags?: string[] type_principal?: string description_courte?: string } { return { Id: index, nom: s.nom, latitude: s.latitude, longitude: s.longitude, prioritaire: s.badges?.centre_ressources || s.badges?.mouvement_manifeste || s.badges?.contre_pouvoir_spatial, famille_principale: s.famille_principale, hashtags: s.hashtags, type_principal: s.type_principal, description_courte: s.description_courte, } }