Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UserInventoryRoleService

description

This service allows for managing current user's inventory roles.

Hierarchy

Index

Constructors

Methods

Constructors

constructor

Methods

create

  • Assign inventory role to current user.

    example
    
     const inventoryRoleObject: IUserInventoryRole = {
       ...
     };
    
       (async () => {
         const {data, res} = await userInventoryRoleService.create(inventoryRoleObject);
      })();
    

    Parameters

    Returns Promise<IResult<IUserInventoryRole>>

    Returns promise object that is resolved with the details of newly assigned inventory role.

delete

  • Unassign inventory role from current user

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

    Parameters

    • entityOrId: string | number | IIdentified

      Inventory Role id or Inventory Role object.

    Returns Promise<IResult<null>>

    Returns promise object that is resolved with the IResult.

detail

  • Get a representation of a concrete current user's inventory role.

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

    Required role: ROLE_TENANT_MANAGEMENT_READ

    User password is never returned in GET response. Authentication mechanism is provided by another interface.

    Parameters

    • entityOrId: string | number | IUserInventoryRole

      inventory role id or inventory role object.

    Returns Promise<IResult<IUserInventoryRole>>

    Returns promise object that is resolved with the IUserInventoryRole wrapped by IResult.

list

  • Gets the list the inventory roles applied to a current user.

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

    Parameters

    • Default value filter: object = {}

      Object containing filters for querying inventory roles.

    Returns Promise<IResultList<IUserInventoryRole>>

    Returns promise object that is resolved with the IUserInventoryRole wrapped by IResultList.

update

Generated using TypeDoc