@docbrasil/api-systemmanager 1.0.105 → 1.0.107

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/doc/api.md CHANGED
@@ -1894,6 +1894,7 @@ Class for process, permission user
1894
1894
  * [.start(params, session)](#Process+start) ⇒ <code>Promise</code>
1895
1895
  * [.getProcessProperties(params, session)](#Process+getProcessProperties) ⇒ <code>Promise</code>
1896
1896
  * [.getOrgProcessSearchInfo(params, session)](#Process+getOrgProcessSearchInfo) ⇒ <code>Promise</code> \| <code>string</code> \| <code>object</code> \| <code>object</code> \| <code>object</code> \| <code>string</code>
1897
+ * [.find(params, session)](#Process+find) ⇒ <code>promise</code> \| <code>number</code> \| <code>array.&lt;object&gt;</code> \| <code>number</code> \| <code>number</code>
1897
1898
 
1898
1899
  <a name="Process+start"></a>
1899
1900
 
@@ -1980,6 +1981,34 @@ const params = {
1980
1981
  const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
1981
1982
  const retSearchInfo = await api.user.process.getOrgProcessSearchInfo(params, session);
1982
1983
  ```
1984
+ <a name="Process+find"></a>
1985
+
1986
+ ### process.find(params, session) ⇒ <code>promise</code> \| <code>number</code> \| <code>array.&lt;object&gt;</code> \| <code>number</code> \| <code>number</code>
1987
+ Method to search processes
1988
+
1989
+ **Kind**: instance method of [<code>Process</code>](#Process)
1990
+ **Returns**: <code>promise</code> - returned data from the search<code>number</code> - count the count of items searched<code>array.&lt;object&gt;</code> - items the items returned from search<code>number</code> - page the page of the search (on pagination), zero indexed<code>number</code> - perPage how many items per page
1991
+ **Access**: public
1992
+ **Author**: CloudBrasil <abernardo.br@gmail.com>
1993
+
1994
+ | Param | Type | Description |
1995
+ | --- | --- | --- |
1996
+ | params | <code>object</code> | Params to search processes |
1997
+ | params.query | <code>object</code> | Search process query |
1998
+ | params.orgId | <code>object</code> | Organization id (_id database) |
1999
+ | session | <code>string</code> | Session, token JWT |
2000
+
2001
+ **Example**
2002
+ ```js
2003
+ const API = require('@docbrasil/api-systemmanager');
2004
+ const api = new API();
2005
+ const params = {
2006
+ query: {"orgProcessId": {"value":"62c2d1cdfb5455c195d1baa1","oper":"=","type":"string"},"s":[{"historyBegin":{"order":"desc"}}],"i":1,"p":20},
2007
+ orgId: '55e4a3bd6be6b45210833fae',
2008
+ };
2009
+ const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
2010
+ const retSearch = await api.user.process.find(params, session);
2011
+ ```
1983
2012
  <a name="Register"></a>
1984
2013
 
1985
2014
  ## Register
@@ -2228,7 +2257,7 @@ Method to find available tasks for a user
2228
2257
  | Param | Type | Description |
2229
2258
  | --- | --- | --- |
2230
2259
  | params | <code>object</code> | Params to get task |
2231
- | params.query | <code>object</code> | Search process query |
2260
+ | params.query | <code>object</code> | Search available tasks query |
2232
2261
  | params.orgId | <code>object</code> | Organization id (_id database) |
2233
2262
  | session | <code>string</code> | Session, token JWT |
2234
2263
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@docbrasil/api-systemmanager",
3
3
  "description": "Module API System Manager",
4
- "version": "1.0.105",
4
+ "version": "1.0.107",
5
5
  "scripts": {
6
6
  "doc": "rm -f doc/api.md && jsdoc2md api/**/** > doc/api.md",
7
7
  "doc:w": "rimraf doc/api.md && jsdoc2md api/**/** > doc/api.md",