@docbrasil/api-systemmanager 1.1.19 → 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.
- package/api/admin/doctypes.js +3 -3
- package/api/admin/document.js +7 -7
- package/api/admin/form.js +3 -3
- package/api/admin/index.js +1 -1
- package/api/admin/list.js +3 -3
- package/api/admin/message.js +2 -2
- package/api/admin/notification.js +5 -5
- package/api/admin/organization.js +3 -3
- package/api/admin/plugin.js +2 -2
- package/api/admin/policy.js +3 -3
- package/api/admin/processes.js +4 -4
- package/api/admin/task.js +3 -3
- package/api/admin/user.js +6 -6
- package/api/dispatch.js +2 -2
- package/api/external.js +5 -5
- package/api/general/geoLocation.js +3 -3
- package/api/general/index.js +1 -1
- package/api/login.js +7 -7
- package/api/session.js +1 -1
- package/api/user/application.js +2 -2
- package/api/user/datasource.js +2 -2
- package/api/user/document.js +13 -13
- package/api/user/help.js +2 -2
- package/api/user/index.js +1 -1
- package/api/user/my_tasks.js +12 -12
- package/api/user/notification.js +4 -4
- package/api/user/organization.js +4 -4
- package/api/user/page.js +2 -2
- package/api/user/process.js +12 -12
- package/api/user/register.js +4 -4
- package/api/user/settings.js +5 -5
- package/api/user/task.js +41 -4
- package/api/user/task_available.js +3 -3
- package/api/user/updates.js +1 -1
- package/api/user/user.js +8 -8
- package/dist/bundle.cjs +180 -143
- package/dist/bundle.mjs +1 -1
- package/doc/api.md +129 -102
- package/docs/Admin.html +1 -1
- package/docs/AdminDocuments.html +6 -6
- package/docs/AdminForm.html +2 -2
- package/docs/AdminLists.html +2 -2
- package/docs/AdminNotification.html +4 -4
- package/docs/AdminPlugin.html +1 -1
- package/docs/AdminPolicy.html +1 -1
- package/docs/AdminProcesses.html +2 -2
- package/docs/AdminTask.html +1 -1
- package/docs/AdminUser.html +4 -4
- package/docs/Application.html +1 -1
- package/docs/Datasource.html +1 -1
- package/docs/Dispatch.html +1 -1
- package/docs/Documents.html +10 -10
- package/docs/External.html +4 -4
- package/docs/GeoLocation.html +1 -1
- package/docs/Help.html +1 -1
- package/docs/Login.html +6 -6
- package/docs/MyTasks.html +10 -10
- package/docs/Notification.html +3 -3
- package/docs/Organization.html +6 -6
- package/docs/Page.html +1 -1
- package/docs/Process.html +9 -9
- package/docs/Register.html +3 -3
- package/docs/Settings.html +3 -3
- package/docs/Task.html +287 -3
- package/docs/TaskAvailable.html +2 -2
- package/docs/User.html +6 -6
- package/docs/Users.html +2 -2
- package/docs/admin_doctypes.js.html +3 -3
- package/docs/admin_document.js.html +7 -7
- package/docs/admin_form.js.html +3 -3
- package/docs/admin_index.js.html +1 -1
- package/docs/admin_list.js.html +3 -3
- package/docs/admin_message.js.html +2 -2
- package/docs/admin_notification.js.html +5 -5
- package/docs/admin_organization.js.html +3 -3
- package/docs/admin_plugin.js.html +2 -2
- package/docs/admin_policy.js.html +3 -3
- package/docs/admin_processes.js.html +4 -4
- package/docs/admin_task.js.html +3 -3
- package/docs/admin_user.js.html +6 -6
- package/docs/dispatch.js.html +2 -2
- package/docs/external.js.html +5 -5
- package/docs/general_geoLocation.js.html +3 -3
- package/docs/general_index.js.html +1 -1
- package/docs/login.js.html +7 -7
- package/docs/session.js.html +1 -1
- package/docs/user_application.js.html +2 -2
- package/docs/user_datasource.js.html +2 -2
- package/docs/user_document.js.html +13 -13
- package/docs/user_help.js.html +2 -2
- package/docs/user_index.js.html +1 -1
- package/docs/user_my_tasks.js.html +11 -11
- package/docs/user_notification.js.html +4 -4
- package/docs/user_organization.js.html +4 -4
- package/docs/user_page.js.html +2 -2
- package/docs/user_process.js.html +12 -12
- package/docs/user_register.js.html +4 -4
- package/docs/user_settings.js.html +5 -5
- package/docs/user_task.js.html +41 -4
- package/docs/user_task_available.js.html +3 -3
- package/docs/user_updates.js.html +1 -1
- package/docs/user_user.js.html +8 -8
- package/package.json +1 -1
- package/.project +0 -11
|
@@ -120,7 +120,7 @@ class MyTasks {
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
/**
|
|
123
|
-
* @author
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
package/docs/user_page.js.html
CHANGED
|
@@ -120,7 +120,7 @@ class Page {
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
/**
|
|
123
|
-
* @author
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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}
|
package/docs/user_task.js.html
CHANGED
|
@@ -124,7 +124,7 @@ class Task {
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
/**
|
|
127
|
-
* @author
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
package/docs/user_user.js.html
CHANGED
|
@@ -110,7 +110,7 @@ class User {
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
/**
|
|
113
|
-
* @author
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
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",
|