feat(generated)!: regenerate from spec (9 changes)#381
Conversation
| 'object' => $this->object, | ||
| 'id' => $this->id, | ||
| 'owner' => $this->owner->toArray(), | ||
| 'owner' => $this->owner, |
There was a problem hiding this comment.
🔴 toArray() outputs raw object instead of array for owner field in ApiKey
In ApiKey::toArray(), the owner property (typed as ApiKeyOwner|UserApiKeyOwner) is included directly as 'owner' => $this->owner without calling ->toArray(). This breaks the toArray() contract which should return a fully-serialized plain array. Any code accessing $apiKey->toArray()['owner']['type'] would get a fatal error since you can't use array access on an object. The old code was 'owner' => $this->owner->toArray(). All other similar resources in the codebase (e.g., OrganizationApiKey.php:58, UserApiKey.php:58, Flag.php:67) properly call ->toArray() on nested objects.
| 'owner' => $this->owner, | |
| 'owner' => $this->owner->toArray(), |
Was this helpful? React with 👍 or 👎 to provide feedback.
| 'object' => $this->object, | ||
| 'id' => $this->id, | ||
| 'owner' => $this->owner->toArray(), | ||
| 'owner' => $this->owner, |
There was a problem hiding this comment.
🔴 toArray() outputs raw object instead of array for owner field in ApiKeyCreatedData
Same issue as in ApiKey.php: ApiKeyCreatedData::toArray() uses 'owner' => $this->owner without calling ->toArray(), breaking the serialization contract. The owner property (typed ApiKeyCreatedDataOwner|UserApiKeyCreatedDataOwner) will be an object in the output array instead of a nested array.
| 'owner' => $this->owner, | |
| 'owner' => $this->owner->toArray(), |
Was this helpful? React with 👍 or 👎 to provide feedback.
| 'object' => $this->object, | ||
| 'id' => $this->id, | ||
| 'owner' => $this->owner->toArray(), | ||
| 'owner' => $this->owner, |
There was a problem hiding this comment.
🔴 toArray() outputs raw object instead of array for owner field in ApiKeyRevokedData
Same issue as in ApiKey.php: ApiKeyRevokedData::toArray() uses 'owner' => $this->owner without calling ->toArray(), breaking the serialization contract. The owner property (typed ApiKeyRevokedDataOwner|UserApiKeyRevokedDataOwner) will be an object in the output array instead of a nested array.
| 'owner' => $this->owner, | |
| 'owner' => $this->owner->toArray(), |
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
feat(authorization)!: Rename RoleAssignment to UserRoleAssignment
RoleAssignmentmodel toUserRoleAssignmentfor clarityRoleAssignmentResourcetoUserRoleAssignmentResourceorganization_membership_idfield to role assignmentslistRoleAssignmentsForResourceandlistRoleAssignmentsForResourceByExternalIdfor querying role assignments by resourceEventsOrderreferences toPaginationOrderenum for consistency across list operationsfeat(user_management)!: Add user API keys and update ordering enum
createUserApiKeyoperation to create API keys for users with organization contextlistUserApiKeysoperation to retrieve paginated user API keys with optional organization filteringUserApiKey,UserApiKeyWithValue,UserApiKeyOwner,UserApiKeyCreatedDataOwner,UserApiKeyRevokedDataOwner,UserApiKeyWithValueOwnerlistUsers,listSessions,listInvitations, andlistOrganizationMembershipsto usePaginationOrderinstead ofEventsOrderlistJWTTemplateoperation to retrieve JWT template configurationfeat(api_keys)!: Restructure API key models and rename ordering enum
ApiKeyWithValuetoOrganizationApiKeyWithValueandApiKeyWithValueOwnertoOrganizationApiKeyWithValueOwnerOrganizationApiKeyandOrganizationApiKeyOwnerApiKey,ApiKeyCreatedData, andApiKeyRevokedDatato support both organization and user owners via union typeslistOrganizationApiKeysandcreateOrganizationApiKeyto use new model namesPaginationOrderenum instead ofEventsOrderfeat(vault)!: Rename BYOK key provider enum and add vault key deleted event
VaultByokKeyVerificationCompletedDataKeyProvidertoVaultByokKeyProviderfor reuse across eventsVaultByokKeyDeletedandVaultByokKeyDeletedDatamodels for vault BYOK key deletion eventsVaultByokKeyProviderenumfeat(directory_sync): Add name field to directory users
namefield (user's full name) toDirectoryUsermodelnamefield toDirectoryUserWithGroupsmodelnamefield toDsyncUserUpdatedDatafor directory sync eventsfeat(sso): Add full name support to user profiles
namefield toProfilemodel for user's full namefirst_nameandlast_namefieldsfeat(user_management): Add user context to organization memberships
userfield toUserOrganizationMembershipmodel containing full user detailsuserfield toUserOrganizationMembershipBaseListDatamodeluserfield toOrganizationMembershipmodel for membership listing endpointsfeat(authorization): Rename EventsOrder to PaginationOrder
EventsOrderenum references with newPaginationOrderenum across authorization operationslistResourcesForMembership,listEffectivePermissions,listEffectivePermissionsByExternalId,listRoleAssignments,listMembershipsForResourceByExternalId,listResources,listMembershipsForResource, and permission listing operationsfix(events): Add admin_portal to actor source enum
admin_portalcase toEventContextActorSourceenum to support admin portal event sourcesTriggered by workos/openapi-spec@a06e54d
BEGIN_COMMIT_OVERRIDE
feat(authorization)!: Rename RoleAssignment to UserRoleAssignment
feat(user_management)!: Add user API keys and update ordering enum
feat(api_keys)!: Restructure API key models and rename ordering enum
feat(vault)!: Rename BYOK key provider enum and add vault key deleted event
feat(directory_sync): Add name field to directory users
feat(sso): Add full name support to user profiles
feat(user_management): Add user context to organization memberships
feat(authorization): Rename EventsOrder to PaginationOrder
fix(events): Add admin_portal to actor source enum
END_COMMIT_OVERRIDE