@docbrasil/api-systemmanager 1.1.26 → 1.1.28
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/dashboard.js +40 -0
- package/api/user/document.js +48 -4
- package/dist/bundle.cjs +88 -4
- package/dist/bundle.mjs +1 -1
- package/doc/api.md +64 -0
- package/docs/Chart.html +296 -0
- package/docs/Dashboard.html +2 -2
- package/docs/Documents.html +1607 -415
- package/docs/user_dashboard.js.html +41 -1
- package/docs/user_document.js.html +175 -0
- package/package.json +1 -1
- package/.project +0 -11
- package/package-lock.json +0 -7337
package/docs/Documents.html
CHANGED
|
@@ -1749,8 +1749,8 @@ const retDocs = await api.user.document.checkPrimaryKeys(params, session);</code
|
|
|
1749
1749
|
|
|
1750
1750
|
|
|
1751
1751
|
|
|
1752
|
-
<h4 class="name" id="
|
|
1753
|
-
<a class="href-link" href="#
|
|
1752
|
+
<h4 class="name" id="exportExcelForAllPages">
|
|
1753
|
+
<a class="href-link" href="#exportExcelForAllPages">#</a>
|
|
1754
1754
|
|
|
1755
1755
|
|
|
1756
1756
|
<span class='tag'>async</span>
|
|
@@ -1758,7 +1758,7 @@ const retDocs = await api.user.document.checkPrimaryKeys(params, session);</code
|
|
|
1758
1758
|
|
|
1759
1759
|
<span class="code-name">
|
|
1760
1760
|
|
|
1761
|
-
|
|
1761
|
+
exportExcelForAllPages<span class="signature">(params, session)</span><span class="type-signature"> → {promise}</span>
|
|
1762
1762
|
|
|
1763
1763
|
</span>
|
|
1764
1764
|
</h4>
|
|
@@ -1766,6 +1766,10 @@ const retDocs = await api.user.document.checkPrimaryKeys(params, session);</code
|
|
|
1766
1766
|
|
|
1767
1767
|
|
|
1768
1768
|
|
|
1769
|
+
<div class="description">
|
|
1770
|
+
Method to export excel for all pages
|
|
1771
|
+
</div>
|
|
1772
|
+
|
|
1769
1773
|
|
|
1770
1774
|
|
|
1771
1775
|
|
|
@@ -1788,12 +1792,8 @@ const retDocs = await api.user.document.checkPrimaryKeys(params, session);</code
|
|
|
1788
1792
|
<th>Type</th>
|
|
1789
1793
|
|
|
1790
1794
|
|
|
1791
|
-
<th>Attributes</th>
|
|
1792
|
-
|
|
1793
1795
|
|
|
1794
1796
|
|
|
1795
|
-
<th>Default</th>
|
|
1796
|
-
|
|
1797
1797
|
|
|
1798
1798
|
<th class="last">Description</th>
|
|
1799
1799
|
</tr>
|
|
@@ -1818,22 +1818,10 @@ const retDocs = await api.user.document.checkPrimaryKeys(params, session);</code
|
|
|
1818
1818
|
</td>
|
|
1819
1819
|
|
|
1820
1820
|
|
|
1821
|
-
<td class="attributes">
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
</td>
|
|
1828
|
-
|
|
1829
1821
|
|
|
1830
1822
|
|
|
1831
|
-
<td class="default">
|
|
1832
|
-
|
|
1833
|
-
</td>
|
|
1834
|
-
|
|
1835
1823
|
|
|
1836
|
-
<td class="description last">
|
|
1824
|
+
<td class="description last">Params to export excel for all pages</td>
|
|
1837
1825
|
</tr>
|
|
1838
1826
|
|
|
1839
1827
|
|
|
@@ -1841,77 +1829,57 @@ const retDocs = await api.user.document.checkPrimaryKeys(params, session);</code
|
|
|
1841
1829
|
|
|
1842
1830
|
<tr class="deep-level-1">
|
|
1843
1831
|
|
|
1844
|
-
<td class="name"><code>
|
|
1832
|
+
<td class="name"><code>query</code></td>
|
|
1845
1833
|
|
|
1846
1834
|
|
|
1847
1835
|
<td class="type">
|
|
1848
1836
|
|
|
1849
1837
|
|
|
1850
|
-
<code class="param-type">
|
|
1838
|
+
<code class="param-type">object</code>
|
|
1851
1839
|
|
|
1852
1840
|
|
|
1853
1841
|
|
|
1854
1842
|
</td>
|
|
1855
1843
|
|
|
1856
1844
|
|
|
1857
|
-
<td class="attributes">
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
</td>
|
|
1864
|
-
|
|
1865
1845
|
|
|
1866
1846
|
|
|
1867
|
-
<td class="default">
|
|
1868
|
-
|
|
1869
|
-
</td>
|
|
1870
|
-
|
|
1871
1847
|
|
|
1872
|
-
<td class="description last">
|
|
1848
|
+
<td class="description last">Export excel for all pages query</td>
|
|
1873
1849
|
</tr>
|
|
1874
1850
|
|
|
1875
1851
|
|
|
1876
1852
|
|
|
1877
1853
|
<tr class="deep-level-1">
|
|
1878
1854
|
|
|
1879
|
-
<td class="name"><code>
|
|
1855
|
+
<td class="name"><code>orgId</code></td>
|
|
1880
1856
|
|
|
1881
1857
|
|
|
1882
1858
|
<td class="type">
|
|
1883
1859
|
|
|
1884
1860
|
|
|
1885
|
-
<code class="param-type">
|
|
1861
|
+
<code class="param-type">object</code>
|
|
1886
1862
|
|
|
1887
1863
|
|
|
1888
1864
|
|
|
1889
1865
|
</td>
|
|
1890
1866
|
|
|
1891
1867
|
|
|
1892
|
-
<td class="attributes">
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
</td>
|
|
1899
|
-
|
|
1900
1868
|
|
|
1901
1869
|
|
|
1902
|
-
<td class="default">
|
|
1903
|
-
|
|
1904
|
-
</td>
|
|
1905
|
-
|
|
1906
1870
|
|
|
1907
|
-
<td class="description last">
|
|
1871
|
+
<td class="description last">Organization id (_id database)</td>
|
|
1908
1872
|
</tr>
|
|
1909
1873
|
|
|
1910
1874
|
|
|
1911
|
-
|
|
1912
|
-
|
|
1875
|
+
|
|
1876
|
+
|
|
1877
|
+
|
|
1878
|
+
|
|
1879
|
+
|
|
1880
|
+
<tr class="deep-level-0">
|
|
1913
1881
|
|
|
1914
|
-
<td class="name"><code>
|
|
1882
|
+
<td class="name"><code>session</code></td>
|
|
1915
1883
|
|
|
1916
1884
|
|
|
1917
1885
|
<td class="type">
|
|
@@ -1924,357 +1892,1437 @@ const retDocs = await api.user.document.checkPrimaryKeys(params, session);</code
|
|
|
1924
1892
|
</td>
|
|
1925
1893
|
|
|
1926
1894
|
|
|
1927
|
-
<td class="attributes">
|
|
1928
|
-
|
|
1929
|
-
<optional><br>
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
</td>
|
|
1936
|
-
|
|
1937
1895
|
|
|
1938
1896
|
|
|
1939
|
-
<td class="default">
|
|
1940
|
-
|
|
1941
|
-
*
|
|
1942
|
-
|
|
1943
|
-
</td>
|
|
1944
|
-
|
|
1945
1897
|
|
|
1946
|
-
<td class="description last">
|
|
1898
|
+
<td class="description last">Session, token JWT</td>
|
|
1947
1899
|
</tr>
|
|
1948
1900
|
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
<tr class="deep-level-1">
|
|
1952
|
-
|
|
1953
|
-
<td class="name"><code>docId</code></td>
|
|
1954
|
-
|
|
1955
1901
|
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1902
|
+
|
|
1903
|
+
</tbody>
|
|
1904
|
+
</table>
|
|
1905
|
+
</div>
|
|
1960
1906
|
|
|
1961
1907
|
|
|
1962
|
-
|
|
1963
|
-
</td>
|
|
1964
1908
|
|
|
1965
|
-
|
|
1966
|
-
<td class="attributes">
|
|
1967
|
-
|
|
1968
1909
|
|
|
1969
|
-
|
|
1970
1910
|
|
|
1971
|
-
|
|
1972
|
-
</td>
|
|
1973
|
-
|
|
1911
|
+
<dl class="details">
|
|
1974
1912
|
|
|
1975
|
-
|
|
1976
|
-
<td class="default">
|
|
1977
|
-
|
|
1978
|
-
</td>
|
|
1979
|
-
|
|
1913
|
+
|
|
1980
1914
|
|
|
1981
|
-
|
|
1982
|
-
</tr>
|
|
1915
|
+
|
|
1983
1916
|
|
|
1984
|
-
|
|
1985
1917
|
|
|
1986
|
-
<tr class="deep-level-1">
|
|
1987
|
-
|
|
1988
|
-
<td class="name"><code>docAreaId</code></td>
|
|
1989
|
-
|
|
1990
1918
|
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
<code class="param-type">string</code>
|
|
1919
|
+
|
|
1995
1920
|
|
|
1921
|
+
|
|
1996
1922
|
|
|
1997
|
-
|
|
1998
|
-
</td>
|
|
1923
|
+
|
|
1999
1924
|
|
|
2000
|
-
|
|
2001
|
-
<td class="attributes">
|
|
2002
|
-
|
|
1925
|
+
|
|
2003
1926
|
|
|
2004
|
-
|
|
1927
|
+
|
|
2005
1928
|
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
1929
|
+
|
|
1930
|
+
<dt class="tag-author">Author:</dt>
|
|
1931
|
+
<dd class="tag-author">
|
|
1932
|
+
<ul>
|
|
1933
|
+
<li><a href="mailto:augusto.pissarra@myndware.com">Myndware</a></li>
|
|
1934
|
+
</ul>
|
|
1935
|
+
</dd>
|
|
1936
|
+
|
|
2009
1937
|
|
|
2010
|
-
|
|
2011
|
-
<td class="default">
|
|
2012
|
-
|
|
2013
|
-
</td>
|
|
2014
|
-
|
|
1938
|
+
|
|
2015
1939
|
|
|
2016
|
-
|
|
2017
|
-
</tr>
|
|
1940
|
+
|
|
2018
1941
|
|
|
2019
|
-
|
|
2020
1942
|
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
<td class="name"><code>tag</code></td>
|
|
2024
|
-
|
|
1943
|
+
|
|
2025
1944
|
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
<code class="param-type">string</code>
|
|
1945
|
+
|
|
2030
1946
|
|
|
1947
|
+
|
|
2031
1948
|
|
|
2032
|
-
|
|
2033
|
-
|
|
1949
|
+
|
|
1950
|
+
<p class="tag-source">
|
|
1951
|
+
<a href="user_document.js.html" class="button">View Source</a>
|
|
1952
|
+
<span>
|
|
1953
|
+
<a href="user_document.js.html">user/document.js</a>, <a href="user_document.js.html#line826">line 826</a>
|
|
1954
|
+
</span>
|
|
1955
|
+
</p>
|
|
1956
|
+
|
|
1957
|
+
</dl>
|
|
2034
1958
|
|
|
2035
|
-
|
|
2036
|
-
<td class="attributes">
|
|
2037
|
-
|
|
2038
1959
|
|
|
2039
|
-
|
|
2040
1960
|
|
|
2041
|
-
|
|
2042
|
-
</td>
|
|
2043
|
-
|
|
2044
1961
|
|
|
2045
|
-
|
|
2046
|
-
<td class="default">
|
|
2047
|
-
|
|
2048
|
-
</td>
|
|
2049
|
-
|
|
2050
1962
|
|
|
2051
|
-
<td class="description last">Tag of the document</td>
|
|
2052
|
-
</tr>
|
|
2053
1963
|
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
<tr class="deep-level-1">
|
|
2057
|
-
|
|
2058
|
-
<td class="name"><code>projection</code></td>
|
|
2059
|
-
|
|
2060
1964
|
|
|
2061
|
-
<td class="type">
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
<code class="param-type">string</code>
|
|
2065
1965
|
|
|
2066
1966
|
|
|
2067
|
-
|
|
2068
|
-
</td>
|
|
2069
1967
|
|
|
2070
|
-
|
|
2071
|
-
<td class="attributes">
|
|
2072
|
-
|
|
2073
|
-
<optional><br>
|
|
2074
|
-
|
|
2075
1968
|
|
|
2076
|
-
|
|
2077
1969
|
|
|
2078
|
-
|
|
2079
|
-
</td>
|
|
2080
|
-
|
|
2081
1970
|
|
|
2082
|
-
|
|
2083
|
-
<td class="default">
|
|
2084
|
-
|
|
2085
|
-
""
|
|
2086
|
-
|
|
2087
|
-
</td>
|
|
2088
|
-
|
|
2089
1971
|
|
|
2090
|
-
<td class="description last">Projection to return fields</td>
|
|
2091
|
-
</tr>
|
|
2092
1972
|
|
|
2093
|
-
|
|
1973
|
+
|
|
1974
|
+
|
|
1975
|
+
|
|
1976
|
+
<div class='columns method-parameter'>
|
|
1977
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
1978
|
+
<div class="column is-10">
|
|
1979
|
+
|
|
1980
|
+
|
|
1981
|
+
|
|
1982
|
+
<div class="columns">
|
|
2094
1983
|
|
|
2095
|
-
<
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
1984
|
+
<div class='param-desc column is-7'>returned data from the export excel for all pages</div>
|
|
1985
|
+
|
|
1986
|
+
|
|
1987
|
+
<div class='column is-5 has-text-left'>
|
|
1988
|
+
<label>Type: </label>
|
|
1989
|
+
|
|
1990
|
+
<code class="param-type">promise</code>
|
|
2099
1991
|
|
|
2100
|
-
<td class="type">
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
<code class="param-type">string</code>
|
|
2104
1992
|
|
|
1993
|
+
</div>
|
|
1994
|
+
|
|
1995
|
+
</div>
|
|
1996
|
+
|
|
1997
|
+
|
|
1998
|
+
</div>
|
|
1999
|
+
</div>
|
|
2000
|
+
|
|
2001
|
+
|
|
2002
|
+
|
|
2003
|
+
|
|
2004
|
+
<h5>Example</h5>
|
|
2005
|
+
|
|
2006
|
+
|
|
2007
|
+
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
2008
|
+
const api = new API();
|
|
2009
|
+
const params = {
|
|
2010
|
+
query: {p: 20, i: 1, s: 'Mais recentes', as: '', m: 'w', ai: '57e6a3bd6be6b45210833fae'},
|
|
2011
|
+
orgId: '55e4a3bd6be6b45210833fae',
|
|
2012
|
+
};
|
|
2013
|
+
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
2014
|
+
const retSearch = await api.user.document.exportExcelForAllPages(params, session);</code></pre>
|
|
2015
|
+
|
|
2016
|
+
|
|
2017
|
+
|
|
2018
|
+
</div>
|
|
2019
|
+
|
|
2020
|
+
<div class="member">
|
|
2021
|
+
|
|
2022
|
+
|
|
2023
|
+
|
|
2024
|
+
<h4 class="name" id="exportWmsExcelForAllPages">
|
|
2025
|
+
<a class="href-link" href="#exportWmsExcelForAllPages">#</a>
|
|
2026
|
+
|
|
2027
|
+
|
|
2028
|
+
<span class='tag'>async</span>
|
|
2029
|
+
|
|
2030
|
+
|
|
2031
|
+
<span class="code-name">
|
|
2032
|
+
|
|
2033
|
+
exportWmsExcelForAllPages<span class="signature">(params, session)</span><span class="type-signature"> → {promise}</span>
|
|
2034
|
+
|
|
2035
|
+
</span>
|
|
2036
|
+
</h4>
|
|
2037
|
+
|
|
2038
|
+
|
|
2039
|
+
|
|
2040
|
+
|
|
2041
|
+
<div class="description">
|
|
2042
|
+
Method to export Wms Excel for all pages
|
|
2043
|
+
</div>
|
|
2044
|
+
|
|
2045
|
+
|
|
2046
|
+
|
|
2047
|
+
|
|
2048
|
+
|
|
2049
|
+
|
|
2050
|
+
|
|
2051
|
+
|
|
2052
|
+
|
|
2053
|
+
|
|
2054
|
+
<h5>Parameters:</h5>
|
|
2055
|
+
|
|
2056
|
+
<div class="table-container">
|
|
2057
|
+
<table class="params table">
|
|
2058
|
+
<thead>
|
|
2059
|
+
<tr>
|
|
2060
|
+
|
|
2061
|
+
<th>Name</th>
|
|
2062
|
+
|
|
2063
|
+
|
|
2064
|
+
<th>Type</th>
|
|
2065
|
+
|
|
2066
|
+
|
|
2067
|
+
|
|
2068
|
+
|
|
2069
|
+
|
|
2070
|
+
<th class="last">Description</th>
|
|
2071
|
+
</tr>
|
|
2072
|
+
</thead>
|
|
2073
|
+
|
|
2074
|
+
<tbody>
|
|
2075
|
+
|
|
2076
|
+
|
|
2077
|
+
|
|
2078
|
+
<tr class="deep-level-0">
|
|
2079
|
+
|
|
2080
|
+
<td class="name"><code>params</code></td>
|
|
2081
|
+
|
|
2082
|
+
|
|
2083
|
+
<td class="type">
|
|
2084
|
+
|
|
2085
|
+
|
|
2086
|
+
<code class="param-type">object</code>
|
|
2087
|
+
|
|
2088
|
+
|
|
2089
|
+
|
|
2090
|
+
</td>
|
|
2091
|
+
|
|
2092
|
+
|
|
2093
|
+
|
|
2094
|
+
|
|
2095
|
+
|
|
2096
|
+
<td class="description last">Params to export Wms Excel for all pages</td>
|
|
2097
|
+
</tr>
|
|
2098
|
+
|
|
2099
|
+
|
|
2100
|
+
|
|
2101
|
+
|
|
2102
|
+
<tr class="deep-level-1">
|
|
2103
|
+
|
|
2104
|
+
<td class="name"><code>query</code></td>
|
|
2105
|
+
|
|
2106
|
+
|
|
2107
|
+
<td class="type">
|
|
2108
|
+
|
|
2109
|
+
|
|
2110
|
+
<code class="param-type">object</code>
|
|
2111
|
+
|
|
2112
|
+
|
|
2113
|
+
|
|
2114
|
+
</td>
|
|
2115
|
+
|
|
2116
|
+
|
|
2117
|
+
|
|
2118
|
+
|
|
2119
|
+
|
|
2120
|
+
<td class="description last">export Wms Excel for all pages query</td>
|
|
2121
|
+
</tr>
|
|
2122
|
+
|
|
2123
|
+
|
|
2124
|
+
|
|
2125
|
+
<tr class="deep-level-1">
|
|
2126
|
+
|
|
2127
|
+
<td class="name"><code>orgId</code></td>
|
|
2128
|
+
|
|
2129
|
+
|
|
2130
|
+
<td class="type">
|
|
2131
|
+
|
|
2132
|
+
|
|
2133
|
+
<code class="param-type">object</code>
|
|
2134
|
+
|
|
2135
|
+
|
|
2136
|
+
|
|
2137
|
+
</td>
|
|
2138
|
+
|
|
2139
|
+
|
|
2140
|
+
|
|
2141
|
+
|
|
2142
|
+
|
|
2143
|
+
<td class="description last">Organization id (_id database)</td>
|
|
2144
|
+
</tr>
|
|
2145
|
+
|
|
2146
|
+
|
|
2147
|
+
|
|
2148
|
+
|
|
2149
|
+
|
|
2150
|
+
|
|
2151
|
+
|
|
2152
|
+
<tr class="deep-level-0">
|
|
2153
|
+
|
|
2154
|
+
<td class="name"><code>session</code></td>
|
|
2155
|
+
|
|
2156
|
+
|
|
2157
|
+
<td class="type">
|
|
2158
|
+
|
|
2159
|
+
|
|
2160
|
+
<code class="param-type">string</code>
|
|
2161
|
+
|
|
2162
|
+
|
|
2163
|
+
|
|
2164
|
+
</td>
|
|
2165
|
+
|
|
2166
|
+
|
|
2167
|
+
|
|
2168
|
+
|
|
2169
|
+
|
|
2170
|
+
<td class="description last">Session, token JWT</td>
|
|
2171
|
+
</tr>
|
|
2172
|
+
|
|
2173
|
+
|
|
2174
|
+
|
|
2175
|
+
</tbody>
|
|
2176
|
+
</table>
|
|
2177
|
+
</div>
|
|
2178
|
+
|
|
2179
|
+
|
|
2180
|
+
|
|
2181
|
+
|
|
2182
|
+
|
|
2183
|
+
<dl class="details">
|
|
2184
|
+
|
|
2185
|
+
|
|
2186
|
+
|
|
2187
|
+
|
|
2188
|
+
|
|
2189
|
+
|
|
2190
|
+
|
|
2191
|
+
|
|
2192
|
+
|
|
2193
|
+
|
|
2194
|
+
|
|
2195
|
+
|
|
2196
|
+
|
|
2197
|
+
|
|
2198
|
+
|
|
2199
|
+
|
|
2200
|
+
|
|
2201
|
+
|
|
2202
|
+
<dt class="tag-author">Author:</dt>
|
|
2203
|
+
<dd class="tag-author">
|
|
2204
|
+
<ul>
|
|
2205
|
+
<li><a href="mailto:augusto.pissarra@myndware.com">Myndware</a></li>
|
|
2206
|
+
</ul>
|
|
2207
|
+
</dd>
|
|
2208
|
+
|
|
2209
|
+
|
|
2210
|
+
|
|
2211
|
+
|
|
2212
|
+
|
|
2213
|
+
|
|
2214
|
+
|
|
2215
|
+
|
|
2216
|
+
|
|
2217
|
+
|
|
2218
|
+
|
|
2219
|
+
|
|
2220
|
+
|
|
2221
|
+
|
|
2222
|
+
<p class="tag-source">
|
|
2223
|
+
<a href="user_document.js.html" class="button">View Source</a>
|
|
2224
|
+
<span>
|
|
2225
|
+
<a href="user_document.js.html">user/document.js</a>, <a href="user_document.js.html#line866">line 866</a>
|
|
2226
|
+
</span>
|
|
2227
|
+
</p>
|
|
2228
|
+
|
|
2229
|
+
</dl>
|
|
2230
|
+
|
|
2231
|
+
|
|
2232
|
+
|
|
2233
|
+
|
|
2234
|
+
|
|
2235
|
+
|
|
2236
|
+
|
|
2237
|
+
|
|
2238
|
+
|
|
2239
|
+
|
|
2240
|
+
|
|
2241
|
+
|
|
2242
|
+
|
|
2243
|
+
|
|
2244
|
+
|
|
2245
|
+
|
|
2246
|
+
|
|
2247
|
+
|
|
2248
|
+
<div class='columns method-parameter'>
|
|
2249
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
2250
|
+
<div class="column is-10">
|
|
2251
|
+
|
|
2252
|
+
|
|
2253
|
+
|
|
2254
|
+
<div class="columns">
|
|
2255
|
+
|
|
2256
|
+
<div class='param-desc column is-7'>returned data from the export Wms Excel for all pages</div>
|
|
2257
|
+
|
|
2258
|
+
|
|
2259
|
+
<div class='column is-5 has-text-left'>
|
|
2260
|
+
<label>Type: </label>
|
|
2261
|
+
|
|
2262
|
+
<code class="param-type">promise</code>
|
|
2263
|
+
|
|
2264
|
+
|
|
2265
|
+
</div>
|
|
2266
|
+
|
|
2267
|
+
</div>
|
|
2268
|
+
|
|
2269
|
+
|
|
2270
|
+
</div>
|
|
2271
|
+
</div>
|
|
2272
|
+
|
|
2273
|
+
|
|
2274
|
+
|
|
2275
|
+
|
|
2276
|
+
<h5>Example</h5>
|
|
2277
|
+
|
|
2278
|
+
|
|
2279
|
+
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
2280
|
+
const api = new API();
|
|
2281
|
+
const params = {
|
|
2282
|
+
query: {p: 20, i: 1, s: 'Mais recentes', as: '', m: 'w', ai: '57e6a3bd6be6b45210833fae'},
|
|
2283
|
+
orgId: '55e4a3bd6be6b45210833fae',
|
|
2284
|
+
};
|
|
2285
|
+
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
2286
|
+
const retSearch = await api.user.document.exportWmsExcelForAllPages(params, session);</code></pre>
|
|
2287
|
+
|
|
2288
|
+
|
|
2289
|
+
|
|
2290
|
+
</div>
|
|
2291
|
+
|
|
2292
|
+
<div class="member">
|
|
2293
|
+
|
|
2294
|
+
|
|
2295
|
+
|
|
2296
|
+
<h4 class="name" id="find">
|
|
2297
|
+
<a class="href-link" href="#find">#</a>
|
|
2298
|
+
|
|
2299
|
+
|
|
2300
|
+
<span class='tag'>async</span>
|
|
2301
|
+
|
|
2302
|
+
|
|
2303
|
+
<span class="code-name">
|
|
2304
|
+
|
|
2305
|
+
find<span class="signature">(params, session)</span><span class="type-signature"> → {Promise}</span>
|
|
2306
|
+
|
|
2307
|
+
</span>
|
|
2308
|
+
</h4>
|
|
2309
|
+
|
|
2310
|
+
|
|
2311
|
+
|
|
2312
|
+
|
|
2313
|
+
|
|
2314
|
+
|
|
2315
|
+
|
|
2316
|
+
|
|
2317
|
+
|
|
2318
|
+
|
|
2319
|
+
|
|
2320
|
+
|
|
2321
|
+
|
|
2322
|
+
<h5>Parameters:</h5>
|
|
2323
|
+
|
|
2324
|
+
<div class="table-container">
|
|
2325
|
+
<table class="params table">
|
|
2326
|
+
<thead>
|
|
2327
|
+
<tr>
|
|
2328
|
+
|
|
2329
|
+
<th>Name</th>
|
|
2330
|
+
|
|
2331
|
+
|
|
2332
|
+
<th>Type</th>
|
|
2333
|
+
|
|
2334
|
+
|
|
2335
|
+
<th>Attributes</th>
|
|
2336
|
+
|
|
2337
|
+
|
|
2338
|
+
|
|
2339
|
+
<th>Default</th>
|
|
2340
|
+
|
|
2341
|
+
|
|
2342
|
+
<th class="last">Description</th>
|
|
2343
|
+
</tr>
|
|
2344
|
+
</thead>
|
|
2345
|
+
|
|
2346
|
+
<tbody>
|
|
2347
|
+
|
|
2348
|
+
|
|
2349
|
+
|
|
2350
|
+
<tr class="deep-level-0">
|
|
2351
|
+
|
|
2352
|
+
<td class="name"><code>params</code></td>
|
|
2353
|
+
|
|
2354
|
+
|
|
2355
|
+
<td class="type">
|
|
2356
|
+
|
|
2357
|
+
|
|
2358
|
+
<code class="param-type">object</code>
|
|
2359
|
+
|
|
2360
|
+
|
|
2361
|
+
|
|
2362
|
+
</td>
|
|
2363
|
+
|
|
2364
|
+
|
|
2365
|
+
<td class="attributes">
|
|
2366
|
+
|
|
2367
|
+
|
|
2368
|
+
|
|
2369
|
+
|
|
2370
|
+
|
|
2371
|
+
</td>
|
|
2372
|
+
|
|
2373
|
+
|
|
2374
|
+
|
|
2375
|
+
<td class="default">
|
|
2376
|
+
|
|
2377
|
+
</td>
|
|
2378
|
+
|
|
2379
|
+
|
|
2380
|
+
<td class="description last">Object with params</td>
|
|
2381
|
+
</tr>
|
|
2382
|
+
|
|
2383
|
+
|
|
2384
|
+
|
|
2385
|
+
|
|
2386
|
+
<tr class="deep-level-1">
|
|
2387
|
+
|
|
2388
|
+
<td class="name"><code>index</code></td>
|
|
2389
|
+
|
|
2390
|
+
|
|
2391
|
+
<td class="type">
|
|
2392
|
+
|
|
2393
|
+
|
|
2394
|
+
<code class="param-type">string</code>
|
|
2395
|
+
|
|
2396
|
+
|
|
2397
|
+
|
|
2398
|
+
</td>
|
|
2399
|
+
|
|
2400
|
+
|
|
2401
|
+
<td class="attributes">
|
|
2402
|
+
|
|
2403
|
+
|
|
2404
|
+
|
|
2405
|
+
|
|
2406
|
+
|
|
2407
|
+
</td>
|
|
2408
|
+
|
|
2409
|
+
|
|
2410
|
+
|
|
2411
|
+
<td class="default">
|
|
2412
|
+
|
|
2413
|
+
</td>
|
|
2414
|
+
|
|
2415
|
+
|
|
2416
|
+
<td class="description last">Field to search</td>
|
|
2417
|
+
</tr>
|
|
2418
|
+
|
|
2419
|
+
|
|
2420
|
+
|
|
2421
|
+
<tr class="deep-level-1">
|
|
2422
|
+
|
|
2423
|
+
<td class="name"><code>txtToSearch</code></td>
|
|
2424
|
+
|
|
2425
|
+
|
|
2426
|
+
<td class="type">
|
|
2427
|
+
|
|
2428
|
+
|
|
2429
|
+
<code class="param-type">string</code>
|
|
2430
|
+
|
|
2431
|
+
|
|
2432
|
+
|
|
2433
|
+
</td>
|
|
2434
|
+
|
|
2435
|
+
|
|
2436
|
+
<td class="attributes">
|
|
2437
|
+
|
|
2438
|
+
|
|
2439
|
+
|
|
2440
|
+
|
|
2441
|
+
|
|
2442
|
+
</td>
|
|
2443
|
+
|
|
2444
|
+
|
|
2445
|
+
|
|
2446
|
+
<td class="default">
|
|
2447
|
+
|
|
2448
|
+
</td>
|
|
2449
|
+
|
|
2450
|
+
|
|
2451
|
+
<td class="description last">Text to search</td>
|
|
2452
|
+
</tr>
|
|
2453
|
+
|
|
2454
|
+
|
|
2455
|
+
|
|
2456
|
+
<tr class="deep-level-1">
|
|
2457
|
+
|
|
2458
|
+
<td class="name"><code>compare</code></td>
|
|
2459
|
+
|
|
2460
|
+
|
|
2461
|
+
<td class="type">
|
|
2462
|
+
|
|
2463
|
+
|
|
2464
|
+
<code class="param-type">string</code>
|
|
2465
|
+
|
|
2466
|
+
|
|
2467
|
+
|
|
2468
|
+
</td>
|
|
2469
|
+
|
|
2470
|
+
|
|
2471
|
+
<td class="attributes">
|
|
2472
|
+
|
|
2473
|
+
<optional><br>
|
|
2474
|
+
|
|
2475
|
+
|
|
2476
|
+
|
|
2477
|
+
|
|
2478
|
+
|
|
2479
|
+
</td>
|
|
2480
|
+
|
|
2481
|
+
|
|
2482
|
+
|
|
2483
|
+
<td class="default">
|
|
2484
|
+
|
|
2485
|
+
*
|
|
2486
|
+
|
|
2487
|
+
</td>
|
|
2488
|
+
|
|
2489
|
+
|
|
2490
|
+
<td class="description last">Filter to search (=, ~, *, =*, *=, *?)</td>
|
|
2491
|
+
</tr>
|
|
2492
|
+
|
|
2493
|
+
|
|
2494
|
+
|
|
2495
|
+
<tr class="deep-level-1">
|
|
2496
|
+
|
|
2497
|
+
<td class="name"><code>docId</code></td>
|
|
2498
|
+
|
|
2499
|
+
|
|
2500
|
+
<td class="type">
|
|
2501
|
+
|
|
2502
|
+
|
|
2503
|
+
<code class="param-type">string</code>
|
|
2504
|
+
|
|
2505
|
+
|
|
2506
|
+
|
|
2507
|
+
</td>
|
|
2508
|
+
|
|
2509
|
+
|
|
2510
|
+
<td class="attributes">
|
|
2511
|
+
|
|
2512
|
+
|
|
2513
|
+
|
|
2514
|
+
|
|
2515
|
+
|
|
2516
|
+
</td>
|
|
2517
|
+
|
|
2518
|
+
|
|
2519
|
+
|
|
2520
|
+
<td class="default">
|
|
2521
|
+
|
|
2522
|
+
</td>
|
|
2523
|
+
|
|
2524
|
+
|
|
2525
|
+
<td class="description last">Document id for serach</td>
|
|
2526
|
+
</tr>
|
|
2527
|
+
|
|
2528
|
+
|
|
2529
|
+
|
|
2530
|
+
<tr class="deep-level-1">
|
|
2531
|
+
|
|
2532
|
+
<td class="name"><code>docAreaId</code></td>
|
|
2533
|
+
|
|
2534
|
+
|
|
2535
|
+
<td class="type">
|
|
2536
|
+
|
|
2537
|
+
|
|
2538
|
+
<code class="param-type">string</code>
|
|
2539
|
+
|
|
2540
|
+
|
|
2541
|
+
|
|
2542
|
+
</td>
|
|
2543
|
+
|
|
2544
|
+
|
|
2545
|
+
<td class="attributes">
|
|
2546
|
+
|
|
2547
|
+
|
|
2548
|
+
|
|
2549
|
+
|
|
2550
|
+
|
|
2551
|
+
</td>
|
|
2552
|
+
|
|
2553
|
+
|
|
2554
|
+
|
|
2555
|
+
<td class="default">
|
|
2556
|
+
|
|
2557
|
+
</td>
|
|
2558
|
+
|
|
2559
|
+
|
|
2560
|
+
<td class="description last">Doc area id</td>
|
|
2561
|
+
</tr>
|
|
2562
|
+
|
|
2563
|
+
|
|
2564
|
+
|
|
2565
|
+
<tr class="deep-level-1">
|
|
2566
|
+
|
|
2567
|
+
<td class="name"><code>tag</code></td>
|
|
2568
|
+
|
|
2569
|
+
|
|
2570
|
+
<td class="type">
|
|
2571
|
+
|
|
2572
|
+
|
|
2573
|
+
<code class="param-type">string</code>
|
|
2574
|
+
|
|
2575
|
+
|
|
2576
|
+
|
|
2577
|
+
</td>
|
|
2578
|
+
|
|
2579
|
+
|
|
2580
|
+
<td class="attributes">
|
|
2581
|
+
|
|
2582
|
+
|
|
2583
|
+
|
|
2584
|
+
|
|
2585
|
+
|
|
2586
|
+
</td>
|
|
2587
|
+
|
|
2588
|
+
|
|
2589
|
+
|
|
2590
|
+
<td class="default">
|
|
2591
|
+
|
|
2592
|
+
</td>
|
|
2593
|
+
|
|
2594
|
+
|
|
2595
|
+
<td class="description last">Tag of the document</td>
|
|
2596
|
+
</tr>
|
|
2597
|
+
|
|
2598
|
+
|
|
2599
|
+
|
|
2600
|
+
<tr class="deep-level-1">
|
|
2601
|
+
|
|
2602
|
+
<td class="name"><code>projection</code></td>
|
|
2603
|
+
|
|
2604
|
+
|
|
2605
|
+
<td class="type">
|
|
2606
|
+
|
|
2607
|
+
|
|
2608
|
+
<code class="param-type">string</code>
|
|
2609
|
+
|
|
2610
|
+
|
|
2611
|
+
|
|
2612
|
+
</td>
|
|
2613
|
+
|
|
2614
|
+
|
|
2615
|
+
<td class="attributes">
|
|
2616
|
+
|
|
2617
|
+
<optional><br>
|
|
2618
|
+
|
|
2619
|
+
|
|
2620
|
+
|
|
2621
|
+
|
|
2622
|
+
|
|
2623
|
+
</td>
|
|
2624
|
+
|
|
2625
|
+
|
|
2626
|
+
|
|
2627
|
+
<td class="default">
|
|
2628
|
+
|
|
2629
|
+
""
|
|
2630
|
+
|
|
2631
|
+
</td>
|
|
2632
|
+
|
|
2633
|
+
|
|
2634
|
+
<td class="description last">Projection to return fields</td>
|
|
2635
|
+
</tr>
|
|
2636
|
+
|
|
2637
|
+
|
|
2638
|
+
|
|
2639
|
+
<tr class="deep-level-1">
|
|
2640
|
+
|
|
2641
|
+
<td class="name"><code>sort</code></td>
|
|
2642
|
+
|
|
2643
|
+
|
|
2644
|
+
<td class="type">
|
|
2645
|
+
|
|
2646
|
+
|
|
2647
|
+
<code class="param-type">string</code>
|
|
2648
|
+
|
|
2649
|
+
|
|
2650
|
+
|
|
2651
|
+
</td>
|
|
2652
|
+
|
|
2653
|
+
|
|
2654
|
+
<td class="attributes">
|
|
2655
|
+
|
|
2656
|
+
<optional><br>
|
|
2657
|
+
|
|
2658
|
+
|
|
2659
|
+
|
|
2660
|
+
|
|
2661
|
+
|
|
2662
|
+
</td>
|
|
2663
|
+
|
|
2664
|
+
|
|
2665
|
+
|
|
2666
|
+
<td class="default">
|
|
2667
|
+
|
|
2668
|
+
"Mais+recentes"
|
|
2669
|
+
|
|
2670
|
+
</td>
|
|
2671
|
+
|
|
2672
|
+
|
|
2673
|
+
<td class="description last">Sort data</td>
|
|
2674
|
+
</tr>
|
|
2675
|
+
|
|
2676
|
+
|
|
2677
|
+
|
|
2678
|
+
<tr class="deep-level-1">
|
|
2679
|
+
|
|
2680
|
+
<td class="name"><code>orgId</code></td>
|
|
2681
|
+
|
|
2682
|
+
|
|
2683
|
+
<td class="type">
|
|
2684
|
+
|
|
2685
|
+
|
|
2686
|
+
<code class="param-type">string</code>
|
|
2687
|
+
|
|
2688
|
+
|
|
2689
|
+
|
|
2690
|
+
</td>
|
|
2691
|
+
|
|
2692
|
+
|
|
2693
|
+
<td class="attributes">
|
|
2694
|
+
|
|
2695
|
+
|
|
2696
|
+
|
|
2697
|
+
|
|
2698
|
+
|
|
2699
|
+
</td>
|
|
2700
|
+
|
|
2701
|
+
|
|
2702
|
+
|
|
2703
|
+
<td class="default">
|
|
2704
|
+
|
|
2705
|
+
</td>
|
|
2706
|
+
|
|
2707
|
+
|
|
2708
|
+
<td class="description last">Organization id (_id database)</td>
|
|
2709
|
+
</tr>
|
|
2710
|
+
|
|
2711
|
+
|
|
2712
|
+
|
|
2713
|
+
<tr class="deep-level-1">
|
|
2714
|
+
|
|
2715
|
+
<td class="name"><code>pagination</code></td>
|
|
2716
|
+
|
|
2717
|
+
|
|
2718
|
+
<td class="type">
|
|
2719
|
+
|
|
2720
|
+
|
|
2721
|
+
<code class="param-type">string</code>
|
|
2722
|
+
|
|
2723
|
+
|
|
2724
|
+
|
|
2725
|
+
</td>
|
|
2726
|
+
|
|
2727
|
+
|
|
2728
|
+
<td class="attributes">
|
|
2729
|
+
|
|
2730
|
+
|
|
2731
|
+
|
|
2732
|
+
|
|
2733
|
+
|
|
2734
|
+
</td>
|
|
2735
|
+
|
|
2736
|
+
|
|
2737
|
+
|
|
2738
|
+
<td class="default">
|
|
2739
|
+
|
|
2740
|
+
</td>
|
|
2741
|
+
|
|
2742
|
+
|
|
2743
|
+
<td class="description last">Set pagination</td>
|
|
2744
|
+
</tr>
|
|
2745
|
+
|
|
2746
|
+
|
|
2747
|
+
|
|
2748
|
+
<tr class="deep-level-1">
|
|
2749
|
+
|
|
2750
|
+
<td class="name"><code>pagination.page</code></td>
|
|
2751
|
+
|
|
2752
|
+
|
|
2753
|
+
<td class="type">
|
|
2754
|
+
|
|
2755
|
+
|
|
2756
|
+
<code class="param-type">number</code>
|
|
2757
|
+
|
|
2758
|
+
|
|
2759
|
+
|
|
2760
|
+
</td>
|
|
2761
|
+
|
|
2762
|
+
|
|
2763
|
+
<td class="attributes">
|
|
2764
|
+
|
|
2765
|
+
<optional><br>
|
|
2766
|
+
|
|
2767
|
+
|
|
2768
|
+
|
|
2769
|
+
|
|
2770
|
+
|
|
2771
|
+
</td>
|
|
2772
|
+
|
|
2773
|
+
|
|
2774
|
+
|
|
2775
|
+
<td class="default">
|
|
2776
|
+
|
|
2777
|
+
1
|
|
2778
|
+
|
|
2779
|
+
</td>
|
|
2780
|
+
|
|
2781
|
+
|
|
2782
|
+
<td class="description last">Page</td>
|
|
2783
|
+
</tr>
|
|
2784
|
+
|
|
2785
|
+
|
|
2786
|
+
|
|
2787
|
+
<tr class="deep-level-1">
|
|
2788
|
+
|
|
2789
|
+
<td class="name"><code>pagination.perPage</code></td>
|
|
2790
|
+
|
|
2791
|
+
|
|
2792
|
+
<td class="type">
|
|
2793
|
+
|
|
2794
|
+
|
|
2795
|
+
<code class="param-type">number</code>
|
|
2796
|
+
|
|
2797
|
+
|
|
2798
|
+
|
|
2799
|
+
</td>
|
|
2800
|
+
|
|
2801
|
+
|
|
2802
|
+
<td class="attributes">
|
|
2803
|
+
|
|
2804
|
+
<optional><br>
|
|
2805
|
+
|
|
2806
|
+
|
|
2807
|
+
|
|
2808
|
+
|
|
2809
|
+
|
|
2810
|
+
</td>
|
|
2811
|
+
|
|
2812
|
+
|
|
2813
|
+
|
|
2814
|
+
<td class="default">
|
|
2815
|
+
|
|
2816
|
+
100
|
|
2817
|
+
|
|
2818
|
+
</td>
|
|
2819
|
+
|
|
2820
|
+
|
|
2821
|
+
<td class="description last">perPage Itens per page</td>
|
|
2822
|
+
</tr>
|
|
2823
|
+
|
|
2824
|
+
|
|
2825
|
+
|
|
2826
|
+
|
|
2827
|
+
|
|
2828
|
+
|
|
2829
|
+
|
|
2830
|
+
<tr class="deep-level-0">
|
|
2831
|
+
|
|
2832
|
+
<td class="name"><code>session</code></td>
|
|
2833
|
+
|
|
2834
|
+
|
|
2835
|
+
<td class="type">
|
|
2836
|
+
|
|
2837
|
+
|
|
2838
|
+
<code class="param-type">string</code>
|
|
2839
|
+
|
|
2840
|
+
|
|
2841
|
+
|
|
2842
|
+
</td>
|
|
2843
|
+
|
|
2844
|
+
|
|
2845
|
+
<td class="attributes">
|
|
2846
|
+
|
|
2847
|
+
|
|
2848
|
+
|
|
2849
|
+
|
|
2850
|
+
|
|
2851
|
+
</td>
|
|
2852
|
+
|
|
2853
|
+
|
|
2854
|
+
|
|
2855
|
+
<td class="default">
|
|
2856
|
+
|
|
2857
|
+
</td>
|
|
2858
|
+
|
|
2859
|
+
|
|
2860
|
+
<td class="description last">Session, token JWT</td>
|
|
2861
|
+
</tr>
|
|
2862
|
+
|
|
2863
|
+
|
|
2864
|
+
|
|
2865
|
+
</tbody>
|
|
2866
|
+
</table>
|
|
2867
|
+
</div>
|
|
2868
|
+
|
|
2869
|
+
|
|
2870
|
+
|
|
2871
|
+
|
|
2872
|
+
|
|
2873
|
+
<dl class="details">
|
|
2874
|
+
|
|
2875
|
+
|
|
2876
|
+
|
|
2877
|
+
|
|
2878
|
+
|
|
2879
|
+
|
|
2880
|
+
|
|
2881
|
+
|
|
2882
|
+
|
|
2883
|
+
|
|
2884
|
+
|
|
2885
|
+
|
|
2886
|
+
|
|
2887
|
+
|
|
2888
|
+
|
|
2889
|
+
|
|
2890
|
+
|
|
2891
|
+
|
|
2892
|
+
<dt class="tag-author">Author:</dt>
|
|
2893
|
+
<dd class="tag-author">
|
|
2894
|
+
<ul>
|
|
2895
|
+
<li><a href="mailto:augusto.pissarra@myndware.com">Myndware</a></li>
|
|
2896
|
+
</ul>
|
|
2897
|
+
</dd>
|
|
2898
|
+
|
|
2899
|
+
|
|
2900
|
+
|
|
2901
|
+
|
|
2902
|
+
|
|
2903
|
+
|
|
2904
|
+
|
|
2905
|
+
|
|
2906
|
+
|
|
2907
|
+
|
|
2908
|
+
|
|
2909
|
+
|
|
2910
|
+
|
|
2911
|
+
|
|
2912
|
+
<p class="tag-source">
|
|
2913
|
+
<a href="user_document.js.html" class="button">View Source</a>
|
|
2914
|
+
<span>
|
|
2915
|
+
<a href="user_document.js.html">user/document.js</a>, <a href="user_document.js.html#line341">line 341</a>
|
|
2916
|
+
</span>
|
|
2917
|
+
</p>
|
|
2918
|
+
|
|
2919
|
+
</dl>
|
|
2920
|
+
|
|
2921
|
+
|
|
2922
|
+
|
|
2923
|
+
|
|
2924
|
+
|
|
2925
|
+
|
|
2926
|
+
|
|
2927
|
+
|
|
2928
|
+
|
|
2929
|
+
|
|
2930
|
+
|
|
2931
|
+
|
|
2932
|
+
|
|
2933
|
+
|
|
2934
|
+
|
|
2935
|
+
|
|
2936
|
+
|
|
2937
|
+
|
|
2938
|
+
<div class='columns method-parameter'>
|
|
2939
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
2940
|
+
<div class="column is-10">
|
|
2941
|
+
|
|
2942
|
+
|
|
2943
|
+
|
|
2944
|
+
<div class="columns">
|
|
2945
|
+
|
|
2946
|
+
|
|
2947
|
+
<div class='column is-5 has-text-left'>
|
|
2948
|
+
<label>Type: </label>
|
|
2949
|
+
|
|
2950
|
+
<code class="param-type">Promise</code>
|
|
2951
|
+
|
|
2952
|
+
|
|
2953
|
+
</div>
|
|
2954
|
+
|
|
2955
|
+
</div>
|
|
2956
|
+
|
|
2957
|
+
|
|
2958
|
+
</div>
|
|
2959
|
+
</div>
|
|
2960
|
+
|
|
2961
|
+
|
|
2962
|
+
|
|
2963
|
+
|
|
2964
|
+
<h5>Example</h5>
|
|
2965
|
+
|
|
2966
|
+
|
|
2967
|
+
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
2968
|
+
const api = new API();
|
|
2969
|
+
const params - {
|
|
2970
|
+
index: 'extraCity',
|
|
2971
|
+
txtToSearch: 'São',
|
|
2972
|
+
docId: '5df7f19618430c89a41a19d2',
|
|
2973
|
+
docAreaId: '5edd11c46b6ce9729c2c297c',
|
|
2974
|
+
tag: 'Nome da cidade',
|
|
2975
|
+
orgId: '1234d01dc4af3941d42f8c5c'
|
|
2976
|
+
};
|
|
2977
|
+
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
2978
|
+
await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
2979
|
+
|
|
2980
|
+
|
|
2981
|
+
|
|
2982
|
+
</div>
|
|
2983
|
+
|
|
2984
|
+
<div class="member">
|
|
2985
|
+
|
|
2986
|
+
|
|
2987
|
+
|
|
2988
|
+
<h4 class="name" id="findById">
|
|
2989
|
+
<a class="href-link" href="#findById">#</a>
|
|
2990
|
+
|
|
2991
|
+
|
|
2992
|
+
<span class='tag'>async</span>
|
|
2993
|
+
|
|
2994
|
+
|
|
2995
|
+
<span class="code-name">
|
|
2996
|
+
|
|
2997
|
+
findById<span class="signature">(id, session)</span><span class="type-signature"> → {Promise}</span>
|
|
2998
|
+
|
|
2999
|
+
</span>
|
|
3000
|
+
</h4>
|
|
3001
|
+
|
|
3002
|
+
|
|
3003
|
+
|
|
3004
|
+
|
|
3005
|
+
<div class="description">
|
|
3006
|
+
Updates a document.
|
|
3007
|
+
IMPORTANT: if your document has a content, it will NOT bring the content.
|
|
3008
|
+
</div>
|
|
3009
|
+
|
|
3010
|
+
|
|
3011
|
+
|
|
3012
|
+
|
|
3013
|
+
|
|
3014
|
+
|
|
3015
|
+
|
|
3016
|
+
|
|
3017
|
+
|
|
3018
|
+
|
|
3019
|
+
<h5>Parameters:</h5>
|
|
3020
|
+
|
|
3021
|
+
<div class="table-container">
|
|
3022
|
+
<table class="params table">
|
|
3023
|
+
<thead>
|
|
3024
|
+
<tr>
|
|
3025
|
+
|
|
3026
|
+
<th>Name</th>
|
|
3027
|
+
|
|
3028
|
+
|
|
3029
|
+
<th>Type</th>
|
|
3030
|
+
|
|
3031
|
+
|
|
3032
|
+
|
|
3033
|
+
|
|
3034
|
+
|
|
3035
|
+
<th class="last">Description</th>
|
|
3036
|
+
</tr>
|
|
3037
|
+
</thead>
|
|
3038
|
+
|
|
3039
|
+
<tbody>
|
|
3040
|
+
|
|
3041
|
+
|
|
3042
|
+
|
|
3043
|
+
<tr class="deep-level-0">
|
|
3044
|
+
|
|
3045
|
+
<td class="name"><code>id</code></td>
|
|
3046
|
+
|
|
3047
|
+
|
|
3048
|
+
<td class="type">
|
|
3049
|
+
|
|
3050
|
+
|
|
3051
|
+
<code class="param-type">string</code>
|
|
3052
|
+
|
|
3053
|
+
|
|
3054
|
+
|
|
3055
|
+
</td>
|
|
3056
|
+
|
|
3057
|
+
|
|
3058
|
+
|
|
3059
|
+
|
|
3060
|
+
|
|
3061
|
+
<td class="description last">Document _id</td>
|
|
3062
|
+
</tr>
|
|
3063
|
+
|
|
3064
|
+
|
|
3065
|
+
|
|
3066
|
+
|
|
3067
|
+
|
|
3068
|
+
<tr class="deep-level-0">
|
|
3069
|
+
|
|
3070
|
+
<td class="name"><code>session</code></td>
|
|
3071
|
+
|
|
3072
|
+
|
|
3073
|
+
<td class="type">
|
|
3074
|
+
|
|
3075
|
+
|
|
3076
|
+
<code class="param-type">string</code>
|
|
3077
|
+
|
|
3078
|
+
|
|
3079
|
+
|
|
3080
|
+
</td>
|
|
3081
|
+
|
|
3082
|
+
|
|
3083
|
+
|
|
3084
|
+
|
|
3085
|
+
|
|
3086
|
+
<td class="description last">Session, token JWT</td>
|
|
3087
|
+
</tr>
|
|
3088
|
+
|
|
3089
|
+
|
|
3090
|
+
|
|
3091
|
+
</tbody>
|
|
3092
|
+
</table>
|
|
3093
|
+
</div>
|
|
3094
|
+
|
|
3095
|
+
|
|
3096
|
+
|
|
3097
|
+
|
|
3098
|
+
|
|
3099
|
+
<dl class="details">
|
|
3100
|
+
|
|
3101
|
+
|
|
3102
|
+
|
|
3103
|
+
|
|
3104
|
+
|
|
3105
|
+
|
|
3106
|
+
|
|
3107
|
+
|
|
3108
|
+
|
|
3109
|
+
|
|
3110
|
+
|
|
3111
|
+
|
|
3112
|
+
|
|
3113
|
+
|
|
3114
|
+
|
|
3115
|
+
|
|
3116
|
+
|
|
3117
|
+
|
|
3118
|
+
<dt class="tag-author">Author:</dt>
|
|
3119
|
+
<dd class="tag-author">
|
|
3120
|
+
<ul>
|
|
3121
|
+
<li><a href="mailto:augusto.pissarra@myndware.com">Myndware</a></li>
|
|
3122
|
+
</ul>
|
|
3123
|
+
</dd>
|
|
3124
|
+
|
|
3125
|
+
|
|
3126
|
+
|
|
3127
|
+
|
|
3128
|
+
|
|
3129
|
+
|
|
3130
|
+
|
|
3131
|
+
|
|
3132
|
+
|
|
3133
|
+
|
|
3134
|
+
|
|
3135
|
+
|
|
3136
|
+
|
|
3137
|
+
|
|
3138
|
+
<p class="tag-source">
|
|
3139
|
+
<a href="user_document.js.html" class="button">View Source</a>
|
|
3140
|
+
<span>
|
|
3141
|
+
<a href="user_document.js.html">user/document.js</a>, <a href="user_document.js.html#line290">line 290</a>
|
|
3142
|
+
</span>
|
|
3143
|
+
</p>
|
|
3144
|
+
|
|
3145
|
+
</dl>
|
|
3146
|
+
|
|
3147
|
+
|
|
3148
|
+
|
|
3149
|
+
|
|
3150
|
+
|
|
3151
|
+
|
|
3152
|
+
|
|
3153
|
+
|
|
3154
|
+
|
|
3155
|
+
|
|
3156
|
+
|
|
3157
|
+
|
|
3158
|
+
|
|
3159
|
+
|
|
3160
|
+
|
|
3161
|
+
|
|
3162
|
+
|
|
3163
|
+
|
|
3164
|
+
<div class='columns method-parameter'>
|
|
3165
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
3166
|
+
<div class="column is-10">
|
|
3167
|
+
|
|
3168
|
+
|
|
3169
|
+
|
|
3170
|
+
<div class="columns">
|
|
3171
|
+
|
|
3172
|
+
|
|
3173
|
+
<div class='column is-5 has-text-left'>
|
|
3174
|
+
<label>Type: </label>
|
|
3175
|
+
|
|
3176
|
+
<code class="param-type">Promise</code>
|
|
3177
|
+
|
|
3178
|
+
|
|
3179
|
+
</div>
|
|
3180
|
+
|
|
3181
|
+
</div>
|
|
3182
|
+
|
|
3183
|
+
|
|
3184
|
+
</div>
|
|
3185
|
+
</div>
|
|
3186
|
+
|
|
3187
|
+
|
|
3188
|
+
|
|
3189
|
+
|
|
3190
|
+
<h5>Example</h5>
|
|
3191
|
+
|
|
3192
|
+
|
|
3193
|
+
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
3194
|
+
const api = new API();
|
|
3195
|
+
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
3196
|
+
await api.user.document.findById('5edf9f8ee896b817e45b8dad', session);</code></pre>
|
|
3197
|
+
|
|
3198
|
+
|
|
3199
|
+
|
|
3200
|
+
</div>
|
|
3201
|
+
|
|
3202
|
+
<div class="member">
|
|
3203
|
+
|
|
3204
|
+
|
|
3205
|
+
|
|
3206
|
+
<h4 class="name" id="findByIdAndRemove">
|
|
3207
|
+
<a class="href-link" href="#findByIdAndRemove">#</a>
|
|
3208
|
+
|
|
3209
|
+
|
|
3210
|
+
<span class='tag'>async</span>
|
|
3211
|
+
|
|
3212
|
+
|
|
3213
|
+
<span class="code-name">
|
|
3214
|
+
|
|
3215
|
+
findByIdAndRemove<span class="signature">(params, session)</span><span class="type-signature"> → {Promise.<object>|number|array.<object>|string|string|string}</span>
|
|
3216
|
+
|
|
3217
|
+
</span>
|
|
3218
|
+
</h4>
|
|
3219
|
+
|
|
2105
3220
|
|
|
2106
|
-
|
|
2107
|
-
|
|
3221
|
+
|
|
3222
|
+
|
|
3223
|
+
<div class="description">
|
|
3224
|
+
Remove document by id
|
|
3225
|
+
</div>
|
|
3226
|
+
|
|
2108
3227
|
|
|
2109
|
-
|
|
2110
|
-
<td class="attributes">
|
|
2111
|
-
|
|
2112
|
-
<optional><br>
|
|
2113
|
-
|
|
2114
3228
|
|
|
2115
|
-
|
|
2116
3229
|
|
|
2117
|
-
|
|
2118
|
-
</td>
|
|
2119
|
-
|
|
2120
3230
|
|
|
2121
|
-
|
|
2122
|
-
<td class="default">
|
|
2123
|
-
|
|
2124
|
-
"Mais+recentes"
|
|
2125
|
-
|
|
2126
|
-
</td>
|
|
2127
|
-
|
|
2128
3231
|
|
|
2129
|
-
<td class="description last">Sort data</td>
|
|
2130
|
-
</tr>
|
|
2131
3232
|
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
<tr class="deep-level-1">
|
|
2135
|
-
|
|
2136
|
-
<td class="name"><code>orgId</code></td>
|
|
2137
|
-
|
|
2138
3233
|
|
|
2139
|
-
<td class="type">
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
<code class="param-type">string</code>
|
|
2143
3234
|
|
|
2144
3235
|
|
|
2145
|
-
|
|
2146
|
-
|
|
3236
|
+
<h5>Parameters:</h5>
|
|
3237
|
+
|
|
3238
|
+
<div class="table-container">
|
|
3239
|
+
<table class="params table">
|
|
3240
|
+
<thead>
|
|
3241
|
+
<tr>
|
|
3242
|
+
|
|
3243
|
+
<th>Name</th>
|
|
3244
|
+
|
|
2147
3245
|
|
|
2148
|
-
|
|
2149
|
-
<td class="attributes">
|
|
2150
|
-
|
|
3246
|
+
<th>Type</th>
|
|
2151
3247
|
|
|
2152
|
-
|
|
3248
|
+
|
|
2153
3249
|
|
|
2154
|
-
|
|
2155
|
-
</td>
|
|
2156
|
-
|
|
3250
|
+
|
|
2157
3251
|
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
</td>
|
|
2162
|
-
|
|
3252
|
+
<th class="last">Description</th>
|
|
3253
|
+
</tr>
|
|
3254
|
+
</thead>
|
|
2163
3255
|
|
|
2164
|
-
|
|
2165
|
-
|
|
3256
|
+
<tbody>
|
|
3257
|
+
|
|
2166
3258
|
|
|
3259
|
+
|
|
3260
|
+
<tr class="deep-level-0">
|
|
2167
3261
|
|
|
2168
|
-
|
|
2169
|
-
<tr class="deep-level-1">
|
|
2170
|
-
|
|
2171
|
-
<td class="name"><code>pagination</code></td>
|
|
3262
|
+
<td class="name"><code>params</code></td>
|
|
2172
3263
|
|
|
2173
3264
|
|
|
2174
3265
|
<td class="type">
|
|
2175
3266
|
|
|
2176
3267
|
|
|
2177
|
-
<code class="param-type">
|
|
3268
|
+
<code class="param-type">object</code>
|
|
2178
3269
|
|
|
2179
3270
|
|
|
2180
3271
|
|
|
2181
3272
|
</td>
|
|
2182
3273
|
|
|
2183
3274
|
|
|
2184
|
-
<td class="attributes">
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
</td>
|
|
2191
|
-
|
|
2192
3275
|
|
|
2193
3276
|
|
|
2194
|
-
<td class="default">
|
|
2195
|
-
|
|
2196
|
-
</td>
|
|
2197
|
-
|
|
2198
3277
|
|
|
2199
|
-
<td class="description last">
|
|
3278
|
+
<td class="description last">Params to remove document</td>
|
|
2200
3279
|
</tr>
|
|
2201
3280
|
|
|
2202
3281
|
|
|
3282
|
+
|
|
2203
3283
|
|
|
2204
3284
|
<tr class="deep-level-1">
|
|
2205
3285
|
|
|
2206
|
-
<td class="name"><code>
|
|
3286
|
+
<td class="name"><code>docId</code></td>
|
|
2207
3287
|
|
|
2208
3288
|
|
|
2209
3289
|
<td class="type">
|
|
2210
3290
|
|
|
2211
3291
|
|
|
2212
|
-
<code class="param-type">
|
|
3292
|
+
<code class="param-type">string</code>
|
|
2213
3293
|
|
|
2214
3294
|
|
|
2215
3295
|
|
|
2216
3296
|
</td>
|
|
2217
3297
|
|
|
2218
3298
|
|
|
2219
|
-
<td class="attributes">
|
|
2220
|
-
|
|
2221
|
-
<optional><br>
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
</td>
|
|
2228
|
-
|
|
2229
3299
|
|
|
2230
3300
|
|
|
2231
|
-
<td class="default">
|
|
2232
|
-
|
|
2233
|
-
1
|
|
2234
|
-
|
|
2235
|
-
</td>
|
|
2236
|
-
|
|
2237
3301
|
|
|
2238
|
-
<td class="description last">
|
|
3302
|
+
<td class="description last">Document Id (_id database)</td>
|
|
2239
3303
|
</tr>
|
|
2240
3304
|
|
|
2241
3305
|
|
|
2242
3306
|
|
|
2243
3307
|
<tr class="deep-level-1">
|
|
2244
3308
|
|
|
2245
|
-
<td class="name"><code>
|
|
3309
|
+
<td class="name"><code>orgId</code></td>
|
|
2246
3310
|
|
|
2247
3311
|
|
|
2248
3312
|
<td class="type">
|
|
2249
3313
|
|
|
2250
3314
|
|
|
2251
|
-
<code class="param-type">
|
|
3315
|
+
<code class="param-type">string</code>
|
|
2252
3316
|
|
|
2253
3317
|
|
|
2254
3318
|
|
|
2255
3319
|
</td>
|
|
2256
3320
|
|
|
2257
3321
|
|
|
2258
|
-
<td class="attributes">
|
|
2259
|
-
|
|
2260
|
-
<optional><br>
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
</td>
|
|
2267
|
-
|
|
2268
3322
|
|
|
2269
3323
|
|
|
2270
|
-
<td class="default">
|
|
2271
|
-
|
|
2272
|
-
100
|
|
2273
|
-
|
|
2274
|
-
</td>
|
|
2275
|
-
|
|
2276
3324
|
|
|
2277
|
-
<td class="description last">
|
|
3325
|
+
<td class="description last">Organizarion id (_id database)</td>
|
|
2278
3326
|
</tr>
|
|
2279
3327
|
|
|
2280
3328
|
|
|
@@ -2298,20 +3346,8 @@ const retDocs = await api.user.document.checkPrimaryKeys(params, session);</code
|
|
|
2298
3346
|
</td>
|
|
2299
3347
|
|
|
2300
3348
|
|
|
2301
|
-
<td class="attributes">
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
</td>
|
|
2308
|
-
|
|
2309
3349
|
|
|
2310
3350
|
|
|
2311
|
-
<td class="default">
|
|
2312
|
-
|
|
2313
|
-
</td>
|
|
2314
|
-
|
|
2315
3351
|
|
|
2316
3352
|
<td class="description last">Session, token JWT</td>
|
|
2317
3353
|
</tr>
|
|
@@ -2368,7 +3404,7 @@ const retDocs = await api.user.document.checkPrimaryKeys(params, session);</code
|
|
|
2368
3404
|
<p class="tag-source">
|
|
2369
3405
|
<a href="user_document.js.html" class="button">View Source</a>
|
|
2370
3406
|
<span>
|
|
2371
|
-
<a href="user_document.js.html">user/document.js</a>, <a href="user_document.js.html#
|
|
3407
|
+
<a href="user_document.js.html">user/document.js</a>, <a href="user_document.js.html#line425">line 425</a>
|
|
2372
3408
|
</span>
|
|
2373
3409
|
</p>
|
|
2374
3410
|
|
|
@@ -2399,11 +3435,103 @@ const retDocs = await api.user.document.checkPrimaryKeys(params, session);</code
|
|
|
2399
3435
|
|
|
2400
3436
|
<div class="columns">
|
|
2401
3437
|
|
|
3438
|
+
<div class='param-desc column is-7'>data The returned data</div>
|
|
3439
|
+
|
|
2402
3440
|
|
|
2403
3441
|
<div class='column is-5 has-text-left'>
|
|
2404
3442
|
<label>Type: </label>
|
|
2405
3443
|
|
|
2406
|
-
<code class="param-type">Promise
|
|
3444
|
+
<code class="param-type">Promise.<object></code>
|
|
3445
|
+
|
|
3446
|
+
|
|
3447
|
+
</div>
|
|
3448
|
+
|
|
3449
|
+
</div>
|
|
3450
|
+
|
|
3451
|
+
|
|
3452
|
+
|
|
3453
|
+
|
|
3454
|
+
<div class="columns">
|
|
3455
|
+
|
|
3456
|
+
<div class='param-desc column is-7'>data.removed The quantity of removed documents</div>
|
|
3457
|
+
|
|
3458
|
+
|
|
3459
|
+
<div class='column is-5 has-text-left'>
|
|
3460
|
+
<label>Type: </label>
|
|
3461
|
+
|
|
3462
|
+
<code class="param-type">number</code>
|
|
3463
|
+
|
|
3464
|
+
|
|
3465
|
+
</div>
|
|
3466
|
+
|
|
3467
|
+
</div>
|
|
3468
|
+
|
|
3469
|
+
|
|
3470
|
+
|
|
3471
|
+
|
|
3472
|
+
<div class="columns">
|
|
3473
|
+
|
|
3474
|
+
<div class='param-desc column is-7'>data.errors Array of errors</div>
|
|
3475
|
+
|
|
3476
|
+
|
|
3477
|
+
<div class='column is-5 has-text-left'>
|
|
3478
|
+
<label>Type: </label>
|
|
3479
|
+
|
|
3480
|
+
<code class="param-type">array.<object></code>
|
|
3481
|
+
|
|
3482
|
+
|
|
3483
|
+
</div>
|
|
3484
|
+
|
|
3485
|
+
</div>
|
|
3486
|
+
|
|
3487
|
+
|
|
3488
|
+
|
|
3489
|
+
|
|
3490
|
+
<div class="columns">
|
|
3491
|
+
|
|
3492
|
+
<div class='param-desc column is-7'>data.errors.id Id of the document that had an error</div>
|
|
3493
|
+
|
|
3494
|
+
|
|
3495
|
+
<div class='column is-5 has-text-left'>
|
|
3496
|
+
<label>Type: </label>
|
|
3497
|
+
|
|
3498
|
+
<code class="param-type">string</code>
|
|
3499
|
+
|
|
3500
|
+
|
|
3501
|
+
</div>
|
|
3502
|
+
|
|
3503
|
+
</div>
|
|
3504
|
+
|
|
3505
|
+
|
|
3506
|
+
|
|
3507
|
+
|
|
3508
|
+
<div class="columns">
|
|
3509
|
+
|
|
3510
|
+
<div class='param-desc column is-7'>data.errors.code Error code</div>
|
|
3511
|
+
|
|
3512
|
+
|
|
3513
|
+
<div class='column is-5 has-text-left'>
|
|
3514
|
+
<label>Type: </label>
|
|
3515
|
+
|
|
3516
|
+
<code class="param-type">string</code>
|
|
3517
|
+
|
|
3518
|
+
|
|
3519
|
+
</div>
|
|
3520
|
+
|
|
3521
|
+
</div>
|
|
3522
|
+
|
|
3523
|
+
|
|
3524
|
+
|
|
3525
|
+
|
|
3526
|
+
<div class="columns">
|
|
3527
|
+
|
|
3528
|
+
<div class='param-desc column is-7'>data.errors.message Error message</div>
|
|
3529
|
+
|
|
3530
|
+
|
|
3531
|
+
<div class='column is-5 has-text-left'>
|
|
3532
|
+
<label>Type: </label>
|
|
3533
|
+
|
|
3534
|
+
<code class="param-type">string</code>
|
|
2407
3535
|
|
|
2408
3536
|
|
|
2409
3537
|
</div>
|
|
@@ -2419,16 +3547,12 @@ const retDocs = await api.user.document.checkPrimaryKeys(params, session);</code
|
|
|
2419
3547
|
|
|
2420
3548
|
<h5>Example</h5>
|
|
2421
3549
|
|
|
2422
|
-
|
|
2423
|
-
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
2424
|
-
const api = new API();
|
|
2425
|
-
const params - {
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
docId: '5df7f19618430c89a41a19d2',
|
|
2429
|
-
docAreaId: '5edd11c46b6ce9729c2c297c',
|
|
2430
|
-
tag: 'Nome da cidade',
|
|
2431
|
-
orgId: '1234d01dc4af3941d42f8c5c'
|
|
3550
|
+
|
|
3551
|
+
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
3552
|
+
const api = new API();
|
|
3553
|
+
const params - {
|
|
3554
|
+
docId: '5dadd01dc4af3941d42f8c5c',
|
|
3555
|
+
orgId '5df7f19618430c89a41a19d2',
|
|
2432
3556
|
};
|
|
2433
3557
|
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
2434
3558
|
await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
@@ -2441,8 +3565,8 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
2441
3565
|
|
|
2442
3566
|
|
|
2443
3567
|
|
|
2444
|
-
<h4 class="name" id="
|
|
2445
|
-
<a class="href-link" href="#
|
|
3568
|
+
<h4 class="name" id="findByIdAndUpdate">
|
|
3569
|
+
<a class="href-link" href="#findByIdAndUpdate">#</a>
|
|
2446
3570
|
|
|
2447
3571
|
|
|
2448
3572
|
<span class='tag'>async</span>
|
|
@@ -2450,7 +3574,7 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
2450
3574
|
|
|
2451
3575
|
<span class="code-name">
|
|
2452
3576
|
|
|
2453
|
-
|
|
3577
|
+
findByIdAndUpdate<span class="signature">(id, params, session)</span><span class="type-signature"> → {Promise}</span>
|
|
2454
3578
|
|
|
2455
3579
|
</span>
|
|
2456
3580
|
</h4>
|
|
@@ -2459,8 +3583,7 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
2459
3583
|
|
|
2460
3584
|
|
|
2461
3585
|
<div class="description">
|
|
2462
|
-
Updates a document
|
|
2463
|
-
IMPORTANT: if your document has a content, it will NOT bring the content.
|
|
3586
|
+
Updates a document
|
|
2464
3587
|
</div>
|
|
2465
3588
|
|
|
2466
3589
|
|
|
@@ -2521,6 +3644,31 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
2521
3644
|
|
|
2522
3645
|
|
|
2523
3646
|
|
|
3647
|
+
<tr class="deep-level-0">
|
|
3648
|
+
|
|
3649
|
+
<td class="name"><code>params</code></td>
|
|
3650
|
+
|
|
3651
|
+
|
|
3652
|
+
<td class="type">
|
|
3653
|
+
|
|
3654
|
+
|
|
3655
|
+
<code class="param-type">object</code>
|
|
3656
|
+
|
|
3657
|
+
|
|
3658
|
+
|
|
3659
|
+
</td>
|
|
3660
|
+
|
|
3661
|
+
|
|
3662
|
+
|
|
3663
|
+
|
|
3664
|
+
|
|
3665
|
+
<td class="description last">Object for document payload to update. It has to be the FULL document data, that you can get with findById</td>
|
|
3666
|
+
</tr>
|
|
3667
|
+
|
|
3668
|
+
|
|
3669
|
+
|
|
3670
|
+
|
|
3671
|
+
|
|
2524
3672
|
<tr class="deep-level-0">
|
|
2525
3673
|
|
|
2526
3674
|
<td class="name"><code>session</code></td>
|
|
@@ -2594,7 +3742,7 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
2594
3742
|
<p class="tag-source">
|
|
2595
3743
|
<a href="user_document.js.html" class="button">View Source</a>
|
|
2596
3744
|
<span>
|
|
2597
|
-
<a href="user_document.js.html">user/document.js</a>, <a href="user_document.js.html#
|
|
3745
|
+
<a href="user_document.js.html">user/document.js</a>, <a href="user_document.js.html#line258">line 258</a>
|
|
2598
3746
|
</span>
|
|
2599
3747
|
</p>
|
|
2600
3748
|
|
|
@@ -2648,8 +3796,9 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
2648
3796
|
|
|
2649
3797
|
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
2650
3798
|
const api = new API();
|
|
3799
|
+
const params = { ... };
|
|
2651
3800
|
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
2652
|
-
await api.user.document.
|
|
3801
|
+
await api.user.document.findByIdAndUpdate('5edf9f8ee896b817e45b8dad', params, session);</code></pre>
|
|
2653
3802
|
|
|
2654
3803
|
|
|
2655
3804
|
|
|
@@ -2659,8 +3808,8 @@ await api.user.document.findById('5edf9f8ee896b817e45b8dad', session);</code></p
|
|
|
2659
3808
|
|
|
2660
3809
|
|
|
2661
3810
|
|
|
2662
|
-
<h4 class="name" id="
|
|
2663
|
-
<a class="href-link" href="#
|
|
3811
|
+
<h4 class="name" id="findByIdsAndRemove">
|
|
3812
|
+
<a class="href-link" href="#findByIdsAndRemove">#</a>
|
|
2664
3813
|
|
|
2665
3814
|
|
|
2666
3815
|
<span class='tag'>async</span>
|
|
@@ -2668,7 +3817,7 @@ await api.user.document.findById('5edf9f8ee896b817e45b8dad', session);</code></p
|
|
|
2668
3817
|
|
|
2669
3818
|
<span class="code-name">
|
|
2670
3819
|
|
|
2671
|
-
|
|
3820
|
+
findByIdsAndRemove<span class="signature">(params, session)</span><span class="type-signature"> → {Promise.<object>|number|array.<object>|string|string|string}</span>
|
|
2672
3821
|
|
|
2673
3822
|
</span>
|
|
2674
3823
|
</h4>
|
|
@@ -2677,7 +3826,7 @@ await api.user.document.findById('5edf9f8ee896b817e45b8dad', session);</code></p
|
|
|
2677
3826
|
|
|
2678
3827
|
|
|
2679
3828
|
<div class="description">
|
|
2680
|
-
Remove
|
|
3829
|
+
Remove documents
|
|
2681
3830
|
</div>
|
|
2682
3831
|
|
|
2683
3832
|
|
|
@@ -2739,13 +3888,13 @@ await api.user.document.findById('5edf9f8ee896b817e45b8dad', session);</code></p
|
|
|
2739
3888
|
|
|
2740
3889
|
<tr class="deep-level-1">
|
|
2741
3890
|
|
|
2742
|
-
<td class="name"><code>
|
|
3891
|
+
<td class="name"><code>documents</code></td>
|
|
2743
3892
|
|
|
2744
3893
|
|
|
2745
3894
|
<td class="type">
|
|
2746
3895
|
|
|
2747
3896
|
|
|
2748
|
-
<code class="param-type">string
|
|
3897
|
+
<code class="param-type">array.<string></code>
|
|
2749
3898
|
|
|
2750
3899
|
|
|
2751
3900
|
|
|
@@ -2755,7 +3904,30 @@ await api.user.document.findById('5edf9f8ee896b817e45b8dad', session);</code></p
|
|
|
2755
3904
|
|
|
2756
3905
|
|
|
2757
3906
|
|
|
2758
|
-
<td class="description last">
|
|
3907
|
+
<td class="description last">An array ids of documents (_id database)</td>
|
|
3908
|
+
</tr>
|
|
3909
|
+
|
|
3910
|
+
|
|
3911
|
+
|
|
3912
|
+
<tr class="deep-level-1">
|
|
3913
|
+
|
|
3914
|
+
<td class="name"><code>documents._id</code></td>
|
|
3915
|
+
|
|
3916
|
+
|
|
3917
|
+
<td class="type">
|
|
3918
|
+
|
|
3919
|
+
|
|
3920
|
+
<code class="param-type">array.<string></code>
|
|
3921
|
+
|
|
3922
|
+
|
|
3923
|
+
|
|
3924
|
+
</td>
|
|
3925
|
+
|
|
3926
|
+
|
|
3927
|
+
|
|
3928
|
+
|
|
3929
|
+
|
|
3930
|
+
<td class="description last">The document id (_id database)</td>
|
|
2759
3931
|
</tr>
|
|
2760
3932
|
|
|
2761
3933
|
|
|
@@ -2860,7 +4032,7 @@ await api.user.document.findById('5edf9f8ee896b817e45b8dad', session);</code></p
|
|
|
2860
4032
|
<p class="tag-source">
|
|
2861
4033
|
<a href="user_document.js.html" class="button">View Source</a>
|
|
2862
4034
|
<span>
|
|
2863
|
-
<a href="user_document.js.html">user/document.js</a>, <a href="user_document.js.html#
|
|
4035
|
+
<a href="user_document.js.html">user/document.js</a>, <a href="user_document.js.html#line470">line 470</a>
|
|
2864
4036
|
</span>
|
|
2865
4037
|
</p>
|
|
2866
4038
|
|
|
@@ -3007,11 +4179,11 @@ await api.user.document.findById('5edf9f8ee896b817e45b8dad', session);</code></p
|
|
|
3007
4179
|
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
3008
4180
|
const api = new API();
|
|
3009
4181
|
const params - {
|
|
3010
|
-
|
|
3011
|
-
orgId '5df7f19618430c89a41a19d2',
|
|
4182
|
+
documents: [{ _id: '5dadd01dc4af3941d42f8c5c' }],
|
|
4183
|
+
orgId: '5df7f19618430c89a41a19d2',
|
|
3012
4184
|
};
|
|
3013
4185
|
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
3014
|
-
await api.user.document.
|
|
4186
|
+
await api.user.document.findByIdsAndRemove(params, session);</code></pre>
|
|
3015
4187
|
|
|
3016
4188
|
|
|
3017
4189
|
|
|
@@ -3021,8 +4193,8 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
3021
4193
|
|
|
3022
4194
|
|
|
3023
4195
|
|
|
3024
|
-
<h4 class="name" id="
|
|
3025
|
-
<a class="href-link" href="#
|
|
4196
|
+
<h4 class="name" id="performDownloadComplete">
|
|
4197
|
+
<a class="href-link" href="#performDownloadComplete">#</a>
|
|
3026
4198
|
|
|
3027
4199
|
|
|
3028
4200
|
<span class='tag'>async</span>
|
|
@@ -3030,7 +4202,7 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
3030
4202
|
|
|
3031
4203
|
<span class="code-name">
|
|
3032
4204
|
|
|
3033
|
-
|
|
4205
|
+
performDownloadComplete<span class="signature">(params, session)</span><span class="type-signature"> → {promise}</span>
|
|
3034
4206
|
|
|
3035
4207
|
</span>
|
|
3036
4208
|
</h4>
|
|
@@ -3039,7 +4211,7 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
3039
4211
|
|
|
3040
4212
|
|
|
3041
4213
|
<div class="description">
|
|
3042
|
-
|
|
4214
|
+
Method to perform download complete for all pages
|
|
3043
4215
|
</div>
|
|
3044
4216
|
|
|
3045
4217
|
|
|
@@ -3077,13 +4249,13 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
3077
4249
|
|
|
3078
4250
|
<tr class="deep-level-0">
|
|
3079
4251
|
|
|
3080
|
-
<td class="name"><code>
|
|
4252
|
+
<td class="name"><code>params</code></td>
|
|
3081
4253
|
|
|
3082
4254
|
|
|
3083
4255
|
<td class="type">
|
|
3084
4256
|
|
|
3085
4257
|
|
|
3086
|
-
<code class="param-type">
|
|
4258
|
+
<code class="param-type">object</code>
|
|
3087
4259
|
|
|
3088
4260
|
|
|
3089
4261
|
|
|
@@ -3093,16 +4265,38 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
3093
4265
|
|
|
3094
4266
|
|
|
3095
4267
|
|
|
3096
|
-
<td class="description last">
|
|
4268
|
+
<td class="description last">Params to perform download complete for all pages</td>
|
|
3097
4269
|
</tr>
|
|
3098
4270
|
|
|
4271
|
+
|
|
4272
|
+
|
|
4273
|
+
|
|
4274
|
+
<tr class="deep-level-1">
|
|
4275
|
+
|
|
4276
|
+
<td class="name"><code>data</code></td>
|
|
4277
|
+
|
|
4278
|
+
|
|
4279
|
+
<td class="type">
|
|
4280
|
+
|
|
4281
|
+
|
|
4282
|
+
<code class="param-type">object</code>
|
|
3099
4283
|
|
|
3100
|
-
|
|
3101
4284
|
|
|
3102
|
-
|
|
3103
|
-
<tr class="deep-level-0">
|
|
3104
4285
|
|
|
3105
|
-
|
|
4286
|
+
</td>
|
|
4287
|
+
|
|
4288
|
+
|
|
4289
|
+
|
|
4290
|
+
|
|
4291
|
+
|
|
4292
|
+
<td class="description last">data to be send to download</td>
|
|
4293
|
+
</tr>
|
|
4294
|
+
|
|
4295
|
+
|
|
4296
|
+
|
|
4297
|
+
<tr class="deep-level-1">
|
|
4298
|
+
|
|
4299
|
+
<td class="name"><code>query</code></td>
|
|
3106
4300
|
|
|
3107
4301
|
|
|
3108
4302
|
<td class="type">
|
|
@@ -3118,9 +4312,34 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
3118
4312
|
|
|
3119
4313
|
|
|
3120
4314
|
|
|
3121
|
-
<td class="description last">
|
|
4315
|
+
<td class="description last">perform download complete for all pages query</td>
|
|
3122
4316
|
</tr>
|
|
3123
4317
|
|
|
4318
|
+
|
|
4319
|
+
|
|
4320
|
+
<tr class="deep-level-1">
|
|
4321
|
+
|
|
4322
|
+
<td class="name"><code>orgId</code></td>
|
|
4323
|
+
|
|
4324
|
+
|
|
4325
|
+
<td class="type">
|
|
4326
|
+
|
|
4327
|
+
|
|
4328
|
+
<code class="param-type">object</code>
|
|
4329
|
+
|
|
4330
|
+
|
|
4331
|
+
|
|
4332
|
+
</td>
|
|
4333
|
+
|
|
4334
|
+
|
|
4335
|
+
|
|
4336
|
+
|
|
4337
|
+
|
|
4338
|
+
<td class="description last">Organization id (_id database)</td>
|
|
4339
|
+
</tr>
|
|
4340
|
+
|
|
4341
|
+
|
|
4342
|
+
|
|
3124
4343
|
|
|
3125
4344
|
|
|
3126
4345
|
|
|
@@ -3198,7 +4417,7 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
3198
4417
|
<p class="tag-source">
|
|
3199
4418
|
<a href="user_document.js.html" class="button">View Source</a>
|
|
3200
4419
|
<span>
|
|
3201
|
-
<a href="user_document.js.html">user/document.js</a>, <a href="user_document.js.html#
|
|
4420
|
+
<a href="user_document.js.html">user/document.js</a>, <a href="user_document.js.html#line916">line 916</a>
|
|
3202
4421
|
</span>
|
|
3203
4422
|
</p>
|
|
3204
4423
|
|
|
@@ -3229,11 +4448,13 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
3229
4448
|
|
|
3230
4449
|
<div class="columns">
|
|
3231
4450
|
|
|
4451
|
+
<div class='param-desc column is-7'>returned data from the perform download complete for all pages</div>
|
|
4452
|
+
|
|
3232
4453
|
|
|
3233
4454
|
<div class='column is-5 has-text-left'>
|
|
3234
4455
|
<label>Type: </label>
|
|
3235
4456
|
|
|
3236
|
-
<code class="param-type">
|
|
4457
|
+
<code class="param-type">promise</code>
|
|
3237
4458
|
|
|
3238
4459
|
|
|
3239
4460
|
</div>
|
|
@@ -3252,9 +4473,21 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
3252
4473
|
|
|
3253
4474
|
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
3254
4475
|
const api = new API();
|
|
3255
|
-
const params = {
|
|
4476
|
+
const params = {
|
|
4477
|
+
query: {p: 20, i: 1, s: 'Mais recentes', as: '', m: 'w', ai: '57e6a3bd6be6b45210833fae'},
|
|
4478
|
+
orgId: '55e4a3bd6be6b45210833fae',
|
|
4479
|
+
data: {
|
|
4480
|
+
destAws = {
|
|
4481
|
+
destAwsKey: '',
|
|
4482
|
+
destAwsSecret: '',
|
|
4483
|
+
destAwsBucket: '',
|
|
4484
|
+
destAwsRegion: ''
|
|
4485
|
+
},
|
|
4486
|
+
maxFileSize: ''
|
|
4487
|
+
}
|
|
4488
|
+
};
|
|
3256
4489
|
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
3257
|
-
await api.user.document.
|
|
4490
|
+
const retSearch = await api.user.document.performDownloadComplete(params, session);</code></pre>
|
|
3258
4491
|
|
|
3259
4492
|
|
|
3260
4493
|
|
|
@@ -3264,8 +4497,8 @@ await api.user.document.findByIdAndUpdate('5edf9f8ee896b817e45b8dad', params, se
|
|
|
3264
4497
|
|
|
3265
4498
|
|
|
3266
4499
|
|
|
3267
|
-
<h4 class="name" id="
|
|
3268
|
-
<a class="href-link" href="#
|
|
4500
|
+
<h4 class="name" id="searchDocuments">
|
|
4501
|
+
<a class="href-link" href="#searchDocuments">#</a>
|
|
3269
4502
|
|
|
3270
4503
|
|
|
3271
4504
|
<span class='tag'>async</span>
|
|
@@ -3273,7 +4506,7 @@ await api.user.document.findByIdAndUpdate('5edf9f8ee896b817e45b8dad', params, se
|
|
|
3273
4506
|
|
|
3274
4507
|
<span class="code-name">
|
|
3275
4508
|
|
|
3276
|
-
|
|
4509
|
+
searchDocuments<span class="signature">(params, session)</span><span class="type-signature"> → {promise|number|array.<object>|number|number}</span>
|
|
3277
4510
|
|
|
3278
4511
|
</span>
|
|
3279
4512
|
</h4>
|
|
@@ -3282,7 +4515,7 @@ await api.user.document.findByIdAndUpdate('5edf9f8ee896b817e45b8dad', params, se
|
|
|
3282
4515
|
|
|
3283
4516
|
|
|
3284
4517
|
<div class="description">
|
|
3285
|
-
|
|
4518
|
+
Method to search documents for
|
|
3286
4519
|
</div>
|
|
3287
4520
|
|
|
3288
4521
|
|
|
@@ -3336,7 +4569,7 @@ await api.user.document.findByIdAndUpdate('5edf9f8ee896b817e45b8dad', params, se
|
|
|
3336
4569
|
|
|
3337
4570
|
|
|
3338
4571
|
|
|
3339
|
-
<td class="description last">Params to
|
|
4572
|
+
<td class="description last">Params to search the documents</td>
|
|
3340
4573
|
</tr>
|
|
3341
4574
|
|
|
3342
4575
|
|
|
@@ -3344,36 +4577,13 @@ await api.user.document.findByIdAndUpdate('5edf9f8ee896b817e45b8dad', params, se
|
|
|
3344
4577
|
|
|
3345
4578
|
<tr class="deep-level-1">
|
|
3346
4579
|
|
|
3347
|
-
<td class="name"><code>
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
<td class="type">
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
<code class="param-type">array.<string></code>
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
</td>
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
<td class="description last">An array ids of documents (_id database)</td>
|
|
3364
|
-
</tr>
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
<tr class="deep-level-1">
|
|
3369
|
-
|
|
3370
|
-
<td class="name"><code>documents._id</code></td>
|
|
4580
|
+
<td class="name"><code>query</code></td>
|
|
3371
4581
|
|
|
3372
4582
|
|
|
3373
4583
|
<td class="type">
|
|
3374
4584
|
|
|
3375
4585
|
|
|
3376
|
-
<code class="param-type">
|
|
4586
|
+
<code class="param-type">object</code>
|
|
3377
4587
|
|
|
3378
4588
|
|
|
3379
4589
|
|
|
@@ -3383,7 +4593,7 @@ await api.user.document.findByIdAndUpdate('5edf9f8ee896b817e45b8dad', params, se
|
|
|
3383
4593
|
|
|
3384
4594
|
|
|
3385
4595
|
|
|
3386
|
-
<td class="description last">
|
|
4596
|
+
<td class="description last">Search documents query</td>
|
|
3387
4597
|
</tr>
|
|
3388
4598
|
|
|
3389
4599
|
|
|
@@ -3396,7 +4606,7 @@ await api.user.document.findByIdAndUpdate('5edf9f8ee896b817e45b8dad', params, se
|
|
|
3396
4606
|
<td class="type">
|
|
3397
4607
|
|
|
3398
4608
|
|
|
3399
|
-
<code class="param-type">
|
|
4609
|
+
<code class="param-type">object</code>
|
|
3400
4610
|
|
|
3401
4611
|
|
|
3402
4612
|
|
|
@@ -3406,7 +4616,7 @@ await api.user.document.findByIdAndUpdate('5edf9f8ee896b817e45b8dad', params, se
|
|
|
3406
4616
|
|
|
3407
4617
|
|
|
3408
4618
|
|
|
3409
|
-
<td class="description last">
|
|
4619
|
+
<td class="description last">Organization id (_id database)</td>
|
|
3410
4620
|
</tr>
|
|
3411
4621
|
|
|
3412
4622
|
|
|
@@ -3488,7 +4698,7 @@ await api.user.document.findByIdAndUpdate('5edf9f8ee896b817e45b8dad', params, se
|
|
|
3488
4698
|
<p class="tag-source">
|
|
3489
4699
|
<a href="user_document.js.html" class="button">View Source</a>
|
|
3490
4700
|
<span>
|
|
3491
|
-
<a href="user_document.js.html">user/document.js</a>, <a href="user_document.js.html#
|
|
4701
|
+
<a href="user_document.js.html">user/document.js</a>, <a href="user_document.js.html#line786">line 786</a>
|
|
3492
4702
|
</span>
|
|
3493
4703
|
</p>
|
|
3494
4704
|
|
|
@@ -3519,13 +4729,13 @@ await api.user.document.findByIdAndUpdate('5edf9f8ee896b817e45b8dad', params, se
|
|
|
3519
4729
|
|
|
3520
4730
|
<div class="columns">
|
|
3521
4731
|
|
|
3522
|
-
<div class='param-desc column is-7'>data
|
|
4732
|
+
<div class='param-desc column is-7'>returned data from the search</div>
|
|
3523
4733
|
|
|
3524
4734
|
|
|
3525
4735
|
<div class='column is-5 has-text-left'>
|
|
3526
4736
|
<label>Type: </label>
|
|
3527
4737
|
|
|
3528
|
-
<code class="param-type">
|
|
4738
|
+
<code class="param-type">promise</code>
|
|
3529
4739
|
|
|
3530
4740
|
|
|
3531
4741
|
</div>
|
|
@@ -3537,7 +4747,7 @@ await api.user.document.findByIdAndUpdate('5edf9f8ee896b817e45b8dad', params, se
|
|
|
3537
4747
|
|
|
3538
4748
|
<div class="columns">
|
|
3539
4749
|
|
|
3540
|
-
<div class='param-desc column is-7'>
|
|
4750
|
+
<div class='param-desc column is-7'>count the count of items searched</div>
|
|
3541
4751
|
|
|
3542
4752
|
|
|
3543
4753
|
<div class='column is-5 has-text-left'>
|
|
@@ -3555,7 +4765,7 @@ await api.user.document.findByIdAndUpdate('5edf9f8ee896b817e45b8dad', params, se
|
|
|
3555
4765
|
|
|
3556
4766
|
<div class="columns">
|
|
3557
4767
|
|
|
3558
|
-
<div class='param-desc column is-7'>
|
|
4768
|
+
<div class='param-desc column is-7'>items the items returned from search</div>
|
|
3559
4769
|
|
|
3560
4770
|
|
|
3561
4771
|
<div class='column is-5 has-text-left'>
|
|
@@ -3573,31 +4783,13 @@ await api.user.document.findByIdAndUpdate('5edf9f8ee896b817e45b8dad', params, se
|
|
|
3573
4783
|
|
|
3574
4784
|
<div class="columns">
|
|
3575
4785
|
|
|
3576
|
-
<div class='param-desc column is-7'>
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
<div class='column is-5 has-text-left'>
|
|
3580
|
-
<label>Type: </label>
|
|
3581
|
-
|
|
3582
|
-
<code class="param-type">string</code>
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
</div>
|
|
3586
|
-
|
|
3587
|
-
</div>
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
<div class="columns">
|
|
3593
|
-
|
|
3594
|
-
<div class='param-desc column is-7'>data.errors.code Error code</div>
|
|
4786
|
+
<div class='param-desc column is-7'>took the number of documents taken</div>
|
|
3595
4787
|
|
|
3596
4788
|
|
|
3597
4789
|
<div class='column is-5 has-text-left'>
|
|
3598
4790
|
<label>Type: </label>
|
|
3599
4791
|
|
|
3600
|
-
<code class="param-type">
|
|
4792
|
+
<code class="param-type">number</code>
|
|
3601
4793
|
|
|
3602
4794
|
|
|
3603
4795
|
</div>
|
|
@@ -3609,13 +4801,13 @@ await api.user.document.findByIdAndUpdate('5edf9f8ee896b817e45b8dad', params, se
|
|
|
3609
4801
|
|
|
3610
4802
|
<div class="columns">
|
|
3611
4803
|
|
|
3612
|
-
<div class='param-desc column is-7'>
|
|
4804
|
+
<div class='param-desc column is-7'>totalCount the total count of all documents</div>
|
|
3613
4805
|
|
|
3614
4806
|
|
|
3615
4807
|
<div class='column is-5 has-text-left'>
|
|
3616
4808
|
<label>Type: </label>
|
|
3617
4809
|
|
|
3618
|
-
<code class="param-type">
|
|
4810
|
+
<code class="param-type">number</code>
|
|
3619
4811
|
|
|
3620
4812
|
|
|
3621
4813
|
</div>
|
|
@@ -3634,12 +4826,12 @@ await api.user.document.findByIdAndUpdate('5edf9f8ee896b817e45b8dad', params, se
|
|
|
3634
4826
|
|
|
3635
4827
|
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
3636
4828
|
const api = new API();
|
|
3637
|
-
const params
|
|
3638
|
-
|
|
3639
|
-
orgId: '
|
|
4829
|
+
const params = {
|
|
4830
|
+
query: {p: 20, i: 1, s: 'Mais recentes', as: '', m: 'w', ai: '57e6a3bd6be6b45210833fae'},
|
|
4831
|
+
orgId: '55e4a3bd6be6b45210833fae',
|
|
3640
4832
|
};
|
|
3641
4833
|
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
3642
|
-
await api.user.document.
|
|
4834
|
+
const retSearch = await api.user.document.searchDocuments(params, session);</code></pre>
|
|
3643
4835
|
|
|
3644
4836
|
|
|
3645
4837
|
|
|
@@ -3649,8 +4841,8 @@ await api.user.document.findByIdsAndRemove(params, session);</code></pre>
|
|
|
3649
4841
|
|
|
3650
4842
|
|
|
3651
4843
|
|
|
3652
|
-
<h4 class="name" id="
|
|
3653
|
-
<a class="href-link" href="#
|
|
4844
|
+
<h4 class="name" id="searchDocumentsMongo">
|
|
4845
|
+
<a class="href-link" href="#searchDocumentsMongo">#</a>
|
|
3654
4846
|
|
|
3655
4847
|
|
|
3656
4848
|
<span class='tag'>async</span>
|
|
@@ -3658,7 +4850,7 @@ await api.user.document.findByIdsAndRemove(params, session);</code></pre>
|
|
|
3658
4850
|
|
|
3659
4851
|
<span class="code-name">
|
|
3660
4852
|
|
|
3661
|
-
|
|
4853
|
+
searchDocumentsMongo<span class="signature">(params, session)</span><span class="type-signature"> → {promise|number|array.<object>|number|number}</span>
|
|
3662
4854
|
|
|
3663
4855
|
</span>
|
|
3664
4856
|
</h4>
|
|
@@ -3667,7 +4859,7 @@ await api.user.document.findByIdsAndRemove(params, session);</code></pre>
|
|
|
3667
4859
|
|
|
3668
4860
|
|
|
3669
4861
|
<div class="description">
|
|
3670
|
-
Method to search documents
|
|
4862
|
+
Method to search documents direct on MongoDB (use carefully and only in cases you need to access direct data
|
|
3671
4863
|
</div>
|
|
3672
4864
|
|
|
3673
4865
|
|
|
@@ -3850,7 +5042,7 @@ await api.user.document.findByIdsAndRemove(params, session);</code></pre>
|
|
|
3850
5042
|
<p class="tag-source">
|
|
3851
5043
|
<a href="user_document.js.html" class="button">View Source</a>
|
|
3852
5044
|
<span>
|
|
3853
|
-
<a href="user_document.js.html">user/document.js</a>, <a href="user_document.js.html#
|
|
5045
|
+
<a href="user_document.js.html">user/document.js</a>, <a href="user_document.js.html#line961">line 961</a>
|
|
3854
5046
|
</span>
|
|
3855
5047
|
</p>
|
|
3856
5048
|
|
|
@@ -3983,7 +5175,7 @@ const params = {
|
|
|
3983
5175
|
orgId: '55e4a3bd6be6b45210833fae',
|
|
3984
5176
|
};
|
|
3985
5177
|
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
3986
|
-
const retSearch = await api.user.document.
|
|
5178
|
+
const retSearch = await api.user.document.searchDocumentsMongo(params, session);</code></pre>
|
|
3987
5179
|
|
|
3988
5180
|
|
|
3989
5181
|
|