@docbrasil/api-systemmanager 1.1.64 → 1.1.65

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
@@ -2267,6 +2267,7 @@ Class for task, permission user
2267
2267
  * [.addTaskTag(params, session)](#Kanban+addTaskTag) ⇒ <code>promise</code> \| <code>Object</code> \| <code>boolean</code> \| <code>string</code>
2268
2268
  * [.removeTaskTag(params, session)](#Kanban+removeTaskTag) ⇒ <code>promise</code> \| <code>Object</code> \| <code>boolean</code> \| <code>string</code>
2269
2269
  * [.updateStatusList(params, session)](#Kanban+updateStatusList) ⇒ <code>promise</code> \| <code>Object</code> \| <code>boolean</code> \| <code>string</code>
2270
+ * [.startTask(params, session)](#Kanban+startTask) ⇒ <code>promise</code> \| <code>Object</code> \| <code>boolean</code> \| <code>string</code> \| <code>string</code>
2270
2271
 
2271
2272
  <a name="Kanban+get"></a>
2272
2273
 
@@ -2597,6 +2598,7 @@ Updates the status list order for a specific flow in an organization process on
2597
2598
  | params.flowId | <code>string</code> | The id of the organization process step flowId |
2598
2599
  | params.statusList | <code>Array</code> | The status list with new order |
2599
2600
  | params.statusList[ | <code>Object</code> | Status object configuration |
2601
+ | params.statusList[].guid | <code>string</code> | The guid of the status (the id) |
2600
2602
  | params.statusList[].value | <code>string</code> | The title of the status |
2601
2603
  | params.statusList[].expanded | <code>boolean</code> | If the status column is expanded or not |
2602
2604
  | params.statusList[].color | <code>string</code> | The hexadecimal color code for the status |
@@ -2625,6 +2627,54 @@ Expected response structure (success):
2625
2627
  success: true
2626
2628
  }
2627
2629
 
2630
+ Expected response structure (error):
2631
+ {
2632
+ success: false,
2633
+ error: "Organization process not found"
2634
+ }
2635
+ ```
2636
+ <a name="Kanban+startTask"></a>
2637
+
2638
+ ### kanban.startTask(params, session) ⇒ <code>promise</code> \| <code>Object</code> \| <code>boolean</code> \| <code>string</code> \| <code>string</code>
2639
+ Starts a new task in the Kanban board for a specific organization process
2640
+
2641
+ **Kind**: instance method of [<code>Kanban</code>](#Kanban)
2642
+ **Returns**: <code>promise</code> - Promise that resolves to operation status<code>Object</code> - returns.data - The response data containing:<code>boolean</code> - returns.data.success - Indicates if the operation was successful<code>string</code> - [returns.data.taskId] - The ID of the newly created task<code>string</code> - [returns.data.error] - Error message if operation failed
2643
+ **Access**: public
2644
+ **Author**: Myndware <augusto.pissarra@myndware.com>
2645
+
2646
+ | Param | Type | Description |
2647
+ | --- | --- | --- |
2648
+ | params | <code>Object</code> | Parameters object |
2649
+ | params.orgId | <code>string</code> | Organization id (_id database) |
2650
+ | params.orgProcessName | <code>string</code> | The name of the organization process |
2651
+ | params.title | <code>string</code> | The title of the new task |
2652
+ | params.status | <code>string</code> | The status id of the new task |
2653
+ | [params.tags] | <code>Array</code> | Array of tag ids for the new task (optional) |
2654
+ | [params.tasks] | <code>Array</code> | The task ids of each task inside the same status (optional) |
2655
+ | session | <code>string</code> | Session, token JWT |
2656
+
2657
+ **Example**
2658
+ ```js
2659
+ const API = require('@docbrasil/api-systemmanager');
2660
+ const api = new API();
2661
+ const params = {
2662
+ orgId: '55e4a3bd6be6b45210833fae',
2663
+ orgProcessName: 'employee-onboarding',
2664
+ title: 'Complete employee documentation',
2665
+ status: '507f1f77bcf86cd799439014',
2666
+ tags: ['507f1f77bcf86cd799439015', '507f1f77bcf86cd799439016'],
2667
+ tasks: ['507f1f77bcf86cd799439011', '507f1f77bcf86cd799439012']
2668
+ };
2669
+ const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
2670
+ const result = await api.user.kanban.startTask(params, session);
2671
+
2672
+ Expected response structure (success):
2673
+ {
2674
+ success: true,
2675
+ taskId: '507f1f77bcf86cd799439013'
2676
+ }
2677
+
2628
2678
  Expected response structure (error):
2629
2679
  {
2630
2680
  success: false,
package/docs/Kanban.html CHANGED
@@ -1404,6 +1404,528 @@ Expected response structure (error):
1404
1404
 
1405
1405
 
1406
1406
 
1407
+ </div>
1408
+
1409
+ <div class="member">
1410
+
1411
+
1412
+
1413
+ <h4 class="name" id="startTask">
1414
+ <a class="href-link" href="#startTask">#</a>
1415
+
1416
+
1417
+ <span class='tag'>async</span>
1418
+
1419
+
1420
+ <span class="code-name">
1421
+
1422
+ startTask<span class="signature">(params, session)</span><span class="type-signature"> &rarr; {promise|Object|boolean|string|string}</span>
1423
+
1424
+ </span>
1425
+ </h4>
1426
+
1427
+
1428
+
1429
+
1430
+ <div class="description">
1431
+ Starts a new task in the Kanban board for a specific organization process
1432
+ </div>
1433
+
1434
+
1435
+
1436
+
1437
+
1438
+
1439
+
1440
+
1441
+
1442
+
1443
+ <h5>Parameters:</h5>
1444
+
1445
+ <div class="table-container">
1446
+ <table class="params table">
1447
+ <thead>
1448
+ <tr>
1449
+
1450
+ <th>Name</th>
1451
+
1452
+
1453
+ <th>Type</th>
1454
+
1455
+
1456
+ <th>Attributes</th>
1457
+
1458
+
1459
+
1460
+
1461
+ <th class="last">Description</th>
1462
+ </tr>
1463
+ </thead>
1464
+
1465
+ <tbody>
1466
+
1467
+
1468
+
1469
+ <tr class="deep-level-0">
1470
+
1471
+ <td class="name"><code>params</code></td>
1472
+
1473
+
1474
+ <td class="type">
1475
+
1476
+
1477
+ <code class="param-type">Object</code>
1478
+
1479
+
1480
+
1481
+ </td>
1482
+
1483
+
1484
+ <td class="attributes">
1485
+
1486
+
1487
+
1488
+
1489
+
1490
+ </td>
1491
+
1492
+
1493
+
1494
+
1495
+ <td class="description last">Parameters object</td>
1496
+ </tr>
1497
+
1498
+
1499
+
1500
+
1501
+ <tr class="deep-level-1">
1502
+
1503
+ <td class="name"><code>orgId</code></td>
1504
+
1505
+
1506
+ <td class="type">
1507
+
1508
+
1509
+ <code class="param-type">string</code>
1510
+
1511
+
1512
+
1513
+ </td>
1514
+
1515
+
1516
+ <td class="attributes">
1517
+
1518
+
1519
+
1520
+
1521
+
1522
+ </td>
1523
+
1524
+
1525
+
1526
+
1527
+ <td class="description last">Organization id (_id database)</td>
1528
+ </tr>
1529
+
1530
+
1531
+
1532
+ <tr class="deep-level-1">
1533
+
1534
+ <td class="name"><code>orgProcessName</code></td>
1535
+
1536
+
1537
+ <td class="type">
1538
+
1539
+
1540
+ <code class="param-type">string</code>
1541
+
1542
+
1543
+
1544
+ </td>
1545
+
1546
+
1547
+ <td class="attributes">
1548
+
1549
+
1550
+
1551
+
1552
+
1553
+ </td>
1554
+
1555
+
1556
+
1557
+
1558
+ <td class="description last">The name of the organization process</td>
1559
+ </tr>
1560
+
1561
+
1562
+
1563
+ <tr class="deep-level-1">
1564
+
1565
+ <td class="name"><code>title</code></td>
1566
+
1567
+
1568
+ <td class="type">
1569
+
1570
+
1571
+ <code class="param-type">string</code>
1572
+
1573
+
1574
+
1575
+ </td>
1576
+
1577
+
1578
+ <td class="attributes">
1579
+
1580
+
1581
+
1582
+
1583
+
1584
+ </td>
1585
+
1586
+
1587
+
1588
+
1589
+ <td class="description last">The title of the new task</td>
1590
+ </tr>
1591
+
1592
+
1593
+
1594
+ <tr class="deep-level-1">
1595
+
1596
+ <td class="name"><code>status</code></td>
1597
+
1598
+
1599
+ <td class="type">
1600
+
1601
+
1602
+ <code class="param-type">string</code>
1603
+
1604
+
1605
+
1606
+ </td>
1607
+
1608
+
1609
+ <td class="attributes">
1610
+
1611
+
1612
+
1613
+
1614
+
1615
+ </td>
1616
+
1617
+
1618
+
1619
+
1620
+ <td class="description last">The status id of the new task</td>
1621
+ </tr>
1622
+
1623
+
1624
+
1625
+ <tr class="deep-level-1">
1626
+
1627
+ <td class="name"><code>tags</code></td>
1628
+
1629
+
1630
+ <td class="type">
1631
+
1632
+
1633
+ <code class="param-type">Array</code>
1634
+
1635
+
1636
+
1637
+ </td>
1638
+
1639
+
1640
+ <td class="attributes">
1641
+
1642
+ &lt;optional><br>
1643
+
1644
+
1645
+
1646
+
1647
+
1648
+ </td>
1649
+
1650
+
1651
+
1652
+
1653
+ <td class="description last">Array of tag ids for the new task (optional)</td>
1654
+ </tr>
1655
+
1656
+
1657
+
1658
+ <tr class="deep-level-1">
1659
+
1660
+ <td class="name"><code>tasks</code></td>
1661
+
1662
+
1663
+ <td class="type">
1664
+
1665
+
1666
+ <code class="param-type">Array</code>
1667
+
1668
+
1669
+
1670
+ </td>
1671
+
1672
+
1673
+ <td class="attributes">
1674
+
1675
+ &lt;optional><br>
1676
+
1677
+
1678
+
1679
+
1680
+
1681
+ </td>
1682
+
1683
+
1684
+
1685
+
1686
+ <td class="description last">The task ids of each task inside the same status (optional)</td>
1687
+ </tr>
1688
+
1689
+
1690
+
1691
+
1692
+
1693
+
1694
+
1695
+ <tr class="deep-level-0">
1696
+
1697
+ <td class="name"><code>session</code></td>
1698
+
1699
+
1700
+ <td class="type">
1701
+
1702
+
1703
+ <code class="param-type">string</code>
1704
+
1705
+
1706
+
1707
+ </td>
1708
+
1709
+
1710
+ <td class="attributes">
1711
+
1712
+
1713
+
1714
+
1715
+
1716
+ </td>
1717
+
1718
+
1719
+
1720
+
1721
+ <td class="description last">Session, token JWT</td>
1722
+ </tr>
1723
+
1724
+
1725
+
1726
+ </tbody>
1727
+ </table>
1728
+ </div>
1729
+
1730
+
1731
+
1732
+
1733
+
1734
+ <dl class="details">
1735
+
1736
+
1737
+
1738
+
1739
+
1740
+
1741
+
1742
+
1743
+
1744
+
1745
+
1746
+
1747
+
1748
+
1749
+
1750
+
1751
+
1752
+
1753
+ <dt class="tag-author">Author:</dt>
1754
+ <dd class="tag-author">
1755
+ <ul>
1756
+ <li><a href="mailto:augusto.pissarra@myndware.com">Myndware</a></li>
1757
+ </ul>
1758
+ </dd>
1759
+
1760
+
1761
+
1762
+
1763
+
1764
+
1765
+
1766
+
1767
+
1768
+
1769
+
1770
+
1771
+
1772
+
1773
+ <p class="tag-source">
1774
+ <a href="user_kanban.js.html" class="button">View Source</a>
1775
+ <span>
1776
+ <a href="user_kanban.js.html">user/kanban.js</a>, <a href="user_kanban.js.html#line618">line 618</a>
1777
+ </span>
1778
+ </p>
1779
+
1780
+ </dl>
1781
+
1782
+
1783
+
1784
+
1785
+
1786
+
1787
+
1788
+
1789
+
1790
+
1791
+
1792
+
1793
+
1794
+
1795
+
1796
+
1797
+
1798
+
1799
+ <div class='columns method-parameter'>
1800
+ <div class="column is-2"><label>Returns:</label></div>
1801
+ <div class="column is-10">
1802
+
1803
+
1804
+
1805
+ <div class="columns">
1806
+
1807
+ <div class='param-desc column is-7'>Promise that resolves to operation status</div>
1808
+
1809
+
1810
+ <div class='column is-5 has-text-left'>
1811
+ <label>Type: </label>
1812
+
1813
+ <code class="param-type">promise</code>
1814
+
1815
+
1816
+ </div>
1817
+
1818
+ </div>
1819
+
1820
+
1821
+
1822
+
1823
+ <div class="columns">
1824
+
1825
+ <div class='param-desc column is-7'>returns.data - The response data containing:</div>
1826
+
1827
+
1828
+ <div class='column is-5 has-text-left'>
1829
+ <label>Type: </label>
1830
+
1831
+ <code class="param-type">Object</code>
1832
+
1833
+
1834
+ </div>
1835
+
1836
+ </div>
1837
+
1838
+
1839
+
1840
+
1841
+ <div class="columns">
1842
+
1843
+ <div class='param-desc column is-7'>returns.data.success - Indicates if the operation was successful</div>
1844
+
1845
+
1846
+ <div class='column is-5 has-text-left'>
1847
+ <label>Type: </label>
1848
+
1849
+ <code class="param-type">boolean</code>
1850
+
1851
+
1852
+ </div>
1853
+
1854
+ </div>
1855
+
1856
+
1857
+
1858
+
1859
+ <div class="columns">
1860
+
1861
+ <div class='param-desc column is-7'>[returns.data.taskId] - The ID of the newly created task</div>
1862
+
1863
+
1864
+ <div class='column is-5 has-text-left'>
1865
+ <label>Type: </label>
1866
+
1867
+ <code class="param-type">string</code>
1868
+
1869
+
1870
+ </div>
1871
+
1872
+ </div>
1873
+
1874
+
1875
+
1876
+
1877
+ <div class="columns">
1878
+
1879
+ <div class='param-desc column is-7'>[returns.data.error] - Error message if operation failed</div>
1880
+
1881
+
1882
+ <div class='column is-5 has-text-left'>
1883
+ <label>Type: </label>
1884
+
1885
+ <code class="param-type">string</code>
1886
+
1887
+
1888
+ </div>
1889
+
1890
+ </div>
1891
+
1892
+
1893
+ </div>
1894
+ </div>
1895
+
1896
+
1897
+
1898
+
1899
+ <h5>Example</h5>
1900
+
1901
+
1902
+ <pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
1903
+ const api = new API();
1904
+ const params = {
1905
+ orgId: '55e4a3bd6be6b45210833fae',
1906
+ orgProcessName: 'employee-onboarding',
1907
+ title: 'Complete employee documentation',
1908
+ status: '507f1f77bcf86cd799439014',
1909
+ tags: ['507f1f77bcf86cd799439015', '507f1f77bcf86cd799439016'],
1910
+ tasks: ['507f1f77bcf86cd799439011', '507f1f77bcf86cd799439012']
1911
+ };
1912
+ const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
1913
+ const result = await api.user.kanban.startTask(params, session);
1914
+
1915
+ Expected response structure (success):
1916
+ {
1917
+ success: true,
1918
+ taskId: '507f1f77bcf86cd799439013'
1919
+ }
1920
+
1921
+ Expected response structure (error):
1922
+ {
1923
+ success: false,
1924
+ error: "Organization process not found"
1925
+ }</code></pre>
1926
+
1927
+
1928
+
1407
1929
  </div>
1408
1930
 
1409
1931
  <div class="member">
@@ -2015,6 +2537,29 @@ Expected response structure (error):
2015
2537
 
2016
2538
 
2017
2539
 
2540
+ <tr class="deep-level-1">
2541
+
2542
+ <td class="name"><code>statusList[].guid</code></td>
2543
+
2544
+
2545
+ <td class="type">
2546
+
2547
+
2548
+ <code class="param-type">string</code>
2549
+
2550
+
2551
+
2552
+ </td>
2553
+
2554
+
2555
+
2556
+
2557
+
2558
+ <td class="description last">The guid of the status (the id)</td>
2559
+ </tr>
2560
+
2561
+
2562
+
2018
2563
  <tr class="deep-level-1">
2019
2564
 
2020
2565
  <td class="name"><code>statusList[].value</code></td>
@@ -2161,7 +2706,7 @@ Expected response structure (error):
2161
2706
  <p class="tag-source">
2162
2707
  <a href="user_kanban.js.html" class="button">View Source</a>
2163
2708
  <span>
2164
- <a href="user_kanban.js.html">user/kanban.js</a>, <a href="user_kanban.js.html#line548">line 548</a>
2709
+ <a href="user_kanban.js.html">user/kanban.js</a>, <a href="user_kanban.js.html#line549">line 549</a>
2165
2710
  </span>
2166
2711
  </p>
2167
2712