# MIT License
# 
# Copyright (c) 2021 Yusuf Cihan
# 
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

__all__ = ["ConduitStatus"]

from enum import Enum

class ConduitStatus(Enum):
    # The step has not executed yet.
    NONE = -1
    # Exited without any errors.
    DONE = 0
    # This step has skipped because of previous failed steps.
    SKIPPED = 100
    # All general unexpected errors.
    UNHANDLED_EXCEPTION = 101
    # This action can't found.
    BLOCK_NOT_FOUND = 102
    # Duplicate step IDs has detected.
    DUPLICATE_STEP_IDS = 104
    # This block is forbidden to use.
    FORBIDDEN_BLOCK = 105
    # Pydantic validation errors.
    INVALID_TYPE = 107
    # Step limit has been exceed.
    STEP_LIMIT_EXCEED = 108
    # Block limit has been exceed.
    BLOCK_LIMIT_EXCEED = 109
    # If condition failed.
    IF_CONDITION_FAILED = 110

    # Block specific errors:

    # Used in "assert" blocks.
    ASSERTION_ERROR = 106
    # Invalid argument has provided for function.
    INVALID_ARGUMENT = 103
