Skip to content

feat: Enterprise Group Manager and Team API support#262

Merged
andrii-bodnar merged 2 commits intomasterfrom
group-managers-and-teams
Mar 17, 2026
Merged

feat: Enterprise Group Manager and Team API support#262
andrii-bodnar merged 2 commits intomasterfrom
group-managers-and-teams

Conversation

@bhdnb
Copy link
Collaborator

@bhdnb bhdnb commented Mar 17, 2026

No description provided.

@bhdnb bhdnb self-assigned this Mar 17, 2026
@bhdnb bhdnb marked this pull request as draft March 17, 2026 10:54
@bhdnb bhdnb changed the title feat: Enterprise Group Manager API support (#215) feat: Enterprise Group Manager and Team API support Mar 17, 2026
@bhdnb bhdnb linked an issue Mar 17, 2026 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Mar 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.64%. Comparing base (4aeb520) to head (72ea06a).
⚠️ Report is 1 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bhdnb bhdnb marked this pull request as ready for review March 17, 2026 11:47
@bhdnb bhdnb requested review from andrii-bodnar March 17, 2026 11:47
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 expanded Group/User model fields.
  • Standardize response decoration to always decorate the full decoded response (and let decorators unwrap data / optional pagination).
  • 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.

@bhdnb bhdnb force-pushed the group-managers-and-teams branch from f3bee8b to 72ea06a Compare March 17, 2026 14:04
@andrii-bodnar andrii-bodnar merged commit ce75f6c into master Mar 17, 2026
13 checks passed
@andrii-bodnar andrii-bodnar deleted the group-managers-and-teams branch March 17, 2026 14:30
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 new group managers and teams features

3 participants