jira.js
    Preparing search index...

    Function createTeamsClient

    • Parameters

      Returns {
          externalTeams: {
              createExternalLinkedTeam: (
                  parameters: {
                      description: string;
                      externalReference: {
                          id: string;
                          source: string & {} | "ATLASSIAN_GROUP";
                          [key: string]: unknown;
                      };
                      orgId: string;
                      siteId?: string
                      | null;
                  },
                  options?: RequestOptions,
              ) => Promise<
                  {
                      creatorId?: string
                      | null;
                      description: string;
                      displayName: string;
                      externalReference?:
                          | {
                              id: string;
                              source: string & {}
                              | "ATLASSIAN_GROUP"
                              | "HRIS";
                              [key: string]: unknown;
                          }
                          | null;
                      organizationId: string;
                      state: string & {}
                      | "ACTIVE"
                      | "ARCHIVED";
                      teamId: string;
                      teamType:
                          | string & {}
                          | "EXTERNAL"
                          | "OPEN"
                          | "MEMBER_INVITE"
                          | "ORG_ADMIN_MANAGED";
                      userPermissions: {
                          ADD_MEMBERS: boolean;
                          DELETE_TEAM: boolean;
                          REMOVE_MEMBERS: boolean;
                          UPDATE_TEAM: boolean;
                          [key: string]: unknown;
                      };
                      [key: string]: unknown;
                  },
              >;
              linkTeamToExternalSource: (
                  parameters: {
                      externalReference: {
                          id: string;
                          source: string & {} | "ATLASSIAN_GROUP";
                          [key: string]: unknown;
                      };
                      orgId: string;
                      siteId?: string
                      | null;
                      teamId: string;
                  },
                  options?: RequestOptions,
              ) => Promise<void>;
              unlinkTeamsFromExternalSource: (
                  parameters: { orgId: string; teamIds: string[] },
                  options?: RequestOptions,
              ) => Promise<
                  {
                      errors: {
                          code: string;
                          message: string;
                          teamId: string;
                          [key: string]: unknown;
                      }[];
                      successfulTeamIds: string[];
                      [key: string]: unknown;
                  },
              >;
          };
          teamMembers: {
              addMembers: (
                  parameters: {
                      members: { accountId: string; [key: string]: unknown }[];
                      orgId: string;
                      teamId: string;
                  },
                  options?: RequestOptions,
              ) => Promise<
                  {
                      errors: {
                          accountId: string;
                          code: string;
                          message: string;
                          [key: string]: unknown;
                      }[];
                      members: { accountId: string; [key: string]: unknown }[];
                      [key: string]: unknown;
                  },
              >;
              fetchMembers: (
                  parameters: {
                      after?: string | null;
                      first?: number;
                      orgId: string;
                      siteId?: string;
                      teamId: string;
                  },
                  options?: RequestOptions,
              ) => Promise<
                  {
                      pageInfo: {
                          endCursor?: string
                          | null;
                          hasNextPage: boolean;
                          [key: string]: unknown;
                      };
                      results: { accountId: string; [key: string]: unknown }[];
                      [key: string]: unknown;
                  },
              >;
              removeMembers: (
                  parameters: {
                      members: { accountId: string; [key: string]: unknown }[];
                      orgId: string;
                      teamId: string;
                  },
                  options?: RequestOptions,
              ) => Promise<
                  {
                      errors: {
                          accountId: string;
                          code: string;
                          message: string;
                          [key: string]: unknown;
                      }[];
                      [key: string]: unknown;
                  },
              >;
          };
          teams: {
              archiveTeams: (
                  parameters: { orgId: string; teamIds: string[] },
                  options?: RequestOptions,
              ) => Promise<
                  {
                      errors: {
                          code: string;
                          message: string;
                          teamId: string;
                          [key: string]: unknown;
                      }[];
                      successfulTeamIds: string[];
                      [key: string]: unknown;
                  },
              >;
              createTeam: (
                  parameters: {
                      description: string;
                      displayName: string;
                      orgId: string;
                      siteId?: string | null;
                      teamType:
                          | string & {}
                          | "EXTERNAL"
                          | "OPEN"
                          | "MEMBER_INVITE"
                          | "ORG_ADMIN_MANAGED";
                  },
                  options?: RequestOptions,
              ) => Promise<
                  {
                      creatorId?: string
                      | null;
                      description: string;
                      displayName: string;
                      externalReference?:
                          | {
                              id: string;
                              source: string & {}
                              | "ATLASSIAN_GROUP"
                              | "HRIS";
                              [key: string]: unknown;
                          }
                          | null;
                      members: { accountId: string; [key: string]: unknown }[];
                      organizationId: string;
                      state: string & {} | "ACTIVE" | "ARCHIVED";
                      teamId: string;
                      teamType:
                          | string & {}
                          | "EXTERNAL"
                          | "OPEN"
                          | "MEMBER_INVITE"
                          | "ORG_ADMIN_MANAGED";
                      userPermissions: {
                          ADD_MEMBERS: boolean;
                          DELETE_TEAM: boolean;
                          REMOVE_MEMBERS: boolean;
                          UPDATE_TEAM: boolean;
                          [key: string]: unknown;
                      };
                      [key: string]: unknown;
                  },
              >;
              deleteTeam: (
                  parameters: { orgId: string; teamId: string },
                  options?: RequestOptions,
              ) => Promise<void>;
              getTeam: (
                  parameters: { orgId: string; siteId?: string; teamId: string },
                  options?: RequestOptions,
              ) => Promise<
                  {
                      creatorId?: string
                      | null;
                      description: string;
                      displayName: string;
                      externalReference?:
                          | {
                              id: string;
                              source: string & {}
                              | "ATLASSIAN_GROUP"
                              | "HRIS";
                              [key: string]: unknown;
                          }
                          | null;
                      organizationId: string;
                      state: string & {}
                      | "ACTIVE"
                      | "ARCHIVED";
                      teamId: string;
                      teamType:
                          | string & {}
                          | "EXTERNAL"
                          | "OPEN"
                          | "MEMBER_INVITE"
                          | "ORG_ADMIN_MANAGED";
                      userPermissions: {
                          ADD_MEMBERS: boolean;
                          DELETE_TEAM: boolean;
                          REMOVE_MEMBERS: boolean;
                          UPDATE_TEAM: boolean;
                          [key: string]: unknown;
                      };
                      [key: string]: unknown;
                  },
              >;
              queryTeams: (
                  parameters: {
                      cursor?: string;
                      orgId: string;
                      siteId?: string;
                      size?: number;
                  },
                  options?: RequestOptions,
              ) => Promise<
                  {
                      cursor?: string
                      | null;
                      entities: {
                          creatorId?: string | null;
                          description: string;
                          displayName: string;
                          externalReference?:
                              | {
                                  id: string;
                                  source: (...) & (...)
                                  | "ATLASSIAN_GROUP"
                                  | "HRIS";
                                  [key: string]: unknown;
                              }
                              | null;
                          organizationId: string;
                          state: string & {}
                          | "ACTIVE"
                          | "ARCHIVED";
                          teamId: string;
                          teamType:
                              | string & {}
                              | "EXTERNAL"
                              | "OPEN"
                              | "MEMBER_INVITE"
                              | "ORG_ADMIN_MANAGED";
                          [key: string]: unknown;
                      }[];
                      [key: string]: unknown;
                  },
              >;
              restoreTeam: (
                  parameters: { orgId: string; teamId: string },
                  options?: RequestOptions,
              ) => Promise<void>;
              unarchiveTeams: (
                  parameters: { orgId: string; teamIds: string[] },
                  options?: RequestOptions,
              ) => Promise<
                  {
                      errors: {
                          code: string;
                          message: string;
                          teamId: string;
                          [key: string]: unknown;
                      }[];
                      successfulTeamIds: string[];
                      [key: string]: unknown;
                  },
              >;
              updateTeam: (
                  parameters: {
                      description?: string | null;
                      displayName?: string | null;
                      orgId: string;
                      teamId: string;
                  },
                  options?: RequestOptions,
              ) => Promise<
                  {
                      creatorId?: string
                      | null;
                      description: string;
                      displayName: string;
                      externalReference?:
                          | {
                              id: string;
                              source: string & {}
                              | "ATLASSIAN_GROUP"
                              | "HRIS";
                              [key: string]: unknown;
                          }
                          | null;
                      organizationId: string;
                      state: string & {}
                      | "ACTIVE"
                      | "ARCHIVED";
                      teamId: string;
                      teamType:
                          | string & {}
                          | "EXTERNAL"
                          | "OPEN"
                          | "MEMBER_INVITE"
                          | "ORG_ADMIN_MANAGED";
                      userPermissions: {
                          ADD_MEMBERS: boolean;
                          DELETE_TEAM: boolean;
                          REMOVE_MEMBERS: boolean;
                          UPDATE_TEAM: boolean;
                          [key: string]: unknown;
                      };
                      [key: string]: unknown;
                  },
              >;
              uploadAndSetTeamCoverPhoto: (
                  parameters: {
                      file: AttachmentInput | AttachmentInput[];
                      teamId: string;
                  },
                  options?: RequestOptions,
              ) => Promise<void>;
          };
      }