From f57c05ad7449709c2b849b4281f1306d200a58df Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Oct 2026 03:43:53 +0000 Subject: [PATCH 1/2] feat(deps-dev): bump @seamapi/types Bumps the seam group with 1 update: [@seamapi/types](https://github.com/seamapi/types). Updates `@seamapi/types` from 1.1098.0 to 1.1100.0 - [Release notes](https://github.com/seamapi/types/releases) - [Commits](https://github.com/seamapi/types/compare/v1.1098.0...v1.1100.0) --- updated-dependencies: - dependency-name: "@seamapi/types" dependency-version: 1.1100.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: seam ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3a9d4965..3ebf25be 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.1098.0", + "@seamapi/types": "1.1100.0", "change-case": "^5.4.4", "execa": "^10.0.1", "prettier": "^3.9.6" @@ -882,9 +882,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.1098.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1098.0.tgz", - "integrity": "sha512-pxGJrkuDd62oNiGnKHKnx3LaNvylrWfj5T6IEKlE/njVrp4K/khVmiSqjt4wh3EcgU3R27Zk8pOqivhB8fwKkA==", + "version": "1.1100.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1100.0.tgz", + "integrity": "sha512-syQWT7HOR5T24hzSAXpcFvWzRUrn+PuObNhiN2xvfxGJUseUvhB0LQGfI7mJY0lxWdBazYJEXLf8M3cqYW7K8g==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 8e11a8e8..da3009c1 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.1098.0", + "@seamapi/types": "1.1100.0", "change-case": "^5.4.4", "execa": "^10.0.1", "prettier": "^3.9.6" From d23106e093cb39873cecfcabe0d630842487769d Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Fri, 9 Oct 2026 03:44:21 +0000 Subject: [PATCH 2/2] ci: Generate code --- src/Resources/AccessGrant.php | 56 ++++- src/Resources/AccessMethod.php | 46 +++++ src/Resources/ActionAttempt.php | 258 ++++++++++++++++++++++++ src/Resources/UnmanagedAccessGrant.php | 57 +++++- src/Resources/UnmanagedAccessMethod.php | 47 +++++ 5 files changed, 446 insertions(+), 18 deletions(-) diff --git a/src/Resources/AccessGrant.php b/src/Resources/AccessGrant.php index 140bc1be..6bdd1152 100644 --- a/src/Resources/AccessGrant.php +++ b/src/Resources/AccessGrant.php @@ -183,11 +183,14 @@ public static function from_json(mixed $json): Errors|null => \Seam\Resources\AccessGrant\Errors\CannotCreateRequestedAccessMethods::from_json( $json, ), + \Seam\Resources\AccessGrant\Errors\ErrorCode::ACCESS_NOT_PROVISIONED + => \Seam\Resources\AccessGrant\Errors\AccessNotProvisioned::from_json( + $json, + ), default => new self( created_at: $json->created_at ?? null, error_code: $json->error_code ?? null, message: $json->message ?? null, - missing_device_ids: $json->missing_device_ids ?? null, ), }; } @@ -207,12 +210,6 @@ public function __construct( * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ public string|null $message, - /** - * IDs of the devices that did not receive an access code at grant creation. Use these to identify which specific devices failed when the message reports a partial failure. - * - * @var list|null - */ - public array|null $missing_device_ids = null, ) {} } @@ -435,13 +432,53 @@ public function __construct( * * @var list|null */ - array|null $missing_device_ids = null, + public array|null $missing_device_ids = null, + ) { + parent::__construct( + created_at: $created_at, + error_code: $error_code, + message: $message, + ); + } + } + + /** + * Indicates that the access system rejected the access that Seam tried to set up for this access grant, so its credentials cannot open the affected entrances. For example, a hotel room may already be reserved or checked in for another guest. The message contains the reason that the access system gave. Seam keeps retrying, and this error clears automatically once the access system accepts the access. + */ + final class AccessNotProvisioned extends \Seam\Resources\AccessGrant\Errors + { + public static function from_json(mixed $json): AccessNotProvisioned|null + { + if (!$json) { + return null; + } + return new self( + created_at: $json->created_at ?? null, + error_code: $json->error_code ?? null, + message: $json->message ?? null, + ); + } + + public function __construct( + /** + * Date and time at which Seam created the error. + */ + string|null $created_at, + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + * + * @var value-of<\Seam\Resources\AccessGrant\Errors\ErrorCode>|string|null + */ + string|null $error_code, + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ + string|null $message, ) { parent::__construct( created_at: $created_at, error_code: $error_code, message: $message, - missing_device_ids: $missing_device_ids, ); } } @@ -449,6 +486,7 @@ public function __construct( enum ErrorCode: string { case CANNOT_CREATE_REQUESTED_ACCESS_METHODS = "cannot_create_requested_access_methods"; + case ACCESS_NOT_PROVISIONED = "access_not_provisioned"; } } diff --git a/src/Resources/AccessMethod.php b/src/Resources/AccessMethod.php index 1a64dcf9..86e1325c 100644 --- a/src/Resources/AccessMethod.php +++ b/src/Resources/AccessMethod.php @@ -163,6 +163,10 @@ public static function from_json(mixed $json): Errors|null => \Seam\Resources\AccessMethod\Errors\FailedToIssue::from_json( $json, ), + \Seam\Resources\AccessMethod\Errors\ErrorCode::ACCESS_NOT_PROVISIONED + => \Seam\Resources\AccessMethod\Errors\AccessNotProvisioned::from_json( + $json, + ), default => new self( created_at: $json->created_at ?? null, error_code: $json->error_code ?? null, @@ -362,9 +366,51 @@ public function __construct( } } + /** + * Indicates that the access system rejected the access that Seam tried to set up for this access method, so its credential cannot open the affected entrances, even after it is issued. For example, a hotel room may already be reserved or checked in for another guest. The message contains the reason that the access system gave. Seam keeps retrying, and this error clears automatically once the access system accepts the access. + */ + final class AccessNotProvisioned extends \Seam\Resources\AccessMethod\Errors + { + public static function from_json(mixed $json): AccessNotProvisioned|null + { + if (!$json) { + return null; + } + return new self( + created_at: $json->created_at ?? null, + error_code: $json->error_code ?? null, + message: $json->message ?? null, + ); + } + + public function __construct( + /** + * Date and time at which Seam created the error. + */ + string|null $created_at, + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + * + * @var value-of<\Seam\Resources\AccessMethod\Errors\ErrorCode>|string|null + */ + string|null $error_code, + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ + string|null $message, + ) { + parent::__construct( + created_at: $created_at, + error_code: $error_code, + message: $message, + ); + } + } + enum ErrorCode: string { case FAILED_TO_ISSUE = "failed_to_issue"; + case ACCESS_NOT_PROVISIONED = "access_not_provisioned"; } } diff --git a/src/Resources/ActionAttempt.php b/src/Resources/ActionAttempt.php index b4930662..bab12133 100644 --- a/src/Resources/ActionAttempt.php +++ b/src/Resources/ActionAttempt.php @@ -76,6 +76,10 @@ public static function from_json(mixed $json): ActionAttempt|null => \Seam\Resources\ActionAttempt\ConfigureAutoLock::from_json( $json, ), + \Seam\Resources\ActionAttempt\ActionType::CONVERT_ACCESS_CODE_TO_MANAGED + => \Seam\Resources\ActionAttempt\ConvertAccessCodeToManaged::from_json( + $json, + ), \Seam\Resources\ActionAttempt\ActionType::SYNC_ACCESS_CODES => \Seam\Resources\ActionAttempt\SyncAccessCodes::from_json( $json, @@ -1024,6 +1028,66 @@ public function __construct( } } + /** + * Converting an unmanaged access code to managed is pending. Known status values use subclasses; unknown values use this base class and retain their raw discriminator. + */ + class ConvertAccessCodeToManaged extends \Seam\Resources\ActionAttempt + { + public static function from_json( + mixed $json, + ): ConvertAccessCodeToManaged|null { + if (!$json) { + return null; + } + $discriminant = is_string($json->status ?? null) + ? \Seam\Resources\ActionAttempt\Status::tryFrom($json->status) + : null; + + return match ($discriminant) { + \Seam\Resources\ActionAttempt\Status::SUCCESS + => \Seam\Resources\ActionAttempt\ConvertAccessCodeToManaged\Success::from_json( + $json, + ), + \Seam\Resources\ActionAttempt\Status::PENDING + => \Seam\Resources\ActionAttempt\ConvertAccessCodeToManaged\Pending::from_json( + $json, + ), + \Seam\Resources\ActionAttempt\Status::ERROR + => \Seam\Resources\ActionAttempt\ConvertAccessCodeToManaged\Error::from_json( + $json, + ), + default => new self( + action_attempt_id: $json->action_attempt_id ?? null, + action_type: $json->action_type ?? null, + status: $json->status ?? null, + ), + }; + } + + public function __construct( + /** + * ID of the action attempt. + */ + string|null $action_attempt_id, + /** + * Action attempt to track the status of locking a door. + * + * @var value-of<\Seam\Resources\ActionAttempt\ActionType>|string|null + */ + string|null $action_type, + /** + * @var value-of<\Seam\Resources\ActionAttempt\Status>|string|null + */ + string|null $status, + ) { + parent::__construct( + action_attempt_id: $action_attempt_id, + action_type: $action_type, + status: $status, + ); + } + } + /** * Known status values use subclasses; unknown values use this base class and retain their raw discriminator. */ @@ -1454,6 +1518,7 @@ enum ActionType: string case SIMULATE_MANUAL_LOCK_VIA_KEYPAD = "SIMULATE_MANUAL_LOCK_VIA_KEYPAD"; case PUSH_THERMOSTAT_PROGRAMS = "PUSH_THERMOSTAT_PROGRAMS"; case CONFIGURE_AUTO_LOCK = "CONFIGURE_AUTO_LOCK"; + case CONVERT_ACCESS_CODE_TO_MANAGED = "CONVERT_ACCESS_CODE_TO_MANAGED"; case SYNC_ACCESS_CODES = "SYNC_ACCESS_CODES"; case CREATE_ACCESS_CODE = "CREATE_ACCESS_CODE"; case DELETE_ACCESS_CODE = "DELETE_ACCESS_CODE"; @@ -4578,6 +4643,7 @@ enum Mode: string enum ErrorCode: string { case FAILED_TO_ISSUE = "failed_to_issue"; + case ACCESS_NOT_PROVISIONED = "access_not_provisioned"; } } @@ -6415,6 +6481,198 @@ public function __construct( } } +namespace Seam\Resources\ActionAttempt\ConvertAccessCodeToManaged { + /** + * Converting an unmanaged access code to managed is pending. + */ + final class Success extends + \Seam\Resources\ActionAttempt\ConvertAccessCodeToManaged + { + public static function from_json(mixed $json): Success|null + { + if (!$json) { + return null; + } + return new self( + action_attempt_id: $json->action_attempt_id ?? null, + action_type: $json->action_type ?? null, + error: null, + result: $json->result ?? null, + status: $json->status ?? null, + ); + } + + public function __construct( + /** + * ID of the action attempt. + */ + string|null $action_attempt_id, + /** + * Action attempt to track the status of locking a door. + * + * @var value-of<\Seam\Resources\ActionAttempt\ActionType>|string|null + */ + string|null $action_type, + /** + * Error associated with the action. + */ + public null $error, + /** + * Result of the action. + */ + public mixed $result, + /** + * @var value-of<\Seam\Resources\ActionAttempt\Status>|string|null + */ + string|null $status, + ) { + parent::__construct( + action_attempt_id: $action_attempt_id, + action_type: $action_type, + status: $status, + ); + } + } + + /** + * Converting an unmanaged access code to managed is pending. + */ + final class Pending extends + \Seam\Resources\ActionAttempt\ConvertAccessCodeToManaged + { + public static function from_json(mixed $json): Pending|null + { + if (!$json) { + return null; + } + return new self( + action_attempt_id: $json->action_attempt_id ?? null, + action_type: $json->action_type ?? null, + error: null, + result: null, + status: $json->status ?? null, + ); + } + + public function __construct( + /** + * ID of the action attempt. + */ + string|null $action_attempt_id, + /** + * Action attempt to track the status of locking a door. + * + * @var value-of<\Seam\Resources\ActionAttempt\ActionType>|string|null + */ + string|null $action_type, + /** + * Error associated with the action. + */ + public null $error, + /** + * Result of the action. + */ + public null $result, + /** + * @var value-of<\Seam\Resources\ActionAttempt\Status>|string|null + */ + string|null $status, + ) { + parent::__construct( + action_attempt_id: $action_attempt_id, + action_type: $action_type, + status: $status, + ); + } + } + + /** + * Converting an unmanaged access code to managed is pending. + */ + final class Error extends + \Seam\Resources\ActionAttempt\ConvertAccessCodeToManaged + { + public static function from_json(mixed $json): Error|null + { + if (!$json) { + return null; + } + return new self( + action_attempt_id: $json->action_attempt_id ?? null, + action_type: $json->action_type ?? null, + error: isset($json->error) + ? \Seam\Resources\ActionAttempt\ConvertAccessCodeToManaged\Error\Error::from_json( + $json->error, + ) + : null, + result: null, + status: $json->status ?? null, + ); + } + + public function __construct( + /** + * ID of the action attempt. + */ + string|null $action_attempt_id, + /** + * Action attempt to track the status of locking a door. + * + * @var value-of<\Seam\Resources\ActionAttempt\ActionType>|string|null + */ + string|null $action_type, + /** + * Error associated with the action. + */ + public \Seam\Resources\ActionAttempt\ConvertAccessCodeToManaged\Error\Error|null $error, + /** + * Result of the action. + */ + public null $result, + /** + * @var value-of<\Seam\Resources\ActionAttempt\Status>|string|null + */ + string|null $status, + ) { + parent::__construct( + action_attempt_id: $action_attempt_id, + action_type: $action_type, + status: $status, + ); + } + } +} + +namespace Seam\Resources\ActionAttempt\ConvertAccessCodeToManaged\Error { + /** + * Error associated with the action. + */ + class Error + { + public static function from_json(mixed $json): Error|null + { + if (!$json) { + return null; + } + return new self( + message: $json->message ?? null, + type: $json->type ?? null, + ); + } + + public function __construct( + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ + public string|null $message, + /** + * Type of the error. + */ + public string|null $type, + ) {} + } +} + namespace Seam\Resources\ActionAttempt\SyncAccessCodes { final class Success extends \Seam\Resources\ActionAttempt\SyncAccessCodes { diff --git a/src/Resources/UnmanagedAccessGrant.php b/src/Resources/UnmanagedAccessGrant.php index 03ecfcea..1900bee7 100644 --- a/src/Resources/UnmanagedAccessGrant.php +++ b/src/Resources/UnmanagedAccessGrant.php @@ -163,11 +163,14 @@ public static function from_json(mixed $json): Errors|null => \Seam\Resources\UnmanagedAccessGrant\Errors\CannotCreateRequestedAccessMethods::from_json( $json, ), + \Seam\Resources\UnmanagedAccessGrant\Errors\ErrorCode::ACCESS_NOT_PROVISIONED + => \Seam\Resources\UnmanagedAccessGrant\Errors\AccessNotProvisioned::from_json( + $json, + ), default => new self( created_at: $json->created_at ?? null, error_code: $json->error_code ?? null, message: $json->message ?? null, - missing_device_ids: $json->missing_device_ids ?? null, ), }; } @@ -187,12 +190,6 @@ public function __construct( * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ public string|null $message, - /** - * IDs of the devices that did not receive an access code at grant creation. Use these to identify which specific devices failed when the message reports a partial failure. - * - * @var list|null - */ - public array|null $missing_device_ids = null, ) {} } @@ -415,13 +412,54 @@ public function __construct( * * @var list|null */ - array|null $missing_device_ids = null, + public array|null $missing_device_ids = null, + ) { + parent::__construct( + created_at: $created_at, + error_code: $error_code, + message: $message, + ); + } + } + + /** + * Indicates that the access system rejected the access that Seam tried to set up for this access grant, so its credentials cannot open the affected entrances. For example, a hotel room may already be reserved or checked in for another guest. The message contains the reason that the access system gave. Seam keeps retrying, and this error clears automatically once the access system accepts the access. + */ + final class AccessNotProvisioned extends + \Seam\Resources\UnmanagedAccessGrant\Errors + { + public static function from_json(mixed $json): AccessNotProvisioned|null + { + if (!$json) { + return null; + } + return new self( + created_at: $json->created_at ?? null, + error_code: $json->error_code ?? null, + message: $json->message ?? null, + ); + } + + public function __construct( + /** + * Date and time at which Seam created the error. + */ + string|null $created_at, + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + * + * @var value-of<\Seam\Resources\UnmanagedAccessGrant\Errors\ErrorCode>|string|null + */ + string|null $error_code, + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ + string|null $message, ) { parent::__construct( created_at: $created_at, error_code: $error_code, message: $message, - missing_device_ids: $missing_device_ids, ); } } @@ -429,6 +467,7 @@ public function __construct( enum ErrorCode: string { case CANNOT_CREATE_REQUESTED_ACCESS_METHODS = "cannot_create_requested_access_methods"; + case ACCESS_NOT_PROVISIONED = "access_not_provisioned"; } } diff --git a/src/Resources/UnmanagedAccessMethod.php b/src/Resources/UnmanagedAccessMethod.php index 91e4ab13..43829285 100644 --- a/src/Resources/UnmanagedAccessMethod.php +++ b/src/Resources/UnmanagedAccessMethod.php @@ -152,6 +152,10 @@ public static function from_json(mixed $json): Errors|null => \Seam\Resources\UnmanagedAccessMethod\Errors\FailedToIssue::from_json( $json, ), + \Seam\Resources\UnmanagedAccessMethod\Errors\ErrorCode::ACCESS_NOT_PROVISIONED + => \Seam\Resources\UnmanagedAccessMethod\Errors\AccessNotProvisioned::from_json( + $json, + ), default => new self( created_at: $json->created_at ?? null, error_code: $json->error_code ?? null, @@ -352,9 +356,52 @@ public function __construct( } } + /** + * Indicates that the access system rejected the access that Seam tried to set up for this access method, so its credential cannot open the affected entrances, even after it is issued. For example, a hotel room may already be reserved or checked in for another guest. The message contains the reason that the access system gave. Seam keeps retrying, and this error clears automatically once the access system accepts the access. + */ + final class AccessNotProvisioned extends + \Seam\Resources\UnmanagedAccessMethod\Errors + { + public static function from_json(mixed $json): AccessNotProvisioned|null + { + if (!$json) { + return null; + } + return new self( + created_at: $json->created_at ?? null, + error_code: $json->error_code ?? null, + message: $json->message ?? null, + ); + } + + public function __construct( + /** + * Date and time at which Seam created the error. + */ + string|null $created_at, + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + * + * @var value-of<\Seam\Resources\UnmanagedAccessMethod\Errors\ErrorCode>|string|null + */ + string|null $error_code, + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ + string|null $message, + ) { + parent::__construct( + created_at: $created_at, + error_code: $error_code, + message: $message, + ); + } + } + enum ErrorCode: string { case FAILED_TO_ISSUE = "failed_to_issue"; + case ACCESS_NOT_PROVISIONED = "access_not_provisioned"; } }