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

import typing

import typing_extensions
from .rule_validation_next_entry import RuleValidationNextEntryParams
from .rule_validation_step_definition_config import RuleValidationStepDefinitionConfigParams


class RuleValidationStepDefinitionParams(typing_extensions.TypedDict):
    """
    Validates extraction outputs against formula-based rules. Routes to pass/fail next steps.

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

    name: str
    config: typing_extensions.NotRequired[RuleValidationStepDefinitionConfigParams]
    """
    Optional on create/update. Required before the workflow can be deployed. Omitted in responses when the step is not yet configured.
    """

    next: typing_extensions.NotRequired[typing.Sequence[RuleValidationNextEntryParams]]
    """
    Can only be set when `config` is present. Each entry must include a `result` of `"pass"` or `"fail"` to route based on whether all validation rules passed.
    
    See the [Rule Validation step docs](https://docs.extend.ai/2026-02-09/product/workflows/configuring-workflows-via-api#rule-validation-step).
    """
