Skip to content

feat(users,teams): update users and teams API to the latest docs - #420

Merged
andrii-bodnar merged 1 commit into
masterfrom
feature/users-teams-api
Oct 20, 2026
Merged

andrii-bodnar merged 1 commit into
masterfrom
feature/users-teams-api

Conversation

@katerina20

Copy link
Copy Markdown
Collaborator

Part of updating the SDK to the current Crowdin API docs. This PR covers the Users and Teams APIs.

New methods

API Method Route Edition
Users editAuthenticatedUser PATCH /user Crowdin
Users listUserProjectPermissions GET /users/{userId}/projects/permissions Enterprise
Users editUserProjectPermissions PATCH /users/{userId}/projects/permissions Enterprise
Users listUserProjectContributions GET /users/{userId}/projects/contributions Enterprise
Users listProjectMembers(projectId, ListProjectMembersParams) GET /projects/{projectId}/members Crowdin
Teams listProjectTeams GET /projects/{projectId}/teams Enterprise
Teams listTeamProjectPermissions GET /teams/{teamId}/projects/permissions Enterprise
Teams editTeamProjectPermissions PATCH /teams/{teamId}/projects/permissions Enterprise

listProjectMembers(projectId, ListProjectMembersParams) is an overload that adds the role filter.

Updated models

  • User: added emailVerified, fullName, fields, joinDetails, deviceVerification, trustedDevicesCount, apiTokensCount, loginMethods, mfaMethods.
  • Requests:
    • InviteUserRequest: adminAccess.
    • AddProjectMemberRequest: message (Crowdin).
    • ReplaceProjectMemberPermissionsRequest: developerAccess.
  • Responses:
    • ProjectMembersResponse: updated.
    • ProjectMember: isAdmin.
    • Team: webUrl.
    • ProjectTeamResource: name.
    • ProjectTeamResources: updated.
  • Pagination: limit/offset added to listGroupManagers and listGroupTeams via the params classes. They are left out of the URL when null.
  • Javadoc: the member methods now link the Crowdin operations too.

Deprecated (still working)

  • Member and team requests: permissions and accessToAllWorkflowSteps on AddProjectMemberRequest, ReplaceProjectMemberPermissionsRequest and AddTeamToProjectRequest. Use roles.
  • Responses: ProjectMember.role and TeamMember.role. Use roles.
  • AddProjectMemberRequest.usernames (String): use usernameList.
  • GroupManager.teams (List<GroupTeam>): use teamList.

Backward compatibility

No public method, field or class was removed, renamed or retyped. These changes fix requests and responses that didn't match the docs:

  • AddProjectMemberRequest.usernames: the API expects an array of strings.
    • The SDK now sends "usernames": [...].
    • The deprecated setUsernames(String) splits a comma-separated value into the list.
    • getUsernames() joins the list with commas, so "john, jane" reads back as "john,jane".
  • GroupManager.teams: the API returns plain team objects.
    • The new teamList holds them.
    • The deprecated getTeams() now returns GroupTeam wrappers with id and team filled in; before, team was always null.
  • LanguagePermission: Crowdin returns member permissions as strings ({"uk": "translator"}), which used to fail parsing. They now parse, and the value is exposed in a new read-only role field. The Enterprise object form is unchanged.
  • equals/hashCode/toString include the new fields.

Testing

  • ./gradlew build: 636 tests, 0 failures, on both JDK 17 and JDK 8.
  • ./gradlew javadoc on JDK 8: no errors.
  • New mock tests and fixtures:
    • UsersApiExtendedTest and TeamsApiExtendedTest cover every new method, the new fields, the usernames request JSON, and both permission formats.

🤖 Generated with Claude Code

New methods:
- UsersApi: editAuthenticatedUser (PATCH /user), listUserProjectPermissions,
  editUserProjectPermissions, listUserProjectContributions and
  listProjectMembers(projectId, ListProjectMembersParams)
- TeamsApi: listProjectTeams, listTeamProjectPermissions and
  editTeamProjectPermissions

Updates:
- User: emailVerified, fullName, fields, joinDetails, deviceVerification,
  trustedDevicesCount, apiTokensCount, loginMethods, mfaMethods
- InviteUserRequest.adminAccess, AddProjectMemberRequest.message,
  ReplaceProjectMemberPermissionsRequest.developerAccess,
  ProjectMembersResponse.updated, ProjectMember.isAdmin
- Team.webUrl, ProjectTeamResource.name, ProjectTeamResources.updated
- limit/offset for listGroupManagers and listGroupTeams
- LanguagePermission accepts the Crowdin string form of permissions
- AddProjectMemberRequest.usernames is sent as an array
  (new usernameList; the deprecated String setter splits on commas)
- GroupManager.teams is read as a list of teams (new teamList);
  the deprecated getter keeps returning GroupTeam wrappers
- deprecate permissions/accessToAllWorkflowSteps in member and team
  requests and the member/team-member role (use roles)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@andrii-bodnar
andrii-bodnar merged commit 0ada512 into master Oct 20, 2026
2 checks passed
@andrii-bodnar
andrii-bodnar deleted the feature/users-teams-api branch October 20, 2026 06:45
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.

2 participants