# By: Riasat Ullah
# This file contains the internal configuration of the web server.

from constants import static_vars

#########################
# File handling
#########################
# Maximum number of seconds allowed for an upload file to be sent
# to the web server after the upload request has been granted.
FILE_UPLOAD_REQUEST_TIMEOUT = 15

# Type of file extensions allowed
LIVE_CALL_ROUTING_AUDIO_EXTENSIONS = ['mp3']
STANDARD_IMAGE_EXTENSIONS = ['jpg', 'png']
USER_PROFILE_IMAGE_EXTENSIONS = ['jpg', 'png']

# Allowed mime types
LIVE_CALL_ROUTING_AUDIO_MIME_TYPES = ['audio/mpeg', 'audio/wav', 'audio/x-wav']
STANDARD_IMAGE_MIME_TYPES = ['image/jpeg', 'image/png']
USER_PROFILE_IMAGE_MIME_TYPES = ['image/jpeg', 'image/png']


#########################
# SSO handling
#########################
SSO_GOOGLE_DISCOVERY_CACHE_TIMEOUT = 86400      # seconds
SSO_TEMP_VARIABLE_CACHE_TIMEOUT = 300           # seconds


#########################
# Status pages
#########################
DEFAULT_ITSM_PAGE_COOKIE_LIFETIME = 108000


#########################
# General Configurations
#########################
ALLOWED_CDN_HANDLED_INTEGRATIONS = [static_vars.integ_type_google_chat, static_vars.integ_type_microsoft_teams,
                                    static_vars.integ_type_sentry, static_vars.integ_type_slack]
ALLOWED_REGIONS = [static_vars.aws_europe_paris, static_vars.aws_us_ohio]
ALLOWED_REGION_SWITCH_PATHS = ['register', 'login', 'login/mobile-app']
ONBOARDING_PERIOD = 30              # days
DEFAULT_COOKIE_LIFETIME = 31536000  # 1 year
