Options
All
  • Public
  • Public/Protected
  • All
Menu

Class InventoryRoleService

Hierarchy

Index

Constructors

constructor

Methods

create

  • Parameters

    Returns Promise<IResult<IIdentified>>

    Response wrapped in IResult

    Example

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

delete

  • Parameters

    Returns Promise<IResult<null>>

    Response wrapped in IResult

detail

  • Parameters

    Returns Promise<IResult<IIdentified>>

    Response wrapped in IResult

    Example

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

list

list$

  • Parameters

    Returns Observable<IIdentified[]>

    Data wrapped as Observable.

    Example

    
      const list$ = inventoryRoleService.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.

update

  • Parameters

    Returns Promise<IResult<IIdentified>>

    Response wrapped in IResult

    Example

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

Generated using TypeDoc