Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AuditService

Hierarchy

Index

Constructors

Methods

Constructors

constructor

Methods

create

  • Creates a new audit record for a given source.

    example
    
     const mandantoryObject: IAuditRecord = {
       type: AuditRecordType.ALARM,
       time: '2018-05-02T10:08:00Z',
       severity: Severity.MAJOR,
       source: {id: 1}
     };
    
     (async () => {
       const {data, res} = await auditService.create(mandantoryObject);
     })();
    

    Parameters

    • entity: IAuditRecord

      Audit record object with mandantory fragments. IAuditRecord implements the IEvent interface.

    Returns Promise<IResult<IAuditRecord>>

    Response wrapped in IResult

detail

  • Gets the details of selected audit record.

    example
    
       const auditId: number = 1;
    
       (async () => {
         const {data, res} = await auditService.detail(auditId);
      })();
    

    Parameters

    • entityOrId: string | number | IAuditRecord

      Entity or Id of the entity.

    Returns Promise<IResult<IAuditRecord>>

    Response wrapped in IResult

list

  • Gets the list of audit records filtered by parameters.

    example
    
     const filter: object = {
        severity: Severity.MAJOR,
        pageSize: 100,
        withTotalPages: true
      };
    
      (async () => {
        const {data, res, paging} = await auditService.list(filter);
      })();
    

    Parameters

    • Default value filter: object = {}

      Object containing filters for querying audit records.

    Returns Promise<IResultList<IAuditRecord>>

    Response wrapped in IResultList

Generated using TypeDoc