UNPKG

averox-sdk-secure

Version:

Real-time SDK for key monitoring, secure messaging, and A/V streaming with encryption

46 lines (45 loc) 1.39 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Config = void 0; const logger_1 = require("@config/logger"); /** * Main SDK class for interacting with the Mine platform. * @class SDK */ class Config { /** * Creates an instance of the Mine SDK. * @param {SDKConfig} config - Configuration object for the SDK * @throws {Error} When API key is not provided */ constructor(config) { if (!config.apiKey) { throw new Error('API key is required'); } this.config = config; // Initialize logger with default configuration this.logger = new logger_1.Logger({ minLevel: process.env.NODE_ENV === 'production' ? logger_1.LogLevel.INFO : logger_1.LogLevel.DEBUG, timestamps: true, showLevel: true, }); } /** * Initializes the SDK with the provided configuration. * @returns {void} */ initialize() { this.logger.info('SDK initialized with config:', this.config); this.connectToPanel(); } /** * Establishes connection with the Mine panel. * @private * @returns {void} */ connectToPanel() { this.logger.info(`Connecting to panel with API key: ${this.config.apiKey}`); // TODO: Implement actual API calls using axios } } exports.Config = Config;