Skip to content

feat: add support for Application Consents API - #396

Merged
andrii-bodnar merged 2 commits into
crowdin:masterfrom
Anikesh348:feature/application-consents-api
Sep 4, 2026
Merged

feat: add support for Application Consents API#396
andrii-bodnar merged 2 commits into
crowdin:masterfrom
Anikesh348:feature/application-consents-api

Conversation

@Anikesh348

Copy link
Copy Markdown
Contributor

This adds support for the Application Consents API (closes: #393).

  • Added listApplicationConsents, addApplicationConsent, editApplicationConsent, and deleteApplicationConsent methods to ApplicationsApi, covering GET/POST /applications/consents and PATCH/DELETE /applications/consents/{consentId}.
  • Added the ApplicationConsent model (with nested installedBy user info), ConsentStatus enum (granted/denied), AddApplicationConsentRequest, ListApplicationConsentsParams (identifier filter, orderBy, pagination), and response wrappers.
  • These endpoints are available on crowdin.com only (not Crowdin Enterprise), so Javadoc only links the developer.crowdin.com operation, consistent with other crowdin.com-only endpoints in this client (e.g. 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

  • I did not run the full ./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, not test or compileJava/compileTestJava, which ran cleanly.
  • Not tested against a live Crowdin API account; request/response shapes are based on the published API reference.

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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, and deleteApplicationConsent methods to ApplicationsApi for /applications/consents endpoints.
  • Introduced new consent decision models (ApplicationConsent, ConsentStatus, request/params objects) and response wrapper mappers for list/object responses.
  • Added ApplicationsApiTest coverage 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.

Comment thread src/main/java/com/crowdin/client/applications/ApplicationsApi.java
Match the existing ApplicationsApi Javadoc pattern. These endpoints are
available on both crowdin.com and Crowdin Enterprise.

@andrii-bodnar andrii-bodnar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Anikesh348 thank you!

@andrii-bodnar
andrii-bodnar merged commit 7408645 into crowdin:master Sep 4, 2026
2 checks passed
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.

Add support for Application Consents API

3 participants