"""Version information for pycredoai SDK.

This file contains metadata about the SDK generation process.
"""

from importlib.metadata import version

# Package version managed by pyproject.toml
__version__ = version("pycredoai")

# OpenAPI specification metadata
OPENAPI_INFO = {
    "title": "credoai-integration-service",
    "version": "0.1.0",
    "description": "",
}

# Generation metadata
GENERATION_INFO = {
    "generated_at": "2026-01-28T01:42:33.414545+00:00",
    "spec_source": "0.1.0",
    "spec_version": "credoai-integration-service",
    "generator_version": "sdkgen-1.0.0",
    "sdkgen_config": {
        "package_name": "pycredoai",
        "module_name": "credoai",
        "author": "Credo AI",
        "homepage": "https://credo.ai",
    },
}


# Convenience exports
def get_version() -> str:
    """Get the package version."""
    return __version__


def get_openapi_version() -> str:
    """Get the OpenAPI specification version."""
    return OPENAPI_INFO["version"]


def get_generation_info() -> dict:
    """Get metadata about when and how this SDK was generated."""
    return GENERATION_INFO.copy()


def print_info() -> None:
    """Print version and generation information."""
    print(f"pycredoai SDK v{__version__}")
    print(
        f"Generated from OpenAPI spec: {OPENAPI_INFO['title']} v{OPENAPI_INFO['version']}"
    )
    print(f"Generated at: {GENERATION_INFO['generated_at']}")
    print(f"Spec source: {GENERATION_INFO['spec_source']}")
    print(f"Spec version: {GENERATION_INFO['spec_version']}")
