@docbrasil/api-systemmanager 1.0.106 → 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 (76) hide show
  1. package/.github/workflows/static.yml +43 -0
  2. package/api/external.js +41 -0
  3. package/api/user/process.js +44 -0
  4. package/api/user/task.js +1 -0
  5. package/api/user/task_available.js +1 -1
  6. package/dist/bundle.cjs +87 -1
  7. package/dist/bundle.mjs +1 -1
  8. package/doc/api.md +412 -1
  9. package/docs/Admin.html +336 -0
  10. package/docs/AdminDocuments.html +2235 -0
  11. package/docs/AdminForm.html +934 -0
  12. package/docs/AdminLists.html +895 -0
  13. package/docs/AdminMessage.html +1490 -0
  14. package/docs/AdminNotification.html +1636 -0
  15. package/docs/AdminPlugin.html +696 -0
  16. package/docs/AdminPolicy.html +451 -0
  17. package/docs/AdminProcesses.html +692 -0
  18. package/docs/AdminTask.html +740 -0
  19. package/docs/AdminUser.html +1203 -0
  20. package/docs/Datasource.html +660 -0
  21. package/docs/Dispatch.html +624 -0
  22. package/docs/Documents.html +4875 -0
  23. package/docs/External.html +1203 -0
  24. package/docs/GeoLocation.html +503 -0
  25. package/docs/Login.html +1839 -0
  26. package/docs/Notification.html +625 -0
  27. package/docs/Organization.html +2767 -0
  28. package/docs/Process.html +1598 -0
  29. package/docs/Register.html +1604 -0
  30. package/docs/Session.html +482 -0
  31. package/docs/Task.html +1394 -0
  32. package/docs/TaskAvailable.html +893 -0
  33. package/docs/User.html +2002 -0
  34. package/docs/Users.html +569 -0
  35. package/docs/admin_doctypes.js.html +193 -0
  36. package/docs/admin_document.js.html +449 -0
  37. package/docs/admin_form.js.html +268 -0
  38. package/docs/admin_index.js.html +163 -0
  39. package/docs/admin_list.js.html +250 -0
  40. package/docs/admin_message.js.html +311 -0
  41. package/docs/admin_notification.js.html +350 -0
  42. package/docs/admin_organization.js.html +241 -0
  43. package/docs/admin_plugin.js.html +233 -0
  44. package/docs/admin_policy.js.html +195 -0
  45. package/docs/admin_processes.js.html +487 -0
  46. package/docs/admin_task.js.html +242 -0
  47. package/docs/admin_user.js.html +302 -0
  48. package/docs/dispatch.js.html +218 -0
  49. package/docs/external.js.html +333 -0
  50. package/docs/general_geoLocation.js.html +205 -0
  51. package/docs/general_index.js.html +140 -0
  52. package/docs/index.html +129 -0
  53. package/docs/login.js.html +384 -0
  54. package/docs/scripts/app.min.js +1 -0
  55. package/docs/scripts/linenumber.js +26 -0
  56. package/docs/scripts/search.js +39 -0
  57. package/docs/session.js.html +202 -0
  58. package/docs/styles/app.min.css +1 -0
  59. package/docs/styles/iframe.css +13 -0
  60. package/docs/styles/prettify-jsdoc.css +111 -0
  61. package/docs/styles/prettify-tomorrow.css +132 -0
  62. package/docs/styles/reset.css +44 -0
  63. package/docs/user_datasource.js.html +261 -0
  64. package/docs/user_document.js.html +847 -0
  65. package/docs/user_index.js.html +156 -0
  66. package/docs/user_notification.js.html +218 -0
  67. package/docs/user_organization.js.html +347 -0
  68. package/docs/user_process.js.html +352 -0
  69. package/docs/user_register.js.html +322 -0
  70. package/docs/user_task.js.html +319 -0
  71. package/docs/user_task_available.js.html +252 -0
  72. package/docs/user_user.js.html +404 -0
  73. package/docs/utils_promises.js.html +235 -0
  74. package/package.json +7 -4
  75. package/readme.md +7 -8
  76. package/doc.md +0 -653
@@ -0,0 +1,1636 @@
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> AdminNotification</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>AdminNotification</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>AdminNotification<span class="signature">()</span><span class="type-signature"></span></h2>
89
+
90
+ <div class="class-description">Admin Class for notification, permission admin</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="AdminNotification">
110
+ <a class="href-link" href="#AdminNotification">#</a>
111
+
112
+ <span class="code-name">
113
+
114
+ new AdminNotification<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="admin_notification.js.html" class="button">View Source</a>
169
+ <span>
170
+ <a href="admin_notification.js.html">admin/notification.js</a>, <a href="admin_notification.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="add">
228
+ <a class="href-link" href="#add">#</a>
229
+
230
+
231
+ <span class='tag'>async</span>
232
+
233
+
234
+ <span class="code-name">
235
+
236
+ add<span class="signature">(params, session)</span><span class="type-signature"> &rarr; {Promise}</span>
237
+
238
+ </span>
239
+ </h4>
240
+
241
+
242
+
243
+
244
+ <div class="description">
245
+ Create notification
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>params</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">Params to create notification</td>
300
+ </tr>
301
+
302
+
303
+
304
+
305
+ <tr class="deep-level-1">
306
+
307
+ <td class="name"><code>orgId</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">OrgId of the user SU</td>
324
+ </tr>
325
+
326
+
327
+
328
+ <tr class="deep-level-1">
329
+
330
+ <td class="name"><code>userId</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">User to create notification</td>
347
+ </tr>
348
+
349
+
350
+
351
+ <tr class="deep-level-1">
352
+
353
+ <td class="name"><code>message</code></td>
354
+
355
+
356
+ <td class="type">
357
+
358
+
359
+ <code class="param-type">object</code>
360
+
361
+
362
+
363
+ </td>
364
+
365
+
366
+
367
+
368
+
369
+ <td class="description last">Object with data to send user</td>
370
+ </tr>
371
+
372
+
373
+
374
+
375
+
376
+
377
+
378
+ <tr class="deep-level-0">
379
+
380
+ <td class="name"><code>session</code></td>
381
+
382
+
383
+ <td class="type">
384
+
385
+
386
+ <code class="param-type">string</code>
387
+
388
+
389
+
390
+ </td>
391
+
392
+
393
+
394
+
395
+
396
+ <td class="description last">Session, token JWT</td>
397
+ </tr>
398
+
399
+
400
+
401
+ </tbody>
402
+ </table>
403
+ </div>
404
+
405
+
406
+
407
+
408
+
409
+ <dl class="details">
410
+
411
+
412
+
413
+
414
+
415
+
416
+
417
+
418
+
419
+
420
+
421
+
422
+
423
+
424
+
425
+
426
+
427
+
428
+ <dt class="tag-author">Author:</dt>
429
+ <dd class="tag-author">
430
+ <ul>
431
+ <li><a href="mailto:abernardo.br@gmail.com">CloudBrasil</a></li>
432
+ </ul>
433
+ </dd>
434
+
435
+
436
+
437
+
438
+
439
+
440
+
441
+
442
+
443
+
444
+
445
+
446
+
447
+
448
+ <p class="tag-source">
449
+ <a href="admin_notification.js.html" class="button">View Source</a>
450
+ <span>
451
+ <a href="admin_notification.js.html">admin/notification.js</a>, <a href="admin_notification.js.html#line97">line 97</a>
452
+ </span>
453
+ </p>
454
+
455
+ </dl>
456
+
457
+
458
+
459
+
460
+
461
+
462
+
463
+
464
+
465
+
466
+
467
+
468
+
469
+
470
+
471
+
472
+
473
+
474
+ <div class='columns method-parameter'>
475
+ <div class="column is-2"><label>Returns:</label></div>
476
+ <div class="column is-10">
477
+
478
+
479
+
480
+ <div class="columns">
481
+
482
+
483
+ <div class='column is-5 has-text-left'>
484
+ <label>Type: </label>
485
+
486
+ <code class="param-type">Promise</code>
487
+
488
+
489
+ </div>
490
+
491
+ </div>
492
+
493
+
494
+ </div>
495
+ </div>
496
+
497
+
498
+
499
+
500
+ <h5>Example</h5>
501
+
502
+
503
+ <pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
504
+ const api = new API();
505
+ const params = {
506
+ orgId: '5edd11c46b6ce9729c2c297c',
507
+ userId: '55e4a3bd6be6b45210833fae',
508
+ message: 'Olá como vai tudo bem?'
509
+ };
510
+ const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
511
+ await api.admin.notifications.add(params, session);</code></pre>
512
+
513
+
514
+
515
+ </div>
516
+
517
+ <div class="member">
518
+
519
+
520
+
521
+ <h4 class="name" id="findById">
522
+ <a class="href-link" href="#findById">#</a>
523
+
524
+
525
+ <span class='tag'>async</span>
526
+
527
+
528
+ <span class="code-name">
529
+
530
+ findById<span class="signature">(params, session)</span><span class="type-signature"> &rarr; {Promise}</span>
531
+
532
+ </span>
533
+ </h4>
534
+
535
+
536
+
537
+
538
+ <div class="description">
539
+ Search notification using (notificationId or userId)
540
+ </div>
541
+
542
+
543
+
544
+
545
+
546
+
547
+
548
+
549
+
550
+
551
+ <h5>Parameters:</h5>
552
+
553
+ <div class="table-container">
554
+ <table class="params table">
555
+ <thead>
556
+ <tr>
557
+
558
+ <th>Name</th>
559
+
560
+
561
+ <th>Type</th>
562
+
563
+
564
+
565
+
566
+
567
+ <th class="last">Description</th>
568
+ </tr>
569
+ </thead>
570
+
571
+ <tbody>
572
+
573
+
574
+
575
+ <tr class="deep-level-0">
576
+
577
+ <td class="name"><code>params</code></td>
578
+
579
+
580
+ <td class="type">
581
+
582
+
583
+ <code class="param-type">object</code>
584
+
585
+
586
+
587
+ </td>
588
+
589
+
590
+
591
+
592
+
593
+ <td class="description last">Params to create notification</td>
594
+ </tr>
595
+
596
+
597
+
598
+
599
+ <tr class="deep-level-1">
600
+
601
+ <td class="name"><code>orgId</code></td>
602
+
603
+
604
+ <td class="type">
605
+
606
+
607
+ <code class="param-type">string</code>
608
+
609
+
610
+
611
+ </td>
612
+
613
+
614
+
615
+
616
+
617
+ <td class="description last">OrgId of the user SU</td>
618
+ </tr>
619
+
620
+
621
+
622
+ <tr class="deep-level-1">
623
+
624
+ <td class="name"><code>id</code></td>
625
+
626
+
627
+ <td class="type">
628
+
629
+
630
+ <code class="param-type">string</code>
631
+
632
+
633
+
634
+ </td>
635
+
636
+
637
+
638
+
639
+
640
+ <td class="description last">ALERT! Id is userId or id is notificationId</td>
641
+ </tr>
642
+
643
+
644
+
645
+
646
+
647
+
648
+
649
+ <tr class="deep-level-0">
650
+
651
+ <td class="name"><code>session</code></td>
652
+
653
+
654
+ <td class="type">
655
+
656
+
657
+ <code class="param-type">string</code>
658
+
659
+
660
+
661
+ </td>
662
+
663
+
664
+
665
+
666
+
667
+ <td class="description last">Session, token JWT</td>
668
+ </tr>
669
+
670
+
671
+
672
+ </tbody>
673
+ </table>
674
+ </div>
675
+
676
+
677
+
678
+
679
+
680
+ <dl class="details">
681
+
682
+
683
+
684
+
685
+
686
+
687
+
688
+
689
+
690
+
691
+
692
+
693
+
694
+
695
+
696
+
697
+
698
+
699
+ <dt class="tag-author">Author:</dt>
700
+ <dd class="tag-author">
701
+ <ul>
702
+ <li><a href="mailto:abernardo.br@gmail.com">CloudBrasil</a></li>
703
+ </ul>
704
+ </dd>
705
+
706
+
707
+
708
+
709
+
710
+
711
+
712
+
713
+
714
+
715
+
716
+
717
+
718
+
719
+ <p class="tag-source">
720
+ <a href="admin_notification.js.html" class="button">View Source</a>
721
+ <span>
722
+ <a href="admin_notification.js.html">admin/notification.js</a>, <a href="admin_notification.js.html#line136">line 136</a>
723
+ </span>
724
+ </p>
725
+
726
+ </dl>
727
+
728
+
729
+
730
+
731
+
732
+
733
+
734
+
735
+
736
+
737
+
738
+
739
+
740
+
741
+
742
+
743
+
744
+
745
+ <div class='columns method-parameter'>
746
+ <div class="column is-2"><label>Returns:</label></div>
747
+ <div class="column is-10">
748
+
749
+
750
+
751
+ <div class="columns">
752
+
753
+
754
+ <div class='column is-5 has-text-left'>
755
+ <label>Type: </label>
756
+
757
+ <code class="param-type">Promise</code>
758
+
759
+
760
+ </div>
761
+
762
+ </div>
763
+
764
+
765
+ </div>
766
+ </div>
767
+
768
+
769
+
770
+
771
+ <h5>Example</h5>
772
+
773
+
774
+ <pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
775
+ const api = new API();
776
+ const params = {
777
+ orgId: '5edd11c46b6ce9729c2c297c',
778
+ id: '55e4a3bd6be6b45210833fae',
779
+ };
780
+ const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
781
+ await api.admin.notifications.findById(params, session);</code></pre>
782
+
783
+
784
+
785
+ </div>
786
+
787
+ <div class="member">
788
+
789
+
790
+
791
+ <h4 class="name" id="findByIdAndRemove">
792
+ <a class="href-link" href="#findByIdAndRemove">#</a>
793
+
794
+
795
+ <span class='tag'>async</span>
796
+
797
+
798
+ <span class="code-name">
799
+
800
+ findByIdAndRemove<span class="signature">(params, session)</span><span class="type-signature"> &rarr; {Promise}</span>
801
+
802
+ </span>
803
+ </h4>
804
+
805
+
806
+
807
+
808
+ <div class="description">
809
+ Delete notification using (notificationId or userId)
810
+ </div>
811
+
812
+
813
+
814
+
815
+
816
+
817
+
818
+
819
+
820
+
821
+ <h5>Parameters:</h5>
822
+
823
+ <div class="table-container">
824
+ <table class="params table">
825
+ <thead>
826
+ <tr>
827
+
828
+ <th>Name</th>
829
+
830
+
831
+ <th>Type</th>
832
+
833
+
834
+
835
+
836
+
837
+ <th class="last">Description</th>
838
+ </tr>
839
+ </thead>
840
+
841
+ <tbody>
842
+
843
+
844
+
845
+ <tr class="deep-level-0">
846
+
847
+ <td class="name"><code>params</code></td>
848
+
849
+
850
+ <td class="type">
851
+
852
+
853
+ <code class="param-type">object</code>
854
+
855
+
856
+
857
+ </td>
858
+
859
+
860
+
861
+
862
+
863
+ <td class="description last">Params to create notification</td>
864
+ </tr>
865
+
866
+
867
+
868
+
869
+ <tr class="deep-level-1">
870
+
871
+ <td class="name"><code>orgId</code></td>
872
+
873
+
874
+ <td class="type">
875
+
876
+
877
+ <code class="param-type">string</code>
878
+
879
+
880
+
881
+ </td>
882
+
883
+
884
+
885
+
886
+
887
+ <td class="description last">OrgId of the user SU</td>
888
+ </tr>
889
+
890
+
891
+
892
+ <tr class="deep-level-1">
893
+
894
+ <td class="name"><code>id</code></td>
895
+
896
+
897
+ <td class="type">
898
+
899
+
900
+ <code class="param-type">string</code>
901
+
902
+
903
+
904
+ </td>
905
+
906
+
907
+
908
+
909
+
910
+ <td class="description last">ALERT! Id is userId or id is notificationId</td>
911
+ </tr>
912
+
913
+
914
+
915
+
916
+
917
+
918
+
919
+ <tr class="deep-level-0">
920
+
921
+ <td class="name"><code>session</code></td>
922
+
923
+
924
+ <td class="type">
925
+
926
+
927
+ <code class="param-type">string</code>
928
+
929
+
930
+
931
+ </td>
932
+
933
+
934
+
935
+
936
+
937
+ <td class="description last">Session, token JWT</td>
938
+ </tr>
939
+
940
+
941
+
942
+ </tbody>
943
+ </table>
944
+ </div>
945
+
946
+
947
+
948
+
949
+
950
+ <dl class="details">
951
+
952
+
953
+
954
+
955
+
956
+
957
+
958
+
959
+
960
+
961
+
962
+
963
+
964
+
965
+
966
+
967
+
968
+
969
+ <dt class="tag-author">Author:</dt>
970
+ <dd class="tag-author">
971
+ <ul>
972
+ <li><a href="mailto:abernardo.br@gmail.com">CloudBrasil</a></li>
973
+ </ul>
974
+ </dd>
975
+
976
+
977
+
978
+
979
+
980
+
981
+
982
+
983
+
984
+
985
+
986
+
987
+
988
+
989
+ <p class="tag-source">
990
+ <a href="admin_notification.js.html" class="button">View Source</a>
991
+ <span>
992
+ <a href="admin_notification.js.html">admin/notification.js</a>, <a href="admin_notification.js.html#line215">line 215</a>
993
+ </span>
994
+ </p>
995
+
996
+ </dl>
997
+
998
+
999
+
1000
+
1001
+
1002
+
1003
+
1004
+
1005
+
1006
+
1007
+
1008
+
1009
+
1010
+
1011
+
1012
+
1013
+
1014
+
1015
+ <div class='columns method-parameter'>
1016
+ <div class="column is-2"><label>Returns:</label></div>
1017
+ <div class="column is-10">
1018
+
1019
+
1020
+
1021
+ <div class="columns">
1022
+
1023
+
1024
+ <div class='column is-5 has-text-left'>
1025
+ <label>Type: </label>
1026
+
1027
+ <code class="param-type">Promise</code>
1028
+
1029
+
1030
+ </div>
1031
+
1032
+ </div>
1033
+
1034
+
1035
+ </div>
1036
+ </div>
1037
+
1038
+
1039
+
1040
+
1041
+ <h5>Example</h5>
1042
+
1043
+
1044
+ <pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
1045
+ const api = new API();
1046
+ const params = {
1047
+ orgId: '5edd11c46b6ce9729c2c297c',
1048
+ id: '55e4a3bd6be6b45210833fae',
1049
+ };
1050
+ const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
1051
+ await api.admin.notifications.findByIdAndDelete(params, session);</code></pre>
1052
+
1053
+
1054
+
1055
+ </div>
1056
+
1057
+ <div class="member">
1058
+
1059
+
1060
+
1061
+ <h4 class="name" id="findByIdAndUpdate">
1062
+ <a class="href-link" href="#findByIdAndUpdate">#</a>
1063
+
1064
+
1065
+ <span class='tag'>async</span>
1066
+
1067
+
1068
+ <span class="code-name">
1069
+
1070
+ findByIdAndUpdate<span class="signature">(params, session)</span><span class="type-signature"> &rarr; {Promise}</span>
1071
+
1072
+ </span>
1073
+ </h4>
1074
+
1075
+
1076
+
1077
+
1078
+ <div class="description">
1079
+ Update notification using (notificationId or userId)
1080
+ </div>
1081
+
1082
+
1083
+
1084
+
1085
+
1086
+
1087
+
1088
+
1089
+
1090
+
1091
+ <h5>Parameters:</h5>
1092
+
1093
+ <div class="table-container">
1094
+ <table class="params table">
1095
+ <thead>
1096
+ <tr>
1097
+
1098
+ <th>Name</th>
1099
+
1100
+
1101
+ <th>Type</th>
1102
+
1103
+
1104
+
1105
+
1106
+
1107
+ <th class="last">Description</th>
1108
+ </tr>
1109
+ </thead>
1110
+
1111
+ <tbody>
1112
+
1113
+
1114
+
1115
+ <tr class="deep-level-0">
1116
+
1117
+ <td class="name"><code>params</code></td>
1118
+
1119
+
1120
+ <td class="type">
1121
+
1122
+
1123
+ <code class="param-type">object</code>
1124
+
1125
+
1126
+
1127
+ </td>
1128
+
1129
+
1130
+
1131
+
1132
+
1133
+ <td class="description last">Params to create notification</td>
1134
+ </tr>
1135
+
1136
+
1137
+
1138
+
1139
+ <tr class="deep-level-1">
1140
+
1141
+ <td class="name"><code>orgId</code></td>
1142
+
1143
+
1144
+ <td class="type">
1145
+
1146
+
1147
+ <code class="param-type">string</code>
1148
+
1149
+
1150
+
1151
+ </td>
1152
+
1153
+
1154
+
1155
+
1156
+
1157
+ <td class="description last">OrgId of the user SU</td>
1158
+ </tr>
1159
+
1160
+
1161
+
1162
+ <tr class="deep-level-1">
1163
+
1164
+ <td class="name"><code>id</code></td>
1165
+
1166
+
1167
+ <td class="type">
1168
+
1169
+
1170
+ <code class="param-type">string</code>
1171
+
1172
+
1173
+
1174
+ </td>
1175
+
1176
+
1177
+
1178
+
1179
+
1180
+ <td class="description last">ALERT! Id is userId or id is notificationId</td>
1181
+ </tr>
1182
+
1183
+
1184
+
1185
+ <tr class="deep-level-1">
1186
+
1187
+ <td class="name"><code>read</code></td>
1188
+
1189
+
1190
+ <td class="type">
1191
+
1192
+
1193
+ <code class="param-type">boolean</code>
1194
+
1195
+
1196
+
1197
+ </td>
1198
+
1199
+
1200
+
1201
+
1202
+
1203
+ <td class="description last">If message is read true or false</td>
1204
+ </tr>
1205
+
1206
+
1207
+
1208
+
1209
+
1210
+
1211
+
1212
+ <tr class="deep-level-0">
1213
+
1214
+ <td class="name"><code>session</code></td>
1215
+
1216
+
1217
+ <td class="type">
1218
+
1219
+
1220
+ <code class="param-type">string</code>
1221
+
1222
+
1223
+
1224
+ </td>
1225
+
1226
+
1227
+
1228
+
1229
+
1230
+ <td class="description last">Session, token JWT</td>
1231
+ </tr>
1232
+
1233
+
1234
+
1235
+ </tbody>
1236
+ </table>
1237
+ </div>
1238
+
1239
+
1240
+
1241
+
1242
+
1243
+ <dl class="details">
1244
+
1245
+
1246
+
1247
+
1248
+
1249
+
1250
+
1251
+
1252
+
1253
+
1254
+
1255
+
1256
+
1257
+
1258
+
1259
+
1260
+
1261
+
1262
+ <dt class="tag-author">Author:</dt>
1263
+ <dd class="tag-author">
1264
+ <ul>
1265
+ <li><a href="mailto:abernardo.br@gmail.com">CloudBrasil</a></li>
1266
+ </ul>
1267
+ </dd>
1268
+
1269
+
1270
+
1271
+
1272
+
1273
+
1274
+
1275
+
1276
+
1277
+
1278
+
1279
+
1280
+
1281
+
1282
+ <p class="tag-source">
1283
+ <a href="admin_notification.js.html" class="button">View Source</a>
1284
+ <span>
1285
+ <a href="admin_notification.js.html">admin/notification.js</a>, <a href="admin_notification.js.html#line176">line 176</a>
1286
+ </span>
1287
+ </p>
1288
+
1289
+ </dl>
1290
+
1291
+
1292
+
1293
+
1294
+
1295
+
1296
+
1297
+
1298
+
1299
+
1300
+
1301
+
1302
+
1303
+
1304
+
1305
+
1306
+
1307
+
1308
+ <div class='columns method-parameter'>
1309
+ <div class="column is-2"><label>Returns:</label></div>
1310
+ <div class="column is-10">
1311
+
1312
+
1313
+
1314
+ <div class="columns">
1315
+
1316
+
1317
+ <div class='column is-5 has-text-left'>
1318
+ <label>Type: </label>
1319
+
1320
+ <code class="param-type">Promise</code>
1321
+
1322
+
1323
+ </div>
1324
+
1325
+ </div>
1326
+
1327
+
1328
+ </div>
1329
+ </div>
1330
+
1331
+
1332
+
1333
+
1334
+ <h5>Example</h5>
1335
+
1336
+
1337
+ <pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
1338
+ const api = new API();
1339
+ const params = {
1340
+ orgId: '5edd11c46b6ce9729c2c297c',
1341
+ id: '55e4a3bd6be6b45210833fae',
1342
+ read: true
1343
+ };
1344
+ const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
1345
+ await api.admin.notifications.findByIdAndUpdate(params, session);</code></pre>
1346
+
1347
+
1348
+
1349
+ </div>
1350
+
1351
+ <div class="member">
1352
+
1353
+
1354
+
1355
+ <h4 class="name" id="realTime">
1356
+ <a class="href-link" href="#realTime">#</a>
1357
+
1358
+
1359
+ <span class='tag'>async</span>
1360
+
1361
+
1362
+ <span class="code-name">
1363
+
1364
+ realTime<span class="signature">(params, session)</span><span class="type-signature"> &rarr; {Promise.&lt;*>}</span>
1365
+
1366
+ </span>
1367
+ </h4>
1368
+
1369
+
1370
+
1371
+
1372
+ <div class="description">
1373
+ Send real time notification
1374
+ </div>
1375
+
1376
+
1377
+
1378
+
1379
+
1380
+
1381
+
1382
+
1383
+
1384
+
1385
+ <h5>Parameters:</h5>
1386
+
1387
+ <div class="table-container">
1388
+ <table class="params table">
1389
+ <thead>
1390
+ <tr>
1391
+
1392
+ <th>Name</th>
1393
+
1394
+
1395
+ <th>Type</th>
1396
+
1397
+
1398
+
1399
+
1400
+
1401
+ <th class="last">Description</th>
1402
+ </tr>
1403
+ </thead>
1404
+
1405
+ <tbody>
1406
+
1407
+
1408
+
1409
+ <tr class="deep-level-0">
1410
+
1411
+ <td class="name"><code>params</code></td>
1412
+
1413
+
1414
+ <td class="type">
1415
+
1416
+
1417
+ <code class="param-type">object</code>
1418
+
1419
+
1420
+
1421
+ </td>
1422
+
1423
+
1424
+
1425
+
1426
+
1427
+ <td class="description last">Params to send notification</td>
1428
+ </tr>
1429
+
1430
+
1431
+
1432
+
1433
+ <tr class="deep-level-1">
1434
+
1435
+ <td class="name"><code>userIds</code></td>
1436
+
1437
+
1438
+ <td class="type">
1439
+
1440
+
1441
+ <code class="param-type">string</code>
1442
+
1443
+
1444
+
1445
+ </td>
1446
+
1447
+
1448
+
1449
+
1450
+
1451
+ <td class="description last">Users to send notification</td>
1452
+ </tr>
1453
+
1454
+
1455
+
1456
+ <tr class="deep-level-1">
1457
+
1458
+ <td class="name"><code>message</code></td>
1459
+
1460
+
1461
+ <td class="type">
1462
+
1463
+
1464
+ <code class="param-type">object</code>
1465
+
1466
+
1467
+
1468
+ </td>
1469
+
1470
+
1471
+
1472
+
1473
+
1474
+ <td class="description last">Object with data to send user</td>
1475
+ </tr>
1476
+
1477
+
1478
+
1479
+
1480
+
1481
+
1482
+
1483
+ <tr class="deep-level-0">
1484
+
1485
+ <td class="name"><code>session</code></td>
1486
+
1487
+
1488
+ <td class="type">
1489
+
1490
+
1491
+ <code class="param-type">object</code>
1492
+
1493
+
1494
+
1495
+ </td>
1496
+
1497
+
1498
+
1499
+
1500
+
1501
+ <td class="description last">Session, token JWT</td>
1502
+ </tr>
1503
+
1504
+
1505
+
1506
+ </tbody>
1507
+ </table>
1508
+ </div>
1509
+
1510
+
1511
+
1512
+
1513
+
1514
+ <dl class="details">
1515
+
1516
+
1517
+
1518
+
1519
+
1520
+
1521
+
1522
+
1523
+
1524
+
1525
+
1526
+
1527
+
1528
+
1529
+
1530
+
1531
+
1532
+
1533
+
1534
+
1535
+
1536
+
1537
+
1538
+
1539
+
1540
+
1541
+
1542
+
1543
+
1544
+
1545
+
1546
+ <p class="tag-source">
1547
+ <a href="admin_notification.js.html" class="button">View Source</a>
1548
+ <span>
1549
+ <a href="admin_notification.js.html">admin/notification.js</a>, <a href="admin_notification.js.html#line58">line 58</a>
1550
+ </span>
1551
+ </p>
1552
+
1553
+ </dl>
1554
+
1555
+
1556
+
1557
+
1558
+
1559
+
1560
+
1561
+
1562
+
1563
+
1564
+
1565
+
1566
+
1567
+
1568
+
1569
+
1570
+
1571
+
1572
+ <div class='columns method-parameter'>
1573
+ <div class="column is-2"><label>Returns:</label></div>
1574
+ <div class="column is-10">
1575
+
1576
+
1577
+
1578
+ <div class="columns">
1579
+
1580
+
1581
+ <div class='column is-5 has-text-left'>
1582
+ <label>Type: </label>
1583
+
1584
+ <code class="param-type">Promise.&lt;*></code>
1585
+
1586
+
1587
+ </div>
1588
+
1589
+ </div>
1590
+
1591
+
1592
+ </div>
1593
+ </div>
1594
+
1595
+
1596
+
1597
+
1598
+ </div>
1599
+
1600
+ </div>
1601
+ </div>
1602
+
1603
+
1604
+
1605
+
1606
+
1607
+ </article>
1608
+
1609
+ </section>
1610
+
1611
+
1612
+
1613
+
1614
+ </div>
1615
+
1616
+ <footer class="footer">
1617
+ <div class="content has-text-centered">
1618
+ <p>Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a></p>
1619
+ <p class="sidebar-created-by">
1620
+ <a href="https://github.com/SoftwareBrothers/better-docs" target="_blank">BetterDocs theme</a> provided with <i class="fas fa-heart"></i> by
1621
+ <a href="http://softwarebrothers.co" target="_blank">SoftwareBrothers - JavaScript Development Agency</a>
1622
+ </p>
1623
+ </div>
1624
+ </footer>
1625
+
1626
+ </div>
1627
+ <div id="side-nav" class="side-nav">
1628
+ </div>
1629
+ </div>
1630
+ <script src="scripts/app.min.js"></script>
1631
+ <script>PR.prettyPrint();</script>
1632
+ <script src="scripts/linenumber.js"> </script>
1633
+
1634
+
1635
+ </body>
1636
+ </html>