@docbrasil/api-systemmanager 1.0.57 → 1.0.60
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/login.js +31 -0
- package/api/user/document.js +1 -0
- package/dist/bundle.cjs +31 -0
- package/dist/bundle.mjs +1 -1
- package/doc/api.md +24 -0
- package/package.json +1 -1
package/doc/api.md
CHANGED
|
@@ -1250,6 +1250,7 @@ Login manager
|
|
|
1250
1250
|
* [.apiKey(apikey)](#Login+apiKey) ⇒ <code>promise.<object></code> \| <code>object</code> \| <code>object</code>
|
|
1251
1251
|
* [.userPass(params)](#Login+userPass) ⇒ <code>promise.<object></code> \| <code>object</code> \| <code>object</code>
|
|
1252
1252
|
* [.logout(session)](#Login+logout) ⇒ <code>promise.<object></code> \| <code>boolean</code>
|
|
1253
|
+
* [.recover(username)](#Login+recover) ⇒ <code>promise.<object></code> \| <code>boolean</code>
|
|
1253
1254
|
|
|
1254
1255
|
<a name="Login+facebook"></a>
|
|
1255
1256
|
|
|
@@ -1383,6 +1384,29 @@ const api = new API(params);
|
|
|
1383
1384
|
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
1384
1385
|
const { success } = await api.login.logout(session);
|
|
1385
1386
|
```
|
|
1387
|
+
<a name="Login+recover"></a>
|
|
1388
|
+
|
|
1389
|
+
### login.recover(username) ⇒ <code>promise.<object></code> \| <code>boolean</code>
|
|
1390
|
+
Recover the password
|
|
1391
|
+
|
|
1392
|
+
**Kind**: instance method of [<code>Login</code>](#Login)
|
|
1393
|
+
**Returns**: <code>promise.<object></code> - } data<code>boolean</code> - data.success true|false
|
|
1394
|
+
**Access**: public
|
|
1395
|
+
**Author**: CloudBrasil <abernardo.br@gmail.com>
|
|
1396
|
+
|
|
1397
|
+
| Param | Type | Description |
|
|
1398
|
+
| --- | --- | --- |
|
|
1399
|
+
| username | <code>string</code> | The username or email |
|
|
1400
|
+
|
|
1401
|
+
**Example**
|
|
1402
|
+
```js
|
|
1403
|
+
const API = require('@docbrasil/api-systemmanager');
|
|
1404
|
+
|
|
1405
|
+
// Params of the instance
|
|
1406
|
+
const params = {...}
|
|
1407
|
+
const api = new API(params);
|
|
1408
|
+
const { success } = await api.login.recover('myusername');
|
|
1409
|
+
```
|
|
1386
1410
|
<a name="Session"></a>
|
|
1387
1411
|
|
|
1388
1412
|
## Session
|
package/package.json
CHANGED