Constructor
# new ProjectMembers()
- See:
-
- [Projects in Awork API Docs](https://openapi.awork.com/#/Projects)
Classes
Methods
# async create(projectMember) → {Promise.<ProjectMember>}
Adds a project member to the project with the specified id. The new project member can also be set as a responsible project member,
but only if no other member of this project is responsible.
It is necessary that the project role is available in this project otherwise the member cannot be added.
A project role is available when they are connected to the specified project type of the project.
A user can only be added to the project once.
The user needs 'manage' permissions of feature 'project-master-data'.
Parameters:
Name | Type | Description |
---|---|---|
projectMember |
ProjectMemberCreateModel
|
Promise.<ProjectMember>
# async delete(projectMemberId) → {Promise.<void>}
Removes a project member from the project with the specified id.
The user needs 'manage' permissions of feature 'project-master-data'.
Parameters:
Name | Type | Description |
---|---|---|
projectMemberId |
String
|
The id of the user to remove from the project. |
Promise.<void>
# async get(userId) → {Promise.<ProjectMember>}
Returns specific project members from the project.
The user needs 'read' permissions of feature 'project-master-data'.
Parameters:
Name | Type | Description |
---|---|---|
userId |
String
|
The id of the user |
Promise.<ProjectMember>
# async list(optionsopt) → {Promise.<Array.<ProjectMember>>}
Returns the project members from the project.
The user needs 'read' permissions of feature 'project-master-data'.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
ListOptions
|
<optional> |
Pagination and filtering options |
Promise.<Array.<ProjectMember>>
# async update(projectMember) → {Promise.<ProjectMember>}
Changes the role of a project member. The project member can also be set as a responsible project member,
but only if no other member of this project is responsible. It is necessary that the project role is available
in this project otherwise the member cannot be updated. A project role is available when they are connected to the
specified project type of the project.
The user needs 'manage' permissions of feature 'project-master-data'.
Parameters:
Name | Type | Description |
---|---|---|
projectMember |
ProjectMemberUpdateModel
|
Promise.<ProjectMember>