Class

EntityTags

EntityTags(client, entityName, entityId)

Class corresponding to Aworks Tags Endpoints
Constructor

# new EntityTags(client, entityName, entityId)

Endpoint constructor
Parameters:
Name Type Description
client Client
entityName 'companies' | 'tasks' | 'users' The name of the entity
entityId String The id of the entity
See:
  • [Tags in Awork API Docs](https://openapi.awork.com/#/Tags)

View Source endpoints/EntityTags.js, line 9

Classes

EntityTags

Methods

# async addTags(addTags) → {Promise.<Array.<Tag>>}

Adds a batch of new tags to the entity with the specified id. The request fails if one of the tags is invalid (e.g. empty or duplicate). To create the tags the user needs 'write' permissions on the specified entity.
Parameters:
Name Type Description
addTags Array.<TagsModel> The model to add tags.

View Source endpoints/EntityTags.js, line 56

Promise.<Array.<Tag>>

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

Removes tag from the entity with the specified id. To delete the tags the user needs 'write' permissions on the specified entity. Returns 204 NoContent if tag has been removed successfully.
Parameters:
Name Type Description
deleteTag TagsModel The model to delete tags.

View Source endpoints/EntityTags.js, line 94

Promise.<void>

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

Removes tags from the entity with the specified id. To delete the tags the user needs 'write' permissions on the specified entity. Returns 204 NoContent if all tags have been removed successfully. Returns 207 MultiStatus if at least one tag could not be removed, including the reasons.
Parameters:
Name Type Description
deleteTags TagsModel The model to delete tags.

View Source endpoints/EntityTags.js, line 84

Promise.<void>

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

Returns the tags of the entity with the specified id ordered by name. To read the tags the user needs 'read' permissions on the specified entity.

View Source endpoints/EntityTags.js, line 29

Promise.<Tag>

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

Returns all tags that are currently in use for the given entity type ordered by name.

View Source endpoints/EntityTags.js, line 39

Promise.<Array.<Tag>>

# async updateTags(updateTags) → {Promise.<Tag>}

Updates a tag to the entity with the specified id.
Parameters:
Name Type Description
updateTags UpdateTagsModel The model to update tags.

View Source endpoints/EntityTags.js, line 73

Promise.<Tag>