# app/exceptions/__init__.py
"""
Custom exception classes for the API.

This module provides frontend-friendly exceptions with consistent error codes,
messages, and HTTP status mappings.
"""

# Admin exceptions
from .admin import (
    AdminOperationException,
    BulkOperationException,
    CannotModifyAdminException,
    CannotModifySelfException,
    ConfirmationRequiredException,
    InvalidAdminActionException,
    UserCannotBeDeletedException,
    UserNotFoundException,
    UserRoleChangeException,
    UserStatusChangeException,
    VendorVerificationException,
)

# Authentication exceptions
from .auth import (
    AdminRequiredException,
    InsufficientPermissionsException,
    InvalidCredentialsException,
    InvalidTokenException,
    TokenExpiredException,
    UserAlreadyExistsException,
    UserNotActiveException,
)

# Base exceptions
from .base import (
    AuthenticationException,
    AuthorizationException,
    BusinessLogicException,
    ConflictException,
    ExternalServiceException,
    RateLimitException,
    ResourceNotFoundException,
    ServiceUnavailableException,
    ValidationException,
    WizamartException,
)

# Code quality exceptions
from .code_quality import (
    InvalidViolationStatusException,
    ScanExecutionException,
    ScanNotFoundException,
    ScanParseException,
    ScanTimeoutException,
    ViolationNotFoundException,
    ViolationOperationException,
)

# Cart exceptions
from .cart import (
    CartItemNotFoundException,
    CartValidationException,
    EmptyCartException,
    InsufficientInventoryForCartException,
    InvalidCartQuantityException,
    ProductNotAvailableForCartException,
)

# Company exceptions
from .company import (
    CompanyAlreadyExistsException,
    CompanyHasVendorsException,
    CompanyNotActiveException,
    CompanyNotFoundException,
    CompanyNotVerifiedException,
    CompanyValidationException,
    InvalidCompanyDataException,
    UnauthorizedCompanyAccessException,
)

# Customer exceptions
from .customer import (
    CustomerAlreadyExistsException,
    CustomerAuthorizationException,
    CustomerNotActiveException,
    CustomerNotFoundException,
    CustomerValidationException,
    DuplicateCustomerEmailException,
    InvalidCustomerCredentialsException,
)

# Inventory exceptions
from .inventory import (
    InsufficientInventoryException,
    InvalidInventoryOperationException,
    InvalidQuantityException,
    InventoryNotFoundException,
    InventoryValidationException,
    LocationNotFoundException,
    NegativeInventoryException,
)

# Marketplace import job exceptions
from .marketplace_import_job import (
    ImportJobAlreadyProcessingException,
    ImportJobCannotBeCancelledException,
    ImportJobCannotBeDeletedException,
    ImportJobNotFoundException,
    ImportJobNotOwnedException,
    ImportRateLimitException,
    InvalidImportDataException,
    InvalidMarketplaceException,
    MarketplaceConnectionException,
    MarketplaceDataParsingException,
    MarketplaceImportException,
)

# Marketplace product exceptions
from .marketplace_product import (
    InvalidGTINException,
    InvalidMarketplaceProductDataException,
    MarketplaceProductAlreadyExistsException,
    MarketplaceProductCSVImportException,
    MarketplaceProductNotFoundException,
    MarketplaceProductValidationException,
)

# Order exceptions
from .order import (
    InvalidOrderStatusException,
    OrderAlreadyExistsException,
    OrderCannotBeCancelledException,
    OrderNotFoundException,
    OrderValidationException,
)

# Product exceptions
from .product import (
    CannotDeleteProductWithInventoryException,
    CannotDeleteProductWithOrdersException,
    InvalidProductDataException,
    ProductAlreadyExistsException,
    ProductNotActiveException,
    ProductNotFoundException,
    ProductNotInCatalogException,
    ProductValidationException,
)

# Team exceptions
from .team import (
    CannotModifyOwnRoleException,
    CannotRemoveOwnerException,
    InsufficientTeamPermissionsException,
    InvalidInvitationDataException,
    InvalidInvitationTokenException,
    InvalidRoleException,
    MaxTeamMembersReachedException,
    RoleNotFoundException,
    TeamInvitationAlreadyAcceptedException,
    TeamInvitationExpiredException,
    TeamInvitationNotFoundException,
    TeamMemberAlreadyExistsException,
    TeamMemberNotFoundException,
    TeamValidationException,
    UnauthorizedTeamActionException,
)

# Vendor exceptions
from .vendor import (
    InsufficientVendorPermissionsException,
    InvalidVendorDataException,
    MaxVendorsReachedException,
    UnauthorizedVendorAccessException,
    VendorAccessDeniedException,
    VendorAlreadyExistsException,
    VendorNotActiveException,
    VendorNotFoundException,
    VendorNotVerifiedException,
    VendorOwnerOnlyException,
    VendorValidationException,
)

# Vendor domain exceptions
from .vendor_domain import (
    DNSVerificationException,
    DomainAlreadyVerifiedException,
    DomainNotVerifiedException,
    DomainVerificationFailedException,
    InvalidDomainFormatException,
    MaxDomainsReachedException,
    MultiplePrimaryDomainsException,
    ReservedDomainException,
    UnauthorizedDomainAccessException,
    VendorDomainAlreadyExistsException,
    VendorDomainNotFoundException,
)

# Vendor theme exceptions
from .vendor_theme import (
    InvalidColorFormatException,
    InvalidFontFamilyException,
    InvalidThemeDataException,
    ThemeOperationException,
    ThemePresetAlreadyAppliedException,
    ThemePresetNotFoundException,
    ThemeValidationException,
    VendorThemeNotFoundException,
)

__all__ = [
    # Base exceptions
    "WizamartException",
    "ValidationException",
    "AuthenticationException",
    "AuthorizationException",
    "ResourceNotFoundException",
    "ConflictException",
    "BusinessLogicException",
    "ExternalServiceException",
    "RateLimitException",
    "ServiceUnavailableException",
    # Auth exceptions
    "InvalidCredentialsException",
    "TokenExpiredException",
    "InvalidTokenException",
    "InsufficientPermissionsException",
    "UserNotActiveException",
    "AdminRequiredException",
    "UserAlreadyExistsException",
    # Customer exceptions
    "CustomerNotFoundException",
    "CustomerAlreadyExistsException",
    "DuplicateCustomerEmailException",
    "CustomerNotActiveException",
    "InvalidCustomerCredentialsException",
    "CustomerValidationException",
    "CustomerAuthorizationException",
    # Team exceptions
    "TeamMemberNotFoundException",
    "TeamMemberAlreadyExistsException",
    "TeamInvitationNotFoundException",
    "TeamInvitationExpiredException",
    "TeamInvitationAlreadyAcceptedException",
    "UnauthorizedTeamActionException",
    "CannotRemoveOwnerException",
    "CannotModifyOwnRoleException",
    "RoleNotFoundException",
    "InvalidRoleException",
    "InsufficientTeamPermissionsException",
    "MaxTeamMembersReachedException",
    "TeamValidationException",
    "InvalidInvitationDataException",
    "InvalidInvitationTokenException",
    # Inventory exceptions
    "InventoryNotFoundException",
    "InsufficientInventoryException",
    "InvalidInventoryOperationException",
    "InventoryValidationException",
    "NegativeInventoryException",
    "InvalidQuantityException",
    "LocationNotFoundException",
    # Vendor exceptions
    "InsufficientVendorPermissionsException",
    "InvalidVendorDataException",
    "MaxVendorsReachedException",
    "UnauthorizedVendorAccessException",
    "VendorAccessDeniedException",
    "VendorAlreadyExistsException",
    "VendorNotActiveException",
    "VendorNotFoundException",
    "VendorNotVerifiedException",
    "VendorOwnerOnlyException",
    "VendorValidationException",
    # Vendor Domain
    "VendorDomainNotFoundException",
    "VendorDomainAlreadyExistsException",
    "InvalidDomainFormatException",
    "ReservedDomainException",
    "DomainNotVerifiedException",
    "DomainVerificationFailedException",
    "DomainAlreadyVerifiedException",
    "MultiplePrimaryDomainsException",
    "DNSVerificationException",
    "MaxDomainsReachedException",
    "UnauthorizedDomainAccessException",
    # Vendor Theme
    "VendorThemeNotFoundException",
    "InvalidThemeDataException",
    "ThemePresetNotFoundException",
    "ThemeValidationException",
    "ThemePresetAlreadyAppliedException",
    "InvalidColorFormatException",
    "InvalidFontFamilyException",
    "ThemeOperationException",
    # Product exceptions
    "ProductNotFoundException",
    "ProductAlreadyExistsException",
    "ProductNotInCatalogException",
    "ProductNotActiveException",
    "InvalidProductDataException",
    "ProductValidationException",
    "CannotDeleteProductWithInventoryException",
    "CannotDeleteProductWithOrdersException",
    # Order exceptions
    "OrderNotFoundException",
    "OrderAlreadyExistsException",
    "OrderValidationException",
    "InvalidOrderStatusException",
    "OrderCannotBeCancelledException",
    # Cart exceptions
    "CartItemNotFoundException",
    "EmptyCartException",
    "CartValidationException",
    "InsufficientInventoryForCartException",
    "InvalidCartQuantityException",
    "ProductNotAvailableForCartException",
    # Company exceptions
    "CompanyNotFoundException",
    "CompanyAlreadyExistsException",
    "CompanyNotActiveException",
    "CompanyNotVerifiedException",
    "UnauthorizedCompanyAccessException",
    "InvalidCompanyDataException",
    "CompanyValidationException",
    "CompanyHasVendorsException",
    # MarketplaceProduct exceptions
    "MarketplaceProductNotFoundException",
    "MarketplaceProductAlreadyExistsException",
    "InvalidMarketplaceProductDataException",
    "MarketplaceProductValidationException",
    "InvalidGTINException",
    "MarketplaceProductCSVImportException",
    # Marketplace import exceptions
    "MarketplaceImportException",
    "ImportJobNotFoundException",
    "ImportJobNotOwnedException",
    "InvalidImportDataException",
    "ImportJobCannotBeCancelledException",
    "ImportJobCannotBeDeletedException",
    "MarketplaceConnectionException",
    "MarketplaceDataParsingException",
    "ImportRateLimitException",
    "InvalidMarketplaceException",
    "ImportJobAlreadyProcessingException",
    # Admin exceptions
    "UserNotFoundException",
    "UserStatusChangeException",
    "VendorVerificationException",
    "AdminOperationException",
    "CannotModifyAdminException",
    "CannotModifySelfException",
    "InvalidAdminActionException",
    "BulkOperationException",
    "ConfirmationRequiredException",
    # Code quality exceptions
    "ViolationNotFoundException",
    "ScanNotFoundException",
    "ScanExecutionException",
    "ScanTimeoutException",
    "ScanParseException",
    "ViolationOperationException",
    "InvalidViolationStatusException",
]
