Skip to content

feat: add events SSE streaming, bulk refresh token revocation, and query string builder#1331

Merged
developerkunal merged 2 commits into
masterfrom
fern-bot/2026-04-29_04-27-31_051
Apr 30, 2026
Merged

feat: add events SSE streaming, bulk refresh token revocation, and query string builder#1331
developerkunal merged 2 commits into
masterfrom
fern-bot/2026-04-29_04-27-31_051

Conversation

@fern-api
Copy link
Copy Markdown
Contributor

@fern-api fern-api Bot commented Apr 29, 2026

Changes

  • Added client.events.subscribe() endpoint for subscribing to events via Server-Sent Events (SSE), with filtering by event_type and cursor-based positioning via from/from_timestamp
  • Added client.refreshTokens.revoke() endpoint for bulk revocation of refresh tokens by ID list, user, user+client, or client
  • Added new Stream class in core for SSE response handling with async iteration support
  • Introduced QueryStringBuilder to replace inline queryParameters objects, enabling proper serialization of array query params (migrated all client methods)
  • Added GoneError (HTTP 410) error type
  • Added strategy filter to connections.list and clients.connections.get
  • Added hydrate parameter to flows.list, flows.get, forms.list, forms.get, and flows.executions.get
  • Added search parameter to groups.list
  • Added identifiers filter to resourceServers.list
  • Added grant_ids filter to organizations.clientGrants.list
  • Added authorization_policy field to resource server create/update
  • Added identifiers field to branding update
  • Renamed "Self-Service SSO" to "Self-Service Enterprise Configuration" throughout docs and JSDoc
  • Added header redaction support in the HTTP fetcher
  • Bumped dependency versions in yarn.lock

Usage: Events SSE Streaming

const stream = await client.events.subscribe({
    event_type: ["user.created", "user.updated", "user.deleted"],
});

for await (const event of stream) {
    console.log(`[${event.type}]`, event.event?.type);
}

References

Automated SDK regeneration by Fern.

Testing

  • This change adds unit test coverage
  • This change adds integration test coverage

Checklist

@fern-api fern-api Bot requested a review from a team as a code owner April 29, 2026 04:27
Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

❌ Patch coverage is 95.62682% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.52%. Comparing base (76d9f3b) to head (466abe6).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/management/core/stream/Stream.ts 82.60% 20 Missing ⚠️
...c/management/api/resources/events/client/Client.ts 91.22% 5 Missing ⚠️
...ement/api/resources/refreshTokens/client/Client.ts 90.00% 4 Missing ⚠️
...urces/jobs/resources/usersImports/client/Client.ts 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1331      +/-   ##
==========================================
+ Coverage   89.42%   89.52%   +0.10%     
==========================================
  Files         384      390       +6     
  Lines       18334    18701     +367     
  Branches     8757     8846      +89     
==========================================
+ Hits        16396    16743     +347     
- Misses       1934     1958      +24     
+ Partials        4        0       -4     
Flag Coverage Δ
alltests 89.52% <95.62%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/management/Client.ts 97.16% <100.00%> (+0.06%) ⬆️
src/management/api/errors/GoneError.ts 100.00% <100.00%> (ø)
src/management/api/errors/index.ts 100.00% <100.00%> (ø)
.../management/api/resources/actions/client/Client.ts 88.80% <100.00%> (ø)
...rces/actions/resources/executions/client/Client.ts 90.69% <100.00%> (ø)
...sources/actions/resources/modules/client/Client.ts 89.53% <100.00%> (ø)
...ources/modules/resources/versions/client/Client.ts 90.32% <100.00%> (ø)
...ources/actions/resources/triggers/client/Client.ts 90.90% <100.00%> (ø)
...urces/triggers/resources/bindings/client/Client.ts 89.88% <100.00%> (ø)
...ources/actions/resources/versions/client/Client.ts 89.83% <100.00%> (ø)
... and 119 more
🚀 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.

@developerkunal developerkunal changed the title SDK regeneration feat: add events SSE streaming, bulk refresh token revocation, and query string builder Apr 29, 2026
Copy link
Copy Markdown
Contributor

@developerkunal developerkunal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@developerkunal developerkunal enabled auto-merge (squash) April 29, 2026 17:09
@developerkunal developerkunal merged commit 0a58e05 into master Apr 30, 2026
10 checks passed
@developerkunal developerkunal deleted the fern-bot/2026-04-29_04-27-31_051 branch April 30, 2026 02:05
@amitsingh05667 amitsingh05667 mentioned this pull request Apr 30, 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.

2 participants