@atlaskit/teams-client 4.6.3 → 4.7.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.
Files changed (30) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/common/utils/ufo/index.js +2 -2
  3. package/dist/cjs/services/agg-client/index.js +51 -0
  4. package/dist/cjs/services/agg-client/utils/queries/team-has-agents-query.js +12 -0
  5. package/dist/cjs/services/main.js +515 -490
  6. package/dist/cjs/services/sentry/utils/get-sentry-config.js +1 -1
  7. package/dist/cjs/types/association.js +5 -0
  8. package/dist/es2019/common/utils/ufo/index.js +2 -2
  9. package/dist/es2019/services/agg-client/index.js +29 -1
  10. package/dist/es2019/services/agg-client/utils/queries/team-has-agents-query.js +24 -0
  11. package/dist/es2019/services/main.js +9 -0
  12. package/dist/es2019/services/sentry/utils/get-sentry-config.js +1 -1
  13. package/dist/es2019/types/association.js +1 -0
  14. package/dist/esm/common/utils/ufo/index.js +2 -2
  15. package/dist/esm/services/agg-client/index.js +52 -1
  16. package/dist/esm/services/agg-client/utils/queries/team-has-agents-query.js +5 -0
  17. package/dist/esm/services/main.js +515 -490
  18. package/dist/esm/services/sentry/utils/get-sentry-config.js +1 -1
  19. package/dist/esm/types/association.js +1 -0
  20. package/dist/types/services/agg-client/index.d.ts +3 -1
  21. package/dist/types/services/agg-client/utils/queries/team-has-agents-query.d.ts +15 -0
  22. package/dist/types/services/main.d.ts +6 -0
  23. package/dist/types/types/association.d.ts +8 -0
  24. package/dist/types/types/index.d.ts +2 -1
  25. package/dist/types-ts4.5/services/agg-client/index.d.ts +3 -1
  26. package/dist/types-ts4.5/services/agg-client/utils/queries/team-has-agents-query.d.ts +15 -0
  27. package/dist/types-ts4.5/services/main.d.ts +6 -0
  28. package/dist/types-ts4.5/types/association.d.ts +8 -0
  29. package/dist/types-ts4.5/types/index.d.ts +2 -1
  30. package/package.json +1 -1
@@ -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.6.2") ||
32
+ release: "".concat("@atlaskit/teams-client", "@").concat("4.6.4") ||
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) || '---',
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,4 @@
1
- import { type MembershipState, type TeamMembership } from '../../types';
1
+ import { type MembershipState, type TeamAgentAssociation, type TeamMembership } from '../../types';
2
2
  import { type ClientConfig } from '../base-client';
3
3
  import { BaseGraphQlClient } from '../graphql-client';
4
4
  import { type AGGPageInfoVariables, type ResultWithPageInfo } from './types';
@@ -8,5 +8,7 @@ export declare class AGGClient extends BaseGraphQlClient {
8
8
  setBaseUrl(baseUrl: string): void;
9
9
  queryTeamMemberships(teamId: string, membershipState?: MembershipState[], pageInfo?: AGGPageInfoVariables): Promise<ResultWithPageInfo<TeamMembership>>;
10
10
  queryAGGUser(userId: string): Promise<TeamsUserQueryResponse>;
11
+ queryTeamHasAgents(teamId: string): Promise<TeamAgentAssociation[]>;
12
+ private processTeamHasAgentsResponse;
11
13
  }
12
14
  export declare const aggClient: AGGClient;
@@ -0,0 +1,15 @@
1
+ export declare const TeamHasAgentsQuery: string;
2
+ export type TeamHasAgentsQueryVariable = {
3
+ id: string;
4
+ };
5
+ export type TeamHasAgentsQueryResponse = {
6
+ teamHasAgents: {
7
+ edges: Array<{
8
+ node: {
9
+ name: string;
10
+ id: string;
11
+ picture?: string;
12
+ };
13
+ }>;
14
+ };
15
+ };
@@ -88,6 +88,12 @@ export declare class TeamsClient {
88
88
  * @returns {Promise}
89
89
  */
90
90
  queryAGGUser(userId: string): Promise<AwaitedReturn<typeof aggClient.queryAGGUser>>;
91
+ /**
92
+ * Get the agents associated with the team
93
+ * @param {string} userId
94
+ * @returns {Promise}
95
+ */
96
+ queryTeamHasAgents(teamId: string): Promise<AwaitedReturn<typeof aggClient.queryTeamHasAgents>>;
91
97
  /**
92
98
  * Get user information of a member of a team
93
99
  * @param {string} userId
@@ -0,0 +1,8 @@
1
+ import { type TeamsClientUser } from './user';
2
+ export type TeamAgentAssociation = {
3
+ associationId: {
4
+ teamId: string;
5
+ memberId: string;
6
+ };
7
+ agent: TeamsClientUser;
8
+ };
@@ -9,4 +9,5 @@ export type { AGGPageInfo, ResultWithPageInfo, AGGPageInfoVariables, } from '../
9
9
  export type { ReadMediaTokenResponse } from './media';
10
10
  export type { TeamInSlack } from './slack';
11
11
  export type { UserTenure } from './tenure';
12
- export { type Container, ContainerType } from './team-container';
12
+ export type { TeamAgentAssociation } from './association';
13
+ export { type ApiTeamContainerCreationPayload, type Container, ContainerType, } from './team-container';
@@ -1,4 +1,4 @@
1
- import { type MembershipState, type TeamMembership } from '../../types';
1
+ import { type MembershipState, type TeamAgentAssociation, type TeamMembership } from '../../types';
2
2
  import { type ClientConfig } from '../base-client';
3
3
  import { BaseGraphQlClient } from '../graphql-client';
4
4
  import { type AGGPageInfoVariables, type ResultWithPageInfo } from './types';
@@ -8,5 +8,7 @@ export declare class AGGClient extends BaseGraphQlClient {
8
8
  setBaseUrl(baseUrl: string): void;
9
9
  queryTeamMemberships(teamId: string, membershipState?: MembershipState[], pageInfo?: AGGPageInfoVariables): Promise<ResultWithPageInfo<TeamMembership>>;
10
10
  queryAGGUser(userId: string): Promise<TeamsUserQueryResponse>;
11
+ queryTeamHasAgents(teamId: string): Promise<TeamAgentAssociation[]>;
12
+ private processTeamHasAgentsResponse;
11
13
  }
12
14
  export declare const aggClient: AGGClient;
@@ -0,0 +1,15 @@
1
+ export declare const TeamHasAgentsQuery: string;
2
+ export type TeamHasAgentsQueryVariable = {
3
+ id: string;
4
+ };
5
+ export type TeamHasAgentsQueryResponse = {
6
+ teamHasAgents: {
7
+ edges: Array<{
8
+ node: {
9
+ name: string;
10
+ id: string;
11
+ picture?: string;
12
+ };
13
+ }>;
14
+ };
15
+ };
@@ -88,6 +88,12 @@ export declare class TeamsClient {
88
88
  * @returns {Promise}
89
89
  */
90
90
  queryAGGUser(userId: string): Promise<AwaitedReturn<typeof aggClient.queryAGGUser>>;
91
+ /**
92
+ * Get the agents associated with the team
93
+ * @param {string} userId
94
+ * @returns {Promise}
95
+ */
96
+ queryTeamHasAgents(teamId: string): Promise<AwaitedReturn<typeof aggClient.queryTeamHasAgents>>;
91
97
  /**
92
98
  * Get user information of a member of a team
93
99
  * @param {string} userId
@@ -0,0 +1,8 @@
1
+ import { type TeamsClientUser } from './user';
2
+ export type TeamAgentAssociation = {
3
+ associationId: {
4
+ teamId: string;
5
+ memberId: string;
6
+ };
7
+ agent: TeamsClientUser;
8
+ };
@@ -9,4 +9,5 @@ export type { AGGPageInfo, ResultWithPageInfo, AGGPageInfoVariables, } from '../
9
9
  export type { ReadMediaTokenResponse } from './media';
10
10
  export type { TeamInSlack } from './slack';
11
11
  export type { UserTenure } from './tenure';
12
- export { type Container, ContainerType } from './team-container';
12
+ export type { TeamAgentAssociation } from './association';
13
+ export { type ApiTeamContainerCreationPayload, type Container, ContainerType, } from './team-container';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/teams-client",
3
- "version": "4.6.3",
3
+ "version": "4.7.0",
4
4
  "description": "A client to retrieve team related data",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",