@docbrasil/api-systemmanager 1.1.33 → 1.1.34

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.
@@ -84,7 +84,7 @@ class Notification {
84
84
 
85
85
  try {
86
86
  Joi.assert(params, Joi.object().required(), 'Params to get task');
87
- Joi.assert(params.token, Joi.string().required(), 'Token token value');
87
+ Joi.assert(params.token, Joi.string().required(), 'Token value');
88
88
  Joi.assert(params.type, Joi.string().required(), 'The type of the token');
89
89
 
90
90
  const apiCall = self._client
package/dist/bundle.cjs CHANGED
@@ -10384,10 +10384,8 @@ class Notification {
10384
10384
  * @author Myndware <augusto.pissarra@myndware.com>
10385
10385
  * @description Method to add a notification token
10386
10386
  * @param {object} params Params to add notification token
10387
- * @param {obhect} params.token The token
10388
- * @param {object} params.token.value The token value
10389
- * @param {object} params.token.type The token type
10390
- * @param {object} params.token.data The extra data of a token, if there is.
10387
+ * @param {obhect} params.token The token value
10388
+ * @param {object} params.type The token type
10391
10389
  * @param {string} session Is token JWT of user NOT allow SU
10392
10390
  * @returns {promise<object>} data
10393
10391
  * @returns {boolean} data._id the id of the added token
@@ -10398,10 +10396,8 @@ class Notification {
10398
10396
  * const api = new API();
10399
10397
  * const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
10400
10398
  * const params = {
10401
- * token: {
10402
- * value: 'V6OSBr4aEVoiE9H1b4xzLe+vqmXB+ShVNc/FvJGxnIz4tZv6jBJkk4aQzz2',
10403
- * type: 'FCM_CAPACITOR'
10404
- * }
10399
+ * token: 'V6OSBr4aEVoiE9H1b4xzLe+vqmXB+ShVNc/FvJGxnIz4tZv6jBJkk4aQzz2',
10400
+ * type: 'FCM_CAPACITOR'
10405
10401
  * };
10406
10402
  * const retData = await api.user.notification.addToken(params, session);
10407
10403
  */
@@ -10410,9 +10406,8 @@ class Notification {
10410
10406
 
10411
10407
  try {
10412
10408
  Joi__default["default"].assert(params, Joi__default["default"].object().required(), 'Params to get task');
10413
- Joi__default["default"].assert(params.token, Joi__default["default"].object().required(), 'Token information to add');
10414
- Joi__default["default"].assert(params.token.value, Joi__default["default"].string().required(), 'Token token value');
10415
- Joi__default["default"].assert(params.token.type, Joi__default["default"].string().required(), 'The type of the token');
10409
+ Joi__default["default"].assert(params.token, Joi__default["default"].string().required(), 'Token value');
10410
+ Joi__default["default"].assert(params.type, Joi__default["default"].string().required(), 'The type of the token');
10416
10411
 
10417
10412
  const apiCall = self._client
10418
10413
  .put(`/notifications/token`, params, self._setHeader(session));