@docbrasil/api-systemmanager 1.0.64 → 1.0.67
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/index.js +2 -0
- package/api/user/notification.js +99 -0
- package/api/user/user.js +1 -1
- package/dist/bundle.cjs +96 -1
- package/dist/bundle.mjs +1 -1
- package/doc/api.md +46 -0
- package/package.json +1 -1
package/doc/api.md
CHANGED
|
@@ -49,6 +49,9 @@
|
|
|
49
49
|
<dt><a href="#Users">Users</a></dt>
|
|
50
50
|
<dd><p>API request, user permission level</p>
|
|
51
51
|
</dd>
|
|
52
|
+
<dt><a href="#Notification">Notification</a></dt>
|
|
53
|
+
<dd><p>Class for user registration in a user</p>
|
|
54
|
+
</dd>
|
|
52
55
|
<dt><a href="#Organization">Organization</a></dt>
|
|
53
56
|
<dd><p>Class for organizations, permission user</p>
|
|
54
57
|
</dd>
|
|
@@ -1457,6 +1460,49 @@ API request, user permission level
|
|
|
1457
1460
|
| options | <code>object</code> | Params of the constructor |
|
|
1458
1461
|
| options.parent | <code>object</code> | This of the pararent |
|
|
1459
1462
|
|
|
1463
|
+
<a name="Notification"></a>
|
|
1464
|
+
|
|
1465
|
+
## Notification
|
|
1466
|
+
Class for user registration in a user
|
|
1467
|
+
|
|
1468
|
+
**Kind**: global class
|
|
1469
|
+
|
|
1470
|
+
* [Notification](#Notification)
|
|
1471
|
+
* [.tokenTypes](#Notification+tokenTypes) ⇒ <code>Object</code>
|
|
1472
|
+
* [.addToken(params)](#Notification+addToken) ⇒ <code>promise.<object></code> \| <code>boolean</code>
|
|
1473
|
+
|
|
1474
|
+
<a name="Notification+tokenTypes"></a>
|
|
1475
|
+
|
|
1476
|
+
### notification.tokenTypes ⇒ <code>Object</code>
|
|
1477
|
+
Notification token types
|
|
1478
|
+
|
|
1479
|
+
**Kind**: instance property of [<code>Notification</code>](#Notification)
|
|
1480
|
+
<a name="Notification+addToken"></a>
|
|
1481
|
+
|
|
1482
|
+
### notification.addToken(params) ⇒ <code>promise.<object></code> \| <code>boolean</code>
|
|
1483
|
+
Method to add a notification token
|
|
1484
|
+
|
|
1485
|
+
**Kind**: instance method of [<code>Notification</code>](#Notification)
|
|
1486
|
+
**Returns**: <code>promise.<object></code> - data<code>boolean</code> - data._id the id of the added token
|
|
1487
|
+
**Access**: public
|
|
1488
|
+
**Author**: CloudBrasil <abernardo.br@gmail.com>
|
|
1489
|
+
|
|
1490
|
+
| Param | Type | Description |
|
|
1491
|
+
| --- | --- | --- |
|
|
1492
|
+
| params | <code>object</code> | Params to add notification token |
|
|
1493
|
+
| params.token | <code>string</code> | The token |
|
|
1494
|
+
| params.type | <code>object</code> | The token type |
|
|
1495
|
+
|
|
1496
|
+
**Example**
|
|
1497
|
+
```js
|
|
1498
|
+
const API = require('@docbrasil/api-systemmanager');
|
|
1499
|
+
const api = new API();
|
|
1500
|
+
const params = {
|
|
1501
|
+
token: 'V6OSBr4aEVoiE9H1b4xzLe+vqmXB+ShVNc/FvJGxnIz4tZv6jBJkk4aQzz2',
|
|
1502
|
+
type: 'FCM_WEB'
|
|
1503
|
+
};
|
|
1504
|
+
const retData = await api.user.notification.addToken(params);
|
|
1505
|
+
```
|
|
1460
1506
|
<a name="Organization"></a>
|
|
1461
1507
|
|
|
1462
1508
|
## Organization
|
package/package.json
CHANGED