Skip to content

refactor(frontier): move SearchOrganizationTokens to FrontierService#482

Merged
paanSinghCoder merged 1 commit intomainfrom
refactor/search-org-tokens-to-frontier-service
Apr 22, 2026
Merged

refactor(frontier): move SearchOrganizationTokens to FrontierService#482
paanSinghCoder merged 1 commit intomainfrom
refactor/search-org-tokens-to-frontier-service

Conversation

@paanSinghCoder
Copy link
Copy Markdown
Contributor

@paanSinghCoder paanSinghCoder commented Apr 21, 2026

Summary

  • Move `SearchOrganizationTokens` RPC from `AdminService` → `FrontierService` so org admins (not only platform super-users) can list their own org's token transactions
  • Request/response shape preserved: nested `OrganizationToken` projection + `RQLQueryPaginationResponse` + `RQLQueryGroupResponse`.

Follow-up

A corresponding frontier PR will:

  • Bump `PROTON_COMMIT` and regenerate Go protos.
  • Swap the `authorization.go` entry from `IsSuperUser` to `IsAuthorized(org, UpdatePermission)`.
  • Update the admin dashboard Tokens page from `AdminServiceQueries.searchOrganizationTokens` → `FrontierServiceQueries.searchOrganizationTokens`.
  • Rewrite the views-new SDK Tokens page from `listBillingTransactions` (non-RQL, client mode) to `searchOrganizationTokens` with `useInfiniteQuery` + server-mode sort/filter.

Test plan

  • `buf build` / `buf lint` pass
  • Downstream consumers (frontier Go, @raystack/proton JS) regenerate cleanly

🤖 Generated with Claude Code

Move the RPC from AdminService to FrontierService so org admins (not only
platform superusers) can list their own org's token transactions.

Request/response shape is preserved from the admin version (nested
OrganizationToken projection + RQLQueryPaginationResponse +
RQLQueryGroupResponse).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow Validate / validate (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed⏩ skipped✅ passed✅ passedApr 21, 2026, 8:18 AM

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 21, 2026

📝 Walkthrough

Walkthrough

The SearchOrganizationTokens RPC endpoint and its associated message definitions (SearchOrganizationTokensRequest and SearchOrganizationTokensResponse) have been relocated from the AdminService to the FrontierService in the Frontier API protobuf definitions. The SearchOrganizationTokensResponse includes nested OrganizationToken messages containing token metadata including amount, type, description, user information, creation timestamp, and organization ID. No functional changes to the endpoint behavior or message structure were made; this is a migration of the API surface between services.

Suggested reviewers

  • rsbh
  • whoAbhishekSah
  • AmanGIT07
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: moving SearchOrganizationTokens RPC from AdminService to FrontierService, which matches the changeset exactly.
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.
Description check ✅ Passed The PR description clearly explains the purpose of moving SearchOrganizationTokens from AdminService to FrontierService, directly relating to the changeset shown in the raw summary.

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


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.

@paanSinghCoder paanSinghCoder merged commit 3b6b44c into main Apr 22, 2026
3 checks passed
@paanSinghCoder paanSinghCoder deleted the refactor/search-org-tokens-to-frontier-service branch April 22, 2026 08:07
paanSinghCoder added a commit to raystack/frontier that referenced this pull request Apr 22, 2026
Updates PROTON_COMMIT to the merge commit of raystack/proton#482 and
bumps @raystack/proton npm pin to the same SHA. Regen produces no
.pb.go diff since proton branch SHA and proton main merge SHA have
identical content.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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