Options
All
  • Public
  • Public/Protected
  • All
Menu

Class InventoryService

This class allows for managing managed objects and different child types, see ChildType.

Hierarchy

Index

Constructors

constructor

Properties

binary

Methods

childAdditionsAdd

  • Adds an existing managed object as child addition to another managed object (parent)

    example
    
       const childRef: number = 2;
       const parentReferenceId: number = 1;
    
       (async () => {
         const {data, res} = await inventoryService.childAdditionsCreate(childRef, parentReferenceId);
       })();
    

    Parameters

    Returns Promise<IResult<IIdentified>>

    Response wrapped in IResult

childAdditionsCreate

  • Creates a new managed object as child addition to another managed object (parent)

    example
    
       const mOAsChildAddition: Partial<IManagedObject> = {
         name: 'Child addition MO',
         type: 'new type',
         ...
       };
    
       // This is the identifier of the managed object which should be the parent of
       // mOAsChildAddition, see above.
       const parentReferenceId: number = 1;
    
       (async () => {
         const {data, res} = await inventoryService.childAdditionsCreate(mOAsChildAddition, parentReferenceId);
       })();
    

    Parameters

    Returns Promise<IResult<IIdentified>>

    Response wrapped in IResult

childAdditionsList

  • Gets a list of child additions from a given managed object (parent)

    example
       const parentReferenceId: IdReference = 1;
    
       const filter: object = {
         pageSize: 100,
         withTotalPages: true
       };
    
       (async () => {
         const {data, res, paging} = await inventoryService.childAdditionsList(parentReferenceId, filter);
       })();
    

    Parameters

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

    Returns Promise<IResultList<IManagedObject>>

    Response wrapped in IResultList

childAdditionsRemove

  • Removes an existing managed object as child addition from another managed object (parent)

    example
    
       const childRef: number = 2;
       const parentReferenceId: number = 1;
    
       (async () => {
         const {data, res} = await inventoryService.childAdditionsRemove(childRef, parentReferenceId);
       })();
    

    Parameters

    Returns Promise<IResult<null>>

    Response wrapped in IResult

childAssetsAdd

  • Adds an existing managed object as child asset to another managed object (parent)

    example
    
       const childRef: number = 2;
       const parentReferenceId: number = 1;
    
       (async () => {
         const {data, res} = await inventoryService.childAssetsAdd(childRef, parentReferenceId);
       })();
    

    Parameters

    Returns Promise<IResult<IIdentified>>

    Response wrapped in IResult

childAssetsCreate

  • Creates a new managed object as child asset to another managed object (parent)

    example
    
       const mOAsChildAsset: Partial<IManagedObject> = {
         name: 'Child asset MO',
         type: 'new type',
         ...
       };
    
       // This is the identifier of the managed object which should be the parent of
       // mOAsChildAsset, see above.
       const parentReferenceId: number = 1;
    
       (async () => {
         const {data, res} = await inventoryService.childAdditionsCreate(mOAsChildAddition, parentReferenceId);
       })();
    

    Parameters

    Returns Promise<IResult<IIdentified>>

    Response wrapped in IResult

childAssetsList

  • Gets a list of child assets from a given managed object (parent)

    example
    
       const parentReferenceId: IdReference = 1;
    
       const filter: object = {
         pageSize: 100,
         withTotalPages: true
       };
    
       (async () => {
         const {data, res, paging} = await inventoryService.childAssetsList(parentReferenceId, filter);
       })();
    

    Parameters

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

    Returns Promise<IResultList<IManagedObject>>

    Response wrapped in IResultList

childAssetsRemove

  • Removes an existing managed object as child asset from another managed object (parent)

    example
    
       const childRef: number = 2;
       const parentReferenceId: number = 1;
    
       (async () => {
         const {data, res} = await inventoryService.childAssetsRemove(childRef, parentReferenceId);
       })();
    

    Parameters

    Returns Promise<IResult<null>>

    Response wrapped in IResult

childDevicesAdd

  • Adds an existing managed object as child device to another managed object (parent)

    example
    
       const childRef: number = 2;
       const parentReferenceId: number = 1;
    
       (async () => {
         const {data, res} = await inventoryService.childDevicesAdd(childRef, parentReferenceId);
       })();
    

    Parameters

    Returns Promise<IResult<IIdentified>>

    Response wrapped in IResult

childDevicesCreate

  • Creates a new managed object as child device to another managed object (parent)

    example
    
       const mOAsChildDevice: Partial<IManagedObject> = {
         name: 'Child device MO',
         type: 'new type',
         ...
       };
    
       // This is the identifier of the managed object which should be the parent of
       // mOAsChildDevice, see above.
       const parentReferenceId: number = 1;
    
       (async () => {
         const {data, res} = await inventoryService.childDevicesCreate(mOAsChildDevice, parentReferenceId);
       })();
    

    Parameters

    Returns Promise<IResult<IIdentified>>

    Response wrapped in IResult

childDevicesList

  • Gets a list of child devices from a given managed object (parent)

    example
    
       const parentReferenceId: IdReference = 1;
    
       const filter: object = {
         pageSize: 100,
         withTotalPages: true
       };
    
       (async () => {
         const {data, res, paging} = await inventoryService.childDevicesList(parentReferenceId, filter);
       })();
    

    Parameters

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

    Returns Promise<IResultList<IManagedObject>>

    Response wrapped in IResultList

childDevicesRemove

  • Removes an existing managed object as child device from another managed object (parent)

    example
    
       const childRef: number = 2;
       const parentReferenceId: number = 1;
    
       (async () => {
         const {data, res} = await inventoryService.childDevicesRemove(childRef, parentReferenceId);
       })();
    

    Parameters

    Returns Promise<IResult<null>>

    Response wrapped in IResult

create

  • Creates a new managed object.

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

    Parameters

    Returns Promise<IResult<IManagedObject>>

    Response wrapped in IResult

delete

  • Removes managed object with given id.

    example
    
      const managedObjectId: number = 1;
    
       (async () => {
         const {data, res} = await inventoryService.delete(managedObjectId);
      })();
    

    Parameters

    • managedObjectOrId: IdReference

      ManagedObject or Id of the ManagedObject.

    Returns Promise<IResult<null>>

    Response wrapped in IResult

detail

  • Gets the details of managed object

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

    Parameters

    • managedObjectOrId: IdReference

      ManagedObject or Id of the ManagedObject.

    Returns Promise<IResult<IManagedObject>>

    Response wrapped in IResult

detail$

  • Gets the details of managed object as observable

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

    Parameters

    Returns Observable<IManagedObject>

    Data wrapped as Observable

list

  • Gets the list of managed objects filtered by parameters.

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

    Parameters

    • Default value filter: object = {}

      Object containing filters for querying managed objects.

    Returns Promise<IResultList<IManagedObject>>

    Response wrapped in IResultList

list$

  • Gets a list as observable.

    example
    
      const list$ = inventoryService.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<IManagedObject>

    Data wrapped as ObservableList

update

  • Updates managed object data.

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

    Parameters

    • managedObject: Partial<IManagedObject>

      Managed object is partially updatable.

    Returns Promise<IResult<IManagedObject>>

    Response wrapped in IResult

Generated using TypeDoc