@opengeoweb/space-weather 19.6.0 → 19.6.1
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/dist/index.esm.js +19 -12
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -464,7 +464,14 @@ function _unsupportedIterableToArray(r, a) {
|
|
|
464
464
|
}
|
|
465
465
|
|
|
466
466
|
var config$1 = sessionStorageProvider.getConfig();
|
|
467
|
-
var spaceweatherBaseUrl = config$1.GW_SW_BASE_URL
|
|
467
|
+
var spaceweatherBaseUrl = config$1.GW_SW_BASE_URL;
|
|
468
|
+
var getSpaceweatherBaseUrl = function getSpaceweatherBaseUrl() {
|
|
469
|
+
if (spaceweatherBaseUrl === undefined) {
|
|
470
|
+
var _config = sessionStorageProvider.getConfig();
|
|
471
|
+
spaceweatherBaseUrl = _config.GW_SW_BASE_URL || '';
|
|
472
|
+
}
|
|
473
|
+
return spaceweatherBaseUrl;
|
|
474
|
+
};
|
|
468
475
|
// API
|
|
469
476
|
// Bulletin section
|
|
470
477
|
var getBulletinHistoryList = /*#__PURE__*/function () {
|
|
@@ -472,7 +479,7 @@ var getBulletinHistoryList = /*#__PURE__*/function () {
|
|
|
472
479
|
return _regenerator().w(function (_context) {
|
|
473
480
|
while (1) switch (_context.n) {
|
|
474
481
|
case 0:
|
|
475
|
-
return _context.a(2, fetch(
|
|
482
|
+
return _context.a(2, fetch(getSpaceweatherBaseUrl() + "/bulletin/getBulletinHistory", {
|
|
476
483
|
headers: getHeaders(auth)
|
|
477
484
|
}).then(handleResponse));
|
|
478
485
|
}
|
|
@@ -487,7 +494,7 @@ var getBulletin = /*#__PURE__*/function () {
|
|
|
487
494
|
return _regenerator().w(function (_context2) {
|
|
488
495
|
while (1) switch (_context2.n) {
|
|
489
496
|
case 0:
|
|
490
|
-
return _context2.a(2, fetch(
|
|
497
|
+
return _context2.a(2, fetch(getSpaceweatherBaseUrl() + "/bulletin/getBulletin", {
|
|
491
498
|
headers: getHeaders(auth)
|
|
492
499
|
}).then(handleResponse));
|
|
493
500
|
}
|
|
@@ -505,7 +512,7 @@ var getEventList = /*#__PURE__*/function () {
|
|
|
505
512
|
while (1) switch (_context3.n) {
|
|
506
513
|
case 0:
|
|
507
514
|
URLParams = new URLSearchParams(params);
|
|
508
|
-
return _context3.a(2, fetch(
|
|
515
|
+
return _context3.a(2, fetch(getSpaceweatherBaseUrl() + "/notification/eventList?" + URLParams, {
|
|
509
516
|
headers: getHeaders(auth)
|
|
510
517
|
}).then(handleResponse));
|
|
511
518
|
}
|
|
@@ -520,7 +527,7 @@ var getEvent = /*#__PURE__*/function () {
|
|
|
520
527
|
return _regenerator().w(function (_context4) {
|
|
521
528
|
while (1) switch (_context4.n) {
|
|
522
529
|
case 0:
|
|
523
|
-
return _context4.a(2, fetch(
|
|
530
|
+
return _context4.a(2, fetch(getSpaceweatherBaseUrl() + "/notification/event/" + eventid, {
|
|
524
531
|
headers: getHeaders(auth)
|
|
525
532
|
}).then(handleResponse));
|
|
526
533
|
}
|
|
@@ -535,7 +542,7 @@ var getNewNotifications = /*#__PURE__*/function () {
|
|
|
535
542
|
return _regenerator().w(function (_context5) {
|
|
536
543
|
while (1) switch (_context5.n) {
|
|
537
544
|
case 0:
|
|
538
|
-
return _context5.a(2, fetch(
|
|
545
|
+
return _context5.a(2, fetch(getSpaceweatherBaseUrl() + "/notification/newNotifications", {
|
|
539
546
|
headers: getHeaders(auth)
|
|
540
547
|
}).then(handleResponse));
|
|
541
548
|
}
|
|
@@ -550,7 +557,7 @@ var postNotification = /*#__PURE__*/function () {
|
|
|
550
557
|
return _regenerator().w(function (_context6) {
|
|
551
558
|
while (1) switch (_context6.n) {
|
|
552
559
|
case 0:
|
|
553
|
-
return _context6.a(2, fetch(
|
|
560
|
+
return _context6.a(2, fetch(getSpaceweatherBaseUrl() + "/notification/store", {
|
|
554
561
|
headers: getHeaders(auth),
|
|
555
562
|
method: 'POST',
|
|
556
563
|
body: JSON.stringify(data)
|
|
@@ -569,7 +576,7 @@ var postDiscardDraftNotification = /*#__PURE__*/function () {
|
|
|
569
576
|
while (1) switch (_context7.n) {
|
|
570
577
|
case 0:
|
|
571
578
|
URLParams = new URLSearchParams(data);
|
|
572
|
-
return _context7.a(2, fetch(
|
|
579
|
+
return _context7.a(2, fetch(getSpaceweatherBaseUrl() + "/notification/discard?" + URLParams, {
|
|
573
580
|
headers: getHeaders(auth),
|
|
574
581
|
method: 'POST'
|
|
575
582
|
}).then(handleResponse));
|
|
@@ -585,7 +592,7 @@ var postSetAcknowledged = /*#__PURE__*/function () {
|
|
|
585
592
|
return _regenerator().w(function (_context8) {
|
|
586
593
|
while (1) switch (_context8.n) {
|
|
587
594
|
case 0:
|
|
588
|
-
return _context8.a(2, fetch(
|
|
595
|
+
return _context8.a(2, fetch(getSpaceweatherBaseUrl() + "/notification/acknowledged/" + eventid, {
|
|
589
596
|
headers: getHeaders(auth),
|
|
590
597
|
method: 'POST'
|
|
591
598
|
}).then(handleResponse));
|
|
@@ -601,7 +608,7 @@ var postPopulateTemplateContent = /*#__PURE__*/function () {
|
|
|
601
608
|
return _regenerator().w(function (_context9) {
|
|
602
609
|
while (1) switch (_context9.n) {
|
|
603
610
|
case 0:
|
|
604
|
-
return _context9.a(2, fetch(
|
|
611
|
+
return _context9.a(2, fetch(getSpaceweatherBaseUrl() + "/notification/populate", {
|
|
605
612
|
headers: getHeaders(auth),
|
|
606
613
|
method: 'POST',
|
|
607
614
|
body: JSON.stringify(data)
|
|
@@ -618,7 +625,7 @@ var getStreams = /*#__PURE__*/function () {
|
|
|
618
625
|
return _regenerator().w(function (_context0) {
|
|
619
626
|
while (1) switch (_context0.n) {
|
|
620
627
|
case 0:
|
|
621
|
-
return _context0.a(2, fetch(
|
|
628
|
+
return _context0.a(2, fetch(getSpaceweatherBaseUrl() + "/timeseries/streams", {
|
|
622
629
|
headers: getHeaders(auth)
|
|
623
630
|
}).then(handleResponse));
|
|
624
631
|
}
|
|
@@ -635,7 +642,7 @@ var getTimeSeries = /*#__PURE__*/function () {
|
|
|
635
642
|
while (1) switch (_context1.n) {
|
|
636
643
|
case 0:
|
|
637
644
|
URLParams = new URLSearchParams(data);
|
|
638
|
-
return _context1.a(2, fetch(
|
|
645
|
+
return _context1.a(2, fetch(getSpaceweatherBaseUrl() + "/timeseries/data?" + URLParams, {
|
|
639
646
|
headers: getHeaders(auth)
|
|
640
647
|
}).then(handleResponse));
|
|
641
648
|
}
|