member_webapp/@overflow/sensor-item/service/sensor-item-dependency.service.ts
crusader d59d9379f9 ing
2018-05-24 15:44:13 +09:00

30 lines
893 B
TypeScript

import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { RPCService } from '@loafer/ng-rpc';
import { SensorItemDependency } from '@overflow/commons-typescript/model/sensor-item';
import { MetaSensorItemKey } from '@overflow/commons-typescript/model/meta';
import { MetaSensorDisplayItem } from '@overflow/commons-typescript/model/meta';
@Injectable()
export class SensorItemDependencyService {
public constructor(
private rpcService: RPCService,
) {
}
public regist(dependency: SensorItemDependency): Observable<SensorItemDependency> {
return this.rpcService.call('SensorItemDependencyService.regist', dependency);
}
public readAllByDisplayItem(displayItem: MetaSensorDisplayItem): Observable<MetaSensorItemKey[]> {
return this.rpcService.call('SensorItemDependencyService.readAllByDisplayItem', displayItem);
}
}