Skip to content

feat!: remove search param from listResources#1591

Open
atainter wants to merge 1 commit into
mainfrom
at-remove-search-list-resources
Open

feat!: remove search param from listResources#1591
atainter wants to merge 1 commit into
mainfrom
at-remove-search-list-resources

Conversation

@atainter
Copy link
Copy Markdown
Contributor

@atainter atainter commented May 15, 2026

Removing fuzzy search parameter due to no production usage and concerns of performance issues for customers with many resource instances.

Summary

  • Removes the search parameter from ListAuthorizationResourcesOptions and SerializedListAuthorizationResourcesOptions interfaces
  • Removes the search serialization from serializeListAuthorizationResourcesOptions
  • Removes the corresponding 'passes search filter' test from the spec

Test plan

  • TypeScript compiles cleanly (tsc --noEmit)
  • Existing listResources tests pass

🤖 Generated with Claude Code

BREAKING CHANGE: search parameter removed from listResources

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@atainter atainter requested review from a team as code owners May 15, 2026 23:13
@atainter atainter requested a review from csrbarber May 15, 2026 23:13
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

📝 Walkthrough

Walkthrough

The PR removes support for the search query parameter from the WorkOS authorization listResources API. The optional search property is removed from the options interfaces, the serializer no longer maps it to requests, and the corresponding test case is deleted.

Changes

Search parameter removal from listResources

Layer / File(s) Summary
Search parameter removal from options contract
src/authorization/interfaces/list-authorization-resources-options.interface.ts
The optional search?: string property is removed from both ListAuthorizationResourcesOptions and SerializedListAuthorizationResourcesOptions interface definitions.
Serializer update for search removal and parent_external_id serialization
src/authorization/serializers/list-authorization-resources-options.serializer.ts
The serializeListAuthorizationResourcesOptions function removes search field serialization and updates the mapping to serialize parentExternalId into parent_external_id when present.
Test removal for search filter
src/authorization/authorization.spec.ts
The test case verifying the search: 'Budget' filter behavior in listResources is removed from the test suite.

Possibly related PRs

  • workos/workos-node#1553: Both PRs affect listResources query-parameter handling via serializeListAuthorizationResourcesOptions and its test cases—this PR removes search serialization from the options contract, while the related PR standardizes pagination and order filters.

Suggested reviewers

  • cmatheson
  • blairworkos
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning PR description provides clear rationale but lacks documentation impact assessment required by template. Address the documentation section of the template by explicitly stating whether docs updates are required for this breaking change removal.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: removing the search parameter from listResources, which aligns perfectly with the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch at-remove-search-list-resources

Comment @coderabbitai help to get the list of available commands and usage tips.

@atainter atainter changed the title feat(authorization): remove search param from listResources feat!: remove search param from listResources May 15, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 15, 2026

Greptile Summary

This PR removes the search query parameter from the listResources authorization API — deleting it from the public TypeScript interface, the serializer, and the corresponding test. The change is internally consistent with no leftover references.

  • ListAuthorizationResourcesOptions and SerializedListAuthorizationResourcesOptions no longer expose a search field, and the serializer no longer spreads search into the outgoing query params.
  • The 'passes search filter' test case is removed in lock-step; all other listResources tests are unaffected.

Confidence Score: 4/5

Safe to merge once the breaking-change commit convention is addressed; the code changes themselves are complete and internally consistent.

The three changed files are fully in sync — interface, serializer, and test all drop search together with no orphaned references remaining. The one item worth addressing before merging is that ListAuthorizationResourcesOptions is part of the publicly exported API, so removing an existing field is a breaking change for TypeScript consumers and should be communicated via the conventional-commit BREAKING CHANGE footer to trigger the correct semver major bump and CHANGELOG entry.

The interface file src/authorization/interfaces/list-authorization-resources-options.interface.ts is the only one that warrants a second look, specifically regarding how this removal is communicated to consumers in the release notes.

Important Files Changed

Filename Overview
src/authorization/interfaces/list-authorization-resources-options.interface.ts Removes the optional search field from both ListAuthorizationResourcesOptions and SerializedListAuthorizationResourcesOptions interfaces; change is clean and consistent.
src/authorization/serializers/list-authorization-resources-options.serializer.ts Removes the search spread from the serializer; remaining serialization logic is unchanged and correct.
src/authorization/authorization.spec.ts Removes the 'passes search filter' test case; no orphaned references to search remain in the spec.

Sequence Diagram

sequenceDiagram
    participant Caller
    participant listResources
    participant serializeListAuthorizationResourcesOptions
    participant WorkOS API

    Caller->>listResources: "{ organizationId?, resourceTypeSlug?,<br/>parentResourceId?, parentResourceTypeSlug?,<br/>parentExternalId? }"
    Note over listResources: search param no longer accepted
    listResources->>serializeListAuthorizationResourcesOptions: options
    serializeListAuthorizationResourcesOptions-->>listResources: "{ organization_id?, resource_type_slug?,<br/>parent_resource_id?, parent_resource_type_slug?,<br/>parent_external_id?, ...pagination }"
    listResources->>WorkOS API: GET /authorization/resources?...
    WorkOS API-->>Caller: ListAuthorizationResourcesResponse
Loading

Comments Outside Diff (1)

  1. src/authorization/interfaces/list-authorization-resources-options.interface.ts, line 3-9 (link)

    P2 Breaking change not marked as such in commit convention

    ListAuthorizationResourcesOptions is re-exported from src/index.ts as part of the public API surface. Removing search?: string from it means any TypeScript consumer that currently passes { search: '...' } to listResources will get a compile error after upgrading. Under the project's conventional-commit / semantic-release setup, a plain feat(authorization): prefix triggers a minor bump, not a major one. A feat! footer (BREAKING CHANGE: search parameter removed from listResources) is needed to signal a semver-major bump and generate the breaking-change section in the CHANGELOG.

Reviews (1): Last reviewed commit: "feat(authorization): remove search param..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant