Options
All
  • Public
  • Public/Protected
  • All
Menu

Class InventoryRoleService

Hierarchy

Index

Constructors

Methods

Constructors

constructor

Methods

create

  • Creates a new inventory role.

    example
    
     const newRole: IIdentified = {
       name: 'Custom role'
     };
    
     (async () => {
       const {data, res} = await inventoryRoleService.create(newRole);
     })();
    

    Parameters

    Returns Promise<IResult<IIdentified>>

    Response wrapped in IResult

delete

  • Removes an inventory role with given id.

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

    Parameters

    Returns Promise<IResult<null>>

    Response wrapped in IResult

detail

  • Gets the details of inventory role.

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

    Parameters

    • entityOrId: string | number | IIdentified

      Entity or Id of the entity.

    Returns Promise<IResult<IIdentified>>

    Response wrapped in IResult

list

  • Gets the list of inventory roles filtered by parameters.

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

    Parameters

    • Default value filter: object = {}

      Object containing filters for querying alarms.

    Returns Promise<IResultList<IIdentified>>

    Response wrapped in IResultList

update

  • Updates inventory role data.

    example
    
     const updateObject: IIdentified = {
       id: 1,
       name: 'changed role'
     };
    
     (async () => {
       const {data, res} = await inventoryRoleService.update(updateObject);
     })();
    

    Parameters

    Returns Promise<IResult<IIdentified>>

    Response wrapped in IResult

Generated using TypeDoc