From 32865b222128d2e8a388c67f971c6b6d0cdee599 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Oct 2026 03:44:28 +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.1096.0 to 1.1098.0 - [Release notes](https://github.com/seamapi/types/releases) - [Commits](https://github.com/seamapi/types/compare/v1.1096.0...v1.1098.0) --- updated-dependencies: - dependency-name: "@seamapi/types" dependency-version: 1.1098.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 a49314b8..9fa14c89 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.1096.0", + "@seamapi/types": "1.1098.0", "change-case": "^5.4.4", "execa": "^10.0.1", "prettier": "^3.9.6" @@ -882,9 +882,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.1096.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1096.0.tgz", - "integrity": "sha512-JMfk6KOq/U7l3InqXZRKLDrZ+OM/5Vfc+kaeZfkWwXPchBKn7nKBiJgEHQJ6V1BIycelFX+qsUXDju3XHoVN+g==", + "version": "1.1098.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1098.0.tgz", + "integrity": "sha512-pxGJrkuDd62oNiGnKHKnx3LaNvylrWfj5T6IEKlE/njVrp4K/khVmiSqjt4wh3EcgU3R27Zk8pOqivhB8fwKkA==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 96c5401e..6c54f7e5 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.1096.0", + "@seamapi/types": "1.1098.0", "change-case": "^5.4.4", "execa": "^10.0.1", "prettier": "^3.9.6" From 2b448b5b038635a9e22317a4afabd807f89c74ed Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Tue, 6 Oct 2026 03:44:51 +0000 Subject: [PATCH 2/2] ci: Generate code --- src/Resources/Space.php | 105 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) diff --git a/src/Resources/Space.php b/src/Resources/Space.php index b93e0512..7dc64e8a 100644 --- a/src/Resources/Space.php +++ b/src/Resources/Space.php @@ -18,6 +18,10 @@ public static function from_json(mixed $json): Space|null display_name: $json->display_name ?? null, name: $json->name ?? null, space_id: $json->space_id ?? null, + warnings: array_map( + fn($w) => \Seam\Resources\Space\Warnings::from_json($w), + $json->warnings ?? [], + ), workspace_id: $json->workspace_id ?? null, customer_data: isset($json->customer_data) ? \Seam\Resources\Space\CustomerData::from_json( @@ -59,6 +63,12 @@ public function __construct( * ID of the space. */ public string|null $space_id, + /** + * Warnings associated with the space. + * + * @var list<\Seam\Resources\Space\Warnings> + */ + public array $warnings, /** * ID of the workspace associated with the space. */ @@ -149,4 +159,99 @@ public function __construct( public float|null $longitude, ) {} } + + /** + * Warnings associated with the space. Known warning_code values use subclasses; unknown values use this base class and retain their raw discriminator. + */ + class Warnings + { + public static function from_json(mixed $json): Warnings|null + { + if (!$json) { + return null; + } + $discriminant = is_string($json->warning_code ?? null) + ? \Seam\Resources\Space\Warnings\WarningCode::tryFrom( + $json->warning_code, + ) + : null; + + return match ($discriminant) { + \Seam\Resources\Space\Warnings\WarningCode::BEING_DELETED + => \Seam\Resources\Space\Warnings\BeingDeleted::from_json( + $json, + ), + default => new self( + created_at: $json->created_at ?? null, + message: $json->message ?? null, + warning_code: $json->warning_code ?? null, + ), + }; + } + + public function __construct( + /** + * Date and time at which Seam created the warning. + */ + public string|null $created_at, + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ + public string|null $message, + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + * + * @var value-of<\Seam\Resources\Space\Warnings\WarningCode>|string|null + */ + public string|null $warning_code, + ) {} + } +} + +namespace Seam\Resources\Space\Warnings { + /** + * Indicates that the space is being deleted. Seam removes it, revokes its access grants, and detaches its devices and entrances shortly. + */ + final class BeingDeleted extends \Seam\Resources\Space\Warnings + { + public static function from_json(mixed $json): BeingDeleted|null + { + if (!$json) { + return null; + } + return new self( + created_at: $json->created_at ?? null, + message: $json->message ?? null, + warning_code: $json->warning_code ?? null, + ); + } + + public function __construct( + /** + * Date and time at which Seam created the warning. + */ + string|null $created_at, + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ + string|null $message, + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + * + * @var value-of<\Seam\Resources\Space\Warnings\WarningCode>|string|null + */ + string|null $warning_code, + ) { + parent::__construct( + created_at: $created_at, + message: $message, + warning_code: $warning_code, + ); + } + } + + enum WarningCode: string + { + case BEING_DELETED = "being_deleted"; + } }