@docbrasil/api-systemmanager 1.1.7 → 1.1.9

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 (76) hide show
  1. package/api/user/document.js +15 -2
  2. package/api/user/index.js +2 -0
  3. package/api/user/settings.js +144 -0
  4. package/dist/bundle.cjs +155 -2
  5. package/dist/bundle.mjs +1 -1
  6. package/doc/api.md +79 -0
  7. package/docs/Admin.html +1 -1
  8. package/docs/AdminDocuments.html +1 -1
  9. package/docs/AdminForm.html +1 -1
  10. package/docs/AdminLists.html +1 -1
  11. package/docs/AdminMessage.html +1 -1
  12. package/docs/AdminNotification.html +1 -1
  13. package/docs/AdminPlugin.html +1 -1
  14. package/docs/AdminPolicy.html +1 -1
  15. package/docs/AdminProcesses.html +1 -1
  16. package/docs/AdminTask.html +1 -1
  17. package/docs/AdminUser.html +1 -1
  18. package/docs/Application.html +1 -1
  19. package/docs/Datasource.html +1 -1
  20. package/docs/Dispatch.html +1 -1
  21. package/docs/Documents.html +13 -13
  22. package/docs/External.html +1 -1
  23. package/docs/GeoLocation.html +1 -1
  24. package/docs/Help.html +1 -1
  25. package/docs/Login.html +1 -1
  26. package/docs/MyTasks.html +1 -1
  27. package/docs/Notification.html +1 -1
  28. package/docs/Organization.html +1 -1
  29. package/docs/Page.html +1 -1
  30. package/docs/Process.html +1 -1
  31. package/docs/Register.html +1 -1
  32. package/docs/Session.html +1 -1
  33. package/docs/Settings.html +863 -0
  34. package/docs/Task.html +1 -1
  35. package/docs/TaskAvailable.html +1 -1
  36. package/docs/Updates.html +1 -1
  37. package/docs/User.html +1 -1
  38. package/docs/Users.html +2 -2
  39. package/docs/admin_doctypes.js.html +1 -1
  40. package/docs/admin_document.js.html +1 -1
  41. package/docs/admin_form.js.html +1 -1
  42. package/docs/admin_index.js.html +1 -1
  43. package/docs/admin_list.js.html +1 -1
  44. package/docs/admin_message.js.html +1 -1
  45. package/docs/admin_notification.js.html +1 -1
  46. package/docs/admin_organization.js.html +1 -1
  47. package/docs/admin_plugin.js.html +1 -1
  48. package/docs/admin_policy.js.html +1 -1
  49. package/docs/admin_processes.js.html +1 -1
  50. package/docs/admin_task.js.html +1 -1
  51. package/docs/admin_user.js.html +1 -1
  52. package/docs/dispatch.js.html +1 -1
  53. package/docs/external.js.html +1 -1
  54. package/docs/general_geoLocation.js.html +1 -1
  55. package/docs/general_index.js.html +1 -1
  56. package/docs/index.html +1 -1
  57. package/docs/login.js.html +1 -1
  58. package/docs/session.js.html +1 -1
  59. package/docs/user_application.js.html +1 -1
  60. package/docs/user_datasource.js.html +1 -1
  61. package/docs/user_document.js.html +16 -3
  62. package/docs/user_help.js.html +1 -1
  63. package/docs/user_index.js.html +3 -1
  64. package/docs/user_my_tasks.js.html +1 -1
  65. package/docs/user_notification.js.html +1 -1
  66. package/docs/user_organization.js.html +1 -1
  67. package/docs/user_page.js.html +1 -1
  68. package/docs/user_process.js.html +1 -1
  69. package/docs/user_register.js.html +1 -1
  70. package/docs/user_settings.js.html +261 -0
  71. package/docs/user_task.js.html +1 -1
  72. package/docs/user_task_available.js.html +1 -1
  73. package/docs/user_updates.js.html +1 -1
  74. package/docs/user_user.js.html +1 -1
  75. package/docs/utils_promises.js.html +1 -1
  76. package/package.json +1 -1
@@ -0,0 +1,863 @@
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> Settings</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="Application.html">Application</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="Help.html">Help</a></li><li><a href="Login.html">Login</a></li><li><a href="MyTasks.html">MyTasks</a></li><li><a href="Notification.html">Notification</a></li><li><a href="Organization.html">Organization</a></li><li><a href="Page.html">Page</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="Settings.html">Settings</a></li><li><a href="Task.html">Task</a></li><li><a href="TaskAvailable.html">TaskAvailable</a></li><li><a href="Updates.html">Updates</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>Settings</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>Settings<span class="signature">()</span><span class="type-signature"></span></h2>
89
+
90
+ <div class="class-description">Class for user settings</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="Settings">
110
+ <a class="href-link" href="#Settings">#</a>
111
+
112
+ <span class="code-name">
113
+
114
+ new Settings<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_settings.js.html" class="button">View Source</a>
169
+ <span>
170
+ <a href="user_settings.js.html">user/settings.js</a>, <a href="user_settings.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="get">
228
+ <a class="href-link" href="#get">#</a>
229
+
230
+
231
+ <span class='tag'>async</span>
232
+
233
+
234
+ <span class="code-name">
235
+
236
+ get<span class="signature">(session)</span><span class="type-signature"> &rarr; {Promise}</span>
237
+
238
+ </span>
239
+ </h4>
240
+
241
+
242
+
243
+
244
+ <div class="description">
245
+ Gets the user settings
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>session</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">Is token JWT of user NOT allow SU</td>
300
+ </tr>
301
+
302
+
303
+
304
+ </tbody>
305
+ </table>
306
+ </div>
307
+
308
+
309
+
310
+
311
+
312
+ <dl class="details">
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+
327
+
328
+
329
+
330
+
331
+ <dt class="tag-author">Author:</dt>
332
+ <dd class="tag-author">
333
+ <ul>
334
+ <li><a href="mailto:abernardo.br@gmail.com">CloudBrasil</a></li>
335
+ </ul>
336
+ </dd>
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+
351
+ <p class="tag-source">
352
+ <a href="user_settings.js.html" class="button">View Source</a>
353
+ <span>
354
+ <a href="user_settings.js.html">user/settings.js</a>, <a href="user_settings.js.html#line101">line 101</a>
355
+ </span>
356
+ </p>
357
+
358
+ </dl>
359
+
360
+
361
+
362
+
363
+
364
+
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+
374
+
375
+
376
+
377
+ <div class='columns method-parameter'>
378
+ <div class="column is-2"><label>Returns:</label></div>
379
+ <div class="column is-10">
380
+
381
+
382
+
383
+ <div class="columns">
384
+
385
+
386
+ <div class='column is-5 has-text-left'>
387
+ <label>Type: </label>
388
+
389
+ <code class="param-type">Promise</code>
390
+
391
+
392
+ </div>
393
+
394
+ </div>
395
+
396
+
397
+ </div>
398
+ </div>
399
+
400
+
401
+
402
+
403
+ <h5>Example</h5>
404
+
405
+
406
+ <pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
407
+ const api = new API();
408
+ const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
409
+ await api.user.settings.get(session);</code></pre>
410
+
411
+
412
+
413
+ </div>
414
+
415
+ <div class="member">
416
+
417
+
418
+
419
+ <h4 class="name" id="remove">
420
+ <a class="href-link" href="#remove">#</a>
421
+
422
+
423
+ <span class='tag'>async</span>
424
+
425
+
426
+ <span class="code-name">
427
+
428
+ remove<span class="signature">(session)</span><span class="type-signature"> &rarr; {Promise}</span>
429
+
430
+ </span>
431
+ </h4>
432
+
433
+
434
+
435
+
436
+ <div class="description">
437
+ Removes the user settings
438
+ </div>
439
+
440
+
441
+
442
+
443
+
444
+
445
+
446
+
447
+
448
+
449
+ <h5>Parameters:</h5>
450
+
451
+ <div class="table-container">
452
+ <table class="params table">
453
+ <thead>
454
+ <tr>
455
+
456
+ <th>Name</th>
457
+
458
+
459
+ <th>Type</th>
460
+
461
+
462
+
463
+
464
+
465
+ <th class="last">Description</th>
466
+ </tr>
467
+ </thead>
468
+
469
+ <tbody>
470
+
471
+
472
+
473
+ <tr class="deep-level-0">
474
+
475
+ <td class="name"><code>session</code></td>
476
+
477
+
478
+ <td class="type">
479
+
480
+
481
+ <code class="param-type">string</code>
482
+
483
+
484
+
485
+ </td>
486
+
487
+
488
+
489
+
490
+
491
+ <td class="description last">Is token JWT of user NOT allow SU</td>
492
+ </tr>
493
+
494
+
495
+
496
+ </tbody>
497
+ </table>
498
+ </div>
499
+
500
+
501
+
502
+
503
+
504
+ <dl class="details">
505
+
506
+
507
+
508
+
509
+
510
+
511
+
512
+
513
+
514
+
515
+
516
+
517
+
518
+
519
+
520
+
521
+
522
+
523
+ <dt class="tag-author">Author:</dt>
524
+ <dd class="tag-author">
525
+ <ul>
526
+ <li><a href="mailto:abernardo.br@gmail.com">CloudBrasil</a></li>
527
+ </ul>
528
+ </dd>
529
+
530
+
531
+
532
+
533
+
534
+
535
+
536
+
537
+
538
+
539
+
540
+
541
+
542
+
543
+ <p class="tag-source">
544
+ <a href="user_settings.js.html" class="button">View Source</a>
545
+ <span>
546
+ <a href="user_settings.js.html">user/settings.js</a>, <a href="user_settings.js.html#line129">line 129</a>
547
+ </span>
548
+ </p>
549
+
550
+ </dl>
551
+
552
+
553
+
554
+
555
+
556
+
557
+
558
+
559
+
560
+
561
+
562
+
563
+
564
+
565
+
566
+
567
+
568
+
569
+ <div class='columns method-parameter'>
570
+ <div class="column is-2"><label>Returns:</label></div>
571
+ <div class="column is-10">
572
+
573
+
574
+
575
+ <div class="columns">
576
+
577
+
578
+ <div class='column is-5 has-text-left'>
579
+ <label>Type: </label>
580
+
581
+ <code class="param-type">Promise</code>
582
+
583
+
584
+ </div>
585
+
586
+ </div>
587
+
588
+
589
+ </div>
590
+ </div>
591
+
592
+
593
+
594
+
595
+ <h5>Example</h5>
596
+
597
+
598
+ <pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
599
+ const api = new API();
600
+ const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
601
+ await api.user.settings.remove(session);</code></pre>
602
+
603
+
604
+
605
+ </div>
606
+
607
+ <div class="member">
608
+
609
+
610
+
611
+ <h4 class="name" id="upsert">
612
+ <a class="href-link" href="#upsert">#</a>
613
+
614
+
615
+ <span class='tag'>async</span>
616
+
617
+
618
+ <span class="code-name">
619
+
620
+ upsert<span class="signature">(settings, session)</span><span class="type-signature"> &rarr; {Promise}</span>
621
+
622
+ </span>
623
+ </h4>
624
+
625
+
626
+
627
+
628
+ <div class="description">
629
+ Adds/updates a user settings
630
+ </div>
631
+
632
+
633
+
634
+
635
+
636
+
637
+
638
+
639
+
640
+
641
+ <h5>Parameters:</h5>
642
+
643
+ <div class="table-container">
644
+ <table class="params table">
645
+ <thead>
646
+ <tr>
647
+
648
+ <th>Name</th>
649
+
650
+
651
+ <th>Type</th>
652
+
653
+
654
+
655
+
656
+
657
+ <th class="last">Description</th>
658
+ </tr>
659
+ </thead>
660
+
661
+ <tbody>
662
+
663
+
664
+
665
+ <tr class="deep-level-0">
666
+
667
+ <td class="name"><code>settings</code></td>
668
+
669
+
670
+ <td class="type">
671
+
672
+
673
+ <code class="param-type">object</code>
674
+
675
+
676
+
677
+ </td>
678
+
679
+
680
+
681
+
682
+
683
+ <td class="description last">Full user settings</td>
684
+ </tr>
685
+
686
+
687
+
688
+
689
+
690
+ <tr class="deep-level-0">
691
+
692
+ <td class="name"><code>session</code></td>
693
+
694
+
695
+ <td class="type">
696
+
697
+
698
+ <code class="param-type">string</code>
699
+
700
+
701
+
702
+ </td>
703
+
704
+
705
+
706
+
707
+
708
+ <td class="description last">Is token JWT of user NOT allow SU</td>
709
+ </tr>
710
+
711
+
712
+
713
+ </tbody>
714
+ </table>
715
+ </div>
716
+
717
+
718
+
719
+
720
+
721
+ <dl class="details">
722
+
723
+
724
+
725
+
726
+
727
+
728
+
729
+
730
+
731
+
732
+
733
+
734
+
735
+
736
+
737
+
738
+
739
+
740
+ <dt class="tag-author">Author:</dt>
741
+ <dd class="tag-author">
742
+ <ul>
743
+ <li><a href="mailto:abernardo.br@gmail.com">CloudBrasil</a></li>
744
+ </ul>
745
+ </dd>
746
+
747
+
748
+
749
+
750
+
751
+
752
+
753
+
754
+
755
+
756
+
757
+
758
+
759
+
760
+ <p class="tag-source">
761
+ <a href="user_settings.js.html" class="button">View Source</a>
762
+ <span>
763
+ <a href="user_settings.js.html">user/settings.js</a>, <a href="user_settings.js.html#line73">line 73</a>
764
+ </span>
765
+ </p>
766
+
767
+ </dl>
768
+
769
+
770
+
771
+
772
+
773
+
774
+
775
+
776
+
777
+
778
+
779
+
780
+
781
+
782
+
783
+
784
+
785
+
786
+ <div class='columns method-parameter'>
787
+ <div class="column is-2"><label>Returns:</label></div>
788
+ <div class="column is-10">
789
+
790
+
791
+
792
+ <div class="columns">
793
+
794
+
795
+ <div class='column is-5 has-text-left'>
796
+ <label>Type: </label>
797
+
798
+ <code class="param-type">Promise</code>
799
+
800
+
801
+ </div>
802
+
803
+ </div>
804
+
805
+
806
+ </div>
807
+ </div>
808
+
809
+
810
+
811
+
812
+ <h5>Example</h5>
813
+
814
+
815
+ <pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
816
+ const api = new API();
817
+ const settings = {
818
+ areaId: '55e4a3bd6be6b45210833fae'
819
+ };
820
+ const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
821
+ await api.user.settings.upsert(settings, session);</code></pre>
822
+
823
+
824
+
825
+ </div>
826
+
827
+ </div>
828
+ </div>
829
+
830
+
831
+
832
+
833
+
834
+ </article>
835
+
836
+ </section>
837
+
838
+
839
+
840
+
841
+ </div>
842
+
843
+ <footer class="footer">
844
+ <div class="content has-text-centered">
845
+ <p>Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a></p>
846
+ <p class="sidebar-created-by">
847
+ <a href="https://github.com/SoftwareBrothers/better-docs" target="_blank">BetterDocs theme</a> provided with <i class="fas fa-heart"></i> by
848
+ <a href="http://softwarebrothers.co" target="_blank">SoftwareBrothers - JavaScript Development Agency</a>
849
+ </p>
850
+ </div>
851
+ </footer>
852
+
853
+ </div>
854
+ <div id="side-nav" class="side-nav">
855
+ </div>
856
+ </div>
857
+ <script src="scripts/app.min.js"></script>
858
+ <script>PR.prettyPrint();</script>
859
+ <script src="scripts/linenumber.js"> </script>
860
+
861
+
862
+ </body>
863
+ </html>