Dominevo
ReferenceHTTP API

petFountain

The petFountain router: 2 methods of the pet-fountain capability, with tier, scope, input and output.

Capability pet-fountain · scope device · mode singleton · source packages/types/src/capabilities/pet-fountain.cap.ts:78.

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

MethodKindTierToken scopeViewer
getStatusqueryprotectedviewyes
setPumpmutationprotectedcreateyes

petFountain.getStatus

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

Input

{ deviceId: number }

Output

PetFountainStatusSchema

Shapes: PetFountainStatusSchema

petFountain.setPump

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

Input

{ deviceId: number; on: boolean }

Output

void