Function: createTeamsClient()
function createTeamsClient(config): object;Defined in: src/teams/createTeamsClient.ts:45
Parameters
| Parameter | Type |
|---|---|
config | TeamsClientConfig |
Returns
object
externalTeams
externalTeams: object;externalTeams.createExternalLinkedTeam
createExternalLinkedTeam: (parameters, options?) => Promise<{
[key: string]: unknown;
creatorId?: string | null;
description: string;
displayName: string;
externalReference?: | {
[key: string]: unknown;
id: string;
source: string & object | "ATLASSIAN_GROUP" | "HRIS";
}
| null;
organizationId: string;
state: string & object | "ACTIVE" | "ARCHIVED";
teamId: string;
teamType: | string & object
| "EXTERNAL"
| "OPEN"
| "MEMBER_INVITE"
| "ORG_ADMIN_MANAGED";
userPermissions: {
[key: string]: unknown;
ADD_MEMBERS: boolean;
DELETE_TEAM: boolean;
REMOVE_MEMBERS: boolean;
UPDATE_TEAM: boolean;
};
}>;Parameters
| Parameter | Type | Description |
|---|---|---|
parameters | { description: string; externalReference: { id: string; source: string & object | "ATLASSIAN_GROUP"; }; orgId: string; siteId?: string | null; } | - |
parameters.description | string | - |
parameters.externalReference? | { id: string; source: string & object | "ATLASSIAN_GROUP"; } | - |
parameters.externalReference.id? | string | - |
parameters.externalReference.source? | string & object | "ATLASSIAN_GROUP" | - |
parameters.orgId? | string | The ID of the organisation the team is to be created under. |
parameters.siteId? | string | null | [Deprecated] Omitting siteId is deprecated. With the introduction of Units, orgId alone is no longer sufficient to resolve the scope of teams. Always provide a valid siteId to ensure this operation continues to work in the future. |
options? | RequestOptions | - |
Returns
Promise<{ [key: string]: unknown; creatorId?: string | null; description: string; displayName: string; externalReference?: | { [key: string]: unknown; id: string; source: string & object | "ATLASSIAN_GROUP" | "HRIS"; } | null; organizationId: string; state: string & object | "ACTIVE" | "ARCHIVED"; teamId: string; teamType: | string & object | "EXTERNAL" | "OPEN" | "MEMBER_INVITE" | "ORG_ADMIN_MANAGED"; userPermissions: { [key: string]: unknown; ADD_MEMBERS: boolean; DELETE_TEAM: boolean; REMOVE_MEMBERS: boolean; UPDATE_TEAM: boolean; }; }>
externalTeams.linkTeamToExternalSource
linkTeamToExternalSource: (parameters, options?) => Promise<void>;Parameters
| Parameter | Type | Description |
|---|---|---|
parameters | { externalReference: { id: string; source: string & object | "ATLASSIAN_GROUP"; }; orgId: string; siteId?: string | null; teamId: string; } | - |
parameters.externalReference | { id: string; source: string & object | "ATLASSIAN_GROUP"; } | - |
parameters.externalReference.id? | string | - |
parameters.externalReference.source? | string & object | "ATLASSIAN_GROUP" | - |
parameters.orgId? | string | The ID of the organisation the team and external reference to be linked belongs to. |
parameters.siteId? | string | null | The siteId to help locate the externalReference. For example, when the externalReference is a group belonging to a site. [Deprecated] Omitting siteId is deprecated. With the introduction of Units, orgId alone is no longer sufficient to resolve the scope of teams. Always provide a valid siteId to ensure this operation continues to work in the future. |
parameters.teamId? | string | The ID of the team to be linked. |
options? | RequestOptions | - |
Returns
Promise<void>
externalTeams.unlinkTeamsFromExternalSource
unlinkTeamsFromExternalSource: (parameters, options?) => Promise<{
[key: string]: unknown;
errors: object[];
successfulTeamIds: string[];
}>;Parameters
| Parameter | Type | Description |
|---|---|---|
parameters | { orgId: string; teamIds: string[]; } | - |
parameters.orgId | string | The ID of the organisation that owns the managed teams to unlink. |
parameters.teamIds? | string[] | - |
options? | RequestOptions | - |
Returns
Promise<{ [key: string]: unknown; errors: object[]; successfulTeamIds: string[]; }>
teamMembers
teamMembers: object;teamMembers.addMembers
addMembers: (parameters, options?) => Promise<{
[key: string]: unknown;
errors: object[];
members: object[];
}>;Parameters
| Parameter | Type | Description |
|---|---|---|
parameters | { members: object[]; orgId: string; teamId: string; } | - |
parameters.members | object[] | - |
parameters.orgId? | string | The ID of the organisation of the team you are adding members to. |
parameters.teamId? | string | The ID of the team you are adding members to. |
options? | RequestOptions | - |
Returns
Promise<{ [key: string]: unknown; errors: object[]; members: object[]; }>
teamMembers.fetchMembers
fetchMembers: (parameters, options?) => Promise<{
[key: string]: unknown;
pageInfo: {
[key: string]: unknown;
endCursor?: string | null;
hasNextPage: boolean;
};
results: object[];
}>;Parameters
| Parameter | Type | Description |
|---|---|---|
parameters | { after?: string | null; first?: number; orgId: string; siteId?: string; teamId: string; } | - |
parameters.after? | string | null | Pagination cursor, only members after the cursor will be returned |
parameters.first? | number | Maximum number of members to be returned |
parameters.orgId? | string | The ID of the organisation of the team you are fetching members for. |
parameters.siteId? | string | [Optional] The ID of the site you are fetching members for. [Deprecated] Omitting siteId is deprecated. With the introduction of Units, orgId alone is no longer sufficient to resolve the scope of teams. Always provide a valid siteId to ensure this operation continues to work in the future. |
parameters.teamId? | string | The ID of the team you are fetching members for. |
options? | RequestOptions | - |
Returns
Promise<{ [key: string]: unknown; pageInfo: { [key: string]: unknown; endCursor?: string | null; hasNextPage: boolean; }; results: object[]; }>
teamMembers.removeMembers
removeMembers: (parameters, options?) => Promise<{
[key: string]: unknown;
errors: object[];
}>;Parameters
| Parameter | Type | Description |
|---|---|---|
parameters | { members: object[]; orgId: string; teamId: string; } | - |
parameters.members | object[] | - |
parameters.orgId? | string | The ID of the organisation of the team you are removing members from. |
parameters.teamId? | string | The ID of the team you are removing members from. |
options? | RequestOptions | - |
Returns
Promise<{ [key: string]: unknown; errors: object[]; }>
teams
teams: object;teams.archiveTeams
archiveTeams: (parameters, options?) => Promise<{
[key: string]: unknown;
errors: object[];
successfulTeamIds: string[];
}>;Parameters
| Parameter | Type | Description |
|---|---|---|
parameters | { orgId: string; teamIds: string[]; } | - |
parameters.orgId | string | The ID of the organisation that owns the teams to archive. |
parameters.teamIds? | string[] | - |
options? | RequestOptions | - |
Returns
Promise<{ [key: string]: unknown; errors: object[]; successfulTeamIds: string[]; }>
teams.createTeam
createTeam: (parameters, options?) => Promise<{
[key: string]: unknown;
creatorId?: string | null;
description: string;
displayName: string;
externalReference?: | {
[key: string]: unknown;
id: string;
source: string & object | "ATLASSIAN_GROUP" | "HRIS";
}
| null;
members: object[];
organizationId: string;
state: string & object | "ACTIVE" | "ARCHIVED";
teamId: string;
teamType: | string & object
| "EXTERNAL"
| "OPEN"
| "MEMBER_INVITE"
| "ORG_ADMIN_MANAGED";
userPermissions: {
[key: string]: unknown;
ADD_MEMBERS: boolean;
DELETE_TEAM: boolean;
REMOVE_MEMBERS: boolean;
UPDATE_TEAM: boolean;
};
}>;Parameters
| Parameter | Type | Description |
|---|---|---|
parameters | { description: string; displayName: string; orgId: string; siteId: string | null; teamType: | string & object | "EXTERNAL" | "OPEN" | "MEMBER_INVITE" | "ORG_ADMIN_MANAGED"; } | - |
parameters.description | string | - |
parameters.displayName? | string | - |
parameters.orgId? | string | The ID of the organisation the team is to be created under. |
parameters.siteId? | string | null | If the org mandates site-scoped teams, a site ID must be provided or the operation will fail. [Deprecated] Omitting siteId is deprecated. With the introduction of Units, orgId alone is no longer sufficient to resolve the scope of teams. Always provide a valid siteId to ensure this operation continues to work in the future. |
parameters.teamType? | | string & object | "EXTERNAL" | "OPEN" | "MEMBER_INVITE" | "ORG_ADMIN_MANAGED" | - |
options? | RequestOptions | - |
Returns
Promise<{ [key: string]: unknown; creatorId?: string | null; description: string; displayName: string; externalReference?: | { [key: string]: unknown; id: string; source: string & object | "ATLASSIAN_GROUP" | "HRIS"; } | null; members: object[]; organizationId: string; state: string & object | "ACTIVE" | "ARCHIVED"; teamId: string; teamType: | string & object | "EXTERNAL" | "OPEN" | "MEMBER_INVITE" | "ORG_ADMIN_MANAGED"; userPermissions: { [key: string]: unknown; ADD_MEMBERS: boolean; DELETE_TEAM: boolean; REMOVE_MEMBERS: boolean; UPDATE_TEAM: boolean; }; }>
teams.deleteTeam
deleteTeam: (parameters, options?) => Promise<void>;Parameters
| Parameter | Type | Description |
|---|---|---|
parameters | { orgId: string; teamId: string; } | - |
parameters.orgId | string | The ID of the organisation the team is to be deleted from. |
parameters.teamId? | string | The ID of the team to be deleted. |
options? | RequestOptions | - |
Returns
Promise<void>
teams.getTeam
getTeam: (parameters, options?) => Promise<{
[key: string]: unknown;
creatorId?: string | null;
description: string;
displayName: string;
externalReference?: | {
[key: string]: unknown;
id: string;
source: string & object | "ATLASSIAN_GROUP" | "HRIS";
}
| null;
organizationId: string;
state: string & object | "ACTIVE" | "ARCHIVED";
teamId: string;
teamType: | string & object
| "EXTERNAL"
| "OPEN"
| "MEMBER_INVITE"
| "ORG_ADMIN_MANAGED";
userPermissions: {
[key: string]: unknown;
ADD_MEMBERS: boolean;
DELETE_TEAM: boolean;
REMOVE_MEMBERS: boolean;
UPDATE_TEAM: boolean;
};
}>;Parameters
| Parameter | Type | Description |
|---|---|---|
parameters | { orgId: string; siteId?: string; teamId: string; } | - |
parameters.orgId | string | The ID of the organisation the team is to be retrieved from. |
parameters.siteId? | string | [Optional] The ID of the site to retrieve teams which are site scoped. Please note that if the org is site-scoped, teams will not be included in response if siteId is not provided. [Deprecated] Omitting siteId is deprecated. With the introduction of Units, orgId alone is no longer sufficient to resolve the scope of teams. Always provide a valid siteId to ensure this operation continues to work in the future. |
parameters.teamId? | string | The ID of the team to be retrieved. |
options? | RequestOptions | - |
Returns
Promise<{ [key: string]: unknown; creatorId?: string | null; description: string; displayName: string; externalReference?: | { [key: string]: unknown; id: string; source: string & object | "ATLASSIAN_GROUP" | "HRIS"; } | null; organizationId: string; state: string & object | "ACTIVE" | "ARCHIVED"; teamId: string; teamType: | string & object | "EXTERNAL" | "OPEN" | "MEMBER_INVITE" | "ORG_ADMIN_MANAGED"; userPermissions: { [key: string]: unknown; ADD_MEMBERS: boolean; DELETE_TEAM: boolean; REMOVE_MEMBERS: boolean; UPDATE_TEAM: boolean; }; }>
teams.queryTeams
queryTeams: (parameters, options?) => Promise<{
[key: string]: unknown;
cursor?: string | null;
entities: object[];
}>;Parameters
| Parameter | Type | Description |
|---|---|---|
parameters | { cursor?: string; orgId: string; siteId: string; size?: number; } | - |
parameters.cursor? | string | An optional cursor token to fetch the next page of results. Leave empty for the first request. Callers must continue querying with the returned cursor until the cursor is null. |
parameters.orgId? | string | The ID of the organisation the teams are to be retrieved from. |
parameters.siteId? | string | The ID of the site to retrieve teams which are site scoped. Please note that if the org is site-scoped, teams will not be included in response if siteId is not provided. [Deprecated] Omitting siteId is deprecated. With the introduction of Units, orgId alone is no longer sufficient to resolve the scope of teams. Always provide a valid siteId to ensure this operation continues to work in the future. |
parameters.size? | number | The page size for the number of teams to return (max 300) |
options? | RequestOptions | - |
Returns
Promise<{ [key: string]: unknown; cursor?: string | null; entities: object[]; }>
teams.restoreTeam
restoreTeam: (parameters, options?) => Promise<void>;Parameters
| Parameter | Type | Description |
|---|---|---|
parameters | { orgId: string; teamId: string; } | - |
parameters.orgId | string | The ID of the organisation the team belongs to |
parameters.teamId? | string | The ID of the team to restore |
options? | RequestOptions | - |
Returns
Promise<void>
teams.unarchiveTeams
unarchiveTeams: (parameters, options?) => Promise<{
[key: string]: unknown;
errors: object[];
successfulTeamIds: string[];
}>;Parameters
| Parameter | Type | Description |
|---|---|---|
parameters | { orgId: string; teamIds: string[]; } | - |
parameters.orgId | string | The ID of the organisation that owns the teams to unarchive. |
parameters.teamIds? | string[] | - |
options? | RequestOptions | - |
Returns
Promise<{ [key: string]: unknown; errors: object[]; successfulTeamIds: string[]; }>
teams.updateTeam
updateTeam: (parameters, options?) => Promise<{
[key: string]: unknown;
creatorId?: string | null;
description: string;
displayName: string;
externalReference?: | {
[key: string]: unknown;
id: string;
source: string & object | "ATLASSIAN_GROUP" | "HRIS";
}
| null;
organizationId: string;
state: string & object | "ACTIVE" | "ARCHIVED";
teamId: string;
teamType: | string & object
| "EXTERNAL"
| "OPEN"
| "MEMBER_INVITE"
| "ORG_ADMIN_MANAGED";
userPermissions: {
[key: string]: unknown;
ADD_MEMBERS: boolean;
DELETE_TEAM: boolean;
REMOVE_MEMBERS: boolean;
UPDATE_TEAM: boolean;
};
}>;Parameters
| Parameter | Type | Description |
|---|---|---|
parameters | { description?: string | null; displayName?: string | null; orgId: string; teamId: string; } | - |
parameters.description? | string | null | - |
parameters.displayName? | string | null | - |
parameters.orgId? | string | The ID of the organisation the team to be updated belongs to. |
parameters.teamId? | string | The ID of the team to be updated. |
options? | RequestOptions | - |
Returns
Promise<{ [key: string]: unknown; creatorId?: string | null; description: string; displayName: string; externalReference?: | { [key: string]: unknown; id: string; source: string & object | "ATLASSIAN_GROUP" | "HRIS"; } | null; organizationId: string; state: string & object | "ACTIVE" | "ARCHIVED"; teamId: string; teamType: | string & object | "EXTERNAL" | "OPEN" | "MEMBER_INVITE" | "ORG_ADMIN_MANAGED"; userPermissions: { [key: string]: unknown; ADD_MEMBERS: boolean; DELETE_TEAM: boolean; REMOVE_MEMBERS: boolean; UPDATE_TEAM: boolean; }; }>
teams.uploadAndSetTeamCoverPhoto
uploadAndSetTeamCoverPhoto: (parameters, options?) => Promise<void>;Parameters
| Parameter | Type | Description |
|---|---|---|
parameters | { file: | AttachmentInput | AttachmentInput[]; teamId: string; } | - |
parameters.file | | AttachmentInput | AttachmentInput[] | - |
parameters.teamId? | string | The ID of the team to be updated. |
options? | RequestOptions | - |
Returns
Promise<void>