@docbrasil/api-systemmanager 1.0.58 → 1.0.61

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.
@@ -98,6 +98,7 @@ class Documents {
98
98
  ocrDocumentBackend: _.get(params, 'ocrDocumentBackend', false),
99
99
  bytes: _.get(params, 'bytes'),
100
100
  docAreaPermission: _.get(params, 'docAreaPermission', {}),
101
+ docTypeFields: _.get(params, 'docTypeFields', []), // {"extraId": userId},
101
102
  docTypeFieldsData: _.get(params, 'docTypeFieldsData', {}), // {"extraId": userId},
102
103
  signedUrl: _.get(params, 'signedUrl', ''),
103
104
  urlType: _.get(params, 'urlType', 'S3'),
package/dist/bundle.cjs CHANGED
@@ -420,6 +420,37 @@ class Login {
420
420
  throw ex;
421
421
  }
422
422
  }
423
+
424
+ /**
425
+ * @author CloudBrasil <abernardo.br@gmail.com>
426
+ * @description Recover the password
427
+ * @param {string} username The username or email
428
+ * @return {promise<object>}} data
429
+ * @return {boolean} data.success true|false
430
+ * @public
431
+ * @async
432
+ * @example
433
+ *
434
+ * const API = require('@docbrasil/api-systemmanager');
435
+ *
436
+ * // Params of the instance
437
+ * const params = {...}
438
+ * const api = new API(params);
439
+ * const { success } = await api.login.recover('myusername');
440
+ */
441
+ async recover(username) {
442
+ const self = this;
443
+
444
+ try {
445
+ Joi__default["default"].assert(username, Joi__default["default"].string().required());
446
+
447
+ const url = `users/${username}/sendResetEmail`;
448
+ const apiCall = self._client.get(url);
449
+ return self._returnData(await apiCall);
450
+ } catch (ex) {
451
+ throw ex;
452
+ }
453
+ }
423
454
  }
424
455
 
425
456
  /**