import type { HostPort } from '@balena/env-parsing'; export declare let version: string; export declare function setVersion(v: typeof version): void; export declare enum ADVISORY_LOCK_NAMESPACES { release__revision__belongs_to__application = 1 } export declare const API_HOST: string; export declare const PORT: number; export declare const API_HEARTBEAT_STATE_ENABLED: number; export declare let API_HEARTBEAT_STATE_TIMEOUT_SECONDS: number; /** * null:do not update the DB's device heartbeat to Online, if Redis says it's already Online * 0: always run DB device heartbeat updates to Online * >0: always persist an Online device heartbeat to the DB after N ms, even if the write cache is already Online. * ie: only use the Redis write cache Online-ness for up to N ms and skip updating the DB to Online during that period. */ export declare let API_HEARTBEAT_STATE_ONLINE_UPDATE_CACHE_TIMEOUT: number | null; export declare const API_VPN_SERVICE_API_KEY: string; export declare const VPN_CONNECT_PROXY_PORT: number; export declare let ASYNC_TASKS_ENABLED: boolean; export declare const AUTH_RESINOS_REGISTRY_CODE: string | undefined; export declare const COOKIE_SESSION_SECRET: string; /** * null: include all device type and device contract slugs * "x;y;z": include only the specified device type and contract slugs - note that you MUST list * all dependent slugs as well so for hw.device-type/asus-tinker-board-s you would need: * `arch.sw/armv7hf;hw.device-manufacturer/asus;hw.device-family/tinkerboard;hw.device-type/asus-tinker-board-s` * For something like hw.device-type/iot-gate-imx8 you would need: * `arch.sw/aarch64;hw.device-type/iot-gate-imx8` * (the order of the slugs in this variable does not matter) */ export declare const CONTRACT_ALLOWLIST: Set; export declare const CONTRACTS_PUBLIC_REPO_OWNER: string; export declare const CONTRACTS_PUBLIC_REPO_NAME: string; export declare const CONTRACTS_PUBLIC_REPO_BRANCH: string | undefined; export declare const CONTRACTS_PRIVATE_REPO_OWNER: string | undefined; export declare const CONTRACTS_PRIVATE_REPO_NAME: string | undefined; export declare const CONTRACTS_PRIVATE_REPO_BRANCH: string | undefined; export declare const CONTRACTS_PRIVATE_REPO_TOKEN: string | undefined; export declare const DB_POOL_SIZE: number | undefined; export declare const DB_STATEMENT_TIMEOUT: number; export declare const DB_QUERY_TIMEOUT: number; export declare const DB_PREPARE_AFTER_N: number | boolean; export declare const DELTA_HOST: string; export declare const FILES_HOST: string; export declare const DEVICE_CONFIG_OPENVPN_CA: string; export declare const VPN_UDP_HOST: string | undefined; export declare const VPN_HOST: string; export declare const VPN_PORT: string; export declare const DEVICE_CONFIG_OPENVPN_CONFIG: string; export declare const DEVICE_CONFIG_SSH_AUTHORIZED_KEYS: string; export declare const EXTERNAL_HTTP_TIMEOUT_MS: number; export declare const IMAGE_STORAGE_BUCKET: string; export declare const IMAGE_STORAGE_ENDPOINT: string; export declare const IMAGE_STORAGE_PREFIX: string; export declare const IMAGE_STORAGE_ACCESS_KEY: string | undefined; export declare const IMAGE_STORAGE_SECRET_KEY: string | undefined; export declare const IMAGE_STORAGE_FORCE_PATH_STYLE: boolean; export declare const IMAGE_STORAGE_DEBUG_REQUEST_ERRORS: boolean; export declare const JSON_WEB_TOKEN_EXPIRY_MINUTES: number; export declare const JSON_WEB_TOKEN_SECRET: string; export declare const JSON_WEB_TOKEN_LIMIT_EXPIRY_REFRESH: boolean; export declare const LOGS_HOST: string | undefined; export declare const MIXPANEL_TOKEN: string; export declare const NODE_ENV: string | undefined; export declare const NODE_EXTRA_CA_CERTS: string | undefined; export declare const RATE_LIMIT_FACTOR: number; export declare const RATE_LIMIT_MEMORY_BACKEND: string | undefined; type RedisAuth = { username?: string; password?: string; }; type RedisOpts = { isCluster: true; hosts: HostPort[]; auth: RedisAuth; } | { isCluster: false; host: HostPort; auth: RedisAuth; roHost: HostPort; roAuth: RedisAuth; }; export declare const REDIS: { general: { isCluster: false; host: HostPort; auth: RedisAuth; roHost: HostPort; roAuth: RedisAuth; }; logs: RedisOpts; }; export declare const REDIS_LOGS_SHARDED_PUBSUB: boolean; export declare const REDIS_LOGS_COMPRESSION_ENABLED: boolean; export declare const LOKI_INGESTER_HOST: string | undefined; export declare const LOKI_QUERY_HOST: string | undefined; export declare const LOKI_INGESTER_GRPC_PORT: number; export declare const LOKI_QUERY_HTTP_PORT: number; export declare const LOKI_HISTORY_GZIP: boolean; export declare const LOKI_HISTORY_TIMEOUT: number; export declare const LOKI_GRPC_SEND_GZIP: boolean; export declare const LOKI_GRPC_RECEIVE_COMPRESSION_LEVEL: number; export declare const LOKI_WRITE_PCT: number; /** * This is the percent of log read requests that will go to loki, however the number of logs fetched from loki * will vary based upon the type of those read requests, eg it could be a long streaming request or a one-off fetch */ export declare const LOKI_READ_PCT: number; export declare const LOGS_LOKI_ENABLED: boolean; export declare const LOKI_RETRIES_ENABLED: boolean; export declare const LOKI_PUSH_TIMEOUT: number; export declare const LOGS_REDIS_WRITE_PCT: number; /** * This is the percent of log read requests that will go to redis, however the number of logs fetched from redis * will vary based upon the type of those read requests, eg it could be a long streaming request or a one-off fetch */ export declare const LOGS_REDIS_READ_PCT: number; export declare const LOGS_REDIS_ENABLED: boolean; export declare const NDJSON_CTYPE = "application/x-ndjson"; export declare const LOGS_HEARTBEAT_INTERVAL = 58000; export declare const LOGS_DEFAULT_HISTORY_COUNT = 1000; export declare const LOGS_DEFAULT_SUBSCRIPTION_COUNT = 0; export declare const LOGS_SUBSCRIPTION_EXPIRY_SECONDS: number; export declare const LOGS_SUBSCRIPTION_EXPIRY_HEARTBEAT_SECONDS: number; export declare const LOGS_DEFAULT_RETENTION_LIMIT = 1000; export declare const LOGS_DEFAULT_RETENTION_DURATION: number; export declare const LOGS_DEFAULT_HISTORY_STREAMING_LOOKBACK: number; export declare const LOGS_DEFAULT_HISTORY_LOOKBACK: number; export declare const LOGS_PRIMARY_BACKEND: string; export declare const LOGS_READ_STREAM_FLUSH_INTERVAL: number; export declare const LOGS_STREAM_FLUSH_INTERVAL: number; export declare const LOGS_BACKEND_UNAVAILABLE_FLUSH_INTERVAL: number; export declare const LOGS_WRITE_BUFFER_LIMIT: number; export declare const PINEJS_QUEUE_CONCURRENCY: number; export declare let PINEJS_QUEUE_INTERVAL_MS: number; export declare const PINEJS_WEBRESOURCE_MULTIPART_ENABLED: boolean; export declare const ASYNC_TASK_ATTEMPT_LIMIT: number; export declare let ASYNC_TASK_CREATE_SERVICE_INSTALLS_ENABLED: boolean; export declare const ASYNC_TASK_CREATE_SERVICE_INSTALLS_BATCH_SIZE: number; export declare const ASYNC_TASK_CREATE_SERVICE_INSTALLS_MAX_TIME_MS: number; export declare const ASYNC_TASK_DELETE_REGISTRY_IMAGES_ENABLED: boolean; export declare const ASYNC_TASK_DELETE_REGISTRY_IMAGES_BATCH_SIZE: number; export declare const ASYNC_TASK_DELETE_REGISTRY_IMAGES_OFFSET_MS: number; export declare let ASYNC_TASK_DELETE_REGISTRY_IMAGES_MAX_TIME_MS: number; export declare const USERNAME_BLACKLIST: string[]; export declare const REGISTRY2_HOST: string; export declare const REGISTRY_TOKEN_AUDIENCE: string; export declare const REGISTRY_STORAGE_BUCKET: string | undefined; export declare const REGISTRY_STORAGE_ROOT_PATH: string | undefined; export declare const REGISTRY_STORAGE_ENDPOINT: string | undefined; export declare const REGISTRY_STORAGE_ACCESS_KEY: string | undefined; export declare const REGISTRY_STORAGE_SECRET_KEY: string | undefined; export declare const REGISTRY_STORAGE_FORCE_PATH_STYLE: boolean; export declare const SENTRY_DSN: string | undefined; export declare const SUPERUSER_EMAIL: string; export declare const SUPERUSER_PASSWORD: string; export declare const TOKEN_AUTH_BUILDER_TOKEN: string; export declare const TOKEN_AUTH_CERT_ISSUER: string; export declare const TOKEN_AUTH_CERT_KEY: string; export declare const TOKEN_AUTH_CERT_KID: string; export declare const TOKEN_AUTH_CERT_PUB: string; export declare const TOKEN_AUTH_JWT_ALGO: string; export declare const VPN_SERVICE_API_KEY: string; export declare const VPN_GUEST_API_KEY: string | undefined; /** Set a large expiry so that huge pulls/pushes go through without needing to re-authenticate mid-process. */ export declare const REGISTRY_TOKEN_EXPIRY_SECONDS: number; export declare let DEFAULT_SUPERVISOR_POLL_INTERVAL: number; export declare const HIDE_UNVERSIONED_ENDPOINT: boolean; export declare const METRICS_MAX_REPORT_INTERVAL_SECONDS: number; export declare const METRICS_MAX_INTEGER_VALUE: number; export declare const DOWNLOAD_PROGRESS_MAX_REPORT_INTERVAL_SECONDS: number; /** * The time between the end of an empty state get and the start of the next */ export declare const EMPTY_DEVICE_STATE_GET_DELAY_SECONDS: number; /** * The delay before responding to deleted/frozen devices device logs requests as a sort of backoff mechanism */ export declare const DELETED_FROZEN_DEVICE_LOGS_DELAY_MS: number; export declare const IMAGE_INSTALL_CACHE_TIMEOUT_SECONDS: number; export declare const DEVICE_TYPES_CACHE_LOCAL_TIMEOUT: number; export declare const DEVICE_TYPES_CACHE_TIMEOUT: number; export declare const BUILD_PROPERTY_CACHE_TIMEOUT: number; export declare const BUILD_COMPRESSED_SIZE_CACHE_TIMEOUT: number; export declare const API_KEY_EXISTS_CACHE_TIMEOUT: number; export declare const DEVICE_EXISTS_CACHE_TIMEOUT: number; export declare const GET_SUBJECT_CACHE_TIMEOUT: number; export declare const RESOLVE_IMAGE_ID_CACHE_TIMEOUT: number; export declare const RESOLVE_IMAGE_LOCATION_CACHE_TIMEOUT: number; export declare const RESOLVE_IMAGE_READ_ACCESS_CACHE_TIMEOUT: number; export declare const VPN_AUTH_CACHE_TIMEOUT: number; export declare const DEVICE_LOGS_WRITE_AUTH_CACHE_TIMEOUT: number; export declare const DEVICE_LOGS_LOKI_CONTEXT_CACHE_TIMEOUT: number; export declare const API_KEY_ROLE_CACHE_TIMEOUT: number; export declare const GZIP_COMPRESSION_QUALITY: number; export declare const BROTLI_COMPRESSION_QUALITY: number; export declare const BROTLI_COMPRESSION_WINDOW_BITS: number | undefined; export declare const TRUST_PROXY: number | boolean | ((addr: string, i: number) => boolean); export declare const IGNORE_FROZEN_DEVICE_PERMISSIONS: boolean; export declare const WEBRESOURCES_S3_HOST: string | undefined; export declare const WEBRESOURCES_S3_REGION: string | undefined; export declare const WEBRESOURCES_S3_ACCESS_KEY: string | undefined; export declare const WEBRESOURCES_S3_SECRET_KEY: string | undefined; export declare const WEBRESOURCES_S3_BUCKET: string | undefined; export declare const WEBRESOURCES_S3_MAX_FILESIZE: number; export declare const WEBRESOURCES_S3_STORAGE_CLASS: string | undefined; export declare const WEBRESOURCES_CLOUDFRONT_PRIVATEKEY_PATH: string | undefined; export declare const WEBRESOURCES_CLOUDFRONT_PUBLICKEY: string | undefined; export declare const WEBRESOURCES_CLOUDFRONT_HOST: string | undefined; export declare const DISABLED_SCHEDULED_JOBS: Set; export declare const disableScheduledJob: (jobName: string) => void; export declare const enableScheduledJob: (jobName: string) => void; export declare const guardTestMockOnly: () => void; export declare const TEST_MOCK_ONLY: { DEFAULT_SUPERVISOR_POLL_INTERVAL: typeof DEFAULT_SUPERVISOR_POLL_INTERVAL; API_HEARTBEAT_STATE_TIMEOUT_SECONDS: typeof API_HEARTBEAT_STATE_TIMEOUT_SECONDS; API_HEARTBEAT_STATE_ONLINE_UPDATE_CACHE_TIMEOUT: typeof API_HEARTBEAT_STATE_ONLINE_UPDATE_CACHE_TIMEOUT; ASYNC_TASKS_ENABLED: typeof ASYNC_TASKS_ENABLED; ASYNC_TASK_CREATE_SERVICE_INSTALLS_ENABLED: typeof ASYNC_TASK_CREATE_SERVICE_INSTALLS_ENABLED; PINEJS_QUEUE_INTERVAL_MS: typeof PINEJS_QUEUE_INTERVAL_MS; ASYNC_TASK_DELETE_REGISTRY_IMAGES_MAX_TIME_MS: typeof ASYNC_TASK_DELETE_REGISTRY_IMAGES_MAX_TIME_MS; }; export {};