@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.
- package/CHANGELOG.md +26 -0
- package/agg-client/package.json +1 -8
- package/agg-client/types/package.json +1 -8
- package/ari/package.json +1 -8
- package/association/package.json +1 -8
- package/client/package.json +1 -8
- package/config/package.json +1 -8
- package/endpoints/package.json +1 -8
- package/error/package.json +1 -8
- package/generate-data/package.json +1 -8
- package/has-permission/package.json +1 -8
- package/initialise-sentry/package.json +1 -8
- package/legion-client/package.json +1 -8
- package/links/package.json +1 -8
- package/main/package.json +1 -8
- package/media/package.json +1 -8
- package/membership/package.json +1 -8
- package/mocks/package.json +1 -8
- package/package.json +5 -13
- package/permissions/package.json +1 -8
- package/permissions/types/package.json +1 -8
- package/public/package.json +1 -8
- package/reporting-lines-client/utils/types/package.json +1 -8
- package/sentry/main/package.json +1 -8
- package/sentry/package.json +1 -8
- package/sentry/types/package.json +1 -8
- package/slack/package.json +1 -8
- package/sort-teams/package.json +1 -8
- package/team/package.json +1 -8
- package/team-container/package.json +1 -8
- package/tenure/package.json +1 -8
- package/types/package.json +1 -8
- package/types/team/package.json +1 -8
- package/ufo/package.json +1 -8
- package/unlink-container-mutation/package.json +1 -8
- package/use-query-light/main/package.json +1 -8
- package/use-query-light/package.json +1 -8
- package/use-query-light/types/package.json +1 -8
- package/use-teams-client-setup/package.json +1 -8
- package/use-teams-sentry-client-setup/package.json +1 -8
- package/user/package.json +1 -8
- package/user-info-provider/main/package.json +1 -8
- package/user-info-provider/package.json +1 -8
- package/utils/package.json +1 -8
- package/dist/types-ts4.5/common/types.d.ts +0 -4
- package/dist/types-ts4.5/common/utils/ari.d.ts +0 -7
- package/dist/types-ts4.5/common/utils/error/index.d.ts +0 -91
- package/dist/types-ts4.5/common/utils/http.d.ts +0 -31
- package/dist/types-ts4.5/common/utils/index.d.ts +0 -2
- package/dist/types-ts4.5/common/utils/permissions/constants.d.ts +0 -30
- package/dist/types-ts4.5/common/utils/permissions/has-permission.d.ts +0 -40
- package/dist/types-ts4.5/common/utils/permissions/index.d.ts +0 -3
- package/dist/types-ts4.5/common/utils/permissions/types.d.ts +0 -31
- package/dist/types-ts4.5/common/utils/sort-teams.d.ts +0 -2
- package/dist/types-ts4.5/common/utils/status-code-handlers-provider.d.ts +0 -17
- package/dist/types-ts4.5/common/utils/team.d.ts +0 -5
- package/dist/types-ts4.5/common/utils/ufo/constants.d.ts +0 -82
- package/dist/types-ts4.5/common/utils/ufo/index.d.ts +0 -6
- package/dist/types-ts4.5/common/utils/ufo/utils.d.ts +0 -11
- package/dist/types-ts4.5/index.d.ts +0 -15
- package/dist/types-ts4.5/mocks/endpoints.d.ts +0 -22
- package/dist/types-ts4.5/mocks/generate-data.d.ts +0 -16
- package/dist/types-ts4.5/mocks/index.d.ts +0 -2
- package/dist/types-ts4.5/mocks/invitations.d.ts +0 -11
- package/dist/types-ts4.5/mocks/responses.d.ts +0 -75
- package/dist/types-ts4.5/mocks/team-link.d.ts +0 -7
- package/dist/types-ts4.5/mocks/team.d.ts +0 -14
- package/dist/types-ts4.5/mocks/user.d.ts +0 -15
- package/dist/types-ts4.5/mocks/with-faker.d.ts +0 -12
- package/dist/types-ts4.5/services/agg-client/index.d.ts +0 -36
- package/dist/types-ts4.5/services/agg-client/mocks/index.d.ts +0 -49
- package/dist/types-ts4.5/services/agg-client/types.d.ts +0 -13
- 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 -47
- package/dist/types-ts4.5/services/agg-client/utils/queries/team-containers-query.d.ts +0 -52
- package/dist/types-ts4.5/services/agg-client/utils/queries/team-has-agents-query.d.ts +0 -15
- package/dist/types-ts4.5/services/agg-client/utils/queries/team-membership-query.d.ts +0 -33
- package/dist/types-ts4.5/services/agg-client/utils/queries/user-query.d.ts +0 -31
- package/dist/types-ts4.5/services/agg-client/utils/user-type.d.ts +0 -7
- package/dist/types-ts4.5/services/base-client/index.d.ts +0 -37
- package/dist/types-ts4.5/services/collaborationgraph-client/index.d.ts +0 -70
- package/dist/types-ts4.5/services/constants.d.ts +0 -2
- package/dist/types-ts4.5/services/directory-client/index.d.ts +0 -53
- 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 -14
- 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/hooks/use-teams-client-setup.d.ts +0 -14
- package/dist/types-ts4.5/services/identity-client/index.d.ts +0 -34
- package/dist/types-ts4.5/services/identity-client/utils.d.ts +0 -85
- package/dist/types-ts4.5/services/index.d.ts +0 -1
- package/dist/types-ts4.5/services/invitations-client/index.d.ts +0 -11
- package/dist/types-ts4.5/services/invitations-client/types.d.ts +0 -67
- package/dist/types-ts4.5/services/invitations-client/utils/index.d.ts +0 -7
- package/dist/types-ts4.5/services/invitations-client/utils/types.d.ts +0 -7
- package/dist/types-ts4.5/services/legion-client/index.d.ts +0 -164
- package/dist/types-ts4.5/services/legion-client/types.d.ts +0 -128
- package/dist/types-ts4.5/services/main.d.ts +0 -452
- package/dist/types-ts4.5/services/mutability-client/index.d.ts +0 -8
- package/dist/types-ts4.5/services/mutability-client/types.d.ts +0 -5
- package/dist/types-ts4.5/services/object-resolver-client/index.d.ts +0 -10
- package/dist/types-ts4.5/services/object-resolver-client/types.d.ts +0 -69
- package/dist/types-ts4.5/services/object-resolver-client/utils.d.ts +0 -18
- package/dist/types-ts4.5/services/perms-client/index.d.ts +0 -16
- package/dist/types-ts4.5/services/public-api-client/generated/data-contracts.d.ts +0 -112
- package/dist/types-ts4.5/services/public-api-client/index.d.ts +0 -41
- package/dist/types-ts4.5/services/replines-client/index.d.ts +0 -11
- package/dist/types-ts4.5/services/reporting-lines-client/index.d.ts +0 -11
- package/dist/types-ts4.5/services/reporting-lines-client/utils/queries/ReportingLinesQueryWithAccountStatus.graphql.d.ts +0 -2
- package/dist/types-ts4.5/services/reporting-lines-client/utils/types.d.ts +0 -32
- package/dist/types-ts4.5/services/rest-client/index.d.ts +0 -40
- package/dist/types-ts4.5/services/rest-client/utils/cookie.d.ts +0 -5
- package/dist/types-ts4.5/services/rest-client/utils/parse-error-message.d.ts +0 -1
- package/dist/types-ts4.5/services/rest-client/utils/parse-response.d.ts +0 -1
- package/dist/types-ts4.5/services/rest-client/utils/strip-uuid.d.ts +0 -1
- package/dist/types-ts4.5/services/sentry/constants.d.ts +0 -5
- package/dist/types-ts4.5/services/sentry/index.d.ts +0 -3
- package/dist/types-ts4.5/services/sentry/main.d.ts +0 -32
- package/dist/types-ts4.5/services/sentry/types.d.ts +0 -36
- package/dist/types-ts4.5/services/sentry/utils/get-sentry-config.d.ts +0 -2
- package/dist/types-ts4.5/services/sentry/utils/initialise-sentry.d.ts +0 -2
- package/dist/types-ts4.5/services/sentry/utils/sentry-client.d.ts +0 -9
- package/dist/types-ts4.5/services/sentry/utils/use-teams-sentry-client-setup.d.ts +0 -3
- package/dist/types-ts4.5/services/team-central-client/index.d.ts +0 -26
- package/dist/types-ts4.5/services/team-central-client/mutations/add-team-watcher.graphql.d.ts +0 -9
- package/dist/types-ts4.5/services/team-central-client/mutations/create-tag-mutation.graphql.d.ts +0 -12
- package/dist/types-ts4.5/services/team-central-client/mutations/help-pointer-create-mutation.graphql.d.ts +0 -20
- package/dist/types-ts4.5/services/team-central-client/mutations/help-pointer-delete-mutation.graphql.d.ts +0 -7
- package/dist/types-ts4.5/services/team-central-client/mutations/help-pointer-update-mutation.graphql.d.ts +0 -21
- package/dist/types-ts4.5/services/team-central-client/mutations/kudos-delete-mutation.graphql.d.ts +0 -10
- package/dist/types-ts4.5/services/team-central-client/mutations/remove-team-watcher.graphql.d.ts +0 -9
- package/dist/types-ts4.5/services/team-central-client/queries/is-team-watcher.graphql.d.ts +0 -8
- package/dist/types-ts4.5/services/team-central-client/queries/tag-list-query.graphql.d.ts +0 -24
- package/dist/types-ts4.5/services/team-central-client/utils.d.ts +0 -2
- package/dist/types-ts4.5/services/teams-in-slack-client/index.d.ts +0 -27
- package/dist/types-ts4.5/services/types.d.ts +0 -10
- package/dist/types-ts4.5/services/use-query-light/index.d.ts +0 -3
- package/dist/types-ts4.5/services/use-query-light/main.d.ts +0 -7
- package/dist/types-ts4.5/services/use-query-light/types.d.ts +0 -57
- package/dist/types-ts4.5/services/user-info-provider/index.d.ts +0 -1
- package/dist/types-ts4.5/services/user-info-provider/main.d.ts +0 -14
- package/dist/types-ts4.5/services/user-preferences-client/index.d.ts +0 -9
- package/dist/types-ts4.5/types/association.d.ts +0 -8
- package/dist/types-ts4.5/types/config.d.ts +0 -7
- package/dist/types-ts4.5/types/index.d.ts +0 -16
- package/dist/types-ts4.5/types/links.d.ts +0 -31
- package/dist/types-ts4.5/types/media.d.ts +0 -6
- package/dist/types-ts4.5/types/membership.d.ts +0 -35
- package/dist/types-ts4.5/types/slack.d.ts +0 -7
- package/dist/types-ts4.5/types/team-container.d.ts +0 -29
- package/dist/types-ts4.5/types/team.d.ts +0 -188
- package/dist/types-ts4.5/types/tenure.d.ts +0 -5
- package/dist/types-ts4.5/types/user.d.ts +0 -55
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
interface IdentityProfileData {
|
|
2
|
-
account_id: string;
|
|
3
|
-
name: string;
|
|
4
|
-
nickname: string;
|
|
5
|
-
locale: string;
|
|
6
|
-
picture: string;
|
|
7
|
-
email: string;
|
|
8
|
-
zoneinfo: string;
|
|
9
|
-
extended_profile: {
|
|
10
|
-
job_title: string;
|
|
11
|
-
organization: string;
|
|
12
|
-
department: string;
|
|
13
|
-
location: string;
|
|
14
|
-
phone_number: string;
|
|
15
|
-
about_me: string;
|
|
16
|
-
pronouns: string;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
interface IdentityProfileResponse {
|
|
20
|
-
account: IdentityProfileData;
|
|
21
|
-
}
|
|
22
|
-
export interface UserDetails {
|
|
23
|
-
id: string;
|
|
24
|
-
fullName: string;
|
|
25
|
-
nickname: string;
|
|
26
|
-
timezone: string;
|
|
27
|
-
locale: string;
|
|
28
|
-
avatarUrl: string;
|
|
29
|
-
email: string;
|
|
30
|
-
title: string;
|
|
31
|
-
companyName: string;
|
|
32
|
-
department: string;
|
|
33
|
-
location: string;
|
|
34
|
-
phoneNumber: string;
|
|
35
|
-
aboutMe: string;
|
|
36
|
-
pronouns: string;
|
|
37
|
-
localTime: ({ format }: {
|
|
38
|
-
format: string;
|
|
39
|
-
}) => string | null;
|
|
40
|
-
}
|
|
41
|
-
export type UserDetailKey = keyof UserDetails;
|
|
42
|
-
export declare const fromManageAPIResponse: (res: IdentityProfileResponse) => UserDetails | null;
|
|
43
|
-
export declare enum FieldType {
|
|
44
|
-
FullName = "fullName",
|
|
45
|
-
Nickname = "nickname",// aka `Public name`
|
|
46
|
-
Title = "title",
|
|
47
|
-
Department = "department",
|
|
48
|
-
CompanyName = "companyName",
|
|
49
|
-
Location = "location",
|
|
50
|
-
Timezone = "timezone",
|
|
51
|
-
Email = "email",
|
|
52
|
-
PhoneNumber = "phoneNumber",
|
|
53
|
-
Avatar = "picture",
|
|
54
|
-
Language = "language",
|
|
55
|
-
LocalTime = "localTime",
|
|
56
|
-
RemoteWeekdayIndex = "remoteWeekdayIndex",
|
|
57
|
-
RemoteWeekdayString = "remoteWeekdayString",
|
|
58
|
-
RemoteTimeString = "remoteTimeString"
|
|
59
|
-
}
|
|
60
|
-
type FieldKey = 'fullName' | 'nickname' | 'timezone' | 'locale' | 'title' | 'phoneNumber' | 'companyName' | 'department' | 'location' | 'email';
|
|
61
|
-
export interface SimpleConstraint {
|
|
62
|
-
allowed: boolean;
|
|
63
|
-
reason?: {
|
|
64
|
-
key: string;
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
export type MutabilityContraints = {
|
|
68
|
-
[key: string]: SimpleConstraint | MutabilityContraints;
|
|
69
|
-
};
|
|
70
|
-
export declare const MUTABILITY_DETAILS_MAP: Record<FieldKey, string>;
|
|
71
|
-
export declare const CUSTOM_FIELD_PLACE: {
|
|
72
|
-
readonly email: "email.initiateChange";
|
|
73
|
-
readonly picture: "avatar";
|
|
74
|
-
};
|
|
75
|
-
export type CustomFieldKey = keyof typeof CUSTOM_FIELD_PLACE;
|
|
76
|
-
export type AllFieldKeys = FieldKey | CustomFieldKey;
|
|
77
|
-
export declare const transformUserManageConfig: (data: MutabilityContraints) => {
|
|
78
|
-
mutabilityConstraints: {
|
|
79
|
-
field: FieldType;
|
|
80
|
-
reason: string | null;
|
|
81
|
-
}[];
|
|
82
|
-
};
|
|
83
|
-
export declare const toManageAPIInput: (input: Partial<UserDetails>) => any;
|
|
84
|
-
export declare function dataURItoFile(dataURI: string, filename?: string): Blob | File;
|
|
85
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { teamsClient, TeamsClient } from './main';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type ClientConfig } from '../base-client';
|
|
2
|
-
import { RestClient } from '../rest-client';
|
|
3
|
-
import { type AccessRequestBulkSimplified, type AccessResourcesResponse, type Capability, type Product, type RecommendationsResponse } from './types';
|
|
4
|
-
export declare class InvitationsClient extends RestClient {
|
|
5
|
-
constructor(serviceUrl: string, config: ClientConfig);
|
|
6
|
-
private getProductRecommendationsInner;
|
|
7
|
-
getProductRecommendations(supportedProducts?: Product[], capabilities?: Capability[]): Promise<RecommendationsResponse>;
|
|
8
|
-
joinOrRequestDefaultAccessToProductsBulk(simplifiedRequest: AccessRequestBulkSimplified): Promise<AccessResourcesResponse>;
|
|
9
|
-
}
|
|
10
|
-
declare const _default_1: InvitationsClient;
|
|
11
|
-
export default _default_1;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
export type ProductARI = string;
|
|
2
|
-
type RoleARI = string;
|
|
3
|
-
type StatusCode = string;
|
|
4
|
-
export type AccessRequestBulkSimplified = Omit<AccessRequestBulk, 'resources'> & {
|
|
5
|
-
productAris: ProductARI[];
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* The following types have been copied from id-invitations-service.
|
|
10
|
-
* Last updated 2023-08-07.
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
13
|
-
export type Product = 'confluence' | 'jira-core' | 'jira-servicedesk' | 'jira-software' | 'jira-incident-manager' | 'jira' | 'jira-product-discovery' | 'opsgenie' | 'statuspage' | 'avocado' | 'townsquare' | 'compass' | 'avp' | 'beacon' | 'mercury';
|
|
14
|
-
export type Capability = 'REQUEST_ACCESS' | 'DIRECT_ACCESS';
|
|
15
|
-
type UserAccessLevel = 'INTERNAL' | 'EXTERNAL' | 'INTERNAL_INACTIVE';
|
|
16
|
-
export type RecommendationMode = 'DOMAIN' | 'OPEN';
|
|
17
|
-
export type Recommendation = {
|
|
18
|
-
resourceId: ProductARI;
|
|
19
|
-
userAccessLevel: UserAccessLevel;
|
|
20
|
-
mode?: RecommendationMode;
|
|
21
|
-
roleAri: RoleARI;
|
|
22
|
-
url: string;
|
|
23
|
-
displayName?: string;
|
|
24
|
-
avatarUrl?: string;
|
|
25
|
-
};
|
|
26
|
-
export type RecommendationsResponse = {
|
|
27
|
-
capability: {
|
|
28
|
-
[K in Capability]: Recommendation[];
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
export type Role = 'org/admin' | 'product/member' | 'product/helpseeker' | 'product/external-collaborator-writer';
|
|
32
|
-
export type Resource = {
|
|
33
|
-
ari: ProductARI;
|
|
34
|
-
continueUrl?: string;
|
|
35
|
-
role: Role;
|
|
36
|
-
};
|
|
37
|
-
export type AccessMode = 'REQUEST_ACCESS' | 'DIRECT_ACCESS';
|
|
38
|
-
export type AccessRequestBulk = {
|
|
39
|
-
resources: Resource[];
|
|
40
|
-
note?: string;
|
|
41
|
-
accessMode?: AccessMode;
|
|
42
|
-
source?: string;
|
|
43
|
-
};
|
|
44
|
-
export type AccessRequestCapability = 'ACCESS_GRANTED' | 'DIRECT_ACCESS' | 'REQUEST_ACCESS' | 'ACCESS_EXISTS' | 'PENDING_REQUEST_CREATED' | 'PENDING_REQUEST_EXISTS' | 'APPROVED_REQUEST_EXISTS' | 'DENIED_REQUEST_EXISTS' | 'FORBIDDEN' | 'VERIFICATION_REQUIRED' | 'ERROR';
|
|
45
|
-
type AccessRequestCapabilityWithRole = {
|
|
46
|
-
accessMode: AccessRequestCapability;
|
|
47
|
-
role: Role;
|
|
48
|
-
};
|
|
49
|
-
type ErrorResponse = {
|
|
50
|
-
message: string;
|
|
51
|
-
responseStatus: StatusCode;
|
|
52
|
-
};
|
|
53
|
-
export type AccessResourceResponse = {
|
|
54
|
-
ari: ProductARI;
|
|
55
|
-
result: AccessRequestCapability;
|
|
56
|
-
resultsV2: {
|
|
57
|
-
[K in ProductARI]: AccessRequestCapabilityWithRole[];
|
|
58
|
-
};
|
|
59
|
-
errorReason?: ErrorResponse;
|
|
60
|
-
};
|
|
61
|
-
export type AccessResourcesResponse = AccessResourceResponse[];
|
|
62
|
-
export {};
|
|
63
|
-
/**
|
|
64
|
-
*
|
|
65
|
-
* END of copied types from id-invitations-service.
|
|
66
|
-
*
|
|
67
|
-
*/
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type RecommendationsResponse } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Removes duplicate recommendations with the same resource ARI.
|
|
4
|
-
* When a collision occurs, select the recommendation with the most desirable capability and mode.
|
|
5
|
-
* @returns a recommendation response with unique resource ARIs.
|
|
6
|
-
*/
|
|
7
|
-
export declare const removeDuplicateRecommendations: (recommendations: RecommendationsResponse) => RecommendationsResponse;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type Capability, type ProductARI, type Recommendation } from '../types';
|
|
2
|
-
export type RecommendationWithCapability = Recommendation & {
|
|
3
|
-
capability: Capability;
|
|
4
|
-
};
|
|
5
|
-
export type RecommendationsByProductAri = {
|
|
6
|
-
[key: ProductARI]: RecommendationWithCapability;
|
|
7
|
-
};
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import { type InvitedUser, type LinkOrder, type NewTeamLink, type ReadMediaTokenResponse, type Team, type TeamLink, type TeamMembership, type TeamMembershipSettings, type TeamWithImageUrls, type TeamWithMemberships } from '../../types';
|
|
2
|
-
import { type AlignmentPermission, type AssignedTeamsResponse, type AssignTeamsToSitesResponse, type ExternalReference, type LinkedTeamsBulkResponse, type LinkedTeamsProfileDetails, type OrgScope, type SoftDeletedTeam, type TeamEnabledSitesResponse, type TeamSiteAssignmentOrgDetailsResponse, type TeamsPermissionFromApi, type TeamsToBeClonedToJsmSitesResponse, type UnassignedTeamsResponse } from '../../types/team';
|
|
3
|
-
import { type ApiTeamContainerCreationPayload, type ApiTeamContainerResponse } from '../../types/team-container';
|
|
4
|
-
import { type UserInSiteUserbase } from '../../types/user';
|
|
5
|
-
import { RestClient } from '../rest-client';
|
|
6
|
-
import { type LegionAssociateAgentResponse, type LegionLinkResponseV3, type LegionLinkResponseV4, type LegionPaginatedResponse, type LegionTeamAndGroupDifferenceResponse, type OrgAlignmentStatus, type TeamStatesInBulkResponse } from './types';
|
|
7
|
-
export interface PaginationResult<T> {
|
|
8
|
-
entities: T[];
|
|
9
|
-
}
|
|
10
|
-
export interface OriginQuery {
|
|
11
|
-
/**
|
|
12
|
-
* @private
|
|
13
|
-
* @deprecated use getContext().cloudId instead
|
|
14
|
-
*/
|
|
15
|
-
cloudId?: string;
|
|
16
|
-
product?: string | null;
|
|
17
|
-
}
|
|
18
|
-
export interface SortField {
|
|
19
|
-
field: string;
|
|
20
|
-
order: 'asc' | 'desc';
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* @type AllTeamsQuery
|
|
24
|
-
* Query type for the getAllTeams API
|
|
25
|
-
* @property {string} orgId - Organization ID
|
|
26
|
-
* @property {string} cursor - Cursor to fetch the next page of results
|
|
27
|
-
* @property {number} limit - Number of teams to fetch
|
|
28
|
-
* @property {string} searchQuery - Search query to filter teams
|
|
29
|
-
* @property {string[]} memberAccountIds - List of member account IDs to filter teams
|
|
30
|
-
* @property {boolean} useDefaultSort - Whether to use the default sort order
|
|
31
|
-
* @property {boolean} showEmptyTeams - Whether to return empty teams in the search
|
|
32
|
-
* @property {string[]} teamTypeIdsFilter - List of team type IDs to filter teams
|
|
33
|
-
* @property {boolean} enablePagination - Whether the API should paginate the response
|
|
34
|
-
*/
|
|
35
|
-
export interface AllTeamsQuery {
|
|
36
|
-
/**
|
|
37
|
-
* @private
|
|
38
|
-
* @deprecated use getContext().orgId instead
|
|
39
|
-
*/
|
|
40
|
-
orgId: string;
|
|
41
|
-
cursor?: string;
|
|
42
|
-
limit?: number;
|
|
43
|
-
searchQuery?: string;
|
|
44
|
-
memberAccountIds?: string[];
|
|
45
|
-
useDefaultSort?: boolean;
|
|
46
|
-
showEmptyTeams?: boolean;
|
|
47
|
-
sortBy?: SortField[];
|
|
48
|
-
teamTypeIdsFilter?: string[];
|
|
49
|
-
enablePagination?: boolean;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* @type AllTeamsResponse
|
|
53
|
-
* Response type for the getAllTeams API
|
|
54
|
-
* @property {TeamWithMemberships[]} teams - List of teams
|
|
55
|
-
* @property {string} cursor - Cursor to fetch the next page of results
|
|
56
|
-
* @property {Error} error - Error object if the API call fails
|
|
57
|
-
*/
|
|
58
|
-
export interface AllTeamsResponse {
|
|
59
|
-
teams: TeamWithMemberships[];
|
|
60
|
-
cursor: string;
|
|
61
|
-
error?: Error;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* @type AllTeamsPayload
|
|
65
|
-
* Payload type for the getAllTeams API
|
|
66
|
-
* @property {TeamWithMemberships[]} entities - List of teams
|
|
67
|
-
* @property {string} cursor - Cursor to fetch the next page of results
|
|
68
|
-
*/
|
|
69
|
-
export interface AllTeamsPayload {
|
|
70
|
-
entities: TeamWithMemberships[];
|
|
71
|
-
cursor: string;
|
|
72
|
-
}
|
|
73
|
-
export interface LegionClient {
|
|
74
|
-
getTeamById(teamId: string): Promise<TeamWithImageUrls>;
|
|
75
|
-
updateTeamById(teamId: string, data: Partial<Team>): Promise<TeamWithImageUrls>;
|
|
76
|
-
getAllTeams(allTeamsQuery: AllTeamsQuery): Promise<AllTeamsResponse>;
|
|
77
|
-
inviteUsersToTeam(teamId: string, users: InvitedUser[], originQuery: OriginQuery): Promise<TeamMembership[]>;
|
|
78
|
-
getMyTeamMembership(teamId: string): Promise<TeamMembership>;
|
|
79
|
-
getTeamLinksByTeamId(teamId: string): Promise<{
|
|
80
|
-
entities: TeamLink[];
|
|
81
|
-
}>;
|
|
82
|
-
createTeamLink(teamId: string, link: NewTeamLink): Promise<TeamLink>;
|
|
83
|
-
updateTeamLink(teamId: string, linkId: string, newLink: NewTeamLink): Promise<TeamLink>;
|
|
84
|
-
deleteTeamLink(teamId: string, linkId: string): Promise<void>;
|
|
85
|
-
reorderTeamLink(teamId: string, linkId: string, newPosition: number): Promise<LinkOrder>;
|
|
86
|
-
acceptTeamInvitation(teamId: string): Promise<TeamMembership>;
|
|
87
|
-
declineTeamInvitation(teamId: string): Promise<void>;
|
|
88
|
-
selfJoinTeam(teamId: string, originQuery: OriginQuery): Promise<TeamMembership>;
|
|
89
|
-
cancelJoinRequest(teamId: string): Promise<void>;
|
|
90
|
-
acceptJoinRequest(teamId: string, memberId: string): Promise<TeamMembership>;
|
|
91
|
-
declineJoinRequest(teamId: string, memberId: string): Promise<void>;
|
|
92
|
-
deleteTeamMembership(teamId: string, memberId: string): Promise<TeamMembership>;
|
|
93
|
-
revokeTeamInvite(teamId: string, memberId: string): Promise<TeamMembership>;
|
|
94
|
-
deleteTeam(teamId: string): Promise<void>;
|
|
95
|
-
archiveTeam(teamId: string): Promise<TeamWithImageUrls>;
|
|
96
|
-
unArchiveTeam(teamId: string): Promise<TeamWithImageUrls>;
|
|
97
|
-
isSingleFullMemberTeam(teamId: string): Promise<boolean>;
|
|
98
|
-
createTeam(displayName: string, originQuery: OriginQuery, members?: string[], membershipSettings?: TeamMembershipSettings, typeId?: string): Promise<Team>;
|
|
99
|
-
createExternalTeam(description: string, externalReference: ExternalReference, teamName?: string, siteId?: string): Promise<Team>;
|
|
100
|
-
retrieveBrowseUserPermission(product: string): Promise<{
|
|
101
|
-
canSearchUsers: boolean;
|
|
102
|
-
}>;
|
|
103
|
-
getLinkedTeamsBulk(groupIds: string[]): Promise<LinkedTeamsBulkResponse>;
|
|
104
|
-
getTeamProfileDetails(teamId: string, siteId?: string): Promise<LinkedTeamsProfileDetails>;
|
|
105
|
-
getOrgScope(): Promise<OrgScope>;
|
|
106
|
-
getPermissions(): Promise<TeamsPermissionFromApi>;
|
|
107
|
-
restoreTeamToSyncedGroup(teamId: string, externalReference: ExternalReference): Promise<void>;
|
|
108
|
-
createTeamContainers(payload: ApiTeamContainerCreationPayload): Promise<ApiTeamContainerResponse>;
|
|
109
|
-
getTeamEnabledSites(teamId: string): Promise<TeamEnabledSitesResponse>;
|
|
110
|
-
assignTeamsToSites(migrations: {
|
|
111
|
-
teamId: string;
|
|
112
|
-
targetSite: string;
|
|
113
|
-
}[]): Promise<AssignTeamsToSitesResponse>;
|
|
114
|
-
getAssignedTeams(orgId: string, count: number, cursor?: string | null, displayNameContains?: string | null): Promise<AssignedTeamsResponse>;
|
|
115
|
-
setTeamSiteAssignmentPermission(orgId: string, alignmentPermission: AlignmentPermission): Promise<void>;
|
|
116
|
-
getUnassignedTeams(orgId: string, count: number, cursor?: string | null, query?: string | null): Promise<UnassignedTeamsResponse>;
|
|
117
|
-
getTeamSiteAssignmentOrgDetails(): Promise<TeamSiteAssignmentOrgDetailsResponse>;
|
|
118
|
-
checkOrgFullAlignmentStatus(orgId: string): Promise<OrgAlignmentStatus>;
|
|
119
|
-
getTeamStatesInBulk(orgId: string, teamIds: string[]): Promise<TeamStatesInBulkResponse>;
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* REST Client to make calls to Legion.
|
|
123
|
-
*
|
|
124
|
-
* Redirects to the instance login screen when a response returns a 401.
|
|
125
|
-
* It should probably redirect to Aa, but this is what the existing clients
|
|
126
|
-
* do so I'm going to follow suite.
|
|
127
|
-
*/
|
|
128
|
-
export declare class LegionClient extends RestClient implements LegionClient {
|
|
129
|
-
private serviceUrlRoot;
|
|
130
|
-
constructor(serviceUrl: string);
|
|
131
|
-
setRootUrl(url: string): void;
|
|
132
|
-
getOrgEligibilityForManagedTeams(): Promise<{
|
|
133
|
-
isEligible: boolean;
|
|
134
|
-
}>;
|
|
135
|
-
addAgentsToTeam(teamId: string, agents: string[]): Promise<LegionAssociateAgentResponse>;
|
|
136
|
-
removeAgentTeamAssociation(teamId: string, agentId: string): Promise<null>;
|
|
137
|
-
unlinkTeamFromGroup(teamId: string, membershipSettings: TeamMembershipSettings): Promise<void>;
|
|
138
|
-
getTeamAndGroupDiff(teamId: string, externalReference: ExternalReference): Promise<LegionTeamAndGroupDifferenceResponse>;
|
|
139
|
-
linkExistingTeamToGroup(teamId: string, externalReference: ExternalReference): Promise<void>;
|
|
140
|
-
getWriteMediaToken(): Promise<ReadMediaTokenResponse>;
|
|
141
|
-
getSoftDeletedTeamById(teamId: string): Promise<SoftDeletedTeam>;
|
|
142
|
-
/**
|
|
143
|
-
* Shoud only be used within Teams (P&T) packages
|
|
144
|
-
*/
|
|
145
|
-
getUserInSiteUserBase(userId: string): Promise<UserInSiteUserbase>;
|
|
146
|
-
getTeamsToBeClonedToJsmSites(teamsToSiteScope: {
|
|
147
|
-
teamId: string;
|
|
148
|
-
siteId: string;
|
|
149
|
-
}[]): Promise<TeamsToBeClonedToJsmSitesResponse>;
|
|
150
|
-
trimTeamARI(teamId?: string): string;
|
|
151
|
-
private constructProductOriginParams;
|
|
152
|
-
private mapTeamResponseV4ToTeam;
|
|
153
|
-
private mapTeamCreateResponseV4ToTeam;
|
|
154
|
-
private mapTeamSearchResponseV4ToTeamWithMembership;
|
|
155
|
-
mapLegionTeamLinksResponseV3ToTeamLinkResponse(response: LegionPaginatedResponse<LegionLinkResponseV3>): {
|
|
156
|
-
entities: TeamLink[];
|
|
157
|
-
};
|
|
158
|
-
mapLegionTeamLinksResponseV4ToTeamLinkResponse(response: LegionPaginatedResponse<LegionLinkResponseV4>): {
|
|
159
|
-
entities: TeamLink[];
|
|
160
|
-
};
|
|
161
|
-
mapLegionTeamLinkResponseV3ToTeamLink(legionLinkResponseV3: LegionLinkResponseV3): TeamLink;
|
|
162
|
-
mapLegionTeamLinkResponseV4ToTeamLink(legionLinkResponseV4: LegionLinkResponseV4): TeamLink;
|
|
163
|
-
}
|
|
164
|
-
export declare const defaultLegionClient: LegionClient;
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import type { TeamMembership } from '../../types/membership';
|
|
2
|
-
import type { ExternalReference, ScopeMode, TeamDiscoverability, TeamMembershipSettings, TeamPermission, TeamRestriction, TeamState } from '../../types/team';
|
|
3
|
-
export interface LegionTeamImagesResponse {
|
|
4
|
-
smallHeaderImageUrl: string;
|
|
5
|
-
largeHeaderImageUrl: string;
|
|
6
|
-
smallAvatarImageUrl: string;
|
|
7
|
-
largeAvatarImageUrl: string;
|
|
8
|
-
}
|
|
9
|
-
export interface LegionTeamMembershipResponse {
|
|
10
|
-
membership: {
|
|
11
|
-
members: TeamMembership[];
|
|
12
|
-
errors: string[];
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
export interface LegionAssociateAgentResponse {
|
|
16
|
-
agents: string[];
|
|
17
|
-
errors: {
|
|
18
|
-
accountId: string;
|
|
19
|
-
code: string;
|
|
20
|
-
message: string;
|
|
21
|
-
}[];
|
|
22
|
-
}
|
|
23
|
-
export interface LegionTeamBaseResponseV3 {
|
|
24
|
-
id: string;
|
|
25
|
-
displayName: string;
|
|
26
|
-
description: string;
|
|
27
|
-
state: TeamState;
|
|
28
|
-
membershipSettings: TeamMembershipSettings;
|
|
29
|
-
discoverable?: TeamDiscoverability;
|
|
30
|
-
organizationId?: string;
|
|
31
|
-
restriction: TeamRestriction;
|
|
32
|
-
creatorId?: string;
|
|
33
|
-
creatorDomain?: string;
|
|
34
|
-
permission?: TeamPermission;
|
|
35
|
-
}
|
|
36
|
-
export type LegionTeamGetResponseV3 = LegionTeamBaseResponseV3 & LegionTeamImagesResponse;
|
|
37
|
-
export type LegionTeamCreateResponseV3 = LegionTeamBaseResponseV3 & LegionTeamMembershipResponse;
|
|
38
|
-
export interface LegionTeamBaseResponseV4 {
|
|
39
|
-
id: string;
|
|
40
|
-
displayName: string;
|
|
41
|
-
description: string;
|
|
42
|
-
state: TeamState;
|
|
43
|
-
membershipSettings: TeamMembershipSettings;
|
|
44
|
-
organizationId: string;
|
|
45
|
-
creatorId?: string;
|
|
46
|
-
permission?: TeamPermission;
|
|
47
|
-
scopeMode: ScopeMode;
|
|
48
|
-
isVerified?: boolean;
|
|
49
|
-
externalReference?: ExternalReference;
|
|
50
|
-
}
|
|
51
|
-
export type LegionTeamGetResponseV4 = LegionTeamBaseResponseV4 & Required<LegionTeamImagesResponse>;
|
|
52
|
-
export type LegionTeamCreateResponseV4 = LegionTeamBaseResponseV4 & Required<LegionTeamMembershipResponse>;
|
|
53
|
-
export type LegionTeamAndGroupDifferenceResponse = {
|
|
54
|
-
displayNameChange: {
|
|
55
|
-
from: string;
|
|
56
|
-
to: string;
|
|
57
|
-
} | null;
|
|
58
|
-
membersToAdd: {
|
|
59
|
-
count: number;
|
|
60
|
-
memberIds: string[];
|
|
61
|
-
};
|
|
62
|
-
membersToRemove: {
|
|
63
|
-
count: number;
|
|
64
|
-
memberIds: string[];
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
export interface LegionTeamSearchResponseV3 {
|
|
68
|
-
id: string;
|
|
69
|
-
displayName: string;
|
|
70
|
-
description: string;
|
|
71
|
-
state: TeamState;
|
|
72
|
-
membershipSettings: TeamMembershipSettings;
|
|
73
|
-
discoverable?: TeamDiscoverability;
|
|
74
|
-
organizationId?: string;
|
|
75
|
-
restriction: TeamRestriction;
|
|
76
|
-
smallHeaderImageUrl: string;
|
|
77
|
-
largeHeaderImageUrl: string;
|
|
78
|
-
smallAvatarImageUrl: string;
|
|
79
|
-
largeAvatarImageUrl: string;
|
|
80
|
-
memberCount: number;
|
|
81
|
-
includesYou: boolean;
|
|
82
|
-
}
|
|
83
|
-
export interface LegionTeamSearchResponseV4 {
|
|
84
|
-
id: string;
|
|
85
|
-
displayName: string;
|
|
86
|
-
description: string;
|
|
87
|
-
state: TeamState;
|
|
88
|
-
membershipSettings: TeamMembershipSettings;
|
|
89
|
-
organizationId?: string;
|
|
90
|
-
smallHeaderImageUrl: string;
|
|
91
|
-
largeHeaderImageUrl: string;
|
|
92
|
-
smallAvatarImageUrl: string;
|
|
93
|
-
largeAvatarImageUrl: string;
|
|
94
|
-
memberCount: number;
|
|
95
|
-
includesYou: boolean;
|
|
96
|
-
isVerified?: boolean;
|
|
97
|
-
enablePagination?: boolean;
|
|
98
|
-
}
|
|
99
|
-
export interface LegionPaginatedResponse<T> {
|
|
100
|
-
entities: T[];
|
|
101
|
-
cursor: string;
|
|
102
|
-
}
|
|
103
|
-
export interface LegionLinkResponseV3 {
|
|
104
|
-
contentTitle: string;
|
|
105
|
-
description: string;
|
|
106
|
-
linkUri: string;
|
|
107
|
-
creationTime?: string;
|
|
108
|
-
linkId: string;
|
|
109
|
-
teamId?: string;
|
|
110
|
-
}
|
|
111
|
-
export interface LegionLinkResponseV4 {
|
|
112
|
-
contentTitle: string;
|
|
113
|
-
description: string;
|
|
114
|
-
linkUri: string;
|
|
115
|
-
linkId: string;
|
|
116
|
-
teamId?: string;
|
|
117
|
-
}
|
|
118
|
-
export interface OrgAlignmentStatus {
|
|
119
|
-
orgId: string;
|
|
120
|
-
scopeAligned: boolean;
|
|
121
|
-
}
|
|
122
|
-
export interface TeamStateEntry {
|
|
123
|
-
teamId: string;
|
|
124
|
-
state: TeamState;
|
|
125
|
-
}
|
|
126
|
-
export interface TeamStatesInBulkResponse {
|
|
127
|
-
teamStates: TeamStateEntry[];
|
|
128
|
-
}
|