"""
SubscriptionKore - Provider-agnostic async subscriptionkore management library.
"""

from subscriptionkore.core.models import (
    AppliedDiscount,
    BillingPeriod,
    Customer,
    CustomerEntitlement,
    Entitlement,
    EntitlementOverride,
    EntitlementValueType,
    Interval,
    Invoice,
    InvoiceLineItem,
    InvoiceStatus,
    Money,
    PauseConfig,
    PaymentEvent,
    PaymentEventType,
    PaymentStatus,
    Plan,
    PlanEntitlement,
    Product,
    ProviderReference,
    ProviderType,
    Subscription,
    SubscriptionStatus,
)
from subscriptionkore.core.events import (
    CustomerCreated,
    CustomerUpdated,
    DomainEvent,
    InvoiceCreated,
    InvoicePaid,
    PaymentFailed,
    PaymentSucceeded,
    SubscriptionActivated,
    SubscriptionCanceled,
    SubscriptionCreated,
    SubscriptionPastDue,
    SubscriptionPaused,
    SubscriptionPlanChanged,
    SubscriptionResumed,
    SubscriptionTrialEnded,
    SubscriptionTrialStarted,
    SubscriptionUpdated,
)
from subscriptionkore.core.exceptions import (
    ConfigurationError,
    DomainError,
    DuplicateEntityError,
    EntitlementError,
    EntitlementNotFoundError,
    EntityNotFoundError,
    InvalidConfigurationError,
    InvalidStateTransitionError,
    MissingProviderCredentialsError,
    ProviderAPIError,
    ProviderAuthenticationError,
    ProviderError,
    ProviderNetworkError,
    ProviderRateLimitError,
    RepositoryError,
    SubscriptionKoreError,
    UsageLimitExceededError,
    ValidationError,
    WebhookError,
    WebhookPayloadInvalidError,
    WebhookProcessingError,
    WebhookSignatureInvalidError,
)
from subscriptionkore.config import SubscriptionKoreConfig
from subscriptionkore.factory import SubscriptionKore

__version__ = "0.1.0"

__all__ = [
    # Main factory
    "SubscriptionKore",
    "SubscriptionKoreConfig",
    # Models
    "Customer",
    "Product",
    "Plan",
    "PlanEntitlement",
    "Subscription",
    "Entitlement",
    "CustomerEntitlement",
    "EntitlementOverride",
    "Invoice",
    "InvoiceLineItem",
    "PaymentEvent",
    "Money",
    "BillingPeriod",
    "PauseConfig",
    "AppliedDiscount",
    "ProviderReference",
    # Enums
    "ProviderType",
    "SubscriptionStatus",
    "InvoiceStatus",
    "PaymentStatus",
    "PaymentEventType",
    "EntitlementValueType",
    "Interval",
    # Events
    "DomainEvent",
    "SubscriptionCreated",
    "SubscriptionActivated",
    "SubscriptionUpdated",
    "SubscriptionCanceled",
    "SubscriptionPaused",
    "SubscriptionResumed",
    "SubscriptionPastDue",
    "SubscriptionTrialStarted",
    "SubscriptionTrialEnded",
    "SubscriptionPlanChanged",
    "PaymentSucceeded",
    "PaymentFailed",
    "CustomerCreated",
    "CustomerUpdated",
    "InvoiceCreated",
    "InvoicePaid",
    # Exceptions
    "SubscriptionKoreError",
    "ConfigurationError",
    "MissingProviderCredentialsError",
    "InvalidConfigurationError",
    "ProviderError",
    "ProviderAPIError",
    "ProviderRateLimitError",
    "ProviderNetworkError",
    "ProviderAuthenticationError",
    "WebhookError",
    "WebhookSignatureInvalidError",
    "WebhookPayloadInvalidError",
    "WebhookProcessingError",
    "DomainError",
    "EntityNotFoundError",
    "InvalidStateTransitionError",
    "DuplicateEntityError",
    "ValidationError",
    "EntitlementError",
    "EntitlementNotFoundError",
    "UsageLimitExceededError",
    "RepositoryError",
]
