Class

ProjectTypes

ProjectTypes(client)

Class corresponding to Aworks ProjectTypes Endpoints
Constructor

# new ProjectTypes(client)

Endpoint constructor
Parameters:
Name Type Description
client Client
See:
  • [ProjectTypes in Awork API Docs](https://openapi.awork.com/#/ProjectTypes)

View Source endpoints/ProjectTypes.js, line 9

Classes

ProjectTypes

Methods

# async create(projectType) → {Promise.<ProjectType>}

Creates a new project type.
Parameters:
Name Type Description
projectType ProjectTypeCreateModel The model to create a project type.

View Source endpoints/ProjectTypes.js, line 61

Promise.<ProjectType>

# async delete(projectTypeId)

Deletes the project type with the specified id. If an id of a new type is provided, projects will be updated to reference the new type If no id of type is provided, the type if removed from the projects.
Parameters:
Name Type Description
projectTypeId String The id of the project type.

View Source endpoints/ProjectTypes.js, line 87

# async get(projectTypeId) → {Promise.<ProjectType>}

Returns the project type with the specified id.
Parameters:
Name Type Description
projectTypeId String The id of the project type.

View Source endpoints/ProjectTypes.js, line 27

Promise.<ProjectType>

# async icons() → {Promise.<Array.<String>>}

Get all possible icons for project types.

View Source endpoints/ProjectTypes.js, line 107

Promise.<Array.<String>>

# async list(options) → {Promise.<Array.<ProjectType>>}

Returns all existing project types.
Parameters:
Name Type Description
options

View Source endpoints/ProjectTypes.js, line 43

Promise.<Array.<ProjectType>>

# async setArchived(projectTypeId, archivedopt) → {Promise.<ProjectType>}

Archives or unarchives the project type with the specified id. Archived objects can not be used any longer but still exist for being referenced by other entities.
Parameters:
Name Type Attributes Default Description
projectTypeId String The id of the project type.
archived Boolean <optional>
true Whether the project type should be archived.

View Source endpoints/ProjectTypes.js, line 97

Promise.<ProjectType>

# async update(projectTypeId, projectType) → {Promise.<ProjectType>}

Updates the project type with the specified id.
Parameters:
Name Type Description
projectTypeId String The id of the project type.
projectType ProjectTypeUpdateModel The model to update the project type.

View Source endpoints/ProjectTypes.js, line 77

Promise.<ProjectType>