Classes
Methods
# async create(typeOfWork) → {Promise.<TypeOfWork>}
Creates a new type of work.
Parameters:
Name | Type | Description |
---|---|---|
typeOfWork |
TypeOfWorkCreateModel
|
The model to create the type of work. |
Promise.<TypeOfWork>
# async delete(typeOfWorkId) → {Promise.<void>}
Deletes the type of work with the specified id. If any tasks, task templates or time entries still use this type, the id of a new type needs to be provided.
Parameters:
Name | Type | Description |
---|---|---|
typeOfWorkId |
String
|
The id of the type of work. |
Promise.<void>
# async get(typeOfWorkId) → {Promise.<TypeOfWork>}
Gets a single type of work by its id.
Parameters:
Name | Type | Description |
---|---|---|
typeOfWorkId |
String
|
The id of the type of work. |
Promise.<TypeOfWork>
# async icons() → {Promise.<Array.<String>>}
Returns all possible icons for type of work.
Promise.<Array.<String>>
# async list(optionsopt) → {Promise.<Array.<TypeOfWork>>}
Returns all type of work.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
ListOptions
|
<optional> |
Pagination and filtering options |
Promise.<Array.<TypeOfWork>>
# async setArchived(typeOfWorkId, archivedopt) → {Promise.<Object>}
Archives or unarchives the type of work with the specified id. An archived type of work still exists for all tasks and time entries currently using it, but can no longer be created with this type of work.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
typeOfWorkId |
String
|
The id of the type of work. | ||
archived |
Boolean
|
<optional> |
true | Flags the entity as archived. |
Promise.<Object>
# async update(typeOfWorkId, typeOfWork) → {Promise.<TypeOfWork>}
Changes the properties of an existing type of work. A change will also effect all related tasks and time entries.
Parameters:
Name | Type | Description |
---|---|---|
typeOfWorkId |
String
|
The id of the type of work. |
typeOfWork |
TypeOfWorkUpdateModel
|
The model to update the type of work. |
Promise.<TypeOfWork>