Skip to content

feat: adds token controllers#1941

Merged
sandsinh merged 7 commits intomainfrom
SITES-41733
Apr 1, 2026
Merged

feat: adds token controllers#1941
sandsinh merged 7 commits intomainfrom
SITES-41733

Conversation

@sandsinh
Copy link
Copy Markdown
Contributor

@sandsinh sandsinh commented Mar 11, 2026

Summary

  • Add GET /sites/:siteId/tokens/by-type/:tokenType endpoint to retrieve current-cycle token allocations for a site
  • Introduce TokensController, TokenDto, and wire up routing with token:read capability

Test plan

  • Unit tests for TokensController and TokenDto
  • Route test updated to include new tokens endpoint
  • Manual verification via scripts/test-tokens.sh against dev deployment

Please ensure your pull request adheres to the following guidelines:

  • make sure to link the related issues in this description. Or if there's no issue created, make sure you
    describe here the problem you're solving.
  • when merging / squashing, make sure the fixed issue references are visible in the commits, for easy compilation of release notes

If the PR is changing the API specification:

  • make sure you add a "Not implemented yet" note the endpoint description, if the implementation is not ready
    yet. Ideally, return a 501 status code with a message explaining the feature is not implemented yet.
  • make sure you add at least one example of the request and response.

If the PR is changing the API implementation or an entity exposed through the API:

  • make sure you update the API specification and the examples to reflect the changes.

If the PR is introducing a new audit type:

  • make sure you update the API specification with the type, schema of the audit result and an example

Related Issues

Thanks for contributing!

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions
Copy link
Copy Markdown

This PR will trigger a minor release when merged.

Comment thread package.json Outdated
@sandsinh sandsinh merged commit e5383fa into main Apr 1, 2026
20 checks passed
@sandsinh sandsinh deleted the SITES-41733 branch April 1, 2026 09:13
solaris007 pushed a commit that referenced this pull request Apr 1, 2026
# [1.395.0](v1.394.1...v1.395.0) (2026-04-01)

### Features

* adds token controllers ([#1941](#1941)) ([e5383fa](e5383fa))
* use new brand-presence filter dimensions rpc ([#2077](#2077)) ([04f5339](04f5339))
@solaris007
Copy link
Copy Markdown
Member

🎉 This PR is included in version 1.395.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

ravverma pushed a commit that referenced this pull request Apr 6, 2026
##  Summary                                                          
- Add GET /sites/:siteId/tokens/by-type/:tokenType endpoint to retrieve
current-cycle token allocations for a site
- Introduce TokensController, TokenDto, and wire up routing with
token:read capability
## Test plan
- Unit tests for TokensController and TokenDto
  - Route test updated to include new tokens endpoint       
- Manual verification via scripts/test-tokens.sh against dev deployment
   
Please ensure your pull request adheres to the following guidelines:
- [ ] make sure to link the related issues in this description. Or if
there's no issue created, make sure you
  describe here the problem you're solving.
- [ ] when merging / squashing, make sure the fixed issue references are
visible in the commits, for easy compilation of release notes

If the PR is changing the API specification:
- [ ] make sure you add a "Not implemented yet" note the endpoint
description, if the implementation is not ready
yet. Ideally, return a 501 status code with a message explaining the
feature is not implemented yet.
- [ ] make sure you add at least one example of the request and
response.

If the PR is changing the API implementation or an entity exposed
through the API:
- [ ] make sure you update the API specification and the examples to
reflect the changes.

If the PR is introducing a new audit type:
- [ ] make sure you update the API specification with the type, schema
of the audit result and an example

## Related Issues


Thanks for contributing!

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ravverma pushed a commit that referenced this pull request Apr 6, 2026
# [1.395.0](v1.394.1...v1.395.0) (2026-04-01)

### Features

* adds token controllers ([#1941](#1941)) ([e5383fa](e5383fa))
* use new brand-presence filter dimensions rpc ([#2077](#2077)) ([04f5339](04f5339))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants