"""Error message and log event constants.

Centralized error messages, validation errors, and structured log event names.
"""

from typing import Final

# =============================================================================
# Service Error Messages
# =============================================================================

ERR_HF_TOKEN_REQUIRED: Final[str] = "HuggingFace token required for pyannote models"
"""Error message when HuggingFace token is missing for pyannote."""

ERR_SERVER_RESTARTED: Final[str] = "Server restarted"
"""Error message for jobs interrupted by server restart."""

ERR_TOKEN_EXPIRED: Final[str] = "Access token expired or invalid"
"""Error for expired or invalid OAuth tokens."""

ERR_API_PREFIX: Final[str] = "API error: "
"""Prefix for API error messages."""

ERR_TOKEN_REFRESH_PREFIX: Final[str] = "Token refresh failed: "
"""Prefix for token refresh error messages."""

# =============================================================================
# Entity Error Messages
# =============================================================================

ERROR_PROJECT_ID_REQUIRED: Final[str] = "project_id is required"
"""Error message when project_id is missing."""

ERROR_INVALID_PROJECT_ID_PREFIX: Final[str] = "Invalid project_id: "
"""Prefix for invalid project_id error messages."""

ERROR_WORKSPACE_ID_REQUIRED: Final[str] = "workspace_id is required"
"""Error message when workspace_id is missing."""

ERROR_INVALID_WORKSPACE_ID_PREFIX: Final[str] = "Invalid workspace_id: "
"""Prefix for invalid workspace_id error messages."""

ERROR_USER_ID_REQUIRED: Final[str] = "user_id is required"
"""Error message when user_id is missing."""

ERROR_INVALID_UUID_PREFIX: Final[str] = "Invalid UUID: "
"""Prefix for invalid UUID error messages."""

ERROR_INVALID_WORKSPACE_ID_FORMAT: Final[str] = "Invalid workspace_id format"
"""Error message for invalid workspace_id format."""

ERROR_INVALID_PROJECT_ID_FORMAT: Final[str] = "Invalid project_id format"
"""Error message for invalid project_id format."""

ERROR_INVALID_MEETING_ID_FORMAT: Final[str] = "Invalid meeting_id format"
"""Error message for invalid meeting_id format."""

ERROR_INVALID_INTEGRATION_ID_FORMAT: Final[str] = "Invalid integration_id format"
"""Error message for invalid integration_id format."""

ERROR_INVALID_WEBHOOK_ID_FORMAT: Final[str] = "Invalid webhook_id format"
"""Error message for invalid webhook_id format."""

ERROR_INVALID_ENTITY_ID_FORMAT: Final[str] = "Invalid entity_id format"
"""Error message for invalid entity_id format."""

# =============================================================================
# Entity Message Prefixes
# =============================================================================

ERROR_MSG_MEETING_PREFIX: Final[str] = "Meeting "
"""Prefix for meeting-related error messages."""

ERROR_MSG_WORKSPACE_PREFIX: Final[str] = "Workspace "
"""Prefix for workspace-related error messages."""

ERROR_MSG_PROJECT_PREFIX: Final[str] = "Project "
"""Prefix for project-related error messages."""

ERROR_DETAIL_PROJECT_ID: Final[str] = "project_id"
"""Error detail key for project ID."""

# =============================================================================
# Validation Error Messages
# =============================================================================

ERROR_MSG_END_TIME_PREFIX: Final[str] = "end_time ("
"""Prefix for end_time validation error messages."""

ERROR_MSG_START_TIME_COMPARISON: Final[str] = ") must be >= start_time ("
"""Middle part of time validation error messages."""

ERROR_SUFFIX_MUST_BE_BOOLEAN: Final[str] = " must be a boolean"
"""Suffix for boolean validation error messages."""

# =============================================================================
# Log Event Names
# =============================================================================

LOG_EVENT_DATABASE_REQUIRED_FOR_ANNOTATIONS: Final[str] = "database_required_for_annotations"
"""Log event when annotations require database persistence."""

LOG_EVENT_ANNOTATION_NOT_FOUND: Final[str] = "annotation_not_found"
"""Log event when annotation lookup fails."""

LOG_EVENT_INVALID_ANNOTATION_ID: Final[str] = "invalid_annotation_id"
"""Log event when annotation ID is invalid."""

LOG_EVENT_SERVICE_NOT_ENABLED: Final[str] = "service_not_enabled"
"""Log event when a service feature is not enabled."""

LOG_EVENT_WEBHOOK_REGISTRATION_FAILED: Final[str] = "webhook_registration_failed"
"""Log event when webhook registration fails."""

LOG_EVENT_WEBHOOK_UPDATE_FAILED: Final[str] = "webhook_update_failed"
"""Log event when webhook update fails."""

LOG_EVENT_WEBHOOK_DELETE_FAILED: Final[str] = "webhook_delete_failed"
"""Log event when webhook deletion fails."""

LOG_EVENT_INVALID_WEBHOOK_ID: Final[str] = "invalid_webhook_id"
"""Log event when webhook ID is invalid."""
