geoserver-node-client 1.1.0 → 1.2.2

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/src/layer.js CHANGED
@@ -269,6 +269,229 @@ var LayerClient = /*#__PURE__*/function () {
269
269
 
270
270
  return getAll;
271
271
  }()
272
+ /**
273
+ * Get all layers of a workspace.
274
+ *
275
+ * @param {String} workspace The workspace
276
+ *
277
+ * @throws Error if request fails
278
+ *
279
+ * @return {Object} An object with the information about the layers
280
+ */
281
+
282
+ }, {
283
+ key: "getLayers",
284
+ value: function () {
285
+ var _getLayers = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(workspace) {
286
+ var response, geoServerResponse;
287
+ return _regenerator["default"].wrap(function _callee4$(_context4) {
288
+ while (1) {
289
+ switch (_context4.prev = _context4.next) {
290
+ case 0:
291
+ _context4.next = 2;
292
+ return (0, _nodeFetch["default"])(this.url + 'workspaces/' + workspace + '/layers.json', {
293
+ credentials: 'include',
294
+ method: 'GET',
295
+ headers: {
296
+ Authorization: this.auth
297
+ }
298
+ });
299
+
300
+ case 2:
301
+ response = _context4.sent;
302
+
303
+ if (response.ok) {
304
+ _context4.next = 8;
305
+ break;
306
+ }
307
+
308
+ _context4.next = 6;
309
+ return (0, _geoserver.getGeoServerResponseText)(response);
310
+
311
+ case 6:
312
+ geoServerResponse = _context4.sent;
313
+ throw new _geoserver.GeoServerResponseError(null, geoServerResponse);
314
+
315
+ case 8:
316
+ _context4.next = 10;
317
+ return response.json();
318
+
319
+ case 10:
320
+ return _context4.abrupt("return", _context4.sent);
321
+
322
+ case 11:
323
+ case "end":
324
+ return _context4.stop();
325
+ }
326
+ }
327
+ }, _callee4, this);
328
+ }));
329
+
330
+ function getLayers(_x7) {
331
+ return _getLayers.apply(this, arguments);
332
+ }
333
+
334
+ return getLayers;
335
+ }()
336
+ /**
337
+ * Returns information about a cascaded WMS layer.
338
+ *
339
+ * @param {String} workspace The workspace
340
+ * @param {String} datastore The datastore
341
+ * @param {String} layerName The WMS layer name
342
+ *
343
+ * @throws Error if request fails
344
+ *
345
+ * @returns {Object} An object with layer information or undefined if it cannot be found
346
+ */
347
+
348
+ }, {
349
+ key: "getWmsLayer",
350
+ value: function () {
351
+ var _getWmsLayer = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(workspace, datastore, layerName) {
352
+ var response, grc, geoServerResponse;
353
+ return _regenerator["default"].wrap(function _callee5$(_context5) {
354
+ while (1) {
355
+ switch (_context5.prev = _context5.next) {
356
+ case 0:
357
+ _context5.next = 2;
358
+ return (0, _nodeFetch["default"])(this.url + 'workspaces/' + workspace + '/wmsstores/' + datastore + '/wmslayers/' + layerName + '.json', {
359
+ credentials: 'include',
360
+ method: 'GET',
361
+ headers: {
362
+ Authorization: this.auth
363
+ }
364
+ });
365
+
366
+ case 2:
367
+ response = _context5.sent;
368
+
369
+ if (response.ok) {
370
+ _context5.next = 15;
371
+ break;
372
+ }
373
+
374
+ grc = new _about["default"](this.url, this.auth);
375
+ _context5.next = 7;
376
+ return grc.exists();
377
+
378
+ case 7:
379
+ if (!_context5.sent) {
380
+ _context5.next = 11;
381
+ break;
382
+ }
383
+
384
+ return _context5.abrupt("return");
385
+
386
+ case 11:
387
+ _context5.next = 13;
388
+ return (0, _geoserver.getGeoServerResponseText)(response);
389
+
390
+ case 13:
391
+ geoServerResponse = _context5.sent;
392
+ throw new _geoserver.GeoServerResponseError(null, geoServerResponse);
393
+
394
+ case 15:
395
+ _context5.next = 17;
396
+ return response.json();
397
+
398
+ case 17:
399
+ return _context5.abrupt("return", _context5.sent);
400
+
401
+ case 18:
402
+ case "end":
403
+ return _context5.stop();
404
+ }
405
+ }
406
+ }, _callee5, this);
407
+ }));
408
+
409
+ function getWmsLayer(_x8, _x9, _x10) {
410
+ return _getWmsLayer.apply(this, arguments);
411
+ }
412
+
413
+ return getWmsLayer;
414
+ }() // TODO: automated test needed
415
+
416
+ /**
417
+ * Returns information about a cascaded WMTS layer.
418
+ *
419
+ * @param {String} workspace The workspace
420
+ * @param {String} datastore The datastore
421
+ * @param {String} layerName The WMTS layer name
422
+ *
423
+ * @throws Error if request fails
424
+ *
425
+ * @returns {Object} An object with layer information or undefined if it cannot be found
426
+ */
427
+
428
+ }, {
429
+ key: "getWmtsLayer",
430
+ value: function () {
431
+ var _getWmtsLayer = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(workspace, datastore, layerName) {
432
+ var response, grc, geoServerResponse;
433
+ return _regenerator["default"].wrap(function _callee6$(_context6) {
434
+ while (1) {
435
+ switch (_context6.prev = _context6.next) {
436
+ case 0:
437
+ _context6.next = 2;
438
+ return (0, _nodeFetch["default"])(this.url + 'workspaces/' + workspace + '/wmtsstores/' + datastore + '/layers/' + layerName + '.json', {
439
+ credentials: 'include',
440
+ method: 'GET',
441
+ headers: {
442
+ Authorization: this.auth
443
+ }
444
+ });
445
+
446
+ case 2:
447
+ response = _context6.sent;
448
+
449
+ if (response.ok) {
450
+ _context6.next = 15;
451
+ break;
452
+ }
453
+
454
+ grc = new _about["default"](this.url, this.auth);
455
+ _context6.next = 7;
456
+ return grc.exists();
457
+
458
+ case 7:
459
+ if (!_context6.sent) {
460
+ _context6.next = 11;
461
+ break;
462
+ }
463
+
464
+ return _context6.abrupt("return");
465
+
466
+ case 11:
467
+ _context6.next = 13;
468
+ return (0, _geoserver.getGeoServerResponseText)(response);
469
+
470
+ case 13:
471
+ geoServerResponse = _context6.sent;
472
+ throw new _geoserver.GeoServerResponseError(null, geoServerResponse);
473
+
474
+ case 15:
475
+ _context6.next = 17;
476
+ return response.json();
477
+
478
+ case 17:
479
+ return _context6.abrupt("return", _context6.sent);
480
+
481
+ case 18:
482
+ case "end":
483
+ return _context6.stop();
484
+ }
485
+ }
486
+ }, _callee6, this);
487
+ }));
488
+
489
+ function getWmtsLayer(_x11, _x12, _x13) {
490
+ return _getWmtsLayer.apply(this, arguments);
491
+ }
492
+
493
+ return getWmtsLayer;
494
+ }()
272
495
  /**
273
496
  * Publishes a FeatureType in the default data store of the workspace.
274
497
  *
@@ -286,11 +509,11 @@ var LayerClient = /*#__PURE__*/function () {
286
509
  }, {
287
510
  key: "publishFeatureTypeDefaultDataStore",
288
511
  value: function () {
289
- var _publishFeatureTypeDefaultDataStore = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(workspace, nativeName, name, title, srs, enabled, _abstract) {
512
+ var _publishFeatureTypeDefaultDataStore = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(workspace, nativeName, name, title, srs, enabled, _abstract) {
290
513
  var body, response, geoServerResponse;
291
- return _regenerator["default"].wrap(function _callee4$(_context4) {
514
+ return _regenerator["default"].wrap(function _callee7$(_context7) {
292
515
  while (1) {
293
- switch (_context4.prev = _context4.next) {
516
+ switch (_context7.prev = _context7.next) {
294
517
  case 0:
295
518
  body = {
296
519
  featureType: {
@@ -302,7 +525,7 @@ var LayerClient = /*#__PURE__*/function () {
302
525
  "abstract": _abstract || ''
303
526
  }
304
527
  };
305
- _context4.next = 3;
528
+ _context7.next = 3;
306
529
  return (0, _nodeFetch["default"])(this.url + 'workspaces/' + workspace + '/featuretypes', {
307
530
  credentials: 'include',
308
531
  method: 'POST',
@@ -314,29 +537,29 @@ var LayerClient = /*#__PURE__*/function () {
314
537
  });
315
538
 
316
539
  case 3:
317
- response = _context4.sent;
540
+ response = _context7.sent;
318
541
 
319
542
  if (response.ok) {
320
- _context4.next = 9;
543
+ _context7.next = 9;
321
544
  break;
322
545
  }
323
546
 
324
- _context4.next = 7;
547
+ _context7.next = 7;
325
548
  return (0, _geoserver.getGeoServerResponseText)(response);
326
549
 
327
550
  case 7:
328
- geoServerResponse = _context4.sent;
551
+ geoServerResponse = _context7.sent;
329
552
  throw new _geoserver.GeoServerResponseError(null, geoServerResponse);
330
553
 
331
554
  case 9:
332
555
  case "end":
333
- return _context4.stop();
556
+ return _context7.stop();
334
557
  }
335
558
  }
336
- }, _callee4, this);
559
+ }, _callee7, this);
337
560
  }));
338
561
 
339
- function publishFeatureTypeDefaultDataStore(_x7, _x8, _x9, _x10, _x11, _x12, _x13) {
562
+ function publishFeatureTypeDefaultDataStore(_x14, _x15, _x16, _x17, _x18, _x19, _x20) {
340
563
  return _publishFeatureTypeDefaultDataStore.apply(this, arguments);
341
564
  }
342
565
 
@@ -361,11 +584,11 @@ var LayerClient = /*#__PURE__*/function () {
361
584
  }, {
362
585
  key: "publishFeatureType",
363
586
  value: function () {
364
- var _publishFeatureType = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(workspace, dataStore, nativeName, name, title, srs, enabled, _abstract2, nativeBoundingBox) {
587
+ var _publishFeatureType = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8(workspace, dataStore, nativeName, name, title, srs, enabled, _abstract2, nativeBoundingBox) {
365
588
  var body, response, geoServerResponse;
366
- return _regenerator["default"].wrap(function _callee5$(_context5) {
589
+ return _regenerator["default"].wrap(function _callee8$(_context8) {
367
590
  while (1) {
368
- switch (_context5.prev = _context5.next) {
591
+ switch (_context8.prev = _context8.next) {
369
592
  case 0:
370
593
  // apply CRS info for native BBOX if not provided
371
594
  if (nativeBoundingBox && !nativeBoundingBox.crs) {
@@ -386,7 +609,7 @@ var LayerClient = /*#__PURE__*/function () {
386
609
  nativeBoundingBox: nativeBoundingBox
387
610
  }
388
611
  };
389
- _context5.next = 4;
612
+ _context8.next = 4;
390
613
  return (0, _nodeFetch["default"])(this.url + 'workspaces/' + workspace + '/datastores/' + dataStore + '/featuretypes', {
391
614
  credentials: 'include',
392
615
  method: 'POST',
@@ -398,29 +621,29 @@ var LayerClient = /*#__PURE__*/function () {
398
621
  });
399
622
 
400
623
  case 4:
401
- response = _context5.sent;
624
+ response = _context8.sent;
402
625
 
403
626
  if (response.ok) {
404
- _context5.next = 10;
627
+ _context8.next = 10;
405
628
  break;
406
629
  }
407
630
 
408
- _context5.next = 8;
631
+ _context8.next = 8;
409
632
  return (0, _geoserver.getGeoServerResponseText)(response);
410
633
 
411
634
  case 8:
412
- geoServerResponse = _context5.sent;
635
+ geoServerResponse = _context8.sent;
413
636
  throw new _geoserver.GeoServerResponseError(null, geoServerResponse);
414
637
 
415
638
  case 10:
416
639
  case "end":
417
- return _context5.stop();
640
+ return _context8.stop();
418
641
  }
419
642
  }
420
- }, _callee5, this);
643
+ }, _callee8, this);
421
644
  }));
422
645
 
423
- function publishFeatureType(_x14, _x15, _x16, _x17, _x18, _x19, _x20, _x21, _x22) {
646
+ function publishFeatureType(_x21, _x22, _x23, _x24, _x25, _x26, _x27, _x28, _x29) {
424
647
  return _publishFeatureType.apply(this, arguments);
425
648
  }
426
649
 
@@ -441,14 +664,14 @@ var LayerClient = /*#__PURE__*/function () {
441
664
  }, {
442
665
  key: "getFeatureType",
443
666
  value: function () {
444
- var _getFeatureType = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(workspace, datastore, name) {
667
+ var _getFeatureType = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9(workspace, datastore, name) {
445
668
  var url, response, grc, geoServerResponse;
446
- return _regenerator["default"].wrap(function _callee6$(_context6) {
669
+ return _regenerator["default"].wrap(function _callee9$(_context9) {
447
670
  while (1) {
448
- switch (_context6.prev = _context6.next) {
671
+ switch (_context9.prev = _context9.next) {
449
672
  case 0:
450
673
  url = this.url + 'workspaces/' + workspace + '/datastores/' + datastore + '/featuretypes/' + name + '.json';
451
- _context6.next = 3;
674
+ _context9.next = 3;
452
675
  return (0, _nodeFetch["default"])(url, {
453
676
  credentials: 'include',
454
677
  method: 'GET',
@@ -458,45 +681,45 @@ var LayerClient = /*#__PURE__*/function () {
458
681
  });
459
682
 
460
683
  case 3:
461
- response = _context6.sent;
684
+ response = _context9.sent;
462
685
 
463
686
  if (response.ok) {
464
- _context6.next = 16;
687
+ _context9.next = 16;
465
688
  break;
466
689
  }
467
690
 
468
691
  grc = new _about["default"](this.url, this.auth);
469
- _context6.next = 8;
692
+ _context9.next = 8;
470
693
  return grc.exists();
471
694
 
472
695
  case 8:
473
- if (!_context6.sent) {
474
- _context6.next = 12;
696
+ if (!_context9.sent) {
697
+ _context9.next = 12;
475
698
  break;
476
699
  }
477
700
 
478
- return _context6.abrupt("return");
701
+ return _context9.abrupt("return");
479
702
 
480
703
  case 12:
481
- _context6.next = 14;
704
+ _context9.next = 14;
482
705
  return (0, _geoserver.getGeoServerResponseText)(response);
483
706
 
484
707
  case 14:
485
- geoServerResponse = _context6.sent;
708
+ geoServerResponse = _context9.sent;
486
709
  throw new _geoserver.GeoServerResponseError(null, geoServerResponse);
487
710
 
488
711
  case 16:
489
- return _context6.abrupt("return", response.json());
712
+ return _context9.abrupt("return", response.json());
490
713
 
491
714
  case 17:
492
715
  case "end":
493
- return _context6.stop();
716
+ return _context9.stop();
494
717
  }
495
718
  }
496
- }, _callee6, this);
719
+ }, _callee9, this);
497
720
  }));
498
721
 
499
- function getFeatureType(_x23, _x24, _x25) {
722
+ function getFeatureType(_x30, _x31, _x32) {
500
723
  return _getFeatureType.apply(this, arguments);
501
724
  }
502
725
 
@@ -520,11 +743,11 @@ var LayerClient = /*#__PURE__*/function () {
520
743
  }, {
521
744
  key: "publishWmsLayer",
522
745
  value: function () {
523
- var _publishWmsLayer = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(workspace, dataStore, nativeName, name, title, srs, enabled, _abstract3) {
746
+ var _publishWmsLayer = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10(workspace, dataStore, nativeName, name, title, srs, enabled, _abstract3) {
524
747
  var body, response, geoServerResponse;
525
- return _regenerator["default"].wrap(function _callee7$(_context7) {
748
+ return _regenerator["default"].wrap(function _callee10$(_context10) {
526
749
  while (1) {
527
- switch (_context7.prev = _context7.next) {
750
+ switch (_context10.prev = _context10.next) {
528
751
  case 0:
529
752
  body = {
530
753
  wmsLayer: {
@@ -536,7 +759,7 @@ var LayerClient = /*#__PURE__*/function () {
536
759
  "abstract": _abstract3 || ''
537
760
  }
538
761
  };
539
- _context7.next = 3;
762
+ _context10.next = 3;
540
763
  return (0, _nodeFetch["default"])(this.url + 'workspaces/' + workspace + '/wmsstores/' + dataStore + '/wmslayers', {
541
764
  credentials: 'include',
542
765
  method: 'POST',
@@ -548,29 +771,29 @@ var LayerClient = /*#__PURE__*/function () {
548
771
  });
549
772
 
550
773
  case 3:
551
- response = _context7.sent;
774
+ response = _context10.sent;
552
775
 
553
776
  if (response.ok) {
554
- _context7.next = 9;
777
+ _context10.next = 9;
555
778
  break;
556
779
  }
557
780
 
558
- _context7.next = 7;
781
+ _context10.next = 7;
559
782
  return (0, _geoserver.getGeoServerResponseText)(response);
560
783
 
561
784
  case 7:
562
- geoServerResponse = _context7.sent;
785
+ geoServerResponse = _context10.sent;
563
786
  throw new _geoserver.GeoServerResponseError(null, geoServerResponse);
564
787
 
565
788
  case 9:
566
789
  case "end":
567
- return _context7.stop();
790
+ return _context10.stop();
568
791
  }
569
792
  }
570
- }, _callee7, this);
793
+ }, _callee10, this);
571
794
  }));
572
795
 
573
- function publishWmsLayer(_x26, _x27, _x28, _x29, _x30, _x31, _x32, _x33) {
796
+ function publishWmsLayer(_x33, _x34, _x35, _x36, _x37, _x38, _x39, _x40) {
574
797
  return _publishWmsLayer.apply(this, arguments);
575
798
  }
576
799
 
@@ -594,11 +817,11 @@ var LayerClient = /*#__PURE__*/function () {
594
817
  }, {
595
818
  key: "publishDbRaster",
596
819
  value: function () {
597
- var _publishDbRaster = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8(workspace, coverageStore, nativeName, name, title, srs, enabled, _abstract4) {
820
+ var _publishDbRaster = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11(workspace, coverageStore, nativeName, name, title, srs, enabled, _abstract4) {
598
821
  var body, response, geoServerResponse;
599
- return _regenerator["default"].wrap(function _callee8$(_context8) {
822
+ return _regenerator["default"].wrap(function _callee11$(_context11) {
600
823
  while (1) {
601
- switch (_context8.prev = _context8.next) {
824
+ switch (_context11.prev = _context11.next) {
602
825
  case 0:
603
826
  body = {
604
827
  coverage: {
@@ -610,7 +833,7 @@ var LayerClient = /*#__PURE__*/function () {
610
833
  "abstract": _abstract4 || ''
611
834
  }
612
835
  };
613
- _context8.next = 3;
836
+ _context11.next = 3;
614
837
  return (0, _nodeFetch["default"])(this.url + 'workspaces/' + workspace + '/coveragestores/' + coverageStore + '/coverages', {
615
838
  credentials: 'include',
616
839
  method: 'POST',
@@ -622,29 +845,29 @@ var LayerClient = /*#__PURE__*/function () {
622
845
  });
623
846
 
624
847
  case 3:
625
- response = _context8.sent;
848
+ response = _context11.sent;
626
849
 
627
850
  if (response.ok) {
628
- _context8.next = 9;
851
+ _context11.next = 9;
629
852
  break;
630
853
  }
631
854
 
632
- _context8.next = 7;
855
+ _context11.next = 7;
633
856
  return (0, _geoserver.getGeoServerResponseText)(response);
634
857
 
635
858
  case 7:
636
- geoServerResponse = _context8.sent;
859
+ geoServerResponse = _context11.sent;
637
860
  throw new _geoserver.GeoServerResponseError(null, geoServerResponse);
638
861
 
639
862
  case 9:
640
863
  case "end":
641
- return _context8.stop();
864
+ return _context11.stop();
642
865
  }
643
866
  }
644
- }, _callee8, this);
867
+ }, _callee11, this);
645
868
  }));
646
869
 
647
- function publishDbRaster(_x34, _x35, _x36, _x37, _x38, _x39, _x40, _x41) {
870
+ function publishDbRaster(_x41, _x42, _x43, _x44, _x45, _x46, _x47, _x48) {
648
871
  return _publishDbRaster.apply(this, arguments);
649
872
  }
650
873
 
@@ -664,13 +887,13 @@ var LayerClient = /*#__PURE__*/function () {
664
887
  }, {
665
888
  key: "deleteFeatureType",
666
889
  value: function () {
667
- var _deleteFeatureType = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9(workspace, datastore, name, recurse) {
890
+ var _deleteFeatureType = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee12(workspace, datastore, name, recurse) {
668
891
  var response, geoServerResponse;
669
- return _regenerator["default"].wrap(function _callee9$(_context9) {
892
+ return _regenerator["default"].wrap(function _callee12$(_context12) {
670
893
  while (1) {
671
- switch (_context9.prev = _context9.next) {
894
+ switch (_context12.prev = _context12.next) {
672
895
  case 0:
673
- _context9.next = 2;
896
+ _context12.next = 2;
674
897
  return (0, _nodeFetch["default"])(this.url + 'workspaces/' + workspace + '/datastores/' + datastore + '/featuretypes/' + name + '?recurse=' + recurse, {
675
898
  credentials: 'include',
676
899
  method: 'DELETE',
@@ -680,29 +903,29 @@ var LayerClient = /*#__PURE__*/function () {
680
903
  });
681
904
 
682
905
  case 2:
683
- response = _context9.sent;
906
+ response = _context12.sent;
684
907
 
685
908
  if (response.ok) {
686
- _context9.next = 8;
909
+ _context12.next = 8;
687
910
  break;
688
911
  }
689
912
 
690
- _context9.next = 6;
913
+ _context12.next = 6;
691
914
  return (0, _geoserver.getGeoServerResponseText)(response);
692
915
 
693
916
  case 6:
694
- geoServerResponse = _context9.sent;
917
+ geoServerResponse = _context12.sent;
695
918
  throw new _geoserver.GeoServerResponseError(null, geoServerResponse);
696
919
 
697
920
  case 8:
698
921
  case "end":
699
- return _context9.stop();
922
+ return _context12.stop();
700
923
  }
701
924
  }
702
- }, _callee9, this);
925
+ }, _callee12, this);
703
926
  }));
704
927
 
705
- function deleteFeatureType(_x42, _x43, _x44, _x45) {
928
+ function deleteFeatureType(_x49, _x50, _x51, _x52) {
706
929
  return _deleteFeatureType.apply(this, arguments);
707
930
  }
708
931
 
@@ -727,11 +950,11 @@ var LayerClient = /*#__PURE__*/function () {
727
950
  }, {
728
951
  key: "enableTimeCoverage",
729
952
  value: function () {
730
- var _enableTimeCoverage = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10(workspace, dataStore, name, presentation, resolution, defaultValue, nearestMatchEnabled, rawNearestMatchEnabled, acceptableInterval) {
953
+ var _enableTimeCoverage = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee13(workspace, dataStore, name, presentation, resolution, defaultValue, nearestMatchEnabled, rawNearestMatchEnabled, acceptableInterval) {
731
954
  var body, url, response, geoServerResponse;
732
- return _regenerator["default"].wrap(function _callee10$(_context10) {
955
+ return _regenerator["default"].wrap(function _callee13$(_context13) {
733
956
  while (1) {
734
- switch (_context10.prev = _context10.next) {
957
+ switch (_context13.prev = _context13.next) {
735
958
  case 0:
736
959
  body = {
737
960
  coverage: {
@@ -739,6 +962,7 @@ var LayerClient = /*#__PURE__*/function () {
739
962
  entry: [{
740
963
  '@key': 'time',
741
964
  dimensionInfo: {
965
+ enabled: true,
742
966
  presentation: presentation || 'DISCRETE_INTERVAL',
743
967
  resolution: resolution,
744
968
  units: 'ISO8601',
@@ -754,7 +978,7 @@ var LayerClient = /*#__PURE__*/function () {
754
978
  }
755
979
  };
756
980
  url = this.url + 'workspaces/' + workspace + '/coveragestores/' + dataStore + '/coverages/' + name + '.json';
757
- _context10.next = 4;
981
+ _context13.next = 4;
758
982
  return (0, _nodeFetch["default"])(url, {
759
983
  credentials: 'include',
760
984
  method: 'PUT',
@@ -766,29 +990,29 @@ var LayerClient = /*#__PURE__*/function () {
766
990
  });
767
991
 
768
992
  case 4:
769
- response = _context10.sent;
993
+ response = _context13.sent;
770
994
 
771
995
  if (response.ok) {
772
- _context10.next = 10;
996
+ _context13.next = 10;
773
997
  break;
774
998
  }
775
999
 
776
- _context10.next = 8;
1000
+ _context13.next = 8;
777
1001
  return (0, _geoserver.getGeoServerResponseText)(response);
778
1002
 
779
1003
  case 8:
780
- geoServerResponse = _context10.sent;
1004
+ geoServerResponse = _context13.sent;
781
1005
  throw new _geoserver.GeoServerResponseError(null, geoServerResponse);
782
1006
 
783
1007
  case 10:
784
1008
  case "end":
785
- return _context10.stop();
1009
+ return _context13.stop();
786
1010
  }
787
1011
  }
788
- }, _callee10, this);
1012
+ }, _callee13, this);
789
1013
  }));
790
1014
 
791
- function enableTimeCoverage(_x46, _x47, _x48, _x49, _x50, _x51, _x52, _x53, _x54) {
1015
+ function enableTimeCoverage(_x53, _x54, _x55, _x56, _x57, _x58, _x59, _x60, _x61) {
792
1016
  return _enableTimeCoverage.apply(this, arguments);
793
1017
  }
794
1018
 
@@ -813,11 +1037,11 @@ var LayerClient = /*#__PURE__*/function () {
813
1037
  }, {
814
1038
  key: "enableTimeFeatureType",
815
1039
  value: function () {
816
- var _enableTimeFeatureType = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11(workspace, dataStore, name, attribute, presentation, resolution, defaultValue, nearestMatchEnabled, rawNearestMatchEnabled, acceptableInterval) {
1040
+ var _enableTimeFeatureType = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee14(workspace, dataStore, name, attribute, presentation, resolution, defaultValue, nearestMatchEnabled, rawNearestMatchEnabled, acceptableInterval) {
817
1041
  var body, url, response, geoServerResponse;
818
- return _regenerator["default"].wrap(function _callee11$(_context11) {
1042
+ return _regenerator["default"].wrap(function _callee14$(_context14) {
819
1043
  while (1) {
820
- switch (_context11.prev = _context11.next) {
1044
+ switch (_context14.prev = _context14.next) {
821
1045
  case 0:
822
1046
  body = {
823
1047
  featureType: {
@@ -841,7 +1065,7 @@ var LayerClient = /*#__PURE__*/function () {
841
1065
  }
842
1066
  };
843
1067
  url = this.url + 'workspaces/' + workspace + '/datastores/' + dataStore + '/featuretypes/' + name + '.json';
844
- _context11.next = 4;
1068
+ _context14.next = 4;
845
1069
  return (0, _nodeFetch["default"])(url, {
846
1070
  credentials: 'include',
847
1071
  method: 'PUT',
@@ -853,29 +1077,29 @@ var LayerClient = /*#__PURE__*/function () {
853
1077
  });
854
1078
 
855
1079
  case 4:
856
- response = _context11.sent;
1080
+ response = _context14.sent;
857
1081
 
858
1082
  if (response.ok) {
859
- _context11.next = 10;
1083
+ _context14.next = 10;
860
1084
  break;
861
1085
  }
862
1086
 
863
- _context11.next = 8;
1087
+ _context14.next = 8;
864
1088
  return (0, _geoserver.getGeoServerResponseText)(response);
865
1089
 
866
1090
  case 8:
867
- geoServerResponse = _context11.sent;
1091
+ geoServerResponse = _context14.sent;
868
1092
  throw new _geoserver.GeoServerResponseError(null, geoServerResponse);
869
1093
 
870
1094
  case 10:
871
1095
  case "end":
872
- return _context11.stop();
1096
+ return _context14.stop();
873
1097
  }
874
1098
  }
875
- }, _callee11, this);
1099
+ }, _callee14, this);
876
1100
  }));
877
1101
 
878
- function enableTimeFeatureType(_x55, _x56, _x57, _x58, _x59, _x60, _x61, _x62, _x63, _x64) {
1102
+ function enableTimeFeatureType(_x62, _x63, _x64, _x65, _x66, _x67, _x68, _x69, _x70, _x71) {
879
1103
  return _enableTimeFeatureType.apply(this, arguments);
880
1104
  }
881
1105
 
@@ -896,14 +1120,14 @@ var LayerClient = /*#__PURE__*/function () {
896
1120
  }, {
897
1121
  key: "getCoverage",
898
1122
  value: function () {
899
- var _getCoverage = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee12(workspace, coverageStore, name) {
1123
+ var _getCoverage = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee15(workspace, coverageStore, name) {
900
1124
  var url, response, grc, geoServerResponse;
901
- return _regenerator["default"].wrap(function _callee12$(_context12) {
1125
+ return _regenerator["default"].wrap(function _callee15$(_context15) {
902
1126
  while (1) {
903
- switch (_context12.prev = _context12.next) {
1127
+ switch (_context15.prev = _context15.next) {
904
1128
  case 0:
905
1129
  url = this.url + 'workspaces/' + workspace + '/coveragestores/' + coverageStore + '/coverages/' + name + '.json';
906
- _context12.next = 3;
1130
+ _context15.next = 3;
907
1131
  return (0, _nodeFetch["default"])(url, {
908
1132
  credentials: 'include',
909
1133
  method: 'GET',
@@ -913,45 +1137,45 @@ var LayerClient = /*#__PURE__*/function () {
913
1137
  });
914
1138
 
915
1139
  case 3:
916
- response = _context12.sent;
1140
+ response = _context15.sent;
917
1141
 
918
1142
  if (response.ok) {
919
- _context12.next = 16;
1143
+ _context15.next = 16;
920
1144
  break;
921
1145
  }
922
1146
 
923
1147
  grc = new _about["default"](this.url, this.auth);
924
- _context12.next = 8;
1148
+ _context15.next = 8;
925
1149
  return grc.exists();
926
1150
 
927
1151
  case 8:
928
- if (!_context12.sent) {
929
- _context12.next = 12;
1152
+ if (!_context15.sent) {
1153
+ _context15.next = 12;
930
1154
  break;
931
1155
  }
932
1156
 
933
- return _context12.abrupt("return");
1157
+ return _context15.abrupt("return");
934
1158
 
935
1159
  case 12:
936
- _context12.next = 14;
1160
+ _context15.next = 14;
937
1161
  return (0, _geoserver.getGeoServerResponseText)(response);
938
1162
 
939
1163
  case 14:
940
- geoServerResponse = _context12.sent;
1164
+ geoServerResponse = _context15.sent;
941
1165
  throw new _geoserver.GeoServerResponseError(null, geoServerResponse);
942
1166
 
943
1167
  case 16:
944
- return _context12.abrupt("return", response.json());
1168
+ return _context15.abrupt("return", response.json());
945
1169
 
946
1170
  case 17:
947
1171
  case "end":
948
- return _context12.stop();
1172
+ return _context15.stop();
949
1173
  }
950
1174
  }
951
- }, _callee12, this);
1175
+ }, _callee15, this);
952
1176
  }));
953
1177
 
954
- function getCoverage(_x65, _x66, _x67) {
1178
+ function getCoverage(_x72, _x73, _x74) {
955
1179
  return _getCoverage.apply(this, arguments);
956
1180
  }
957
1181
 
@@ -973,11 +1197,11 @@ var LayerClient = /*#__PURE__*/function () {
973
1197
  }, {
974
1198
  key: "renameCoverageBands",
975
1199
  value: function () {
976
- var _renameCoverageBands = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee13(workspace, dataStore, layername, bandNames) {
1200
+ var _renameCoverageBands = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee16(workspace, dataStore, layername, bandNames) {
977
1201
  var body, url, response, geoServerResponse;
978
- return _regenerator["default"].wrap(function _callee13$(_context13) {
1202
+ return _regenerator["default"].wrap(function _callee16$(_context16) {
979
1203
  while (1) {
980
- switch (_context13.prev = _context13.next) {
1204
+ switch (_context16.prev = _context16.next) {
981
1205
  case 0:
982
1206
  body = {
983
1207
  coverage: {
@@ -993,7 +1217,7 @@ var LayerClient = /*#__PURE__*/function () {
993
1217
  });
994
1218
  });
995
1219
  url = this.url + 'workspaces/' + workspace + '/coveragestores/' + dataStore + '/coverages/' + layername + '.json';
996
- _context13.next = 5;
1220
+ _context16.next = 5;
997
1221
  return (0, _nodeFetch["default"])(url, {
998
1222
  credentials: 'include',
999
1223
  method: 'PUT',
@@ -1005,29 +1229,29 @@ var LayerClient = /*#__PURE__*/function () {
1005
1229
  });
1006
1230
 
1007
1231
  case 5:
1008
- response = _context13.sent;
1232
+ response = _context16.sent;
1009
1233
 
1010
1234
  if (response.ok) {
1011
- _context13.next = 11;
1235
+ _context16.next = 11;
1012
1236
  break;
1013
1237
  }
1014
1238
 
1015
- _context13.next = 9;
1239
+ _context16.next = 9;
1016
1240
  return (0, _geoserver.getGeoServerResponseText)(response);
1017
1241
 
1018
1242
  case 9:
1019
- geoServerResponse = _context13.sent;
1243
+ geoServerResponse = _context16.sent;
1020
1244
  throw new _geoserver.GeoServerResponseError(null, geoServerResponse);
1021
1245
 
1022
1246
  case 11:
1023
1247
  case "end":
1024
- return _context13.stop();
1248
+ return _context16.stop();
1025
1249
  }
1026
1250
  }
1027
- }, _callee13, this);
1251
+ }, _callee16, this);
1028
1252
  }));
1029
1253
 
1030
- function renameCoverageBands(_x68, _x69, _x70, _x71) {
1254
+ function renameCoverageBands(_x75, _x76, _x77, _x78) {
1031
1255
  return _renameCoverageBands.apply(this, arguments);
1032
1256
  }
1033
1257