# List of endpoints used in the Verkada API

# Region
REGION = "api"

# Change BASE_URL based on the region you are in
BASE_URL = f"https://{REGION}.verkada.com"  # Base URL for Verkada API

# Temporary API Token Endpoint
GET_TOKEN_ENDPOINT = f"{BASE_URL}/token"

# Cameras Endpoint
CAMERAS_ENDPOINT = f"{BASE_URL}/cameras/v1"

# Camera Alerts Endpoint
CAMERA_ALERTS_ENDPOINT = f"{CAMERAS_ENDPOINT}/alerts"

# Camera Analytics Endpoints
ANALYTICS_ENDPOINT = f"{CAMERAS_ENDPOINT}/analytics"
DASHBOARD_OCCUPANCY_TRENDS_ENDPOINT = f"{ANALYTICS_ENDPOINT}/dashboard_occupancy_trends"
OBJECT_COUNT_ENDPOINT = f"{ANALYTICS_ENDPOINT}/object_counts"
OBJECT_POSITION_MQTT_ENDPOINT = f"{ANALYTICS_ENDPOINT}/object_position_mqtt"
MAX_OBJECT_COUNT_ENDPOINT = f"{ANALYTICS_ENDPOINT}/max_object_counts"
OCCUPANCY_TRENDS_ENDPOINT = f"{ANALYTICS_ENDPOINT}/occupancy_trends"

# Camera Cloud Backup Endpoints
CLOUD_BACKUP_ENDPOINT = f"{CAMERAS_ENDPOINT}/cloud_backup/settings"

# Camera Data Endpoints
CAMERA_DATA_ENDPOINT = f"{CAMERAS_ENDPOINT}/devices"
OCCUPANCY_TRENDS_ENABLED_CAMERAS_ENDPOINT = f"{CAMERAS_ENDPOINT}/occupancy_trend_enabled"

# Camera Footage Endpoints
CAMERA_FOOTAGE_ENDPOINT = f"{CAMERAS_ENDPOINT}/footage"
FOOTAGE_LINK_ENDPOINT = f"{CAMERA_FOOTAGE_ENDPOINT}/link"
CAMERA_THUMBNAIL_ENDPOINT = f"{CAMERA_FOOTAGE_ENDPOINT}/thumbnails"
LATEST_THUMBNAIL_ENDPOINT = f"{CAMERA_THUMBNAIL_ENDPOINT}/latest"
THUMBNAIL_LINK_ENDPOINT = f"{CAMERA_THUMBNAIL_ENDPOINT}/link"

# Camera Video Streaming Endpoints
STREAMING_TOKEN_ENDPOINT = f"{CAMERA_FOOTAGE_ENDPOINT}/token"
STREAM_FOOTAGE_ENDPOINT = f"{BASE_URL}/stream/cameras/v1/footage/stream/stream.m3u8"

# Camera Audio Endpoints
CAMERA_AUDIO_ENDPOINT = f"{CAMERAS_ENDPOINT}/audio/status"

# Camera Person of Interest Endpoints
POI_ENDPOINT = f"{CAMERAS_ENDPOINT}/people/person_of_interest"

# Camera License Plate of Interest Endpoints
LPR_ENDPOINT = f"{ANALYTICS_ENDPOINT}/lpr"
LPR_PLATE_IMAGES_ENDPOINT = f"{LPR_ENDPOINT}/images"
LPOI_ENDPOINT = f"{LPR_ENDPOINT}/license_plate_of_interest"
LPOI_BATCH_ENDPOINT = f"{LPOI_ENDPOINT}/batch"
LPR_TIMESTAMPS_ENDPOINT = f"{LPR_ENDPOINT}/timestamps"

# Sensors Endpoints
ENVIRONMENT_ENDPOINT = f"{BASE_URL}/environment/v1"
SENSOR_ALERT_ENDPOINT = f"{ENVIRONMENT_ENDPOINT}/alerts"
SENSOR_DATA_ENDPOINT = f"{ENVIRONMENT_ENDPOINT}/data"

# Core Command Endpoints
CORE_COMMAND_ENDPOINT = f"{BASE_URL}/core/v1"
# Audit Log Endpoint
AUDIT_LOG_ENDPOINT = f"{CORE_COMMAND_ENDPOINT}/audit_log"

# Command User Endpoints
COMMAND_USER_ENDPOINT = f"{CORE_COMMAND_ENDPOINT}/user"

# Guest URL
GUEST_URL = f"/guest/v1"

# Guest Endpoints
GUEST_ENDPOINT = f"{BASE_URL}{GUEST_URL}"
GUEST_SITES_ENDPOINT = f"{GUEST_ENDPOINT}/sites"
GUEST_VISITS_ENDPOINT = f"{GUEST_ENDPOINT}/visits"
GUEST_DENY_LIST_ENDPOINT = f"{GUEST_ENDPOINT}/deny_list"

# Alarms Endpoints
ALARMS_ENDPOINT = f"{BASE_URL}/alarms/v1"
ALARMS_DEVICES_ENDPOINT = f"{ALARMS_ENDPOINT}/devices"
ALARMS_SITES_ENDPOINT = f"{ALARMS_ENDPOINT}/sites"


# Access Control URL
ACCESS_CONTROL_URL = "/access/v1"

# Access Control Group Endpoints
ACCESS_CONTROL_ENDPOINT = f"{BASE_URL}{ACCESS_CONTROL_URL}"
ACCESS_GROUPS_ENDPOINT = f"{ACCESS_CONTROL_ENDPOINT}/access_groups"
ACCESS_GROUP_ENDPOINT = f"{ACCESS_GROUPS_ENDPOINT}/group"
ACCESS_GROUP_USER_ENDPOINT = f"{ACCESS_GROUP_ENDPOINT}/user"

# Access Control User Endpoints
ACCESS_ALL_USERS_ENDPOINT = f"{ACCESS_CONTROL_ENDPOINT}/access_users"
ACCESS_USER_ENDPOINT = f"{ACCESS_ALL_USERS_ENDPOINT}/user"
ACCESS_BLE_ENDPOINT = f"{ACCESS_USER_ENDPOINT}/ble"
ACCESS_BLE_ACTIVATE_ENDPOINT = f"{ACCESS_BLE_ENDPOINT}/activate"
ACCESS_BLE_DEACTIVATE_ENDPOINT = f"{ACCESS_BLE_ENDPOINT}/deactivate"
ACCESS_START_DATE_ENDPOINT = f"{ACCESS_USER_ENDPOINT}/start_date"
ACCESS_END_DATE_ENDPOINT = f"{ACCESS_USER_ENDPOINT}/end_date"
ACCESS_ENTRY_CODE_ENDPOINT = f"{ACCESS_USER_ENDPOINT}/entry_code"
ACCESS_PASS_INVITE_ENDPOINT = f"{ACCESS_USER_ENDPOINT}/pass/invite"
ACCESS_PROFILE_PHOTO_ENDPOINT = f"{ACCESS_USER_ENDPOINT}/profile_photo"
ACCESS_REMOTE_UNLOCK_ENDPOINT = f"{ACCESS_USER_ENDPOINT}/remote_unlock"
ACCESS_REMOTE_UNLOCK_ACTIVATE_ENDPOINT = (f"{ACCESS_REMOTE_UNLOCK_ENDPOINT}"
                                          f"/activate")
ACCESS_REMOTE_UNLOCK_DEACTIVATE_ENDPOINT = (f"{ACCESS_REMOTE_UNLOCK_ENDPOINT}"
                                            f"/deactivate")

# Access Control Credential Endpoints
ACCESS_CREDENTIALS_ENDPOINT = f"{ACCESS_CONTROL_ENDPOINT}/credentials"
ACCESS_CARD_ENDPOINT = f"{ACCESS_CREDENTIALS_ENDPOINT}/card"
ACCESS_CARD_ACTIVATE_ENDPOINT = f"{ACCESS_CARD_ENDPOINT}/activate"
ACCESS_CARD_DEACTIVATE_ENDPOINT = f"{ACCESS_CARD_ENDPOINT}/deactivate"
ACCESS_LICENSE_PLATE_ENDPOINT = f"{ACCESS_CREDENTIALS_ENDPOINT}/license_plate"
ACCESS_LICENSE_PLATE_ACTIVATE_ENDPOINT = f"{ACCESS_LICENSE_PLATE_ENDPOINT}/activate"
ACCESS_LICENSE_PLATE_DEACTIVATE_ENDPOINT = f"{ACCESS_LICENSE_PLATE_ENDPOINT}/deactivate"
ACCESS_MFA_CODE_ENDPOINT = f"{ACCESS_CREDENTIALS_ENDPOINT}/mfa_code"

# Access Control Door Endpoints
# (Yes, there is a /door and /doors endpoint, smh)
ACCESS_DOOR_ENDPOINT = f"{ACCESS_CONTROL_ENDPOINT}/door"
ACCESS_DOORS_ENDPOINT = f"{ACCESS_CONTROL_ENDPOINT}/doors"
ACCESS_ADMIN_UNLOCK_ENDPOINT = f"{ACCESS_DOOR_ENDPOINT}/admin_unlock"
ACCESS_USER_UNLOCK_ENDPOINT = f"{ACCESS_DOOR_ENDPOINT}/user_unlock"

# Access Control Access Level Endpoints
ACCESS_LEVEL_ENDPOINT = f"{ACCESS_DOOR_ENDPOINT}/access_level"

# Access Control Door Exception Endpoints
ACCESS_DOOR_EXCEPTIONS_ENDPOINT = f"{ACCESS_DOOR_ENDPOINT}/exception_calendar"

# Access Control Events Endpoints
ACCESS_EVENTS_ENDPOINT = f"{BASE_URL}/events/v1/access"

# Viewing Station Endpoints
VIEWING_STATION_ENDPOINT = f"{BASE_URL}/viewing_station/v1/devices"

# Helix URL
HELIX_URL = "/video_tagging"

# Helix Endpoints
HELIX_EVENT_TYPE_ENDPOINT = f"{CAMERAS_ENDPOINT}{HELIX_URL}/event_type"
HELIX_EVENT_ENDPOINT = f"{CAMERAS_ENDPOINT}{HELIX_URL}/event"
HELIX_SEARCH_ENDPOINT = f"{HELIX_EVENT_ENDPOINT}/search"
