"""Centralized constants for NoteFlow.

This package provides shared constants used across the codebase to avoid
magic numbers and ensure consistency.

Constants are organized into domain-specific modules:
- core: Time, audio, gRPC, application paths
- http: HTTP status codes, headers, OAuth fields
- errors: Error messages, log event names
- domain: Meeting defaults, export formats, NER, rules, triggers

All constants are re-exported here for backwards compatibility.
"""

# Core constants
from noteflow.config.constants.core import (
    APP_DIR_NAME,
    AUDIO_BUFFER_SIZE_BYTES,
    DEFAULT_GRPC_PORT,
    DEFAULT_SAMPLE_RATE,
    MAX_GRPC_MESSAGE_SIZE,
    PERIODIC_FLUSH_INTERVAL_SECONDS,
    POSITION_UPDATE_INTERVAL,
    SECONDS_PER_HOUR,
    STREAM_INIT_LOCK_TIMEOUT_SECONDS,
)

# Domain constants
from noteflow.config.constants.domain import (
    DEFAULT_MEETING_TITLE,
    EXPORT_EXT_HTML,
    EXPORT_EXT_PDF,
    EXPORT_FORMAT_HTML,
    FEATURE_NAME_PROJECTS,
    MEETING_TITLE_PREFIX,
    PROVIDER_NAME_OPENAI,
    RULE_FIELD_APP_MATCH_PATTERNS,
    RULE_FIELD_AUTO_START_ENABLED,
    RULE_FIELD_CALENDAR_MATCH_PATTERNS,
    RULE_FIELD_DEFAULT_FORMAT,
    RULE_FIELD_DESCRIPTION,
    RULE_FIELD_EXPORT_RULES,
    RULE_FIELD_INCLUDE_AUDIO,
    RULE_FIELD_INCLUDE_TIMESTAMPS,
    RULE_FIELD_TEMPLATE_ID,
    RULE_FIELD_TRIGGER_RULES,
    SCHEMA_TYPE_ARRAY_ITEMS,
    SCHEMA_TYPE_BOOLEAN,
    SCHEMA_TYPE_STRING,
    SETTING_CLOUD_CONSENT_GRANTED,
    SPACY_MODEL_LG,
    SPACY_MODEL_MD,
    SPACY_MODEL_SM,
    SPACY_MODEL_TRF,
    STATUS_DISABLED,
    TRIGGER_ACTION_IGNORE,
)

# Error constants
from noteflow.config.constants.errors import (
    ERR_API_PREFIX,
    ERR_HF_TOKEN_REQUIRED,
    ERR_SERVER_RESTARTED,
    ERR_TOKEN_EXPIRED,
    ERR_TOKEN_REFRESH_PREFIX,
    ERROR_DETAIL_PROJECT_ID,
    ERROR_INVALID_ENTITY_ID_FORMAT,
    ERROR_INVALID_INTEGRATION_ID_FORMAT,
    ERROR_INVALID_MEETING_ID_FORMAT,
    ERROR_INVALID_PROJECT_ID_FORMAT,
    ERROR_INVALID_PROJECT_ID_PREFIX,
    ERROR_INVALID_UUID_PREFIX,
    ERROR_INVALID_WEBHOOK_ID_FORMAT,
    ERROR_INVALID_WORKSPACE_ID_FORMAT,
    ERROR_INVALID_WORKSPACE_ID_PREFIX,
    ERROR_MSG_END_TIME_PREFIX,
    ERROR_MSG_MEETING_PREFIX,
    ERROR_MSG_PROJECT_PREFIX,
    ERROR_MSG_START_TIME_COMPARISON,
    ERROR_MSG_WORKSPACE_PREFIX,
    ERROR_PROJECT_ID_REQUIRED,
    ERROR_SUFFIX_MUST_BE_BOOLEAN,
    ERROR_USER_ID_REQUIRED,
    ERROR_WORKSPACE_ID_REQUIRED,
    LOG_EVENT_ANNOTATION_NOT_FOUND,
    LOG_EVENT_DATABASE_REQUIRED_FOR_ANNOTATIONS,
    LOG_EVENT_INVALID_ANNOTATION_ID,
    LOG_EVENT_INVALID_WEBHOOK_ID,
    LOG_EVENT_SERVICE_NOT_ENABLED,
    LOG_EVENT_WEBHOOK_DELETE_FAILED,
    LOG_EVENT_WEBHOOK_REGISTRATION_FAILED,
    LOG_EVENT_WEBHOOK_UPDATE_FAILED,
)

# HTTP constants
from noteflow.config.constants.http import (
    DEFAULT_OAUTH_TOKEN_EXPIRY_SECONDS,
    HTTP_AUTHORIZATION,
    HTTP_BEARER_PREFIX,
    HTTP_STATUS_BAD_REQUEST,
    HTTP_STATUS_INTERNAL_SERVER_ERROR,
    HTTP_STATUS_NO_CONTENT,
    HTTP_STATUS_NOT_FOUND,
    HTTP_STATUS_OK,
    HTTP_STATUS_UNAUTHORIZED,
    OAUTH_FIELD_ACCESS_TOKEN,
    OAUTH_FIELD_EXPIRES_IN,
    OAUTH_FIELD_REFRESH_TOKEN,
    OAUTH_FIELD_SCOPE,
    OAUTH_FIELD_TOKEN_TYPE,
)

__all__ = [
    # Core
    "APP_DIR_NAME",
    "AUDIO_BUFFER_SIZE_BYTES",
    "DEFAULT_GRPC_PORT",
    # Domain
    "DEFAULT_MEETING_TITLE",
    # HTTP
    "DEFAULT_OAUTH_TOKEN_EXPIRY_SECONDS",
    "DEFAULT_SAMPLE_RATE",
    "ERROR_DETAIL_PROJECT_ID",
    "ERROR_INVALID_ENTITY_ID_FORMAT",
    "ERROR_INVALID_INTEGRATION_ID_FORMAT",
    "ERROR_INVALID_MEETING_ID_FORMAT",
    "ERROR_INVALID_PROJECT_ID_FORMAT",
    "ERROR_INVALID_PROJECT_ID_PREFIX",
    "ERROR_INVALID_UUID_PREFIX",
    "ERROR_INVALID_WEBHOOK_ID_FORMAT",
    "ERROR_INVALID_WORKSPACE_ID_FORMAT",
    "ERROR_INVALID_WORKSPACE_ID_PREFIX",
    "ERROR_MSG_END_TIME_PREFIX",
    "ERROR_MSG_MEETING_PREFIX",
    "ERROR_MSG_PROJECT_PREFIX",
    "ERROR_MSG_START_TIME_COMPARISON",
    "ERROR_MSG_WORKSPACE_PREFIX",
    "ERROR_PROJECT_ID_REQUIRED",
    "ERROR_SUFFIX_MUST_BE_BOOLEAN",
    "ERROR_USER_ID_REQUIRED",
    "ERROR_WORKSPACE_ID_REQUIRED",
    # Errors
    "ERR_API_PREFIX",
    "ERR_HF_TOKEN_REQUIRED",
    "ERR_SERVER_RESTARTED",
    "ERR_TOKEN_EXPIRED",
    "ERR_TOKEN_REFRESH_PREFIX",
    "EXPORT_EXT_HTML",
    "EXPORT_EXT_PDF",
    "EXPORT_FORMAT_HTML",
    "FEATURE_NAME_PROJECTS",
    "HTTP_AUTHORIZATION",
    "HTTP_BEARER_PREFIX",
    "HTTP_STATUS_BAD_REQUEST",
    "HTTP_STATUS_INTERNAL_SERVER_ERROR",
    "HTTP_STATUS_NOT_FOUND",
    "HTTP_STATUS_NO_CONTENT",
    "HTTP_STATUS_OK",
    "HTTP_STATUS_UNAUTHORIZED",
    "LOG_EVENT_ANNOTATION_NOT_FOUND",
    "LOG_EVENT_DATABASE_REQUIRED_FOR_ANNOTATIONS",
    "LOG_EVENT_INVALID_ANNOTATION_ID",
    "LOG_EVENT_INVALID_WEBHOOK_ID",
    "LOG_EVENT_SERVICE_NOT_ENABLED",
    "LOG_EVENT_WEBHOOK_DELETE_FAILED",
    "LOG_EVENT_WEBHOOK_REGISTRATION_FAILED",
    "LOG_EVENT_WEBHOOK_UPDATE_FAILED",
    "MAX_GRPC_MESSAGE_SIZE",
    "MEETING_TITLE_PREFIX",
    "OAUTH_FIELD_ACCESS_TOKEN",
    "OAUTH_FIELD_EXPIRES_IN",
    "OAUTH_FIELD_REFRESH_TOKEN",
    "OAUTH_FIELD_SCOPE",
    "OAUTH_FIELD_TOKEN_TYPE",
    "PERIODIC_FLUSH_INTERVAL_SECONDS",
    "POSITION_UPDATE_INTERVAL",
    "PROVIDER_NAME_OPENAI",
    "RULE_FIELD_APP_MATCH_PATTERNS",
    "RULE_FIELD_AUTO_START_ENABLED",
    "RULE_FIELD_CALENDAR_MATCH_PATTERNS",
    "RULE_FIELD_DEFAULT_FORMAT",
    "RULE_FIELD_DESCRIPTION",
    "RULE_FIELD_EXPORT_RULES",
    "RULE_FIELD_INCLUDE_AUDIO",
    "RULE_FIELD_INCLUDE_TIMESTAMPS",
    "RULE_FIELD_TEMPLATE_ID",
    "RULE_FIELD_TRIGGER_RULES",
    "SCHEMA_TYPE_ARRAY_ITEMS",
    "SCHEMA_TYPE_BOOLEAN",
    "SCHEMA_TYPE_STRING",
    "SECONDS_PER_HOUR",
    "SETTING_CLOUD_CONSENT_GRANTED",
    "SPACY_MODEL_LG",
    "SPACY_MODEL_MD",
    "SPACY_MODEL_SM",
    "SPACY_MODEL_TRF",
    "STATUS_DISABLED",
    "STREAM_INIT_LOCK_TIMEOUT_SECONDS",
    "TRIGGER_ACTION_IGNORE",
]
