"""
Zoho Creator SDK for Python
"""

__version__ = "0.1.0"

from .auth import BaseAuthHandler, OAuth2AuthHandler, get_auth_handler
from .client import (
    AppContext,
    ConnectionContext,
    CustomActionContext,
    FormContext,
    PageContext,
    PermissionContext,
    ReportContext,
    SectionContext,
    WorkflowContext,
    ZohoCreatorClient,
)
from .config import ConfigManager, LoggingConfig, setup_logging
from .exceptions import (
    APIError,
    AuthenticationError,
    BadRequestError,
    ConfigurationError,
    InvalidCredentialsError,
    NetworkError,
    RateLimitError,
    ResourceNotFoundError,
    TokenExpiredError,
    ZohoCreatorError,
)
from .models import (
    ActionType,
    APIConfig,
    Application,
    AuthConfig,
    BulkOperation,
    BulkOperationStatus,
    BulkOperationType,
    Connection,
    CustomAction,
    EmailActionConfig,
    EntityType,
    ErrorResponse,
    ExportFormat,
    ExportOptions,
    ExportResult,
    FieldDisplayProperties,
    FieldType,
    FieldUpdateActionConfig,
    FieldValidation,
    FormField,
    FormSchema,
    ImportErrorDetail,
    ImportFormat,
    ImportMapping,
    ImportMode,
    ImportResult,
    ListResponse,
    Page,
    Permission,
    PermissionInheritance,
    PermissionType,
    Record,
    Report,
    ReportColumn,
    ReportFilter,
    ReportType,
    ResponseStatus,
    Role,
    Section,
    SuccessResponse,
    TriggerCondition,
    TriggerType,
    User,
    UserPermission,
    WebhookActionConfig,
    Workflow,
    WorkflowAction,
    WorkflowExecution,
    WorkflowStatus,
    WorkflowTrigger,
    WorkflowType,
)

__all__ = [
    # Client
    "ZohoCreatorClient",
    # Context classes
    "AppContext",
    "FormContext",
    "ReportContext",
    "WorkflowContext",
    "PermissionContext",
    "ConnectionContext",
    "CustomActionContext",
    "PageContext",
    "SectionContext",
    # Config
    "ConfigManager",
    "LoggingConfig",
    "setup_logging",
    # Auth
    "BaseAuthHandler",
    "OAuth2AuthHandler",
    "get_auth_handler",
    # Exceptions
    "ZohoCreatorError",
    "AuthenticationError",
    "TokenExpiredError",
    "InvalidCredentialsError",
    "APIError",
    "RateLimitError",
    "ResourceNotFoundError",
    "BadRequestError",
    "ConfigurationError",
    "NetworkError",
    # Models
    "Application",
    "Record",
    "User",
    "Page",
    "Section",
    "Connection",
    "CustomAction",
    "APIConfig",
    "AuthConfig",
    "SuccessResponse",
    "ErrorResponse",
    "ListResponse",
    "Workflow",
    "Permission",
    "Role",
    "UserPermission",
    "PermissionInheritance",
    # Enums
    "ImportFormat",
    "ImportMode",
    "ExportFormat",
    "BulkOperationStatus",
    "BulkOperationType",
    "ResponseStatus",
    "ReportType",
    "WorkflowType",
    "WorkflowStatus",
    "TriggerType",
    "FieldType",
    "PermissionType",
    "EntityType",
    "ActionType",
    # Import/Export models
    "ImportMapping",
    "ImportErrorDetail",
    "ImportResult",
    "ExportOptions",
    "ExportResult",
    # Bulk operations models
    "BulkOperation",
    # Workflow models
    "TriggerCondition",
    "WorkflowTrigger",
    "EmailActionConfig",
    "FieldUpdateActionConfig",
    "WebhookActionConfig",
    "WorkflowAction",
    "WorkflowExecution",
    # Form and Field models
    "FieldValidation",
    "FieldDisplayProperties",
    "FormField",
    "FormSchema",
    # Report models
    "Report",
    "ReportColumn",
    "ReportFilter",
]
