Skip to content

feat: List Stores Name Filter#265

Merged
jimmyjames merged 2 commits into
mainfrom
chore/sync-generator
Oct 9, 2025
Merged

feat: List Stores Name Filter#265
jimmyjames merged 2 commits into
mainfrom
chore/sync-generator

Conversation

@jimmyjames

@jimmyjames jimmyjames commented Oct 8, 2025

Copy link
Copy Markdown
Contributor

Supports name filter for List Stores (from openfga/sdk-generator#586) and syncs generator changes over.

Description

What problem is being solved?

SDK repo out-of-date with generator.

How is it being solved?

Run the generation and make PR with changes

What changes are made to solve it?

Run the generation and make PR with changes

References

closes #214

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

Summary by CodeRabbit

  • New Features
    • You can now filter List Stores results by name using an optional “name” parameter. Backward-compatible addition.
  • Documentation
    • Added “Custom Headers” guidance, including per-request and default headers.
    • Updated social badge from Twitter to X.
    • Corrected v0.9.0 changelog date.
  • Tests
    • Added coverage to verify List Stores name filtering.
  • Chores
    • Adjusted published package contents by removing a non-essential file from the distribution.
    • Cleaned up repository configuration entries with no impact on runtime.

@jimmyjames
jimmyjames requested review from a team as code owners October 8, 2025 14:45
@coderabbitai

coderabbitai Bot commented Oct 8, 2025

Copy link
Copy Markdown

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Introduces an optional name filter to listStores across the TypeScript client and generated API layers, updates tests and nock helpers to support/query this parameter, and updates docs (README, CHANGELOG). Packaging/manifests drop NOTICE.txt and a Dependabot config reference; README badge text updated.

Changes

Cohort / File(s) Summary
Client and Generated API
api.ts, client.ts
Added optional name parameter to listStores; threaded through Axios param creator, FP/factory, class API, and client PaginationOptions. JSDoc updated.
Tests and Test Helpers
tests/client.test.ts, tests/helpers/nocks.ts, tests/headers.test.ts
New test validates listStores name filter; nock helper listStores accepts optional queryParams (including name) and conditionally applies query(); trivial whitespace in headers.test.ts.
Documentation
README.md, CHANGELOG.md
README: adds Custom Headers section and updates X badge text; CHANGELOG: adjusts v0.9.0 date.
Packaging / Manifests
.openapi-generator/FILES, package.json
Removes NOTICE.txt and .github/dependabot.yaml from generator manifest; drops NOTICE.txt from package.json files array.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Dev as Developer
  participant Client as Client (client.ts)
  participant API as OpenFgaApi (api.ts)
  participant Axios as Axios
  participant Svc as Service

  Dev->>Client: listStores({ pageSize?, continuationToken?, name? })
  Client->>API: listStores(pageSize?, continuationToken?, name?)
  API->>Axios: GET /stores?{page_size,continuation_token,name}
  Axios->>Svc: HTTP Request with optional name query
  Svc-->>Axios: 200 OK (stores possibly filtered by name)
  Axios-->>API: Response
  API-->>Client: Response
  Client-->>Dev: StoresPage

  rect rgba(230,245,255,0.5)
  note over Client,API: New/changed: optional name propagated through layers and query string
  end
Loading
sequenceDiagram
  autonumber
  participant Test as tests/client.test.ts
  participant Nock as nock (tests/helpers/nocks.ts)
  participant Client as Client

  Test->>Nock: getNocks().listStores({ name: "test-store" })
  Note over Nock: Conditionally apply query({ name, ... })
  Test->>Client: listStores({ name: "test-store" })
  Client-->>Test: Asserts filtered response
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly and accurately captures the primary change in this pull request, namely the addition of a name filter to the List Stores API, and avoids extraneous detail or vague language. It aligns directly with the PR objectives and the underlying code changes without introducing noise or ambiguity.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Comment thread package-lock.json
@codecov-commenter

codecov-commenter commented Oct 8, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.43%. Comparing base (557bf4e) to head (ee8994d).

Files with missing lines Patch % Lines
api.ts 77.77% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #265      +/-   ##
==========================================
+ Coverage   88.41%   88.43%   +0.01%     
==========================================
  Files          23       23              
  Lines        1217     1219       +2     
  Branches      216      198      -18     
==========================================
+ Hits         1076     1078       +2     
  Misses         85       85              
  Partials       56       56              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

rhamzeh
rhamzeh previously approved these changes Oct 8, 2025
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​typescript-eslint/​parser@​8.45.0 ⏵ 8.46.01001007197100
Updated@​typescript-eslint/​eslint-plugin@​8.45.0 ⏵ 8.46.099 +110080 +197100
Updated@​types/​node@​24.6.2 ⏵ 24.7.0100 +110081 +196100

View full report

@socket-security

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
[email protected] has a License Policy Violation.

License: CC-BY-4.0 (npm metadata)

License: CC-BY-4.0 (package/LICENSE)

License: CC-BY-4.0 (package/package.json)

From: package-lock.jsonnpm/[email protected]npm/[email protected]npm/[email protected]

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@jimmyjames
jimmyjames added this pull request to the merge queue Oct 9, 2025
Merged via the queue into main with commit a61ccf6 Oct 9, 2025
21 checks passed
@jimmyjames
jimmyjames deleted the chore/sync-generator branch October 9, 2025 14:06
@openfga-releaser-bot openfga-releaser-bot Bot mentioned this pull request Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support passing name filter to ListStores

3 participants