Skip to content

Commit

Permalink
feat: additional ring data types
Browse files Browse the repository at this point in the history
  • Loading branch information
dgreif committed Jul 14, 2020
1 parent 2cb7930 commit 590e1cd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions api/location.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ export class Location extends Subscribed {
const { assets, ticket, host } = await this.restClient.request<{
assets: TicketAsset[]
host: string
subscriptionTopics: string[]
ticket: string
}>({
url: appApi('clap/tickets?locationID=' + this.id),
Expand Down
9 changes: 8 additions & 1 deletion api/ring-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,11 @@ export type DingKind =
| 'on_demand' // Live View
| 'alarm' // Linked Event - Alarm
| 'on_demand_link' // Linked Event - Motion
| 'door_activity'
| 'key_access'
| 'DELETED_FOOTAGE'
| 'OFFLINE_FOOTAGE'
| 'OFFLINE_MOTION'

export interface CameraEvent {
created_at: string
Expand Down Expand Up @@ -590,10 +595,12 @@ export interface RingDeviceHistoryEvent {
body: any // Skipping for now
}

export type DingState = 'ringing' | 'connected' | 'timed_out' | 'completed'

export interface ActiveDing {
id: number
id_str: string
state: 'ringing'
state: DingState
protocol: 'sip'
doorbot_id: number
doorbot_description: string
Expand Down

0 comments on commit 590e1cd

Please sign in to comment.