Repository navigation
feat: manage project API tokens - #74
Merged
Merged
Conversation
bjarn
force-pushed
the
feat/project-api-tokens
branch
from
October 29, 2026 22:05
333801a to
5f484e2
Compare
bjornftw
approved these changes
Oct 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Non-breaking. Suggested version: 3.3.0 (minor).
co.lettermint.typesfrom the latest API spec (separate commit, generated files only).projects().apiTokens(), aProjectApiTokenssub-resource for a project's API tokens:list(projectId),iterate(projectId),create(projectId, body)anddelete(projectId, tokenId). It followsteam().invites(): each method has the usual overloads with and withoutListProjectApiTokensQueryandRequestOptions, validates the project and token IDs before sending, and uses the team token.createreturns the token value once (data().token()). Use it to send through the API, or as the SMTP password when SMTP is enabled for the project;smtp()then holds the host, ports and username. Like the other credential records,ProjectApiTokenSecret.toString()prints the token as[redacted].rotateTokenJavadoc now points atapiTokens()for managing specific tokens.TeamApiTestlists those three operations as pending; everything else stays strictly checked.No existing generated record changes shape, so no canonical record constructor gains an argument.
API changes in the regenerated types
GET /projects/{projectId}/api-tokenspage[size],page[cursor],sort)projects().apiTokens().list/iterate(this PR)POST /projects/{projectId}/api-tokensprojects().apiTokens().create(this PR)DELETE /projects/{projectId}/api-tokens/{tokenId}projects().apiTokens().delete(this PR)GET /team/api-tokenspage[size],page[cursor],sort)team().apiTokens().list/iterate(stacked PR)POST /team/api-tokensteam().apiTokens().create(stacked PR)DELETE /team/api-tokens/{tokenId}team().apiTokens().delete(stacked PR)POST /projects/{projectId}/rotate-tokenprojects().rotateToken(deprecated)ProjectApiToken,ProjectApiTokenSecret,ProjectApiTokenCreatedResponse,SmtpCredentials,StoreProjectApiTokenData,ListProjectApiTokensQuery,ListProjectApiTokensQuerySortItem,TeamApiToken,TeamApiTokenSecret,TeamApiTokenCreatedResponse,StoreTeamApiTokenData,ListTeamApiTokensQuery,ListTeamApiTokensQuerySortItem,ApiTokenSourceProjectApiTokenSecretandTeamApiTokenSecretprinttokenas[redacted]intoString(). The other generated files only change their spec header.Usage
Checks
./gradlew generateTypeswith the latest spec, then./gradlew checkGeneratedTypes: up to date (231 files)./gradlew clean build --no-daemonon JDK 17: passed (107 tests, 0 failures)./gradlew clean build --no-daemonon JDK 24: passed (107 tests, 0 failures)Automatic-Module-Name: co.lettermintpresent, no okhttp bundledNot run locally
./gradlew checkstyleMain checkstyleTest: the build has no checkstyle tasks, and the workflow ignores the result (|| true).Suggested release tag
v3.3.0, after the whole stack has merged.