@docbrasil/api-systemmanager 1.0.107 → 1.0.108

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.
Files changed (73) hide show
  1. package/.github/workflows/static.yml +43 -0
  2. package/api/external.js +41 -0
  3. package/dist/bundle.cjs +41 -0
  4. package/dist/bundle.mjs +1 -1
  5. package/doc/api.md +382 -0
  6. package/docs/Admin.html +336 -0
  7. package/docs/AdminDocuments.html +2235 -0
  8. package/docs/AdminForm.html +934 -0
  9. package/docs/AdminLists.html +895 -0
  10. package/docs/AdminMessage.html +1490 -0
  11. package/docs/AdminNotification.html +1636 -0
  12. package/docs/AdminPlugin.html +696 -0
  13. package/docs/AdminPolicy.html +451 -0
  14. package/docs/AdminProcesses.html +692 -0
  15. package/docs/AdminTask.html +740 -0
  16. package/docs/AdminUser.html +1203 -0
  17. package/docs/Datasource.html +660 -0
  18. package/docs/Dispatch.html +624 -0
  19. package/docs/Documents.html +4875 -0
  20. package/docs/External.html +1203 -0
  21. package/docs/GeoLocation.html +503 -0
  22. package/docs/Login.html +1839 -0
  23. package/docs/Notification.html +625 -0
  24. package/docs/Organization.html +2767 -0
  25. package/docs/Process.html +1598 -0
  26. package/docs/Register.html +1604 -0
  27. package/docs/Session.html +482 -0
  28. package/docs/Task.html +1394 -0
  29. package/docs/TaskAvailable.html +893 -0
  30. package/docs/User.html +2002 -0
  31. package/docs/Users.html +569 -0
  32. package/docs/admin_doctypes.js.html +193 -0
  33. package/docs/admin_document.js.html +449 -0
  34. package/docs/admin_form.js.html +268 -0
  35. package/docs/admin_index.js.html +163 -0
  36. package/docs/admin_list.js.html +250 -0
  37. package/docs/admin_message.js.html +311 -0
  38. package/docs/admin_notification.js.html +350 -0
  39. package/docs/admin_organization.js.html +241 -0
  40. package/docs/admin_plugin.js.html +233 -0
  41. package/docs/admin_policy.js.html +195 -0
  42. package/docs/admin_processes.js.html +487 -0
  43. package/docs/admin_task.js.html +242 -0
  44. package/docs/admin_user.js.html +302 -0
  45. package/docs/dispatch.js.html +218 -0
  46. package/docs/external.js.html +333 -0
  47. package/docs/general_geoLocation.js.html +205 -0
  48. package/docs/general_index.js.html +140 -0
  49. package/docs/index.html +129 -0
  50. package/docs/login.js.html +384 -0
  51. package/docs/scripts/app.min.js +1 -0
  52. package/docs/scripts/linenumber.js +26 -0
  53. package/docs/scripts/search.js +39 -0
  54. package/docs/session.js.html +202 -0
  55. package/docs/styles/app.min.css +1 -0
  56. package/docs/styles/iframe.css +13 -0
  57. package/docs/styles/prettify-jsdoc.css +111 -0
  58. package/docs/styles/prettify-tomorrow.css +132 -0
  59. package/docs/styles/reset.css +44 -0
  60. package/docs/user_datasource.js.html +261 -0
  61. package/docs/user_document.js.html +847 -0
  62. package/docs/user_index.js.html +156 -0
  63. package/docs/user_notification.js.html +218 -0
  64. package/docs/user_organization.js.html +347 -0
  65. package/docs/user_process.js.html +352 -0
  66. package/docs/user_register.js.html +322 -0
  67. package/docs/user_task.js.html +319 -0
  68. package/docs/user_task_available.js.html +252 -0
  69. package/docs/user_user.js.html +404 -0
  70. package/docs/utils_promises.js.html +235 -0
  71. package/package.json +7 -4
  72. package/readme.md +7 -8
  73. package/doc.md +0 -653
package/docs/User.html ADDED
@@ -0,0 +1,2002 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+
6
+ <meta charset="utf-8">
7
+ <meta name="viewport" content="width=device-width, initial-scale=1">
8
+ <title> User</title>
9
+
10
+ <script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js"></script>
11
+ <script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
12
+ <script src="./build/entry.js"></script>
13
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
14
+ <!--[if lt IE 9]>
15
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
16
+ <![endif]-->
17
+ <link href="https://fonts.googleapis.com/css?family=Roboto:100,400,700|Inconsolata,700" rel="stylesheet">
18
+ <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
19
+ <link type="text/css" rel="stylesheet" href="https://jmblog.github.io/color-themes-for-google-code-prettify/themes/tomorrow-night.min.css">
20
+ <link type="text/css" rel="stylesheet" href="styles/app.min.css">
21
+ <link type="text/css" rel="stylesheet" href="styles/iframe.css">
22
+ <link type="text/css" rel="stylesheet" href="">
23
+ <script async defer src="https://buttons.github.io/buttons.js"></script>
24
+
25
+
26
+ </head>
27
+
28
+
29
+
30
+ <body class="layout small-header">
31
+ <div id="stickyNavbarOverlay"></div>
32
+
33
+
34
+ <div class="top-nav">
35
+ <div class="inner">
36
+ <a id="hamburger" role="button" class="navbar-burger" aria-label="menu" aria-expanded="false">
37
+ <span aria-hidden="true"></span>
38
+ <span aria-hidden="true"></span>
39
+ <span aria-hidden="true"></span>
40
+ </a>
41
+ <div class="logo">
42
+
43
+
44
+ </div>
45
+ <div class="menu">
46
+
47
+ <div class="navigation">
48
+ <a
49
+ href="index.html"
50
+ class="link"
51
+ >
52
+ Documentation
53
+ </a>
54
+
55
+
56
+
57
+ </div>
58
+ </div>
59
+ </div>
60
+ </div>
61
+ <div id="main">
62
+ <div
63
+ class="sidebar "
64
+ id="sidebarNav"
65
+ >
66
+
67
+ <nav>
68
+
69
+ <h2><a href="index.html">Documentation</a></h2><div class="category"><h3>Classes</h3><ul><li><a href="Admin.html">Admin</a></li><li><a href="AdminDocuments.html">AdminDocuments</a></li><li><a href="AdminForm.html">AdminForm</a></li><li><a href="AdminLists.html">AdminLists</a></li><li><a href="AdminMessage.html">AdminMessage</a></li><li><a href="AdminNotification.html">AdminNotification</a></li><li><a href="AdminPlugin.html">AdminPlugin</a></li><li><a href="AdminPolicy.html">AdminPolicy</a></li><li><a href="AdminProcesses.html">AdminProcesses</a></li><li><a href="AdminTask.html">AdminTask</a></li><li><a href="AdminUser.html">AdminUser</a></li><li><a href="Datasource.html">Datasource</a></li><li><a href="Dispatch.html">Dispatch</a></li><li><a href="Documents.html">Documents</a></li><li><a href="External.html">External</a></li><li><a href="GeoLocation.html">GeoLocation</a></li><li><a href="Login.html">Login</a></li><li><a href="Notification.html">Notification</a></li><li><a href="Organization.html">Organization</a></li><li><a href="Process.html">Process</a></li><li><a href="Register.html">Register</a></li><li><a href="Session.html">Session</a></li><li><a href="Task.html">Task</a></li><li><a href="TaskAvailable.html">TaskAvailable</a></li><li><a href="User.html">User</a></li><li><a href="Users.html">Users</a></li></ul></div>
70
+
71
+ </nav>
72
+ </div>
73
+ <div class="core" id="main-content-wrapper">
74
+ <div class="content">
75
+ <header class="page-title">
76
+ <p>Class</p>
77
+ <h1>User</h1>
78
+ </header>
79
+
80
+
81
+
82
+
83
+
84
+ <section>
85
+
86
+ <header>
87
+
88
+ <h2><span class="attribs"><span class="type-signature"></span></span>User<span class="signature">()</span><span class="type-signature"></span></h2>
89
+
90
+ <div class="class-description">Class for user, permission user</div>
91
+
92
+
93
+ </header>
94
+
95
+ <article>
96
+ <div class="container-overview">
97
+
98
+
99
+ <div class='vertical-section'>
100
+ <div class="members">
101
+ <div class="member">
102
+ <div class=name>
103
+ <span class="tag">Constructor</span>
104
+ </div>
105
+
106
+
107
+
108
+
109
+ <h4 class="name" id="User">
110
+ <a class="href-link" href="#User">#</a>
111
+
112
+ <span class="code-name">
113
+
114
+ new User<span class="signature">()</span><span class="type-signature"></span>
115
+
116
+ </span>
117
+ </h4>
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+ <dl class="details">
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+ <p class="tag-source">
168
+ <a href="user_user.js.html" class="button">View Source</a>
169
+ <span>
170
+ <a href="user_user.js.html">user/user.js</a>, <a href="user_user.js.html#line9">line 9</a>
171
+ </span>
172
+ </p>
173
+
174
+ </dl>
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+ </div>
198
+ </div>
199
+ </div>
200
+
201
+
202
+ </div>
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+ <div class='vertical-section'>
220
+ <h1>Methods</h1>
221
+ <div class="members">
222
+
223
+ <div class="member">
224
+
225
+
226
+
227
+ <h4 class="name" id="changeOrganization">
228
+ <a class="href-link" href="#changeOrganization">#</a>
229
+
230
+
231
+ <span class='tag'>async</span>
232
+
233
+
234
+ <span class="code-name">
235
+
236
+ changeOrganization<span class="signature">(id, session)</span><span class="type-signature"> &rarr; {Promise}</span>
237
+
238
+ </span>
239
+ </h4>
240
+
241
+
242
+
243
+
244
+ <div class="description">
245
+ Change a user's organization
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>id</code></td>
284
+
285
+
286
+ <td class="type">
287
+
288
+
289
+ <code class="param-type">string</code>
290
+
291
+
292
+
293
+ </td>
294
+
295
+
296
+
297
+
298
+
299
+ <td class="description last">Organization id</td>
300
+ </tr>
301
+
302
+
303
+
304
+
305
+
306
+ <tr class="deep-level-0">
307
+
308
+ <td class="name"><code>session</code></td>
309
+
310
+
311
+ <td class="type">
312
+
313
+
314
+ <code class="param-type">string</code>
315
+
316
+
317
+
318
+ </td>
319
+
320
+
321
+
322
+
323
+
324
+ <td class="description last">Is token JWT of user NOT allow SU</td>
325
+ </tr>
326
+
327
+
328
+
329
+ </tbody>
330
+ </table>
331
+ </div>
332
+
333
+
334
+
335
+
336
+
337
+ <dl class="details">
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+
351
+
352
+
353
+
354
+
355
+
356
+ <dt class="tag-author">Author:</dt>
357
+ <dd class="tag-author">
358
+ <ul>
359
+ <li><a href="mailto:abernardo.br@gmail.com">CloudBrasil</a></li>
360
+ </ul>
361
+ </dd>
362
+
363
+
364
+
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+
374
+
375
+
376
+ <p class="tag-source">
377
+ <a href="user_user.js.html" class="button">View Source</a>
378
+ <span>
379
+ <a href="user_user.js.html">user/user.js</a>, <a href="user_user.js.html#line272">line 272</a>
380
+ </span>
381
+ </p>
382
+
383
+ </dl>
384
+
385
+
386
+
387
+
388
+
389
+
390
+
391
+
392
+
393
+
394
+
395
+
396
+
397
+
398
+
399
+
400
+
401
+
402
+ <div class='columns method-parameter'>
403
+ <div class="column is-2"><label>Returns:</label></div>
404
+ <div class="column is-10">
405
+
406
+
407
+
408
+ <div class="columns">
409
+
410
+
411
+ <div class='column is-5 has-text-left'>
412
+ <label>Type: </label>
413
+
414
+ <code class="param-type">Promise</code>
415
+
416
+
417
+ </div>
418
+
419
+ </div>
420
+
421
+
422
+ </div>
423
+ </div>
424
+
425
+
426
+
427
+
428
+ <h5>Example</h5>
429
+
430
+
431
+ <pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
432
+ const api = new API();
433
+ const id = '616eccaaa9360a05293b10fe';
434
+ const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
435
+ await api.user.changeOrganization.updateAvatar(id, session);</code></pre>
436
+
437
+
438
+
439
+ </div>
440
+
441
+ <div class="member">
442
+
443
+
444
+
445
+ <h4 class="name" id="findByIdAndUpdate">
446
+ <a class="href-link" href="#findByIdAndUpdate">#</a>
447
+
448
+
449
+ <span class='tag'>async</span>
450
+
451
+
452
+ <span class="code-name">
453
+
454
+ findByIdAndUpdate<span class="signature">(params, session)</span><span class="type-signature"> &rarr; {Promise.&lt;void>}</span>
455
+
456
+ </span>
457
+ </h4>
458
+
459
+
460
+
461
+
462
+ <div class="description">
463
+ Update a user profile by id
464
+ </div>
465
+
466
+
467
+
468
+
469
+
470
+
471
+
472
+
473
+
474
+
475
+ <h5>Parameters:</h5>
476
+
477
+ <div class="table-container">
478
+ <table class="params table">
479
+ <thead>
480
+ <tr>
481
+
482
+ <th>Name</th>
483
+
484
+
485
+ <th>Type</th>
486
+
487
+
488
+
489
+
490
+
491
+ <th class="last">Description</th>
492
+ </tr>
493
+ </thead>
494
+
495
+ <tbody>
496
+
497
+
498
+
499
+ <tr class="deep-level-0">
500
+
501
+ <td class="name"><code>params</code></td>
502
+
503
+
504
+ <td class="type">
505
+
506
+
507
+ <code class="param-type">object</code>
508
+
509
+
510
+
511
+ </td>
512
+
513
+
514
+
515
+
516
+
517
+ <td class="description last">Params to update task</td>
518
+ </tr>
519
+
520
+
521
+
522
+
523
+ <tr class="deep-level-1">
524
+
525
+ <td class="name"><code>name</code></td>
526
+
527
+
528
+ <td class="type">
529
+
530
+
531
+ <code class="param-type">string</code>
532
+
533
+
534
+
535
+ </td>
536
+
537
+
538
+
539
+
540
+
541
+ <td class="description last">The name of the user</td>
542
+ </tr>
543
+
544
+
545
+
546
+ <tr class="deep-level-1">
547
+
548
+ <td class="name"><code>site</code></td>
549
+
550
+
551
+ <td class="type">
552
+
553
+
554
+ <code class="param-type">string</code>
555
+
556
+
557
+
558
+ </td>
559
+
560
+
561
+
562
+
563
+
564
+ <td class="description last">The site of the user</td>
565
+ </tr>
566
+
567
+
568
+
569
+ <tr class="deep-level-1">
570
+
571
+ <td class="name"><code>faceboook</code></td>
572
+
573
+
574
+ <td class="type">
575
+
576
+
577
+ <code class="param-type">string</code>
578
+
579
+
580
+
581
+ </td>
582
+
583
+
584
+
585
+
586
+
587
+ <td class="description last">The faceboook of the user</td>
588
+ </tr>
589
+
590
+
591
+
592
+ <tr class="deep-level-1">
593
+
594
+ <td class="name"><code>linkedin</code></td>
595
+
596
+
597
+ <td class="type">
598
+
599
+
600
+ <code class="param-type">string</code>
601
+
602
+
603
+
604
+ </td>
605
+
606
+
607
+
608
+
609
+
610
+ <td class="description last">The linkedin of the user</td>
611
+ </tr>
612
+
613
+
614
+
615
+ <tr class="deep-level-1">
616
+
617
+ <td class="name"><code>dob</code></td>
618
+
619
+
620
+ <td class="type">
621
+
622
+
623
+ <code class="param-type">date</code>
624
+
625
+
626
+
627
+ </td>
628
+
629
+
630
+
631
+
632
+
633
+ <td class="description last">The date of birth of the user</td>
634
+ </tr>
635
+
636
+
637
+
638
+ <tr class="deep-level-1">
639
+
640
+ <td class="name"><code>gender</code></td>
641
+
642
+
643
+ <td class="type">
644
+
645
+
646
+ <code class="param-type">number.&lt;UserGender></code>
647
+
648
+
649
+
650
+ </td>
651
+
652
+
653
+
654
+
655
+
656
+ <td class="description last">The gender of of the user self.gender</td>
657
+ </tr>
658
+
659
+
660
+
661
+ <tr class="deep-level-1">
662
+
663
+ <td class="name"><code>phone</code></td>
664
+
665
+
666
+ <td class="type">
667
+
668
+
669
+ <code class="param-type">string</code>
670
+
671
+
672
+
673
+ </td>
674
+
675
+
676
+
677
+
678
+
679
+ <td class="description last">The phone</td>
680
+ </tr>
681
+
682
+
683
+
684
+ <tr class="deep-level-1">
685
+
686
+ <td class="name"><code>phone2</code></td>
687
+
688
+
689
+ <td class="type">
690
+
691
+
692
+ <code class="param-type">string</code>
693
+
694
+
695
+
696
+ </td>
697
+
698
+
699
+
700
+
701
+
702
+ <td class="description last">The phone 2</td>
703
+ </tr>
704
+
705
+
706
+
707
+ <tr class="deep-level-1">
708
+
709
+ <td class="name"><code>phone3</code></td>
710
+
711
+
712
+ <td class="type">
713
+
714
+
715
+ <code class="param-type">string</code>
716
+
717
+
718
+
719
+ </td>
720
+
721
+
722
+
723
+
724
+
725
+ <td class="description last">The phone 3</td>
726
+ </tr>
727
+
728
+
729
+
730
+ <tr class="deep-level-1">
731
+
732
+ <td class="name"><code>password</code></td>
733
+
734
+
735
+ <td class="type">
736
+
737
+
738
+ <code class="param-type">string</code>
739
+
740
+
741
+
742
+ </td>
743
+
744
+
745
+
746
+
747
+
748
+ <td class="description last">The password to change</td>
749
+ </tr>
750
+
751
+
752
+
753
+ <tr class="deep-level-1">
754
+
755
+ <td class="name"><code>secQuestion</code></td>
756
+
757
+
758
+ <td class="type">
759
+
760
+
761
+ <code class="param-type">string</code>
762
+
763
+
764
+
765
+ </td>
766
+
767
+
768
+
769
+
770
+
771
+ <td class="description last">The security question</td>
772
+ </tr>
773
+
774
+
775
+
776
+ <tr class="deep-level-1">
777
+
778
+ <td class="name"><code>secAnswer</code></td>
779
+
780
+
781
+ <td class="type">
782
+
783
+
784
+ <code class="param-type">string</code>
785
+
786
+
787
+
788
+ </td>
789
+
790
+
791
+
792
+
793
+
794
+ <td class="description last">The security answer</td>
795
+ </tr>
796
+
797
+
798
+
799
+ <tr class="deep-level-1">
800
+
801
+ <td class="name"><code>timezone</code></td>
802
+
803
+
804
+ <td class="type">
805
+
806
+
807
+ <code class="param-type">string</code>
808
+
809
+
810
+
811
+ </td>
812
+
813
+
814
+
815
+
816
+
817
+ <td class="description last">The timezone</td>
818
+ </tr>
819
+
820
+
821
+
822
+ <tr class="deep-level-1">
823
+
824
+ <td class="name"><code>userLanguage</code></td>
825
+
826
+
827
+ <td class="type">
828
+
829
+
830
+ <code class="param-type">string</code>
831
+
832
+
833
+
834
+ </td>
835
+
836
+
837
+
838
+
839
+
840
+ <td class="description last">The user language</td>
841
+ </tr>
842
+
843
+
844
+
845
+ <tr class="deep-level-1">
846
+
847
+ <td class="name"><code>changePassword</code></td>
848
+
849
+
850
+ <td class="type">
851
+
852
+
853
+ <code class="param-type">string</code>
854
+
855
+
856
+
857
+ </td>
858
+
859
+
860
+
861
+
862
+
863
+ <td class="description last">(required) If we need to change the status and we changed the password</td>
864
+ </tr>
865
+
866
+
867
+
868
+ <tr class="deep-level-1">
869
+
870
+ <td class="name"><code>acceptTermsOfUse</code></td>
871
+
872
+
873
+ <td class="type">
874
+
875
+
876
+ <code class="param-type">string</code>
877
+
878
+
879
+
880
+ </td>
881
+
882
+
883
+
884
+
885
+
886
+ <td class="description last">If the user has accepted the terms of change</td>
887
+ </tr>
888
+
889
+
890
+
891
+
892
+
893
+
894
+
895
+ <tr class="deep-level-0">
896
+
897
+ <td class="name"><code>session</code></td>
898
+
899
+
900
+ <td class="type">
901
+
902
+
903
+ <code class="param-type">string</code>
904
+
905
+
906
+
907
+ </td>
908
+
909
+
910
+
911
+
912
+
913
+ <td class="description last">Session, token JWT</td>
914
+ </tr>
915
+
916
+
917
+
918
+ </tbody>
919
+ </table>
920
+ </div>
921
+
922
+
923
+
924
+
925
+
926
+ <dl class="details">
927
+
928
+
929
+
930
+
931
+
932
+
933
+
934
+
935
+
936
+
937
+
938
+
939
+
940
+
941
+
942
+
943
+
944
+
945
+ <dt class="tag-author">Author:</dt>
946
+ <dd class="tag-author">
947
+ <ul>
948
+ <li><a href="mailto:abernardo.br@gmail.com">CloudBrasil</a></li>
949
+ </ul>
950
+ </dd>
951
+
952
+
953
+
954
+
955
+
956
+
957
+
958
+
959
+
960
+
961
+
962
+
963
+
964
+
965
+ <p class="tag-source">
966
+ <a href="user_user.js.html" class="button">View Source</a>
967
+ <span>
968
+ <a href="user_user.js.html">user/user.js</a>, <a href="user_user.js.html#line230">line 230</a>
969
+ </span>
970
+ </p>
971
+
972
+ </dl>
973
+
974
+
975
+
976
+
977
+
978
+
979
+
980
+
981
+
982
+
983
+
984
+
985
+
986
+
987
+
988
+
989
+
990
+
991
+ <div class='columns method-parameter'>
992
+ <div class="column is-2"><label>Returns:</label></div>
993
+ <div class="column is-10">
994
+
995
+
996
+
997
+ <div class="columns">
998
+
999
+
1000
+ <div class='column is-5 has-text-left'>
1001
+ <label>Type: </label>
1002
+
1003
+ <code class="param-type">Promise.&lt;void></code>
1004
+
1005
+
1006
+ </div>
1007
+
1008
+ </div>
1009
+
1010
+
1011
+ </div>
1012
+ </div>
1013
+
1014
+
1015
+
1016
+
1017
+ <h5>Example</h5>
1018
+
1019
+
1020
+ <pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
1021
+ const api = new API();
1022
+ const params = {
1023
+ name: 'New Name'
1024
+ };
1025
+ const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
1026
+ await api.user.profile.findByIdAndUpdate(params, session);</code></pre>
1027
+
1028
+
1029
+
1030
+ </div>
1031
+
1032
+ <div class="member">
1033
+
1034
+
1035
+
1036
+ <h4 class="name" id="removeAvatar">
1037
+ <a class="href-link" href="#removeAvatar">#</a>
1038
+
1039
+
1040
+ <span class='tag'>async</span>
1041
+
1042
+
1043
+ <span class="code-name">
1044
+
1045
+ removeAvatar<span class="signature">(session)</span><span class="type-signature"> &rarr; {Promise}</span>
1046
+
1047
+ </span>
1048
+ </h4>
1049
+
1050
+
1051
+
1052
+
1053
+ <div class="description">
1054
+ Remove avatar of user by session of user not allow session user SU
1055
+ </div>
1056
+
1057
+
1058
+
1059
+
1060
+
1061
+
1062
+
1063
+
1064
+
1065
+
1066
+ <h5>Parameters:</h5>
1067
+
1068
+ <div class="table-container">
1069
+ <table class="params table">
1070
+ <thead>
1071
+ <tr>
1072
+
1073
+ <th>Name</th>
1074
+
1075
+
1076
+ <th>Type</th>
1077
+
1078
+
1079
+
1080
+
1081
+
1082
+ <th class="last">Description</th>
1083
+ </tr>
1084
+ </thead>
1085
+
1086
+ <tbody>
1087
+
1088
+
1089
+
1090
+ <tr class="deep-level-0">
1091
+
1092
+ <td class="name"><code>session</code></td>
1093
+
1094
+
1095
+ <td class="type">
1096
+
1097
+
1098
+ <code class="param-type">string</code>
1099
+
1100
+
1101
+
1102
+ </td>
1103
+
1104
+
1105
+
1106
+
1107
+
1108
+ <td class="description last">Is token JWT of user NOT allow SU</td>
1109
+ </tr>
1110
+
1111
+
1112
+
1113
+ </tbody>
1114
+ </table>
1115
+ </div>
1116
+
1117
+
1118
+
1119
+
1120
+
1121
+ <dl class="details">
1122
+
1123
+
1124
+
1125
+
1126
+
1127
+
1128
+
1129
+
1130
+
1131
+
1132
+
1133
+
1134
+
1135
+
1136
+
1137
+
1138
+
1139
+
1140
+ <dt class="tag-author">Author:</dt>
1141
+ <dd class="tag-author">
1142
+ <ul>
1143
+ <li><a href="mailto:abernardo.br@gmail.com">CloudBrasil</a></li>
1144
+ </ul>
1145
+ </dd>
1146
+
1147
+
1148
+
1149
+
1150
+
1151
+
1152
+
1153
+
1154
+
1155
+
1156
+
1157
+
1158
+
1159
+
1160
+ <p class="tag-source">
1161
+ <a href="user_user.js.html" class="button">View Source</a>
1162
+ <span>
1163
+ <a href="user_user.js.html">user/user.js</a>, <a href="user_user.js.html#line109">line 109</a>
1164
+ </span>
1165
+ </p>
1166
+
1167
+ </dl>
1168
+
1169
+
1170
+
1171
+
1172
+
1173
+
1174
+
1175
+
1176
+
1177
+
1178
+
1179
+
1180
+
1181
+
1182
+
1183
+
1184
+
1185
+
1186
+ <div class='columns method-parameter'>
1187
+ <div class="column is-2"><label>Returns:</label></div>
1188
+ <div class="column is-10">
1189
+
1190
+
1191
+
1192
+ <div class="columns">
1193
+
1194
+
1195
+ <div class='column is-5 has-text-left'>
1196
+ <label>Type: </label>
1197
+
1198
+ <code class="param-type">Promise</code>
1199
+
1200
+
1201
+ </div>
1202
+
1203
+ </div>
1204
+
1205
+
1206
+ </div>
1207
+ </div>
1208
+
1209
+
1210
+
1211
+
1212
+ <h5>Example</h5>
1213
+
1214
+
1215
+ <pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
1216
+ const api = new API();
1217
+ const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
1218
+ await api.user.profile.removeAvatar(session);</code></pre>
1219
+
1220
+
1221
+
1222
+ </div>
1223
+
1224
+ <div class="member">
1225
+
1226
+
1227
+
1228
+ <h4 class="name" id="removeSignature">
1229
+ <a class="href-link" href="#removeSignature">#</a>
1230
+
1231
+
1232
+ <span class='tag'>async</span>
1233
+
1234
+
1235
+ <span class="code-name">
1236
+
1237
+ removeSignature<span class="signature">(session)</span><span class="type-signature"> &rarr; {Promise}</span>
1238
+
1239
+ </span>
1240
+ </h4>
1241
+
1242
+
1243
+
1244
+
1245
+ <div class="description">
1246
+ Remove the signature of user by session
1247
+ </div>
1248
+
1249
+
1250
+
1251
+
1252
+
1253
+
1254
+
1255
+
1256
+
1257
+
1258
+ <h5>Parameters:</h5>
1259
+
1260
+ <div class="table-container">
1261
+ <table class="params table">
1262
+ <thead>
1263
+ <tr>
1264
+
1265
+ <th>Name</th>
1266
+
1267
+
1268
+ <th>Type</th>
1269
+
1270
+
1271
+
1272
+
1273
+
1274
+ <th class="last">Description</th>
1275
+ </tr>
1276
+ </thead>
1277
+
1278
+ <tbody>
1279
+
1280
+
1281
+
1282
+ <tr class="deep-level-0">
1283
+
1284
+ <td class="name"><code>session</code></td>
1285
+
1286
+
1287
+ <td class="type">
1288
+
1289
+
1290
+ <code class="param-type">string</code>
1291
+
1292
+
1293
+
1294
+ </td>
1295
+
1296
+
1297
+
1298
+
1299
+
1300
+ <td class="description last">Is token JWT of user NOT allow SU</td>
1301
+ </tr>
1302
+
1303
+
1304
+
1305
+ </tbody>
1306
+ </table>
1307
+ </div>
1308
+
1309
+
1310
+
1311
+
1312
+
1313
+ <dl class="details">
1314
+
1315
+
1316
+
1317
+
1318
+
1319
+
1320
+
1321
+
1322
+
1323
+
1324
+
1325
+
1326
+
1327
+
1328
+
1329
+
1330
+
1331
+
1332
+ <dt class="tag-author">Author:</dt>
1333
+ <dd class="tag-author">
1334
+ <ul>
1335
+ <li><a href="mailto:abernardo.br@gmail.com">CloudBrasil</a></li>
1336
+ </ul>
1337
+ </dd>
1338
+
1339
+
1340
+
1341
+
1342
+
1343
+
1344
+
1345
+
1346
+
1347
+
1348
+
1349
+
1350
+
1351
+
1352
+ <p class="tag-source">
1353
+ <a href="user_user.js.html" class="button">View Source</a>
1354
+ <span>
1355
+ <a href="user_user.js.html">user/user.js</a>, <a href="user_user.js.html#line136">line 136</a>
1356
+ </span>
1357
+ </p>
1358
+
1359
+ </dl>
1360
+
1361
+
1362
+
1363
+
1364
+
1365
+
1366
+
1367
+
1368
+
1369
+
1370
+
1371
+
1372
+
1373
+
1374
+
1375
+
1376
+
1377
+
1378
+ <div class='columns method-parameter'>
1379
+ <div class="column is-2"><label>Returns:</label></div>
1380
+ <div class="column is-10">
1381
+
1382
+
1383
+
1384
+ <div class="columns">
1385
+
1386
+
1387
+ <div class='column is-5 has-text-left'>
1388
+ <label>Type: </label>
1389
+
1390
+ <code class="param-type">Promise</code>
1391
+
1392
+
1393
+ </div>
1394
+
1395
+ </div>
1396
+
1397
+
1398
+ </div>
1399
+ </div>
1400
+
1401
+
1402
+
1403
+
1404
+ <h5>Example</h5>
1405
+
1406
+
1407
+ <pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
1408
+ const api = new API();
1409
+ const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
1410
+ await api.user.profile.removeSignature(session);</code></pre>
1411
+
1412
+
1413
+
1414
+ </div>
1415
+
1416
+ <div class="member">
1417
+
1418
+
1419
+
1420
+ <h4 class="name" id="saveSignature">
1421
+ <a class="href-link" href="#saveSignature">#</a>
1422
+
1423
+
1424
+ <span class='tag'>async</span>
1425
+
1426
+
1427
+ <span class="code-name">
1428
+
1429
+ saveSignature<span class="signature">(data, session)</span><span class="type-signature"> &rarr; {Promise}</span>
1430
+
1431
+ </span>
1432
+ </h4>
1433
+
1434
+
1435
+
1436
+
1437
+ <div class="description">
1438
+ Sava a new signature of user by session
1439
+ </div>
1440
+
1441
+
1442
+
1443
+
1444
+
1445
+
1446
+
1447
+
1448
+
1449
+
1450
+ <h5>Parameters:</h5>
1451
+
1452
+ <div class="table-container">
1453
+ <table class="params table">
1454
+ <thead>
1455
+ <tr>
1456
+
1457
+ <th>Name</th>
1458
+
1459
+
1460
+ <th>Type</th>
1461
+
1462
+
1463
+
1464
+
1465
+
1466
+ <th class="last">Description</th>
1467
+ </tr>
1468
+ </thead>
1469
+
1470
+ <tbody>
1471
+
1472
+
1473
+
1474
+ <tr class="deep-level-0">
1475
+
1476
+ <td class="name"><code>data</code></td>
1477
+
1478
+
1479
+ <td class="type">
1480
+
1481
+
1482
+ <code class="param-type">object</code>
1483
+
1484
+
1485
+
1486
+ </td>
1487
+
1488
+
1489
+
1490
+
1491
+
1492
+ <td class="description last">The signature data to save</td>
1493
+ </tr>
1494
+
1495
+
1496
+
1497
+
1498
+ <tr class="deep-level-1">
1499
+
1500
+ <td class="name"><code>type</code></td>
1501
+
1502
+
1503
+ <td class="type">
1504
+
1505
+
1506
+ <code class="param-type">string</code>
1507
+
1508
+
1509
+
1510
+ </td>
1511
+
1512
+
1513
+
1514
+
1515
+
1516
+ <td class="description last">CURSIVE or HANDWRITE</td>
1517
+ </tr>
1518
+
1519
+
1520
+
1521
+ <tr class="deep-level-1">
1522
+
1523
+ <td class="name"><code>file</code></td>
1524
+
1525
+
1526
+ <td class="type">
1527
+
1528
+
1529
+ <code class="param-type">string</code>
1530
+
1531
+
1532
+
1533
+ </td>
1534
+
1535
+
1536
+
1537
+
1538
+
1539
+ <td class="description last">CURSIVE the <fontname>:<name used on the signature>
1540
+ HANDWRITE the base 64 image (w/o the mime a base prefix)</td>
1541
+ </tr>
1542
+
1543
+
1544
+
1545
+
1546
+
1547
+
1548
+
1549
+ <tr class="deep-level-0">
1550
+
1551
+ <td class="name"><code>session</code></td>
1552
+
1553
+
1554
+ <td class="type">
1555
+
1556
+
1557
+ <code class="param-type">string</code>
1558
+
1559
+
1560
+
1561
+ </td>
1562
+
1563
+
1564
+
1565
+
1566
+
1567
+ <td class="description last">Is token JWT of user NOT allow SU</td>
1568
+ </tr>
1569
+
1570
+
1571
+
1572
+ </tbody>
1573
+ </table>
1574
+ </div>
1575
+
1576
+
1577
+
1578
+
1579
+
1580
+ <dl class="details">
1581
+
1582
+
1583
+
1584
+
1585
+
1586
+
1587
+
1588
+
1589
+
1590
+
1591
+
1592
+
1593
+
1594
+
1595
+
1596
+
1597
+
1598
+
1599
+ <dt class="tag-author">Author:</dt>
1600
+ <dd class="tag-author">
1601
+ <ul>
1602
+ <li><a href="mailto:abernardo.br@gmail.com">CloudBrasil</a></li>
1603
+ </ul>
1604
+ </dd>
1605
+
1606
+
1607
+
1608
+
1609
+
1610
+
1611
+
1612
+
1613
+
1614
+
1615
+
1616
+
1617
+
1618
+
1619
+ <p class="tag-source">
1620
+ <a href="user_user.js.html" class="button">View Source</a>
1621
+ <span>
1622
+ <a href="user_user.js.html">user/user.js</a>, <a href="user_user.js.html#line180">line 180</a>
1623
+ </span>
1624
+ </p>
1625
+
1626
+ </dl>
1627
+
1628
+
1629
+
1630
+
1631
+
1632
+
1633
+
1634
+
1635
+
1636
+
1637
+
1638
+
1639
+
1640
+
1641
+
1642
+
1643
+
1644
+
1645
+ <div class='columns method-parameter'>
1646
+ <div class="column is-2"><label>Returns:</label></div>
1647
+ <div class="column is-10">
1648
+
1649
+
1650
+
1651
+ <div class="columns">
1652
+
1653
+
1654
+ <div class='column is-5 has-text-left'>
1655
+ <label>Type: </label>
1656
+
1657
+ <code class="param-type">Promise</code>
1658
+
1659
+
1660
+ </div>
1661
+
1662
+ </div>
1663
+
1664
+
1665
+ </div>
1666
+ </div>
1667
+
1668
+
1669
+
1670
+
1671
+ <h5>Example</h5>
1672
+
1673
+
1674
+ <pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
1675
+ const api = new API();
1676
+ const data = {
1677
+ type: 'CURSIVE',
1678
+ file: 'allura:Mary John Heart'
1679
+ };
1680
+ const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
1681
+ await api.user.profile.saveSignature(data, session);
1682
+
1683
+ const API = require('@docbrasil/api-systemmanager');
1684
+ const api = new API();
1685
+ const data = {
1686
+ type: 'HANDWRITE',
1687
+ file: 'iVBORw0KGgoAAAANSUhEUgAAAj...'
1688
+ };
1689
+ const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
1690
+ await api.user.profile.saveSignature(session);</code></pre>
1691
+
1692
+
1693
+
1694
+ </div>
1695
+
1696
+ <div class="member">
1697
+
1698
+
1699
+
1700
+ <h4 class="name" id="updateAvatar">
1701
+ <a class="href-link" href="#updateAvatar">#</a>
1702
+
1703
+
1704
+ <span class='tag'>async</span>
1705
+
1706
+
1707
+ <span class="code-name">
1708
+
1709
+ updateAvatar<span class="signature">(params, session)</span><span class="type-signature"> &rarr; {Promise}</span>
1710
+
1711
+ </span>
1712
+ </h4>
1713
+
1714
+
1715
+
1716
+
1717
+ <div class="description">
1718
+ Update avatar of user by session of user not allow session user SU
1719
+ </div>
1720
+
1721
+
1722
+
1723
+
1724
+
1725
+
1726
+
1727
+
1728
+
1729
+
1730
+ <h5>Parameters:</h5>
1731
+
1732
+ <div class="table-container">
1733
+ <table class="params table">
1734
+ <thead>
1735
+ <tr>
1736
+
1737
+ <th>Name</th>
1738
+
1739
+
1740
+ <th>Type</th>
1741
+
1742
+
1743
+
1744
+
1745
+
1746
+ <th class="last">Description</th>
1747
+ </tr>
1748
+ </thead>
1749
+
1750
+ <tbody>
1751
+
1752
+
1753
+
1754
+ <tr class="deep-level-0">
1755
+
1756
+ <td class="name"><code>params</code></td>
1757
+
1758
+
1759
+ <td class="type">
1760
+
1761
+
1762
+ <code class="param-type">object</code>
1763
+
1764
+
1765
+
1766
+ </td>
1767
+
1768
+
1769
+
1770
+
1771
+
1772
+ <td class="description last">Params to update avatar</td>
1773
+ </tr>
1774
+
1775
+
1776
+
1777
+
1778
+ <tr class="deep-level-1">
1779
+
1780
+ <td class="name"><code>avatar</code></td>
1781
+
1782
+
1783
+ <td class="type">
1784
+
1785
+
1786
+ <code class="param-type">string</code>
1787
+
1788
+
1789
+
1790
+ </td>
1791
+
1792
+
1793
+
1794
+
1795
+
1796
+ <td class="description last">Image in base64 to update</td>
1797
+ </tr>
1798
+
1799
+
1800
+
1801
+ <tr class="deep-level-1">
1802
+
1803
+ <td class="name"><code>type</code></td>
1804
+
1805
+
1806
+ <td class="type">
1807
+
1808
+
1809
+ <code class="param-type">string</code>
1810
+
1811
+
1812
+
1813
+ </td>
1814
+
1815
+
1816
+
1817
+
1818
+
1819
+ <td class="description last">mimeType (image/png)</td>
1820
+ </tr>
1821
+
1822
+
1823
+
1824
+
1825
+
1826
+
1827
+
1828
+ <tr class="deep-level-0">
1829
+
1830
+ <td class="name"><code>session</code></td>
1831
+
1832
+
1833
+ <td class="type">
1834
+
1835
+
1836
+ <code class="param-type">string</code>
1837
+
1838
+
1839
+
1840
+ </td>
1841
+
1842
+
1843
+
1844
+
1845
+
1846
+ <td class="description last">Is token JWT of user NOT allow SU</td>
1847
+ </tr>
1848
+
1849
+
1850
+
1851
+ </tbody>
1852
+ </table>
1853
+ </div>
1854
+
1855
+
1856
+
1857
+
1858
+
1859
+ <dl class="details">
1860
+
1861
+
1862
+
1863
+
1864
+
1865
+
1866
+
1867
+
1868
+
1869
+
1870
+
1871
+
1872
+
1873
+
1874
+
1875
+
1876
+
1877
+
1878
+ <dt class="tag-author">Author:</dt>
1879
+ <dd class="tag-author">
1880
+ <ul>
1881
+ <li><a href="mailto:abernardo.br@gmail.com">CloudBrasil</a></li>
1882
+ </ul>
1883
+ </dd>
1884
+
1885
+
1886
+
1887
+
1888
+
1889
+
1890
+
1891
+
1892
+
1893
+
1894
+
1895
+
1896
+
1897
+
1898
+ <p class="tag-source">
1899
+ <a href="user_user.js.html" class="button">View Source</a>
1900
+ <span>
1901
+ <a href="user_user.js.html">user/user.js</a>, <a href="user_user.js.html#line76">line 76</a>
1902
+ </span>
1903
+ </p>
1904
+
1905
+ </dl>
1906
+
1907
+
1908
+
1909
+
1910
+
1911
+
1912
+
1913
+
1914
+
1915
+
1916
+
1917
+
1918
+
1919
+
1920
+
1921
+
1922
+
1923
+
1924
+ <div class='columns method-parameter'>
1925
+ <div class="column is-2"><label>Returns:</label></div>
1926
+ <div class="column is-10">
1927
+
1928
+
1929
+
1930
+ <div class="columns">
1931
+
1932
+
1933
+ <div class='column is-5 has-text-left'>
1934
+ <label>Type: </label>
1935
+
1936
+ <code class="param-type">Promise</code>
1937
+
1938
+
1939
+ </div>
1940
+
1941
+ </div>
1942
+
1943
+
1944
+ </div>
1945
+ </div>
1946
+
1947
+
1948
+
1949
+
1950
+ <h5>Example</h5>
1951
+
1952
+
1953
+ <pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
1954
+ const api = new API();
1955
+ const params = {
1956
+ avatar: '55e4a3bd6be6b45210833fae',
1957
+ type: '123456',
1958
+ };
1959
+ const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
1960
+ await api.user.profile.updateAvatar(params, session);</code></pre>
1961
+
1962
+
1963
+
1964
+ </div>
1965
+
1966
+ </div>
1967
+ </div>
1968
+
1969
+
1970
+
1971
+
1972
+
1973
+ </article>
1974
+
1975
+ </section>
1976
+
1977
+
1978
+
1979
+
1980
+ </div>
1981
+
1982
+ <footer class="footer">
1983
+ <div class="content has-text-centered">
1984
+ <p>Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a></p>
1985
+ <p class="sidebar-created-by">
1986
+ <a href="https://github.com/SoftwareBrothers/better-docs" target="_blank">BetterDocs theme</a> provided with <i class="fas fa-heart"></i> by
1987
+ <a href="http://softwarebrothers.co" target="_blank">SoftwareBrothers - JavaScript Development Agency</a>
1988
+ </p>
1989
+ </div>
1990
+ </footer>
1991
+
1992
+ </div>
1993
+ <div id="side-nav" class="side-nav">
1994
+ </div>
1995
+ </div>
1996
+ <script src="scripts/app.min.js"></script>
1997
+ <script>PR.prettyPrint();</script>
1998
+ <script src="scripts/linenumber.js"> </script>
1999
+
2000
+
2001
+ </body>
2002
+ </html>