/* eslint-disable @typescript-eslint/no-magic-numbers -- Constants file */ import type { LogLevel } from '../types/common'; export const SIGNALING_API_VERSION = 8; export const LOG_LEVEL_ERROR: LogLevel = 3; export const LOG_LEVEL_WARN: LogLevel = 4; export const LOG_LEVEL_INFO: LogLevel = 6; export const LOG_LEVEL_DEBUG: LogLevel = 7; export const LogLevels: Record = { Error: LOG_LEVEL_ERROR, Warn: LOG_LEVEL_WARN, Info: LOG_LEVEL_INFO, Debug: LOG_LEVEL_DEBUG, }; export const ASDK_VERSION = '2.5.1'; export const CONSUMER_CHECK_STATE_TIMEOUT = 4500; export const PEER_APP_DATA_MAX_SIZE_BYTES = 2048; export const MAX_JOIN_ATTEMPTS = 4; export const DEBOUNCE_LIMIT = 3; export const MEDIASOUP_SSRC_PROBATOR = 1234; export const HALF_SECOND_IN_MS = 500; export const SECOND_IN_MS = 1_000; export const TWO_SECONDS_IN_MS = 2 * 1_000; export const FIVE_SECONDS_IN_MS = 5 * 1_000; export const TEN_SECONDS_IN_MS = 10 * 1_000; export const FIFTEEN_SECONDS_IN_MS = 15 * 1_000; export const MINUTE_IN_MS = 60 * 1_000; export enum HttpStatusCode { // 1xx Informational Continue = 100, SwitchingProtocols = 101, Processing = 102, // 2xx Success OK = 200, Created = 201, Accepted = 202, NonAuthoritativeInformation = 203, NoContent = 204, ResetContent = 205, PartialContent = 206, // 3xx Redirection MultipleChoices = 300, MovedPermanently = 301, Found = 302, SeeOther = 303, NotModified = 304, TemporaryRedirect = 307, PermanentRedirect = 308, // 4xx Client Errors BadRequest = 400, Unauthorized = 401, PaymentRequired = 402, Forbidden = 403, NotFound = 404, MethodNotAllowed = 405, NotAcceptable = 406, RequestTimeout = 408, Conflict = 409, Gone = 410, UnsupportedMediaType = 415, TooManyRequests = 429, // 5xx Server Errors InternalServerError = 500, NotImplemented = 501, BadGateway = 502, ServiceUnavailable = 503, GatewayTimeout = 504, } export const CHANNEL_MESSAGES_DATA_PRODUCER = 'channel-messages-data-producer';