Options
All
  • Public
  • Public/Protected
  • All
Menu

Class InventoryService

Hierarchy

Index

Constructors

constructor

Properties

binary

queriesUtil

queriesUtil: QueriesUtil

Methods

childAdditionsAdd

childAdditionsCreate

childAdditionsList

childAdditionsRemove

childAssetsAdd

childAssetsCreate

childAssetsList

childAssetsRemove

childDevicesAdd

childDevicesCreate

childDevicesList

childDevicesRemove

create

  • Parameters

    Returns Promise<IResult<IManagedObject>>

    Response wrapped in IResult

    Example

    
     const partialManagedObj: Partial<IManagedObject> = {
       customFragment: 'yourData'
     };
    
     (async () => {
       const {data, res} = await inventoryService.create(partialManagedObj);
     })();
    

delete

  • Parameters

    • managedObjectOrId: IdReference
    • Default value params: any = {}

    Returns Promise<IResult<null>>

    Response wrapped in IResult

detail

  • Parameters

    • managedObjectOrId: IdReference
    • Default value filter: object = {}

    Returns Promise<IResult<IManagedObject>>

    Response wrapped in IResult

    Example

    
       const managedObjId: number = 1;
       const filter = { withChildren: false };
    
       (async () => {
         const {data, res} = await inventoryService.detail(managedObjId, filter);
      })();
    

detail$

  • Parameters

    Returns Observable<IManagedObject>

    Data wrapped as Observable

    Example

    
      const managedObjId: number = 1;
    
      const detail$ = inventoryService.detail$(managedObjId);
      detail$.subscribe((data) => console.log(data));
    

    Deprecated This function will be removed soon in favor of decoupling this library from rxjs. Use Realtime for realtime connection and rxjs defer() or from() to composite an observable on your own.

list

list$

  • Parameters

    Returns Observable<IManagedObject[]>

    Data wrapped as Observable.

    Example

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

    Deprecated This function will be removed soon in favor of decoupling this library from rxjs. Use Realtime for realtime connection and rxjs defer() or from() to composite an observable on your own.

listQuery

  • Parameters

    • query: any
    • Default value filter: object = {}

    Returns Promise<IResultList<IManagedObject>>

    Response wrapped in IResultList

listQueryDevices

  • Parameters

    • query: any
    • Default value filter: object = {}

    Returns Promise<IResultList<IManagedObject>>

    Response wrapped in IResultList

update

  • Parameters

    Returns Promise<IResult<IManagedObject>>

    Response wrapped in IResult

    Example

    
     const partialUpdateObject: Partial<IManagedObject> = {
       customFragment: 'Changed data',
       name: 'Name'
     };
    
     (async () => {
       const {data, res} = await inventoryService.update(partialUpdateObject);
     })();
    

Generated using TypeDoc