diff --git a/package-lock.json b/package-lock.json index 1485cb3..99de271 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,8 +10,8 @@ "license": "MIT", "devDependencies": { "@prettier/plugin-php": "^0.22.4", - "@seamapi/nextlove-sdk-generator": "^1.18.1", - "@seamapi/types": "1.423.4", + "@seamapi/nextlove-sdk-generator": "^1.19.0", + "@seamapi/types": "1.454.0", "del": "^7.1.0", "prettier": "^3.0.0" } @@ -433,9 +433,9 @@ } }, "node_modules/@seamapi/nextlove-sdk-generator": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/@seamapi/nextlove-sdk-generator/-/nextlove-sdk-generator-1.18.1.tgz", - "integrity": "sha512-TsK2AY2B/44JNEbWf30/UWfP7Y0T1bxZ3X6AH/buhUKHAzNfiipw133iAN2p6e2fu6sa9zbrjM1cmvwU+lDhiw==", + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@seamapi/nextlove-sdk-generator/-/nextlove-sdk-generator-1.19.0.tgz", + "integrity": "sha512-TbIJkUpPHnqZwTrdB4KfW3t8YumQK3uN8cc2ID2ynUuUSh/WG+VdnG4C1UHiGIX83cuFT3hgkwLsRfRjH34mEw==", "dev": true, "license": "MIT", "dependencies": { @@ -455,14 +455,14 @@ } }, "node_modules/@seamapi/types": { - "version": "1.423.4", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.423.4.tgz", - "integrity": "sha512-cZX6y4LKeijIpaUUBJEvN6fO9MsEevrUHT4oQ2kJx5sm9pNJqUR1RSuBktcNBA6zO/na8hZtGo0NrAJxK5KYQw==", + "version": "1.454.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.454.0.tgz", + "integrity": "sha512-df+hQzrd1VmDMhulvdHUnFlILI3Nm99sTg3/J3jhhf+6W1XmFdlBi8wYyzyF+0yL2EcfCjgXvFE9wVDGTVo2Uw==", "dev": true, "license": "MIT", "engines": { - "node": ">=18.12.0", - "npm": ">= 9.0.0" + "node": ">=20.9.0", + "npm": ">=10.1.0" }, "peerDependencies": { "zod": "^3.24.0" diff --git a/package.json b/package.json index 3cb410a..1a2b8da 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,8 @@ }, "devDependencies": { "@prettier/plugin-php": "^0.22.4", - "@seamapi/nextlove-sdk-generator": "^1.18.1", - "@seamapi/types": "1.423.4", + "@seamapi/nextlove-sdk-generator": "^1.19.0", + "@seamapi/types": "1.454.0", "del": "^7.1.0", "prettier": "^3.0.0" } diff --git a/src/Objects/AccessGrant.php b/src/Objects/AccessGrant.php index 2014e8c..c9336a6 100644 --- a/src/Objects/AccessGrant.php +++ b/src/Objects/AccessGrant.php @@ -22,8 +22,12 @@ public static function from_json(mixed $json): AccessGrant|null space_ids: $json->space_ids, user_identity_id: $json->user_identity_id, workspace_id: $json->workspace_id, + access_grant_key: $json->access_grant_key ?? null, + client_session_token: $json->client_session_token ?? null, ends_at: $json->ends_at ?? null, - starts_at: $json->starts_at ?? null + instant_key_url: $json->instant_key_url ?? null, + starts_at: $json->starts_at ?? null, + name: $json->name ?? null ); } @@ -37,7 +41,11 @@ public function __construct( public array $space_ids, public string $user_identity_id, public string $workspace_id, + public string|null $access_grant_key, + public string|null $client_session_token, public string|null $ends_at, - public string|null $starts_at + public string|null $instant_key_url, + public string|null $starts_at, + public string|null $name ) {} } diff --git a/src/Objects/AccessMethod.php b/src/Objects/AccessMethod.php index 897c435..e890f0e 100644 --- a/src/Objects/AccessMethod.php +++ b/src/Objects/AccessMethod.php @@ -15,8 +15,10 @@ public static function from_json(mixed $json): AccessMethod|null display_name: $json->display_name, mode: $json->mode, workspace_id: $json->workspace_id, + client_session_token: $json->client_session_token ?? null, + code: $json->code ?? null, instant_key_url: $json->instant_key_url ?? null, - is_card_encoding_required: $json->is_card_encoding_required ?? null, + is_encoding_required: $json->is_encoding_required ?? null, issued_at: $json->issued_at ?? null ); } @@ -27,8 +29,10 @@ public function __construct( public string $display_name, public string $mode, public string $workspace_id, + public string|null $client_session_token, + public string|null $code, public string|null $instant_key_url, - public bool|null $is_card_encoding_required, + public bool|null $is_encoding_required, public string|null $issued_at ) {} } diff --git a/src/Objects/AcsCredential.php b/src/Objects/AcsCredential.php index 231ee84..17647ed 100644 --- a/src/Objects/AcsCredential.php +++ b/src/Objects/AcsCredential.php @@ -13,6 +13,7 @@ public static function from_json(mixed $json): AcsCredential|null access_method: $json->access_method, acs_credential_id: $json->acs_credential_id, acs_system_id: $json->acs_system_id, + connected_account_id: $json->connected_account_id, created_at: $json->created_at, display_name: $json->display_name, errors: array_map( @@ -42,6 +43,7 @@ public static function from_json(mixed $json): AcsCredential|null is_one_time_use: $json->is_one_time_use ?? null, parent_acs_credential_id: $json->parent_acs_credential_id ?? null, starts_at: $json->starts_at ?? null, + user_identity_id: $json->user_identity_id ?? null, visionline_metadata: isset($json->visionline_metadata) ? AcsCredentialVisionlineMetadata::from_json( $json->visionline_metadata @@ -61,6 +63,7 @@ public function __construct( public string $access_method, public string $acs_credential_id, public string $acs_system_id, + public string $connected_account_id, public string $created_at, public string $display_name, public array $errors, @@ -78,6 +81,7 @@ public function __construct( public bool|null $is_one_time_use, public string|null $parent_acs_credential_id, public string|null $starts_at, + public string|null $user_identity_id, public AcsCredentialVisionlineMetadata|null $visionline_metadata, public string|null $card_number, public string|null $code, diff --git a/src/Objects/AcsEntrance.php b/src/Objects/AcsEntrance.php index f0fdbe0..d85db8b 100644 --- a/src/Objects/AcsEntrance.php +++ b/src/Objects/AcsEntrance.php @@ -24,6 +24,10 @@ public static function from_json(mixed $json): AcsEntrance|null $json->assa_abloy_vostio_metadata ) : null, + can_unlock_with_card: $json->can_unlock_with_card ?? null, + can_unlock_with_code: $json->can_unlock_with_code ?? null, + can_unlock_with_mobile_key: $json->can_unlock_with_mobile_key ?? + null, dormakaba_community_metadata: isset( $json->dormakaba_community_metadata ) @@ -60,6 +64,9 @@ public function __construct( public string $display_name, public array $errors, public AcsEntranceAssaAbloyVostioMetadata|null $assa_abloy_vostio_metadata, + public bool|null $can_unlock_with_card, + public bool|null $can_unlock_with_code, + public bool|null $can_unlock_with_mobile_key, public AcsEntranceDormakabaCommunityMetadata|null $dormakaba_community_metadata, public AcsEntranceLatchMetadata|null $latch_metadata, public AcsEntranceSaltoKsMetadata|null $salto_ks_metadata, diff --git a/src/Objects/ConnectWebview.php b/src/Objects/ConnectWebview.php index 8241dff..2924d2d 100644 --- a/src/Objects/ConnectWebview.php +++ b/src/Objects/ConnectWebview.php @@ -25,6 +25,7 @@ public static function from_json(mixed $json): ConnectWebview|null url: $json->url, wait_for_device_creation: $json->wait_for_device_creation, workspace_id: $json->workspace_id, + customer_key: $json->customer_key ?? null, authorized_at: $json->authorized_at ?? null, connected_account_id: $json->connected_account_id ?? null, custom_redirect_failure_url: $json->custom_redirect_failure_url ?? @@ -50,6 +51,7 @@ public function __construct( public string $url, public bool $wait_for_device_creation, public string $workspace_id, + public string|null $customer_key, public string|null $authorized_at, public string|null $connected_account_id, public string|null $custom_redirect_failure_url, diff --git a/src/Objects/ConnectedAccount.php b/src/Objects/ConnectedAccount.php index 2600f30..ab4bfc4 100644 --- a/src/Objects/ConnectedAccount.php +++ b/src/Objects/ConnectedAccount.php @@ -10,6 +10,7 @@ public static function from_json(mixed $json): ConnectedAccount|null return null; } return new self( + accepted_capabilities: $json->accepted_capabilities, account_type_display_name: $json->account_type_display_name, automatically_manage_new_devices: $json->automatically_manage_new_devices, custom_metadata: $json->custom_metadata, @@ -34,6 +35,7 @@ public static function from_json(mixed $json): ConnectedAccount|null } public function __construct( + public array $accepted_capabilities, public string $account_type_display_name, public bool $automatically_manage_new_devices, public mixed $custom_metadata, diff --git a/src/Objects/Device.php b/src/Objects/Device.php index d6f45f4..2778b5d 100644 --- a/src/Objects/Device.php +++ b/src/Objects/Device.php @@ -42,6 +42,7 @@ public static function from_json(mixed $json): Device|null null, can_simulate_removal: $json->can_simulate_removal ?? null, can_turn_off_hvac: $json->can_turn_off_hvac ?? null, + can_unlock_with_code: $json->can_unlock_with_code ?? null, nickname: $json->nickname ?? null, location: isset($json->location) ? DeviceLocation::from_json($json->location) @@ -73,6 +74,7 @@ public function __construct( public bool|null $can_simulate_disconnection, public bool|null $can_simulate_removal, public bool|null $can_turn_off_hvac, + public bool|null $can_unlock_with_code, public string|null $nickname, public DeviceLocation|null $location ) {} diff --git a/src/Objects/DeviceAvailableClimatePresets.php b/src/Objects/DeviceAvailableClimatePresets.php index 764b563..4fc7712 100644 --- a/src/Objects/DeviceAvailableClimatePresets.php +++ b/src/Objects/DeviceAvailableClimatePresets.php @@ -17,9 +17,13 @@ public static function from_json( climate_preset_key: $json->climate_preset_key, display_name: $json->display_name, manual_override_allowed: $json->manual_override_allowed, + climate_preset_mode: $json->climate_preset_mode ?? null, cooling_set_point_celsius: $json->cooling_set_point_celsius ?? null, cooling_set_point_fahrenheit: $json->cooling_set_point_fahrenheit ?? null, + ecobee_metadata: isset($json->ecobee_metadata) + ? DeviceEcobeeMetadata::from_json($json->ecobee_metadata) + : null, fan_mode_setting: $json->fan_mode_setting ?? null, heating_set_point_celsius: $json->heating_set_point_celsius ?? null, heating_set_point_fahrenheit: $json->heating_set_point_fahrenheit ?? @@ -36,8 +40,10 @@ public function __construct( public string $climate_preset_key, public string $display_name, public bool $manual_override_allowed, + public string|null $climate_preset_mode, public float|null $cooling_set_point_celsius, public float|null $cooling_set_point_fahrenheit, + public DeviceEcobeeMetadata|null $ecobee_metadata, public string|null $fan_mode_setting, public float|null $heating_set_point_celsius, public float|null $heating_set_point_fahrenheit, diff --git a/src/Objects/DeviceCurrentClimateSetting.php b/src/Objects/DeviceCurrentClimateSetting.php index a2f1646..b3ba079 100644 --- a/src/Objects/DeviceCurrentClimateSetting.php +++ b/src/Objects/DeviceCurrentClimateSetting.php @@ -15,10 +15,14 @@ public static function from_json( can_edit: $json->can_edit ?? null, can_program: $json->can_program ?? null, climate_preset_key: $json->climate_preset_key ?? null, + climate_preset_mode: $json->climate_preset_mode ?? null, cooling_set_point_celsius: $json->cooling_set_point_celsius ?? null, cooling_set_point_fahrenheit: $json->cooling_set_point_fahrenheit ?? null, display_name: $json->display_name ?? null, + ecobee_metadata: isset($json->ecobee_metadata) + ? DeviceEcobeeMetadata::from_json($json->ecobee_metadata) + : null, fan_mode_setting: $json->fan_mode_setting ?? null, heating_set_point_celsius: $json->heating_set_point_celsius ?? null, heating_set_point_fahrenheit: $json->heating_set_point_fahrenheit ?? @@ -34,9 +38,11 @@ public function __construct( public bool|null $can_edit, public bool|null $can_program, public string|null $climate_preset_key, + public string|null $climate_preset_mode, public float|null $cooling_set_point_celsius, public float|null $cooling_set_point_fahrenheit, public string|null $display_name, + public DeviceEcobeeMetadata|null $ecobee_metadata, public string|null $fan_mode_setting, public float|null $heating_set_point_celsius, public float|null $heating_set_point_fahrenheit, diff --git a/src/Objects/DeviceDefaultClimateSetting.php b/src/Objects/DeviceDefaultClimateSetting.php index 40e847c..b23b8d6 100644 --- a/src/Objects/DeviceDefaultClimateSetting.php +++ b/src/Objects/DeviceDefaultClimateSetting.php @@ -15,10 +15,14 @@ public static function from_json( can_edit: $json->can_edit ?? null, can_program: $json->can_program ?? null, climate_preset_key: $json->climate_preset_key ?? null, + climate_preset_mode: $json->climate_preset_mode ?? null, cooling_set_point_celsius: $json->cooling_set_point_celsius ?? null, cooling_set_point_fahrenheit: $json->cooling_set_point_fahrenheit ?? null, display_name: $json->display_name ?? null, + ecobee_metadata: isset($json->ecobee_metadata) + ? DeviceEcobeeMetadata::from_json($json->ecobee_metadata) + : null, fan_mode_setting: $json->fan_mode_setting ?? null, heating_set_point_celsius: $json->heating_set_point_celsius ?? null, heating_set_point_fahrenheit: $json->heating_set_point_fahrenheit ?? @@ -34,9 +38,11 @@ public function __construct( public bool|null $can_edit, public bool|null $can_program, public string|null $climate_preset_key, + public string|null $climate_preset_mode, public float|null $cooling_set_point_celsius, public float|null $cooling_set_point_fahrenheit, public string|null $display_name, + public DeviceEcobeeMetadata|null $ecobee_metadata, public string|null $fan_mode_setting, public float|null $heating_set_point_celsius, public float|null $heating_set_point_fahrenheit, diff --git a/src/Objects/DeviceIgloohomeMetadata.php b/src/Objects/DeviceIgloohomeMetadata.php index 96fea95..16adbfc 100644 --- a/src/Objects/DeviceIgloohomeMetadata.php +++ b/src/Objects/DeviceIgloohomeMetadata.php @@ -14,6 +14,8 @@ public static function from_json(mixed $json): DeviceIgloohomeMetadata|null device_name: $json->device_name, bridge_id: $json->bridge_id ?? null, bridge_name: $json->bridge_name ?? null, + is_keypad_linked_to_bridge: $json->is_keypad_linked_to_bridge ?? + null, keypad_id: $json->keypad_id ?? null ); } @@ -23,6 +25,7 @@ public function __construct( public string $device_name, public string|null $bridge_id, public string|null $bridge_name, + public bool|null $is_keypad_linked_to_bridge, public string|null $keypad_id ) {} } diff --git a/src/Objects/DeviceProperties.php b/src/Objects/DeviceProperties.php index 03ec5a5..9c27043 100644 --- a/src/Objects/DeviceProperties.php +++ b/src/Objects/DeviceProperties.php @@ -42,6 +42,8 @@ public static function from_json(mixed $json): DeviceProperties|null august_metadata: isset($json->august_metadata) ? DeviceAugustMetadata::from_json($json->august_metadata) : null, + available_climate_preset_modes: $json->available_climate_preset_modes ?? + null, available_climate_presets: array_map( fn($a) => DeviceAvailableClimatePresets::from_json($a), $json->available_climate_presets ?? [] @@ -268,6 +270,7 @@ public function __construct( public DeviceAssaAbloyCredentialServiceMetadata|null $assa_abloy_credential_service_metadata, public DeviceAssaAbloyVostioMetadata|null $assa_abloy_vostio_metadata, public DeviceAugustMetadata|null $august_metadata, + public array|null $available_climate_preset_modes, public array|null $available_climate_presets, public array|null $available_fan_mode_settings, public array|null $available_hvac_mode_settings, diff --git a/src/Objects/DeviceProvider.php b/src/Objects/DeviceProvider.php index 2676893..ef6ea93 100644 --- a/src/Objects/DeviceProvider.php +++ b/src/Objects/DeviceProvider.php @@ -27,7 +27,8 @@ public static function from_json(mixed $json): DeviceProvider|null can_simulate_disconnection: $json->can_simulate_disconnection ?? null, can_simulate_removal: $json->can_simulate_removal ?? null, - can_turn_off_hvac: $json->can_turn_off_hvac ?? null + can_turn_off_hvac: $json->can_turn_off_hvac ?? null, + can_unlock_with_code: $json->can_unlock_with_code ?? null ); } @@ -46,6 +47,7 @@ public function __construct( public bool|null $can_simulate_connection, public bool|null $can_simulate_disconnection, public bool|null $can_simulate_removal, - public bool|null $can_turn_off_hvac + public bool|null $can_turn_off_hvac, + public bool|null $can_unlock_with_code ) {} } diff --git a/src/Objects/Event.php b/src/Objects/Event.php index 9d9110a..a2174fd 100644 --- a/src/Objects/Event.php +++ b/src/Objects/Event.php @@ -27,6 +27,8 @@ public static function from_json(mixed $json): Event|null client_session_id: $json->client_session_id ?? null, climate_preset_key: $json->climate_preset_key ?? null, connect_webview_id: $json->connect_webview_id ?? null, + connected_account_custom_metadata: $json->connected_account_custom_metadata ?? + null, connected_account_id: $json->connected_account_id ?? null, cooling_set_point_celsius: $json->cooling_set_point_celsius ?? null, cooling_set_point_fahrenheit: $json->cooling_set_point_fahrenheit ?? @@ -36,6 +38,7 @@ public static function from_json(mixed $json): Event|null null, desired_temperature_fahrenheit: $json->desired_temperature_fahrenheit ?? null, + device_custom_metadata: $json->device_custom_metadata ?? null, device_id: $json->device_id ?? null, device_name: $json->device_name ?? null, enrollment_automation_id: $json->enrollment_automation_id ?? null, @@ -88,12 +91,14 @@ public function __construct( public string|null $client_session_id, public string|null $climate_preset_key, public string|null $connect_webview_id, + public mixed $connected_account_custom_metadata, public string|null $connected_account_id, public float|null $cooling_set_point_celsius, public float|null $cooling_set_point_fahrenheit, public string|null $created_at, public float|null $desired_temperature_celsius, public float|null $desired_temperature_fahrenheit, + public mixed $device_custom_metadata, public string|null $device_id, public string|null $device_name, public string|null $enrollment_automation_id, diff --git a/src/Objects/PhoneSessionAcsCredentials.php b/src/Objects/PhoneSessionAcsCredentials.php index 4dc1ae6..fe587b9 100644 --- a/src/Objects/PhoneSessionAcsCredentials.php +++ b/src/Objects/PhoneSessionAcsCredentials.php @@ -17,6 +17,7 @@ public static function from_json( $json->acs_entrances ?? [] ), acs_system_id: $json->acs_system_id, + connected_account_id: $json->connected_account_id, created_at: $json->created_at, display_name: $json->display_name, errors: array_map( @@ -46,6 +47,7 @@ public static function from_json( is_one_time_use: $json->is_one_time_use ?? null, parent_acs_credential_id: $json->parent_acs_credential_id ?? null, starts_at: $json->starts_at ?? null, + user_identity_id: $json->user_identity_id ?? null, visionline_metadata: isset($json->visionline_metadata) ? PhoneSessionVisionlineMetadata::from_json( $json->visionline_metadata @@ -66,6 +68,7 @@ public function __construct( public string $access_method, public array $acs_entrances, public string $acs_system_id, + public string $connected_account_id, public string $created_at, public string $display_name, public array $errors, @@ -83,6 +86,7 @@ public function __construct( public bool|null $is_one_time_use, public string|null $parent_acs_credential_id, public string|null $starts_at, + public string|null $user_identity_id, public PhoneSessionVisionlineMetadata|null $visionline_metadata, public string|null $acs_credential_id, public string|null $card_number, diff --git a/src/Objects/PhoneSessionAcsEntrances.php b/src/Objects/PhoneSessionAcsEntrances.php index 0aae247..ab55764 100644 --- a/src/Objects/PhoneSessionAcsEntrances.php +++ b/src/Objects/PhoneSessionAcsEntrances.php @@ -24,6 +24,10 @@ public static function from_json(mixed $json): PhoneSessionAcsEntrances|null $json->assa_abloy_vostio_metadata ) : null, + can_unlock_with_card: $json->can_unlock_with_card ?? null, + can_unlock_with_code: $json->can_unlock_with_code ?? null, + can_unlock_with_mobile_key: $json->can_unlock_with_mobile_key ?? + null, dormakaba_community_metadata: isset( $json->dormakaba_community_metadata ) @@ -60,6 +64,9 @@ public function __construct( public string $display_name, public array $errors, public PhoneSessionAssaAbloyVostioMetadata|null $assa_abloy_vostio_metadata, + public bool|null $can_unlock_with_card, + public bool|null $can_unlock_with_code, + public bool|null $can_unlock_with_mobile_key, public PhoneSessionDormakabaCommunityMetadata|null $dormakaba_community_metadata, public PhoneSessionLatchMetadata|null $latch_metadata, public PhoneSessionSaltoKsMetadata|null $salto_ks_metadata, diff --git a/src/Objects/Space.php b/src/Objects/Space.php index c65d995..81a000a 100644 --- a/src/Objects/Space.php +++ b/src/Objects/Space.php @@ -10,19 +10,25 @@ public static function from_json(mixed $json): Space|null return null; } return new self( + acs_entrance_count: $json->acs_entrance_count, created_at: $json->created_at, + device_count: $json->device_count, display_name: $json->display_name, name: $json->name, space_id: $json->space_id, - workspace_id: $json->workspace_id + workspace_id: $json->workspace_id, + space_key: $json->space_key ?? null ); } public function __construct( + public float $acs_entrance_count, public string $created_at, + public float $device_count, public string $display_name, public string $name, public string $space_id, - public string $workspace_id + public string $workspace_id, + public string|null $space_key ) {} } diff --git a/src/Objects/UnmanagedAcsCredential.php b/src/Objects/UnmanagedAcsCredential.php index eae120d..88f758b 100644 --- a/src/Objects/UnmanagedAcsCredential.php +++ b/src/Objects/UnmanagedAcsCredential.php @@ -13,6 +13,7 @@ public static function from_json(mixed $json): UnmanagedAcsCredential|null access_method: $json->access_method, acs_credential_id: $json->acs_credential_id, acs_system_id: $json->acs_system_id, + connected_account_id: $json->connected_account_id, created_at: $json->created_at, display_name: $json->display_name, errors: array_map( @@ -42,6 +43,7 @@ public static function from_json(mixed $json): UnmanagedAcsCredential|null is_one_time_use: $json->is_one_time_use ?? null, parent_acs_credential_id: $json->parent_acs_credential_id ?? null, starts_at: $json->starts_at ?? null, + user_identity_id: $json->user_identity_id ?? null, visionline_metadata: isset($json->visionline_metadata) ? UnmanagedAcsCredentialVisionlineMetadata::from_json( $json->visionline_metadata @@ -61,6 +63,7 @@ public function __construct( public string $access_method, public string $acs_credential_id, public string $acs_system_id, + public string $connected_account_id, public string $created_at, public string $display_name, public array $errors, @@ -78,6 +81,7 @@ public function __construct( public bool|null $is_one_time_use, public string|null $parent_acs_credential_id, public string|null $starts_at, + public string|null $user_identity_id, public UnmanagedAcsCredentialVisionlineMetadata|null $visionline_metadata, public string|null $card_number, public string|null $code, diff --git a/src/Objects/UnmanagedDevice.php b/src/Objects/UnmanagedDevice.php index 35abff9..4f765a0 100644 --- a/src/Objects/UnmanagedDevice.php +++ b/src/Objects/UnmanagedDevice.php @@ -40,6 +40,7 @@ public static function from_json(mixed $json): UnmanagedDevice|null null, can_simulate_removal: $json->can_simulate_removal ?? null, can_turn_off_hvac: $json->can_turn_off_hvac ?? null, + can_unlock_with_code: $json->can_unlock_with_code ?? null, location: isset($json->location) ? UnmanagedDeviceLocation::from_json($json->location) : null @@ -68,6 +69,7 @@ public function __construct( public bool|null $can_simulate_disconnection, public bool|null $can_simulate_removal, public bool|null $can_turn_off_hvac, + public bool|null $can_unlock_with_code, public UnmanagedDeviceLocation|null $location ) {} } diff --git a/src/Objects/UserIdentity.php b/src/Objects/UserIdentity.php index 0f6fb29..9336a41 100644 --- a/src/Objects/UserIdentity.php +++ b/src/Objects/UserIdentity.php @@ -10,6 +10,7 @@ public static function from_json(mixed $json): UserIdentity|null return null; } return new self( + acs_user_ids: $json->acs_user_ids, created_at: $json->created_at, display_name: $json->display_name, errors: array_map( @@ -30,6 +31,7 @@ public static function from_json(mixed $json): UserIdentity|null } public function __construct( + public array $acs_user_ids, public string $created_at, public string $display_name, public array $errors, diff --git a/src/Objects/UserIdentityErrors.php b/src/Objects/UserIdentityErrors.php index 1c25471..23874a7 100644 --- a/src/Objects/UserIdentityErrors.php +++ b/src/Objects/UserIdentityErrors.php @@ -9,11 +9,20 @@ public static function from_json(mixed $json): UserIdentityErrors|null if (!$json) { return null; } - return new self(created_at: $json->created_at, message: $json->message); + return new self( + acs_system_id: $json->acs_system_id, + acs_user_id: $json->acs_user_id, + created_at: $json->created_at, + error_code: $json->error_code, + message: $json->message + ); } public function __construct( + public string $acs_system_id, + public string $acs_user_id, public string $created_at, + public string $error_code, public string $message ) {} } diff --git a/src/SeamClient.php b/src/SeamClient.php index 47f0995..cda1ac7 100644 --- a/src/SeamClient.php +++ b/src/SeamClient.php @@ -798,13 +798,22 @@ public function get( public function list( string $device_id, - ?string $user_identifier_key = null + ?float $limit = null, + ?string $page_cursor = null, + ?string $user_identifier_key = null, + ?callable $on_response = null ): array { $request_payload = []; if ($device_id !== null) { $request_payload["device_id"] = $device_id; } + if ($limit !== null) { + $request_payload["limit"] = $limit; + } + if ($page_cursor !== null) { + $request_payload["page_cursor"] = $page_cursor; + } if ($user_identifier_key !== null) { $request_payload["user_identifier_key"] = $user_identifier_key; } @@ -815,6 +824,10 @@ public function list( json: (object) $request_payload ); + if ($on_response !== null) { + $on_response($res); + } + return array_map( fn($r) => UnmanagedAccessCode::from_json($r), $res->access_codes @@ -871,11 +884,13 @@ public function create( array $requested_access_methods, ?string $user_identity_id = null, mixed $user_identity = null, + ?string $access_grant_key = null, ?array $acs_entrance_ids = null, ?array $device_ids = null, ?string $ends_at = null, mixed $location = null, ?array $location_ids = null, + ?string $name = null, ?array $space_ids = null, ?string $starts_at = null ): AccessGrant { @@ -892,6 +907,9 @@ public function create( if ($user_identity !== null) { $request_payload["user_identity"] = $user_identity; } + if ($access_grant_key !== null) { + $request_payload["access_grant_key"] = $access_grant_key; + } if ($acs_entrance_ids !== null) { $request_payload["acs_entrance_ids"] = $acs_entrance_ids; } @@ -907,6 +925,9 @@ public function create( if ($location_ids !== null) { $request_payload["location_ids"] = $location_ids; } + if ($name !== null) { + $request_payload["name"] = $name; + } if ($space_ids !== null) { $request_payload["space_ids"] = $space_ids; } @@ -938,13 +959,18 @@ public function delete(string $access_grant_id): void ); } - public function get(string $access_grant_id): AccessGrant - { + public function get( + ?string $access_grant_id = null, + ?string $access_grant_key = null + ): AccessGrant { $request_payload = []; if ($access_grant_id !== null) { $request_payload["access_grant_id"] = $access_grant_id; } + if ($access_grant_key !== null) { + $request_payload["access_grant_key"] = $access_grant_key; + } $res = $this->seam->request( "POST", @@ -955,7 +981,32 @@ public function get(string $access_grant_id): AccessGrant return AccessGrant::from_json($res->access_grant); } + public function get_related( + array $access_grant_ids, + ?array $exclude = null, + ?array $include = null + ): void { + $request_payload = []; + + if ($access_grant_ids !== null) { + $request_payload["access_grant_ids"] = $access_grant_ids; + } + if ($exclude !== null) { + $request_payload["exclude"] = $exclude; + } + if ($include !== null) { + $request_payload["include"] = $include; + } + + $this->seam->request( + "POST", + "/access_grants/get_related", + json: (object) $request_payload + ); + } + public function list( + ?string $access_grant_key = null, ?string $acs_entrance_id = null, ?string $acs_system_id = null, ?string $location_id = null, @@ -964,6 +1015,9 @@ public function list( ): array { $request_payload = []; + if ($access_grant_key !== null) { + $request_payload["access_grant_key"] = $access_grant_key; + } if ($acs_entrance_id !== null) { $request_payload["acs_entrance_id"] = $acs_entrance_id; } @@ -995,6 +1049,7 @@ public function list( public function update( string $access_grant_id, ?string $ends_at = null, + ?string $name = null, ?string $starts_at = null ): void { $request_payload = []; @@ -1005,6 +1060,9 @@ public function update( if ($ends_at !== null) { $request_payload["ends_at"] = $ends_at; } + if ($name !== null) { + $request_payload["name"] = $name; + } if ($starts_at !== null) { $request_payload["starts_at"] = $starts_at; } @@ -1041,6 +1099,37 @@ public function delete(string $access_method_id): void ); } + public function encode( + string $access_method_id, + string $acs_encoder_id, + bool $wait_for_action_attempt = true + ): ActionAttempt { + $request_payload = []; + + if ($access_method_id !== null) { + $request_payload["access_method_id"] = $access_method_id; + } + if ($acs_encoder_id !== null) { + $request_payload["acs_encoder_id"] = $acs_encoder_id; + } + + $res = $this->seam->request( + "POST", + "/access_methods/encode", + json: (object) $request_payload + ); + + if (!$wait_for_action_attempt) { + return ActionAttempt::from_json($res->action_attempt); + } + + $action_attempt = $this->seam->action_attempts->poll_until_ready( + $res->action_attempt->action_attempt_id + ); + + return $action_attempt; + } + public function get(string $access_method_id): AccessMethod { $request_payload = []; @@ -1058,13 +1147,26 @@ public function get(string $access_method_id): AccessMethod return AccessMethod::from_json($res->access_method); } - public function list(string $access_grant_id): array - { + public function list( + string $access_grant_id, + ?string $acs_entrance_id = null, + ?string $device_id = null, + ?string $space_id = null + ): array { $request_payload = []; if ($access_grant_id !== null) { $request_payload["access_grant_id"] = $access_grant_id; } + if ($acs_entrance_id !== null) { + $request_payload["acs_entrance_id"] = $acs_entrance_id; + } + if ($device_id !== null) { + $request_payload["device_id"] = $device_id; + } + if ($space_id !== null) { + $request_payload["space_id"] = $space_id; + } $res = $this->seam->request( "POST", @@ -1502,50 +1604,23 @@ public function __construct(SeamClient $seam) $this->seam = $seam; } - public function encode_access_method( - string $access_method_id, + public function encode_credential( string $acs_encoder_id, + ?string $access_method_id = null, + ?string $acs_credential_id = null, bool $wait_for_action_attempt = true ): ActionAttempt { $request_payload = []; - if ($access_method_id !== null) { - $request_payload["access_method_id"] = $access_method_id; - } if ($acs_encoder_id !== null) { $request_payload["acs_encoder_id"] = $acs_encoder_id; } - - $res = $this->seam->request( - "POST", - "/acs/encoders/encode_access_method", - json: (object) $request_payload - ); - - if (!$wait_for_action_attempt) { - return ActionAttempt::from_json($res->action_attempt); + if ($access_method_id !== null) { + $request_payload["access_method_id"] = $access_method_id; } - - $action_attempt = $this->seam->action_attempts->poll_until_ready( - $res->action_attempt->action_attempt_id - ); - - return $action_attempt; - } - - public function encode_credential( - string $acs_credential_id, - string $acs_encoder_id, - bool $wait_for_action_attempt = true - ): ActionAttempt { - $request_payload = []; - if ($acs_credential_id !== null) { $request_payload["acs_credential_id"] = $acs_credential_id; } - if ($acs_encoder_id !== null) { - $request_payload["acs_encoder_id"] = $acs_encoder_id; - } $res = $this->seam->request( "POST", @@ -1802,8 +1877,11 @@ public function list( ?string $access_grant_id = null, ?string $access_method_id = null, ?string $acs_credential_id = null, + ?array $acs_entrance_ids = null, ?string $acs_system_id = null, + ?string $connected_account_id = null, ?string $location_id = null, + ?string $search = null, ?string $space_id = null ): array { $request_payload = []; @@ -1817,12 +1895,21 @@ public function list( if ($acs_credential_id !== null) { $request_payload["acs_credential_id"] = $acs_credential_id; } + if ($acs_entrance_ids !== null) { + $request_payload["acs_entrance_ids"] = $acs_entrance_ids; + } if ($acs_system_id !== null) { $request_payload["acs_system_id"] = $acs_system_id; } + if ($connected_account_id !== null) { + $request_payload["connected_account_id"] = $connected_account_id; + } if ($location_id !== null) { $request_payload["location_id"] = $location_id; } + if ($search !== null) { + $request_payload["search"] = $search; + } if ($space_id !== null) { $request_payload["space_id"] = $space_id; } @@ -2591,7 +2678,7 @@ public function create( mixed $custom_metadata = null, ?string $custom_redirect_failure_url = null, ?string $custom_redirect_url = null, - ?string $customer_id = null, + ?string $customer_key = null, ?string $device_selection_mode = null, ?string $provider_category = null, ?bool $wait_for_device_creation = null @@ -2620,8 +2707,8 @@ public function create( if ($custom_redirect_url !== null) { $request_payload["custom_redirect_url"] = $custom_redirect_url; } - if ($customer_id !== null) { - $request_payload["customer_id"] = $customer_id; + if ($customer_key !== null) { + $request_payload["customer_key"] = $customer_key; } if ($device_selection_mode !== null) { $request_payload["device_selection_mode"] = $device_selection_mode; @@ -2678,7 +2765,6 @@ public function get(string $connect_webview_id): ConnectWebview public function list( mixed $custom_metadata_has = null, - ?array $customer_ids = null, ?float $limit = null, ?string $page_cursor = null, ?string $user_identifier_key = null, @@ -2689,9 +2775,6 @@ public function list( if ($custom_metadata_has !== null) { $request_payload["custom_metadata_has"] = $custom_metadata_has; } - if ($customer_ids !== null) { - $request_payload["customer_ids"] = $customer_ids; - } if ($limit !== null) { $request_payload["limit"] = $limit; } @@ -2772,9 +2855,10 @@ public function get( public function list( mixed $custom_metadata_has = null, - ?array $customer_ids = null, + ?string $customer_key = null, mixed $limit = null, ?string $page_cursor = null, + ?string $search = null, ?string $user_identifier_key = null, ?callable $on_response = null ): array { @@ -2783,8 +2867,8 @@ public function list( if ($custom_metadata_has !== null) { $request_payload["custom_metadata_has"] = $custom_metadata_has; } - if ($customer_ids !== null) { - $request_payload["customer_ids"] = $customer_ids; + if ($customer_key !== null) { + $request_payload["customer_key"] = $customer_key; } if ($limit !== null) { $request_payload["limit"] = $limit; @@ -2792,6 +2876,9 @@ public function list( if ($page_cursor !== null) { $request_payload["page_cursor"] = $page_cursor; } + if ($search !== null) { + $request_payload["search"] = $search; + } if ($user_identifier_key !== null) { $request_payload["user_identifier_key"] = $user_identifier_key; } @@ -2829,6 +2916,7 @@ public function sync(string $connected_account_id): void public function update( string $connected_account_id, + ?array $accepted_capabilities = null, ?bool $automatically_manage_new_devices = null, mixed $custom_metadata = null ): void { @@ -2837,6 +2925,9 @@ public function update( if ($connected_account_id !== null) { $request_payload["connected_account_id"] = $connected_account_id; } + if ($accepted_capabilities !== null) { + $request_payload["accepted_capabilities"] = $accepted_capabilities; + } if ($automatically_manage_new_devices !== null) { $request_payload[ "automatically_manage_new_devices" @@ -3007,6 +3098,7 @@ public function get(?string $device_id = null, ?string $name = null): Device } public function list( + ?string $access_method_id = null, ?string $connect_webview_id = null, ?string $connected_account_id = null, ?array $connected_account_ids = null, @@ -3021,6 +3113,7 @@ public function list( ?float $limit = null, ?string $manufacturer = null, ?string $page_cursor = null, + ?string $search = null, ?string $space_id = null, ?string $unstable_location_id = null, ?string $user_identifier_key = null, @@ -3028,6 +3121,9 @@ public function list( ): array { $request_payload = []; + if ($access_method_id !== null) { + $request_payload["access_method_id"] = $access_method_id; + } if ($connect_webview_id !== null) { $request_payload["connect_webview_id"] = $connect_webview_id; } @@ -3070,6 +3166,9 @@ public function list( if ($page_cursor !== null) { $request_payload["page_cursor"] = $page_cursor; } + if ($search !== null) { + $request_payload["search"] = $search; + } if ($space_id !== null) { $request_payload["space_id"] = $space_id; } @@ -3171,6 +3270,21 @@ public function connect(string $device_id): void ); } + public function connect_to_hub(string $device_id): void + { + $request_payload = []; + + if ($device_id !== null) { + $request_payload["device_id"] = $device_id; + } + + $this->seam->request( + "POST", + "/devices/simulate/connect_to_hub", + json: (object) $request_payload + ); + } + public function disconnect(string $device_id): void { $request_payload = []; @@ -3186,6 +3300,21 @@ public function disconnect(string $device_id): void ); } + public function disconnect_from_hub(string $device_id): void + { + $request_payload = []; + + if ($device_id !== null) { + $request_payload["device_id"] = $device_id; + } + + $this->seam->request( + "POST", + "/devices/simulate/disconnect_from_hub", + json: (object) $request_payload + ); + } + public function remove(string $device_id): void { $request_payload = []; @@ -3234,6 +3363,7 @@ public function get( } public function list( + ?string $access_method_id = null, ?string $connect_webview_id = null, ?string $connected_account_id = null, ?array $connected_account_ids = null, @@ -3248,6 +3378,7 @@ public function list( ?float $limit = null, ?string $manufacturer = null, ?string $page_cursor = null, + ?string $search = null, ?string $space_id = null, ?string $unstable_location_id = null, ?string $user_identifier_key = null, @@ -3255,6 +3386,9 @@ public function list( ): array { $request_payload = []; + if ($access_method_id !== null) { + $request_payload["access_method_id"] = $access_method_id; + } if ($connect_webview_id !== null) { $request_payload["connect_webview_id"] = $connect_webview_id; } @@ -3297,6 +3431,9 @@ public function list( if ($page_cursor !== null) { $request_payload["page_cursor"] = $page_cursor; } + if ($search !== null) { + $request_payload["search"] = $search; + } if ($space_id !== null) { $request_payload["space_id"] = $space_id; } @@ -3459,10 +3596,11 @@ public function list( class LocksClient { private SeamClient $seam; - + public LocksSimulateClient $simulate; public function __construct(SeamClient $seam) { $this->seam = $seam; + $this->simulate = new LocksSimulateClient($seam); } public function get(?string $device_id = null, ?string $name = null): Device @@ -3486,6 +3624,7 @@ public function get(?string $device_id = null, ?string $name = null): Device } public function list( + ?string $access_method_id = null, ?string $connect_webview_id = null, ?string $connected_account_id = null, ?array $connected_account_ids = null, @@ -3500,6 +3639,7 @@ public function list( ?float $limit = null, ?string $manufacturer = null, ?string $page_cursor = null, + ?string $search = null, ?string $space_id = null, ?string $unstable_location_id = null, ?string $user_identifier_key = null, @@ -3507,6 +3647,9 @@ public function list( ): array { $request_payload = []; + if ($access_method_id !== null) { + $request_payload["access_method_id"] = $access_method_id; + } if ($connect_webview_id !== null) { $request_payload["connect_webview_id"] = $connect_webview_id; } @@ -3549,6 +3692,9 @@ public function list( if ($page_cursor !== null) { $request_payload["page_cursor"] = $page_cursor; } + if ($search !== null) { + $request_payload["search"] = $search; + } if ($space_id !== null) { $request_payload["space_id"] = $space_id; } @@ -3635,6 +3781,74 @@ public function unlock_door( } } +class LocksSimulateClient +{ + private SeamClient $seam; + + public function __construct(SeamClient $seam) + { + $this->seam = $seam; + } + + public function keypad_code_entry( + string $code, + string $device_id, + bool $wait_for_action_attempt = true + ): ActionAttempt { + $request_payload = []; + + if ($code !== null) { + $request_payload["code"] = $code; + } + if ($device_id !== null) { + $request_payload["device_id"] = $device_id; + } + + $res = $this->seam->request( + "POST", + "/locks/simulate/keypad_code_entry", + json: (object) $request_payload + ); + + if (!$wait_for_action_attempt) { + return ActionAttempt::from_json($res->action_attempt); + } + + $action_attempt = $this->seam->action_attempts->poll_until_ready( + $res->action_attempt->action_attempt_id + ); + + return $action_attempt; + } + + public function manual_lock_via_keypad( + string $device_id, + bool $wait_for_action_attempt = true + ): ActionAttempt { + $request_payload = []; + + if ($device_id !== null) { + $request_payload["device_id"] = $device_id; + } + + $res = $this->seam->request( + "POST", + "/locks/simulate/manual_lock_via_keypad", + json: (object) $request_payload + ); + + if (!$wait_for_action_attempt) { + return ActionAttempt::from_json($res->action_attempt); + } + + $action_attempt = $this->seam->action_attempts->poll_until_ready( + $res->action_attempt->action_attempt_id + ); + + return $action_attempt; + } +} + class NoiseSensorsClient { private SeamClient $seam; @@ -3648,6 +3862,7 @@ public function __construct(SeamClient $seam) } public function list( + ?string $access_method_id = null, ?string $connect_webview_id = null, ?string $connected_account_id = null, ?array $connected_account_ids = null, @@ -3662,6 +3877,7 @@ public function list( ?float $limit = null, ?string $manufacturer = null, ?string $page_cursor = null, + ?string $search = null, ?string $space_id = null, ?string $unstable_location_id = null, ?string $user_identifier_key = null, @@ -3669,6 +3885,9 @@ public function list( ): array { $request_payload = []; + if ($access_method_id !== null) { + $request_payload["access_method_id"] = $access_method_id; + } if ($connect_webview_id !== null) { $request_payload["connect_webview_id"] = $connect_webview_id; } @@ -3711,6 +3930,9 @@ public function list( if ($page_cursor !== null) { $request_payload["page_cursor"] = $page_cursor; } + if ($search !== null) { + $request_payload["search"] = $search; + } if ($space_id !== null) { $request_payload["space_id"] = $space_id; } @@ -4083,7 +4305,8 @@ public function add_devices(array $device_ids, string $space_id): void public function create( string $name, ?array $acs_entrance_ids = null, - ?array $device_ids = null + ?array $device_ids = null, + ?string $space_key = null ): Space { $request_payload = []; @@ -4096,6 +4319,9 @@ public function create( if ($device_ids !== null) { $request_payload["device_ids"] = $device_ids; } + if ($space_key !== null) { + $request_payload["space_key"] = $space_key; + } $res = $this->seam->request( "POST", @@ -4121,13 +4347,18 @@ public function delete(string $space_id): void ); } - public function get(string $space_id): Space - { + public function get( + ?string $space_id = null, + ?string $space_key = null + ): Space { $request_payload = []; if ($space_id !== null) { $request_payload["space_id"] = $space_id; } + if ($space_key !== null) { + $request_payload["space_key"] = $space_key; + } $res = $this->seam->request( "POST", @@ -4138,9 +4369,52 @@ public function get(string $space_id): Space return Space::from_json($res->space); } - public function list(): array - { - $res = $this->seam->request("POST", "/spaces/list"); + public function get_related( + array $space_ids, + ?array $exclude = null, + ?array $include = null + ): void { + $request_payload = []; + + if ($space_ids !== null) { + $request_payload["space_ids"] = $space_ids; + } + if ($exclude !== null) { + $request_payload["exclude"] = $exclude; + } + if ($include !== null) { + $request_payload["include"] = $include; + } + + $this->seam->request( + "POST", + "/spaces/get_related", + json: (object) $request_payload + ); + } + + public function list( + ?string $connected_account_id = null, + ?string $search = null, + ?string $space_key = null + ): array { + $request_payload = []; + + if ($connected_account_id !== null) { + $request_payload["connected_account_id"] = $connected_account_id; + } + if ($search !== null) { + $request_payload["search"] = $search; + } + if ($space_key !== null) { + $request_payload["space_key"] = $space_key; + } + + $res = $this->seam->request( + "POST", + "/spaces/list", + json: (object) $request_payload + ); return array_map(fn($r) => Space::from_json($r), $res->spaces); } @@ -4183,16 +4457,30 @@ public function remove_devices(array $device_ids, string $space_id): void ); } - public function update(string $space_id, ?string $name = null): Space - { + public function update( + ?array $acs_entrance_ids = null, + ?array $device_ids = null, + ?string $name = null, + ?string $space_id = null, + ?string $space_key = null + ): Space { $request_payload = []; - if ($space_id !== null) { - $request_payload["space_id"] = $space_id; + if ($acs_entrance_ids !== null) { + $request_payload["acs_entrance_ids"] = $acs_entrance_ids; + } + if ($device_ids !== null) { + $request_payload["device_ids"] = $device_ids; } if ($name !== null) { $request_payload["name"] = $name; } + if ($space_id !== null) { + $request_payload["space_id"] = $space_id; + } + if ($space_key !== null) { + $request_payload["space_key"] = $space_key; + } $res = $this->seam->request( "POST", @@ -4295,8 +4583,10 @@ public function cool( public function create_climate_preset( string $climate_preset_key, string $device_id, + ?string $climate_preset_mode = null, ?float $cooling_set_point_celsius = null, ?float $cooling_set_point_fahrenheit = null, + mixed $ecobee_metadata = null, ?string $fan_mode_setting = null, ?float $heating_set_point_celsius = null, ?float $heating_set_point_fahrenheit = null, @@ -4312,6 +4602,9 @@ public function create_climate_preset( if ($device_id !== null) { $request_payload["device_id"] = $device_id; } + if ($climate_preset_mode !== null) { + $request_payload["climate_preset_mode"] = $climate_preset_mode; + } if ($cooling_set_point_celsius !== null) { $request_payload[ "cooling_set_point_celsius" @@ -4322,6 +4615,9 @@ public function create_climate_preset( "cooling_set_point_fahrenheit" ] = $cooling_set_point_fahrenheit; } + if ($ecobee_metadata !== null) { + $request_payload["ecobee_metadata"] = $ecobee_metadata; + } if ($fan_mode_setting !== null) { $request_payload["fan_mode_setting"] = $fan_mode_setting; } @@ -4473,6 +4769,7 @@ public function heat_cool( } public function list( + ?string $access_method_id = null, ?string $connect_webview_id = null, ?string $connected_account_id = null, ?array $connected_account_ids = null, @@ -4487,6 +4784,7 @@ public function list( ?float $limit = null, ?string $manufacturer = null, ?string $page_cursor = null, + ?string $search = null, ?string $space_id = null, ?string $unstable_location_id = null, ?string $user_identifier_key = null, @@ -4494,6 +4792,9 @@ public function list( ): array { $request_payload = []; + if ($access_method_id !== null) { + $request_payload["access_method_id"] = $access_method_id; + } if ($connect_webview_id !== null) { $request_payload["connect_webview_id"] = $connect_webview_id; } @@ -4536,6 +4837,9 @@ public function list( if ($page_cursor !== null) { $request_payload["page_cursor"] = $page_cursor; } + if ($search !== null) { + $request_payload["search"] = $search; + } if ($space_id !== null) { $request_payload["space_id"] = $space_id; } @@ -4743,8 +5047,10 @@ public function set_temperature_threshold( public function update_climate_preset( string $climate_preset_key, string $device_id, + ?string $climate_preset_mode = null, ?float $cooling_set_point_celsius = null, ?float $cooling_set_point_fahrenheit = null, + mixed $ecobee_metadata = null, ?string $fan_mode_setting = null, ?float $heating_set_point_celsius = null, ?float $heating_set_point_fahrenheit = null, @@ -4760,6 +5066,9 @@ public function update_climate_preset( if ($device_id !== null) { $request_payload["device_id"] = $device_id; } + if ($climate_preset_mode !== null) { + $request_payload["climate_preset_mode"] = $climate_preset_mode; + } if ($cooling_set_point_celsius !== null) { $request_payload[ "cooling_set_point_celsius" @@ -4770,6 +5079,9 @@ public function update_climate_preset( "cooling_set_point_fahrenheit" ] = $cooling_set_point_fahrenheit; } + if ($ecobee_metadata !== null) { + $request_payload["ecobee_metadata"] = $ecobee_metadata; + } if ($fan_mode_setting !== null) { $request_payload["fan_mode_setting"] = $fan_mode_setting; } @@ -5335,7 +5647,8 @@ public function grant_access_to_device( } public function list( - ?string $credential_manager_acs_system_id = null + ?string $credential_manager_acs_system_id = null, + ?string $search = null ): array { $request_payload = []; @@ -5344,6 +5657,9 @@ public function list( "credential_manager_acs_system_id" ] = $credential_manager_acs_system_id; } + if ($search !== null) { + $request_payload["search"] = $search; + } $res = $this->seam->request( "POST",