Migrate resource classes from Objects to Resources namespace - #454
Merged
Conversation
Generate the resource classes into src/Resources under the Seam\Resources namespace instead of src/Objects under Seam\Objects. Each blueprint resource now gets a single file. The classes that only exist to type a nested object property of a resource (DeviceBattery, AcsSystemLocation, and so on) are emitted as local classes in the file of the resource that introduced them, rather than as 213 separate files. Since those local classes no longer live in a file matching their name, add a classmap autoload entry for src/Resources alongside the existing PSR-4 mapping. The generated classes themselves are unchanged: all 213 class bodies are byte-identical to the previous output. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014yfWYVy7dgifgtsFPnrkDX
razor-x
marked this pull request as ready for review
July 27, 2026 23:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR reorganizes the SDK's resource class structure by migrating all resource model classes from the
Seam\Objectsnamespace to theSeam\Resourcesnamespace.Summary
The codebase has been refactored to consolidate resource definitions under a dedicated
Resourcesnamespace, improving the logical organization of the SDK. This change separates resource models from other object types and provides a clearer API structure.Key Changes
Namespace Migration: Moved 100+ resource classes from
src/Objects/tosrc/Resources/, including:Device,AccessCode,AccessGrant,Event,ActionAttempt,AcsUser,AcsEntrance,AcsSystem,AcsCredential,AcsAccessGroup,AcsEncoder,ConnectedAccount,Phone,Space,Workspace,UserIdentity,UnmanagedDevice,UnmanagedAccessCode,AccessMethod,ClientSession,ConnectWebview,CustomerPortal,DeviceProvider,NoiseThreshold,Webhook,Batch,ConnectWebview,InstantKey,ThermostatSchedule,ThermostatDailyProgramUpdated Imports: Modified all import statements throughout the codebase to reference the new
Seam\Resourcesnamespace:SeamClient.phpupdated with new use statementsResourcesCode Generation Updates: Updated codegen configuration files to generate resources in the new namespace:
codegen/lib/resource-model.ts- Updated to targetsrc/Resourcescodegen/layouts/resource.hbs- Updated namespace declarationcodegen/smith.ts- Updated pathscomposer.json- Added PSR-4 autoloading forSeam\ResourcesRemoved Old Files: Deleted all resource class files from
src/Objects/directoryImplementation Details
The migration maintains full backward compatibility in terms of functionality—all class definitions, methods, and properties remain unchanged. Only the namespace has been updated. The
from_json()factory methods and constructor signatures are preserved exactly as they were.https://claude.ai/code/session_014yfWYVy7dgifgtsFPnrkDX