pub struct Workflows<'a> { /* private fields */ }Implementations§
Source§impl<'a> Workflows<'a>
impl<'a> Workflows<'a>
Sourcepub async fn create_staging(
&self,
topic_id: i64,
workflow_id: i64,
) -> Result<(), Error>
pub async fn create_staging( &self, topic_id: i64, workflow_id: i64, ) -> Result<(), Error>
Add a topic to a workflow. HEY places it in the first stage.
Sourcepub async fn get(
&self,
workflow_id: i64,
) -> Result<GetWorkflowResponseContent, Error>
pub async fn get( &self, workflow_id: i64, ) -> Result<GetWorkflowResponseContent, Error>
A workflow with its stages
Sourcepub async fn get_stage(
&self,
workflow_id: i64,
stage_id: i64,
) -> Result<GetWorkflowStageOutputPayload, Error>
pub async fn get_stage( &self, workflow_id: i64, stage_id: i64, ) -> Result<GetWorkflowStageOutputPayload, Error>
A workflow stage and its cards, served as HTML by HEY.
Sourcepub async fn move_staging(
&self,
topic_id: i64,
workflow_id: i64,
body: &MoveWorkflowStagingRequestContent,
) -> Result<(), Error>
pub async fn move_staging( &self, topic_id: i64, workflow_id: i64, body: &MoveWorkflowStagingRequestContent, ) -> Result<(), Error>
Move a staged topic to a workflow stage.
Source§impl Workflows<'_>
impl Workflows<'_>
Sourcepub async fn list(&self, account_id: i64) -> Result<Vec<WorkflowSummary>, Error>
pub async fn list(&self, account_id: i64) -> Result<Vec<WorkflowSummary>, Error>
The workflows on an account.
The autocomplete endpoint answers bare [id, name, account name] rows, and answers
304 to a conditional request — the SDK sends none here, so this always comes back
populated.
Sourcepub async fn stages(
&self,
workflow_id: i64,
) -> Result<Vec<WorkflowStage>, Error>
pub async fn stages( &self, workflow_id: i64, ) -> Result<Vec<WorkflowStage>, Error>
A workflow’s stages, in position order.
Sourcepub async fn stage(
&self,
workflow_id: i64,
stage_id: i64,
) -> Result<WorkflowStageView, Error>
pub async fn stage( &self, workflow_id: i64, stage_id: i64, ) -> Result<WorkflowStageView, Error>
One stage and the threads on it, read out of the page HEY serves for the stage —
what Workflows::get_stage answers as HTML, parsed. HEY lists a stage’s threads
nowhere else.
Sourcepub async fn create(
&self,
name: &str,
account_id: Option<i64>,
) -> Result<(), Error>
pub async fn create( &self, name: &str, account_id: Option<i64>, ) -> Result<(), Error>
Adds a workflow. No account — None or a zero id — leaves HEY to pick your first.
Sourcepub async fn update(&self, workflow_id: i64, name: &str) -> Result<(), Error>
pub async fn update(&self, workflow_id: i64, name: &str) -> Result<(), Error>
Renames a workflow.
Sourcepub async fn create_stage(&self, workflow_id: i64) -> Result<(), Error>
pub async fn create_stage(&self, workflow_id: i64) -> Result<(), Error>
Adds a column to a workflow. HEY names it “Untitled”; rename it with
Workflows::update_stage.
Sourcepub async fn update_stage(
&self,
workflow_id: i64,
stage_id: i64,
name: &str,
) -> Result<(), Error>
pub async fn update_stage( &self, workflow_id: i64, stage_id: i64, name: &str, ) -> Result<(), Error>
Renames a workflow column.
Sourcepub async fn delete_stage(
&self,
workflow_id: i64,
stage_id: i64,
) -> Result<(), Error>
pub async fn delete_stage( &self, workflow_id: i64, stage_id: i64, ) -> Result<(), Error>
Removes a workflow column.
Sourcepub async fn stage_topic(
&self,
topic_id: i64,
workflow_id: i64,
stage_id: i64,
) -> Result<(), Error>
pub async fn stage_topic( &self, topic_id: i64, workflow_id: i64, stage_id: i64, ) -> Result<(), Error>
Adds a topic to a workflow in the stage named.
HEY creates the workflow membership before selecting the stage, so a failure to
select it leaves the topic in the workflow’s first stage. The generated
Workflows::create_staging is the first of those two requests on its own.
The stage selection is a quiet send, so the hooks hear
Workflows.CreateWorkflowStaging once and see both requests under it, as they do in
Go.
Sourcepub async fn move_topic_to_stage(
&self,
topic_id: i64,
workflow_id: i64,
stage_id: i64,
) -> Result<(), Error>
pub async fn move_topic_to_stage( &self, topic_id: i64, workflow_id: i64, stage_id: i64, ) -> Result<(), Error>
Moves a staged topic to another stage of its workflow. The generated
Workflows::move_staging sends the same request as JSON, which HEY’s own apps do
not; this one sends the form they do.