Options
All
  • Public
  • Public/Protected
  • All
Menu

Class OperationBulkService

Hierarchy

Index

Constructors

constructor

Methods

create

  • Parameters

    Returns Promise<IResult<IOperationBulk>>

    Response wrapped in IResult

    Example

    
     const mandantoryObject: Partial<IOperationBulk> = {
       creationRamp: 15,
       groupId: '149044',
       operationPrototype: {
         c8y_Restart: {},
         description: 'Restart device',
         deviceId: device.id,
         status: 'PENDING'
       },
        startDate: '2018-02-15T16:01:00.000Z'
     };
    
     (async () => {
       const {data, res} = await operationBulkService.create(mandantoryObject);
     })();
    

delete

  • Parameters

    Returns Promise<IResult<null>>

    Response wrapped in IResult

detail

  • Parameters

    Returns Promise<IResult<IOperationBulk>>

    Response wrapped in IResult

    Example

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

list

list$

  • Parameters

    Returns Observable<IOperationBulk[]>

    Data wrapped as Observable.

    Example

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

    Response wrapped in IResult

    Example

    
     const updateObject: Partial<IOperationBulk> = {
       creationRamp: 15,
       groupId: '149044',
       operationPrototype: {
         c8y_Restart: {},
         description: 'Restart device',
         deviceId: device.id,
         status: 'PENDING'
       },
        startDate: '2018-02-15T16:01:00.000Z'
     };
    
     (async () => {
       const {data, res} = await operationBulkService.update(updateObject);
     })();
    

Generated using TypeDoc