member_webapp/@overflow/sensor-item/service/sensor-item-dependency.service.ts
crusader cd1e53f67a ing
2018-06-04 17:25:29 +09:00

30 lines
882 B
TypeScript

import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
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);
}
}