Skip to content

feat(generated): update generated SDK from spec changes#533

Closed
workos-sdk-automation[bot] wants to merge 1 commit into
mainfrom
oagen/spec-update-9998aeaecba4f3635f8beda2e3248f5a24b7e93f
Closed

feat(generated): update generated SDK from spec changes#533
workos-sdk-automation[bot] wants to merge 1 commit into
mainfrom
oagen/spec-update-9998aeaecba4f3635f8beda2e3248f5a24b7e93f

Conversation

@workos-sdk-automation
Copy link
Copy Markdown
Contributor

Summary

update generated SDK from spec changes

Spec Diff

  • Added: | Removed: | Modified: | Breaking:

Triggered by openapi-spec commit: 9998aeaecba4f3635f8beda2e3248f5a24b7e93f

@workos-sdk-automation workos-sdk-automation Bot added the autogenerated Autogenerated code or content label Apr 27, 2026
@workos-sdk-automation workos-sdk-automation Bot requested review from a team as code owners April 27, 2026 21:21
@workos-sdk-automation workos-sdk-automation Bot requested review from mthadley and removed request for a team April 27, 2026 21:21
@workos-sdk-automation workos-sdk-automation Bot added the autogenerated Autogenerated code or content label Apr 27, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 27, 2026

Greptile Summary

This is an auto-generated SDK update that adds new Groups and WaitlistUser APIs, expands SSO/auth providers, introduces DomainVerificationIntentOptions, and syncs new webhook events. It also contains several spec-driven renames across authorization.go and admin_portal.go.

  • The PR description marks Breaking: as empty, but there are multiple compile-time breaking changes: 11 exported AuthorizationService method renames, corresponding param-struct renames, AdminEmailsItContactEmails field/JSON-key rename, and removal of the exported EventSchemaData, EventSchemaContextActor, EventSchemaContext, and EventSchemaContextActorSource types. Any downstream consumer upgrading this SDK without code changes will get compile errors.
  • UpdateGroup is aliased to UpdateAuthorizationPermission; the fields happen to match today (Name, Description), but the coupling is fragile and the comment is misleading.

Confidence Score: 3/5

Not safe to merge without explicitly acknowledging the breaking API changes and communicating them to SDK consumers.

Three separate P1 findings: a public field rename (AdminEmails→ItContactEmails), 11 exported method/struct renames in AuthorizationService, and removal of four exported types — all undocumented as breaking in the PR metadata. The new Groups/WaitlistUser additions are clean, but the unacknowledged breakage warrants a score below the P1 ceiling.

authorization.go (11 method/struct renames), admin_portal.go and models.go (AdminEmails→ItContactEmails rename), models.go and enums.go (removal of EventSchema* types)

Important Files Changed

Filename Overview
admin_portal.go Renames AdminEmailsItContactEmails (field + JSON key) — a public breaking change not flagged in the PR metadata
authorization.go Renames 11 exported methods and their param structs; adds ResourceExternalID filter to ListResources — all renames are compile-time breaking for existing consumers
models.go Adds Group, WaitlistUser, DomainVerificationIntentOptions, and waitlist event types; removes EventSchemaData/EventSchemaContextActor/EventSchemaContext (breaking); UpdateGroup alias to UpdateAuthorizationPermission is structurally valid but semantically odd
groups.go New generated file implementing GroupService with CRUD operations and membership management for the Groups API — implementation is clean and consistent with the rest of the SDK
groups_test.go New test file for GroupService; references testdata/group.json which pre-exists in the repo, so all fixtures resolve correctly
user_management_organization_membership_groups.go New generated file for listing groups a membership belongs to; straightforward iterator implementation
enums.go Adds WaitlistUserState enum, waitlist webhook event constants, GroupsOrder alias, and expands SSOProvider/AuthenticationProvider with new OAuth providers; removes EventSchemaContextActorSource alias (breaking)
workos.go Registers GroupService and UserManagementOrganizationMembershipGroupService on the Client with appropriate accessor methods
sso.go Minor doc-string update to reflect that Provider now supports many OAuth providers, not just the original four

Class Diagram

%%{init: {'theme': 'neutral'}}%%
classDiagram
    class Client {
        +Groups() GroupService
        +UserManagementOrganizationMembershipGroups() UMOMGroupService
    }
    class GroupService {
        +ListOrganizationGroups()
        +CreateOrganizationGroup()
        +GetOrganizationGroup()
        +UpdateOrganizationGroup()
        +DeleteOrganizationGroup()
        +ListOrganizationMemberships()
        +CreateOrganizationMembership()
        +DeleteOrganizationMembership()
    }
    class UMOMGroupService {
        +ListOrganizationMembershipGroups()
    }
    class AuthorizationService {
        +ListResourcesForMembership() [renamed]
        +ListEffectivePermissions() [renamed]
        +ListRoleAssignments() [renamed]
        +RemoveRoleAssignment() [renamed]
        +AddOrganizationRolePermission() [renamed]
        +SetOrganizationRolePermissions() [renamed]
        +GetResourceByExternalID() [renamed]
        +DeleteResourceByExternalID() [renamed]
        +ListMembershipsForResourceByExternalID() [renamed]
    }
    Client --> GroupService
    Client --> UMOMGroupService
    Client --> AuthorizationService
Loading

Comments Outside Diff (3)

  1. admin_portal.go, line 774 (link)

    P1 Breaking field rename: AdminEmailsItContactEmails

    AdminPortalGenerateLinkParams.AdminEmails is a public exported field. Renaming it to ItContactEmails with a new JSON key (it_contact_emails) is a compile-time breaking change for any SDK consumer that was populating AdminEmails. The PR description marks Breaking: as empty, but this rename silently drops populated values for existing callers who don't update their code.

  2. authorization.go, line 802 (link)

    P1 Breaking method/type renames in public API

    This PR renames multiple exported methods and their corresponding param structs in AuthorizationService:

    • ListOrganizationMembershipResourcesListResourcesForMembership (+ param struct rename)
    • ListResourcePermissionsListEffectivePermissions (+ param struct rename)
    • ListOrganizationMembershipRoleAssignmentsListRoleAssignments (+ param struct rename)
    • DeleteOrganizationMembershipRoleAssignmentRemoveRoleAssignment
    • CreateRolePermissionAddOrganizationRolePermission (+ param struct rename)
    • UpdateRolePermissionsSetOrganizationRolePermissions (+ param struct rename)
    • DeleteRolePermissionRemoveOrganizationRolePermission
    • GetOrganizationResourceGetResourceByExternalID
    • UpdateOrganizationResourceUpdateResourceByExternalID (+ param struct rename)
    • DeleteOrganizationResourceDeleteResourceByExternalID (+ param struct rename)
    • ListResourceOrganizationMembershipsListMembershipsForResourceByExternalID (+ param struct rename)

    Every one of these is a compile-time breaking change for existing SDK consumers. The PR description's Breaking: field is blank, which appears incorrect and may cause consumers to merge and upgrade without expecting breakage.

  3. models.go, line 1794-1795 (link)

    P2 Suspicious type alias

    UpdateGroup is aliased to UpdateAuthorizationPermission. While both structs happen to share Name *string and Description *string fields, the alias comment is misleading and the conceptual coupling is unexpected — updating a group has nothing to do with updating an authorization permission. If the underlying schema for either type diverges in the future, this alias will silently break one of them. Consider defining UpdateGroup as its own standalone struct.

    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!

Reviews (1): Last reviewed commit: "fix(generated): update generated SDK fro..." | Re-trigger Greptile

Comment thread models.go
@@ -5431,27 +5530,6 @@ type ConnectApplicationRedirectURI struct {
Default bool `json:"default"`
}
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.

P1 Removed public types are a breaking change

This PR removes the following exported types: EventSchemaData, EventSchemaContextActor, EventSchemaContext (models.go) and EventSchemaContextActorSource (enums.go). Any SDK consumer that referenced these types will get compile errors after upgrading. These removals should be flagged as breaking changes in the PR metadata.

@gjtorikian gjtorikian changed the title fix(generated): update generated SDK from spec changes feat(generated): update generated SDK from spec changes Apr 27, 2026
@gjtorikian gjtorikian closed this Apr 28, 2026
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