1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! Node model for workflow definition.
use ;
/// Represents a node in a workflow definition.
///
/// Nodes are the building blocks of a workflow, each performing a specific action
/// such as HTTP requests, code execution, conditional branching, or agent calls.
///
/// # Example
///
/// ```rust
/// use actflow::NodeModel;
/// use serde_json::json;
///
/// let node = NodeModel {
/// id: "http_node".to_string(),
/// title: "Fetch Data".to_string(),
/// desc: "Fetch data from API".to_string(),
/// uses: "http_request".to_string(),
/// action: json!({
/// "url": "https://api.example.com/data",
/// "method": "GET"
/// }),
/// ..Default::default()
/// };
/// ```