Dominevo
ReferenceHTTP API

lockControl

The lockControl router: 4 methods of the lock-control capability, with tier, scope, input and output.

Capability lock-control · scope device · mode singleton · source packages/types/src/capabilities/lock-control.cap.ts:92.

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

MethodKindTierToken scopeViewer
getStatusqueryprotectedviewyes
lockmutationprotectedcreateyes
unlockmutationprotectedcreateyes
openmutationprotectedcreateyes

lockControl.getStatus

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

Input

{ deviceId: number }

Output

LockControlStatusSchema

Shapes: LockControlStatusSchema

lockControl.lock

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

Input

{ deviceId: number; code?: string }

Output

void

lockControl.unlock

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

Input

{ deviceId: number; code?: string; confirm?: boolean }

Output

void

lockControl.open

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

Input

{ deviceId: number }

Output

void