Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ApplicationService

Hierarchy

Index

Constructors

constructor

Methods

binary

clone

create

  • Creates a new application.

    example
    
     const newApp = {
       name: 'New application',
       type: 'EXTERNAL',
       key: 'new-app'
     };
    
     (async () => {
       const {data, res} = await applicationService.create(newApp);
     })();
    

    Parameters

    Returns Promise<IResult<IApplication>>

    Response wrapped in IResult

delete

  • Removes an application with given id.

    example
    
     const removeApp: object = {
        id: 38
      };
    
      (async () => {
        const {data, res} = await applicationService.delete(removeApp);
        // data will be null
      })();
    

    Parameters

    • entityOrId: string | number | IApplication

      entity or id of the application.

    Returns Promise<IResult<null>>

    Response wrapped in IResult

detail

  • Gets the details of selected application.

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

    Parameters

    • entityOrId: string | number | IApplication

      Entity or Id of the entity.

    Returns Promise<IResult<IApplication>>

    Response wrapped in IResult

list

  • Gets the list of existing applications filtered by parameters.

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

    Parameters

    • Default value filter: object = {}

      Object containing filters for querying applications.

    Returns Promise<IResultList<IApplication>>

    Response wrapped in IResultList

list$

  • Gets a list as observable.

    example
    
      const list$ = alarmService.list$();
      list$.subscribe((data) => console.log(data));
    

    Parameters

    • Default value filter: object = {}

      Object containing filters for querying

    • Default value options: IObservableOptions = {}

      To configure the observable

    Returns ObservableList<IApplication>

    Data wrapped as ObservableList

listByName

  • Parameters

    • name: string

    Returns Promise<IResultList<IApplication>>

listByOwner

  • Parameters

    • Optional tenantOrName: string | ITenant
    • Default value params: object = {}

    Returns Promise<IResultList<IApplication>>

listByTenant

  • Parameters

    • Optional tenantOrName: string | ITenant
    • Default value params: object = {}

    Returns Promise<IResultList<IApplication>>

listByUser

  • Parameters

    • Optional userOrId: string | number | IUser
    • Default value params: object = {}

    Returns Promise<IResultList<IApplication>>

update

  • Updates existing application. Make sure that you specifiy the application id within the update object.

    example
    
     const updateApp = {
       id: 38
       name: 'Updated application'
     };
    
     (async () => {
       const {data, res} = await applicationService.update(updateApp);
     })();
    

    Parameters

    Returns Promise<IResult<IApplication>>

    Response wrapped in IResult

Generated using TypeDoc