Class

ProjectTemplateAutomations

ProjectTemplateAutomations(client, projectTemplateId)

Class corresponding to Aworks ProjectTemplateAutomations Endpoints
Constructor

# new ProjectTemplateAutomations(client, projectTemplateId)

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

View Source endpoints/ProjectTemplateAutomations.js, line 11

Classes

ProjectTemplateAutomations

Methods

# actions(projectTemplateId) → {ProjectTemplateActions}

Returns the ProjectTemplateActions Endpoint with the specified project template Id.
Parameters:
Name Type Description
projectTemplateId String The id of the project template

View Source endpoints/ProjectTemplateAutomations.js, line 106

# async create(automation) → {Promise.<Automation>}

Creates a new automation of the projecttemplate with the specified id. To create the the automation the user needs to have 'write' permissions of the feature 'project-manage-config' globally.
Parameters:
Name Type Description
automation AutomationCreateModel The model to create an automation.

View Source endpoints/ProjectTemplateAutomations.js, line 57

Promise.<Automation>

# async delete(automationId, removefromProjects) → {Promise.<void>}

Deletes the specified automation with its trigger and all its values. To delete the the automation the user needs to have 'write' permissions of the feature 'project-manage-config' globally. If the 'removeFromProject' boolean is set to true, all automations in projects of that project template created from that automation template are deleted aswell.
Parameters:
Name Type Description
automationId String The id of the automation.
removefromProjects Boolean Whether to delete the automation also from all projects of the projecttemplate.

View Source endpoints/ProjectTemplateAutomations.js, line 87

Promise.<void>

# async get(automationId) → {Promise.<Automation>}

Returns a specific automation of the projecttemplate with the specified id. Returns NotFound if the automation doesnt exist. To get the the automation data the user needs to have 'read' permissions of the feature 'project-manage-config' globally.
Parameters:
Name Type Description
automationId String The id of the automation.

View Source endpoints/ProjectTemplateAutomations.js, line 29

Promise.<Automation>

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

Returns all automations of the projecttemplate with the specified id. To get the automation data the user needs the 'read' permissons of the feature 'project-manage-config' globally.
Parameters:
Name Type Attributes Description
options ListOptions <optional>
Pagination and filtering options.

View Source endpoints/ProjectTemplateAutomations.js, line 40

Promise.<Array.<Automation>>

# async reApply(automationId) → {Promise.<void>}

Reapplies the automation to all projects of this specifc project template. Returns NotFound if the automation doesnt exist. To execute this you need to have 'write' permissions of the feature 'project-manage-config' globally.
Parameters:
Name Type Description
automationId String The id of the automation.

View Source endpoints/ProjectTemplateAutomations.js, line 97

Promise.<void>

# async update(automationId, automation) → {Promise.<Automation>}

Updates the specified automation for a specific projecttemplate. To update the the automation the user needs to have 'write' permissions of the feature 'project-manage-config' globally.
Parameters:
Name Type Description
automationId String The id of the automation.
automation AutomationUpdateModel The model to update an automation.

View Source endpoints/ProjectTemplateAutomations.js, line 75

Promise.<Automation>