@docbrasil/api-systemmanager 1.1.20 → 1.1.22

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/doc/api.md CHANGED
@@ -1925,7 +1925,7 @@ Method to find my tasks for a user
1925
1925
  const API = require('@docbrasil/api-systemmanager');
1926
1926
  const api = new API();
1927
1927
  const params = {
1928
- query: {"s":[{"historyBegin":{"order":"desc"}}],"i":1,"p":20},
1928
+ query: {"s":[{"historyBegin":{"order":"desc"}}],"i":1,"p":20, filter: {checklistsTags:['checklist']}},
1929
1929
  orgId: '55e4a3bd6be6b45210833fae',
1930
1930
  };
1931
1931
  const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
@@ -3248,6 +3248,9 @@ Class for user, permission user
3248
3248
  * [.saveSignature(data, session)](#User+saveSignature) ⇒ <code>Promise</code>
3249
3249
  * [.findByIdAndUpdate(params, session)](#User+findByIdAndUpdate) ⇒ <code>Promise.&lt;void&gt;</code>
3250
3250
  * [.changeOrganization(id, session)](#User+changeOrganization) ⇒ <code>Promise</code>
3251
+ * [.getChartJWT(query, session)](#User+getChartJWT) ⇒ <code>Promise.&lt;string&gt;</code>
3252
+ * [.getChartOrganizations(session)](#User+getChartOrganizations) ⇒ <code>Promise</code> \| <code>array.&lt;object&gt;</code> \| <code>array.&lt;object&gt;</code> \| <code>array.&lt;object&gt;</code>
3253
+ * [.getChartTags(orgIds, session)](#User+getChartTags) ⇒ <code>Promise</code> \| <code>array.&lt;object&gt;</code> \| <code>srting</code> \| <code>srting</code> \| <code>array.&lt;srting&gt;</code>
3251
3254
 
3252
3255
  <a name="User+updateAvatar"></a>
3253
3256
 
@@ -3412,7 +3415,77 @@ const API = require('@docbrasil/api-systemmanager');
3412
3415
  const api = new API();
3413
3416
  const id = '616eccaaa9360a05293b10fe';
3414
3417
  const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
3415
- await api.user.changeOrganization.updateAvatar(id, session);
3418
+ await api.user.changeOrganization(id, session);
3419
+ ```
3420
+ <a name="User+getChartJWT"></a>
3421
+
3422
+ ### user.getChartJWT(query, session) ⇒ <code>Promise.&lt;string&gt;</code>
3423
+ Get the Atlas Chart JWT Token, so we can access authorized the created charts
3424
+
3425
+ **Kind**: instance method of [<code>User</code>](#User)
3426
+ **Returns**: <code>Promise.&lt;string&gt;</code> - JWT Token
3427
+ **Access**: public
3428
+ **Author**: Myndware <augusto.pissarra@myndware.com>
3429
+
3430
+ | Param | Type | Default | Description |
3431
+ | --- | --- | --- | --- |
3432
+ | query | <code>object</code> | <code>{}</code> | The query, if any, to add to the JWT token |
3433
+ | query.orgIds | <code>array.&lt;string&gt;</code> | | An array of orgIds that we want to filter by |
3434
+ | query.orgProcessIds | <code>array.&lt;string&gt;</code> | | An array of orgProcessId that we want to filter by |
3435
+ | query.tags | <code>array.&lt;string&gt;</code> | | An array of org processes tags that we want to filter by |
3436
+ | query.startDate | <code>date</code> | | The start date in ISO format that we want to filter by |
3437
+ | query.endDate | <code>date</code> | | The start date in ISO format that we want to filter by |
3438
+ | session | <code>string</code> | | Is token JWT of user NOT allow SU |
3439
+
3440
+ **Example**
3441
+ ```js
3442
+ const API = require('@docbrasil/api-systemmanager');
3443
+ const api = new API();
3444
+ const query = { orgIds: ['616eccaaa9360a05293b10fe'] };
3445
+ const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
3446
+ const jwtToken = await api.user.getChartJWT(query, session);
3447
+ ```
3448
+ <a name="User+getChartOrganizations"></a>
3449
+
3450
+ ### user.getChartOrganizations(session) ⇒ <code>Promise</code> \| <code>array.&lt;object&gt;</code> \| <code>array.&lt;object&gt;</code> \| <code>array.&lt;object&gt;</code>
3451
+ Get the user organizations to run dashboard filtering
3452
+
3453
+ **Kind**: instance method of [<code>User</code>](#User)
3454
+ **Access**: public
3455
+ **Author**: Myndware <augusto.pissarra@myndware.com>
3456
+
3457
+ | Param | Type | Description |
3458
+ | --- | --- | --- |
3459
+ | session | <code>string</code> | Is token JWT of user NOT allow SU |
3460
+
3461
+ **Example**
3462
+ ```js
3463
+ const API = require('@docbrasil/api-systemmanager');
3464
+ const api = new API();
3465
+ const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
3466
+ const organizations = await api.user.getChartOrganizations(session);
3467
+ ```
3468
+ <a name="User+getChartTags"></a>
3469
+
3470
+ ### user.getChartTags(orgIds, session) ⇒ <code>Promise</code> \| <code>array.&lt;object&gt;</code> \| <code>srting</code> \| <code>srting</code> \| <code>array.&lt;srting&gt;</code>
3471
+ Given orgIds, return all the tags and org processes ids that can be used to filter dashboards
3472
+
3473
+ **Kind**: instance method of [<code>User</code>](#User)
3474
+ **Access**: public
3475
+ **Author**: Myndware <augusto.pissarra@myndware.com>
3476
+
3477
+ | Param | Type | Default | Description |
3478
+ | --- | --- | --- | --- |
3479
+ | orgIds | <code>array.&lt;string&gt;</code> | <code>[</code> | An array of orgIds |
3480
+ | session | <code>string</code> | | Is token JWT of user NOT allow SU |
3481
+
3482
+ **Example**
3483
+ ```js
3484
+ const API = require('@docbrasil/api-systemmanager');
3485
+ const api = new API();
3486
+ const orgIds: ['616eccaaa9360a05293b10fe'];
3487
+ const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
3488
+ const jwtToken = await api.user.getChartTags(orgIds, session);
3416
3489
  ```
3417
3490
  <a name="Dispatch"></a>
3418
3491
 
package/docs/MyTasks.html CHANGED
@@ -1412,7 +1412,7 @@ await api.user.task.mytasks.escalate(params, session);</code></pre>
1412
1412
  <pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
1413
1413
  const api = new API();
1414
1414
  const params = {
1415
- query: {"s":[{"historyBegin":{"order":"desc"}}],"i":1,"p":20},
1415
+ query: {"s":[{"historyBegin":{"order":"desc"}}],"i":1,"p":20, filter: {checklistsTags:['checklist']}},
1416
1416
  orgId: '55e4a3bd6be6b45210833fae',
1417
1417
  };
1418
1418
  const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';