Skip to content

feat: support fc_ API keys in notification client#202

Merged
jbiskur merged 1 commit intomainfrom
feat/fc-key-notification-support
Mar 30, 2026
Merged

feat: support fc_ API keys in notification client#202
jbiskur merged 1 commit intomainfrom
feat/fc-key-notification-support

Conversation

@jbiskur
Copy link
Copy Markdown
Contributor

@jbiskur jbiskur commented Mar 30, 2026

Summary

  • Make apiKeyId optional in NotificationClientAuthOptionsApiKey
  • When apiKeyId is not provided (fc_ key format), only send api_key query param to the WebSocket endpoint
  • FlowcoreClient already handles fc_ keys by parsing keyId from the prefix — this aligns the notification client

Context

The service-tenant-api /notifications endpoint (commit ab60ef4) already supports fc_ format API keys with just the api_key query parameter. The SDK notification client was still unconditionally requiring and sending api_key_id, causing WebSocket connections to fail for fc_ keys.

Changes

  • src/common/notification-client.ts: apiKeyId is now optional, conditionally included in query params

Backward Compatible

Legacy api_key + api_key_id format continues to work unchanged.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • API-key authentication now supports optional API key ID, allowing users to authenticate without providing this parameter.

The notification WebSocket client now handles fc_ format API keys
(e.g., fc_keyId_secret) by sending only the api_key query parameter.
The apiKeyId is optional — when omitted for fc_ keys, the tenant API
parses the key ID from the fc_ prefix format.

This aligns with service-tenant-api commit ab60ef4 which added
fc_ key support to the /notifications endpoint.

Backward compatible: legacy api_key + api_key_id still works.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 30, 2026

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 84358eb8-d767-4975-94c5-588367388154

📥 Commits

Reviewing files that changed from the base of the PR and between 76780fc and ed9cf4f.

📒 Files selected for processing (1)
  • src/common/notification-client.ts

📝 Walkthrough

Walkthrough

The change updates the NotificationClient to make apiKeyId optional in the API-key authentication interface. Connection setup now conditionally passes apiKeyId to FlowcoreClient and sets the URL query parameter only when apiKeyId is explicitly provided, replacing prior unconditional handling.

Changes

Cohort / File(s) Summary
Notification Client Authentication
src/common/notification-client.ts
Made apiKeyId optional in NotificationClientAuthOptionsApiKey interface; modified connection setup to conditionally pass apiKeyId to FlowcoreClient and set URL query parameter only when provided.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰 A hop, a skip, a twist so fine,
Where optional keys now intertwine,
No more demanding what's not there,
The client's lighter, fresh as air! 🔑✨

🚥 Pre-merge checks | ✅ 3
✅ 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 'feat: support fc_ API keys in notification client' accurately captures the main change: enabling support for a new API key format (fc_ keys) in the notification client. It is clear, specific, and directly related to the primary objective of making apiKeyId optional and allowing the client to work with fc_ formatted keys.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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 feat/fc-key-notification-support

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.

@jbiskur jbiskur merged commit e01b868 into main Mar 30, 2026
1 of 2 checks passed
@jbiskur jbiskur deleted the feat/fc-key-notification-support branch March 30, 2026 10:36
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.

1 participant