import { ApiClientFactory } from '..'; export class EnterSensorService { constructor(private factory: ApiClientFactory) {} fetchGateWay(projectId: string) { const url = `/config/ysy/detectors/gateways`; return this.factory.surveillance.get(url, { projectId, }); } fetchDevices(projectId: string) { const url = `/config/ysy/detectors/sub`; return this.factory.surveillance.get(url, { projectId, }); } updateGateway(params: any) { const url = `/config/ysy/detectors`; return this.factory.surveillance.put(url, params); } syncDevice(projectId: string) { const url = `/config/ysy/detectors/syncDetectors`; return this.factory.surveillance.put(url, { projectId }); } updateDevice(params: any) { const url = `/config/ysy/detectors/sub`; return this.factory.surveillance.put(url, params); } deleteGateway(id: string) { const url = `/config/ysy/detectors/${id}`; return this.factory.surveillance.delete(url); } }