roboto-js 1.9.5 → 1.9.7

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.
@@ -506,64 +506,119 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
506
506
  }
507
507
  return confirmUserEmail;
508
508
  }() //
509
- // create and upload files
509
+ // Organization management
510
510
  //
511
511
  }, {
512
- key: "createFile",
512
+ key: "loadCurrentOrganization",
513
513
  value: function () {
514
- var _createFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
515
- var data,
514
+ var _loadCurrentOrganization = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
515
+ var forceReload,
516
516
  _args11 = arguments;
517
517
  return _regeneratorRuntime().wrap(function _callee11$(_context11) {
518
518
  while (1) switch (_context11.prev = _context11.next) {
519
519
  case 0:
520
- data = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
521
- return _context11.abrupt("return", this.api.createFile(data));
520
+ forceReload = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : false;
521
+ return _context11.abrupt("return", this.api.loadCurrentOrganization(forceReload));
522
522
  case 2:
523
523
  case "end":
524
524
  return _context11.stop();
525
525
  }
526
526
  }, _callee11, this);
527
527
  }));
528
- function createFile() {
529
- return _createFile.apply(this, arguments);
528
+ function loadCurrentOrganization() {
529
+ return _loadCurrentOrganization.apply(this, arguments);
530
530
  }
531
- return createFile;
531
+ return loadCurrentOrganization;
532
532
  }()
533
533
  }, {
534
- key: "loadFile",
534
+ key: "switchOrganization",
535
535
  value: function () {
536
- var _loadFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(id) {
536
+ var _switchOrganization = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(orgId) {
537
537
  return _regeneratorRuntime().wrap(function _callee12$(_context12) {
538
538
  while (1) switch (_context12.prev = _context12.next) {
539
539
  case 0:
540
- return _context12.abrupt("return", this.api.loadFile(id));
540
+ return _context12.abrupt("return", this.api.switchOrganization(orgId));
541
541
  case 1:
542
542
  case "end":
543
543
  return _context12.stop();
544
544
  }
545
545
  }, _callee12, this);
546
546
  }));
547
- function loadFile(_x6) {
548
- return _loadFile.apply(this, arguments);
547
+ function switchOrganization(_x6) {
548
+ return _switchOrganization.apply(this, arguments);
549
549
  }
550
- return loadFile;
550
+ return switchOrganization;
551
551
  }()
552
552
  }, {
553
- key: "loadFiles",
553
+ key: "getCurrentOrganization",
554
+ value: function getCurrentOrganization() {
555
+ return this.api.getCurrentOrganization();
556
+ }
557
+ }, {
558
+ key: "currentOrganization",
559
+ get: function get() {
560
+ return this.api.currentOrganization;
561
+ }
562
+
563
+ //
564
+ // create and upload files
565
+ //
566
+ }, {
567
+ key: "createFile",
554
568
  value: function () {
555
- var _loadFiles = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(ids) {
569
+ var _createFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
570
+ var data,
571
+ _args13 = arguments;
556
572
  return _regeneratorRuntime().wrap(function _callee13$(_context13) {
557
573
  while (1) switch (_context13.prev = _context13.next) {
558
574
  case 0:
559
- return _context13.abrupt("return", this.api.loadFiles(ids));
560
- case 1:
575
+ data = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {};
576
+ return _context13.abrupt("return", this.api.createFile(data));
577
+ case 2:
561
578
  case "end":
562
579
  return _context13.stop();
563
580
  }
564
581
  }, _callee13, this);
565
582
  }));
566
- function loadFiles(_x7) {
583
+ function createFile() {
584
+ return _createFile.apply(this, arguments);
585
+ }
586
+ return createFile;
587
+ }()
588
+ }, {
589
+ key: "loadFile",
590
+ value: function () {
591
+ var _loadFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(id) {
592
+ return _regeneratorRuntime().wrap(function _callee14$(_context14) {
593
+ while (1) switch (_context14.prev = _context14.next) {
594
+ case 0:
595
+ return _context14.abrupt("return", this.api.loadFile(id));
596
+ case 1:
597
+ case "end":
598
+ return _context14.stop();
599
+ }
600
+ }, _callee14, this);
601
+ }));
602
+ function loadFile(_x7) {
603
+ return _loadFile.apply(this, arguments);
604
+ }
605
+ return loadFile;
606
+ }()
607
+ }, {
608
+ key: "loadFiles",
609
+ value: function () {
610
+ var _loadFiles = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(ids) {
611
+ return _regeneratorRuntime().wrap(function _callee15$(_context15) {
612
+ while (1) switch (_context15.prev = _context15.next) {
613
+ case 0:
614
+ return _context15.abrupt("return", this.api.loadFiles(ids));
615
+ case 1:
616
+ case "end":
617
+ return _context15.stop();
618
+ }
619
+ }, _callee15, this);
620
+ }));
621
+ function loadFiles(_x8) {
567
622
  return _loadFiles.apply(this, arguments);
568
623
  }
569
624
  return loadFiles;
@@ -573,21 +628,21 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
573
628
  }, {
574
629
  key: "create",
575
630
  value: function () {
576
- var _create = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(params) {
631
+ var _create = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(params) {
577
632
  var data,
578
- _args14 = arguments;
579
- return _regeneratorRuntime().wrap(function _callee14$(_context14) {
580
- while (1) switch (_context14.prev = _context14.next) {
633
+ _args16 = arguments;
634
+ return _regeneratorRuntime().wrap(function _callee16$(_context16) {
635
+ while (1) switch (_context16.prev = _context16.next) {
581
636
  case 0:
582
- data = _args14.length > 1 && _args14[1] !== undefined ? _args14[1] : {};
583
- return _context14.abrupt("return", this.api.create(params, data));
637
+ data = _args16.length > 1 && _args16[1] !== undefined ? _args16[1] : {};
638
+ return _context16.abrupt("return", this.api.create(params, data));
584
639
  case 2:
585
640
  case "end":
586
- return _context14.stop();
641
+ return _context16.stop();
587
642
  }
588
- }, _callee14, this);
643
+ }, _callee16, this);
589
644
  }));
590
- function create(_x8) {
645
+ function create(_x9) {
591
646
  return _create.apply(this, arguments);
592
647
  }
593
648
  return create;
@@ -595,18 +650,18 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
595
650
  }, {
596
651
  key: "load",
597
652
  value: function () {
598
- var _load = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(type, ids, options) {
599
- return _regeneratorRuntime().wrap(function _callee15$(_context15) {
600
- while (1) switch (_context15.prev = _context15.next) {
653
+ var _load = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(type, ids, options) {
654
+ return _regeneratorRuntime().wrap(function _callee17$(_context17) {
655
+ while (1) switch (_context17.prev = _context17.next) {
601
656
  case 0:
602
- return _context15.abrupt("return", this.api.load(type, ids, options));
657
+ return _context17.abrupt("return", this.api.load(type, ids, options));
603
658
  case 1:
604
659
  case "end":
605
- return _context15.stop();
660
+ return _context17.stop();
606
661
  }
607
- }, _callee15, this);
662
+ }, _callee17, this);
608
663
  }));
609
- function load(_x9, _x10, _x11) {
664
+ function load(_x10, _x11, _x12) {
610
665
  return _load.apply(this, arguments);
611
666
  }
612
667
  return load;
@@ -614,18 +669,18 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
614
669
  }, {
615
670
  key: "query",
616
671
  value: function () {
617
- var _query = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(type, params) {
618
- return _regeneratorRuntime().wrap(function _callee16$(_context16) {
619
- while (1) switch (_context16.prev = _context16.next) {
672
+ var _query = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(type, params) {
673
+ return _regeneratorRuntime().wrap(function _callee18$(_context18) {
674
+ while (1) switch (_context18.prev = _context18.next) {
620
675
  case 0:
621
- return _context16.abrupt("return", this.api.query(type, params));
676
+ return _context18.abrupt("return", this.api.query(type, params));
622
677
  case 1:
623
678
  case "end":
624
- return _context16.stop();
679
+ return _context18.stop();
625
680
  }
626
- }, _callee16, this);
681
+ }, _callee18, this);
627
682
  }));
628
- function query(_x12, _x13) {
683
+ function query(_x13, _x14) {
629
684
  return _query.apply(this, arguments);
630
685
  }
631
686
  return query;
@@ -647,18 +702,18 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
647
702
  }, {
648
703
  key: "runTask",
649
704
  value: function () {
650
- var _runTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(params, callbacks) {
651
- return _regeneratorRuntime().wrap(function _callee17$(_context17) {
652
- while (1) switch (_context17.prev = _context17.next) {
705
+ var _runTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(params, callbacks) {
706
+ return _regeneratorRuntime().wrap(function _callee19$(_context19) {
707
+ while (1) switch (_context19.prev = _context19.next) {
653
708
  case 0:
654
- return _context17.abrupt("return", this.api.runTask(params, callbacks));
709
+ return _context19.abrupt("return", this.api.runTask(params, callbacks));
655
710
  case 1:
656
711
  case "end":
657
- return _context17.stop();
712
+ return _context19.stop();
658
713
  }
659
- }, _callee17, this);
714
+ }, _callee19, this);
660
715
  }));
661
- function runTask(_x14, _x15) {
716
+ function runTask(_x15, _x16) {
662
717
  return _runTask.apply(this, arguments);
663
718
  }
664
719
  return runTask;
@@ -666,18 +721,18 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
666
721
  }, {
667
722
  key: "stopJob",
668
723
  value: function () {
669
- var _stopJob = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(params, callbacks) {
670
- return _regeneratorRuntime().wrap(function _callee18$(_context18) {
671
- while (1) switch (_context18.prev = _context18.next) {
724
+ var _stopJob = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(params, callbacks) {
725
+ return _regeneratorRuntime().wrap(function _callee20$(_context20) {
726
+ while (1) switch (_context20.prev = _context20.next) {
672
727
  case 0:
673
- return _context18.abrupt("return", this.api.stopJob(params, callbacks));
728
+ return _context20.abrupt("return", this.api.stopJob(params, callbacks));
674
729
  case 1:
675
730
  case "end":
676
- return _context18.stop();
731
+ return _context20.stop();
677
732
  }
678
- }, _callee18, this);
733
+ }, _callee20, this);
679
734
  }));
680
- function stopJob(_x16, _x17) {
735
+ function stopJob(_x17, _x18) {
681
736
  return _stopJob.apply(this, arguments);
682
737
  }
683
738
  return stopJob;
@@ -685,18 +740,18 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
685
740
  }, {
686
741
  key: "pollTaskProgress",
687
742
  value: function () {
688
- var _pollTaskProgress = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(params) {
689
- return _regeneratorRuntime().wrap(function _callee19$(_context19) {
690
- while (1) switch (_context19.prev = _context19.next) {
743
+ var _pollTaskProgress = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21(params) {
744
+ return _regeneratorRuntime().wrap(function _callee21$(_context21) {
745
+ while (1) switch (_context21.prev = _context21.next) {
691
746
  case 0:
692
- return _context19.abrupt("return", this.api.pollTaskProgress(params));
747
+ return _context21.abrupt("return", this.api.pollTaskProgress(params));
693
748
  case 1:
694
749
  case "end":
695
- return _context19.stop();
750
+ return _context21.stop();
696
751
  }
697
- }, _callee19, this);
752
+ }, _callee21, this);
698
753
  }));
699
- function pollTaskProgress(_x18) {
754
+ function pollTaskProgress(_x19) {
700
755
  return _pollTaskProgress.apply(this, arguments);
701
756
  }
702
757
  return pollTaskProgress;
@@ -761,23 +816,23 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
761
816
  }, {
762
817
  key: "get",
763
818
  value: function () {
764
- var _get = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(endpoint, params) {
819
+ var _get = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22(endpoint, params) {
765
820
  var result;
766
- return _regeneratorRuntime().wrap(function _callee20$(_context20) {
767
- while (1) switch (_context20.prev = _context20.next) {
821
+ return _regeneratorRuntime().wrap(function _callee22$(_context22) {
822
+ while (1) switch (_context22.prev = _context22.next) {
768
823
  case 0:
769
- _context20.next = 2;
824
+ _context22.next = 2;
770
825
  return this.api.get(endpoint, params);
771
826
  case 2:
772
- result = _context20.sent;
773
- return _context20.abrupt("return", this._autoWrapResponse(result));
827
+ result = _context22.sent;
828
+ return _context22.abrupt("return", this._autoWrapResponse(result));
774
829
  case 4:
775
830
  case "end":
776
- return _context20.stop();
831
+ return _context22.stop();
777
832
  }
778
- }, _callee20, this);
833
+ }, _callee22, this);
779
834
  }));
780
- function get(_x19, _x20) {
835
+ function get(_x20, _x21) {
781
836
  return _get.apply(this, arguments);
782
837
  }
783
838
  return get;
@@ -785,23 +840,23 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
785
840
  }, {
786
841
  key: "post",
787
842
  value: function () {
788
- var _post = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21(endpoint, data) {
843
+ var _post = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23(endpoint, data) {
789
844
  var result;
790
- return _regeneratorRuntime().wrap(function _callee21$(_context21) {
791
- while (1) switch (_context21.prev = _context21.next) {
845
+ return _regeneratorRuntime().wrap(function _callee23$(_context23) {
846
+ while (1) switch (_context23.prev = _context23.next) {
792
847
  case 0:
793
- _context21.next = 2;
848
+ _context23.next = 2;
794
849
  return this.api.post(endpoint, data);
795
850
  case 2:
796
- result = _context21.sent;
797
- return _context21.abrupt("return", this._autoWrapResponse(result));
851
+ result = _context23.sent;
852
+ return _context23.abrupt("return", this._autoWrapResponse(result));
798
853
  case 4:
799
854
  case "end":
800
- return _context21.stop();
855
+ return _context23.stop();
801
856
  }
802
- }, _callee21, this);
857
+ }, _callee23, this);
803
858
  }));
804
- function post(_x21, _x22) {
859
+ function post(_x22, _x23) {
805
860
  return _post.apply(this, arguments);
806
861
  }
807
862
  return post;