@docbrasil/api-systemmanager 1.0.109 → 1.0.110
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/process.js +5 -5
- package/doc/api.md +2 -2
- package/docs/Process.html +3 -3
- package/docs/user_process.js.html +5 -5
- package/package.json +1 -1
- package/readme.md +1 -1
package/api/user/process.js
CHANGED
|
@@ -68,7 +68,7 @@ class Process {
|
|
|
68
68
|
* @author CloudBrasil <abernardo.br@gmail.com>
|
|
69
69
|
* @description Start process
|
|
70
70
|
* @param {object} params Params to start process
|
|
71
|
-
* @param {string} params.
|
|
71
|
+
* @param {string} params.orgProcessId The organization process id (_id database);
|
|
72
72
|
* @param {string} params.orgId Organization id (_id database);
|
|
73
73
|
* @param {object} [params.payload={}] Start process with data
|
|
74
74
|
* @param {string} session Session, token JWT
|
|
@@ -80,7 +80,7 @@ class Process {
|
|
|
80
80
|
* const API = require('@docbrasil/api-systemmanager');
|
|
81
81
|
* const api = new API();
|
|
82
82
|
* const params = {
|
|
83
|
-
*
|
|
83
|
+
* orgProcessId: '5dadd01dc4af3941d42f8c5c',
|
|
84
84
|
* orgId: '5edd11c46b6ce9729c2c297c',
|
|
85
85
|
* payload: {}
|
|
86
86
|
* }
|
|
@@ -92,13 +92,13 @@ class Process {
|
|
|
92
92
|
|
|
93
93
|
try {
|
|
94
94
|
Joi.assert(params, Joi.object().required());
|
|
95
|
-
Joi.assert(params.
|
|
95
|
+
Joi.assert(params.orgProcessId, Joi.string().required());
|
|
96
96
|
Joi.assert(params.orgId, Joi.string().required());
|
|
97
97
|
Joi.assert(params.payload, Joi.object());
|
|
98
98
|
Joi.assert(session, Joi.string().required());
|
|
99
99
|
|
|
100
|
-
const {
|
|
101
|
-
const apiCall = self._client.put(`/organizations/${orgId}/process/${
|
|
100
|
+
const {orgProcessId, orgId, payload = {}} = params;
|
|
101
|
+
const apiCall = self._client.put(`/organizations/${orgId}/process/${orgProcessId}`, payload, self._setMaxContentHeader(session));
|
|
102
102
|
return self._returnData(await apiCall);
|
|
103
103
|
} catch (ex) {
|
|
104
104
|
throw ex;
|
package/doc/api.md
CHANGED
|
@@ -1920,7 +1920,7 @@ Start process
|
|
|
1920
1920
|
| Param | Type | Default | Description |
|
|
1921
1921
|
| --- | --- | --- | --- |
|
|
1922
1922
|
| params | <code>object</code> | | Params to start process |
|
|
1923
|
-
| params.
|
|
1923
|
+
| params.orgProcessId | <code>string</code> | | The organization process id (_id database); |
|
|
1924
1924
|
| params.orgId | <code>string</code> | | Organization id (_id database); |
|
|
1925
1925
|
| [params.payload] | <code>object</code> | <code>{}</code> | Start process with data |
|
|
1926
1926
|
| session | <code>string</code> | | Session, token JWT |
|
|
@@ -1930,7 +1930,7 @@ Start process
|
|
|
1930
1930
|
const API = require('@docbrasil/api-systemmanager');
|
|
1931
1931
|
const api = new API();
|
|
1932
1932
|
const params = {
|
|
1933
|
-
|
|
1933
|
+
orgProcessId: '5dadd01dc4af3941d42f8c5c',
|
|
1934
1934
|
orgId: '5edd11c46b6ce9729c2c297c',
|
|
1935
1935
|
payload: {}
|
|
1936
1936
|
}
|
package/docs/Process.html
CHANGED
|
@@ -1297,7 +1297,7 @@ await api.user.process.getProcessProperties(params, session);</code></pre>
|
|
|
1297
1297
|
|
|
1298
1298
|
<tr class="deep-level-1">
|
|
1299
1299
|
|
|
1300
|
-
<td class="name"><code>
|
|
1300
|
+
<td class="name"><code>orgProcessId</code></td>
|
|
1301
1301
|
|
|
1302
1302
|
|
|
1303
1303
|
<td class="type">
|
|
@@ -1325,7 +1325,7 @@ await api.user.process.getProcessProperties(params, session);</code></pre>
|
|
|
1325
1325
|
</td>
|
|
1326
1326
|
|
|
1327
1327
|
|
|
1328
|
-
<td class="description last">
|
|
1328
|
+
<td class="description last">The organization process id (_id database);</td>
|
|
1329
1329
|
</tr>
|
|
1330
1330
|
|
|
1331
1331
|
|
|
@@ -1548,7 +1548,7 @@ await api.user.process.getProcessProperties(params, session);</code></pre>
|
|
|
1548
1548
|
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
1549
1549
|
const api = new API();
|
|
1550
1550
|
const params = {
|
|
1551
|
-
|
|
1551
|
+
orgProcessId: '5dadd01dc4af3941d42f8c5c',
|
|
1552
1552
|
orgId: '5edd11c46b6ce9729c2c297c',
|
|
1553
1553
|
payload: {}
|
|
1554
1554
|
}
|
|
@@ -155,7 +155,7 @@ class Process {
|
|
|
155
155
|
* @author CloudBrasil <abernardo.br@gmail.com>
|
|
156
156
|
* @description Start process
|
|
157
157
|
* @param {object} params Params to start process
|
|
158
|
-
* @param {string} params.
|
|
158
|
+
* @param {string} params.orgProcessId The organization process id (_id database);
|
|
159
159
|
* @param {string} params.orgId Organization id (_id database);
|
|
160
160
|
* @param {object} [params.payload={}] Start process with data
|
|
161
161
|
* @param {string} session Session, token JWT
|
|
@@ -167,7 +167,7 @@ class Process {
|
|
|
167
167
|
* const API = require('@docbrasil/api-systemmanager');
|
|
168
168
|
* const api = new API();
|
|
169
169
|
* const params = {
|
|
170
|
-
*
|
|
170
|
+
* orgProcessId: '5dadd01dc4af3941d42f8c5c',
|
|
171
171
|
* orgId: '5edd11c46b6ce9729c2c297c',
|
|
172
172
|
* payload: {}
|
|
173
173
|
* }
|
|
@@ -179,13 +179,13 @@ class Process {
|
|
|
179
179
|
|
|
180
180
|
try {
|
|
181
181
|
Joi.assert(params, Joi.object().required());
|
|
182
|
-
Joi.assert(params.
|
|
182
|
+
Joi.assert(params.orgProcessId, Joi.string().required());
|
|
183
183
|
Joi.assert(params.orgId, Joi.string().required());
|
|
184
184
|
Joi.assert(params.payload, Joi.object());
|
|
185
185
|
Joi.assert(session, Joi.string().required());
|
|
186
186
|
|
|
187
|
-
const {
|
|
188
|
-
const apiCall = self._client.put(`/organizations/${orgId}/process/${
|
|
187
|
+
const {orgProcessId, orgId, payload = {}} = params;
|
|
188
|
+
const apiCall = self._client.put(`/organizations/${orgId}/process/${orgProcessId}`, payload, self._setMaxContentHeader(session));
|
|
189
189
|
return self._returnData(await apiCall);
|
|
190
190
|
} catch (ex) {
|
|
191
191
|
throw ex;
|
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.0.
|
|
4
|
+
"version": "1.0.110",
|
|
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",
|
package/readme.md
CHANGED
|
@@ -20,5 +20,5 @@ const api = new APISystemManager();
|
|
|
20
20
|
|
|
21
21
|
### API
|
|
22
22
|
* [API Documentation in HTML](https://cloudbrasil.github.io/api-systemmanager)
|
|
23
|
-
* [API Documentation in Markup](https://github.com/cloudbrasil/api-systemmanager/blob/develop/doc/
|
|
23
|
+
* [API Documentation in Markup](https://github.com/cloudbrasil/api-systemmanager/blob/develop/doc/api.md)
|
|
24
24
|
* [API Examples](https://github.com/cloudbrasil/api-systemmanager/wiki)
|