@docbrasil/api-systemmanager 1.0.67 → 1.0.70
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 +1 -1
- package/api/user/notification.js +5 -3
- package/api/user/user.js +1 -1
- package/dist/bundle.cjs +7 -5
- package/dist/bundle.mjs +1 -1
- package/doc/api.md +5 -3
- package/package.json +1 -1
package/doc/api.md
CHANGED
|
@@ -1469,7 +1469,7 @@ Class for user registration in a user
|
|
|
1469
1469
|
|
|
1470
1470
|
* [Notification](#Notification)
|
|
1471
1471
|
* [.tokenTypes](#Notification+tokenTypes) ⇒ <code>Object</code>
|
|
1472
|
-
* [.addToken(params)](#Notification+addToken) ⇒ <code>promise.<object></code> \| <code>boolean</code>
|
|
1472
|
+
* [.addToken(params, session)](#Notification+addToken) ⇒ <code>promise.<object></code> \| <code>boolean</code>
|
|
1473
1473
|
|
|
1474
1474
|
<a name="Notification+tokenTypes"></a>
|
|
1475
1475
|
|
|
@@ -1479,7 +1479,7 @@ Notification token types
|
|
|
1479
1479
|
**Kind**: instance property of [<code>Notification</code>](#Notification)
|
|
1480
1480
|
<a name="Notification+addToken"></a>
|
|
1481
1481
|
|
|
1482
|
-
### notification.addToken(params) ⇒ <code>promise.<object></code> \| <code>boolean</code>
|
|
1482
|
+
### notification.addToken(params, session) ⇒ <code>promise.<object></code> \| <code>boolean</code>
|
|
1483
1483
|
Method to add a notification token
|
|
1484
1484
|
|
|
1485
1485
|
**Kind**: instance method of [<code>Notification</code>](#Notification)
|
|
@@ -1492,16 +1492,18 @@ Method to add a notification token
|
|
|
1492
1492
|
| params | <code>object</code> | Params to add notification token |
|
|
1493
1493
|
| params.token | <code>string</code> | The token |
|
|
1494
1494
|
| params.type | <code>object</code> | The token type |
|
|
1495
|
+
| session | <code>string</code> | Is token JWT of user NOT allow SU |
|
|
1495
1496
|
|
|
1496
1497
|
**Example**
|
|
1497
1498
|
```js
|
|
1498
1499
|
const API = require('@docbrasil/api-systemmanager');
|
|
1499
1500
|
const api = new API();
|
|
1501
|
+
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
1500
1502
|
const params = {
|
|
1501
1503
|
token: 'V6OSBr4aEVoiE9H1b4xzLe+vqmXB+ShVNc/FvJGxnIz4tZv6jBJkk4aQzz2',
|
|
1502
1504
|
type: 'FCM_WEB'
|
|
1503
1505
|
};
|
|
1504
|
-
const retData = await api.user.notification.addToken(params);
|
|
1506
|
+
const retData = await api.user.notification.addToken(params, session);
|
|
1505
1507
|
```
|
|
1506
1508
|
<a name="Organization"></a>
|
|
1507
1509
|
|
package/package.json
CHANGED