1use serde::{Deserialize, Serialize};
2use std::collections::HashMap;
3use wakflo_common::prelude::StepType;
4use wakflo_common::EntityConnector;
5
6#[derive(PartialEq, Eq, Serialize, Deserialize, Clone, Debug, Default)]
11pub struct ConnectorStepMetadata {
12 pub name: String,
14
15 pub is_trigger: bool,
17}
18
19#[derive(PartialEq, Eq, Serialize, Deserialize, Clone, Debug, Default)]
24pub struct ConnectorStepProperties {
25 pub input: HashMap<String, serde_json::Value>,
26
27 pub output: HashMap<String, serde_json::Value>,
28}
29
30#[derive(PartialEq, Eq, Serialize, Deserialize, Clone, Debug, Default)]
35#[cfg_attr(feature = "sql", derive(sea_orm::FromJsonQueryResult))]
36pub struct ConnectorStepData {
37 pub properties: serde_json::Value,
38}
39
40#[derive(PartialEq, Eq, Serialize, Deserialize, Clone, Debug, Default)]
45pub struct ConnectorStep {
46 pub id: String,
48
49 pub label: String,
51
52 #[serde(alias = "type", rename(serialize = "type"))]
53 pub _type: StepType,
54
55 pub name: String,
57
58 pub path: Vec<String>,
60
61 pub icon: String,
63
64 pub is_trigger: bool,
66
67 pub reference: Option<EntityConnector>,
68
69 pub children: Option<Vec<ConnectorStep>>,
70
71 pub data: ConnectorStepData,
73}
74
75#[derive(PartialEq, Eq, Serialize, Deserialize, Clone, Debug, Default)]
80pub struct StepEdge {
81 pub id: String,
83
84 pub target: String,
86
87 pub source: String,
89
90 pub style: Option<HashMap<String, String>>,
92
93 #[serde(alias = "type")]
94 pub _type: serde_json::Value,
95}