/*
* Linkbreakers API
*
* This is a documentation of all the APIs of Linkbreakers
*
* The version of the OpenAPI document: 1.111.8
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// WorkflowStep : Models a node in the Linkbreakers workflow canvas, defining what should occur after a scan (redirects, gates, forms) and how it connects to other steps in the visitor journey.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WorkflowStep {
#[serde(rename = "canvasPosition", skip_serializing_if = "Option::is_none")]
pub canvas_position: Option<Box<models::CanvasPosition>>,
#[serde(rename = "childStepIds", skip_serializing_if = "Option::is_none")]
pub child_step_ids: Option<Vec<String>>,
#[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
/// - EVENT_ACTION_UNSPECIFIED: Event action not specified - EVENT_ACTION_CLIENT_REDIRECT: Redirect visitors to a destination URL - EVENT_ACTION_LINK_VISIT: Entry step triggered when the link is visited. - EVENT_ACTION_PASSWORD_VERIFY: Require visitors to enter a password before proceeding - EVENT_ACTION_FORM_SUBMIT: Present a data collection form to visitors - EVENT_ACTION_CONTACT_CARD: Generate a vCard (VCF) response with contact information - EVENT_ACTION_MULTI_LINK: Present a multi-link page with multiple buttons for different destinations - EVENT_ACTION_VISIT_TYPE_CONDITION: Route visitors based on whether it's a first or returning visit - EVENT_ACTION_COUNTRY_CONDITION: Route visitors based on their country location - EVENT_ACTION_DAY_OF_WEEK_CONDITION: Route visitors based on day of week - EVENT_ACTION_TIME_OF_DAY_CONDITION: Route visitors based on time of day - EVENT_ACTION_DAY_OF_MONTH_CONDITION: Route visitors based on day of month - EVENT_ACTION_SPECIFIC_DATE_CONDITION: Route visitors based on specific calendar dates - EVENT_ACTION_SOCIAL_LINKS_PAGE: Display a social links page (like Linktree) - EVENT_ACTION_DEVICE_TYPE_CONDITION: Route visitors based on device type (e.g. MOBILE, DESKTOP, TABLET) - EVENT_ACTION_DEVICE_PLATFORM_CONDITION: Route visitors based on device platform / operating system (e.g. iOS, Android, macOS) - EVENT_ACTION_DEVICE_BROWSER_CONDITION: Route visitors based on browser family (e.g. Chrome, Safari, Firefox) - EVENT_ACTION_DEVICE_BRAND_CONDITION: Route visitors based on hardware brand (e.g. Apple, Samsung, Google) - EVENT_ACTION_DEVICE_ACTOR_CONDITION: Route visitors based on actor classification (e.g. HUMAN, BOT, AGENT) - EVENT_ACTION_VISITOR_DATA_CONDITION: Route visitors based on their profile data or custom attributes - EVENT_ACTION_THANK_YOU_PAGE: Display a final thank you / completion message (exit step) - EVENT_ACTION_MESSAGE_PAGE: Display an informational message with navigation (button or timer) to the next step
#[serde(rename = "eventAction", skip_serializing_if = "Option::is_none")]
pub event_action: Option<EventAction>,
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
/// - KIND_UNSPECIFIED: Workflow step kind not specified - KIND_ENTRY: Entry steps are automatically triggered when a visitor reaches the workflow - KIND_EXIT: Exit steps finalize the workflow (commonly a redirect) - KIND_INTERACTION: Interaction steps require visitor input (forms, passwords, etc.) - KIND_CONDITION: Condition steps evaluate logic and route to different next steps
#[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
pub kind: Option<Kind>,
#[serde(rename = "linkId", skip_serializing_if = "Option::is_none")]
pub link_id: Option<String>,
/// Node types define how workflow steps manage their outbound connections: COMPOSITE nodes manage their own exit paths through their payload structure. They have multiple possible next steps defined within the payload itself: - Forms: Can have skip and submit paths - Multi-links: Each button has its own next_step_id - Conditions: Each condition outcome routes to a different next_step_id ATOMIC nodes are simple steps with a single, direct connection to the next step. They use the standard parent-child relationship mechanism. Connection Rules: - ✅ Connections TO any node type are allowed - ✅ Connections FROM atomic nodes are allowed - ❌ Direct connections FROM composite nodes are NOT allowed (They manage routing through their payload instead) Example: A multi-link node with 3 buttons defines 3 possible next steps in its payload.buttons[].next_step_id fields, not through direct parent-child relationships. - NODE_TYPE_UNSPECIFIED: Workflow step node type not specified - NODE_TYPE_COMPOSITE: Composite nodes manage multiple exit paths through their payload structure. Examples: FORM_SUBMIT, MULTI_LINK, VISIT_TYPE_CONDITION, COUNTRY_CONDITION, DAY_OF_WEEK_CONDITION, TIME_OF_DAY_CONDITION, DAY_OF_MONTH_CONDITION, SPECIFIC_DATE_CONDITION Connection behavior: Cannot create direct parent-child connections FROM these nodes. They define their next steps within the payload (e.g., button.next_step_id, option.next_step_id). - NODE_TYPE_ATOMIC: Atomic nodes are simple steps with no internal routing logic. Examples: LINK_VISIT, CLIENT_REDIRECT, PASSWORD_VERIFY, CONTACT_CARD Connection behavior: Can create standard parent-child connections to any other node.
#[serde(rename = "nodeType", skip_serializing_if = "Option::is_none")]
pub node_type: Option<NodeType>,
#[serde(rename = "parentStepIds", skip_serializing_if = "Option::is_none")]
pub parent_step_ids: Option<Vec<String>>,
#[serde(rename = "payload", skip_serializing_if = "Option::is_none")]
pub payload: Option<Box<models::WorkflowStepPayload>>,
#[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
pub updated_at: Option<String>,
}
impl WorkflowStep {
/// Models a node in the Linkbreakers workflow canvas, defining what should occur after a scan (redirects, gates, forms) and how it connects to other steps in the visitor journey.
pub fn new() -> WorkflowStep {
WorkflowStep {
canvas_position: None,
child_step_ids: None,
created_at: None,
event_action: None,
id: None,
kind: None,
link_id: None,
node_type: None,
parent_step_ids: None,
payload: None,
updated_at: None,
}
}
}
/// - EVENT_ACTION_UNSPECIFIED: Event action not specified - EVENT_ACTION_CLIENT_REDIRECT: Redirect visitors to a destination URL - EVENT_ACTION_LINK_VISIT: Entry step triggered when the link is visited. - EVENT_ACTION_PASSWORD_VERIFY: Require visitors to enter a password before proceeding - EVENT_ACTION_FORM_SUBMIT: Present a data collection form to visitors - EVENT_ACTION_CONTACT_CARD: Generate a vCard (VCF) response with contact information - EVENT_ACTION_MULTI_LINK: Present a multi-link page with multiple buttons for different destinations - EVENT_ACTION_VISIT_TYPE_CONDITION: Route visitors based on whether it's a first or returning visit - EVENT_ACTION_COUNTRY_CONDITION: Route visitors based on their country location - EVENT_ACTION_DAY_OF_WEEK_CONDITION: Route visitors based on day of week - EVENT_ACTION_TIME_OF_DAY_CONDITION: Route visitors based on time of day - EVENT_ACTION_DAY_OF_MONTH_CONDITION: Route visitors based on day of month - EVENT_ACTION_SPECIFIC_DATE_CONDITION: Route visitors based on specific calendar dates - EVENT_ACTION_SOCIAL_LINKS_PAGE: Display a social links page (like Linktree) - EVENT_ACTION_DEVICE_TYPE_CONDITION: Route visitors based on device type (e.g. MOBILE, DESKTOP, TABLET) - EVENT_ACTION_DEVICE_PLATFORM_CONDITION: Route visitors based on device platform / operating system (e.g. iOS, Android, macOS) - EVENT_ACTION_DEVICE_BROWSER_CONDITION: Route visitors based on browser family (e.g. Chrome, Safari, Firefox) - EVENT_ACTION_DEVICE_BRAND_CONDITION: Route visitors based on hardware brand (e.g. Apple, Samsung, Google) - EVENT_ACTION_DEVICE_ACTOR_CONDITION: Route visitors based on actor classification (e.g. HUMAN, BOT, AGENT) - EVENT_ACTION_VISITOR_DATA_CONDITION: Route visitors based on their profile data or custom attributes - EVENT_ACTION_THANK_YOU_PAGE: Display a final thank you / completion message (exit step) - EVENT_ACTION_MESSAGE_PAGE: Display an informational message with navigation (button or timer) to the next step
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum EventAction {
#[serde(rename = "EVENT_ACTION_UNSPECIFIED")]
EventActionUnspecified,
#[serde(rename = "EVENT_ACTION_CLIENT_REDIRECT")]
EventActionClientRedirect,
#[serde(rename = "EVENT_ACTION_LINK_VISIT")]
EventActionLinkVisit,
#[serde(rename = "EVENT_ACTION_PASSWORD_VERIFY")]
EventActionPasswordVerify,
#[serde(rename = "EVENT_ACTION_FORM_SUBMIT")]
EventActionFormSubmit,
#[serde(rename = "EVENT_ACTION_CONTACT_CARD")]
EventActionContactCard,
#[serde(rename = "EVENT_ACTION_MULTI_LINK")]
EventActionMultiLink,
#[serde(rename = "EVENT_ACTION_VISIT_TYPE_CONDITION")]
EventActionVisitTypeCondition,
#[serde(rename = "EVENT_ACTION_COUNTRY_CONDITION")]
EventActionCountryCondition,
#[serde(rename = "EVENT_ACTION_DAY_OF_WEEK_CONDITION")]
EventActionDayOfWeekCondition,
#[serde(rename = "EVENT_ACTION_TIME_OF_DAY_CONDITION")]
EventActionTimeOfDayCondition,
#[serde(rename = "EVENT_ACTION_DAY_OF_MONTH_CONDITION")]
EventActionDayOfMonthCondition,
#[serde(rename = "EVENT_ACTION_SPECIFIC_DATE_CONDITION")]
EventActionSpecificDateCondition,
#[serde(rename = "EVENT_ACTION_SOCIAL_LINKS_PAGE")]
EventActionSocialLinksPage,
#[serde(rename = "EVENT_ACTION_DEVICE_TYPE_CONDITION")]
EventActionDeviceTypeCondition,
#[serde(rename = "EVENT_ACTION_DEVICE_PLATFORM_CONDITION")]
EventActionDevicePlatformCondition,
#[serde(rename = "EVENT_ACTION_DEVICE_BROWSER_CONDITION")]
EventActionDeviceBrowserCondition,
#[serde(rename = "EVENT_ACTION_DEVICE_BRAND_CONDITION")]
EventActionDeviceBrandCondition,
#[serde(rename = "EVENT_ACTION_DEVICE_ACTOR_CONDITION")]
EventActionDeviceActorCondition,
#[serde(rename = "EVENT_ACTION_VISITOR_DATA_CONDITION")]
EventActionVisitorDataCondition,
#[serde(rename = "EVENT_ACTION_THANK_YOU_PAGE")]
EventActionThankYouPage,
#[serde(rename = "EVENT_ACTION_MESSAGE_PAGE")]
EventActionMessagePage,
}
impl Default for EventAction {
fn default() -> EventAction {
Self::EventActionUnspecified
}
}
/// - KIND_UNSPECIFIED: Workflow step kind not specified - KIND_ENTRY: Entry steps are automatically triggered when a visitor reaches the workflow - KIND_EXIT: Exit steps finalize the workflow (commonly a redirect) - KIND_INTERACTION: Interaction steps require visitor input (forms, passwords, etc.) - KIND_CONDITION: Condition steps evaluate logic and route to different next steps
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Kind {
#[serde(rename = "KIND_UNSPECIFIED")]
KindUnspecified,
#[serde(rename = "KIND_ENTRY")]
KindEntry,
#[serde(rename = "KIND_EXIT")]
KindExit,
#[serde(rename = "KIND_INTERACTION")]
KindInteraction,
#[serde(rename = "KIND_CONDITION")]
KindCondition,
}
impl Default for Kind {
fn default() -> Kind {
Self::KindUnspecified
}
}
/// Node types define how workflow steps manage their outbound connections: COMPOSITE nodes manage their own exit paths through their payload structure. They have multiple possible next steps defined within the payload itself: - Forms: Can have skip and submit paths - Multi-links: Each button has its own next_step_id - Conditions: Each condition outcome routes to a different next_step_id ATOMIC nodes are simple steps with a single, direct connection to the next step. They use the standard parent-child relationship mechanism. Connection Rules: - ✅ Connections TO any node type are allowed - ✅ Connections FROM atomic nodes are allowed - ❌ Direct connections FROM composite nodes are NOT allowed (They manage routing through their payload instead) Example: A multi-link node with 3 buttons defines 3 possible next steps in its payload.buttons[].next_step_id fields, not through direct parent-child relationships. - NODE_TYPE_UNSPECIFIED: Workflow step node type not specified - NODE_TYPE_COMPOSITE: Composite nodes manage multiple exit paths through their payload structure. Examples: FORM_SUBMIT, MULTI_LINK, VISIT_TYPE_CONDITION, COUNTRY_CONDITION, DAY_OF_WEEK_CONDITION, TIME_OF_DAY_CONDITION, DAY_OF_MONTH_CONDITION, SPECIFIC_DATE_CONDITION Connection behavior: Cannot create direct parent-child connections FROM these nodes. They define their next steps within the payload (e.g., button.next_step_id, option.next_step_id). - NODE_TYPE_ATOMIC: Atomic nodes are simple steps with no internal routing logic. Examples: LINK_VISIT, CLIENT_REDIRECT, PASSWORD_VERIFY, CONTACT_CARD Connection behavior: Can create standard parent-child connections to any other node.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum NodeType {
#[serde(rename = "NODE_TYPE_UNSPECIFIED")]
NodeTypeUnspecified,
#[serde(rename = "NODE_TYPE_COMPOSITE")]
NodeTypeComposite,
#[serde(rename = "NODE_TYPE_ATOMIC")]
NodeTypeAtomic,
}
impl Default for NodeType {
fn default() -> NodeType {
Self::NodeTypeUnspecified
}
}