Types Reference

The enums and small value types the service pages take for granted. Raw values are the strings the backend sends and expects.


Querying and sorting

Paged list calls (events, dailySummaryList, securityLogs, getPetActivitySummary) take [QueryItem] and an optional SortItem; other list calls take [QueryItem] or nothing. A QueryItem is a key and a value; the value carries the comparison operator.

QueryItemValue

Case Meaning
.equal(value:) key == value
.notEqual(value:) key != value
.greaterThen(value:) / .greaterThenOrEqual(value:) key > / >= value
.lessThen(value:) / .lessThenOrEqual(value:) key < / <= value
.in(value: [String]) / .notIn(value: [String]) key in / not in the list

SortItem

SortItem(ascending: [QueryItemKey], descending: [QueryItemKey]). Always pair skip / limit with a stable sort, or records can appear twice or be skipped as new ones arrive.

QueryItemKey

Key Raw value Typically used with
startTime, endTime start_time, end_time events, daily summaries, pet activity
from, to from, to baby activities
deviceId, deviceIds device_id, device_ids events, daily summaries
eventId event_id events
idKey _id fetching events by id after searchEvents
skip, limit skip, limit every paged list
tags tags events — filter by EventTag
type type baby activities, faces
babyIds baby_ids baby activities
query query search
bucketName, includeToken bucket_name, include_token event tokens
spaceId space_id cross-space calls
createdAt, loggedAt created_at, logged_at time filters on the newer endpoints
timestamp, date, since as named time filters on the newer endpoints
latitude, longitude as named time zone from coordinates
country, productId, productIds, skuCategories country, product_id, product_ids, sku_categories subscriptions
bundleId bundleId app store version
resources resources space aggregate data
filter filter generic
fromVersion, toVersion from_version, to_version firmware
fileName file-name log upload

Products and devices

Type Cases (raw value)
ProductType homeSecurity (HomeSecurity), baby (Baby), pet (Pet), bird (Bird), trail (Trail)
DeviceType indoor (Indoor), outdoor (Outdoor), doorbell (Doorbell), bird (Bird), nvr (NVR), nvrCamera (NVRCamera)
DeviceState online (Online), offline (Offline), error (Error), uninitialized (UnInitialized), sleep (Sleep)
PowerSource ac (AC), battery (Battery), acBattery (ACnBattery)
DeviceConnectionState connected (Connected), disconnected (Disconnected)
DoorbellChimeType defaultType (Default), mechanicalType (Mechanical), electronicType (Electronic) — the values of the doorbell’s chimeSettings attribute
PairingStatus initialized (Initialized), paired (Paired), processed (Processed), activated (Activated)

DeviceModel.deviceType and powerSource are String?, modelProductType and pairingStatus are String; build the enums above from them with init(rawValue:).


Events

Type Cases (raw value)
EventTag motion (Motion), person (Person), vehicle (Vehicle), animal (Animal), alarm (Alarm), doorbellRing (DoorbellPress), bird (Bird), pet (Pet), wildlife (Wildlife), cry (Cry), highTemperature (HighTemperature), lowTemperature (LowTemperature), highHumidity (HighHumidity), lowHumidity (LowHumidity), face (Face)
SpeciesRoleType parent (Parent), child (Child)

Which tags a product line raises is listed on Events.


Subscriptions

Type Cases (raw value)
SkuCategory ai (AI), combo (Combo), data (Data)
GraceType trailOverdue (TrialOverdue), grace (Grace)
SubscriptionScope space (Space), product (Product)

Live view

Type Cases
ConnectionState none, initiated, connected, failed — exposed as LiveViewModel.connectionState (a plain property, not @Published; read it when isConnected changes)
SSEPayload .lullabyStateUpdated(SSELullabyStateMessage), .any([String: String])

SSELullabyStateMessage carries deviceId, spaceId, playbackState and an optional trackId. Every other message type the backend sends arrives as .any with its top-level string fields; a payload containing non-string values arrives as an empty dictionary. The SDK does not enumerate the message types.


Clusters

Type Cases
AttributeValue .bool(Bool), .string(String), .int(Int), .double(Double), .dictionary([String: AttributeValue]), .array([AttributeValue]), .null

Cluster and attribute ids are catalogued on Cluster Catalogue.


Faces, pets, babies

Type Cases (raw value)
FacePosition center (CENTER), left (LEFT), right (RIGHT), topLeft (TOP_LEFT), topRight (TOP_RIGHT), bottomLeft (BOTTOM_LEFT), bottomRight (BOTTOM_RIGHT) — minimumImagePerAngle = 2, maximumImagePerAngle = 5
Provider (push) apns (Apns)
PlaybackState (lullaby) playing (Playing), paused (Paused), resumed (Resumed), stopped (Stopped) — build from LullabySettingsModel.playbackState / SSELullabyStateMessage.playbackState with init(rawValue:)