@docbrasil/api-systemmanager 1.1.33 → 1.1.35
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/ai.js +2 -2
- package/api/user/notification.js +1 -1
- package/dist/bundle.cjs +6 -11
- package/dist/bundle.mjs +1 -1
- package/doc/api.md +4 -8
- package/docs/Notification.html +10 -58
- package/docs/user_notification.js.html +6 -11
- package/package.json +1 -1
package/api/ai.js
CHANGED
|
@@ -55,7 +55,7 @@ class MyndAI {
|
|
|
55
55
|
* @param {object} params.context The context to apply to a prompt
|
|
56
56
|
* @param {string} params.text The text to add to the prompt
|
|
57
57
|
* @param {array<base64>} params.medias Medias to add to the case in base64 (PDF, Image, Video, Audio)
|
|
58
|
-
* @param {string} params.
|
|
58
|
+
* @param {string} params.prompt The actual prompt with context and text to apply to
|
|
59
59
|
* @return {Promise<object>} data
|
|
60
60
|
* @return {boolean} data.success true|false for success
|
|
61
61
|
* @return {object} data.result the result of the AI call
|
|
@@ -82,7 +82,7 @@ class MyndAI {
|
|
|
82
82
|
|
|
83
83
|
try {
|
|
84
84
|
Joi.assert(params, Joi.object().required().error(new Error('params is required')));
|
|
85
|
-
Joi.assert(params.
|
|
85
|
+
Joi.assert(params.prompt, Joi.string().required().error(new Error('Provide a prompt')));
|
|
86
86
|
|
|
87
87
|
const apiCall = self._client
|
|
88
88
|
.post('/agents/explain', params, self._setHeader(authorization));
|
package/api/user/notification.js
CHANGED
|
@@ -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
|
|
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.
|
|
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
|
-
*
|
|
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"].
|
|
10414
|
-
Joi__default["default"].assert(params.
|
|
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));
|