Class

TimeReports

TimeReports(client)

Class corresponding to Aworks TimeReports Endpoints
Constructor

# new TimeReports(client)

Endpoint constructor
Parameters:
Name Type Description
client Client
See:
  • [TimeReports in Awork API Docs](https://openapi.awork.com/#/TimeReports)

View Source endpoints/TimeReports.js, line 9

Classes

TimeReports

Methods

# async create(timeReport) → {Promise.<TimeReport>}

Creates a new time report.
Parameters:
Name Type Description
timeReport TimeReport The timereport model.

View Source endpoints/TimeReports.js, line 49

Promise.<TimeReport>

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

Deletes the time report of the specified id.
Parameters:
Name Type Description
timeReportId String The id of the time report.

View Source endpoints/TimeReports.js, line 72

Promise.<void>

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

Returns time reports of the specified id. Returns time reports of the specified id.
Parameters:
Name Type Description
timeReportId String The id of the time report.

View Source endpoints/TimeReports.js, line 27

Promise.<TimeReport>

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

Returns all time reports of a user. Returns time reports the user created as well as the shared time reports of other users.
Parameters:
Name Type Attributes Description
options ListOptions <optional>
Pagination and filtering options

View Source endpoints/TimeReports.js, line 38

Promise.<Array.<TimeReport>>

# async update(timeReportId, timeReport) → {Promise.<TimeReport>}

Updates the time report of the specified id.
Parameters:
Name Type Description
timeReportId String The id of the time report.
timeReport TimeReport The timereport model.

View Source endpoints/TimeReports.js, line 61

Promise.<TimeReport>