dt-common-device
Version:
A secure and robust device management library for IoT applications
56 lines (55 loc) • 2.25 kB
TypeScript
import { AlertService } from "./Alert.service";
/**
* Example usage of the updated AlertService with AlertBuilder integration
* This file demonstrates various ways to use the AlertService with the new AlertBuilder
*/
export declare class AlertServiceExample {
private readonly alertService;
constructor(alertService: AlertService);
/**
* Example 1: Using the updated createAlert method with AlertBuilder
*/
createAlertWithBuilder(): Promise<import("../../../types/alert.types").AlertDocument>;
/**
* Example 2: Using convenience methods for specific alert types
*/
createSpecificAlerts(): Promise<{
readinessAlert: import("../../../types/alert.types").AlertDocument;
operationsAlert: import("../../../types/alert.types").AlertDocument;
securityAlert: import("../../../types/alert.types").AlertDocument;
energyAlert: import("../../../types/alert.types").AlertDocument;
}>;
/**
* Example 3: Using device-specific alert methods
*/
createDeviceAlerts(): Promise<{
deviceAlert1: import("../../../types/alert.types").AlertDocument;
deviceAlert2: import("../../../types/alert.types").AlertDocument;
}>;
/**
* Example 4: Using hub-specific alert methods
*/
createHubAlerts(): Promise<{
hubAlert1: import("../../../types/alert.types").AlertDocument;
hubAlert2: import("../../../types/alert.types").AlertDocument;
}>;
/**
* Example 5: Using static factory methods with AlertBuilder
*/
createAlertsWithStaticMethods(): Promise<{
alert1: import("../../../types/alert.types").AlertDocument;
alert2: import("../../../types/alert.types").AlertDocument;
}>;
/**
* Example 6: Creating multiple alerts efficiently
*/
createMultipleAlerts(): Promise<import("../../../types/alert.types").AlertDocument[]>;
/**
* Example 7: Creating alerts with snooze functionality
*/
createSnoozedAlert(): Promise<import("../../../types/alert.types").AlertDocument>;
/**
* Example 8: Backward compatibility - still works with CreateAlertData
*/
createAlertWithLegacyData(): Promise<import("../../../types/alert.types").AlertDocument>;
}