diff --git a/package-lock.json b/package-lock.json index 6b495d19..2a486fd6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@seamapi/blueprint": "^1.12.0", "@seamapi/fake-seam-connect": "2.0.6", "@seamapi/smith": "^1.1.1", - "@seamapi/types": "1.1153.0", + "@seamapi/types": "1.1162.0", "change-case": "^5.4.4", "execa": "^10.0.1", "prettier": "^3.9.6" @@ -882,9 +882,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.1153.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1153.0.tgz", - "integrity": "sha512-i3mC2ySBlSROT8IKCU0dQY3JzOiJebD2AHYFUWkFMccfsVo9aD9UVICkFHLFGvMP30+CWfrpa1nGLYh7/75WnA==", + "version": "1.1162.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1162.0.tgz", + "integrity": "sha512-1l77k1pKULMnOUPEclAX7kt0k6RrVt6e/lzhSl9lEu/OulRY3vbYcWqLMfZIrxQ9yCHKokevvD1/Zzf62AlMDw==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 5f87d3f1..1d4a3986 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "@seamapi/blueprint": "^1.12.0", "@seamapi/fake-seam-connect": "2.0.6", "@seamapi/smith": "^1.1.1", - "@seamapi/types": "1.1153.0", + "@seamapi/types": "1.1162.0", "change-case": "^5.4.4", "execa": "^10.0.1", "prettier": "^3.9.6" diff --git a/src/Resources/Device.php b/src/Resources/Device.php index 2e8692b6..913ac636 100644 --- a/src/Resources/Device.php +++ b/src/Resources/Device.php @@ -229,7 +229,7 @@ public function __construct( */ public bool|null $can_simulate_removal = null, /** - * Indicates whether the camera supports streaming live video through a camera live view session. + * Indicates whether the camera can stream live video through a camera live view session. `false` while the camera is offline. */ public bool|null $can_stream_live_video = null, /** @@ -879,6 +879,11 @@ public static function from_json(mixed $json): Properties|null $json->ultraloq_metadata, ) : null, + unifi_protect_metadata: isset($json->unifi_protect_metadata) + ? \Seam\Resources\Device\Properties\UnifiProtectMetadata::from_json( + $json->unifi_protect_metadata, + ) + : null, visionline_metadata: isset($json->visionline_metadata) ? \Seam\Resources\Device\Properties\VisionlineMetadata::from_json( $json->visionline_metadata, @@ -1357,6 +1362,10 @@ public function __construct( * Metadata for an Ultraloq device. */ public \Seam\Resources\Device\Properties\UltraloqMetadata|null $ultraloq_metadata = null, + /** + * Metadata for a UniFi Protect camera. + */ + public \Seam\Resources\Device\Properties\UnifiProtectMetadata|null $unifi_protect_metadata = null, /** * Metadata for an ASSA ABLOY Visionline system. */ @@ -1580,6 +1589,7 @@ enum DeviceType: string case TAPO_CAMERA = "tapo_camera"; case ARLO_CAMERA = "arlo_camera"; case REOLINK_CAMERA = "reolink_camera"; + case UNIFI_PROTECT_CAMERA = "unifi_protect_camera"; case SONOS_SPEAKER = "sonos_speaker"; } } @@ -4276,6 +4286,54 @@ public function __construct( ) {} } + /** + * Metadata for a UniFi Protect camera. + */ + class UnifiProtectMetadata + { + public static function from_json(mixed $json): UnifiProtectMetadata|null + { + if (!$json) { + return null; + } + return new self( + camera_id: $json->camera_id ?? null, + camera_name: $json->camera_name ?? null, + has_mic: $json->has_mic ?? null, + mac: $json->mac ?? null, + model: $json->model ?? null, + nvr_name: $json->nvr_name ?? null, + ); + } + + public function __construct( + /** + * Camera ID reported by UniFi Protect. + */ + public string|null $camera_id = null, + /** + * Camera name reported by UniFi Protect. + */ + public string|null $camera_name = null, + /** + * Whether the camera has a microphone. + */ + public bool|null $has_mic = null, + /** + * MAC address reported by the UniFi Protect camera. + */ + public string|null $mac = null, + /** + * Model reported by the UniFi Protect camera. + */ + public string|null $model = null, + /** + * Name of the UniFi Protect console that manages the camera. + */ + public string|null $nvr_name = null, + ) {} + } + /** * Metadata for an ASSA ABLOY Visionline system. */ diff --git a/src/Resources/DeviceProvider.php b/src/Resources/DeviceProvider.php index 01af3334..f2c2b6eb 100644 --- a/src/Resources/DeviceProvider.php +++ b/src/Resources/DeviceProvider.php @@ -147,7 +147,7 @@ public function __construct( */ public bool|null $can_simulate_removal = null, /** - * Indicates whether the camera supports streaming live video through a camera live view session. + * Indicates whether the camera can stream live video through a camera live view session. `false` while the camera is offline. */ public bool|null $can_stream_live_video = null, /** @@ -225,6 +225,7 @@ enum DeviceProviderName: string case TAPO = "tapo"; case ARLO = "arlo"; case REOLINK = "reolink"; + case UNIFI_PROTECT = "unifi_protect"; case ICAL = "ical"; case LODGIFY = "lodgify"; case HOSTAWAY = "hostaway"; diff --git a/src/Resources/Event.php b/src/Resources/Event.php index cecc2577..1e2e1378 100644 --- a/src/Resources/Event.php +++ b/src/Resources/Event.php @@ -10038,7 +10038,7 @@ public function __construct( } /** - * A camera was activated, for example, by motion detection. + * A camera was activated, for example, by motion detection. For Ring cameras, this event is available only in the Seam Console, not through the API or webhooks. */ final class CameraActivated extends \Seam\Resources\Event { @@ -10156,7 +10156,7 @@ public function __construct( } /** - * A doorbell button was pressed on a device. + * A doorbell button was pressed on a device. For Ring cameras, this event is available only in the Seam Console, not through the API or webhooks. */ final class DeviceDoorbellRang extends \Seam\Resources\Event { diff --git a/src/Resources/UnmanagedDevice.php b/src/Resources/UnmanagedDevice.php index 0b6cc8a1..13b8d136 100644 --- a/src/Resources/UnmanagedDevice.php +++ b/src/Resources/UnmanagedDevice.php @@ -217,7 +217,7 @@ public function __construct( */ public bool|null $can_simulate_removal = null, /** - * Indicates whether the camera supports streaming live video through a camera live view session. + * Indicates whether the camera can stream live video through a camera live view session. `false` while the camera is offline. */ public bool|null $can_stream_live_video = null, /** @@ -677,6 +677,7 @@ enum DeviceType: string case TAPO_CAMERA = "tapo_camera"; case ARLO_CAMERA = "arlo_camera"; case REOLINK_CAMERA = "reolink_camera"; + case UNIFI_PROTECT_CAMERA = "unifi_protect_camera"; case SONOS_SPEAKER = "sonos_speaker"; } }