Skip to content

feat(generated)!: regenerate from spec (4 changes)#391

Open
workos-sdk-automation[bot] wants to merge 1 commit into
mainfrom
oagen/spec-update-eb5bcc44eddeb6ad299608224cfcfcaa74db966e
Open

feat(generated)!: regenerate from spec (4 changes)#391
workos-sdk-automation[bot] wants to merge 1 commit into
mainfrom
oagen/spec-update-eb5bcc44eddeb6ad299608224cfcfcaa74db966e

Conversation

@workos-sdk-automation
Copy link
Copy Markdown
Contributor

Summary

feat(authorization)!: Remove search parameter from listResources

  • Removed optional search parameter from listResources() method
  • This parameter is no longer supported for filtering resources by name
  • Updated corresponding test assertions

feat(authorization): Add resource filtering to listRoleAssignments

  • Added optional resourceId parameter to filter assignments by resource ID
  • Added optional resourceExternalId parameter to filter by resource external ID
  • Added optional resourceTypeSlug parameter to filter by resource type slug

feat(authorization): Add role_slug filtering to role assignment methods

  • Added optional roleSlug parameter to listRoleAssignmentsForResource() method
  • Added optional roleSlug parameter to listRoleAssignmentsForResourceByExternalId() method
  • Enables filtering role assignments by role slug in both methods

fix(sso): Update loginHint parameter documentation

  • Updated docstring for loginHint parameter to include custom SAML connections
  • Now documents support for OAuth, OpenID Connect, Okta, Entra ID, and custom SAML connections

Triggered by workos/openapi-spec@eb5bcc4

BEGIN_COMMIT_OVERRIDE
feat(authorization)!: Remove search parameter from listResources
feat(authorization): Add resource filtering to listRoleAssignments
feat(authorization): Add role_slug filtering to role assignment methods
fix(sso): Update loginHint parameter documentation
END_COMMIT_OVERRIDE

@workos-sdk-automation workos-sdk-automation Bot added the autogenerated Autogenerated code or content label May 18, 2026
@workos-sdk-automation workos-sdk-automation Bot requested review from a team as code owners May 18, 2026 17:55
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 18, 2026

Greptile Summary

This is a spec-generated update to the WorkOS PHP SDK that adds filtering parameters to authorization role-assignment methods, removes the deprecated search parameter from listResources, and updates a docstring in the SSO service.

  • listRoleAssignments() gains three optional resource-filtering query params (resourceId, resourceExternalId, resourceTypeSlug), inserted before the existing $options parameter — a positional-argument breaking change for callers who pass $options without a named argument.
  • listRoleAssignmentsForResource() and listRoleAssignmentsForResourceByExternalId() each gain an optional roleSlug filter, also inserted before $options.
  • listResources() has $search fully removed (breaking), with matching test cleanup.

Confidence Score: 4/5

Safe to merge; all changes are additive optional parameters or a documented removal, with full test coverage.

The new filter parameters are inserted immediately before the final $options parameter in three methods. Any caller passing $options positionally will have it land in the new string parameter instead, causing a runtime TypeError. The removal of search from listResources is intentional and consistently cleaned up.

lib/Service/Authorization.php — confirm no existing callers pass $options positionally in the three modified methods.

Important Files Changed

Filename Overview
lib/Service/Authorization.php Adds optional resource/role-slug filter params to three listing methods and removes the search param from listResources; all new params sit before $options, which is a positional breaking change for callers not using named arguments.
tests/Service/AuthorizationTest.php Tests updated consistently with the service changes: new params exercised via named arguments, all new query-string keys asserted, search assertion removed.
lib/Service/SSO.php Doc-only update: loginHint parameter comment now lists custom SAML connections as a supported connection type alongside OAuth, OpenID Connect, Okta, and Entra ID.

Sequence Diagram

sequenceDiagram
    participant Caller
    participant Authorization
    participant WorkOS API

    Note over Caller,WorkOS API: listRoleAssignments (updated)
    Caller->>Authorization: listRoleAssignments(orgMembershipId, resourceId?, resourceExternalId?, resourceTypeSlug?)
    Authorization->>WorkOS API: GET /authorization/organization_memberships/{id}/role_assignments
    WorkOS API-->>Caller: PaginatedResponse<UserRoleAssignment>

    Note over Caller,WorkOS API: listRoleAssignmentsForResource (updated)
    Caller->>Authorization: listRoleAssignmentsForResource(resourceId, roleSlug?)
    Authorization->>WorkOS API: GET /authorization/resources/{id}/role_assignments?role_slug=
    WorkOS API-->>Caller: PaginatedResponse<UserRoleAssignment>

    Note over Caller,WorkOS API: listResources (breaking: search removed)
    Caller->>Authorization: listResources(parent?, organizationId?, resourceTypeSlug?, resourceExternalId?)
    Authorization->>WorkOS API: GET /authorization/resources (no search param)
    WorkOS API-->>Caller: PaginatedResponse<AuthorizationResource>
Loading

Reviews (1): Last reviewed commit: "feat(generated)!: regenerate from spec (..." | Re-trigger Greptile

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.

0 participants