@docbrasil/api-systemmanager 1.0.108 → 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/external.js CHANGED
@@ -149,11 +149,11 @@ class External {
149
149
  * ];
150
150
  * const retDocs = await api.external.getUploadDocumentsSignedUrl(docs, authorization);
151
151
  */
152
- async getUploadDocumentSignedUrl(docs, authorization) {
152
+ async getUploadDocumentsSignedUrl(docs, authorization) {
153
153
  const self = this;
154
154
 
155
155
  try {
156
- Joi.assert(docs, Joi.string().array().error(new Error('docs is required')));
156
+ Joi.assert(docs, Joi.array().required().error(new Error('docs is required')));
157
157
  Joi.assert(authorization, Joi.string().required().error(new Error('authorization is required')));
158
158
 
159
159
  const apiCall = self._client
@@ -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.processId Process id (_id database);
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
- * processId: '5dadd01dc4af3941d42f8c5c',
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.processId, Joi.string().required());
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 {processId, orgId, payload = {}} = params;
101
- const apiCall = self._client.put(`/organizations/${orgId}/process/${processId}`, payload, self._setMaxContentHeader(session));
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/dist/bundle.cjs CHANGED
@@ -11770,11 +11770,11 @@ class External {
11770
11770
  * ];
11771
11771
  * const retDocs = await api.external.getUploadDocumentsSignedUrl(docs, authorization);
11772
11772
  */
11773
- async getUploadDocumentSignedUrl(docs, authorization) {
11773
+ async getUploadDocumentsSignedUrl(docs, authorization) {
11774
11774
  const self = this;
11775
11775
 
11776
11776
  try {
11777
- Joi__default["default"].assert(docs, Joi__default["default"].string().array().error(new Error('docs is required')));
11777
+ Joi__default["default"].assert(docs, Joi__default["default"].array().required().error(new Error('docs is required')));
11778
11778
  Joi__default["default"].assert(authorization, Joi__default["default"].string().required().error(new Error('authorization is required')));
11779
11779
 
11780
11780
  const apiCall = self._client