@atlaskit/teams-client 4.17.0 → 4.19.0
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 +14 -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 +53 -31
- package/dist/cjs/services/main.js +354 -288
- package/dist/cjs/services/reporting-lines-client/index.js +63 -0
- package/dist/cjs/services/reporting-lines-client/utils/queries/ReportingLinesQueryWithAccountStatus.graphql.js +12 -0
- package/dist/cjs/services/reporting-lines-client/utils/types.js +16 -0
- package/dist/cjs/services/sentry/utils/get-sentry-config.js +1 -1
- package/dist/cjs/types/reporting-lines.js +1 -0
- 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 +6 -0
- package/dist/es2019/services/main.js +12 -0
- package/dist/es2019/services/reporting-lines-client/index.js +24 -0
- package/dist/es2019/services/reporting-lines-client/utils/queries/ReportingLinesQueryWithAccountStatus.graphql.js +40 -0
- package/dist/es2019/services/reporting-lines-client/utils/types.js +11 -0
- package/dist/es2019/services/sentry/utils/get-sentry-config.js +1 -1
- package/dist/es2019/types/reporting-lines.js +0 -0
- 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 +53 -31
- package/dist/esm/services/main.js +354 -288
- package/dist/esm/services/reporting-lines-client/index.js +56 -0
- package/dist/esm/services/reporting-lines-client/utils/queries/ReportingLinesQueryWithAccountStatus.graphql.js +5 -0
- package/dist/esm/services/reporting-lines-client/utils/types.js +11 -0
- package/dist/esm/services/sentry/utils/get-sentry-config.js +1 -1
- package/dist/esm/types/reporting-lines.js +0 -0
- package/dist/types/common/utils/ufo/constants.d.ts +2 -2
- package/dist/types/services/legion-client/index.d.ts +5 -1
- package/dist/types/services/main.d.ts +7 -0
- package/dist/types/services/reporting-lines-client/index.d.ts +11 -0
- package/dist/types/services/reporting-lines-client/utils/queries/ReportingLinesQueryWithAccountStatus.graphql.d.ts +2 -0
- package/dist/types/services/reporting-lines-client/utils/types.d.ts +32 -0
- package/dist/types/types/index.d.ts +2 -1
- package/dist/types/types/reporting-lines.d.ts +1 -0
- package/dist/types/types/team.d.ts +8 -0
- package/dist/types-ts4.5/common/utils/ufo/constants.d.ts +4 -2
- package/dist/types-ts4.5/services/legion-client/index.d.ts +5 -1
- package/dist/types-ts4.5/services/main.d.ts +7 -0
- package/dist/types-ts4.5/services/reporting-lines-client/index.d.ts +11 -0
- package/dist/types-ts4.5/services/reporting-lines-client/utils/queries/ReportingLinesQueryWithAccountStatus.graphql.d.ts +2 -0
- package/dist/types-ts4.5/services/reporting-lines-client/utils/types.d.ts +32 -0
- package/dist/types-ts4.5/types/index.d.ts +2 -1
- package/dist/types-ts4.5/types/reporting-lines.d.ts +1 -0
- package/dist/types-ts4.5/types/team.d.ts +8 -0
- package/package.json +1 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
|
+
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
8
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
|
+
import { DEFAULT_CONFIG } from '../constants';
|
|
11
|
+
import { BaseGraphQlClient } from '../graphql-client';
|
|
12
|
+
import { logException } from '../sentry/main';
|
|
13
|
+
import ReportingLinesQueryWithAccountStatus from './utils/queries/ReportingLinesQueryWithAccountStatus.graphql';
|
|
14
|
+
var SERVICE_URL = "".concat(DEFAULT_CONFIG.stargateRoot, "/watermelon/graphql");
|
|
15
|
+
export var ReportingLinesClient = /*#__PURE__*/function (_BaseGraphQlClient) {
|
|
16
|
+
function ReportingLinesClient(config) {
|
|
17
|
+
_classCallCheck(this, ReportingLinesClient);
|
|
18
|
+
return _callSuper(this, ReportingLinesClient, [SERVICE_URL, config]);
|
|
19
|
+
}
|
|
20
|
+
_inherits(ReportingLinesClient, _BaseGraphQlClient);
|
|
21
|
+
return _createClass(ReportingLinesClient, [{
|
|
22
|
+
key: "getReportingLines",
|
|
23
|
+
value: function () {
|
|
24
|
+
var _getReportingLines = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(userId) {
|
|
25
|
+
var response;
|
|
26
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
27
|
+
while (1) switch (_context.prev = _context.next) {
|
|
28
|
+
case 0:
|
|
29
|
+
_context.next = 2;
|
|
30
|
+
return this.makeGraphQLRequest({
|
|
31
|
+
query: ReportingLinesQueryWithAccountStatus,
|
|
32
|
+
variables: {
|
|
33
|
+
aaid: userId
|
|
34
|
+
}
|
|
35
|
+
}, {
|
|
36
|
+
operationName: 'ReportingLines'
|
|
37
|
+
});
|
|
38
|
+
case 2:
|
|
39
|
+
response = _context.sent;
|
|
40
|
+
return _context.abrupt("return", response);
|
|
41
|
+
case 4:
|
|
42
|
+
case "end":
|
|
43
|
+
return _context.stop();
|
|
44
|
+
}
|
|
45
|
+
}, _callee, this);
|
|
46
|
+
}));
|
|
47
|
+
function getReportingLines(_x) {
|
|
48
|
+
return _getReportingLines.apply(this, arguments);
|
|
49
|
+
}
|
|
50
|
+
return getReportingLines;
|
|
51
|
+
}()
|
|
52
|
+
}]);
|
|
53
|
+
}(BaseGraphQlClient);
|
|
54
|
+
export default new ReportingLinesClient({
|
|
55
|
+
logException: logException
|
|
56
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject;
|
|
3
|
+
import { print } from 'graphql';
|
|
4
|
+
import gql from 'graphql-tag';
|
|
5
|
+
export default print(gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tfragment ReportingLinesUserPII on UserPII {\n\t\tname\n\t\tpicture\n\t\taccountStatus\n\t\textendedProfile {\n\t\t\tjobTitle\n\t\t}\n\t}\n\n\tfragment ReportingLinesUserFragment on ReportingLinesUser {\n\t\taccountIdentifier\n\t\tidentifierType\n\t\tnumberOfDirectReports\n\t\tnumberOfTotalReports\n\t\tpii {\n\t\t\t...ReportingLinesUserPII\n\t\t}\n\t}\n\n\tquery ReportingLines($aaid: String) {\n\t\treportingLines(aaidOrHash: $aaid) {\n\t\t\tlastModifiedDate\n\t\t\tuser {\n\t\t\t\t...ReportingLinesUserFragment\n\t\t\t}\n\t\t\tmanagers {\n\t\t\t\t...ReportingLinesUserFragment\n\t\t\t}\n\t\t\tpeers {\n\t\t\t\t...ReportingLinesUserFragment\n\t\t\t}\n\t\t\treports {\n\t\t\t\t...ReportingLinesUserFragment\n\t\t\t}\n\t\t}\n\t}\n"]))));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* These are partial types for the reportingLines GQL request from Team Central.
|
|
3
|
+
* Not all data that could be returned is defined here, just what we need.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export var AccountIdentifierType = /*#__PURE__*/function (AccountIdentifierType) {
|
|
7
|
+
AccountIdentifierType["ATLASSIAN_ID"] = "ATLASSIAN_ID";
|
|
8
|
+
AccountIdentifierType["BASE64_HASH"] = "BASE64_HASH";
|
|
9
|
+
AccountIdentifierType["UNKNOWN"] = "UNKNOWN";
|
|
10
|
+
return AccountIdentifierType;
|
|
11
|
+
}({});
|
|
@@ -29,7 +29,7 @@ export function getSentryConfig(options) {
|
|
|
29
29
|
return _objectSpread(_objectSpread(_objectSpread({}, otherOptions), DEFAULT_SENTRY_CONFIG), {}, {
|
|
30
30
|
// Standalone __VERSION__ is set from `bin/set-release-version.sh`
|
|
31
31
|
// when building to deploy to production
|
|
32
|
-
release: "".concat("@atlaskit/teams-client", "@").concat("4.
|
|
32
|
+
release: "".concat("@atlaskit/teams-client", "@").concat("4.18.0") ||
|
|
33
33
|
// @ts-ignore Jira - window.BUILD_KEY
|
|
34
34
|
window.BUILD_KEY || ( // @ts-ignore Confluence - window.__buildInfo
|
|
35
35
|
(_window$__buildInfo = window.__buildInfo) === null || _window$__buildInfo === void 0 ? void 0 : _window$__buildInfo.FRONTEND_VERSION) || '---',
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TeamsUFOExperience } from './index';
|
|
2
|
-
declare const TeamsClientExperienceKeyList: readonly ["getAllTeams", "getTeamById", "updateTeamById", "querySettings", "queryFeatureFlags", "queryTeamMemberships", "queryUser", "inviteUsersToTeam", "getMyTeamMembership", "getTeamLinksByTeamId", "createTeamLink", "updateTeamLink", "deleteTeamLink", "reorderTeamLink", "acceptTeamInvitation", "declineTeamInvitation", "selfJoinTeam", "cancelJoinRequest", "acceptJoinRequest", "declineJoinRequest", "deleteTeamMembership", "revokeTeamInvite", "deleteTeam", "isSingleFullMemberTeam", "createTeam", "createTeamContainers", "createExternalTeam", "getProfileWithMutability", "getIsSiteAdmin", "addUsersToTeam", "removeTeamMemberships", "getRecommendedProducts", "joinOrRequestDefaultAccessToProductsBulk", "getReadMediaToken", "getWriteUserMediaToken", "updateUserHeaderImage", "getWriteTeamMediaToken", "getSoftDeletedTeamById", "restoreTeam", "getUserInSiteUserBase", "getLinkedTeamsBulk", "getTeamProfileDetails", "getUserContainers", "getPermissions", "getUserManageConfig", "getMyAvatarUploadedStatus", "deleteUserAvatar", "getTeamLinkIcons", "getTeamInSlack", "getOrgScope", "restoreTeamToSyncedGroup", "getTeamAndGroupDiff", "linkExistingTeamToGroup", "fetchUserAvatarInfo", "getOrgEligibilityForManagedTeams", "updateUser", "updateUserAvatar", "disconnectTeamInSlack", "updateTeamInSlack", "getUserTenure", "getAriFromUrl", "getWebLinkTitle", "addAgentToTeam", "getTeamEnabledSites", "assignTeamsToSites", "removeAgentTeamAssociation", "getAssignedTeams", "setTeamSiteAssignmentPermission", "getUnassignedTeams", "getTeamSiteAssignmentOrgDetails"];
|
|
2
|
+
declare const TeamsClientExperienceKeyList: readonly ["getAllTeams", "getTeamById", "updateTeamById", "querySettings", "queryFeatureFlags", "queryTeamMemberships", "queryUser", "inviteUsersToTeam", "getMyTeamMembership", "getTeamLinksByTeamId", "createTeamLink", "updateTeamLink", "deleteTeamLink", "reorderTeamLink", "acceptTeamInvitation", "declineTeamInvitation", "selfJoinTeam", "cancelJoinRequest", "acceptJoinRequest", "declineJoinRequest", "deleteTeamMembership", "revokeTeamInvite", "deleteTeam", "isSingleFullMemberTeam", "createTeam", "createTeamContainers", "createExternalTeam", "getProfileWithMutability", "getIsSiteAdmin", "addUsersToTeam", "removeTeamMemberships", "getRecommendedProducts", "joinOrRequestDefaultAccessToProductsBulk", "getReadMediaToken", "getWriteUserMediaToken", "updateUserHeaderImage", "getWriteTeamMediaToken", "getSoftDeletedTeamById", "restoreTeam", "getUserInSiteUserBase", "getLinkedTeamsBulk", "getTeamProfileDetails", "getUserContainers", "getPermissions", "getUserManageConfig", "getMyAvatarUploadedStatus", "deleteUserAvatar", "getTeamLinkIcons", "getTeamInSlack", "getOrgScope", "restoreTeamToSyncedGroup", "getTeamAndGroupDiff", "linkExistingTeamToGroup", "fetchUserAvatarInfo", "getOrgEligibilityForManagedTeams", "updateUser", "updateUserAvatar", "disconnectTeamInSlack", "updateTeamInSlack", "getUserTenure", "getAriFromUrl", "getWebLinkTitle", "addAgentToTeam", "getTeamEnabledSites", "assignTeamsToSites", "removeAgentTeamAssociation", "getAssignedTeams", "setTeamSiteAssignmentPermission", "getUnassignedTeams", "getTeamSiteAssignmentOrgDetails", "getTeamsToBeClonedToJsmSites", "getReportingLines"];
|
|
3
3
|
export type TeamsClientExperienceKeys = (typeof TeamsClientExperienceKeyList)[number];
|
|
4
|
-
export declare const TEAMS_CLIENT_EXPERIENCES: Map<"getAllTeams" | "getOrgEligibilityForManagedTeams" | "addAgentToTeam" | "removeAgentTeamAssociation" | "createTeam" | "getPermissions" | "getLinkedTeamsBulk" | "getTeamProfileDetails" | "getOrgScope" | "getTeamSiteAssignmentOrgDetails" | "getTeamById" | "updateTeamById" | "querySettings" | "queryFeatureFlags" | "queryTeamMemberships" | "queryUser" | "inviteUsersToTeam" | "getMyTeamMembership" | "getTeamLinksByTeamId" | "createTeamLink" | "updateTeamLink" | "deleteTeamLink" | "reorderTeamLink" | "acceptTeamInvitation" | "declineTeamInvitation" | "selfJoinTeam" | "cancelJoinRequest" | "acceptJoinRequest" | "declineJoinRequest" | "deleteTeamMembership" | "revokeTeamInvite" | "deleteTeam" | "isSingleFullMemberTeam" | "createTeamContainers" | "createExternalTeam" | "getProfileWithMutability" | "getIsSiteAdmin" | "addUsersToTeam" | "removeTeamMemberships" | "getRecommendedProducts" | "joinOrRequestDefaultAccessToProductsBulk" | "getReadMediaToken" | "getWriteUserMediaToken" | "updateUserHeaderImage" | "getWriteTeamMediaToken" | "getSoftDeletedTeamById" | "restoreTeam" | "getUserInSiteUserBase" | "getUserContainers" | "getUserManageConfig" | "getMyAvatarUploadedStatus" | "deleteUserAvatar" | "getTeamLinkIcons" | "getTeamInSlack" | "restoreTeamToSyncedGroup" | "getTeamAndGroupDiff" | "linkExistingTeamToGroup" | "fetchUserAvatarInfo" | "updateUser" | "updateUserAvatar" | "disconnectTeamInSlack" | "updateTeamInSlack" | "getUserTenure" | "getAriFromUrl" | "getWebLinkTitle" | "getTeamEnabledSites" | "assignTeamsToSites" | "getAssignedTeams" | "setTeamSiteAssignmentPermission" | "getUnassignedTeams", TeamsUFOExperience>;
|
|
4
|
+
export declare const TEAMS_CLIENT_EXPERIENCES: Map<"getAllTeams" | "getOrgEligibilityForManagedTeams" | "addAgentToTeam" | "removeAgentTeamAssociation" | "createTeam" | "getPermissions" | "getLinkedTeamsBulk" | "getTeamProfileDetails" | "getOrgScope" | "getTeamSiteAssignmentOrgDetails" | "getTeamById" | "updateTeamById" | "querySettings" | "queryFeatureFlags" | "queryTeamMemberships" | "queryUser" | "inviteUsersToTeam" | "getMyTeamMembership" | "getTeamLinksByTeamId" | "createTeamLink" | "updateTeamLink" | "deleteTeamLink" | "reorderTeamLink" | "acceptTeamInvitation" | "declineTeamInvitation" | "selfJoinTeam" | "cancelJoinRequest" | "acceptJoinRequest" | "declineJoinRequest" | "deleteTeamMembership" | "revokeTeamInvite" | "deleteTeam" | "isSingleFullMemberTeam" | "createTeamContainers" | "createExternalTeam" | "getProfileWithMutability" | "getIsSiteAdmin" | "addUsersToTeam" | "removeTeamMemberships" | "getRecommendedProducts" | "joinOrRequestDefaultAccessToProductsBulk" | "getReadMediaToken" | "getWriteUserMediaToken" | "updateUserHeaderImage" | "getWriteTeamMediaToken" | "getSoftDeletedTeamById" | "restoreTeam" | "getUserInSiteUserBase" | "getUserContainers" | "getUserManageConfig" | "getMyAvatarUploadedStatus" | "deleteUserAvatar" | "getTeamLinkIcons" | "getTeamInSlack" | "restoreTeamToSyncedGroup" | "getTeamAndGroupDiff" | "linkExistingTeamToGroup" | "fetchUserAvatarInfo" | "updateUser" | "updateUserAvatar" | "disconnectTeamInSlack" | "updateTeamInSlack" | "getUserTenure" | "getAriFromUrl" | "getWebLinkTitle" | "getTeamEnabledSites" | "assignTeamsToSites" | "getAssignedTeams" | "setTeamSiteAssignmentPermission" | "getUnassignedTeams" | "getTeamsToBeClonedToJsmSites" | "getReportingLines", TeamsUFOExperience>;
|
|
5
5
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type InvitedUser, type LinkOrder, type NewTeamLink, type ReadMediaTokenResponse, type Team, type TeamLink, type TeamMembership, type TeamMembershipSettings, type TeamWithImageUrls, type TeamWithMemberships } from '../../types';
|
|
2
|
-
import { type AlignmentPermission, type AssignedTeamsResponse, type AssignTeamsToSitesResponse, type ExternalReference, type LinkedTeamsBulkResponse, type LinkedTeamsProfileDetails, type OrgScope, type SoftDeletedTeam, type TeamEnabledSitesResponse, type TeamSiteAssignmentOrgDetailsResponse, type TeamsPermissionFromApi, type UnassignedTeamsResponse } from '../../types/team';
|
|
2
|
+
import { type AlignmentPermission, type AssignedTeamsResponse, type AssignTeamsToSitesResponse, type ExternalReference, type LinkedTeamsBulkResponse, type LinkedTeamsProfileDetails, type OrgScope, type SoftDeletedTeam, type TeamEnabledSitesResponse, type TeamSiteAssignmentOrgDetailsResponse, type TeamsPermissionFromApi, type TeamsToBeClonedToJsmSitesResponse, type UnassignedTeamsResponse } from '../../types/team';
|
|
3
3
|
import { type ApiTeamContainerCreationPayload, type ApiTeamContainerResponse } from '../../types/team-container';
|
|
4
4
|
import { type UserInSiteUserbase } from '../../types/user';
|
|
5
5
|
import { RestClient } from '../rest-client';
|
|
@@ -135,6 +135,10 @@ export declare class LegionClient extends RestClient implements LegionClient {
|
|
|
135
135
|
* Shoud only be used within Teams (P&T) packages
|
|
136
136
|
*/
|
|
137
137
|
getUserInSiteUserBase(userId: string): Promise<UserInSiteUserbase>;
|
|
138
|
+
getTeamsToBeClonedToJsmSites(teamsToSiteScope: {
|
|
139
|
+
teamId: string;
|
|
140
|
+
siteId: string;
|
|
141
|
+
}[]): Promise<TeamsToBeClonedToJsmSitesResponse>;
|
|
138
142
|
trimTeamARI(teamId?: string): string;
|
|
139
143
|
private constructProductOriginParams;
|
|
140
144
|
private mapTeamResponseV4ToTeam;
|
|
@@ -11,6 +11,7 @@ import objectResolverClient from './object-resolver-client';
|
|
|
11
11
|
import permsClient from './perms-client';
|
|
12
12
|
import publicApiClient from './public-api-client';
|
|
13
13
|
import replinesClient from './replines-client';
|
|
14
|
+
import reportingLinesClient from './reporting-lines-client';
|
|
14
15
|
import teamCentralClient from './team-central-client';
|
|
15
16
|
import teamsInSlackClient from './teams-in-slack-client';
|
|
16
17
|
import { type ClientContextProps } from './types';
|
|
@@ -40,6 +41,7 @@ export declare class TeamsClient {
|
|
|
40
41
|
private readonly _identityClient;
|
|
41
42
|
private readonly _teamCentralClient;
|
|
42
43
|
private readonly _replinesClient;
|
|
44
|
+
private readonly _reportingLinesClient;
|
|
43
45
|
constructor(
|
|
44
46
|
/**
|
|
45
47
|
* @param {ClientContextProps} context - Context including CloudId & OrgId to be used for all requests
|
|
@@ -295,6 +297,10 @@ export declare class TeamsClient {
|
|
|
295
297
|
* Get team site assignment org details
|
|
296
298
|
*/
|
|
297
299
|
getTeamSiteAssignmentOrgDetails(...args: Parameters<typeof defaultLegionClient.getTeamSiteAssignmentOrgDetails>): Promise<AwaitedReturn<typeof defaultLegionClient.getTeamSiteAssignmentOrgDetails>>;
|
|
300
|
+
/**
|
|
301
|
+
* Get teams to be cloned to JSM sites
|
|
302
|
+
*/
|
|
303
|
+
getTeamsToBeClonedToJsmSites(...args: Parameters<typeof defaultLegionClient.getTeamsToBeClonedToJsmSites>): Promise<AwaitedReturn<typeof defaultLegionClient.getTeamsToBeClonedToJsmSites>>;
|
|
298
304
|
/**
|
|
299
305
|
* Is the current user a site admin
|
|
300
306
|
*/
|
|
@@ -386,6 +392,7 @@ export declare class TeamsClient {
|
|
|
386
392
|
deleteHelpPointer(...args: Parameters<typeof teamCentralClient.deleteHelpPointer>): Promise<AwaitedReturn<typeof teamCentralClient.deleteHelpPointer>>;
|
|
387
393
|
getUserTenure(...args: Parameters<typeof replinesClient.getUserTenure>): Promise<AwaitedReturn<typeof replinesClient.getUserTenure>>;
|
|
388
394
|
checkOrgFullAlignmentStatus(...args: Parameters<typeof defaultLegionClient.checkOrgFullAlignmentStatus>): Promise<AwaitedReturn<typeof defaultLegionClient.checkOrgFullAlignmentStatus>>;
|
|
395
|
+
getReportingLines(...args: Parameters<typeof reportingLinesClient.getReportingLines>): Promise<AwaitedReturn<typeof reportingLinesClient.getReportingLines>>;
|
|
389
396
|
}
|
|
390
397
|
export declare const teamsClient: TeamsClient;
|
|
391
398
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ClientConfig } from '../base-client';
|
|
2
|
+
import { BaseGraphQlClient } from '../graphql-client';
|
|
3
|
+
import type { ReportingLines } from './utils/types';
|
|
4
|
+
export declare class ReportingLinesClient extends BaseGraphQlClient {
|
|
5
|
+
constructor(config: ClientConfig);
|
|
6
|
+
getReportingLines(userId: string): Promise<{
|
|
7
|
+
reportingLines: ReportingLines;
|
|
8
|
+
}>;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: ReportingLinesClient;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* These are partial types for the reportingLines GQL request from Team Central.
|
|
3
|
+
* Not all data that could be returned is defined here, just what we need.
|
|
4
|
+
*/
|
|
5
|
+
import type { Maybe } from 'graphql/jsutils/Maybe';
|
|
6
|
+
export declare enum AccountIdentifierType {
|
|
7
|
+
ATLASSIAN_ID = "ATLASSIAN_ID",
|
|
8
|
+
BASE64_HASH = "BASE64_HASH",
|
|
9
|
+
UNKNOWN = "UNKNOWN"
|
|
10
|
+
}
|
|
11
|
+
export interface ReportingLinesUserPII {
|
|
12
|
+
name?: Maybe<string>;
|
|
13
|
+
accountStatus?: Maybe<string>;
|
|
14
|
+
picture?: Maybe<string>;
|
|
15
|
+
extendedProfile?: Maybe<{
|
|
16
|
+
jobTitle?: Maybe<string>;
|
|
17
|
+
}>;
|
|
18
|
+
}
|
|
19
|
+
export interface ReportingLinesUser {
|
|
20
|
+
accountIdentifier?: Maybe<string>;
|
|
21
|
+
identifierType?: Maybe<AccountIdentifierType>;
|
|
22
|
+
numberOfDirectReports: number;
|
|
23
|
+
numberOfTotalReports: number;
|
|
24
|
+
pii?: Maybe<ReportingLinesUserPII>;
|
|
25
|
+
}
|
|
26
|
+
export interface ReportingLines {
|
|
27
|
+
managers?: Maybe<ReportingLinesUser[]>;
|
|
28
|
+
peers?: Maybe<ReportingLinesUser[]>;
|
|
29
|
+
reports?: Maybe<ReportingLinesUser[]>;
|
|
30
|
+
user?: Maybe<ReportingLinesUser>;
|
|
31
|
+
lastModifiedDate?: Maybe<string>;
|
|
32
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { TeamWithImageUrls, Team, TeamPermission, TeamsPermissionFromApi, TeamsPermissionApi, TeamRestriction, TeamMembershipSettings, ScopeMode, OrgScope, LinkedTeam, Scope, AssignedTeam, AssignedTeamsResponse, UnassignedTeam, UnassignedTeamsResponse, TeamEnabledSitesResponse, AlignmentPermission, TeamSiteAssignmentOrgDetailsResponse, } from './team';
|
|
1
|
+
export type { TeamWithImageUrls, Team, TeamPermission, TeamsPermissionFromApi, TeamsPermissionApi, TeamRestriction, TeamMembershipSettings, ScopeMode, OrgScope, LinkedTeam, Scope, AssignedTeam, AssignedTeamsResponse, UnassignedTeam, UnassignedTeamsResponse, TeamEnabledSitesResponse, AlignmentPermission, TeamSiteAssignmentOrgDetailsResponse, TeamsToBeClonedToJsmSitesResponse, } from './team';
|
|
2
2
|
export type { TeamsClientUser as User, EditableUserFields } from './user';
|
|
3
3
|
export { isEditableUserField } from './user';
|
|
4
4
|
export type { InvitedUser, TeamMembership, TeamAgentMembership, TeamWithMemberships, MembershipState, MembershipRole, } from './membership';
|
|
@@ -11,3 +11,4 @@ export type { TeamInSlack } from './slack';
|
|
|
11
11
|
export type { UserTenure } from './tenure';
|
|
12
12
|
export type { TeamAgentAssociation } from './association';
|
|
13
13
|
export { type ApiTeamContainerCreationPayload, type Container, ContainerType, } from './team-container';
|
|
14
|
+
export type { ReportingLines, ReportingLinesUser, } from '../services/reporting-lines-client/utils/types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { ReportingLines } from '../services/reporting-lines-client/utils/types';
|
|
@@ -139,6 +139,14 @@ export interface AssignTeamsToSitesResponse {
|
|
|
139
139
|
failureReason: string;
|
|
140
140
|
}[];
|
|
141
141
|
}
|
|
142
|
+
export interface TeamsToBeClonedToJsmSitesResponse {
|
|
143
|
+
teamsToBeClonedToJsmSites: {
|
|
144
|
+
teamId: string;
|
|
145
|
+
cloneToSites: {
|
|
146
|
+
siteId: string;
|
|
147
|
+
}[];
|
|
148
|
+
}[];
|
|
149
|
+
}
|
|
142
150
|
export interface AssignedTeam {
|
|
143
151
|
id: string;
|
|
144
152
|
displayName: string;
|
|
@@ -69,8 +69,10 @@ declare const TeamsClientExperienceKeyList: readonly [
|
|
|
69
69
|
"getAssignedTeams",
|
|
70
70
|
"setTeamSiteAssignmentPermission",
|
|
71
71
|
"getUnassignedTeams",
|
|
72
|
-
"getTeamSiteAssignmentOrgDetails"
|
|
72
|
+
"getTeamSiteAssignmentOrgDetails",
|
|
73
|
+
"getTeamsToBeClonedToJsmSites",
|
|
74
|
+
"getReportingLines"
|
|
73
75
|
];
|
|
74
76
|
export type TeamsClientExperienceKeys = (typeof TeamsClientExperienceKeyList)[number];
|
|
75
|
-
export declare const TEAMS_CLIENT_EXPERIENCES: Map<"getAllTeams" | "getOrgEligibilityForManagedTeams" | "addAgentToTeam" | "removeAgentTeamAssociation" | "createTeam" | "getPermissions" | "getLinkedTeamsBulk" | "getTeamProfileDetails" | "getOrgScope" | "getTeamSiteAssignmentOrgDetails" | "getTeamById" | "updateTeamById" | "querySettings" | "queryFeatureFlags" | "queryTeamMemberships" | "queryUser" | "inviteUsersToTeam" | "getMyTeamMembership" | "getTeamLinksByTeamId" | "createTeamLink" | "updateTeamLink" | "deleteTeamLink" | "reorderTeamLink" | "acceptTeamInvitation" | "declineTeamInvitation" | "selfJoinTeam" | "cancelJoinRequest" | "acceptJoinRequest" | "declineJoinRequest" | "deleteTeamMembership" | "revokeTeamInvite" | "deleteTeam" | "isSingleFullMemberTeam" | "createTeamContainers" | "createExternalTeam" | "getProfileWithMutability" | "getIsSiteAdmin" | "addUsersToTeam" | "removeTeamMemberships" | "getRecommendedProducts" | "joinOrRequestDefaultAccessToProductsBulk" | "getReadMediaToken" | "getWriteUserMediaToken" | "updateUserHeaderImage" | "getWriteTeamMediaToken" | "getSoftDeletedTeamById" | "restoreTeam" | "getUserInSiteUserBase" | "getUserContainers" | "getUserManageConfig" | "getMyAvatarUploadedStatus" | "deleteUserAvatar" | "getTeamLinkIcons" | "getTeamInSlack" | "restoreTeamToSyncedGroup" | "getTeamAndGroupDiff" | "linkExistingTeamToGroup" | "fetchUserAvatarInfo" | "updateUser" | "updateUserAvatar" | "disconnectTeamInSlack" | "updateTeamInSlack" | "getUserTenure" | "getAriFromUrl" | "getWebLinkTitle" | "getTeamEnabledSites" | "assignTeamsToSites" | "getAssignedTeams" | "setTeamSiteAssignmentPermission" | "getUnassignedTeams", TeamsUFOExperience>;
|
|
77
|
+
export declare const TEAMS_CLIENT_EXPERIENCES: Map<"getAllTeams" | "getOrgEligibilityForManagedTeams" | "addAgentToTeam" | "removeAgentTeamAssociation" | "createTeam" | "getPermissions" | "getLinkedTeamsBulk" | "getTeamProfileDetails" | "getOrgScope" | "getTeamSiteAssignmentOrgDetails" | "getTeamById" | "updateTeamById" | "querySettings" | "queryFeatureFlags" | "queryTeamMemberships" | "queryUser" | "inviteUsersToTeam" | "getMyTeamMembership" | "getTeamLinksByTeamId" | "createTeamLink" | "updateTeamLink" | "deleteTeamLink" | "reorderTeamLink" | "acceptTeamInvitation" | "declineTeamInvitation" | "selfJoinTeam" | "cancelJoinRequest" | "acceptJoinRequest" | "declineJoinRequest" | "deleteTeamMembership" | "revokeTeamInvite" | "deleteTeam" | "isSingleFullMemberTeam" | "createTeamContainers" | "createExternalTeam" | "getProfileWithMutability" | "getIsSiteAdmin" | "addUsersToTeam" | "removeTeamMemberships" | "getRecommendedProducts" | "joinOrRequestDefaultAccessToProductsBulk" | "getReadMediaToken" | "getWriteUserMediaToken" | "updateUserHeaderImage" | "getWriteTeamMediaToken" | "getSoftDeletedTeamById" | "restoreTeam" | "getUserInSiteUserBase" | "getUserContainers" | "getUserManageConfig" | "getMyAvatarUploadedStatus" | "deleteUserAvatar" | "getTeamLinkIcons" | "getTeamInSlack" | "restoreTeamToSyncedGroup" | "getTeamAndGroupDiff" | "linkExistingTeamToGroup" | "fetchUserAvatarInfo" | "updateUser" | "updateUserAvatar" | "disconnectTeamInSlack" | "updateTeamInSlack" | "getUserTenure" | "getAriFromUrl" | "getWebLinkTitle" | "getTeamEnabledSites" | "assignTeamsToSites" | "getAssignedTeams" | "setTeamSiteAssignmentPermission" | "getUnassignedTeams" | "getTeamsToBeClonedToJsmSites" | "getReportingLines", TeamsUFOExperience>;
|
|
76
78
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type InvitedUser, type LinkOrder, type NewTeamLink, type ReadMediaTokenResponse, type Team, type TeamLink, type TeamMembership, type TeamMembershipSettings, type TeamWithImageUrls, type TeamWithMemberships } from '../../types';
|
|
2
|
-
import { type AlignmentPermission, type AssignedTeamsResponse, type AssignTeamsToSitesResponse, type ExternalReference, type LinkedTeamsBulkResponse, type LinkedTeamsProfileDetails, type OrgScope, type SoftDeletedTeam, type TeamEnabledSitesResponse, type TeamSiteAssignmentOrgDetailsResponse, type TeamsPermissionFromApi, type UnassignedTeamsResponse } from '../../types/team';
|
|
2
|
+
import { type AlignmentPermission, type AssignedTeamsResponse, type AssignTeamsToSitesResponse, type ExternalReference, type LinkedTeamsBulkResponse, type LinkedTeamsProfileDetails, type OrgScope, type SoftDeletedTeam, type TeamEnabledSitesResponse, type TeamSiteAssignmentOrgDetailsResponse, type TeamsPermissionFromApi, type TeamsToBeClonedToJsmSitesResponse, type UnassignedTeamsResponse } from '../../types/team';
|
|
3
3
|
import { type ApiTeamContainerCreationPayload, type ApiTeamContainerResponse } from '../../types/team-container';
|
|
4
4
|
import { type UserInSiteUserbase } from '../../types/user';
|
|
5
5
|
import { RestClient } from '../rest-client';
|
|
@@ -135,6 +135,10 @@ export declare class LegionClient extends RestClient implements LegionClient {
|
|
|
135
135
|
* Shoud only be used within Teams (P&T) packages
|
|
136
136
|
*/
|
|
137
137
|
getUserInSiteUserBase(userId: string): Promise<UserInSiteUserbase>;
|
|
138
|
+
getTeamsToBeClonedToJsmSites(teamsToSiteScope: {
|
|
139
|
+
teamId: string;
|
|
140
|
+
siteId: string;
|
|
141
|
+
}[]): Promise<TeamsToBeClonedToJsmSitesResponse>;
|
|
138
142
|
trimTeamARI(teamId?: string): string;
|
|
139
143
|
private constructProductOriginParams;
|
|
140
144
|
private mapTeamResponseV4ToTeam;
|
|
@@ -11,6 +11,7 @@ import objectResolverClient from './object-resolver-client';
|
|
|
11
11
|
import permsClient from './perms-client';
|
|
12
12
|
import publicApiClient from './public-api-client';
|
|
13
13
|
import replinesClient from './replines-client';
|
|
14
|
+
import reportingLinesClient from './reporting-lines-client';
|
|
14
15
|
import teamCentralClient from './team-central-client';
|
|
15
16
|
import teamsInSlackClient from './teams-in-slack-client';
|
|
16
17
|
import { type ClientContextProps } from './types';
|
|
@@ -40,6 +41,7 @@ export declare class TeamsClient {
|
|
|
40
41
|
private readonly _identityClient;
|
|
41
42
|
private readonly _teamCentralClient;
|
|
42
43
|
private readonly _replinesClient;
|
|
44
|
+
private readonly _reportingLinesClient;
|
|
43
45
|
constructor(
|
|
44
46
|
/**
|
|
45
47
|
* @param {ClientContextProps} context - Context including CloudId & OrgId to be used for all requests
|
|
@@ -295,6 +297,10 @@ export declare class TeamsClient {
|
|
|
295
297
|
* Get team site assignment org details
|
|
296
298
|
*/
|
|
297
299
|
getTeamSiteAssignmentOrgDetails(...args: Parameters<typeof defaultLegionClient.getTeamSiteAssignmentOrgDetails>): Promise<AwaitedReturn<typeof defaultLegionClient.getTeamSiteAssignmentOrgDetails>>;
|
|
300
|
+
/**
|
|
301
|
+
* Get teams to be cloned to JSM sites
|
|
302
|
+
*/
|
|
303
|
+
getTeamsToBeClonedToJsmSites(...args: Parameters<typeof defaultLegionClient.getTeamsToBeClonedToJsmSites>): Promise<AwaitedReturn<typeof defaultLegionClient.getTeamsToBeClonedToJsmSites>>;
|
|
298
304
|
/**
|
|
299
305
|
* Is the current user a site admin
|
|
300
306
|
*/
|
|
@@ -386,6 +392,7 @@ export declare class TeamsClient {
|
|
|
386
392
|
deleteHelpPointer(...args: Parameters<typeof teamCentralClient.deleteHelpPointer>): Promise<AwaitedReturn<typeof teamCentralClient.deleteHelpPointer>>;
|
|
387
393
|
getUserTenure(...args: Parameters<typeof replinesClient.getUserTenure>): Promise<AwaitedReturn<typeof replinesClient.getUserTenure>>;
|
|
388
394
|
checkOrgFullAlignmentStatus(...args: Parameters<typeof defaultLegionClient.checkOrgFullAlignmentStatus>): Promise<AwaitedReturn<typeof defaultLegionClient.checkOrgFullAlignmentStatus>>;
|
|
395
|
+
getReportingLines(...args: Parameters<typeof reportingLinesClient.getReportingLines>): Promise<AwaitedReturn<typeof reportingLinesClient.getReportingLines>>;
|
|
389
396
|
}
|
|
390
397
|
export declare const teamsClient: TeamsClient;
|
|
391
398
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ClientConfig } from '../base-client';
|
|
2
|
+
import { BaseGraphQlClient } from '../graphql-client';
|
|
3
|
+
import type { ReportingLines } from './utils/types';
|
|
4
|
+
export declare class ReportingLinesClient extends BaseGraphQlClient {
|
|
5
|
+
constructor(config: ClientConfig);
|
|
6
|
+
getReportingLines(userId: string): Promise<{
|
|
7
|
+
reportingLines: ReportingLines;
|
|
8
|
+
}>;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: ReportingLinesClient;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* These are partial types for the reportingLines GQL request from Team Central.
|
|
3
|
+
* Not all data that could be returned is defined here, just what we need.
|
|
4
|
+
*/
|
|
5
|
+
import type { Maybe } from 'graphql/jsutils/Maybe';
|
|
6
|
+
export declare enum AccountIdentifierType {
|
|
7
|
+
ATLASSIAN_ID = "ATLASSIAN_ID",
|
|
8
|
+
BASE64_HASH = "BASE64_HASH",
|
|
9
|
+
UNKNOWN = "UNKNOWN"
|
|
10
|
+
}
|
|
11
|
+
export interface ReportingLinesUserPII {
|
|
12
|
+
name?: Maybe<string>;
|
|
13
|
+
accountStatus?: Maybe<string>;
|
|
14
|
+
picture?: Maybe<string>;
|
|
15
|
+
extendedProfile?: Maybe<{
|
|
16
|
+
jobTitle?: Maybe<string>;
|
|
17
|
+
}>;
|
|
18
|
+
}
|
|
19
|
+
export interface ReportingLinesUser {
|
|
20
|
+
accountIdentifier?: Maybe<string>;
|
|
21
|
+
identifierType?: Maybe<AccountIdentifierType>;
|
|
22
|
+
numberOfDirectReports: number;
|
|
23
|
+
numberOfTotalReports: number;
|
|
24
|
+
pii?: Maybe<ReportingLinesUserPII>;
|
|
25
|
+
}
|
|
26
|
+
export interface ReportingLines {
|
|
27
|
+
managers?: Maybe<ReportingLinesUser[]>;
|
|
28
|
+
peers?: Maybe<ReportingLinesUser[]>;
|
|
29
|
+
reports?: Maybe<ReportingLinesUser[]>;
|
|
30
|
+
user?: Maybe<ReportingLinesUser>;
|
|
31
|
+
lastModifiedDate?: Maybe<string>;
|
|
32
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { TeamWithImageUrls, Team, TeamPermission, TeamsPermissionFromApi, TeamsPermissionApi, TeamRestriction, TeamMembershipSettings, ScopeMode, OrgScope, LinkedTeam, Scope, AssignedTeam, AssignedTeamsResponse, UnassignedTeam, UnassignedTeamsResponse, TeamEnabledSitesResponse, AlignmentPermission, TeamSiteAssignmentOrgDetailsResponse, } from './team';
|
|
1
|
+
export type { TeamWithImageUrls, Team, TeamPermission, TeamsPermissionFromApi, TeamsPermissionApi, TeamRestriction, TeamMembershipSettings, ScopeMode, OrgScope, LinkedTeam, Scope, AssignedTeam, AssignedTeamsResponse, UnassignedTeam, UnassignedTeamsResponse, TeamEnabledSitesResponse, AlignmentPermission, TeamSiteAssignmentOrgDetailsResponse, TeamsToBeClonedToJsmSitesResponse, } from './team';
|
|
2
2
|
export type { TeamsClientUser as User, EditableUserFields } from './user';
|
|
3
3
|
export { isEditableUserField } from './user';
|
|
4
4
|
export type { InvitedUser, TeamMembership, TeamAgentMembership, TeamWithMemberships, MembershipState, MembershipRole, } from './membership';
|
|
@@ -11,3 +11,4 @@ export type { TeamInSlack } from './slack';
|
|
|
11
11
|
export type { UserTenure } from './tenure';
|
|
12
12
|
export type { TeamAgentAssociation } from './association';
|
|
13
13
|
export { type ApiTeamContainerCreationPayload, type Container, ContainerType, } from './team-container';
|
|
14
|
+
export type { ReportingLines, ReportingLinesUser, } from '../services/reporting-lines-client/utils/types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { ReportingLines } from '../services/reporting-lines-client/utils/types';
|
|
@@ -139,6 +139,14 @@ export interface AssignTeamsToSitesResponse {
|
|
|
139
139
|
failureReason: string;
|
|
140
140
|
}[];
|
|
141
141
|
}
|
|
142
|
+
export interface TeamsToBeClonedToJsmSitesResponse {
|
|
143
|
+
teamsToBeClonedToJsmSites: {
|
|
144
|
+
teamId: string;
|
|
145
|
+
cloneToSites: {
|
|
146
|
+
siteId: string;
|
|
147
|
+
}[];
|
|
148
|
+
}[];
|
|
149
|
+
}
|
|
142
150
|
export interface AssignedTeam {
|
|
143
151
|
id: string;
|
|
144
152
|
displayName: string;
|