Optional
realtime: RealtimeCreates a new alarm.
Response wrapped in IResult
Example
const mandantoryObject: IAlarm = {
severity: Severity.CRITICAL,
source: device,
text: 'I am an Alarm!',
time: '2018-05-02T10:08:00Z',
type: 'device-type-here',
};
(async () => {
const {data, res} = await alarmService.create(mandantoryObject);
})();
Alarm object with mandantory fragments.
Gets the details of selected alarms.
Response wrapped in IResult
Example
const alarmId: number = 1;
(async () => {
const {data, res} = await alarmService.detail(alarmId);
})();
Entity or Id of the entity.
Object containing filters for querying alarms.
Example
const filter: object = {
severity: Severity.MAJOR,
pageSize: 100,
withTotalPages: true
};
(async () => {
const {data, res, paging} = await alarmService.list(filter);
})();
Updates alarm data.
Response wrapped in IResult
Example
const partialUpdateObject: Partial<IAlarm> = {
severity: Severity.MINOR,
source: device,
text: 'Changed Alarm!'
};
(async () => {
const {data, res} = await alarmService.update(partialUpdateObject);
})();
Alarm is partially updatable.
This class allows for managing alarms.