Dominevo
ReferenceHTTP API

intercom

The intercom router: 7 methods of the intercom capability, with tier, scope, input and output.

Capability intercom · scope device · mode singleton · source packages/types/src/capabilities/intercom.cap.ts:65.

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

MethodKindTierToken scopeViewer
getStatusqueryprotectedviewyes
startSessionmutationprotectedcreateyes
handleAnswermutationprotectedcreateyes
stopSessionmutationprotectedcreateyes
startTalkSessionmutationprotectedcreateyes
pushTalkAudiomutationprotectedcreateyes
endTalkSessionmutationprotectedcreateyes

intercom.getStatus

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

Input

{ deviceId: number }

Output

IntercomStatusSchema

Shapes: IntercomStatusSchema

intercom.startSession

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

Input

{ deviceId: number }

Output

{ sessionId: string; sdpOffer: string }

intercom.handleAnswer

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

Input

{ deviceId: number; sessionId: string; sdpAnswer: string }

Output

void

intercom.stopSession

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

Input

{ deviceId: number; sessionId: string }

Output

void

intercom.startTalkSession

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

Input

{ deviceId: number }

Output

{ sessionId: string }

intercom.pushTalkAudio

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

Input

{ deviceId: number; audioBase64: string; codec?: "opus" | "s16le" | "g711ulaw" | "g711alaw"; sampleRate?: number; channels?: number; sequenceNumber: number }

Output

{ accepted: boolean }

intercom.endTalkSession

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

Input

{ deviceId: number }

Output

void