from enum import StrEnum


class ErrorCode(StrEnum):
    INTERNAL_SERVER_ERROR = "A001"
    LOGIN_ERROR = "A002"
    UNAUTHORIZED = "A003"
    FORBIDDEN_ROLE_ERROR = "A004"
    CREATE_API_TOKEN_ERROR = "A005"
    DELETE_API_TOKEN_ERROR = "A006"
    REQUESTED_TOKEN_NOT_FOUND = "A007"
    FIND_ALL_API_TOKENS_ERROR = "A008"
    GET_PUBLIC_KEY_ERROR = "A009"
    ENABLE_NODE_ERROR = "A010"
    NODE_NOT_FOUND = "A011"
    CONFIG_NOT_FOUND = "A012"
    UPDATE_CONFIG_ERROR = "A013"
    GET_CONFIG_ERROR = "A014"
    DELETE_MANY_INBOUNDS_ERROR = "A015"
    CREATE_MANY_INBOUNDS_ERROR = "A016"
    FIND_ALL_INBOUNDS_ERROR = "A017"
    CREATE_USER_ERROR = "A018"
    USER_USERNAME_ALREADY_EXISTS = "A019"
    USER_SHORT_UUID_ALREADY_EXISTS = "A020"
    USER_SUBSCRIPTION_UUID_ALREADY_EXISTS = "A021"
    CREATE_USER_WITH_INBOUNDS_ERROR = "A022"
    CANT_GET_CREATED_USER_WITH_INBOUNDS = "A023"
    GET_ALL_USERS_ERROR = "A024"
    USER_NOT_FOUND = "A025"
    GET_USER_BY_ERROR = "A026"
    REVOKE_USER_SUBSCRIPTION_ERROR = "A027"
    DISABLE_USER_ERROR = "A028"
    USER_ALREADY_DISABLED = "A029"
    USER_ALREADY_ENABLED = "A030"
    ENABLE_USER_ERROR = "A031"
    CREATE_NODE_ERROR = "A032"
    NODE_NAME_ALREADY_EXISTS = "A033"
    NODE_ADDRESS_ALREADY_EXISTS = "A034"
    NODE_ERROR_WITH_MSG = "N001"
    NODE_ERROR_500_WITH_MSG = "N002"
    RESTART_NODE_ERROR = "A035"
    GET_CONFIG_WITH_USERS_ERROR = "A036"
    DELETE_USER_ERROR = "A037"
    UPDATE_NODE_ERROR = "A038"
    UPDATE_USER_ERROR = "A039"
    INCREMENT_USED_TRAFFIC_ERROR = "A040"
    GET_ALL_NODES_ERROR = "A041"
    GET_ONE_NODE_ERROR = "A042"
    DELETE_NODE_ERROR = "A043"
    CREATE_HOST_ERROR = "A044"
    HOST_REMARK_ALREADY_EXISTS = "A045"
    HOST_NOT_FOUND = "A046"
    DELETE_HOST_ERROR = "A047"
    GET_USER_STATS_ERROR = "A048"
    UPDATE_USER_WITH_INBOUNDS_ERROR = "A049"
    GET_ALL_HOSTS_ERROR = "A050"
    REORDER_HOSTS_ERROR = "A051"
    UPDATE_HOST_ERROR = "A052"
    CREATE_CONFIG_ERROR = "A053"
    ENABLED_NODES_NOT_FOUND = "A054"
    GET_NODES_USAGE_BY_RANGE_ERROR = "A055"
    RESET_USER_TRAFFIC_ERROR = "A056"
    REORDER_NODES_ERROR = "A057"
    GET_ALL_INBOUNDS_ERROR = "A058"
    BULK_DELETE_USERS_BY_STATUS_ERROR = "A059"
    UPDATE_INBOUND_ERROR = "A060"
    CONFIG_VALIDATION_ERROR = "A061"
    USERS_NOT_FOUND = "A062"
    GET_USER_BY_UNIQUE_FIELDS_NOT_FOUND = "A063"
    UPDATE_EXCEEDED_TRAFFIC_USERS_ERROR = "A064"
    ADMIN_NOT_FOUND = "A065"
    CREATE_ADMIN_ERROR = "A066"
    GET_AUTH_STATUS_ERROR = "A067"
    FORBIDDEN_ONE = "A068"
    FORBIDDEN_TWO = "E000"
    DISABLE_NODE_ERROR = "A069"
    GET_ONE_HOST_ERROR = "A070"
    SUBSCRIPTION_SETTINGS_NOT_FOUND = "A071"
    GET_SUBSCRIPTION_SETTINGS_ERROR = "A072"
    UPDATE_SUBSCRIPTION_SETTINGS_ERROR = "A073"
    CREATE_INBOUND_ERROR = "A074"
    DELETE_INBOUND_ERROR = "A075"
    GET_INBOUND_ERROR = "A076"
    INBOUND_NOT_FOUND = "A077"
    INBOUND_TAG_ALREADY_EXISTS = "A078"
    CREATE_HOST_BULK_ACTION_ERROR = "A079"
    DELETE_HOST_BULK_ACTION_ERROR = "A080"
    UPDATE_HOST_BULK_ACTION_ERROR = "A081"
    BULK_ACTION_NOT_FOUND = "A082"
    GET_USERS_STATS_ERROR = "A083"
    RESET_USERS_TRAFFIC_BULK_ERROR = "A084"
    UPDATE_USERS_BULK_ERROR = "A085"
    DELETE_USERS_BULK_ERROR = "A086"
    GET_USERS_BULK_ERROR = "A087"
    CREATE_TEMPLATE_ERROR = "A088"
    TEMPLATE_NOT_FOUND = "A089"
    UPDATE_TEMPLATE_ERROR = "A090"
    DELETE_TEMPLATE_ERROR = "A091"
    TEMPLATE_NAME_ALREADY_EXISTS = "A092"
    GET_TEMPLATE_ERROR = "A093"
    GET_ALL_TEMPLATES_ERROR = "A094"
    GENERATE_CONFIG_ERROR = "A095"
    INVALID_TEMPLATE_TYPE = "A096"
    CREATE_EXTERNAL_SQUAD_ERROR = "A097"
    EXTERNAL_SQUAD_NOT_FOUND = "A098"
    UPDATE_EXTERNAL_SQUAD_ERROR = "A099"
    DELETE_EXTERNAL_SQUAD_ERROR = "A100"
    EXTERNAL_SQUAD_NAME_ALREADY_EXISTS = "A101"
    ADD_USERS_TO_EXTERNAL_SQUAD_ERROR = "A102"
    REMOVE_USERS_FROM_EXTERNAL_SQUAD_ERROR = "A103"
    GET_EXTERNAL_SQUAD_ERROR = "A104"
    GET_ALL_EXTERNAL_SQUADS_ERROR = "A105"
    CREATE_INTERNAL_SQUAD_ERROR = "A106"
    INTERNAL_SQUAD_NOT_FOUND = "A107"
    UPDATE_INTERNAL_SQUAD_ERROR = "A108"
    DELETE_INTERNAL_SQUAD_ERROR = "A109"
    INTERNAL_SQUAD_NAME_ALREADY_EXISTS = "A110"
    GET_INTERNAL_SQUAD_ERROR = "A111"
    GET_ALL_INTERNAL_SQUADS_ERROR = "A112"
    CREATE_WEBHOOK_ERROR = "A113"
    WEBHOOK_NOT_FOUND = "A114"
    UPDATE_WEBHOOK_ERROR = "A115"
    DELETE_WEBHOOK_ERROR = "A116"
    WEBHOOK_URL_ALREADY_EXISTS = "A117"
    GET_WEBHOOK_ERROR = "A118"
    GET_ALL_WEBHOOKS_ERROR = "A119"
    WEBHOOK_DELIVERY_ERROR = "A120"
    CREATE_PASSKEY_ERROR = "A121"
    PASSKEY_NOT_FOUND = "A122"
    DELETE_PASSKEY_ERROR = "A123"
    GET_PASSKEY_ERROR = "A124"
    GET_ALL_PASSKEYS_ERROR = "A125"
    PASSKEY_ALREADY_EXISTS = "A126"
    CREATE_SNIPPET_ERROR = "A127"
    SNIPPET_NOT_FOUND = "A128"
    UPDATE_SNIPPET_ERROR = "A129"
    DELETE_SNIPPET_ERROR = "A130"
    SNIPPET_NAME_ALREADY_EXISTS = "A131"
    GET_SNIPPET_ERROR = "A132"
    GET_ALL_SNIPPETS_ERROR = "A133"
    HWID_RESET_ERROR = "A134"
    HWID_NOT_FOUND = "A135"
    GET_HWID_ERROR = "A136"
    GET_ALL_HWIDS_ERROR = "A137"
    DELETE_HWID_ERROR = "A138"
    BANDWIDTH_STATS_ERROR = "A139"
    GET_NODES_USAGE_STATS_ERROR = "A140"
    SUBSCRIPTION_REQUEST_ERROR = "A141"
    SUBSCRIPTION_REQUEST_NOT_FOUND = "A142"
    GET_SUBSCRIPTION_REQUEST_ERROR = "A143"
    GET_ALL_SUBSCRIPTION_REQUESTS_ERROR = "A144"
    APPROVE_SUBSCRIPTION_REQUEST_ERROR = "A145"
    REJECT_SUBSCRIPTION_REQUEST_ERROR = "A146"
    CREATE_SUBSCRIPTION_REQUEST_HISTORY_ERROR = "A147"
    GET_SUBSCRIPTION_REQUEST_HISTORY_ERROR = "A148"
    KEYGEN_ERROR = "A149"
    GENERATE_KEYS_ERROR = "A150"
    INVALID_KEY_TYPE = "A151"
    SYSTEM_STATS_ERROR = "A152"
    SYSTEM_HEALTH_ERROR = "A153"
    NODES_METRICS_ERROR = "A154"
    X25519_KEYGEN_ERROR = "A155"
    HAPP_CRYPTO_ERROR = "A156"
    SRR_MATCHER_ERROR = "A157"
    GET_REMNAWAVE_SETTINGS_ERROR = "A158"
    UPDATE_REMNAWAVE_SETTINGS_ERROR = "A159"
    OAUTH_ERROR = "A160"
    PASSKEY_SETTINGS_ERROR = "A161"
    TELEGRAM_AUTH_ERROR = "A162"
    BRANDING_SETTINGS_ERROR = "A163"
    CONFIG_PROFILE_ERROR = "A164"
    CONFIG_PROFILE_NOT_FOUND = "A165"
    CREATE_CONFIG_PROFILE_ERROR = "A166"
    UPDATE_CONFIG_PROFILE_ERROR = "A167"
    DELETE_CONFIG_PROFILE_ERROR = "A168"
    GET_CONFIG_PROFILE_ERROR = "A169"
    GET_ALL_CONFIG_PROFILES_ERROR = "A170"
    XRAY_CONFIG_ERROR = "A171"
    XRAY_CONFIG_VALIDATION_ERROR = "A172"
    INFRA_BILLING_ERROR = "A173"
    INFRA_BILLING_NOT_FOUND = "A174"
    GET_INFRA_BILLING_ERROR = "A175"
    UPDATE_INFRA_BILLING_ERROR = "A176"
    CALCULATE_BILLING_ERROR = "A177"
    BILLING_PERIOD_ERROR = "A178"
    
    # Добавляем новые коды из failed тестов
    CREATE_SUBSCRIPTION_TEMPLATE_ERROR = "A179"
    SUBSCRIPTION_TEMPLATE_NOT_FOUND = "A180"
    UPDATE_SUBSCRIPTION_TEMPLATE_ERROR = "A181"
    DELETE_SUBSCRIPTION_TEMPLATE_ERROR = "A182"
    GET_SUBSCRIPTION_TEMPLATE_ERROR = "A183"
    
    # Валидационные ошибки
    VALIDATION_ERROR = "V001"
    INVALID_UUID_FORMAT = "V002"
    INVALID_EMAIL_FORMAT = "V003"
    INVALID_DATE_FORMAT = "V004"
    REQUIRED_FIELD_MISSING = "V005"
    FIELD_TOO_LONG = "V006"
    FIELD_TOO_SHORT = "V007"
    INVALID_ENUM_VALUE = "V008"
    INVALID_REGEX_PATTERN = "V009"
    NUMERIC_VALIDATION_ERROR = "V010"
    
    # Сетевые ошибки
    NETWORK_ERROR = "N003"
    TIMEOUT_ERROR = "N004"
    CONNECTION_ERROR = "N005"
    DNS_ERROR = "N006"
    SSL_ERROR = "N007"
    
    # Ошибки аутентификации и авторизации
    INVALID_TOKEN = "AUTH001"
    TOKEN_EXPIRED = "AUTH002"
    INVALID_CREDENTIALS = "AUTH003"
    TWO_FACTOR_REQUIRED = "AUTH004"
    ACCOUNT_LOCKED = "AUTH005"
    PASSWORD_COMPLEXITY_ERROR = "AUTH006"
    
    # Ошибки бизнес-логики
    TRAFFIC_LIMIT_EXCEEDED = "BL001"
    USER_LIMIT_EXCEEDED = "BL002"
    SUBSCRIPTION_EXPIRED = "BL003"
    FEATURE_NOT_AVAILABLE = "BL004"
    QUOTA_EXCEEDED = "BL005"
    RESOURCE_LOCKED = "BL006"
    
    # Общие коды
    UNKNOWN = "UNKNOWN"
    NOT_IMPLEMENTED = "NOT_IMPLEMENTED"
    MAINTENANCE_MODE = "MAINTENANCE"
    RATE_LIMIT_EXCEEDED = "RATE_LIMIT"