"""Delivery event type contracts (publish-only)."""
from __future__ import annotations

import enum


class DeliveryEventType(str, enum.Enum):
    ORGANIZATION_CREATED = "delivery.organization.created"
    ORGANIZATION_UPDATED = "delivery.organization.updated"
    HUB_CREATED = "delivery.hub.created"
    HUB_UPDATED = "delivery.hub.updated"
    EXTERNAL_PROVIDER_REGISTERED = "delivery.external_provider.registered"
    EXTERNAL_PROVIDER_UPDATED = "delivery.external_provider.updated"
    ROUTING_ENGINE_REGISTERED = "delivery.routing_engine.registered"
    ROUTING_ENGINE_UPDATED = "delivery.routing_engine.updated"
    CONFIGURATION_CREATED = "delivery.configuration.created"
    CONFIGURATION_UPDATED = "delivery.configuration.updated"
    SETTING_UPSERTED = "delivery.setting.upserted"

    # Phase 10.1 — Driver Management
    DRIVER_CREATED = "delivery.driver.created"
    DRIVER_UPDATED = "delivery.driver.updated"
    DRIVER_ACTIVATED = "delivery.driver.activated"
    DRIVER_SUSPENDED = "delivery.driver.suspended"
    DRIVER_RESUMED = "delivery.driver.resumed"
    DRIVER_DEACTIVATED = "delivery.driver.deactivated"
    DRIVER_BLOCKED = "delivery.driver.blocked"
    DRIVER_UNBLOCKED = "delivery.driver.unblocked"
    DRIVER_ARCHIVED = "delivery.driver.archived"
    DRIVER_DELETED = "delivery.driver.deleted"
    DRIVER_CREDENTIAL_ADDED = "delivery.driver.credential_added"
    DRIVER_DOCUMENT_ATTACHED = "delivery.driver.document_attached"
    DRIVER_STATUS_CHANGED = "delivery.driver.status_changed"

    # Phase 10.2 — Fleet & Vehicle Types
    FLEET_CREATED = "delivery.fleet.created"
    FLEET_UPDATED = "delivery.fleet.updated"
    FLEET_DELETED = "delivery.fleet.deleted"
    VEHICLE_TYPE_CREATED = "delivery.vehicle_type.created"
    VEHICLE_TYPE_UPDATED = "delivery.vehicle_type.updated"
    VEHICLE_TYPE_DELETED = "delivery.vehicle_type.deleted"
    VEHICLE_CREATED = "delivery.vehicle.created"
    VEHICLE_UPDATED = "delivery.vehicle.updated"
    VEHICLE_DELETED = "delivery.vehicle.deleted"
    VEHICLE_ASSIGNMENT_CREATED = "delivery.vehicle_assignment.created"
    VEHICLE_ASSIGNMENT_UPDATED = "delivery.vehicle_assignment.updated"
    VEHICLE_ASSIGNMENT_ENDED = "delivery.vehicle_assignment.ended"

    # Phase 10.3 — Availability, Shifts & Working Zones
    DRIVER_AVAILABILITY_UPDATED = "delivery.driver_availability.updated"
    SHIFT_CREATED = "delivery.shift.created"
    SHIFT_UPDATED = "delivery.shift.updated"
    SHIFT_DELETED = "delivery.shift.deleted"
    SHIFT_ASSIGNMENT_CREATED = "delivery.shift_assignment.created"
    SHIFT_ASSIGNMENT_UPDATED = "delivery.shift_assignment.updated"
    WORKING_ZONE_CREATED = "delivery.working_zone.created"
    WORKING_ZONE_UPDATED = "delivery.working_zone.updated"
    WORKING_ZONE_DELETED = "delivery.working_zone.deleted"

    # Phase 10.4 — Pricing, Capabilities & Bundles
    PRICING_RULE_CREATED = "delivery.pricing_rule.created"
    PRICING_RULE_UPDATED = "delivery.pricing_rule.updated"
    PRICING_RULE_DELETED = "delivery.pricing_rule.deleted"
    CAPABILITY_CREATED = "delivery.capability.created"
    CAPABILITY_UPDATED = "delivery.capability.updated"
    CAPABILITY_DELETED = "delivery.capability.deleted"
    BUNDLE_CREATED = "delivery.bundle.created"
    BUNDLE_UPDATED = "delivery.bundle.updated"
    BUNDLE_DELETED = "delivery.bundle.deleted"

    # Phase 10.5 — Dispatch Engine
    DISPATCH_JOB_CREATED = "delivery.dispatch_job.created"
    DISPATCH_JOB_UPDATED = "delivery.dispatch_job.updated"
    DISPATCH_JOB_STATUS_CHANGED = "delivery.dispatch_job.status_changed"
    DISPATCH_JOB_DELETED = "delivery.dispatch_job.deleted"
    JOB_ASSIGNMENT_CREATED = "delivery.job_assignment.created"
    JOB_ASSIGNMENT_UPDATED = "delivery.job_assignment.updated"
    JOB_ASSIGNMENT_STATUS_CHANGED = "delivery.job_assignment.status_changed"

    # Phase 10.6 — Routing & Optimization
    ROUTE_PLAN_CREATED = "delivery.route_plan.created"
    ROUTE_PLAN_UPDATED = "delivery.route_plan.updated"
    ROUTE_PLAN_DELETED = "delivery.route_plan.deleted"
    ROUTE_STOP_ADDED = "delivery.route_stop.added"
    OPTIMIZATION_RUN_STARTED = "delivery.optimization_run.started"
    OPTIMIZATION_RUN_COMPLETED = "delivery.optimization_run.completed"
    OPTIMIZATION_RUN_FAILED = "delivery.optimization_run.failed"

    # Phase 10.7 — Tracking & Proof of Delivery
    TRACKING_SESSION_STARTED = "delivery.tracking_session.started"
    TRACKING_SESSION_UPDATED = "delivery.tracking_session.updated"
    TRACKING_SESSION_ENDED = "delivery.tracking_session.ended"
    TRACKING_POINT_RECORDED = "delivery.tracking_point.recorded"
    PROOF_OF_DELIVERY_CAPTURED = "delivery.proof_of_delivery.captured"
    PROOF_OF_DELIVERY_UPDATED = "delivery.proof_of_delivery.updated"
    CUSTOMER_TRACKING_TOKEN_CREATED = "delivery.customer_tracking_token.created"
    CUSTOMER_TRACKING_TOKEN_REVOKED = "delivery.customer_tracking_token.revoked"

    # Phase 10.8 — Settlement
    SETTLEMENT_INTENT_CREATED = "delivery.settlement_intent.created"
    SETTLEMENT_INTENT_UPDATED = "delivery.settlement_intent.updated"
    SETTLEMENT_INTENT_SUBMITTED = "delivery.settlement_intent.submitted"
    SETTLEMENT_INTENT_SETTLED = "delivery.settlement_intent.settled"
    SETTLEMENT_INTENT_FAILED = "delivery.settlement_intent.failed"
    SETTLEMENT_LINE_ADDED = "delivery.settlement_line.added"
