# -*- coding: utf-8 -*-
"""
v123pan SDK - 专业的异步网盘 SDK

提供完整的 123Pan Open API 访问功能。

Example:
    >>> import asyncio
    >>> from v123pan import V123Pan
    >>>
    >>> async def main():
    ...     client = V123Pan(access_token="your_token")
    ...     try:
    ...         user_info = await client.user_info()
    ...         print(user_info)
    ...     finally:
    ...         await client.close()
    >>>
    >>> asyncio.run(main())
"""

from .client import V123Pan
from .const import (
    API_PATHS,
    BASE_URL,
    PLATFORM,
    CONTENT_TYPE,
    FILE_TYPE,
    FILE_CATEGORY,
    TASK_STATUS,
    DOWNLOAD_STATUS,
    BATCH_LIMITS,
)
from .exceptions import (
    V123PanError,
    APIError,
    NetworkError,
    AuthError,
    RateLimitError,
    FileUploadError,
    FileReadError,
    HashComputationError,
    ResourceClosedError,
    TimeoutError,
    ValidationError,
    SimpleFileSliceError,
    CryptoError,
)

# 工具模块
from .utils import (
    SimpleSlice,
    FileSlice,
    DataSlice,
    MixSlice,
    ChaCha20Poly1305Slice,
    LogConfig,
    get_logger,
)

# 加密模块
from .crypto import (
    AESEncryptor,
    ChaCha20Encryptor,
    Poly1305Authenticator,
    FilenameEncryptor,
    create_encryptor,
)

# 组合 API
from .api.combine import (
    FileUploader,
    FileUploadProgress,
    ProgressCallback,
    FileUploadError,
    FileBatchOperator,
    BatchResult,
    BatchProgress,
)

__version__ = "1.1.0"
__author__ = "V123Pan Team"
__license__ = "MIT"

__all__ = [
    # 核心类
    "V123Pan",
    # 常量
    "API_PATHS",
    "BASE_URL",
    "PLATFORM",
    "CONTENT_TYPE",
    "FILE_TYPE",
    "FILE_CATEGORY",
    "TASK_STATUS",
    "DOWNLOAD_STATUS",
    "BATCH_LIMITS",
    # 异常
    "V123PanError",
    "APIError",
    "NetworkError",
    "AuthError",
    "RateLimitError",
    "FileUploadError",
    "FileReadError",
    "HashComputationError",
    "ResourceClosedError",
    "TimeoutError",
    "ValidationError",
    "SimpleFileSliceError",
    "CryptoError",
    # 工具类
    "SimpleSlice",
    "FileSlice",
    "DataSlice",
    "MixSlice",
    "ChaCha20Poly1305Slice",
    "LogConfig",
    "get_logger",
    # 加密类
    "AESEncryptor",
    "ChaCha20Encryptor",
    "Poly1305Authenticator",
    "FilenameEncryptor",
    "create_encryptor",
    # 组合 API
    "FileUploader",
    "FileUploadProgress",
    "ProgressCallback",
    "FileUploadError",
    "FileBatchOperator",
    "BatchResult",
    "BatchProgress",
]
