"""
pygeai-gam: Standalone GAM (GeneXus Access Manager) OAuth 2.0 client for Python.

A lightweight library for authenticating with GAM without requiring the full PyGEAI ecosystem.

Features:
- OAuth 2.0 and PKCE authentication flows
- Typed response objects for better IDE support (v0.2.0+)
- Dynamic redirect URI resolution with XXXX placeholder (v0.2.0+)
"""

import logging

__version__ = "0.2.0"
__author__ = "Globant"
__email__ = "geai-sdk@globant.com"

logging.getLogger(__name__).addHandler(logging.NullHandler())

# Client
from pygeai_gam.client import GAMClient

# Exceptions
from pygeai_gam.exceptions import (
    GAMClientError,
    GAMAuthenticationError,
    GAMAPIError,
    GAMInvalidResponseError,
    GAMMissingParameterError,
)

# PKCE
from pygeai_gam.pkce import (
    generate_code_verifier,
    generate_code_challenge,
)

# Callback server
from pygeai_gam.oauth_callback import (
    OAuthCallbackServer,
    OAuthCallbackHandler,
)

# NEW: Types (v0.2.0+)
from pygeai_gam.types import (
    GAMTokenResponse,
    GAMUserInfo,
)

# NEW: Utilities (v0.2.0+)
from pygeai_gam.utils import (
    resolve_redirect_uri,
    find_available_port,
    DYNAMIC_PORT_PLACEHOLDER,
)

__all__ = [
    # Client
    "GAMClient",
    
    # Exceptions
    "GAMClientError",
    "GAMAuthenticationError",
    "GAMAPIError",
    "GAMInvalidResponseError",
    "GAMMissingParameterError",
    
    # PKCE
    "generate_code_verifier",
    "generate_code_challenge",
    
    # Callback server
    "OAuthCallbackServer",
    "OAuthCallbackHandler",
    
    # NEW: Types (v0.2.0+)
    "GAMTokenResponse",
    "GAMUserInfo",
    
    # NEW: Utilities (v0.2.0+)
    "resolve_redirect_uri",
    "find_available_port",
    "DYNAMIC_PORT_PLACEHOLDER",
]
