feat!(generated): regenerate from spec (7 changes)#248
feat!(generated): regenerate from spec (7 changes)#248workos-sdk-automation[bot] wants to merge 1 commit intomainfrom
Conversation
Greptile SummaryThis is a large auto-generated SDK update regenerated from the OpenAPI spec, covering seven distinct feature areas: org/user API key type restructuring, user API key and JWT template operations, directory user
Confidence Score: 3/5Not safe to merge without addressing the silent breaking rename of VaultByokKeyVerificationCompletedData.KeyProvider's type One P1 (unannounced breaking type rename on a public API surface) pulls the score below 4; the two P2s are minor but confirm this warrants another generator pass before release src/WorkOS.net/Entities/VaultByokKeyVerificationCompletedData.cs — type of KeyProvider changed in a breaking, undocumented way Important Files Changed
|
| /// <summary>The external key provider used for BYOK.</summary> | ||
| [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] |
There was a problem hiding this comment.
Breaking type rename on
KeyProvider property
VaultByokKeyVerificationCompletedData.KeyProvider was previously typed as VaultByokKeyVerificationCompletedDataKeyProvider; that enum has been removed and the property now uses VaultByokKeyDeletedDataKeyProvider. Any consumer code that references the old type by name (e.g. case VaultByokKeyVerificationCompletedDataKeyProvider.AwsKms:) will fail to compile after upgrading — even though the enum values are identical. This is an unannounced breaking API-surface change not called out in the PR description, which only mentions VaultByokKeyDeletedDataKeyProvider as a new addition.
| // This file is auto-generated by oagen. Do not edit. | ||
|
|
||
| namespace WorkOS | ||
| { | ||
| using System.Collections.Generic; | ||
|
|
||
| /// <summary>Represents a create user api key.</summary> | ||
| public class CreateUserApiKey | ||
| { | ||
|
|
||
| /// <summary>A descriptive name for the API key.</summary> | ||
| public string Name { get; set; } = default!; | ||
|
|
||
| /// <summary>The ID of the organization the user API key is associated with. The user must have an active membership in this organization.</summary> | ||
| public string OrganizationId { get; set; } = default!; | ||
|
|
||
| /// <summary>The permission slugs to assign to the API key. Each permission must be enabled for user API keys.</summary> | ||
| public List<string>? Permissions { get; set; } | ||
| } | ||
| } |
There was a problem hiding this comment.
CreateUserApiKey entity is unreferenced dead code
This class is not used anywhere in service or client code — UserManagementService.CreateApiKeyAsync accepts UserManagementCreateApiKeyOptions (which carries the same three fields: Name, OrganizationId, Permissions). CreateUserApiKey only appears in the generated manifest. Shipping a public class that mirrors a request-options class adds API-surface noise and may confuse consumers about which type to use when creating user API keys.
|
|
||
| /// <summary>Get JWT template</summary> | ||
| /// <remarks> | ||
| /// Get the JWT template for the current environment. | ||
| /// </remarks> | ||
| /// <param name="requestOptions">Per-request configuration overrides.</param> | ||
| /// <param name="cancellationToken">Cancellation token.</param> | ||
| /// <returns>The <see cref="JWTTemplateResponse"/> result.</returns> | ||
| public virtual async Task<JWTTemplateResponse> ListJWTTemplateAsync(RequestOptions? requestOptions = null, CancellationToken cancellationToken = default) | ||
| { |
There was a problem hiding this comment.
ListJWTTemplateAsync name doesn't match the operation semantics
The method name starts with List, but the underlying call is GET /user_management/jwt_template and it returns a single JWTTemplateResponse, not a collection. The existing UpdateJWTTemplateAsync follows a <Verb>JWTTemplate pattern; a name like GetJWTTemplateAsync would be consistent with that pattern and avoid confusion with the auto-paging List*AutoPagingAsync helpers elsewhere in the service.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| /// <summary>The entity that owns the API Key.</summary> | ||
| public ApiKeyCreatedDataOwner Owner { get; set; } = default!; | ||
|
|
||
| /// <summary>A descriptive name for the API Key.</summary> |
There was a problem hiding this comment.
Owner typed as ApiKeyCreatedDataOwner instead of a dedicated org-owner type
OrganizationApiKey.Owner (and OrganizationApiKeyWithValue.Owner) is typed as ApiKeyCreatedDataOwner — a class originally scoped to event-data contexts. The PR description mentions adding OrganizationApiKeyOwner, but that class was never generated. While the JSON structure is currently identical (type, id), reusing the event-data owner type couples two separate API surfaces. If the org-owner shape diverges in a future spec change, it would require a breaking rename here.
Summary
feat!(api_keys): Restructure API key types for orgs and users
ApiKeyWithValue,ApiKeyList,ApiKeyWithValueOwner, andApiKeyListListMetadataclassesOrganizationApiKey,OrganizationApiKeyWithValue,OrganizationApiKeyOwner,UserApiKey,UserApiKeyWithValue,UserApiKeyOwnerclasses for type-specific API keysApiKey.ownerfield type, affecting all API key event classes (ApiKeyCreatedData,ApiKeyRevokedData)ApiKeysService.ListOrganizationApiKeysAsync()andCreateOrganizationApiKeyAsync()response types to useOrganizationApiKeyandOrganizationApiKeyWithValuefeat(user_management): Add user API key and JWT template operations
ListApiKeysAsync()andCreateApiKeyAsync()methods to list and create API keys for usersListJWTTemplateAsync()method to retrieve the JWT template for the environmentUserManagementListApiKeysOptionsandUserManagementCreateApiKeyOptionsrequest classesCreateUserApiKeyrequest model for API key creationfeat(directory_sync): Add name field to directory user models
namefield toDirectoryUserclassnamefield toDirectoryUserWithGroupsclassnamefield toDsyncUserUpdatedDataclassfeat!(user_management): Add user field to organization membership models
userfield (User object) toOrganizationMembershipclassuserfield (User object) toUserOrganizationMembershipclassuserfield (User object) toUserOrganizationMembershipBaseListDataclassfeat(sso): Add name field to user profile
namefield toProfileclass to expose the user's full namefeat(vault): Add BYOK key deleted event support
VaultByokKeyDeletedevent class for thevault.byok_key.deletedeventVaultByokKeyDeletedDataclass containing organization ID and key provider informationVaultByokKeyDeletedDataKeyProviderenum for external key provider typesfeat(events): Add ADMIN_PORTAL event source
AdminPortalvalue toEventContextActorSourceenumAdminPortalvalue toFlagCreatedContextActorSourceenumAdminPortalvalue toFlagDeletedContextActorSourceenumAdminPortalvalue toFlagRuleUpdatedContextActorSourceenumAdminPortalvalue toFlagUpdatedContextActorSourceenumTriggered by workos/openapi-spec@058a0a4
BEGIN_COMMIT_OVERRIDE
feat!(api_keys): Restructure API key types for orgs and users
feat(user_management): Add user API key and JWT template operations
feat(directory_sync): Add name field to directory user models
feat!(user_management): Add user field to organization membership models
feat(sso): Add name field to user profile
feat(vault): Add BYOK key deleted event support
feat(events): Add ADMIN_PORTAL event source
END_COMMIT_OVERRIDE