feagi-api 0.0.12

FEAGI REST API layer with HTTP and ZMQ transport adapters
Documentation
// Copyright 2025 Neuraville Inc.
// Licensed under the Apache License, Version 2.0

//! Insight API Endpoints - Exact port from Python `/v1/insight/*`

// Removed - using crate::common::State instead
use crate::common::ApiState;
use crate::common::{ApiError, ApiResult, Json, State};
use std::collections::HashMap;

/// Get membrane potential status for multiple neurons.
#[utoipa::path(
    post,
    path = "/v1/insight/neurons/membrane_potential_status",
    tag = "insight"
)]
pub async fn post_neurons_membrane_potential_status(
    State(_state): State<ApiState>,
    Json(_req): Json<HashMap<String, serde_json::Value>>,
) -> ApiResult<Json<HashMap<String, f32>>> {
    Err(ApiError::internal("Not yet implemented"))
}

/// Get synaptic potential status for a specific neuron.
#[utoipa::path(
    post,
    path = "/v1/insight/neuron/synaptic_potential_status",
    tag = "insight"
)]
pub async fn post_neuron_synaptic_potential_status(
    State(_state): State<ApiState>,
    Json(_req): Json<HashMap<String, serde_json::Value>>,
) -> ApiResult<Json<serde_json::Value>> {
    Err(ApiError::internal("Not yet implemented"))
}

/// Set membrane potential for multiple neurons.
#[utoipa::path(
    post,
    path = "/v1/insight/neurons/membrane_potential_set",
    tag = "insight"
)]
pub async fn post_neurons_membrane_potential_set(
    State(_state): State<ApiState>,
    Json(_req): Json<HashMap<String, serde_json::Value>>,
) -> ApiResult<Json<HashMap<String, String>>> {
    Err(ApiError::internal("Not yet implemented"))
}

/// Set synaptic potential for a specific neuron.
#[utoipa::path(
    post,
    path = "/v1/insight/neuron/synaptic_potential_set",
    tag = "insight"
)]
pub async fn post_neuron_synaptic_potential_set(
    State(_state): State<ApiState>,
    Json(_req): Json<HashMap<String, serde_json::Value>>,
) -> ApiResult<Json<HashMap<String, String>>> {
    Err(ApiError::internal("Not yet implemented"))
}

/// Get analytics data for neural activity and performance insights.
#[utoipa::path(get, path = "/v1/insight/analytics", tag = "insight")]
pub async fn get_analytics(
    State(_state): State<ApiState>,
) -> ApiResult<Json<HashMap<String, serde_json::Value>>> {
    Ok(Json(HashMap::new()))
}

/// Get detailed insight data for debugging and analysis.
#[utoipa::path(get, path = "/v1/insight/data", tag = "insight")]
pub async fn get_data(
    State(_state): State<ApiState>,
) -> ApiResult<Json<HashMap<String, serde_json::Value>>> {
    Ok(Json(HashMap::new()))
}