Constructor
# new ProjectActions(client, projectId, automationId)
Endpoint constructor
Parameters:
Name | Type | Description |
---|---|---|
client |
Client
|
|
projectId |
String
|
The id of the project. |
automationId |
String
|
The id of the automation. |
- See:
-
- [ProjectActions in Awork API Docs](https://openapi.awork.com/#/ProjectActions)
Classes
Methods
# async create(action) → {Promise.<Action>}
Creates a new action including its values for an automation. The user needs to be owner of the project or needs permission 'write' of the feature 'project-master-data' globally or in the project.
Parameters:
Name | Type | Description |
---|---|---|
action |
ActionCreateModel
|
The model to create an action. |
Promise.<Action>
# async delete(actionId) → {Promise.<void>}
Deletes an action for an automation including all its values. The user needs to be owner of the project or needs permission 'write' of the feature 'project-master-data' globally or in the project.
Parameters:
Name | Type | Description |
---|---|---|
actionId |
String
|
The id of the action. |
Promise.<void>
# async get(actionId) → {Promise.<Action>}
Get a specific action including its values of an automation. The user needs to be owner of the project or needs permission 'read' of the feature 'project-master-data' globally or in the project.
Parameters:
Name | Type | Description |
---|---|---|
actionId |
String
|
The id of the action. |
Promise.<Action>
# async list(optionsopt) → {Promise.<Array.<Action>>}
Gets all actions including their values of an automation. The user needs to be owner of the project or needs permission 'read' of the feature 'project-master-data' globally or in the project.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
ListOptions
|
<optional> |
Pagination and filtering options. |
Promise.<Array.<Action>>
# async update(actionId, action) → {Promise.<Action>}
Updates an exsting action including its values for an automation. The user needs to be owner of the project or needs permission 'write' of the feature 'project-master-data' globally or in the project.
Parameters:
Name | Type | Description |
---|---|---|
actionId |
String
|
The id of the action. |
action |
ActionUpdateModel
|
The model to update an action. |
Promise.<Action>
# async updateOrder(actionId, order) → {Promise.<Action>}
Updates the order of a given action in the list of actions of the specific automation. If the order isn't changed, the order will not be updated.
Parameters:
Name | Type | Description |
---|---|---|
actionId |
String
|
The id of the action. |
order |
Number
|
The order of the automation within a list. |
Promise.<Action>