@atlaskit/teams-client 4.8.2 → 4.9.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/CHANGELOG.md +16 -0
- package/dist/cjs/common/utils/ufo/constants.js +1 -1
- package/dist/cjs/common/utils/ufo/index.js +2 -2
- package/dist/cjs/services/legion-client/index.js +189 -162
- package/dist/cjs/services/main.js +508 -468
- package/dist/cjs/services/sentry/utils/get-sentry-config.js +1 -1
- package/dist/es2019/common/utils/ufo/constants.js +1 -1
- package/dist/es2019/common/utils/ufo/index.js +2 -2
- package/dist/es2019/services/legion-client/index.js +9 -0
- package/dist/es2019/services/main.js +15 -3
- package/dist/es2019/services/sentry/utils/get-sentry-config.js +1 -1
- package/dist/esm/common/utils/ufo/constants.js +1 -1
- package/dist/esm/common/utils/ufo/index.js +2 -2
- package/dist/esm/services/legion-client/index.js +189 -162
- package/dist/esm/services/main.js +508 -468
- package/dist/esm/services/sentry/utils/get-sentry-config.js +1 -1
- package/dist/types/common/utils/ufo/constants.d.ts +2 -2
- package/dist/types/services/legion-client/index.d.ts +1 -0
- package/dist/types/services/main.d.ts +1 -0
- package/dist/types-ts4.5/common/utils/ufo/constants.d.ts +3 -2
- package/dist/types-ts4.5/services/legion-client/index.d.ts +1 -0
- package/dist/types-ts4.5/services/main.d.ts +1 -0
- package/package.json +4 -1
|
@@ -515,58 +515,85 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
515
515
|
return addAgentsToTeam;
|
|
516
516
|
}()
|
|
517
517
|
}, {
|
|
518
|
-
key: "
|
|
518
|
+
key: "removeAgentTeamAssociation",
|
|
519
519
|
value: function () {
|
|
520
|
-
var
|
|
520
|
+
var _removeAgentTeamAssociation = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(teamId, agentId) {
|
|
521
|
+
var url;
|
|
521
522
|
return _regenerator.default.wrap(function _callee14$(_context14) {
|
|
522
523
|
while (1) switch (_context14.prev = _context14.next) {
|
|
523
524
|
case 0:
|
|
524
|
-
|
|
525
|
-
|
|
525
|
+
_context14.prev = 0;
|
|
526
|
+
url = "".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/agents/").concat(agentId);
|
|
527
|
+
return _context14.abrupt("return", this.deleteResource(url));
|
|
528
|
+
case 5:
|
|
529
|
+
_context14.prev = 5;
|
|
530
|
+
_context14.t0 = _context14["catch"](0);
|
|
531
|
+
this.logException(_context14.t0, 'removeAgentTeamAssociation');
|
|
532
|
+
throw _context14.t0;
|
|
533
|
+
case 9:
|
|
526
534
|
case "end":
|
|
527
535
|
return _context14.stop();
|
|
528
536
|
}
|
|
529
|
-
}, _callee14, this);
|
|
537
|
+
}, _callee14, this, [[0, 5]]);
|
|
530
538
|
}));
|
|
531
|
-
function
|
|
532
|
-
return
|
|
539
|
+
function removeAgentTeamAssociation(_x24, _x25) {
|
|
540
|
+
return _removeAgentTeamAssociation.apply(this, arguments);
|
|
533
541
|
}
|
|
534
|
-
return
|
|
542
|
+
return removeAgentTeamAssociation;
|
|
535
543
|
}()
|
|
536
544
|
}, {
|
|
537
|
-
key: "
|
|
545
|
+
key: "cancelJoinRequest",
|
|
538
546
|
value: function () {
|
|
539
|
-
var
|
|
547
|
+
var _cancelJoinRequest = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15(teamId) {
|
|
540
548
|
return _regenerator.default.wrap(function _callee15$(_context15) {
|
|
541
549
|
while (1) switch (_context15.prev = _context15.next) {
|
|
542
550
|
case 0:
|
|
543
|
-
return _context15.abrupt("return", this.
|
|
551
|
+
return _context15.abrupt("return", this.deleteResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/membership/request")));
|
|
544
552
|
case 1:
|
|
545
553
|
case "end":
|
|
546
554
|
return _context15.stop();
|
|
547
555
|
}
|
|
548
556
|
}, _callee15, this);
|
|
549
557
|
}));
|
|
550
|
-
function
|
|
551
|
-
return
|
|
558
|
+
function cancelJoinRequest(_x26) {
|
|
559
|
+
return _cancelJoinRequest.apply(this, arguments);
|
|
552
560
|
}
|
|
553
|
-
return
|
|
561
|
+
return cancelJoinRequest;
|
|
554
562
|
}()
|
|
555
563
|
}, {
|
|
556
|
-
key: "
|
|
564
|
+
key: "acceptJoinRequest",
|
|
557
565
|
value: function () {
|
|
558
|
-
var
|
|
566
|
+
var _acceptJoinRequest = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16(teamId, memberId) {
|
|
559
567
|
return _regenerator.default.wrap(function _callee16$(_context16) {
|
|
560
568
|
while (1) switch (_context16.prev = _context16.next) {
|
|
561
569
|
case 0:
|
|
562
|
-
return _context16.abrupt("return", this.postResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/membership/").concat(memberId, "/request/
|
|
570
|
+
return _context16.abrupt("return", this.postResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/membership/").concat(memberId, "/request/accept")));
|
|
563
571
|
case 1:
|
|
564
572
|
case "end":
|
|
565
573
|
return _context16.stop();
|
|
566
574
|
}
|
|
567
575
|
}, _callee16, this);
|
|
568
576
|
}));
|
|
569
|
-
function
|
|
577
|
+
function acceptJoinRequest(_x27, _x28) {
|
|
578
|
+
return _acceptJoinRequest.apply(this, arguments);
|
|
579
|
+
}
|
|
580
|
+
return acceptJoinRequest;
|
|
581
|
+
}()
|
|
582
|
+
}, {
|
|
583
|
+
key: "declineJoinRequest",
|
|
584
|
+
value: function () {
|
|
585
|
+
var _declineJoinRequest = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(teamId, memberId) {
|
|
586
|
+
return _regenerator.default.wrap(function _callee17$(_context17) {
|
|
587
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
588
|
+
case 0:
|
|
589
|
+
return _context17.abrupt("return", this.postResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/membership/").concat(memberId, "/request/decline")));
|
|
590
|
+
case 1:
|
|
591
|
+
case "end":
|
|
592
|
+
return _context17.stop();
|
|
593
|
+
}
|
|
594
|
+
}, _callee17, this);
|
|
595
|
+
}));
|
|
596
|
+
function declineJoinRequest(_x29, _x30) {
|
|
570
597
|
return _declineJoinRequest.apply(this, arguments);
|
|
571
598
|
}
|
|
572
599
|
return declineJoinRequest;
|
|
@@ -578,18 +605,18 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
578
605
|
}, {
|
|
579
606
|
key: "deleteTeamMembership",
|
|
580
607
|
value: (function () {
|
|
581
|
-
var _deleteTeamMembership = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
582
|
-
return _regenerator.default.wrap(function
|
|
583
|
-
while (1) switch (
|
|
608
|
+
var _deleteTeamMembership = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(teamId, memberId) {
|
|
609
|
+
return _regenerator.default.wrap(function _callee18$(_context18) {
|
|
610
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
584
611
|
case 0:
|
|
585
|
-
return
|
|
612
|
+
return _context18.abrupt("return", this.deleteResource("".concat(v3UrlPath, "/").concat(this.trimTeamARI(teamId), "/members/").concat(memberId)));
|
|
586
613
|
case 1:
|
|
587
614
|
case "end":
|
|
588
|
-
return
|
|
615
|
+
return _context18.stop();
|
|
589
616
|
}
|
|
590
|
-
},
|
|
617
|
+
}, _callee18, this);
|
|
591
618
|
}));
|
|
592
|
-
function deleteTeamMembership(
|
|
619
|
+
function deleteTeamMembership(_x31, _x32) {
|
|
593
620
|
return _deleteTeamMembership.apply(this, arguments);
|
|
594
621
|
}
|
|
595
622
|
return deleteTeamMembership;
|
|
@@ -602,18 +629,18 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
602
629
|
}, {
|
|
603
630
|
key: "revokeTeamInvite",
|
|
604
631
|
value: (function () {
|
|
605
|
-
var _revokeTeamInvite = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
606
|
-
return _regenerator.default.wrap(function
|
|
607
|
-
while (1) switch (
|
|
632
|
+
var _revokeTeamInvite = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(teamId, memberId) {
|
|
633
|
+
return _regenerator.default.wrap(function _callee19$(_context19) {
|
|
634
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
608
635
|
case 0:
|
|
609
|
-
return
|
|
636
|
+
return _context19.abrupt("return", this.deleteResource("".concat(v3UrlPath, "/ui/").concat(this.trimTeamARI(teamId), "/membership/").concat(memberId, "/revoke")));
|
|
610
637
|
case 1:
|
|
611
638
|
case "end":
|
|
612
|
-
return
|
|
639
|
+
return _context19.stop();
|
|
613
640
|
}
|
|
614
|
-
},
|
|
641
|
+
}, _callee19, this);
|
|
615
642
|
}));
|
|
616
|
-
function revokeTeamInvite(
|
|
643
|
+
function revokeTeamInvite(_x33, _x34) {
|
|
617
644
|
return _revokeTeamInvite.apply(this, arguments);
|
|
618
645
|
}
|
|
619
646
|
return revokeTeamInvite;
|
|
@@ -621,18 +648,18 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
621
648
|
}, {
|
|
622
649
|
key: "deleteTeam",
|
|
623
650
|
value: function () {
|
|
624
|
-
var _deleteTeam = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
625
|
-
return _regenerator.default.wrap(function
|
|
626
|
-
while (1) switch (
|
|
651
|
+
var _deleteTeam = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20(teamId) {
|
|
652
|
+
return _regenerator.default.wrap(function _callee20$(_context20) {
|
|
653
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
627
654
|
case 0:
|
|
628
|
-
return
|
|
655
|
+
return _context20.abrupt("return", this.deleteResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId))));
|
|
629
656
|
case 1:
|
|
630
657
|
case "end":
|
|
631
|
-
return
|
|
658
|
+
return _context20.stop();
|
|
632
659
|
}
|
|
633
|
-
},
|
|
660
|
+
}, _callee20, this);
|
|
634
661
|
}));
|
|
635
|
-
function deleteTeam(
|
|
662
|
+
function deleteTeam(_x35) {
|
|
636
663
|
return _deleteTeam.apply(this, arguments);
|
|
637
664
|
}
|
|
638
665
|
return deleteTeam;
|
|
@@ -644,23 +671,23 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
644
671
|
}, {
|
|
645
672
|
key: "isSingleFullMemberTeam",
|
|
646
673
|
value: (function () {
|
|
647
|
-
var _isSingleFullMemberTeam = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
674
|
+
var _isSingleFullMemberTeam = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21(teamId) {
|
|
648
675
|
var members;
|
|
649
|
-
return _regenerator.default.wrap(function
|
|
650
|
-
while (1) switch (
|
|
676
|
+
return _regenerator.default.wrap(function _callee21$(_context21) {
|
|
677
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
651
678
|
case 0:
|
|
652
|
-
|
|
679
|
+
_context21.next = 2;
|
|
653
680
|
return this.getResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/members?size=2&membershipState=FULL_MEMBER&siteId=").concat(this.getCloudId()));
|
|
654
681
|
case 2:
|
|
655
|
-
members =
|
|
656
|
-
return
|
|
682
|
+
members = _context21.sent;
|
|
683
|
+
return _context21.abrupt("return", members.entities.length === 1);
|
|
657
684
|
case 4:
|
|
658
685
|
case "end":
|
|
659
|
-
return
|
|
686
|
+
return _context21.stop();
|
|
660
687
|
}
|
|
661
|
-
},
|
|
688
|
+
}, _callee21, this);
|
|
662
689
|
}));
|
|
663
|
-
function isSingleFullMemberTeam(
|
|
690
|
+
function isSingleFullMemberTeam(_x36) {
|
|
664
691
|
return _isSingleFullMemberTeam.apply(this, arguments);
|
|
665
692
|
}
|
|
666
693
|
return isSingleFullMemberTeam;
|
|
@@ -668,20 +695,20 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
668
695
|
}, {
|
|
669
696
|
key: "createTeam",
|
|
670
697
|
value: function () {
|
|
671
|
-
var _createTeam = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
698
|
+
var _createTeam = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22(displayName, originQuery, members) {
|
|
672
699
|
var membershipSettings,
|
|
673
700
|
organizationId,
|
|
674
701
|
err,
|
|
675
702
|
url,
|
|
676
703
|
legionTeam,
|
|
677
|
-
|
|
678
|
-
return _regenerator.default.wrap(function
|
|
679
|
-
while (1) switch (
|
|
704
|
+
_args22 = arguments;
|
|
705
|
+
return _regenerator.default.wrap(function _callee22$(_context22) {
|
|
706
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
680
707
|
case 0:
|
|
681
|
-
membershipSettings =
|
|
708
|
+
membershipSettings = _args22.length > 3 && _args22[3] !== undefined ? _args22[3] : 'OPEN';
|
|
682
709
|
organizationId = this.getContext().orgId;
|
|
683
710
|
if (organizationId) {
|
|
684
|
-
|
|
711
|
+
_context22.next = 6;
|
|
685
712
|
break;
|
|
686
713
|
}
|
|
687
714
|
err = new Error('Organization ID is required');
|
|
@@ -689,7 +716,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
689
716
|
throw err;
|
|
690
717
|
case 6:
|
|
691
718
|
url = "".concat(v4UrlPath, "?").concat(this.constructProductOriginParams(originQuery));
|
|
692
|
-
|
|
719
|
+
_context22.next = 9;
|
|
693
720
|
return this.postResource(url, {
|
|
694
721
|
displayName: displayName,
|
|
695
722
|
description: '',
|
|
@@ -699,15 +726,15 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
699
726
|
members: (0, _toConsumableArray2.default)(new Set(members))
|
|
700
727
|
});
|
|
701
728
|
case 9:
|
|
702
|
-
legionTeam =
|
|
703
|
-
return
|
|
729
|
+
legionTeam = _context22.sent;
|
|
730
|
+
return _context22.abrupt("return", this.mapTeamCreateResponseV4ToTeam(legionTeam));
|
|
704
731
|
case 11:
|
|
705
732
|
case "end":
|
|
706
|
-
return
|
|
733
|
+
return _context22.stop();
|
|
707
734
|
}
|
|
708
|
-
},
|
|
735
|
+
}, _callee22, this);
|
|
709
736
|
}));
|
|
710
|
-
function createTeam(
|
|
737
|
+
function createTeam(_x37, _x38, _x39) {
|
|
711
738
|
return _createTeam.apply(this, arguments);
|
|
712
739
|
}
|
|
713
740
|
return createTeam;
|
|
@@ -715,15 +742,15 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
715
742
|
}, {
|
|
716
743
|
key: "createExternalTeam",
|
|
717
744
|
value: function () {
|
|
718
|
-
var _createExternalTeam = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
745
|
+
var _createExternalTeam = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23(description, externalReference, teamName, siteId) {
|
|
719
746
|
var organizationId, cloudId, err, url, legionExternalTeam;
|
|
720
|
-
return _regenerator.default.wrap(function
|
|
721
|
-
while (1) switch (
|
|
747
|
+
return _regenerator.default.wrap(function _callee23$(_context23) {
|
|
748
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
722
749
|
case 0:
|
|
723
750
|
organizationId = this.getContext().orgId;
|
|
724
751
|
cloudId = this.getContext().cloudId;
|
|
725
752
|
if (organizationId) {
|
|
726
|
-
|
|
753
|
+
_context23.next = 6;
|
|
727
754
|
break;
|
|
728
755
|
}
|
|
729
756
|
err = new Error('Organization ID is required');
|
|
@@ -731,7 +758,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
731
758
|
throw err;
|
|
732
759
|
case 6:
|
|
733
760
|
url = "".concat(v4UrlPath, "/external?origin.cloudId=").concat(encodeURIComponent(this.getCloudId(siteId || cloudId)));
|
|
734
|
-
|
|
761
|
+
_context23.next = 9;
|
|
735
762
|
return this.postResource(url, {
|
|
736
763
|
description: description,
|
|
737
764
|
externalReference: externalReference,
|
|
@@ -740,15 +767,15 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
740
767
|
displayName: teamName
|
|
741
768
|
});
|
|
742
769
|
case 9:
|
|
743
|
-
legionExternalTeam =
|
|
744
|
-
return
|
|
770
|
+
legionExternalTeam = _context23.sent;
|
|
771
|
+
return _context23.abrupt("return", this.mapTeamCreateResponseV4ToTeam(legionExternalTeam));
|
|
745
772
|
case 11:
|
|
746
773
|
case "end":
|
|
747
|
-
return
|
|
774
|
+
return _context23.stop();
|
|
748
775
|
}
|
|
749
|
-
},
|
|
776
|
+
}, _callee23, this);
|
|
750
777
|
}));
|
|
751
|
-
function createExternalTeam(
|
|
778
|
+
function createExternalTeam(_x40, _x41, _x42, _x43) {
|
|
752
779
|
return _createExternalTeam.apply(this, arguments);
|
|
753
780
|
}
|
|
754
781
|
return createExternalTeam;
|
|
@@ -756,23 +783,23 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
756
783
|
}, {
|
|
757
784
|
key: "getTeamAndGroupDiff",
|
|
758
785
|
value: function () {
|
|
759
|
-
var _getTeamAndGroupDiff = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
786
|
+
var _getTeamAndGroupDiff = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24(teamId, externalReference) {
|
|
760
787
|
var siteId;
|
|
761
|
-
return _regenerator.default.wrap(function
|
|
762
|
-
while (1) switch (
|
|
788
|
+
return _regenerator.default.wrap(function _callee24$(_context24) {
|
|
789
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
763
790
|
case 0:
|
|
764
791
|
siteId = this.getCloudId();
|
|
765
|
-
return
|
|
792
|
+
return _context24.abrupt("return", this.postResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/external/diff"), {
|
|
766
793
|
siteId: siteId,
|
|
767
794
|
externalReference: externalReference
|
|
768
795
|
}));
|
|
769
796
|
case 2:
|
|
770
797
|
case "end":
|
|
771
|
-
return
|
|
798
|
+
return _context24.stop();
|
|
772
799
|
}
|
|
773
|
-
},
|
|
800
|
+
}, _callee24, this);
|
|
774
801
|
}));
|
|
775
|
-
function getTeamAndGroupDiff(
|
|
802
|
+
function getTeamAndGroupDiff(_x44, _x45) {
|
|
776
803
|
return _getTeamAndGroupDiff.apply(this, arguments);
|
|
777
804
|
}
|
|
778
805
|
return getTeamAndGroupDiff;
|
|
@@ -780,23 +807,23 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
780
807
|
}, {
|
|
781
808
|
key: "linkExistingTeamToGroup",
|
|
782
809
|
value: function () {
|
|
783
|
-
var _linkExistingTeamToGroup = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
810
|
+
var _linkExistingTeamToGroup = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(teamId, externalReference) {
|
|
784
811
|
var siteId;
|
|
785
|
-
return _regenerator.default.wrap(function
|
|
786
|
-
while (1) switch (
|
|
812
|
+
return _regenerator.default.wrap(function _callee25$(_context25) {
|
|
813
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
787
814
|
case 0:
|
|
788
815
|
siteId = this.getCloudId();
|
|
789
|
-
return
|
|
816
|
+
return _context25.abrupt("return", this.postResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/external/link"), {
|
|
790
817
|
externalReference: externalReference,
|
|
791
818
|
siteId: siteId
|
|
792
819
|
}));
|
|
793
820
|
case 2:
|
|
794
821
|
case "end":
|
|
795
|
-
return
|
|
822
|
+
return _context25.stop();
|
|
796
823
|
}
|
|
797
|
-
},
|
|
824
|
+
}, _callee25, this);
|
|
798
825
|
}));
|
|
799
|
-
function linkExistingTeamToGroup(
|
|
826
|
+
function linkExistingTeamToGroup(_x46, _x47) {
|
|
800
827
|
return _linkExistingTeamToGroup.apply(this, arguments);
|
|
801
828
|
}
|
|
802
829
|
return linkExistingTeamToGroup;
|
|
@@ -804,11 +831,11 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
804
831
|
}, {
|
|
805
832
|
key: "getWriteMediaToken",
|
|
806
833
|
value: function () {
|
|
807
|
-
var _getWriteMediaToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
808
|
-
return _regenerator.default.wrap(function
|
|
809
|
-
while (1) switch (
|
|
834
|
+
var _getWriteMediaToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26() {
|
|
835
|
+
return _regenerator.default.wrap(function _callee26$(_context26) {
|
|
836
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
810
837
|
case 0:
|
|
811
|
-
return
|
|
838
|
+
return _context26.abrupt("return", this.getResource('/v4/teams/header-image/media-upload').then(function (response) {
|
|
812
839
|
var _response$baseUrl;
|
|
813
840
|
return _objectSpread(_objectSpread({}, response), {}, {
|
|
814
841
|
baseUrl: (_response$baseUrl = response.baseUrl) !== null && _response$baseUrl !== void 0 && _response$baseUrl.endsWith('/') ? response.baseUrl.slice(0, -1) : response.baseUrl
|
|
@@ -816,9 +843,9 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
816
843
|
}));
|
|
817
844
|
case 1:
|
|
818
845
|
case "end":
|
|
819
|
-
return
|
|
846
|
+
return _context26.stop();
|
|
820
847
|
}
|
|
821
|
-
},
|
|
848
|
+
}, _callee26, this);
|
|
822
849
|
}));
|
|
823
850
|
function getWriteMediaToken() {
|
|
824
851
|
return _getWriteMediaToken.apply(this, arguments);
|
|
@@ -828,25 +855,25 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
828
855
|
}, {
|
|
829
856
|
key: "getSoftDeletedTeamById",
|
|
830
857
|
value: function () {
|
|
831
|
-
var _getSoftDeletedTeamById = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
858
|
+
var _getSoftDeletedTeamById = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27(teamId) {
|
|
832
859
|
var orgId, siteId;
|
|
833
|
-
return _regenerator.default.wrap(function
|
|
834
|
-
while (1) switch (
|
|
860
|
+
return _regenerator.default.wrap(function _callee27$(_context27) {
|
|
861
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
835
862
|
case 0:
|
|
836
863
|
orgId = this.getOrgId();
|
|
837
864
|
siteId = this.getCloudId();
|
|
838
|
-
return
|
|
865
|
+
return _context27.abrupt("return", this.getResource("".concat(v4UrlPath, "/org/").concat(orgId, "/soft-deleted/").concat(this.trimTeamARI(teamId), "?siteId=").concat(siteId)).then(function (response) {
|
|
839
866
|
return _objectSpread(_objectSpread({}, response.teamResponse), {}, {
|
|
840
867
|
id: teamId
|
|
841
868
|
});
|
|
842
869
|
}));
|
|
843
870
|
case 3:
|
|
844
871
|
case "end":
|
|
845
|
-
return
|
|
872
|
+
return _context27.stop();
|
|
846
873
|
}
|
|
847
|
-
},
|
|
874
|
+
}, _callee27, this);
|
|
848
875
|
}));
|
|
849
|
-
function getSoftDeletedTeamById(
|
|
876
|
+
function getSoftDeletedTeamById(_x48) {
|
|
850
877
|
return _getSoftDeletedTeamById.apply(this, arguments);
|
|
851
878
|
}
|
|
852
879
|
return getSoftDeletedTeamById;
|
|
@@ -857,13 +884,13 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
857
884
|
}, {
|
|
858
885
|
key: "getUserInSiteUserBase",
|
|
859
886
|
value: (function () {
|
|
860
|
-
var _getUserInSiteUserBase = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
887
|
+
var _getUserInSiteUserBase = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28(userId) {
|
|
861
888
|
var siteId;
|
|
862
|
-
return _regenerator.default.wrap(function
|
|
863
|
-
while (1) switch (
|
|
889
|
+
return _regenerator.default.wrap(function _callee28$(_context28) {
|
|
890
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
864
891
|
case 0:
|
|
865
892
|
siteId = this.getCloudId();
|
|
866
|
-
return
|
|
893
|
+
return _context28.abrupt("return", this.getResource("/teams/site/".concat(siteId, "/users/").concat(userId, "/exists"), {
|
|
867
894
|
headers: {
|
|
868
895
|
Accept: 'application/json',
|
|
869
896
|
'X-header-client-id': 'ptc-fe'
|
|
@@ -871,11 +898,11 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
871
898
|
}));
|
|
872
899
|
case 2:
|
|
873
900
|
case "end":
|
|
874
|
-
return
|
|
901
|
+
return _context28.stop();
|
|
875
902
|
}
|
|
876
|
-
},
|
|
903
|
+
}, _callee28, this);
|
|
877
904
|
}));
|
|
878
|
-
function getUserInSiteUserBase(
|
|
905
|
+
function getUserInSiteUserBase(_x49) {
|
|
879
906
|
return _getUserInSiteUserBase.apply(this, arguments);
|
|
880
907
|
}
|
|
881
908
|
return getUserInSiteUserBase;
|
|
@@ -883,22 +910,22 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
883
910
|
}, {
|
|
884
911
|
key: "retrieveBrowseUserPermission",
|
|
885
912
|
value: function () {
|
|
886
|
-
var _retrieveBrowseUserPermission = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
887
|
-
return _regenerator.default.wrap(function
|
|
888
|
-
while (1) switch (
|
|
913
|
+
var _retrieveBrowseUserPermission = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29(product) {
|
|
914
|
+
return _regenerator.default.wrap(function _callee29$(_context29) {
|
|
915
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
889
916
|
case 0:
|
|
890
|
-
return
|
|
917
|
+
return _context29.abrupt("return", this.getResourceCached("/teams/site/".concat(this.getCloudId(), "/canSearchUsers?product=").concat(product), undefined,
|
|
891
918
|
// 2 minute expiration, resolves duplicate calls in initial load
|
|
892
919
|
{
|
|
893
920
|
expiration: 1000 * 60 * 2
|
|
894
921
|
}));
|
|
895
922
|
case 1:
|
|
896
923
|
case "end":
|
|
897
|
-
return
|
|
924
|
+
return _context29.stop();
|
|
898
925
|
}
|
|
899
|
-
},
|
|
926
|
+
}, _callee29, this);
|
|
900
927
|
}));
|
|
901
|
-
function retrieveBrowseUserPermission(
|
|
928
|
+
function retrieveBrowseUserPermission(_x50) {
|
|
902
929
|
return _retrieveBrowseUserPermission.apply(this, arguments);
|
|
903
930
|
}
|
|
904
931
|
return retrieveBrowseUserPermission;
|
|
@@ -906,27 +933,27 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
906
933
|
}, {
|
|
907
934
|
key: "getPermissions",
|
|
908
935
|
value: function () {
|
|
909
|
-
var _getPermissions = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
936
|
+
var _getPermissions = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30() {
|
|
910
937
|
var orgId, siteId, err;
|
|
911
|
-
return _regenerator.default.wrap(function
|
|
912
|
-
while (1) switch (
|
|
938
|
+
return _regenerator.default.wrap(function _callee30$(_context30) {
|
|
939
|
+
while (1) switch (_context30.prev = _context30.next) {
|
|
913
940
|
case 0:
|
|
914
941
|
orgId = this.getContext().orgId;
|
|
915
942
|
siteId = this.getCloudId();
|
|
916
943
|
if (orgId) {
|
|
917
|
-
|
|
944
|
+
_context30.next = 6;
|
|
918
945
|
break;
|
|
919
946
|
}
|
|
920
947
|
err = new Error('Organization ID is required');
|
|
921
948
|
this.logException(err, 'getPermissions');
|
|
922
949
|
throw err;
|
|
923
950
|
case 6:
|
|
924
|
-
return
|
|
951
|
+
return _context30.abrupt("return", this.getResourceCached("".concat(v4UrlPath, "/permission/self/organization/").concat(orgId, "?siteId=").concat(siteId)));
|
|
925
952
|
case 7:
|
|
926
953
|
case "end":
|
|
927
|
-
return
|
|
954
|
+
return _context30.stop();
|
|
928
955
|
}
|
|
929
|
-
},
|
|
956
|
+
}, _callee30, this);
|
|
930
957
|
}));
|
|
931
958
|
function getPermissions() {
|
|
932
959
|
return _getPermissions.apply(this, arguments);
|
|
@@ -936,36 +963,36 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
936
963
|
}, {
|
|
937
964
|
key: "getLinkedTeamsBulk",
|
|
938
965
|
value: function () {
|
|
939
|
-
var _getLinkedTeamsBulk = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
966
|
+
var _getLinkedTeamsBulk = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31(groupIds) {
|
|
940
967
|
var organizationId, err, legionExternalTeam;
|
|
941
|
-
return _regenerator.default.wrap(function
|
|
942
|
-
while (1) switch (
|
|
968
|
+
return _regenerator.default.wrap(function _callee31$(_context31) {
|
|
969
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
943
970
|
case 0:
|
|
944
971
|
organizationId = this.getContext().orgId;
|
|
945
972
|
if (organizationId) {
|
|
946
|
-
|
|
973
|
+
_context31.next = 5;
|
|
947
974
|
break;
|
|
948
975
|
}
|
|
949
976
|
err = new Error('Organization ID is required');
|
|
950
977
|
this.logException(err, 'getLinkedTeamsBulk');
|
|
951
978
|
throw err;
|
|
952
979
|
case 5:
|
|
953
|
-
|
|
980
|
+
_context31.next = 7;
|
|
954
981
|
return this.postResource("".concat(v4UrlPath, "/external/bulk"), {
|
|
955
982
|
organizationId: organizationId,
|
|
956
983
|
source: 'ATLASSIAN_GROUP',
|
|
957
984
|
externalIds: groupIds
|
|
958
985
|
});
|
|
959
986
|
case 7:
|
|
960
|
-
legionExternalTeam =
|
|
961
|
-
return
|
|
987
|
+
legionExternalTeam = _context31.sent;
|
|
988
|
+
return _context31.abrupt("return", legionExternalTeam);
|
|
962
989
|
case 9:
|
|
963
990
|
case "end":
|
|
964
|
-
return
|
|
991
|
+
return _context31.stop();
|
|
965
992
|
}
|
|
966
|
-
},
|
|
993
|
+
}, _callee31, this);
|
|
967
994
|
}));
|
|
968
|
-
function getLinkedTeamsBulk(
|
|
995
|
+
function getLinkedTeamsBulk(_x51) {
|
|
969
996
|
return _getLinkedTeamsBulk.apply(this, arguments);
|
|
970
997
|
}
|
|
971
998
|
return getLinkedTeamsBulk;
|
|
@@ -973,32 +1000,32 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
973
1000
|
}, {
|
|
974
1001
|
key: "getTeamProfileDetails",
|
|
975
1002
|
value: function () {
|
|
976
|
-
var _getTeamProfileDetails = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
1003
|
+
var _getTeamProfileDetails = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32(teamId) {
|
|
977
1004
|
var siteId, err, linkedTeamsProfileDetails;
|
|
978
|
-
return _regenerator.default.wrap(function
|
|
979
|
-
while (1) switch (
|
|
1005
|
+
return _regenerator.default.wrap(function _callee32$(_context32) {
|
|
1006
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
980
1007
|
case 0:
|
|
981
1008
|
siteId = this.getCloudId();
|
|
982
1009
|
if (siteId) {
|
|
983
|
-
|
|
1010
|
+
_context32.next = 5;
|
|
984
1011
|
break;
|
|
985
1012
|
}
|
|
986
1013
|
err = new Error('Site ID is required');
|
|
987
1014
|
this.logException(err, 'getTeamProfileDetails');
|
|
988
1015
|
throw err;
|
|
989
1016
|
case 5:
|
|
990
|
-
|
|
1017
|
+
_context32.next = 7;
|
|
991
1018
|
return this.getResource("".concat(v4UrlPath, "/").concat(teamId, "/profile?siteId=").concat(this.getCloudId()));
|
|
992
1019
|
case 7:
|
|
993
|
-
linkedTeamsProfileDetails =
|
|
994
|
-
return
|
|
1020
|
+
linkedTeamsProfileDetails = _context32.sent;
|
|
1021
|
+
return _context32.abrupt("return", linkedTeamsProfileDetails);
|
|
995
1022
|
case 9:
|
|
996
1023
|
case "end":
|
|
997
|
-
return
|
|
1024
|
+
return _context32.stop();
|
|
998
1025
|
}
|
|
999
|
-
},
|
|
1026
|
+
}, _callee32, this);
|
|
1000
1027
|
}));
|
|
1001
|
-
function getTeamProfileDetails(
|
|
1028
|
+
function getTeamProfileDetails(_x52) {
|
|
1002
1029
|
return _getTeamProfileDetails.apply(this, arguments);
|
|
1003
1030
|
}
|
|
1004
1031
|
return getTeamProfileDetails;
|
|
@@ -1006,30 +1033,30 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1006
1033
|
}, {
|
|
1007
1034
|
key: "getOrgScope",
|
|
1008
1035
|
value: function () {
|
|
1009
|
-
var _getOrgScope = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
1036
|
+
var _getOrgScope = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33() {
|
|
1010
1037
|
var orgId, err, orgScope;
|
|
1011
|
-
return _regenerator.default.wrap(function
|
|
1012
|
-
while (1) switch (
|
|
1038
|
+
return _regenerator.default.wrap(function _callee33$(_context33) {
|
|
1039
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
1013
1040
|
case 0:
|
|
1014
1041
|
orgId = this.getContext().orgId;
|
|
1015
1042
|
if (orgId) {
|
|
1016
|
-
|
|
1043
|
+
_context33.next = 5;
|
|
1017
1044
|
break;
|
|
1018
1045
|
}
|
|
1019
1046
|
err = new Error('Organization ID is required');
|
|
1020
1047
|
this.logException(err, 'getOrgScope');
|
|
1021
1048
|
throw err;
|
|
1022
1049
|
case 5:
|
|
1023
|
-
|
|
1050
|
+
_context33.next = 7;
|
|
1024
1051
|
return this.getResourceCached("".concat(v4UrlPath, "/org/").concat(orgId, "/scope"));
|
|
1025
1052
|
case 7:
|
|
1026
|
-
orgScope =
|
|
1027
|
-
return
|
|
1053
|
+
orgScope = _context33.sent;
|
|
1054
|
+
return _context33.abrupt("return", orgScope);
|
|
1028
1055
|
case 9:
|
|
1029
1056
|
case "end":
|
|
1030
|
-
return
|
|
1057
|
+
return _context33.stop();
|
|
1031
1058
|
}
|
|
1032
|
-
},
|
|
1059
|
+
}, _callee33, this);
|
|
1033
1060
|
}));
|
|
1034
1061
|
function getOrgScope() {
|
|
1035
1062
|
return _getOrgScope.apply(this, arguments);
|
|
@@ -1039,26 +1066,26 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1039
1066
|
}, {
|
|
1040
1067
|
key: "restoreTeamToSyncedGroup",
|
|
1041
1068
|
value: function () {
|
|
1042
|
-
var _restoreTeamToSyncedGroup = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
1069
|
+
var _restoreTeamToSyncedGroup = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(teamId, externalReference) {
|
|
1043
1070
|
var siteId;
|
|
1044
|
-
return _regenerator.default.wrap(function
|
|
1045
|
-
while (1) switch (
|
|
1071
|
+
return _regenerator.default.wrap(function _callee34$(_context34) {
|
|
1072
|
+
while (1) switch (_context34.prev = _context34.next) {
|
|
1046
1073
|
case 0:
|
|
1047
1074
|
siteId = this.getCloudId();
|
|
1048
|
-
|
|
1075
|
+
_context34.next = 3;
|
|
1049
1076
|
return this.postResource("".concat(v4UrlPath, "/").concat(teamId, "/external/restore"), {
|
|
1050
1077
|
externalReference: externalReference,
|
|
1051
1078
|
siteId: siteId
|
|
1052
1079
|
});
|
|
1053
1080
|
case 3:
|
|
1054
|
-
return
|
|
1081
|
+
return _context34.abrupt("return", _context34.sent);
|
|
1055
1082
|
case 4:
|
|
1056
1083
|
case "end":
|
|
1057
|
-
return
|
|
1084
|
+
return _context34.stop();
|
|
1058
1085
|
}
|
|
1059
|
-
},
|
|
1086
|
+
}, _callee34, this);
|
|
1060
1087
|
}));
|
|
1061
|
-
function restoreTeamToSyncedGroup(
|
|
1088
|
+
function restoreTeamToSyncedGroup(_x53, _x54) {
|
|
1062
1089
|
return _restoreTeamToSyncedGroup.apply(this, arguments);
|
|
1063
1090
|
}
|
|
1064
1091
|
return restoreTeamToSyncedGroup;
|
|
@@ -1066,18 +1093,18 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1066
1093
|
}, {
|
|
1067
1094
|
key: "createTeamContainers",
|
|
1068
1095
|
value: function () {
|
|
1069
|
-
var _createTeamContainers = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
1070
|
-
return _regenerator.default.wrap(function
|
|
1071
|
-
while (1) switch (
|
|
1096
|
+
var _createTeamContainers = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(payload) {
|
|
1097
|
+
return _regenerator.default.wrap(function _callee35$(_context35) {
|
|
1098
|
+
while (1) switch (_context35.prev = _context35.next) {
|
|
1072
1099
|
case 0:
|
|
1073
|
-
return
|
|
1100
|
+
return _context35.abrupt("return", this.postResource("".concat(v4UrlPath, "/containers"), _objectSpread({}, payload)));
|
|
1074
1101
|
case 1:
|
|
1075
1102
|
case "end":
|
|
1076
|
-
return
|
|
1103
|
+
return _context35.stop();
|
|
1077
1104
|
}
|
|
1078
|
-
},
|
|
1105
|
+
}, _callee35, this);
|
|
1079
1106
|
}));
|
|
1080
|
-
function createTeamContainers(
|
|
1107
|
+
function createTeamContainers(_x55) {
|
|
1081
1108
|
return _createTeamContainers.apply(this, arguments);
|
|
1082
1109
|
}
|
|
1083
1110
|
return createTeamContainers;
|