diff --git a/package-lock.json b/package-lock.json index 4c962200..4199152c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@seamapi/blueprint": "^1.11.0", "@seamapi/fake-seam-connect": "2.0.6", "@seamapi/smith": "^1.1.0", - "@seamapi/types": "1.1054.0", + "@seamapi/types": "1.1057.0", "change-case": "^5.4.4", "execa": "^10.0.1", "prettier": "^3.9.6" @@ -882,9 +882,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.1054.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1054.0.tgz", - "integrity": "sha512-l0iefkReN/ndh9c+F/X8z1GEfGsQr/ArO+rzCQAPln7L8/YiztaggxEU/oWhpkCt9VlviR2K53QFpmUhOo7Xeg==", + "version": "1.1057.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1057.0.tgz", + "integrity": "sha512-yNaapE5FG8Pf3ZfIm3+bOLtXh4rg1K2fhCrp8cttFP5hNXk4rYHbBA+YP51uidUca+Rk1oAeO8GmX0YL4YRHfw==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 8b808dc4..ae25513a 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "@seamapi/blueprint": "^1.11.0", "@seamapi/fake-seam-connect": "2.0.6", "@seamapi/smith": "^1.1.0", - "@seamapi/types": "1.1054.0", + "@seamapi/types": "1.1057.0", "change-case": "^5.4.4", "execa": "^10.0.1", "prettier": "^3.9.6" diff --git a/src/Resources/AccessCode.php b/src/Resources/AccessCode.php index a6ed128a..65259abe 100644 --- a/src/Resources/AccessCode.php +++ b/src/Resources/AccessCode.php @@ -25,6 +25,7 @@ public static function from_json(mixed $json): AccessCode|null common_code_key: $json->common_code_key ?? null, created_at: $json->created_at ?? null, device_id: $json->device_id ?? null, + display_status: $json->display_status ?? null, errors: array_map( fn($e) => \Seam\Resources\AccessCode\Errors::from_json($e), $json->errors ?? [], @@ -93,6 +94,10 @@ public function __construct( * Unique identifier for the device associated with the access code. */ public string|null $device_id, + /** + * Human-readable label for where this access code sits in its lifecycle, for example `Active`, `Issuing`, or `Expired`. For display only. The wording is not stable and is not an enumeration — it may change at any time, so never compare against or branch on it. To make decisions, read `pending_mutations`, `errors`, `warnings`, `starts_at`, and `ends_at`. + */ + public string|null $display_status, /** * Errors associated with the [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). * @@ -133,6 +138,7 @@ public function __construct( * Current status of the access code within the operational lifecycle. Values are `setting`, a transitional phase that indicates that the code is being configured or activated; `set`, which indicates that the code is active and operational; `unset`, which indicates a deactivated or unused state, either before activation or after deliberate deactivation; `removing`, which indicates a transitional period in which the code is being deleted or made inactive; and `unknown`, which indicates an indeterminate state, due to reasons such as system errors or incomplete data, that highlights a potential need for system review or troubleshooting. See also [Lifecycle of Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/lifecycle-of-access-codes). * * @var value-of<\Seam\Resources\AccessCode\Status>|string|null + * @deprecated Use `display_status` to show a person the code's state. To make decisions, read `pending_mutations`, `errors`, `warnings`, `starts_at`, and `ends_at`. */ public string|null $status, /** diff --git a/src/Resources/Device.php b/src/Resources/Device.php index f70cc6db..ee38854e 100644 --- a/src/Resources/Device.php +++ b/src/Resources/Device.php @@ -5019,18 +5019,18 @@ public static function from_json(mixed $json): UserLevels|null return null; } return new self( - checkInTime: $json->checkInTime ?? null, - checkOutTime: $json->checkOutTime ?? null, userLevel: $json->userLevel ?? null, + userLevelCheckInTime: $json->userLevelCheckInTime ?? null, + userLevelCheckOutTime: $json->userLevelCheckOutTime ?? null, userLevelName: $json->userLevelName ?? null, userLevelType: $json->userLevelType ?? null, ); } public function __construct( - public string|null $checkInTime = null, - public string|null $checkOutTime = null, public float|null $userLevel = null, + public string|null $userLevelCheckInTime = null, + public string|null $userLevelCheckOutTime = null, public string|null $userLevelName = null, public string|null $userLevelType = null, ) {} diff --git a/src/Resources/UnmanagedAccessCode.php b/src/Resources/UnmanagedAccessCode.php index 89e0fd68..4ac1b504 100644 --- a/src/Resources/UnmanagedAccessCode.php +++ b/src/Resources/UnmanagedAccessCode.php @@ -26,6 +26,7 @@ public static function from_json(mixed $json): UnmanagedAccessCode|null code: $json->code ?? null, created_at: $json->created_at ?? null, device_id: $json->device_id ?? null, + display_status: $json->display_status ?? null, errors: array_map( fn( $e, @@ -79,6 +80,10 @@ public function __construct( * Unique identifier for the device associated with the access code. */ public string|null $device_id, + /** + * Human-readable label for the code's state: `Active` or `Not active`, based on whether the code is set on the device. For display only. The wording is not stable and is not an enumeration — never compare against or branch on it. + */ + public string|null $display_status, /** * Errors associated with the [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). * @@ -97,6 +102,7 @@ public function __construct( * Current status of the access code within the operational lifecycle. `set` indicates that the code is active and operational. `unset` indicates that the code exists on the provider but is not usable on the device. * * @var value-of<\Seam\Resources\UnmanagedAccessCode\Status>|string|null + * @deprecated Use `display_status` to show a person the code's state. */ public string|null $status, /**