///
///
///
import { AxiosInstance, AxiosRequestConfig } from "axios";
import { Agent } from "https";
import { components, operations as cloudOperations } from "./generated/openapi-cloud";
import { operations } from "./generated/openapi-software";
import { BinaryLike } from "node:crypto";
export interface MakeUrlParams {
pathname?: string;
query?: Record;
intermediatePath?: string;
encode?: boolean;
}
export type WithStrictSSL = {
strictSSL?: boolean;
ca?: string;
axios?: undefined;
};
export type WithAxios = {
axios?: AxiosInstance;
strictSSL?: undefined;
ca?: undefined;
};
export type AxiosOrStrict = WithStrictSSL | WithAxios;
export type JiraApiOptions = {
protocol?: "http" | "https";
host: string;
port?: number;
apiVersion?: 1 | 2 | 3;
base?: string;
intermediatePath?: string;
webHookVersion?: string;
baseOptions?: AxiosRequestConfig;
bearer?: string;
timeout?: number;
username?: string;
password?: string;
} & AxiosOrStrict;
export type PaginationParams = {
startAt?: number;
maxResults?: number;
fields?: string[];
expand?: string[];
};
/**
* Wrapper for the JIRA Rest Api
* https://docs.atlassian.com/jira/REST/6.4.8/
*/
export declare class JiraApi {
protocol: string;
host: string;
port?: number;
apiVersion: number;
base: string;
intermediatePath?: string;
axios: AxiosInstance;
httpsAgent?: Agent;
webhookVersion: string;
baseOptions: AxiosRequestConfig;
/**
* Construct a new JiraApi
* @constructor
* @param {JiraApiOptions} options
*/
constructor(options: JiraApiOptions);
/**
* Creates a requestOptions object based on the default template for one
* @param url
* @param options an object containing fields and formatting how the
*/
makeRequestHeader(url: string, options?: AxiosRequestConfig): AxiosRequestConfig;
/**
* Creates a URI object for a given pathname
* @param [options] - an object containing path information
*/
makeUri({ pathname, query, intermediatePath }: MakeUrlParams): string;
/**
* Creates a URI object for a given pathName
* @param [options] - An options object specifying uri information
*/
makeWebhookUri({ pathname }: {
pathname?: string;
}): string;
/**
* Creates a URI object for a given pathname
* /rest/dev-status/latest/issue/detail section
*/
makeDevStatusUri({ pathname, query, }: {
pathname?: string;
query?: Record;
}): string;
/**
* Creates a URI object for a given pathname
* @param object
*/
makeAgileUri(object: MakeUrlParams): string;
doRequest(requestOptions: AxiosRequestConfig): Promise;
doRawRequest(requestOptions: AxiosRequestConfig): Promise>;
/**
* Find an issue in jira
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#id290709)
* @param issueNumber - The issue number to search for including the project key
* @param expand - The resource expansion to return additional fields in the response
* @param fields - Comma separated list of field ids or keys to retrieve
* @param properties - Comma separated list of properties to retrieve
* @param fieldsByKeys - False by default, used to retrieve fields by key instead of id
*/
findIssue(issueNumber: string, expand?: string, fields?: string, properties?: string, fieldsByKeys?: boolean): Promise;
/**
* Download an avatar
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#id290709)
* @param ownerId
* @param avatarId - The avatar to download
*/
downloadUserAvatar(ownerId: string, avatarId: number): Promise<{
mimeType: string;
content: Buffer;
}>;
/**
* Download an avatar
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#id290709)
* @param avatarType
* @param avatarId - The avatar to download
*/
downloadAvatar(avatarType: string, avatarId: number): Promise<{
mimeType: string;
content: Buffer;
}>;
/**
* Download an attachment
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#id288524)
* @param attachment - the attachment
*/
downloadAttachment(attachment: {
id: string;
filename: string;
}): Promise;
/**
* Remove the attachment
* [Jira Doc](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments/#api-rest-api-3-attachment-id-delete)
* @param attachmentId - the attachment id
*/
deleteAttachment(attachmentId: string): Promise;
/**
* Get the unresolved issue count
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#id288524)
* @param version - the version of your product you want to find the unresolved
* issues of.
*/
getUnresolvedIssueCount(version: string): Promise;
/**
* Get the Project by project key
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#id289232)
* @param project - key for the project
*/
getProject(project: string): Promise;
/**
* Create a new Project
* [Jira Doc](https://docs.atlassian.com/jira/REST/latest/#api/2/project-createproject: string)
* @param project - with specs
*/
createProject(project: string): Promise;
/** Get the issues for a board / sprint
* @param boardId
* @param sprintId - the id for the sprint
*/
getSprintIssues(boardId: string, sprintId: string): Promise<{
expand?: string | undefined;
issues?: readonly {
changelog?: {
histories?: readonly {
author?: {
accountId?: string | undefined;
accountType?: string | undefined;
active?: boolean | undefined;
avatarUrls?: {
"16x16"?: string | undefined;
"24x24"?: string | undefined;
"32x32"?: string | undefined;
"48x48"?: string | undefined;
} | undefined;
displayName?: string | undefined;
emailAddress?: string | undefined;
key?: string | undefined;
name?: string | undefined;
self?: string | undefined;
timeZone?: string | undefined;
} | undefined;
created?: string | undefined;
historyMetadata?: {
[key: string]: unknown;
activityDescription?: string | undefined;
activityDescriptionKey?: string | undefined;
actor?: {
[key: string]: unknown;
avatarUrl?: string | undefined;
displayName?: string | undefined;
displayNameKey?: string | undefined;
id?: string | undefined;
type?: string | undefined;
url?: string | undefined;
} | undefined;
cause?: {
[key: string]: unknown;
avatarUrl?: string | undefined;
displayName?: string | undefined;
displayNameKey?: string | undefined;
id?: string | undefined;
type?: string | undefined;
url?: string | undefined;
} | undefined;
description?: string | undefined;
descriptionKey?: string | undefined;
emailDescription?: string | undefined;
emailDescriptionKey?: string | undefined;
extraData?: {
[key: string]: string;
} | undefined;
generator?: {
[key: string]: unknown;
avatarUrl?: string | undefined;
displayName?: string | undefined;
displayNameKey?: string | undefined;
id?: string | undefined;
type?: string | undefined;
url?: string | undefined;
} | undefined;
type?: string | undefined;
} | undefined;
id?: string | undefined;
items?: readonly {
field?: string | undefined;
fieldId?: string | undefined;
fieldtype?: string | undefined;
from?: string | undefined;
fromString?: string | undefined;
to?: string | undefined;
toString?: string | undefined;
}[] | undefined;
}[] | undefined;
maxResults?: number | undefined;
startAt?: number | undefined;
total?: number | undefined;
} | undefined;
editmeta?: {
fields?: {
[key: string]: {
allowedValues?: readonly unknown[] | undefined;
autoCompleteUrl?: string | undefined;
configuration?: {
[key: string]: unknown;
} | undefined;
defaultValue?: unknown;
hasDefaultValue?: boolean | undefined;
key: string;
name: string;
operations: readonly string[];
required: boolean;
schema: {
configuration?: {
[key: string]: unknown;
} | undefined;
custom?: string | undefined;
customId?: number | undefined;
items?: string | undefined;
system?: string | undefined;
type: string;
};
};
} | undefined;
} | undefined;
expand?: string | undefined;
fields?: {
[key: string]: unknown;
} | undefined;
fieldsToInclude?: {
actuallyIncluded?: string[] | undefined;
excluded?: string[] | undefined;
included?: string[] | undefined;
} | undefined;
id?: string | undefined;
key?: string | undefined;
names?: {
[key: string]: string;
} | undefined;
operations?: {
[key: string]: unknown;
linkGroups?: readonly {
groups?: any[] | undefined;
header?: {
href?: string | undefined;
iconClass?: string | undefined;
id?: string | undefined;
label?: string | undefined;
styleClass?: string | undefined;
title?: string | undefined;
weight?: number | undefined;
} | undefined;
id?: string | undefined;
links?: {
href?: string | undefined;
iconClass?: string | undefined;
id?: string | undefined;
label?: string | undefined;
styleClass?: string | undefined;
title?: string | undefined;
weight?: number | undefined;
}[] | undefined;
styleClass?: string | undefined;
weight?: number | undefined;
}[] | undefined;
} | undefined;
properties?: {
[key: string]: unknown;
} | undefined;
renderedFields?: {
[key: string]: unknown;
} | undefined;
schema?: {
[key: string]: {
configuration?: {
[key: string]: unknown;
} | undefined;
custom?: string | undefined;
customId?: number | undefined;
items?: string | undefined;
system?: string | undefined;
type: string;
};
} | undefined;
self?: string | undefined;
transitions?: readonly {
[key: string]: unknown;
expand?: string | undefined;
fields?: {
[key: string]: {
allowedValues?: readonly unknown[] | undefined;
autoCompleteUrl?: string | undefined;
configuration?: {
[key: string]: unknown;
} | undefined;
defaultValue?: unknown;
hasDefaultValue?: boolean | undefined;
key: string;
name: string;
operations: readonly string[];
required: boolean;
schema: {
configuration?: {
[key: string]: unknown;
} | undefined;
custom?: string | undefined;
customId?: number | undefined;
items?: string | undefined;
system?: string | undefined;
type: string;
};
};
} | undefined;
hasScreen?: boolean | undefined;
id?: string | undefined;
isAvailable?: boolean | undefined;
isConditional?: boolean | undefined;
isGlobal?: boolean | undefined;
isInitial?: boolean | undefined;
looped?: boolean | undefined;
name?: string | undefined;
to?: {
[key: string]: unknown;
description?: string | undefined;
iconUrl?: string | undefined;
id?: string | undefined;
name?: string | undefined;
scope?: {
[key: string]: unknown;
project?: {
avatarUrls?: {
"16x16"?: string | undefined;
"24x24"?: string | undefined;
"32x32"?: string | undefined;
"48x48"?: string | undefined;
} | undefined;
id?: string | undefined;
key?: string | undefined;
name?: string | undefined;
projectCategory?: {
description?: string | undefined;
id?: string | undefined;
name?: string | undefined;
self?: string | undefined;
} | undefined;
projectTypeKey?: "software" | "service_desk" | "business" | undefined;
self?: string | undefined;
simplified?: boolean | undefined;
} | undefined;
type?: "PROJECT" | "TEMPLATE" | undefined;
} | undefined;
self?: string | undefined;
statusCategory?: {
[key: string]: unknown;
colorName?: string | undefined;
id?: number | undefined;
key?: string | undefined;
name?: string | undefined;
self?: string | undefined;
} | undefined;
} | undefined;
}[] | undefined;
versionedRepresentations?: {
[key: string]: {
[key: string]: unknown;
};
} | undefined;
}[] | undefined;
maxResults?: number | undefined;
names?: {
[key: string]: string;
} | undefined;
schema?: {
[key: string]: {
configuration?: {
[key: string]: unknown;
} | undefined;
custom?: string | undefined;
customId?: number | undefined;
items?: string | undefined;
system?: string | undefined;
type: string;
};
} | undefined;
startAt?: number | undefined;
total?: number | undefined;
warningMessages?: readonly string[] | undefined;
}>;
/** Get a list of Sprints belonging to a Rapid View
* @param boardId - the id for the rapid view
*/
listSprints(boardId: string): Promise;
/** Get details about a Sprint
* @param sprintId - the id for the sprint view
*/
getSprint(sprintId: string): Promise;
/** Add an issue to the project's current sprint
* @param issueId - the id of the existing issue
* @param sprintId - the id of the sprint to add it to
*/
addIssueToSprint(issueId: string, sprintId: string): Promise;
/** Create an issue link between two issues
* @param link - a link object formatted how the Jira API specifies
*/
issueLink(link: components["schemas"]["RemoteIssueLinkRequest"]): Promise;
/**
* List all issue link types jira knows about
*
* [Jira Doc](https://docs.atlassian.com/software/jira/docs/api/REST/8.5.0/#api/2/issueLinkType-getIssueLinkTypes)
*/
listIssueLinkTypes(): Promise;
/**
* Retrieves the remote links associated with the given issue.
*
* @param issueNumber - the issue number to find remote links for.
*/
getRemoteLinks(issueNumber: string): Promise;
/**
* Creates a remote link associated with the given issue.
* @param issueNumber - The issue number to create the remotelink under
* @param remoteLink - the remotelink object as specified by the Jira API
*/
createRemoteLink(issueNumber: string, remoteLink: components["schemas"]["RemoteIssueLinkRequest"]): Promise;
/**
* Delete a remote link with given issueNumber and id
* @param issueNumber - The issue number to delete the remotelink under
* @param id the remotelink id
*/
deleteRemoteLink(issueNumber: string, id: string): Promise;
/** Get Versions for a project
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#id289653)
* @param project - A project key to get versions for
* @param query - An object containing the query params
*/
getVersions(project: string, query?: Partial>): Promise;
/** Get details of single Version in project
* [Jira Doc](https://docs.atlassian.com/jira/REST/cloud/#api/2/version-getVersion)
* @param version - The id of this version
*/
getVersion(version: string): Promise;
/** Create a version
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#id288232)
* @param version - an object of the new version
*/
createVersion(version: components["schemas"]["Version"]): Promise;
/** Update a version
* [Jira Doc](https://docs.atlassian.com/jira/REST/latest/#d2e510)
* @param version - a new object of the version to update
*/
updateVersion(version: components["schemas"]["Version"]): Promise;
/** Delete a version
* [Jira Doc](https://docs.atlassian.com/jira/REST/latest/#api/2/version-delete)
* @param versionId - the ID of the version to delete
* @param moveFixIssuesToId - when provided, existing fixVersions will be moved
* to this ID. Otherwise, the deleted version will be removed from all
* issue fixVersions.
* @param moveAffectedIssuesToId - when provided, existing affectedVersions will
* be moved to this ID. Otherwise, the deleted version will be removed
* from all issue affectedVersions.
*/
deleteVersion(versionId: string, moveFixIssuesToId: string, moveAffectedIssuesToId: string): Promise;
/** Move version
* [Jira Doc](https://docs.atlassian.com/jira/REST/cloud/#api/2/version-moveVersion)
* @param versionId - the ID of the version to delete
* @param position - an object of the new position
*/
moveVersion(versionId: string, position: components["schemas"]["VersionMoveBean"]): Promise;
/** Pass a search query to Jira
* [Jira Doc](https://docs.atlassian.com/jira/REST/latest/#d2e4424)
* @param searchString - jira query string in JQL
* @param optional - object containing any of the pagination properties
*/
searchJira(searchString: string, optional: PaginationParams): Promise;
/** Create a Jira user
* [Jira Doc](https://docs.atlassian.com/jira/REST/cloud/#api/2/user-createUser)
* @param user - Properly Formatted User object
*/
createUser(user: components["schemas"]["NewUserDetails"]): Promise;
/**
* Search user on Jira
*
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#d2e3756)
*/
searchUsers(parameters: cloudOperations["findUsers"]["parameters"]["query"]): Promise;
/** Get all users in group on Jira
* @param groupname - A query string used to search users in group
* @param [startAt=0] - The index of the first user to return (0-based)
* @param [maxResults=50] - The maximum number of users to return (defaults to 50).
* @deprecated
*/
getUsersInGroup(groupname: string, startAt?: number, maxResults?: number): Promise;
/** Get all members of group on Jira
* @param groupname - A query string used to search users in group
* @param [startAt=0] - The index of the first user to return (0-based)
* @param [maxResults=50] - The maximum number of users to return (defaults to 50).
* @param [includeInactiveUsers=false] - Fetch inactive users too (defaults to false).
*/
getMembersOfGroup(groupname: string, startAt?: number, maxResults?: number, includeInactiveUsers?: boolean): Promise;
/** Get issues related to a user
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#id296043)
* @param username - username of user to search for
* @param open - determines if only open issues should be returned
*/
getUsersIssues(username: string, open: boolean): Promise;
/** Returns a user.
* [Jira Doc](https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-user-get)
* @param accountId - The accountId of user to search for
* @param expand - The expand for additional info (groups,applicationRoles)
*/
getUser(accountId: string, expand?: string[]): Promise;
/** Returns a list of all (active and inactive) users.
* [Jira Doc](https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-users-search-get)
* @param [startAt=0] - The index of the first user to return (0-based)
* @param [maxResults=50] - The maximum number of users to return (defaults to 50).
*/
getUsers(startAt?: number, maxResults?: number): Promise;
/** Add issue to Jira
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#id290028)
*/
addNewIssue(issue: components["schemas"]["IssueUpdateDetails"]): Promise;
/** Add a user as a watcher on an issue
* @param issueKey - the key of the existing issue
* @param username - the jira username to add as a watcher to the issue
*/
addWatcher(issueKey: string, username: string): Promise;
/** Change an assignee on an issue
* [Jira Doc](https://docs.atlassian.com/jira/REST/cloud/#api/2/issue-assign)
* @param issueKey - the key of the existing issue
* @param assigneeName - the jira username to add as a new assignee to the issue
*/
updateAssignee(issueKey: string, assigneeName: string): Promise;
/** Change an assignee on an issue
* [Jira Doc](https://developer.atlassian.com/cloud/jira/platform/rest/v2/#api-rest-api-2-issue-issueIdOrKey-assignee-put)
* @param issueKey - the key of the existing issue
* @param userId - the jira username to add as a new assignee to the issue
*/
updateAssigneeWithId(issueKey: string, userId: string): Promise;
/** Delete issue from Jira
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#id290791)
* @param issueId - the Id of the issue to delete
*/
deleteIssue(issueId: string): Promise;
/** Update issue in Jira
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#id290878)
* @param issueId - the Id of the issue to update
* @param issueUpdate - update Object as specified by the rest api
* @param query - adds parameters to the query string
*/
updateIssue(issueId: string, issueUpdate: components["schemas"]["IssueUpdateDetails"], query?: cloudOperations["editIssue"]["parameters"]["query"]): Promise;
/** Get issue edit metadata
* [Jira Doc](https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/issue-getEditIssueMeta)
* @param issueId - the Id of the issue to retrieve edit metadata for
*/
issueEditMeta(issueId: string): Promise;
/** List Components
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#id290489)
* @param project - key for the project
*/
listComponents(project: string): Promise;
/** Add component to Jira
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#id290028)
* @param component - Properly Formatted Component
*/
addNewComponent(component: components["schemas"]["ProjectComponent"]): Promise;
/** Update Jira component
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#api/2/component-updatecomponent: string)
* @param componentId - the Id of the component to update
* @param component - Properly Formatted Component
*/
updateComponent(componentId: string, component: components["schemas"]["ProjectComponent"]): Promise;
/** Delete component from Jira
* [Jira Doc](https://developer.atlassian.com/cloud/jira/platform/rest/v2/#api-api-2-component-id-delete)
* @param id - The ID of the component.
* @param moveIssuesTo - The ID of the component to replace the deleted component.
* If this value is null no replacement is made.
*/
deleteComponent(id: string, moveIssuesTo: string): Promise;
/** Get count of issues assigned to the component.
* [Jira Doc](https://developer.atlassian.com/cloud/jira/platform/rest/v2/#api-rest-api-2-component-id-relatedIssueCounts-get)
* @param id - Component Id.
*/
relatedIssueCounts(id: string): Promise;
/** Create custom Jira field
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#api/2/field-createCustomField)
* @param field - Properly formatted Field object
*/
createCustomField(field: components["schemas"]["CustomFieldDefinitionJsonBean"]): Promise;
/** List all fields custom and not that jira knows about.
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#id290489)
*/
listFields(): Promise<{
clauseNames?: string[] | undefined;
custom?: boolean | undefined;
id?: string | undefined;
key?: string | undefined;
name?: string | undefined;
navigable?: boolean | undefined;
orderable?: boolean | undefined;
schema?: {
configuration?: {
[key: string]: unknown;
} | undefined;
custom?: string | undefined;
customId?: number | undefined;
items?: string | undefined;
system?: string | undefined;
type: string;
} | undefined;
scope?: {
[key: string]: unknown;
project?: {
avatarUrls?: {
"16x16"?: string | undefined;
"24x24"?: string | undefined;
"32x32"?: string | undefined;
"48x48"?: string | undefined;
} | undefined;
id?: string | undefined;
key?: string | undefined;
name?: string | undefined;
projectCategory?: {
description?: string | undefined;
id?: string | undefined;
name?: string | undefined;
self?: string | undefined;
} | undefined;
projectTypeKey?: "software" | "service_desk" | "business" | undefined;
self?: string | undefined;
simplified?: boolean | undefined;
} | undefined;
type?: "PROJECT" | "TEMPLATE" | undefined;
} | undefined;
searchable?: boolean | undefined;
}[]>;
/** Add an option for a select list issue field.
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#api/2/field/{fieldKey}/option-createOption)
* @param fieldKey - the key of the select list field
* @param option - properly formatted Option object
*/
createFieldOption(fieldKey: string, option: components["schemas"]["IssueFieldOptionCreateBean"]): Promise;
/** Returns all options defined for a select list issue field.
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#api/2/field/{fieldKey}/option-getAllOptions)
* @param fieldKey - the key of the select list field
*/
listFieldOptions(fieldKey: string): Promise;
/** Creates or updates an option for a select list issue field.
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#api/2/field/{fieldKey}/option-putOption)
* @param fieldKey - the key of the select list field
* @param optionId - the id of the modified option
* @param option - properly formatted Option object
*/
upsertFieldOption(fieldKey: string, optionId: string, option: components["schemas"]["IssueFieldOption"]): Promise;
/** Returns an option for a select list issue field.
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#api/2/field/{fieldKey}/option-getOption)
* @param fieldKey - the key of the select list field
* @param optionId - the id of the option
*/
getFieldOption(fieldKey: string, optionId: string): Promise;
/** Deletes an option from a select list issue field.
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#api/2/field/{fieldKey}/option-delete)
* @param fieldKey - the key of the select list field
* @param optionId - the id of the deleted option
*/
deleteFieldOption(fieldKey: string, optionId: string): Promise;
/**
* Get Property of Issue by Issue and Property Id
* [Jira Doc](https://docs.atlassian.com/jira/REST/cloud/#api/2/issue/{issueIdOrKey}/properties-getProperty)
* @param issueNumber - The issue number to search for including the project key
* @param property - The property key to search for
*/
getIssueProperty(issueNumber: string, property: string): Promise;
/**
* List all changes for an issue, sorted by date, starting from the latest
* [Jira Doc](https://docs.atlassian.com/jira/REST/cloud/#api/2/issue/{issueIdOrKey}/changelog)
* @param issueNumber - The issue number to search for including the project key
* @param [startAt=0] - optional starting index number
* @param [maxResults=50] - optional ending index number
*/
getIssueChangelog(issueNumber: string, startAt?: number, maxResults?: number): Promise;
/**
* List all watchers for an issue
* [Jira Doc](http://docs.atlassian.com/jira/REST/cloud/#api/2/issue-getIssueWatchers)
* @param issueNumber - The issue number to search for including the project key
*/
getIssueWatchers(issueNumber: string): Promise;
/** List all priorities jira knows about
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#id290489)
*/
listPriorities(): Promise;
/** List Transitions for a specific issue that are available to the current user
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#id290489)
* @param issueId - get transitions available for the issue
*/
listTransitions(issueId: string): Promise;
/** Transition issue in Jira
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#id290489)
* @param issueId - the Id of the issue to delete
* @param issueTransition - transition object from the jira rest API
*/
transitionIssue(issueId: string, issueTransition: components["schemas"]["IssueUpdateDetails"]): Promise;
/** List all Viewable Projects
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#id289193)
*/
listProjects(): Promise;
/** Add a comment to an issue
* [Jira Doc](https://docs.atlassian.com/jira/REST/latest/#id108798)
* @param issueId - Issue to add a comment to
* @param comment - string containing comment
*/
addComment(issueId: string, comment: components["schemas"]["Comment"]): Promise;
/** Update comment for an issue
* [Jira Doc](https://docs.atlassian.com/jira/REST/cloud/#api/2/issue-updateComment)
* @param issueId - Issue with the comment
* @param commentId - Comment that is updated
* @param comment - string containing new comment
* @param [options={}] - extra options
*/
updateComment(issueId: string, commentId: string, comment: components["schemas"]["Comment"], options?: cloudOperations["updateComment"]["parameters"]["query"]): Promise;
/**
* Get Comments by IssueId.
* [Jira Doc](https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-comment-list-post)
* @param issueId - this issue this comment is on
*/
getComments(issueId: string): Promise;
/**
* Get Comment by Id.
* [Jira Doc](https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-comment-list-post)
* @param issueId - this issue this comment is on
* @param commentId - the id of the comment
*/
getComment(issueId: string, commentId: string): Promise;
/**
* Delete Comments by Id.
* [Jira Doc](https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-comment-list-post)
* @param issueId - this issue this comment is on
* @param commentId - the id of the comment
*/
deleteComment(issueId: string, commentId: string): Promise;
/** Add a worklog to a project
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#id291617)
* @param issueId - Issue to add a worklog to
* @param worklog - worklog object from the rest API
* @param newEstimate - the new value for the remaining estimate field
* @param [options={}] - extra options
*/
addWorklog(issueId: string, worklog: components["schemas"]["Worklog"], newEstimate?: string, options?: cloudOperations["addWorklog"]["parameters"]["query"]): Promise;
/** Get ids of worklogs modified since
* [Jira Doc](https://docs.atlassian.com/jira/REST/cloud/#api/2/worklog-getWorklogsForIds)
* @param since - a date time in unix timestamp format since when updated worklogs
* will be returned.
* @param expand - ptional comma separated list of parameters to expand: properties
* (provides worklog properties).
*/
updatedWorklogs(since: string, expand: string[]): Promise;
/** Delete worklog from issue
* [Jira Doc](https://docs.atlassian.com/jira/REST/latest/#d2e1673)
* @param issueId - the Id of the issue to delete
* @param worklogId - the Id of the worklog in issue to delete
*/
deleteWorklog(issueId: string, worklogId: number): Promise;
/** Update worklog from issue
* [Jira Doc](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-worklogs/#api-rest-api-2-issue-issueidorkey-worklog-id-put)
* @param issueId - the Id of the issue to update
* @param worklogId - the Id of the worklog in issue to update
* @param body - value to set
*/
updateWorklog(issueId: string, worklogId: number, body: components["schemas"]["Worklog"], options?: cloudOperations["updateWorklog"]["parameters"]["query"]): Promise;
/** Deletes an issue link.
* [Jira Doc](https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-issueLink-linkId-delete)
* @param linkId - the Id of the issue link to delete
*/
deleteIssueLink(linkId: string): Promise;
/** Returns worklog details for a list of worklog IDs.
* [Jira Doc](https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-worklog-list-post)
* @param {array} worklogsIDs - a list of worklog IDs.
* @param expand - expand to include additional information about worklogs
*
*/
getWorklogs(worklogsIDs: number[], expand: string[]): Promise;
/** Get worklogs list from a given issue
* [Jira Doc](https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-api-3-issue-issueIdOrKey-worklog-get)
* @param issueId - the Id of the issue to find worklogs for
* @param [startAt=0] - optional starting index number
* @param [maxResults=1000] - optional ending index number
*/
getIssueWorklogs(issueId: string, startAt?: number, maxResults?: number): Promise;
/** List all Issue Types jira knows about
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#id295946)
*/
listIssueTypes(): Promise;
/** Register a webhook
* [Jira Doc](https://developer.atlassian.com/display/JIRADEV/JIRA+Webhooks+Overview)
* @param webhook - properly formatted webhook
*/
registerWebhook(webhook: components["schemas"]["WebhookRegistrationDetails"]): Promise;
/** List all registered webhooks
* [Jira Doc](https://developer.atlassian.com/display/JIRADEV/JIRA+Webhooks+Overview)
*/
listWebhooks(): Promise;
/** Get a webhook by its ID
* [Jira Doc](https://developer.atlassian.com/display/JIRADEV/JIRA+Webhooks+Overview)
* @param webhookID - id of webhook to get
*/
getWebhook(webhookID: string): Promise;
/** Delete a registered webhook
* [Jira Doc](https://developer.atlassian.com/display/JIRADEV/JIRA+Webhooks+Overview)
* @param webhookID - id of the webhook to delete
*/
deleteWebhook(webhookID: string): Promise;
/** Describe the currently authenticated user
* [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#id2e865)
*/
getCurrentUser(): Promise;
/** Retrieve the backlog of a certain Board
* @param boardId - rapid view id
*/
getBacklogForBoard(boardId: string): Promise;
/** Add attachment to a Issue
* [Jira Doc](https://docs.atlassian.com/jira/REST/latest/#api/2/issue/{issueIdOrKey}/attachments-addAttachment)
* @param issueId - issue id
* @param readStream - readStream object from fs
* @param mimeType - mime type of attachment, this used by jira to preview files
* @param originalFileName - the original (or new) file name for the attachment
*/
addAttachmentOnIssue(issueId: string, readStream: Buffer | BinaryLike, mimeType?: string, originalFileName?: string): Promise;
/** Notify people related to issue
* [Jira Doc](https://docs.atlassian.com/jira/REST/cloud/#api/2/issue-notify)
* @param issueId - issue id
* @param notificationBody - properly formatted body
*/
issueNotify(issueId: string, notificationBody: components["schemas"]["Notification"]): Promise;
/** Get list of possible statuses
* [Jira Doc](https://docs.atlassian.com/jira/REST/latest/#api/2/status-getStatuses)
*/
listStatus(): Promise;
/** Get a Dev-Status summary by issue ID
* @param issueId - id of issue to get
*/
getDevStatusSummary(issueId: string): Promise;
/** Get a Dev-Status detail by issue ID
* @param issueId - id of issue to get
* @param applicationType - type of application (stash, bitbucket)
* @param dataType - info to return (repository, pullrequest)
*/
getDevStatusDetail(issueId: string, applicationType: string, dataType: string): Promise;
/** Get issue
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/issue-getIssue)
* @param issueIdOrKey - Id of issue
* @param [fields] - The list of fields to return for each issue.
* @param [expand] - A comma-separated list of the parameters to expand.
*/
getIssue(issueIdOrKey: string, fields: string[], expand: string[]): Promise;
/** Move issues to backlog
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/backlog-moveIssuesToBacklog)
* @param {array} issues - id or key of issues to get
*/
moveToBacklog(issues: string[]): Promise;
/** Get all boards
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board-getAllBoards)
* @param [type] - Filters results to boards of the specified type.
* @param [name] - Filters results to boards that match the specified name.
* @param [projectKeyOrId] - Filters results to boards that are relevant to a project.
* @param [startAt=0] - The starting index of the returned boards.
* @param [maxResults=50] - The maximum number of boards to return per page.
*/
getAllBoards(type: string, name: string, projectKeyOrId: string, startAt?: number, maxResults?: number): Promise;
/** Create Board
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board-createBoard)
*/
createBoard(boardBody: operations["createBoard"]["requestBody"]["content"]["application/json"]): Promise;
/** Get Board
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board-getBoard)
* @param boardId - Id of board to retrieve
*/
getBoard(boardId: string): Promise;
/** Delete Board
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board-deleteBoard)
* @param boardId - Id of board to retrieve
*/
deleteBoard(boardId: string): Promise;
/** Get issues for backlog
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board-getIssuesForBacklog)
* @param boardId - Id of board to retrieve
* @param [startAt=0] - The starting index of the returned issues. Base index: 0.
* @param [maxResults=50] - The maximum number of issues to return per page. Default: 50.
* @param [jql] - Filters results using a JQL query.
* @param [validateQuery] - Specifies whether to validate the JQL query or not.
* Default: true.
* @param [fields] - The list of fields to return for each issue.
*/
getIssuesForBacklog(boardId: string, jql: string, fields: string[], startAt?: number, maxResults?: number, validateQuery?: boolean): Promise;
/** Get Configuration
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board-getConfiguration)
* @param boardId - Id of board to retrieve
*/
getConfiguration(boardId: string): Promise;
/** Get issues for board
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board-getIssuesForBoard)
* @param boardId - Id of board to retrieve
* @param [startAt=0] - The starting index of the returned issues. Base index: 0.
* @param [maxResults=50] - The maximum number of issues to return per page. Default: 50.
* @param [jql] - Filters results using a JQL query.
* @param [validateQuery] - Specifies whether to validate the JQL query or not.
* Default: true.
* @param [fields] - The list of fields to return for each issue.
*/
getIssuesForBoard(boardId: string, jql?: string | undefined, fields?: undefined, startAt?: number, maxResults?: number, validateQuery?: boolean): Promise;
/** Get issue estimation for board
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/issue-getIssueEstimationForBoard)
* @param issueIdOrKey - Id of issue
* @param boardId - The id of the board required to determine which field
* is used for estimation.
*/
getIssueEstimationForBoard(issueIdOrKey: string, boardId: string): Promise;
/** Get Epics
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board/{boardId}/epic-getEpics)
* @param boardId - Id of board to retrieve
* @param [startAt=0] - The starting index of the returned epics. Base index: 0.
* @param [maxResults=50] - The maximum number of epics to return per page. Default: 50.
* @param [done] - Filters results to epics that are either done or not done.
* Valid values: true, false.
*/
getEpics(boardId: string, startAt?: number, maxResults?: number, done?: undefined): Promise;
/** Get board issues for epic
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board/{boardId}/epic-getIssuesForEpic)
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board/{boardId}/epic-getIssuesWithoutEpic)
* @param boardId - Id of board to retrieve
* @param epicId - Id of epic to retrieve, specify 'none' to get issues without an epic.
* @param [startAt=0] - The starting index of the returned issues. Base index: 0.
* @param [maxResults=50] - The maximum number of issues to return per page. Default: 50.
* @param [jql] - Filters results using a JQL query.
* @param [validateQuery] - Specifies whether to validate the JQL query or not.
* Default: true.
* @param [fields] - The list of fields to return for each issue.
*/
getBoardIssuesForEpic(boardId: string, epicId: string, startAt?: number, maxResults?: number, jql?: undefined, validateQuery?: boolean, fields?: undefined): Promise;
/** Estimate issue for board
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/issue-estimateIssueForBoard)
* @param issueIdOrKey - Id of issue
* @param boardId - The id of the board required to determine which field
* is used for estimation.
* @param data - value to set
*/
estimateIssueForBoard(issueIdOrKey: string, boardId: string, data: operations["estimateIssueForBoard"]["requestBody"]["content"]["application/json"]): Promise;
/** Rank Issues
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/issue-rankIssues)
* @param data - value to set
*/
rankIssues(data: operations["rankIssues"]["requestBody"]["content"]["application/json"]): Promise;
/** Get Projects
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board/{boardId}/project-getProjects)
* @param boardId - Id of board to retrieve
* @param [startAt=0] - The starting index of the returned projects. Base index: 0.
* @param [maxResults=50] - The maximum number of projects to return per page.
* Default: 50.
*/
getProjects(boardId: string, startAt?: number, maxResults?: number): Promise;
/** Get Projects Full
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board/{boardId}/project-getProjectsFull)
* @param boardId - Id of board to retrieve
*/
getProjectsFull(boardId: string): Promise;
/** Get Board Properties Keys
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board/{boardId}/properties-getPropertiesKeys)
* @param boardId - Id of board to retrieve
*/
getBoardPropertiesKeys(boardId: string): Promise;
/** Delete Board Property
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board/{boardId}/properties-deleteProperty)
* @param boardId - Id of board to retrieve
* @param propertyKey - Id of property to delete
*/
deleteBoardProperty(boardId: string, propertyKey: string): Promise;
/** Set Board Property
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board/{boardId}/properties-setProperty)
* @param boardId - Id of board to retrieve
* @param propertyKey - Id of property to delete
* @param data - value to set, for objects make sure to stringify first
*/
setBoardProperty(boardId: string, propertyKey: string, data: string): Promise;
/** Get Board Property
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board/{boardId}/properties-getProperty)
* @param boardId - Id of board to retrieve
* @param propertyKey - Id of property to retrieve
*/
getBoardProperty(boardId: string, propertyKey: string): Promise;
/** Get All Sprints
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board/{boardId}/sprint-getAllSprints)
* @param boardId - Id of board to retrieve
* @param [startAt=0] - The starting index of the returned sprints. Base index: 0.
* @param [maxResults=50] - The maximum number of sprints to return per page.
* Default: 50.
* @param [state] - Filters results to sprints in specified states.
* Valid values: future, active, closed.
*/
getAllSprints(boardId: string, startAt?: number, maxResults?: number, state?: string | undefined): Promise;
/** Get Board issues for sprint
* [Jira Doc](https://developer.atlassian.com/cloud/jira/software/rest/api-group-board/#api-agile-1-0-board-boardid-sprint-sprintid-issue-get)
* @param boardId - Id of board to retrieve
* @param sprintId - Id of sprint to retrieve
* @param [startAt=0] - The starting index of the returned issues. Base index: 0.
* @param [maxResults=50] - The maximum number of issues to return per page. Default: 50.
* @param [jql] - Filters results using a JQL query.
* @param [validateQuery] - Specifies whether to validate the JQL query or not.
* Default: true.
* @param [fields] - The list of fields to return for each issue.
* @param [expand] - A comma-separated list of the parameters to expand.
*/
getBoardIssuesForSprint(boardId: string, sprintId: string, startAt?: number, maxResults?: number, jql?: string | undefined, validateQuery?: boolean, fields?: string[] | undefined, expand?: string[] | undefined): Promise;
/** Get All Versions
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board/{boardId}/version-getAllVersions)
* @param boardId - Id of board to retrieve
* @param [startAt=0] - The starting index of the returned versions. Base index: 0.
* @param [maxResults=50] - The maximum number of versions to return per page.
* Default: 50.
* @param [released] - Filters results to versions that are either released or
* unreleased.Valid values: true, false.
*/
getAllVersions(boardId: string, startAt?: number, maxResults?: number, released?: boolean | undefined): Promise;
/** Get Filter
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/filter)
* @param filterId - Id of filter to retrieve
*/
getFilter(filterId: string): Promise;
/** Get Epic
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/epic-getEpic)
* @param epicIdOrKey - Id of epic to retrieve
*/
getEpic(epicIdOrKey: string): Promise;
/** Partially update epic
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/epic-partiallyUpdateEpic)
* @param epicIdOrKey - Id of epic to retrieve
* @param data - data to set
*/
partiallyUpdateEpic(epicIdOrKey: string, data: operations["partiallyUpdateEpic"]["requestBody"]["content"]["application/json"]): Promise;
/** Get issues for epic
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/epic-getIssuesForEpic)
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/epic-getIssuesWithoutEpic)
* @param epicId - Id of epic to retrieve, specify 'none' to get issues without an epic.
* @param [startAt=0] - The starting index of the returned issues. Base index: 0.
* @param [maxResults=50] - The maximum number of issues to return per page. Default: 50.
* @param [jql] - Filters results using a JQL query.
* @param [validateQuery] - Specifies whether to validate the JQL query or not.
* Default: true.
* @param [fields] - The list of fields to return for each issue.
*/
getIssuesForEpic(epicId: string, startAt?: number, maxResults?: number, jql?: string | undefined, validateQuery?: boolean, fields?: string[] | undefined): Promise;
/** Move Issues to Epic
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/epic-moveIssuesToEpic)
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/epic-removeIssuesFromEpic)
* @param epicIdOrKey - Id of epic to move issue to, or 'none' to remove from epic
* @param {array} issues - array of issues to move
*/
moveIssuesToEpic(epicIdOrKey: string, issues: string[]): Promise;
/** Rank Epics
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/epic-rankEpics)
* @param epicIdOrKey - Id of epic
* @param data - value to set
*/
rankEpics(epicIdOrKey: string, data: operations["rankEpics"]["requestBody"]["content"]["application/json"]): Promise;
/**
* Get server info
* [Jira Doc](https://developer.atlassian.com/cloud/jira/platform/rest/v2/#api-api-2-serverInfo-get)
*/
getServerInfo(): Promise;
/**
* Get metadata for creating an issue.
* [Jira Doc](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-createmeta-get)
*/
getIssueCreateMetadata(optional?: cloudOperations["getCreateIssueMeta"]["parameters"]["query"]): Promise;
getIssueCreateMetaProjectIssueTypes(projectIdOrKey: string | number, startAt: number, maxResults: number): Promise;
getIssueCreateMetaFields(projectIdOrKey: string | number, issueTypeId: string, startAt: number, maxResults: number): Promise;
getWorkflows(query?: {}): Promise;
getWorkflowScheme(projectKeyOrId: string, query?: {}): Promise;
/** Generic Get Request
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/2/)
* @param endpoint - Rest API endpoint
*/
genericGet(endpoint: string): Promise;
/** Generic Get Request to the Agile API
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/2/)
* @param endpoint - Rest API endpoint
*/
genericAgileGet(endpoint: string): Promise;
}