Overview

The WorkflowListResponse struct represents the response returned when fetching a paginated list of AI workflows.

Definition

pub struct WorkflowListResponse {
    pub data: Vec<AiWorkflow>,
    pub has_more: bool,
}

Fields

data
Vec<AiWorkflow>
required
A vector containing the AI workflows for the current page. Each workflow is represented by an AiWorkflow struct.
has_more
bool
required
Indicates whether there are more workflows available beyond the current page. Used for pagination.

Usage Example

use wacht::api::workflows::*;

let options = ListWorkflowsOptions {
    page: Some(1),
    per_page: Some(20),
    search: None,
    is_active: Some(true),
};

let response = fetch_workflows(Some(options)).await?;

println!("Found {} workflows", response.data.len());
if response.has_more {
    println!("More workflows available on next page");
}

for workflow in response.data {
    println!("Workflow: {} - {}", workflow.name, workflow.description);
    println!("  Steps: {}", workflow.steps.len());
    println!("  Active: {}", workflow.is_active);
}

See Also