@atlaskit/teams-client 4.33.5 → 5.0.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 (154) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/agg-client/package.json +1 -8
  3. package/agg-client/types/package.json +1 -8
  4. package/ari/package.json +1 -8
  5. package/association/package.json +1 -8
  6. package/client/package.json +1 -8
  7. package/config/package.json +1 -8
  8. package/endpoints/package.json +1 -8
  9. package/error/package.json +1 -8
  10. package/generate-data/package.json +1 -8
  11. package/has-permission/package.json +1 -8
  12. package/initialise-sentry/package.json +1 -8
  13. package/legion-client/package.json +1 -8
  14. package/links/package.json +1 -8
  15. package/main/package.json +1 -8
  16. package/media/package.json +1 -8
  17. package/membership/package.json +1 -8
  18. package/mocks/package.json +1 -8
  19. package/package.json +5 -13
  20. package/permissions/package.json +1 -8
  21. package/permissions/types/package.json +1 -8
  22. package/public/package.json +1 -8
  23. package/reporting-lines-client/utils/types/package.json +1 -8
  24. package/sentry/main/package.json +1 -8
  25. package/sentry/package.json +1 -8
  26. package/sentry/types/package.json +1 -8
  27. package/slack/package.json +1 -8
  28. package/sort-teams/package.json +1 -8
  29. package/team/package.json +1 -8
  30. package/team-container/package.json +1 -8
  31. package/tenure/package.json +1 -8
  32. package/types/package.json +1 -8
  33. package/types/team/package.json +1 -8
  34. package/ufo/package.json +1 -8
  35. package/unlink-container-mutation/package.json +1 -8
  36. package/use-query-light/main/package.json +1 -8
  37. package/use-query-light/package.json +1 -8
  38. package/use-query-light/types/package.json +1 -8
  39. package/use-teams-client-setup/package.json +1 -8
  40. package/use-teams-sentry-client-setup/package.json +1 -8
  41. package/user/package.json +1 -8
  42. package/user-info-provider/main/package.json +1 -8
  43. package/user-info-provider/package.json +1 -8
  44. package/utils/package.json +1 -8
  45. package/dist/types-ts4.5/common/types.d.ts +0 -4
  46. package/dist/types-ts4.5/common/utils/ari.d.ts +0 -7
  47. package/dist/types-ts4.5/common/utils/error/index.d.ts +0 -91
  48. package/dist/types-ts4.5/common/utils/http.d.ts +0 -31
  49. package/dist/types-ts4.5/common/utils/index.d.ts +0 -2
  50. package/dist/types-ts4.5/common/utils/permissions/constants.d.ts +0 -30
  51. package/dist/types-ts4.5/common/utils/permissions/has-permission.d.ts +0 -40
  52. package/dist/types-ts4.5/common/utils/permissions/index.d.ts +0 -3
  53. package/dist/types-ts4.5/common/utils/permissions/types.d.ts +0 -31
  54. package/dist/types-ts4.5/common/utils/sort-teams.d.ts +0 -2
  55. package/dist/types-ts4.5/common/utils/status-code-handlers-provider.d.ts +0 -17
  56. package/dist/types-ts4.5/common/utils/team.d.ts +0 -5
  57. package/dist/types-ts4.5/common/utils/ufo/constants.d.ts +0 -82
  58. package/dist/types-ts4.5/common/utils/ufo/index.d.ts +0 -6
  59. package/dist/types-ts4.5/common/utils/ufo/utils.d.ts +0 -11
  60. package/dist/types-ts4.5/index.d.ts +0 -15
  61. package/dist/types-ts4.5/mocks/endpoints.d.ts +0 -22
  62. package/dist/types-ts4.5/mocks/generate-data.d.ts +0 -16
  63. package/dist/types-ts4.5/mocks/index.d.ts +0 -2
  64. package/dist/types-ts4.5/mocks/invitations.d.ts +0 -11
  65. package/dist/types-ts4.5/mocks/responses.d.ts +0 -75
  66. package/dist/types-ts4.5/mocks/team-link.d.ts +0 -7
  67. package/dist/types-ts4.5/mocks/team.d.ts +0 -14
  68. package/dist/types-ts4.5/mocks/user.d.ts +0 -15
  69. package/dist/types-ts4.5/mocks/with-faker.d.ts +0 -12
  70. package/dist/types-ts4.5/services/agg-client/index.d.ts +0 -36
  71. package/dist/types-ts4.5/services/agg-client/mocks/index.d.ts +0 -49
  72. package/dist/types-ts4.5/services/agg-client/types.d.ts +0 -13
  73. package/dist/types-ts4.5/services/agg-client/utils/mutations/unlink-container-mutation.d.ts +0 -18
  74. package/dist/types-ts4.5/services/agg-client/utils/queries/number-of-team-connected-to-container-query.d.ts +0 -11
  75. package/dist/types-ts4.5/services/agg-client/utils/queries/team-connected-to-container-query.d.ts +0 -47
  76. package/dist/types-ts4.5/services/agg-client/utils/queries/team-containers-query.d.ts +0 -52
  77. package/dist/types-ts4.5/services/agg-client/utils/queries/team-has-agents-query.d.ts +0 -15
  78. package/dist/types-ts4.5/services/agg-client/utils/queries/team-membership-query.d.ts +0 -33
  79. package/dist/types-ts4.5/services/agg-client/utils/queries/user-query.d.ts +0 -31
  80. package/dist/types-ts4.5/services/agg-client/utils/user-type.d.ts +0 -7
  81. package/dist/types-ts4.5/services/base-client/index.d.ts +0 -37
  82. package/dist/types-ts4.5/services/collaborationgraph-client/index.d.ts +0 -70
  83. package/dist/types-ts4.5/services/constants.d.ts +0 -2
  84. package/dist/types-ts4.5/services/directory-client/index.d.ts +0 -53
  85. package/dist/types-ts4.5/services/graphql-client/index.d.ts +0 -1
  86. package/dist/types-ts4.5/services/graphql-client/main.d.ts +0 -14
  87. package/dist/types-ts4.5/services/graphql-client/types.d.ts +0 -20
  88. package/dist/types-ts4.5/services/graphql-client/utils/index.d.ts +0 -3
  89. package/dist/types-ts4.5/services/hooks/use-teams-client-setup.d.ts +0 -14
  90. package/dist/types-ts4.5/services/identity-client/index.d.ts +0 -34
  91. package/dist/types-ts4.5/services/identity-client/utils.d.ts +0 -85
  92. package/dist/types-ts4.5/services/index.d.ts +0 -1
  93. package/dist/types-ts4.5/services/invitations-client/index.d.ts +0 -11
  94. package/dist/types-ts4.5/services/invitations-client/types.d.ts +0 -67
  95. package/dist/types-ts4.5/services/invitations-client/utils/index.d.ts +0 -7
  96. package/dist/types-ts4.5/services/invitations-client/utils/types.d.ts +0 -7
  97. package/dist/types-ts4.5/services/legion-client/index.d.ts +0 -164
  98. package/dist/types-ts4.5/services/legion-client/types.d.ts +0 -128
  99. package/dist/types-ts4.5/services/main.d.ts +0 -452
  100. package/dist/types-ts4.5/services/mutability-client/index.d.ts +0 -8
  101. package/dist/types-ts4.5/services/mutability-client/types.d.ts +0 -5
  102. package/dist/types-ts4.5/services/object-resolver-client/index.d.ts +0 -10
  103. package/dist/types-ts4.5/services/object-resolver-client/types.d.ts +0 -69
  104. package/dist/types-ts4.5/services/object-resolver-client/utils.d.ts +0 -18
  105. package/dist/types-ts4.5/services/perms-client/index.d.ts +0 -16
  106. package/dist/types-ts4.5/services/public-api-client/generated/data-contracts.d.ts +0 -112
  107. package/dist/types-ts4.5/services/public-api-client/index.d.ts +0 -41
  108. package/dist/types-ts4.5/services/replines-client/index.d.ts +0 -11
  109. package/dist/types-ts4.5/services/reporting-lines-client/index.d.ts +0 -11
  110. package/dist/types-ts4.5/services/reporting-lines-client/utils/queries/ReportingLinesQueryWithAccountStatus.graphql.d.ts +0 -2
  111. package/dist/types-ts4.5/services/reporting-lines-client/utils/types.d.ts +0 -32
  112. package/dist/types-ts4.5/services/rest-client/index.d.ts +0 -40
  113. package/dist/types-ts4.5/services/rest-client/utils/cookie.d.ts +0 -5
  114. package/dist/types-ts4.5/services/rest-client/utils/parse-error-message.d.ts +0 -1
  115. package/dist/types-ts4.5/services/rest-client/utils/parse-response.d.ts +0 -1
  116. package/dist/types-ts4.5/services/rest-client/utils/strip-uuid.d.ts +0 -1
  117. package/dist/types-ts4.5/services/sentry/constants.d.ts +0 -5
  118. package/dist/types-ts4.5/services/sentry/index.d.ts +0 -3
  119. package/dist/types-ts4.5/services/sentry/main.d.ts +0 -32
  120. package/dist/types-ts4.5/services/sentry/types.d.ts +0 -36
  121. package/dist/types-ts4.5/services/sentry/utils/get-sentry-config.d.ts +0 -2
  122. package/dist/types-ts4.5/services/sentry/utils/initialise-sentry.d.ts +0 -2
  123. package/dist/types-ts4.5/services/sentry/utils/sentry-client.d.ts +0 -9
  124. package/dist/types-ts4.5/services/sentry/utils/use-teams-sentry-client-setup.d.ts +0 -3
  125. package/dist/types-ts4.5/services/team-central-client/index.d.ts +0 -26
  126. package/dist/types-ts4.5/services/team-central-client/mutations/add-team-watcher.graphql.d.ts +0 -9
  127. package/dist/types-ts4.5/services/team-central-client/mutations/create-tag-mutation.graphql.d.ts +0 -12
  128. package/dist/types-ts4.5/services/team-central-client/mutations/help-pointer-create-mutation.graphql.d.ts +0 -20
  129. package/dist/types-ts4.5/services/team-central-client/mutations/help-pointer-delete-mutation.graphql.d.ts +0 -7
  130. package/dist/types-ts4.5/services/team-central-client/mutations/help-pointer-update-mutation.graphql.d.ts +0 -21
  131. package/dist/types-ts4.5/services/team-central-client/mutations/kudos-delete-mutation.graphql.d.ts +0 -10
  132. package/dist/types-ts4.5/services/team-central-client/mutations/remove-team-watcher.graphql.d.ts +0 -9
  133. package/dist/types-ts4.5/services/team-central-client/queries/is-team-watcher.graphql.d.ts +0 -8
  134. package/dist/types-ts4.5/services/team-central-client/queries/tag-list-query.graphql.d.ts +0 -24
  135. package/dist/types-ts4.5/services/team-central-client/utils.d.ts +0 -2
  136. package/dist/types-ts4.5/services/teams-in-slack-client/index.d.ts +0 -27
  137. package/dist/types-ts4.5/services/types.d.ts +0 -10
  138. package/dist/types-ts4.5/services/use-query-light/index.d.ts +0 -3
  139. package/dist/types-ts4.5/services/use-query-light/main.d.ts +0 -7
  140. package/dist/types-ts4.5/services/use-query-light/types.d.ts +0 -57
  141. package/dist/types-ts4.5/services/user-info-provider/index.d.ts +0 -1
  142. package/dist/types-ts4.5/services/user-info-provider/main.d.ts +0 -14
  143. package/dist/types-ts4.5/services/user-preferences-client/index.d.ts +0 -9
  144. package/dist/types-ts4.5/types/association.d.ts +0 -8
  145. package/dist/types-ts4.5/types/config.d.ts +0 -7
  146. package/dist/types-ts4.5/types/index.d.ts +0 -16
  147. package/dist/types-ts4.5/types/links.d.ts +0 -31
  148. package/dist/types-ts4.5/types/media.d.ts +0 -6
  149. package/dist/types-ts4.5/types/membership.d.ts +0 -35
  150. package/dist/types-ts4.5/types/slack.d.ts +0 -7
  151. package/dist/types-ts4.5/types/team-container.d.ts +0 -29
  152. package/dist/types-ts4.5/types/team.d.ts +0 -188
  153. package/dist/types-ts4.5/types/tenure.d.ts +0 -5
  154. package/dist/types-ts4.5/types/user.d.ts +0 -55
@@ -1,12 +0,0 @@
1
- import type FakerType from 'faker';
2
- import type { Team, TeamWithImageUrls, TeamWithMemberships, TeamLink } from '../types';
3
- type MockConfig = {
4
- faker: typeof FakerType;
5
- };
6
- export declare const teamsClientMocks: (config: MockConfig) => {
7
- randomBasicTeam: (customProps?: {}) => Team;
8
- randomFullTeam: (customProps?: {}) => TeamWithImageUrls;
9
- randomTeamWithMemberships: (team: TeamWithImageUrls, customProps?: {}) => TeamWithMemberships;
10
- randomTeamLinks: (n?: number, customProps?: {}) => TeamLink[];
11
- };
12
- export {};
@@ -1,36 +0,0 @@
1
- import { type MembershipState, type TeamAgentAssociation, type TeamMembership, type TeamWithMemberships } from '../../types';
2
- import { type ClientConfig } from '../base-client';
3
- import { BaseGraphQlClient } from '../graphql-client';
4
- import { type AGGPageInfoVariables, type ResultWithPageInfo } from './types';
5
- import { type UnlinkContainerMutationResponse } from './utils/mutations/unlink-container-mutation';
6
- import { type TeamsUserQueryResponse } from './utils/queries/user-query';
7
- type ContainerTypes = 'ConfluenceSpace' | 'JiraProject' | 'LoomSpace' | 'WebLink';
8
- type ContainerSubTypes = string;
9
- type TeamContainer = {
10
- id: string;
11
- type: ContainerTypes;
12
- name: string;
13
- icon?: string | null;
14
- createdDate?: Date;
15
- link?: string | null;
16
- containerTypeProperties?: {
17
- subType?: ContainerSubTypes;
18
- name?: string;
19
- };
20
- };
21
- export type TeamContainers = Array<TeamContainer>;
22
- export declare class AGGClient extends BaseGraphQlClient {
23
- constructor(baseUrl: string, config: ClientConfig);
24
- setBaseUrl(baseUrl: string): void;
25
- queryTeamMemberships(teamId: string, membershipState?: MembershipState[], pageInfo?: AGGPageInfoVariables): Promise<ResultWithPageInfo<TeamMembership>>;
26
- queryAGGUser(userId: string): Promise<TeamsUserQueryResponse>;
27
- queryTeamHasAgents(teamId: string): Promise<TeamAgentAssociation[]>;
28
- private processTeamHasAgentsResponse;
29
- getTeamContainers(teamId: string): Promise<TeamContainers>;
30
- private processV2Response;
31
- unlinkTeamContainer(teamId: string, containerId: string): Promise<UnlinkContainerMutationResponse>;
32
- queryNumberOfTeamConnectedToContainer(containerId: string): Promise<number>;
33
- queryTeamsConnectedToContainer(containerId: string): Promise<TeamWithMemberships[]>;
34
- }
35
- export declare const aggClient: AGGClient;
36
- export {};
@@ -1,49 +0,0 @@
1
- export declare const MOCK_TEAM: {
2
- team: {
3
- teamV2: {
4
- members: {
5
- edges: {
6
- node: {
7
- member: {
8
- id: string;
9
- name: string;
10
- picture: string;
11
- accountStatus: string;
12
- extendedProfile: {
13
- jobTitle: string;
14
- };
15
- };
16
- state: string;
17
- role: string;
18
- };
19
- }[];
20
- pageInfo: {
21
- hasNextPage: boolean;
22
- endCursor: string;
23
- };
24
- };
25
- };
26
- };
27
- };
28
- export declare const MOCK_USER: {
29
- user: {
30
- name: string;
31
- picture: string;
32
- accountStatus: string;
33
- __typename: string;
34
- email: string;
35
- nickname: string;
36
- locale: string;
37
- zoneinfo: string;
38
- extendedProfile: {
39
- jobTitle: string;
40
- organization: string;
41
- department: string;
42
- location: string;
43
- phoneNumbers: string;
44
- closedDate: Date;
45
- inactiveDate: Date;
46
- };
47
- id: string;
48
- };
49
- };
@@ -1,13 +0,0 @@
1
- export type AGGPageInfo = {
2
- endCursor: string | null;
3
- hasNextPage: boolean;
4
- };
5
- export type ResultWithPageInfo<T> = {
6
- edges: T[];
7
- pageInfo: AGGPageInfo;
8
- };
9
- export type AGGPageInfoVariables = {
10
- first: number;
11
- after?: string;
12
- };
13
- export declare function isResultWithPageInfo<T>(result: T[] | ResultWithPageInfo<T>): result is ResultWithPageInfo<T>;
@@ -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,47 +0,0 @@
1
- import type { UserARI } from '../../../../common/types';
2
- import type { MembershipRole, MembershipState } from '../../../../types/membership';
3
- import type { TeamMembershipSettings, TeamState } from '../../../../types/team';
4
- import type { AGGPageInfo } from '../../types';
5
- export declare const TeamConnectedToContainerQuery: string;
6
- export type TeamConnectedToContainerQueryVariables = {
7
- containerId: string;
8
- };
9
- export type TeamConnectedToContainerQueryResponse = {
10
- teamConnectedToContainerInverse: {
11
- edges: {
12
- node: {
13
- id: string;
14
- description: string;
15
- displayName: string;
16
- creator: {
17
- id: string;
18
- };
19
- smallAvatarImageUrl: string;
20
- smallHeaderImageUrl: string;
21
- largeAvatarImageUrl: string;
22
- largeHeaderImageUrl: string;
23
- members?: {
24
- nodes: {
25
- role: MembershipRole;
26
- state: MembershipState;
27
- member?: {
28
- name: string;
29
- picture: string;
30
- id: UserARI;
31
- accountStatus: 'active' | 'inactive' | 'closed';
32
- extendedProfile: {
33
- jobTitle: string | null;
34
- } | null;
35
- appType?: string | null;
36
- };
37
- }[];
38
- pageInfo: AGGPageInfo;
39
- };
40
- organizationId?: string;
41
- membershipSettings: TeamMembershipSettings;
42
- isVerified?: boolean;
43
- state: TeamState;
44
- };
45
- }[];
46
- };
47
- };
@@ -1,52 +0,0 @@
1
- export declare const TeamContainersQueryV2: string;
2
- export type TeamContainersQueryV2Variables = {
3
- cypherQuery: string;
4
- params: Record<string, any>;
5
- };
6
- export type TeamContainersQueryV2Response = {
7
- cypherQueryV2: {
8
- edges: Array<{
9
- node: {
10
- columns: Array<{
11
- key: string;
12
- value: {
13
- data?: JiraProject | ConfluenceSpace | LoomSpace;
14
- };
15
- }>;
16
- };
17
- }>;
18
- };
19
- };
20
- type JiraProject = {
21
- __typename: 'JiraProject';
22
- id: string;
23
- jiraProjectName: string;
24
- webUrl: string;
25
- created: string;
26
- avatar: {
27
- medium: string;
28
- };
29
- projectType: string;
30
- projectTypeName: string;
31
- };
32
- type ConfluenceSpace = {
33
- __typename: 'ConfluenceSpace';
34
- id: string;
35
- confluenceSpaceName?: string;
36
- type: string;
37
- createdDate: string;
38
- links: {
39
- base: string;
40
- webUi: string;
41
- };
42
- icon: {
43
- path: string;
44
- };
45
- };
46
- type LoomSpace = {
47
- __typename: 'LoomSpace';
48
- id: string;
49
- loomSpaceName: string;
50
- url: string;
51
- };
52
- export {};
@@ -1,15 +0,0 @@
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
- };
@@ -1,33 +0,0 @@
1
- import { type UserARI } from '../../../../common/types';
2
- import { type MembershipRole, type MembershipState } from '../../../../types';
3
- import { type AGGPageInfo } from '../../types';
4
- declare const TeamMembershipQuery = "query app_user_characteristics($teamId: ID!, $siteId: String!, $membershipState: [TeamMembershipState!]!, $first: Int!, $after: String) {\n team {\n teamV2(\n id: $teamId\n siteId: $siteId\n ) @optIn(to: \"Team-v2\") {\n members(state: $membershipState, first: $first, after: $after) {\n edges {\n node {\n member {\n id\n name\n picture\n accountStatus\n ... on AtlassianAccountUser {\n extendedProfile {\n jobTitle\n }\n }\n ... on AppUser {\n appType\n }\n }\n role\n state\n }\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n }";
5
- export default TeamMembershipQuery;
6
- export type TeamMembershipQueryVariables = {
7
- teamId: string;
8
- siteId: string;
9
- membershipState: MembershipState[];
10
- };
11
- export type TeamMembershipQueryResponse = {
12
- teamV2: {
13
- members: {
14
- edges: {
15
- node: {
16
- role: MembershipRole;
17
- state: MembershipState;
18
- member: {
19
- name: string;
20
- picture: string;
21
- id: UserARI;
22
- accountStatus: 'active' | 'inactive' | 'closed';
23
- extendedProfile: {
24
- jobTitle: string | null;
25
- } | null;
26
- appType?: string | null;
27
- };
28
- };
29
- }[];
30
- pageInfo: AGGPageInfo;
31
- };
32
- };
33
- };
@@ -1,31 +0,0 @@
1
- import { type UserStatus } from '../../../../types/user';
2
- export declare const TeamsUserQuery: string;
3
- export type TeamsUserQueryVariables = {
4
- userId: string;
5
- };
6
- type PhoneNumber = {
7
- type?: string;
8
- value: string;
9
- };
10
- export type TeamsUserQueryResponse = {
11
- id: string;
12
- name: string;
13
- picture: string;
14
- accountStatus: UserStatus;
15
- __typename: 'AppUser' | string;
16
- email?: string;
17
- nickname?: string;
18
- locale?: string;
19
- zoneinfo?: string;
20
- extendedProfile?: {
21
- jobTitle?: string;
22
- organization?: string;
23
- department?: string;
24
- location?: string;
25
- phoneNumbers?: PhoneNumber[];
26
- closedDate?: string;
27
- inactiveDate?: string;
28
- };
29
- appType?: string;
30
- };
31
- export {};
@@ -1,7 +0,0 @@
1
- import { type UserType } from '../../../types/user';
2
- type userTypeOptions = {
3
- isBot?: boolean;
4
- appType?: string | null;
5
- };
6
- export declare function toUserType({ isBot, appType }: userTypeOptions): UserType;
7
- 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;
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,70 +0,0 @@
1
- import { RestClient } from '../rest-client';
2
- export type UserContainerArgs = {
3
- userId: string;
4
- principalId: string;
5
- siteId: string;
6
- sessionId: string;
7
- maxNumberOfResults: number;
8
- };
9
- export type RecommendedUsersArgs = {
10
- accountId: string;
11
- cloudId: string;
12
- maxNumberOfResults?: number;
13
- filter?: string | null;
14
- expand?: 'existing' | 'all' | string;
15
- requestingUserId?: string;
16
- sessionId?: string;
17
- modelRequestParams?: {
18
- experience?: string;
19
- caller?: string;
20
- featureServiceModel?: string;
21
- };
22
- };
23
- declare enum CONTAINER_TYPE {
24
- JIRA_PROJECT = "jiraProject",
25
- CONFLUENCE_SPACE = "confluenceSpace"
26
- }
27
- declare enum ENTITY_TYPE {
28
- CONTAINER = "CONTAINER",
29
- USER = "USER"
30
- }
31
- type CollaborationGraphContainerDetails = {
32
- id: string;
33
- key: string;
34
- name: string;
35
- url: string;
36
- iconUrl: string;
37
- };
38
- type CollaborationGraphEntities = {
39
- id: string;
40
- containerType: CONTAINER_TYPE;
41
- entityType: ENTITY_TYPE;
42
- containerDetails: CollaborationGraphContainerDetails;
43
- };
44
- type UserContainerResponse = {
45
- collaborationGraphEntities: CollaborationGraphEntities[];
46
- };
47
- type CollaborationGraphUser = {
48
- id: string;
49
- expand: {
50
- name: string;
51
- picture: string;
52
- nickname: string;
53
- account_status: string;
54
- extended_profile?: {
55
- job_title?: string;
56
- organization?: string;
57
- department?: string;
58
- location?: string;
59
- };
60
- };
61
- };
62
- export type RecommendedUsersResponse = {
63
- recommendedEntities: CollaborationGraphUser[];
64
- };
65
- export declare class CollaborationGraphClient extends RestClient {
66
- getUserContainers({ userId, principalId, siteId, sessionId, maxNumberOfResults, }: UserContainerArgs): Promise<UserContainerResponse>;
67
- getRecommendedUsers({ accountId, cloudId, maxNumberOfResults, filter, expand, requestingUserId, sessionId, modelRequestParams, }: RecommendedUsersArgs): Promise<RecommendedUsersResponse>;
68
- }
69
- declare const _default_1: CollaborationGraphClient;
70
- export default _default_1;
@@ -1,2 +0,0 @@
1
- import { type TeamsClientConfig } from '../types';
2
- export declare const DEFAULT_CONFIG: TeamsClientConfig;
@@ -1,53 +0,0 @@
1
- import { type TeamMembership } from '../../types';
2
- import { type ClientConfig } from '../base-client';
3
- import { BaseGraphQlClient } from '../graphql-client';
4
- export declare const BROWSE_USER_SETTINGS_KEY = "internal.browse-users-allowed";
5
- /**
6
- * @type CloudUser
7
- * @property {string} avatarUrl
8
- * @property {string} id
9
- * @property {string} fullName
10
- * @property {string} title
11
- */
12
- export interface CloudUser {
13
- avatarUrl: string;
14
- id: string;
15
- fullName: string;
16
- title?: string;
17
- }
18
- export declare class DirectoryClient extends BaseGraphQlClient {
19
- constructor(baseUrl: string, config: ClientConfig);
20
- setBaseUrl(baseUrl: string): void;
21
- queryFeatureFlags(
22
- /**
23
- * @private
24
- * @deprecated don't need to pass param, value is taken from `this.getCloudId()` instead
25
- */
26
- cloudId: string | undefined, flags: string[]): Promise<Record<string, boolean>>;
27
- private canRetryError;
28
- /**
29
- * Get user information of all members of a team
30
- * @param {string} teamId
31
- * @returns {Promise}
32
- * @private
33
- * @deprecated use AGG instead
34
- */
35
- queryTeamMemberships(teamId: string, membershipStatus?: string[]): Promise<TeamMembership[]>;
36
- /**
37
- * Get user information of all members of a team
38
- * @param {string} userId
39
- * @returns {Promise}
40
- */
41
- queryUser(userId: string,
42
- /**
43
- * @private
44
- * @deprecated don't need to pass param, value is taken from `this.getCloudId()` instead
45
- */
46
- cloudId?: string): Promise<{
47
- CloudUser: CloudUser;
48
- }>;
49
- }
50
- /**
51
- * @deprecated As part of decommisioning pf-directoy
52
- */
53
- export declare const directoryClient: DirectoryClient;
@@ -1 +0,0 @@
1
- export { BaseGraphQlClient } from './main';
@@ -1,14 +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 and valid.
9
- * Validates the cloudId before constructing the ARI, preventing invalid
10
- * ARIs like `ari:cloud:platform::site/None` from being sent.
11
- */
12
- private createQueryContextHeaders;
13
- makeGraphQLRequest<Key extends string, Data = unknown, Variables = unknown>(body: Body<Variables>, options?: Options): Promise<ResultResponse<Key, Data>>;
14
- }
@@ -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,14 +0,0 @@
1
- /**
2
- * @deprecated use useTeamsClientSetupNext for named parameters
3
- */
4
- export declare const useTeamsClientSetup: (stargateRoot?: string, cloudId?: string | null, orgId?: string, principalUserId?: string) => void;
5
- type TeamsClientSetupProps = {
6
- stargateRoot?: string;
7
- cloudId?: string | null;
8
- orgId?: string;
9
- principalUserId?: string;
10
- };
11
- export declare const useTeamsClientSetupNext: ({ stargateRoot, cloudId, orgId, principalUserId, }: TeamsClientSetupProps) => {
12
- isClientReady: boolean;
13
- };
14
- export {};
@@ -1,34 +0,0 @@
1
- import { type EditableUserFields } from '../../types';
2
- import { RestClient } from '../rest-client';
3
- import { FieldType } from './utils';
4
- export declare class IdentityClient extends RestClient {
5
- constructor(config?: {});
6
- getUserManageConfig(userId: string): Promise<{
7
- mutabilityConstraints: {
8
- field: FieldType;
9
- reason: string | null;
10
- }[];
11
- }>;
12
- /**
13
- * @deprecated
14
- * User fetchUserAvatarInfo instead
15
- */
16
- getMyAvatarUploadedStatus(userId: string): Promise<{
17
- uploaded: boolean;
18
- url: string;
19
- }>;
20
- deleteAvatar(userId: string): Promise<unknown>;
21
- fetchUserAvatarInfo(userId: string): Promise<{
22
- uploaded: boolean;
23
- url: string;
24
- }>;
25
- updateUser({ id, ...user }: Partial<EditableUserFields> & {
26
- id: string;
27
- }): Promise<unknown>;
28
- updateUserAvatar({ id, fileURI }: {
29
- id: string;
30
- fileURI: string;
31
- }): Promise<string>;
32
- }
33
- declare const _default_1: IdentityClient;
34
- export default _default_1;