feagi_api/common/types.rs
1// Copyright 2025 Neuraville Inc.
2// SPDX-License-Identifier: Apache-2.0
3
4//! Transport-agnostic type aliases for endpoints
5//!
6//! These types allow endpoints to work with both HTTP (axum) and WASM transports
7//! without modification.
8
9#[cfg(feature = "http")]
10pub use crate::transports::http::server::ApiState;
11#[cfg(feature = "http")]
12pub use axum::extract::{Path, Query, State};
13#[cfg(feature = "http")]
14pub use axum::response::Json;
15
16#[cfg(not(feature = "http"))]
17pub use crate::transports::http::server::ApiState;
18#[cfg(not(feature = "http"))]
19pub use crate::transports::wasm::types::{Json, Path, Query, State};