"""Event definitions for the plan_management domain (PRD-HWADM-007)."""
from typing import List, Dict

PLAN_EVENTS: List[Dict] = [
    {
        "event_id": "plan.pricing_updated",
        "event_name": "Plan Pricing Updated",
        "description": (
            "Emitted when a Plan's pricing section is updated. "
            "Consumers trigger billing revalidation."
        ),
        "topic": "payment_events_plans",
        "data_contract": {
            "plan_id": "int",
            "plan_name": "str",
            "old_pricing_template_id": "int",
            "new_pricing_template_id": "int",
            "affected_merchant_ids": "List[int]",
            "updated_by_user_id": "int",
        },
    },
    {
        "event_id": "plan.features_updated",
        "event_name": "Plan Features Updated",
        "description": (
            "Emitted when a Plan's features are updated. "
            "Redis caches invalidated for all assigned merchants."
        ),
        "topic": "payment_events_plans",
        "data_contract": {
            "plan_id": "int",
            "plan_name": "str",
            "feature_plan_id": "int",
            "affected_merchant_ids": "List[int]",
            "updated_by_user_id": "int",
        },
    },
]
