@docbrasil/api-systemmanager 1.1.22 → 1.1.23
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/admin/form.js +27 -2
- package/api/admin/user.js +55 -0
- package/api/user/user.js +0 -1
- package/dist/bundle.cjs +82 -3
- package/dist/bundle.mjs +1 -1
- package/doc/api.md +49 -1
- package/docs/AdminForm.html +103 -2
- package/docs/AdminUser.html +349 -0
- package/docs/User.html +3 -30
- package/docs/admin_form.js.html +27 -2
- package/docs/admin_user.js.html +55 -0
- package/docs/user_user.js.html +0 -1
- package/package.json +1 -1
package/doc/api.md
CHANGED
|
@@ -330,9 +330,29 @@ Admin Class for forms, permission admin
|
|
|
330
330
|
**Kind**: global class
|
|
331
331
|
|
|
332
332
|
* [AdminForm](#AdminForm)
|
|
333
|
+
* [.types](#AdminForm+types) ⇒ <code>Promise</code>
|
|
333
334
|
* [.findById(params, session)](#AdminForm+findById) ⇒ <code>Promise</code>
|
|
334
335
|
* [.getFormList(params, session)](#AdminForm+getFormList) ⇒ <code>Promise</code>
|
|
335
336
|
|
|
337
|
+
<a name="AdminForm+types"></a>
|
|
338
|
+
|
|
339
|
+
### adminForm.types ⇒ <code>Promise</code>
|
|
340
|
+
Get the types for forms
|
|
341
|
+
|
|
342
|
+
**Kind**: instance property of [<code>AdminForm</code>](#AdminForm)
|
|
343
|
+
**Access**: public
|
|
344
|
+
**Author**: Myndware <augusto.pissarra@myndware.com>
|
|
345
|
+
**Example**
|
|
346
|
+
```js
|
|
347
|
+
const API = require('@docbrasil/api-systemmanager');
|
|
348
|
+
const api = new API();
|
|
349
|
+
const params = {
|
|
350
|
+
id: '55e4a3bd6be6b45210833fae',
|
|
351
|
+
orgId: '5edd11c46b6ce9729c2c297c',
|
|
352
|
+
};
|
|
353
|
+
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
354
|
+
await api.admin.form.findById(params, session);
|
|
355
|
+
```
|
|
336
356
|
<a name="AdminForm+findById"></a>
|
|
337
357
|
|
|
338
358
|
### adminForm.findById(params, session) ⇒ <code>Promise</code>
|
|
@@ -1085,6 +1105,7 @@ Admin Class for user, permission admin
|
|
|
1085
1105
|
* [.findByIdAndUpdate(userId, payload, session)](#AdminUser+findByIdAndUpdate) ⇒ <code>Promise.<\*></code>
|
|
1086
1106
|
* [.getChangePasswordGuid(email)](#AdminUser+getChangePasswordGuid) ⇒ <code>Promise.<\*></code>
|
|
1087
1107
|
* [.changePasswordGuid(Payload)](#AdminUser+changePasswordGuid) ⇒ <code>Promise.<\*></code>
|
|
1108
|
+
* [.getUserList(params, session)](#AdminUser+getUserList) ⇒ <code>Promise</code>
|
|
1088
1109
|
|
|
1089
1110
|
<a name="AdminUser+findById"></a>
|
|
1090
1111
|
|
|
@@ -1245,6 +1266,34 @@ const payload = {
|
|
|
1245
1266
|
};
|
|
1246
1267
|
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
1247
1268
|
```
|
|
1269
|
+
<a name="AdminUser+getUserList"></a>
|
|
1270
|
+
|
|
1271
|
+
### adminUser.getUserList(params, session) ⇒ <code>Promise</code>
|
|
1272
|
+
Request signed url url to put or get
|
|
1273
|
+
|
|
1274
|
+
**Kind**: instance method of [<code>AdminUser</code>](#AdminUser)
|
|
1275
|
+
**Access**: public
|
|
1276
|
+
**Author**: Myndware <augusto.pissarra@myndware.com>
|
|
1277
|
+
|
|
1278
|
+
| Param | Type | Default | Description |
|
|
1279
|
+
| --- | --- | --- | --- |
|
|
1280
|
+
| params | <code>object</code> | | Params to get form list |
|
|
1281
|
+
| params.page | <code>number</code> | <code>1</code> | Page of pagination |
|
|
1282
|
+
| params.perPage | <code>number</code> | <code>200</code> | Items per page |
|
|
1283
|
+
| params.project | <code>object</code> | <code>{_id:</code> | 1, name: 1} - Fields to project |
|
|
1284
|
+
| params.sort | <code>object</code> | <code>{name:</code> | 1} - Sort fields |
|
|
1285
|
+
| session | <code>string</code> | | Session, token JWT |
|
|
1286
|
+
|
|
1287
|
+
**Example**
|
|
1288
|
+
```js
|
|
1289
|
+
const API = require('@docbrasil/api-systemmanager');
|
|
1290
|
+
const api = new API();
|
|
1291
|
+
const params - {
|
|
1292
|
+
project: {_id: 1, name: 1, orgId: 1, orgIds: 1},
|
|
1293
|
+
};
|
|
1294
|
+
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
1295
|
+
await api.user.form.getUserList(params, session);
|
|
1296
|
+
```
|
|
1248
1297
|
<a name="GeoLocation"></a>
|
|
1249
1298
|
|
|
1250
1299
|
## GeoLocation
|
|
@@ -3432,7 +3481,6 @@ Get the Atlas Chart JWT Token, so we can access authorized the created charts
|
|
|
3432
3481
|
| query | <code>object</code> | <code>{}</code> | The query, if any, to add to the JWT token |
|
|
3433
3482
|
| query.orgIds | <code>array.<string></code> | | An array of orgIds that we want to filter by |
|
|
3434
3483
|
| query.orgProcessIds | <code>array.<string></code> | | An array of orgProcessId that we want to filter by |
|
|
3435
|
-
| query.tags | <code>array.<string></code> | | An array of org processes tags that we want to filter by |
|
|
3436
3484
|
| query.startDate | <code>date</code> | | The start date in ISO format that we want to filter by |
|
|
3437
3485
|
| query.endDate | <code>date</code> | | The start date in ISO format that we want to filter by |
|
|
3438
3486
|
| session | <code>string</code> | | Is token JWT of user NOT allow SU |
|
package/docs/AdminForm.html
CHANGED
|
@@ -214,6 +214,107 @@
|
|
|
214
214
|
|
|
215
215
|
|
|
216
216
|
|
|
217
|
+
<div class='vertical-section'>
|
|
218
|
+
<h1>Members</h1>
|
|
219
|
+
<div class="members">
|
|
220
|
+
|
|
221
|
+
<div class="member">
|
|
222
|
+
|
|
223
|
+
<h4 class="name" id="types">
|
|
224
|
+
<a class="href-link" href="#types">#</a>
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
<span class='tag'>async</span>
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
<span class="code-name">
|
|
231
|
+
types
|
|
232
|
+
</span>
|
|
233
|
+
|
|
234
|
+
</h4>
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
<div class="description">
|
|
240
|
+
Get the types for forms
|
|
241
|
+
</div>
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
<dl class="details">
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
<dt class="tag-author">Author:</dt>
|
|
267
|
+
<dd class="tag-author">
|
|
268
|
+
<ul>
|
|
269
|
+
<li><a href="mailto:augusto.pissarra@myndware.com">Myndware</a></li>
|
|
270
|
+
</ul>
|
|
271
|
+
</dd>
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
<p class="tag-source">
|
|
287
|
+
<a href="admin_form.js.html" class="button">View Source</a>
|
|
288
|
+
<span>
|
|
289
|
+
<a href="admin_form.js.html">admin/form.js</a>, <a href="admin_form.js.html#line67">line 67</a>
|
|
290
|
+
</span>
|
|
291
|
+
</p>
|
|
292
|
+
|
|
293
|
+
</dl>
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
<h5>Example</h5>
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
303
|
+
const api = new API();
|
|
304
|
+
const params = {
|
|
305
|
+
id: '55e4a3bd6be6b45210833fae',
|
|
306
|
+
orgId: '5edd11c46b6ce9729c2c297c',
|
|
307
|
+
};
|
|
308
|
+
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
309
|
+
await api.admin.form.findById(params, session);</code></pre>
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
</div>
|
|
314
|
+
|
|
315
|
+
</div>
|
|
316
|
+
</div>
|
|
317
|
+
|
|
217
318
|
|
|
218
319
|
|
|
219
320
|
<div class='vertical-section'>
|
|
@@ -425,7 +526,7 @@
|
|
|
425
526
|
<p class="tag-source">
|
|
426
527
|
<a href="admin_form.js.html" class="button">View Source</a>
|
|
427
528
|
<span>
|
|
428
|
-
<a href="admin_form.js.html">admin/form.js</a>, <a href="admin_form.js.html#
|
|
529
|
+
<a href="admin_form.js.html">admin/form.js</a>, <a href="admin_form.js.html#line97">line 97</a>
|
|
429
530
|
</span>
|
|
430
531
|
</p>
|
|
431
532
|
|
|
@@ -831,7 +932,7 @@ await api.admin.form.findById(params, session);</code></pre>
|
|
|
831
932
|
<p class="tag-source">
|
|
832
933
|
<a href="admin_form.js.html" class="button">View Source</a>
|
|
833
934
|
<span>
|
|
834
|
-
<a href="admin_form.js.html">admin/form.js</a>, <a href="admin_form.js.html#
|
|
935
|
+
<a href="admin_form.js.html">admin/form.js</a>, <a href="admin_form.js.html#line138">line 138</a>
|
|
835
936
|
</span>
|
|
836
937
|
</p>
|
|
837
938
|
|
package/docs/AdminUser.html
CHANGED
|
@@ -1800,6 +1800,355 @@ const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';</code></pre>
|
|
|
1800
1800
|
|
|
1801
1801
|
|
|
1802
1802
|
|
|
1803
|
+
</div>
|
|
1804
|
+
|
|
1805
|
+
<div class="member">
|
|
1806
|
+
|
|
1807
|
+
|
|
1808
|
+
|
|
1809
|
+
<h4 class="name" id="getUserList">
|
|
1810
|
+
<a class="href-link" href="#getUserList">#</a>
|
|
1811
|
+
|
|
1812
|
+
|
|
1813
|
+
<span class='tag'>async</span>
|
|
1814
|
+
|
|
1815
|
+
|
|
1816
|
+
<span class="code-name">
|
|
1817
|
+
|
|
1818
|
+
getUserList<span class="signature">(params, session)</span><span class="type-signature"> → {Promise}</span>
|
|
1819
|
+
|
|
1820
|
+
</span>
|
|
1821
|
+
</h4>
|
|
1822
|
+
|
|
1823
|
+
|
|
1824
|
+
|
|
1825
|
+
|
|
1826
|
+
<div class="description">
|
|
1827
|
+
Request signed url url to put or get
|
|
1828
|
+
</div>
|
|
1829
|
+
|
|
1830
|
+
|
|
1831
|
+
|
|
1832
|
+
|
|
1833
|
+
|
|
1834
|
+
|
|
1835
|
+
|
|
1836
|
+
|
|
1837
|
+
|
|
1838
|
+
|
|
1839
|
+
<h5>Parameters:</h5>
|
|
1840
|
+
|
|
1841
|
+
<div class="table-container">
|
|
1842
|
+
<table class="params table">
|
|
1843
|
+
<thead>
|
|
1844
|
+
<tr>
|
|
1845
|
+
|
|
1846
|
+
<th>Name</th>
|
|
1847
|
+
|
|
1848
|
+
|
|
1849
|
+
<th>Type</th>
|
|
1850
|
+
|
|
1851
|
+
|
|
1852
|
+
|
|
1853
|
+
|
|
1854
|
+
<th>Default</th>
|
|
1855
|
+
|
|
1856
|
+
|
|
1857
|
+
<th class="last">Description</th>
|
|
1858
|
+
</tr>
|
|
1859
|
+
</thead>
|
|
1860
|
+
|
|
1861
|
+
<tbody>
|
|
1862
|
+
|
|
1863
|
+
|
|
1864
|
+
|
|
1865
|
+
<tr class="deep-level-0">
|
|
1866
|
+
|
|
1867
|
+
<td class="name"><code>params</code></td>
|
|
1868
|
+
|
|
1869
|
+
|
|
1870
|
+
<td class="type">
|
|
1871
|
+
|
|
1872
|
+
|
|
1873
|
+
<code class="param-type">object</code>
|
|
1874
|
+
|
|
1875
|
+
|
|
1876
|
+
|
|
1877
|
+
</td>
|
|
1878
|
+
|
|
1879
|
+
|
|
1880
|
+
|
|
1881
|
+
|
|
1882
|
+
<td class="default">
|
|
1883
|
+
|
|
1884
|
+
</td>
|
|
1885
|
+
|
|
1886
|
+
|
|
1887
|
+
<td class="description last">Params to get form list</td>
|
|
1888
|
+
</tr>
|
|
1889
|
+
|
|
1890
|
+
|
|
1891
|
+
|
|
1892
|
+
|
|
1893
|
+
<tr class="deep-level-1">
|
|
1894
|
+
|
|
1895
|
+
<td class="name"><code>page</code></td>
|
|
1896
|
+
|
|
1897
|
+
|
|
1898
|
+
<td class="type">
|
|
1899
|
+
|
|
1900
|
+
|
|
1901
|
+
<code class="param-type">number</code>
|
|
1902
|
+
|
|
1903
|
+
|
|
1904
|
+
|
|
1905
|
+
</td>
|
|
1906
|
+
|
|
1907
|
+
|
|
1908
|
+
|
|
1909
|
+
|
|
1910
|
+
<td class="default">
|
|
1911
|
+
|
|
1912
|
+
1
|
|
1913
|
+
|
|
1914
|
+
</td>
|
|
1915
|
+
|
|
1916
|
+
|
|
1917
|
+
<td class="description last">Page of pagination</td>
|
|
1918
|
+
</tr>
|
|
1919
|
+
|
|
1920
|
+
|
|
1921
|
+
|
|
1922
|
+
<tr class="deep-level-1">
|
|
1923
|
+
|
|
1924
|
+
<td class="name"><code>perPage</code></td>
|
|
1925
|
+
|
|
1926
|
+
|
|
1927
|
+
<td class="type">
|
|
1928
|
+
|
|
1929
|
+
|
|
1930
|
+
<code class="param-type">number</code>
|
|
1931
|
+
|
|
1932
|
+
|
|
1933
|
+
|
|
1934
|
+
</td>
|
|
1935
|
+
|
|
1936
|
+
|
|
1937
|
+
|
|
1938
|
+
|
|
1939
|
+
<td class="default">
|
|
1940
|
+
|
|
1941
|
+
200
|
|
1942
|
+
|
|
1943
|
+
</td>
|
|
1944
|
+
|
|
1945
|
+
|
|
1946
|
+
<td class="description last">Items per page</td>
|
|
1947
|
+
</tr>
|
|
1948
|
+
|
|
1949
|
+
|
|
1950
|
+
|
|
1951
|
+
<tr class="deep-level-1">
|
|
1952
|
+
|
|
1953
|
+
<td class="name"><code>project</code></td>
|
|
1954
|
+
|
|
1955
|
+
|
|
1956
|
+
<td class="type">
|
|
1957
|
+
|
|
1958
|
+
|
|
1959
|
+
<code class="param-type">object</code>
|
|
1960
|
+
|
|
1961
|
+
|
|
1962
|
+
|
|
1963
|
+
</td>
|
|
1964
|
+
|
|
1965
|
+
|
|
1966
|
+
|
|
1967
|
+
|
|
1968
|
+
<td class="default">
|
|
1969
|
+
|
|
1970
|
+
{_id:
|
|
1971
|
+
|
|
1972
|
+
</td>
|
|
1973
|
+
|
|
1974
|
+
|
|
1975
|
+
<td class="description last">1, name: 1} - Fields to project</td>
|
|
1976
|
+
</tr>
|
|
1977
|
+
|
|
1978
|
+
|
|
1979
|
+
|
|
1980
|
+
<tr class="deep-level-1">
|
|
1981
|
+
|
|
1982
|
+
<td class="name"><code>sort</code></td>
|
|
1983
|
+
|
|
1984
|
+
|
|
1985
|
+
<td class="type">
|
|
1986
|
+
|
|
1987
|
+
|
|
1988
|
+
<code class="param-type">object</code>
|
|
1989
|
+
|
|
1990
|
+
|
|
1991
|
+
|
|
1992
|
+
</td>
|
|
1993
|
+
|
|
1994
|
+
|
|
1995
|
+
|
|
1996
|
+
|
|
1997
|
+
<td class="default">
|
|
1998
|
+
|
|
1999
|
+
{name:
|
|
2000
|
+
|
|
2001
|
+
</td>
|
|
2002
|
+
|
|
2003
|
+
|
|
2004
|
+
<td class="description last">1} - Sort fields</td>
|
|
2005
|
+
</tr>
|
|
2006
|
+
|
|
2007
|
+
|
|
2008
|
+
|
|
2009
|
+
|
|
2010
|
+
|
|
2011
|
+
|
|
2012
|
+
|
|
2013
|
+
<tr class="deep-level-0">
|
|
2014
|
+
|
|
2015
|
+
<td class="name"><code>session</code></td>
|
|
2016
|
+
|
|
2017
|
+
|
|
2018
|
+
<td class="type">
|
|
2019
|
+
|
|
2020
|
+
|
|
2021
|
+
<code class="param-type">string</code>
|
|
2022
|
+
|
|
2023
|
+
|
|
2024
|
+
|
|
2025
|
+
</td>
|
|
2026
|
+
|
|
2027
|
+
|
|
2028
|
+
|
|
2029
|
+
|
|
2030
|
+
<td class="default">
|
|
2031
|
+
|
|
2032
|
+
</td>
|
|
2033
|
+
|
|
2034
|
+
|
|
2035
|
+
<td class="description last">Session, token JWT</td>
|
|
2036
|
+
</tr>
|
|
2037
|
+
|
|
2038
|
+
|
|
2039
|
+
|
|
2040
|
+
</tbody>
|
|
2041
|
+
</table>
|
|
2042
|
+
</div>
|
|
2043
|
+
|
|
2044
|
+
|
|
2045
|
+
|
|
2046
|
+
|
|
2047
|
+
|
|
2048
|
+
<dl class="details">
|
|
2049
|
+
|
|
2050
|
+
|
|
2051
|
+
|
|
2052
|
+
|
|
2053
|
+
|
|
2054
|
+
|
|
2055
|
+
|
|
2056
|
+
|
|
2057
|
+
|
|
2058
|
+
|
|
2059
|
+
|
|
2060
|
+
|
|
2061
|
+
|
|
2062
|
+
|
|
2063
|
+
|
|
2064
|
+
|
|
2065
|
+
|
|
2066
|
+
|
|
2067
|
+
<dt class="tag-author">Author:</dt>
|
|
2068
|
+
<dd class="tag-author">
|
|
2069
|
+
<ul>
|
|
2070
|
+
<li><a href="mailto:augusto.pissarra@myndware.com">Myndware</a></li>
|
|
2071
|
+
</ul>
|
|
2072
|
+
</dd>
|
|
2073
|
+
|
|
2074
|
+
|
|
2075
|
+
|
|
2076
|
+
|
|
2077
|
+
|
|
2078
|
+
|
|
2079
|
+
|
|
2080
|
+
|
|
2081
|
+
|
|
2082
|
+
|
|
2083
|
+
|
|
2084
|
+
|
|
2085
|
+
|
|
2086
|
+
|
|
2087
|
+
<p class="tag-source">
|
|
2088
|
+
<a href="admin_user.js.html" class="button">View Source</a>
|
|
2089
|
+
<span>
|
|
2090
|
+
<a href="admin_user.js.html">admin/user.js</a>, <a href="admin_user.js.html#line298">line 298</a>
|
|
2091
|
+
</span>
|
|
2092
|
+
</p>
|
|
2093
|
+
|
|
2094
|
+
</dl>
|
|
2095
|
+
|
|
2096
|
+
|
|
2097
|
+
|
|
2098
|
+
|
|
2099
|
+
|
|
2100
|
+
|
|
2101
|
+
|
|
2102
|
+
|
|
2103
|
+
|
|
2104
|
+
|
|
2105
|
+
|
|
2106
|
+
|
|
2107
|
+
|
|
2108
|
+
|
|
2109
|
+
|
|
2110
|
+
|
|
2111
|
+
|
|
2112
|
+
|
|
2113
|
+
<div class='columns method-parameter'>
|
|
2114
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
2115
|
+
<div class="column is-10">
|
|
2116
|
+
|
|
2117
|
+
|
|
2118
|
+
|
|
2119
|
+
<div class="columns">
|
|
2120
|
+
|
|
2121
|
+
|
|
2122
|
+
<div class='column is-5 has-text-left'>
|
|
2123
|
+
<label>Type: </label>
|
|
2124
|
+
|
|
2125
|
+
<code class="param-type">Promise</code>
|
|
2126
|
+
|
|
2127
|
+
|
|
2128
|
+
</div>
|
|
2129
|
+
|
|
2130
|
+
</div>
|
|
2131
|
+
|
|
2132
|
+
|
|
2133
|
+
</div>
|
|
2134
|
+
</div>
|
|
2135
|
+
|
|
2136
|
+
|
|
2137
|
+
|
|
2138
|
+
|
|
2139
|
+
<h5>Example</h5>
|
|
2140
|
+
|
|
2141
|
+
|
|
2142
|
+
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
2143
|
+
const api = new API();
|
|
2144
|
+
const params - {
|
|
2145
|
+
project: {_id: 1, name: 1, orgId: 1, orgIds: 1},
|
|
2146
|
+
};
|
|
2147
|
+
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
2148
|
+
await api.user.form.getUserList(params, session);</code></pre>
|
|
2149
|
+
|
|
2150
|
+
|
|
2151
|
+
|
|
1803
2152
|
</div>
|
|
1804
2153
|
|
|
1805
2154
|
</div>
|
package/docs/User.html
CHANGED
|
@@ -1173,33 +1173,6 @@ await api.user.profile.findByIdAndUpdate(params, session);</code></pre>
|
|
|
1173
1173
|
|
|
1174
1174
|
|
|
1175
1175
|
|
|
1176
|
-
<tr class="deep-level-1">
|
|
1177
|
-
|
|
1178
|
-
<td class="name"><code>tags</code></td>
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
<td class="type">
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
<code class="param-type">array.<string></code>
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
</td>
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
<td class="default">
|
|
1194
|
-
|
|
1195
|
-
</td>
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
<td class="description last">An array of org processes tags that we want to filter by</td>
|
|
1199
|
-
</tr>
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
1176
|
<tr class="deep-level-1">
|
|
1204
1177
|
|
|
1205
1178
|
<td class="name"><code>startDate</code></td>
|
|
@@ -1335,7 +1308,7 @@ await api.user.profile.findByIdAndUpdate(params, session);</code></pre>
|
|
|
1335
1308
|
<p class="tag-source">
|
|
1336
1309
|
<a href="user_user.js.html" class="button">View Source</a>
|
|
1337
1310
|
<span>
|
|
1338
|
-
<a href="user_user.js.html">user/user.js</a>, <a href="user_user.js.html#
|
|
1311
|
+
<a href="user_user.js.html">user/user.js</a>, <a href="user_user.js.html#line306">line 306</a>
|
|
1339
1312
|
</span>
|
|
1340
1313
|
</p>
|
|
1341
1314
|
|
|
@@ -1530,7 +1503,7 @@ const jwtToken = await api.user.getChartJWT(query, session);</code></pre>
|
|
|
1530
1503
|
<p class="tag-source">
|
|
1531
1504
|
<a href="user_user.js.html" class="button">View Source</a>
|
|
1532
1505
|
<span>
|
|
1533
|
-
<a href="user_user.js.html">user/user.js</a>, <a href="user_user.js.html#
|
|
1506
|
+
<a href="user_user.js.html">user/user.js</a>, <a href="user_user.js.html#line337">line 337</a>
|
|
1534
1507
|
</span>
|
|
1535
1508
|
</p>
|
|
1536
1509
|
|
|
@@ -1813,7 +1786,7 @@ const organizations = await api.user.getChartOrganizations(session);</code></pre
|
|
|
1813
1786
|
<p class="tag-source">
|
|
1814
1787
|
<a href="user_user.js.html" class="button">View Source</a>
|
|
1815
1788
|
<span>
|
|
1816
|
-
<a href="user_user.js.html">user/user.js</a>, <a href="user_user.js.html#
|
|
1789
|
+
<a href="user_user.js.html">user/user.js</a>, <a href="user_user.js.html#line369">line 369</a>
|
|
1817
1790
|
</span>
|
|
1818
1791
|
</p>
|
|
1819
1792
|
|
package/docs/admin_form.js.html
CHANGED
|
@@ -134,6 +134,32 @@ class AdminForm {
|
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
+
/**
|
|
138
|
+
* @author Myndware <augusto.pissarra@myndware.com>
|
|
139
|
+
* @description Get the types for forms
|
|
140
|
+
* @return {Promise}
|
|
141
|
+
* @public
|
|
142
|
+
* @async
|
|
143
|
+
* @example
|
|
144
|
+
*
|
|
145
|
+
* const API = require('@docbrasil/api-systemmanager');
|
|
146
|
+
* const api = new API();
|
|
147
|
+
* const params = {
|
|
148
|
+
* id: '55e4a3bd6be6b45210833fae',
|
|
149
|
+
* orgId: '5edd11c46b6ce9729c2c297c',
|
|
150
|
+
* };
|
|
151
|
+
* const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
152
|
+
* await api.admin.form.findById(params, session);
|
|
153
|
+
*/
|
|
154
|
+
get types() {
|
|
155
|
+
return {
|
|
156
|
+
BUSINESS: 1,
|
|
157
|
+
ADVANCED: 2,
|
|
158
|
+
CHECKLIST: 3,
|
|
159
|
+
EXTERNAL: 4
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
|
|
137
163
|
/**
|
|
138
164
|
* @author Myndware <augusto.pissarra@myndware.com>
|
|
139
165
|
* @description Get advance form by ID
|
|
@@ -209,7 +235,6 @@ class AdminForm {
|
|
|
209
235
|
Joi.assert(params.sort, Joi.object(), 'Sort fields for');
|
|
210
236
|
Joi.assert(session, Joi.string().required(), 'Session, token JWT');
|
|
211
237
|
|
|
212
|
-
const FORM_ADVANCED = 2;
|
|
213
238
|
const PROJECTION_DEFAULT = {_id: 1, name: 1};
|
|
214
239
|
const SORT_DEFAULT = {name: 1};
|
|
215
240
|
|
|
@@ -217,7 +242,7 @@ class AdminForm {
|
|
|
217
242
|
orgId,
|
|
218
243
|
page = 1,
|
|
219
244
|
perPage = 200,
|
|
220
|
-
type =
|
|
245
|
+
type = self.types.ADVANCED,
|
|
221
246
|
project = PROJECTION_DEFAULT,
|
|
222
247
|
sort = SORT_DEFAULT
|
|
223
248
|
} = params;
|