Class

SubTasks

SubTasks(client, taskId)

Class corresponding to Aworks SubTasks Endpoints
Constructor

# new SubTasks(client, taskId)

Endpoint constructor
Parameters:
Name Type Description
client Client
taskId String The id of the task.
See:
  • [SubTasks in Awork API Docs](https://openapi.awork.com/#/SubTasks)

View Source endpoints/SubTasks.js, line 12

Classes

SubTasks

Methods

# async create(subTask) → {Promise.<SubTask>}

Creates a subtask for a task with the specified id. The required permissions depend on the base type of the task. If the task is a project task, either 'write' permissions on the 'project-master-data' feature are required or the user needs to be assigned. For a user's private task, no special permissions are required.
Parameters:
Name Type Description
subTask SubTaskCreateModel The model to create the subtask.

View Source endpoints/SubTasks.js, line 60

Promise.<SubTask>

# async delete(subtaskId) → {Promise.<void>}

Deletes a subtask for a task with the specified id. The required permissions depend on the base type of the task. If the task is a project task, either 'write' permissions on the 'project-master-data' feature are required or the user needs to be assigned. For a user's private task, no special permissions are required.
Parameters:
Name Type Description
subtaskId String The id of the subtask.

View Source endpoints/SubTasks.js, line 87

Promise.<void>

# async get(subtaskId) → {Promise.<SubTask>}

Returns a subtask for a task with the specified id. The required permissions depend on the base type of the task. If the task is a project task, either 'read' permissions on the 'project-planning-data' feature are required or the user needs to be assigned. For a user's private task, no special permissions are required.
Parameters:
Name Type Description
subtaskId String The id of the subtask.

View Source endpoints/SubTasks.js, line 31

Promise.<SubTask>

# async list(optionsopt) → {Promise.<Array.<SubTask>>}

Returns the subtasks for a task with the specified id.
Parameters:
Name Type Attributes Description
options ListOptions <optional>
Pagination and filtering options

View Source endpoints/SubTasks.js, line 42

Promise.<Array.<SubTask>>

# projectSubtasks(subtaskId) → {ProjectSubtasks}

Returns the ProjectsSubtasks Endpoint with the specified subtask id.
Parameters:
Name Type Description
subtaskId String The id of the subtask.

View Source endpoints/SubTasks.js, line 96

# async update(subtaskId, subTask) → {Promise.<SubTask>}

Updates a subtask for a task with the specified id. The required permissions depend on the base type of the task. If the task is a project task, either 'write' permissions on the 'project-master-data' feature are required or the user needs to be assigned. For a user's private task, no special permissions are required.
Parameters:
Name Type Description
subtaskId String The id of the subtask.
subTask SubTaskUpdateModel The model to update the subtask.

View Source endpoints/SubTasks.js, line 76

Promise.<SubTask>

# userOtherPrivateTasksSubtasks(subtaskId) → {UserOtherPrivateTasksSubtasks}

Returns the UserOtherPrivateTasksSubtasks Endpoint with the specified subtask id.
Parameters:
Name Type Description
subtaskId String The id of the subtask.

View Source endpoints/SubTasks.js, line 114

# userPrivateTasksSubtasks(subtaskId) → {UserPrivateTasksSubtasks}

Returns the UserPrivateTasksSubtasks Endpoint with the specified subtask id.
Parameters:
Name Type Description
subtaskId String The id of the subtask.

View Source endpoints/SubTasks.js, line 105