Skip to main content

bios_sdk_invoke/clients/
flow_client.rs

1use serde::{Deserialize, Serialize};
2
3#[cfg(feature = "event")]
4pub mod event {
5    use asteroid_mq::prelude::*;
6
7    use super::{FlowFrontChangeReq, FlowPostChangeReq};
8    pub const FLOW_AVATAR: &str = "flow";
9    pub const EVENT_FRONT_CHANGE: &str = "flow/front_change";
10    pub const EVENT_POST_CHANGE: &str = "flow/post_change";
11
12    impl EventAttribute for FlowFrontChangeReq {
13        const SUBJECT: Subject = Subject::const_new("flow/front_change");
14    }
15    impl EventAttribute for FlowPostChangeReq {
16        const SUBJECT: Subject = Subject::const_new("flow/post_change");
17    }
18}
19
20#[derive(Debug, Clone, Serialize, Deserialize, Default)]
21pub struct FlowFrontChangeReq {
22    pub inst_id: String,
23}
24
25#[derive(Debug, Clone, Serialize, Deserialize, Default)]
26pub struct FlowPostChangeReq {
27    pub inst_id: String,
28    pub next_transition_id: String,
29}