import { DeviceCheck, DeviceCheckResult } from "./deviceTrust"; import { SecurityCheckResultMetric } from "./metrics"; import { MetricsService } from "@aerogear/core"; /** * Service module for handling performing and reporting possible security * issues in a mobile application. * * This requires the @aerogear/cordova-plugin-aerogear-security plugin to be * included in an application. */ export declare class SecurityService { private metrics?; private static readonly METRICS_KEY; constructor(metrics?: MetricsService | undefined); /** * Execute the provided security check and return the result. * * @returns The result of the provided check. */ check(check: DeviceCheck): Promise; /** * Execute the provided security check and publish the result as a metric. * * @return The sent metric for the check result. */ checkAndPublishMetric(check: DeviceCheck): Promise; /** * Execute the provided security checks and return the results in an array. * * @returns An array of results for the provided checks. */ checkMany(...checks: DeviceCheck[]): Promise; /** * Execute the provided security checks and publish the results as metrics. * * @return An array of the sent metrics. */ checkManyAndPublishMetric(...checks: DeviceCheck[]): Promise; /** * Publish metrics results from self defence checks to a metrics service. * Application configuration must be provided to the security service on * creation, otherwise metrics sending will always fail. * * @return Promise with the result of the underlying metrics publisher. */ private publishCheckResultMetrics; }