@docbrasil/api-systemmanager 1.0.111 → 1.0.113
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/user.js +65 -3
- package/api/user/process.js +41 -0
- package/dist/bundle.cjs +106 -3
- package/dist/bundle.mjs +1 -1
- package/doc/api.md +74 -0
- package/docs/AdminUser.html +420 -0
- package/docs/Process.html +1272 -217
- package/docs/admin_user.js.html +65 -3
- package/docs/user_process.js.html +156 -0
- package/package.json +1 -1
- package/.project +0 -11
package/doc/api.md
CHANGED
|
@@ -1064,6 +1064,8 @@ Admin Class for user, permission admin
|
|
|
1064
1064
|
* [.findByIdAndUpdatePassword(params, session)](#AdminUser+findByIdAndUpdatePassword) ⇒ <code>Promise.<unknown></code>
|
|
1065
1065
|
* [.emailExist(email, session)](#AdminUser+emailExist)
|
|
1066
1066
|
* [.findByIdAndUpdate(userId, payload, session)](#AdminUser+findByIdAndUpdate) ⇒ <code>Promise.<\*></code>
|
|
1067
|
+
* [.getChangePasswordGuid(email)](#AdminUser+getChangePasswordGuid) ⇒ <code>Promise.<\*></code>
|
|
1068
|
+
* [.changePasswordGuid(Payload)](#AdminUser+changePasswordGuid) ⇒ <code>Promise.<\*></code>
|
|
1067
1069
|
|
|
1068
1070
|
<a name="AdminUser+findById"></a>
|
|
1069
1071
|
|
|
@@ -1161,6 +1163,47 @@ const payload = {
|
|
|
1161
1163
|
};
|
|
1162
1164
|
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
1163
1165
|
```
|
|
1166
|
+
<a name="AdminUser+getChangePasswordGuid"></a>
|
|
1167
|
+
|
|
1168
|
+
### adminUser.getChangePasswordGuid(email) ⇒ <code>Promise.<\*></code>
|
|
1169
|
+
Request GUID to change the password
|
|
1170
|
+
|
|
1171
|
+
**Kind**: instance method of [<code>AdminUser</code>](#AdminUser)
|
|
1172
|
+
**Access**: public
|
|
1173
|
+
|
|
1174
|
+
| Param | Type | Description |
|
|
1175
|
+
| --- | --- | --- |
|
|
1176
|
+
| email | <code>string</code> | User email |
|
|
1177
|
+
|
|
1178
|
+
**Example**
|
|
1179
|
+
```js
|
|
1180
|
+
const payload = {
|
|
1181
|
+
email: 'maria@gmail.com'
|
|
1182
|
+
};
|
|
1183
|
+
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
1184
|
+
```
|
|
1185
|
+
<a name="AdminUser+changePasswordGuid"></a>
|
|
1186
|
+
|
|
1187
|
+
### adminUser.changePasswordGuid(Payload) ⇒ <code>Promise.<\*></code>
|
|
1188
|
+
Change password guid
|
|
1189
|
+
|
|
1190
|
+
**Kind**: instance method of [<code>AdminUser</code>](#AdminUser)
|
|
1191
|
+
**Access**: public
|
|
1192
|
+
|
|
1193
|
+
| Param | Type | Description |
|
|
1194
|
+
| --- | --- | --- |
|
|
1195
|
+
| Payload | <code>object</code> | Payload to change password |
|
|
1196
|
+
| Payload.guid | <code>string</code> | GUID |
|
|
1197
|
+
| Payload.newPassword | <code>string</code> | New password |
|
|
1198
|
+
|
|
1199
|
+
**Example**
|
|
1200
|
+
```js
|
|
1201
|
+
const payload = {
|
|
1202
|
+
guid: '5b3c049c-4861-4353-a423-5e3f14242642',
|
|
1203
|
+
newPassword: '123456789'
|
|
1204
|
+
};
|
|
1205
|
+
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
1206
|
+
```
|
|
1164
1207
|
<a name="GeoLocation"></a>
|
|
1165
1208
|
|
|
1166
1209
|
## GeoLocation
|
|
@@ -1910,6 +1953,7 @@ Class for process, permission user
|
|
|
1910
1953
|
* [.remove(params, session)](#Process+remove)
|
|
1911
1954
|
* [.exportStatusData(params, session)](#Process+exportStatusData)
|
|
1912
1955
|
* [.exportProcessData(params, session)](#Process+exportProcessData)
|
|
1956
|
+
* [.processDocs(params, session)](#Process+processDocs) ⇒ <code>promise</code> \| <code>array.<object></code>
|
|
1913
1957
|
|
|
1914
1958
|
<a name="Process+start"></a>
|
|
1915
1959
|
|
|
@@ -2105,6 +2149,36 @@ const params = {
|
|
|
2105
2149
|
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
2106
2150
|
const retSearch = await api.user.process.exportProcessData(params, session);
|
|
2107
2151
|
```
|
|
2152
|
+
<a name="Process+processDocs"></a>
|
|
2153
|
+
|
|
2154
|
+
### process.processDocs(params, session) ⇒ <code>promise</code> \| <code>array.<object></code>
|
|
2155
|
+
Method to get Process Docs
|
|
2156
|
+
|
|
2157
|
+
**Kind**: instance method of [<code>Process</code>](#Process)
|
|
2158
|
+
**Returns**: <code>promise</code> - returned data from the get process docs<code>array.<object></code> - Docs returned from process
|
|
2159
|
+
**Access**: public
|
|
2160
|
+
**Author**: CloudBrasil <abernardo.br@gmail.com>
|
|
2161
|
+
|
|
2162
|
+
| Param | Type | Description |
|
|
2163
|
+
| --- | --- | --- |
|
|
2164
|
+
| params | <code>object</code> | Params to get process docs |
|
|
2165
|
+
| params.orgProcessId | <code>string</code> | Organization Process Id |
|
|
2166
|
+
| params.processId | <code>string</code> | Process Id |
|
|
2167
|
+
| params.orgId | <code>string</code> | Organization id (_id database) |
|
|
2168
|
+
| session | <code>string</code> | Session, token JWT |
|
|
2169
|
+
|
|
2170
|
+
**Example**
|
|
2171
|
+
```js
|
|
2172
|
+
const API = require('@docbrasil/api-systemmanager');
|
|
2173
|
+
const api = new API();
|
|
2174
|
+
const params = {
|
|
2175
|
+
orgProcessId: '55e4a3bd6be6b45210833fae',
|
|
2176
|
+
processId: '55e4a3bd6be6b45210833fae',
|
|
2177
|
+
orgId: '55e4a3bd6be6b45210833fae',
|
|
2178
|
+
};
|
|
2179
|
+
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
2180
|
+
const retSearch = await api.user.process.processDocs(params, session);
|
|
2181
|
+
```
|
|
2108
2182
|
<a name="Register"></a>
|
|
2109
2183
|
|
|
2110
2184
|
## Register
|
package/docs/AdminUser.html
CHANGED
|
@@ -224,6 +224,241 @@
|
|
|
224
224
|
|
|
225
225
|
|
|
226
226
|
|
|
227
|
+
<h4 class="name" id="changePasswordGuid">
|
|
228
|
+
<a class="href-link" href="#changePasswordGuid">#</a>
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
<span class='tag'>async</span>
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
<span class="code-name">
|
|
235
|
+
|
|
236
|
+
changePasswordGuid<span class="signature">(Payload)</span><span class="type-signature"> → {Promise.<*>}</span>
|
|
237
|
+
|
|
238
|
+
</span>
|
|
239
|
+
</h4>
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
<div class="description">
|
|
245
|
+
Change password guid
|
|
246
|
+
</div>
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
<h5>Parameters:</h5>
|
|
258
|
+
|
|
259
|
+
<div class="table-container">
|
|
260
|
+
<table class="params table">
|
|
261
|
+
<thead>
|
|
262
|
+
<tr>
|
|
263
|
+
|
|
264
|
+
<th>Name</th>
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
<th>Type</th>
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
<th class="last">Description</th>
|
|
274
|
+
</tr>
|
|
275
|
+
</thead>
|
|
276
|
+
|
|
277
|
+
<tbody>
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
<tr class="deep-level-0">
|
|
282
|
+
|
|
283
|
+
<td class="name"><code>Payload</code></td>
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
<td class="type">
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
<code class="param-type">object</code>
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
</td>
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
<td class="description last">Payload to change password</td>
|
|
300
|
+
</tr>
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
<tr class="deep-level-1">
|
|
306
|
+
|
|
307
|
+
<td class="name"><code>guid</code></td>
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
<td class="type">
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
<code class="param-type">string</code>
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
</td>
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
<td class="description last">GUID</td>
|
|
324
|
+
</tr>
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
<tr class="deep-level-1">
|
|
329
|
+
|
|
330
|
+
<td class="name"><code>newPassword</code></td>
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
<td class="type">
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
<code class="param-type">string</code>
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
</td>
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
<td class="description last">New password</td>
|
|
347
|
+
</tr>
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
</tbody>
|
|
354
|
+
</table>
|
|
355
|
+
</div>
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
<dl class="details">
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
<p class="tag-source">
|
|
394
|
+
<a href="admin_user.js.html" class="button">View Source</a>
|
|
395
|
+
<span>
|
|
396
|
+
<a href="admin_user.js.html">admin/user.js</a>, <a href="admin_user.js.html#line229">line 229</a>
|
|
397
|
+
</span>
|
|
398
|
+
</p>
|
|
399
|
+
|
|
400
|
+
</dl>
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
<div class='columns method-parameter'>
|
|
420
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
421
|
+
<div class="column is-10">
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
<div class="columns">
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
<div class='column is-5 has-text-left'>
|
|
429
|
+
<label>Type: </label>
|
|
430
|
+
|
|
431
|
+
<code class="param-type">Promise.<*></code>
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
</div>
|
|
435
|
+
|
|
436
|
+
</div>
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
</div>
|
|
440
|
+
</div>
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
<h5>Example</h5>
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
<pre class="prettyprint"><code>const payload = {
|
|
449
|
+
guid: '5b3c049c-4861-4353-a423-5e3f14242642',
|
|
450
|
+
newPassword: '123456789'
|
|
451
|
+
};
|
|
452
|
+
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';</code></pre>
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
</div>
|
|
457
|
+
|
|
458
|
+
<div class="member">
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
|
|
227
462
|
<h4 class="name" id="emailExist">
|
|
228
463
|
<a class="href-link" href="#emailExist">#</a>
|
|
229
464
|
|
|
@@ -1162,6 +1397,191 @@ await api.admin.user.findByIdAndUpdatePassword(params, session);</code></pre>
|
|
|
1162
1397
|
|
|
1163
1398
|
|
|
1164
1399
|
|
|
1400
|
+
</div>
|
|
1401
|
+
|
|
1402
|
+
<div class="member">
|
|
1403
|
+
|
|
1404
|
+
|
|
1405
|
+
|
|
1406
|
+
<h4 class="name" id="getChangePasswordGuid">
|
|
1407
|
+
<a class="href-link" href="#getChangePasswordGuid">#</a>
|
|
1408
|
+
|
|
1409
|
+
|
|
1410
|
+
<span class='tag'>async</span>
|
|
1411
|
+
|
|
1412
|
+
|
|
1413
|
+
<span class="code-name">
|
|
1414
|
+
|
|
1415
|
+
getChangePasswordGuid<span class="signature">(email)</span><span class="type-signature"> → {Promise.<*>}</span>
|
|
1416
|
+
|
|
1417
|
+
</span>
|
|
1418
|
+
</h4>
|
|
1419
|
+
|
|
1420
|
+
|
|
1421
|
+
|
|
1422
|
+
|
|
1423
|
+
<div class="description">
|
|
1424
|
+
Request GUID to change the password
|
|
1425
|
+
</div>
|
|
1426
|
+
|
|
1427
|
+
|
|
1428
|
+
|
|
1429
|
+
|
|
1430
|
+
|
|
1431
|
+
|
|
1432
|
+
|
|
1433
|
+
|
|
1434
|
+
|
|
1435
|
+
|
|
1436
|
+
<h5>Parameters:</h5>
|
|
1437
|
+
|
|
1438
|
+
<div class="table-container">
|
|
1439
|
+
<table class="params table">
|
|
1440
|
+
<thead>
|
|
1441
|
+
<tr>
|
|
1442
|
+
|
|
1443
|
+
<th>Name</th>
|
|
1444
|
+
|
|
1445
|
+
|
|
1446
|
+
<th>Type</th>
|
|
1447
|
+
|
|
1448
|
+
|
|
1449
|
+
|
|
1450
|
+
|
|
1451
|
+
|
|
1452
|
+
<th class="last">Description</th>
|
|
1453
|
+
</tr>
|
|
1454
|
+
</thead>
|
|
1455
|
+
|
|
1456
|
+
<tbody>
|
|
1457
|
+
|
|
1458
|
+
|
|
1459
|
+
|
|
1460
|
+
<tr class="deep-level-0">
|
|
1461
|
+
|
|
1462
|
+
<td class="name"><code>email</code></td>
|
|
1463
|
+
|
|
1464
|
+
|
|
1465
|
+
<td class="type">
|
|
1466
|
+
|
|
1467
|
+
|
|
1468
|
+
<code class="param-type">string</code>
|
|
1469
|
+
|
|
1470
|
+
|
|
1471
|
+
|
|
1472
|
+
</td>
|
|
1473
|
+
|
|
1474
|
+
|
|
1475
|
+
|
|
1476
|
+
|
|
1477
|
+
|
|
1478
|
+
<td class="description last">User email</td>
|
|
1479
|
+
</tr>
|
|
1480
|
+
|
|
1481
|
+
|
|
1482
|
+
|
|
1483
|
+
</tbody>
|
|
1484
|
+
</table>
|
|
1485
|
+
</div>
|
|
1486
|
+
|
|
1487
|
+
|
|
1488
|
+
|
|
1489
|
+
|
|
1490
|
+
|
|
1491
|
+
<dl class="details">
|
|
1492
|
+
|
|
1493
|
+
|
|
1494
|
+
|
|
1495
|
+
|
|
1496
|
+
|
|
1497
|
+
|
|
1498
|
+
|
|
1499
|
+
|
|
1500
|
+
|
|
1501
|
+
|
|
1502
|
+
|
|
1503
|
+
|
|
1504
|
+
|
|
1505
|
+
|
|
1506
|
+
|
|
1507
|
+
|
|
1508
|
+
|
|
1509
|
+
|
|
1510
|
+
|
|
1511
|
+
|
|
1512
|
+
|
|
1513
|
+
|
|
1514
|
+
|
|
1515
|
+
|
|
1516
|
+
|
|
1517
|
+
|
|
1518
|
+
|
|
1519
|
+
|
|
1520
|
+
|
|
1521
|
+
|
|
1522
|
+
|
|
1523
|
+
<p class="tag-source">
|
|
1524
|
+
<a href="admin_user.js.html" class="button">View Source</a>
|
|
1525
|
+
<span>
|
|
1526
|
+
<a href="admin_user.js.html">admin/user.js</a>, <a href="admin_user.js.html#line197">line 197</a>
|
|
1527
|
+
</span>
|
|
1528
|
+
</p>
|
|
1529
|
+
|
|
1530
|
+
</dl>
|
|
1531
|
+
|
|
1532
|
+
|
|
1533
|
+
|
|
1534
|
+
|
|
1535
|
+
|
|
1536
|
+
|
|
1537
|
+
|
|
1538
|
+
|
|
1539
|
+
|
|
1540
|
+
|
|
1541
|
+
|
|
1542
|
+
|
|
1543
|
+
|
|
1544
|
+
|
|
1545
|
+
|
|
1546
|
+
|
|
1547
|
+
|
|
1548
|
+
|
|
1549
|
+
<div class='columns method-parameter'>
|
|
1550
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
1551
|
+
<div class="column is-10">
|
|
1552
|
+
|
|
1553
|
+
|
|
1554
|
+
|
|
1555
|
+
<div class="columns">
|
|
1556
|
+
|
|
1557
|
+
|
|
1558
|
+
<div class='column is-5 has-text-left'>
|
|
1559
|
+
<label>Type: </label>
|
|
1560
|
+
|
|
1561
|
+
<code class="param-type">Promise.<*></code>
|
|
1562
|
+
|
|
1563
|
+
|
|
1564
|
+
</div>
|
|
1565
|
+
|
|
1566
|
+
</div>
|
|
1567
|
+
|
|
1568
|
+
|
|
1569
|
+
</div>
|
|
1570
|
+
</div>
|
|
1571
|
+
|
|
1572
|
+
|
|
1573
|
+
|
|
1574
|
+
|
|
1575
|
+
<h5>Example</h5>
|
|
1576
|
+
|
|
1577
|
+
|
|
1578
|
+
<pre class="prettyprint"><code>const payload = {
|
|
1579
|
+
email: 'maria@gmail.com'
|
|
1580
|
+
};
|
|
1581
|
+
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';</code></pre>
|
|
1582
|
+
|
|
1583
|
+
|
|
1584
|
+
|
|
1165
1585
|
</div>
|
|
1166
1586
|
|
|
1167
1587
|
</div>
|