feat: Enterprise Group Manager and Team API support#262
Merged
andrii-bodnar merged 2 commits intomasterfrom Mar 17, 2026
Merged
feat: Enterprise Group Manager and Team API support#262andrii-bodnar merged 2 commits intomasterfrom
andrii-bodnar merged 2 commits intomasterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #262 +/- ##
============================================
+ Coverage 92.54% 92.64% +0.11%
- Complexity 1677 1699 +22
============================================
Files 159 161 +2
Lines 4512 4578 +66
============================================
+ Hits 4175 4241 +66
Misses 337 337 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds Enterprise Group manager/team API support and aligns response decoration with Crowdin’s { data: ... } response envelope across the client.
Changes:
- Introduce Enterprise group managers/teams endpoints and related models (
GroupManager,GroupTeam), plus expandedGroup/Usermodel fields. - Standardize response decoration to always decorate the full decoded response (and let decorators unwrap
data/ optionalpagination). - Update and reorganize tests for new models/endpoints and the refactored response decorators.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/CrowdinApiClient/Model/Enterprise/GroupTest.php | Extends group model coverage for new fields and simplifies assertions. |
| tests/CrowdinApiClient/Model/Enterprise/GroupTeamTest.php | Adds tests for the new GroupTeam model. |
| tests/CrowdinApiClient/Model/Enterprise/GroupManagerTest.php | Adds tests for the new GroupManager model including teams optionality. |
| tests/CrowdinApiClient/Http/ResponseDecoratorTest.php | Removes monolithic decorator test in favor of focused test files. |
| tests/CrowdinApiClient/Http/ResponseDecorator/ResponseModelListDecoratorTest.php | Adds coverage for list decorator with/without pagination. |
| tests/CrowdinApiClient/Http/ResponseDecorator/ResponseModelDecoratorTest.php | Adds coverage for model decorator expecting {data: ...} envelope. |
| tests/CrowdinApiClient/Http/ResponseDecorator/ResponseArrayDecoratorTest.php | Adds coverage for array decorator unwrapping data when present. |
| tests/CrowdinApiClient/Api/ReportApiTest.php | Updates mocked responses to wrap payload in data. |
| tests/CrowdinApiClient/Api/ProjectApiTest.php | Updates mocked responses to wrap payload in data. |
| tests/CrowdinApiClient/Api/Enterprise/UserApiTest.php | Updates mocked responses to wrap payload in data for member add stats. |
| tests/CrowdinApiClient/Api/Enterprise/TeamMemberApiTest.php | Updates mocked responses to wrap payload in data for team member add results. |
| tests/CrowdinApiClient/Api/Enterprise/ReportApiTest.php | Updates mocked responses to use json_encode and {data: ...} envelope. |
| tests/CrowdinApiClient/Api/Enterprise/GroupApiTest.php | Adds tests for new group managers/teams endpoints and updates existing mocks. |
| src/CrowdinApiClient/Model/Enterprise/User.php | Adds admin-only user fields and getters (emailVerified, joinDetails, MFA, etc.). |
| src/CrowdinApiClient/Model/Enterprise/GroupTeam.php | Introduces GroupTeam model holding a nested Team. |
| src/CrowdinApiClient/Model/Enterprise/GroupManager.php | Introduces GroupManager model holding a nested User and Team[]. |
| src/CrowdinApiClient/Model/Enterprise/Group.php | Adds webUrl and savings report template id support. |
| src/CrowdinApiClient/Http/ResponseDecorator/ResponseModelListDecorator.php | Makes pagination optional when decorating list responses. |
| src/CrowdinApiClient/Http/ResponseDecorator/ResponseModelDecorator.php | Updates to construct models from $response['data']. |
| src/CrowdinApiClient/Http/ResponseDecorator/ResponseArrayDecorator.php | Unwraps $response['data'] when present, otherwise returns input. |
| src/CrowdinApiClient/Crowdin.php | Centralizes decorator invocation to only decorate full responses containing data. |
| src/CrowdinApiClient/Api/GraphqlApi.php | Passes full response to ResponseArrayDecorator for consistent unwrapping. |
| src/CrowdinApiClient/Api/Enterprise/GroupApi.php | Adds list/get/update APIs for group managers and teams. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
f3bee8b to
72ea06a
Compare
andrii-bodnar
approved these changes
Mar 17, 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.
No description provided.