@atlaskit/teams-public 0.65.3 → 0.65.4
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/controllers/hooks/use-team-containers/index.js +5 -6
- package/dist/es2019/controllers/hooks/use-team-containers/index.js +6 -7
- package/dist/esm/controllers/hooks/use-team-containers/index.js +6 -7
- package/dist/types/controllers/hooks/use-team-containers/index.d.ts +1 -2
- package/dist/types-ts4.5/controllers/hooks/use-team-containers/index.d.ts +1 -2
- package/package.json +10 -12
- package/dist/cjs/services/agg-client/index.js +0 -254
- package/dist/cjs/services/agg-client/mocks/index.js +0 -177
- package/dist/cjs/services/agg-client/types.js +0 -1
- package/dist/cjs/services/agg-client/utils/mutations/unlink-container-mutation.js +0 -12
- package/dist/cjs/services/agg-client/utils/queries/number-of-team-connected-to-container-query.js +0 -12
- package/dist/cjs/services/agg-client/utils/queries/team-connected-to-container-query.js +0 -12
- package/dist/cjs/services/agg-client/utils/queries/team-containers-query.js +0 -15
- package/dist/cjs/services/agg-client/utils/query-context-headers.js +0 -18
- package/dist/cjs/services/base-client/index.js +0 -92
- package/dist/cjs/services/constants.js +0 -9
- package/dist/cjs/services/graphql-client/index.js +0 -12
- package/dist/cjs/services/graphql-client/main.js +0 -95
- package/dist/cjs/services/graphql-client/types.js +0 -5
- package/dist/cjs/services/graphql-client/utils/index.js +0 -160
- package/dist/cjs/services/index.js +0 -18
- package/dist/cjs/services/main.js +0 -148
- package/dist/cjs/services/types.js +0 -5
- package/dist/es2019/services/agg-client/index.js +0 -153
- package/dist/es2019/services/agg-client/mocks/index.js +0 -171
- package/dist/es2019/services/agg-client/types.js +0 -0
- package/dist/es2019/services/agg-client/utils/mutations/unlink-container-mutation.js +0 -20
- package/dist/es2019/services/agg-client/utils/queries/number-of-team-connected-to-container-query.js +0 -14
- package/dist/es2019/services/agg-client/utils/queries/team-connected-to-container-query.js +0 -55
- package/dist/es2019/services/agg-client/utils/queries/team-containers-query.js +0 -56
- package/dist/es2019/services/agg-client/utils/query-context-headers.js +0 -12
- package/dist/es2019/services/base-client/index.js +0 -64
- package/dist/es2019/services/constants.js +0 -3
- package/dist/es2019/services/graphql-client/index.js +0 -1
- package/dist/es2019/services/graphql-client/main.js +0 -47
- package/dist/es2019/services/graphql-client/types.js +0 -1
- package/dist/es2019/services/graphql-client/utils/index.js +0 -77
- package/dist/es2019/services/index.js +0 -1
- package/dist/es2019/services/main.js +0 -67
- package/dist/es2019/services/types.js +0 -1
- package/dist/esm/services/agg-client/index.js +0 -247
- package/dist/esm/services/agg-client/mocks/index.js +0 -171
- package/dist/esm/services/agg-client/types.js +0 -0
- package/dist/esm/services/agg-client/utils/mutations/unlink-container-mutation.js +0 -5
- package/dist/esm/services/agg-client/utils/queries/number-of-team-connected-to-container-query.js +0 -5
- package/dist/esm/services/agg-client/utils/queries/team-connected-to-container-query.js +0 -5
- package/dist/esm/services/agg-client/utils/queries/team-containers-query.js +0 -8
- package/dist/esm/services/agg-client/utils/query-context-headers.js +0 -12
- package/dist/esm/services/base-client/index.js +0 -85
- package/dist/esm/services/constants.js +0 -3
- package/dist/esm/services/graphql-client/index.js +0 -1
- package/dist/esm/services/graphql-client/main.js +0 -88
- package/dist/esm/services/graphql-client/types.js +0 -1
- package/dist/esm/services/graphql-client/utils/index.js +0 -152
- package/dist/esm/services/index.js +0 -1
- package/dist/esm/services/main.js +0 -141
- package/dist/esm/services/types.js +0 -1
- package/dist/types/services/agg-client/index.d.ts +0 -14
- package/dist/types/services/agg-client/mocks/index.d.ts +0 -180
- package/dist/types/services/agg-client/types.d.ts +0 -4
- package/dist/types/services/agg-client/utils/mutations/unlink-container-mutation.d.ts +0 -18
- package/dist/types/services/agg-client/utils/queries/number-of-team-connected-to-container-query.d.ts +0 -11
- package/dist/types/services/agg-client/utils/queries/team-connected-to-container-query.d.ts +0 -45
- package/dist/types/services/agg-client/utils/queries/team-containers-query.d.ts +0 -71
- package/dist/types/services/agg-client/utils/query-context-headers.d.ts +0 -5
- package/dist/types/services/base-client/index.d.ts +0 -37
- package/dist/types/services/constants.d.ts +0 -4
- package/dist/types/services/graphql-client/index.d.ts +0 -1
- package/dist/types/services/graphql-client/main.d.ts +0 -12
- package/dist/types/services/graphql-client/types.d.ts +0 -20
- package/dist/types/services/graphql-client/utils/index.d.ts +0 -3
- package/dist/types/services/index.d.ts +0 -1
- package/dist/types/services/main.d.ts +0 -46
- package/dist/types/services/types.d.ts +0 -37
- package/dist/types-ts4.5/services/agg-client/index.d.ts +0 -14
- package/dist/types-ts4.5/services/agg-client/mocks/index.d.ts +0 -180
- package/dist/types-ts4.5/services/agg-client/types.d.ts +0 -4
- package/dist/types-ts4.5/services/agg-client/utils/mutations/unlink-container-mutation.d.ts +0 -18
- package/dist/types-ts4.5/services/agg-client/utils/queries/number-of-team-connected-to-container-query.d.ts +0 -11
- package/dist/types-ts4.5/services/agg-client/utils/queries/team-connected-to-container-query.d.ts +0 -45
- package/dist/types-ts4.5/services/agg-client/utils/queries/team-containers-query.d.ts +0 -71
- package/dist/types-ts4.5/services/agg-client/utils/query-context-headers.d.ts +0 -5
- package/dist/types-ts4.5/services/base-client/index.d.ts +0 -37
- package/dist/types-ts4.5/services/constants.d.ts +0 -4
- package/dist/types-ts4.5/services/graphql-client/index.d.ts +0 -1
- package/dist/types-ts4.5/services/graphql-client/main.d.ts +0 -12
- package/dist/types-ts4.5/services/graphql-client/types.d.ts +0 -20
- package/dist/types-ts4.5/services/graphql-client/utils/index.d.ts +0 -3
- package/dist/types-ts4.5/services/index.d.ts +0 -1
- package/dist/types-ts4.5/services/main.d.ts +0 -46
- package/dist/types-ts4.5/services/types.d.ts +0 -37
|
@@ -1,141 +0,0 @@
|
|
|
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 _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
5
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
6
|
-
import { aggClient } from './agg-client';
|
|
7
|
-
export var TeamsClient = /*#__PURE__*/function () {
|
|
8
|
-
function TeamsClient(
|
|
9
|
-
/**
|
|
10
|
-
* @param {ClientContextProps} context - Context including CloudId & OrgId to be used for all requests
|
|
11
|
-
*/
|
|
12
|
-
context) {
|
|
13
|
-
_classCallCheck(this, TeamsClient);
|
|
14
|
-
_defineProperty(this, "_aggClient", aggClient);
|
|
15
|
-
if (context) {
|
|
16
|
-
this.setContext(context);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Sets the base URL to be used in the client requests
|
|
22
|
-
* @param {string} baseUrl - The new base URL
|
|
23
|
-
*/
|
|
24
|
-
return _createClass(TeamsClient, [{
|
|
25
|
-
key: "setBaseUrl",
|
|
26
|
-
value: function setBaseUrl(baseUrl) {
|
|
27
|
-
this._aggClient.setBaseUrl(baseUrl);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Sets context including CloudId & OrgId to be used for all requests
|
|
32
|
-
*/
|
|
33
|
-
}, {
|
|
34
|
-
key: "setContext",
|
|
35
|
-
value: function setContext(context) {
|
|
36
|
-
this._aggClient.setContext(context);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Get the containers for a given team
|
|
41
|
-
* @param {string} teamId
|
|
42
|
-
* @returns {Promise<TeamContainers>}
|
|
43
|
-
*/
|
|
44
|
-
}, {
|
|
45
|
-
key: "getTeamContainers",
|
|
46
|
-
value: (function () {
|
|
47
|
-
var _getTeamContainers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(teamId) {
|
|
48
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
49
|
-
while (1) switch (_context.prev = _context.next) {
|
|
50
|
-
case 0:
|
|
51
|
-
return _context.abrupt("return", this._aggClient.getTeamContainers(teamId));
|
|
52
|
-
case 1:
|
|
53
|
-
case "end":
|
|
54
|
-
return _context.stop();
|
|
55
|
-
}
|
|
56
|
-
}, _callee, this);
|
|
57
|
-
}));
|
|
58
|
-
function getTeamContainers(_x) {
|
|
59
|
-
return _getTeamContainers.apply(this, arguments);
|
|
60
|
-
}
|
|
61
|
-
return getTeamContainers;
|
|
62
|
-
}()
|
|
63
|
-
/**
|
|
64
|
-
* Get the number of teams connected to a container (Confluence space or Jira project)
|
|
65
|
-
* @param {string} containerId
|
|
66
|
-
* @returns {Promise}
|
|
67
|
-
*/
|
|
68
|
-
)
|
|
69
|
-
}, {
|
|
70
|
-
key: "getNumberOfConnectedTeams",
|
|
71
|
-
value: (function () {
|
|
72
|
-
var _getNumberOfConnectedTeams = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(containerId) {
|
|
73
|
-
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
74
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
75
|
-
case 0:
|
|
76
|
-
return _context2.abrupt("return", this._aggClient.queryNumberOfTeamConnectedToContainer(containerId));
|
|
77
|
-
case 1:
|
|
78
|
-
case "end":
|
|
79
|
-
return _context2.stop();
|
|
80
|
-
}
|
|
81
|
-
}, _callee2, this);
|
|
82
|
-
}));
|
|
83
|
-
function getNumberOfConnectedTeams(_x2) {
|
|
84
|
-
return _getNumberOfConnectedTeams.apply(this, arguments);
|
|
85
|
-
}
|
|
86
|
-
return getNumberOfConnectedTeams;
|
|
87
|
-
}()
|
|
88
|
-
/**
|
|
89
|
-
* Get teams connected to a container (Confluence space or Jira project)
|
|
90
|
-
* @param {string} containerId
|
|
91
|
-
* @returns {Promise}
|
|
92
|
-
*/
|
|
93
|
-
)
|
|
94
|
-
}, {
|
|
95
|
-
key: "getConnectedTeams",
|
|
96
|
-
value: (function () {
|
|
97
|
-
var _getConnectedTeams = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(containerId) {
|
|
98
|
-
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
99
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
100
|
-
case 0:
|
|
101
|
-
return _context3.abrupt("return", this._aggClient.queryTeamsConnectedToContainer(containerId));
|
|
102
|
-
case 1:
|
|
103
|
-
case "end":
|
|
104
|
-
return _context3.stop();
|
|
105
|
-
}
|
|
106
|
-
}, _callee3, this);
|
|
107
|
-
}));
|
|
108
|
-
function getConnectedTeams(_x3) {
|
|
109
|
-
return _getConnectedTeams.apply(this, arguments);
|
|
110
|
-
}
|
|
111
|
-
return getConnectedTeams;
|
|
112
|
-
}()
|
|
113
|
-
/**
|
|
114
|
-
* Unlink a container from a team
|
|
115
|
-
* @param {string} teamId
|
|
116
|
-
* @param {string} containerId
|
|
117
|
-
* @returns {Promise<void>}
|
|
118
|
-
*/
|
|
119
|
-
)
|
|
120
|
-
}, {
|
|
121
|
-
key: "unlinkTeamContainer",
|
|
122
|
-
value: (function () {
|
|
123
|
-
var _unlinkTeamContainer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(teamId, containerId) {
|
|
124
|
-
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
125
|
-
while (1) switch (_context4.prev = _context4.next) {
|
|
126
|
-
case 0:
|
|
127
|
-
return _context4.abrupt("return", this._aggClient.unlinkTeamContainer(teamId, containerId));
|
|
128
|
-
case 1:
|
|
129
|
-
case "end":
|
|
130
|
-
return _context4.stop();
|
|
131
|
-
}
|
|
132
|
-
}, _callee4, this);
|
|
133
|
-
}));
|
|
134
|
-
function unlinkTeamContainer(_x4, _x5) {
|
|
135
|
-
return _unlinkTeamContainer.apply(this, arguments);
|
|
136
|
-
}
|
|
137
|
-
return unlinkTeamContainer;
|
|
138
|
-
}())
|
|
139
|
-
}]);
|
|
140
|
-
}();
|
|
141
|
-
export var teamsClient = new TeamsClient();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type ClientConfig } from '../base-client';
|
|
2
|
-
import { BaseGraphQlClient } from '../graphql-client';
|
|
3
|
-
import type { TeamContainers, TeamWithMemberships } from '../types';
|
|
4
|
-
import { type UnlinkContainerMutationResponse } from './utils/mutations/unlink-container-mutation';
|
|
5
|
-
export declare class AGGClient extends BaseGraphQlClient {
|
|
6
|
-
constructor(baseUrl: string, config: ClientConfig);
|
|
7
|
-
setBaseUrl(baseUrl: string): void;
|
|
8
|
-
getTeamContainers(teamId: string): Promise<TeamContainers>;
|
|
9
|
-
private processResponse;
|
|
10
|
-
unlinkTeamContainer(teamId: string, containerId: string): Promise<UnlinkContainerMutationResponse>;
|
|
11
|
-
queryNumberOfTeamConnectedToContainer(containerId: string): Promise<number>;
|
|
12
|
-
queryTeamsConnectedToContainer(containerId: string): Promise<TeamWithMemberships[]>;
|
|
13
|
-
}
|
|
14
|
-
export declare const aggClient: AGGClient;
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
export declare const MOCK_TEAM_CONTAINERS: {
|
|
2
|
-
graphStore: {
|
|
3
|
-
cypherQuery: {
|
|
4
|
-
edges: ({
|
|
5
|
-
node: {
|
|
6
|
-
from: {
|
|
7
|
-
id: string;
|
|
8
|
-
};
|
|
9
|
-
to: {
|
|
10
|
-
id: string;
|
|
11
|
-
data: {
|
|
12
|
-
__typename: string;
|
|
13
|
-
confluenceSpaceName: string;
|
|
14
|
-
type: string;
|
|
15
|
-
createdDate: string;
|
|
16
|
-
links: {
|
|
17
|
-
base: string;
|
|
18
|
-
webUi: string;
|
|
19
|
-
};
|
|
20
|
-
icon: {
|
|
21
|
-
path: string;
|
|
22
|
-
};
|
|
23
|
-
jiraProjectName?: undefined;
|
|
24
|
-
webUrl?: undefined;
|
|
25
|
-
created?: undefined;
|
|
26
|
-
avatar?: undefined;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
} | {
|
|
31
|
-
node: {
|
|
32
|
-
from: {
|
|
33
|
-
id: string;
|
|
34
|
-
};
|
|
35
|
-
to: {
|
|
36
|
-
id: string;
|
|
37
|
-
data: {
|
|
38
|
-
__typename: string;
|
|
39
|
-
jiraProjectName: string;
|
|
40
|
-
webUrl: string;
|
|
41
|
-
created: string;
|
|
42
|
-
avatar: {
|
|
43
|
-
medium: string;
|
|
44
|
-
};
|
|
45
|
-
confluenceSpaceName?: undefined;
|
|
46
|
-
type?: undefined;
|
|
47
|
-
createdDate?: undefined;
|
|
48
|
-
links?: undefined;
|
|
49
|
-
icon?: undefined;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
})[];
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
export declare const MOCK_TEAM_CONTAINERSV2: {
|
|
58
|
-
graphStore: {
|
|
59
|
-
cypherQueryV2: {
|
|
60
|
-
edges: ({
|
|
61
|
-
node: {
|
|
62
|
-
columns: {
|
|
63
|
-
key: string;
|
|
64
|
-
value: {
|
|
65
|
-
data: {
|
|
66
|
-
__typename: string;
|
|
67
|
-
id: string;
|
|
68
|
-
confluenceSpaceName: string;
|
|
69
|
-
type: string;
|
|
70
|
-
createdDate: string;
|
|
71
|
-
links: {
|
|
72
|
-
base: string;
|
|
73
|
-
webUi: string;
|
|
74
|
-
};
|
|
75
|
-
icon: {
|
|
76
|
-
path: string;
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
}[];
|
|
81
|
-
};
|
|
82
|
-
} | {
|
|
83
|
-
node: {
|
|
84
|
-
columns: {
|
|
85
|
-
key: string;
|
|
86
|
-
value: {
|
|
87
|
-
data: {
|
|
88
|
-
__typename: string;
|
|
89
|
-
id: string;
|
|
90
|
-
jiraProjectName: string;
|
|
91
|
-
webUrl: string;
|
|
92
|
-
created: string;
|
|
93
|
-
avatar: {
|
|
94
|
-
medium: string;
|
|
95
|
-
};
|
|
96
|
-
projectType: string;
|
|
97
|
-
projectTypeName: string;
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
|
-
}[];
|
|
101
|
-
};
|
|
102
|
-
})[];
|
|
103
|
-
};
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
export declare const MOCK_NUMBER_OF_CONNECTED_TEAMS: {
|
|
107
|
-
graphStore: {
|
|
108
|
-
teamConnectedToContainerInverse: {
|
|
109
|
-
edges: {
|
|
110
|
-
id: string;
|
|
111
|
-
}[];
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
-
};
|
|
115
|
-
export declare const MOCK_CONNECTED_TEAMS: {
|
|
116
|
-
graphStore: {
|
|
117
|
-
teamConnectedToContainerInverse: {
|
|
118
|
-
edges: {
|
|
119
|
-
node: {
|
|
120
|
-
id: string;
|
|
121
|
-
description: string;
|
|
122
|
-
displayName: string;
|
|
123
|
-
smallAvatarImageUrl: string;
|
|
124
|
-
smallHeaderImageUrl: string;
|
|
125
|
-
largeAvatarImageUrl: string;
|
|
126
|
-
largeHeaderImageUrl: string;
|
|
127
|
-
members: {
|
|
128
|
-
nodes: {
|
|
129
|
-
role: string;
|
|
130
|
-
state: string;
|
|
131
|
-
member: {
|
|
132
|
-
name: string;
|
|
133
|
-
picture: string;
|
|
134
|
-
accountStatus: string;
|
|
135
|
-
extendedProfile: {
|
|
136
|
-
jobTitle: string;
|
|
137
|
-
};
|
|
138
|
-
id: string;
|
|
139
|
-
};
|
|
140
|
-
}[];
|
|
141
|
-
pageInfo: {
|
|
142
|
-
endCursor: null;
|
|
143
|
-
hasNextPage: boolean;
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
organizationId: string;
|
|
147
|
-
membershipSettings: string;
|
|
148
|
-
isVerified: boolean;
|
|
149
|
-
state: string;
|
|
150
|
-
creator: {
|
|
151
|
-
id: string;
|
|
152
|
-
};
|
|
153
|
-
};
|
|
154
|
-
}[];
|
|
155
|
-
};
|
|
156
|
-
};
|
|
157
|
-
};
|
|
158
|
-
export declare const MOCK_CONNECTED_TEAMS_RESULT: {
|
|
159
|
-
id: string;
|
|
160
|
-
displayName: string;
|
|
161
|
-
description: string;
|
|
162
|
-
state: string;
|
|
163
|
-
membershipSettings: string;
|
|
164
|
-
organizationId: string;
|
|
165
|
-
creatorId: string;
|
|
166
|
-
isVerified: boolean;
|
|
167
|
-
members: {
|
|
168
|
-
id: string;
|
|
169
|
-
fullName: string;
|
|
170
|
-
avatarUrl: string;
|
|
171
|
-
status: string;
|
|
172
|
-
}[];
|
|
173
|
-
includesYou: boolean;
|
|
174
|
-
memberCount: number;
|
|
175
|
-
smallAvatarImageUrl: string;
|
|
176
|
-
smallHeaderImageUrl: string;
|
|
177
|
-
largeAvatarImageUrl: string;
|
|
178
|
-
largeHeaderImageUrl: string;
|
|
179
|
-
restriction: string;
|
|
180
|
-
}[];
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export declare const UnlinkContainerMutation: string;
|
|
2
|
-
export interface UnlinkContainerMutationError extends Error {
|
|
3
|
-
message: string;
|
|
4
|
-
extensions?: {
|
|
5
|
-
statusCode: string;
|
|
6
|
-
errorType: string;
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
export type UnlinkContainerMutationVariables = {
|
|
10
|
-
teamId: string;
|
|
11
|
-
containerId: string;
|
|
12
|
-
};
|
|
13
|
-
export type UnlinkContainerMutationResponse = {
|
|
14
|
-
deleteTeamConnectedToContainer: {
|
|
15
|
-
errors: Array<UnlinkContainerMutationError>;
|
|
16
|
-
success: boolean;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare const NumberOfTeamConnectedToContainerQuery: string;
|
|
2
|
-
export type NumberOfTeamConnectedToContainerQueryVariables = {
|
|
3
|
-
containerId: string;
|
|
4
|
-
};
|
|
5
|
-
export type NumberOfTeamConnectedToContainerQueryResponse = {
|
|
6
|
-
teamConnectedToContainerInverse: {
|
|
7
|
-
edges: {
|
|
8
|
-
id: string;
|
|
9
|
-
}[];
|
|
10
|
-
};
|
|
11
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { MembershipRole, MembershipState, TeamMembershipSettings, TeamState, UserARI } from '../../../../common/types';
|
|
2
|
-
import type { AGGPageInfo } from '../../types';
|
|
3
|
-
export declare const TeamConnectedToContainerQuery: string;
|
|
4
|
-
export type TeamConnectedToContainerQueryVariables = {
|
|
5
|
-
containerId: string;
|
|
6
|
-
};
|
|
7
|
-
export type TeamConnectedToContainerQueryResponse = {
|
|
8
|
-
teamConnectedToContainerInverse: {
|
|
9
|
-
edges: {
|
|
10
|
-
node: {
|
|
11
|
-
id: string;
|
|
12
|
-
description: string;
|
|
13
|
-
displayName: string;
|
|
14
|
-
creator: {
|
|
15
|
-
id: string;
|
|
16
|
-
};
|
|
17
|
-
smallAvatarImageUrl: string;
|
|
18
|
-
smallHeaderImageUrl: string;
|
|
19
|
-
largeAvatarImageUrl: string;
|
|
20
|
-
largeHeaderImageUrl: string;
|
|
21
|
-
members?: {
|
|
22
|
-
nodes: {
|
|
23
|
-
role: MembershipRole;
|
|
24
|
-
state: MembershipState;
|
|
25
|
-
member?: {
|
|
26
|
-
name: string;
|
|
27
|
-
picture: string;
|
|
28
|
-
id: UserARI;
|
|
29
|
-
accountStatus: 'active' | 'inactive' | 'closed';
|
|
30
|
-
extendedProfile: {
|
|
31
|
-
jobTitle: string | null;
|
|
32
|
-
} | null;
|
|
33
|
-
appType?: string | null;
|
|
34
|
-
};
|
|
35
|
-
}[];
|
|
36
|
-
pageInfo: AGGPageInfo;
|
|
37
|
-
};
|
|
38
|
-
organizationId?: string;
|
|
39
|
-
membershipSettings: TeamMembershipSettings;
|
|
40
|
-
isVerified?: boolean;
|
|
41
|
-
state: TeamState;
|
|
42
|
-
};
|
|
43
|
-
}[];
|
|
44
|
-
};
|
|
45
|
-
};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
export declare const TeamContainersQueryV2: string;
|
|
2
|
-
export declare const getTeamContainersQuery: () => string;
|
|
3
|
-
export type TeamContainersQueryVariables = {
|
|
4
|
-
cypherQuery: string;
|
|
5
|
-
};
|
|
6
|
-
export type TeamContainersQueryResponse = {
|
|
7
|
-
cypherQuery: {
|
|
8
|
-
edges: Array<{
|
|
9
|
-
node: {
|
|
10
|
-
from: {
|
|
11
|
-
id: string;
|
|
12
|
-
};
|
|
13
|
-
to: {
|
|
14
|
-
id: string;
|
|
15
|
-
data: JiraProject | ConfluenceSpace | LoomSpace;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
}>;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export type TeamContainersQueryV2Variables = {
|
|
22
|
-
cypherQuery: string;
|
|
23
|
-
params: Record<string, any>;
|
|
24
|
-
};
|
|
25
|
-
export type TeamContainersQueryV2Response = {
|
|
26
|
-
cypherQueryV2: {
|
|
27
|
-
edges: Array<{
|
|
28
|
-
node: {
|
|
29
|
-
columns: Array<{
|
|
30
|
-
key: string;
|
|
31
|
-
value: {
|
|
32
|
-
data?: JiraProject | ConfluenceSpace | LoomSpace;
|
|
33
|
-
};
|
|
34
|
-
}>;
|
|
35
|
-
};
|
|
36
|
-
}>;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
type JiraProject = {
|
|
40
|
-
__typename: 'JiraProject';
|
|
41
|
-
id: string;
|
|
42
|
-
jiraProjectName: string;
|
|
43
|
-
webUrl: string;
|
|
44
|
-
created: string;
|
|
45
|
-
avatar: {
|
|
46
|
-
medium: string;
|
|
47
|
-
};
|
|
48
|
-
projectType: string;
|
|
49
|
-
projectTypeName: string;
|
|
50
|
-
};
|
|
51
|
-
type ConfluenceSpace = {
|
|
52
|
-
__typename: 'ConfluenceSpace';
|
|
53
|
-
id: string;
|
|
54
|
-
confluenceSpaceName?: string;
|
|
55
|
-
type: string;
|
|
56
|
-
createdDate: string;
|
|
57
|
-
links: {
|
|
58
|
-
base: string;
|
|
59
|
-
webUi: string;
|
|
60
|
-
};
|
|
61
|
-
icon: {
|
|
62
|
-
path: string;
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
type LoomSpace = {
|
|
66
|
-
__typename: 'LoomSpace';
|
|
67
|
-
id: string;
|
|
68
|
-
loomSpaceName: string;
|
|
69
|
-
url: string;
|
|
70
|
-
};
|
|
71
|
-
export {};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { type ClientContext, type ClientContextProps } from '../types';
|
|
2
|
-
type NestedContext = {
|
|
3
|
-
[key: string]: string | number | boolean | NestedContext;
|
|
4
|
-
};
|
|
5
|
-
export type LogExceptionFN = (ex: unknown | Error, name: string, context?: NestedContext & {
|
|
6
|
-
tags?: Record<string, string>;
|
|
7
|
-
}) => void;
|
|
8
|
-
export type ClientConfig = {
|
|
9
|
-
logException: LogExceptionFN;
|
|
10
|
-
};
|
|
11
|
-
export declare class BaseClient {
|
|
12
|
-
private config;
|
|
13
|
-
private context;
|
|
14
|
-
private cache;
|
|
15
|
-
constructor(config: ClientConfig);
|
|
16
|
-
setContext(context: ClientContextProps): void;
|
|
17
|
-
getContext(): ClientContext;
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
* @param localValue is used for backwards compatibility
|
|
21
|
-
* @returns
|
|
22
|
-
*/
|
|
23
|
-
getOrgId(localValue?: string): string;
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* @param localValue is used for backwards compatibility
|
|
27
|
-
* @returns
|
|
28
|
-
*/
|
|
29
|
-
getCloudId(localValue?: string): string | null | undefined;
|
|
30
|
-
logException: (ex: unknown | Error, name: string, context?: NestedContext & {
|
|
31
|
-
tags?: Record<string, string>;
|
|
32
|
-
}) => void;
|
|
33
|
-
private keyWithContext;
|
|
34
|
-
cacheValue<T>(key: string, value: T, expiryMs?: number): void;
|
|
35
|
-
getCachedValue<T>(key: string): T | undefined;
|
|
36
|
-
}
|
|
37
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { BaseGraphQlClient } from './main';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { BaseClient, type ClientConfig } from '../base-client';
|
|
2
|
-
import { type Body, type Options, type ResultResponse } from './types';
|
|
3
|
-
export declare class BaseGraphQlClient extends BaseClient {
|
|
4
|
-
private serviceUrl;
|
|
5
|
-
constructor(serviceUrl: string, config: ClientConfig);
|
|
6
|
-
setServiceUrl(serviceUrl: string): void;
|
|
7
|
-
/**
|
|
8
|
-
* Creates query context headers if cloudId is available.
|
|
9
|
-
*/
|
|
10
|
-
private createQueryContextHeaders;
|
|
11
|
-
makeGraphQLRequest<Key extends string, Data = unknown, Variables = unknown>(body: Body<Variables>, options?: Options): Promise<ResultResponse<Key, Data>>;
|
|
12
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { type ErrorData } from '../../common/utils/error';
|
|
2
|
-
export interface Options {
|
|
3
|
-
operationName?: string;
|
|
4
|
-
errorPolicy?: 'none' | 'all' | 'ignore';
|
|
5
|
-
headers?: Record<string, string>;
|
|
6
|
-
}
|
|
7
|
-
export type InnerResponse<T> = {
|
|
8
|
-
data: T;
|
|
9
|
-
errors?: ErrorData[];
|
|
10
|
-
};
|
|
11
|
-
export type ResultResponse<Key extends string, Data> = {
|
|
12
|
-
[name in Key]: Data;
|
|
13
|
-
};
|
|
14
|
-
export type Body<Variables> = {
|
|
15
|
-
query: string;
|
|
16
|
-
variables?: Variables;
|
|
17
|
-
};
|
|
18
|
-
export type GraphQLRequestDataResponse<Data> = Data | {
|
|
19
|
-
response: Response;
|
|
20
|
-
};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { type Body, type GraphQLRequestDataResponse, type Options, type ResultResponse } from '../types';
|
|
2
|
-
export declare function makeGraphQLRequestWithoutRetries<Data, Variables>(serviceUrl: string, body: Body<Variables>, options?: Options): Promise<GraphQLRequestDataResponse<Data>>;
|
|
3
|
-
export declare function handleGraphQLRequest<Key extends string, Data = unknown, Variables = unknown>(serviceUrl: string, body: Body<Variables>, options?: Options): Promise<ResultResponse<Key, Data>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { teamsClient, TeamsClient } from './main';
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { type ClientContextProps, type TeamContainers, type TeamWithMemberships } from './types';
|
|
2
|
-
type AwaitedReturn<T extends (...args: any) => any> = Awaited<ReturnType<T>>;
|
|
3
|
-
export declare class TeamsClient {
|
|
4
|
-
private readonly _aggClient;
|
|
5
|
-
constructor(
|
|
6
|
-
/**
|
|
7
|
-
* @param {ClientContextProps} context - Context including CloudId & OrgId to be used for all requests
|
|
8
|
-
*/
|
|
9
|
-
context?: ClientContextProps);
|
|
10
|
-
/**
|
|
11
|
-
* Sets the base URL to be used in the client requests
|
|
12
|
-
* @param {string} baseUrl - The new base URL
|
|
13
|
-
*/
|
|
14
|
-
setBaseUrl(baseUrl: string): void;
|
|
15
|
-
/**
|
|
16
|
-
* Sets context including CloudId & OrgId to be used for all requests
|
|
17
|
-
*/
|
|
18
|
-
setContext(context: ClientContextProps): void;
|
|
19
|
-
/**
|
|
20
|
-
* Get the containers for a given team
|
|
21
|
-
* @param {string} teamId
|
|
22
|
-
* @returns {Promise<TeamContainers>}
|
|
23
|
-
*/
|
|
24
|
-
getTeamContainers(teamId: string): Promise<TeamContainers>;
|
|
25
|
-
/**
|
|
26
|
-
* Get the number of teams connected to a container (Confluence space or Jira project)
|
|
27
|
-
* @param {string} containerId
|
|
28
|
-
* @returns {Promise}
|
|
29
|
-
*/
|
|
30
|
-
getNumberOfConnectedTeams(containerId: string): Promise<number>;
|
|
31
|
-
/**
|
|
32
|
-
* Get teams connected to a container (Confluence space or Jira project)
|
|
33
|
-
* @param {string} containerId
|
|
34
|
-
* @returns {Promise}
|
|
35
|
-
*/
|
|
36
|
-
getConnectedTeams(containerId: string): Promise<TeamWithMemberships[]>;
|
|
37
|
-
/**
|
|
38
|
-
* Unlink a container from a team
|
|
39
|
-
* @param {string} teamId
|
|
40
|
-
* @param {string} containerId
|
|
41
|
-
* @returns {Promise<void>}
|
|
42
|
-
*/
|
|
43
|
-
unlinkTeamContainer(teamId: string, containerId: string): Promise<AwaitedReturn<typeof this._aggClient.unlinkTeamContainer>>;
|
|
44
|
-
}
|
|
45
|
-
export declare const teamsClient: TeamsClient;
|
|
46
|
-
export {};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { TeamRestriction } from '@atlaskit/teams-client/types';
|
|
2
|
-
import type { TeamContainer, TeamMembershipSettings, TeamState, UserStatus } from '../common/types';
|
|
3
|
-
export type ClientContext = {
|
|
4
|
-
cloudId?: string | null;
|
|
5
|
-
orgId?: string;
|
|
6
|
-
userId?: string;
|
|
7
|
-
};
|
|
8
|
-
export type ClientContextProps = {
|
|
9
|
-
cloudId?: string | null;
|
|
10
|
-
orgId?: string;
|
|
11
|
-
userId?: string;
|
|
12
|
-
};
|
|
13
|
-
export type TeamContainers = Array<TeamContainer>;
|
|
14
|
-
export type TeamMember = {
|
|
15
|
-
id: string;
|
|
16
|
-
fullName: string;
|
|
17
|
-
avatarUrl?: string;
|
|
18
|
-
status?: UserStatus;
|
|
19
|
-
};
|
|
20
|
-
export type TeamWithMemberships = {
|
|
21
|
-
id: string;
|
|
22
|
-
displayName: string;
|
|
23
|
-
description: string;
|
|
24
|
-
state: TeamState;
|
|
25
|
-
membershipSettings: TeamMembershipSettings;
|
|
26
|
-
organizationId?: string;
|
|
27
|
-
creatorId?: string;
|
|
28
|
-
isVerified?: boolean;
|
|
29
|
-
members: TeamMember[];
|
|
30
|
-
includesYou: boolean;
|
|
31
|
-
memberCount: number;
|
|
32
|
-
largeAvatarImageUrl: string;
|
|
33
|
-
smallAvatarImageUrl: string;
|
|
34
|
-
largeHeaderImageUrl: string;
|
|
35
|
-
smallHeaderImageUrl: string;
|
|
36
|
-
restriction: TeamRestriction;
|
|
37
|
-
};
|