Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AlarmService

Hierarchy

Index

Constructors

Methods

Constructors

constructor

Methods

create

  • Parameters

    Returns Promise<IResult<IAlarm>>

    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);
     })();
    

detail

  • Parameters

    Returns Promise<IResult<IAlarm>>

    Response wrapped in IResult

    Example

    
       const alarmId: number = 1;
    
       (async () => {
         const {data, res} = await alarmService.detail(alarmId);
       })();
    

list

update

  • Parameters

    Returns Promise<IResult<IAlarm>>

    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);
     })();
    

Generated using TypeDoc