use crate::model::EdgeKind;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct Node {
pub id: String,
pub name: String,
pub kind: String,
pub repo: String,
pub location: String,
pub signature: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct FlowStep {
pub node: Node,
pub depth: usize,
pub via: String,
pub from: String,
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct Hop {
pub node: Node,
pub depth: usize,
pub via: EdgeKind,
}
#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
pub struct Zoom {
pub focus: Option<Node>,
pub container: Option<Node>,
pub members: Vec<Node>,
pub callers: Vec<Node>,
pub callees: Vec<Node>,
pub importers: Vec<Node>,
pub contracts: Vec<ContractRole>,
pub providers: Vec<Node>,
pub consumers: Vec<Node>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct ContractRole {
pub role: EdgeKind,
pub contract: Node,
pub counterparts: Vec<Node>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct ContractView {
pub contract: Node,
pub providers: Vec<Node>,
pub consumers: Vec<Node>,
}
pub const CONTRACTS: &str = "_contracts";