@docbrasil/api-systemmanager 1.1.19 → 1.1.21
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 +11 -11
- 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 +108 -9
- package/dist/bundle.cjs +279 -143
- package/dist/bundle.mjs +1 -1
- package/doc/api.md +202 -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 +11 -11
- 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 +925 -7
- 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 +12 -12
- 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 +108 -9
- package/package.json +1 -1
- package/.project +0 -11
package/api/user/document.js
CHANGED
|
@@ -47,7 +47,7 @@ class Documents {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
|
-
* @author
|
|
50
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
51
51
|
* @description Set header with new session
|
|
52
52
|
* @param {string} session Session, token JWT
|
|
53
53
|
* @return {object} header with new session
|
|
@@ -62,7 +62,7 @@ class Documents {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
|
-
* @author
|
|
65
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
66
66
|
* @description Create document with informed data
|
|
67
67
|
* @param {object} params Object for add new document
|
|
68
68
|
* @param {string} params.orgname Organization name
|
|
@@ -126,7 +126,7 @@ class Documents {
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
/**
|
|
129
|
-
* @author
|
|
129
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
130
130
|
* @description Transform objtect query in query string
|
|
131
131
|
* @param {object} searchQuery object wicth query
|
|
132
132
|
* @return {string} Retutn string query
|
|
@@ -150,7 +150,7 @@ class Documents {
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
/**
|
|
153
|
-
* @author
|
|
153
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
154
154
|
* @description Create new document
|
|
155
155
|
* @param {object} params Object for add new document
|
|
156
156
|
* @param {string} params.orgname Organization name
|
|
@@ -239,7 +239,7 @@ class Documents {
|
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
/**
|
|
242
|
-
* @author
|
|
242
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
243
243
|
* @description Updates a document
|
|
244
244
|
* @param {string} id Document _id
|
|
245
245
|
* @param {object} params Object for document payload to update. It has to be the FULL document data, that you can get with findById
|
|
@@ -272,7 +272,7 @@ class Documents {
|
|
|
272
272
|
}
|
|
273
273
|
|
|
274
274
|
/**
|
|
275
|
-
* @author
|
|
275
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
276
276
|
* @description Updates a document.
|
|
277
277
|
* IMPORTANT: if your document has a content, it will NOT bring the content.
|
|
278
278
|
* @param {string} id Document _id
|
|
@@ -305,7 +305,7 @@ class Documents {
|
|
|
305
305
|
}
|
|
306
306
|
|
|
307
307
|
/**
|
|
308
|
-
* @author
|
|
308
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
309
309
|
* @param {object} params Object with params
|
|
310
310
|
* @param {string} params.index Field to search
|
|
311
311
|
* @param {string} params.txtToSearch Text to search
|
|
@@ -397,7 +397,7 @@ class Documents {
|
|
|
397
397
|
}
|
|
398
398
|
|
|
399
399
|
/**
|
|
400
|
-
* @author
|
|
400
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
401
401
|
* @description Remove document by id
|
|
402
402
|
* @param {object} params Params to remove document
|
|
403
403
|
* @param {string} params.docId Document Id (_id database)
|
|
@@ -441,7 +441,7 @@ class Documents {
|
|
|
441
441
|
}
|
|
442
442
|
|
|
443
443
|
/**
|
|
444
|
-
* @author
|
|
444
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
445
445
|
* @description Remove documents
|
|
446
446
|
* @param {object} params Params to remove document
|
|
447
447
|
* @param {array<string>} params.documents An array ids of documents (_id database)
|
|
@@ -487,7 +487,7 @@ class Documents {
|
|
|
487
487
|
|
|
488
488
|
/**
|
|
489
489
|
*
|
|
490
|
-
* @author
|
|
490
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
491
491
|
* @description Request signed url url to put or get
|
|
492
492
|
* @param {object} params Params to request signed url
|
|
493
493
|
* @param {string} params.methodType Method type HTTP get or put
|
|
@@ -576,7 +576,7 @@ class Documents {
|
|
|
576
576
|
|
|
577
577
|
/**
|
|
578
578
|
*
|
|
579
|
-
* @author
|
|
579
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
580
580
|
* @description Request signed url url to put or get
|
|
581
581
|
* @param {object} params Params to request signed url
|
|
582
582
|
* @param {array} params.docs the list of documents to get the signed urls
|
|
@@ -706,7 +706,7 @@ class Documents {
|
|
|
706
706
|
}
|
|
707
707
|
|
|
708
708
|
/**
|
|
709
|
-
* @author
|
|
709
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
710
710
|
* Checks if a document can be added and it does not repeat its primary key
|
|
711
711
|
* @param params
|
|
712
712
|
* @param params.orgId {string} the organization id
|
|
@@ -760,7 +760,7 @@ class Documents {
|
|
|
760
760
|
}
|
|
761
761
|
|
|
762
762
|
/**
|
|
763
|
-
* @author
|
|
763
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
764
764
|
* @description Method to search documents for
|
|
765
765
|
* @param {object} params Params to search the documents
|
|
766
766
|
* @param {object} params.query Search documents query
|
package/api/user/help.js
CHANGED
|
@@ -33,7 +33,7 @@ class Help {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
* @author
|
|
36
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
37
37
|
* @description Set header with new session
|
|
38
38
|
* @param {string} session Session, token JWT
|
|
39
39
|
* @return {object} header with new session
|
|
@@ -79,7 +79,7 @@ class Help {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
|
-
* @author
|
|
82
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
83
83
|
* @description Method to find helps from a topic
|
|
84
84
|
* @param {object} params Params to get helps from topic
|
|
85
85
|
* @param {object} params.id Topic id (_id database)
|
package/api/user/index.js
CHANGED
|
@@ -19,7 +19,7 @@ import Settings from './settings.js';
|
|
|
19
19
|
*/
|
|
20
20
|
class Users {
|
|
21
21
|
/**
|
|
22
|
-
* @author
|
|
22
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
23
23
|
* @constructor
|
|
24
24
|
* @param {object} options Params of the constructor
|
|
25
25
|
* @param {object} options.parent This of the pararent
|
package/api/user/my_tasks.js
CHANGED
|
@@ -33,7 +33,7 @@ class MyTasks {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
* @author
|
|
36
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
37
37
|
* @description Set header with new session
|
|
38
38
|
* @param {string} session Session, token JWT
|
|
39
39
|
* @return {object} header with new session
|
|
@@ -48,7 +48,7 @@ class MyTasks {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
|
-
* @author
|
|
51
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
52
52
|
* @description Method to find my tasks for a user
|
|
53
53
|
* @param {object} params Params to get tasks
|
|
54
54
|
* @param {object} params.query Search my tasks query
|
|
@@ -92,7 +92,7 @@ class MyTasks {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
/**
|
|
95
|
-
* @author
|
|
95
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
96
96
|
* @description Update task dueDate
|
|
97
97
|
* @param {object} params The Date to save
|
|
98
98
|
* @param {string} params.dueDate DueDate
|
|
@@ -134,7 +134,7 @@ class MyTasks {
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
/**
|
|
137
|
-
* @author
|
|
137
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
138
138
|
* @description Update task dueDate
|
|
139
139
|
* @param {string} data.orgId Organization id
|
|
140
140
|
* @param {string} data.taskId Task Id
|
|
@@ -172,7 +172,7 @@ class MyTasks {
|
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
/**
|
|
175
|
-
* @author
|
|
175
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
176
176
|
* @description Method to get task multi users
|
|
177
177
|
* @param {object} params Params to get task
|
|
178
178
|
* @param {object} params.taskId Task id (_id database)
|
|
@@ -211,7 +211,7 @@ class MyTasks {
|
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
/**
|
|
214
|
-
* @author
|
|
214
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
215
215
|
* @description remove multi task user
|
|
216
216
|
* @param {object} params Params of the user to be removed
|
|
217
217
|
* @param {string} params.userId User id
|
|
@@ -253,7 +253,7 @@ class MyTasks {
|
|
|
253
253
|
}
|
|
254
254
|
|
|
255
255
|
/**
|
|
256
|
-
* @author
|
|
256
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
257
257
|
* @description Add Multi Task User
|
|
258
258
|
* @param {object} params Params for adding multi task user
|
|
259
259
|
* @param {string} params.userId User id
|
|
@@ -295,7 +295,7 @@ class MyTasks {
|
|
|
295
295
|
}
|
|
296
296
|
|
|
297
297
|
/**
|
|
298
|
-
* @author
|
|
298
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
299
299
|
* @description Method to get assign task users
|
|
300
300
|
* @param {object} params Params to get task
|
|
301
301
|
* @param {object} params.taskId Task id (_id database)
|
|
@@ -334,7 +334,7 @@ class MyTasks {
|
|
|
334
334
|
}
|
|
335
335
|
|
|
336
336
|
/**
|
|
337
|
-
* @author
|
|
337
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
338
338
|
* @description Assign Task user
|
|
339
339
|
* @param {object} params The params to assign task to user
|
|
340
340
|
* @param {string} params.orgName Organization Name
|
|
@@ -376,7 +376,7 @@ class MyTasks {
|
|
|
376
376
|
}
|
|
377
377
|
|
|
378
378
|
/**
|
|
379
|
-
* @author
|
|
379
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
380
380
|
* @description Unclaim task
|
|
381
381
|
* @param {object} params The params to unclaim task
|
|
382
382
|
* @param {string} params.orgName Organization Name
|
|
@@ -415,7 +415,7 @@ class MyTasks {
|
|
|
415
415
|
}
|
|
416
416
|
|
|
417
417
|
/**
|
|
418
|
-
* @author
|
|
418
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
419
419
|
* @description Escalate task
|
|
420
420
|
* @param {object} params The params to escalate task
|
|
421
421
|
* @param {string} params.orgName Organization Name
|
package/api/user/notification.js
CHANGED
|
@@ -33,7 +33,7 @@ class Notification {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
* @author
|
|
36
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
37
37
|
* @description Set header with new session
|
|
38
38
|
* @param {string} session Session, token JWT
|
|
39
39
|
* @return {object} header with new session
|
|
@@ -59,7 +59,7 @@ class Notification {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
|
-
* @author
|
|
62
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
63
63
|
* @description Method to add a notification token
|
|
64
64
|
* @param {object} params Params to add notification token
|
|
65
65
|
* @param {string} params.token The token
|
|
@@ -150,7 +150,7 @@ class Notification {
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
/**
|
|
153
|
-
* @author
|
|
153
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
154
154
|
* @description Set notification as readed
|
|
155
155
|
* @param {object} params Params to update the notification
|
|
156
156
|
* @param {string} params.id Notification Id
|
|
@@ -186,7 +186,7 @@ class Notification {
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
/**
|
|
189
|
-
* @author
|
|
189
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
190
190
|
* @description Set notification as unreaded
|
|
191
191
|
* @param {object} params Params to update the notification
|
|
192
192
|
* @param {string} params.id Notification Id
|
package/api/user/organization.js
CHANGED
|
@@ -34,7 +34,7 @@ class Organization {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
* @author
|
|
37
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
38
38
|
* @description Set header with new session
|
|
39
39
|
* @param {string} session Session, token JWT
|
|
40
40
|
* @return {object} header with new session
|
|
@@ -107,7 +107,7 @@ class Organization {
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
/**
|
|
110
|
-
* @author
|
|
110
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
111
111
|
* @description Update avatar of organization by session of user not allow session user SU
|
|
112
112
|
* @param {object} params Params to update avatar
|
|
113
113
|
* @param {string} params.avatar Image in base64 to update
|
|
@@ -147,7 +147,7 @@ class Organization {
|
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
/**
|
|
150
|
-
* @author
|
|
150
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
151
151
|
* @description Remove avatar of user by session of user not allow session user SU
|
|
152
152
|
* @param {string} session Is token JWT of user NOT allow SU
|
|
153
153
|
* @return {Promise}
|
|
@@ -174,7 +174,7 @@ class Organization {
|
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
/**
|
|
177
|
-
* @author
|
|
177
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
178
178
|
* @description Call URL internal, need auth JWT (session)
|
|
179
179
|
* @param {!object} params Params to call fectch (URL internal)
|
|
180
180
|
* @param {!string} params.url URL to call
|
package/api/user/page.js
CHANGED
|
@@ -33,7 +33,7 @@ class Page {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
* @author
|
|
36
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
37
37
|
* @description Set header with new session
|
|
38
38
|
* @param {string} session Session, token JWT
|
|
39
39
|
* @return {object} header with new session
|
|
@@ -48,7 +48,7 @@ class Page {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
|
-
* @author
|
|
51
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
52
52
|
* @description Get the available page for an application inside an organization
|
|
53
53
|
* @param {object} params Params to get task
|
|
54
54
|
* @param {object} params.orgId Organization id (_id database)
|
package/api/user/process.js
CHANGED
|
@@ -18,7 +18,7 @@ class Process {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
|
-
* @author
|
|
21
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
22
22
|
* @description Get the return data and check for errors
|
|
23
23
|
* @param {object} retData Response HTTP
|
|
24
24
|
* @return {*}
|
|
@@ -33,7 +33,7 @@ class Process {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
* @author
|
|
36
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
37
37
|
* @description Set header with new session
|
|
38
38
|
* @param {string} session Session, token JWT
|
|
39
39
|
* @return {object} header with new session
|
|
@@ -48,7 +48,7 @@ class Process {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
|
-
* @author
|
|
51
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
52
52
|
* @description Set header for a bigger payload
|
|
53
53
|
* @param {string} session Session, token JWT
|
|
54
54
|
* @return {object} header with new session
|
|
@@ -65,7 +65,7 @@ class Process {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
|
-
* @author
|
|
68
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
69
69
|
* @description Start process
|
|
70
70
|
* @param {object} params Params to start process
|
|
71
71
|
* @param {string} params.orgProcessId The organization process id (_id database);
|
|
@@ -106,7 +106,7 @@ class Process {
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
/**
|
|
109
|
-
* @author
|
|
109
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
110
110
|
* @description Get process properties of process
|
|
111
111
|
* @param {object} params Params to get process properties
|
|
112
112
|
* @param {string} params.processId Process id (_id database);
|
|
@@ -144,7 +144,7 @@ class Process {
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
/**
|
|
147
|
-
* @author
|
|
147
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
148
148
|
* @description Get the search info of a organization process
|
|
149
149
|
* @param {object} params Params to get search info
|
|
150
150
|
* @param {string} params.orgProcessId The id of an organization process (_id database);
|
|
@@ -188,7 +188,7 @@ class Process {
|
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
/**
|
|
191
|
-
* @author
|
|
191
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
192
192
|
* @description Method to search processes
|
|
193
193
|
* @param {object} params Params to search processes
|
|
194
194
|
* @param {object} params.query Search process query
|
|
@@ -232,7 +232,7 @@ class Process {
|
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
/**
|
|
235
|
-
* @author
|
|
235
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
236
236
|
* @description Method to remove process
|
|
237
237
|
* @param {object} params Params to remove process
|
|
238
238
|
* @param {object} params.orgId Organization id (_id database)
|
|
@@ -269,7 +269,7 @@ class Process {
|
|
|
269
269
|
}
|
|
270
270
|
|
|
271
271
|
/**
|
|
272
|
-
* @author
|
|
272
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
273
273
|
* @description Method to export status data
|
|
274
274
|
* @param {object} params Params to export status data
|
|
275
275
|
* @param {object} params.query Search process query
|
|
@@ -308,7 +308,7 @@ class Process {
|
|
|
308
308
|
}
|
|
309
309
|
|
|
310
310
|
/**
|
|
311
|
-
* @author
|
|
311
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
312
312
|
* @description Method to export process data
|
|
313
313
|
* @param {object} params Params to export process data
|
|
314
314
|
* @param {object} params.query Search process query
|
|
@@ -347,7 +347,7 @@ class Process {
|
|
|
347
347
|
}
|
|
348
348
|
|
|
349
349
|
/**
|
|
350
|
-
* @author
|
|
350
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
351
351
|
* @description Method to get Process Docs
|
|
352
352
|
* @param {object} params Params to get process docs
|
|
353
353
|
* @param {string} params.orgProcessId Organization Process Id
|
|
@@ -388,7 +388,7 @@ class Process {
|
|
|
388
388
|
}
|
|
389
389
|
|
|
390
390
|
/**
|
|
391
|
-
* @author
|
|
391
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
392
392
|
* @description Method to download the process documents
|
|
393
393
|
* @param {object} params Params to download the process documents
|
|
394
394
|
* @param {string} params.orgId Organization id (_id database)
|
package/api/user/register.js
CHANGED
|
@@ -34,7 +34,7 @@ class Register {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
* @author
|
|
37
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
38
38
|
* @description Set header with new session
|
|
39
39
|
* @param {string} session Session, token JWT
|
|
40
40
|
* @return {object} header with new session
|
|
@@ -49,7 +49,7 @@ class Register {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
|
-
* @author
|
|
52
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
53
53
|
* @param {object} params.registerId The registerId that comes with the registration page context
|
|
54
54
|
* @return {string} orgname The orgname of the organization in the registerId
|
|
55
55
|
* @public
|
|
@@ -68,7 +68,7 @@ class Register {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
|
-
* @author
|
|
71
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
72
72
|
* @description Method to find task by id
|
|
73
73
|
* @param {object} params Params to get task
|
|
74
74
|
* @param {string} params.registerId The registerId that comes with the registration page context
|
|
@@ -119,7 +119,7 @@ class Register {
|
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
/**
|
|
122
|
-
* @author
|
|
122
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
123
123
|
* @description Method to register a user
|
|
124
124
|
* @param {object} params Params to get task
|
|
125
125
|
* @param {string} params.registerId The registerId that comes with the registration page context
|
package/api/user/settings.js
CHANGED
|
@@ -23,7 +23,7 @@ class Settings {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
* @author
|
|
26
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
27
27
|
* @description Get the return data and check for errors
|
|
28
28
|
* @param {object} retData Response HTTP
|
|
29
29
|
* @return {*}
|
|
@@ -38,7 +38,7 @@ class Settings {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
|
-
* @author
|
|
41
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
42
42
|
* @description Set header with new session
|
|
43
43
|
* @param {string} session Session, token JWT
|
|
44
44
|
* @return {object} header with new session
|
|
@@ -53,7 +53,7 @@ class Settings {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
|
-
* @author
|
|
56
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
57
57
|
* @description Adds/updates a user settings
|
|
58
58
|
* @param {object} settings Full user settings
|
|
59
59
|
* @param {string} session Is token JWT of user NOT allow SU
|
|
@@ -85,7 +85,7 @@ class Settings {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
|
-
* @author
|
|
88
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
89
89
|
* @description Gets the user settings. Returns an array of settings.
|
|
90
90
|
* @param {string} session Is token JWT of user NOT allow SU
|
|
91
91
|
* @return {Promise}
|
|
@@ -112,7 +112,7 @@ class Settings {
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
/**
|
|
115
|
-
* @author
|
|
115
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
116
116
|
* @description Removes the user settings
|
|
117
117
|
* @param {string} session Is token JWT of user NOT allow SU
|
|
118
118
|
* @return {Promise}
|
package/api/user/task.js
CHANGED
|
@@ -37,7 +37,7 @@ class Task {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
|
-
* @author
|
|
40
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
41
41
|
* @description Set header with new session
|
|
42
42
|
* @param {string} session Session, token JWT
|
|
43
43
|
* @return {object} header with new session
|
|
@@ -52,7 +52,7 @@ class Task {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
|
-
* @author
|
|
55
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
56
56
|
* @description Method to find task by id
|
|
57
57
|
* @param {object} params Params to get task
|
|
58
58
|
* @param {object} params.processId Proccess id (_id database)
|
|
@@ -94,7 +94,7 @@ class Task {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
/**
|
|
97
|
-
* @author
|
|
97
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
98
98
|
* @description Find task by id and update
|
|
99
99
|
* @param {object} params Params to update task
|
|
100
100
|
* @param {object} params.userId User id (_id database)
|
|
@@ -156,7 +156,7 @@ class Task {
|
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
/**
|
|
159
|
-
* @author
|
|
159
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
160
160
|
* @description Find task by id and update
|
|
161
161
|
* @param {!object} params Params - to update task
|
|
162
162
|
* @param {!string} params.taskId - Task id (_id database)
|
|
@@ -199,6 +199,43 @@ class Task {
|
|
|
199
199
|
throw ex;
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
205
|
+
* @description Get the tasks and available tasks summary (totals) for specific tags
|
|
206
|
+
* @param {object} params Params - to update task
|
|
207
|
+
* @param {array<string>} params.tags - The tags to get task summaries
|
|
208
|
+
* @param {string} session Session, token JWT
|
|
209
|
+
* @return {Promise<object>} data
|
|
210
|
+
* @return {Promise<object>} data.tasks - the total tasks
|
|
211
|
+
* @return {Promise<object>} data.availableTasks - the total available tasks
|
|
212
|
+
* @public
|
|
213
|
+
* @async
|
|
214
|
+
* @example
|
|
215
|
+
*
|
|
216
|
+
* const API = require('@docbrasil/api-systemmanager');
|
|
217
|
+
* const api = new API();
|
|
218
|
+
* const params = {
|
|
219
|
+
* tags: ['INCIDENTS']
|
|
220
|
+
* };
|
|
221
|
+
* const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
222
|
+
* await api.user.task.getSummaryByTags(params, session);
|
|
223
|
+
*/
|
|
224
|
+
async getSummaryByTags(params, session) {
|
|
225
|
+
const self = this;
|
|
226
|
+
|
|
227
|
+
try {
|
|
228
|
+
Joi.assert(params, Joi.object().required());
|
|
229
|
+
Joi.assert(params.tags, Joi.array().required(), 'Tags is required');
|
|
230
|
+
|
|
231
|
+
const url = `/organizations/tasks/summary`;
|
|
232
|
+
const apiCall = self._client.post(url, params, self._setHeader(session));
|
|
233
|
+
|
|
234
|
+
return self._returnData(await apiCall);
|
|
235
|
+
} catch (ex) {
|
|
236
|
+
throw ex;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
202
239
|
}
|
|
203
240
|
|
|
204
241
|
export default Task;
|
|
@@ -33,7 +33,7 @@ class TaskAvailable {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
* @author
|
|
36
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
37
37
|
* @description Set header with new session
|
|
38
38
|
* @param {string} session Session, token JWT
|
|
39
39
|
* @return {object} header with new session
|
|
@@ -48,7 +48,7 @@ class TaskAvailable {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
|
-
* @author
|
|
51
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
52
52
|
* @description Method to find available tasks for a user
|
|
53
53
|
* @param {object} params Params to get task
|
|
54
54
|
* @param {object} params.query Search available tasks query
|
|
@@ -92,7 +92,7 @@ class TaskAvailable {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
/**
|
|
95
|
-
* @author
|
|
95
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
96
96
|
* @description Method for a user to claim an available task
|
|
97
97
|
* @param {object} params Params to get task
|
|
98
98
|
* @param {object} params.taskId the task id to claim
|
package/api/user/updates.js
CHANGED
|
@@ -33,7 +33,7 @@ class Updates {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
* @author
|
|
36
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
37
37
|
* @description Set header with new session
|
|
38
38
|
* @param {string} session Session, token JWT
|
|
39
39
|
* @return {object} header with new session
|