Skip to content

Function: createTeamsClient() ​

ts
function createTeamsClient(config): object;

Defined in: src/teams/createTeamsClient.ts:45

Parameters ​

ParameterType
configTeamsClientConfig

Returns ​

object

externalTeams ​

ts
externalTeams: object;

externalTeams.createExternalLinkedTeam ​

ts
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 ​
ParameterTypeDescription
parameters{ description: string; externalReference: { id: string; source: string & object | "ATLASSIAN_GROUP"; }; orgId: string; siteId?: string | null; }-
parameters.descriptionstring-
parameters.externalReference?{ id: string; source: string & object | "ATLASSIAN_GROUP"; }-
parameters.externalReference.id?string-
parameters.externalReference.source?string & object | "ATLASSIAN_GROUP"-
parameters.orgId?stringThe 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 ​

ts
linkTeamToExternalSource: (parameters, options?) => Promise<void>;
Parameters ​
ParameterTypeDescription
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?stringThe ID of the organisation the team and external reference to be linked belongs to.
parameters.siteId?string | nullThe 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?stringThe ID of the team to be linked.
options?RequestOptions-
Returns ​

Promise<void>

externalTeams.unlinkTeamsFromExternalSource ​

ts
unlinkTeamsFromExternalSource: (parameters, options?) => Promise<{
[key: string]: unknown;
  errors: object[];
  successfulTeamIds: string[];
}>;
Parameters ​
ParameterTypeDescription
parameters{ orgId: string; teamIds: string[]; }-
parameters.orgIdstringThe 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 ​

ts
teamMembers: object;

teamMembers.addMembers ​

ts
addMembers: (parameters, options?) => Promise<{
[key: string]: unknown;
  errors: object[];
  members: object[];
}>;
Parameters ​
ParameterTypeDescription
parameters{ members: object[]; orgId: string; teamId: string; }-
parameters.membersobject[]-
parameters.orgId?stringThe ID of the organisation of the team you are adding members to.
parameters.teamId?stringThe ID of the team you are adding members to.
options?RequestOptions-
Returns ​

Promise<{ [key: string]: unknown; errors: object[]; members: object[]; }>

teamMembers.fetchMembers ​

ts
fetchMembers: (parameters, options?) => Promise<{
[key: string]: unknown;
  pageInfo: {
   [key: string]: unknown;
     endCursor?: string | null;
     hasNextPage: boolean;
  };
  results: object[];
}>;
Parameters ​
ParameterTypeDescription
parameters{ after?: string | null; first?: number; orgId: string; siteId?: string; teamId: string; }-
parameters.after?string | nullPagination cursor, only members after the cursor will be returned
parameters.first?numberMaximum number of members to be returned
parameters.orgId?stringThe 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?stringThe 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 ​

ts
removeMembers: (parameters, options?) => Promise<{
[key: string]: unknown;
  errors: object[];
}>;
Parameters ​
ParameterTypeDescription
parameters{ members: object[]; orgId: string; teamId: string; }-
parameters.membersobject[]-
parameters.orgId?stringThe ID of the organisation of the team you are removing members from.
parameters.teamId?stringThe ID of the team you are removing members from.
options?RequestOptions-
Returns ​

Promise<{ [key: string]: unknown; errors: object[]; }>

teams ​

ts
teams: object;

teams.archiveTeams ​

ts
archiveTeams: (parameters, options?) => Promise<{
[key: string]: unknown;
  errors: object[];
  successfulTeamIds: string[];
}>;
Parameters ​
ParameterTypeDescription
parameters{ orgId: string; teamIds: string[]; }-
parameters.orgIdstringThe 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 ​

ts
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 ​
ParameterTypeDescription
parameters{ description: string; displayName: string; orgId: string; siteId: string | null; teamType: | string & object | "EXTERNAL" | "OPEN" | "MEMBER_INVITE" | "ORG_ADMIN_MANAGED"; }-
parameters.descriptionstring-
parameters.displayName?string-
parameters.orgId?stringThe ID of the organisation the team is to be created under.
parameters.siteId?string | nullIf 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 ​

ts
deleteTeam: (parameters, options?) => Promise<void>;
Parameters ​
ParameterTypeDescription
parameters{ orgId: string; teamId: string; }-
parameters.orgIdstringThe ID of the organisation the team is to be deleted from.
parameters.teamId?stringThe ID of the team to be deleted.
options?RequestOptions-
Returns ​

Promise<void>

teams.getTeam ​

ts
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 ​
ParameterTypeDescription
parameters{ orgId: string; siteId?: string; teamId: string; }-
parameters.orgIdstringThe 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?stringThe 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 ​

ts
queryTeams: (parameters, options?) => Promise<{
[key: string]: unknown;
  cursor?: string | null;
  entities: object[];
}>;
Parameters ​
ParameterTypeDescription
parameters{ cursor?: string; orgId: string; siteId: string; size?: number; }-
parameters.cursor?stringAn 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?stringThe ID of the organisation the teams are to be retrieved from.
parameters.siteId?stringThe 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?numberThe 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 ​

ts
restoreTeam: (parameters, options?) => Promise<void>;
Parameters ​
ParameterTypeDescription
parameters{ orgId: string; teamId: string; }-
parameters.orgIdstringThe ID of the organisation the team belongs to
parameters.teamId?stringThe ID of the team to restore
options?RequestOptions-
Returns ​

Promise<void>

teams.unarchiveTeams ​

ts
unarchiveTeams: (parameters, options?) => Promise<{
[key: string]: unknown;
  errors: object[];
  successfulTeamIds: string[];
}>;
Parameters ​
ParameterTypeDescription
parameters{ orgId: string; teamIds: string[]; }-
parameters.orgIdstringThe 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 ​

ts
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 ​
ParameterTypeDescription
parameters{ description?: string | null; displayName?: string | null; orgId: string; teamId: string; }-
parameters.description?string | null-
parameters.displayName?string | null-
parameters.orgId?stringThe ID of the organisation the team to be updated belongs to.
parameters.teamId?stringThe 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 ​

ts
uploadAndSetTeamCoverPhoto: (parameters, options?) => Promise<void>;
Parameters ​
ParameterTypeDescription
parameters{ file: | AttachmentInput | AttachmentInput[]; teamId: string; }-
parameters.file| AttachmentInput | AttachmentInput[]-
parameters.teamId?stringThe ID of the team to be updated.
options?RequestOptions-
Returns ​

Promise<void>