feat!(generated): regenerate from spec (7 changes)#477
feat!(generated): regenerate from spec (7 changes)#477workos-sdk-automation[bot] wants to merge 1 commit intomainfrom
Conversation
Greptile SummaryThis auto-generated PR renames
Confidence Score: 3/5Two P1 issues need resolution before merging: the Two P1 findings — a silent runtime break for any caller accessing
Important Files Changed
|
| # @param after [String, nil] An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. | ||
| # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`. | ||
| # @param order [WorkOS::Types::ApiKeysOrder, nil] Order the results by the creation time. | ||
| # @param organization_id [String, nil] The ID of the organization to filter user API keys by. When provided, only API keys created against that organization membership are returned. |
There was a problem hiding this comment.
Hardcoded
"desc" order default differs from every other list method
Every other list method in this SDK (including list_organization_api_keys) defaults order: to nil, which means no order query param is sent and the API uses its own server-side default. Here, order: "desc" is a non-nil default, so .compact will not remove it and order=desc will always be appended to the request even when the caller never touches the parameter. If the API's true default is not "desc", or if a caller expects the API default to apply when they omit order:, they will silently get the wrong ordering.
| @object = hash[:object] | ||
| @id = hash[:id] | ||
| @owner = hash[:owner] ? WorkOS::ApiKeyOwner.new(hash[:owner]) : nil | ||
| @owner = hash[:owner] |
There was a problem hiding this comment.
owner now returns a raw Hash, breaking the typed accessor contract
Previously @owner was deserialized as WorkOS::ApiKeyOwner.new(...), giving callers a typed object with named accessors (e.g. api_key.owner.type). After this change it returns the raw normalized Hash, so api_key.owner[:type] is now required. Any existing caller code that calls methods on owner will raise NoMethodError at runtime. The same regression is present in ApiKeyCreatedData (used in webhook events). The new OrganizationApiKey / OrganizationApiKeyWithValue correctly keep typed owner objects, making ApiKey and ApiKeyCreatedData inconsistent with the rest of the family.
Summary
feat!(api_keys): Rename ApiKey models to Organization-scoped variants
ApiKeyWithValue→OrganizationApiKeyWithValueApiKeyWithValueOwner→OrganizationApiKeyWithValueOwnerlist_organization_api_keys()return type fromApiKeytoOrganizationApiKeycreate_organization_api_key()return type fromApiKeyWithValuetoOrganizationApiKeyWithValueApiKey.ownerfield type fromApiKeyOwnerto raw value (breaking change in field deserialization)feat(user_management): Add user API key management operations
list_user_api_keys()to list API keys for a user by organizationcreate_user_api_key()to create user-scoped API keysCreateUserApiKeyfor API key creation parametersUserApiKey,UserApiKeyWithValue,UserApiKeyOwner,UserApiKeyWithValueOwnerfor user API key responseslist_jwt_template()to fetch JWT template configurationfeat(directory_sync): Add name field to directory user models
namefield toDirectoryUsernamefield toDirectoryUserWithGroupsnamefield toDsyncUserUpdatedDatafeat(sso): Add name field to Profile model
namefield toProfilefor SSO authentication responsefeat!(authorization): Add user field to organization membership models
userfield (typeUser) toUserOrganizationMembershipuserfield (typeUser) toOrganizationMembershipuserfield (typeUser) toUserOrganizationMembershipBaseListDatafeat(vault): Add BYOK key deletion event models
VaultByokKeyDeletedfor vault.byok_key.deleted eventVaultByokKeyDeletedDatawith organization and key provider detailsVaultByokKeyDeletedDataKeyProviderfor AWS_KMS, GCP_KMS, AZURE_KEY_VAULTfix(generated): Consolidate order enum definitions and add ADMIN_PORTAL actor source
ApiKeysOrderenum withNORMAL,DESC,ASCvaluesApiKeysOrder(e.g.,ApplicationsOrder,AuditLogsOrder)ADMIN_PORTALvalue toEventContextActorSourceand all flag event actor source enumsTriggered by workos/openapi-spec@058a0a4
BEGIN_COMMIT_OVERRIDE
feat!(api_keys): Rename ApiKey models to Organization-scoped variants
feat(user_management): Add user API key management operations
feat(directory_sync): Add name field to directory user models
feat(sso): Add name field to Profile model
feat!(authorization): Add user field to organization membership models
feat(vault): Add BYOK key deletion event models
fix(generated): Consolidate order enum definitions and add ADMIN_PORTAL actor source
END_COMMIT_OVERRIDE