diff --git a/package-lock.json b/package-lock.json index 6a6eedd4..82d83eeb 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.0", - "@seamapi/types": "1.1075.0", + "@seamapi/types": "1.1076.0", "change-case": "^5.4.4", "execa": "^10.0.1", "prettier": "^3.9.6" @@ -882,9 +882,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.1075.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1075.0.tgz", - "integrity": "sha512-134KCyANlwNf8XFeXIjNUUWdFOs7Nz0fUd5w8/DIuYeFGjzfzazCAoMfZD8dLu0DVQlrByHdmckKJp8GzVD84A==", + "version": "1.1076.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1076.0.tgz", + "integrity": "sha512-o2C89vg7cZixTH7rg4VRxCFsiL1w/evT2Cdnvd97EE4UhClyEEhyPYZLwXi64S8/2YSQr+hmr5Ay62vLX9OVWA==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index c85d77ee..56ebb24e 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.0", - "@seamapi/types": "1.1075.0", + "@seamapi/types": "1.1076.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 8ea885b3..e020ce89 100644 --- a/src/Resources/Device.php +++ b/src/Resources/Device.php @@ -804,6 +804,11 @@ public static function from_json(mixed $json): Properties|null $json->tado_metadata, ) : null, + tapo_metadata: isset($json->tapo_metadata) + ? \Seam\Resources\Device\Properties\TapoMetadata::from_json( + $json->tapo_metadata, + ) + : null, tedee_metadata: isset($json->tedee_metadata) ? \Seam\Resources\Device\Properties\TedeeMetadata::from_json( $json->tedee_metadata, @@ -1268,6 +1273,10 @@ public function __construct( * Metadata for a tado° device. */ public \Seam\Resources\Device\Properties\TadoMetadata|null $tado_metadata = null, + /** + * Metadata for a Tapo camera. + */ + public \Seam\Resources\Device\Properties\TapoMetadata|null $tapo_metadata = null, /** * Metadata for a Tedee device. */ @@ -1525,6 +1534,7 @@ enum DeviceType: string case IOS_PHONE = "ios_phone"; case ANDROID_PHONE = "android_phone"; case RING_CAMERA = "ring_camera"; + case TAPO_CAMERA = "tapo_camera"; } } @@ -3865,6 +3875,39 @@ public function __construct( ) {} } + /** + * Metadata for a Tapo camera. + */ + class TapoMetadata + { + public static function from_json(mixed $json): TapoMetadata|null + { + if (!$json) { + return null; + } + return new self( + firmware_version: $json->firmware_version ?? null, + hardware_version: $json->hardware_version ?? null, + model: $json->model ?? null, + ); + } + + public function __construct( + /** + * Firmware version reported by the camera. + */ + public string|null $firmware_version = null, + /** + * Hardware version reported by the camera. + */ + public string|null $hardware_version = null, + /** + * Model reported by the Tapo camera. + */ + public string|null $model = null, + ) {} + } + /** * Metadata for a Tedee device. */ diff --git a/src/Resources/DeviceProvider.php b/src/Resources/DeviceProvider.php index 2d502829..6eb0f36c 100644 --- a/src/Resources/DeviceProvider.php +++ b/src/Resources/DeviceProvider.php @@ -211,6 +211,7 @@ enum DeviceProviderName: string case SIFELY = "sifely"; case THIRTY_THREE_LOCK = "thirty_three_lock"; case RING = "ring"; + case TAPO = "tapo"; case ICAL = "ical"; case LODGIFY = "lodgify"; case HOSTAWAY = "hostaway"; diff --git a/src/Resources/UnmanagedDevice.php b/src/Resources/UnmanagedDevice.php index 003218ee..a04b784e 100644 --- a/src/Resources/UnmanagedDevice.php +++ b/src/Resources/UnmanagedDevice.php @@ -658,6 +658,7 @@ enum DeviceType: string case IOS_PHONE = "ios_phone"; case ANDROID_PHONE = "android_phone"; case RING_CAMERA = "ring_camera"; + case TAPO_CAMERA = "tapo_camera"; } }