@docbrasil/api-systemmanager 1.1.18 → 1.1.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/api/admin/doctypes.js +3 -3
  2. package/api/admin/document.js +7 -7
  3. package/api/admin/form.js +3 -3
  4. package/api/admin/index.js +1 -1
  5. package/api/admin/list.js +3 -3
  6. package/api/admin/message.js +2 -2
  7. package/api/admin/notification.js +5 -5
  8. package/api/admin/organization.js +3 -3
  9. package/api/admin/plugin.js +2 -2
  10. package/api/admin/policy.js +3 -3
  11. package/api/admin/processes.js +4 -4
  12. package/api/admin/task.js +3 -3
  13. package/api/admin/user.js +6 -6
  14. package/api/dispatch.js +2 -2
  15. package/api/external.js +5 -5
  16. package/api/general/geoLocation.js +3 -3
  17. package/api/general/index.js +1 -1
  18. package/api/login.js +7 -7
  19. package/api/session.js +1 -1
  20. package/api/user/application.js +2 -2
  21. package/api/user/datasource.js +2 -2
  22. package/api/user/document.js +13 -13
  23. package/api/user/help.js +2 -2
  24. package/api/user/index.js +1 -1
  25. package/api/user/my_tasks.js +11 -11
  26. package/api/user/notification.js +4 -4
  27. package/api/user/organization.js +4 -4
  28. package/api/user/page.js +2 -2
  29. package/api/user/process.js +12 -12
  30. package/api/user/register.js +4 -4
  31. package/api/user/settings.js +5 -5
  32. package/api/user/task.js +41 -4
  33. package/api/user/task_available.js +3 -3
  34. package/api/user/updates.js +1 -1
  35. package/api/user/user.js +8 -8
  36. package/dist/bundle.cjs +179 -142
  37. package/dist/bundle.mjs +1 -1
  38. package/doc/api.md +128 -101
  39. package/docs/Admin.html +1 -1
  40. package/docs/AdminDocuments.html +6 -6
  41. package/docs/AdminForm.html +2 -2
  42. package/docs/AdminLists.html +2 -2
  43. package/docs/AdminNotification.html +4 -4
  44. package/docs/AdminPlugin.html +1 -1
  45. package/docs/AdminPolicy.html +1 -1
  46. package/docs/AdminProcesses.html +2 -2
  47. package/docs/AdminTask.html +1 -1
  48. package/docs/AdminUser.html +4 -4
  49. package/docs/Application.html +1 -1
  50. package/docs/Datasource.html +1 -1
  51. package/docs/Dispatch.html +1 -1
  52. package/docs/Documents.html +10 -10
  53. package/docs/External.html +4 -4
  54. package/docs/GeoLocation.html +1 -1
  55. package/docs/Help.html +1 -1
  56. package/docs/Login.html +6 -6
  57. package/docs/MyTasks.html +10 -10
  58. package/docs/Notification.html +3 -3
  59. package/docs/Organization.html +6 -6
  60. package/docs/Page.html +1 -1
  61. package/docs/Process.html +9 -9
  62. package/docs/Register.html +3 -3
  63. package/docs/Settings.html +3 -3
  64. package/docs/Task.html +287 -3
  65. package/docs/TaskAvailable.html +2 -2
  66. package/docs/User.html +6 -6
  67. package/docs/Users.html +2 -2
  68. package/docs/admin_doctypes.js.html +3 -3
  69. package/docs/admin_document.js.html +7 -7
  70. package/docs/admin_form.js.html +3 -3
  71. package/docs/admin_index.js.html +1 -1
  72. package/docs/admin_list.js.html +3 -3
  73. package/docs/admin_message.js.html +2 -2
  74. package/docs/admin_notification.js.html +5 -5
  75. package/docs/admin_organization.js.html +3 -3
  76. package/docs/admin_plugin.js.html +2 -2
  77. package/docs/admin_policy.js.html +3 -3
  78. package/docs/admin_processes.js.html +4 -4
  79. package/docs/admin_task.js.html +3 -3
  80. package/docs/admin_user.js.html +6 -6
  81. package/docs/dispatch.js.html +2 -2
  82. package/docs/external.js.html +5 -5
  83. package/docs/general_geoLocation.js.html +3 -3
  84. package/docs/general_index.js.html +1 -1
  85. package/docs/login.js.html +7 -7
  86. package/docs/session.js.html +1 -1
  87. package/docs/user_application.js.html +2 -2
  88. package/docs/user_datasource.js.html +2 -2
  89. package/docs/user_document.js.html +13 -13
  90. package/docs/user_help.js.html +2 -2
  91. package/docs/user_index.js.html +1 -1
  92. package/docs/user_my_tasks.js.html +11 -11
  93. package/docs/user_notification.js.html +4 -4
  94. package/docs/user_organization.js.html +4 -4
  95. package/docs/user_page.js.html +2 -2
  96. package/docs/user_process.js.html +12 -12
  97. package/docs/user_register.js.html +4 -4
  98. package/docs/user_settings.js.html +5 -5
  99. package/docs/user_task.js.html +41 -4
  100. package/docs/user_task_available.js.html +3 -3
  101. package/docs/user_updates.js.html +1 -1
  102. package/docs/user_user.js.html +8 -8
  103. package/package.json +1 -1
  104. package/tests/test_querystring.js +0 -18
@@ -120,7 +120,7 @@ class MyTasks {
120
120
  }
121
121
 
122
122
  /**
123
- * @author CloudBrasil <abernardo.br@gmail.com>
123
+ * @author Myndware <augusto.pissarra@myndware.com>
124
124
  * @description Set header with new session
125
125
  * @param {string} session Session, token JWT
126
126
  * @return {object} header with new session
@@ -135,7 +135,7 @@ class MyTasks {
135
135
  }
136
136
 
137
137
  /**
138
- * @author CloudBrasil <abernardo.br@gmail.com>
138
+ * @author Myndware <augusto.pissarra@myndware.com>
139
139
  * @description Method to find my tasks for a user
140
140
  * @param {object} params Params to get tasks
141
141
  * @param {object} params.query Search my tasks query
@@ -179,7 +179,7 @@ class MyTasks {
179
179
  }
180
180
 
181
181
  /**
182
- * @author CloudBrasil <abernardo.br@gmail.com>
182
+ * @author Myndware <augusto.pissarra@myndware.com>
183
183
  * @description Update task dueDate
184
184
  * @param {object} params The Date to save
185
185
  * @param {string} params.dueDate DueDate
@@ -221,7 +221,7 @@ class MyTasks {
221
221
  }
222
222
 
223
223
  /**
224
- * @author CloudBrasil <abernardo.br@gmail.com>
224
+ * @author Myndware <augusto.pissarra@myndware.com>
225
225
  * @description Update task dueDate
226
226
  * @param {string} data.orgId Organization id
227
227
  * @param {string} data.taskId Task Id
@@ -259,7 +259,7 @@ class MyTasks {
259
259
  }
260
260
 
261
261
  /**
262
- * @author CloudBrasil <abernardo.br@gmail.com>
262
+ * @author Myndware <augusto.pissarra@myndware.com>
263
263
  * @description Method to get task multi users
264
264
  * @param {object} params Params to get task
265
265
  * @param {object} params.taskId Task id (_id database)
@@ -298,7 +298,7 @@ class MyTasks {
298
298
  }
299
299
 
300
300
  /**
301
- * @author CloudBrasil <abernardo.br@gmail.com>
301
+ * @author Myndware <augusto.pissarra@myndware.com>
302
302
  * @description remove multi task user
303
303
  * @param {object} params Params of the user to be removed
304
304
  * @param {string} params.userId User id
@@ -340,7 +340,7 @@ class MyTasks {
340
340
  }
341
341
 
342
342
  /**
343
- * @author CloudBrasil <abernardo.br@gmail.com>
343
+ * @author Myndware <augusto.pissarra@myndware.com>
344
344
  * @description Add Multi Task User
345
345
  * @param {object} params Params for adding multi task user
346
346
  * @param {string} params.userId User id
@@ -382,7 +382,7 @@ class MyTasks {
382
382
  }
383
383
 
384
384
  /**
385
- * @author CloudBrasil <abernardo.br@gmail.com>
385
+ * @author Myndware <augusto.pissarra@myndware.com>
386
386
  * @description Method to get assign task users
387
387
  * @param {object} params Params to get task
388
388
  * @param {object} params.taskId Task id (_id database)
@@ -421,7 +421,7 @@ class MyTasks {
421
421
  }
422
422
 
423
423
  /**
424
- * @author CloudBrasil <abernardo.br@gmail.com>
424
+ * @author Myndware <augusto.pissarra@myndware.com>
425
425
  * @description Assign Task user
426
426
  * @param {object} params The params to assign task to user
427
427
  * @param {string} params.orgName Organization Name
@@ -463,7 +463,7 @@ class MyTasks {
463
463
  }
464
464
 
465
465
  /**
466
- * @author CloudBrasil <abernardo.br@gmail.com>
466
+ * @author Myndware <augusto.pissarra@myndware.com>
467
467
  * @description Unclaim task
468
468
  * @param {object} params The params to unclaim task
469
469
  * @param {string} params.orgName Organization Name
@@ -502,7 +502,7 @@ class MyTasks {
502
502
  }
503
503
 
504
504
  /**
505
- * @author CloudBrasil <abernardo.br@gmail.com>
505
+ * @author Myndware <augusto.pissarra@myndware.com>
506
506
  * @description Escalate task
507
507
  * @param {object} params The params to escalate task
508
508
  * @param {string} params.orgName Organization Name
@@ -120,7 +120,7 @@ class Notification {
120
120
  }
121
121
 
122
122
  /**
123
- * @author CloudBrasil <abernardo.br@gmail.com>
123
+ * @author Myndware <augusto.pissarra@myndware.com>
124
124
  * @description Set header with new session
125
125
  * @param {string} session Session, token JWT
126
126
  * @return {object} header with new session
@@ -146,7 +146,7 @@ class Notification {
146
146
  }
147
147
 
148
148
  /**
149
- * @author CloudBrasil <abernardo.br@gmail.com>
149
+ * @author Myndware <augusto.pissarra@myndware.com>
150
150
  * @description Method to add a notification token
151
151
  * @param {object} params Params to add notification token
152
152
  * @param {string} params.token The token
@@ -237,7 +237,7 @@ class Notification {
237
237
  }
238
238
 
239
239
  /**
240
- * @author CloudBrasil <abernardo.br@gmail.com>
240
+ * @author Myndware <augusto.pissarra@myndware.com>
241
241
  * @description Set notification as readed
242
242
  * @param {object} params Params to update the notification
243
243
  * @param {string} params.id Notification Id
@@ -273,7 +273,7 @@ class Notification {
273
273
  }
274
274
 
275
275
  /**
276
- * @author CloudBrasil <abernardo.br@gmail.com>
276
+ * @author Myndware <augusto.pissarra@myndware.com>
277
277
  * @description Set notification as unreaded
278
278
  * @param {object} params Params to update the notification
279
279
  * @param {string} params.id Notification Id
@@ -121,7 +121,7 @@ class Organization {
121
121
  }
122
122
 
123
123
  /**
124
- * @author CloudBrasil <abernardo.br@gmail.com>
124
+ * @author Myndware <augusto.pissarra@myndware.com>
125
125
  * @description Set header with new session
126
126
  * @param {string} session Session, token JWT
127
127
  * @return {object} header with new session
@@ -194,7 +194,7 @@ class Organization {
194
194
  }
195
195
 
196
196
  /**
197
- * @author CloudBrasil <abernardo.br@gmail.com>
197
+ * @author Myndware <augusto.pissarra@myndware.com>
198
198
  * @description Update avatar of organization by session of user not allow session user SU
199
199
  * @param {object} params Params to update avatar
200
200
  * @param {string} params.avatar Image in base64 to update
@@ -234,7 +234,7 @@ class Organization {
234
234
  }
235
235
 
236
236
  /**
237
- * @author CloudBrasil <abernardo.br@gmail.com>
237
+ * @author Myndware <augusto.pissarra@myndware.com>
238
238
  * @description Remove avatar of user by session of user not allow session user SU
239
239
  * @param {string} session Is token JWT of user NOT allow SU
240
240
  * @return {Promise}
@@ -261,7 +261,7 @@ class Organization {
261
261
  }
262
262
 
263
263
  /**
264
- * @author Thiago Anselmo <thiagoo.anselmoo@gmail.com>
264
+ * @author Myndware <augusto.pissarra@myndware.com>
265
265
  * @description Call URL internal, need auth JWT (session)
266
266
  * @param {!object} params Params to call fectch (URL internal)
267
267
  * @param {!string} params.url URL to call
@@ -120,7 +120,7 @@ class Page {
120
120
  }
121
121
 
122
122
  /**
123
- * @author CloudBrasil <abernardo.br@gmail.com>
123
+ * @author Myndware <augusto.pissarra@myndware.com>
124
124
  * @description Set header with new session
125
125
  * @param {string} session Session, token JWT
126
126
  * @return {object} header with new session
@@ -135,7 +135,7 @@ class Page {
135
135
  }
136
136
 
137
137
  /**
138
- * @author CloudBrasil <abernardo.br@gmail.com>
138
+ * @author Myndware <augusto.pissarra@myndware.com>
139
139
  * @description Get the available page for an application inside an organization
140
140
  * @param {object} params Params to get task
141
141
  * @param {object} params.orgId Organization id (_id database)
@@ -105,7 +105,7 @@ class Process {
105
105
  }
106
106
 
107
107
  /**
108
- * @author CloudBrasil <abernardo.br@gmail.com>
108
+ * @author Myndware <augusto.pissarra@myndware.com>
109
109
  * @description Get the return data and check for errors
110
110
  * @param {object} retData Response HTTP
111
111
  * @return {*}
@@ -120,7 +120,7 @@ class Process {
120
120
  }
121
121
 
122
122
  /**
123
- * @author CloudBrasil <abernardo.br@gmail.com>
123
+ * @author Myndware <augusto.pissarra@myndware.com>
124
124
  * @description Set header with new session
125
125
  * @param {string} session Session, token JWT
126
126
  * @return {object} header with new session
@@ -135,7 +135,7 @@ class Process {
135
135
  }
136
136
 
137
137
  /**
138
- * @author CloudBrasil <abernardo.br@gmail.com>
138
+ * @author Myndware <augusto.pissarra@myndware.com>
139
139
  * @description Set header for a bigger payload
140
140
  * @param {string} session Session, token JWT
141
141
  * @return {object} header with new session
@@ -152,7 +152,7 @@ class Process {
152
152
  }
153
153
 
154
154
  /**
155
- * @author CloudBrasil <abernardo.br@gmail.com>
155
+ * @author Myndware <augusto.pissarra@myndware.com>
156
156
  * @description Start process
157
157
  * @param {object} params Params to start process
158
158
  * @param {string} params.orgProcessId The organization process id (_id database);
@@ -193,7 +193,7 @@ class Process {
193
193
  }
194
194
 
195
195
  /**
196
- * @author CloudBrasil <abernardo.br@gmail.com>
196
+ * @author Myndware <augusto.pissarra@myndware.com>
197
197
  * @description Get process properties of process
198
198
  * @param {object} params Params to get process properties
199
199
  * @param {string} params.processId Process id (_id database);
@@ -231,7 +231,7 @@ class Process {
231
231
  }
232
232
 
233
233
  /**
234
- * @author CloudBrasil <abernardo.br@gmail.com>
234
+ * @author Myndware <augusto.pissarra@myndware.com>
235
235
  * @description Get the search info of a organization process
236
236
  * @param {object} params Params to get search info
237
237
  * @param {string} params.orgProcessId The id of an organization process (_id database);
@@ -275,7 +275,7 @@ class Process {
275
275
  }
276
276
 
277
277
  /**
278
- * @author CloudBrasil <abernardo.br@gmail.com>
278
+ * @author Myndware <augusto.pissarra@myndware.com>
279
279
  * @description Method to search processes
280
280
  * @param {object} params Params to search processes
281
281
  * @param {object} params.query Search process query
@@ -319,7 +319,7 @@ class Process {
319
319
  }
320
320
 
321
321
  /**
322
- * @author CloudBrasil <abernardo.br@gmail.com>
322
+ * @author Myndware <augusto.pissarra@myndware.com>
323
323
  * @description Method to remove process
324
324
  * @param {object} params Params to remove process
325
325
  * @param {object} params.orgId Organization id (_id database)
@@ -356,7 +356,7 @@ class Process {
356
356
  }
357
357
 
358
358
  /**
359
- * @author CloudBrasil <abernardo.br@gmail.com>
359
+ * @author Myndware <augusto.pissarra@myndware.com>
360
360
  * @description Method to export status data
361
361
  * @param {object} params Params to export status data
362
362
  * @param {object} params.query Search process query
@@ -395,7 +395,7 @@ class Process {
395
395
  }
396
396
 
397
397
  /**
398
- * @author CloudBrasil <abernardo.br@gmail.com>
398
+ * @author Myndware <augusto.pissarra@myndware.com>
399
399
  * @description Method to export process data
400
400
  * @param {object} params Params to export process data
401
401
  * @param {object} params.query Search process query
@@ -434,7 +434,7 @@ class Process {
434
434
  }
435
435
 
436
436
  /**
437
- * @author CloudBrasil <abernardo.br@gmail.com>
437
+ * @author Myndware <augusto.pissarra@myndware.com>
438
438
  * @description Method to get Process Docs
439
439
  * @param {object} params Params to get process docs
440
440
  * @param {string} params.orgProcessId Organization Process Id
@@ -475,7 +475,7 @@ class Process {
475
475
  }
476
476
 
477
477
  /**
478
- * @author CloudBrasil <abernardo.br@gmail.com>
478
+ * @author Myndware <augusto.pissarra@myndware.com>
479
479
  * @description Method to download the process documents
480
480
  * @param {object} params Params to download the process documents
481
481
  * @param {string} params.orgId Organization id (_id database)
@@ -121,7 +121,7 @@ class Register {
121
121
  }
122
122
 
123
123
  /**
124
- * @author CloudBrasil <abernardo.br@gmail.com>
124
+ * @author Myndware <augusto.pissarra@myndware.com>
125
125
  * @description Set header with new session
126
126
  * @param {string} session Session, token JWT
127
127
  * @return {object} header with new session
@@ -136,7 +136,7 @@ class Register {
136
136
  }
137
137
 
138
138
  /**
139
- * @author CloudBrasil <abernardo.br@gmail.com>
139
+ * @author Myndware <augusto.pissarra@myndware.com>
140
140
  * @param {object} params.registerId The registerId that comes with the registration page context
141
141
  * @return {string} orgname The orgname of the organization in the registerId
142
142
  * @public
@@ -155,7 +155,7 @@ class Register {
155
155
  }
156
156
 
157
157
  /**
158
- * @author CloudBrasil <abernardo.br@gmail.com>
158
+ * @author Myndware <augusto.pissarra@myndware.com>
159
159
  * @description Method to find task by id
160
160
  * @param {object} params Params to get task
161
161
  * @param {string} params.registerId The registerId that comes with the registration page context
@@ -206,7 +206,7 @@ class Register {
206
206
  }
207
207
 
208
208
  /**
209
- * @author CloudBrasil <abernardo.br@gmail.com>
209
+ * @author Myndware <augusto.pissarra@myndware.com>
210
210
  * @description Method to register a user
211
211
  * @param {object} params Params to get task
212
212
  * @param {string} params.registerId The registerId that comes with the registration page context
@@ -110,7 +110,7 @@ class Settings {
110
110
  }
111
111
 
112
112
  /**
113
- * @author CloudBrasil <abernardo.br@gmail.com>
113
+ * @author Myndware <augusto.pissarra@myndware.com>
114
114
  * @description Get the return data and check for errors
115
115
  * @param {object} retData Response HTTP
116
116
  * @return {*}
@@ -125,7 +125,7 @@ class Settings {
125
125
  }
126
126
 
127
127
  /**
128
- * @author CloudBrasil <abernardo.br@gmail.com>
128
+ * @author Myndware <augusto.pissarra@myndware.com>
129
129
  * @description Set header with new session
130
130
  * @param {string} session Session, token JWT
131
131
  * @return {object} header with new session
@@ -140,7 +140,7 @@ class Settings {
140
140
  }
141
141
 
142
142
  /**
143
- * @author CloudBrasil <abernardo.br@gmail.com>
143
+ * @author Myndware <augusto.pissarra@myndware.com>
144
144
  * @description Adds/updates a user settings
145
145
  * @param {object} settings Full user settings
146
146
  * @param {string} session Is token JWT of user NOT allow SU
@@ -172,7 +172,7 @@ class Settings {
172
172
  }
173
173
 
174
174
  /**
175
- * @author CloudBrasil <abernardo.br@gmail.com>
175
+ * @author Myndware <augusto.pissarra@myndware.com>
176
176
  * @description Gets the user settings. Returns an array of settings.
177
177
  * @param {string} session Is token JWT of user NOT allow SU
178
178
  * @return {Promise}
@@ -199,7 +199,7 @@ class Settings {
199
199
  }
200
200
 
201
201
  /**
202
- * @author CloudBrasil <abernardo.br@gmail.com>
202
+ * @author Myndware <augusto.pissarra@myndware.com>
203
203
  * @description Removes the user settings
204
204
  * @param {string} session Is token JWT of user NOT allow SU
205
205
  * @return {Promise}
@@ -124,7 +124,7 @@ class Task {
124
124
  }
125
125
 
126
126
  /**
127
- * @author CloudBrasil <abernardo.br@gmail.com>
127
+ * @author Myndware <augusto.pissarra@myndware.com>
128
128
  * @description Set header with new session
129
129
  * @param {string} session Session, token JWT
130
130
  * @return {object} header with new session
@@ -139,7 +139,7 @@ class Task {
139
139
  }
140
140
 
141
141
  /**
142
- * @author CloudBrasil <abernardo.br@gmail.com>
142
+ * @author Myndware <augusto.pissarra@myndware.com>
143
143
  * @description Method to find task by id
144
144
  * @param {object} params Params to get task
145
145
  * @param {object} params.processId Proccess id (_id database)
@@ -181,7 +181,7 @@ class Task {
181
181
  }
182
182
 
183
183
  /**
184
- * @author CloudBrasil <abernardo.br@gmail.com>
184
+ * @author Myndware <augusto.pissarra@myndware.com>
185
185
  * @description Find task by id and update
186
186
  * @param {object} params Params to update task
187
187
  * @param {object} params.userId User id (_id database)
@@ -243,7 +243,7 @@ class Task {
243
243
  }
244
244
 
245
245
  /**
246
- * @author CloudBrasil <abernardo.br@gmail.com>
246
+ * @author Myndware <augusto.pissarra@myndware.com>
247
247
  * @description Find task by id and update
248
248
  * @param {!object} params Params - to update task
249
249
  * @param {!string} params.taskId - Task id (_id database)
@@ -286,6 +286,43 @@ class Task {
286
286
  throw ex;
287
287
  }
288
288
  }
289
+
290
+ /**
291
+ * @author Myndware <augusto.pissarra@myndware.com>
292
+ * @description Get the tasks and available tasks summary (totals) for specific tags
293
+ * @param {object} params Params - to update task
294
+ * @param {array<string>} params.tags - The tags to get task summaries
295
+ * @param {string} session Session, token JWT
296
+ * @return {Promise<object>} data
297
+ * @return {Promise<object>} data.tasks - the total tasks
298
+ * @return {Promise<object>} data.availableTasks - the total available tasks
299
+ * @public
300
+ * @async
301
+ * @example
302
+ *
303
+ * const API = require('@docbrasil/api-systemmanager');
304
+ * const api = new API();
305
+ * const params = {
306
+ * tags: ['INCIDENTS']
307
+ * };
308
+ * const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
309
+ * await api.user.task.getSummaryByTags(params, session);
310
+ */
311
+ async getSummaryByTags(params, session) {
312
+ const self = this;
313
+
314
+ try {
315
+ Joi.assert(params, Joi.object().required());
316
+ Joi.assert(params.tags, Joi.array().required(), 'Tags is required');
317
+
318
+ const url = `/organizations/tasks/summary`;
319
+ const apiCall = self._client.post(url, params, self._setHeader(session));
320
+
321
+ return self._returnData(await apiCall);
322
+ } catch (ex) {
323
+ throw ex;
324
+ }
325
+ }
289
326
  }
290
327
 
291
328
  export default Task;
@@ -120,7 +120,7 @@ class TaskAvailable {
120
120
  }
121
121
 
122
122
  /**
123
- * @author CloudBrasil <abernardo.br@gmail.com>
123
+ * @author Myndware <augusto.pissarra@myndware.com>
124
124
  * @description Set header with new session
125
125
  * @param {string} session Session, token JWT
126
126
  * @return {object} header with new session
@@ -135,7 +135,7 @@ class TaskAvailable {
135
135
  }
136
136
 
137
137
  /**
138
- * @author CloudBrasil <abernardo.br@gmail.com>
138
+ * @author Myndware <augusto.pissarra@myndware.com>
139
139
  * @description Method to find available tasks for a user
140
140
  * @param {object} params Params to get task
141
141
  * @param {object} params.query Search available tasks query
@@ -179,7 +179,7 @@ class TaskAvailable {
179
179
  }
180
180
 
181
181
  /**
182
- * @author CloudBrasil <abernardo.br@gmail.com>
182
+ * @author Myndware <augusto.pissarra@myndware.com>
183
183
  * @description Method for a user to claim an available task
184
184
  * @param {object} params Params to get task
185
185
  * @param {object} params.taskId the task id to claim
@@ -120,7 +120,7 @@ class Updates {
120
120
  }
121
121
 
122
122
  /**
123
- * @author CloudBrasil <abernardo.br@gmail.com>
123
+ * @author Myndware <augusto.pissarra@myndware.com>
124
124
  * @description Set header with new session
125
125
  * @param {string} session Session, token JWT
126
126
  * @return {object} header with new session
@@ -110,7 +110,7 @@ class User {
110
110
  }
111
111
 
112
112
  /**
113
- * @author CloudBrasil <abernardo.br@gmail.com>
113
+ * @author Myndware <augusto.pissarra@myndware.com>
114
114
  * @description Get the return data and check for errors
115
115
  * @param {object} retData Response HTTP
116
116
  * @return {*}
@@ -125,7 +125,7 @@ class User {
125
125
  }
126
126
 
127
127
  /**
128
- * @author CloudBrasil <abernardo.br@gmail.com>
128
+ * @author Myndware <augusto.pissarra@myndware.com>
129
129
  * @description Set header with new session
130
130
  * @param {string} session Session, token JWT
131
131
  * @return {object} header with new session
@@ -140,7 +140,7 @@ class User {
140
140
  }
141
141
 
142
142
  /**
143
- * @author CloudBrasil <abernardo.br@gmail.com>
143
+ * @author Myndware <augusto.pissarra@myndware.com>
144
144
  * @description Update avatar of user by session of user not allow session user SU
145
145
  * @param {object} params Params to update avatar
146
146
  * @param {string} params.avatar Image in base64 to update
@@ -180,7 +180,7 @@ class User {
180
180
  }
181
181
 
182
182
  /**
183
- * @author CloudBrasil <abernardo.br@gmail.com>
183
+ * @author Myndware <augusto.pissarra@myndware.com>
184
184
  * @description Remove avatar of user by session of user not allow session user SU
185
185
  * @param {string} session Is token JWT of user NOT allow SU
186
186
  * @return {Promise}
@@ -207,7 +207,7 @@ class User {
207
207
  }
208
208
 
209
209
  /**
210
- * @author CloudBrasil <abernardo.br@gmail.com>
210
+ * @author Myndware <augusto.pissarra@myndware.com>
211
211
  * @description Remove the signature of user by session
212
212
  * @param {string} session Is token JWT of user NOT allow SU
213
213
  * @return {Promise}
@@ -234,7 +234,7 @@ class User {
234
234
  }
235
235
 
236
236
  /**
237
- * @author CloudBrasil <abernardo.br@gmail.com>
237
+ * @author Myndware <augusto.pissarra@myndware.com>
238
238
  * @description Sava a new signature of user by session
239
239
  * @param {object} data The signature data to save
240
240
  * @param {string} data.type CURSIVE or HANDWRITE
@@ -281,7 +281,7 @@ class User {
281
281
  }
282
282
 
283
283
  /**
284
- * @author CloudBrasil <abernardo.br@gmail.com>
284
+ * @author Myndware <augusto.pissarra@myndware.com>
285
285
  * @description Update a user profile by id
286
286
  * @param {object} params Params to update task
287
287
  * @param {string} params.name The name of the user
@@ -341,7 +341,7 @@ class User {
341
341
  }
342
342
 
343
343
  /**
344
- * @author CloudBrasil <abernardo.br@gmail.com>
344
+ * @author Myndware <augusto.pissarra@myndware.com>
345
345
  * @description Change a user's organization
346
346
  * @param {string} id Organization id
347
347
  * @param {string} session Is token JWT of user NOT allow SU
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@docbrasil/api-systemmanager",
3
3
  "description": "Module API System Manager",
4
- "version": "1.1.18",
4
+ "version": "1.1.20",
5
5
  "scripts": {
6
6
  "htmldoc": "rm -rf docs && jsdoc api/** -d docs -t ./node_modules/better-docs",
7
7
  "doc": "rm -rf doc && mkdir doc && jsdoc2md api/**/* api/* > doc/api.md",
@@ -1,18 +0,0 @@
1
- function doQuery(query) {
2
- const searchParams = new URLSearchParams(query);
3
- const queryString = searchParams.toString();
4
- return queryString;
5
- }
6
-
7
- console.log(doQuery({
8
- p: 200,
9
- i: 1,
10
- s: 'Mais recentes',
11
- as: '',
12
- m: 'w',
13
- ai: '111',
14
- di: '222',
15
- ix: JSON.stringify([
16
- ['extraUserid', '333', '=', 'text']
17
- ])
18
- }));