Skip to content

feat(generated)!: regenerate from spec (13 changes)#478

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

feat(generated)!: regenerate from spec (13 changes)#478
gjtorikian merged 2 commits into
mainfrom
oagen/spec-update-a06e54de8fcaa3eeabc79adada417e2d2a81a042

Conversation

@workos-sdk-automation
Copy link
Copy Markdown
Contributor

Summary

feat(authorization)!: Rename RoleAssignment to UserRoleAssignment

  • Renamed RoleAssignment model to UserRoleAssignment
  • Renamed RoleAssignmentResource to UserRoleAssignmentResource
  • Added organization_membership_id field to UserRoleAssignment
  • Updated list_role_assignments() return type to UserRoleAssignment
  • Updated assign_role() return type to UserRoleAssignment

feat(authorization)!: Consolidate order enums to PaginationOrder

  • Removed service-specific order enums: AuthorizationOrder, PermissionsOrder
  • Replaced with unified PaginationOrder enum for all list operations
  • Updated all authorization list method signatures to use PaginationOrder
  • Breaking change for code explicitly referencing old enum types

feat(authorization): Add new role assignment listing endpoints

  • Added list_role_assignments_for_resource() method
  • Added list_role_assignments_for_resource_by_external_id() method
  • Returns paginated list of UserRoleAssignment objects for a resource

feat(api_keys)!: Separate organization and user API key types

  • Created OrganizationApiKey class to replace generic ApiKey usage
  • Created OrganizationApiKeyWithValue to replace ApiKeyWithValue
  • Renamed ApiKeyWithValueOwner to OrganizationApiKeyWithValueOwner
  • Updated list_organization_api_keys() return type to OrganizationApiKey
  • Updated create_organization_api_key() return type to OrganizationApiKeyWithValue

feat(user_management): Add user API key management

  • Added UserApiKey model to represent user-scoped API keys
  • Added UserApiKeyWithValue model for creation responses
  • Added UserApiKeyOwner and related owner models
  • Added list_user_api_keys() method to list user API keys by user ID
  • Added create_user_api_key() method to create new user API keys
  • Added CreateUserApiKey request model

feat(user_management)!: Consolidate order enums to PaginationOrder

  • Removed service-specific order enums: UserManagementUsersOrder, UserManagementInvitationsOrder, UserManagementOrganizationMembershipOrder, UserManagementOrganizationMembershipGroupsOrder, UserManagementUsersFeatureFlagsOrder, UserManagementUsersAuthorizedApplicationsOrder, UserManagementMultiFactorAuthenticationOrder
  • Replaced with unified PaginationOrder enum for all list operations
  • Updated all user management list method signatures to use PaginationOrder

feat(user_management): Add user field to membership and organization membership

  • Added user field to UserOrganizationMembership (embedded User object)
  • Added user field to UserOrganizationMembershipBaseListData (embedded User object)
  • Added user field to OrganizationMembership (embedded User object)

feat(user_management): Add get JWT template endpoint

  • Added list_jwt_template() method to retrieve current JWT template configuration

feat(directory_sync): Add name field to directory users

  • Added name field to DirectoryUser model
  • Added name field to DirectoryUserWithGroups model
  • Added name field to DsyncUserUpdatedData model
  • Updated deprecation notice for groups field in DirectoryUserWithGroups

feat(sso): Add name field to SSO profile

  • Added name field to Profile model to provide full name when available

feat(vault)!: Add BYOK key deleted event and consolidate key provider enum

  • Added VaultByokKeyDeleted event model for vault.byok_key.deleted events
  • Added VaultByokKeyDeletedData model containing organization_id and key_provider
  • Renamed VaultByokKeyVerificationCompletedDataKeyProvider to VaultByokKeyProvider
  • Unified key provider enum for use across multiple BYOK key event types

feat(types)!: Consolidate pagination order enums

  • Removed 16 service-specific order enum files (ApplicationsOrder, ConnectionsOrder, DirectoriesOrder, DirectoryGroupsOrder, DirectoryUsersOrder, EventsOrder, FeatureFlagsOrder, GroupsOrder, OrganizationsOrder, OrganizationsApiKeysOrder, OrganizationsFeatureFlagsOrder, WebhooksOrder, and related user management variants)
  • Created unified PaginationOrder enum with values: NORMAL, DESC, ASC
  • All list operations now reference the single PaginationOrder type

feat(events): Add admin_portal source to event context actor

  • Added ADMIN_PORTAL = "admin_portal" value to EventContextActorSource enum
  • Allows events to be tagged with admin portal as the source

Triggered by workos/openapi-spec@a06e54d

BEGIN_COMMIT_OVERRIDE
feat(authorization)!: Rename RoleAssignment to UserRoleAssignment
feat(authorization)!: Consolidate order enums to PaginationOrder
feat(authorization): Add new role assignment listing endpoints
feat(api_keys)!: Separate organization and user API key types
feat(user_management): Add user API key management
feat(user_management)!: Consolidate order enums to PaginationOrder
feat(user_management): Add user field to membership and organization membership
feat(user_management): Add get JWT template endpoint
feat(directory_sync): Add name field to directory users
feat(sso): Add name field to SSO profile
feat(vault)!: Add BYOK key deleted event and consolidate key provider enum
feat(types)!: Consolidate pagination order enums
feat(events): Add admin_portal source to event context actor
END_COMMIT_OVERRIDE

@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 requested a review from mthadley May 6, 2026 01:54
@workos-sdk-automation workos-sdk-automation Bot added the autogenerated Autogenerated code or content label May 6, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 6, 2026

Greptile Summary

This is a large auto-generated SDK regeneration across 94 files, syncing the Ruby client with an updated OpenAPI spec. It introduces new models and methods, renames several existing types, and consolidates 16 service-specific order enums into a single PaginationOrder enum.

  • Breaking renames: RoleAssignmentUserRoleAssignment (adds organization_membership_id), ApiKeyWithValueOrganizationApiKeyWithValue, and all service-specific order enums removed in favour of PaginationOrder.
  • New methods: list_role_assignments_for_resource, list_role_assignments_for_resource_by_external_id, list_user_api_keys, create_user_api_key, and list_jwt_template (which retrieves a single resource despite the list_ prefix).
  • Discriminated union pattern introduced in ApiKey and ApiKeyCreatedData to dispatch owner objects to ApiKeyOwner, UserApiKeyOwner, or a raw Hash fallback for unknown types.

Confidence Score: 5/5

Safe to merge — spec-driven regeneration with well-tested new endpoints and only a minor raw-Hash fallback in the discriminated owner union.

All changes are auto-generated from an OpenAPI spec and follow established patterns. New models and service methods are covered by round-trip and endpoint tests. The discriminated union fallback only matters for owner types not present in the current spec.

lib/workos/api_keys/api_key.rb and lib/workos/api_keys/api_key_created_data.rb — both introduce a discriminated union for owner types with a raw Hash fallback

Important Files Changed

Filename Overview
lib/workos/api_keys/api_key.rb Added discriminated union logic for owner type; else fallback returns raw Hash rather than a model object
lib/workos/api_keys/api_key_created_data.rb Same discriminated union pattern as api_key.rb — else branch returns raw Hash for unknown owner types
lib/workos/authorization.rb Added list_role_assignments_for_resource and list_role_assignments_for_resource_by_external_id; updated RoleAssignment to UserRoleAssignment throughout
lib/workos/user_management.rb Added list_user_api_keys, create_user_api_key, and list_jwt_template; consolidated order enums to PaginationOrder
lib/workos/api_keys.rb list_organization_api_keys and create_organization_api_key return types updated to OrganizationApiKey / OrganizationApiKeyWithValue; create_validation and delete_api_key preserved and reordered
lib/workos/types/pagination_order.rb Renamed from applications_order.rb; now the single unified order enum with NORMAL, DESC, ASC values
lib/workos/user_management/user_api_key_owner.rb Alias UserApiKeyOwner = UserApiKeyCreatedDataOwner; lives in user_management/ directory and is referenced cross-module from api_keys/api_key.rb
lib/workos/authorization/user_role_assignment.rb New model replacing RoleAssignment; adds organization_membership_id field

Class Diagram

%%{init: {'theme': 'neutral'}}%%
classDiagram
    class ApiKey {
        +owner: ApiKeyOwner | UserApiKeyOwner | Hash
    }
    class OrganizationApiKey {
        +owner: OrganizationApiKeyOwner
    }
    class OrganizationApiKeyWithValue {
        +owner: OrganizationApiKeyWithValueOwner
        +value: String
    }
    class UserApiKey {
        +owner: UserApiKeyOwner
    }
    class UserApiKeyWithValue {
        +owner: UserApiKeyWithValueOwner
        +value: String
    }
    class UserRoleAssignment {
        +id: String
        +organization_membership_id: String
        +role: SlimRole
        +resource: UserRoleAssignmentResource
    }
    class PaginationOrder {
        <<enum>>
        NORMAL
        DESC
        ASC
    }
    UserApiKeyOwner --|> UserApiKeyCreatedDataOwner : alias
    ApiKey --> ApiKeyOwner : organization
    ApiKey --> UserApiKeyOwner : user
    OrganizationApiKey --> OrganizationApiKeyOwner
    UserApiKey --> UserApiKeyOwner
Loading

Reviews (2): Last reviewed commit: "regeneration" | Re-trigger Greptile

Comment on lines +1150 to +1160
def list_jwt_template(request_options: {})
response = @client.request(
method: :get,
path: "/user_management/jwt_template",
auth: true,
request_options: request_options
)
result = WorkOS::JWTTemplateResponse.new(response.body)
result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
result
end
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.

P2 Misleading list_ prefix for a singleton resource

list_jwt_template performs a GET on /user_management/jwt_template and returns a single JWTTemplateResponse, not a paginated collection. Every other list_* method in this SDK returns a WorkOS::Types::ListStruct. A caller following the naming convention would reasonably expect to iterate over results, but there are none to iterate — calling .data or .each on the returned object will fail. The companion write method is correctly named update_jwt_template, so a consistent read name would be get_jwt_template.

@gjtorikian gjtorikian merged commit 956386a into main May 6, 2026
7 checks passed
@gjtorikian gjtorikian deleted the oagen/spec-update-a06e54de8fcaa3eeabc79adada417e2d2a81a042 branch May 6, 2026 22:39
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