"""User based enums"""


class IAMPolicies:
    """Standard role policies"""
    CAN_VIEW_OTHERS_OPERATIONS: str = 'CAN_VIEW_OTHERS_OPERATIONS'
    CAN_VIEW_OTHERS_WORKFLOWS: str = 'CAN_VIEW_OTHERS_WORKFLOWS'
    CAN_VIEW_OPERATIONS: str = 'CAN_VIEW_OPERATIONS'
    CAN_VIEW_WORKFLOWS: str = 'CAN_VIEW_WORKFLOWS'

    CAN_CREATE_OPERATIONS: str = 'CAN_CREATE_OPERATIONS'
    CAN_CREATE_WORKFLOWS: str = 'CAN_CREATE_WORKFLOWS'

    CAN_MODIFY_OTHERS_WORKFLOWS: str = 'CAN_MODIFY_OTHERS_WORKFLOWS'

    CAN_RUN_WORKFLOWS: str = 'CAN_RUN_WORKFLOWS'

    IS_ADMIN: str = 'IS_ADMIN'


class UserPostAction:
    """HTTP POST action options"""
    MODIFY: str = 'MODIFY'


class RegisterUserExceptionCode:
    """Validation error codes"""
    EMPTY_USERNAME: str = 'EMPTY_USERNAME'
    EMPTY_PASSWORD: str = 'EMPTY_PASSWORD'
    USERNAME_ALREADY_EXISTS: str = 'USERNAME_ALREADY_EXISTS'
    EMAIL_ALREADY_EXISTS: str = 'EMAIL_ALREADY_EXISTS'
    INVALID_EMAIL: str = 'INVALID_EMAIL'
    INVALID_LENGTH_OF_USERNAME: str = 'INVALID_LENGTH_OF_USERNAME'


class TokenType:
    """Auth token type"""
    ACCESS_TOKEN = "access"
    REFRESH_TOKEN = "refresh"
