"""waft_client — SDK for waft-deployed apps.

Auth, database, and more. Auto-configures from WAFT_* env vars injected by waft.

Usage (authentication):

    from waft_client import WaftAuth

    auth = WaftAuth()

    def handler(event, context):
        response = auth.handle(event)
        if response:
            return response

        user = auth.get_user(event)
        if not user:
            return auth.login_redirect()

        return {"statusCode": 200, "body": f"Hello {user.email}!"}

Usage (database):

    from waft_client import WaftDB

    db = WaftDB()

    def handler(event, context):
        with db.connection() as conn:
            rows = conn.execute("SELECT * FROM notes").fetchall()
        return {"statusCode": 200, "body": json.dumps([dict(r) for r in rows])}
"""

from waft_client.auth import WaftAuth
from waft_client.config import AuthConfig
from waft_client.db import WaftDB
from waft_client.models import ProviderInfo, User
from waft_client.store import AuthStore, SQLStore

__version__ = "0.1.0"
__all__ = [
    "WaftAuth",
    "WaftDB",
    "AuthConfig",
    "User",
    "ProviderInfo",
    "AuthStore",
    "SQLStore",
]
