From 6485d3a9519412a9e615e9319517046894e8c716 Mon Sep 17 00:00:00 2001 From: daedalus <44623501+ComfortablyCoding@users.noreply.github.com> Date: Sun, 3 Jan 2021 11:40:17 -0500 Subject: [PATCH] feat(docs): update to latest --- docs/Authorization.html | 4 +- docs/Checklists.html | 4 +- docs/Clickup.html | 4 +- docs/Comments.html | 4 +- docs/Folders.html | 4 +- docs/Goals.html | 4 +- docs/KeyResults.html | 4 +- docs/Lists.html | 458 ++++++++++++++++++++++++++++- docs/Spaces.html | 4 +- docs/Tasks.html | 471 +++++++++++++++++++++++------- docs/Teams.html | 4 +- docs/Views.html | 4 +- docs/Webhooks.html | 4 +- docs/index.html | 4 +- docs/index.js.html | 4 +- docs/routes_Authorization.js.html | 4 +- docs/routes_Checklists.js.html | 4 +- docs/routes_Comments.js.html | 4 +- docs/routes_Folders.js.html | 4 +- docs/routes_Goals.js.html | 4 +- docs/routes_KeyResults.js.html | 4 +- docs/routes_Lists.js.html | 39 ++- docs/routes_Spaces.js.html | 4 +- docs/routes_Tasks.js.html | 106 ++++--- docs/routes_Teams.js.html | 4 +- docs/routes_Views.js.html | 4 +- docs/routes_Webhooks.js.html | 4 +- 27 files changed, 977 insertions(+), 189 deletions(-) diff --git a/docs/Authorization.html b/docs/Authorization.html index 7e3fcd4..2fd9ffa 100644 --- a/docs/Authorization.html +++ b/docs/Authorization.html @@ -41,7 +41,7 @@ -

Home

Github Repo

Classes

+

Home

Github Repo

Classes

@@ -597,7 +597,7 @@

(async)
- Documentation generated by JSDoc 3.6.5 on Wed Dec 09 2020 00:03:59 GMT-0500 (Eastern Standard Time) using the docdash theme. + Documentation generated by JSDoc 3.6.5 on Sun Jan 03 2021 11:39:40 GMT-0500 (Eastern Standard Time) using the docdash theme.
diff --git a/docs/Checklists.html b/docs/Checklists.html index f6d08cb..c9b03c5 100644 --- a/docs/Checklists.html +++ b/docs/Checklists.html @@ -41,7 +41,7 @@ -

Home

Github Repo

Classes

+

Home

Github Repo

Classes

@@ -1036,7 +1036,7 @@
Parameters:

- Documentation generated by JSDoc 3.6.5 on Wed Dec 09 2020 00:03:59 GMT-0500 (Eastern Standard Time) using the docdash theme. + Documentation generated by JSDoc 3.6.5 on Sun Jan 03 2021 11:39:40 GMT-0500 (Eastern Standard Time) using the docdash theme.
diff --git a/docs/Clickup.html b/docs/Clickup.html index e991c56..21f3cea 100644 --- a/docs/Clickup.html +++ b/docs/Clickup.html @@ -41,7 +41,7 @@ -

Home

Github Repo

Classes

+

Home

Github Repo

Classes

@@ -1441,7 +1441,7 @@
Properties

- Documentation generated by JSDoc 3.6.5 on Wed Dec 09 2020 00:03:59 GMT-0500 (Eastern Standard Time) using the docdash theme. + Documentation generated by JSDoc 3.6.5 on Sun Jan 03 2021 11:39:40 GMT-0500 (Eastern Standard Time) using the docdash theme.
diff --git a/docs/Comments.html b/docs/Comments.html index 508ea48..1f95496 100644 --- a/docs/Comments.html +++ b/docs/Comments.html @@ -41,7 +41,7 @@ -

Home

Github Repo

Classes

+

Home

Github Repo

Classes

@@ -536,7 +536,7 @@
Parameters:

- Documentation generated by JSDoc 3.6.5 on Wed Dec 09 2020 00:03:59 GMT-0500 (Eastern Standard Time) using the docdash theme. + Documentation generated by JSDoc 3.6.5 on Sun Jan 03 2021 11:39:40 GMT-0500 (Eastern Standard Time) using the docdash theme.
diff --git a/docs/Folders.html b/docs/Folders.html index 85a5966..f52e6fb 100644 --- a/docs/Folders.html +++ b/docs/Folders.html @@ -41,7 +41,7 @@ -

Home

Github Repo

Classes

+

Home

Github Repo

Classes

@@ -1658,7 +1658,7 @@
Parameters:

- Documentation generated by JSDoc 3.6.5 on Wed Dec 09 2020 00:03:59 GMT-0500 (Eastern Standard Time) using the docdash theme. + Documentation generated by JSDoc 3.6.5 on Sun Jan 03 2021 11:39:40 GMT-0500 (Eastern Standard Time) using the docdash theme.
diff --git a/docs/Goals.html b/docs/Goals.html index 6f71c07..e0c566a 100644 --- a/docs/Goals.html +++ b/docs/Goals.html @@ -41,7 +41,7 @@ -

Home

Github Repo

Classes

+

Home

Github Repo

Classes

@@ -831,7 +831,7 @@
Parameters:

- Documentation generated by JSDoc 3.6.5 on Wed Dec 09 2020 00:03:59 GMT-0500 (Eastern Standard Time) using the docdash theme. + Documentation generated by JSDoc 3.6.5 on Sun Jan 03 2021 11:39:40 GMT-0500 (Eastern Standard Time) using the docdash theme.
diff --git a/docs/KeyResults.html b/docs/KeyResults.html index 7d6ed2a..4643c70 100644 --- a/docs/KeyResults.html +++ b/docs/KeyResults.html @@ -41,7 +41,7 @@ -

Home

Github Repo

Classes

+

Home

Github Repo

Classes

@@ -536,7 +536,7 @@
Parameters:

- Documentation generated by JSDoc 3.6.5 on Wed Dec 09 2020 00:03:59 GMT-0500 (Eastern Standard Time) using the docdash theme. + Documentation generated by JSDoc 3.6.5 on Sun Jan 03 2021 11:39:40 GMT-0500 (Eastern Standard Time) using the docdash theme.
diff --git a/docs/Lists.html b/docs/Lists.html index e698835..c9c03bd 100644 --- a/docs/Lists.html +++ b/docs/Lists.html @@ -41,7 +41,7 @@ -

Home

Github Repo

Classes

+

Home

Github Repo

Classes

@@ -563,6 +563,165 @@
Parameters:
+ + + + +

(async) addTaskToList(listId, taskId)

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+

Add task to a list

+
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
listId + + +String + + + +

The list id

taskId + + +String + + + +

The task id

+ + + + + + + + + + + + + + + + + + + + @@ -1607,6 +1766,142 @@
Parameters:
+ + + + +

(async) getListMembers(listId)

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+

Get list members

+
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
listId + + +String + + + +

The list id

+ + + + + + + + + + + + + + + + + + + + @@ -2217,6 +2512,165 @@
Parameters:
+ + + + +

(async) removeTaskFromList(listId, taskId)

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+

Remove a task from a list

+
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
listId + + +Sting + + + +

The list id

taskId + + +String + + + +

The task id

+ + + + + + + + + + + + + + + + + + + + @@ -2395,7 +2849,7 @@
Parameters:

- Documentation generated by JSDoc 3.6.5 on Wed Dec 09 2020 00:03:59 GMT-0500 (Eastern Standard Time) using the docdash theme. + Documentation generated by JSDoc 3.6.5 on Sun Jan 03 2021 11:39:40 GMT-0500 (Eastern Standard Time) using the docdash theme.
diff --git a/docs/Spaces.html b/docs/Spaces.html index 87df243..ab2000e 100644 --- a/docs/Spaces.html +++ b/docs/Spaces.html @@ -41,7 +41,7 @@ -

Home

Github Repo

Classes

+

Home

Github Repo

Classes

@@ -2280,7 +2280,7 @@
Parameters:

- Documentation generated by JSDoc 3.6.5 on Wed Dec 09 2020 00:03:59 GMT-0500 (Eastern Standard Time) using the docdash theme. + Documentation generated by JSDoc 3.6.5 on Sun Jan 03 2021 11:39:40 GMT-0500 (Eastern Standard Time) using the docdash theme.
diff --git a/docs/Tasks.html b/docs/Tasks.html index feb774b..5400460 100644 --- a/docs/Tasks.html +++ b/docs/Tasks.html @@ -41,7 +41,7 @@ -

Home

Github Repo

Classes

+

Home

Github Repo

Classes

@@ -226,7 +226,7 @@

Methods

-

(async) addAttachment(taskId, pathToFile, fileNameopt, optionsopt)

+

(async) addAttachment(taskId, fileSettings, optionsopt)

@@ -238,7 +238,7 @@

(async)
Source:
@@ -308,8 +308,6 @@

Parameters:
- Default - Description @@ -343,10 +341,6 @@
Parameters:
- - - -

The task id

@@ -355,13 +349,13 @@
Parameters:
- pathToFile + fileSettings -String +Object @@ -378,19 +372,34 @@
Parameters:
- + +

The file settings

+
Properties
- - -

The path to the file

- + + + + + + + + + + + + + + + + + - + - + + + + + + + + + +String + + + + + - + + + + + + + +
NameTypeDescription
fileNamefilePath @@ -403,26 +412,40 @@
Parameters:
- - <optional>
- - + - -

The path to the file

fileName - - - 'attachment' -

The file name

The name of the attachment file along with its extension type. Example: 'notes.txt'

+ + @@ -454,10 +477,6 @@
Parameters:
- - - -

The parameter options to pass in

@@ -501,7 +520,7 @@

(async) add
Source:
@@ -711,7 +730,7 @@

(async)
Source:
@@ -921,7 +940,7 @@

(async) addGu
Source:
@@ -1162,7 +1181,7 @@

(async) addTag<
Source:
@@ -1372,7 +1391,7 @@

(async) Source:
@@ -1971,7 +1990,7 @@

(async
Source:
@@ -2169,7 +2188,7 @@
Parameters:
-

(async) deleteDependency(taskId, data, optionsopt)

+

(async) deleteDependency(taskId, options)

@@ -2181,7 +2200,7 @@

(async) Source:
@@ -2247,8 +2266,6 @@
Parameters:
Type - Attributes - @@ -2274,14 +2291,6 @@
Parameters:
- - - - - - - - @@ -2290,37 +2299,6 @@
Parameters:
- - - data - - - - - -Object - - - - - - - - - - - - - - - - - -

The dependency data

- - - - options @@ -2336,16 +2314,6 @@
Parameters:
- - - <optional>
- - - - - - - @@ -2391,7 +2359,7 @@

(async) Source:
@@ -2811,7 +2779,7 @@

(async) Source:
@@ -3215,6 +3183,142 @@
Parameters:
+ + + + +

(async) getBulkTimeInStatus(options)

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+

Get bulk tasks time in status

+
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +Object + + + +

The parameter options to pass in

+ + + + + + + + + + + + + + + + + + + + @@ -3231,7 +3335,7 @@

(async) ge
Source:
@@ -3410,7 +3514,7 @@

(async) get
Source:
@@ -3530,6 +3634,165 @@

Parameters:
+ + + + +

(async) getTimeInStatus(taskId, options)

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+

Get tasks time in status

+
+ + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
taskId + + +String + + + +

The task id

options + + +Object + + + +

The parameter options to pass in

+ + + + + + + + + + + + + + + + + + + + @@ -3546,7 +3809,7 @@

(async) Source:
@@ -3725,7 +3988,7 @@

(async) re
Source:
@@ -3935,7 +4198,7 @@

(async) remo
Source:
@@ -4145,7 +4408,7 @@

(async) <
Source:
@@ -4386,7 +4649,7 @@

(async) trac
Source:
@@ -4809,7 +5072,7 @@

Parameters:

- Documentation generated by JSDoc 3.6.5 on Wed Dec 09 2020 00:03:59 GMT-0500 (Eastern Standard Time) using the docdash theme. + Documentation generated by JSDoc 3.6.5 on Sun Jan 03 2021 11:39:40 GMT-0500 (Eastern Standard Time) using the docdash theme.
diff --git a/docs/Teams.html b/docs/Teams.html index e1bfb10..b167170 100644 --- a/docs/Teams.html +++ b/docs/Teams.html @@ -41,7 +41,7 @@ -

Home

Github Repo

Classes

+

Home

Github Repo

Classes

@@ -5551,7 +5551,7 @@
Parameters:

- Documentation generated by JSDoc 3.6.5 on Wed Dec 09 2020 00:03:59 GMT-0500 (Eastern Standard Time) using the docdash theme. + Documentation generated by JSDoc 3.6.5 on Sun Jan 03 2021 11:39:40 GMT-0500 (Eastern Standard Time) using the docdash theme.
diff --git a/docs/Views.html b/docs/Views.html index 3dd5980..2d23dd6 100644 --- a/docs/Views.html +++ b/docs/Views.html @@ -41,7 +41,7 @@ -

Home

Github Repo

Classes

+

Home

Github Repo

Classes

@@ -1158,7 +1158,7 @@
Parameters:

- Documentation generated by JSDoc 3.6.5 on Wed Dec 09 2020 00:03:59 GMT-0500 (Eastern Standard Time) using the docdash theme. + Documentation generated by JSDoc 3.6.5 on Sun Jan 03 2021 11:39:40 GMT-0500 (Eastern Standard Time) using the docdash theme.
diff --git a/docs/Webhooks.html b/docs/Webhooks.html index 78b5adc..b27ddae 100644 --- a/docs/Webhooks.html +++ b/docs/Webhooks.html @@ -41,7 +41,7 @@ -

Home

Github Repo

Classes

+

Home

Github Repo

Classes

@@ -536,7 +536,7 @@
Parameters:

- Documentation generated by JSDoc 3.6.5 on Wed Dec 09 2020 00:03:59 GMT-0500 (Eastern Standard Time) using the docdash theme. + Documentation generated by JSDoc 3.6.5 on Sun Jan 03 2021 11:39:40 GMT-0500 (Eastern Standard Time) using the docdash theme.
diff --git a/docs/index.html b/docs/index.html index 1ee651c..1e7fea3 100644 --- a/docs/index.html +++ b/docs/index.html @@ -41,7 +41,7 @@ -

Home

Github Repo

Classes

+

Home

Github Repo

Classes

@@ -191,7 +191,7 @@

License


- Documentation generated by JSDoc 3.6.5 on Wed Dec 09 2020 00:03:59 GMT-0500 (Eastern Standard Time) using the docdash theme. + Documentation generated by JSDoc 3.6.5 on Sun Jan 03 2021 11:39:40 GMT-0500 (Eastern Standard Time) using the docdash theme.
diff --git a/docs/index.js.html b/docs/index.js.html index 45c4abd..4b1371f 100644 --- a/docs/index.js.html +++ b/docs/index.js.html @@ -41,7 +41,7 @@ -

Home

Github Repo

Classes

+

Home

Github Repo

Classes

@@ -236,7 +236,7 @@

index.js


- Documentation generated by JSDoc 3.6.5 on Wed Dec 09 2020 00:03:59 GMT-0500 (Eastern Standard Time) using the docdash theme. + Documentation generated by JSDoc 3.6.5 on Sun Jan 03 2021 11:39:40 GMT-0500 (Eastern Standard Time) using the docdash theme.
diff --git a/docs/routes_Authorization.js.html b/docs/routes_Authorization.js.html index 162039a..99eff42 100644 --- a/docs/routes_Authorization.js.html +++ b/docs/routes_Authorization.js.html @@ -41,7 +41,7 @@ -

Home

Github Repo

Classes

+

Home

Github Repo

Classes

@@ -117,7 +117,7 @@

routes/Authorization.js


- Documentation generated by JSDoc 3.6.5 on Wed Dec 09 2020 00:03:59 GMT-0500 (Eastern Standard Time) using the docdash theme. + Documentation generated by JSDoc 3.6.5 on Sun Jan 03 2021 11:39:40 GMT-0500 (Eastern Standard Time) using the docdash theme.
diff --git a/docs/routes_Checklists.js.html b/docs/routes_Checklists.js.html index 3e08aab..7ffcbc2 100644 --- a/docs/routes_Checklists.js.html +++ b/docs/routes_Checklists.js.html @@ -41,7 +41,7 @@ -

Home

Github Repo

Classes

+

Home

Github Repo

Classes

@@ -145,7 +145,7 @@

routes/Checklists.js


- Documentation generated by JSDoc 3.6.5 on Wed Dec 09 2020 00:03:59 GMT-0500 (Eastern Standard Time) using the docdash theme. + Documentation generated by JSDoc 3.6.5 on Sun Jan 03 2021 11:39:40 GMT-0500 (Eastern Standard Time) using the docdash theme.
diff --git a/docs/routes_Comments.js.html b/docs/routes_Comments.js.html index 5beb234..1b63066 100644 --- a/docs/routes_Comments.js.html +++ b/docs/routes_Comments.js.html @@ -41,7 +41,7 @@ -

Home

Github Repo

Classes

+

Home

Github Repo

Classes

@@ -106,7 +106,7 @@

routes/Comments.js


- Documentation generated by JSDoc 3.6.5 on Wed Dec 09 2020 00:03:59 GMT-0500 (Eastern Standard Time) using the docdash theme. + Documentation generated by JSDoc 3.6.5 on Sun Jan 03 2021 11:39:40 GMT-0500 (Eastern Standard Time) using the docdash theme.
diff --git a/docs/routes_Folders.js.html b/docs/routes_Folders.js.html index 4d4a587..b1a501a 100644 --- a/docs/routes_Folders.js.html +++ b/docs/routes_Folders.js.html @@ -41,7 +41,7 @@ -

Home

Github Repo

Classes

+

Home

Github Repo

Classes

@@ -195,7 +195,7 @@

routes/Folders.js


- Documentation generated by JSDoc 3.6.5 on Wed Dec 09 2020 00:03:59 GMT-0500 (Eastern Standard Time) using the docdash theme. + Documentation generated by JSDoc 3.6.5 on Sun Jan 03 2021 11:39:40 GMT-0500 (Eastern Standard Time) using the docdash theme.
diff --git a/docs/routes_Goals.js.html b/docs/routes_Goals.js.html index acd396e..036be9f 100644 --- a/docs/routes_Goals.js.html +++ b/docs/routes_Goals.js.html @@ -41,7 +41,7 @@ -

Home

Github Repo

Classes

+

Home

Github Repo

Classes

@@ -130,7 +130,7 @@

routes/Goals.js


- Documentation generated by JSDoc 3.6.5 on Wed Dec 09 2020 00:03:59 GMT-0500 (Eastern Standard Time) using the docdash theme. + Documentation generated by JSDoc 3.6.5 on Sun Jan 03 2021 11:39:40 GMT-0500 (Eastern Standard Time) using the docdash theme.
diff --git a/docs/routes_KeyResults.js.html b/docs/routes_KeyResults.js.html index f3c77ff..715438c 100644 --- a/docs/routes_KeyResults.js.html +++ b/docs/routes_KeyResults.js.html @@ -41,7 +41,7 @@ -

Home

Github Repo

Classes

+

Home

Github Repo

Classes

@@ -105,7 +105,7 @@

routes/KeyResults.js


- Documentation generated by JSDoc 3.6.5 on Wed Dec 09 2020 00:03:59 GMT-0500 (Eastern Standard Time) using the docdash theme. + Documentation generated by JSDoc 3.6.5 on Sun Jan 03 2021 11:39:40 GMT-0500 (Eastern Standard Time) using the docdash theme.
diff --git a/docs/routes_Lists.js.html b/docs/routes_Lists.js.html index e3a8b2f..f217b39 100644 --- a/docs/routes_Lists.js.html +++ b/docs/routes_Lists.js.html @@ -41,7 +41,7 @@ -

Home

Github Repo

Classes

+

Home

Github Repo

Classes

@@ -238,6 +238,41 @@

routes/Lists.js

endpoint: `${this.route}/${listId}/view`, }); } + + /** + * Add task to a list + * + * @param {String} listId The list id + * @param {String} taskId The task id + */ + async addTaskToList(listId, taskId) { + return this._client.post({ + endpoint: `${this.route}/${listId}/task/${taskId}`, + }); + } + + /** + * Remove a task from a list + * + * @param {Sting} listId The list id + * @param {String} taskId The task id + */ + async removeTaskFromList(listId, taskId) { + return this._client.delete({ + endpoint: `${this.route}/${listId}/task/${taskId}`, + }); + } + + /** + * Get list members + * + * @param {String} listId The list id + */ + async getListMembers(listId) { + return this._client.get({ + endpoint: `${this.route}/${listId}/member`, + }); + } } module.exports = Lists; @@ -255,7 +290,7 @@

routes/Lists.js


- Documentation generated by JSDoc 3.6.5 on Wed Dec 09 2020 00:03:59 GMT-0500 (Eastern Standard Time) using the docdash theme. + Documentation generated by JSDoc 3.6.5 on Sun Jan 03 2021 11:39:40 GMT-0500 (Eastern Standard Time) using the docdash theme.
diff --git a/docs/routes_Spaces.js.html b/docs/routes_Spaces.js.html index 8ade311..4c5818e 100644 --- a/docs/routes_Spaces.js.html +++ b/docs/routes_Spaces.js.html @@ -41,7 +41,7 @@ -

Home

Github Repo

Classes

+

Home

Github Repo

Classes

@@ -245,7 +245,7 @@

routes/Spaces.js


- Documentation generated by JSDoc 3.6.5 on Wed Dec 09 2020 00:03:59 GMT-0500 (Eastern Standard Time) using the docdash theme. + Documentation generated by JSDoc 3.6.5 on Sun Jan 03 2021 11:39:40 GMT-0500 (Eastern Standard Time) using the docdash theme.
diff --git a/docs/routes_Tasks.js.html b/docs/routes_Tasks.js.html index cefed6b..8c28fc8 100644 --- a/docs/routes_Tasks.js.html +++ b/docs/routes_Tasks.js.html @@ -41,7 +41,7 @@ -

Home

Github Repo

Classes

+

Home

Github Repo

Classes

@@ -65,7 +65,7 @@

routes/Tasks.js

* @param {Client} client A client instance */ constructor(client) { - this.client = client; + this._client = client; this.route = 'task'; } @@ -76,7 +76,7 @@

routes/Tasks.js

* @param {Object} [options] The parameter options to pass in */ async get(taskId, options) { - return this.client.get({ + return this._client.get({ endpoint: `${this.route}/${taskId}`, params: options, }); @@ -90,7 +90,7 @@

routes/Tasks.js

* @param {Object} [options] The parameter options to pass in */ async update(taskId, data, options) { - return this.client.put({ + return this._client.put({ endpoint: `${this.route}/${taskId}`, params: options, data, @@ -104,7 +104,7 @@

routes/Tasks.js

* @param {Object} [options] The parameter options to pass in */ async delete(taskId, options) { - return this.client.delete({ + return this._client.delete({ endpoint: `${this.route}/${taskId}`, params: options, }); @@ -114,21 +114,34 @@

routes/Tasks.js

* Add an attachment to a task * * @param {String} taskId The task id - * @param {String} pathToFile The path to the file - * @param {String} [fileName='attachment'] The file name + * @param {Object} fileSettings The file settings + * @param {String} fileSettings.filePath The path to the file + * @param {String} fileSettings.fileName The name of the attachment file along with its extension type. Example: 'notes.txt' * @param {Object} [options] The parameter options to pass in */ - async addAttachment(taskId, pathToFile, fileName = 'attachment', options) { + async addAttachment(taskId, fileSettings, options) { + // ensure fileSettings are provided + if (fileSettings) { + if (!fileSettings.filePath) { + throw new Error('A file path must be provided'); + } + if (!fileSettings.fileName) { + throw new Error('A file name must be provided'); + } + } else { + throw new Error('File settings must be provided'); + } + // building form-data const form = new FormData(); - form.append('filename', fileName); - form.append('attachment', createReadStream(pathToFile)); + form.append('filename', fileSettings.fileName); + form.append('attachment', createReadStream(fileSettings.filePath)); // setting headers const headers = form.getHeaders(); - headers.authorization = this.client._token; + headers.authorization = this._client._token; - return this.client.post({ + return this._client.post({ endpoint: `${this.route}/${taskId}/attachment`, params: options, data: form, @@ -144,7 +157,7 @@

routes/Tasks.js

* @param {Object} [options] The parameter options to pass in */ async addComment(taskId, data, options) { - return this.client.post({ + return this._client.post({ endpoint: `${this.route}/${taskId}/comment`, params: options, data, @@ -158,7 +171,7 @@

routes/Tasks.js

* @param {Object} [options] The parameter options to pass in */ async getComments(taskId, options) { - return this.client.get({ + return this._client.get({ endpoint: `${this.route}/${taskId}/comment`, params: options, }); @@ -172,7 +185,7 @@

routes/Tasks.js

* @param {Object} [options] The parameter options to pass in */ async createChecklist(taskId, data, options) { - return this.client.post({ + return this._client.post({ endpoint: `${this.route}/${taskId}/checklist`, params: options, data, @@ -188,7 +201,7 @@

routes/Tasks.js

* @param {Object} [options] The parameter options to pass in */ async setCustomFieldValue(taskId, fieldId, data, options) { - return this.client.post({ + return this._client.post({ endpoint: `${this.route}/${taskId}/field/${fieldId}`, params: options, data, @@ -203,7 +216,7 @@

routes/Tasks.js

* @param {Object} [options] The parameter options to pass in */ async deleteCustomFieldValue(taskId, fieldId, options) { - return this.client.delete({ + return this._client.delete({ endpoint: `${this.route}/${taskId}/field/${fieldId}`, params: options, }); @@ -217,7 +230,7 @@

routes/Tasks.js

* @param {Object} [options] The parameter options to pass in */ async addDependency(taskId, data, options) { - return this.client.post({ + return this._client.post({ endpoint: `${this.route}/${taskId}/dependency`, params: options, data, @@ -228,14 +241,12 @@

routes/Tasks.js

* Delete a dependancy for a task * * @param {String} taskId The task id - * @param {Object} data The dependency data - * @param {Object} [options] The parameter options to pass in + * @param {Object} options The parameter options to pass in */ - async deleteDependency(taskId, data, options) { - return this.client.delete({ + async deleteDependency(taskId, options) { + return this._client.delete({ endpoint: `${this.route}/${taskId}/dependency`, params: options, - data, }); } @@ -247,7 +258,7 @@

routes/Tasks.js

* @param {Object} [options] The parameter options to pass in */ async addTaskLink(taskId, linksTo, options) { - return this.client.post({ + return this._client.post({ endpoint: `${this.route}/${taskId}/link/${linksTo}`, params: options, }); @@ -261,7 +272,7 @@

routes/Tasks.js

* @param {String} [options] The parameter options to pass in */ async deleteTaskLink(taskId, linksTo, options) { - return this.client.delete({ + return this._client.delete({ endpoint: `${this.route}/${taskId}/link/${linksTo}`, params: options, }); @@ -276,7 +287,7 @@

routes/Tasks.js

* @param {Object} [options] The parameter options to pass in */ async addGuest(taskId, guestId, data, options) { - return this.client.post({ + return this._client.post({ endpoint: `${this.route}/${taskId}/guest/${guestId}`, params: options, data, @@ -291,7 +302,7 @@

routes/Tasks.js

* @param {Object} [options] The parameter options to pass in */ async removeGuest(taskId, guestId, options) { - return this.client.delete({ + return this._client.delete({ endpoint: `${this.route}/${taskId}/guest/${guestId}`, params: options, }); @@ -303,7 +314,7 @@

routes/Tasks.js

* @param {String} taskId The task id */ async getMembers(taskId) { - return this.client.get({ + return this._client.get({ endpoint: `${this.route}/${taskId}/member`, }); } @@ -316,7 +327,7 @@

routes/Tasks.js

* @param {Object} [options] The parameter options to pass in */ async addTag(taskId, tagName, options) { - return this.client.post({ + return this._client.post({ endpoint: `${this.route}/${taskId}/tag/${tagName}`, params: options, }); @@ -330,7 +341,7 @@

routes/Tasks.js

* @param {Object} [options] The parameter options to pass in */ async removeTag(taskId, tagName, options) { - return this.client.delete({ + return this._client.delete({ endpoint: `${this.route}/${taskId}/tag/${tagName}`, params: options, }); @@ -344,7 +355,7 @@

routes/Tasks.js

* @param {Object} [options] The parameter options to pass in */ async trackTime(taskId, data, options) { - return this.client.post({ + return this._client.post({ endpoint: `${this.route}/${taskId}/time`, params: options, data, @@ -358,7 +369,7 @@

routes/Tasks.js

* @param {Object} [options] The parameter options to pass in */ async getTrackedTime(taskId, options) { - return this.client.get({ + return this._client.get({ endpoint: `${this.route}/${taskId}/time`, params: options, }); @@ -373,7 +384,7 @@

routes/Tasks.js

* @param {Object} [options] The parameter options to pass in */ async editTrackedTime(taskId, intervalId, data, options) { - return this.client.put({ + return this._client.put({ endpoint: `${this.route}/${taskId}/time/${intervalId}`, params: options, data, @@ -388,11 +399,36 @@

routes/Tasks.js

* @param {Object} [options] The parameter options to pass in */ async deleteTrackedTime(taskId, intervalId, options) { - return this.client.delete({ + return this._client.delete({ endpoint: `${this.route}/${taskId}/time/${intervalId}`, params: options, }); } + + /** + * Get tasks time in status + * + * @param {String} taskId The task id + * @param {Object} options The parameter options to pass in + */ + async getTimeInStatus(taskId, options) { + return this._client.get({ + endpoint: `${this.route}/${taskId}/time_in_status`, + params: options, + }); + } + + /** + * Get bulk tasks time in status + * + * @param {Object} options The parameter options to pass in + */ + async getBulkTimeInStatus(options) { + return this._client.get({ + endpoint: `${this.route}/bulk_time_in_status/task_ids`, + params: options, + }); + } } module.exports = Tasks; @@ -410,7 +446,7 @@

routes/Tasks.js


- Documentation generated by JSDoc 3.6.5 on Wed Dec 09 2020 00:03:59 GMT-0500 (Eastern Standard Time) using the docdash theme. + Documentation generated by JSDoc 3.6.5 on Sun Jan 03 2021 11:39:40 GMT-0500 (Eastern Standard Time) using the docdash theme.
diff --git a/docs/routes_Teams.js.html b/docs/routes_Teams.js.html index a6b0292..f94b0e5 100644 --- a/docs/routes_Teams.js.html +++ b/docs/routes_Teams.js.html @@ -41,7 +41,7 @@ -

Home

Github Repo

Classes

+

Home

Github Repo

Classes

@@ -492,7 +492,7 @@

routes/Teams.js


- Documentation generated by JSDoc 3.6.5 on Wed Dec 09 2020 00:03:59 GMT-0500 (Eastern Standard Time) using the docdash theme. + Documentation generated by JSDoc 3.6.5 on Sun Jan 03 2021 11:39:40 GMT-0500 (Eastern Standard Time) using the docdash theme.
diff --git a/docs/routes_Views.js.html b/docs/routes_Views.js.html index 78b49f5..926ddd0 100644 --- a/docs/routes_Views.js.html +++ b/docs/routes_Views.js.html @@ -41,7 +41,7 @@ -

Home

Github Repo

Classes

+

Home

Github Repo

Classes

@@ -156,7 +156,7 @@

routes/Views.js


- Documentation generated by JSDoc 3.6.5 on Wed Dec 09 2020 00:03:59 GMT-0500 (Eastern Standard Time) using the docdash theme. + Documentation generated by JSDoc 3.6.5 on Sun Jan 03 2021 11:39:40 GMT-0500 (Eastern Standard Time) using the docdash theme.
diff --git a/docs/routes_Webhooks.js.html b/docs/routes_Webhooks.js.html index 3c63132..d293778 100644 --- a/docs/routes_Webhooks.js.html +++ b/docs/routes_Webhooks.js.html @@ -41,7 +41,7 @@ -

Home

Github Repo

Classes

+

Home

Github Repo

Classes

@@ -106,7 +106,7 @@

routes/Webhooks.js


- Documentation generated by JSDoc 3.6.5 on Wed Dec 09 2020 00:03:59 GMT-0500 (Eastern Standard Time) using the docdash theme. + Documentation generated by JSDoc 3.6.5 on Sun Jan 03 2021 11:39:40 GMT-0500 (Eastern Standard Time) using the docdash theme.