feat(generated)!: regenerate from spec (12 changes)#545
feat(generated)!: regenerate from spec (12 changes)#545workos-sdk-automation[bot] wants to merge 1 commit intomainfrom
Conversation
Greptile SummaryThis is a large spec-driven regeneration adding new user and organization API key management endpoints, renaming
Confidence Score: 3/5Safe to merge with caution: the bulk of the changes are mechanical spec-driven renames and additions, but the global removal of the "order": "desc" default from every list operation is a silent ordering change for all existing callers who did not explicitly set an order value. The per-file renames, new models, and new endpoints all look correct and are backed by fixtures and tests. The concern that warrants attention is the cross-cutting removal of the default descending sort: every list iterator in authorization, user management, events, webhooks, and elsewhere previously requested order=desc implicitly, and that default is now gone. Existing consumers who page through resources and rely on recency ordering without explicitly passing an Order param will silently receive results in a different order after upgrading. The PaginationOrder enum is also introduced but left unused at the PaginationParams.Order field level (still *string), which reduces its practical value. Pay closest attention to authorization.go, user_management.go, events.go, and webhooks.go for the iterator default-params change, and to enums.go / models.go for the PaginationOrder enum wiring. Important Files Changed
|
| package workos | ||
|
|
||
| // PaginationOrder represents pagination order values. | ||
| type PaginationOrder string | ||
|
|
||
| const ( | ||
| PaginationOrderNormal PaginationOrder = "normal" | ||
| PaginationOrderDesc PaginationOrder = "desc" | ||
| PaginationOrderAsc PaginationOrder = "asc" |
There was a problem hiding this comment.
PaginationOrder enum unused in PaginationParams.Order
The new PaginationOrder enum (with values normal, desc, asc) is added to this file, but PaginationParams.Order remains typed as *string. This means callers passing the Order field get no compile-time validation — an arbitrary string like "DESC" or "ascending" would compile fine but likely cause a server-side error. The entire motivation for adding PaginationOrder is negated when the canonical place it would be used (PaginationParams.Order) still accepts any string.
Summary
feat(authorization)!: Rename RoleAssignment to UserRoleAssignment
RoleAssignmentmodel toUserRoleAssignmentRoleAssignmentResourcetoUserRoleAssignmentResourceListRoleAssignmentsto returnUserRoleAssignmentinstead ofRoleAssignmentAssignRoleto returnUserRoleAssignmentinstead ofRoleAssignmentListRoleAssignmentsForResourceoperationListRoleAssignmentsForResourceByExternalIdoperationfeat(authorization)!: Change email field type in multiple models
GenerateLink,CreateMagicCodeAndReturn,CreateUserInviteOptions,CreateUser,UpdateUser, andCreatePasswordResetTokenmodelsurl:tags across authorization operationsfeat(user_management)!: Add user API key management endpoints
ListAPIKeysoperation to list API keys for a userCreateAPIKeyoperation to create an API key for a userUserAPIKey,UserAPIKeyWithValue,UserAPIKeyOwner,UserAPIKeyCreatedDataOwnerfeat(user_management)!: Change email field type in user management models
CreateMagicCodeAndReturn,CreateUserInviteOptions,CreateUser,UpdateUser, andCreatePasswordResetTokenmodelsListJWTTemplateoperation to retrieve JWT templatefeat(api_keys): Add organization and user API key models
OrganizationAPIKeyandOrganizationAPIKeyWithValuemodelsAPIKeyWithValuetoOrganizationAPIKeyWithValueListOrganizationAPIKeysreturn type toOrganizationAPIKeyCreateOrganizationAPIKeyreturn type toOrganizationAPIKeyWithValuefeat(authorization): Add pagination order enum and update enum handling
PaginationOrderenum with values: normal, desc, ascVaultByokKeyProviderenum with values: AWS_KMS, GCP_KMS, AZURE_KEY_VAULTPaginationOrderfeat(authorization): Unify BYOK key provider enum
VaultByokKeyDeletedDataKeyProviderandVaultByokKeyVerificationCompletedDataKeyProviderwith unifiedVaultByokKeyProviderenumVaultByokKeyDeletedDatato useVaultByokKeyProviderVaultByokKeyVerificationCompletedDatato useVaultByokKeyProviderfeat(directory_sync): Add name field to directory user models
Namefield toDirectoryUserandDirectoryUserWithGroupsmodelsNamefieldfeat(user_management): Add user field to organization membership models
Userfield toUserOrganizationMembershipandUserOrganizationMembershipBaseListDatamodelsUserfield toOrganizationMembershipmodelfeat(user_management): Add name field to Profile and SSO models
Namefield toProfilemodelNamefieldfix(events): Add admin_portal source to EventContextActorSource
EventContextActorSourceAdminPortalvalue toEventContextActorSourceenumfix(events): Add vault.byok_key.deleted event type
VaultByokKeyDeletedevent modelVaultByokKeyDeletedDataevent data modelTriggered by workos/openapi-spec@a06e54d
BEGIN_COMMIT_OVERRIDE
feat(authorization)!: Rename RoleAssignment to UserRoleAssignment
feat(authorization)!: Change email field type in multiple models
feat(user_management)!: Add user API key management endpoints
feat(user_management)!: Change email field type in user management models
feat(api_keys): Add organization and user API key models
feat(authorization): Add pagination order enum and update enum handling
feat(authorization): Unify BYOK key provider enum
feat(directory_sync): Add name field to directory user models
feat(user_management): Add user field to organization membership models
feat(user_management): Add name field to Profile and SSO models
fix(events): Add admin_portal source to EventContextActorSource
fix(events): Add vault.byok_key.deleted event type
END_COMMIT_OVERRIDE