Skip to content

refactor(frontier): move SearchOrganizationTokens to FrontierService#482

Open
paanSinghCoder wants to merge 1 commit intomainfrom
refactor/search-org-tokens-to-frontier-service
Open

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

Conversation

@paanSinghCoder
Copy link
Copy Markdown
Contributor

Summary

  • Move `SearchOrganizationTokens` RPC from `AdminService` → `FrontierService` so org admins (not only platform super-users) can list their own org's token transactions — mirrors refactor(frontier): move SearchOrganizationInvoices to FrontierService #476 for invoices.
  • 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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bb64ab31-04da-478b-a44d-a7d92d24d0c5

📥 Commits

Reviewing files that changed from the base of the PR and between 0a6c0b4 and 70a6d44.

📒 Files selected for processing (2)
  • raystack/frontier/v1beta1/admin.proto
  • raystack/frontier/v1beta1/frontier.proto
💤 Files with no reviewable changes (1)
  • raystack/frontier/v1beta1/admin.proto

📝 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.
Description check ✅ Passed The description is directly related to the changeset, explaining the purpose of moving the RPC, preserving the request/response shape, and outlining follow-up work and test plans.
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.


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.

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