feat: add support for Application Consents API - #396
Merged
andrii-bodnar merged 2 commits intoSep 4, 2026
Conversation
Adds listApplicationConsents, addApplicationConsent, editApplicationConsent, and deleteApplicationConsent methods to ApplicationsApi, covering the crowdin.com-only /applications/consents endpoints for managing user consent decisions granted or denied to applications. Closes: crowdin#393
There was a problem hiding this comment.
🟢 Approval recommended
The new endpoints follow existing client patterns, include appropriate models/wrappers, and add targeted mock-based tests and fixtures for the introduced behavior.
Pull request overview
Adds Crowdin.com-only support for the Application Consents API to the Java client by extending ApplicationsApi with list/create/update/delete consent decision endpoints, plus the necessary models, response wrappers, fixtures, and tests.
Changes:
- Added
listApplicationConsents,addApplicationConsent,editApplicationConsent, anddeleteApplicationConsentmethods toApplicationsApifor/applications/consentsendpoints. - Introduced new consent decision models (
ApplicationConsent,ConsentStatus, request/params objects) and response wrapper mappers for list/object responses. - Added
ApplicationsApiTestcoverage and new request/response JSON fixtures for the new endpoints.
File summaries
| File | Description |
|---|---|
| src/main/java/com/crowdin/client/applications/ApplicationsApi.java | Adds the four Application Consents endpoint methods with crowdin.com-only Javadoc links and query param handling. |
| src/main/java/com/crowdin/client/applications/consents/model/ApplicationConsent.java | Defines the consent decision model (including nested installedBy user info) and timestamps/scopes fields. |
| src/main/java/com/crowdin/client/applications/consents/model/ConsentStatus.java | Adds granted/denied enum conversion for serialization/deserialization. |
| src/main/java/com/crowdin/client/applications/consents/model/AddApplicationConsentRequest.java | Adds request DTO for creating an application consent decision. |
| src/main/java/com/crowdin/client/applications/consents/model/ListApplicationConsentsParams.java | Adds params object for identifier filter, ordering, and pagination. |
| src/main/java/com/crowdin/client/applications/consents/model/ApplicationConsentResponseObject.java | Adds response wrapper for single consent decision payloads. |
| src/main/java/com/crowdin/client/applications/consents/model/ApplicationConsentResponseList.java | Adds response wrapper + mapping to ResponseList<ApplicationConsent>. |
| src/test/java/com/crowdin/client/applications/ApplicationsApiTest.java | Adds 4 new tests + mocks for the consents endpoints. |
| src/test/resources/api/applications/listApplicationConsentsResponse.json | Adds fixture for listing consent decisions. |
| src/test/resources/api/applications/addApplicationConsentRequest.json | Adds fixture for creating a consent decision. |
| src/test/resources/api/applications/editApplicationConsentRequest.json | Adds fixture for patching a consent decision (JSON Patch). |
| src/test/resources/api/applications/applicationConsent.json | Adds fixture for a single consent decision response. |
Review details
- Files reviewed: 12/12 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Match the existing ApplicationsApi Javadoc pattern. These endpoints are available on both crowdin.com and Crowdin Enterprise.
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.
This adds support for the Application Consents API (closes: #393).
listApplicationConsents,addApplicationConsent,editApplicationConsent, anddeleteApplicationConsentmethods toApplicationsApi, coveringGET/POST /applications/consentsandPATCH/DELETE /applications/consents/{consentId}.ApplicationConsentmodel (with nestedinstalledByuser info),ConsentStatusenum (granted/denied),AddApplicationConsentRequest,ListApplicationConsentsParams(identifier filter,orderBy, pagination), and response wrappers.BranchesApi).Verification
./gradlew compileJava compileTestJava— passes../gradlew test --tests "com.crowdin.client.applications.ApplicationsApiTest"— all 14 tests pass (4 new:listApplicationConsents,addApplicationConsent,editApplicationConsent,deleteApplicationConsent), 0 failures.git diff --check— clean.Limitations
./gradlew build(full suite + Jacoco coverage) since Jacoco's bundled ASM in this Gradle 7 setup doesn't support instrumenting classes compiled with newer JDKs in my environment; this is unrelated to the change and only affects the coverage task, nottestorcompileJava/compileTestJava, which ran cleanly.