Dominevo
ReferenceHTTP API

pumpCycle

The pumpCycle router: 4 methods of the pump-cycle capability, with tier, scope, input and output.

Capability pump-cycle · scope device · mode singleton · source packages/types/src/capabilities/pump-cycle.cap.ts:37.

Every method is called at /trpc/pumpCycle.<method> — queries with GET, mutations with POST. See How to call and Authorization. Device methods take deviceId in their input.

MethodKindTierToken scopeViewer
getStatusqueryprotectedviewyes
setEnabledmutationprotectedcreateyes
setOnMinutesmutationprotectedcreateyes
setOffMinutesmutationprotectedcreateyes

pumpCycle.getStatus

  • Kind: query — GET /trpc/pumpCycle.getStatus (added by the framework)
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability pump-cycle, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=pumpCycle.getStatus on your hub

Input

{ deviceId: number }

Output

PumpCycleStatusSchema

Shapes: PumpCycleStatusSchema

pumpCycle.setEnabled

  • Kind: mutation — POST /trpc/pumpCycle.setEnabled
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability pump-cycle, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=pumpCycle.setEnabled on your hub

Input

{ deviceId: number; on: boolean }

Output

void

pumpCycle.setOnMinutes

  • Kind: mutation — POST /trpc/pumpCycle.setOnMinutes
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability pump-cycle, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=pumpCycle.setOnMinutes on your hub

Input

{ deviceId: number; minutes: number }

Output

void

pumpCycle.setOffMinutes

  • Kind: mutation — POST /trpc/pumpCycle.setOffMinutes
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability pump-cycle, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=pumpCycle.setOffMinutes on your hub

Input

{ deviceId: number; minutes: number }

Output

void