@docbrasil/api-systemmanager 1.1.61 → 1.1.63
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/user/kanban.js +11 -11
- package/dist/bundle.cjs +11 -11
- package/dist/bundle.mjs +1 -1
- package/doc/api.md +4 -4
- package/docs/Kanban.html +6 -6
- package/docs/user_kanban.js.html +11 -11
- package/package.json +1 -1
package/api/user/kanban.js
CHANGED
|
@@ -57,7 +57,7 @@ class Kanban {
|
|
|
57
57
|
* @param {Object} params - Parameters object
|
|
58
58
|
* @param {string} params.orgId - Organization id (_id database)
|
|
59
59
|
* @param {string} params.orgProcessName - The name of the organization process
|
|
60
|
-
* @param {string} params.
|
|
60
|
+
* @param {string} params.flowId - Flow id for the specific kanban flow
|
|
61
61
|
* @param {string} session - Session, token JWT
|
|
62
62
|
* @returns {promise} Promise that resolves to Kanban board data
|
|
63
63
|
* @returns {Object} returns.data - The response data containing:
|
|
@@ -76,7 +76,7 @@ class Kanban {
|
|
|
76
76
|
* const params = {
|
|
77
77
|
* orgId: '55e4a3bd6be6b45210833fae',
|
|
78
78
|
* orgProcessName: 'employee-onboarding',
|
|
79
|
-
*
|
|
79
|
+
* flowId: 'Task_16888el'
|
|
80
80
|
* };
|
|
81
81
|
* const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
82
82
|
* const kanbanData = await api.user.kanban.get(params, session);
|
|
@@ -112,13 +112,13 @@ class Kanban {
|
|
|
112
112
|
Joi.assert(params, Joi.object().required(), 'Params to get task');
|
|
113
113
|
Joi.assert(params.orgId, Joi.string().required(), 'Organization id (_id database)');
|
|
114
114
|
Joi.assert(params.orgProcessName, Joi.string().required(), 'The organization process name');
|
|
115
|
-
Joi.assert(params.
|
|
115
|
+
Joi.assert(params.flowId, Joi.string().required(), 'Flow id for the specific kanban flow');
|
|
116
116
|
Joi.assert(session, Joi.string().required(), 'Session token JWT');
|
|
117
117
|
|
|
118
|
-
const { orgId, orgProcessName,
|
|
118
|
+
const { orgId, orgProcessName, flowId } = params;
|
|
119
119
|
|
|
120
|
-
// Build API endpoint with
|
|
121
|
-
const endpoint = `/organization/${orgId}/kanban/${orgProcessName}/flow/${
|
|
120
|
+
// Build API endpoint with flowId as part of the path
|
|
121
|
+
const endpoint = `/organization/${orgId}/kanban/${orgProcessName}/flow/${flowId}`;
|
|
122
122
|
|
|
123
123
|
const apiCall = self._client
|
|
124
124
|
.get(endpoint, self._setHeader(session));
|
|
@@ -440,7 +440,7 @@ class Kanban {
|
|
|
440
440
|
* @param {Object} params - Parameters object
|
|
441
441
|
* @param {string} params.orgId - Organization id (_id database)
|
|
442
442
|
* @param {string} params.orgProcessName - The name of the organization process
|
|
443
|
-
* @param {string} params.
|
|
443
|
+
* @param {string} params.flowId - The id of the organization process step flowId
|
|
444
444
|
* @param {Array} params.statusList - The status list with new order
|
|
445
445
|
* @param {Object} params.statusList[] - Status object configuration
|
|
446
446
|
* @param {string} params.statusList[].value - The title of the status
|
|
@@ -459,7 +459,7 @@ class Kanban {
|
|
|
459
459
|
* const params = {
|
|
460
460
|
* orgId: '55e4a3bd6be6b45210833fae',
|
|
461
461
|
* orgProcessName: 'employee-onboarding',
|
|
462
|
-
*
|
|
462
|
+
* flowId: 'Task_16888el',
|
|
463
463
|
* statusList: [
|
|
464
464
|
* { value: 'Pending', expanded: true, color: '#FF6B6B' },
|
|
465
465
|
* { value: 'In Progress', expanded: true, color: '#4ECDC4' },
|
|
@@ -488,14 +488,14 @@ class Kanban {
|
|
|
488
488
|
Joi.assert(params, Joi.object().required(), 'Params to update status list');
|
|
489
489
|
Joi.assert(params.orgId, Joi.string().required(), 'Organization id (_id database)');
|
|
490
490
|
Joi.assert(params.orgProcessName, Joi.string().required(), 'The name of the organization process');
|
|
491
|
-
Joi.assert(params.
|
|
491
|
+
Joi.assert(params.flowId, Joi.string().required(), 'The id of the organization process step flowId');
|
|
492
492
|
Joi.assert(params.statusList, Joi.array().required(), 'The status list with new order');
|
|
493
493
|
Joi.assert(session, Joi.string().required(), 'Session token JWT');
|
|
494
494
|
|
|
495
|
-
const { orgId, orgProcessName,
|
|
495
|
+
const { orgId, orgProcessName, flowId, statusList } = params;
|
|
496
496
|
|
|
497
497
|
// Build API endpoint for updating status list
|
|
498
|
-
const endpoint = `/organization/${orgId}/kanban/${orgProcessName}/flow/${
|
|
498
|
+
const endpoint = `/organization/${orgId}/kanban/${orgProcessName}/flow/${flowId}`;
|
|
499
499
|
|
|
500
500
|
const apiCall = self._client
|
|
501
501
|
.put(endpoint, { statusList }, self._setHeader(session));
|
package/dist/bundle.cjs
CHANGED
|
@@ -11830,7 +11830,7 @@ class Kanban {
|
|
|
11830
11830
|
* @param {Object} params - Parameters object
|
|
11831
11831
|
* @param {string} params.orgId - Organization id (_id database)
|
|
11832
11832
|
* @param {string} params.orgProcessName - The name of the organization process
|
|
11833
|
-
* @param {string} params.
|
|
11833
|
+
* @param {string} params.flowId - Flow id for the specific kanban flow
|
|
11834
11834
|
* @param {string} session - Session, token JWT
|
|
11835
11835
|
* @returns {promise} Promise that resolves to Kanban board data
|
|
11836
11836
|
* @returns {Object} returns.data - The response data containing:
|
|
@@ -11849,7 +11849,7 @@ class Kanban {
|
|
|
11849
11849
|
* const params = {
|
|
11850
11850
|
* orgId: '55e4a3bd6be6b45210833fae',
|
|
11851
11851
|
* orgProcessName: 'employee-onboarding',
|
|
11852
|
-
*
|
|
11852
|
+
* flowId: 'Task_16888el'
|
|
11853
11853
|
* };
|
|
11854
11854
|
* const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
11855
11855
|
* const kanbanData = await api.user.kanban.get(params, session);
|
|
@@ -11885,13 +11885,13 @@ class Kanban {
|
|
|
11885
11885
|
Joi__default["default"].assert(params, Joi__default["default"].object().required(), 'Params to get task');
|
|
11886
11886
|
Joi__default["default"].assert(params.orgId, Joi__default["default"].string().required(), 'Organization id (_id database)');
|
|
11887
11887
|
Joi__default["default"].assert(params.orgProcessName, Joi__default["default"].string().required(), 'The organization process name');
|
|
11888
|
-
Joi__default["default"].assert(params.
|
|
11888
|
+
Joi__default["default"].assert(params.flowId, Joi__default["default"].string().required(), 'Flow id for the specific kanban flow');
|
|
11889
11889
|
Joi__default["default"].assert(session, Joi__default["default"].string().required(), 'Session token JWT');
|
|
11890
11890
|
|
|
11891
|
-
const { orgId, orgProcessName,
|
|
11891
|
+
const { orgId, orgProcessName, flowId } = params;
|
|
11892
11892
|
|
|
11893
|
-
// Build API endpoint with
|
|
11894
|
-
const endpoint = `/organization/${orgId}/kanban/${orgProcessName}/flow/${
|
|
11893
|
+
// Build API endpoint with flowId as part of the path
|
|
11894
|
+
const endpoint = `/organization/${orgId}/kanban/${orgProcessName}/flow/${flowId}`;
|
|
11895
11895
|
|
|
11896
11896
|
const apiCall = self._client
|
|
11897
11897
|
.get(endpoint, self._setHeader(session));
|
|
@@ -12213,7 +12213,7 @@ class Kanban {
|
|
|
12213
12213
|
* @param {Object} params - Parameters object
|
|
12214
12214
|
* @param {string} params.orgId - Organization id (_id database)
|
|
12215
12215
|
* @param {string} params.orgProcessName - The name of the organization process
|
|
12216
|
-
* @param {string} params.
|
|
12216
|
+
* @param {string} params.flowId - The id of the organization process step flowId
|
|
12217
12217
|
* @param {Array} params.statusList - The status list with new order
|
|
12218
12218
|
* @param {Object} params.statusList[] - Status object configuration
|
|
12219
12219
|
* @param {string} params.statusList[].value - The title of the status
|
|
@@ -12232,7 +12232,7 @@ class Kanban {
|
|
|
12232
12232
|
* const params = {
|
|
12233
12233
|
* orgId: '55e4a3bd6be6b45210833fae',
|
|
12234
12234
|
* orgProcessName: 'employee-onboarding',
|
|
12235
|
-
*
|
|
12235
|
+
* flowId: 'Task_16888el',
|
|
12236
12236
|
* statusList: [
|
|
12237
12237
|
* { value: 'Pending', expanded: true, color: '#FF6B6B' },
|
|
12238
12238
|
* { value: 'In Progress', expanded: true, color: '#4ECDC4' },
|
|
@@ -12261,14 +12261,14 @@ class Kanban {
|
|
|
12261
12261
|
Joi__default["default"].assert(params, Joi__default["default"].object().required(), 'Params to update status list');
|
|
12262
12262
|
Joi__default["default"].assert(params.orgId, Joi__default["default"].string().required(), 'Organization id (_id database)');
|
|
12263
12263
|
Joi__default["default"].assert(params.orgProcessName, Joi__default["default"].string().required(), 'The name of the organization process');
|
|
12264
|
-
Joi__default["default"].assert(params.
|
|
12264
|
+
Joi__default["default"].assert(params.flowId, Joi__default["default"].string().required(), 'The id of the organization process step flowId');
|
|
12265
12265
|
Joi__default["default"].assert(params.statusList, Joi__default["default"].array().required(), 'The status list with new order');
|
|
12266
12266
|
Joi__default["default"].assert(session, Joi__default["default"].string().required(), 'Session token JWT');
|
|
12267
12267
|
|
|
12268
|
-
const { orgId, orgProcessName,
|
|
12268
|
+
const { orgId, orgProcessName, flowId, statusList } = params;
|
|
12269
12269
|
|
|
12270
12270
|
// Build API endpoint for updating status list
|
|
12271
|
-
const endpoint = `/organization/${orgId}/kanban/${orgProcessName}/flow/${
|
|
12271
|
+
const endpoint = `/organization/${orgId}/kanban/${orgProcessName}/flow/${flowId}`;
|
|
12272
12272
|
|
|
12273
12273
|
const apiCall = self._client
|
|
12274
12274
|
.put(endpoint, { statusList }, self._setHeader(session));
|