@atlaskit/teams-client 4.0.0 → 4.1.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 +8 -0
- package/dist/cjs/common/utils/ufo/index.js +2 -2
- package/dist/cjs/services/hooks/use-teams-client-setup.js +10 -0
- package/dist/cjs/services/main.js +176 -0
- package/dist/cjs/services/sentry/utils/get-sentry-config.js +1 -1
- package/dist/cjs/services/team-central-client/index.js +287 -0
- package/dist/cjs/services/team-central-client/mutations/add-team-watcher.graphql.js +12 -0
- package/dist/cjs/services/team-central-client/mutations/create-tag-mutation.graphql.js +12 -0
- package/dist/cjs/services/team-central-client/mutations/help-pointer-create-mutation.graphql.js +12 -0
- package/dist/cjs/services/team-central-client/mutations/help-pointer-delete-mutation.graphql.js +12 -0
- package/dist/cjs/services/team-central-client/mutations/help-pointer-update-mutation.graphql.js +12 -0
- package/dist/cjs/services/team-central-client/mutations/kudos-delete-mutation.graphql.js +12 -0
- package/dist/cjs/services/team-central-client/mutations/remove-team-watcher.graphql.js +12 -0
- package/dist/cjs/services/team-central-client/queries/tag-list-query.graphql.js +12 -0
- package/dist/cjs/services/team-central-client/utils.js +12 -0
- package/dist/es2019/common/utils/ufo/index.js +2 -2
- package/dist/es2019/services/hooks/use-teams-client-setup.js +10 -0
- package/dist/es2019/services/main.js +30 -0
- package/dist/es2019/services/sentry/utils/get-sentry-config.js +1 -1
- package/dist/es2019/services/team-central-client/index.js +106 -0
- package/dist/es2019/services/team-central-client/mutations/add-team-watcher.graphql.js +10 -0
- package/dist/es2019/services/team-central-client/mutations/create-tag-mutation.graphql.js +13 -0
- package/dist/es2019/services/team-central-client/mutations/help-pointer-create-mutation.graphql.js +31 -0
- package/dist/es2019/services/team-central-client/mutations/help-pointer-delete-mutation.graphql.js +9 -0
- package/dist/es2019/services/team-central-client/mutations/help-pointer-update-mutation.graphql.js +33 -0
- package/dist/es2019/services/team-central-client/mutations/kudos-delete-mutation.graphql.js +12 -0
- package/dist/es2019/services/team-central-client/mutations/remove-team-watcher.graphql.js +10 -0
- package/dist/es2019/services/team-central-client/queries/tag-list-query.graphql.js +26 -0
- package/dist/es2019/services/team-central-client/utils.js +2 -0
- package/dist/esm/common/utils/ufo/index.js +2 -2
- package/dist/esm/services/hooks/use-teams-client-setup.js +10 -0
- package/dist/esm/services/main.js +176 -0
- package/dist/esm/services/sentry/utils/get-sentry-config.js +1 -1
- package/dist/esm/services/team-central-client/index.js +280 -0
- package/dist/esm/services/team-central-client/mutations/add-team-watcher.graphql.js +5 -0
- package/dist/esm/services/team-central-client/mutations/create-tag-mutation.graphql.js +5 -0
- package/dist/esm/services/team-central-client/mutations/help-pointer-create-mutation.graphql.js +5 -0
- package/dist/esm/services/team-central-client/mutations/help-pointer-delete-mutation.graphql.js +5 -0
- package/dist/esm/services/team-central-client/mutations/help-pointer-update-mutation.graphql.js +5 -0
- package/dist/esm/services/team-central-client/mutations/kudos-delete-mutation.graphql.js +5 -0
- package/dist/esm/services/team-central-client/mutations/remove-team-watcher.graphql.js +5 -0
- package/dist/esm/services/team-central-client/queries/tag-list-query.graphql.js +5 -0
- package/dist/esm/services/team-central-client/utils.js +6 -0
- package/dist/types/services/main.d.ts +11 -0
- package/dist/types/services/team-central-client/index.d.ts +24 -0
- package/dist/types/services/team-central-client/mutations/add-team-watcher.graphql.d.ts +9 -0
- package/dist/types/services/team-central-client/mutations/create-tag-mutation.graphql.d.ts +12 -0
- package/dist/types/services/team-central-client/mutations/help-pointer-create-mutation.graphql.d.ts +20 -0
- package/dist/types/services/team-central-client/mutations/help-pointer-delete-mutation.graphql.d.ts +7 -0
- package/dist/types/services/team-central-client/mutations/help-pointer-update-mutation.graphql.d.ts +21 -0
- package/dist/types/services/team-central-client/mutations/kudos-delete-mutation.graphql.d.ts +10 -0
- package/dist/types/services/team-central-client/mutations/remove-team-watcher.graphql.d.ts +9 -0
- package/dist/types/services/team-central-client/queries/tag-list-query.graphql.d.ts +24 -0
- package/dist/types/services/team-central-client/utils.d.ts +2 -0
- package/dist/types-ts4.5/services/main.d.ts +11 -0
- package/dist/types-ts4.5/services/team-central-client/index.d.ts +24 -0
- package/dist/types-ts4.5/services/team-central-client/mutations/add-team-watcher.graphql.d.ts +9 -0
- package/dist/types-ts4.5/services/team-central-client/mutations/create-tag-mutation.graphql.d.ts +12 -0
- package/dist/types-ts4.5/services/team-central-client/mutations/help-pointer-create-mutation.graphql.d.ts +20 -0
- package/dist/types-ts4.5/services/team-central-client/mutations/help-pointer-delete-mutation.graphql.d.ts +7 -0
- package/dist/types-ts4.5/services/team-central-client/mutations/help-pointer-update-mutation.graphql.d.ts +21 -0
- package/dist/types-ts4.5/services/team-central-client/mutations/kudos-delete-mutation.graphql.d.ts +10 -0
- package/dist/types-ts4.5/services/team-central-client/mutations/remove-team-watcher.graphql.d.ts +9 -0
- package/dist/types-ts4.5/services/team-central-client/queries/tag-list-query.graphql.d.ts +24 -0
- package/dist/types-ts4.5/services/team-central-client/utils.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getUnshardedTeamCentralGraphqlUrl = exports.getTeamCentralGraphqlUrl = void 0;
|
|
7
|
+
var getTeamCentralGraphqlUrl = exports.getTeamCentralGraphqlUrl = function getTeamCentralGraphqlUrl(baseUrl, cloudId) {
|
|
8
|
+
return "".concat(baseUrl, "/townsquare/s/").concat(cloudId, "/graphql");
|
|
9
|
+
};
|
|
10
|
+
var getUnshardedTeamCentralGraphqlUrl = exports.getUnshardedTeamCentralGraphqlUrl = function getUnshardedTeamCentralGraphqlUrl(baseUrl) {
|
|
11
|
+
return "".concat(baseUrl, "/watermelon/graphql");
|
|
12
|
+
};
|
|
@@ -27,7 +27,7 @@ export class TeamsUFOExperience extends UFOExperience {
|
|
|
27
27
|
return super.failure({
|
|
28
28
|
metadata: {
|
|
29
29
|
error: createErrorMetadata(error),
|
|
30
|
-
packageVersion: "4.
|
|
30
|
+
packageVersion: "4.1.0",
|
|
31
31
|
packageName: "@atlaskit/teams-client"
|
|
32
32
|
}
|
|
33
33
|
});
|
|
@@ -35,7 +35,7 @@ export class TeamsUFOExperience extends UFOExperience {
|
|
|
35
35
|
return super.failure({
|
|
36
36
|
metadata: {
|
|
37
37
|
error: 'unknown error',
|
|
38
|
-
packageVersion: "4.
|
|
38
|
+
packageVersion: "4.1.0",
|
|
39
39
|
packageName: "@atlaskit/teams-client"
|
|
40
40
|
}
|
|
41
41
|
});
|
|
@@ -37,4 +37,14 @@ export const useTeamsClientSetupNext = ({
|
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
}, [cloudId, orgId, principalUserId]);
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
if (!stargateRoot) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
teamsClient.setTeamCentralContext(stargateRoot, {
|
|
45
|
+
cloudId,
|
|
46
|
+
orgId,
|
|
47
|
+
userId: principalUserId
|
|
48
|
+
});
|
|
49
|
+
}, [cloudId, orgId, principalUserId, stargateRoot]);
|
|
40
50
|
};
|
|
@@ -10,6 +10,7 @@ import mutabilityClient from './mutability-client';
|
|
|
10
10
|
import objectResolverClient from './object-resolver-client';
|
|
11
11
|
import permsClient from './perms-client';
|
|
12
12
|
import publicApiClient from './public-api-client';
|
|
13
|
+
import teamCentralClient from './team-central-client';
|
|
13
14
|
import teamsInSlackClient from './teams-in-slack-client';
|
|
14
15
|
import userPreferencesClient from './user-preferences-client';
|
|
15
16
|
|
|
@@ -41,6 +42,7 @@ export class TeamsClient {
|
|
|
41
42
|
_defineProperty(this, "_teamsInSlackClient", teamsInSlackClient);
|
|
42
43
|
_defineProperty(this, "_collaborationGraphClient", collaborationGraphClient);
|
|
43
44
|
_defineProperty(this, "_identityClient", identityClient);
|
|
45
|
+
_defineProperty(this, "_teamCentralClient", teamCentralClient);
|
|
44
46
|
if (context) {
|
|
45
47
|
this.setContext(context);
|
|
46
48
|
}
|
|
@@ -82,6 +84,10 @@ export class TeamsClient {
|
|
|
82
84
|
this._publicApiClient.setContext(context);
|
|
83
85
|
this._invitationsClient.setContext(context);
|
|
84
86
|
}
|
|
87
|
+
setTeamCentralContext(baseUrl, context) {
|
|
88
|
+
this._teamCentralClient.setContext(context);
|
|
89
|
+
this._teamCentralClient.setBaseUrl(baseUrl);
|
|
90
|
+
}
|
|
85
91
|
|
|
86
92
|
/**
|
|
87
93
|
* @private
|
|
@@ -537,5 +543,29 @@ export class TeamsClient {
|
|
|
537
543
|
async updateUserAvatar(...args) {
|
|
538
544
|
return this.measurePerformance('updateUserAvatar', () => this._identityClient.updateUserAvatar(...args));
|
|
539
545
|
}
|
|
546
|
+
async addTeamWatcher(...args) {
|
|
547
|
+
return this._teamCentralClient.addTeamWatcher(...args);
|
|
548
|
+
}
|
|
549
|
+
async removeTeamWatcher(...args) {
|
|
550
|
+
return this._teamCentralClient.removeTeamWatcher(...args);
|
|
551
|
+
}
|
|
552
|
+
async deleteKudos(...args) {
|
|
553
|
+
return this._teamCentralClient.deleteKudos(...args);
|
|
554
|
+
}
|
|
555
|
+
async queryTagList(...args) {
|
|
556
|
+
return this._teamCentralClient.queryTagList(...args);
|
|
557
|
+
}
|
|
558
|
+
async createTag(...args) {
|
|
559
|
+
return this._teamCentralClient.createTag(...args);
|
|
560
|
+
}
|
|
561
|
+
async createHelpPointer(...args) {
|
|
562
|
+
return this._teamCentralClient.createHelpPointer(...args);
|
|
563
|
+
}
|
|
564
|
+
async updateHelpPointer(...args) {
|
|
565
|
+
return this._teamCentralClient.updateHelpPointer(...args);
|
|
566
|
+
}
|
|
567
|
+
async deleteHelpPointer(...args) {
|
|
568
|
+
return this._teamCentralClient.deleteHelpPointer(...args);
|
|
569
|
+
}
|
|
540
570
|
}
|
|
541
571
|
export const teamsClient = new TeamsClient();
|
|
@@ -28,7 +28,7 @@ export function getSentryConfig(options) {
|
|
|
28
28
|
...DEFAULT_SENTRY_CONFIG,
|
|
29
29
|
// Standalone __VERSION__ is set from `bin/set-release-version.sh`
|
|
30
30
|
// when building to deploy to production
|
|
31
|
-
release: `${"@atlaskit/teams-client"}@${"4.
|
|
31
|
+
release: `${"@atlaskit/teams-client"}@${"4.1.0"}` ||
|
|
32
32
|
// @ts-ignore Jira - window.BUILD_KEY
|
|
33
33
|
window.BUILD_KEY || ( // @ts-ignore Confluence - window.__buildInfo
|
|
34
34
|
(_window$__buildInfo = window.__buildInfo) === null || _window$__buildInfo === void 0 ? void 0 : _window$__buildInfo.FRONTEND_VERSION) || '---',
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { DEFAULT_CONFIG } from '../constants';
|
|
2
|
+
import { BaseGraphQlClient } from '../graphql-client';
|
|
3
|
+
import { logException } from '../sentry/main';
|
|
4
|
+
import { AddTeamWatcherMutation } from './mutations/add-team-watcher.graphql';
|
|
5
|
+
import { CreateTagMutation } from './mutations/create-tag-mutation.graphql';
|
|
6
|
+
import { HelpPointerCreateMutation } from './mutations/help-pointer-create-mutation.graphql';
|
|
7
|
+
import { HelpPointerDeleteMutation } from './mutations/help-pointer-delete-mutation.graphql';
|
|
8
|
+
import { HelpPointerUpdateMutation } from './mutations/help-pointer-update-mutation.graphql';
|
|
9
|
+
import { KudosDeleteMutation } from './mutations/kudos-delete-mutation.graphql';
|
|
10
|
+
import { RemoveTeamWatcherMutation } from './mutations/remove-team-watcher.graphql';
|
|
11
|
+
import { TagListQuery } from './queries/tag-list-query.graphql';
|
|
12
|
+
import { getTeamCentralGraphqlUrl, getUnshardedTeamCentralGraphqlUrl } from './utils';
|
|
13
|
+
export class TeamCentralClient extends BaseGraphQlClient {
|
|
14
|
+
constructor(baseUrl, config) {
|
|
15
|
+
super(getUnshardedTeamCentralGraphqlUrl(baseUrl), config);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Team central url is a bit special, that it depends on cloudId.
|
|
19
|
+
setBaseUrl(baseUrl) {
|
|
20
|
+
const cloudId = this.getCloudId();
|
|
21
|
+
this.setServiceUrl(cloudId && cloudId !== 'None' ? getTeamCentralGraphqlUrl(baseUrl, cloudId) : getUnshardedTeamCentralGraphqlUrl(baseUrl));
|
|
22
|
+
}
|
|
23
|
+
async addTeamWatcher(teamId, cloudId) {
|
|
24
|
+
const response = await this.makeGraphQLRequest({
|
|
25
|
+
query: AddTeamWatcherMutation,
|
|
26
|
+
variables: {
|
|
27
|
+
teamId,
|
|
28
|
+
cloudId
|
|
29
|
+
}
|
|
30
|
+
}, {
|
|
31
|
+
operationName: 'addTeamWatcher'
|
|
32
|
+
});
|
|
33
|
+
return response.addTeamWatcher;
|
|
34
|
+
}
|
|
35
|
+
async removeTeamWatcher(teamId, cloudId) {
|
|
36
|
+
const response = await this.makeGraphQLRequest({
|
|
37
|
+
query: RemoveTeamWatcherMutation,
|
|
38
|
+
variables: {
|
|
39
|
+
teamId,
|
|
40
|
+
cloudId
|
|
41
|
+
}
|
|
42
|
+
}, {
|
|
43
|
+
operationName: 'removeTeamWatcher'
|
|
44
|
+
});
|
|
45
|
+
return response.removeTeamWatcher;
|
|
46
|
+
}
|
|
47
|
+
async deleteKudos(id) {
|
|
48
|
+
const response = await this.makeGraphQLRequest({
|
|
49
|
+
query: KudosDeleteMutation,
|
|
50
|
+
variables: {
|
|
51
|
+
id
|
|
52
|
+
}
|
|
53
|
+
}, {
|
|
54
|
+
operationName: 'DeleteKudos'
|
|
55
|
+
});
|
|
56
|
+
return response.deleteKudos;
|
|
57
|
+
}
|
|
58
|
+
async queryTagList(variables) {
|
|
59
|
+
const response = await this.makeGraphQLRequest({
|
|
60
|
+
query: TagListQuery,
|
|
61
|
+
variables
|
|
62
|
+
}, {
|
|
63
|
+
operationName: 'TagListByCloudId'
|
|
64
|
+
});
|
|
65
|
+
return response.tagSearchByCloudId;
|
|
66
|
+
}
|
|
67
|
+
async createTag(variables) {
|
|
68
|
+
const response = await this.makeGraphQLRequest({
|
|
69
|
+
query: CreateTagMutation,
|
|
70
|
+
variables
|
|
71
|
+
}, {
|
|
72
|
+
operationName: 'createTagForCloudId'
|
|
73
|
+
});
|
|
74
|
+
return response.createTagForCloudId;
|
|
75
|
+
}
|
|
76
|
+
async createHelpPointer(variables) {
|
|
77
|
+
const response = await this.makeGraphQLRequest({
|
|
78
|
+
query: HelpPointerCreateMutation,
|
|
79
|
+
variables
|
|
80
|
+
}, {
|
|
81
|
+
operationName: 'CreateHelpPointer'
|
|
82
|
+
});
|
|
83
|
+
return response.createHelpPointer;
|
|
84
|
+
}
|
|
85
|
+
async updateHelpPointer(variables) {
|
|
86
|
+
const response = await this.makeGraphQLRequest({
|
|
87
|
+
query: HelpPointerUpdateMutation,
|
|
88
|
+
variables
|
|
89
|
+
}, {
|
|
90
|
+
operationName: 'UpdateHelpPointer'
|
|
91
|
+
});
|
|
92
|
+
return response.updateHelpPointer;
|
|
93
|
+
}
|
|
94
|
+
async deleteHelpPointer(variables) {
|
|
95
|
+
const response = await this.makeGraphQLRequest({
|
|
96
|
+
query: HelpPointerDeleteMutation,
|
|
97
|
+
variables
|
|
98
|
+
}, {
|
|
99
|
+
operationName: 'DeleteHelpPointer'
|
|
100
|
+
});
|
|
101
|
+
return response.deleteHelpPointer;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
export default new TeamCentralClient(DEFAULT_CONFIG.stargateRoot, {
|
|
105
|
+
logException
|
|
106
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { print } from 'graphql';
|
|
2
|
+
import gql from 'graphql-tag';
|
|
3
|
+
export const AddTeamWatcherMutation = print(gql`
|
|
4
|
+
mutation addTeamWatcher($teamId: String!, $cloudId: String) {
|
|
5
|
+
addTeamWatcher(input: { teamId: $teamId, cloudId: $cloudId }) {
|
|
6
|
+
isWatching
|
|
7
|
+
__typename
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
`);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { print } from 'graphql';
|
|
2
|
+
import gql from 'graphql-tag';
|
|
3
|
+
export const CreateTagMutation = print(gql`
|
|
4
|
+
mutation createTagForCloudId($name: String!, $cloudId: String!) {
|
|
5
|
+
createTagForCloudId(input: { name: $name, cloudId: $cloudId }) {
|
|
6
|
+
tag {
|
|
7
|
+
id
|
|
8
|
+
uuid
|
|
9
|
+
name
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
`);
|
package/dist/es2019/services/team-central-client/mutations/help-pointer-create-mutation.graphql.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { print } from 'graphql';
|
|
2
|
+
import gql from 'graphql-tag';
|
|
3
|
+
export const HelpPointerCreateMutation = print(gql`
|
|
4
|
+
mutation CreateHelpPointer(
|
|
5
|
+
$cloudId: String!
|
|
6
|
+
$description: String
|
|
7
|
+
$icon: IconInput
|
|
8
|
+
$tagUuids: [UUID]
|
|
9
|
+
$link: String!
|
|
10
|
+
$name: String!
|
|
11
|
+
$teamId: String!
|
|
12
|
+
$type: HelpPointerType!
|
|
13
|
+
) {
|
|
14
|
+
createHelpPointer(
|
|
15
|
+
input: {
|
|
16
|
+
cloudId: $cloudId
|
|
17
|
+
description: $description
|
|
18
|
+
icon: $icon
|
|
19
|
+
tagUuids: $tagUuids
|
|
20
|
+
link: $link
|
|
21
|
+
name: $name
|
|
22
|
+
teamId: $teamId
|
|
23
|
+
type: $type
|
|
24
|
+
}
|
|
25
|
+
) {
|
|
26
|
+
helpPointer {
|
|
27
|
+
id
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
`);
|
package/dist/es2019/services/team-central-client/mutations/help-pointer-update-mutation.graphql.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { print } from 'graphql';
|
|
2
|
+
import gql from 'graphql-tag';
|
|
3
|
+
export const HelpPointerUpdateMutation = print(gql`
|
|
4
|
+
mutation UpdateHelpPointer(
|
|
5
|
+
$id: ID!
|
|
6
|
+
$description: String
|
|
7
|
+
$teamId: String
|
|
8
|
+
$newTeamName: String
|
|
9
|
+
$icon: IconInput
|
|
10
|
+
$tagUuids: [UUID]
|
|
11
|
+
$link: String
|
|
12
|
+
$name: String
|
|
13
|
+
$type: HelpPointerType
|
|
14
|
+
) {
|
|
15
|
+
updateHelpPointer(
|
|
16
|
+
input: {
|
|
17
|
+
id: $id
|
|
18
|
+
description: $description
|
|
19
|
+
icon: $icon
|
|
20
|
+
tagUuids: $tagUuids
|
|
21
|
+
link: $link
|
|
22
|
+
teamId: $teamId
|
|
23
|
+
newTeamName: $newTeamName
|
|
24
|
+
name: $name
|
|
25
|
+
type: $type
|
|
26
|
+
}
|
|
27
|
+
) {
|
|
28
|
+
helpPointer {
|
|
29
|
+
id
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
`);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { print } from 'graphql';
|
|
2
|
+
import gql from 'graphql-tag';
|
|
3
|
+
export const RemoveTeamWatcherMutation = print(gql`
|
|
4
|
+
mutation removeTeamWatcher($teamId: String!, $cloudId: String) {
|
|
5
|
+
removeTeamWatcher(input: { teamId: $teamId, cloudId: $cloudId }) {
|
|
6
|
+
isWatching
|
|
7
|
+
__typename
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
`);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { print } from 'graphql';
|
|
2
|
+
import gql from 'graphql-tag';
|
|
3
|
+
export const TagListQuery = print(gql`
|
|
4
|
+
query TagListByCloudId($q: String!, $cloudId: String!, $first: Int) {
|
|
5
|
+
tagSearchByCloudId(q: $q, cloudId: $cloudId, first: $first) {
|
|
6
|
+
edges {
|
|
7
|
+
node {
|
|
8
|
+
id
|
|
9
|
+
uuid
|
|
10
|
+
name
|
|
11
|
+
projects {
|
|
12
|
+
count
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
goals {
|
|
16
|
+
count
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
helpLinks {
|
|
20
|
+
count
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
`);
|
|
@@ -45,7 +45,7 @@ export var TeamsUFOExperience = /*#__PURE__*/function (_UFOExperience) {
|
|
|
45
45
|
return _superPropGet(TeamsUFOExperience, "failure", this, 3)([{
|
|
46
46
|
metadata: {
|
|
47
47
|
error: createErrorMetadata(error),
|
|
48
|
-
packageVersion: "4.
|
|
48
|
+
packageVersion: "4.1.0",
|
|
49
49
|
packageName: "@atlaskit/teams-client"
|
|
50
50
|
}
|
|
51
51
|
}]);
|
|
@@ -53,7 +53,7 @@ export var TeamsUFOExperience = /*#__PURE__*/function (_UFOExperience) {
|
|
|
53
53
|
return _superPropGet(TeamsUFOExperience, "failure", this, 3)([{
|
|
54
54
|
metadata: {
|
|
55
55
|
error: 'unknown error',
|
|
56
|
-
packageVersion: "4.
|
|
56
|
+
packageVersion: "4.1.0",
|
|
57
57
|
packageName: "@atlaskit/teams-client"
|
|
58
58
|
}
|
|
59
59
|
}]);
|
|
@@ -36,4 +36,14 @@ export var useTeamsClientSetupNext = function useTeamsClientSetupNext(_ref) {
|
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
}, [cloudId, orgId, principalUserId]);
|
|
39
|
+
useEffect(function () {
|
|
40
|
+
if (!stargateRoot) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
teamsClient.setTeamCentralContext(stargateRoot, {
|
|
44
|
+
cloudId: cloudId,
|
|
45
|
+
orgId: orgId,
|
|
46
|
+
userId: principalUserId
|
|
47
|
+
});
|
|
48
|
+
}, [cloudId, orgId, principalUserId, stargateRoot]);
|
|
39
49
|
};
|
|
@@ -14,6 +14,7 @@ import mutabilityClient from './mutability-client';
|
|
|
14
14
|
import objectResolverClient from './object-resolver-client';
|
|
15
15
|
import permsClient from './perms-client';
|
|
16
16
|
import publicApiClient from './public-api-client';
|
|
17
|
+
import teamCentralClient from './team-central-client';
|
|
17
18
|
import teamsInSlackClient from './teams-in-slack-client';
|
|
18
19
|
import userPreferencesClient from './user-preferences-client';
|
|
19
20
|
|
|
@@ -46,6 +47,7 @@ export var TeamsClient = /*#__PURE__*/function () {
|
|
|
46
47
|
_defineProperty(this, "_teamsInSlackClient", teamsInSlackClient);
|
|
47
48
|
_defineProperty(this, "_collaborationGraphClient", collaborationGraphClient);
|
|
48
49
|
_defineProperty(this, "_identityClient", identityClient);
|
|
50
|
+
_defineProperty(this, "_teamCentralClient", teamCentralClient);
|
|
49
51
|
if (context) {
|
|
50
52
|
this.setContext(context);
|
|
51
53
|
}
|
|
@@ -114,6 +116,12 @@ export var TeamsClient = /*#__PURE__*/function () {
|
|
|
114
116
|
this._publicApiClient.setContext(context);
|
|
115
117
|
this._invitationsClient.setContext(context);
|
|
116
118
|
}
|
|
119
|
+
}, {
|
|
120
|
+
key: "setTeamCentralContext",
|
|
121
|
+
value: function setTeamCentralContext(baseUrl, context) {
|
|
122
|
+
this._teamCentralClient.setContext(context);
|
|
123
|
+
this._teamCentralClient.setBaseUrl(baseUrl);
|
|
124
|
+
}
|
|
117
125
|
|
|
118
126
|
/**
|
|
119
127
|
* @private
|
|
@@ -1931,6 +1939,174 @@ export var TeamsClient = /*#__PURE__*/function () {
|
|
|
1931
1939
|
}
|
|
1932
1940
|
return updateUserAvatar;
|
|
1933
1941
|
}()
|
|
1942
|
+
}, {
|
|
1943
|
+
key: "addTeamWatcher",
|
|
1944
|
+
value: function () {
|
|
1945
|
+
var _addTeamWatcher = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55() {
|
|
1946
|
+
var _this$_teamCentralCli;
|
|
1947
|
+
var _args55 = arguments;
|
|
1948
|
+
return _regeneratorRuntime.wrap(function _callee55$(_context55) {
|
|
1949
|
+
while (1) switch (_context55.prev = _context55.next) {
|
|
1950
|
+
case 0:
|
|
1951
|
+
return _context55.abrupt("return", (_this$_teamCentralCli = this._teamCentralClient).addTeamWatcher.apply(_this$_teamCentralCli, _args55));
|
|
1952
|
+
case 1:
|
|
1953
|
+
case "end":
|
|
1954
|
+
return _context55.stop();
|
|
1955
|
+
}
|
|
1956
|
+
}, _callee55, this);
|
|
1957
|
+
}));
|
|
1958
|
+
function addTeamWatcher() {
|
|
1959
|
+
return _addTeamWatcher.apply(this, arguments);
|
|
1960
|
+
}
|
|
1961
|
+
return addTeamWatcher;
|
|
1962
|
+
}()
|
|
1963
|
+
}, {
|
|
1964
|
+
key: "removeTeamWatcher",
|
|
1965
|
+
value: function () {
|
|
1966
|
+
var _removeTeamWatcher = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56() {
|
|
1967
|
+
var _this$_teamCentralCli2;
|
|
1968
|
+
var _args56 = arguments;
|
|
1969
|
+
return _regeneratorRuntime.wrap(function _callee56$(_context56) {
|
|
1970
|
+
while (1) switch (_context56.prev = _context56.next) {
|
|
1971
|
+
case 0:
|
|
1972
|
+
return _context56.abrupt("return", (_this$_teamCentralCli2 = this._teamCentralClient).removeTeamWatcher.apply(_this$_teamCentralCli2, _args56));
|
|
1973
|
+
case 1:
|
|
1974
|
+
case "end":
|
|
1975
|
+
return _context56.stop();
|
|
1976
|
+
}
|
|
1977
|
+
}, _callee56, this);
|
|
1978
|
+
}));
|
|
1979
|
+
function removeTeamWatcher() {
|
|
1980
|
+
return _removeTeamWatcher.apply(this, arguments);
|
|
1981
|
+
}
|
|
1982
|
+
return removeTeamWatcher;
|
|
1983
|
+
}()
|
|
1984
|
+
}, {
|
|
1985
|
+
key: "deleteKudos",
|
|
1986
|
+
value: function () {
|
|
1987
|
+
var _deleteKudos = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57() {
|
|
1988
|
+
var _this$_teamCentralCli3;
|
|
1989
|
+
var _args57 = arguments;
|
|
1990
|
+
return _regeneratorRuntime.wrap(function _callee57$(_context57) {
|
|
1991
|
+
while (1) switch (_context57.prev = _context57.next) {
|
|
1992
|
+
case 0:
|
|
1993
|
+
return _context57.abrupt("return", (_this$_teamCentralCli3 = this._teamCentralClient).deleteKudos.apply(_this$_teamCentralCli3, _args57));
|
|
1994
|
+
case 1:
|
|
1995
|
+
case "end":
|
|
1996
|
+
return _context57.stop();
|
|
1997
|
+
}
|
|
1998
|
+
}, _callee57, this);
|
|
1999
|
+
}));
|
|
2000
|
+
function deleteKudos() {
|
|
2001
|
+
return _deleteKudos.apply(this, arguments);
|
|
2002
|
+
}
|
|
2003
|
+
return deleteKudos;
|
|
2004
|
+
}()
|
|
2005
|
+
}, {
|
|
2006
|
+
key: "queryTagList",
|
|
2007
|
+
value: function () {
|
|
2008
|
+
var _queryTagList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58() {
|
|
2009
|
+
var _this$_teamCentralCli4;
|
|
2010
|
+
var _args58 = arguments;
|
|
2011
|
+
return _regeneratorRuntime.wrap(function _callee58$(_context58) {
|
|
2012
|
+
while (1) switch (_context58.prev = _context58.next) {
|
|
2013
|
+
case 0:
|
|
2014
|
+
return _context58.abrupt("return", (_this$_teamCentralCli4 = this._teamCentralClient).queryTagList.apply(_this$_teamCentralCli4, _args58));
|
|
2015
|
+
case 1:
|
|
2016
|
+
case "end":
|
|
2017
|
+
return _context58.stop();
|
|
2018
|
+
}
|
|
2019
|
+
}, _callee58, this);
|
|
2020
|
+
}));
|
|
2021
|
+
function queryTagList() {
|
|
2022
|
+
return _queryTagList.apply(this, arguments);
|
|
2023
|
+
}
|
|
2024
|
+
return queryTagList;
|
|
2025
|
+
}()
|
|
2026
|
+
}, {
|
|
2027
|
+
key: "createTag",
|
|
2028
|
+
value: function () {
|
|
2029
|
+
var _createTag = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59() {
|
|
2030
|
+
var _this$_teamCentralCli5;
|
|
2031
|
+
var _args59 = arguments;
|
|
2032
|
+
return _regeneratorRuntime.wrap(function _callee59$(_context59) {
|
|
2033
|
+
while (1) switch (_context59.prev = _context59.next) {
|
|
2034
|
+
case 0:
|
|
2035
|
+
return _context59.abrupt("return", (_this$_teamCentralCli5 = this._teamCentralClient).createTag.apply(_this$_teamCentralCli5, _args59));
|
|
2036
|
+
case 1:
|
|
2037
|
+
case "end":
|
|
2038
|
+
return _context59.stop();
|
|
2039
|
+
}
|
|
2040
|
+
}, _callee59, this);
|
|
2041
|
+
}));
|
|
2042
|
+
function createTag() {
|
|
2043
|
+
return _createTag.apply(this, arguments);
|
|
2044
|
+
}
|
|
2045
|
+
return createTag;
|
|
2046
|
+
}()
|
|
2047
|
+
}, {
|
|
2048
|
+
key: "createHelpPointer",
|
|
2049
|
+
value: function () {
|
|
2050
|
+
var _createHelpPointer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60() {
|
|
2051
|
+
var _this$_teamCentralCli6;
|
|
2052
|
+
var _args60 = arguments;
|
|
2053
|
+
return _regeneratorRuntime.wrap(function _callee60$(_context60) {
|
|
2054
|
+
while (1) switch (_context60.prev = _context60.next) {
|
|
2055
|
+
case 0:
|
|
2056
|
+
return _context60.abrupt("return", (_this$_teamCentralCli6 = this._teamCentralClient).createHelpPointer.apply(_this$_teamCentralCli6, _args60));
|
|
2057
|
+
case 1:
|
|
2058
|
+
case "end":
|
|
2059
|
+
return _context60.stop();
|
|
2060
|
+
}
|
|
2061
|
+
}, _callee60, this);
|
|
2062
|
+
}));
|
|
2063
|
+
function createHelpPointer() {
|
|
2064
|
+
return _createHelpPointer.apply(this, arguments);
|
|
2065
|
+
}
|
|
2066
|
+
return createHelpPointer;
|
|
2067
|
+
}()
|
|
2068
|
+
}, {
|
|
2069
|
+
key: "updateHelpPointer",
|
|
2070
|
+
value: function () {
|
|
2071
|
+
var _updateHelpPointer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61() {
|
|
2072
|
+
var _this$_teamCentralCli7;
|
|
2073
|
+
var _args61 = arguments;
|
|
2074
|
+
return _regeneratorRuntime.wrap(function _callee61$(_context61) {
|
|
2075
|
+
while (1) switch (_context61.prev = _context61.next) {
|
|
2076
|
+
case 0:
|
|
2077
|
+
return _context61.abrupt("return", (_this$_teamCentralCli7 = this._teamCentralClient).updateHelpPointer.apply(_this$_teamCentralCli7, _args61));
|
|
2078
|
+
case 1:
|
|
2079
|
+
case "end":
|
|
2080
|
+
return _context61.stop();
|
|
2081
|
+
}
|
|
2082
|
+
}, _callee61, this);
|
|
2083
|
+
}));
|
|
2084
|
+
function updateHelpPointer() {
|
|
2085
|
+
return _updateHelpPointer.apply(this, arguments);
|
|
2086
|
+
}
|
|
2087
|
+
return updateHelpPointer;
|
|
2088
|
+
}()
|
|
2089
|
+
}, {
|
|
2090
|
+
key: "deleteHelpPointer",
|
|
2091
|
+
value: function () {
|
|
2092
|
+
var _deleteHelpPointer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62() {
|
|
2093
|
+
var _this$_teamCentralCli8;
|
|
2094
|
+
var _args62 = arguments;
|
|
2095
|
+
return _regeneratorRuntime.wrap(function _callee62$(_context62) {
|
|
2096
|
+
while (1) switch (_context62.prev = _context62.next) {
|
|
2097
|
+
case 0:
|
|
2098
|
+
return _context62.abrupt("return", (_this$_teamCentralCli8 = this._teamCentralClient).deleteHelpPointer.apply(_this$_teamCentralCli8, _args62));
|
|
2099
|
+
case 1:
|
|
2100
|
+
case "end":
|
|
2101
|
+
return _context62.stop();
|
|
2102
|
+
}
|
|
2103
|
+
}, _callee62, this);
|
|
2104
|
+
}));
|
|
2105
|
+
function deleteHelpPointer() {
|
|
2106
|
+
return _deleteHelpPointer.apply(this, arguments);
|
|
2107
|
+
}
|
|
2108
|
+
return deleteHelpPointer;
|
|
2109
|
+
}()
|
|
1934
2110
|
}]);
|
|
1935
2111
|
}();
|
|
1936
2112
|
export var teamsClient = new TeamsClient();
|
|
@@ -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.1.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) || '---',
|