Dominevo
ReferenceHTTP API

doNotDisturb

The doNotDisturb router: 2 methods of the do-not-disturb capability, with tier, scope, input and output.

Capability do-not-disturb · scope device · mode singleton · source packages/types/src/capabilities/do-not-disturb.cap.ts:23.

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

MethodKindTierToken scopeViewer
getStatusqueryprotectedviewyes
setEnabledmutationprotectedcreateyes

doNotDisturb.getStatus

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

Input

{ deviceId: number }

Output

DoNotDisturbStatusSchema

Shapes: DoNotDisturbStatusSchema

doNotDisturb.setEnabled

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

Input

{ deviceId: number; enabled: boolean }

Output

void