import { AeroGearConfiguration, ConfigurationService, MetricsService } from "@aerogear/core"; export class AeroGearApp { public metrics?: MetricsService; public config?: ConfigurationService; constructor(config: AeroGearConfiguration) { this.config = new ConfigurationService(config); const metricsConfig = this.config.getConfigByType(MetricsService.TYPE); if (metricsConfig) { const metricsOptions = { configuration: metricsConfig }; this.metrics = new MetricsService(metricsOptions); this.metrics.sendAppAndDeviceMetrics(); } } } /** * Initialize all platform SDK's by using configuration generated by AeroGear command line client * * @param config object containing SDK. Object can be read from file or pasted directly in source code. */ export const init = (config: AeroGearConfiguration): AeroGearApp => { return new AeroGearApp(config); };