Class

ProjectMembers

ProjectMembers()

Class corresponding to the Member part of Aworks Projects Endpoint
Constructor

# new ProjectMembers()

See:
  • [Projects in Awork API Docs](https://openapi.awork.com/#/Projects)

View Source endpoints/ProjectMembers.js, line 8

Classes

ProjectMembers

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

View Source endpoints/ProjectMembers.js, line 64

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.

View Source endpoints/ProjectMembers.js, line 97

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

View Source endpoints/ProjectMembers.js, line 27

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

View Source endpoints/ProjectMembers.js, line 40

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

View Source endpoints/ProjectMembers.js, line 85

Promise.<ProjectMember>