From a319a2be3d8debbf0c8d97713e27a262ef8c05f7 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 19 Aug 2026 21:22:25 +0000 Subject: [PATCH] fix: Emit resource constructor parameters required first Resource constructor parameters were ordered by property name alone, so an optional property, one carrying a null default, could be declared ahead of a required one. PHP deprecates that ordering, which made every optional default inert, and PHP 9 is expected to make it fatal. Loading the resource classmap emitted 409 E_DEPRECATED notices across 26 of the 32 files. None of the tooling saw them: psalm and phpunit both exclude src/Resources, and phpunit routes deprecations to a channel failOnWarning does not cover, so the suite stayed green through all of them. Nor is it only cosmetic. composer lint:syntax shells out to php -l, so it fails on any host whose error_reporting includes E_DEPRECATED, which is PHP's own default when no php.ini is loaded. Emit required properties first and optional ones after, alphabetical within each group, the same shape the route generator already produces for endpoint parameters. Which properties are required stays the blueprint's call, read from isOptional, rather than being flattened by giving everything a default. from_json passes every value by name, so it is unaffected. Turn on failOnDeprecation so this cannot come back unnoticed. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01HH3wdHh4Y6Wjyc5uHwk5iG --- MIGRATION.md | 41 +++-- codegen/lib/layouts/resource.ts | 18 +- phpunit.xml.dist | 1 + src/Resources/AccessCode.php | 100 +++++------ src/Resources/AccessGrant.php | 72 ++++---- src/Resources/AccessMethod.php | 72 ++++---- src/Resources/AcsAccessGroup.php | 24 +-- src/Resources/AcsCredential.php | 64 +++---- src/Resources/AcsEntrance.php | 48 ++--- src/Resources/AcsSystem.php | 72 ++++---- src/Resources/AcsUser.php | 80 ++++----- src/Resources/ActionAttempt.php | 134 +++++++------- src/Resources/ClientSession.php | 16 +- src/Resources/ConnectWebview.php | 8 +- src/Resources/ConnectedAccount.php | 56 +++--- src/Resources/Device.php | 228 ++++++++++++------------ src/Resources/DeviceProvider.php | 32 ++-- src/Resources/Event.php | 228 ++++++++++++------------ src/Resources/InstantKey.php | 16 +- src/Resources/NoiseThreshold.php | 8 +- src/Resources/Phone.php | 8 +- src/Resources/Space.php | 32 ++-- src/Resources/ThermostatSchedule.php | 16 +- src/Resources/UnmanagedAccessCode.php | 84 ++++----- src/Resources/UnmanagedAccessGrant.php | 48 ++--- src/Resources/UnmanagedAccessMethod.php | 48 ++--- src/Resources/UnmanagedDevice.php | 152 ++++++++-------- src/Resources/Webhook.php | 16 +- src/Resources/Workspace.php | 8 +- 29 files changed, 878 insertions(+), 852 deletions(-) diff --git a/MIGRATION.md b/MIGRATION.md index 6180f024..87b0926e 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -14,19 +14,20 @@ composer require "seamapi/seam:^4" ## Summary of breaking changes -| Change | Affects you if... | -| ------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| [PHP 8.2+ required](#php-82-or-later-is-required) | You run PHP 8.0 or 8.1 | -| [`Seam\Seam` replaces `Seam\SeamClient`](#seamseam-replaces-seamseamclient) | You construct the client (everyone) | -| [`$seam->client` is the Guzzle client](#seam-client-is-the-guzzle-client) | You use `$seam->client`, `$seam->request()`, or the removed public properties | -| [Requests are retried and time out sooner](#requests-are-retried-and-time-out-sooner) | You depend on requests never being retried, or on the 60-second timeout | -| [`poll_until_ready` is replaced](#poll_until_ready-is-replaced-by-wait_for_action_attempt) | You call `$seam->action_attempts->poll_until_ready()` or rely on its 20 s/0.4 s timing | -| [Nested resource classes are namespaced](#nested-resource-classes-are-namespaced) | You type-hint nested classes such as `Seam\Resources\DeviceProperties` | -| [Missing required parameters fail locally](#missing-required-parameters-fail-locally) | You call endpoints with missing parameters and rely on the server's 400 response | -| [Preferred HTTP methods and URL search params](#endpoints-use-preferred-http-methods) | You inspect traffic in a proxy, mock server, or firewall rules | -| [Error handling refinements](#error-handling-refinements) | You compare `getRequestId()` to `""`, or depend on 3xx responses passing through | -| [Pagination metadata is a `Seam\Pagination`](#pagination-metadata-is-a-typed-object) | You treat the paginator's metadata as a `stdClass` | -| [`Seam\Version` replaces `Seam\Utils\PackageVersion`](#seamversion-replaces-packageversion) | You read the package version programmatically | +| Change | Affects you if... | +| ------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| [PHP 8.2+ required](#php-82-or-later-is-required) | You run PHP 8.0 or 8.1 | +| [`Seam\Seam` replaces `Seam\SeamClient`](#seamseam-replaces-seamseamclient) | You construct the client (everyone) | +| [`$seam->client` is the Guzzle client](#seam-client-is-the-guzzle-client) | You use `$seam->client`, `$seam->request()`, or the removed public properties | +| [Requests are retried and time out sooner](#requests-are-retried-and-time-out-sooner) | You depend on requests never being retried, or on the 60-second timeout | +| [`poll_until_ready` is replaced](#poll_until_ready-is-replaced-by-wait_for_action_attempt) | You call `$seam->action_attempts->poll_until_ready()` or rely on its 20 s/0.4 s timing | +| [Nested resource classes are namespaced](#nested-resource-classes-are-namespaced) | You type-hint nested classes such as `Seam\Resources\DeviceProperties` | +| [Resource constructors take required properties first](#resource-constructors-take-required-properties-first) | You construct a resource positionally rather than with named arguments | +| [Missing required parameters fail locally](#missing-required-parameters-fail-locally) | You call endpoints with missing parameters and rely on the server's 400 response | +| [Preferred HTTP methods and URL search params](#endpoints-use-preferred-http-methods) | You inspect traffic in a proxy, mock server, or firewall rules | +| [Error handling refinements](#error-handling-refinements) | You compare `getRequestId()` to `""`, or depend on 3xx responses passing through | +| [Pagination metadata is a `Seam\Pagination`](#pagination-metadata-is-a-typed-object) | You treat the paginator's metadata as a `stdClass` | +| [`Seam\Version` replaces `Seam\Utils\PackageVersion`](#seamversion-replaces-packageversion) | You read the package version programmatically | ## PHP 8.2 or later is required @@ -131,6 +132,20 @@ This rename also fixes a class of bugs where two nested shapes competed for one Property reads are unaffected — only explicit references to the nested class names need updating. +## Resource constructors take required properties first + +In v3, resource constructor parameters were ordered by property name alone. In v4 required properties come first and optional ones follow, alphabetical within each group. + +```php +// v3 +new Seam\Resources\AcsUser($access_schedule, $acs_system_id, ...); + +// v4 +new Seam\Resources\AcsUser($acs_system_id, $acs_user_id, ..., access_schedule: $schedule); +``` + +This affects only positional construction. Reading properties and `from_json` are unaffected. Construct resources with [named arguments](https://www.php.net/manual/en/functions.arguments.php#functions.named-arguments). + ## Missing required parameters fail locally In v3, every endpoint parameter defaulted to `null`, so a call missing a required parameter was sent to the server and failed with `Seam\HttpInvalidInputError` after a round trip. In v4, required parameters have no default, so PHP itself rejects the call with an `ArgumentCountError` (or an `Error` for a missing named argument). Endpoints that require _at least one_ of their parameters throw `InvalidArgumentException` when called with none: diff --git a/codegen/lib/layouts/resource.ts b/codegen/lib/layouts/resource.ts index f192cdfa..03ea8c16 100644 --- a/codegen/lib/layouts/resource.ts +++ b/codegen/lib/layouts/resource.ts @@ -3,9 +3,10 @@ // into one braced namespace block per namespace. Each class contributes its // from_json body lines and constructor parameter lines. // -// The blueprint does not track which resource properties are required, so -// every property is optional: from_json falls back to null for missing values -// and the constructor parameters are nullable. +// Whether a property is required is carried on isOptional: an optional one +// gets a null default, a required one does not. Constructor parameters are +// emitted required first, since PHP deprecates an optional parameter +// declared before a required one. import type { ResourceClassProperty, @@ -105,16 +106,25 @@ const getClassLayoutContext = ( a.name.localeCompare(b.name), ) + const parameterOrder = sortRequiredFirst(sorted) + return { className: schema.name, description: schema.description, isDeprecated: schema.isDeprecated, deprecationMessage: schema.deprecationMessage, fromJsonProps: sorted.map(generateFromJsonProp), - constructorParams: sorted.map(generateConstructorParam), + constructorParams: parameterOrder.map(generateConstructorParam), } } +const sortRequiredFirst = ( + properties: ResourceClassProperty[], +): ResourceClassProperty[] => [ + ...properties.filter(({ isOptional }) => !isOptional), + ...properties.filter(({ isOptional }) => isOptional), +] + export const setResourceLayoutContext = ( resource: ResourceSchema, ): ResourceLayoutContext => { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index f29c67a2..d086a803 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -6,6 +6,7 @@ cacheDirectory=".phpunit.cache" colors="true" beStrictAboutTestsThatDoNotTestAnything="true" + failOnDeprecation="true" failOnRisky="true" failOnWarning="true" > diff --git a/src/Resources/AccessCode.php b/src/Resources/AccessCode.php index b003257f..bbdb20bc 100644 --- a/src/Resources/AccessCode.php +++ b/src/Resources/AccessCode.php @@ -87,22 +87,10 @@ public function __construct( * Unique identifier for the device associated with the access code. */ public string|null $device_id, - /** - * Metadata for a dormakaba Oracode managed access code. Only present for access codes from dormakaba Oracode devices. - */ - public AccessCode\DormakabaOracodeMetadata|null $dormakaba_oracode_metadata = null, - /** - * Date and time after which the time-bound access code becomes inactive. - */ - public string|null $ends_at = null, /** * Errors associated with the [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). */ public array $errors, - /** - * Indicates whether the access code is a backup code. - */ - public bool|null $is_backup = null, /** * Indicates whether a backup access code is available for use if the primary access code is lost or compromised. */ @@ -123,14 +111,6 @@ public function __construct( * Indicates whether the access code can only be used once. If `true`, the code becomes invalid after the first use. */ public bool|null $is_one_time_use, - /** - * Indicates whether the code is set on the device according to a preconfigured schedule. - */ - public bool|null $is_scheduled_on_device = null, - /** - * Indicates whether the access code is waiting for a code assignment. - */ - public bool|null $is_waiting_for_code_assignment = null, /** * Name of the access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). */ @@ -139,14 +119,6 @@ public function __construct( * Collection of pending mutations for the access code. Indicates changes that Seam is in the process of pushing to the device. */ public array $pending_mutations, - /** - * Identifier of the pulled backup access code. Used to associate the pulled backup access code with the original access code. - */ - public string|null $pulled_backup_access_code_id = null, - /** - * Date and time at which the time-bound access code becomes active. - */ - public string|null $starts_at = null, /** * 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). */ @@ -163,6 +135,34 @@ public function __construct( * Unique identifier for the Seam workspace associated with the access code. */ public string|null $workspace_id, + /** + * Metadata for a dormakaba Oracode managed access code. Only present for access codes from dormakaba Oracode devices. + */ + public AccessCode\DormakabaOracodeMetadata|null $dormakaba_oracode_metadata = null, + /** + * Date and time after which the time-bound access code becomes inactive. + */ + public string|null $ends_at = null, + /** + * Indicates whether the access code is a backup code. + */ + public bool|null $is_backup = null, + /** + * Indicates whether the code is set on the device according to a preconfigured schedule. + */ + public bool|null $is_scheduled_on_device = null, + /** + * Indicates whether the access code is waiting for a code assignment. + */ + public bool|null $is_waiting_for_code_assignment = null, + /** + * Identifier of the pulled backup access code. Used to associate the pulled backup access code with the original access code. + */ + public string|null $pulled_backup_access_code_id = null, + /** + * Date and time at which the time-bound access code becomes active. + */ + public string|null $starts_at = null, ) {} } } @@ -258,14 +258,6 @@ public static function from_json(mixed $json): Errors|null } public function __construct( - /** - * Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. - */ - public string|null $change_type = null, - /** - * Date and time at which Seam created the error. - */ - public string|null $created_at = null, /** * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */ @@ -274,20 +266,28 @@ public function __construct( * Indicates that this is an access code error. */ public true|null $is_access_code_error, + public bool|null $is_connected_account_error, + public bool|null $is_device_error, + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ + public string|null $message, + /** + * Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. + */ + public string|null $change_type = null, + /** + * Date and time at which Seam created the error. + */ + public string|null $created_at = null, /** * Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge). */ public bool|null $is_bridge_error = null, - public bool|null $is_connected_account_error, - public bool|null $is_device_error, /** * ID of the managed access code that conflicts with this managed access code, when Seam can identify it. */ public string|null $managed_access_code_id = null, - /** - * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - */ - public string|null $message, /** * List of fields that were changed externally, with their previous and new values. */ @@ -365,6 +365,14 @@ public static function from_json(mixed $json): Warnings|null } public function __construct( + /** + * 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. + */ + public string|null $warning_code, /** * Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. */ @@ -373,18 +381,10 @@ public function __construct( * Date and time at which Seam created the warning. */ public string|null $created_at = null, - /** - * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - */ - public string|null $message, /** * List of fields that were changed externally, with their previous and new values. */ public array|null $modified_fields = null, - /** - * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - */ - public string|null $warning_code, ) {} } } diff --git a/src/Resources/AccessGrant.php b/src/Resources/AccessGrant.php index 9d2d9448..c2b7ae5c 100644 --- a/src/Resources/AccessGrant.php +++ b/src/Resources/AccessGrant.php @@ -53,26 +53,14 @@ public function __construct( * ID of the Access Grant. */ public string|null $access_grant_id, - /** - * Unique key for the access grant within the workspace. - */ - public string|null $access_grant_key = null, /** * IDs of the access methods created for the Access Grant. */ public array|null $access_method_ids, - /** - * Client Session Token. Only returned if the Access Grant has a mobile_key access method. - */ - public string|null $client_session_token = null, /** * Date and time at which the Access Grant was created. */ public string|null $created_at, - /** - * ID of the customization profile associated with the Access Grant. - */ - public string|null $customization_profile_id = null, /** * Display name of the Access Grant. */ @@ -85,10 +73,6 @@ public function __construct( * Errors associated with the [access grant](https://docs.seam.co/use-cases/granting-access). */ public array $errors, - /** - * Instant Key URL. Only returned if the Access Grant has a single mobile_key access_method. - */ - public string|null $instant_key_url = null, /** * @deprecated Use `space_ids`. */ @@ -105,10 +89,6 @@ public function __construct( * Access methods that the user requested for the Access Grant. */ public array $requested_access_methods, - /** - * Reservation key for the access grant. - */ - public string|null $reservation_key = null, /** * IDs of the spaces to which the Access Grant gives access. */ @@ -129,6 +109,26 @@ public function __construct( * ID of the Seam workspace associated with the Access Grant. */ public string|null $workspace_id, + /** + * Unique key for the access grant within the workspace. + */ + public string|null $access_grant_key = null, + /** + * Client Session Token. Only returned if the Access Grant has a mobile_key access method. + */ + public string|null $client_session_token = null, + /** + * ID of the customization profile associated with the Access Grant. + */ + public string|null $customization_profile_id = null, + /** + * Instant Key URL. Only returned if the Access Grant has a single mobile_key access_method. + */ + public string|null $instant_key_url = null, + /** + * Reservation key for the access grant. + */ + public string|null $reservation_key = null, ) {} } } @@ -239,10 +239,6 @@ public static function from_json( } public function __construct( - /** - * Specific PIN code to use for this access method. Only applicable when mode is 'code'. - */ - public string|null $code = null, /** * IDs of the access methods created for the requested access method. */ @@ -255,14 +251,18 @@ public function __construct( * Display name of the access method. */ public string|null $display_name, - /** - * Maximum number of times the instant key can be used. Only applicable when mode is 'mobile_key'. Defaults to 1 if not specified. - */ - public int|null $instant_key_max_use_count = null, /** * Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. */ public string|null $mode, + /** + * Specific PIN code to use for this access method. Only applicable when mode is 'code'. + */ + public string|null $code = null, + /** + * Maximum number of times the instant key can be used. Only applicable when mode is 'mobile_key'. Defaults to 1 if not specified. + */ + public int|null $instant_key_max_use_count = null, ) {} } @@ -302,10 +302,6 @@ public function __construct( */ public string|null $created_at, public string|null $device_id, - /** - * Devices whose access codes could not be revoked during reconciliation. Present when the provider does not support revoking an offline access code (e.g. Dormakaba oracode with exhausted override budget). - */ - public array|null $failed_devices = null, /** * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */ @@ -326,6 +322,10 @@ public function __construct( * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ public string|null $warning_code, + /** + * Devices whose access codes could not be revoked during reconciliation. Present when the provider does not support revoking an offline access code (e.g. Dormakaba oracode with exhausted override budget). + */ + public array|null $failed_devices = null, ) {} } } @@ -377,10 +377,6 @@ public static function from_json(mixed $json): To|null } public function __construct( - /** - * Common code key to ensure PIN code reuse across devices. - */ - public string|null $common_code_key = null, /** * New device IDs where access codes should be created. */ @@ -393,6 +389,10 @@ public function __construct( * New start time for access. */ public string|null $starts_at, + /** + * Common code key to ensure PIN code reuse across devices. + */ + public string|null $common_code_key = null, ) {} } } diff --git a/src/Resources/AccessMethod.php b/src/Resources/AccessMethod.php index f7946c5b..f6ae0845 100644 --- a/src/Resources/AccessMethod.php +++ b/src/Resources/AccessMethod.php @@ -48,22 +48,10 @@ public function __construct( * ID of the access method. */ public string|null $access_method_id, - /** - * Token of the client session associated with the access method. - */ - public string|null $client_session_token = null, - /** - * The actual PIN code for code access methods. - */ - public string|null $code = null, /** * Date and time at which the access method was created. */ public string|null $created_at, - /** - * ID of the customization profile associated with the access method. - */ - public string|null $customization_profile_id = null, /** * Display name of the access method. */ @@ -72,30 +60,10 @@ public function __construct( * Errors associated with the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). */ public array $errors, - /** - * URL of the Instant Key for mobile key access methods. - */ - public string|null $instant_key_url = null, - /** - * Indicates whether an existing card credential must be assigned to this access method before it can be issued. Only applies to card-mode access methods on systems that support credential assignment. - */ - public bool|null $is_assignment_required = null, - /** - * Indicates whether encoding with an card encoder is required to issue or reissue the plastic card associated with the access method. - */ - public bool|null $is_encoding_required = null, /** * Indicates whether the access method has been issued. */ public bool|null $is_issued, - /** - * Indicates whether the access method is ready for card assignment. This is true when the access method is in card mode, has not yet been issued, and the system supports credential assignment. - */ - public bool|null $is_ready_for_assignment = null, - /** - * Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued. - */ - public bool|null $is_ready_for_encoding = null, /** * Date and time at which the access method was issued. */ @@ -116,6 +84,38 @@ public function __construct( * ID of the Seam workspace associated with the access method. */ public string|null $workspace_id, + /** + * Token of the client session associated with the access method. + */ + public string|null $client_session_token = null, + /** + * The actual PIN code for code access methods. + */ + public string|null $code = null, + /** + * ID of the customization profile associated with the access method. + */ + public string|null $customization_profile_id = null, + /** + * URL of the Instant Key for mobile key access methods. + */ + public string|null $instant_key_url = null, + /** + * Indicates whether an existing card credential must be assigned to this access method before it can be issued. Only applies to card-mode access methods on systems that support credential assignment. + */ + public bool|null $is_assignment_required = null, + /** + * Indicates whether encoding with an card encoder is required to issue or reissue the plastic card associated with the access method. + */ + public bool|null $is_encoding_required = null, + /** + * Indicates whether the access method is ready for card assignment. This is true when the access method is in card mode, has not yet been issued, and the system supports credential assignment. + */ + public bool|null $is_ready_for_assignment = null, + /** + * Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued. + */ + public bool|null $is_ready_for_encoding = null, ) {} } } @@ -220,14 +220,14 @@ public function __construct( * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */ public string|null $message, - /** - * ID of the original access method from which this backup access method was split, if applicable. - */ - public string|null $original_access_method_id = null, /** * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ public string|null $warning_code, + /** + * ID of the original access method from which this backup access method was split, if applicable. + */ + public string|null $original_access_method_id = null, ) {} } } diff --git a/src/Resources/AcsAccessGroup.php b/src/Resources/AcsAccessGroup.php index 9507728e..fb38046e 100644 --- a/src/Resources/AcsAccessGroup.php +++ b/src/Resources/AcsAccessGroup.php @@ -59,10 +59,6 @@ public function __construct( * @deprecated Use `external_type_display_name`. */ public string|null $access_group_type_display_name, - /** - * `starts_at` and `ends_at` timestamps for the access group's access. - */ - public AcsAccessGroup\AccessSchedule|null $access_schedule = null, /** * ID of the access group. */ @@ -115,6 +111,10 @@ public function __construct( * ID of the workspace that contains the access group. */ public string|null $workspace_id, + /** + * `starts_at` and `ends_at` timestamps for the access group's access. + */ + public AcsAccessGroup\AccessSchedule|null $access_schedule = null, ) {} } } @@ -293,14 +293,14 @@ public function __construct( * Ending time for the access schedule. */ public string|null $ends_at, - /** - * Name of the access group. - */ - public string|null $name = null, /** * Starting time for the access schedule. */ public string|null $starts_at, + /** + * Name of the access group. + */ + public string|null $name = null, ) {} } @@ -333,14 +333,14 @@ public function __construct( * Ending time for the access schedule. */ public string|null $ends_at, - /** - * Name of the access group. - */ - public string|null $name = null, /** * Starting time for the access schedule. */ public string|null $starts_at, + /** + * Name of the access group. + */ + public string|null $name = null, ) {} } } diff --git a/src/Resources/AcsCredential.php b/src/Resources/AcsCredential.php index 9ae96219..e18bc0bc 100644 --- a/src/Resources/AcsCredential.php +++ b/src/Resources/AcsCredential.php @@ -84,14 +84,42 @@ public function __construct( * ID of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). */ public string|null $acs_credential_id, - /** - * ID of the credential pool to which the credential belongs. - */ - public string|null $acs_credential_pool_id = null, /** * ID of the [access control system](https://docs.seam.co/low-level-apis/access-systems) that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). */ public string|null $acs_system_id, + /** + * ID of the [connected account](https://docs.seam.co/core-concepts/connected-accounts) to which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. + */ + public string|null $connected_account_id, + /** + * Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was created. + */ + public string|null $created_at, + /** + * Display name that corresponds to the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. + */ + public string|null $display_name, + /** + * Errors associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ + public array $errors, + /** + * Indicates whether Seam manages the credential. + */ + public true|null $is_managed, + /** + * Warnings associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ + public array $warnings, + /** + * ID of the workspace that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ + public string|null $workspace_id, + /** + * ID of the credential pool to which the credential belongs. + */ + public string|null $acs_credential_pool_id = null, /** * ID of the [ACS user](https://docs.seam.co/low-level-apis/access-systems/user-management) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. */ @@ -112,26 +140,10 @@ public function __construct( * Access (PIN) code for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). */ public string|null $code = null, - /** - * ID of the [connected account](https://docs.seam.co/core-concepts/connected-accounts) to which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. - */ - public string|null $connected_account_id, - /** - * Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was created. - */ - public string|null $created_at, - /** - * Display name that corresponds to the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. - */ - public string|null $display_name, /** * Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) validity ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. */ public string|null $ends_at = null, - /** - * Errors associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - */ - public array $errors, /** * Brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. */ @@ -148,10 +160,6 @@ public function __construct( * Indicates whether the latest state of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) has been synced from Seam to the provider. */ public bool|null $is_latest_desired_state_synced_with_provider = null, - /** - * Indicates whether Seam manages the credential. - */ - public true|null $is_managed, /** * Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) is a [multi-phone sync credential](https://docs.seam.co/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials). */ @@ -184,14 +192,6 @@ public function __construct( * Visionline-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). */ public AcsCredential\VisionlineMetadata|null $visionline_metadata = null, - /** - * Warnings associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - */ - public array $warnings, - /** - * ID of the workspace that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - */ - public string|null $workspace_id, ) {} } } diff --git a/src/Resources/AcsEntrance.php b/src/Resources/AcsEntrance.php index 9c20b698..116c81c7 100644 --- a/src/Resources/AcsEntrance.php +++ b/src/Resources/AcsEntrance.php @@ -110,6 +110,30 @@ public function __construct( * ID of the [access control system](https://docs.seam.co/low-level-apis/access-systems) that contains the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). */ public string|null $acs_system_id, + /** + * ID of the [connected account](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ + public string|null $connected_account_id, + /** + * Date and time at which the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) was created. + */ + public string|null $created_at, + /** + * Display name for the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ + public string|null $display_name, + /** + * Errors associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ + public array $errors, + /** + * IDs of the spaces that the entrance is in. + */ + public array|null $space_ids, + /** + * Warnings associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ + public array $warnings, /** * Akiles-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). */ @@ -146,18 +170,6 @@ public function __construct( * Indicates whether the ACS entrance can be unlocked with mobile key credentials. */ public bool|null $can_unlock_with_mobile_key = null, - /** - * ID of the [connected account](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - */ - public string|null $connected_account_id, - /** - * Date and time at which the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) was created. - */ - public string|null $created_at, - /** - * Display name for the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - */ - public string|null $display_name, /** * dormakaba Ambiance-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). */ @@ -166,10 +178,6 @@ public function __construct( * dormakaba Community-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). */ public AcsEntrance\DormakabaCommunityMetadata|null $dormakaba_community_metadata = null, - /** - * Errors associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - */ - public array $errors, /** * Hotek-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). */ @@ -190,18 +198,10 @@ public function __construct( * Salto Space-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). */ public AcsEntrance\SaltoSpaceMetadata|null $salto_space_metadata = null, - /** - * IDs of the spaces that the entrance is in. - */ - public array|null $space_ids, /** * Visionline-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). */ public AcsEntrance\VisionlineMetadata|null $visionline_metadata = null, - /** - * Warnings associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - */ - public array $warnings, ) {} } } diff --git a/src/Resources/AcsSystem.php b/src/Resources/AcsSystem.php index 642d242d..2bbc80c4 100644 --- a/src/Resources/AcsSystem.php +++ b/src/Resources/AcsSystem.php @@ -55,18 +55,10 @@ public static function from_json(mixed $json): AcsSystem|null } public function __construct( - /** - * Number of access groups in the [access control system](https://docs.seam.co/low-level-apis/access-systems). - */ - public float|null $acs_access_group_count = null, /** * ID of the [access control system](https://docs.seam.co/low-level-apis/access-systems). */ public string|null $acs_system_id, - /** - * Number of users in the [access control system](https://docs.seam.co/low-level-apis/access-systems). - */ - public float|null $acs_user_count = null, /** * ID of the connected account associated with the [access control system](https://docs.seam.co/low-level-apis/access-systems). */ @@ -81,22 +73,10 @@ public function __construct( * Date and time at which the [access control system](https://docs.seam.co/low-level-apis/access-systems) was created. */ public string|null $created_at, - /** - * ID of the default credential manager `acs_system` for this [access control system](https://docs.seam.co/low-level-apis/access-systems). - */ - public string|null $default_credential_manager_acs_system_id = null, /** * Errors associated with the [access control system](https://docs.seam.co/low-level-apis/access-systems). */ public array $errors, - /** - * Brand-specific terminology for the [access control system](https://docs.seam.co/low-level-apis/access-systems) type. - */ - public string|null $external_type = null, - /** - * Display name that corresponds to the brand-specific terminology for the [access control system](https://docs.seam.co/low-level-apis/access-systems) type. - */ - public string|null $external_type_display_name = null, /** * Alternative text for the [access control system](https://docs.seam.co/low-level-apis/access-systems) image. */ @@ -117,6 +97,34 @@ public function __construct( * Name of the [access control system](https://docs.seam.co/low-level-apis/access-systems). */ public string|null $name, + /** + * Warnings associated with the [access control system](https://docs.seam.co/low-level-apis/access-systems). + */ + public array $warnings, + /** + * ID of the workspace that contains the [access control system](https://docs.seam.co/low-level-apis/access-systems). + */ + public string|null $workspace_id, + /** + * Number of access groups in the [access control system](https://docs.seam.co/low-level-apis/access-systems). + */ + public float|null $acs_access_group_count = null, + /** + * Number of users in the [access control system](https://docs.seam.co/low-level-apis/access-systems). + */ + public float|null $acs_user_count = null, + /** + * ID of the default credential manager `acs_system` for this [access control system](https://docs.seam.co/low-level-apis/access-systems). + */ + public string|null $default_credential_manager_acs_system_id = null, + /** + * Brand-specific terminology for the [access control system](https://docs.seam.co/low-level-apis/access-systems) type. + */ + public string|null $external_type = null, + /** + * Display name that corresponds to the brand-specific terminology for the [access control system](https://docs.seam.co/low-level-apis/access-systems) type. + */ + public string|null $external_type_display_name = null, /** * @deprecated Use `external_type`. */ @@ -129,14 +137,6 @@ public function __construct( * Visionline-specific metadata for the [access control system](https://docs.seam.co/low-level-apis/access-systems). */ public AcsSystem\VisionlineMetadata|null $visionline_metadata = null, - /** - * Warnings associated with the [access control system](https://docs.seam.co/low-level-apis/access-systems). - */ - public array $warnings, - /** - * ID of the workspace that contains the [access control system](https://docs.seam.co/low-level-apis/access-systems). - */ - public string|null $workspace_id, ) {} } } @@ -169,14 +169,14 @@ public function __construct( * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */ public string|null $error_code, - /** - * Indicates whether the error is related to the [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge). - */ - public bool|null $is_bridge_error = null, /** * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ public string|null $message, + /** + * Indicates whether the error is related to the [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge). + */ + public bool|null $is_bridge_error = null, ) {} } @@ -262,14 +262,14 @@ public function __construct( * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */ public string|null $message, - /** - * @deprecated this field is deprecated. - */ - public array|null $misconfigured_acs_entrance_ids = null, /** * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ public string|null $warning_code, + /** + * @deprecated this field is deprecated. + */ + public array|null $misconfigured_acs_entrance_ids = null, ) {} } } diff --git a/src/Resources/AcsUser.php b/src/Resources/AcsUser.php index 1f0559e4..4ed77aa4 100644 --- a/src/Resources/AcsUser.php +++ b/src/Resources/AcsUser.php @@ -67,10 +67,6 @@ public static function from_json(mixed $json): AcsUser|null } public function __construct( - /** - * `starts_at` and `ends_at` timestamps for the [access system user's](https://docs.seam.co/low-level-apis/access-systems/user-management) access. - */ - public AcsUser\AccessSchedule|null $access_schedule = null, /** * ID of the [access system](https://docs.seam.co/low-level-apis/access-systems) that contains the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). */ @@ -91,6 +87,26 @@ public function __construct( * Display name for the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). */ public string|null $display_name, + /** + * Errors associated with the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ + public array $errors, + /** + * Indicates whether Seam manages the access system user. + */ + public true|null $is_managed, + /** + * Warnings associated with the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ + public array $warnings, + /** + * ID of the workspace that contains the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ + public string|null $workspace_id, + /** + * `starts_at` and `ends_at` timestamps for the [access system user's](https://docs.seam.co/low-level-apis/access-systems/user-management) access. + */ + public AcsUser\AccessSchedule|null $access_schedule = null, /** * @deprecated use email_address. */ @@ -99,10 +115,6 @@ public function __construct( * Email address of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). */ public string|null $email_address = null, - /** - * Errors associated with the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - */ - public array $errors, /** * Brand-specific terminology for the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) type. */ @@ -119,10 +131,6 @@ public function __construct( * ID of the HID access control system associated with the user. */ public string|null $hid_acs_system_id = null, - /** - * Indicates whether Seam manages the access system user. - */ - public true|null $is_managed, /** * Indicates whether the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) is currently [suspended](https://docs.seam.co/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users). */ @@ -159,14 +167,6 @@ public function __construct( * Phone number of the user identity associated with the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) in E.164 format (for example, `+15555550100`). */ public string|null $user_identity_phone_number = null, - /** - * Warnings associated with the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - */ - public array $warnings, - /** - * ID of the workspace that contains the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - */ - public string|null $workspace_id, ) {} } } @@ -271,15 +271,15 @@ public function __construct( */ public string|null $message, public string|null $mutation_code, - /** - * Optional: When the user creation is scheduled to occur. - */ - public string|null $scheduled_at = null, public PendingMutations\To|null $to, /** * Whether the user is scheduled to be added to or removed from the access group. */ public string|null $variant, + /** + * Optional: When the user creation is scheduled to occur. + */ + public string|null $scheduled_at = null, ) {} } @@ -393,26 +393,26 @@ public function __construct( */ public string|null $acs_credential_id, /** - * Email address of the access system user. + * Starting time for the access schedule. */ - public string|null $email_address = null, + public string|null $ends_at, + public bool|null $is_suspended, /** * Starting time for the access schedule. */ - public string|null $ends_at, + public string|null $starts_at, + /** + * Email address of the access system user. + */ + public string|null $email_address = null, /** * Full name of the access system user. */ public string|null $full_name = null, - public bool|null $is_suspended, /** * Phone number of the access system user. */ public string|null $phone_number = null, - /** - * Starting time for the access schedule. - */ - public string|null $starts_at, ) {} } @@ -445,26 +445,26 @@ public function __construct( */ public string|null $acs_credential_id, /** - * Email address of the access system user. + * Starting time for the access schedule. */ - public string|null $email_address = null, + public string|null $ends_at, + public bool|null $is_suspended, /** * Starting time for the access schedule. */ - public string|null $ends_at, + public string|null $starts_at, + /** + * Email address of the access system user. + */ + public string|null $email_address = null, /** * Full name of the access system user. */ public string|null $full_name = null, - public bool|null $is_suspended, /** * Phone number of the access system user. */ public string|null $phone_number = null, - /** - * Starting time for the access schedule. - */ - public string|null $starts_at, ) {} } } diff --git a/src/Resources/ActionAttempt.php b/src/Resources/ActionAttempt.php index 73dd218a..783e7d1d 100644 --- a/src/Resources/ActionAttempt.php +++ b/src/Resources/ActionAttempt.php @@ -183,14 +183,39 @@ public function __construct( * Corresponding credential data as stored on Seam and the access system. */ public Result\AcsCredentialOnSeam|null $acs_credential_on_seam, - /** - * ID of the credential pool to which the credential belongs. - */ - public string|null $acs_credential_pool_id = null, /** * ID of the [access control system](https://docs.seam.co/low-level-apis/access-systems) that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). */ public string|null $acs_system_id, + /** + * ID of the [connected account](https://docs.seam.co/core-concepts/connected-accounts) to which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. + */ + public string|null $connected_account_id, + public string|null $created_at, + public string|null $display_name, + public array $errors, + /** + * Indicates whether Seam manages the credential. + */ + public bool|null $is_managed, + /** + * Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + */ + public string|null $mode, + /** + * @var array|\stdClass|null + */ + public array|\stdClass|null $noise_threshold, + /** + * Pending mutations for the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). Indicates operations that are in progress. + */ + public array $pending_mutations, + public array $warnings, + public string|null $workspace_id, + /** + * ID of the credential pool to which the credential belongs. + */ + public string|null $acs_credential_pool_id = null, /** * ID of the [ACS user](https://docs.seam.co/low-level-apis/access-systems/user-management) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. */ @@ -212,21 +237,14 @@ public function __construct( */ public string|null $client_session_token = null, public string|null $code = null, - /** - * ID of the [connected account](https://docs.seam.co/core-concepts/connected-accounts) to which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. - */ - public string|null $connected_account_id, - public string|null $created_at, /** * ID of the customization profile associated with the access method. */ public string|null $customization_profile_id = null, - public string|null $display_name, /** * Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) validity ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. */ public string|null $ends_at = null, - public array $errors, /** * Brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. */ @@ -252,10 +270,6 @@ public function __construct( * Indicates whether the latest state of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) has been synced from Seam to the provider. */ public bool|null $is_latest_desired_state_synced_with_provider = null, - /** - * Indicates whether Seam manages the credential. - */ - public bool|null $is_managed, /** * Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) is a [multi-phone sync credential](https://docs.seam.co/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials). */ @@ -277,22 +291,10 @@ public function __construct( * Date and time at which the state of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was most recently synced from Seam to the provider. */ public string|null $latest_desired_state_synced_with_provider_at = null, - /** - * Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. - */ - public string|null $mode, - /** - * @var array|\stdClass|null - */ - public array|\stdClass|null $noise_threshold, /** * ID of the parent [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). */ public string|null $parent_acs_credential_id = null, - /** - * Pending mutations for the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). Indicates operations that are in progress. - */ - public array $pending_mutations, /** * Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) validity starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */ @@ -305,9 +307,7 @@ public function __construct( * Visionline-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). */ public Result\VisionlineMetadata|null $visionline_metadata = null, - public array $warnings, public bool|null $was_confirmed_by_device = null, - public string|null $workspace_id, ) {} } } @@ -443,14 +443,39 @@ public function __construct( * ID of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). */ public string|null $acs_credential_id, - /** - * ID of the credential pool to which the credential belongs. - */ - public string|null $acs_credential_pool_id = null, /** * ID of the [access control system](https://docs.seam.co/low-level-apis/access-systems) that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). */ public string|null $acs_system_id, + /** + * ID of the [connected account](https://docs.seam.co/core-concepts/connected-accounts) to which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. + */ + public string|null $connected_account_id, + /** + * Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was created. + */ + public string|null $created_at, + /** + * Display name that corresponds to the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. + */ + public string|null $display_name, + /** + * Errors associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ + public array $errors, + public bool|null $is_managed, + /** + * Warnings associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ + public array $warnings, + /** + * ID of the workspace that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ + public string|null $workspace_id, + /** + * ID of the credential pool to which the credential belongs. + */ + public string|null $acs_credential_pool_id = null, /** * ID of the [ACS user](https://docs.seam.co/low-level-apis/access-systems/user-management) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. */ @@ -471,26 +496,10 @@ public function __construct( * Access (PIN) code for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). */ public string|null $code = null, - /** - * ID of the [connected account](https://docs.seam.co/core-concepts/connected-accounts) to which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. - */ - public string|null $connected_account_id, - /** - * Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was created. - */ - public string|null $created_at, - /** - * Display name that corresponds to the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. - */ - public string|null $display_name, /** * Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) validity ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. */ public string|null $ends_at = null, - /** - * Errors associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - */ - public array $errors, /** * Brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. */ @@ -507,7 +516,6 @@ public function __construct( * Indicates whether the latest state of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) has been synced from Seam to the provider. */ public bool|null $is_latest_desired_state_synced_with_provider = null, - public bool|null $is_managed, /** * Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) is a [multi-phone sync credential](https://docs.seam.co/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials). */ @@ -540,14 +548,6 @@ public function __construct( * Visionline-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). */ public AcsCredentialOnSeam\VisionlineMetadata|null $visionline_metadata = null, - /** - * Warnings associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - */ - public array $warnings, - /** - * ID of the workspace that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - */ - public string|null $workspace_id, ) {} } @@ -786,6 +786,11 @@ public function __construct( * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */ public string|null $message, + public string|null $warning_code, + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ + public string|null $warning_message, /** * The PIN code that was assigned instead. */ @@ -798,11 +803,6 @@ public function __construct( * The originally requested PIN code that could not be used. */ public string|null $original_code = null, - public string|null $warning_code, - /** - * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - */ - public string|null $warning_message, ) {} } } @@ -1073,6 +1073,10 @@ public function __construct( * 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. + */ + public string|null $warning_code, /** * The PIN code that was assigned instead. */ @@ -1081,10 +1085,6 @@ public function __construct( * The originally requested PIN code that could not be used. */ public string|null $original_code = null, - /** - * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - */ - public string|null $warning_code, ) {} } } diff --git a/src/Resources/ClientSession.php b/src/Resources/ClientSession.php index 88083915..f481f7c6 100644 --- a/src/Resources/ClientSession.php +++ b/src/Resources/ClientSession.php @@ -52,10 +52,6 @@ public function __construct( * Date and time at which the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) was created. */ public string|null $created_at, - /** - * Customer key associated with the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). - */ - public string|null $customer_key = null, /** * Number of devices associated with the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). */ @@ -72,10 +68,6 @@ public function __construct( * Your user ID for the user associated with the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). */ public string|null $user_identifier_key, - /** - * ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) associated with the client session. - */ - public string|null $user_identity_id = null, /** * IDs of the [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) associated with the client session. * @@ -86,6 +78,14 @@ public function __construct( * ID of the workspace associated with the client session. */ public string|null $workspace_id, + /** + * Customer key associated with the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). + */ + public string|null $customer_key = null, + /** + * ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) associated with the client session. + */ + public string|null $user_identity_id = null, ) {} } } diff --git a/src/Resources/ConnectWebview.php b/src/Resources/ConnectWebview.php index f4cb12d0..494aadc3 100644 --- a/src/Resources/ConnectWebview.php +++ b/src/Resources/ConnectWebview.php @@ -94,10 +94,6 @@ public function __construct( * URL to which the Connect Webview should redirect when the user successfully pairs a device or system. If you do not set the `custom_redirect_failure_url`, the Connect Webview redirects to the `custom_redirect_url` when an unexpected error occurs. */ public string|null $custom_redirect_url, - /** - * The customer key associated with this webview, if any. - */ - public string|null $customer_key = null, /** * Device selection mode of the Connect Webview. Supported values: `none`, `single`, `multiple`. */ @@ -126,6 +122,10 @@ public function __construct( * ID of the workspace that contains the Connect Webview. */ public string|null $workspace_id, + /** + * The customer key associated with this webview, if any. + */ + public string|null $customer_key = null, ) {} } } diff --git a/src/Resources/ConnectedAccount.php b/src/Resources/ConnectedAccount.php index a7f5085c..77d3076f 100644 --- a/src/Resources/ConnectedAccount.php +++ b/src/Resources/ConnectedAccount.php @@ -50,10 +50,6 @@ public function __construct( * List of capabilities that were accepted during the account connection process. */ public array|null $accepted_capabilities, - /** - * Type of connected account. - */ - public string|null $account_type = null, /** * Display name for the connected account type. */ @@ -66,16 +62,32 @@ public function __construct( * ID of the connected account. */ public string|null $connected_account_id, - /** - * Date and time at which the connected account was created. - */ - public string|null $created_at = null, /** * Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. * * @var array|\stdClass|null */ public array|\stdClass|null $custom_metadata, + /** + * Display name for the connected account. + */ + public string|null $display_name, + /** + * Errors associated with the connected account. + */ + public array $errors, + /** + * Warnings associated with the connected account. + */ + public array $warnings, + /** + * Type of connected account. + */ + public string|null $account_type = null, + /** + * Date and time at which the connected account was created. + */ + public string|null $created_at = null, /** * Your unique key for the customer associated with this connected account. */ @@ -88,14 +100,6 @@ public function __construct( * Default reservation check-out time for this connected account, as `HH:mm` (24-hour). Sourced from the connector configuration. */ public string|null $default_checkout_time = null, - /** - * Display name for the connected account. - */ - public string|null $display_name, - /** - * Errors associated with the connected account. - */ - public array $errors, /** * For iCal connected accounts, the platform that produced the feed (for example, `airbnb`, `vrbo`, or `booking`), or `unknown` when it could not be determined. Intended for rendering the source platform's logo. */ @@ -118,10 +122,6 @@ public function __construct( * @deprecated Use `display_name` instead. */ public ConnectedAccount\UserIdentifier|null $user_identifier = null, - /** - * Warnings associated with the connected account. - */ - public array $warnings, ) {} } } @@ -161,14 +161,6 @@ public function __construct( * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */ public string|null $error_code, - /** - * Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge). - */ - public bool|null $is_bridge_error = null, - /** - * Indicates whether the error is related specifically to the connected account. - */ - public bool|null $is_connected_account_error = null, /** * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ @@ -177,6 +169,14 @@ public function __construct( * Salto KS metadata associated with the connected account that has an error. */ public Errors\SaltoKsMetadata|null $salto_ks_metadata, + /** + * Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge). + */ + public bool|null $is_bridge_error = null, + /** + * Indicates whether the error is related specifically to the connected account. + */ + public bool|null $is_connected_account_error = null, ) {} } diff --git a/src/Resources/Device.php b/src/Resources/Device.php index 93bd4b51..ee7ed893 100644 --- a/src/Resources/Device.php +++ b/src/Resources/Device.php @@ -79,6 +79,60 @@ public static function from_json(mixed $json): Device|null } public function __construct( + /** + * Collection of capabilities that the device supports when connected to Seam. Values are `access_code`, which indicates that the device can manage and utilize digital PIN codes for secure access; `lock`, which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; `noise_detection`, which indicates that the device supports monitoring and responding to ambient noise levels; `thermostat`, which indicates that the device can regulate and adjust indoor temperatures; `battery`, which indicates that the device can manage battery life and health; and `phone`, which indicates that the device is a mobile device, such as a smartphone. **Important:** Superseded by [capability flags](https://docs.seam.co/capability-guides/device-and-system-capabilities#capability-flags). + */ + public array|null $capabilities_supported, + /** + * Unique identifier for the account associated with the device. + */ + public string|null $connected_account_id, + /** + * Date and time at which the device object was created. + */ + public string|null $created_at, + /** + * Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. + * + * @var array|\stdClass|null + */ + public array|\stdClass|null $custom_metadata, + /** + * ID of the device. + */ + public string|null $device_id, + /** + * Type of the device. + */ + public string|null $device_type, + /** + * Display name of the device, defaults to nickname (if it is set) or `properties.appearance.name`, otherwise. Enables administrators and users to identify the device easily, especially when there are numerous devices. + */ + public string|null $display_name, + /** + * Array of errors associated with the device. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. + */ + public array $errors, + /** + * Indicates whether Seam manages the device. See also [Managed and Unmanaged Devices](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). + */ + public true|null $is_managed, + /** + * Properties of the device. + */ + public Device\Properties|null $properties, + /** + * IDs of the spaces the device is in. + */ + public array|null $space_ids, + /** + * Array of warnings associated with the device. Each warning object within the array contains two fields: `warning_code` and `message`. `warning_code` is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it. + */ + public array $warnings, + /** + * Unique identifier for the Seam workspace associated with the device. + */ + public string|null $workspace_id, /** * Indicates whether the lock supports configuring automatic locking. */ @@ -159,28 +213,6 @@ public function __construct( * Indicates whether the lock supports unlocking with an access code. */ public bool|null $can_unlock_with_code = null, - /** - * Collection of capabilities that the device supports when connected to Seam. Values are `access_code`, which indicates that the device can manage and utilize digital PIN codes for secure access; `lock`, which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; `noise_detection`, which indicates that the device supports monitoring and responding to ambient noise levels; `thermostat`, which indicates that the device can regulate and adjust indoor temperatures; `battery`, which indicates that the device can manage battery life and health; and `phone`, which indicates that the device is a mobile device, such as a smartphone. **Important:** Superseded by [capability flags](https://docs.seam.co/capability-guides/device-and-system-capabilities#capability-flags). - */ - public array|null $capabilities_supported, - /** - * Unique identifier for the account associated with the device. - */ - public string|null $connected_account_id, - /** - * Date and time at which the device object was created. - */ - public string|null $created_at, - /** - * Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. - * - * @var array|\stdClass|null - */ - public array|\stdClass|null $custom_metadata, - /** - * ID of the device. - */ - public string|null $device_id, /** * Manufacturer of the device. Represents the hardware brand, which may differ from the provider. */ @@ -189,22 +221,6 @@ public function __construct( * Provider of the device. Represents the third-party service through which the device is controlled. */ public Device\DeviceProvider|null $device_provider = null, - /** - * Type of the device. - */ - public string|null $device_type, - /** - * Display name of the device, defaults to nickname (if it is set) or `properties.appearance.name`, otherwise. Enables administrators and users to identify the device easily, especially when there are numerous devices. - */ - public string|null $display_name, - /** - * Array of errors associated with the device. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. - */ - public array $errors, - /** - * Indicates whether Seam manages the device. See also [Managed and Unmanaged Devices](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). - */ - public true|null $is_managed, /** * Location information for the device. */ @@ -213,22 +229,6 @@ public function __construct( * Optional nickname to describe the device, settable through Seam. */ public string|null $nickname = null, - /** - * Properties of the device. - */ - public Device\Properties|null $properties, - /** - * IDs of the spaces the device is in. - */ - public array|null $space_ids, - /** - * Array of warnings associated with the device. Each warning object within the array contains two fields: `warning_code` and `message`. `warning_code` is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it. - */ - public array $warnings, - /** - * Unique identifier for the Seam workspace associated with the device. - */ - public string|null $workspace_id, ) {} } } @@ -256,14 +256,14 @@ public function __construct( * Display name for the manufacturer, such as `August`, `Yale`, `Salto`, and so on. */ public string|null $display_name, - /** - * Image URL for the manufacturer logo. - */ - public string|null $image_url = null, /** * Manufacturer identifier, such as `august`, `yale`, `salto`, and so on. */ public string|null $manufacturer, + /** + * Image URL for the manufacturer logo. + */ + public string|null $image_url = null, ) {} } @@ -294,14 +294,14 @@ public function __construct( * Display name for the device provider type. */ public string|null $display_name, - /** - * Image URL for the device provider. - */ - public string|null $image_url = null, /** * Provider category. Indicates the third-party provider type, such as `stable`, for stable integrations, or `internal`, for internal integrations. */ public string|null $provider_category, + /** + * Image URL for the device provider. + */ + public string|null $image_url = null, ) {} } @@ -335,16 +335,16 @@ public function __construct( * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */ public string|null $error_code, - /** - * Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge). - */ - public bool|null $is_bridge_error = null, public bool|null $is_connected_account_error, public bool|null $is_device_error, /** * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ public string|null $message, + /** + * Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge). + */ + public bool|null $is_bridge_error = null, ) {} } @@ -728,6 +728,24 @@ public static function from_json(mixed $json): Properties|null } public function __construct( + /** + * Appearance-related properties, as reported by the device. + */ + public Properties\Appearance|null $appearance, + /** + * Device model-related properties. + */ + public Properties\Model|null $model, + /** + * Name of the device. + * + * @deprecated use device.display_name instead + */ + public string|null $name, + /** + * Indicates whether the device is online. + */ + public bool|null $online, /** * Accessory keypad properties and state. */ @@ -746,10 +764,6 @@ public function __construct( * Metadata for an Akiles device. */ public Properties\AkilesMetadata|null $akiles_metadata = null, - /** - * Appearance-related properties, as reported by the device. - */ - public Properties\Appearance|null $appearance, /** * Metadata for an Aqara device. */ @@ -990,16 +1004,6 @@ public function __construct( * Metadata for a Minut device. */ public Properties\MinutMetadata|null $minut_metadata = null, - /** - * Device model-related properties. - */ - public Properties\Model|null $model, - /** - * Name of the device. - * - * @deprecated use device.display_name instead - */ - public string|null $name, /** * Metadata for a Google Nest device. */ @@ -1030,10 +1034,6 @@ public function __construct( * Metadata for an Omnitec device. */ public Properties\OmnitecMetadata|null $omnitec_metadata = null, - /** - * Indicates whether the device is online. - */ - public bool|null $online, /** * Indicates whether it is currently possible to use online access codes for the device. * @@ -1227,14 +1227,14 @@ public static function from_json(mixed $json): AccessoryKeypad|null } public function __construct( - /** - * Keypad battery properties. - */ - public AccessoryKeypad\Battery|null $battery = null, /** * Indicates if an accessory keypad is connected to the device. */ public bool|null $is_connected, + /** + * Keypad battery properties. + */ + public AccessoryKeypad\Battery|null $battery = null, ) {} } @@ -1314,6 +1314,14 @@ public static function from_json(mixed $json): Model|null } public function __construct( + /** + * Display name of the device model. + */ + public string|null $display_name, + /** + * Display name that corresponds to the manufacturer-specific terminology for the device. + */ + public string|null $manufacturer_display_name, /** * @deprecated use device.properties.model.can_connect_accessory_keypad */ @@ -1322,18 +1330,10 @@ public function __construct( * Indicates whether the device can connect a accessory keypad. */ public bool|null $can_connect_accessory_keypad = null, - /** - * Display name of the device model. - */ - public string|null $display_name, /** * Indicates whether the device has a built in accessory keypad. */ public bool|null $has_built_in_keypad = null, - /** - * Display name that corresponds to the manufacturer-specific terminology for the device. - */ - public string|null $manufacturer_display_name, /** * @deprecated use device.can_program_offline_access_codes. */ @@ -3320,14 +3320,6 @@ public function __construct( * Errors associated with the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). */ public array $errors, - /** - * Indicates whether a person at the thermostat can change the thermostat's settings after the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts. - */ - public bool|null $is_override_allowed = null, - /** - * Number of minutes for which a person at the thermostat can change the thermostat's settings after the activation of the scheduled [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). See also [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). - */ - public int|null $max_override_period_minutes = null, /** * User-friendly name to identify the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). */ @@ -3344,6 +3336,14 @@ public function __construct( * ID of the workspace that contains the thermostat schedule. */ public string|null $workspace_id, + /** + * Indicates whether a person at the thermostat can change the thermostat's settings after the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts. + */ + public bool|null $is_override_allowed = null, + /** + * Number of minutes for which a person at the thermostat can change the thermostat's settings after the activation of the scheduled [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). See also [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). + */ + public int|null $max_override_period_minutes = null, ) {} } @@ -3403,6 +3403,16 @@ public function __construct( * Unique key to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). */ public string|null $climate_preset_key, + /** + * Display name for the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). + */ + public string|null $display_name, + /** + * Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). + * + * @deprecated Use 'thermostat_schedule.is_override_allowed' + */ + public bool|null $manual_override_allowed, /** * The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. */ @@ -3415,10 +3425,6 @@ public function __construct( * Temperature to which the thermostat should cool (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). */ public float|null $cooling_set_point_fahrenheit = null, - /** - * Display name for the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). - */ - public string|null $display_name, /** * Metadata specific to the Ecobee climate, if applicable. */ @@ -3439,12 +3445,6 @@ public function __construct( * Desired [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. */ public string|null $hvac_mode_setting = null, - /** - * Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). - * - * @deprecated Use 'thermostat_schedule.is_override_allowed' - */ - public bool|null $manual_override_allowed, /** * User-friendly name to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). */ diff --git a/src/Resources/DeviceProvider.php b/src/Resources/DeviceProvider.php index 044ae59c..41b60ac9 100644 --- a/src/Resources/DeviceProvider.php +++ b/src/Resources/DeviceProvider.php @@ -47,6 +47,22 @@ public static function from_json(mixed $json): DeviceProvider|null } public function __construct( + /** + * Name of the device provider. + */ + public string|null $device_provider_name, + /** + * Display name for the device provider. + */ + public string|null $display_name, + /** + * Image URL for the device provider. + */ + public string|null $image_url, + /** + * List of provider categories to which the device provider belongs, such as `stable`, `consumer_smartlocks`, `thermostats`, and so on. + */ + public array|null $provider_categories, /** * Indicates whether the lock supports configuring automatic locking. */ @@ -127,22 +143,6 @@ public function __construct( * Indicates whether the lock supports unlocking with an access code. */ public bool|null $can_unlock_with_code = null, - /** - * Name of the device provider. - */ - public string|null $device_provider_name, - /** - * Display name for the device provider. - */ - public string|null $display_name, - /** - * Image URL for the device provider. - */ - public string|null $image_url, - /** - * List of provider categories to which the device provider belongs, such as `stable`, `consumer_smartlocks`, `thermostats`, and so on. - */ - public array|null $provider_categories, ) {} } } diff --git a/src/Resources/Event.php b/src/Resources/Event.php index d18aa79e..a7119251 100644 --- a/src/Resources/Event.php +++ b/src/Resources/Event.php @@ -149,10 +149,6 @@ public function __construct( */ public array $access_code_errors, public string|null $access_code_id, - /** - * Whether the access code is managed by Seam (true) or unmanaged (false). Only present when access_code_id is set. - */ - public bool|null $access_code_is_managed = null, /** * Warnings associated with the access code. */ @@ -165,14 +161,6 @@ public function __construct( * IDs of the access grants associated with this access method. */ public array|null $access_grant_ids, - /** - * Key of the affected Access Grant (if present). - */ - public string|null $access_grant_key = null, - /** - * Keys of the access grants associated with this access method (if present). - */ - public array|null $access_grant_keys = null, /** * ID of the affected access method. */ @@ -228,14 +216,6 @@ public function __construct( * Battery status of the affected device, calculated from the numeric `battery_level` value. */ public string|null $battery_status, - /** - * Human-readable reason for the change (e.g. `ongoing code auto-renewed`). - */ - public string|null $change_reason = null, - /** - * List of properties that changed on the access code. - */ - public array|null $changed_properties = null, /** * ID of the affected client session. */ @@ -245,11 +225,6 @@ public function __construct( */ public string|null $climate_preset_key, public string|null $code, - public string|null $connect_webview_id = null, - /** - * @var array|\stdClass|null - */ - public array|\stdClass|null $connected_account_custom_metadata = null, /** * Errors associated with the connected account. */ @@ -259,50 +234,24 @@ public function __construct( * Warnings associated with the connected account. */ public array $connected_account_warnings, - /** - * Temperature to which the thermostat should cool (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). - */ - public float|null $cooling_set_point_celsius = null, - /** - * Temperature to which the thermostat should cool (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). - */ - public float|null $cooling_set_point_fahrenheit = null, /** * Date and time at which the event was created. */ public string|null $created_at, - public string|null $customer_key = null, /** * Human-readable description of the change and its source. */ public string|null $description, - /** - * Desired temperature, in °C, defined by the affected thermostat's cooling or heating set point. - */ - public float|null $desired_temperature_celsius = null, - /** - * Desired temperature, in °F, defined by the affected thermostat's cooling or heating set point. - */ - public float|null $desired_temperature_fahrenheit = null, - /** - * @var array|\stdClass|null - */ - public array|\stdClass|null $device_custom_metadata = null, /** * Errors associated with the device. */ public array $device_errors, public string|null $device_id, public array|null $device_ids, - public string|null $device_name = null, /** * Warnings associated with the device. */ public array $device_warnings, - /** - * The new end time for the access grant. - */ - public string|null $ends_at = null, /** * Error code associated with the disconnection event, if any. */ @@ -311,10 +260,6 @@ public function __construct( * Description of why the access methods could not be created. */ public string|null $error_message, - /** - * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - */ - public string|null $event_description = null, /** * ID of the event. */ @@ -323,11 +268,120 @@ public function __construct( * Type of the event. */ public string|null $event_type, + public Event\From|null $from, + /** + * Indicates whether the climate preset that was activated is the fallback climate preset for the thermostat. + */ + public bool|null $is_fallback_climate_preset, + /** + * Lower temperature limit, in °C, defined by the set threshold. + */ + public float|null $lower_limit_celsius, + /** + * Lower temperature limit, in °F, defined by the set threshold. + */ + public float|null $lower_limit_fahrenheit, + public string|null $method, + /** + * Date and time at which the event occurred. + */ + public string|null $occurred_at, + /** + * Array of mutations requested on the access code, each containing the mutation type and from/to values. + */ + public array $requested_mutations, + /** + * ID of the affected space. + */ + public string|null $space_id, + /** + * Status of the action. + */ + public string|null $status, + /** + * Temperature, in °C, reported by the affected thermostat. + */ + public float|null $temperature_celsius, + /** + * Temperature, in °F, reported by the affected thermostat. + */ + public float|null $temperature_fahrenheit, + /** + * ID of the thermostat schedule that prompted the affected climate preset to be activated. + */ + public string|null $thermostat_schedule_id, + public Event\To|null $to, + /** + * Upper temperature limit, in °C, defined by the set threshold. + */ + public float|null $upper_limit_celsius, + /** + * Upper temperature limit, in °F, defined by the set threshold. + */ + public float|null $upper_limit_fahrenheit, + /** + * ID of the workspace associated with the event. + */ + public string|null $workspace_id, + /** + * Whether the access code is managed by Seam (true) or unmanaged (false). Only present when access_code_id is set. + */ + public bool|null $access_code_is_managed = null, + /** + * Key of the affected Access Grant (if present). + */ + public string|null $access_grant_key = null, + /** + * Keys of the access grants associated with this access method (if present). + */ + public array|null $access_grant_keys = null, + /** + * Human-readable reason for the change (e.g. `ongoing code auto-renewed`). + */ + public string|null $change_reason = null, + /** + * List of properties that changed on the access code. + */ + public array|null $changed_properties = null, + public string|null $connect_webview_id = null, + /** + * @var array|\stdClass|null + */ + public array|\stdClass|null $connected_account_custom_metadata = null, + /** + * Temperature to which the thermostat should cool (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + */ + public float|null $cooling_set_point_celsius = null, + /** + * Temperature to which the thermostat should cool (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + */ + public float|null $cooling_set_point_fahrenheit = null, + public string|null $customer_key = null, + /** + * Desired temperature, in °C, defined by the affected thermostat's cooling or heating set point. + */ + public float|null $desired_temperature_celsius = null, + /** + * Desired temperature, in °F, defined by the affected thermostat's cooling or heating set point. + */ + public float|null $desired_temperature_fahrenheit = null, + /** + * @var array|\stdClass|null + */ + public array|\stdClass|null $device_custom_metadata = null, + public string|null $device_name = null, + /** + * The new end time for the access grant. + */ + public string|null $ends_at = null, + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ + public string|null $event_description = null, /** * Desired [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. */ public string|null $fan_mode_setting = null, - public Event\From|null $from, /** * Temperature to which the thermostat should heat (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). */ @@ -345,21 +399,8 @@ public function __construct( * Indicates whether the code is a backup code (only present when mode is 'code' and a backup code was used). */ public bool|null $is_backup_code = null, - /** - * Indicates whether the climate preset that was activated is the fallback climate preset for the thermostat. - */ - public bool|null $is_fallback_climate_preset, public bool|null $is_via_bluetooth = null, public bool|null $is_via_nfc = null, - /** - * Lower temperature limit, in °C, defined by the set threshold. - */ - public float|null $lower_limit_celsius, - /** - * Lower temperature limit, in °F, defined by the set threshold. - */ - public float|null $lower_limit_fahrenheit, - public string|null $method, /** * Metadata from Minut. * @@ -396,22 +437,10 @@ public function __construct( * @var array|\stdClass|null */ public array|\stdClass|null $noiseaware_metadata = null, - /** - * Date and time at which the event occurred. - */ - public string|null $occurred_at, /** * Why access was denied, when the provider reports a determinable cause. Omitted when unknown. */ public Event\Reason|null $reason = null, - /** - * Array of mutations requested on the access code, each containing the mutation type and from/to values. - */ - public array $requested_mutations, - /** - * ID of the affected space. - */ - public string|null $space_id, /** * Unique key for the space within the workspace. */ @@ -420,36 +449,7 @@ public function __construct( * The new start time for the access grant. */ public string|null $starts_at = null, - /** - * Status of the action. - */ - public string|null $status, - /** - * Temperature, in °C, reported by the affected thermostat. - */ - public float|null $temperature_celsius, - /** - * Temperature, in °F, reported by the affected thermostat. - */ - public float|null $temperature_fahrenheit, - /** - * ID of the thermostat schedule that prompted the affected climate preset to be activated. - */ - public string|null $thermostat_schedule_id, - public Event\To|null $to, - /** - * Upper temperature limit, in °C, defined by the set threshold. - */ - public float|null $upper_limit_celsius, - /** - * Upper temperature limit, in °F, defined by the set threshold. - */ - public float|null $upper_limit_fahrenheit, public string|null $video_url = null, - /** - * ID of the workspace associated with the event. - */ - public string|null $workspace_id, ) {} } } @@ -835,16 +835,16 @@ public static function from_json(mixed $json): RequestedMutations|null } public function __construct( + /** + * Code identifying the type of mutation requested, such as `updating_name`, `updating_code`, `updating_time_frame`, or `deleting`. + */ + public string|null $mutation_code, /** * Previous property values before the requested change. Keys depend on the mutation type. Absent for non-property mutations like `deleting`. * * @var array|\stdClass|null */ public array|\stdClass|null $from = null, - /** - * Code identifying the type of mutation requested, such as `updating_name`, `updating_code`, `updating_time_frame`, or `deleting`. - */ - public string|null $mutation_code, /** * New property values after the requested change. Keys depend on the mutation type. Absent for non-property mutations like `deleting`. * diff --git a/src/Resources/InstantKey.php b/src/Resources/InstantKey.php index f7a93404..f24095a0 100644 --- a/src/Resources/InstantKey.php +++ b/src/Resources/InstantKey.php @@ -38,14 +38,6 @@ public function __construct( * Date and time at which the Instant Key was created. */ public string|null $created_at, - /** - * Customization applied to the Instant Key UI. - */ - public InstantKey\Customization|null $customization = null, - /** - * ID of the customization profile associated with the Instant Key. - */ - public string|null $customization_profile_id = null, /** * Date and time at which the Instant Key expires. */ @@ -66,6 +58,14 @@ public function __construct( * ID of the workspace that contains the Instant Key. */ public string|null $workspace_id, + /** + * Customization applied to the Instant Key UI. + */ + public InstantKey\Customization|null $customization = null, + /** + * ID of the customization profile associated with the Instant Key. + */ + public string|null $customization_profile_id = null, ) {} } } diff --git a/src/Resources/NoiseThreshold.php b/src/Resources/NoiseThreshold.php index 0545ab0f..24d7e7e0 100644 --- a/src/Resources/NoiseThreshold.php +++ b/src/Resources/NoiseThreshold.php @@ -44,14 +44,14 @@ public function __construct( * Unique identifier for the noise threshold. */ public string|null $noise_threshold_id, - /** - * Noise level in Noiseaware Noise Risk Score (NRS) for the noise threshold. This parameter is only relevant for [Noiseaware sensors](https://docs.seam.co/device-and-system-integration-guides/noiseaware-sensors). - */ - public float|null $noise_threshold_nrs = null, /** * Time at which the noise threshold should become active daily. */ public string|null $starts_daily_at, + /** + * Noise level in Noiseaware Noise Risk Score (NRS) for the noise threshold. This parameter is only relevant for [Noiseaware sensors](https://docs.seam.co/device-and-system-integration-guides/noiseaware-sensors). + */ + public float|null $noise_threshold_nrs = null, ) {} } } diff --git a/src/Resources/Phone.php b/src/Resources/Phone.php index e73d8f3e..c56b8b5e 100644 --- a/src/Resources/Phone.php +++ b/src/Resources/Phone.php @@ -60,10 +60,6 @@ public function __construct( * Errors associated with the phone. */ public array $errors, - /** - * Optional nickname to describe the phone, settable through Seam. - */ - public string|null $nickname = null, /** * Properties of the phone. */ @@ -76,6 +72,10 @@ public function __construct( * ID of the workspace that contains the phone. */ public string|null $workspace_id, + /** + * Optional nickname to describe the phone, settable through Seam. + */ + public string|null $nickname = null, ) {} } } diff --git a/src/Resources/Space.php b/src/Resources/Space.php index c5acd6e5..f5d9a754 100644 --- a/src/Resources/Space.php +++ b/src/Resources/Space.php @@ -39,14 +39,6 @@ public function __construct( * Date and time at which the space was created. */ public string|null $created_at, - /** - * Reservation/stay-related defaults for the space. Also carries the provider/PMS-supplied name under a `_name` key (e.g. `guesty_name`), which Seam preserves when you rename the space (read-only — managed by Seam). - */ - public Space\CustomerData|null $customer_data = null, - /** - * Customer key associated with the space. - */ - public string|null $customer_key = null, /** * Number of devices in the space. */ @@ -55,10 +47,6 @@ public function __construct( * Display name for the space. */ public string|null $display_name, - /** - * Geographic coordinates (latitude and longitude) of the space. - */ - public Space\Geolocation|null $geolocation = null, /** * Name of the space. */ @@ -67,14 +55,26 @@ public function __construct( * ID of the space. */ public string|null $space_id, - /** - * Unique key for the space within the workspace. - */ - public string|null $space_key = null, /** * ID of the workspace associated with the space. */ public string|null $workspace_id, + /** + * Reservation/stay-related defaults for the space. Also carries the provider/PMS-supplied name under a `_name` key (e.g. `guesty_name`), which Seam preserves when you rename the space (read-only — managed by Seam). + */ + public Space\CustomerData|null $customer_data = null, + /** + * Customer key associated with the space. + */ + public string|null $customer_key = null, + /** + * Geographic coordinates (latitude and longitude) of the space. + */ + public Space\Geolocation|null $geolocation = null, + /** + * Unique key for the space within the workspace. + */ + public string|null $space_key = null, ) {} } } diff --git a/src/Resources/ThermostatSchedule.php b/src/Resources/ThermostatSchedule.php index e2bc5991..0ebf3370 100644 --- a/src/Resources/ThermostatSchedule.php +++ b/src/Resources/ThermostatSchedule.php @@ -51,14 +51,6 @@ public function __construct( * Errors associated with the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). */ public array $errors, - /** - * Indicates whether a person at the thermostat can change the thermostat's settings after the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts. - */ - public bool|null $is_override_allowed = null, - /** - * Number of minutes for which a person at the thermostat can change the thermostat's settings after the activation of the scheduled [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). See also [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). - */ - public int|null $max_override_period_minutes = null, /** * User-friendly name to identify the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). */ @@ -75,6 +67,14 @@ public function __construct( * ID of the workspace that contains the thermostat schedule. */ public string|null $workspace_id, + /** + * Indicates whether a person at the thermostat can change the thermostat's settings after the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts. + */ + public bool|null $is_override_allowed = null, + /** + * Number of minutes for which a person at the thermostat can change the thermostat's settings after the activation of the scheduled [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). See also [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). + */ + public int|null $max_override_period_minutes = null, ) {} } } diff --git a/src/Resources/UnmanagedAccessCode.php b/src/Resources/UnmanagedAccessCode.php index d0e2ce0b..61863afe 100644 --- a/src/Resources/UnmanagedAccessCode.php +++ b/src/Resources/UnmanagedAccessCode.php @@ -59,14 +59,6 @@ public function __construct( * Unique identifier for the access code. */ public string|null $access_code_id, - /** - * Indicates that Seam cannot convert this unmanaged access code to a managed access code. Some providers do not support management of unmanaged access codes through API integrations. - */ - public true|null $cannot_be_managed = null, - /** - * Indicates that Seam cannot delete this unmanaged access code through the provider. If this access code needs to be deleted, it will only be possible from the manufacturer app. - */ - public true|null $cannot_delete_unmanaged_access_code = null, /** * Code used for access. Typically, a numeric or alphanumeric string. */ @@ -79,14 +71,6 @@ public function __construct( * Unique identifier for the device associated with the access code. */ public string|null $device_id, - /** - * Metadata for a dormakaba Oracode unmanaged access code. Only present for unmanaged access codes from dormakaba Oracode devices. - */ - public UnmanagedAccessCode\DormakabaOracodeMetadata|null $dormakaba_oracode_metadata = null, - /** - * Date and time after which the time-bound access code becomes inactive. - */ - public string|null $ends_at = null, /** * Errors associated with the [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). */ @@ -99,10 +83,6 @@ public function __construct( * Name of the access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). */ public string|null $name, - /** - * Date and time at which the time-bound access code becomes active. - */ - public string|null $starts_at = null, /** * 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. */ @@ -119,6 +99,26 @@ public function __construct( * Unique identifier for the Seam workspace associated with the access code. */ public string|null $workspace_id, + /** + * Indicates that Seam cannot convert this unmanaged access code to a managed access code. Some providers do not support management of unmanaged access codes through API integrations. + */ + public true|null $cannot_be_managed = null, + /** + * Indicates that Seam cannot delete this unmanaged access code through the provider. If this access code needs to be deleted, it will only be possible from the manufacturer app. + */ + public true|null $cannot_delete_unmanaged_access_code = null, + /** + * Metadata for a dormakaba Oracode unmanaged access code. Only present for unmanaged access codes from dormakaba Oracode devices. + */ + public UnmanagedAccessCode\DormakabaOracodeMetadata|null $dormakaba_oracode_metadata = null, + /** + * Date and time after which the time-bound access code becomes inactive. + */ + public string|null $ends_at = null, + /** + * Date and time at which the time-bound access code becomes active. + */ + public string|null $starts_at = null, ) {} } } @@ -214,14 +214,6 @@ public static function from_json(mixed $json): Errors|null } public function __construct( - /** - * Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. - */ - public string|null $change_type = null, - /** - * Date and time at which Seam created the error. - */ - public string|null $created_at = null, /** * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */ @@ -230,20 +222,28 @@ public function __construct( * Indicates that this is an access code error. */ public true|null $is_access_code_error, + public bool|null $is_connected_account_error, + public bool|null $is_device_error, + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ + public string|null $message, + /** + * Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. + */ + public string|null $change_type = null, + /** + * Date and time at which Seam created the error. + */ + public string|null $created_at = null, /** * Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge). */ public bool|null $is_bridge_error = null, - public bool|null $is_connected_account_error, - public bool|null $is_device_error, /** * ID of the managed access code that conflicts with this managed access code, when Seam can identify it. */ public string|null $managed_access_code_id = null, - /** - * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - */ - public string|null $message, /** * List of fields that were changed externally, with their previous and new values. */ @@ -278,6 +278,14 @@ public static function from_json(mixed $json): Warnings|null } public function __construct( + /** + * 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. + */ + public string|null $warning_code, /** * Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. */ @@ -286,18 +294,10 @@ public function __construct( * Date and time at which Seam created the warning. */ public string|null $created_at = null, - /** - * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - */ - public string|null $message, /** * List of fields that were changed externally, with their previous and new values. */ public array|null $modified_fields = null, - /** - * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - */ - public string|null $warning_code, ) {} } } diff --git a/src/Resources/UnmanagedAccessGrant.php b/src/Resources/UnmanagedAccessGrant.php index 7a898a81..03726d3b 100644 --- a/src/Resources/UnmanagedAccessGrant.php +++ b/src/Resources/UnmanagedAccessGrant.php @@ -90,10 +90,6 @@ public function __construct( * Access methods that the user requested for the Access Grant. */ public array $requested_access_methods, - /** - * Reservation key for the access grant. - */ - public string|null $reservation_key = null, /** * IDs of the spaces to which the Access Grant gives access. */ @@ -102,10 +98,6 @@ public function __construct( * Date and time at which the Access Grant starts. */ public string|null $starts_at, - /** - * ID of user identity to which the Access Grant gives access. - */ - public string|null $user_identity_id = null, /** * Warnings associated with the [access grant](https://docs.seam.co/use-cases/granting-access). */ @@ -114,6 +106,14 @@ public function __construct( * ID of the Seam workspace associated with the Access Grant. */ public string|null $workspace_id, + /** + * Reservation key for the access grant. + */ + public string|null $reservation_key = null, + /** + * ID of user identity to which the Access Grant gives access. + */ + public string|null $user_identity_id = null, ) {} } } @@ -224,10 +224,6 @@ public static function from_json( } public function __construct( - /** - * Specific PIN code to use for this access method. Only applicable when mode is 'code'. - */ - public string|null $code = null, /** * IDs of the access methods created for the requested access method. */ @@ -240,14 +236,18 @@ public function __construct( * Display name of the access method. */ public string|null $display_name, - /** - * Maximum number of times the instant key can be used. Only applicable when mode is 'mobile_key'. Defaults to 1 if not specified. - */ - public int|null $instant_key_max_use_count = null, /** * Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. */ public string|null $mode, + /** + * Specific PIN code to use for this access method. Only applicable when mode is 'code'. + */ + public string|null $code = null, + /** + * Maximum number of times the instant key can be used. Only applicable when mode is 'mobile_key'. Defaults to 1 if not specified. + */ + public int|null $instant_key_max_use_count = null, ) {} } @@ -287,10 +287,6 @@ public function __construct( */ public string|null $created_at, public string|null $device_id, - /** - * Devices whose access codes could not be revoked during reconciliation. Present when the provider does not support revoking an offline access code (e.g. Dormakaba oracode with exhausted override budget). - */ - public array|null $failed_devices = null, /** * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */ @@ -311,6 +307,10 @@ public function __construct( * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ public string|null $warning_code, + /** + * Devices whose access codes could not be revoked during reconciliation. Present when the provider does not support revoking an offline access code (e.g. Dormakaba oracode with exhausted override budget). + */ + public array|null $failed_devices = null, ) {} } } @@ -362,10 +362,6 @@ public static function from_json(mixed $json): To|null } public function __construct( - /** - * Common code key to ensure PIN code reuse across devices. - */ - public string|null $common_code_key = null, /** * New device IDs where access codes should be created. */ @@ -378,6 +374,10 @@ public function __construct( * New start time for access. */ public string|null $starts_at, + /** + * Common code key to ensure PIN code reuse across devices. + */ + public string|null $common_code_key = null, ) {} } } diff --git a/src/Resources/UnmanagedAccessMethod.php b/src/Resources/UnmanagedAccessMethod.php index acfc5177..b59d7248 100644 --- a/src/Resources/UnmanagedAccessMethod.php +++ b/src/Resources/UnmanagedAccessMethod.php @@ -47,10 +47,6 @@ public function __construct( * ID of the access method. */ public string|null $access_method_id, - /** - * The actual PIN code for code access methods. - */ - public string|null $code = null, /** * Date and time at which the access method was created. */ @@ -63,26 +59,10 @@ public function __construct( * Errors associated with the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). */ public array $errors, - /** - * Indicates whether an existing card credential must be assigned to this access method before it can be issued. Only applies to card-mode access methods on systems that support credential assignment. - */ - public bool|null $is_assignment_required = null, - /** - * Indicates whether encoding with an card encoder is required to issue or reissue the plastic card associated with the access method. - */ - public bool|null $is_encoding_required = null, /** * Indicates whether the access method has been issued. */ public bool|null $is_issued, - /** - * Indicates whether the access method is ready for card assignment. This is true when the access method is in card mode, has not yet been issued, and the system supports credential assignment. - */ - public bool|null $is_ready_for_assignment = null, - /** - * Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued. - */ - public bool|null $is_ready_for_encoding = null, /** * Date and time at which the access method was issued. */ @@ -103,6 +83,26 @@ public function __construct( * ID of the Seam workspace associated with the access method. */ public string|null $workspace_id, + /** + * The actual PIN code for code access methods. + */ + public string|null $code = null, + /** + * Indicates whether an existing card credential must be assigned to this access method before it can be issued. Only applies to card-mode access methods on systems that support credential assignment. + */ + public bool|null $is_assignment_required = null, + /** + * Indicates whether encoding with an card encoder is required to issue or reissue the plastic card associated with the access method. + */ + public bool|null $is_encoding_required = null, + /** + * Indicates whether the access method is ready for card assignment. This is true when the access method is in card mode, has not yet been issued, and the system supports credential assignment. + */ + public bool|null $is_ready_for_assignment = null, + /** + * Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued. + */ + public bool|null $is_ready_for_encoding = null, ) {} } } @@ -207,14 +207,14 @@ public function __construct( * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */ public string|null $message, - /** - * ID of the original access method from which this backup access method was split, if applicable. - */ - public string|null $original_access_method_id = null, /** * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */ public string|null $warning_code, + /** + * ID of the original access method from which this backup access method was split, if applicable. + */ + public string|null $original_access_method_id = null, ) {} } } diff --git a/src/Resources/UnmanagedDevice.php b/src/Resources/UnmanagedDevice.php index 7a6a2ad3..55727698 100644 --- a/src/Resources/UnmanagedDevice.php +++ b/src/Resources/UnmanagedDevice.php @@ -68,6 +68,52 @@ public static function from_json(mixed $json): UnmanagedDevice|null } public function __construct( + /** + * Collection of capabilities that the device supports when connected to Seam. Values are `access_code`, which indicates that the device can manage and utilize digital PIN codes for secure access; `lock`, which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; `noise_detection`, which indicates that the device supports monitoring and responding to ambient noise levels; `thermostat`, which indicates that the device can regulate and adjust indoor temperatures; `battery`, which indicates that the device can manage battery life and health; and `phone`, which indicates that the device is a mobile device, such as a smartphone. **Important:** Superseded by [capability flags](https://docs.seam.co/capability-guides/device-and-system-capabilities#capability-flags). + */ + public array|null $capabilities_supported, + /** + * Unique identifier for the account associated with the device. + */ + public string|null $connected_account_id, + /** + * Date and time at which the device object was created. + */ + public string|null $created_at, + /** + * Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. + * + * @var array|\stdClass|null + */ + public array|\stdClass|null $custom_metadata, + /** + * ID of the device. + */ + public string|null $device_id, + /** + * Type of the device. + */ + public string|null $device_type, + /** + * Array of errors associated with the device. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. + */ + public array $errors, + /** + * Indicates that Seam does not manage the device. + */ + public false|null $is_managed, + /** + * properties of the device. + */ + public UnmanagedDevice\Properties|null $properties, + /** + * Array of warnings associated with the device. Each warning object within the array contains two fields: `warning_code` and `message`. `warning_code` is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it. + */ + public array $warnings, + /** + * Unique identifier for the Seam workspace associated with the device. + */ + public string|null $workspace_id, /** * Indicates whether the lock supports configuring automatic locking. */ @@ -148,56 +194,10 @@ public function __construct( * Indicates whether the lock supports unlocking with an access code. */ public bool|null $can_unlock_with_code = null, - /** - * Collection of capabilities that the device supports when connected to Seam. Values are `access_code`, which indicates that the device can manage and utilize digital PIN codes for secure access; `lock`, which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; `noise_detection`, which indicates that the device supports monitoring and responding to ambient noise levels; `thermostat`, which indicates that the device can regulate and adjust indoor temperatures; `battery`, which indicates that the device can manage battery life and health; and `phone`, which indicates that the device is a mobile device, such as a smartphone. **Important:** Superseded by [capability flags](https://docs.seam.co/capability-guides/device-and-system-capabilities#capability-flags). - */ - public array|null $capabilities_supported, - /** - * Unique identifier for the account associated with the device. - */ - public string|null $connected_account_id, - /** - * Date and time at which the device object was created. - */ - public string|null $created_at, - /** - * Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. - * - * @var array|\stdClass|null - */ - public array|\stdClass|null $custom_metadata, - /** - * ID of the device. - */ - public string|null $device_id, - /** - * Type of the device. - */ - public string|null $device_type, - /** - * Array of errors associated with the device. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. - */ - public array $errors, - /** - * Indicates that Seam does not manage the device. - */ - public false|null $is_managed, /** * Location information for the device. */ public UnmanagedDevice\Location|null $location = null, - /** - * properties of the device. - */ - public UnmanagedDevice\Properties|null $properties, - /** - * Array of warnings associated with the device. Each warning object within the array contains two fields: `warning_code` and `message`. `warning_code` is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it. - */ - public array $warnings, - /** - * Unique identifier for the Seam workspace associated with the device. - */ - public string|null $workspace_id, ) {} } } @@ -233,16 +233,16 @@ public function __construct( * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */ public string|null $error_code, - /** - * Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge). - */ - public bool|null $is_bridge_error = null, public bool|null $is_connected_account_error, public bool|null $is_device_error, /** * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ public string|null $message, + /** + * Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge). + */ + public bool|null $is_bridge_error = null, ) {} } @@ -322,6 +322,20 @@ public static function from_json(mixed $json): Properties|null } public function __construct( + /** + * Device model-related properties. + */ + public Properties\Model|null $model, + /** + * Name of the device. + * + * @deprecated use device.display_name instead + */ + public string|null $name, + /** + * Indicates whether the device is online. + */ + public bool|null $online, /** * Accessory keypad properties and state. */ @@ -346,26 +360,12 @@ public function __construct( * Manufacturer of the device. When a device, such as a smart lock, is connected through a smart hub, the manufacturer of the device might be different from that of the smart hub. */ public string|null $manufacturer = null, - /** - * Device model-related properties. - */ - public Properties\Model|null $model, - /** - * Name of the device. - * - * @deprecated use device.display_name instead - */ - public string|null $name, /** * Indicates whether it is currently possible to use offline access codes for the device. * * @deprecated use device.can_program_offline_access_codes */ public bool|null $offline_access_codes_enabled = null, - /** - * Indicates whether the device is online. - */ - public bool|null $online, /** * Indicates whether it is currently possible to use online access codes for the device. * @@ -441,14 +441,14 @@ public static function from_json(mixed $json): AccessoryKeypad|null } public function __construct( - /** - * Keypad battery properties. - */ - public AccessoryKeypad\Battery|null $battery = null, /** * Indicates if an accessory keypad is connected to the device. */ public bool|null $is_connected, + /** + * Keypad battery properties. + */ + public AccessoryKeypad\Battery|null $battery = null, ) {} } @@ -507,6 +507,14 @@ public static function from_json(mixed $json): Model|null } public function __construct( + /** + * Display name of the device model. + */ + public string|null $display_name, + /** + * Display name that corresponds to the manufacturer-specific terminology for the device. + */ + public string|null $manufacturer_display_name, /** * @deprecated use device.properties.model.can_connect_accessory_keypad */ @@ -515,18 +523,10 @@ public function __construct( * Indicates whether the device can connect a accessory keypad. */ public bool|null $can_connect_accessory_keypad = null, - /** - * Display name of the device model. - */ - public string|null $display_name, /** * Indicates whether the device has a built in accessory keypad. */ public bool|null $has_built_in_keypad = null, - /** - * Display name that corresponds to the manufacturer-specific terminology for the device. - */ - public string|null $manufacturer_display_name, /** * @deprecated use device.can_program_offline_access_codes. */ diff --git a/src/Resources/Webhook.php b/src/Resources/Webhook.php index 7b50da16..69c17272 100644 --- a/src/Resources/Webhook.php +++ b/src/Resources/Webhook.php @@ -20,14 +20,6 @@ public static function from_json(mixed $json): Webhook|null } public function __construct( - /** - * Types of events that the [webhook](https://docs.seam.co/developer-tools/webhooks) should receive. - */ - public array|null $event_types = null, - /** - * Secret associated with the [webhook](https://docs.seam.co/developer-tools/webhooks). - */ - public string|null $secret = null, /** * URL for the [webhook](https://docs.seam.co/developer-tools/webhooks). */ @@ -36,6 +28,14 @@ public function __construct( * ID of the webhook. */ public string|null $webhook_id, + /** + * Types of events that the [webhook](https://docs.seam.co/developer-tools/webhooks) should receive. + */ + public array|null $event_types = null, + /** + * Secret associated with the [webhook](https://docs.seam.co/developer-tools/webhooks). + */ + public string|null $secret = null, ) {} } } diff --git a/src/Resources/Workspace.php b/src/Resources/Workspace.php index 87e16359..2fb45430 100644 --- a/src/Resources/Workspace.php +++ b/src/Resources/Workspace.php @@ -62,14 +62,14 @@ public function __construct( * ID of the organization to which the workspace belongs, or `null` if the workspace is not assigned to an organization. */ public string|null $organization_id, - /** - * Publishable key for the [workspace](https://docs.seam.co/core-concepts/workspaces). This key is used to identify the workspace in client-side applications. - */ - public string|null $publishable_key = null, /** * ID of the workspace. */ public string|null $workspace_id, + /** + * Publishable key for the [workspace](https://docs.seam.co/core-concepts/workspaces). This key is used to identify the workspace in client-side applications. + */ + public string|null $publishable_key = null, ) {} } }