Skip to content

feat(generated)!: regenerate from spec (9 changes)#381

Merged
gjtorikian merged 2 commits intomainfrom
oagen/spec-update-a06e54de8fcaa3eeabc79adada417e2d2a81a042
May 6, 2026
Merged

feat(generated)!: regenerate from spec (9 changes)#381
gjtorikian merged 2 commits intomainfrom
oagen/spec-update-a06e54de8fcaa3eeabc79adada417e2d2a81a042

Conversation

@workos-sdk-automation
Copy link
Copy Markdown
Contributor

@workos-sdk-automation workos-sdk-automation Bot commented May 6, 2026

Summary

feat(authorization)!: Rename RoleAssignment to UserRoleAssignment

  • Renamed RoleAssignment model to UserRoleAssignment for clarity
  • Renamed RoleAssignmentResource to UserRoleAssignmentResource
  • Added required organization_membership_id field to role assignments
  • Added two new operations: listRoleAssignmentsForResource and listRoleAssignmentsForResourceByExternalId for querying role assignments by resource
  • Updated all EventsOrder references to PaginationOrder enum for consistency across list operations

feat(user_management)!: Add user API keys and update ordering enum

  • Added createUserApiKey operation to create API keys for users with organization context
  • Added listUserApiKeys operation to retrieve paginated user API keys with optional organization filtering
  • New models: UserApiKey, UserApiKeyWithValue, UserApiKeyOwner, UserApiKeyCreatedDataOwner, UserApiKeyRevokedDataOwner, UserApiKeyWithValueOwner
  • Updated listUsers, listSessions, listInvitations, and listOrganizationMemberships to use PaginationOrder instead of EventsOrder
  • Added listJWTTemplate operation to retrieve JWT template configuration

feat(api_keys)!: Restructure API key models and rename ordering enum

  • Renamed ApiKeyWithValue to OrganizationApiKeyWithValue and ApiKeyWithValueOwner to OrganizationApiKeyWithValueOwner
  • Added new organization-scoped API key models: OrganizationApiKey and OrganizationApiKeyOwner
  • Updated ApiKey, ApiKeyCreatedData, and ApiKeyRevokedData to support both organization and user owners via union types
  • Updated listOrganizationApiKeys and createOrganizationApiKey to use new model names
  • All list operations now use PaginationOrder enum instead of EventsOrder

feat(vault)!: Rename BYOK key provider enum and add vault key deleted event

  • Renamed VaultByokKeyVerificationCompletedDataKeyProvider to VaultByokKeyProvider for reuse across events
  • Added new VaultByokKeyDeleted and VaultByokKeyDeletedData models for vault BYOK key deletion events
  • Both BYOK event data models now use the unified VaultByokKeyProvider enum

feat(directory_sync): Add name field to directory users

  • Added name field (user's full name) to DirectoryUser model
  • Added name field to DirectoryUserWithGroups model
  • Added name field to DsyncUserUpdatedData for directory sync events

feat(sso): Add full name support to user profiles

  • Added name field to Profile model for user's full name
  • Field is optional and complements existing first_name and last_name fields

feat(user_management): Add user context to organization memberships

  • Added required user field to UserOrganizationMembership model containing full user details
  • Added required user field to UserOrganizationMembershipBaseListData model
  • Added required user field to OrganizationMembership model for membership listing endpoints

feat(authorization): Rename EventsOrder to PaginationOrder

  • Replaced all EventsOrder enum references with new PaginationOrder enum across authorization operations
  • Updated 10+ list operations: listResourcesForMembership, listEffectivePermissions, listEffectivePermissionsByExternalId, listRoleAssignments, listMembershipsForResourceByExternalId, listResources, listMembershipsForResource, and permission listing operations

fix(events): Add admin_portal to actor source enum

  • Added admin_portal case to EventContextActorSource enum to support admin portal event sources

Triggered 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


Open in Devin Review

@workos-sdk-automation workos-sdk-automation Bot added the autogenerated Autogenerated code or content label May 6, 2026
@workos-sdk-automation workos-sdk-automation Bot requested review from a team as code owners May 6, 2026 01:54
@workos-sdk-automation workos-sdk-automation Bot added the autogenerated Autogenerated code or content label May 6, 2026
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 3 potential issues.

View 4 additional findings in Devin Review.

Open in Devin Review

Comment thread lib/Resource/ApiKey.php Outdated
'object' => $this->object,
'id' => $this->id,
'owner' => $this->owner->toArray(),
'owner' => $this->owner,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 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.

Suggested change
'owner' => $this->owner,
'owner' => $this->owner->toArray(),
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment thread lib/Resource/ApiKeyCreatedData.php Outdated
'object' => $this->object,
'id' => $this->id,
'owner' => $this->owner->toArray(),
'owner' => $this->owner,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 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.

Suggested change
'owner' => $this->owner,
'owner' => $this->owner->toArray(),
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment thread lib/Resource/ApiKeyRevokedData.php Outdated
'object' => $this->object,
'id' => $this->id,
'owner' => $this->owner->toArray(),
'owner' => $this->owner,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 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.

Suggested change
'owner' => $this->owner,
'owner' => $this->owner->toArray(),
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@gjtorikian gjtorikian merged commit 1bb2fe4 into main May 6, 2026
8 checks passed
@gjtorikian gjtorikian deleted the oagen/spec-update-a06e54de8fcaa3eeabc79adada417e2d2a81a042 branch May 6, 2026 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autogenerated Autogenerated code or content

Development

Successfully merging this pull request may close these issues.

1 participant