# This file was auto-generated by Fern from our API Definition.

import typing

import typing_extensions
from .conditional_next_entry import ConditionalNextEntryParams
from .conditional_step_definition_config import ConditionalStepDefinitionConfigParams


class ConditionalStepDefinitionParams(typing_extensions.TypedDict):
    """
    Routes to different next steps based on ordered conditional branches evaluated against upstream step outputs.

    See the [Conditional step docs](https://docs.extend.ai/2026-02-09/product/workflows/configuring-workflows-via-api#conditional-step).
    """

    name: str
    config: ConditionalStepDefinitionConfigParams
    next: typing_extensions.NotRequired[typing.Sequence[ConditionalNextEntryParams]]
    """
    Each entry should include a `conditionId` matching a `config.conditions[].id` value.
    
    See the [Conditional step docs](https://docs.extend.ai/2026-02-09/product/workflows/configuring-workflows-via-api#conditional-step).
    """
