@felixgeelhaar/jira-sdk 0.2.0 → 1.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/README.md +214 -374
- package/dist/auth/index.cjs +400 -0
- package/dist/auth/index.cjs.map +1 -0
- package/dist/auth/index.d.cts +192 -0
- package/dist/auth/index.d.ts +192 -0
- package/dist/auth/index.js +386 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/errors/index.cjs +272 -0
- package/dist/errors/index.cjs.map +1 -0
- package/dist/errors/index.d.cts +203 -0
- package/dist/errors/index.d.ts +203 -0
- package/dist/errors/index.js +254 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/http-client-BSzRYQZa.d.cts +317 -0
- package/dist/http-client-erRvYNs-.d.ts +317 -0
- package/dist/index.cjs +9582 -13466
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1242 -76
- package/dist/index.d.ts +1242 -76
- package/dist/index.js +9166 -13318
- package/dist/index.js.map +1 -1
- package/dist/schemas/index.cjs +2481 -13092
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +335 -207
- package/dist/schemas/index.d.ts +335 -207
- package/dist/schemas/index.js +2138 -13047
- package/dist/schemas/index.js.map +1 -1
- package/dist/services/index.cjs +6375 -13323
- package/dist/services/index.cjs.map +1 -1
- package/dist/services/index.d.cts +3852 -299
- package/dist/services/index.d.ts +3852 -299
- package/dist/services/index.js +6350 -13321
- package/dist/services/index.js.map +1 -1
- package/dist/transport/index.cjs +1016 -0
- package/dist/transport/index.cjs.map +1 -0
- package/dist/transport/index.d.cts +372 -0
- package/dist/transport/index.d.ts +372 -0
- package/dist/transport/index.js +997 -0
- package/dist/transport/index.js.map +1 -0
- package/dist/types-E6djPHpW.d.cts +95 -0
- package/dist/types-E6djPHpW.d.ts +95 -0
- package/dist/webhook-Bn8gme6Y.d.cts +6959 -0
- package/dist/webhook-Bn8gme6Y.d.ts +6959 -0
- package/package.json +73 -27
- package/dist/project-BtUx-eSv.d.cts +0 -1480
- package/dist/project-BtUx-eSv.d.ts +0 -1480
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import { User } from '@felixgeelhaar/sdk-core/schemas';
|
|
2
|
+
import { H as HttpClient, Q as QueryParamValue, R as RequestOptions, f as HttpResponse } from '../http-client-BSzRYQZa.cjs';
|
|
3
|
+
import { dh as GetBoardsOptions, ah as BoardPage, ac as Board, aK as CreateBoardInput, dg as GetBoardSprintsOptions, gq as SprintPage, gp as Sprint, by as CreateSprintInput, hg as UpdateSprintInput, eJ as MoveIssuesToSprintInput, df as GetBoardEpicsOptions, cd as EpicPage, ca as Epic, de as GetBacklogOptions, J as AgileIssuePage, G as AgileIssue, S as ApplicationProperty, gl as SetApplicationPropertyInput, a2 as AuditListOptions, a6 as AuditRecord, bg as CreateIssuesInput, bi as CreateIssuesResult, c0 as DeleteIssuesInput, aq as BulkOperationProgress, hE as WaitForCompletionOptions, ew as ListDashboardsOptions, bP as DashboardListResult, bK as Dashboard, aO as CreateDashboardInput, gM as UpdateDashboardInput, bL as DashboardGadget, j as AddGadgetInput, gU as UpdateGadgetInput, ci as EvaluationInput, cm as EvaluationResult, O as AnalysisInput, Q as AnalysisResult, cu as Field, aS as CreateFieldInput, gQ as UpdateFieldInput, cx as FieldContext, aQ as CreateFieldContextInput, gO as UpdateFieldContextInput, cD as FieldOption, aU as CreateFieldOptionInput, U as AssociateContextProjectsInput, fX as RemoveContextProjectsInput, di as GetContextProjectMappingsOptions, aG as ContextProjectMapping, dk as GetFilterOptions, cQ as Filter, a_ as CreateFilterInput, gS as UpdateFilterInput, ex as ListFiltersOptions, d4 as FilterSearchResult, du as GetMyFiltersOptions, d6 as FilterShareScope, cV as FilterPermission, v as AddSharePermissionInput, dc as FindGroupsOptions, dA as Group, dn as GetGroupOptions, b0 as CreateGroupInput, b_ as DeleteGroupOptions, dl as GetGroupMembersOptions, dI as GroupUser, l as AddGroupUserOptions, fZ as RemoveGroupUserOptions, am as BulkGetGroupsOptions, dq as GetIssueOptions, dU as Issue, b4 as CreateIssueInput, ba as CreateIssueResponse, gW as UpdateIssueInput, aA as CommentsPage, aw as Comment, h as AddCommentInput, gI as UpdateCommentInput, gG as TransitionsResponse, c2 as DoTransitionInput, hF as Watchers, is as WorklogsPage, ik as Worklog, x as AddWorklogInput, hq as UpdateWorklogInput, W as Attachment, X as AttachmentMetadata, dX as IssueLink, b6 as CreateIssueLinkInput, d$ as IssueLinkTypesResponse, dZ as IssueLinkType, b8 as CreateIssueLinkTypeInput, gY as UpdateIssueLinkTypeInput, e6 as IssueTypeDetails, bc as CreateIssueTypeInput, g_ as UpdateIssueTypeInput, ey as ListIssueTypeSchemesOptions, e8 as IssueTypeScheme, be as CreateIssueTypeSchemeInput, h0 as UpdateIssueTypeSchemeInput, n as AddIssueTypesToSchemeInput, ds as GetIssueTypeSchemeMappingsOptions, eb as IssueTypeSchemeMapping, eA as ListLabelsOptions, bI as CurrentUser, hz as UserPreferences, gn as SetUserPreferencesInput, eB as ListNotificationSchemesOptions, f0 as NotificationSchemePage, eZ as NotificationScheme, bk as CreateNotificationSchemeInput, h2 as UpdateNotificationSchemeInput, p as AddNotificationInput, gh as SendNotificationInput, f7 as Permission, eM as MyPermissionsOptions, eL as MyPermissions, eD as ListPermissionSchemesOptions, fh as PermissionScheme, dv as GetPermissionSchemeOptions, bm as CreatePermissionSchemeInput, h4 as UpdatePermissionSchemeInput, fM as ProjectRoles, fy as ProjectRole, d as AddActorInput, fD as ProjectRoleActorType, fp as Priority, bo as CreatePriorityInput, h6 as UpdatePriorityInput, fr as Project, dx as GetProjectsOptions, fP as ProjectSearchResult, bq as CreateProjectInput, h8 as UpdateProjectInput, aM as CreateComponentInput, fs as ProjectComponent, gK as UpdateComponentInput, bA as CreateVersionInput, fR as ProjectVersion, hk as UpdateVersionInput, f$ as Resolution, bs as CreateResolutionInput, ha as UpdateResolutionInput, eF as ListScreensOptions, g4 as ScreenListResult, g1 as Screen, bu as CreateScreenInput, hc as UpdateScreenInput, g2 as ScreenField, gb as ScreenTab, bw as CreateScreenTabInput, he as UpdateScreenTabInput, t as AddScreenFieldInput, a as AdfNode, gd as SecurityLevel, gf as SecurityScheme, gj as ServerInfo, em as JiraConfiguration, gA as TimeTrackingProvider, gw as TimeTrackingConfiguration, hi as UpdateTimeTrackingConfigurationInput, il as WorklogListOptions, gy as TimeTrackingCreateWorklogInput, gC as TimeTrackingUpdateWorklogInput, hs as User, hK as WebhookListOptions, hH as Webhook, bC as CreateWebhookInput, hS as WebhookRegistrationResult, hm as UpdateWebhookInput, c4 as DynamicModules, cq as FailedWebhook, dz as GetWorkflowTransitionsOptions, ig as WorkflowTransition, hW as WorkflowDoTransitionInput, eH as ListWorkflowsOptions, i9 as WorkflowSearchResult, hV as Workflow, ib as WorkflowStatus, ic as WorkflowStatusCategory, i1 as WorkflowScheme, eG as ListWorkflowSchemesOptions, i4 as WorkflowSchemeListResult, bE as CreateWorkflowSchemeInput, ho as UpdateWorkflowSchemeInput, i2 as WorkflowSchemeIssueTypeInput } from '../webhook-Bn8gme6Y.cjs';
|
|
4
|
+
import '../types-E6djPHpW.cjs';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* Base service class for all Jira services
|
|
@@ -21,11 +20,11 @@ declare abstract class BaseService {
|
|
|
21
20
|
/**
|
|
22
21
|
* Make a GET request and validate the response
|
|
23
22
|
*/
|
|
24
|
-
protected getMethod<T>(path: string, schema: z.ZodType<T>, params?: Record<string,
|
|
23
|
+
protected getMethod<T>(path: string, schema: z.ZodType<T>, params?: Record<string, QueryParamValue | undefined>, options?: RequestOptions): Promise<T>;
|
|
25
24
|
/**
|
|
26
25
|
* Make a GET request without response validation
|
|
27
26
|
*/
|
|
28
|
-
protected getMethodRaw<T = unknown>(path: string, params?: Record<string,
|
|
27
|
+
protected getMethodRaw<T = unknown>(path: string, params?: Record<string, QueryParamValue | undefined>, options?: RequestOptions): Promise<HttpResponse<T>>;
|
|
29
28
|
/**
|
|
30
29
|
* Make a POST request and validate the response
|
|
31
30
|
*/
|
|
@@ -62,7 +61,7 @@ declare abstract class BaseService {
|
|
|
62
61
|
* Build query parameters for GET requests
|
|
63
62
|
* Filters out undefined values
|
|
64
63
|
*/
|
|
65
|
-
protected buildParams(params: Record<string,
|
|
64
|
+
protected buildParams(params: Record<string, QueryParamValue | undefined>): Record<string, QueryParamValue>;
|
|
66
65
|
/**
|
|
67
66
|
* Convert array to comma-separated string for query params
|
|
68
67
|
*/
|
|
@@ -70,255 +69,3011 @@ declare abstract class BaseService {
|
|
|
70
69
|
}
|
|
71
70
|
|
|
72
71
|
/**
|
|
73
|
-
*
|
|
72
|
+
* Agile service for boards, sprints, epics and backlogs.
|
|
73
|
+
*
|
|
74
|
+
* Unlike the other services this one talks to the Jira Agile API
|
|
75
|
+
* (`/rest/agile/1.0`) rather than the platform API (`/rest/api/3`).
|
|
74
76
|
*
|
|
75
77
|
* @example
|
|
76
78
|
* ```typescript
|
|
77
79
|
* const client = new JiraClient({ ... });
|
|
78
80
|
*
|
|
79
|
-
* //
|
|
80
|
-
* const
|
|
81
|
-
*
|
|
82
|
-
* // Create an issue
|
|
83
|
-
* const newIssue = await client.issues.create({
|
|
84
|
-
* fields: {
|
|
85
|
-
* project: { key: 'PROJECT' },
|
|
86
|
-
* summary: 'New issue',
|
|
87
|
-
* issuetype: { name: 'Task' },
|
|
88
|
-
* },
|
|
89
|
-
* });
|
|
90
|
-
*
|
|
91
|
-
* // Update an issue
|
|
92
|
-
* await client.issues.update('PROJECT-123', {
|
|
93
|
-
* fields: { summary: 'Updated summary' },
|
|
94
|
-
* });
|
|
81
|
+
* // List scrum boards
|
|
82
|
+
* const boards = await client.agile.getBoards({ type: 'scrum' });
|
|
95
83
|
*
|
|
96
|
-
* //
|
|
97
|
-
* await client.
|
|
84
|
+
* // Iterate every sprint of a board
|
|
85
|
+
* for await (const sprint of client.agile.iterateBoardSprints(123)) {
|
|
86
|
+
* console.log(sprint.name, sprint.state);
|
|
87
|
+
* }
|
|
98
88
|
* ```
|
|
99
89
|
*/
|
|
100
|
-
declare class
|
|
90
|
+
declare class AgileService extends BaseService {
|
|
91
|
+
constructor(http: HttpClient, basePath?: string);
|
|
101
92
|
/**
|
|
102
|
-
*
|
|
93
|
+
* List boards, optionally filtered by type, name or project.
|
|
94
|
+
*
|
|
95
|
+
* `GET /rest/agile/1.0/board`
|
|
96
|
+
*
|
|
97
|
+
* @param options - Pagination and filter options
|
|
98
|
+
* @returns A page of boards
|
|
103
99
|
*/
|
|
104
|
-
|
|
100
|
+
getBoards(options?: GetBoardsOptions): Promise<BoardPage>;
|
|
105
101
|
/**
|
|
106
|
-
*
|
|
102
|
+
* Get a single board by ID.
|
|
103
|
+
*
|
|
104
|
+
* `GET /rest/agile/1.0/board/{boardId}`
|
|
105
|
+
*
|
|
106
|
+
* @param boardId - Numeric ID of the board
|
|
107
|
+
* @returns The board
|
|
107
108
|
*/
|
|
108
|
-
|
|
109
|
+
getBoard(boardId: number): Promise<Board>;
|
|
109
110
|
/**
|
|
110
|
-
*
|
|
111
|
+
* Create a board backed by an existing saved filter.
|
|
112
|
+
*
|
|
113
|
+
* `POST /rest/agile/1.0/board`
|
|
114
|
+
*
|
|
115
|
+
* @param input - Board name, type and the ID of the filter to back it
|
|
116
|
+
* @returns The created board
|
|
111
117
|
*/
|
|
112
|
-
|
|
113
|
-
notifyUsers?: boolean;
|
|
114
|
-
overrideScreenSecurity?: boolean;
|
|
115
|
-
overrideEditableFlag?: boolean;
|
|
116
|
-
}): Promise<void>;
|
|
118
|
+
createBoard(input: CreateBoardInput): Promise<Board>;
|
|
117
119
|
/**
|
|
118
|
-
* Delete
|
|
120
|
+
* Delete a board.
|
|
121
|
+
*
|
|
122
|
+
* `DELETE /rest/agile/1.0/board/{boardId}`
|
|
123
|
+
*
|
|
124
|
+
* @param boardId - Numeric ID of the board
|
|
119
125
|
*/
|
|
120
|
-
|
|
121
|
-
deleteSubtasks?: boolean;
|
|
122
|
-
}): Promise<void>;
|
|
126
|
+
deleteBoard(boardId: number): Promise<void>;
|
|
123
127
|
/**
|
|
124
|
-
*
|
|
128
|
+
* List the sprints of a board.
|
|
129
|
+
*
|
|
130
|
+
* `GET /rest/agile/1.0/board/{boardId}/sprint`
|
|
131
|
+
*
|
|
132
|
+
* @param boardId - Numeric ID of the board
|
|
133
|
+
* @param options - Pagination and state filter options
|
|
134
|
+
* @returns A page of sprints
|
|
125
135
|
*/
|
|
126
|
-
|
|
127
|
-
startAt?: number;
|
|
128
|
-
maxResults?: number;
|
|
129
|
-
orderBy?: string;
|
|
130
|
-
expand?: string[];
|
|
131
|
-
}): Promise<CommentsPage>;
|
|
136
|
+
getBoardSprints(boardId: number, options?: GetBoardSprintsOptions): Promise<SprintPage>;
|
|
132
137
|
/**
|
|
133
|
-
* Get a
|
|
138
|
+
* Get a single sprint by ID.
|
|
139
|
+
*
|
|
140
|
+
* `GET /rest/agile/1.0/sprint/{sprintId}`
|
|
141
|
+
*
|
|
142
|
+
* @param sprintId - Numeric ID of the sprint
|
|
143
|
+
* @returns The sprint
|
|
134
144
|
*/
|
|
135
|
-
|
|
136
|
-
expand?: string[];
|
|
137
|
-
}): Promise<Comment>;
|
|
145
|
+
getSprint(sprintId: number): Promise<Sprint>;
|
|
138
146
|
/**
|
|
139
|
-
*
|
|
147
|
+
* Create a future sprint on a Scrum board.
|
|
148
|
+
*
|
|
149
|
+
* `POST /rest/agile/1.0/sprint`
|
|
150
|
+
*
|
|
151
|
+
* @param input - Sprint name, origin board and optional dates/goal
|
|
152
|
+
* @returns The created sprint
|
|
140
153
|
*/
|
|
141
|
-
|
|
142
|
-
expand?: string[];
|
|
143
|
-
}): Promise<Comment>;
|
|
154
|
+
createSprint(input: CreateSprintInput): Promise<Sprint>;
|
|
144
155
|
/**
|
|
145
|
-
*
|
|
156
|
+
* Partially update a sprint (name, state, dates, goal).
|
|
157
|
+
*
|
|
158
|
+
* `POST /rest/agile/1.0/sprint/{sprintId}`
|
|
159
|
+
*
|
|
160
|
+
* @param sprintId - Numeric ID of the sprint
|
|
161
|
+
* @param input - Fields to change; omitted fields are left untouched
|
|
162
|
+
* @returns The updated sprint
|
|
146
163
|
*/
|
|
147
|
-
|
|
148
|
-
expand?: string[];
|
|
149
|
-
}): Promise<Comment>;
|
|
164
|
+
updateSprint(sprintId: number, input: UpdateSprintInput): Promise<Sprint>;
|
|
150
165
|
/**
|
|
151
|
-
* Delete a
|
|
166
|
+
* Delete a sprint. Issues in the sprint are moved back to the backlog.
|
|
167
|
+
*
|
|
168
|
+
* `DELETE /rest/agile/1.0/sprint/{sprintId}`
|
|
169
|
+
*
|
|
170
|
+
* @param sprintId - Numeric ID of the sprint
|
|
152
171
|
*/
|
|
153
|
-
|
|
172
|
+
deleteSprint(sprintId: number): Promise<void>;
|
|
154
173
|
/**
|
|
155
|
-
*
|
|
174
|
+
* Move issues into a sprint. Jira accepts at most 50 issues per call.
|
|
175
|
+
*
|
|
176
|
+
* `POST /rest/agile/1.0/sprint/{sprintId}/issue`
|
|
177
|
+
*
|
|
178
|
+
* @param sprintId - Numeric ID of the target sprint
|
|
179
|
+
* @param input - Issue keys or IDs to move
|
|
156
180
|
*/
|
|
157
|
-
|
|
158
|
-
expand?: string[];
|
|
159
|
-
transitionId?: string;
|
|
160
|
-
}): Promise<TransitionsResponse>;
|
|
181
|
+
moveIssuesToSprint(sprintId: number, input: MoveIssuesToSprintInput): Promise<void>;
|
|
161
182
|
/**
|
|
162
|
-
*
|
|
183
|
+
* List the epics of a board.
|
|
184
|
+
*
|
|
185
|
+
* `GET /rest/agile/1.0/board/{boardId}/epic`
|
|
186
|
+
*
|
|
187
|
+
* @param boardId - Numeric ID of the board
|
|
188
|
+
* @param options - Pagination and completion-status filter options
|
|
189
|
+
* @returns A page of epics
|
|
163
190
|
*/
|
|
164
|
-
|
|
191
|
+
getBoardEpics(boardId: number, options?: GetBoardEpicsOptions): Promise<EpicPage>;
|
|
165
192
|
/**
|
|
166
|
-
* Get
|
|
193
|
+
* Get a single epic by ID or key.
|
|
194
|
+
*
|
|
195
|
+
* `GET /rest/agile/1.0/epic/{epicIdOrKey}`
|
|
196
|
+
*
|
|
197
|
+
* @param epicIdOrKey - Numeric ID or issue key of the epic
|
|
198
|
+
* @returns The epic
|
|
167
199
|
*/
|
|
168
|
-
|
|
200
|
+
getEpic(epicIdOrKey: number | string): Promise<Epic>;
|
|
169
201
|
/**
|
|
170
|
-
*
|
|
202
|
+
* List the issues on a board's backlog (issues not assigned to a sprint).
|
|
203
|
+
*
|
|
204
|
+
* `GET /rest/agile/1.0/board/{boardId}/backlog`
|
|
205
|
+
*
|
|
206
|
+
* @param boardId - Numeric ID of the board
|
|
207
|
+
* @param options - Pagination options
|
|
208
|
+
* @returns A page of backlog issues
|
|
171
209
|
*/
|
|
172
|
-
|
|
210
|
+
getBacklog(boardId: number, options?: GetBacklogOptions): Promise<AgileIssuePage>;
|
|
173
211
|
/**
|
|
174
|
-
*
|
|
212
|
+
* Iterate every board, transparently following `startAt`/`isLast` pagination.
|
|
213
|
+
*
|
|
214
|
+
* @param options - Filter options; `startAt` is managed by the iterator
|
|
215
|
+
* @returns An async generator yielding boards one at a time
|
|
216
|
+
*
|
|
217
|
+
* @example
|
|
218
|
+
* ```typescript
|
|
219
|
+
* for await (const board of client.agile.iterateBoards({ type: 'scrum' })) {
|
|
220
|
+
* console.log(board.name);
|
|
221
|
+
* }
|
|
222
|
+
* ```
|
|
175
223
|
*/
|
|
176
|
-
|
|
224
|
+
iterateBoards(options?: Omit<GetBoardsOptions, 'startAt'>): AsyncGenerator<Board, void, undefined>;
|
|
177
225
|
/**
|
|
178
|
-
*
|
|
226
|
+
* Collect every board into an array (loads all pages into memory).
|
|
227
|
+
*
|
|
228
|
+
* @param options - Filter options; `startAt` is managed internally
|
|
229
|
+
* @returns All matching boards
|
|
179
230
|
*/
|
|
180
|
-
|
|
181
|
-
startAt?: number;
|
|
182
|
-
maxResults?: number;
|
|
183
|
-
startedAfter?: number;
|
|
184
|
-
startedBefore?: number;
|
|
185
|
-
expand?: string[];
|
|
186
|
-
}): Promise<WorklogsPage>;
|
|
231
|
+
allBoards(options?: Omit<GetBoardsOptions, 'startAt'>): Promise<Board[]>;
|
|
187
232
|
/**
|
|
188
|
-
*
|
|
233
|
+
* Iterate every sprint of a board, following `startAt`/`isLast` pagination.
|
|
234
|
+
*
|
|
235
|
+
* @param boardId - Numeric ID of the board
|
|
236
|
+
* @param options - Filter options; `startAt` is managed by the iterator
|
|
237
|
+
* @returns An async generator yielding sprints one at a time
|
|
189
238
|
*/
|
|
190
|
-
|
|
191
|
-
expand?: string[];
|
|
192
|
-
}): Promise<Worklog>;
|
|
239
|
+
iterateBoardSprints(boardId: number, options?: Omit<GetBoardSprintsOptions, 'startAt'>): AsyncGenerator<Sprint, void, undefined>;
|
|
193
240
|
/**
|
|
194
|
-
*
|
|
241
|
+
* Collect every sprint of a board into an array.
|
|
242
|
+
*
|
|
243
|
+
* @param boardId - Numeric ID of the board
|
|
244
|
+
* @param options - Filter options; `startAt` is managed internally
|
|
245
|
+
* @returns All matching sprints
|
|
195
246
|
*/
|
|
196
|
-
|
|
197
|
-
notifyUsers?: boolean;
|
|
198
|
-
adjustEstimate?: 'new' | 'leave' | 'manual' | 'auto';
|
|
199
|
-
newEstimate?: string;
|
|
200
|
-
reduceBy?: string;
|
|
201
|
-
expand?: string[];
|
|
202
|
-
}): Promise<Worklog>;
|
|
247
|
+
allBoardSprints(boardId: number, options?: Omit<GetBoardSprintsOptions, 'startAt'>): Promise<Sprint[]>;
|
|
203
248
|
/**
|
|
204
|
-
*
|
|
249
|
+
* Iterate every epic of a board, following `startAt`/`isLast` pagination.
|
|
250
|
+
*
|
|
251
|
+
* @param boardId - Numeric ID of the board
|
|
252
|
+
* @param options - Filter options; `startAt` is managed by the iterator
|
|
253
|
+
* @returns An async generator yielding epics one at a time
|
|
205
254
|
*/
|
|
206
|
-
|
|
207
|
-
notifyUsers?: boolean;
|
|
208
|
-
adjustEstimate?: 'new' | 'leave' | 'manual' | 'auto';
|
|
209
|
-
newEstimate?: string;
|
|
210
|
-
expand?: string[];
|
|
211
|
-
}): Promise<Worklog>;
|
|
255
|
+
iterateBoardEpics(boardId: number, options?: Omit<GetBoardEpicsOptions, 'startAt'>): AsyncGenerator<Epic, void, undefined>;
|
|
212
256
|
/**
|
|
213
|
-
*
|
|
257
|
+
* Collect every epic of a board into an array.
|
|
258
|
+
*
|
|
259
|
+
* @param boardId - Numeric ID of the board
|
|
260
|
+
* @param options - Filter options; `startAt` is managed internally
|
|
261
|
+
* @returns All matching epics
|
|
214
262
|
*/
|
|
215
|
-
|
|
216
|
-
notifyUsers?: boolean;
|
|
217
|
-
adjustEstimate?: 'new' | 'leave' | 'manual' | 'auto';
|
|
218
|
-
newEstimate?: string;
|
|
219
|
-
increaseBy?: string;
|
|
220
|
-
}): Promise<void>;
|
|
263
|
+
allBoardEpics(boardId: number, options?: Omit<GetBoardEpicsOptions, 'startAt'>): Promise<Epic[]>;
|
|
221
264
|
/**
|
|
222
|
-
*
|
|
265
|
+
* Iterate every issue on a board's backlog, following `startAt`/`total`
|
|
266
|
+
* pagination (the backlog endpoint does not return `isLast`).
|
|
267
|
+
*
|
|
268
|
+
* @param boardId - Numeric ID of the board
|
|
269
|
+
* @param options - Pagination options; `startAt` is managed by the iterator
|
|
270
|
+
* @returns An async generator yielding backlog issues one at a time
|
|
223
271
|
*/
|
|
224
|
-
|
|
272
|
+
iterateBacklog(boardId: number, options?: Omit<GetBacklogOptions, 'startAt'>): AsyncGenerator<AgileIssue, void, undefined>;
|
|
225
273
|
/**
|
|
226
|
-
*
|
|
274
|
+
* Collect every backlog issue of a board into an array.
|
|
275
|
+
*
|
|
276
|
+
* @param boardId - Numeric ID of the board
|
|
277
|
+
* @param options - Pagination options; `startAt` is managed internally
|
|
278
|
+
* @returns All backlog issues
|
|
227
279
|
*/
|
|
228
|
-
|
|
280
|
+
allBacklog(boardId: number, options?: Omit<GetBacklogOptions, 'startAt'>): Promise<AgileIssue[]>;
|
|
229
281
|
}
|
|
230
282
|
|
|
231
283
|
/**
|
|
232
|
-
*
|
|
284
|
+
* Application properties service for Jira system configuration settings
|
|
233
285
|
*
|
|
234
286
|
* @example
|
|
235
287
|
* ```typescript
|
|
236
288
|
* const client = new JiraClient({ ... });
|
|
237
289
|
*
|
|
238
|
-
*
|
|
239
|
-
* const
|
|
290
|
+
* const settings = await client.appProperties.getAdvancedSettings();
|
|
291
|
+
* const prop = await client.appProperties.getApplicationProperty('jira.clone.prefix');
|
|
292
|
+
* await client.appProperties.setApplicationProperty({
|
|
293
|
+
* id: 'jira.clone.prefix',
|
|
294
|
+
* value: 'CLONE -',
|
|
295
|
+
* });
|
|
296
|
+
* ```
|
|
297
|
+
*/
|
|
298
|
+
declare class AppPropertiesService extends BaseService {
|
|
299
|
+
/**
|
|
300
|
+
* Get all advanced settings
|
|
301
|
+
*
|
|
302
|
+
* `GET /rest/api/3/application-properties/advanced-settings`
|
|
303
|
+
*
|
|
304
|
+
* @returns The list of advanced settings properties
|
|
305
|
+
*/
|
|
306
|
+
getAdvancedSettings(): Promise<ApplicationProperty[]>;
|
|
307
|
+
/**
|
|
308
|
+
* Get a single application property by key
|
|
309
|
+
*
|
|
310
|
+
* `GET /rest/api/3/application-properties?key={key}`
|
|
311
|
+
*
|
|
312
|
+
* @param key - The application property key
|
|
313
|
+
* @returns The matching application property
|
|
314
|
+
* @throws If no property matches the given key
|
|
315
|
+
*/
|
|
316
|
+
getApplicationProperty(key: string): Promise<ApplicationProperty>;
|
|
317
|
+
/**
|
|
318
|
+
* Set the value of an application property
|
|
319
|
+
*
|
|
320
|
+
* `PUT /rest/api/3/application-properties/{id}`
|
|
321
|
+
*
|
|
322
|
+
* @param input - The property ID and its new value
|
|
323
|
+
* @returns Nothing; resolves once the property is stored
|
|
324
|
+
*/
|
|
325
|
+
setApplicationProperty(input: SetApplicationPropertyInput): Promise<void>;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Audit log service for reading Jira's administrative audit records.
|
|
240
330
|
*
|
|
241
|
-
*
|
|
242
|
-
*
|
|
331
|
+
* @example
|
|
332
|
+
* ```typescript
|
|
333
|
+
* const client = new JiraClient({ ... });
|
|
243
334
|
*
|
|
244
|
-
* //
|
|
245
|
-
* const
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
*
|
|
335
|
+
* // Get a page of audit records
|
|
336
|
+
* const records = await client.audit.list({ limit: 100, filter: 'user_management' });
|
|
337
|
+
*
|
|
338
|
+
* // Iterate every record in a time window
|
|
339
|
+
* for await (const record of client.audit.iterate({ from: '2024-01-01T00:00:00Z' })) {
|
|
340
|
+
* console.log(record.summary);
|
|
341
|
+
* }
|
|
250
342
|
* ```
|
|
251
343
|
*/
|
|
252
|
-
declare class
|
|
344
|
+
declare class AuditService extends BaseService {
|
|
253
345
|
/**
|
|
254
|
-
*
|
|
346
|
+
* List audit records with optional filtering.
|
|
347
|
+
*
|
|
348
|
+
* `GET /rest/api/3/auditing/record`
|
|
349
|
+
*
|
|
350
|
+
* @param options - Offset/limit, a free-text filter and a from/to time window
|
|
351
|
+
* @returns The audit records on the requested page
|
|
255
352
|
*/
|
|
256
|
-
|
|
257
|
-
expand?: string[];
|
|
258
|
-
properties?: string[];
|
|
259
|
-
}): Promise<Project>;
|
|
353
|
+
list(options?: AuditListOptions): Promise<AuditRecord[]>;
|
|
260
354
|
/**
|
|
261
|
-
*
|
|
355
|
+
* Async iterator over every matching audit record, paging transparently.
|
|
356
|
+
*
|
|
357
|
+
* `GET /rest/api/3/auditing/record`
|
|
358
|
+
*
|
|
359
|
+
* @param options - Filter options (`offset` is managed by the iterator)
|
|
360
|
+
* @returns An async generator yielding audit records
|
|
262
361
|
*/
|
|
263
|
-
|
|
362
|
+
iterate(options?: Omit<AuditListOptions, 'offset'>): AsyncGenerator<AuditRecord, void, undefined>;
|
|
264
363
|
/**
|
|
265
|
-
*
|
|
364
|
+
* Collect every matching audit record into an array.
|
|
365
|
+
*
|
|
366
|
+
* `GET /rest/api/3/auditing/record`
|
|
367
|
+
*
|
|
368
|
+
* @param options - Filter options
|
|
369
|
+
* @returns All matching audit records across all pages
|
|
266
370
|
*/
|
|
267
|
-
|
|
371
|
+
all(options?: Omit<AuditListOptions, 'offset'>): Promise<AuditRecord[]>;
|
|
268
372
|
/**
|
|
269
|
-
*
|
|
373
|
+
* Fetch a single page of audit records, including its pagination metadata.
|
|
270
374
|
*/
|
|
271
|
-
|
|
375
|
+
private listPage;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Bulk operations service for batch processing of Jira issues.
|
|
380
|
+
*
|
|
381
|
+
* Jira enforces a hard limit of 1000 issues per bulk request; inputs larger
|
|
382
|
+
* than that are rejected by the request schema before any call is made.
|
|
383
|
+
*
|
|
384
|
+
* @example
|
|
385
|
+
* ```typescript
|
|
386
|
+
* const client = new JiraClient({ ... });
|
|
387
|
+
*
|
|
388
|
+
* // Create many issues at once
|
|
389
|
+
* const result = await client.bulk.createIssues({
|
|
390
|
+
* issueUpdates: [
|
|
391
|
+
* { fields: { project: { key: 'PROJ' }, summary: 'One', issuetype: { name: 'Task' } } },
|
|
392
|
+
* { fields: { project: { key: 'PROJ' }, summary: 'Two', issuetype: { name: 'Task' } } },
|
|
393
|
+
* ],
|
|
394
|
+
* });
|
|
395
|
+
*
|
|
396
|
+
* // Wait for a long-running task to finish
|
|
397
|
+
* const progress = await client.bulk.waitForCompletion(taskId, { timeoutMs: 60_000 });
|
|
398
|
+
* ```
|
|
399
|
+
*/
|
|
400
|
+
declare class BulkService extends BaseService {
|
|
272
401
|
/**
|
|
273
|
-
*
|
|
402
|
+
* Create multiple issues in a single request.
|
|
403
|
+
*
|
|
404
|
+
* `POST /rest/api/3/issue/bulk`
|
|
405
|
+
*
|
|
406
|
+
* @param input - The issues to create (1-1000 entries).
|
|
407
|
+
* @returns The created issues plus any per-element errors.
|
|
274
408
|
*/
|
|
275
|
-
|
|
276
|
-
enableUndo?: boolean;
|
|
277
|
-
}): Promise<void>;
|
|
409
|
+
createIssues(input: CreateIssuesInput): Promise<CreateIssuesResult>;
|
|
278
410
|
/**
|
|
279
|
-
*
|
|
411
|
+
* Delete multiple issues in a single request.
|
|
412
|
+
*
|
|
413
|
+
* `DELETE /rest/api/3/issue/bulk`
|
|
414
|
+
*
|
|
415
|
+
* Warning: this operation cannot be undone.
|
|
416
|
+
*
|
|
417
|
+
* @param input - The issue IDs or keys to delete (1-1000 entries).
|
|
418
|
+
* @returns Nothing; the endpoint responds with 204 No Content.
|
|
280
419
|
*/
|
|
281
|
-
|
|
420
|
+
deleteIssues(input: DeleteIssuesInput): Promise<void>;
|
|
282
421
|
/**
|
|
283
|
-
*
|
|
422
|
+
* Get the current progress of a long-running bulk operation.
|
|
423
|
+
*
|
|
424
|
+
* `GET /rest/api/3/task/{taskId}`
|
|
425
|
+
*
|
|
426
|
+
* @param taskId - The task identifier returned by the bulk operation.
|
|
427
|
+
* @returns The current progress of the task.
|
|
284
428
|
*/
|
|
285
|
-
|
|
429
|
+
getProgress(taskId: string): Promise<BulkOperationProgress>;
|
|
286
430
|
/**
|
|
287
|
-
*
|
|
431
|
+
* Poll a long-running bulk operation until it reaches a terminal state.
|
|
432
|
+
*
|
|
433
|
+
* Terminal states are `COMPLETE`, `FAILED` and `CANCELLED`. Unlike the Go
|
|
434
|
+
* SDK, this implementation supports both an `AbortSignal` and an overall
|
|
435
|
+
* timeout.
|
|
436
|
+
*
|
|
437
|
+
* `GET /rest/api/3/task/{taskId}` (polled)
|
|
438
|
+
*
|
|
439
|
+
* @param taskId - The task identifier returned by the bulk operation.
|
|
440
|
+
* @param options - Poll interval, overall timeout and abort signal.
|
|
441
|
+
* @returns The final progress of the task.
|
|
442
|
+
* @throws {AbortError} When `options.signal` is aborted.
|
|
443
|
+
* @throws {TimeoutError} When `options.timeoutMs` elapses first.
|
|
288
444
|
*/
|
|
289
|
-
|
|
290
|
-
expand?: string[];
|
|
291
|
-
properties?: string[];
|
|
292
|
-
}): Promise<Project[]>;
|
|
445
|
+
waitForCompletion(taskId: string, options?: WaitForCompletionOptions): Promise<BulkOperationProgress>;
|
|
293
446
|
}
|
|
294
447
|
|
|
295
448
|
/**
|
|
296
|
-
*
|
|
449
|
+
* Dashboard service for managing Jira dashboards and their gadgets
|
|
450
|
+
*
|
|
451
|
+
* @example
|
|
452
|
+
* ```typescript
|
|
453
|
+
* const client = new JiraClient({ ... });
|
|
454
|
+
*
|
|
455
|
+
* // List the current user's favourite dashboards
|
|
456
|
+
* const page = await client.dashboards.list({ filter: 'favourite' });
|
|
457
|
+
*
|
|
458
|
+
* // Add a gadget
|
|
459
|
+
* await client.dashboards.addGadget('10000', {
|
|
460
|
+
* moduleKey: 'com.atlassian.jira.gadgets:filter-results',
|
|
461
|
+
* position: { row: 0, column: 0 },
|
|
462
|
+
* });
|
|
463
|
+
* ```
|
|
297
464
|
*/
|
|
298
|
-
declare
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
465
|
+
declare class DashboardService extends BaseService {
|
|
466
|
+
/**
|
|
467
|
+
* List dashboards visible to the current user
|
|
468
|
+
*
|
|
469
|
+
* `GET /rest/api/3/dashboard`
|
|
470
|
+
*
|
|
471
|
+
* @param options - Filter (`favourite` / `my`) and pagination options
|
|
472
|
+
* @returns A page of dashboards
|
|
473
|
+
*/
|
|
474
|
+
list(options?: ListDashboardsOptions): Promise<DashboardListResult>;
|
|
475
|
+
/**
|
|
476
|
+
* Async iterator over every dashboard matching the given options
|
|
477
|
+
*
|
|
478
|
+
* @param options - List options (`startAt` is managed by the iterator)
|
|
479
|
+
* @returns An async generator yielding dashboards page by page
|
|
480
|
+
*
|
|
481
|
+
* @example
|
|
482
|
+
* ```typescript
|
|
483
|
+
* for await (const dashboard of client.dashboards.iterate()) {
|
|
484
|
+
* console.log(dashboard.id, dashboard.name);
|
|
485
|
+
* }
|
|
486
|
+
* ```
|
|
487
|
+
*/
|
|
488
|
+
iterate(options?: Omit<ListDashboardsOptions, 'startAt'>): AsyncGenerator<Dashboard, void, undefined>;
|
|
489
|
+
/**
|
|
490
|
+
* Collect every dashboard matching the given options into an array
|
|
491
|
+
*
|
|
492
|
+
* Loads all pages into memory — prefer `iterate()` for large result sets.
|
|
493
|
+
*
|
|
494
|
+
* @param options - List options (`startAt` is managed internally)
|
|
495
|
+
* @returns All matching dashboards
|
|
496
|
+
*/
|
|
497
|
+
all(options?: Omit<ListDashboardsOptions, 'startAt'>): Promise<Dashboard[]>;
|
|
498
|
+
/**
|
|
499
|
+
* Get a dashboard by ID
|
|
500
|
+
*
|
|
501
|
+
* `GET /rest/api/3/dashboard/{dashboardId}`
|
|
502
|
+
*
|
|
503
|
+
* @param dashboardId - ID of the dashboard
|
|
504
|
+
* @returns The requested dashboard
|
|
505
|
+
*/
|
|
506
|
+
get(dashboardId: string): Promise<Dashboard>;
|
|
507
|
+
/**
|
|
508
|
+
* Create a new dashboard
|
|
509
|
+
*
|
|
510
|
+
* `POST /rest/api/3/dashboard`
|
|
511
|
+
*
|
|
512
|
+
* @param input - Dashboard definition (name is required)
|
|
513
|
+
* @returns The created dashboard
|
|
514
|
+
*/
|
|
515
|
+
create(input: CreateDashboardInput): Promise<Dashboard>;
|
|
516
|
+
/**
|
|
517
|
+
* Update a dashboard
|
|
518
|
+
*
|
|
519
|
+
* `PUT /rest/api/3/dashboard/{dashboardId}`
|
|
520
|
+
*
|
|
521
|
+
* @param dashboardId - ID of the dashboard to update
|
|
522
|
+
* @param input - Fields to change
|
|
523
|
+
* @returns The updated dashboard
|
|
524
|
+
*/
|
|
525
|
+
update(dashboardId: string, input: UpdateDashboardInput): Promise<Dashboard>;
|
|
526
|
+
/**
|
|
527
|
+
* Delete a dashboard
|
|
528
|
+
*
|
|
529
|
+
* `DELETE /rest/api/3/dashboard/{dashboardId}`
|
|
530
|
+
*
|
|
531
|
+
* @param dashboardId - ID of the dashboard to delete
|
|
532
|
+
* @returns Nothing
|
|
533
|
+
*/
|
|
534
|
+
deleteDashboard(dashboardId: string): Promise<void>;
|
|
535
|
+
/**
|
|
536
|
+
* Copy an existing dashboard
|
|
537
|
+
*
|
|
538
|
+
* `POST /rest/api/3/dashboard/{dashboardId}/copy`
|
|
539
|
+
*
|
|
540
|
+
* @param dashboardId - ID of the dashboard to copy
|
|
541
|
+
* @param input - Definition of the copy (name is required)
|
|
542
|
+
* @returns The newly created dashboard
|
|
543
|
+
*/
|
|
544
|
+
copy(dashboardId: string, input: CreateDashboardInput): Promise<Dashboard>;
|
|
545
|
+
/**
|
|
546
|
+
* Get all gadgets on a dashboard
|
|
547
|
+
*
|
|
548
|
+
* `GET /rest/api/3/dashboard/{dashboardId}/gadget`
|
|
549
|
+
*
|
|
550
|
+
* @param dashboardId - ID of the dashboard
|
|
551
|
+
* @returns The dashboard's gadgets
|
|
552
|
+
*/
|
|
553
|
+
getGadgets(dashboardId: string): Promise<DashboardGadget[]>;
|
|
554
|
+
/**
|
|
555
|
+
* Add a gadget to a dashboard
|
|
556
|
+
*
|
|
557
|
+
* `POST /rest/api/3/dashboard/{dashboardId}/gadget`
|
|
558
|
+
*
|
|
559
|
+
* @param dashboardId - ID of the dashboard
|
|
560
|
+
* @param input - Gadget definition (module key is required)
|
|
561
|
+
* @returns The created gadget
|
|
562
|
+
*/
|
|
563
|
+
addGadget(dashboardId: string, input: AddGadgetInput): Promise<DashboardGadget>;
|
|
564
|
+
/**
|
|
565
|
+
* Update a gadget on a dashboard
|
|
566
|
+
*
|
|
567
|
+
* `PUT /rest/api/3/dashboard/{dashboardId}/gadget/{gadgetId}`
|
|
568
|
+
*
|
|
569
|
+
* Deviates from the Go SDK, which decodes a gadget from the response body.
|
|
570
|
+
* The endpoint is documented as returning `204 No Content`, so there is no
|
|
571
|
+
* body to decode and attempting to validate one fails against a live
|
|
572
|
+
* instance.
|
|
573
|
+
*
|
|
574
|
+
* @param dashboardId - ID of the dashboard
|
|
575
|
+
* @param gadgetId - ID of the gadget
|
|
576
|
+
* @param input - Fields to change (title, color, position)
|
|
577
|
+
* @returns Nothing; resolves once the gadget is updated
|
|
578
|
+
*/
|
|
579
|
+
updateGadget(dashboardId: string, gadgetId: number, input: UpdateGadgetInput): Promise<void>;
|
|
580
|
+
/**
|
|
581
|
+
* Remove a gadget from a dashboard
|
|
582
|
+
*
|
|
583
|
+
* `DELETE /rest/api/3/dashboard/{dashboardId}/gadget/{gadgetId}`
|
|
584
|
+
*
|
|
585
|
+
* @param dashboardId - ID of the dashboard
|
|
586
|
+
* @param gadgetId - ID of the gadget to remove
|
|
587
|
+
* @returns Nothing
|
|
588
|
+
*/
|
|
589
|
+
removeGadget(dashboardId: string, gadgetId: number): Promise<void>;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* Jira Expressions service.
|
|
594
|
+
*
|
|
595
|
+
* Jira expressions power custom automation and dynamic content. This service
|
|
596
|
+
* exposes the legacy evaluation endpoint, the Enhanced Search evaluation
|
|
597
|
+
* endpoint, and static analysis.
|
|
598
|
+
*
|
|
599
|
+
* @example
|
|
600
|
+
* ```typescript
|
|
601
|
+
* const client = new JiraClient({ ... });
|
|
602
|
+
*
|
|
603
|
+
* const result = await client.expressions.evaluateExpression({
|
|
604
|
+
* expression: 'issue.summary',
|
|
605
|
+
* context: { issue: { key: 'PROJ-123' } },
|
|
606
|
+
* });
|
|
607
|
+
*
|
|
608
|
+
* const analysis = await client.expressions.analyze({
|
|
609
|
+
* expressions: ['issue.summary', 'user.displayName'],
|
|
610
|
+
* });
|
|
611
|
+
* ```
|
|
612
|
+
*/
|
|
613
|
+
declare class ExpressionService extends BaseService {
|
|
614
|
+
/**
|
|
615
|
+
* Evaluate a Jira expression using the legacy endpoint.
|
|
616
|
+
*
|
|
617
|
+
* `POST /rest/api/3/expression/eval`
|
|
618
|
+
*
|
|
619
|
+
* @deprecated Use {@link ExpressionService.evaluateExpression} instead. Atlassian
|
|
620
|
+
* removed `/rest/api/3/expression/eval` on August 1, 2025; the replacement uses the
|
|
621
|
+
* Enhanced Search API (eventual consistency) for better performance and scalability.
|
|
622
|
+
*
|
|
623
|
+
* @param input - The expression and its evaluation context.
|
|
624
|
+
* @returns The evaluated value plus optional metadata and errors.
|
|
625
|
+
*/
|
|
626
|
+
evaluate(input: EvaluationInput): Promise<EvaluationResult>;
|
|
627
|
+
/**
|
|
628
|
+
* Evaluate a Jira expression using the Enhanced Search API.
|
|
629
|
+
*
|
|
630
|
+
* `POST /rest/api/3/expression/evaluate`
|
|
631
|
+
*
|
|
632
|
+
* Compared with {@link ExpressionService.evaluate} this endpoint offers better
|
|
633
|
+
* performance and scalability, at the cost of eventual rather than strong
|
|
634
|
+
* consistency. Input and output shapes are identical.
|
|
635
|
+
*
|
|
636
|
+
* @param input - The expression and its evaluation context.
|
|
637
|
+
* @returns The evaluated value plus optional metadata and errors.
|
|
638
|
+
*/
|
|
639
|
+
evaluateExpression(input: EvaluationInput): Promise<EvaluationResult>;
|
|
640
|
+
/**
|
|
641
|
+
* Analyse Jira expressions for syntax validity, type and complexity.
|
|
642
|
+
*
|
|
643
|
+
* `POST /rest/api/3/expression/analyse`
|
|
644
|
+
*
|
|
645
|
+
* @param input - One or more expressions plus an optional context.
|
|
646
|
+
* @returns One analysis entry per submitted expression.
|
|
647
|
+
*/
|
|
648
|
+
analyze(input: AnalysisInput): Promise<AnalysisResult>;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* Field service for managing Jira system and custom fields,
|
|
653
|
+
* their contexts, options and project associations.
|
|
654
|
+
*
|
|
655
|
+
* @example
|
|
656
|
+
* ```typescript
|
|
657
|
+
* const client = new JiraClient({ ... });
|
|
658
|
+
*
|
|
659
|
+
* // List all fields
|
|
660
|
+
* const fields = await client.fields.list();
|
|
661
|
+
*
|
|
662
|
+
* // Create a custom field, then associate its context with projects
|
|
663
|
+
* const field = await client.fields.create({
|
|
664
|
+
* name: 'Story Points',
|
|
665
|
+
* type: 'com.atlassian.jira.plugin.system.customfieldtypes:float',
|
|
666
|
+
* searcherKey: 'com.atlassian.jira.plugin.system.customfieldtypes:exactnumber',
|
|
667
|
+
* });
|
|
668
|
+
* const [context] = await client.fields.listContexts(field.id);
|
|
669
|
+
* await client.fields.associateContextProjects(field.id, context.id, {
|
|
670
|
+
* projectIds: ['10000'],
|
|
671
|
+
* });
|
|
672
|
+
* ```
|
|
673
|
+
*/
|
|
674
|
+
declare class FieldService extends BaseService {
|
|
675
|
+
/**
|
|
676
|
+
* Get all fields (system and custom)
|
|
677
|
+
*
|
|
678
|
+
* `GET /rest/api/3/field`
|
|
679
|
+
*
|
|
680
|
+
* @returns All fields visible to the caller
|
|
681
|
+
*/
|
|
682
|
+
list(): Promise<Field[]>;
|
|
683
|
+
/**
|
|
684
|
+
* Get a single field by ID or key
|
|
685
|
+
*
|
|
686
|
+
* `GET /rest/api/3/field/{fieldId}`
|
|
687
|
+
*
|
|
688
|
+
* @param fieldId - Field ID or key (e.g. `customfield_10000`)
|
|
689
|
+
* @returns The requested field
|
|
690
|
+
*/
|
|
691
|
+
get(fieldId: string): Promise<Field>;
|
|
692
|
+
/**
|
|
693
|
+
* Create a custom field
|
|
694
|
+
*
|
|
695
|
+
* `POST /rest/api/3/field`
|
|
696
|
+
*
|
|
697
|
+
* @param input - Name, type and searcher key of the new custom field
|
|
698
|
+
* @returns The created field
|
|
699
|
+
*/
|
|
700
|
+
create(input: CreateFieldInput): Promise<Field>;
|
|
701
|
+
/**
|
|
702
|
+
* Update a custom field
|
|
703
|
+
*
|
|
704
|
+
* `PUT /rest/api/3/field/{fieldId}`
|
|
705
|
+
*
|
|
706
|
+
* @param fieldId - Field ID or key
|
|
707
|
+
* @param input - Fields to update
|
|
708
|
+
* @returns The updated field
|
|
709
|
+
*/
|
|
710
|
+
update(fieldId: string, input: UpdateFieldInput): Promise<Field>;
|
|
711
|
+
/**
|
|
712
|
+
* Delete a custom field
|
|
713
|
+
*
|
|
714
|
+
* `DELETE /rest/api/3/field/{fieldId}`
|
|
715
|
+
*
|
|
716
|
+
* @param fieldId - Field ID or key
|
|
717
|
+
* @returns Nothing
|
|
718
|
+
*/
|
|
719
|
+
deleteField(fieldId: string): Promise<void>;
|
|
720
|
+
/**
|
|
721
|
+
* Get the contexts of a custom field
|
|
722
|
+
*
|
|
723
|
+
* `GET /rest/api/3/field/{fieldId}/context`
|
|
724
|
+
*
|
|
725
|
+
* @param fieldId - Field ID or key
|
|
726
|
+
* @returns The contexts defined for the field
|
|
727
|
+
*/
|
|
728
|
+
listContexts(fieldId: string): Promise<FieldContext[]>;
|
|
729
|
+
/**
|
|
730
|
+
* Create a context for a custom field
|
|
731
|
+
*
|
|
732
|
+
* `POST /rest/api/3/field/{fieldId}/context`
|
|
733
|
+
*
|
|
734
|
+
* @param fieldId - Field ID or key
|
|
735
|
+
* @param input - Context name plus optional project / issue type restrictions
|
|
736
|
+
* @returns The created context
|
|
737
|
+
*/
|
|
738
|
+
createContext(fieldId: string, input: CreateFieldContextInput): Promise<FieldContext>;
|
|
739
|
+
/**
|
|
740
|
+
* Update a custom field context
|
|
741
|
+
*
|
|
742
|
+
* `PUT /rest/api/3/field/{fieldId}/context/{contextId}`
|
|
743
|
+
*
|
|
744
|
+
* @param fieldId - Field ID or key
|
|
745
|
+
* @param contextId - Context ID
|
|
746
|
+
* @param input - Name and/or description to update
|
|
747
|
+
* @returns The updated context
|
|
748
|
+
*/
|
|
749
|
+
updateContext(fieldId: string, contextId: string, input: UpdateFieldContextInput): Promise<FieldContext>;
|
|
750
|
+
/**
|
|
751
|
+
* Delete a custom field context
|
|
752
|
+
*
|
|
753
|
+
* `DELETE /rest/api/3/field/{fieldId}/context/{contextId}`
|
|
754
|
+
*
|
|
755
|
+
* @param fieldId - Field ID or key
|
|
756
|
+
* @param contextId - Context ID
|
|
757
|
+
* @returns Nothing
|
|
758
|
+
*/
|
|
759
|
+
deleteContext(fieldId: string, contextId: string): Promise<void>;
|
|
760
|
+
/**
|
|
761
|
+
* Get the options of a select / multi-select custom field context
|
|
762
|
+
*
|
|
763
|
+
* `GET /rest/api/3/field/{fieldId}/context/{contextId}/option`
|
|
764
|
+
*
|
|
765
|
+
* @param fieldId - Field ID or key
|
|
766
|
+
* @param contextId - Context ID
|
|
767
|
+
* @returns The options defined for the context
|
|
768
|
+
*/
|
|
769
|
+
listOptions(fieldId: string, contextId: string): Promise<FieldOption[]>;
|
|
770
|
+
/**
|
|
771
|
+
* Create one or more options on a select / multi-select custom field context
|
|
772
|
+
*
|
|
773
|
+
* `POST /rest/api/3/field/{fieldId}/context/{contextId}/option`
|
|
774
|
+
*
|
|
775
|
+
* The endpoint is bulk in both directions: it takes `{ options: [...] }` and
|
|
776
|
+
* returns `{ options: [...] }`. The Go SDK posts a bare option object and
|
|
777
|
+
* decodes a bare option, which this endpoint rejects.
|
|
778
|
+
*
|
|
779
|
+
* @param fieldId - Field ID or key
|
|
780
|
+
* @param contextId - Context ID
|
|
781
|
+
* @param inputs - The options to create
|
|
782
|
+
* @returns The created options, in the order the API returned them
|
|
783
|
+
*/
|
|
784
|
+
createOptions(fieldId: string, contextId: string, inputs: CreateFieldOptionInput[]): Promise<FieldOption[]>;
|
|
785
|
+
/**
|
|
786
|
+
* Create a single option on a select / multi-select custom field context
|
|
787
|
+
*
|
|
788
|
+
* Convenience wrapper over {@link createOptions} for the common one-option
|
|
789
|
+
* case.
|
|
790
|
+
*
|
|
791
|
+
* @param fieldId - Field ID or key
|
|
792
|
+
* @param contextId - Context ID
|
|
793
|
+
* @param input - The option value
|
|
794
|
+
* @returns The created option
|
|
795
|
+
* @throws If the API reports success but returns no option
|
|
796
|
+
*/
|
|
797
|
+
createOption(fieldId: string, contextId: string, input: CreateFieldOptionInput): Promise<FieldOption>;
|
|
798
|
+
/**
|
|
799
|
+
* Associate projects with a custom field context
|
|
800
|
+
*
|
|
801
|
+
* `PUT /rest/api/3/field/{fieldId}/context/{contextId}/project`
|
|
802
|
+
*
|
|
803
|
+
* Required since Jira Cloud CHANGE-3033 (February 2026): creating a custom
|
|
804
|
+
* field no longer auto-associates it with projects.
|
|
805
|
+
*
|
|
806
|
+
* @param fieldId - Field ID or key
|
|
807
|
+
* @param contextId - Context ID
|
|
808
|
+
* @param input - The project IDs to associate (at least one)
|
|
809
|
+
* @returns Nothing
|
|
810
|
+
*/
|
|
811
|
+
associateContextProjects(fieldId: string, contextId: string, input: AssociateContextProjectsInput): Promise<void>;
|
|
812
|
+
/**
|
|
813
|
+
* Remove projects from a custom field context
|
|
814
|
+
*
|
|
815
|
+
* `POST /rest/api/3/field/{fieldId}/context/{contextId}/project/remove`
|
|
816
|
+
*
|
|
817
|
+
* @param fieldId - Field ID or key
|
|
818
|
+
* @param contextId - Context ID
|
|
819
|
+
* @param input - The project IDs to remove (at least one)
|
|
820
|
+
* @returns Nothing
|
|
821
|
+
*/
|
|
822
|
+
removeContextProjects(fieldId: string, contextId: string, input: RemoveContextProjectsInput): Promise<void>;
|
|
823
|
+
/**
|
|
824
|
+
* Get the context-to-project mappings of a custom field
|
|
825
|
+
*
|
|
826
|
+
* `GET /rest/api/3/field/{fieldId}/context/projectmapping`
|
|
827
|
+
*
|
|
828
|
+
* @param fieldId - Field ID or key
|
|
829
|
+
* @param options - Optional context ID filter and pagination
|
|
830
|
+
* @returns The context-to-project mappings
|
|
831
|
+
*/
|
|
832
|
+
getContextProjectMappings(fieldId: string, options?: GetContextProjectMappingsOptions): Promise<ContextProjectMapping[]>;
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
/**
|
|
836
|
+
* Filter service for managing Jira filters (saved JQL searches)
|
|
837
|
+
*
|
|
838
|
+
* @example
|
|
839
|
+
* ```typescript
|
|
840
|
+
* const client = new JiraClient({ ... });
|
|
841
|
+
*
|
|
842
|
+
* // Create a filter
|
|
843
|
+
* const filter = await client.filters.create({
|
|
844
|
+
* name: 'My Bugs',
|
|
845
|
+
* jql: 'project = PROJ AND type = Bug AND resolution = Unresolved',
|
|
846
|
+
* });
|
|
847
|
+
*
|
|
848
|
+
* // Iterate every filter the user can see
|
|
849
|
+
* for await (const f of client.filters.iterate()) {
|
|
850
|
+
* console.log(f.id, f.name);
|
|
851
|
+
* }
|
|
852
|
+
* ```
|
|
853
|
+
*/
|
|
854
|
+
declare class FilterService extends BaseService {
|
|
855
|
+
/**
|
|
856
|
+
* Get a filter by ID
|
|
857
|
+
*
|
|
858
|
+
* `GET /rest/api/3/filter/{filterId}`
|
|
859
|
+
*
|
|
860
|
+
* @param filterId - ID of the filter
|
|
861
|
+
* @param options - Optional expand and share-permission override
|
|
862
|
+
* @returns The requested filter
|
|
863
|
+
*/
|
|
864
|
+
get(filterId: string, options?: GetFilterOptions): Promise<Filter>;
|
|
865
|
+
/**
|
|
866
|
+
* Create a new filter
|
|
867
|
+
*
|
|
868
|
+
* `POST /rest/api/3/filter`
|
|
869
|
+
*
|
|
870
|
+
* @param input - Filter definition (name and JQL are required)
|
|
871
|
+
* @returns The created filter
|
|
872
|
+
*/
|
|
873
|
+
create(input: CreateFilterInput): Promise<Filter>;
|
|
874
|
+
/**
|
|
875
|
+
* Update an existing filter
|
|
876
|
+
*
|
|
877
|
+
* `PUT /rest/api/3/filter/{filterId}`
|
|
878
|
+
*
|
|
879
|
+
* @param filterId - ID of the filter to update
|
|
880
|
+
* @param input - Fields to change
|
|
881
|
+
* @returns The updated filter
|
|
882
|
+
*/
|
|
883
|
+
update(filterId: string, input: UpdateFilterInput): Promise<Filter>;
|
|
884
|
+
/**
|
|
885
|
+
* Delete a filter
|
|
886
|
+
*
|
|
887
|
+
* `DELETE /rest/api/3/filter/{filterId}`
|
|
888
|
+
*
|
|
889
|
+
* @param filterId - ID of the filter to delete
|
|
890
|
+
* @returns Nothing
|
|
891
|
+
*/
|
|
892
|
+
deleteFilter(filterId: string): Promise<void>;
|
|
893
|
+
/**
|
|
894
|
+
* Search filters with optional filtering and pagination
|
|
895
|
+
*
|
|
896
|
+
* `GET /rest/api/3/filter/search`
|
|
897
|
+
*
|
|
898
|
+
* @param options - Search, sort and pagination options
|
|
899
|
+
* @returns A page of filters
|
|
900
|
+
*/
|
|
901
|
+
list(options?: ListFiltersOptions): Promise<FilterSearchResult>;
|
|
902
|
+
/**
|
|
903
|
+
* Async iterator over every filter matching the given options
|
|
904
|
+
*
|
|
905
|
+
* @param options - Search options (`startAt` is managed by the iterator)
|
|
906
|
+
* @returns An async generator yielding filters page by page
|
|
907
|
+
*
|
|
908
|
+
* @example
|
|
909
|
+
* ```typescript
|
|
910
|
+
* for await (const filter of client.filters.iterate({ filterName: 'bug' })) {
|
|
911
|
+
* console.log(filter.name);
|
|
912
|
+
* }
|
|
913
|
+
* ```
|
|
914
|
+
*/
|
|
915
|
+
iterate(options?: Omit<ListFiltersOptions, 'startAt'>): AsyncGenerator<Filter, void, undefined>;
|
|
916
|
+
/**
|
|
917
|
+
* Collect every filter matching the given options into an array
|
|
918
|
+
*
|
|
919
|
+
* Loads all pages into memory — prefer `iterate()` for large result sets.
|
|
920
|
+
*
|
|
921
|
+
* @param options - Search options (`startAt` is managed internally)
|
|
922
|
+
* @returns All matching filters
|
|
923
|
+
*/
|
|
924
|
+
all(options?: Omit<ListFiltersOptions, 'startAt'>): Promise<Filter[]>;
|
|
925
|
+
/**
|
|
926
|
+
* Get the current user's favourite filters
|
|
927
|
+
*
|
|
928
|
+
* `GET /rest/api/3/filter/favourite`
|
|
929
|
+
*
|
|
930
|
+
* @param options - Optional expand
|
|
931
|
+
* @returns The current user's favourite filters
|
|
932
|
+
*/
|
|
933
|
+
getFavorites(options?: {
|
|
934
|
+
expand?: string[];
|
|
935
|
+
}): Promise<Filter[]>;
|
|
936
|
+
/**
|
|
937
|
+
* Get filters owned by the current user
|
|
938
|
+
*
|
|
939
|
+
* `GET /rest/api/3/filter/my`
|
|
940
|
+
*
|
|
941
|
+
* @param options - Optional expand and whether to include favourites
|
|
942
|
+
* @returns Filters owned by the current user
|
|
943
|
+
*/
|
|
944
|
+
getMyFilters(options?: GetMyFiltersOptions): Promise<Filter[]>;
|
|
945
|
+
/**
|
|
946
|
+
* Mark a filter as a favourite of the current user
|
|
947
|
+
*
|
|
948
|
+
* `PUT /rest/api/3/filter/{filterId}/favourite`
|
|
949
|
+
*
|
|
950
|
+
* @param filterId - ID of the filter
|
|
951
|
+
* @returns The updated filter
|
|
952
|
+
*/
|
|
953
|
+
setFavorite(filterId: string): Promise<Filter>;
|
|
954
|
+
/**
|
|
955
|
+
* Remove a filter from the current user's favourites
|
|
956
|
+
*
|
|
957
|
+
* `DELETE /rest/api/3/filter/{filterId}/favourite`
|
|
958
|
+
*
|
|
959
|
+
* @param filterId - ID of the filter
|
|
960
|
+
* @returns The updated filter
|
|
961
|
+
*/
|
|
962
|
+
removeFavorite(filterId: string): Promise<Filter>;
|
|
963
|
+
/**
|
|
964
|
+
* Get the default share scope for the current user
|
|
965
|
+
*
|
|
966
|
+
* `GET /rest/api/3/filter/defaultShareScope`
|
|
967
|
+
*
|
|
968
|
+
* @returns The default share scope (`GLOBAL`, `AUTHENTICATED` or `PRIVATE`)
|
|
969
|
+
*/
|
|
970
|
+
getDefaultShareScope(): Promise<FilterShareScope>;
|
|
971
|
+
/**
|
|
972
|
+
* Set the default share scope for the current user
|
|
973
|
+
*
|
|
974
|
+
* `PUT /rest/api/3/filter/defaultShareScope`
|
|
975
|
+
*
|
|
976
|
+
* @param scope - The scope to set (`GLOBAL`, `AUTHENTICATED` or `PRIVATE`)
|
|
977
|
+
* @returns Nothing
|
|
978
|
+
*/
|
|
979
|
+
setDefaultShareScope(scope: FilterShareScope): Promise<void>;
|
|
980
|
+
/**
|
|
981
|
+
* Get a single share permission of a filter
|
|
982
|
+
*
|
|
983
|
+
* `GET /rest/api/3/filter/{filterId}/permission/{permissionId}`
|
|
984
|
+
*
|
|
985
|
+
* @param filterId - ID of the filter
|
|
986
|
+
* @param permissionId - ID of the share permission
|
|
987
|
+
* @returns The share permission
|
|
988
|
+
*/
|
|
989
|
+
getSharePermission(filterId: string, permissionId: number): Promise<FilterPermission>;
|
|
990
|
+
/**
|
|
991
|
+
* Add a share permission to a filter
|
|
992
|
+
*
|
|
993
|
+
* `POST /rest/api/3/filter/{filterId}/permission`
|
|
994
|
+
*
|
|
995
|
+
* @param filterId - ID of the filter
|
|
996
|
+
* @param input - Share permission to add (`type` is required)
|
|
997
|
+
* @returns The filter's share permissions after the addition
|
|
998
|
+
*/
|
|
999
|
+
addSharePermission(filterId: string, input: AddSharePermissionInput): Promise<FilterPermission[]>;
|
|
1000
|
+
/**
|
|
1001
|
+
* Remove a share permission from a filter
|
|
1002
|
+
*
|
|
1003
|
+
* `DELETE /rest/api/3/filter/{filterId}/permission/{permissionId}`
|
|
1004
|
+
*
|
|
1005
|
+
* @param filterId - ID of the filter
|
|
1006
|
+
* @param permissionId - ID of the share permission to remove
|
|
1007
|
+
* @returns Nothing
|
|
1008
|
+
*/
|
|
1009
|
+
deleteSharePermission(filterId: string, permissionId: number): Promise<void>;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
/**
|
|
1013
|
+
* Group service for managing Jira groups and their membership.
|
|
1014
|
+
*
|
|
1015
|
+
* Every method takes an options object rather than positional identifiers,
|
|
1016
|
+
* mirroring the Go SDK — most group endpoints accept either a group name or
|
|
1017
|
+
* a group ID.
|
|
1018
|
+
*
|
|
1019
|
+
* @example
|
|
1020
|
+
* ```typescript
|
|
1021
|
+
* const client = new JiraClient({ ... });
|
|
1022
|
+
*
|
|
1023
|
+
* // Search for groups
|
|
1024
|
+
* const groups = await client.groups.find({ query: 'jira', maxResults: 50 });
|
|
1025
|
+
*
|
|
1026
|
+
* // Read a group and its members
|
|
1027
|
+
* const group = await client.groups.get({ groupname: 'jira-administrators', expand: ['users'] });
|
|
1028
|
+
*
|
|
1029
|
+
* // Iterate every member
|
|
1030
|
+
* for await (const user of client.groups.iterateMembers({ groupname: 'jira-users' })) {
|
|
1031
|
+
* console.log(user.accountId);
|
|
1032
|
+
* }
|
|
1033
|
+
* ```
|
|
1034
|
+
*/
|
|
1035
|
+
declare class GroupService extends BaseService {
|
|
1036
|
+
/**
|
|
1037
|
+
* Search for groups whose name matches a query.
|
|
1038
|
+
*
|
|
1039
|
+
* `GET /rest/api/3/groups/picker`
|
|
1040
|
+
*
|
|
1041
|
+
* @param options - Query string, exclusions, page size and an optional user filter
|
|
1042
|
+
* @returns The matching groups
|
|
1043
|
+
*/
|
|
1044
|
+
find(options?: FindGroupsOptions): Promise<Group[]>;
|
|
1045
|
+
/**
|
|
1046
|
+
* Get a single group, optionally expanding its users.
|
|
1047
|
+
*
|
|
1048
|
+
* `GET /rest/api/3/group`
|
|
1049
|
+
*
|
|
1050
|
+
* @param options - One of `groupname` or `groupId`, plus optional `expand`
|
|
1051
|
+
* @returns The group
|
|
1052
|
+
*/
|
|
1053
|
+
get(options: GetGroupOptions): Promise<Group>;
|
|
1054
|
+
/**
|
|
1055
|
+
* Create a group.
|
|
1056
|
+
*
|
|
1057
|
+
* `POST /rest/api/3/group`
|
|
1058
|
+
*
|
|
1059
|
+
* @param input - The name of the group to create
|
|
1060
|
+
* @returns The created group
|
|
1061
|
+
*/
|
|
1062
|
+
create(input: CreateGroupInput): Promise<Group>;
|
|
1063
|
+
/**
|
|
1064
|
+
* Delete a group.
|
|
1065
|
+
*
|
|
1066
|
+
* `DELETE /rest/api/3/group`
|
|
1067
|
+
*
|
|
1068
|
+
* @param options - One of `groupname` or `groupId`
|
|
1069
|
+
* @returns Nothing
|
|
1070
|
+
*/
|
|
1071
|
+
deleteGroup(options: DeleteGroupOptions): Promise<void>;
|
|
1072
|
+
/**
|
|
1073
|
+
* Get the members of a group.
|
|
1074
|
+
*
|
|
1075
|
+
* `GET /rest/api/3/group/member`
|
|
1076
|
+
*
|
|
1077
|
+
* @param options - One of `groupname` or `groupId`, plus pagination options
|
|
1078
|
+
* @returns The members on the requested page
|
|
1079
|
+
*/
|
|
1080
|
+
getMembers(options: GetGroupMembersOptions): Promise<GroupUser[]>;
|
|
1081
|
+
/**
|
|
1082
|
+
* Async iterator over every member of a group, paging transparently.
|
|
1083
|
+
*
|
|
1084
|
+
* `GET /rest/api/3/group/member`
|
|
1085
|
+
*
|
|
1086
|
+
* @param options - Group identifier and page size (`startAt` is managed by the iterator)
|
|
1087
|
+
* @returns An async generator yielding group members
|
|
1088
|
+
*/
|
|
1089
|
+
iterateMembers(options: Omit<GetGroupMembersOptions, 'startAt'>): AsyncGenerator<GroupUser, void, undefined>;
|
|
1090
|
+
/**
|
|
1091
|
+
* Collect every member of a group into an array.
|
|
1092
|
+
*
|
|
1093
|
+
* `GET /rest/api/3/group/member`
|
|
1094
|
+
*
|
|
1095
|
+
* @param options - Group identifier and page size
|
|
1096
|
+
* @returns All members across all pages
|
|
1097
|
+
*/
|
|
1098
|
+
allMembers(options: Omit<GetGroupMembersOptions, 'startAt'>): Promise<GroupUser[]>;
|
|
1099
|
+
/**
|
|
1100
|
+
* Add a user to a group.
|
|
1101
|
+
*
|
|
1102
|
+
* `POST /rest/api/3/group/user`
|
|
1103
|
+
*
|
|
1104
|
+
* @param options - Group identifier plus the `accountId` of the user to add
|
|
1105
|
+
* @returns The updated group
|
|
1106
|
+
*/
|
|
1107
|
+
addUser(options: AddGroupUserOptions): Promise<Group>;
|
|
1108
|
+
/**
|
|
1109
|
+
* Remove a user from a group.
|
|
1110
|
+
*
|
|
1111
|
+
* `DELETE /rest/api/3/group/user`
|
|
1112
|
+
*
|
|
1113
|
+
* @param options - Group identifier plus one of `accountId` or `username`
|
|
1114
|
+
* @returns Nothing
|
|
1115
|
+
*/
|
|
1116
|
+
removeUser(options: RemoveGroupUserOptions): Promise<void>;
|
|
1117
|
+
/**
|
|
1118
|
+
* Get multiple groups by name or ID.
|
|
1119
|
+
*
|
|
1120
|
+
* `GET /rest/api/3/group/bulk`
|
|
1121
|
+
*
|
|
1122
|
+
* @param options - `groupName` and/or `groupId` lists, plus pagination options
|
|
1123
|
+
* @returns The groups on the requested page
|
|
1124
|
+
*/
|
|
1125
|
+
bulkGet(options: BulkGetGroupsOptions): Promise<Group[]>;
|
|
1126
|
+
/**
|
|
1127
|
+
* Async iterator over every group matched by a bulk lookup.
|
|
1128
|
+
*
|
|
1129
|
+
* `GET /rest/api/3/group/bulk`
|
|
1130
|
+
*
|
|
1131
|
+
* @param options - Group name/ID lists and page size (`startAt` is managed by the iterator)
|
|
1132
|
+
* @returns An async generator yielding groups
|
|
1133
|
+
*/
|
|
1134
|
+
iterateBulk(options: Omit<BulkGetGroupsOptions, 'startAt'>): AsyncGenerator<Group, void, undefined>;
|
|
1135
|
+
/**
|
|
1136
|
+
* Collect every group matched by a bulk lookup into an array.
|
|
1137
|
+
*
|
|
1138
|
+
* `GET /rest/api/3/group/bulk`
|
|
1139
|
+
*
|
|
1140
|
+
* @param options - Group name/ID lists and page size
|
|
1141
|
+
* @returns All matching groups across all pages
|
|
1142
|
+
*/
|
|
1143
|
+
allBulk(options: Omit<BulkGetGroupsOptions, 'startAt'>): Promise<Group[]>;
|
|
1144
|
+
/**
|
|
1145
|
+
* Fetch a single page of group members, including its pagination metadata.
|
|
1146
|
+
*/
|
|
1147
|
+
private getMembersPage;
|
|
1148
|
+
/**
|
|
1149
|
+
* Fetch a single page of bulk group results, including its pagination metadata.
|
|
1150
|
+
*/
|
|
1151
|
+
private bulkGetPage;
|
|
1152
|
+
/**
|
|
1153
|
+
* Guard shared by the endpoints that accept either a group name or a group ID.
|
|
1154
|
+
*/
|
|
1155
|
+
private requireGroupIdentifier;
|
|
1156
|
+
/**
|
|
1157
|
+
* Decide whether a page is the final one.
|
|
1158
|
+
*/
|
|
1159
|
+
private isLastPage;
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
/**
|
|
1163
|
+
* Issue service for CRUD operations on Jira issues
|
|
1164
|
+
*
|
|
1165
|
+
* @example
|
|
1166
|
+
* ```typescript
|
|
1167
|
+
* const client = new JiraClient({ ... });
|
|
1168
|
+
*
|
|
1169
|
+
* // Get an issue
|
|
1170
|
+
* const issue = await client.issues.get('PROJECT-123');
|
|
1171
|
+
*
|
|
1172
|
+
* // Create an issue
|
|
1173
|
+
* const newIssue = await client.issues.create({
|
|
1174
|
+
* fields: {
|
|
1175
|
+
* project: { key: 'PROJECT' },
|
|
1176
|
+
* summary: 'New issue',
|
|
1177
|
+
* issuetype: { name: 'Task' },
|
|
1178
|
+
* },
|
|
1179
|
+
* });
|
|
1180
|
+
*
|
|
1181
|
+
* // Update an issue
|
|
1182
|
+
* await client.issues.update('PROJECT-123', {
|
|
1183
|
+
* fields: { summary: 'Updated summary' },
|
|
1184
|
+
* });
|
|
1185
|
+
*
|
|
1186
|
+
* // Delete an issue
|
|
1187
|
+
* await client.issues.delete('PROJECT-123');
|
|
1188
|
+
* ```
|
|
1189
|
+
*/
|
|
1190
|
+
declare class IssueService extends BaseService {
|
|
1191
|
+
/**
|
|
1192
|
+
* Get an issue by key or ID
|
|
1193
|
+
*/
|
|
1194
|
+
get(issueIdOrKey: string, options?: GetIssueOptions): Promise<Issue>;
|
|
1195
|
+
/**
|
|
1196
|
+
* Create a new issue
|
|
1197
|
+
*/
|
|
1198
|
+
create(input: CreateIssueInput): Promise<CreateIssueResponse>;
|
|
1199
|
+
/**
|
|
1200
|
+
* Update an issue
|
|
1201
|
+
*/
|
|
1202
|
+
update(issueIdOrKey: string, input: UpdateIssueInput, options?: {
|
|
1203
|
+
notifyUsers?: boolean;
|
|
1204
|
+
overrideScreenSecurity?: boolean;
|
|
1205
|
+
overrideEditableFlag?: boolean;
|
|
1206
|
+
}): Promise<void>;
|
|
1207
|
+
/**
|
|
1208
|
+
* Delete an issue
|
|
1209
|
+
*/
|
|
1210
|
+
deleteIssue(issueIdOrKey: string, options?: {
|
|
1211
|
+
deleteSubtasks?: boolean;
|
|
1212
|
+
}): Promise<void>;
|
|
1213
|
+
/**
|
|
1214
|
+
* Get comments for an issue
|
|
1215
|
+
*/
|
|
1216
|
+
getComments(issueIdOrKey: string, options?: {
|
|
1217
|
+
startAt?: number;
|
|
1218
|
+
maxResults?: number;
|
|
1219
|
+
orderBy?: string;
|
|
1220
|
+
expand?: string[];
|
|
1221
|
+
}): Promise<CommentsPage>;
|
|
1222
|
+
/**
|
|
1223
|
+
* Get a specific comment
|
|
1224
|
+
*/
|
|
1225
|
+
getComment(issueIdOrKey: string, commentId: string, options?: {
|
|
1226
|
+
expand?: string[];
|
|
1227
|
+
}): Promise<Comment>;
|
|
1228
|
+
/**
|
|
1229
|
+
* Add a comment to an issue
|
|
1230
|
+
*/
|
|
1231
|
+
addComment(issueIdOrKey: string, input: AddCommentInput, options?: {
|
|
1232
|
+
expand?: string[];
|
|
1233
|
+
}): Promise<Comment>;
|
|
1234
|
+
/**
|
|
1235
|
+
* Update a comment
|
|
1236
|
+
*/
|
|
1237
|
+
updateComment(issueIdOrKey: string, commentId: string, input: UpdateCommentInput, options?: {
|
|
1238
|
+
expand?: string[];
|
|
1239
|
+
}): Promise<Comment>;
|
|
1240
|
+
/**
|
|
1241
|
+
* Delete a comment
|
|
1242
|
+
*/
|
|
1243
|
+
deleteComment(issueIdOrKey: string, commentId: string): Promise<void>;
|
|
1244
|
+
/**
|
|
1245
|
+
* Get available transitions for an issue
|
|
1246
|
+
*/
|
|
1247
|
+
getTransitions(issueIdOrKey: string, options?: {
|
|
1248
|
+
expand?: string[];
|
|
1249
|
+
transitionId?: string;
|
|
1250
|
+
}): Promise<TransitionsResponse>;
|
|
1251
|
+
/**
|
|
1252
|
+
* Transition an issue to a new status
|
|
1253
|
+
*/
|
|
1254
|
+
doTransition(issueIdOrKey: string, input: DoTransitionInput): Promise<void>;
|
|
1255
|
+
/**
|
|
1256
|
+
* Get watchers for an issue
|
|
1257
|
+
*/
|
|
1258
|
+
getWatchers(issueIdOrKey: string): Promise<Watchers>;
|
|
1259
|
+
/**
|
|
1260
|
+
* Add a watcher to an issue
|
|
1261
|
+
*/
|
|
1262
|
+
addWatcher(issueIdOrKey: string, accountId: string): Promise<void>;
|
|
1263
|
+
/**
|
|
1264
|
+
* Remove a watcher from an issue
|
|
1265
|
+
*/
|
|
1266
|
+
removeWatcher(issueIdOrKey: string, accountId: string): Promise<void>;
|
|
1267
|
+
/**
|
|
1268
|
+
* Get worklogs for an issue
|
|
1269
|
+
*/
|
|
1270
|
+
getWorklogs(issueIdOrKey: string, options?: {
|
|
1271
|
+
startAt?: number;
|
|
1272
|
+
maxResults?: number;
|
|
1273
|
+
startedAfter?: number;
|
|
1274
|
+
startedBefore?: number;
|
|
1275
|
+
expand?: string[];
|
|
1276
|
+
}): Promise<WorklogsPage>;
|
|
1277
|
+
/**
|
|
1278
|
+
* Get a specific worklog
|
|
1279
|
+
*/
|
|
1280
|
+
getWorklog(issueIdOrKey: string, worklogId: string, options?: {
|
|
1281
|
+
expand?: string[];
|
|
1282
|
+
}): Promise<Worklog>;
|
|
1283
|
+
/**
|
|
1284
|
+
* Add a worklog to an issue
|
|
1285
|
+
*/
|
|
1286
|
+
addWorklog(issueIdOrKey: string, input: AddWorklogInput, options?: {
|
|
1287
|
+
notifyUsers?: boolean;
|
|
1288
|
+
adjustEstimate?: 'new' | 'leave' | 'manual' | 'auto';
|
|
1289
|
+
newEstimate?: string;
|
|
1290
|
+
reduceBy?: string;
|
|
1291
|
+
expand?: string[];
|
|
1292
|
+
}): Promise<Worklog>;
|
|
1293
|
+
/**
|
|
1294
|
+
* Update a worklog
|
|
1295
|
+
*/
|
|
1296
|
+
updateWorklog(issueIdOrKey: string, worklogId: string, input: UpdateWorklogInput, options?: {
|
|
1297
|
+
notifyUsers?: boolean;
|
|
1298
|
+
adjustEstimate?: 'new' | 'leave' | 'manual' | 'auto';
|
|
1299
|
+
newEstimate?: string;
|
|
1300
|
+
expand?: string[];
|
|
1301
|
+
}): Promise<Worklog>;
|
|
1302
|
+
/**
|
|
1303
|
+
* Delete a worklog
|
|
1304
|
+
*/
|
|
1305
|
+
deleteWorklog(issueIdOrKey: string, worklogId: string, options?: {
|
|
1306
|
+
notifyUsers?: boolean;
|
|
1307
|
+
adjustEstimate?: 'new' | 'leave' | 'manual' | 'auto';
|
|
1308
|
+
newEstimate?: string;
|
|
1309
|
+
increaseBy?: string;
|
|
1310
|
+
}): Promise<void>;
|
|
1311
|
+
/**
|
|
1312
|
+
* Add your vote to an issue
|
|
1313
|
+
*/
|
|
1314
|
+
addVote(issueIdOrKey: string): Promise<void>;
|
|
1315
|
+
/**
|
|
1316
|
+
* Remove your vote from an issue
|
|
1317
|
+
*/
|
|
1318
|
+
removeVote(issueIdOrKey: string): Promise<void>;
|
|
1319
|
+
/**
|
|
1320
|
+
* Add an attachment to an issue
|
|
1321
|
+
*
|
|
1322
|
+
* @param issueIdOrKey - Issue ID or key
|
|
1323
|
+
* @param file - File or Blob to upload
|
|
1324
|
+
* @param filename - Optional filename (defaults to File.name or 'attachment')
|
|
1325
|
+
* @returns Array of created attachments
|
|
1326
|
+
*
|
|
1327
|
+
* @example
|
|
1328
|
+
* ```typescript
|
|
1329
|
+
* const file = new File(['content'], 'document.txt', { type: 'text/plain' });
|
|
1330
|
+
* const attachments = await client.issues.addAttachment('PROJECT-123', file);
|
|
1331
|
+
* ```
|
|
1332
|
+
*/
|
|
1333
|
+
addAttachment(issueIdOrKey: string, file: File | Blob, filename?: string): Promise<Attachment[]>;
|
|
1334
|
+
/**
|
|
1335
|
+
* Get attachment metadata by ID
|
|
1336
|
+
*
|
|
1337
|
+
* @param attachmentId - Attachment ID
|
|
1338
|
+
* @returns Attachment metadata
|
|
1339
|
+
*/
|
|
1340
|
+
getAttachment(attachmentId: string): Promise<AttachmentMetadata>;
|
|
1341
|
+
/**
|
|
1342
|
+
* Download attachment content
|
|
1343
|
+
*
|
|
1344
|
+
* @param attachmentId - Attachment ID
|
|
1345
|
+
* @returns Blob containing the attachment content
|
|
1346
|
+
*/
|
|
1347
|
+
downloadAttachment(attachmentId: string): Promise<Blob>;
|
|
1348
|
+
/**
|
|
1349
|
+
* Delete an attachment
|
|
1350
|
+
*
|
|
1351
|
+
* @param attachmentId - Attachment ID
|
|
1352
|
+
*/
|
|
1353
|
+
deleteAttachment(attachmentId: string): Promise<void>;
|
|
1354
|
+
/**
|
|
1355
|
+
* Get all links for an issue
|
|
1356
|
+
*
|
|
1357
|
+
* @param issueIdOrKey - Issue ID or key
|
|
1358
|
+
* @returns Array of issue links
|
|
1359
|
+
*/
|
|
1360
|
+
getIssueLinks(issueIdOrKey: string): Promise<IssueLink[]>;
|
|
1361
|
+
/**
|
|
1362
|
+
* Create a link between two issues
|
|
1363
|
+
*
|
|
1364
|
+
* @param input - Issue link creation input
|
|
1365
|
+
*
|
|
1366
|
+
* @example
|
|
1367
|
+
* ```typescript
|
|
1368
|
+
* await client.issues.createIssueLink({
|
|
1369
|
+
* type: { name: 'Blocks' },
|
|
1370
|
+
* inwardIssue: { key: 'PROJECT-123' },
|
|
1371
|
+
* outwardIssue: { key: 'PROJECT-456' },
|
|
1372
|
+
* });
|
|
1373
|
+
* ```
|
|
1374
|
+
*/
|
|
1375
|
+
createIssueLink(input: CreateIssueLinkInput): Promise<void>;
|
|
1376
|
+
/**
|
|
1377
|
+
* Get an issue link by ID
|
|
1378
|
+
*
|
|
1379
|
+
* @param linkId - Issue link ID
|
|
1380
|
+
* @returns Issue link
|
|
1381
|
+
*/
|
|
1382
|
+
getIssueLink(linkId: string): Promise<IssueLink>;
|
|
1383
|
+
/**
|
|
1384
|
+
* Delete an issue link
|
|
1385
|
+
*
|
|
1386
|
+
* @param linkId - Issue link ID
|
|
1387
|
+
*/
|
|
1388
|
+
deleteIssueLink(linkId: string): Promise<void>;
|
|
1389
|
+
/**
|
|
1390
|
+
* List all available issue link types
|
|
1391
|
+
*
|
|
1392
|
+
* @deprecated Prefer `client.issueLinkTypes.list()`. Issue link types are
|
|
1393
|
+
* instance-level configuration rather than a property of an issue; the
|
|
1394
|
+
* dedicated service also offers create/update/delete. Kept for
|
|
1395
|
+
* compatibility.
|
|
1396
|
+
*
|
|
1397
|
+
* @returns Issue link types response
|
|
1398
|
+
*/
|
|
1399
|
+
listIssueLinkTypes(): Promise<IssueLinkTypesResponse>;
|
|
1400
|
+
/**
|
|
1401
|
+
* Get a specific issue link type
|
|
1402
|
+
*
|
|
1403
|
+
* @deprecated Prefer `client.issueLinkTypes.get()`. Kept for compatibility.
|
|
1404
|
+
*
|
|
1405
|
+
* @param linkTypeId - Issue link type ID
|
|
1406
|
+
* @returns Issue link type
|
|
1407
|
+
*/
|
|
1408
|
+
getIssueLinkType(linkTypeId: string): Promise<IssueLinkType>;
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
/**
|
|
1412
|
+
* Issue link type service for managing the relationship types
|
|
1413
|
+
* available when linking issues.
|
|
1414
|
+
*
|
|
1415
|
+
* @example
|
|
1416
|
+
* ```typescript
|
|
1417
|
+
* const client = new JiraClient({ ... });
|
|
1418
|
+
*
|
|
1419
|
+
* const linkTypes = await client.issueLinkTypes.list();
|
|
1420
|
+
*
|
|
1421
|
+
* const created = await client.issueLinkTypes.create({
|
|
1422
|
+
* name: 'Dependency',
|
|
1423
|
+
* inward: 'depends on',
|
|
1424
|
+
* outward: 'is depended on by',
|
|
1425
|
+
* });
|
|
1426
|
+
* ```
|
|
1427
|
+
*/
|
|
1428
|
+
declare class IssueLinkTypeService extends BaseService {
|
|
1429
|
+
/**
|
|
1430
|
+
* Get all issue link types
|
|
1431
|
+
*
|
|
1432
|
+
* `GET /rest/api/3/issueLinkType`
|
|
1433
|
+
*
|
|
1434
|
+
* @returns All issue link types configured on the instance
|
|
1435
|
+
*/
|
|
1436
|
+
list(): Promise<IssueLinkType[]>;
|
|
1437
|
+
/**
|
|
1438
|
+
* Get a single issue link type by ID
|
|
1439
|
+
*
|
|
1440
|
+
* `GET /rest/api/3/issueLinkType/{issueLinkTypeId}`
|
|
1441
|
+
*
|
|
1442
|
+
* @param issueLinkTypeId - Issue link type ID
|
|
1443
|
+
* @returns The requested issue link type
|
|
1444
|
+
*/
|
|
1445
|
+
get(issueLinkTypeId: string): Promise<IssueLinkType>;
|
|
1446
|
+
/**
|
|
1447
|
+
* Create an issue link type
|
|
1448
|
+
*
|
|
1449
|
+
* `POST /rest/api/3/issueLinkType`
|
|
1450
|
+
*
|
|
1451
|
+
* @param input - Name plus the inward and outward descriptions
|
|
1452
|
+
* @returns The created issue link type
|
|
1453
|
+
*/
|
|
1454
|
+
create(input: CreateIssueLinkTypeInput): Promise<IssueLinkType>;
|
|
1455
|
+
/**
|
|
1456
|
+
* Update an issue link type
|
|
1457
|
+
*
|
|
1458
|
+
* `PUT /rest/api/3/issueLinkType/{issueLinkTypeId}`
|
|
1459
|
+
*
|
|
1460
|
+
* @param issueLinkTypeId - Issue link type ID
|
|
1461
|
+
* @param input - Fields to update
|
|
1462
|
+
* @returns The updated issue link type
|
|
1463
|
+
*/
|
|
1464
|
+
update(issueLinkTypeId: string, input: UpdateIssueLinkTypeInput): Promise<IssueLinkType>;
|
|
1465
|
+
/**
|
|
1466
|
+
* Delete an issue link type
|
|
1467
|
+
*
|
|
1468
|
+
* `DELETE /rest/api/3/issueLinkType/{issueLinkTypeId}`
|
|
1469
|
+
*
|
|
1470
|
+
* @param issueLinkTypeId - Issue link type ID
|
|
1471
|
+
* @returns Nothing
|
|
1472
|
+
*/
|
|
1473
|
+
deleteIssueLinkType(issueLinkTypeId: string): Promise<void>;
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
/**
|
|
1477
|
+
* Issue type service for managing Jira issue types and issue type schemes.
|
|
1478
|
+
*
|
|
1479
|
+
* @example
|
|
1480
|
+
* ```typescript
|
|
1481
|
+
* const client = new JiraClient({ ... });
|
|
1482
|
+
*
|
|
1483
|
+
* // Create an issue type and add it to a scheme
|
|
1484
|
+
* const issueType = await client.issueTypes.create({ name: 'Incident', type: 'standard' });
|
|
1485
|
+
* await client.issueTypes.addIssueTypesToScheme('10000', {
|
|
1486
|
+
* issueTypeIds: [issueType.id],
|
|
1487
|
+
* });
|
|
1488
|
+
* ```
|
|
1489
|
+
*/
|
|
1490
|
+
declare class IssueTypeService extends BaseService {
|
|
1491
|
+
/**
|
|
1492
|
+
* Get all issue types
|
|
1493
|
+
*
|
|
1494
|
+
* `GET /rest/api/3/issuetype`
|
|
1495
|
+
*
|
|
1496
|
+
* @returns All issue types visible to the caller
|
|
1497
|
+
*/
|
|
1498
|
+
list(): Promise<IssueTypeDetails[]>;
|
|
1499
|
+
/**
|
|
1500
|
+
* Get a single issue type by ID
|
|
1501
|
+
*
|
|
1502
|
+
* `GET /rest/api/3/issuetype/{issueTypeId}`
|
|
1503
|
+
*
|
|
1504
|
+
* @param issueTypeId - Issue type ID
|
|
1505
|
+
* @returns The requested issue type
|
|
1506
|
+
*/
|
|
1507
|
+
get(issueTypeId: string): Promise<IssueTypeDetails>;
|
|
1508
|
+
/**
|
|
1509
|
+
* Create an issue type
|
|
1510
|
+
*
|
|
1511
|
+
* `POST /rest/api/3/issuetype`
|
|
1512
|
+
*
|
|
1513
|
+
* @param input - Name plus optional description and `standard`/`subtask` type
|
|
1514
|
+
* @returns The created issue type
|
|
1515
|
+
*/
|
|
1516
|
+
create(input: CreateIssueTypeInput): Promise<IssueTypeDetails>;
|
|
1517
|
+
/**
|
|
1518
|
+
* Update an issue type
|
|
1519
|
+
*
|
|
1520
|
+
* `PUT /rest/api/3/issuetype/{issueTypeId}`
|
|
1521
|
+
*
|
|
1522
|
+
* @param issueTypeId - Issue type ID
|
|
1523
|
+
* @param input - Fields to update
|
|
1524
|
+
* @returns The updated issue type
|
|
1525
|
+
*/
|
|
1526
|
+
update(issueTypeId: string, input: UpdateIssueTypeInput): Promise<IssueTypeDetails>;
|
|
1527
|
+
/**
|
|
1528
|
+
* Delete an issue type
|
|
1529
|
+
*
|
|
1530
|
+
* `DELETE /rest/api/3/issuetype/{issueTypeId}`
|
|
1531
|
+
*
|
|
1532
|
+
* @param issueTypeId - Issue type ID
|
|
1533
|
+
* @param options - Optional issue type to move existing issues to
|
|
1534
|
+
* @returns Nothing
|
|
1535
|
+
*/
|
|
1536
|
+
deleteIssueType(issueTypeId: string, options?: {
|
|
1537
|
+
alternativeIssueTypeId?: string;
|
|
1538
|
+
}): Promise<void>;
|
|
1539
|
+
/**
|
|
1540
|
+
* Get all issue type schemes
|
|
1541
|
+
*
|
|
1542
|
+
* `GET /rest/api/3/issuetypescheme`
|
|
1543
|
+
*
|
|
1544
|
+
* @param options - Optional pagination
|
|
1545
|
+
* @returns The issue type schemes
|
|
1546
|
+
*/
|
|
1547
|
+
listIssueTypeSchemes(options?: ListIssueTypeSchemesOptions): Promise<IssueTypeScheme[]>;
|
|
1548
|
+
/**
|
|
1549
|
+
* Create an issue type scheme
|
|
1550
|
+
*
|
|
1551
|
+
* `POST /rest/api/3/issuetypescheme`
|
|
1552
|
+
*
|
|
1553
|
+
* Needed since Jira Cloud CHANGE-2999/3000 (February 2026): creating an
|
|
1554
|
+
* issue type no longer auto-adds it to the Default Work Type Scheme.
|
|
1555
|
+
*
|
|
1556
|
+
* @param input - Scheme name plus the issue type IDs it contains
|
|
1557
|
+
* @returns The created scheme
|
|
1558
|
+
*/
|
|
1559
|
+
createIssueTypeScheme(input: CreateIssueTypeSchemeInput): Promise<IssueTypeScheme>;
|
|
1560
|
+
/**
|
|
1561
|
+
* Update an issue type scheme
|
|
1562
|
+
*
|
|
1563
|
+
* `PUT /rest/api/3/issuetypescheme/{schemeId}`
|
|
1564
|
+
*
|
|
1565
|
+
* @param schemeId - Issue type scheme ID
|
|
1566
|
+
* @param input - Fields to update
|
|
1567
|
+
* @returns Nothing
|
|
1568
|
+
*/
|
|
1569
|
+
updateIssueTypeScheme(schemeId: string, input: UpdateIssueTypeSchemeInput): Promise<void>;
|
|
1570
|
+
/**
|
|
1571
|
+
* Delete an issue type scheme
|
|
1572
|
+
*
|
|
1573
|
+
* `DELETE /rest/api/3/issuetypescheme/{schemeId}`
|
|
1574
|
+
*
|
|
1575
|
+
* @param schemeId - Issue type scheme ID
|
|
1576
|
+
* @returns Nothing
|
|
1577
|
+
*/
|
|
1578
|
+
deleteIssueTypeScheme(schemeId: string): Promise<void>;
|
|
1579
|
+
/**
|
|
1580
|
+
* Add issue types to an issue type scheme
|
|
1581
|
+
*
|
|
1582
|
+
* `PUT /rest/api/3/issuetypescheme/{schemeId}/issuetype`
|
|
1583
|
+
*
|
|
1584
|
+
* @param schemeId - Issue type scheme ID
|
|
1585
|
+
* @param input - The issue type IDs to add (at least one)
|
|
1586
|
+
* @returns Nothing
|
|
1587
|
+
*/
|
|
1588
|
+
addIssueTypesToScheme(schemeId: string, input: AddIssueTypesToSchemeInput): Promise<void>;
|
|
1589
|
+
/**
|
|
1590
|
+
* Remove an issue type from an issue type scheme
|
|
1591
|
+
*
|
|
1592
|
+
* `DELETE /rest/api/3/issuetypescheme/{schemeId}/issuetype/{issueTypeId}`
|
|
1593
|
+
*
|
|
1594
|
+
* @param schemeId - Issue type scheme ID
|
|
1595
|
+
* @param issueTypeId - Issue type ID to remove
|
|
1596
|
+
* @returns Nothing
|
|
1597
|
+
*/
|
|
1598
|
+
removeIssueTypeFromScheme(schemeId: string, issueTypeId: string): Promise<void>;
|
|
1599
|
+
/**
|
|
1600
|
+
* Get the issue type scheme to issue type mappings
|
|
1601
|
+
*
|
|
1602
|
+
* `GET /rest/api/3/issuetypescheme/mapping`
|
|
1603
|
+
*
|
|
1604
|
+
* @param options - Optional scheme ID filter and pagination
|
|
1605
|
+
* @returns The scheme-to-issue-type mappings
|
|
1606
|
+
*/
|
|
1607
|
+
getIssueTypeSchemeMappings(options?: GetIssueTypeSchemeMappingsOptions): Promise<IssueTypeSchemeMapping[]>;
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
/**
|
|
1611
|
+
* Label service for retrieving Jira labels.
|
|
1612
|
+
*
|
|
1613
|
+
* @example
|
|
1614
|
+
* ```typescript
|
|
1615
|
+
* const client = new JiraClient({ ... });
|
|
1616
|
+
*
|
|
1617
|
+
* const labels = await client.labels.list({ maxResults: 50 });
|
|
1618
|
+
*
|
|
1619
|
+
* for await (const label of client.labels.iterate()) {
|
|
1620
|
+
* console.log(label);
|
|
1621
|
+
* }
|
|
1622
|
+
* ```
|
|
1623
|
+
*/
|
|
1624
|
+
declare class LabelService extends BaseService {
|
|
1625
|
+
/**
|
|
1626
|
+
* List labels.
|
|
1627
|
+
*
|
|
1628
|
+
* `GET /rest/api/3/label`
|
|
1629
|
+
*
|
|
1630
|
+
* @param options - Pagination options.
|
|
1631
|
+
* @returns The label values for the requested page.
|
|
1632
|
+
*/
|
|
1633
|
+
list(options?: ListLabelsOptions): Promise<string[]>;
|
|
1634
|
+
/**
|
|
1635
|
+
* Get label suggestions for a query string.
|
|
1636
|
+
*
|
|
1637
|
+
* `GET /rest/api/3/jql/autocompletedata/suggestions?fieldName=labels`
|
|
1638
|
+
*
|
|
1639
|
+
* Deviates from the Go SDK, which calls `GET /rest/api/3/label/suggest` and
|
|
1640
|
+
* reads a `{suggestions: [...]}` envelope. That endpoint is not part of the
|
|
1641
|
+
* v3 API — the Labels group only documents `GET /rest/api/3/label` — so the
|
|
1642
|
+
* Go call 404s. Label autocompletion is served by the JQL autocomplete
|
|
1643
|
+
* endpoint, which returns `{results: [{value, displayName}]}`.
|
|
1644
|
+
*
|
|
1645
|
+
* @param query - The partial label to get suggestions for.
|
|
1646
|
+
* @returns The suggested label values.
|
|
1647
|
+
*/
|
|
1648
|
+
suggest(query: string): Promise<string[]>;
|
|
1649
|
+
/**
|
|
1650
|
+
* Async iterator over every label, transparently paginating.
|
|
1651
|
+
*
|
|
1652
|
+
* `GET /rest/api/3/label` (paged)
|
|
1653
|
+
*
|
|
1654
|
+
* @param options - Query filter and page size (`maxResults`).
|
|
1655
|
+
* @returns An async generator yielding label values one at a time.
|
|
1656
|
+
*/
|
|
1657
|
+
iterate(options?: Omit<ListLabelsOptions, 'startAt'>): AsyncGenerator<string, void, undefined>;
|
|
1658
|
+
/**
|
|
1659
|
+
* Collect every label into an array (loads all pages into memory).
|
|
1660
|
+
*
|
|
1661
|
+
* @param options - Query filter and page size (`maxResults`).
|
|
1662
|
+
* @returns All matching label values.
|
|
1663
|
+
*/
|
|
1664
|
+
all(options?: Omit<ListLabelsOptions, 'startAt'>): Promise<string[]>;
|
|
1665
|
+
/**
|
|
1666
|
+
* Fetch a single page of labels including its pagination metadata.
|
|
1667
|
+
*/
|
|
1668
|
+
private listPage;
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1671
|
+
/**
|
|
1672
|
+
* Myself service for operations on the currently authenticated user
|
|
1673
|
+
*
|
|
1674
|
+
* @example
|
|
1675
|
+
* ```typescript
|
|
1676
|
+
* const client = new JiraClient({ ... });
|
|
1677
|
+
*
|
|
1678
|
+
* // Who am I?
|
|
1679
|
+
* const me = await client.myself.get();
|
|
1680
|
+
*
|
|
1681
|
+
* // Read and update preferences
|
|
1682
|
+
* const prefs = await client.myself.getPreferences();
|
|
1683
|
+
* await client.myself.setPreferences({ locale: 'en_US' });
|
|
1684
|
+
* ```
|
|
1685
|
+
*/
|
|
1686
|
+
declare class MyselfService extends BaseService {
|
|
1687
|
+
/**
|
|
1688
|
+
* Get the currently authenticated user
|
|
1689
|
+
*
|
|
1690
|
+
* `GET /rest/api/3/myself`
|
|
1691
|
+
*
|
|
1692
|
+
* @returns The current user
|
|
1693
|
+
*/
|
|
1694
|
+
get(): Promise<CurrentUser>;
|
|
1695
|
+
/**
|
|
1696
|
+
* Get the current user's preferences
|
|
1697
|
+
*
|
|
1698
|
+
* `GET /rest/api/3/mypreferences`
|
|
1699
|
+
*
|
|
1700
|
+
* @returns The current user's preferences
|
|
1701
|
+
*/
|
|
1702
|
+
getPreferences(): Promise<UserPreferences>;
|
|
1703
|
+
/**
|
|
1704
|
+
* Set the current user's preferences
|
|
1705
|
+
*
|
|
1706
|
+
* `PUT /rest/api/3/mypreferences`
|
|
1707
|
+
*
|
|
1708
|
+
* @param input - Preferences to set
|
|
1709
|
+
* @returns Nothing; resolves once the preferences are stored
|
|
1710
|
+
*/
|
|
1711
|
+
setPreferences(input: SetUserPreferencesInput): Promise<void>;
|
|
1712
|
+
/**
|
|
1713
|
+
* Get a single preference of the current user by key
|
|
1714
|
+
*
|
|
1715
|
+
* `GET /rest/api/3/mypreferences?key={key}`
|
|
1716
|
+
*
|
|
1717
|
+
* Deviates from the Go SDK, which decodes the response into a map and then
|
|
1718
|
+
* indexes it by `key`. The endpoint returns the preference value itself, not
|
|
1719
|
+
* an object keyed by the preference name, so the Go shape never matches.
|
|
1720
|
+
* Non-string JSON scalars (a boolean or numeric preference) are coerced to
|
|
1721
|
+
* their string form.
|
|
1722
|
+
*
|
|
1723
|
+
* @param key - The preference key
|
|
1724
|
+
* @returns The preference value
|
|
1725
|
+
*/
|
|
1726
|
+
getPreference(key: string): Promise<string>;
|
|
1727
|
+
/**
|
|
1728
|
+
* Set a single preference of the current user
|
|
1729
|
+
*
|
|
1730
|
+
* `PUT /rest/api/3/mypreferences?key={key}`
|
|
1731
|
+
*
|
|
1732
|
+
* Deviates from the Go SDK, which sends `{[key]: value}` as the body. The
|
|
1733
|
+
* endpoint takes the key from the required `key` query parameter and the
|
|
1734
|
+
* request body is the raw value itself (a plain string, max 255 characters).
|
|
1735
|
+
*
|
|
1736
|
+
* @param key - The preference key
|
|
1737
|
+
* @param value - The preference value
|
|
1738
|
+
* @returns Nothing; resolves once the preference is stored
|
|
1739
|
+
*/
|
|
1740
|
+
setPreference(key: string, value: string): Promise<void>;
|
|
1741
|
+
/**
|
|
1742
|
+
* Delete a single preference of the current user
|
|
1743
|
+
*
|
|
1744
|
+
* `DELETE /rest/api/3/mypreferences?key={key}`
|
|
1745
|
+
*
|
|
1746
|
+
* @param key - The preference key
|
|
1747
|
+
* @returns Nothing; resolves once the preference is removed
|
|
1748
|
+
*/
|
|
1749
|
+
deletePreference(key: string): Promise<void>;
|
|
1750
|
+
}
|
|
1751
|
+
|
|
1752
|
+
/**
|
|
1753
|
+
* Notification service for notification schemes and issue notifications
|
|
1754
|
+
*
|
|
1755
|
+
* @example
|
|
1756
|
+
* ```typescript
|
|
1757
|
+
* const client = new JiraClient({ ... });
|
|
1758
|
+
*
|
|
1759
|
+
* // List notification schemes
|
|
1760
|
+
* const page = await client.notifications.list({ maxResults: 50 });
|
|
1761
|
+
*
|
|
1762
|
+
* // Notify everyone watching an issue
|
|
1763
|
+
* await client.notifications.sendIssueNotification('PROJ-123', {
|
|
1764
|
+
* subject: 'Important update',
|
|
1765
|
+
* textBody: 'This issue has been updated',
|
|
1766
|
+
* to: { watchers: true, assignee: true },
|
|
1767
|
+
* });
|
|
1768
|
+
* ```
|
|
1769
|
+
*/
|
|
1770
|
+
declare class NotificationService extends BaseService {
|
|
1771
|
+
/**
|
|
1772
|
+
* List notification schemes (paginated)
|
|
1773
|
+
*
|
|
1774
|
+
* `GET /rest/api/3/notificationscheme`
|
|
1775
|
+
*
|
|
1776
|
+
* @param options - Pagination and expand options
|
|
1777
|
+
* @returns A page of notification schemes
|
|
1778
|
+
*/
|
|
1779
|
+
list(options?: ListNotificationSchemesOptions): Promise<NotificationSchemePage>;
|
|
1780
|
+
/**
|
|
1781
|
+
* Async iterator over every notification scheme, page by page
|
|
1782
|
+
*
|
|
1783
|
+
* @param options - Pagination and expand options (`startAt` is managed by the iterator)
|
|
1784
|
+
* @returns An async generator yielding notification schemes
|
|
1785
|
+
*
|
|
1786
|
+
* @example
|
|
1787
|
+
* ```typescript
|
|
1788
|
+
* for await (const scheme of client.notifications.iterate()) {
|
|
1789
|
+
* console.log(scheme.name);
|
|
1790
|
+
* }
|
|
1791
|
+
* ```
|
|
1792
|
+
*/
|
|
1793
|
+
iterate(options?: Omit<ListNotificationSchemesOptions, 'startAt'>): AsyncGenerator<NotificationScheme, void, undefined>;
|
|
1794
|
+
/**
|
|
1795
|
+
* Get every notification scheme (loads all pages into memory)
|
|
1796
|
+
*
|
|
1797
|
+
* @param options - Pagination and expand options (`startAt` is managed internally)
|
|
1798
|
+
* @returns All notification schemes
|
|
1799
|
+
*/
|
|
1800
|
+
all(options?: Omit<ListNotificationSchemesOptions, 'startAt'>): Promise<NotificationScheme[]>;
|
|
1801
|
+
/**
|
|
1802
|
+
* Get a notification scheme by ID
|
|
1803
|
+
*
|
|
1804
|
+
* `GET /rest/api/3/notificationscheme/{schemeId}`
|
|
1805
|
+
*
|
|
1806
|
+
* @param schemeId - ID of the notification scheme
|
|
1807
|
+
* @returns The notification scheme
|
|
1808
|
+
*/
|
|
1809
|
+
get(schemeId: number): Promise<NotificationScheme>;
|
|
1810
|
+
/**
|
|
1811
|
+
* Create a notification scheme
|
|
1812
|
+
*
|
|
1813
|
+
* `POST /rest/api/3/notificationscheme`
|
|
1814
|
+
*
|
|
1815
|
+
* @param input - Name and optional description
|
|
1816
|
+
* @returns The created notification scheme
|
|
1817
|
+
*/
|
|
1818
|
+
create(input: CreateNotificationSchemeInput): Promise<NotificationScheme>;
|
|
1819
|
+
/**
|
|
1820
|
+
* Update a notification scheme
|
|
1821
|
+
*
|
|
1822
|
+
* `PUT /rest/api/3/notificationscheme/{schemeId}`
|
|
1823
|
+
*
|
|
1824
|
+
* @param schemeId - ID of the notification scheme
|
|
1825
|
+
* @param input - Fields to update
|
|
1826
|
+
* @returns The updated notification scheme
|
|
1827
|
+
*/
|
|
1828
|
+
update(schemeId: number, input: UpdateNotificationSchemeInput): Promise<NotificationScheme>;
|
|
1829
|
+
/**
|
|
1830
|
+
* Delete a notification scheme
|
|
1831
|
+
*
|
|
1832
|
+
* `DELETE /rest/api/3/notificationscheme/{schemeId}`
|
|
1833
|
+
*
|
|
1834
|
+
* @param schemeId - ID of the notification scheme
|
|
1835
|
+
* @returns Nothing
|
|
1836
|
+
*/
|
|
1837
|
+
deleteNotificationScheme(schemeId: number): Promise<void>;
|
|
1838
|
+
/**
|
|
1839
|
+
* Add one or more notification recipients to a notification scheme event
|
|
1840
|
+
*
|
|
1841
|
+
* `PUT /rest/api/3/notificationscheme/{schemeId}/notification`
|
|
1842
|
+
*
|
|
1843
|
+
* Deviates from the Go SDK, which issues
|
|
1844
|
+
* `POST .../notification?eventTypeId={eventId}` with a flat body. That
|
|
1845
|
+
* operation does not exist — the path defines only `PUT`, taking a nested
|
|
1846
|
+
* `notificationSchemeEvents` array and no query parameters — so the Go call
|
|
1847
|
+
* returns 405.
|
|
1848
|
+
*
|
|
1849
|
+
* The endpoint returns 204, so there is no created notification to return.
|
|
1850
|
+
*
|
|
1851
|
+
* @param schemeId - ID of the notification scheme
|
|
1852
|
+
* @param eventId - ID of the event type the notifications attach to
|
|
1853
|
+
* @param input - A notification, or several, to add to that event
|
|
1854
|
+
*/
|
|
1855
|
+
addNotification(schemeId: number, eventId: number, input: AddNotificationInput | AddNotificationInput[]): Promise<void>;
|
|
1856
|
+
/**
|
|
1857
|
+
* Remove a notification from a notification scheme
|
|
1858
|
+
*
|
|
1859
|
+
* `DELETE /rest/api/3/notificationscheme/{schemeId}/notification/{notificationId}`
|
|
1860
|
+
*
|
|
1861
|
+
* @param schemeId - ID of the notification scheme
|
|
1862
|
+
* @param notificationId - ID of the notification to remove
|
|
1863
|
+
* @returns Nothing
|
|
1864
|
+
*/
|
|
1865
|
+
removeNotification(schemeId: number, notificationId: number): Promise<void>;
|
|
1866
|
+
/**
|
|
1867
|
+
* Send a notification about an issue
|
|
1868
|
+
*
|
|
1869
|
+
* `POST /rest/api/3/issue/{issueIdOrKey}/notify`
|
|
1870
|
+
*
|
|
1871
|
+
* @param issueIdOrKey - Issue key or ID
|
|
1872
|
+
* @param input - Subject, body and recipients
|
|
1873
|
+
* @returns Nothing
|
|
1874
|
+
*/
|
|
1875
|
+
sendIssueNotification(issueIdOrKey: string, input: SendNotificationInput): Promise<void>;
|
|
1876
|
+
}
|
|
1877
|
+
|
|
1878
|
+
/**
|
|
1879
|
+
* Permission service for Jira permissions, permission schemes and project roles
|
|
1880
|
+
*
|
|
1881
|
+
* @example
|
|
1882
|
+
* ```typescript
|
|
1883
|
+
* const client = new JiraClient({ ... });
|
|
1884
|
+
*
|
|
1885
|
+
* // All permissions known to Jira
|
|
1886
|
+
* const permissions = await client.permissions.getAllPermissions();
|
|
1887
|
+
*
|
|
1888
|
+
* // The current user's permissions in a project
|
|
1889
|
+
* const mine = await client.permissions.getMyPermissions({ projectKey: 'PROJ' });
|
|
1890
|
+
* ```
|
|
1891
|
+
*/
|
|
1892
|
+
declare class PermissionService extends BaseService {
|
|
1893
|
+
/**
|
|
1894
|
+
* Get all permissions available in Jira
|
|
1895
|
+
*
|
|
1896
|
+
* `GET /rest/api/3/permissions`
|
|
1897
|
+
*
|
|
1898
|
+
* @returns All permission definitions
|
|
1899
|
+
*/
|
|
1900
|
+
getAllPermissions(): Promise<Permission[]>;
|
|
1901
|
+
/**
|
|
1902
|
+
* Get the current user's permissions, optionally scoped to a project or issue
|
|
1903
|
+
*
|
|
1904
|
+
* `GET /rest/api/3/mypermissions`
|
|
1905
|
+
*
|
|
1906
|
+
* @param options - Project/issue scope and the permission keys to check
|
|
1907
|
+
* @returns The permission grant status keyed by permission key
|
|
1908
|
+
*/
|
|
1909
|
+
getMyPermissions(options?: MyPermissionsOptions): Promise<MyPermissions>;
|
|
1910
|
+
/**
|
|
1911
|
+
* List all permission schemes
|
|
1912
|
+
*
|
|
1913
|
+
* `GET /rest/api/3/permissionscheme`
|
|
1914
|
+
*
|
|
1915
|
+
* @param options - Optional expand values
|
|
1916
|
+
* @returns All permission schemes
|
|
1917
|
+
*/
|
|
1918
|
+
listPermissionSchemes(options?: ListPermissionSchemesOptions): Promise<PermissionScheme[]>;
|
|
1919
|
+
/**
|
|
1920
|
+
* Get a permission scheme by ID
|
|
1921
|
+
*
|
|
1922
|
+
* `GET /rest/api/3/permissionscheme/{schemeId}`
|
|
1923
|
+
*
|
|
1924
|
+
* @param schemeId - ID of the permission scheme
|
|
1925
|
+
* @param options - Optional expand values
|
|
1926
|
+
* @returns The permission scheme
|
|
1927
|
+
*/
|
|
1928
|
+
getPermissionScheme(schemeId: number, options?: GetPermissionSchemeOptions): Promise<PermissionScheme>;
|
|
1929
|
+
/**
|
|
1930
|
+
* Create a permission scheme
|
|
1931
|
+
*
|
|
1932
|
+
* `POST /rest/api/3/permissionscheme`
|
|
1933
|
+
*
|
|
1934
|
+
* @param input - Name, description and optional permission grants
|
|
1935
|
+
* @returns The created permission scheme
|
|
1936
|
+
*/
|
|
1937
|
+
createPermissionScheme(input: CreatePermissionSchemeInput): Promise<PermissionScheme>;
|
|
1938
|
+
/**
|
|
1939
|
+
* Update a permission scheme
|
|
1940
|
+
*
|
|
1941
|
+
* `PUT /rest/api/3/permissionscheme/{schemeId}`
|
|
1942
|
+
*
|
|
1943
|
+
* @param schemeId - ID of the permission scheme
|
|
1944
|
+
* @param input - Fields to update
|
|
1945
|
+
* @returns The updated permission scheme
|
|
1946
|
+
*/
|
|
1947
|
+
updatePermissionScheme(schemeId: number, input: UpdatePermissionSchemeInput): Promise<PermissionScheme>;
|
|
1948
|
+
/**
|
|
1949
|
+
* Delete a permission scheme
|
|
1950
|
+
*
|
|
1951
|
+
* `DELETE /rest/api/3/permissionscheme/{schemeId}`
|
|
1952
|
+
*
|
|
1953
|
+
* @param schemeId - ID of the permission scheme
|
|
1954
|
+
* @returns Nothing
|
|
1955
|
+
*/
|
|
1956
|
+
deletePermissionScheme(schemeId: number): Promise<void>;
|
|
1957
|
+
/**
|
|
1958
|
+
* Get all roles of a project as a map of role name to role URL
|
|
1959
|
+
*
|
|
1960
|
+
* `GET /rest/api/3/project/{projectIdOrKey}/role`
|
|
1961
|
+
*
|
|
1962
|
+
* @param projectIdOrKey - Project key or ID
|
|
1963
|
+
* @returns Map of role name to the role's REST URL
|
|
1964
|
+
*/
|
|
1965
|
+
getProjectRoles(projectIdOrKey: string): Promise<ProjectRoles>;
|
|
1966
|
+
/**
|
|
1967
|
+
* Get details of a single project role, including its actors
|
|
1968
|
+
*
|
|
1969
|
+
* `GET /rest/api/3/project/{projectIdOrKey}/role/{roleId}`
|
|
1970
|
+
*
|
|
1971
|
+
* @param projectIdOrKey - Project key or ID
|
|
1972
|
+
* @param roleId - ID of the project role
|
|
1973
|
+
* @returns The project role
|
|
1974
|
+
*/
|
|
1975
|
+
getProjectRole(projectIdOrKey: string, roleId: number): Promise<ProjectRole>;
|
|
1976
|
+
/**
|
|
1977
|
+
* Add users and/or groups as actors of a project role
|
|
1978
|
+
*
|
|
1979
|
+
* `POST /rest/api/3/project/{projectIdOrKey}/role/{roleId}`
|
|
1980
|
+
*
|
|
1981
|
+
* @param projectIdOrKey - Project key or ID
|
|
1982
|
+
* @param roleId - ID of the project role
|
|
1983
|
+
* @param input - Account IDs and/or group names to add
|
|
1984
|
+
* @returns The updated project role
|
|
1985
|
+
*/
|
|
1986
|
+
addActorsToProjectRole(projectIdOrKey: string, roleId: number, input: AddActorInput): Promise<ProjectRole>;
|
|
1987
|
+
/**
|
|
1988
|
+
* Remove an actor from a project role
|
|
1989
|
+
*
|
|
1990
|
+
* `DELETE /rest/api/3/project/{projectIdOrKey}/role/{roleId}?{actorType}={actor}`
|
|
1991
|
+
*
|
|
1992
|
+
* @param projectIdOrKey - Project key or ID
|
|
1993
|
+
* @param roleId - ID of the project role
|
|
1994
|
+
* @param actorType - Whether the actor is a `user`, `group` or `groupId`
|
|
1995
|
+
* @param actor - Account ID, group name or group ID of the actor
|
|
1996
|
+
* @returns Nothing
|
|
1997
|
+
*/
|
|
1998
|
+
removeActorFromProjectRole(projectIdOrKey: string, roleId: number, actorType: ProjectRoleActorType, actor: string): Promise<void>;
|
|
1999
|
+
}
|
|
2000
|
+
|
|
2001
|
+
/**
|
|
2002
|
+
* Priority service for CRUD operations on Jira issue priorities
|
|
2003
|
+
*
|
|
2004
|
+
* @example
|
|
2005
|
+
* ```typescript
|
|
2006
|
+
* const client = new JiraClient({ ... });
|
|
2007
|
+
*
|
|
2008
|
+
* const priorities = await client.priorities.list();
|
|
2009
|
+
* const priority = await client.priorities.get('1');
|
|
2010
|
+
* await client.priorities.setDefault('3');
|
|
2011
|
+
* ```
|
|
2012
|
+
*/
|
|
2013
|
+
declare class PriorityService extends BaseService {
|
|
2014
|
+
/**
|
|
2015
|
+
* List all priorities
|
|
2016
|
+
*
|
|
2017
|
+
* `GET /rest/api/3/priority`
|
|
2018
|
+
*
|
|
2019
|
+
* @returns All priorities defined on the instance
|
|
2020
|
+
*/
|
|
2021
|
+
list(): Promise<Priority[]>;
|
|
2022
|
+
/**
|
|
2023
|
+
* Get a priority by ID
|
|
2024
|
+
*
|
|
2025
|
+
* `GET /rest/api/3/priority/{id}`
|
|
2026
|
+
*
|
|
2027
|
+
* @param priorityId - The priority ID
|
|
2028
|
+
* @returns The requested priority
|
|
2029
|
+
*/
|
|
2030
|
+
get(priorityId: string): Promise<Priority>;
|
|
2031
|
+
/**
|
|
2032
|
+
* Create a new priority
|
|
2033
|
+
*
|
|
2034
|
+
* `POST /rest/api/3/priority`
|
|
2035
|
+
*
|
|
2036
|
+
* @param input - The priority to create
|
|
2037
|
+
* @returns The created priority
|
|
2038
|
+
*/
|
|
2039
|
+
create(input: CreatePriorityInput): Promise<Priority>;
|
|
2040
|
+
/**
|
|
2041
|
+
* Update a priority
|
|
2042
|
+
*
|
|
2043
|
+
* `PUT /rest/api/3/priority/{id}`
|
|
2044
|
+
*
|
|
2045
|
+
* @param priorityId - The priority ID
|
|
2046
|
+
* @param input - The fields to update
|
|
2047
|
+
* @returns The updated priority
|
|
2048
|
+
*/
|
|
2049
|
+
update(priorityId: string, input: UpdatePriorityInput): Promise<Priority>;
|
|
2050
|
+
/**
|
|
2051
|
+
* Delete a priority, reassigning affected issues to a replacement priority
|
|
2052
|
+
*
|
|
2053
|
+
* `DELETE /rest/api/3/priority/{id}?replaceWith={replacementId}`
|
|
2054
|
+
*
|
|
2055
|
+
* @param priorityId - The priority to delete
|
|
2056
|
+
* @param replacementId - The priority to reassign issues to
|
|
2057
|
+
* @returns Nothing; resolves once the priority is deleted
|
|
2058
|
+
*/
|
|
2059
|
+
deletePriority(priorityId: string, replacementId: string): Promise<void>;
|
|
2060
|
+
/**
|
|
2061
|
+
* Set a priority as the instance default
|
|
2062
|
+
*
|
|
2063
|
+
* `PUT /rest/api/3/priority/default`
|
|
2064
|
+
*
|
|
2065
|
+
* @param priorityId - The priority to make default
|
|
2066
|
+
* @returns Nothing; resolves once the default is set
|
|
2067
|
+
*/
|
|
2068
|
+
setDefault(priorityId: string): Promise<void>;
|
|
2069
|
+
}
|
|
2070
|
+
|
|
2071
|
+
/**
|
|
2072
|
+
* Project service for CRUD operations on Jira projects
|
|
2073
|
+
*
|
|
2074
|
+
* @example
|
|
2075
|
+
* ```typescript
|
|
2076
|
+
* const client = new JiraClient({ ... });
|
|
2077
|
+
*
|
|
2078
|
+
* // Get all projects
|
|
2079
|
+
* const projects = await client.projects.list();
|
|
2080
|
+
*
|
|
2081
|
+
* // Get a project
|
|
2082
|
+
* const project = await client.projects.get('PROJECT');
|
|
2083
|
+
*
|
|
2084
|
+
* // Create a project
|
|
2085
|
+
* const newProject = await client.projects.create({
|
|
2086
|
+
* key: 'PROJ',
|
|
2087
|
+
* name: 'My Project',
|
|
2088
|
+
* projectTypeKey: 'software',
|
|
2089
|
+
* });
|
|
2090
|
+
* ```
|
|
2091
|
+
*/
|
|
2092
|
+
declare class ProjectService extends BaseService {
|
|
2093
|
+
/**
|
|
2094
|
+
* Get a project by key or ID
|
|
2095
|
+
*/
|
|
2096
|
+
get(projectIdOrKey: string, options?: {
|
|
2097
|
+
expand?: string[];
|
|
2098
|
+
properties?: string[];
|
|
2099
|
+
}): Promise<Project>;
|
|
2100
|
+
/**
|
|
2101
|
+
* Get all projects (paginated)
|
|
2102
|
+
*/
|
|
2103
|
+
list(options?: GetProjectsOptions): Promise<ProjectSearchResult>;
|
|
2104
|
+
/**
|
|
2105
|
+
* Create a new project
|
|
2106
|
+
*/
|
|
2107
|
+
create(input: CreateProjectInput): Promise<Project>;
|
|
2108
|
+
/**
|
|
2109
|
+
* Update a project
|
|
2110
|
+
*/
|
|
2111
|
+
update(projectIdOrKey: string, input: UpdateProjectInput): Promise<Project>;
|
|
2112
|
+
/**
|
|
2113
|
+
* Delete a project
|
|
2114
|
+
*/
|
|
2115
|
+
deleteProject(projectIdOrKey: string, options?: {
|
|
2116
|
+
enableUndo?: boolean;
|
|
2117
|
+
}): Promise<void>;
|
|
2118
|
+
/**
|
|
2119
|
+
* Archive a project
|
|
2120
|
+
*/
|
|
2121
|
+
archive(projectIdOrKey: string): Promise<void>;
|
|
2122
|
+
/**
|
|
2123
|
+
* Restore an archived project
|
|
2124
|
+
*/
|
|
2125
|
+
restore(projectIdOrKey: string): Promise<Project>;
|
|
2126
|
+
/**
|
|
2127
|
+
* Get recent projects
|
|
2128
|
+
*/
|
|
2129
|
+
getRecent(options?: {
|
|
2130
|
+
expand?: string[];
|
|
2131
|
+
properties?: string[];
|
|
2132
|
+
}): Promise<Project[]>;
|
|
2133
|
+
/**
|
|
2134
|
+
* Create a project component
|
|
2135
|
+
*
|
|
2136
|
+
* `POST /rest/api/3/component`
|
|
2137
|
+
*
|
|
2138
|
+
* @param input - Component creation input (name and project are required)
|
|
2139
|
+
* @returns The created component
|
|
2140
|
+
*/
|
|
2141
|
+
createComponent(input: CreateComponentInput): Promise<ProjectComponent>;
|
|
2142
|
+
/**
|
|
2143
|
+
* Update a project component
|
|
2144
|
+
*
|
|
2145
|
+
* `PUT /rest/api/3/component/{componentId}`
|
|
2146
|
+
*
|
|
2147
|
+
* @param componentId - Component ID
|
|
2148
|
+
* @param input - Fields to update
|
|
2149
|
+
* @returns The updated component
|
|
2150
|
+
*/
|
|
2151
|
+
updateComponent(componentId: string, input: UpdateComponentInput): Promise<ProjectComponent>;
|
|
2152
|
+
/**
|
|
2153
|
+
* Get a project component by ID
|
|
2154
|
+
*
|
|
2155
|
+
* `GET /rest/api/3/component/{componentId}`
|
|
2156
|
+
*
|
|
2157
|
+
* @param componentId - Component ID
|
|
2158
|
+
* @returns The component
|
|
2159
|
+
*/
|
|
2160
|
+
getComponent(componentId: string): Promise<ProjectComponent>;
|
|
2161
|
+
/**
|
|
2162
|
+
* Delete a project component
|
|
2163
|
+
*
|
|
2164
|
+
* `DELETE /rest/api/3/component/{componentId}`
|
|
2165
|
+
*
|
|
2166
|
+
* @param componentId - Component ID
|
|
2167
|
+
* @param options - Optional component to move affected issues to
|
|
2168
|
+
* @returns Nothing (204 No Content)
|
|
2169
|
+
*/
|
|
2170
|
+
deleteComponent(componentId: string, options?: {
|
|
2171
|
+
moveIssuesTo?: string;
|
|
2172
|
+
}): Promise<void>;
|
|
2173
|
+
/**
|
|
2174
|
+
* List all components of a project
|
|
2175
|
+
*
|
|
2176
|
+
* `GET /rest/api/3/project/{projectIdOrKey}/components`
|
|
2177
|
+
*
|
|
2178
|
+
* @param projectIdOrKey - Project ID or key
|
|
2179
|
+
* @returns All components of the project
|
|
2180
|
+
*/
|
|
2181
|
+
listProjectComponents(projectIdOrKey: string): Promise<ProjectComponent[]>;
|
|
2182
|
+
/**
|
|
2183
|
+
* Create a project version
|
|
2184
|
+
*
|
|
2185
|
+
* `POST /rest/api/3/version`
|
|
2186
|
+
*
|
|
2187
|
+
* @param input - Version creation input (name and project are required)
|
|
2188
|
+
* @returns The created version
|
|
2189
|
+
*/
|
|
2190
|
+
createVersion(input: CreateVersionInput): Promise<ProjectVersion>;
|
|
2191
|
+
/**
|
|
2192
|
+
* Update a project version
|
|
2193
|
+
*
|
|
2194
|
+
* `PUT /rest/api/3/version/{versionId}`
|
|
2195
|
+
*
|
|
2196
|
+
* @param versionId - Version ID
|
|
2197
|
+
* @param input - Fields to update
|
|
2198
|
+
* @returns The updated version
|
|
2199
|
+
*/
|
|
2200
|
+
updateVersion(versionId: string, input: UpdateVersionInput): Promise<ProjectVersion>;
|
|
2201
|
+
/**
|
|
2202
|
+
* Get a project version by ID
|
|
2203
|
+
*
|
|
2204
|
+
* `GET /rest/api/3/version/{versionId}`
|
|
2205
|
+
*
|
|
2206
|
+
* @param versionId - Version ID
|
|
2207
|
+
* @param options - Optional expand values (e.g. `operations`, `issuesstatus`)
|
|
2208
|
+
* @returns The version
|
|
2209
|
+
*/
|
|
2210
|
+
getVersion(versionId: string, options?: {
|
|
2211
|
+
expand?: string[];
|
|
2212
|
+
}): Promise<ProjectVersion>;
|
|
2213
|
+
/**
|
|
2214
|
+
* Delete a project version
|
|
2215
|
+
*
|
|
2216
|
+
* `DELETE /rest/api/3/version/{versionId}`
|
|
2217
|
+
*
|
|
2218
|
+
* @param versionId - Version ID
|
|
2219
|
+
* @param options - Optional versions to move fix/affects references to
|
|
2220
|
+
* @returns Nothing (204 No Content)
|
|
2221
|
+
*/
|
|
2222
|
+
deleteVersion(versionId: string, options?: {
|
|
2223
|
+
moveFixIssuesTo?: string;
|
|
2224
|
+
moveAffectedIssuesTo?: string;
|
|
2225
|
+
}): Promise<void>;
|
|
2226
|
+
/**
|
|
2227
|
+
* List all versions of a project
|
|
2228
|
+
*
|
|
2229
|
+
* `GET /rest/api/3/project/{projectIdOrKey}/versions`
|
|
2230
|
+
*
|
|
2231
|
+
* @param projectIdOrKey - Project ID or key
|
|
2232
|
+
* @returns All versions of the project
|
|
2233
|
+
*/
|
|
2234
|
+
listProjectVersions(projectIdOrKey: string): Promise<ProjectVersion[]>;
|
|
2235
|
+
}
|
|
2236
|
+
|
|
2237
|
+
/**
|
|
2238
|
+
* Resolution service for CRUD operations on Jira issue resolutions
|
|
2239
|
+
*
|
|
2240
|
+
* @example
|
|
2241
|
+
* ```typescript
|
|
2242
|
+
* const client = new JiraClient({ ... });
|
|
2243
|
+
*
|
|
2244
|
+
* const resolutions = await client.resolutions.list();
|
|
2245
|
+
* const resolution = await client.resolutions.get('1');
|
|
2246
|
+
* await client.resolutions.setDefault('1');
|
|
2247
|
+
* ```
|
|
2248
|
+
*/
|
|
2249
|
+
declare class ResolutionService extends BaseService {
|
|
2250
|
+
/**
|
|
2251
|
+
* List all resolutions
|
|
2252
|
+
*
|
|
2253
|
+
* `GET /rest/api/3/resolution`
|
|
2254
|
+
*
|
|
2255
|
+
* @returns All resolutions defined on the instance
|
|
2256
|
+
*/
|
|
2257
|
+
list(): Promise<Resolution[]>;
|
|
2258
|
+
/**
|
|
2259
|
+
* Get a resolution by ID
|
|
2260
|
+
*
|
|
2261
|
+
* `GET /rest/api/3/resolution/{id}`
|
|
2262
|
+
*
|
|
2263
|
+
* @param resolutionId - The resolution ID
|
|
2264
|
+
* @returns The requested resolution
|
|
2265
|
+
*/
|
|
2266
|
+
get(resolutionId: string): Promise<Resolution>;
|
|
2267
|
+
/**
|
|
2268
|
+
* Create a new resolution
|
|
2269
|
+
*
|
|
2270
|
+
* `POST /rest/api/3/resolution`
|
|
2271
|
+
*
|
|
2272
|
+
* @param input - The resolution to create
|
|
2273
|
+
* @returns The created resolution
|
|
2274
|
+
*/
|
|
2275
|
+
create(input: CreateResolutionInput): Promise<Resolution>;
|
|
2276
|
+
/**
|
|
2277
|
+
* Update a resolution
|
|
2278
|
+
*
|
|
2279
|
+
* `PUT /rest/api/3/resolution/{id}`
|
|
2280
|
+
*
|
|
2281
|
+
* @param resolutionId - The resolution ID
|
|
2282
|
+
* @param input - The fields to update
|
|
2283
|
+
* @returns The updated resolution
|
|
2284
|
+
*/
|
|
2285
|
+
update(resolutionId: string, input: UpdateResolutionInput): Promise<Resolution>;
|
|
2286
|
+
/**
|
|
2287
|
+
* Delete a resolution, reassigning affected issues to a replacement resolution
|
|
2288
|
+
*
|
|
2289
|
+
* `DELETE /rest/api/3/resolution/{id}?replaceWith={replacementId}`
|
|
2290
|
+
*
|
|
2291
|
+
* @param resolutionId - The resolution to delete
|
|
2292
|
+
* @param replacementId - The resolution to reassign issues to
|
|
2293
|
+
* @returns Nothing; resolves once the resolution is deleted
|
|
2294
|
+
*/
|
|
2295
|
+
deleteResolution(resolutionId: string, replacementId: string): Promise<void>;
|
|
2296
|
+
/**
|
|
2297
|
+
* Set a resolution as the instance default
|
|
2298
|
+
*
|
|
2299
|
+
* `PUT /rest/api/3/resolution/default`
|
|
2300
|
+
*
|
|
2301
|
+
* @param resolutionId - The resolution to make default
|
|
2302
|
+
* @returns Nothing; resolves once the default is set
|
|
2303
|
+
*/
|
|
2304
|
+
setDefault(resolutionId: string): Promise<void>;
|
|
2305
|
+
}
|
|
2306
|
+
|
|
2307
|
+
/**
|
|
2308
|
+
* Screen service for managing Jira screens, their tabs and the fields on them.
|
|
2309
|
+
*
|
|
2310
|
+
* Screens define which fields are displayed during issue operations
|
|
2311
|
+
* (create, edit, view).
|
|
2312
|
+
*
|
|
2313
|
+
* @example
|
|
2314
|
+
* ```typescript
|
|
2315
|
+
* const client = new JiraClient({ ... });
|
|
2316
|
+
*
|
|
2317
|
+
* const screens = await client.screens.list({ maxResults: 50 });
|
|
2318
|
+
* const tabs = await client.screens.listTabs(10000);
|
|
2319
|
+
* await client.screens.addField(10000, 10100, { fieldId: 'summary' });
|
|
2320
|
+
* ```
|
|
2321
|
+
*/
|
|
2322
|
+
declare class ScreenService extends BaseService {
|
|
2323
|
+
/**
|
|
2324
|
+
* List screens (paginated)
|
|
2325
|
+
*
|
|
2326
|
+
* `GET /rest/api/3/screens`
|
|
2327
|
+
*
|
|
2328
|
+
* @param options - Optional pagination
|
|
2329
|
+
* @returns A page of screens
|
|
2330
|
+
*/
|
|
2331
|
+
list(options?: ListScreensOptions): Promise<ScreenListResult>;
|
|
2332
|
+
/**
|
|
2333
|
+
* Async iterator over every screen, transparently paging the API
|
|
2334
|
+
*
|
|
2335
|
+
* @param options - Optional pagination; `maxResults` sets the page size
|
|
2336
|
+
* @returns An async generator yielding each screen
|
|
2337
|
+
*/
|
|
2338
|
+
iterate(options?: Omit<ListScreensOptions, 'startAt'>): AsyncGenerator<Screen, void, undefined>;
|
|
2339
|
+
/**
|
|
2340
|
+
* Collect every screen into an array (loads all pages into memory)
|
|
2341
|
+
*
|
|
2342
|
+
* @param options - Optional pagination; `maxResults` sets the page size
|
|
2343
|
+
* @returns All screens
|
|
2344
|
+
*/
|
|
2345
|
+
all(options?: Omit<ListScreensOptions, 'startAt'>): Promise<Screen[]>;
|
|
2346
|
+
/**
|
|
2347
|
+
* Get a screen by ID
|
|
2348
|
+
*
|
|
2349
|
+
* `GET /rest/api/3/screens/{screenId}`
|
|
2350
|
+
*
|
|
2351
|
+
* @param screenId - Screen ID
|
|
2352
|
+
* @returns The screen
|
|
2353
|
+
*/
|
|
2354
|
+
get(screenId: number): Promise<Screen>;
|
|
2355
|
+
/**
|
|
2356
|
+
* Create a screen
|
|
2357
|
+
*
|
|
2358
|
+
* `POST /rest/api/3/screens`
|
|
2359
|
+
*
|
|
2360
|
+
* @param input - Screen name and optional description
|
|
2361
|
+
* @returns The created screen
|
|
2362
|
+
*/
|
|
2363
|
+
create(input: CreateScreenInput): Promise<Screen>;
|
|
2364
|
+
/**
|
|
2365
|
+
* Update a screen
|
|
2366
|
+
*
|
|
2367
|
+
* `PUT /rest/api/3/screens/{screenId}`
|
|
2368
|
+
*
|
|
2369
|
+
* @param screenId - Screen ID
|
|
2370
|
+
* @param input - Fields to update
|
|
2371
|
+
* @returns The updated screen
|
|
2372
|
+
*/
|
|
2373
|
+
update(screenId: number, input: UpdateScreenInput): Promise<Screen>;
|
|
2374
|
+
/**
|
|
2375
|
+
* Delete a screen
|
|
2376
|
+
*
|
|
2377
|
+
* `DELETE /rest/api/3/screens/{screenId}`
|
|
2378
|
+
*
|
|
2379
|
+
* @param screenId - Screen ID
|
|
2380
|
+
* @returns Nothing; the endpoint responds 204 No Content
|
|
2381
|
+
*/
|
|
2382
|
+
deleteScreen(screenId: number): Promise<void>;
|
|
2383
|
+
/**
|
|
2384
|
+
* Get the fields that can still be added to a screen
|
|
2385
|
+
*
|
|
2386
|
+
* `GET /rest/api/3/screens/{screenId}/availableFields`
|
|
2387
|
+
*
|
|
2388
|
+
* @param screenId - Screen ID
|
|
2389
|
+
* @returns The fields available to add
|
|
2390
|
+
*/
|
|
2391
|
+
getAvailableFields(screenId: number): Promise<ScreenField[]>;
|
|
2392
|
+
/**
|
|
2393
|
+
* List the tabs of a screen
|
|
2394
|
+
*
|
|
2395
|
+
* `GET /rest/api/3/screens/{screenId}/tabs`
|
|
2396
|
+
*
|
|
2397
|
+
* @param screenId - Screen ID
|
|
2398
|
+
* @returns The screen's tabs
|
|
2399
|
+
*/
|
|
2400
|
+
listTabs(screenId: number): Promise<ScreenTab[]>;
|
|
2401
|
+
/**
|
|
2402
|
+
* Create a tab on a screen
|
|
2403
|
+
*
|
|
2404
|
+
* `POST /rest/api/3/screens/{screenId}/tabs`
|
|
2405
|
+
*
|
|
2406
|
+
* @param screenId - Screen ID
|
|
2407
|
+
* @param input - Tab name
|
|
2408
|
+
* @returns The created tab
|
|
2409
|
+
*/
|
|
2410
|
+
createTab(screenId: number, input: CreateScreenTabInput): Promise<ScreenTab>;
|
|
2411
|
+
/**
|
|
2412
|
+
* Update a screen tab
|
|
2413
|
+
*
|
|
2414
|
+
* `PUT /rest/api/3/screens/{screenId}/tabs/{tabId}`
|
|
2415
|
+
*
|
|
2416
|
+
* @param screenId - Screen ID
|
|
2417
|
+
* @param tabId - Tab ID
|
|
2418
|
+
* @param input - Fields to update
|
|
2419
|
+
* @returns The updated tab
|
|
2420
|
+
*/
|
|
2421
|
+
updateTab(screenId: number, tabId: number, input: UpdateScreenTabInput): Promise<ScreenTab>;
|
|
2422
|
+
/**
|
|
2423
|
+
* Delete a screen tab
|
|
2424
|
+
*
|
|
2425
|
+
* `DELETE /rest/api/3/screens/{screenId}/tabs/{tabId}`
|
|
2426
|
+
*
|
|
2427
|
+
* @param screenId - Screen ID
|
|
2428
|
+
* @param tabId - Tab ID
|
|
2429
|
+
* @returns Nothing; the endpoint responds 204 No Content
|
|
2430
|
+
*/
|
|
2431
|
+
deleteTab(screenId: number, tabId: number): Promise<void>;
|
|
2432
|
+
/**
|
|
2433
|
+
* Add a field to a screen tab
|
|
2434
|
+
*
|
|
2435
|
+
* `POST /rest/api/3/screens/{screenId}/tabs/{tabId}/fields`
|
|
2436
|
+
*
|
|
2437
|
+
* @param screenId - Screen ID
|
|
2438
|
+
* @param tabId - Tab ID
|
|
2439
|
+
* @param input - The ID of the field to add
|
|
2440
|
+
* @returns The added field
|
|
2441
|
+
*/
|
|
2442
|
+
addField(screenId: number, tabId: number, input: AddScreenFieldInput): Promise<ScreenField>;
|
|
2443
|
+
/**
|
|
2444
|
+
* Remove a field from a screen tab
|
|
2445
|
+
*
|
|
2446
|
+
* `DELETE /rest/api/3/screens/{screenId}/tabs/{tabId}/fields/{fieldId}`
|
|
2447
|
+
*
|
|
2448
|
+
* @param screenId - Screen ID
|
|
2449
|
+
* @param tabId - Tab ID
|
|
2450
|
+
* @param fieldId - Field ID (e.g. `summary`)
|
|
2451
|
+
* @returns Nothing; the endpoint responds 204 No Content
|
|
2452
|
+
*/
|
|
2453
|
+
removeField(screenId: number, tabId: number, fieldId: string): Promise<void>;
|
|
2454
|
+
}
|
|
2455
|
+
|
|
2456
|
+
/**
|
|
2457
|
+
* Search result schema
|
|
2458
|
+
*/
|
|
2459
|
+
declare const SearchResultSchema: z.ZodObject<{
|
|
2460
|
+
expand: z.ZodOptional<z.ZodString>;
|
|
2461
|
+
startAt: z.ZodNumber;
|
|
2462
|
+
maxResults: z.ZodNumber;
|
|
2463
|
+
total: z.ZodNumber;
|
|
2464
|
+
issues: z.ZodArray<z.ZodObject<{
|
|
2465
|
+
expand: z.ZodOptional<z.ZodString>;
|
|
2466
|
+
id: z.ZodString;
|
|
2467
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2468
|
+
key: z.ZodString;
|
|
2469
|
+
fields: z.ZodObject<{
|
|
2470
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
2471
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
|
|
2472
|
+
version: z.ZodLiteral<1>;
|
|
2473
|
+
type: z.ZodLiteral<"doc">;
|
|
2474
|
+
content: z.ZodArray<z.ZodType<AdfNode, unknown, z.core.$ZodTypeInternals<AdfNode, unknown>>>;
|
|
2475
|
+
}, z.core.$strip>, z.ZodString]>>>;
|
|
2476
|
+
environment: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
|
|
2477
|
+
version: z.ZodLiteral<1>;
|
|
2478
|
+
type: z.ZodLiteral<"doc">;
|
|
2479
|
+
content: z.ZodArray<z.ZodType<AdfNode, unknown, z.core.$ZodTypeInternals<AdfNode, unknown>>>;
|
|
2480
|
+
}, z.core.$strip>, z.ZodString]>>>;
|
|
2481
|
+
issuetype: z.ZodOptional<z.ZodObject<{
|
|
2482
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2483
|
+
id: z.ZodString;
|
|
2484
|
+
name: z.ZodString;
|
|
2485
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2486
|
+
iconUrl: z.ZodOptional<z.ZodURL>;
|
|
2487
|
+
subtask: z.ZodBoolean;
|
|
2488
|
+
avatarId: z.ZodOptional<z.ZodNumber>;
|
|
2489
|
+
hierarchyLevel: z.ZodOptional<z.ZodNumber>;
|
|
2490
|
+
}, z.core.$strip>>;
|
|
2491
|
+
project: z.ZodOptional<z.ZodObject<{
|
|
2492
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2493
|
+
id: z.ZodString;
|
|
2494
|
+
key: z.ZodString;
|
|
2495
|
+
name: z.ZodString;
|
|
2496
|
+
projectTypeKey: z.ZodOptional<z.ZodEnum<{
|
|
2497
|
+
software: "software";
|
|
2498
|
+
service_desk: "service_desk";
|
|
2499
|
+
business: "business";
|
|
2500
|
+
}>>;
|
|
2501
|
+
simplified: z.ZodOptional<z.ZodBoolean>;
|
|
2502
|
+
avatarUrls: z.ZodOptional<z.ZodObject<{
|
|
2503
|
+
'48x48': z.ZodOptional<z.ZodURL>;
|
|
2504
|
+
'24x24': z.ZodOptional<z.ZodURL>;
|
|
2505
|
+
'16x16': z.ZodOptional<z.ZodURL>;
|
|
2506
|
+
'32x32': z.ZodOptional<z.ZodURL>;
|
|
2507
|
+
}, z.core.$strip>>;
|
|
2508
|
+
}, z.core.$strip>>;
|
|
2509
|
+
status: z.ZodOptional<z.ZodObject<{
|
|
2510
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2511
|
+
id: z.ZodString;
|
|
2512
|
+
name: z.ZodString;
|
|
2513
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2514
|
+
iconUrl: z.ZodOptional<z.ZodURL>;
|
|
2515
|
+
statusCategory: z.ZodOptional<z.ZodObject<{
|
|
2516
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2517
|
+
id: z.ZodNumber;
|
|
2518
|
+
key: z.ZodString;
|
|
2519
|
+
colorName: z.ZodString;
|
|
2520
|
+
name: z.ZodString;
|
|
2521
|
+
}, z.core.$strip>>;
|
|
2522
|
+
}, z.core.$strip>>;
|
|
2523
|
+
resolution: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
2524
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2525
|
+
id: z.ZodString;
|
|
2526
|
+
name: z.ZodString;
|
|
2527
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2528
|
+
}, z.core.$strip>>>;
|
|
2529
|
+
priority: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
2530
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2531
|
+
id: z.ZodString;
|
|
2532
|
+
name: z.ZodString;
|
|
2533
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2534
|
+
iconUrl: z.ZodOptional<z.ZodURL>;
|
|
2535
|
+
}, z.core.$strip>>>;
|
|
2536
|
+
assignee: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
2537
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2538
|
+
accountId: z.ZodString;
|
|
2539
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
2540
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
2541
|
+
avatarUrls: z.ZodOptional<z.ZodObject<{
|
|
2542
|
+
'48x48': z.ZodOptional<z.ZodURL>;
|
|
2543
|
+
'24x24': z.ZodOptional<z.ZodURL>;
|
|
2544
|
+
'16x16': z.ZodOptional<z.ZodURL>;
|
|
2545
|
+
'32x32': z.ZodOptional<z.ZodURL>;
|
|
2546
|
+
}, z.core.$strip>>;
|
|
2547
|
+
}, z.core.$strip>>>;
|
|
2548
|
+
reporter: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
2549
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2550
|
+
accountId: z.ZodString;
|
|
2551
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
2552
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
2553
|
+
avatarUrls: z.ZodOptional<z.ZodObject<{
|
|
2554
|
+
'48x48': z.ZodOptional<z.ZodURL>;
|
|
2555
|
+
'24x24': z.ZodOptional<z.ZodURL>;
|
|
2556
|
+
'16x16': z.ZodOptional<z.ZodURL>;
|
|
2557
|
+
'32x32': z.ZodOptional<z.ZodURL>;
|
|
2558
|
+
}, z.core.$strip>>;
|
|
2559
|
+
}, z.core.$strip>>>;
|
|
2560
|
+
creator: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
2561
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2562
|
+
accountId: z.ZodString;
|
|
2563
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
2564
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
2565
|
+
avatarUrls: z.ZodOptional<z.ZodObject<{
|
|
2566
|
+
'48x48': z.ZodOptional<z.ZodURL>;
|
|
2567
|
+
'24x24': z.ZodOptional<z.ZodURL>;
|
|
2568
|
+
'16x16': z.ZodOptional<z.ZodURL>;
|
|
2569
|
+
'32x32': z.ZodOptional<z.ZodURL>;
|
|
2570
|
+
}, z.core.$strip>>;
|
|
2571
|
+
}, z.core.$strip>>>;
|
|
2572
|
+
parent: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
2573
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2574
|
+
key: z.ZodString;
|
|
2575
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2576
|
+
fields: z.ZodOptional<z.ZodObject<{
|
|
2577
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
2578
|
+
status: z.ZodOptional<z.ZodObject<{
|
|
2579
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2580
|
+
id: z.ZodString;
|
|
2581
|
+
name: z.ZodString;
|
|
2582
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2583
|
+
iconUrl: z.ZodOptional<z.ZodURL>;
|
|
2584
|
+
statusCategory: z.ZodOptional<z.ZodObject<{
|
|
2585
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2586
|
+
id: z.ZodNumber;
|
|
2587
|
+
key: z.ZodString;
|
|
2588
|
+
colorName: z.ZodString;
|
|
2589
|
+
name: z.ZodString;
|
|
2590
|
+
}, z.core.$strip>>;
|
|
2591
|
+
}, z.core.$strip>>;
|
|
2592
|
+
issuetype: z.ZodOptional<z.ZodObject<{
|
|
2593
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2594
|
+
id: z.ZodString;
|
|
2595
|
+
name: z.ZodString;
|
|
2596
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2597
|
+
iconUrl: z.ZodOptional<z.ZodURL>;
|
|
2598
|
+
subtask: z.ZodBoolean;
|
|
2599
|
+
avatarId: z.ZodOptional<z.ZodNumber>;
|
|
2600
|
+
hierarchyLevel: z.ZodOptional<z.ZodNumber>;
|
|
2601
|
+
}, z.core.$strip>>;
|
|
2602
|
+
}, z.core.$strip>>;
|
|
2603
|
+
}, z.core.$strip>>>;
|
|
2604
|
+
subtasks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2605
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2606
|
+
key: z.ZodString;
|
|
2607
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2608
|
+
fields: z.ZodOptional<z.ZodObject<{
|
|
2609
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
2610
|
+
status: z.ZodOptional<z.ZodObject<{
|
|
2611
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2612
|
+
id: z.ZodString;
|
|
2613
|
+
name: z.ZodString;
|
|
2614
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2615
|
+
iconUrl: z.ZodOptional<z.ZodURL>;
|
|
2616
|
+
statusCategory: z.ZodOptional<z.ZodObject<{
|
|
2617
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2618
|
+
id: z.ZodNumber;
|
|
2619
|
+
key: z.ZodString;
|
|
2620
|
+
colorName: z.ZodString;
|
|
2621
|
+
name: z.ZodString;
|
|
2622
|
+
}, z.core.$strip>>;
|
|
2623
|
+
}, z.core.$strip>>;
|
|
2624
|
+
issuetype: z.ZodOptional<z.ZodObject<{
|
|
2625
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2626
|
+
id: z.ZodString;
|
|
2627
|
+
name: z.ZodString;
|
|
2628
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2629
|
+
iconUrl: z.ZodOptional<z.ZodURL>;
|
|
2630
|
+
subtask: z.ZodBoolean;
|
|
2631
|
+
avatarId: z.ZodOptional<z.ZodNumber>;
|
|
2632
|
+
hierarchyLevel: z.ZodOptional<z.ZodNumber>;
|
|
2633
|
+
}, z.core.$strip>>;
|
|
2634
|
+
}, z.core.$strip>>;
|
|
2635
|
+
}, z.core.$strip>>>;
|
|
2636
|
+
fixVersions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2637
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2638
|
+
id: z.ZodString;
|
|
2639
|
+
name: z.ZodString;
|
|
2640
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2641
|
+
archived: z.ZodOptional<z.ZodBoolean>;
|
|
2642
|
+
released: z.ZodOptional<z.ZodBoolean>;
|
|
2643
|
+
releaseDate: z.ZodOptional<z.ZodString>;
|
|
2644
|
+
startDate: z.ZodOptional<z.ZodString>;
|
|
2645
|
+
projectId: z.ZodOptional<z.ZodNumber>;
|
|
2646
|
+
}, z.core.$strip>>>;
|
|
2647
|
+
versions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2648
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2649
|
+
id: z.ZodString;
|
|
2650
|
+
name: z.ZodString;
|
|
2651
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2652
|
+
archived: z.ZodOptional<z.ZodBoolean>;
|
|
2653
|
+
released: z.ZodOptional<z.ZodBoolean>;
|
|
2654
|
+
releaseDate: z.ZodOptional<z.ZodString>;
|
|
2655
|
+
startDate: z.ZodOptional<z.ZodString>;
|
|
2656
|
+
projectId: z.ZodOptional<z.ZodNumber>;
|
|
2657
|
+
}, z.core.$strip>>>;
|
|
2658
|
+
components: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2659
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2660
|
+
id: z.ZodString;
|
|
2661
|
+
name: z.ZodString;
|
|
2662
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2663
|
+
}, z.core.$strip>>>;
|
|
2664
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2665
|
+
created: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2666
|
+
updated: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2667
|
+
resolutiondate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2668
|
+
duedate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2669
|
+
timeoriginalestimate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2670
|
+
timeestimate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2671
|
+
timespent: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2672
|
+
aggregatetimeoriginalestimate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2673
|
+
aggregatetimeestimate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2674
|
+
aggregatetimespent: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2675
|
+
workratio: z.ZodOptional<z.ZodNumber>;
|
|
2676
|
+
votes: z.ZodOptional<z.ZodObject<{
|
|
2677
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2678
|
+
votes: z.ZodNumber;
|
|
2679
|
+
hasVoted: z.ZodBoolean;
|
|
2680
|
+
}, z.core.$strip>>;
|
|
2681
|
+
watches: z.ZodOptional<z.ZodObject<{
|
|
2682
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2683
|
+
watchCount: z.ZodNumber;
|
|
2684
|
+
isWatching: z.ZodBoolean;
|
|
2685
|
+
}, z.core.$strip>>;
|
|
2686
|
+
progress: z.ZodOptional<z.ZodObject<{
|
|
2687
|
+
progress: z.ZodNumber;
|
|
2688
|
+
total: z.ZodNumber;
|
|
2689
|
+
percent: z.ZodOptional<z.ZodNumber>;
|
|
2690
|
+
}, z.core.$strip>>;
|
|
2691
|
+
aggregateprogress: z.ZodOptional<z.ZodObject<{
|
|
2692
|
+
progress: z.ZodNumber;
|
|
2693
|
+
total: z.ZodNumber;
|
|
2694
|
+
percent: z.ZodOptional<z.ZodNumber>;
|
|
2695
|
+
}, z.core.$strip>>;
|
|
2696
|
+
}, z.core.$loose>;
|
|
2697
|
+
renderedFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2698
|
+
names: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2699
|
+
schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2700
|
+
transitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2701
|
+
id: z.ZodString;
|
|
2702
|
+
name: z.ZodString;
|
|
2703
|
+
to: z.ZodObject<{
|
|
2704
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2705
|
+
id: z.ZodString;
|
|
2706
|
+
name: z.ZodString;
|
|
2707
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2708
|
+
iconUrl: z.ZodOptional<z.ZodURL>;
|
|
2709
|
+
statusCategory: z.ZodOptional<z.ZodObject<{
|
|
2710
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2711
|
+
id: z.ZodNumber;
|
|
2712
|
+
key: z.ZodString;
|
|
2713
|
+
colorName: z.ZodString;
|
|
2714
|
+
name: z.ZodString;
|
|
2715
|
+
}, z.core.$strip>>;
|
|
2716
|
+
}, z.core.$strip>;
|
|
2717
|
+
hasScreen: z.ZodOptional<z.ZodBoolean>;
|
|
2718
|
+
isGlobal: z.ZodOptional<z.ZodBoolean>;
|
|
2719
|
+
isInitial: z.ZodOptional<z.ZodBoolean>;
|
|
2720
|
+
isConditional: z.ZodOptional<z.ZodBoolean>;
|
|
2721
|
+
}, z.core.$strip>>>;
|
|
2722
|
+
operations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2723
|
+
editmeta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2724
|
+
changelog: z.ZodOptional<z.ZodObject<{
|
|
2725
|
+
startAt: z.ZodNumber;
|
|
2726
|
+
maxResults: z.ZodNumber;
|
|
2727
|
+
total: z.ZodNumber;
|
|
2728
|
+
histories: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2729
|
+
}, z.core.$strip>>;
|
|
2730
|
+
versionedRepresentations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2731
|
+
fieldsToInclude: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2732
|
+
}, z.core.$strip>>;
|
|
2733
|
+
warningMessages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2734
|
+
names: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2735
|
+
schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2736
|
+
}, z.core.$strip>;
|
|
2737
|
+
type SearchResult = z.infer<typeof SearchResultSchema>;
|
|
2738
|
+
/**
|
|
2739
|
+
* Issue shape returned by the Enhanced JQL Search API.
|
|
2740
|
+
*
|
|
2741
|
+
* The enhanced endpoint is field-selective: unless you ask for `*all` /
|
|
2742
|
+
* `*navigable`, Jira returns only the fields you named (by default just the
|
|
2743
|
+
* issue ID). Every field is therefore optional here — validating against the
|
|
2744
|
+
* full {@link IssueSchema} would reject perfectly valid, sparse responses.
|
|
2745
|
+
*/
|
|
2746
|
+
declare const SearchJqlIssueSchema: z.ZodObject<{
|
|
2747
|
+
expand: z.ZodOptional<z.ZodString>;
|
|
2748
|
+
id: z.ZodString;
|
|
2749
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2750
|
+
key: z.ZodString;
|
|
2751
|
+
renderedFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2752
|
+
names: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2753
|
+
schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2754
|
+
transitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2755
|
+
id: z.ZodString;
|
|
2756
|
+
name: z.ZodString;
|
|
2757
|
+
to: z.ZodObject<{
|
|
2758
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2759
|
+
id: z.ZodString;
|
|
2760
|
+
name: z.ZodString;
|
|
2761
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2762
|
+
iconUrl: z.ZodOptional<z.ZodURL>;
|
|
2763
|
+
statusCategory: z.ZodOptional<z.ZodObject<{
|
|
2764
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2765
|
+
id: z.ZodNumber;
|
|
2766
|
+
key: z.ZodString;
|
|
2767
|
+
colorName: z.ZodString;
|
|
2768
|
+
name: z.ZodString;
|
|
2769
|
+
}, z.core.$strip>>;
|
|
2770
|
+
}, z.core.$strip>;
|
|
2771
|
+
hasScreen: z.ZodOptional<z.ZodBoolean>;
|
|
2772
|
+
isGlobal: z.ZodOptional<z.ZodBoolean>;
|
|
2773
|
+
isInitial: z.ZodOptional<z.ZodBoolean>;
|
|
2774
|
+
isConditional: z.ZodOptional<z.ZodBoolean>;
|
|
2775
|
+
}, z.core.$strip>>>;
|
|
2776
|
+
operations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2777
|
+
editmeta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2778
|
+
changelog: z.ZodOptional<z.ZodObject<{
|
|
2779
|
+
startAt: z.ZodNumber;
|
|
2780
|
+
maxResults: z.ZodNumber;
|
|
2781
|
+
total: z.ZodNumber;
|
|
2782
|
+
histories: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2783
|
+
}, z.core.$strip>>;
|
|
2784
|
+
versionedRepresentations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2785
|
+
fieldsToInclude: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2786
|
+
fields: z.ZodOptional<z.ZodObject<{
|
|
2787
|
+
summary: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
2788
|
+
description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
|
|
2789
|
+
version: z.ZodLiteral<1>;
|
|
2790
|
+
type: z.ZodLiteral<"doc">;
|
|
2791
|
+
content: z.ZodArray<z.ZodType<AdfNode, unknown, z.core.$ZodTypeInternals<AdfNode, unknown>>>;
|
|
2792
|
+
}, z.core.$strip>, z.ZodString]>>>>;
|
|
2793
|
+
environment: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
|
|
2794
|
+
version: z.ZodLiteral<1>;
|
|
2795
|
+
type: z.ZodLiteral<"doc">;
|
|
2796
|
+
content: z.ZodArray<z.ZodType<AdfNode, unknown, z.core.$ZodTypeInternals<AdfNode, unknown>>>;
|
|
2797
|
+
}, z.core.$strip>, z.ZodString]>>>>;
|
|
2798
|
+
issuetype: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2799
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2800
|
+
id: z.ZodString;
|
|
2801
|
+
name: z.ZodString;
|
|
2802
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2803
|
+
iconUrl: z.ZodOptional<z.ZodURL>;
|
|
2804
|
+
subtask: z.ZodBoolean;
|
|
2805
|
+
avatarId: z.ZodOptional<z.ZodNumber>;
|
|
2806
|
+
hierarchyLevel: z.ZodOptional<z.ZodNumber>;
|
|
2807
|
+
}, z.core.$strip>>>;
|
|
2808
|
+
project: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2809
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2810
|
+
id: z.ZodString;
|
|
2811
|
+
key: z.ZodString;
|
|
2812
|
+
name: z.ZodString;
|
|
2813
|
+
projectTypeKey: z.ZodOptional<z.ZodEnum<{
|
|
2814
|
+
software: "software";
|
|
2815
|
+
service_desk: "service_desk";
|
|
2816
|
+
business: "business";
|
|
2817
|
+
}>>;
|
|
2818
|
+
simplified: z.ZodOptional<z.ZodBoolean>;
|
|
2819
|
+
avatarUrls: z.ZodOptional<z.ZodObject<{
|
|
2820
|
+
'48x48': z.ZodOptional<z.ZodURL>;
|
|
2821
|
+
'24x24': z.ZodOptional<z.ZodURL>;
|
|
2822
|
+
'16x16': z.ZodOptional<z.ZodURL>;
|
|
2823
|
+
'32x32': z.ZodOptional<z.ZodURL>;
|
|
2824
|
+
}, z.core.$strip>>;
|
|
2825
|
+
}, z.core.$strip>>>;
|
|
2826
|
+
status: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2827
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2828
|
+
id: z.ZodString;
|
|
2829
|
+
name: z.ZodString;
|
|
2830
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2831
|
+
iconUrl: z.ZodOptional<z.ZodURL>;
|
|
2832
|
+
statusCategory: z.ZodOptional<z.ZodObject<{
|
|
2833
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2834
|
+
id: z.ZodNumber;
|
|
2835
|
+
key: z.ZodString;
|
|
2836
|
+
colorName: z.ZodString;
|
|
2837
|
+
name: z.ZodString;
|
|
2838
|
+
}, z.core.$strip>>;
|
|
2839
|
+
}, z.core.$strip>>>;
|
|
2840
|
+
resolution: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
2841
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2842
|
+
id: z.ZodString;
|
|
2843
|
+
name: z.ZodString;
|
|
2844
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2845
|
+
}, z.core.$strip>>>>;
|
|
2846
|
+
priority: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
2847
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2848
|
+
id: z.ZodString;
|
|
2849
|
+
name: z.ZodString;
|
|
2850
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2851
|
+
iconUrl: z.ZodOptional<z.ZodURL>;
|
|
2852
|
+
}, z.core.$strip>>>>;
|
|
2853
|
+
assignee: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
2854
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2855
|
+
accountId: z.ZodString;
|
|
2856
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
2857
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
2858
|
+
avatarUrls: z.ZodOptional<z.ZodObject<{
|
|
2859
|
+
'48x48': z.ZodOptional<z.ZodURL>;
|
|
2860
|
+
'24x24': z.ZodOptional<z.ZodURL>;
|
|
2861
|
+
'16x16': z.ZodOptional<z.ZodURL>;
|
|
2862
|
+
'32x32': z.ZodOptional<z.ZodURL>;
|
|
2863
|
+
}, z.core.$strip>>;
|
|
2864
|
+
}, z.core.$strip>>>>;
|
|
2865
|
+
reporter: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
2866
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2867
|
+
accountId: z.ZodString;
|
|
2868
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
2869
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
2870
|
+
avatarUrls: z.ZodOptional<z.ZodObject<{
|
|
2871
|
+
'48x48': z.ZodOptional<z.ZodURL>;
|
|
2872
|
+
'24x24': z.ZodOptional<z.ZodURL>;
|
|
2873
|
+
'16x16': z.ZodOptional<z.ZodURL>;
|
|
2874
|
+
'32x32': z.ZodOptional<z.ZodURL>;
|
|
2875
|
+
}, z.core.$strip>>;
|
|
2876
|
+
}, z.core.$strip>>>>;
|
|
2877
|
+
creator: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
2878
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2879
|
+
accountId: z.ZodString;
|
|
2880
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
2881
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
2882
|
+
avatarUrls: z.ZodOptional<z.ZodObject<{
|
|
2883
|
+
'48x48': z.ZodOptional<z.ZodURL>;
|
|
2884
|
+
'24x24': z.ZodOptional<z.ZodURL>;
|
|
2885
|
+
'16x16': z.ZodOptional<z.ZodURL>;
|
|
2886
|
+
'32x32': z.ZodOptional<z.ZodURL>;
|
|
2887
|
+
}, z.core.$strip>>;
|
|
2888
|
+
}, z.core.$strip>>>>;
|
|
2889
|
+
parent: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
2890
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2891
|
+
key: z.ZodString;
|
|
2892
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2893
|
+
fields: z.ZodOptional<z.ZodObject<{
|
|
2894
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
2895
|
+
status: z.ZodOptional<z.ZodObject<{
|
|
2896
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2897
|
+
id: z.ZodString;
|
|
2898
|
+
name: z.ZodString;
|
|
2899
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2900
|
+
iconUrl: z.ZodOptional<z.ZodURL>;
|
|
2901
|
+
statusCategory: z.ZodOptional<z.ZodObject<{
|
|
2902
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2903
|
+
id: z.ZodNumber;
|
|
2904
|
+
key: z.ZodString;
|
|
2905
|
+
colorName: z.ZodString;
|
|
2906
|
+
name: z.ZodString;
|
|
2907
|
+
}, z.core.$strip>>;
|
|
2908
|
+
}, z.core.$strip>>;
|
|
2909
|
+
issuetype: z.ZodOptional<z.ZodObject<{
|
|
2910
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2911
|
+
id: z.ZodString;
|
|
2912
|
+
name: z.ZodString;
|
|
2913
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2914
|
+
iconUrl: z.ZodOptional<z.ZodURL>;
|
|
2915
|
+
subtask: z.ZodBoolean;
|
|
2916
|
+
avatarId: z.ZodOptional<z.ZodNumber>;
|
|
2917
|
+
hierarchyLevel: z.ZodOptional<z.ZodNumber>;
|
|
2918
|
+
}, z.core.$strip>>;
|
|
2919
|
+
}, z.core.$strip>>;
|
|
2920
|
+
}, z.core.$strip>>>>;
|
|
2921
|
+
subtasks: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2922
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2923
|
+
key: z.ZodString;
|
|
2924
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2925
|
+
fields: z.ZodOptional<z.ZodObject<{
|
|
2926
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
2927
|
+
status: z.ZodOptional<z.ZodObject<{
|
|
2928
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2929
|
+
id: z.ZodString;
|
|
2930
|
+
name: z.ZodString;
|
|
2931
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2932
|
+
iconUrl: z.ZodOptional<z.ZodURL>;
|
|
2933
|
+
statusCategory: z.ZodOptional<z.ZodObject<{
|
|
2934
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2935
|
+
id: z.ZodNumber;
|
|
2936
|
+
key: z.ZodString;
|
|
2937
|
+
colorName: z.ZodString;
|
|
2938
|
+
name: z.ZodString;
|
|
2939
|
+
}, z.core.$strip>>;
|
|
2940
|
+
}, z.core.$strip>>;
|
|
2941
|
+
issuetype: z.ZodOptional<z.ZodObject<{
|
|
2942
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2943
|
+
id: z.ZodString;
|
|
2944
|
+
name: z.ZodString;
|
|
2945
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2946
|
+
iconUrl: z.ZodOptional<z.ZodURL>;
|
|
2947
|
+
subtask: z.ZodBoolean;
|
|
2948
|
+
avatarId: z.ZodOptional<z.ZodNumber>;
|
|
2949
|
+
hierarchyLevel: z.ZodOptional<z.ZodNumber>;
|
|
2950
|
+
}, z.core.$strip>>;
|
|
2951
|
+
}, z.core.$strip>>;
|
|
2952
|
+
}, z.core.$strip>>>>;
|
|
2953
|
+
fixVersions: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2954
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2955
|
+
id: z.ZodString;
|
|
2956
|
+
name: z.ZodString;
|
|
2957
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2958
|
+
archived: z.ZodOptional<z.ZodBoolean>;
|
|
2959
|
+
released: z.ZodOptional<z.ZodBoolean>;
|
|
2960
|
+
releaseDate: z.ZodOptional<z.ZodString>;
|
|
2961
|
+
startDate: z.ZodOptional<z.ZodString>;
|
|
2962
|
+
projectId: z.ZodOptional<z.ZodNumber>;
|
|
2963
|
+
}, z.core.$strip>>>>;
|
|
2964
|
+
versions: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2965
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2966
|
+
id: z.ZodString;
|
|
2967
|
+
name: z.ZodString;
|
|
2968
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2969
|
+
archived: z.ZodOptional<z.ZodBoolean>;
|
|
2970
|
+
released: z.ZodOptional<z.ZodBoolean>;
|
|
2971
|
+
releaseDate: z.ZodOptional<z.ZodString>;
|
|
2972
|
+
startDate: z.ZodOptional<z.ZodString>;
|
|
2973
|
+
projectId: z.ZodOptional<z.ZodNumber>;
|
|
2974
|
+
}, z.core.$strip>>>>;
|
|
2975
|
+
components: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2976
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2977
|
+
id: z.ZodString;
|
|
2978
|
+
name: z.ZodString;
|
|
2979
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2980
|
+
}, z.core.$strip>>>>;
|
|
2981
|
+
labels: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2982
|
+
created: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
2983
|
+
updated: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
2984
|
+
resolutiondate: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
2985
|
+
duedate: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
2986
|
+
timeoriginalestimate: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
2987
|
+
timeestimate: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
2988
|
+
timespent: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
2989
|
+
aggregatetimeoriginalestimate: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
2990
|
+
aggregatetimeestimate: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
2991
|
+
aggregatetimespent: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
2992
|
+
workratio: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
2993
|
+
votes: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2994
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
2995
|
+
votes: z.ZodNumber;
|
|
2996
|
+
hasVoted: z.ZodBoolean;
|
|
2997
|
+
}, z.core.$strip>>>;
|
|
2998
|
+
watches: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2999
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
3000
|
+
watchCount: z.ZodNumber;
|
|
3001
|
+
isWatching: z.ZodBoolean;
|
|
3002
|
+
}, z.core.$strip>>>;
|
|
3003
|
+
progress: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
3004
|
+
progress: z.ZodNumber;
|
|
3005
|
+
total: z.ZodNumber;
|
|
3006
|
+
percent: z.ZodOptional<z.ZodNumber>;
|
|
3007
|
+
}, z.core.$strip>>>;
|
|
3008
|
+
aggregateprogress: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
3009
|
+
progress: z.ZodNumber;
|
|
3010
|
+
total: z.ZodNumber;
|
|
3011
|
+
percent: z.ZodOptional<z.ZodNumber>;
|
|
3012
|
+
}, z.core.$strip>>>;
|
|
3013
|
+
}, z.core.$loose>>;
|
|
3014
|
+
}, z.core.$strip>;
|
|
3015
|
+
type SearchJqlIssue = z.infer<typeof SearchJqlIssueSchema>;
|
|
3016
|
+
/**
|
|
3017
|
+
* Enhanced JQL search result schema
|
|
3018
|
+
*
|
|
3019
|
+
* Note: there is no `total` — the enhanced endpoint deliberately omits it for
|
|
3020
|
+
* performance. Pagination is driven by `nextPageToken`.
|
|
3021
|
+
*/
|
|
3022
|
+
declare const SearchJqlResultSchema: z.ZodObject<{
|
|
3023
|
+
issues: z.ZodArray<z.ZodObject<{
|
|
3024
|
+
expand: z.ZodOptional<z.ZodString>;
|
|
3025
|
+
id: z.ZodString;
|
|
3026
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
3027
|
+
key: z.ZodString;
|
|
3028
|
+
renderedFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3029
|
+
names: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3030
|
+
schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3031
|
+
transitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3032
|
+
id: z.ZodString;
|
|
3033
|
+
name: z.ZodString;
|
|
3034
|
+
to: z.ZodObject<{
|
|
3035
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
3036
|
+
id: z.ZodString;
|
|
3037
|
+
name: z.ZodString;
|
|
3038
|
+
description: z.ZodOptional<z.ZodString>;
|
|
3039
|
+
iconUrl: z.ZodOptional<z.ZodURL>;
|
|
3040
|
+
statusCategory: z.ZodOptional<z.ZodObject<{
|
|
3041
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
3042
|
+
id: z.ZodNumber;
|
|
3043
|
+
key: z.ZodString;
|
|
3044
|
+
colorName: z.ZodString;
|
|
3045
|
+
name: z.ZodString;
|
|
3046
|
+
}, z.core.$strip>>;
|
|
3047
|
+
}, z.core.$strip>;
|
|
3048
|
+
hasScreen: z.ZodOptional<z.ZodBoolean>;
|
|
3049
|
+
isGlobal: z.ZodOptional<z.ZodBoolean>;
|
|
3050
|
+
isInitial: z.ZodOptional<z.ZodBoolean>;
|
|
3051
|
+
isConditional: z.ZodOptional<z.ZodBoolean>;
|
|
3052
|
+
}, z.core.$strip>>>;
|
|
3053
|
+
operations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3054
|
+
editmeta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3055
|
+
changelog: z.ZodOptional<z.ZodObject<{
|
|
3056
|
+
startAt: z.ZodNumber;
|
|
3057
|
+
maxResults: z.ZodNumber;
|
|
3058
|
+
total: z.ZodNumber;
|
|
3059
|
+
histories: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3060
|
+
}, z.core.$strip>>;
|
|
3061
|
+
versionedRepresentations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3062
|
+
fieldsToInclude: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3063
|
+
fields: z.ZodOptional<z.ZodObject<{
|
|
3064
|
+
summary: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
3065
|
+
description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
|
|
311
3066
|
version: z.ZodLiteral<1>;
|
|
312
3067
|
type: z.ZodLiteral<"doc">;
|
|
313
|
-
content: z.ZodArray<z.ZodType<
|
|
314
|
-
}, z.core.$strip>, z.ZodString]
|
|
315
|
-
environment: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
|
|
3068
|
+
content: z.ZodArray<z.ZodType<AdfNode, unknown, z.core.$ZodTypeInternals<AdfNode, unknown>>>;
|
|
3069
|
+
}, z.core.$strip>, z.ZodString]>>>>;
|
|
3070
|
+
environment: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
|
|
316
3071
|
version: z.ZodLiteral<1>;
|
|
317
3072
|
type: z.ZodLiteral<"doc">;
|
|
318
|
-
content: z.ZodArray<z.ZodType<
|
|
319
|
-
}, z.core.$strip>, z.ZodString]
|
|
320
|
-
issuetype: z.ZodObject<{
|
|
321
|
-
self: z.ZodURL
|
|
3073
|
+
content: z.ZodArray<z.ZodType<AdfNode, unknown, z.core.$ZodTypeInternals<AdfNode, unknown>>>;
|
|
3074
|
+
}, z.core.$strip>, z.ZodString]>>>>;
|
|
3075
|
+
issuetype: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
3076
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
322
3077
|
id: z.ZodString;
|
|
323
3078
|
name: z.ZodString;
|
|
324
3079
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -326,9 +3081,9 @@ declare const SearchResultSchema: z.ZodObject<{
|
|
|
326
3081
|
subtask: z.ZodBoolean;
|
|
327
3082
|
avatarId: z.ZodOptional<z.ZodNumber>;
|
|
328
3083
|
hierarchyLevel: z.ZodOptional<z.ZodNumber>;
|
|
329
|
-
}, z.core.$strip
|
|
330
|
-
project: z.ZodObject<{
|
|
331
|
-
self: z.ZodURL
|
|
3084
|
+
}, z.core.$strip>>>;
|
|
3085
|
+
project: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
3086
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
332
3087
|
id: z.ZodString;
|
|
333
3088
|
key: z.ZodString;
|
|
334
3089
|
name: z.ZodString;
|
|
@@ -344,84 +3099,84 @@ declare const SearchResultSchema: z.ZodObject<{
|
|
|
344
3099
|
'16x16': z.ZodOptional<z.ZodURL>;
|
|
345
3100
|
'32x32': z.ZodOptional<z.ZodURL>;
|
|
346
3101
|
}, z.core.$strip>>;
|
|
347
|
-
}, z.core.$strip
|
|
348
|
-
status: z.ZodObject<{
|
|
349
|
-
self: z.ZodURL
|
|
3102
|
+
}, z.core.$strip>>>;
|
|
3103
|
+
status: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
3104
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
350
3105
|
id: z.ZodString;
|
|
351
3106
|
name: z.ZodString;
|
|
352
3107
|
description: z.ZodOptional<z.ZodString>;
|
|
353
3108
|
iconUrl: z.ZodOptional<z.ZodURL>;
|
|
354
3109
|
statusCategory: z.ZodOptional<z.ZodObject<{
|
|
355
|
-
self: z.ZodURL
|
|
3110
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
356
3111
|
id: z.ZodNumber;
|
|
357
3112
|
key: z.ZodString;
|
|
358
3113
|
colorName: z.ZodString;
|
|
359
3114
|
name: z.ZodString;
|
|
360
3115
|
}, z.core.$strip>>;
|
|
361
|
-
}, z.core.$strip
|
|
362
|
-
resolution: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
363
|
-
self: z.ZodURL
|
|
3116
|
+
}, z.core.$strip>>>;
|
|
3117
|
+
resolution: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
3118
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
364
3119
|
id: z.ZodString;
|
|
365
3120
|
name: z.ZodString;
|
|
366
3121
|
description: z.ZodOptional<z.ZodString>;
|
|
367
|
-
}, z.core.$strip
|
|
368
|
-
priority: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
369
|
-
self: z.ZodURL
|
|
3122
|
+
}, z.core.$strip>>>>;
|
|
3123
|
+
priority: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
3124
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
370
3125
|
id: z.ZodString;
|
|
371
3126
|
name: z.ZodString;
|
|
372
3127
|
description: z.ZodOptional<z.ZodString>;
|
|
373
3128
|
iconUrl: z.ZodOptional<z.ZodURL>;
|
|
374
|
-
}, z.core.$strip
|
|
375
|
-
assignee: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
3129
|
+
}, z.core.$strip>>>>;
|
|
3130
|
+
assignee: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
376
3131
|
self: z.ZodOptional<z.ZodURL>;
|
|
377
3132
|
accountId: z.ZodString;
|
|
378
3133
|
displayName: z.ZodOptional<z.ZodString>;
|
|
379
3134
|
active: z.ZodOptional<z.ZodBoolean>;
|
|
380
3135
|
avatarUrls: z.ZodOptional<z.ZodObject<{
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
3136
|
+
'48x48': z.ZodOptional<z.ZodURL>;
|
|
3137
|
+
'24x24': z.ZodOptional<z.ZodURL>;
|
|
3138
|
+
'16x16': z.ZodOptional<z.ZodURL>;
|
|
3139
|
+
'32x32': z.ZodOptional<z.ZodURL>;
|
|
385
3140
|
}, z.core.$strip>>;
|
|
386
|
-
}, z.core.$strip
|
|
387
|
-
reporter: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
3141
|
+
}, z.core.$strip>>>>;
|
|
3142
|
+
reporter: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
388
3143
|
self: z.ZodOptional<z.ZodURL>;
|
|
389
3144
|
accountId: z.ZodString;
|
|
390
3145
|
displayName: z.ZodOptional<z.ZodString>;
|
|
391
3146
|
active: z.ZodOptional<z.ZodBoolean>;
|
|
392
3147
|
avatarUrls: z.ZodOptional<z.ZodObject<{
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
3148
|
+
'48x48': z.ZodOptional<z.ZodURL>;
|
|
3149
|
+
'24x24': z.ZodOptional<z.ZodURL>;
|
|
3150
|
+
'16x16': z.ZodOptional<z.ZodURL>;
|
|
3151
|
+
'32x32': z.ZodOptional<z.ZodURL>;
|
|
397
3152
|
}, z.core.$strip>>;
|
|
398
|
-
}, z.core.$strip
|
|
399
|
-
creator: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
3153
|
+
}, z.core.$strip>>>>;
|
|
3154
|
+
creator: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
400
3155
|
self: z.ZodOptional<z.ZodURL>;
|
|
401
3156
|
accountId: z.ZodString;
|
|
402
3157
|
displayName: z.ZodOptional<z.ZodString>;
|
|
403
3158
|
active: z.ZodOptional<z.ZodBoolean>;
|
|
404
3159
|
avatarUrls: z.ZodOptional<z.ZodObject<{
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
3160
|
+
'48x48': z.ZodOptional<z.ZodURL>;
|
|
3161
|
+
'24x24': z.ZodOptional<z.ZodURL>;
|
|
3162
|
+
'16x16': z.ZodOptional<z.ZodURL>;
|
|
3163
|
+
'32x32': z.ZodOptional<z.ZodURL>;
|
|
409
3164
|
}, z.core.$strip>>;
|
|
410
|
-
}, z.core.$strip
|
|
411
|
-
parent: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
3165
|
+
}, z.core.$strip>>>>;
|
|
3166
|
+
parent: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
412
3167
|
id: z.ZodOptional<z.ZodString>;
|
|
413
3168
|
key: z.ZodString;
|
|
414
3169
|
self: z.ZodOptional<z.ZodURL>;
|
|
415
3170
|
fields: z.ZodOptional<z.ZodObject<{
|
|
416
3171
|
summary: z.ZodOptional<z.ZodString>;
|
|
417
3172
|
status: z.ZodOptional<z.ZodObject<{
|
|
418
|
-
self: z.ZodURL
|
|
3173
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
419
3174
|
id: z.ZodString;
|
|
420
3175
|
name: z.ZodString;
|
|
421
3176
|
description: z.ZodOptional<z.ZodString>;
|
|
422
3177
|
iconUrl: z.ZodOptional<z.ZodURL>;
|
|
423
3178
|
statusCategory: z.ZodOptional<z.ZodObject<{
|
|
424
|
-
self: z.ZodURL
|
|
3179
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
425
3180
|
id: z.ZodNumber;
|
|
426
3181
|
key: z.ZodString;
|
|
427
3182
|
colorName: z.ZodString;
|
|
@@ -429,7 +3184,7 @@ declare const SearchResultSchema: z.ZodObject<{
|
|
|
429
3184
|
}, z.core.$strip>>;
|
|
430
3185
|
}, z.core.$strip>>;
|
|
431
3186
|
issuetype: z.ZodOptional<z.ZodObject<{
|
|
432
|
-
self: z.ZodURL
|
|
3187
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
433
3188
|
id: z.ZodString;
|
|
434
3189
|
name: z.ZodString;
|
|
435
3190
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -439,21 +3194,21 @@ declare const SearchResultSchema: z.ZodObject<{
|
|
|
439
3194
|
hierarchyLevel: z.ZodOptional<z.ZodNumber>;
|
|
440
3195
|
}, z.core.$strip>>;
|
|
441
3196
|
}, z.core.$strip>>;
|
|
442
|
-
}, z.core.$strip
|
|
443
|
-
subtasks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3197
|
+
}, z.core.$strip>>>>;
|
|
3198
|
+
subtasks: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
444
3199
|
id: z.ZodOptional<z.ZodString>;
|
|
445
3200
|
key: z.ZodString;
|
|
446
3201
|
self: z.ZodOptional<z.ZodURL>;
|
|
447
3202
|
fields: z.ZodOptional<z.ZodObject<{
|
|
448
3203
|
summary: z.ZodOptional<z.ZodString>;
|
|
449
3204
|
status: z.ZodOptional<z.ZodObject<{
|
|
450
|
-
self: z.ZodURL
|
|
3205
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
451
3206
|
id: z.ZodString;
|
|
452
3207
|
name: z.ZodString;
|
|
453
3208
|
description: z.ZodOptional<z.ZodString>;
|
|
454
3209
|
iconUrl: z.ZodOptional<z.ZodURL>;
|
|
455
3210
|
statusCategory: z.ZodOptional<z.ZodObject<{
|
|
456
|
-
self: z.ZodURL
|
|
3211
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
457
3212
|
id: z.ZodNumber;
|
|
458
3213
|
key: z.ZodString;
|
|
459
3214
|
colorName: z.ZodString;
|
|
@@ -461,7 +3216,7 @@ declare const SearchResultSchema: z.ZodObject<{
|
|
|
461
3216
|
}, z.core.$strip>>;
|
|
462
3217
|
}, z.core.$strip>>;
|
|
463
3218
|
issuetype: z.ZodOptional<z.ZodObject<{
|
|
464
|
-
self: z.ZodURL
|
|
3219
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
465
3220
|
id: z.ZodString;
|
|
466
3221
|
name: z.ZodString;
|
|
467
3222
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -471,9 +3226,9 @@ declare const SearchResultSchema: z.ZodObject<{
|
|
|
471
3226
|
hierarchyLevel: z.ZodOptional<z.ZodNumber>;
|
|
472
3227
|
}, z.core.$strip>>;
|
|
473
3228
|
}, z.core.$strip>>;
|
|
474
|
-
}, z.core.$strip
|
|
475
|
-
fixVersions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
476
|
-
self: z.ZodURL
|
|
3229
|
+
}, z.core.$strip>>>>;
|
|
3230
|
+
fixVersions: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3231
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
477
3232
|
id: z.ZodString;
|
|
478
3233
|
name: z.ZodString;
|
|
479
3234
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -482,9 +3237,9 @@ declare const SearchResultSchema: z.ZodObject<{
|
|
|
482
3237
|
releaseDate: z.ZodOptional<z.ZodString>;
|
|
483
3238
|
startDate: z.ZodOptional<z.ZodString>;
|
|
484
3239
|
projectId: z.ZodOptional<z.ZodNumber>;
|
|
485
|
-
}, z.core.$strip
|
|
486
|
-
versions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
487
|
-
self: z.ZodURL
|
|
3240
|
+
}, z.core.$strip>>>>;
|
|
3241
|
+
versions: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3242
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
488
3243
|
id: z.ZodString;
|
|
489
3244
|
name: z.ZodString;
|
|
490
3245
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -493,87 +3248,97 @@ declare const SearchResultSchema: z.ZodObject<{
|
|
|
493
3248
|
releaseDate: z.ZodOptional<z.ZodString>;
|
|
494
3249
|
startDate: z.ZodOptional<z.ZodString>;
|
|
495
3250
|
projectId: z.ZodOptional<z.ZodNumber>;
|
|
496
|
-
}, z.core.$strip
|
|
497
|
-
components: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
498
|
-
self: z.ZodURL
|
|
3251
|
+
}, z.core.$strip>>>>;
|
|
3252
|
+
components: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3253
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
499
3254
|
id: z.ZodString;
|
|
500
3255
|
name: z.ZodString;
|
|
501
3256
|
description: z.ZodOptional<z.ZodString>;
|
|
502
|
-
}, z.core.$strip
|
|
503
|
-
labels: z.ZodOptional<z.ZodArray<z.ZodString
|
|
504
|
-
created: z.ZodNullable<z.ZodString
|
|
505
|
-
updated: z.ZodNullable<z.ZodString
|
|
506
|
-
resolutiondate: z.ZodNullable<z.ZodString
|
|
507
|
-
duedate: z.ZodOptional<z.ZodNullable<z.ZodString
|
|
508
|
-
timeoriginalestimate: z.ZodOptional<z.ZodNullable<z.ZodNumber
|
|
509
|
-
timeestimate: z.ZodOptional<z.ZodNullable<z.ZodNumber
|
|
510
|
-
timespent: z.ZodOptional<z.ZodNullable<z.ZodNumber
|
|
511
|
-
aggregatetimeoriginalestimate: z.ZodOptional<z.ZodNullable<z.ZodNumber
|
|
512
|
-
aggregatetimeestimate: z.ZodOptional<z.ZodNullable<z.ZodNumber
|
|
513
|
-
aggregatetimespent: z.ZodOptional<z.ZodNullable<z.ZodNumber
|
|
514
|
-
workratio: z.ZodOptional<z.ZodNumber
|
|
515
|
-
votes: z.ZodOptional<z.ZodObject<{
|
|
516
|
-
self: z.ZodURL
|
|
3257
|
+
}, z.core.$strip>>>>;
|
|
3258
|
+
labels: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
3259
|
+
created: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
3260
|
+
updated: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
3261
|
+
resolutiondate: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
3262
|
+
duedate: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
3263
|
+
timeoriginalestimate: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
3264
|
+
timeestimate: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
3265
|
+
timespent: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
3266
|
+
aggregatetimeoriginalestimate: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
3267
|
+
aggregatetimeestimate: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
3268
|
+
aggregatetimespent: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
3269
|
+
workratio: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
3270
|
+
votes: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
3271
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
517
3272
|
votes: z.ZodNumber;
|
|
518
3273
|
hasVoted: z.ZodBoolean;
|
|
519
|
-
}, z.core.$strip
|
|
520
|
-
watches: z.ZodOptional<z.ZodObject<{
|
|
521
|
-
self: z.ZodURL
|
|
3274
|
+
}, z.core.$strip>>>;
|
|
3275
|
+
watches: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
3276
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
522
3277
|
watchCount: z.ZodNumber;
|
|
523
3278
|
isWatching: z.ZodBoolean;
|
|
524
|
-
}, z.core.$strip
|
|
525
|
-
progress: z.ZodOptional<z.ZodObject<{
|
|
3279
|
+
}, z.core.$strip>>>;
|
|
3280
|
+
progress: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
526
3281
|
progress: z.ZodNumber;
|
|
527
3282
|
total: z.ZodNumber;
|
|
528
3283
|
percent: z.ZodOptional<z.ZodNumber>;
|
|
529
|
-
}, z.core.$strip
|
|
530
|
-
aggregateprogress: z.ZodOptional<z.ZodObject<{
|
|
3284
|
+
}, z.core.$strip>>>;
|
|
3285
|
+
aggregateprogress: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
531
3286
|
progress: z.ZodNumber;
|
|
532
3287
|
total: z.ZodNumber;
|
|
533
3288
|
percent: z.ZodOptional<z.ZodNumber>;
|
|
534
|
-
}, z.core.$strip
|
|
535
|
-
}, z.core.$loose
|
|
536
|
-
renderedFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
537
|
-
names: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
538
|
-
schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
539
|
-
transitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
540
|
-
id: z.ZodString;
|
|
541
|
-
name: z.ZodString;
|
|
542
|
-
to: z.ZodObject<{
|
|
543
|
-
self: z.ZodURL;
|
|
544
|
-
id: z.ZodString;
|
|
545
|
-
name: z.ZodString;
|
|
546
|
-
description: z.ZodOptional<z.ZodString>;
|
|
547
|
-
iconUrl: z.ZodOptional<z.ZodURL>;
|
|
548
|
-
statusCategory: z.ZodOptional<z.ZodObject<{
|
|
549
|
-
self: z.ZodURL;
|
|
550
|
-
id: z.ZodNumber;
|
|
551
|
-
key: z.ZodString;
|
|
552
|
-
colorName: z.ZodString;
|
|
553
|
-
name: z.ZodString;
|
|
554
|
-
}, z.core.$strip>>;
|
|
555
|
-
}, z.core.$strip>;
|
|
556
|
-
hasScreen: z.ZodOptional<z.ZodBoolean>;
|
|
557
|
-
isGlobal: z.ZodOptional<z.ZodBoolean>;
|
|
558
|
-
isInitial: z.ZodOptional<z.ZodBoolean>;
|
|
559
|
-
isConditional: z.ZodOptional<z.ZodBoolean>;
|
|
560
|
-
}, z.core.$strip>>>;
|
|
561
|
-
operations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
562
|
-
editmeta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
563
|
-
changelog: z.ZodOptional<z.ZodObject<{
|
|
564
|
-
startAt: z.ZodNumber;
|
|
565
|
-
maxResults: z.ZodNumber;
|
|
566
|
-
total: z.ZodNumber;
|
|
567
|
-
histories: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
568
|
-
}, z.core.$strip>>;
|
|
569
|
-
versionedRepresentations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
570
|
-
fieldsToInclude: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3289
|
+
}, z.core.$strip>>>;
|
|
3290
|
+
}, z.core.$loose>>;
|
|
571
3291
|
}, z.core.$strip>>;
|
|
572
|
-
|
|
3292
|
+
nextPageToken: z.ZodOptional<z.ZodString>;
|
|
3293
|
+
maxResults: z.ZodOptional<z.ZodNumber>;
|
|
573
3294
|
names: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
574
3295
|
schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3296
|
+
warningMessages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
575
3297
|
}, z.core.$strip>;
|
|
576
|
-
type
|
|
3298
|
+
type SearchJqlResult = z.infer<typeof SearchJqlResultSchema>;
|
|
3299
|
+
/**
|
|
3300
|
+
* Options for the Enhanced JQL Search API (`POST /rest/api/3/search/jql`)
|
|
3301
|
+
*/
|
|
3302
|
+
interface SearchJqlOptions {
|
|
3303
|
+
/**
|
|
3304
|
+
* JQL query string (required)
|
|
3305
|
+
*/
|
|
3306
|
+
jql: string;
|
|
3307
|
+
/**
|
|
3308
|
+
* Fields to include in the response.
|
|
3309
|
+
*
|
|
3310
|
+
* IMPORTANT: this endpoint does NOT default to navigable fields. If you omit
|
|
3311
|
+
* `fields`, Jira returns the issue ID only — `issue.fields` will be
|
|
3312
|
+
* `undefined`. Pass `['*all']` for every field, `['*navigable']` for the
|
|
3313
|
+
* legacy default, or an explicit list such as `['summary', 'status']`.
|
|
3314
|
+
*/
|
|
3315
|
+
fields?: string[];
|
|
3316
|
+
/**
|
|
3317
|
+
* Sections to expand
|
|
3318
|
+
*/
|
|
3319
|
+
expand?: string[];
|
|
3320
|
+
/**
|
|
3321
|
+
* Maximum results per page. Up to 5000 when few fields are requested;
|
|
3322
|
+
* the server default (typically 50) applies when omitted.
|
|
3323
|
+
*/
|
|
3324
|
+
maxResults?: number;
|
|
3325
|
+
/**
|
|
3326
|
+
* Pagination token from the previous response. Omit for the first page.
|
|
3327
|
+
*/
|
|
3328
|
+
nextPageToken?: string;
|
|
3329
|
+
/**
|
|
3330
|
+
* Request fields by key instead of ID
|
|
3331
|
+
*/
|
|
3332
|
+
fieldsByKeys?: boolean;
|
|
3333
|
+
/**
|
|
3334
|
+
* Issue properties to include
|
|
3335
|
+
*/
|
|
3336
|
+
properties?: string[];
|
|
3337
|
+
/**
|
|
3338
|
+
* Validate the JQL before executing
|
|
3339
|
+
*/
|
|
3340
|
+
validateQuery?: 'strict' | 'warn' | 'none';
|
|
3341
|
+
}
|
|
577
3342
|
/**
|
|
578
3343
|
* Search options
|
|
579
3344
|
*/
|
|
@@ -636,35 +3401,361 @@ interface SearchOptions {
|
|
|
636
3401
|
*/
|
|
637
3402
|
declare class SearchService extends BaseService {
|
|
638
3403
|
/**
|
|
639
|
-
* Execute a JQL search
|
|
3404
|
+
* Execute a JQL search against the legacy search endpoint
|
|
3405
|
+
*
|
|
3406
|
+
* `POST /rest/api/3/search`
|
|
3407
|
+
*
|
|
3408
|
+
* @param options - Search options (JQL plus offset pagination)
|
|
3409
|
+
* @returns A page of results including a `total` count
|
|
3410
|
+
*
|
|
3411
|
+
* @deprecated Use {@link SearchService.searchJql} instead. Atlassian is
|
|
3412
|
+
* retiring `/rest/api/3/search` in favour of the Enhanced JQL Search API.
|
|
3413
|
+
*/
|
|
3414
|
+
search(options: SearchOptions): Promise<SearchResult>;
|
|
3415
|
+
/**
|
|
3416
|
+
* Convenience method for simple JQL search
|
|
3417
|
+
*
|
|
3418
|
+
* @param query - JQL query string
|
|
3419
|
+
* @param options - Additional search options
|
|
3420
|
+
* @returns A page of results
|
|
3421
|
+
*
|
|
3422
|
+
* @deprecated Use {@link SearchService.searchJql} instead.
|
|
3423
|
+
*/
|
|
3424
|
+
jql(query: string, options?: Omit<SearchOptions, 'jql'>): Promise<SearchResult>;
|
|
3425
|
+
/**
|
|
3426
|
+
* Async iterator for paginating through all search results
|
|
3427
|
+
*
|
|
3428
|
+
* @example
|
|
3429
|
+
* ```typescript
|
|
3430
|
+
* for await (const issue of client.search.iterate('project = PROJECT')) {
|
|
3431
|
+
* console.log(issue.key, issue.fields.summary);
|
|
3432
|
+
* }
|
|
3433
|
+
* ```
|
|
3434
|
+
*
|
|
3435
|
+
* @deprecated Use {@link SearchService.iterateJql} instead.
|
|
3436
|
+
*/
|
|
3437
|
+
iterate(jql: string, options?: Omit<SearchOptions, 'jql' | 'startAt'>): AsyncGenerator<Issue, void, undefined>;
|
|
3438
|
+
/**
|
|
3439
|
+
* Get all issues matching a JQL query (loads all pages into memory)
|
|
3440
|
+
* Use with caution for large result sets - prefer iterate() instead
|
|
3441
|
+
*
|
|
3442
|
+
* @deprecated Use {@link SearchService.allJql} instead.
|
|
3443
|
+
*/
|
|
3444
|
+
all(jql: string, options?: Omit<SearchOptions, 'jql' | 'startAt'>): Promise<Issue[]>;
|
|
3445
|
+
/**
|
|
3446
|
+
* Count issues matching a JQL query (more efficient than fetching all)
|
|
3447
|
+
*
|
|
3448
|
+
* @deprecated The Enhanced JQL Search API does not return a total count.
|
|
3449
|
+
* This still uses the legacy `/rest/api/3/search` endpoint; use
|
|
3450
|
+
* `POST /rest/api/3/search/approximate-count` semantics when Atlassian
|
|
3451
|
+
* retires it.
|
|
3452
|
+
*/
|
|
3453
|
+
count(jql: string): Promise<number>;
|
|
3454
|
+
/**
|
|
3455
|
+
* Execute a JQL search using the Enhanced JQL Search API
|
|
3456
|
+
*
|
|
3457
|
+
* `POST /rest/api/3/search/jql`
|
|
3458
|
+
*
|
|
3459
|
+
* Differences from the legacy {@link SearchService.search}:
|
|
3460
|
+
* - token pagination (`nextPageToken`) instead of `startAt`
|
|
3461
|
+
* - no `total` count in the response
|
|
3462
|
+
* - `maxResults` up to 5000 (vs 100)
|
|
3463
|
+
* - **`fields` defaults to the issue ID only**, not `*navigable`. Pass
|
|
3464
|
+
* `['*all']`, `['*navigable']` or an explicit list, otherwise the returned
|
|
3465
|
+
* issues will have no `fields` object at all.
|
|
3466
|
+
*
|
|
3467
|
+
* @param options - Enhanced search options
|
|
3468
|
+
* @returns A page of issues plus the token for the next page (if any)
|
|
3469
|
+
*
|
|
3470
|
+
* @example
|
|
3471
|
+
* ```typescript
|
|
3472
|
+
* let page = await client.search.searchJql({
|
|
3473
|
+
* jql: 'project = PROJECT',
|
|
3474
|
+
* fields: ['summary', 'status'],
|
|
3475
|
+
* maxResults: 1000,
|
|
3476
|
+
* });
|
|
3477
|
+
*
|
|
3478
|
+
* while (page.nextPageToken) {
|
|
3479
|
+
* page = await client.search.searchJql({
|
|
3480
|
+
* jql: 'project = PROJECT',
|
|
3481
|
+
* fields: ['summary', 'status'],
|
|
3482
|
+
* maxResults: 1000,
|
|
3483
|
+
* nextPageToken: page.nextPageToken,
|
|
3484
|
+
* });
|
|
3485
|
+
* }
|
|
3486
|
+
* ```
|
|
3487
|
+
*/
|
|
3488
|
+
searchJql(options: SearchJqlOptions): Promise<SearchJqlResult>;
|
|
3489
|
+
/**
|
|
3490
|
+
* Async iterator over every issue matching a JQL query, using the Enhanced
|
|
3491
|
+
* JQL Search API and its token-based pagination.
|
|
3492
|
+
*
|
|
3493
|
+
* Defaults to a page size of 100 (matching the Go SDK's iterator). Remember
|
|
3494
|
+
* that `fields` defaults to the issue ID only — pass the fields you need.
|
|
3495
|
+
*
|
|
3496
|
+
* @param jql - JQL query string
|
|
3497
|
+
* @param options - Enhanced search options minus `jql` and `nextPageToken`
|
|
3498
|
+
* @returns An async generator of issues
|
|
3499
|
+
*
|
|
3500
|
+
* @example
|
|
3501
|
+
* ```typescript
|
|
3502
|
+
* for await (const issue of client.search.iterateJql('project = PROJECT', {
|
|
3503
|
+
* fields: ['summary'],
|
|
3504
|
+
* })) {
|
|
3505
|
+
* console.log(issue.key, issue.fields?.summary);
|
|
3506
|
+
* }
|
|
3507
|
+
* ```
|
|
3508
|
+
*/
|
|
3509
|
+
iterateJql(jql: string, options?: Omit<SearchJqlOptions, 'jql' | 'nextPageToken'>): AsyncGenerator<SearchJqlIssue, void, undefined>;
|
|
3510
|
+
/**
|
|
3511
|
+
* Collect every issue matching a JQL query into an array, using the Enhanced
|
|
3512
|
+
* JQL Search API. Prefer {@link SearchService.iterateJql} for large results.
|
|
3513
|
+
*
|
|
3514
|
+
* @param jql - JQL query string
|
|
3515
|
+
* @param options - Enhanced search options minus `jql` and `nextPageToken`
|
|
3516
|
+
* @returns All matching issues
|
|
3517
|
+
*/
|
|
3518
|
+
allJql(jql: string, options?: Omit<SearchJqlOptions, 'jql' | 'nextPageToken'>): Promise<SearchJqlIssue[]>;
|
|
3519
|
+
}
|
|
3520
|
+
|
|
3521
|
+
/**
|
|
3522
|
+
* Security level service for Jira issue security levels and schemes
|
|
3523
|
+
*
|
|
3524
|
+
* @example
|
|
3525
|
+
* ```typescript
|
|
3526
|
+
* const client = new JiraClient({ ... });
|
|
3527
|
+
*
|
|
3528
|
+
* const level = await client.securityLevels.get('10000');
|
|
3529
|
+
* const schemes = await client.securityLevels.getIssueSecuritySchemes();
|
|
3530
|
+
* ```
|
|
3531
|
+
*/
|
|
3532
|
+
declare class SecurityLevelService extends BaseService {
|
|
3533
|
+
/**
|
|
3534
|
+
* Get an issue security level by ID
|
|
3535
|
+
*
|
|
3536
|
+
* `GET /rest/api/3/securitylevel/{levelId}`
|
|
3537
|
+
*
|
|
3538
|
+
* @param levelId - ID of the security level
|
|
3539
|
+
* @returns The security level
|
|
3540
|
+
*/
|
|
3541
|
+
get(levelId: string): Promise<SecurityLevel>;
|
|
3542
|
+
/**
|
|
3543
|
+
* Get all issue security schemes
|
|
3544
|
+
*
|
|
3545
|
+
* `GET /rest/api/3/issuesecurityschemes`
|
|
3546
|
+
*
|
|
3547
|
+
* @returns All issue security schemes
|
|
3548
|
+
*/
|
|
3549
|
+
getIssueSecuritySchemes(): Promise<SecurityScheme[]>;
|
|
3550
|
+
/**
|
|
3551
|
+
* Get an issue security scheme by ID
|
|
3552
|
+
*
|
|
3553
|
+
* `GET /rest/api/3/issuesecurityschemes/{schemeId}`
|
|
3554
|
+
*
|
|
3555
|
+
* @param schemeId - ID of the issue security scheme
|
|
3556
|
+
* @returns The issue security scheme
|
|
3557
|
+
*/
|
|
3558
|
+
getIssueSecurityScheme(schemeId: string): Promise<SecurityScheme>;
|
|
3559
|
+
}
|
|
3560
|
+
|
|
3561
|
+
/**
|
|
3562
|
+
* Server info service for inspecting the Jira instance
|
|
3563
|
+
*
|
|
3564
|
+
* @example
|
|
3565
|
+
* ```typescript
|
|
3566
|
+
* const client = new JiraClient({ ... });
|
|
3567
|
+
*
|
|
3568
|
+
* const info = await client.serverInfo.get();
|
|
3569
|
+
* console.log(info.version, info.deploymentType);
|
|
3570
|
+
*
|
|
3571
|
+
* const config = await client.serverInfo.getConfiguration();
|
|
3572
|
+
* console.log(config.timeTrackingEnabled);
|
|
3573
|
+
* ```
|
|
3574
|
+
*/
|
|
3575
|
+
declare class ServerInfoService extends BaseService {
|
|
3576
|
+
/**
|
|
3577
|
+
* Get information about the Jira instance
|
|
3578
|
+
*
|
|
3579
|
+
* `GET /rest/api/3/serverInfo`
|
|
3580
|
+
*
|
|
3581
|
+
* @returns Version, build and deployment details of the instance
|
|
3582
|
+
*/
|
|
3583
|
+
get(): Promise<ServerInfo>;
|
|
3584
|
+
/**
|
|
3585
|
+
* Get the global configuration of the Jira instance
|
|
3586
|
+
*
|
|
3587
|
+
* `GET /rest/api/3/configuration`
|
|
3588
|
+
*
|
|
3589
|
+
* @returns Which optional Jira features are enabled
|
|
3590
|
+
*/
|
|
3591
|
+
getConfiguration(): Promise<JiraConfiguration>;
|
|
3592
|
+
}
|
|
3593
|
+
|
|
3594
|
+
/**
|
|
3595
|
+
* Time tracking service for provider selection, instance configuration and
|
|
3596
|
+
* worklog management.
|
|
3597
|
+
*
|
|
3598
|
+
* Note: the worklog methods target the same endpoints as `IssueService`'s
|
|
3599
|
+
* worklog methods and are provided here for parity with the Go SDK's
|
|
3600
|
+
* `timetracking` package. They reuse the shared `Worklog` schema.
|
|
3601
|
+
*
|
|
3602
|
+
* @example
|
|
3603
|
+
* ```typescript
|
|
3604
|
+
* const client = new JiraClient({ ... });
|
|
3605
|
+
*
|
|
3606
|
+
* const providers = await client.timeTracking.getAvailableProviders();
|
|
3607
|
+
* await client.timeTracking.selectProvider('JIRA');
|
|
3608
|
+
*
|
|
3609
|
+
* const worklog = await client.timeTracking.createWorklog('PROJ-123', {
|
|
3610
|
+
* timeSpent: '3h 30m',
|
|
3611
|
+
* comment: 'Worked on bug fix',
|
|
3612
|
+
* });
|
|
3613
|
+
* ```
|
|
3614
|
+
*/
|
|
3615
|
+
declare class TimeTrackingService extends BaseService {
|
|
3616
|
+
/**
|
|
3617
|
+
* List the time tracking providers available on this instance.
|
|
3618
|
+
*
|
|
3619
|
+
* `GET /rest/api/3/configuration/timetracking/list`
|
|
3620
|
+
*
|
|
3621
|
+
* @returns Every registered time tracking provider.
|
|
3622
|
+
*/
|
|
3623
|
+
getAvailableProviders(): Promise<TimeTrackingProvider[]>;
|
|
3624
|
+
/**
|
|
3625
|
+
* Get the currently selected time tracking provider.
|
|
3626
|
+
*
|
|
3627
|
+
* `GET /rest/api/3/configuration/timetracking`
|
|
3628
|
+
*
|
|
3629
|
+
* @returns The active time tracking provider.
|
|
640
3630
|
*/
|
|
641
|
-
|
|
3631
|
+
getSelectedProvider(): Promise<TimeTrackingProvider>;
|
|
642
3632
|
/**
|
|
643
|
-
*
|
|
3633
|
+
* Select the active time tracking provider.
|
|
3634
|
+
*
|
|
3635
|
+
* `PUT /rest/api/3/configuration/timetracking`
|
|
3636
|
+
*
|
|
3637
|
+
* @param key - The provider key, e.g. `'JIRA'`.
|
|
3638
|
+
* @returns The newly selected provider.
|
|
644
3639
|
*/
|
|
645
|
-
|
|
3640
|
+
selectProvider(key: string): Promise<TimeTrackingProvider>;
|
|
646
3641
|
/**
|
|
647
|
-
*
|
|
3642
|
+
* Get the instance-wide time tracking settings.
|
|
648
3643
|
*
|
|
649
|
-
*
|
|
650
|
-
*
|
|
651
|
-
*
|
|
652
|
-
* console.log(issue.key, issue.fields.summary);
|
|
653
|
-
* }
|
|
654
|
-
* ```
|
|
3644
|
+
* `GET /rest/api/3/configuration/timetracking/options`
|
|
3645
|
+
*
|
|
3646
|
+
* @returns The current time tracking configuration.
|
|
655
3647
|
*/
|
|
656
|
-
|
|
3648
|
+
getConfiguration(): Promise<TimeTrackingConfiguration>;
|
|
657
3649
|
/**
|
|
658
|
-
*
|
|
659
|
-
*
|
|
3650
|
+
* Update the instance-wide time tracking settings.
|
|
3651
|
+
*
|
|
3652
|
+
* `PUT /rest/api/3/configuration/timetracking/options`
|
|
3653
|
+
*
|
|
3654
|
+
* @param input - The settings to change; omitted fields are left untouched.
|
|
3655
|
+
* @returns The updated time tracking configuration.
|
|
660
3656
|
*/
|
|
661
|
-
|
|
3657
|
+
updateConfiguration(input: UpdateTimeTrackingConfigurationInput): Promise<TimeTrackingConfiguration>;
|
|
662
3658
|
/**
|
|
663
|
-
*
|
|
3659
|
+
* Get the worklogs recorded against an issue.
|
|
3660
|
+
*
|
|
3661
|
+
* `GET /rest/api/3/issue/{issueIdOrKey}/worklog`
|
|
3662
|
+
*
|
|
3663
|
+
* @param issueIdOrKey - The issue ID or key.
|
|
3664
|
+
* @param options - Pagination, `started` bounds and expansion.
|
|
3665
|
+
* @returns The worklogs for the requested page.
|
|
664
3666
|
*/
|
|
665
|
-
|
|
3667
|
+
getIssueWorklogs(issueIdOrKey: string, options?: WorklogListOptions): Promise<Worklog[]>;
|
|
3668
|
+
/**
|
|
3669
|
+
* Get a single worklog by ID.
|
|
3670
|
+
*
|
|
3671
|
+
* `GET /rest/api/3/issue/{issueIdOrKey}/worklog/{worklogId}`
|
|
3672
|
+
*
|
|
3673
|
+
* @param issueIdOrKey - The issue ID or key.
|
|
3674
|
+
* @param worklogId - The worklog ID.
|
|
3675
|
+
* @returns The requested worklog.
|
|
3676
|
+
*/
|
|
3677
|
+
getWorklog(issueIdOrKey: string, worklogId: string): Promise<Worklog>;
|
|
3678
|
+
/**
|
|
3679
|
+
* Add a worklog to an issue.
|
|
3680
|
+
*
|
|
3681
|
+
* `POST /rest/api/3/issue/{issueIdOrKey}/worklog`
|
|
3682
|
+
*
|
|
3683
|
+
* @param issueIdOrKey - The issue ID or key.
|
|
3684
|
+
* @param input - The worklog to record; supply `timeSpent` or `timeSpentSeconds`.
|
|
3685
|
+
* @returns The created worklog.
|
|
3686
|
+
*/
|
|
3687
|
+
createWorklog(issueIdOrKey: string, input: TimeTrackingCreateWorklogInput): Promise<Worklog>;
|
|
3688
|
+
/**
|
|
3689
|
+
* Update an existing worklog.
|
|
3690
|
+
*
|
|
3691
|
+
* `PUT /rest/api/3/issue/{issueIdOrKey}/worklog/{worklogId}`
|
|
3692
|
+
*
|
|
3693
|
+
* @param issueIdOrKey - The issue ID or key.
|
|
3694
|
+
* @param worklogId - The worklog ID.
|
|
3695
|
+
* @param input - The fields to change.
|
|
3696
|
+
* @returns The updated worklog.
|
|
3697
|
+
*/
|
|
3698
|
+
updateWorklog(issueIdOrKey: string, worklogId: string, input: TimeTrackingUpdateWorklogInput): Promise<Worklog>;
|
|
3699
|
+
/**
|
|
3700
|
+
* Delete a worklog.
|
|
3701
|
+
*
|
|
3702
|
+
* `DELETE /rest/api/3/issue/{issueIdOrKey}/worklog/{worklogId}`
|
|
3703
|
+
*
|
|
3704
|
+
* @param issueIdOrKey - The issue ID or key.
|
|
3705
|
+
* @param worklogId - The worklog ID.
|
|
3706
|
+
* @returns Nothing; the endpoint responds with 204 No Content.
|
|
3707
|
+
*/
|
|
3708
|
+
deleteWorklog(issueIdOrKey: string, worklogId: string): Promise<void>;
|
|
666
3709
|
}
|
|
667
3710
|
|
|
3711
|
+
/**
|
|
3712
|
+
* A group the user belongs to
|
|
3713
|
+
*/
|
|
3714
|
+
declare const GroupItemSchema: z.ZodObject<{
|
|
3715
|
+
name: z.ZodOptional<z.ZodString>;
|
|
3716
|
+
self: z.ZodOptional<z.ZodURL>;
|
|
3717
|
+
groupId: z.ZodOptional<z.ZodString>;
|
|
3718
|
+
}, z.core.$strip>;
|
|
3719
|
+
type GroupItem = z.infer<typeof GroupItemSchema>;
|
|
3720
|
+
/**
|
|
3721
|
+
* A user property
|
|
3722
|
+
*/
|
|
3723
|
+
declare const UserPropertySchema: z.ZodObject<{
|
|
3724
|
+
key: z.ZodString;
|
|
3725
|
+
value: z.ZodUnknown;
|
|
3726
|
+
}, z.core.$strip>;
|
|
3727
|
+
type UserProperty = z.infer<typeof UserPropertySchema>;
|
|
3728
|
+
/**
|
|
3729
|
+
* Options for {@link UserService.bulkGet}
|
|
3730
|
+
*/
|
|
3731
|
+
interface BulkGetUsersOptions {
|
|
3732
|
+
/** Account IDs to retrieve (required, repeated as `accountId` query params) */
|
|
3733
|
+
accountIds: string[];
|
|
3734
|
+
startAt?: number;
|
|
3735
|
+
maxResults?: number;
|
|
3736
|
+
}
|
|
3737
|
+
/**
|
|
3738
|
+
* Options for {@link UserService.findUsersWithAllPermissions}
|
|
3739
|
+
*/
|
|
3740
|
+
interface FindUsersWithAllPermissionsOptions {
|
|
3741
|
+
/** Permissions the users must all have (required) */
|
|
3742
|
+
permissions: string[];
|
|
3743
|
+
issueKey?: string;
|
|
3744
|
+
projectKey?: string;
|
|
3745
|
+
query?: string;
|
|
3746
|
+
startAt?: number;
|
|
3747
|
+
maxResults?: number;
|
|
3748
|
+
}
|
|
3749
|
+
/**
|
|
3750
|
+
* Options for {@link UserService.findUsersWithBrowsePermission}
|
|
3751
|
+
*/
|
|
3752
|
+
interface FindUsersWithBrowsePermissionOptions {
|
|
3753
|
+
query?: string;
|
|
3754
|
+
issueKey?: string;
|
|
3755
|
+
projectKey?: string;
|
|
3756
|
+
startAt?: number;
|
|
3757
|
+
maxResults?: number;
|
|
3758
|
+
}
|
|
668
3759
|
/**
|
|
669
3760
|
* User service for user-related operations
|
|
670
3761
|
*
|
|
@@ -687,6 +3778,12 @@ declare class SearchService extends BaseService {
|
|
|
687
3778
|
declare class UserService extends BaseService {
|
|
688
3779
|
/**
|
|
689
3780
|
* Get the currently authenticated user
|
|
3781
|
+
*
|
|
3782
|
+
* @deprecated Prefer {@link MyselfService.get} via `client.myself.get()`.
|
|
3783
|
+
* Both call `GET /rest/api/3/myself`, but MyselfService returns the richer
|
|
3784
|
+
* `CurrentUser` shape (including `groups` and `expand`) and is the home of
|
|
3785
|
+
* the related preference methods. This method is kept for compatibility and
|
|
3786
|
+
* still works.
|
|
690
3787
|
*/
|
|
691
3788
|
getCurrentUser(options?: {
|
|
692
3789
|
expand?: string[];
|
|
@@ -741,6 +3838,462 @@ declare class UserService extends BaseService {
|
|
|
741
3838
|
startAt?: number;
|
|
742
3839
|
maxResults?: number;
|
|
743
3840
|
}): Promise<User[]>;
|
|
3841
|
+
/**
|
|
3842
|
+
* Get multiple users by account ID
|
|
3843
|
+
*
|
|
3844
|
+
* `GET /rest/api/3/user/bulk`
|
|
3845
|
+
*
|
|
3846
|
+
* @param options - Account IDs plus optional pagination
|
|
3847
|
+
* @returns The matching users
|
|
3848
|
+
*/
|
|
3849
|
+
bulkGet(options: BulkGetUsersOptions): Promise<User[]>;
|
|
3850
|
+
/**
|
|
3851
|
+
* Get a user's default issue-table columns
|
|
3852
|
+
*
|
|
3853
|
+
* `GET /rest/api/3/user/columns`
|
|
3854
|
+
*
|
|
3855
|
+
* @param accountId - Account ID of the user
|
|
3856
|
+
* @returns The column IDs, in display order
|
|
3857
|
+
*/
|
|
3858
|
+
getDefaultColumns(accountId: string): Promise<string[]>;
|
|
3859
|
+
/**
|
|
3860
|
+
* Set the calling user's default issue-table columns
|
|
3861
|
+
*
|
|
3862
|
+
* `PUT /rest/api/3/user/columns`
|
|
3863
|
+
*
|
|
3864
|
+
* Deviates from the Go SDK, which sends a bare JSON array as the body. The
|
|
3865
|
+
* documented request body is `UserColumnRequestBody`, an object with a
|
|
3866
|
+
* `columns` array — "The ID of a column to set. To set multiple columns, send
|
|
3867
|
+
* multiple `columns` parameters."
|
|
3868
|
+
*
|
|
3869
|
+
* @param columns - Column IDs, e.g. `['issuekey', 'summary', 'status']`
|
|
3870
|
+
* @returns Nothing
|
|
3871
|
+
*/
|
|
3872
|
+
setDefaultColumns(columns: string[]): Promise<void>;
|
|
3873
|
+
/**
|
|
3874
|
+
* Reset a user's default issue-table columns to the system defaults
|
|
3875
|
+
*
|
|
3876
|
+
* `DELETE /rest/api/3/user/columns`
|
|
3877
|
+
*
|
|
3878
|
+
* @param accountId - Account ID of the user
|
|
3879
|
+
* @returns Nothing
|
|
3880
|
+
*/
|
|
3881
|
+
resetDefaultColumns(accountId: string): Promise<void>;
|
|
3882
|
+
/**
|
|
3883
|
+
* Get a user property
|
|
3884
|
+
*
|
|
3885
|
+
* `GET /rest/api/3/user/properties/{propertyKey}`
|
|
3886
|
+
*
|
|
3887
|
+
* @param accountId - Account ID of the user
|
|
3888
|
+
* @param propertyKey - Property key
|
|
3889
|
+
* @returns The property key and value
|
|
3890
|
+
*/
|
|
3891
|
+
getUserProperty(accountId: string, propertyKey: string): Promise<UserProperty>;
|
|
3892
|
+
/**
|
|
3893
|
+
* Set a user property
|
|
3894
|
+
*
|
|
3895
|
+
* `PUT /rest/api/3/user/properties/{propertyKey}`
|
|
3896
|
+
*
|
|
3897
|
+
* @param accountId - Account ID of the user
|
|
3898
|
+
* @param propertyKey - Property key
|
|
3899
|
+
* @param value - JSON-serialisable property value
|
|
3900
|
+
* @returns Nothing
|
|
3901
|
+
*/
|
|
3902
|
+
setUserProperty(accountId: string, propertyKey: string, value: unknown): Promise<void>;
|
|
3903
|
+
/**
|
|
3904
|
+
* Delete a user property
|
|
3905
|
+
*
|
|
3906
|
+
* `DELETE /rest/api/3/user/properties/{propertyKey}`
|
|
3907
|
+
*
|
|
3908
|
+
* @param accountId - Account ID of the user
|
|
3909
|
+
* @param propertyKey - Property key
|
|
3910
|
+
* @returns Nothing
|
|
3911
|
+
*/
|
|
3912
|
+
deleteUserProperty(accountId: string, propertyKey: string): Promise<void>;
|
|
3913
|
+
/**
|
|
3914
|
+
* Get the groups a user belongs to
|
|
3915
|
+
*
|
|
3916
|
+
* `GET /rest/api/3/user/groups`
|
|
3917
|
+
*
|
|
3918
|
+
* @param accountId - Account ID of the user
|
|
3919
|
+
* @returns The user's groups
|
|
3920
|
+
*/
|
|
3921
|
+
getUserGroups(accountId: string): Promise<GroupItem[]>;
|
|
3922
|
+
/**
|
|
3923
|
+
* Find users who have all of the given permissions
|
|
3924
|
+
*
|
|
3925
|
+
* `GET /rest/api/3/user/permission/search`
|
|
3926
|
+
*
|
|
3927
|
+
* @param options - Permissions (required) plus optional filters
|
|
3928
|
+
* @returns The matching users
|
|
3929
|
+
*/
|
|
3930
|
+
findUsersWithAllPermissions(options: FindUsersWithAllPermissionsOptions): Promise<User[]>;
|
|
3931
|
+
/**
|
|
3932
|
+
* Find users who can browse the given issue or project
|
|
3933
|
+
*
|
|
3934
|
+
* `GET /rest/api/3/user/viewissue/search`
|
|
3935
|
+
*
|
|
3936
|
+
* @param options - Optional filters
|
|
3937
|
+
* @returns The matching users
|
|
3938
|
+
*/
|
|
3939
|
+
findUsersWithBrowsePermission(options?: FindUsersWithBrowsePermissionOptions): Promise<User[]>;
|
|
3940
|
+
/**
|
|
3941
|
+
* Find users by display name, email address or account ID
|
|
3942
|
+
*
|
|
3943
|
+
* Convenience wrapper around {@link UserService.search}.
|
|
3944
|
+
*
|
|
3945
|
+
* @param name - Search string (required)
|
|
3946
|
+
* @param maxResults - Maximum results; defaults to 50 when omitted or <= 0
|
|
3947
|
+
* @returns The matching users
|
|
3948
|
+
*/
|
|
3949
|
+
findByName(name: string, maxResults?: number): Promise<User[]>;
|
|
3950
|
+
}
|
|
3951
|
+
|
|
3952
|
+
/**
|
|
3953
|
+
* Webhook service for managing Jira webhook registrations.
|
|
3954
|
+
*
|
|
3955
|
+
* @example
|
|
3956
|
+
* ```typescript
|
|
3957
|
+
* const client = new JiraClient({ ... });
|
|
3958
|
+
*
|
|
3959
|
+
* // List webhooks
|
|
3960
|
+
* const webhooks = await client.webhooks.list({ maxResults: 50 });
|
|
3961
|
+
*
|
|
3962
|
+
* // Register webhooks. The callback URL is a single top-level argument —
|
|
3963
|
+
* // Jira allows only one registered URL per app, and it must share the
|
|
3964
|
+
* // Connect app's base URL.
|
|
3965
|
+
* const results = await client.webhooks.create('https://example.com/webhooks/jira', [
|
|
3966
|
+
* {
|
|
3967
|
+
* events: ['jira:issue_created'],
|
|
3968
|
+
* jqlFilter: 'project = PROJ',
|
|
3969
|
+
* },
|
|
3970
|
+
* ]);
|
|
3971
|
+
*
|
|
3972
|
+
* // Iterate every webhook
|
|
3973
|
+
* for await (const webhook of client.webhooks.iterate()) {
|
|
3974
|
+
* console.log(webhook.id, webhook.url);
|
|
3975
|
+
* }
|
|
3976
|
+
* ```
|
|
3977
|
+
*/
|
|
3978
|
+
declare class WebhookService extends BaseService {
|
|
3979
|
+
/**
|
|
3980
|
+
* List registered webhooks.
|
|
3981
|
+
*
|
|
3982
|
+
* `GET /rest/api/3/webhook`
|
|
3983
|
+
*
|
|
3984
|
+
* @param options - Pagination options
|
|
3985
|
+
* @returns The webhooks on the requested page
|
|
3986
|
+
*/
|
|
3987
|
+
list(options?: WebhookListOptions): Promise<Webhook[]>;
|
|
3988
|
+
/**
|
|
3989
|
+
* Async iterator over every registered webhook, paging transparently.
|
|
3990
|
+
*
|
|
3991
|
+
* `GET /rest/api/3/webhook`
|
|
3992
|
+
*
|
|
3993
|
+
* @param options - Page size options (`startAt` is managed by the iterator)
|
|
3994
|
+
* @returns An async generator yielding webhooks
|
|
3995
|
+
*/
|
|
3996
|
+
iterate(options?: Omit<WebhookListOptions, 'startAt'>): AsyncGenerator<Webhook, void, undefined>;
|
|
3997
|
+
/**
|
|
3998
|
+
* Collect every registered webhook into an array.
|
|
3999
|
+
*
|
|
4000
|
+
* `GET /rest/api/3/webhook`
|
|
4001
|
+
*
|
|
4002
|
+
* @param options - Page size options
|
|
4003
|
+
* @returns All webhooks across all pages
|
|
4004
|
+
*/
|
|
4005
|
+
all(options?: Omit<WebhookListOptions, 'startAt'>): Promise<Webhook[]>;
|
|
4006
|
+
/**
|
|
4007
|
+
* Get a single webhook by ID.
|
|
4008
|
+
*
|
|
4009
|
+
* `GET /rest/api/3/webhook/{webhookId}`
|
|
4010
|
+
*
|
|
4011
|
+
* @param webhookId - The numeric webhook ID
|
|
4012
|
+
* @returns The webhook
|
|
4013
|
+
*/
|
|
4014
|
+
get(webhookId: number): Promise<Webhook>;
|
|
4015
|
+
/**
|
|
4016
|
+
* Register one or more webhooks.
|
|
4017
|
+
*
|
|
4018
|
+
* `POST /rest/api/3/webhook`
|
|
4019
|
+
*
|
|
4020
|
+
* Deviates from the Go SDK, which sends `{"webhooks": [{name, url, ...}]}`
|
|
4021
|
+
* with a `url` (and `name`) per webhook. The documented request body is
|
|
4022
|
+
* `WebhookRegistrationDetails`: a single top-level `url` — only one callback
|
|
4023
|
+
* URL per app may be registered, and it must share the Connect app's base
|
|
4024
|
+
* URL — plus a `webhooks` array of `WebhookDetails` objects that have no
|
|
4025
|
+
* `name`/`url` and require `jqlFilter`.
|
|
4026
|
+
*
|
|
4027
|
+
* @param url - The callback URL that receives every registered webhook
|
|
4028
|
+
* @param inputs - The webhooks to register (at least one)
|
|
4029
|
+
* @returns One registration result per submitted webhook
|
|
4030
|
+
*/
|
|
4031
|
+
create(url: string, inputs: CreateWebhookInput[]): Promise<WebhookRegistrationResult[]>;
|
|
4032
|
+
/**
|
|
4033
|
+
* Update an existing webhook.
|
|
4034
|
+
*
|
|
4035
|
+
* `PUT /rest/api/3/webhook/{webhookId}`
|
|
4036
|
+
*
|
|
4037
|
+
* @param webhookId - The numeric webhook ID
|
|
4038
|
+
* @param input - The fields to update
|
|
4039
|
+
* @returns The updated webhook
|
|
4040
|
+
*/
|
|
4041
|
+
update(webhookId: number, input: UpdateWebhookInput): Promise<Webhook>;
|
|
4042
|
+
/**
|
|
4043
|
+
* Delete one or more webhooks.
|
|
4044
|
+
*
|
|
4045
|
+
* `DELETE /rest/api/3/webhook`
|
|
4046
|
+
*
|
|
4047
|
+
* Deviates from the Go SDK, which sends the IDs as repeated `webhookId`
|
|
4048
|
+
* query parameters. The endpoint documents a required JSON request body
|
|
4049
|
+
* (`ContainerForWebhookIDs`, `{"webhookIds": [...]}`) and declares no query
|
|
4050
|
+
* parameters at all.
|
|
4051
|
+
*
|
|
4052
|
+
* @param webhookIds - The webhook IDs to delete (at least one)
|
|
4053
|
+
* @returns Nothing
|
|
4054
|
+
*/
|
|
4055
|
+
deleteWebhooks(webhookIds: number[]): Promise<void>;
|
|
4056
|
+
/**
|
|
4057
|
+
* Extend the expiration date of webhooks.
|
|
4058
|
+
*
|
|
4059
|
+
* `PUT /rest/api/3/webhook/refresh`
|
|
4060
|
+
*
|
|
4061
|
+
* @param webhookIds - The webhook IDs to refresh (at least one)
|
|
4062
|
+
* @returns The new expiration timestamp (epoch milliseconds)
|
|
4063
|
+
*/
|
|
4064
|
+
refresh(webhookIds: number[]): Promise<number>;
|
|
4065
|
+
/**
|
|
4066
|
+
* Get the dynamic modules registered by the app.
|
|
4067
|
+
*
|
|
4068
|
+
* `GET /rest/api/3/app/module/dynamic`
|
|
4069
|
+
*
|
|
4070
|
+
* @returns The dynamic module registration payload
|
|
4071
|
+
*/
|
|
4072
|
+
getDynamicModules(): Promise<DynamicModules>;
|
|
4073
|
+
/**
|
|
4074
|
+
* Get webhooks whose delivery recently failed.
|
|
4075
|
+
*
|
|
4076
|
+
* `GET /rest/api/3/webhook/failed`
|
|
4077
|
+
*
|
|
4078
|
+
* @param options - Pagination options (only `maxResults` is sent)
|
|
4079
|
+
* @returns The failed webhook deliveries
|
|
4080
|
+
*/
|
|
4081
|
+
getFailedWebhooks(options?: WebhookListOptions): Promise<FailedWebhook[]>;
|
|
4082
|
+
/**
|
|
4083
|
+
* Fetch a single page of webhooks, including its pagination metadata.
|
|
4084
|
+
*/
|
|
4085
|
+
private listPage;
|
|
4086
|
+
}
|
|
4087
|
+
|
|
4088
|
+
/**
|
|
4089
|
+
* Workflow service for workflows, statuses, status categories, transitions
|
|
4090
|
+
* and workflow schemes.
|
|
4091
|
+
*
|
|
4092
|
+
* @example
|
|
4093
|
+
* ```typescript
|
|
4094
|
+
* const client = new JiraClient({ ... });
|
|
4095
|
+
*
|
|
4096
|
+
* // Available transitions for an issue
|
|
4097
|
+
* const transitions = await client.workflows.getTransitions('PROJ-123');
|
|
4098
|
+
*
|
|
4099
|
+
* // Perform a transition
|
|
4100
|
+
* await client.workflows.doTransition('PROJ-123', { transition: { id: '31' } });
|
|
4101
|
+
*
|
|
4102
|
+
* // Page through every workflow
|
|
4103
|
+
* for await (const workflow of client.workflows.iterate()) {
|
|
4104
|
+
* console.log(workflow.name);
|
|
4105
|
+
* }
|
|
4106
|
+
* ```
|
|
4107
|
+
*/
|
|
4108
|
+
declare class WorkflowService extends BaseService {
|
|
4109
|
+
/**
|
|
4110
|
+
* Get the transitions currently available on an issue
|
|
4111
|
+
*
|
|
4112
|
+
* `GET /rest/api/3/issue/{issueIdOrKey}/transitions`
|
|
4113
|
+
*
|
|
4114
|
+
* Note: this overlaps with `IssueService.getTransitions`. It is provided here
|
|
4115
|
+
* because the Go SDK exposes it on both services; this variant returns the
|
|
4116
|
+
* transition array directly and additionally supports
|
|
4117
|
+
* `skipRemoteOnlyCondition`.
|
|
4118
|
+
*
|
|
4119
|
+
* @param issueIdOrKey - Issue ID or key (e.g. `PROJ-123`)
|
|
4120
|
+
* @param options - Optional expand / filtering options
|
|
4121
|
+
* @returns The transitions available to the current user
|
|
4122
|
+
*/
|
|
4123
|
+
getTransitions(issueIdOrKey: string, options?: GetWorkflowTransitionsOptions): Promise<WorkflowTransition[]>;
|
|
4124
|
+
/**
|
|
4125
|
+
* Perform a workflow transition on an issue
|
|
4126
|
+
*
|
|
4127
|
+
* `POST /rest/api/3/issue/{issueIdOrKey}/transitions`
|
|
4128
|
+
*
|
|
4129
|
+
* Note: this overlaps with `IssueService.doTransition`; the Go SDK exposes it
|
|
4130
|
+
* on both services.
|
|
4131
|
+
*
|
|
4132
|
+
* @param issueIdOrKey - Issue ID or key (e.g. `PROJ-123`)
|
|
4133
|
+
* @param input - The transition to perform plus optional field/update payloads
|
|
4134
|
+
* @returns Nothing; the endpoint responds 204 No Content
|
|
4135
|
+
*/
|
|
4136
|
+
doTransition(issueIdOrKey: string, input: WorkflowDoTransitionInput): Promise<void>;
|
|
4137
|
+
/**
|
|
4138
|
+
* Search workflows (paginated)
|
|
4139
|
+
*
|
|
4140
|
+
* `GET /rest/api/3/workflow/search`
|
|
4141
|
+
*
|
|
4142
|
+
* @param options - Optional name filter and pagination
|
|
4143
|
+
* @returns A page of workflows
|
|
4144
|
+
*/
|
|
4145
|
+
list(options?: ListWorkflowsOptions): Promise<WorkflowSearchResult>;
|
|
4146
|
+
/**
|
|
4147
|
+
* Async iterator over every workflow, transparently paging the API
|
|
4148
|
+
*
|
|
4149
|
+
* @param options - Optional name filter; `maxResults` sets the page size
|
|
4150
|
+
* @returns An async generator yielding each workflow
|
|
4151
|
+
*/
|
|
4152
|
+
iterate(options?: Omit<ListWorkflowsOptions, 'startAt'>): AsyncGenerator<Workflow, void, undefined>;
|
|
4153
|
+
/**
|
|
4154
|
+
* Collect every workflow into an array (loads all pages into memory)
|
|
4155
|
+
*
|
|
4156
|
+
* @param options - Optional name filter; `maxResults` sets the page size
|
|
4157
|
+
* @returns All workflows
|
|
4158
|
+
*/
|
|
4159
|
+
all(options?: Omit<ListWorkflowsOptions, 'startAt'>): Promise<Workflow[]>;
|
|
4160
|
+
/**
|
|
4161
|
+
* Get a workflow by entity ID or by name
|
|
4162
|
+
*
|
|
4163
|
+
* `GET /rest/api/3/workflow/search` (paged)
|
|
4164
|
+
*
|
|
4165
|
+
* Deviates from the Go SDK, which issues
|
|
4166
|
+
* `GET /rest/api/3/workflow/{workflowIdOrName}`. No such read endpoint exists
|
|
4167
|
+
* in the v3 API — the only `/rest/api/3/workflow/{entityId}` operation is
|
|
4168
|
+
* `DELETE` (delete inactive workflow), so the Go call returns 405/404. The
|
|
4169
|
+
* documented read path is `GET /rest/api/3/workflow/search`.
|
|
4170
|
+
*
|
|
4171
|
+
* The ID-or-name behaviour is preserved: the search is narrowed with the
|
|
4172
|
+
* `workflowName` filter, and the returned page is matched against both the
|
|
4173
|
+
* workflow's `id.name` and its `id.entityId`. If the argument is an entity ID
|
|
4174
|
+
* rather than a name the name filter yields nothing, so the search is retried
|
|
4175
|
+
* unfiltered and matched on `entityId`.
|
|
4176
|
+
*
|
|
4177
|
+
* @param workflowIdOrName - Workflow entity ID or workflow name
|
|
4178
|
+
* @returns The workflow
|
|
4179
|
+
* @throws If no workflow matches
|
|
4180
|
+
*/
|
|
4181
|
+
get(workflowIdOrName: string): Promise<Workflow>;
|
|
4182
|
+
/**
|
|
4183
|
+
* Get every status defined in the Jira instance
|
|
4184
|
+
*
|
|
4185
|
+
* `GET /rest/api/3/status`
|
|
4186
|
+
*
|
|
4187
|
+
* @returns All statuses
|
|
4188
|
+
*/
|
|
4189
|
+
getAllStatuses(): Promise<WorkflowStatus[]>;
|
|
4190
|
+
/**
|
|
4191
|
+
* Get a status by ID or name
|
|
4192
|
+
*
|
|
4193
|
+
* `GET /rest/api/3/status/{idOrName}`
|
|
4194
|
+
*
|
|
4195
|
+
* @param statusIdOrName - Status ID or name
|
|
4196
|
+
* @returns The status
|
|
4197
|
+
*/
|
|
4198
|
+
getStatus(statusIdOrName: string): Promise<WorkflowStatus>;
|
|
4199
|
+
/**
|
|
4200
|
+
* Get every status category
|
|
4201
|
+
*
|
|
4202
|
+
* `GET /rest/api/3/statuscategory`
|
|
4203
|
+
*
|
|
4204
|
+
* @returns All status categories
|
|
4205
|
+
*/
|
|
4206
|
+
getStatusCategories(): Promise<WorkflowStatusCategory[]>;
|
|
4207
|
+
/**
|
|
4208
|
+
* Get a status category by ID or key
|
|
4209
|
+
*
|
|
4210
|
+
* `GET /rest/api/3/statuscategory/{idOrKey}`
|
|
4211
|
+
*
|
|
4212
|
+
* @param idOrKey - Status category ID (e.g. `2`) or key (e.g. `done`)
|
|
4213
|
+
* @returns The status category
|
|
4214
|
+
*/
|
|
4215
|
+
getStatusCategory(idOrKey: string): Promise<WorkflowStatusCategory>;
|
|
4216
|
+
/**
|
|
4217
|
+
* Get a workflow scheme by ID
|
|
4218
|
+
*
|
|
4219
|
+
* `GET /rest/api/3/workflowscheme/{id}`
|
|
4220
|
+
*
|
|
4221
|
+
* @param schemeId - Workflow scheme ID
|
|
4222
|
+
* @returns The workflow scheme
|
|
4223
|
+
*/
|
|
4224
|
+
getWorkflowScheme(schemeId: number): Promise<WorkflowScheme>;
|
|
4225
|
+
/**
|
|
4226
|
+
* List workflow schemes (paginated)
|
|
4227
|
+
*
|
|
4228
|
+
* `GET /rest/api/3/workflowscheme`
|
|
4229
|
+
*
|
|
4230
|
+
* @param options - Optional pagination
|
|
4231
|
+
* @returns A page of workflow schemes
|
|
4232
|
+
*/
|
|
4233
|
+
listWorkflowSchemes(options?: ListWorkflowSchemesOptions): Promise<WorkflowSchemeListResult>;
|
|
4234
|
+
/**
|
|
4235
|
+
* Async iterator over every workflow scheme, transparently paging the API
|
|
4236
|
+
*
|
|
4237
|
+
* @param options - Optional pagination; `maxResults` sets the page size
|
|
4238
|
+
* @returns An async generator yielding each workflow scheme
|
|
4239
|
+
*/
|
|
4240
|
+
iterateWorkflowSchemes(options?: Omit<ListWorkflowSchemesOptions, 'startAt'>): AsyncGenerator<WorkflowScheme, void, undefined>;
|
|
4241
|
+
/**
|
|
4242
|
+
* Collect every workflow scheme into an array (loads all pages into memory)
|
|
4243
|
+
*
|
|
4244
|
+
* @param options - Optional pagination; `maxResults` sets the page size
|
|
4245
|
+
* @returns All workflow schemes
|
|
4246
|
+
*/
|
|
4247
|
+
allWorkflowSchemes(options?: Omit<ListWorkflowSchemesOptions, 'startAt'>): Promise<WorkflowScheme[]>;
|
|
4248
|
+
/**
|
|
4249
|
+
* Create a workflow scheme
|
|
4250
|
+
*
|
|
4251
|
+
* `POST /rest/api/3/workflowscheme`
|
|
4252
|
+
*
|
|
4253
|
+
* @param input - Scheme name plus optional description, default workflow and
|
|
4254
|
+
* issue type mappings
|
|
4255
|
+
* @returns The created workflow scheme
|
|
4256
|
+
*/
|
|
4257
|
+
createWorkflowScheme(input: CreateWorkflowSchemeInput): Promise<WorkflowScheme>;
|
|
4258
|
+
/**
|
|
4259
|
+
* Update a workflow scheme
|
|
4260
|
+
*
|
|
4261
|
+
* `PUT /rest/api/3/workflowscheme/{id}`
|
|
4262
|
+
*
|
|
4263
|
+
* @param schemeId - Workflow scheme ID
|
|
4264
|
+
* @param input - Fields to update
|
|
4265
|
+
* @returns The updated workflow scheme
|
|
4266
|
+
*/
|
|
4267
|
+
updateWorkflowScheme(schemeId: number, input: UpdateWorkflowSchemeInput): Promise<WorkflowScheme>;
|
|
4268
|
+
/**
|
|
4269
|
+
* Delete a workflow scheme
|
|
4270
|
+
*
|
|
4271
|
+
* `DELETE /rest/api/3/workflowscheme/{id}`
|
|
4272
|
+
*
|
|
4273
|
+
* @param schemeId - Workflow scheme ID
|
|
4274
|
+
* @returns Nothing; the endpoint responds 204 No Content
|
|
4275
|
+
*/
|
|
4276
|
+
deleteWorkflowScheme(schemeId: number): Promise<void>;
|
|
4277
|
+
/**
|
|
4278
|
+
* Set the workflow used by an issue type within a workflow scheme
|
|
4279
|
+
*
|
|
4280
|
+
* `PUT /rest/api/3/workflowscheme/{id}/issuetype/{issueType}`
|
|
4281
|
+
*
|
|
4282
|
+
* @param schemeId - Workflow scheme ID
|
|
4283
|
+
* @param input - The issue type, its workflow and whether to update the draft
|
|
4284
|
+
* @returns Nothing; the endpoint responds 204 No Content
|
|
4285
|
+
*/
|
|
4286
|
+
setWorkflowSchemeIssueType(schemeId: number, input: WorkflowSchemeIssueTypeInput): Promise<void>;
|
|
4287
|
+
/**
|
|
4288
|
+
* Remove the workflow mapping for an issue type within a workflow scheme
|
|
4289
|
+
*
|
|
4290
|
+
* `DELETE /rest/api/3/workflowscheme/{id}/issuetype/{issueType}`
|
|
4291
|
+
*
|
|
4292
|
+
* @param schemeId - Workflow scheme ID
|
|
4293
|
+
* @param issueType - Issue type ID
|
|
4294
|
+
* @returns Nothing; the endpoint responds 204 No Content
|
|
4295
|
+
*/
|
|
4296
|
+
deleteWorkflowSchemeIssueType(schemeId: number, issueType: string): Promise<void>;
|
|
744
4297
|
}
|
|
745
4298
|
|
|
746
|
-
export { BaseService, IssueService, ProjectService, type SearchOptions, type SearchResult, SearchService, UserService };
|
|
4299
|
+
export { AgileService, AppPropertiesService, AuditService, BaseService, BulkService, DashboardService, ExpressionService, FieldService, FilterService, GroupService, IssueLinkTypeService, IssueService, IssueTypeService, LabelService, MyselfService, NotificationService, PermissionService, PriorityService, ProjectService, ResolutionService, ScreenService, type SearchOptions, type SearchResult, SearchService, SecurityLevelService, ServerInfoService, TimeTrackingService, UserService, WebhookService, WorkflowService };
|