@docbrasil/api-systemmanager 1.1.25 → 1.1.27
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 +131 -0
- package/dist/bundle.cjs +171 -0
- package/dist/bundle.mjs +1 -1
- package/doc/api.md +132 -0
- package/docs/Chart.html +296 -0
- package/docs/Dashboard.html +2 -2
- package/docs/Documents.html +1291 -443
- package/docs/user_dashboard.js.html +41 -1
- package/docs/user_document.js.html +131 -0
- package/package.json +1 -1
package/docs/Documents.html
CHANGED
|
@@ -1743,6 +1743,550 @@ const retDocs = await api.user.document.checkPrimaryKeys(params, session);</code
|
|
|
1743
1743
|
|
|
1744
1744
|
|
|
1745
1745
|
|
|
1746
|
+
</div>
|
|
1747
|
+
|
|
1748
|
+
<div class="member">
|
|
1749
|
+
|
|
1750
|
+
|
|
1751
|
+
|
|
1752
|
+
<h4 class="name" id="exportExcelForAllPages">
|
|
1753
|
+
<a class="href-link" href="#exportExcelForAllPages">#</a>
|
|
1754
|
+
|
|
1755
|
+
|
|
1756
|
+
<span class='tag'>async</span>
|
|
1757
|
+
|
|
1758
|
+
|
|
1759
|
+
<span class="code-name">
|
|
1760
|
+
|
|
1761
|
+
exportExcelForAllPages<span class="signature">(params, session)</span><span class="type-signature"> → {promise}</span>
|
|
1762
|
+
|
|
1763
|
+
</span>
|
|
1764
|
+
</h4>
|
|
1765
|
+
|
|
1766
|
+
|
|
1767
|
+
|
|
1768
|
+
|
|
1769
|
+
<div class="description">
|
|
1770
|
+
Method to export excel for all pages
|
|
1771
|
+
</div>
|
|
1772
|
+
|
|
1773
|
+
|
|
1774
|
+
|
|
1775
|
+
|
|
1776
|
+
|
|
1777
|
+
|
|
1778
|
+
|
|
1779
|
+
|
|
1780
|
+
|
|
1781
|
+
|
|
1782
|
+
<h5>Parameters:</h5>
|
|
1783
|
+
|
|
1784
|
+
<div class="table-container">
|
|
1785
|
+
<table class="params table">
|
|
1786
|
+
<thead>
|
|
1787
|
+
<tr>
|
|
1788
|
+
|
|
1789
|
+
<th>Name</th>
|
|
1790
|
+
|
|
1791
|
+
|
|
1792
|
+
<th>Type</th>
|
|
1793
|
+
|
|
1794
|
+
|
|
1795
|
+
|
|
1796
|
+
|
|
1797
|
+
|
|
1798
|
+
<th class="last">Description</th>
|
|
1799
|
+
</tr>
|
|
1800
|
+
</thead>
|
|
1801
|
+
|
|
1802
|
+
<tbody>
|
|
1803
|
+
|
|
1804
|
+
|
|
1805
|
+
|
|
1806
|
+
<tr class="deep-level-0">
|
|
1807
|
+
|
|
1808
|
+
<td class="name"><code>params</code></td>
|
|
1809
|
+
|
|
1810
|
+
|
|
1811
|
+
<td class="type">
|
|
1812
|
+
|
|
1813
|
+
|
|
1814
|
+
<code class="param-type">object</code>
|
|
1815
|
+
|
|
1816
|
+
|
|
1817
|
+
|
|
1818
|
+
</td>
|
|
1819
|
+
|
|
1820
|
+
|
|
1821
|
+
|
|
1822
|
+
|
|
1823
|
+
|
|
1824
|
+
<td class="description last">Params to export excel for all pages</td>
|
|
1825
|
+
</tr>
|
|
1826
|
+
|
|
1827
|
+
|
|
1828
|
+
|
|
1829
|
+
|
|
1830
|
+
<tr class="deep-level-1">
|
|
1831
|
+
|
|
1832
|
+
<td class="name"><code>query</code></td>
|
|
1833
|
+
|
|
1834
|
+
|
|
1835
|
+
<td class="type">
|
|
1836
|
+
|
|
1837
|
+
|
|
1838
|
+
<code class="param-type">object</code>
|
|
1839
|
+
|
|
1840
|
+
|
|
1841
|
+
|
|
1842
|
+
</td>
|
|
1843
|
+
|
|
1844
|
+
|
|
1845
|
+
|
|
1846
|
+
|
|
1847
|
+
|
|
1848
|
+
<td class="description last">Export excel for all pages query</td>
|
|
1849
|
+
</tr>
|
|
1850
|
+
|
|
1851
|
+
|
|
1852
|
+
|
|
1853
|
+
<tr class="deep-level-1">
|
|
1854
|
+
|
|
1855
|
+
<td class="name"><code>orgId</code></td>
|
|
1856
|
+
|
|
1857
|
+
|
|
1858
|
+
<td class="type">
|
|
1859
|
+
|
|
1860
|
+
|
|
1861
|
+
<code class="param-type">object</code>
|
|
1862
|
+
|
|
1863
|
+
|
|
1864
|
+
|
|
1865
|
+
</td>
|
|
1866
|
+
|
|
1867
|
+
|
|
1868
|
+
|
|
1869
|
+
|
|
1870
|
+
|
|
1871
|
+
<td class="description last">Organization id (_id database)</td>
|
|
1872
|
+
</tr>
|
|
1873
|
+
|
|
1874
|
+
|
|
1875
|
+
|
|
1876
|
+
|
|
1877
|
+
|
|
1878
|
+
|
|
1879
|
+
|
|
1880
|
+
<tr class="deep-level-0">
|
|
1881
|
+
|
|
1882
|
+
<td class="name"><code>session</code></td>
|
|
1883
|
+
|
|
1884
|
+
|
|
1885
|
+
<td class="type">
|
|
1886
|
+
|
|
1887
|
+
|
|
1888
|
+
<code class="param-type">string</code>
|
|
1889
|
+
|
|
1890
|
+
|
|
1891
|
+
|
|
1892
|
+
</td>
|
|
1893
|
+
|
|
1894
|
+
|
|
1895
|
+
|
|
1896
|
+
|
|
1897
|
+
|
|
1898
|
+
<td class="description last">Session, token JWT</td>
|
|
1899
|
+
</tr>
|
|
1900
|
+
|
|
1901
|
+
|
|
1902
|
+
|
|
1903
|
+
</tbody>
|
|
1904
|
+
</table>
|
|
1905
|
+
</div>
|
|
1906
|
+
|
|
1907
|
+
|
|
1908
|
+
|
|
1909
|
+
|
|
1910
|
+
|
|
1911
|
+
<dl class="details">
|
|
1912
|
+
|
|
1913
|
+
|
|
1914
|
+
|
|
1915
|
+
|
|
1916
|
+
|
|
1917
|
+
|
|
1918
|
+
|
|
1919
|
+
|
|
1920
|
+
|
|
1921
|
+
|
|
1922
|
+
|
|
1923
|
+
|
|
1924
|
+
|
|
1925
|
+
|
|
1926
|
+
|
|
1927
|
+
|
|
1928
|
+
|
|
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
|
+
|
|
1937
|
+
|
|
1938
|
+
|
|
1939
|
+
|
|
1940
|
+
|
|
1941
|
+
|
|
1942
|
+
|
|
1943
|
+
|
|
1944
|
+
|
|
1945
|
+
|
|
1946
|
+
|
|
1947
|
+
|
|
1948
|
+
|
|
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>
|
|
1958
|
+
|
|
1959
|
+
|
|
1960
|
+
|
|
1961
|
+
|
|
1962
|
+
|
|
1963
|
+
|
|
1964
|
+
|
|
1965
|
+
|
|
1966
|
+
|
|
1967
|
+
|
|
1968
|
+
|
|
1969
|
+
|
|
1970
|
+
|
|
1971
|
+
|
|
1972
|
+
|
|
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">
|
|
1983
|
+
|
|
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>
|
|
1991
|
+
|
|
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
|
+
|
|
1746
2290
|
</div>
|
|
1747
2291
|
|
|
1748
2292
|
<div class="member">
|
|
@@ -1775,43 +2319,188 @@ const retDocs = await api.user.document.checkPrimaryKeys(params, session);</code
|
|
|
1775
2319
|
|
|
1776
2320
|
|
|
1777
2321
|
|
|
1778
|
-
<h5>Parameters:</h5>
|
|
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
|
+
|
|
1779
2494
|
|
|
1780
|
-
<
|
|
1781
|
-
<table class="params table">
|
|
1782
|
-
<thead>
|
|
1783
|
-
<tr>
|
|
1784
|
-
|
|
1785
|
-
<th>Name</th>
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
<th>Type</th>
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
<th>Attributes</th>
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
<th>Default</th>
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
<th class="last">Description</th>
|
|
1799
|
-
</tr>
|
|
1800
|
-
</thead>
|
|
1801
|
-
|
|
1802
|
-
<tbody>
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
<tr class="deep-level-0">
|
|
2495
|
+
<tr class="deep-level-1">
|
|
1807
2496
|
|
|
1808
|
-
<td class="name"><code>
|
|
2497
|
+
<td class="name"><code>docId</code></td>
|
|
1809
2498
|
|
|
1810
2499
|
|
|
1811
2500
|
<td class="type">
|
|
1812
2501
|
|
|
1813
2502
|
|
|
1814
|
-
<code class="param-type">
|
|
2503
|
+
<code class="param-type">string</code>
|
|
1815
2504
|
|
|
1816
2505
|
|
|
1817
2506
|
|
|
@@ -1833,15 +2522,14 @@ const retDocs = await api.user.document.checkPrimaryKeys(params, session);</code
|
|
|
1833
2522
|
</td>
|
|
1834
2523
|
|
|
1835
2524
|
|
|
1836
|
-
<td class="description last">
|
|
2525
|
+
<td class="description last">Document id for serach</td>
|
|
1837
2526
|
</tr>
|
|
1838
2527
|
|
|
1839
2528
|
|
|
1840
|
-
|
|
1841
2529
|
|
|
1842
2530
|
<tr class="deep-level-1">
|
|
1843
2531
|
|
|
1844
|
-
<td class="name"><code>
|
|
2532
|
+
<td class="name"><code>docAreaId</code></td>
|
|
1845
2533
|
|
|
1846
2534
|
|
|
1847
2535
|
<td class="type">
|
|
@@ -1869,14 +2557,14 @@ const retDocs = await api.user.document.checkPrimaryKeys(params, session);</code
|
|
|
1869
2557
|
</td>
|
|
1870
2558
|
|
|
1871
2559
|
|
|
1872
|
-
<td class="description last">
|
|
2560
|
+
<td class="description last">Doc area id</td>
|
|
1873
2561
|
</tr>
|
|
1874
2562
|
|
|
1875
2563
|
|
|
1876
2564
|
|
|
1877
2565
|
<tr class="deep-level-1">
|
|
1878
2566
|
|
|
1879
|
-
<td class="name"><code>
|
|
2567
|
+
<td class="name"><code>tag</code></td>
|
|
1880
2568
|
|
|
1881
2569
|
|
|
1882
2570
|
<td class="type">
|
|
@@ -1904,14 +2592,14 @@ const retDocs = await api.user.document.checkPrimaryKeys(params, session);</code
|
|
|
1904
2592
|
</td>
|
|
1905
2593
|
|
|
1906
2594
|
|
|
1907
|
-
<td class="description last">
|
|
2595
|
+
<td class="description last">Tag of the document</td>
|
|
1908
2596
|
</tr>
|
|
1909
2597
|
|
|
1910
2598
|
|
|
1911
2599
|
|
|
1912
2600
|
<tr class="deep-level-1">
|
|
1913
2601
|
|
|
1914
|
-
<td class="name"><code>
|
|
2602
|
+
<td class="name"><code>projection</code></td>
|
|
1915
2603
|
|
|
1916
2604
|
|
|
1917
2605
|
<td class="type">
|
|
@@ -1938,19 +2626,19 @@ const retDocs = await api.user.document.checkPrimaryKeys(params, session);</code
|
|
|
1938
2626
|
|
|
1939
2627
|
<td class="default">
|
|
1940
2628
|
|
|
1941
|
-
|
|
2629
|
+
""
|
|
1942
2630
|
|
|
1943
2631
|
</td>
|
|
1944
2632
|
|
|
1945
2633
|
|
|
1946
|
-
<td class="description last">
|
|
2634
|
+
<td class="description last">Projection to return fields</td>
|
|
1947
2635
|
</tr>
|
|
1948
2636
|
|
|
1949
2637
|
|
|
1950
2638
|
|
|
1951
2639
|
<tr class="deep-level-1">
|
|
1952
2640
|
|
|
1953
|
-
<td class="name"><code>
|
|
2641
|
+
<td class="name"><code>sort</code></td>
|
|
1954
2642
|
|
|
1955
2643
|
|
|
1956
2644
|
<td class="type">
|
|
@@ -1965,6 +2653,8 @@ const retDocs = await api.user.document.checkPrimaryKeys(params, session);</code
|
|
|
1965
2653
|
|
|
1966
2654
|
<td class="attributes">
|
|
1967
2655
|
|
|
2656
|
+
<optional><br>
|
|
2657
|
+
|
|
1968
2658
|
|
|
1969
2659
|
|
|
1970
2660
|
|
|
@@ -1975,17 +2665,19 @@ const retDocs = await api.user.document.checkPrimaryKeys(params, session);</code
|
|
|
1975
2665
|
|
|
1976
2666
|
<td class="default">
|
|
1977
2667
|
|
|
2668
|
+
"Mais+recentes"
|
|
2669
|
+
|
|
1978
2670
|
</td>
|
|
1979
2671
|
|
|
1980
2672
|
|
|
1981
|
-
<td class="description last">
|
|
2673
|
+
<td class="description last">Sort data</td>
|
|
1982
2674
|
</tr>
|
|
1983
2675
|
|
|
1984
2676
|
|
|
1985
2677
|
|
|
1986
2678
|
<tr class="deep-level-1">
|
|
1987
2679
|
|
|
1988
|
-
<td class="name"><code>
|
|
2680
|
+
<td class="name"><code>orgId</code></td>
|
|
1989
2681
|
|
|
1990
2682
|
|
|
1991
2683
|
<td class="type">
|
|
@@ -2013,14 +2705,14 @@ const retDocs = await api.user.document.checkPrimaryKeys(params, session);</code
|
|
|
2013
2705
|
</td>
|
|
2014
2706
|
|
|
2015
2707
|
|
|
2016
|
-
<td class="description last">
|
|
2708
|
+
<td class="description last">Organization id (_id database)</td>
|
|
2017
2709
|
</tr>
|
|
2018
2710
|
|
|
2019
2711
|
|
|
2020
2712
|
|
|
2021
2713
|
<tr class="deep-level-1">
|
|
2022
2714
|
|
|
2023
|
-
<td class="name"><code>
|
|
2715
|
+
<td class="name"><code>pagination</code></td>
|
|
2024
2716
|
|
|
2025
2717
|
|
|
2026
2718
|
<td class="type">
|
|
@@ -2048,20 +2740,20 @@ const retDocs = await api.user.document.checkPrimaryKeys(params, session);</code
|
|
|
2048
2740
|
</td>
|
|
2049
2741
|
|
|
2050
2742
|
|
|
2051
|
-
<td class="description last">
|
|
2743
|
+
<td class="description last">Set pagination</td>
|
|
2052
2744
|
</tr>
|
|
2053
2745
|
|
|
2054
2746
|
|
|
2055
2747
|
|
|
2056
2748
|
<tr class="deep-level-1">
|
|
2057
2749
|
|
|
2058
|
-
<td class="name"><code>
|
|
2750
|
+
<td class="name"><code>pagination.page</code></td>
|
|
2059
2751
|
|
|
2060
2752
|
|
|
2061
2753
|
<td class="type">
|
|
2062
2754
|
|
|
2063
2755
|
|
|
2064
|
-
<code class="param-type">
|
|
2756
|
+
<code class="param-type">number</code>
|
|
2065
2757
|
|
|
2066
2758
|
|
|
2067
2759
|
|
|
@@ -2082,25 +2774,25 @@ const retDocs = await api.user.document.checkPrimaryKeys(params, session);</code
|
|
|
2082
2774
|
|
|
2083
2775
|
<td class="default">
|
|
2084
2776
|
|
|
2085
|
-
|
|
2777
|
+
1
|
|
2086
2778
|
|
|
2087
2779
|
</td>
|
|
2088
2780
|
|
|
2089
2781
|
|
|
2090
|
-
<td class="description last">
|
|
2782
|
+
<td class="description last">Page</td>
|
|
2091
2783
|
</tr>
|
|
2092
2784
|
|
|
2093
2785
|
|
|
2094
2786
|
|
|
2095
2787
|
<tr class="deep-level-1">
|
|
2096
2788
|
|
|
2097
|
-
<td class="name"><code>
|
|
2789
|
+
<td class="name"><code>pagination.perPage</code></td>
|
|
2098
2790
|
|
|
2099
2791
|
|
|
2100
2792
|
<td class="type">
|
|
2101
2793
|
|
|
2102
2794
|
|
|
2103
|
-
<code class="param-type">
|
|
2795
|
+
<code class="param-type">number</code>
|
|
2104
2796
|
|
|
2105
2797
|
|
|
2106
2798
|
|
|
@@ -2121,19 +2813,23 @@ const retDocs = await api.user.document.checkPrimaryKeys(params, session);</code
|
|
|
2121
2813
|
|
|
2122
2814
|
<td class="default">
|
|
2123
2815
|
|
|
2124
|
-
|
|
2816
|
+
100
|
|
2125
2817
|
|
|
2126
2818
|
</td>
|
|
2127
2819
|
|
|
2128
2820
|
|
|
2129
|
-
<td class="description last">
|
|
2821
|
+
<td class="description last">perPage Itens per page</td>
|
|
2130
2822
|
</tr>
|
|
2131
2823
|
|
|
2132
2824
|
|
|
2133
|
-
|
|
2134
|
-
|
|
2825
|
+
|
|
2826
|
+
|
|
2827
|
+
|
|
2828
|
+
|
|
2829
|
+
|
|
2830
|
+
<tr class="deep-level-0">
|
|
2135
2831
|
|
|
2136
|
-
<td class="name"><code>
|
|
2832
|
+
<td class="name"><code>session</code></td>
|
|
2137
2833
|
|
|
2138
2834
|
|
|
2139
2835
|
<td class="type">
|
|
@@ -2161,124 +2857,210 @@ const retDocs = await api.user.document.checkPrimaryKeys(params, session);</code
|
|
|
2161
2857
|
</td>
|
|
2162
2858
|
|
|
2163
2859
|
|
|
2164
|
-
<td class="description last">
|
|
2860
|
+
<td class="description last">Session, token JWT</td>
|
|
2165
2861
|
</tr>
|
|
2166
2862
|
|
|
2167
|
-
|
|
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>
|
|
2168
3009
|
|
|
2169
|
-
<tr class="deep-level-1">
|
|
2170
|
-
|
|
2171
|
-
<td class="name"><code>pagination</code></td>
|
|
2172
|
-
|
|
2173
3010
|
|
|
2174
|
-
<td class="type">
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
<code class="param-type">string</code>
|
|
2178
3011
|
|
|
2179
3012
|
|
|
2180
|
-
|
|
2181
|
-
</td>
|
|
2182
3013
|
|
|
2183
|
-
|
|
2184
|
-
<td class="attributes">
|
|
2185
|
-
|
|
2186
3014
|
|
|
2187
|
-
|
|
2188
3015
|
|
|
2189
|
-
|
|
2190
|
-
</td>
|
|
2191
|
-
|
|
2192
3016
|
|
|
2193
|
-
|
|
2194
|
-
<td class="default">
|
|
2195
|
-
|
|
2196
|
-
</td>
|
|
2197
|
-
|
|
2198
3017
|
|
|
2199
|
-
<td class="description last">Set pagination</td>
|
|
2200
|
-
</tr>
|
|
2201
3018
|
|
|
2202
|
-
|
|
3019
|
+
<h5>Parameters:</h5>
|
|
2203
3020
|
|
|
2204
|
-
<
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
<code class="param-type">number</code>
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
</td>
|
|
3021
|
+
<div class="table-container">
|
|
3022
|
+
<table class="params table">
|
|
3023
|
+
<thead>
|
|
3024
|
+
<tr>
|
|
3025
|
+
|
|
3026
|
+
<th>Name</th>
|
|
3027
|
+
|
|
2217
3028
|
|
|
2218
|
-
|
|
2219
|
-
<td class="attributes">
|
|
2220
|
-
|
|
2221
|
-
<optional><br>
|
|
2222
|
-
|
|
3029
|
+
<th>Type</th>
|
|
2223
3030
|
|
|
2224
|
-
|
|
3031
|
+
|
|
2225
3032
|
|
|
2226
|
-
|
|
2227
|
-
</td>
|
|
2228
|
-
|
|
3033
|
+
|
|
2229
3034
|
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
1
|
|
2234
|
-
|
|
2235
|
-
</td>
|
|
2236
|
-
|
|
3035
|
+
<th class="last">Description</th>
|
|
3036
|
+
</tr>
|
|
3037
|
+
</thead>
|
|
2237
3038
|
|
|
2238
|
-
|
|
2239
|
-
|
|
3039
|
+
<tbody>
|
|
3040
|
+
|
|
2240
3041
|
|
|
3042
|
+
|
|
3043
|
+
<tr class="deep-level-0">
|
|
2241
3044
|
|
|
2242
|
-
|
|
2243
|
-
<tr class="deep-level-1">
|
|
2244
|
-
|
|
2245
|
-
<td class="name"><code>pagination.perPage</code></td>
|
|
3045
|
+
<td class="name"><code>id</code></td>
|
|
2246
3046
|
|
|
2247
3047
|
|
|
2248
3048
|
<td class="type">
|
|
2249
3049
|
|
|
2250
3050
|
|
|
2251
|
-
<code class="param-type">
|
|
3051
|
+
<code class="param-type">string</code>
|
|
2252
3052
|
|
|
2253
3053
|
|
|
2254
3054
|
|
|
2255
3055
|
</td>
|
|
2256
3056
|
|
|
2257
3057
|
|
|
2258
|
-
<td class="attributes">
|
|
2259
|
-
|
|
2260
|
-
<optional><br>
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
</td>
|
|
2267
|
-
|
|
2268
3058
|
|
|
2269
3059
|
|
|
2270
|
-
<td class="default">
|
|
2271
|
-
|
|
2272
|
-
100
|
|
2273
|
-
|
|
2274
|
-
</td>
|
|
2275
|
-
|
|
2276
3060
|
|
|
2277
|
-
<td class="description last">
|
|
3061
|
+
<td class="description last">Document _id</td>
|
|
2278
3062
|
</tr>
|
|
2279
3063
|
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
3064
|
|
|
2283
3065
|
|
|
2284
3066
|
|
|
@@ -2298,20 +3080,8 @@ const retDocs = await api.user.document.checkPrimaryKeys(params, session);</code
|
|
|
2298
3080
|
</td>
|
|
2299
3081
|
|
|
2300
3082
|
|
|
2301
|
-
<td class="attributes">
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
</td>
|
|
2308
|
-
|
|
2309
3083
|
|
|
2310
3084
|
|
|
2311
|
-
<td class="default">
|
|
2312
|
-
|
|
2313
|
-
</td>
|
|
2314
|
-
|
|
2315
3085
|
|
|
2316
3086
|
<td class="description last">Session, token JWT</td>
|
|
2317
3087
|
</tr>
|
|
@@ -2368,7 +3138,7 @@ const retDocs = await api.user.document.checkPrimaryKeys(params, session);</code
|
|
|
2368
3138
|
<p class="tag-source">
|
|
2369
3139
|
<a href="user_document.js.html" class="button">View Source</a>
|
|
2370
3140
|
<span>
|
|
2371
|
-
<a href="user_document.js.html">user/document.js</a>, <a href="user_document.js.html#
|
|
3141
|
+
<a href="user_document.js.html">user/document.js</a>, <a href="user_document.js.html#line290">line 290</a>
|
|
2372
3142
|
</span>
|
|
2373
3143
|
</p>
|
|
2374
3144
|
|
|
@@ -2422,16 +3192,8 @@ const retDocs = await api.user.document.checkPrimaryKeys(params, session);</code
|
|
|
2422
3192
|
|
|
2423
3193
|
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
2424
3194
|
const api = new API();
|
|
2425
|
-
const params - {
|
|
2426
|
-
index: 'extraCity',
|
|
2427
|
-
txtToSearch: 'São',
|
|
2428
|
-
docId: '5df7f19618430c89a41a19d2',
|
|
2429
|
-
docAreaId: '5edd11c46b6ce9729c2c297c',
|
|
2430
|
-
tag: 'Nome da cidade',
|
|
2431
|
-
orgId: '1234d01dc4af3941d42f8c5c'
|
|
2432
|
-
};
|
|
2433
3195
|
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
2434
|
-
await api.user.document.
|
|
3196
|
+
await api.user.document.findById('5edf9f8ee896b817e45b8dad', session);</code></pre>
|
|
2435
3197
|
|
|
2436
3198
|
|
|
2437
3199
|
|
|
@@ -2441,8 +3203,8 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
2441
3203
|
|
|
2442
3204
|
|
|
2443
3205
|
|
|
2444
|
-
<h4 class="name" id="
|
|
2445
|
-
<a class="href-link" href="#
|
|
3206
|
+
<h4 class="name" id="findByIdAndRemove">
|
|
3207
|
+
<a class="href-link" href="#findByIdAndRemove">#</a>
|
|
2446
3208
|
|
|
2447
3209
|
|
|
2448
3210
|
<span class='tag'>async</span>
|
|
@@ -2450,7 +3212,7 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
2450
3212
|
|
|
2451
3213
|
<span class="code-name">
|
|
2452
3214
|
|
|
2453
|
-
|
|
3215
|
+
findByIdAndRemove<span class="signature">(params, session)</span><span class="type-signature"> → {Promise.<object>|number|array.<object>|string|string|string}</span>
|
|
2454
3216
|
|
|
2455
3217
|
</span>
|
|
2456
3218
|
</h4>
|
|
@@ -2459,8 +3221,7 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
2459
3221
|
|
|
2460
3222
|
|
|
2461
3223
|
<div class="description">
|
|
2462
|
-
|
|
2463
|
-
IMPORTANT: if your document has a content, it will NOT bring the content.
|
|
3224
|
+
Remove document by id
|
|
2464
3225
|
</div>
|
|
2465
3226
|
|
|
2466
3227
|
|
|
@@ -2498,7 +3259,31 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
2498
3259
|
|
|
2499
3260
|
<tr class="deep-level-0">
|
|
2500
3261
|
|
|
2501
|
-
<td class="name"><code>
|
|
3262
|
+
<td class="name"><code>params</code></td>
|
|
3263
|
+
|
|
3264
|
+
|
|
3265
|
+
<td class="type">
|
|
3266
|
+
|
|
3267
|
+
|
|
3268
|
+
<code class="param-type">object</code>
|
|
3269
|
+
|
|
3270
|
+
|
|
3271
|
+
|
|
3272
|
+
</td>
|
|
3273
|
+
|
|
3274
|
+
|
|
3275
|
+
|
|
3276
|
+
|
|
3277
|
+
|
|
3278
|
+
<td class="description last">Params to remove document</td>
|
|
3279
|
+
</tr>
|
|
3280
|
+
|
|
3281
|
+
|
|
3282
|
+
|
|
3283
|
+
|
|
3284
|
+
<tr class="deep-level-1">
|
|
3285
|
+
|
|
3286
|
+
<td class="name"><code>docId</code></td>
|
|
2502
3287
|
|
|
2503
3288
|
|
|
2504
3289
|
<td class="type">
|
|
@@ -2514,9 +3299,34 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
2514
3299
|
|
|
2515
3300
|
|
|
2516
3301
|
|
|
2517
|
-
<td class="description last">Document _id</td>
|
|
3302
|
+
<td class="description last">Document Id (_id database)</td>
|
|
3303
|
+
</tr>
|
|
3304
|
+
|
|
3305
|
+
|
|
3306
|
+
|
|
3307
|
+
<tr class="deep-level-1">
|
|
3308
|
+
|
|
3309
|
+
<td class="name"><code>orgId</code></td>
|
|
3310
|
+
|
|
3311
|
+
|
|
3312
|
+
<td class="type">
|
|
3313
|
+
|
|
3314
|
+
|
|
3315
|
+
<code class="param-type">string</code>
|
|
3316
|
+
|
|
3317
|
+
|
|
3318
|
+
|
|
3319
|
+
</td>
|
|
3320
|
+
|
|
3321
|
+
|
|
3322
|
+
|
|
3323
|
+
|
|
3324
|
+
|
|
3325
|
+
<td class="description last">Organizarion id (_id database)</td>
|
|
2518
3326
|
</tr>
|
|
2519
3327
|
|
|
3328
|
+
|
|
3329
|
+
|
|
2520
3330
|
|
|
2521
3331
|
|
|
2522
3332
|
|
|
@@ -2594,7 +3404,7 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
2594
3404
|
<p class="tag-source">
|
|
2595
3405
|
<a href="user_document.js.html" class="button">View Source</a>
|
|
2596
3406
|
<span>
|
|
2597
|
-
<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>
|
|
2598
3408
|
</span>
|
|
2599
3409
|
</p>
|
|
2600
3410
|
|
|
@@ -2617,19 +3427,111 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
2617
3427
|
|
|
2618
3428
|
|
|
2619
3429
|
|
|
2620
|
-
<div class='columns method-parameter'>
|
|
2621
|
-
<div class="column is-2"><label>Returns:</label></div>
|
|
2622
|
-
<div class="column is-10">
|
|
2623
|
-
|
|
3430
|
+
<div class='columns method-parameter'>
|
|
3431
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
3432
|
+
<div class="column is-10">
|
|
3433
|
+
|
|
3434
|
+
|
|
3435
|
+
|
|
3436
|
+
<div class="columns">
|
|
3437
|
+
|
|
3438
|
+
<div class='param-desc column is-7'>data The returned data</div>
|
|
3439
|
+
|
|
3440
|
+
|
|
3441
|
+
<div class='column is-5 has-text-left'>
|
|
3442
|
+
<label>Type: </label>
|
|
3443
|
+
|
|
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
|
+
|
|
2624
3524
|
|
|
2625
3525
|
|
|
2626
3526
|
<div class="columns">
|
|
2627
3527
|
|
|
3528
|
+
<div class='param-desc column is-7'>data.errors.message Error message</div>
|
|
3529
|
+
|
|
2628
3530
|
|
|
2629
3531
|
<div class='column is-5 has-text-left'>
|
|
2630
3532
|
<label>Type: </label>
|
|
2631
3533
|
|
|
2632
|
-
<code class="param-type">
|
|
3534
|
+
<code class="param-type">string</code>
|
|
2633
3535
|
|
|
2634
3536
|
|
|
2635
3537
|
</div>
|
|
@@ -2648,8 +3550,12 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
2648
3550
|
|
|
2649
3551
|
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
2650
3552
|
const api = new API();
|
|
3553
|
+
const params - {
|
|
3554
|
+
docId: '5dadd01dc4af3941d42f8c5c',
|
|
3555
|
+
orgId '5df7f19618430c89a41a19d2',
|
|
3556
|
+
};
|
|
2651
3557
|
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
2652
|
-
await api.user.document.
|
|
3558
|
+
await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
2653
3559
|
|
|
2654
3560
|
|
|
2655
3561
|
|
|
@@ -2659,8 +3565,8 @@ await api.user.document.findById('5edf9f8ee896b817e45b8dad', session);</code></p
|
|
|
2659
3565
|
|
|
2660
3566
|
|
|
2661
3567
|
|
|
2662
|
-
<h4 class="name" id="
|
|
2663
|
-
<a class="href-link" href="#
|
|
3568
|
+
<h4 class="name" id="findByIdAndUpdate">
|
|
3569
|
+
<a class="href-link" href="#findByIdAndUpdate">#</a>
|
|
2664
3570
|
|
|
2665
3571
|
|
|
2666
3572
|
<span class='tag'>async</span>
|
|
@@ -2668,7 +3574,7 @@ await api.user.document.findById('5edf9f8ee896b817e45b8dad', session);</code></p
|
|
|
2668
3574
|
|
|
2669
3575
|
<span class="code-name">
|
|
2670
3576
|
|
|
2671
|
-
|
|
3577
|
+
findByIdAndUpdate<span class="signature">(id, params, session)</span><span class="type-signature"> → {Promise}</span>
|
|
2672
3578
|
|
|
2673
3579
|
</span>
|
|
2674
3580
|
</h4>
|
|
@@ -2677,7 +3583,7 @@ await api.user.document.findById('5edf9f8ee896b817e45b8dad', session);</code></p
|
|
|
2677
3583
|
|
|
2678
3584
|
|
|
2679
3585
|
<div class="description">
|
|
2680
|
-
|
|
3586
|
+
Updates a document
|
|
2681
3587
|
</div>
|
|
2682
3588
|
|
|
2683
3589
|
|
|
@@ -2715,13 +3621,13 @@ await api.user.document.findById('5edf9f8ee896b817e45b8dad', session);</code></p
|
|
|
2715
3621
|
|
|
2716
3622
|
<tr class="deep-level-0">
|
|
2717
3623
|
|
|
2718
|
-
<td class="name"><code>
|
|
3624
|
+
<td class="name"><code>id</code></td>
|
|
2719
3625
|
|
|
2720
3626
|
|
|
2721
3627
|
<td class="type">
|
|
2722
3628
|
|
|
2723
3629
|
|
|
2724
|
-
<code class="param-type">
|
|
3630
|
+
<code class="param-type">string</code>
|
|
2725
3631
|
|
|
2726
3632
|
|
|
2727
3633
|
|
|
@@ -2731,44 +3637,22 @@ await api.user.document.findById('5edf9f8ee896b817e45b8dad', session);</code></p
|
|
|
2731
3637
|
|
|
2732
3638
|
|
|
2733
3639
|
|
|
2734
|
-
<td class="description last">
|
|
3640
|
+
<td class="description last">Document _id</td>
|
|
2735
3641
|
</tr>
|
|
2736
3642
|
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
<tr class="deep-level-1">
|
|
2741
|
-
|
|
2742
|
-
<td class="name"><code>docId</code></td>
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
<td class="type">
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
<code class="param-type">string</code>
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
</td>
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
3643
|
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
<td class="description last">Document Id (_id database)</td>
|
|
2759
|
-
</tr>
|
|
3644
|
+
|
|
2760
3645
|
|
|
3646
|
+
|
|
3647
|
+
<tr class="deep-level-0">
|
|
2761
3648
|
|
|
2762
|
-
|
|
2763
|
-
<tr class="deep-level-1">
|
|
2764
|
-
|
|
2765
|
-
<td class="name"><code>orgId</code></td>
|
|
3649
|
+
<td class="name"><code>params</code></td>
|
|
2766
3650
|
|
|
2767
3651
|
|
|
2768
3652
|
<td class="type">
|
|
2769
3653
|
|
|
2770
3654
|
|
|
2771
|
-
<code class="param-type">
|
|
3655
|
+
<code class="param-type">object</code>
|
|
2772
3656
|
|
|
2773
3657
|
|
|
2774
3658
|
|
|
@@ -2778,11 +3662,9 @@ await api.user.document.findById('5edf9f8ee896b817e45b8dad', session);</code></p
|
|
|
2778
3662
|
|
|
2779
3663
|
|
|
2780
3664
|
|
|
2781
|
-
<td class="description last">
|
|
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>
|
|
2782
3666
|
</tr>
|
|
2783
3667
|
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
3668
|
|
|
2787
3669
|
|
|
2788
3670
|
|
|
@@ -2860,7 +3742,7 @@ await api.user.document.findById('5edf9f8ee896b817e45b8dad', session);</code></p
|
|
|
2860
3742
|
<p class="tag-source">
|
|
2861
3743
|
<a href="user_document.js.html" class="button">View Source</a>
|
|
2862
3744
|
<span>
|
|
2863
|
-
<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>
|
|
2864
3746
|
</span>
|
|
2865
3747
|
</p>
|
|
2866
3748
|
|
|
@@ -2891,103 +3773,11 @@ await api.user.document.findById('5edf9f8ee896b817e45b8dad', session);</code></p
|
|
|
2891
3773
|
|
|
2892
3774
|
<div class="columns">
|
|
2893
3775
|
|
|
2894
|
-
<div class='param-desc column is-7'>data The returned data</div>
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
<div class='column is-5 has-text-left'>
|
|
2898
|
-
<label>Type: </label>
|
|
2899
|
-
|
|
2900
|
-
<code class="param-type">Promise.<object></code>
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
</div>
|
|
2904
|
-
|
|
2905
|
-
</div>
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
<div class="columns">
|
|
2911
|
-
|
|
2912
|
-
<div class='param-desc column is-7'>data.removed The quantity of removed documents</div>
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
<div class='column is-5 has-text-left'>
|
|
2916
|
-
<label>Type: </label>
|
|
2917
|
-
|
|
2918
|
-
<code class="param-type">number</code>
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
</div>
|
|
2922
|
-
|
|
2923
|
-
</div>
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
<div class="columns">
|
|
2929
|
-
|
|
2930
|
-
<div class='param-desc column is-7'>data.errors Array of errors</div>
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
<div class='column is-5 has-text-left'>
|
|
2934
|
-
<label>Type: </label>
|
|
2935
|
-
|
|
2936
|
-
<code class="param-type">array.<object></code>
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
</div>
|
|
2940
|
-
|
|
2941
|
-
</div>
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
<div class="columns">
|
|
2947
|
-
|
|
2948
|
-
<div class='param-desc column is-7'>data.errors.id Id of the document that had an error</div>
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
<div class='column is-5 has-text-left'>
|
|
2952
|
-
<label>Type: </label>
|
|
2953
|
-
|
|
2954
|
-
<code class="param-type">string</code>
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
</div>
|
|
2958
|
-
|
|
2959
|
-
</div>
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
<div class="columns">
|
|
2965
|
-
|
|
2966
|
-
<div class='param-desc column is-7'>data.errors.code Error code</div>
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
<div class='column is-5 has-text-left'>
|
|
2970
|
-
<label>Type: </label>
|
|
2971
|
-
|
|
2972
|
-
<code class="param-type">string</code>
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
</div>
|
|
2976
|
-
|
|
2977
|
-
</div>
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
<div class="columns">
|
|
2983
|
-
|
|
2984
|
-
<div class='param-desc column is-7'>data.errors.message Error message</div>
|
|
2985
|
-
|
|
2986
3776
|
|
|
2987
3777
|
<div class='column is-5 has-text-left'>
|
|
2988
3778
|
<label>Type: </label>
|
|
2989
3779
|
|
|
2990
|
-
<code class="param-type">
|
|
3780
|
+
<code class="param-type">Promise</code>
|
|
2991
3781
|
|
|
2992
3782
|
|
|
2993
3783
|
</div>
|
|
@@ -3006,12 +3796,9 @@ await api.user.document.findById('5edf9f8ee896b817e45b8dad', session);</code></p
|
|
|
3006
3796
|
|
|
3007
3797
|
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
3008
3798
|
const api = new API();
|
|
3009
|
-
const params
|
|
3010
|
-
docId: '5dadd01dc4af3941d42f8c5c',
|
|
3011
|
-
orgId '5df7f19618430c89a41a19d2',
|
|
3012
|
-
};
|
|
3799
|
+
const params = { ... };
|
|
3013
3800
|
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
3014
|
-
await api.user.document.
|
|
3801
|
+
await api.user.document.findByIdAndUpdate('5edf9f8ee896b817e45b8dad', params, session);</code></pre>
|
|
3015
3802
|
|
|
3016
3803
|
|
|
3017
3804
|
|
|
@@ -3021,8 +3808,8 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
3021
3808
|
|
|
3022
3809
|
|
|
3023
3810
|
|
|
3024
|
-
<h4 class="name" id="
|
|
3025
|
-
<a class="href-link" href="#
|
|
3811
|
+
<h4 class="name" id="findByIdsAndRemove">
|
|
3812
|
+
<a class="href-link" href="#findByIdsAndRemove">#</a>
|
|
3026
3813
|
|
|
3027
3814
|
|
|
3028
3815
|
<span class='tag'>async</span>
|
|
@@ -3030,7 +3817,7 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
3030
3817
|
|
|
3031
3818
|
<span class="code-name">
|
|
3032
3819
|
|
|
3033
|
-
|
|
3820
|
+
findByIdsAndRemove<span class="signature">(params, session)</span><span class="type-signature"> → {Promise.<object>|number|array.<object>|string|string|string}</span>
|
|
3034
3821
|
|
|
3035
3822
|
</span>
|
|
3036
3823
|
</h4>
|
|
@@ -3039,7 +3826,7 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
3039
3826
|
|
|
3040
3827
|
|
|
3041
3828
|
<div class="description">
|
|
3042
|
-
|
|
3829
|
+
Remove documents
|
|
3043
3830
|
</div>
|
|
3044
3831
|
|
|
3045
3832
|
|
|
@@ -3071,19 +3858,66 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
3071
3858
|
</tr>
|
|
3072
3859
|
</thead>
|
|
3073
3860
|
|
|
3074
|
-
<tbody>
|
|
3075
|
-
|
|
3861
|
+
<tbody>
|
|
3862
|
+
|
|
3863
|
+
|
|
3864
|
+
|
|
3865
|
+
<tr class="deep-level-0">
|
|
3866
|
+
|
|
3867
|
+
<td class="name"><code>params</code></td>
|
|
3868
|
+
|
|
3869
|
+
|
|
3870
|
+
<td class="type">
|
|
3871
|
+
|
|
3872
|
+
|
|
3873
|
+
<code class="param-type">object</code>
|
|
3874
|
+
|
|
3875
|
+
|
|
3876
|
+
|
|
3877
|
+
</td>
|
|
3878
|
+
|
|
3879
|
+
|
|
3880
|
+
|
|
3881
|
+
|
|
3882
|
+
|
|
3883
|
+
<td class="description last">Params to remove document</td>
|
|
3884
|
+
</tr>
|
|
3885
|
+
|
|
3886
|
+
|
|
3887
|
+
|
|
3888
|
+
|
|
3889
|
+
<tr class="deep-level-1">
|
|
3890
|
+
|
|
3891
|
+
<td class="name"><code>documents</code></td>
|
|
3892
|
+
|
|
3893
|
+
|
|
3894
|
+
<td class="type">
|
|
3895
|
+
|
|
3896
|
+
|
|
3897
|
+
<code class="param-type">array.<string></code>
|
|
3898
|
+
|
|
3899
|
+
|
|
3900
|
+
|
|
3901
|
+
</td>
|
|
3902
|
+
|
|
3903
|
+
|
|
3904
|
+
|
|
3905
|
+
|
|
3906
|
+
|
|
3907
|
+
<td class="description last">An array ids of documents (_id database)</td>
|
|
3908
|
+
</tr>
|
|
3076
3909
|
|
|
3077
|
-
|
|
3078
|
-
<tr class="deep-level-0">
|
|
3079
3910
|
|
|
3080
|
-
|
|
3911
|
+
|
|
3912
|
+
<tr class="deep-level-1">
|
|
3913
|
+
|
|
3914
|
+
<td class="name"><code>documents._id</code></td>
|
|
3081
3915
|
|
|
3082
3916
|
|
|
3083
3917
|
<td class="type">
|
|
3084
3918
|
|
|
3085
3919
|
|
|
3086
|
-
<code class="param-type">string
|
|
3920
|
+
<code class="param-type">array.<string></code>
|
|
3087
3921
|
|
|
3088
3922
|
|
|
3089
3923
|
|
|
@@ -3093,22 +3927,20 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
3093
3927
|
|
|
3094
3928
|
|
|
3095
3929
|
|
|
3096
|
-
<td class="description last">
|
|
3930
|
+
<td class="description last">The document id (_id database)</td>
|
|
3097
3931
|
</tr>
|
|
3098
3932
|
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
<tr class="deep-level-0">
|
|
3104
3933
|
|
|
3105
|
-
|
|
3934
|
+
|
|
3935
|
+
<tr class="deep-level-1">
|
|
3936
|
+
|
|
3937
|
+
<td class="name"><code>orgId</code></td>
|
|
3106
3938
|
|
|
3107
3939
|
|
|
3108
3940
|
<td class="type">
|
|
3109
3941
|
|
|
3110
3942
|
|
|
3111
|
-
<code class="param-type">
|
|
3943
|
+
<code class="param-type">string</code>
|
|
3112
3944
|
|
|
3113
3945
|
|
|
3114
3946
|
|
|
@@ -3118,9 +3950,11 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
3118
3950
|
|
|
3119
3951
|
|
|
3120
3952
|
|
|
3121
|
-
<td class="description last">
|
|
3953
|
+
<td class="description last">Organizarion id (_id database)</td>
|
|
3122
3954
|
</tr>
|
|
3123
3955
|
|
|
3956
|
+
|
|
3957
|
+
|
|
3124
3958
|
|
|
3125
3959
|
|
|
3126
3960
|
|
|
@@ -3198,7 +4032,7 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
3198
4032
|
<p class="tag-source">
|
|
3199
4033
|
<a href="user_document.js.html" class="button">View Source</a>
|
|
3200
4034
|
<span>
|
|
3201
|
-
<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>
|
|
3202
4036
|
</span>
|
|
3203
4037
|
</p>
|
|
3204
4038
|
|
|
@@ -3229,11 +4063,103 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
3229
4063
|
|
|
3230
4064
|
<div class="columns">
|
|
3231
4065
|
|
|
4066
|
+
<div class='param-desc column is-7'>data The returned data</div>
|
|
4067
|
+
|
|
3232
4068
|
|
|
3233
4069
|
<div class='column is-5 has-text-left'>
|
|
3234
4070
|
<label>Type: </label>
|
|
3235
4071
|
|
|
3236
|
-
<code class="param-type">Promise
|
|
4072
|
+
<code class="param-type">Promise.<object></code>
|
|
4073
|
+
|
|
4074
|
+
|
|
4075
|
+
</div>
|
|
4076
|
+
|
|
4077
|
+
</div>
|
|
4078
|
+
|
|
4079
|
+
|
|
4080
|
+
|
|
4081
|
+
|
|
4082
|
+
<div class="columns">
|
|
4083
|
+
|
|
4084
|
+
<div class='param-desc column is-7'>data.removed The quantity of removed documents</div>
|
|
4085
|
+
|
|
4086
|
+
|
|
4087
|
+
<div class='column is-5 has-text-left'>
|
|
4088
|
+
<label>Type: </label>
|
|
4089
|
+
|
|
4090
|
+
<code class="param-type">number</code>
|
|
4091
|
+
|
|
4092
|
+
|
|
4093
|
+
</div>
|
|
4094
|
+
|
|
4095
|
+
</div>
|
|
4096
|
+
|
|
4097
|
+
|
|
4098
|
+
|
|
4099
|
+
|
|
4100
|
+
<div class="columns">
|
|
4101
|
+
|
|
4102
|
+
<div class='param-desc column is-7'>data.errors Array of errors</div>
|
|
4103
|
+
|
|
4104
|
+
|
|
4105
|
+
<div class='column is-5 has-text-left'>
|
|
4106
|
+
<label>Type: </label>
|
|
4107
|
+
|
|
4108
|
+
<code class="param-type">array.<object></code>
|
|
4109
|
+
|
|
4110
|
+
|
|
4111
|
+
</div>
|
|
4112
|
+
|
|
4113
|
+
</div>
|
|
4114
|
+
|
|
4115
|
+
|
|
4116
|
+
|
|
4117
|
+
|
|
4118
|
+
<div class="columns">
|
|
4119
|
+
|
|
4120
|
+
<div class='param-desc column is-7'>data.errors.id Id of the document that had an error</div>
|
|
4121
|
+
|
|
4122
|
+
|
|
4123
|
+
<div class='column is-5 has-text-left'>
|
|
4124
|
+
<label>Type: </label>
|
|
4125
|
+
|
|
4126
|
+
<code class="param-type">string</code>
|
|
4127
|
+
|
|
4128
|
+
|
|
4129
|
+
</div>
|
|
4130
|
+
|
|
4131
|
+
</div>
|
|
4132
|
+
|
|
4133
|
+
|
|
4134
|
+
|
|
4135
|
+
|
|
4136
|
+
<div class="columns">
|
|
4137
|
+
|
|
4138
|
+
<div class='param-desc column is-7'>data.errors.code Error code</div>
|
|
4139
|
+
|
|
4140
|
+
|
|
4141
|
+
<div class='column is-5 has-text-left'>
|
|
4142
|
+
<label>Type: </label>
|
|
4143
|
+
|
|
4144
|
+
<code class="param-type">string</code>
|
|
4145
|
+
|
|
4146
|
+
|
|
4147
|
+
</div>
|
|
4148
|
+
|
|
4149
|
+
</div>
|
|
4150
|
+
|
|
4151
|
+
|
|
4152
|
+
|
|
4153
|
+
|
|
4154
|
+
<div class="columns">
|
|
4155
|
+
|
|
4156
|
+
<div class='param-desc column is-7'>data.errors.message Error message</div>
|
|
4157
|
+
|
|
4158
|
+
|
|
4159
|
+
<div class='column is-5 has-text-left'>
|
|
4160
|
+
<label>Type: </label>
|
|
4161
|
+
|
|
4162
|
+
<code class="param-type">string</code>
|
|
3237
4163
|
|
|
3238
4164
|
|
|
3239
4165
|
</div>
|
|
@@ -3252,9 +4178,12 @@ await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
|
3252
4178
|
|
|
3253
4179
|
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
3254
4180
|
const api = new API();
|
|
3255
|
-
const params
|
|
4181
|
+
const params - {
|
|
4182
|
+
documents: [{ _id: '5dadd01dc4af3941d42f8c5c' }],
|
|
4183
|
+
orgId: '5df7f19618430c89a41a19d2',
|
|
4184
|
+
};
|
|
3256
4185
|
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
3257
|
-
await api.user.document.
|
|
4186
|
+
await api.user.document.findByIdsAndRemove(params, session);</code></pre>
|
|
3258
4187
|
|
|
3259
4188
|
|
|
3260
4189
|
|
|
@@ -3264,8 +4193,8 @@ await api.user.document.findByIdAndUpdate('5edf9f8ee896b817e45b8dad', params, se
|
|
|
3264
4193
|
|
|
3265
4194
|
|
|
3266
4195
|
|
|
3267
|
-
<h4 class="name" id="
|
|
3268
|
-
<a class="href-link" href="#
|
|
4196
|
+
<h4 class="name" id="performDownloadComplete">
|
|
4197
|
+
<a class="href-link" href="#performDownloadComplete">#</a>
|
|
3269
4198
|
|
|
3270
4199
|
|
|
3271
4200
|
<span class='tag'>async</span>
|
|
@@ -3273,7 +4202,7 @@ await api.user.document.findByIdAndUpdate('5edf9f8ee896b817e45b8dad', params, se
|
|
|
3273
4202
|
|
|
3274
4203
|
<span class="code-name">
|
|
3275
4204
|
|
|
3276
|
-
|
|
4205
|
+
performDownloadComplete<span class="signature">(params, session)</span><span class="type-signature"> → {promise}</span>
|
|
3277
4206
|
|
|
3278
4207
|
</span>
|
|
3279
4208
|
</h4>
|
|
@@ -3282,7 +4211,7 @@ await api.user.document.findByIdAndUpdate('5edf9f8ee896b817e45b8dad', params, se
|
|
|
3282
4211
|
|
|
3283
4212
|
|
|
3284
4213
|
<div class="description">
|
|
3285
|
-
|
|
4214
|
+
Method to perform download complete for all pages
|
|
3286
4215
|
</div>
|
|
3287
4216
|
|
|
3288
4217
|
|
|
@@ -3336,7 +4265,7 @@ await api.user.document.findByIdAndUpdate('5edf9f8ee896b817e45b8dad', params, se
|
|
|
3336
4265
|
|
|
3337
4266
|
|
|
3338
4267
|
|
|
3339
|
-
<td class="description last">Params to
|
|
4268
|
+
<td class="description last">Params to perform download complete for all pages</td>
|
|
3340
4269
|
</tr>
|
|
3341
4270
|
|
|
3342
4271
|
|
|
@@ -3344,13 +4273,13 @@ await api.user.document.findByIdAndUpdate('5edf9f8ee896b817e45b8dad', params, se
|
|
|
3344
4273
|
|
|
3345
4274
|
<tr class="deep-level-1">
|
|
3346
4275
|
|
|
3347
|
-
<td class="name"><code>
|
|
4276
|
+
<td class="name"><code>data</code></td>
|
|
3348
4277
|
|
|
3349
4278
|
|
|
3350
4279
|
<td class="type">
|
|
3351
4280
|
|
|
3352
4281
|
|
|
3353
|
-
<code class="param-type">
|
|
4282
|
+
<code class="param-type">object</code>
|
|
3354
4283
|
|
|
3355
4284
|
|
|
3356
4285
|
|
|
@@ -3360,20 +4289,20 @@ await api.user.document.findByIdAndUpdate('5edf9f8ee896b817e45b8dad', params, se
|
|
|
3360
4289
|
|
|
3361
4290
|
|
|
3362
4291
|
|
|
3363
|
-
<td class="description last">
|
|
4292
|
+
<td class="description last">data to be send to download</td>
|
|
3364
4293
|
</tr>
|
|
3365
4294
|
|
|
3366
4295
|
|
|
3367
4296
|
|
|
3368
4297
|
<tr class="deep-level-1">
|
|
3369
4298
|
|
|
3370
|
-
<td class="name"><code>
|
|
4299
|
+
<td class="name"><code>query</code></td>
|
|
3371
4300
|
|
|
3372
4301
|
|
|
3373
4302
|
<td class="type">
|
|
3374
4303
|
|
|
3375
4304
|
|
|
3376
|
-
<code class="param-type">
|
|
4305
|
+
<code class="param-type">object</code>
|
|
3377
4306
|
|
|
3378
4307
|
|
|
3379
4308
|
|
|
@@ -3383,7 +4312,7 @@ await api.user.document.findByIdAndUpdate('5edf9f8ee896b817e45b8dad', params, se
|
|
|
3383
4312
|
|
|
3384
4313
|
|
|
3385
4314
|
|
|
3386
|
-
<td class="description last">
|
|
4315
|
+
<td class="description last">perform download complete for all pages query</td>
|
|
3387
4316
|
</tr>
|
|
3388
4317
|
|
|
3389
4318
|
|
|
@@ -3396,7 +4325,7 @@ await api.user.document.findByIdAndUpdate('5edf9f8ee896b817e45b8dad', params, se
|
|
|
3396
4325
|
<td class="type">
|
|
3397
4326
|
|
|
3398
4327
|
|
|
3399
|
-
<code class="param-type">
|
|
4328
|
+
<code class="param-type">object</code>
|
|
3400
4329
|
|
|
3401
4330
|
|
|
3402
4331
|
|
|
@@ -3406,7 +4335,7 @@ await api.user.document.findByIdAndUpdate('5edf9f8ee896b817e45b8dad', params, se
|
|
|
3406
4335
|
|
|
3407
4336
|
|
|
3408
4337
|
|
|
3409
|
-
<td class="description last">
|
|
4338
|
+
<td class="description last">Organization id (_id database)</td>
|
|
3410
4339
|
</tr>
|
|
3411
4340
|
|
|
3412
4341
|
|
|
@@ -3488,7 +4417,7 @@ await api.user.document.findByIdAndUpdate('5edf9f8ee896b817e45b8dad', params, se
|
|
|
3488
4417
|
<p class="tag-source">
|
|
3489
4418
|
<a href="user_document.js.html" class="button">View Source</a>
|
|
3490
4419
|
<span>
|
|
3491
|
-
<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>
|
|
3492
4421
|
</span>
|
|
3493
4422
|
</p>
|
|
3494
4423
|
|
|
@@ -3519,103 +4448,13 @@ await api.user.document.findByIdAndUpdate('5edf9f8ee896b817e45b8dad', params, se
|
|
|
3519
4448
|
|
|
3520
4449
|
<div class="columns">
|
|
3521
4450
|
|
|
3522
|
-
<div class='param-desc column is-7'>data
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
<div class='column is-5 has-text-left'>
|
|
3526
|
-
<label>Type: </label>
|
|
3527
|
-
|
|
3528
|
-
<code class="param-type">Promise.<object></code>
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
</div>
|
|
3532
|
-
|
|
3533
|
-
</div>
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
<div class="columns">
|
|
3539
|
-
|
|
3540
|
-
<div class='param-desc column is-7'>data.removed The quantity of removed documents</div>
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
<div class='column is-5 has-text-left'>
|
|
3544
|
-
<label>Type: </label>
|
|
3545
|
-
|
|
3546
|
-
<code class="param-type">number</code>
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
</div>
|
|
3550
|
-
|
|
3551
|
-
</div>
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
<div class="columns">
|
|
3557
|
-
|
|
3558
|
-
<div class='param-desc column is-7'>data.errors Array of errors</div>
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
<div class='column is-5 has-text-left'>
|
|
3562
|
-
<label>Type: </label>
|
|
3563
|
-
|
|
3564
|
-
<code class="param-type">array.<object></code>
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
</div>
|
|
3568
|
-
|
|
3569
|
-
</div>
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
<div class="columns">
|
|
3575
|
-
|
|
3576
|
-
<div class='param-desc column is-7'>data.errors.id Id of the document that had an error</div>
|
|
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>
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
<div class='column is-5 has-text-left'>
|
|
3598
|
-
<label>Type: </label>
|
|
3599
|
-
|
|
3600
|
-
<code class="param-type">string</code>
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
</div>
|
|
3604
|
-
|
|
3605
|
-
</div>
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
<div class="columns">
|
|
3611
|
-
|
|
3612
|
-
<div class='param-desc column is-7'>data.errors.message Error message</div>
|
|
4451
|
+
<div class='param-desc column is-7'>returned data from the perform download complete for all pages</div>
|
|
3613
4452
|
|
|
3614
4453
|
|
|
3615
4454
|
<div class='column is-5 has-text-left'>
|
|
3616
4455
|
<label>Type: </label>
|
|
3617
4456
|
|
|
3618
|
-
<code class="param-type">
|
|
4457
|
+
<code class="param-type">promise</code>
|
|
3619
4458
|
|
|
3620
4459
|
|
|
3621
4460
|
</div>
|
|
@@ -3634,12 +4473,21 @@ await api.user.document.findByIdAndUpdate('5edf9f8ee896b817e45b8dad', params, se
|
|
|
3634
4473
|
|
|
3635
4474
|
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
3636
4475
|
const api = new API();
|
|
3637
|
-
const params
|
|
3638
|
-
|
|
3639
|
-
orgId: '
|
|
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
|
+
}
|
|
3640
4488
|
};
|
|
3641
4489
|
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
3642
|
-
await api.user.document.
|
|
4490
|
+
const retSearch = await api.user.document.performDownloadComplete(params, session);</code></pre>
|
|
3643
4491
|
|
|
3644
4492
|
|
|
3645
4493
|
|